aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authornicm <nicm>2020-07-06 09:14:20 +0000
committernicm <nicm>2020-07-06 09:14:20 +0000
commit66d5e5de7ac6a81f638d1a2b2f5262368a68fee2 (patch)
treea633b354a3514ed0fff68aea74fd806327039458 /tmux.h
parent2bf612a8066ab75725eeb09adf1ebc0f4fe851ab (diff)
downloadrtmux-66d5e5de7ac6a81f638d1a2b2f5262368a68fee2.tar.gz
rtmux-66d5e5de7ac6a81f638d1a2b2f5262368a68fee2.tar.bz2
rtmux-66d5e5de7ac6a81f638d1a2b2f5262368a68fee2.zip
Add a way for control mode clients to subscribe to a format and be
notified of changes rather than having to poll. GitHub issue 2242.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tmux.h b/tmux.h
index a8c67051..07dfc0ae 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1722,6 +1722,15 @@ struct client {
};
TAILQ_HEAD(clients, client);
+/* Control mode subscription type. */
+enum control_sub_type {
+ CONTROL_SUB_SESSION,
+ CONTROL_SUB_PANE,
+ CONTROL_SUB_ALL_PANES,
+ CONTROL_SUB_WINDOW,
+ CONTROL_SUB_ALL_WINDOWS
+};
+
/* Key binding and key table. */
struct key_binding {
key_code key;
@@ -2862,6 +2871,9 @@ void control_reset_offsets(struct client *);
void printflike(2, 3) control_write(struct client *, const char *, ...);
void control_write_output(struct client *, struct window_pane *);
int control_all_done(struct client *);
+void control_add_sub(struct client *, const char *, enum control_sub_type,
+ int, const char *);
+void control_remove_sub(struct client *, const char *);
/* control-notify.c */
void control_notify_input(struct client *, struct window_pane *,