version 1.1114, 2021/08/11 09:05:21 |
version 1.1115, 2021/08/11 20:49:55 |
|
|
/* Special colours. */ |
/* Special colours. */ |
#define COLOUR_DEFAULT(c) ((c) == 8 || (c) == 9) |
#define COLOUR_DEFAULT(c) ((c) == 8 || (c) == 9) |
|
|
|
/* Replacement palette. */ |
|
struct colour_palette { |
|
int fg; |
|
int bg; |
|
|
|
int *palette; |
|
int *default_palette; |
|
}; |
|
|
/* Grid attributes. Anything above 0xff is stored in an extended cell. */ |
/* Grid attributes. Anything above 0xff is stored in an extended cell. */ |
#define GRID_ATTR_BRIGHT 0x1 |
#define GRID_ATTR_BRIGHT 0x1 |
#define GRID_ATTR_DIM 0x2 |
#define GRID_ATTR_DIM 0x2 |
|
|
u_int xoff; |
u_int xoff; |
u_int yoff; |
u_int yoff; |
|
|
int fg; |
|
int bg; |
|
|
|
int flags; |
int flags; |
#define PANE_REDRAW 0x1 |
#define PANE_REDRAW 0x1 |
#define PANE_DROP 0x2 |
#define PANE_DROP 0x2 |
|
|
|
|
struct grid_cell cached_gc; |
struct grid_cell cached_gc; |
struct grid_cell cached_active_gc; |
struct grid_cell cached_active_gc; |
int *palette; |
struct colour_palette palette; |
|
|
int pipe_fd; |
int pipe_fd; |
struct bufferevent *pipe_event; |
struct bufferevent *pipe_event; |
|
|
|
|
/* The default colours and palette. */ |
/* The default colours and palette. */ |
struct grid_cell defaults; |
struct grid_cell defaults; |
int *palette; |
struct colour_palette *palette; |
|
|
/* Containing region (usually window) offset and size. */ |
/* Containing region (usually window) offset and size. */ |
int bigger; |
int bigger; |
|
|
/* Option data. */ |
/* Option data. */ |
RB_HEAD(options_array, options_array_item); |
RB_HEAD(options_array, options_array_item); |
union options_value { |
union options_value { |
char *string; |
char *string; |
long long number; |
long long number; |
struct style style; |
struct style style; |
struct options_array array; |
struct options_array array; |
struct cmd_list *cmdlist; |
struct cmd_list *cmdlist; |
}; |
}; |
|
|
/* Option table entries. */ |
/* Option table entries. */ |
|
|
void tty_update_client_offset(struct client *); |
void tty_update_client_offset(struct client *); |
void tty_raw(struct tty *, const char *); |
void tty_raw(struct tty *, const char *); |
void tty_attributes(struct tty *, const struct grid_cell *, |
void tty_attributes(struct tty *, const struct grid_cell *, |
const struct grid_cell *, int *); |
const struct grid_cell *, struct colour_palette *); |
void tty_reset(struct tty *); |
void tty_reset(struct tty *); |
void tty_region_off(struct tty *); |
void tty_region_off(struct tty *); |
void tty_margin_off(struct tty *); |
void tty_margin_off(struct tty *); |
|
|
void tty_putc(struct tty *, u_char); |
void tty_putc(struct tty *, u_char); |
void tty_putn(struct tty *, const void *, size_t, u_int); |
void tty_putn(struct tty *, const void *, size_t, u_int); |
void tty_cell(struct tty *, const struct grid_cell *, |
void tty_cell(struct tty *, const struct grid_cell *, |
const struct grid_cell *, int *); |
const struct grid_cell *, struct colour_palette *); |
int tty_init(struct tty *, struct client *); |
int tty_init(struct tty *, struct client *); |
void tty_resize(struct tty *); |
void tty_resize(struct tty *); |
void tty_set_size(struct tty *, u_int, u_int, u_int, u_int); |
void tty_set_size(struct tty *, u_int, u_int, u_int, u_int); |
|
|
void tty_set_title(struct tty *, const char *); |
void tty_set_title(struct tty *, const char *); |
void tty_update_mode(struct tty *, int, struct screen *); |
void tty_update_mode(struct tty *, int, struct screen *); |
void tty_draw_line(struct tty *, struct screen *, u_int, u_int, u_int, |
void tty_draw_line(struct tty *, struct screen *, u_int, u_int, u_int, |
u_int, u_int, const struct grid_cell *, int *); |
u_int, u_int, const struct grid_cell *, struct colour_palette *); |
void tty_sync_start(struct tty *); |
void tty_sync_start(struct tty *); |
void tty_sync_end(struct tty *); |
void tty_sync_end(struct tty *); |
int tty_open(struct tty *, char **); |
int tty_open(struct tty *, char **); |
|
|
void recalculate_sizes_now(int); |
void recalculate_sizes_now(int); |
|
|
/* input.c */ |
/* input.c */ |
struct input_ctx *input_init(struct window_pane *, struct bufferevent *); |
struct input_ctx *input_init(struct window_pane *, struct bufferevent *, |
|
struct colour_palette *); |
void input_free(struct input_ctx *); |
void input_free(struct input_ctx *); |
void input_reset(struct input_ctx *, int); |
void input_reset(struct input_ctx *, int); |
struct evbuffer *input_pending(struct input_ctx *); |
struct evbuffer *input_pending(struct input_ctx *); |
|
|
int colour_256toRGB(int); |
int colour_256toRGB(int); |
int colour_256to16(int); |
int colour_256to16(int); |
int colour_byname(const char *); |
int colour_byname(const char *); |
|
void colour_palette_init(struct colour_palette *); |
|
void colour_palette_clear(struct colour_palette *); |
|
void colour_palette_free(struct colour_palette *); |
|
int colour_palette_get(struct colour_palette *, int); |
|
int colour_palette_set(struct colour_palette *, int, int); |
|
void colour_palette_from_option(struct colour_palette *, struct options *); |
|
|
/* attributes.c */ |
/* attributes.c */ |
const char *attributes_tostring(int); |
const char *attributes_tostring(int); |
|
|
void screen_write_clearstartofscreen(struct screen_write_ctx *, u_int); |
void screen_write_clearstartofscreen(struct screen_write_ctx *, u_int); |
void screen_write_clearscreen(struct screen_write_ctx *, u_int); |
void screen_write_clearscreen(struct screen_write_ctx *, u_int); |
void screen_write_clearhistory(struct screen_write_ctx *); |
void screen_write_clearhistory(struct screen_write_ctx *); |
|
void screen_write_fullredraw(struct screen_write_ctx *); |
void screen_write_collect_end(struct screen_write_ctx *); |
void screen_write_collect_end(struct screen_write_ctx *); |
void screen_write_collect_add(struct screen_write_ctx *, |
void screen_write_collect_add(struct screen_write_ctx *, |
const struct grid_cell *); |
const struct grid_cell *); |
|
|
struct window_pane *window_pane_find_by_id(u_int); |
struct window_pane *window_pane_find_by_id(u_int); |
int window_pane_destroy_ready(struct window_pane *); |
int window_pane_destroy_ready(struct window_pane *); |
void window_pane_resize(struct window_pane *, u_int, u_int); |
void window_pane_resize(struct window_pane *, u_int, u_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 *); |
|
int window_pane_get_palette(struct window_pane *, int); |
|
int window_pane_set_mode(struct window_pane *, |
int window_pane_set_mode(struct window_pane *, |
struct window_pane *, const struct window_mode *, |
struct window_pane *, const struct window_mode *, |
struct cmd_find_state *, struct args *); |
struct cmd_find_state *, struct args *); |