mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 22:43:58 +00:00
Tidy command prompt callbacks and pass in the client.
This commit is contained in:
11
tmux.h
11
tmux.h
@ -1284,6 +1284,8 @@ struct cmd_entry {
|
||||
};
|
||||
|
||||
/* Client connection. */
|
||||
typedef int (*prompt_input_cb)(struct client *, void *, const char *, int);
|
||||
typedef void (*prompt_free_cb)(void *);
|
||||
struct client {
|
||||
const char *name;
|
||||
struct tmuxpeer *peer;
|
||||
@ -1353,7 +1355,8 @@ struct client {
|
||||
struct key_table *keytable;
|
||||
|
||||
struct event identify_timer;
|
||||
void (*identify_callback)(struct client *, struct window_pane *);
|
||||
void (*identify_callback)(struct client *,
|
||||
struct window_pane *);
|
||||
void *identify_callback_data;
|
||||
|
||||
char *message_string;
|
||||
@ -1364,8 +1367,8 @@ struct client {
|
||||
char *prompt_string;
|
||||
struct utf8_data *prompt_buffer;
|
||||
size_t prompt_index;
|
||||
int (*prompt_callbackfn)(void *, const char *, int);
|
||||
void (*prompt_freefn)(void *);
|
||||
prompt_input_cb prompt_inputcb;
|
||||
prompt_free_cb prompt_freecb;
|
||||
void *prompt_data;
|
||||
u_int prompt_hindex;
|
||||
enum { PROMPT_ENTRY, PROMPT_COMMAND } prompt_mode;
|
||||
@ -1889,7 +1892,7 @@ void printflike(2, 3) status_message_set(struct client *, const char *, ...);
|
||||
void status_message_clear(struct client *);
|
||||
int status_message_redraw(struct client *);
|
||||
void status_prompt_set(struct client *, const char *, const char *,
|
||||
int (*)(void *, const char *, int), void (*)(void *), void *, int);
|
||||
prompt_input_cb, prompt_free_cb, void *, int);
|
||||
void status_prompt_clear(struct client *);
|
||||
int status_prompt_redraw(struct client *);
|
||||
int status_prompt_key(struct client *, key_code);
|
||||
|
Reference in New Issue
Block a user