=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tmux.h,v retrieving revision 1.889 retrieving revision 1.890 diff -u -r1.889 -r1.890 --- src/usr.bin/tmux/tmux.h 2019/05/07 11:24:03 1.889 +++ src/usr.bin/tmux/tmux.h 2019/05/07 20:01:41 1.890 @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.889 2019/05/07 11:24:03 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.890 2019/05/07 20:01:41 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -727,6 +727,21 @@ u_int skipped; }; +/* Screen redraw context. */ +struct screen_redraw_ctx { + struct client *c; + + u_int statuslines; + int statustop; + + int pane_status; + + u_int sx; + u_int sy; + u_int ox; + u_int oy; +}; + /* Screen size. */ #define screen_size_x(s) ((s)->grid->sx) #define screen_size_y(s) ((s)->grid->sy) @@ -1374,6 +1389,9 @@ /* Client connection. */ typedef int (*prompt_input_cb)(struct client *, void *, const char *, int); typedef void (*prompt_free_cb)(void *); +typedef void (*overlay_draw_cb)(struct client *, struct screen_redraw_ctx *); +typedef int (*overlay_key_cb)(struct client *, struct key_event *); +typedef void (*overlay_free_cb)(struct client *); struct client { const char *name; struct tmuxpeer *peer; @@ -1423,7 +1441,7 @@ #define CLIENT_REPEAT 0x20 #define CLIENT_SUSPENDED 0x40 #define CLIENT_ATTACHED 0x80 -#define CLIENT_IDENTIFY 0x100 +/* 0x100 unused */ #define CLIENT_DEAD 0x200 #define CLIENT_REDRAWBORDERS 0x400 #define CLIENT_READONLY 0x800 @@ -1452,12 +1470,6 @@ int flags; struct key_table *keytable; - struct event identify_timer; - void (*identify_callback)(struct client *, - struct window_pane *); - void *identify_callback_data; - struct cmdq_item *identify_callback_item; - char *message_string; struct event message_timer; u_int message_next; @@ -1488,6 +1500,12 @@ u_int pan_ox; u_int pan_oy; + overlay_draw_cb overlay_draw; + overlay_key_cb overlay_key; + overlay_free_cb overlay_free; + void *overlay_data; + struct event overlay_timer; + TAILQ_ENTRY(client) entry; }; TAILQ_HEAD(clients, client); @@ -2008,7 +2026,8 @@ /* server-client.c */ u_int server_client_how_many(void); -void server_client_set_identify(struct client *, u_int); +void server_client_set_overlay(struct client *, u_int, overlay_draw_cb, + overlay_key_cb, overlay_free_cb, void *); void server_client_set_key_table(struct client *, const char *); const char *server_client_get_key_table(struct client *); int server_client_check_nested(struct client *);