summaryrefslogtreecommitdiffstats
path: root/tmux.h
diff options
context:
space:
mode:
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h41
1 files changed, 28 insertions, 13 deletions
diff --git a/tmux.h b/tmux.h
index 8c66bca5..96efb661 100644
--- a/tmux.h
+++ b/tmux.h
@@ -19,7 +19,7 @@
#ifndef TMUX_H
#define TMUX_H
-#define PROTOCOL_VERSION 6
+#define PROTOCOL_VERSION 7
#include <sys/param.h>
#include <sys/time.h>
@@ -369,7 +369,7 @@ enum msgtype {
MSG_EXITED,
MSG_EXITING,
MSG_IDENTIFY,
- MSG_PRINT,
+ MSG_STDIN,
MSG_READY,
MSG_RESIZE,
MSG_SHUTDOWN,
@@ -425,6 +425,21 @@ struct msg_exit_data {
int retcode;
};
+struct msg_stdin_data {
+ ssize_t size;
+ char data[BUFSIZ];
+};
+
+struct msg_stdout_data {
+ ssize_t size;
+ char data[BUFSIZ];
+};
+
+struct msg_stderr_data {
+ ssize_t size;
+ char data[BUFSIZ];
+};
+
/* Mode key commands. */
enum mode_key_cmd {
MODEKEY_NONE,
@@ -1161,16 +1176,12 @@ struct client {
struct tty tty;
- int stdin_fd;
- void *stdin_data;
- void (*stdin_callback)(struct client *, void *);
- struct bufferevent *stdin_event;
-
- int stdout_fd;
- struct bufferevent *stdout_event;
-
- int stderr_fd;
- struct bufferevent *stderr_event;
+ void (*stdin_callback)(struct client *, int, void *);
+ void *stdin_callback_data;
+ struct evbuffer *stdin_data;
+ int stdin_closed;
+ struct evbuffer *stdout_data;
+ struct evbuffer *stderr_data;
struct event repeat_timer;
@@ -1734,7 +1745,7 @@ void server_window_loop(void);
/* server-fn.c */
void server_fill_environ(struct session *, struct environ *);
-void server_write_client(
+int server_write_client(
struct client *, enum msgtype, const void *, size_t);
void server_write_session(
struct session *, enum msgtype, const void *, size_t);
@@ -1762,6 +1773,10 @@ void server_check_unattached (void);
void server_set_identify(struct client *);
void server_clear_identify(struct client *);
void server_update_event(struct client *);
+void server_push_stdout(struct client *);
+void server_push_stderr(struct client *);
+int server_set_stdin_callback(struct client *, void (*)(struct client *,
+ int, void *), void *, char **);
/* status.c */
int status_out_cmp(struct status_out *, struct status_out *);