=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tmux.h,v retrieving revision 1.1030 retrieving revision 1.1031 diff -c -r1.1030 -r1.1031 *** src/usr.bin/tmux/tmux.h 2020/05/16 15:27:08 1.1030 --- src/usr.bin/tmux/tmux.h 2020/05/16 15:34:08 1.1031 *************** *** 1,4 **** ! /* $OpenBSD: tmux.h,v 1.1030 2020/05/16 15:27:08 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tmux.h,v 1.1031 2020/05/16 15:34:08 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 55,61 **** --- 55,65 ---- struct options; struct options_array_item; struct options_entry; + struct screen_write_collect_item; + struct screen_write_collect_line; + struct screen_write_ctx; struct session; + struct tty_ctx; struct tmuxpeer; struct tmuxproc; struct winlink; *************** *** 786,798 **** }; /* Screen write context. */ ! struct screen_write_collect_item; ! struct screen_write_collect_line; struct screen_write_ctx { struct window_pane *wp; struct screen *s; int sync; struct screen_write_collect_item *item; u_int scrolled; u_int bg; --- 790,805 ---- }; /* Screen write context. */ ! typedef void (*screen_write_init_ctx_cb)(struct screen_write_ctx *, ! struct tty_ctx *); struct screen_write_ctx { struct window_pane *wp; struct screen *s; int sync; + screen_write_init_ctx_cb init_ctx_cb; + void *arg; + struct screen_write_collect_item *item; u_int scrolled; u_int bg; *************** *** 1252,1259 **** struct termios tio; struct grid_cell cell; - - int last_wp; struct grid_cell last_cell; #define TTY_NOCURSOR 0x1 --- 1259,1264 ---- *************** *** 1285,1293 **** }; /* TTY command context. */ struct tty_ctx { ! struct window_pane *wp; const struct grid_cell *cell; int wrapped; --- 1290,1304 ---- }; /* TTY command context. */ + typedef void (*tty_ctx_redraw_cb)(const struct tty_ctx *); + typedef int (*tty_ctx_set_client_cb)(struct tty_ctx *, struct client *); struct tty_ctx { ! struct screen *s; + tty_ctx_redraw_cb redraw_cb; + tty_ctx_set_client_cb set_client_cb; + void *arg; + const struct grid_cell *cell; int wrapped; *************** *** 1308,1319 **** --- 1319,1336 ---- /* Target region (usually pane) offset and size. */ u_int xoff; u_int yoff; + u_int rxoff; + u_int ryoff; u_int sx; u_int sy; /* The background colour used for clearing (erasing). */ u_int bg; + /* The default colours and palette. */ + struct grid_cell defaults; + int *palette; + /* Containing region (usually window) offset and size. */ int bigger; u_int wox; *************** *** 1492,1498 **** typedef int (*prompt_input_cb)(struct client *, void *, const char *, int); typedef void (*prompt_free_cb)(void *); typedef int (*overlay_check_cb)(struct client *, u_int, u_int); ! typedef int (*overlay_mode_cb)(struct client *, u_int *, u_int *); 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 *); --- 1509,1515 ---- typedef int (*prompt_input_cb)(struct client *, void *, const char *, int); typedef void (*prompt_free_cb)(void *); typedef int (*overlay_check_cb)(struct client *, u_int, u_int); ! typedef struct screen *(*overlay_mode_cb)(struct client *, u_int *, u_int *); 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 *); *************** *** 1969,1975 **** void tty_update_client_offset(struct client *); void tty_raw(struct tty *, const char *); void tty_attributes(struct tty *, const struct grid_cell *, ! struct window_pane *); void tty_reset(struct tty *); void tty_region_off(struct tty *); void tty_margin_off(struct tty *); --- 1986,1992 ---- void tty_update_client_offset(struct client *); void tty_raw(struct tty *, const char *); void tty_attributes(struct tty *, const struct grid_cell *, ! const struct grid_cell *, int *); void tty_reset(struct tty *); void tty_region_off(struct tty *); void tty_margin_off(struct tty *); *************** *** 1992,1999 **** void tty_stop_tty(struct tty *); void tty_set_title(struct tty *, const char *); void tty_update_mode(struct tty *, int, struct screen *); ! void tty_draw_line(struct tty *, struct window_pane *, struct screen *, ! u_int, u_int, u_int, u_int, u_int); void tty_sync_start(struct tty *); void tty_sync_end(struct tty *); int tty_open(struct tty *, char **); --- 2009,2016 ---- void tty_stop_tty(struct tty *); void tty_set_title(struct tty *, const char *); void tty_update_mode(struct tty *, int, struct screen *); ! void tty_draw_line(struct tty *, struct screen *, u_int, u_int, u_int, ! u_int, u_int, const struct grid_cell *, int *); void tty_sync_start(struct tty *); void tty_sync_end(struct tty *); int tty_open(struct tty *, char **); *************** *** 2024,2029 **** --- 2041,2047 ---- void tty_cmd_setselection(struct tty *, const struct tty_ctx *); void tty_cmd_rawstring(struct tty *, const struct tty_ctx *); void tty_cmd_syncstart(struct tty *, const struct tty_ctx *); + void tty_default_colours(struct grid_cell *, struct window_pane *); /* tty-term.c */ extern struct tty_terms tty_terms; *************** *** 2342,2349 **** struct evbuffer *input_pending(struct input_ctx *); void input_parse_pane(struct window_pane *); void input_parse_buffer(struct window_pane *, u_char *, size_t); ! void input_parse_screen(struct input_ctx *, struct screen *, u_char *, ! size_t); /* input-key.c */ int input_key_pane(struct window_pane *, key_code, struct mouse_event *); --- 2360,2367 ---- struct evbuffer *input_pending(struct input_ctx *); void input_parse_pane(struct window_pane *); void input_parse_buffer(struct window_pane *, u_char *, size_t); ! void input_parse_screen(struct input_ctx *, struct screen *, ! screen_write_init_ctx_cb, void *, u_char *, size_t); /* input-key.c */ int input_key_pane(struct window_pane *, key_code, struct mouse_event *); *************** *** 2426,2433 **** /* screen-write.c */ void screen_write_make_list(struct screen *); void screen_write_free_list(struct screen *); ! void screen_write_start(struct screen_write_ctx *, struct window_pane *, ! struct screen *); void screen_write_stop(struct screen_write_ctx *); void screen_write_reset(struct screen_write_ctx *); size_t printflike(1, 2) screen_write_strlen(const char *, ...); --- 2444,2454 ---- /* screen-write.c */ void screen_write_make_list(struct screen *); void screen_write_free_list(struct screen *); ! void screen_write_start_pane(struct screen_write_ctx *, ! struct window_pane *, struct screen *); ! void screen_write_start(struct screen_write_ctx *, struct screen *); ! void screen_write_start_callback(struct screen_write_ctx *, struct screen *, ! screen_write_init_ctx_cb, void *); void screen_write_stop(struct screen_write_ctx *); void screen_write_reset(struct screen_write_ctx *); size_t printflike(1, 2) screen_write_strlen(const char *, ...); *************** *** 2481,2486 **** --- 2502,2511 ---- void screen_write_cell(struct screen_write_ctx *, const struct grid_cell *); void screen_write_setselection(struct screen_write_ctx *, u_char *, u_int); void screen_write_rawstring(struct screen_write_ctx *, u_char *, u_int); + void screen_write_alternateon(struct screen_write_ctx *, + struct grid_cell *, int); + void screen_write_alternateoff(struct screen_write_ctx *, + struct grid_cell *, int); /* screen-redraw.c */ void screen_redraw_screen(struct client *); *************** *** 2569,2578 **** struct window_pane *window_pane_find_by_id(u_int); int window_pane_destroy_ready(struct window_pane *); void window_pane_resize(struct window_pane *, u_int, u_int); - void window_pane_alternate_on(struct window_pane *, - struct grid_cell *, int); - void window_pane_alternate_off(struct window_pane *, - struct grid_cell *, int); void window_pane_set_palette(struct window_pane *, u_int, int); void window_pane_unset_palette(struct window_pane *, u_int); void window_pane_reset_palette(struct window_pane *); --- 2594,2599 ----