aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-11-01 22:49:54 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-11-01 22:49:54 +0000
commit25311fc4eb278d41cb29e1d0dd8dccff07617713 (patch)
tree0f72cc86b04b5e3ac0e9429f386d227151b79406 /terminal.h
parentMerge branch 'term-init-cleanup' (diff)
parentclient: register signal handler for SIGTERM too (diff)
Merge branch 'multi-window'
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/terminal.h b/terminal.h
index b16b9b51..11571519 100644
--- a/terminal.h
+++ b/terminal.h
@@ -287,12 +287,19 @@ struct terminal {
int lower_fd;
int upper_fd;
} delayed_render_timer;
+
+ bool is_shutting_down;
+ void (*shutdown_cb)(void *data, int exit_code);
+ void *shutdown_data;
};
struct config;
struct terminal *term_init(
const struct config *conf, struct fdm *fdm, struct wayland *wayl,
- int argc, char *const *argv);
+ const char *term_env, int argc, char *const *argv,
+ void (*shutdown_cb)(void *data, int exit_code), void *shutdown_data);
+
+bool term_shutdown(struct terminal *term);
int term_destroy(struct terminal *term);
void term_reset(struct terminal *term, bool hard);