version 1.889, 2019/05/07 11:24:03 |
version 1.890, 2019/05/07 20:01:41 |
|
|
u_int skipped; |
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. */ |
/* Screen size. */ |
#define screen_size_x(s) ((s)->grid->sx) |
#define screen_size_x(s) ((s)->grid->sx) |
#define screen_size_y(s) ((s)->grid->sy) |
#define screen_size_y(s) ((s)->grid->sy) |
|
|
/* Client connection. */ |
/* Client connection. */ |
typedef int (*prompt_input_cb)(struct client *, void *, const char *, int); |
typedef int (*prompt_input_cb)(struct client *, void *, const char *, int); |
typedef void (*prompt_free_cb)(void *); |
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 { |
struct client { |
const char *name; |
const char *name; |
struct tmuxpeer *peer; |
struct tmuxpeer *peer; |
|
|
#define CLIENT_REPEAT 0x20 |
#define CLIENT_REPEAT 0x20 |
#define CLIENT_SUSPENDED 0x40 |
#define CLIENT_SUSPENDED 0x40 |
#define CLIENT_ATTACHED 0x80 |
#define CLIENT_ATTACHED 0x80 |
#define CLIENT_IDENTIFY 0x100 |
/* 0x100 unused */ |
#define CLIENT_DEAD 0x200 |
#define CLIENT_DEAD 0x200 |
#define CLIENT_REDRAWBORDERS 0x400 |
#define CLIENT_REDRAWBORDERS 0x400 |
#define CLIENT_READONLY 0x800 |
#define CLIENT_READONLY 0x800 |
|
|
int flags; |
int flags; |
struct key_table *keytable; |
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; |
char *message_string; |
struct event message_timer; |
struct event message_timer; |
u_int message_next; |
u_int message_next; |
|
|
u_int pan_ox; |
u_int pan_ox; |
u_int pan_oy; |
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_ENTRY(client) entry; |
}; |
}; |
TAILQ_HEAD(clients, client); |
TAILQ_HEAD(clients, client); |
|
|
|
|
/* server-client.c */ |
/* server-client.c */ |
u_int server_client_how_many(void); |
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 *); |
void server_client_set_key_table(struct client *, const char *); |
const char *server_client_get_key_table(struct client *); |
const char *server_client_get_key_table(struct client *); |
int server_client_check_nested(struct client *); |
int server_client_check_nested(struct client *); |