aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h43
1 files changed, 34 insertions, 9 deletions
diff --git a/tmux.h b/tmux.h
index 735f4e68..b775c219 100644
--- a/tmux.h
+++ b/tmux.h
@@ -131,6 +131,7 @@ struct winlink;
#define KEYC_CURSOR 0x04000000000000ULL
#define KEYC_IMPLIED_META 0x08000000000000ULL
#define KEYC_BUILD_MODIFIERS 0x10000000000000ULL
+#define KEYC_VI 0x20000000000000ULL
/* Masks for key bits. */
#define KEYC_MASK_MODIFIERS 0x00f00000000000ULL
@@ -590,6 +591,9 @@ struct msg_write_close {
int stream;
};
+/* Character classes. */
+#define WHITESPACE " "
+
/* Mode keys. */
#define MODEKEY_EMACS 0
#define MODEKEY_VI 1
@@ -810,6 +814,14 @@ struct style {
enum style_default_type default_type;
};
+/* Cursor style. */
+enum screen_cursor_style {
+ SCREEN_CURSOR_DEFAULT,
+ SCREEN_CURSOR_BLOCK,
+ SCREEN_CURSOR_UNDERLINE,
+ SCREEN_CURSOR_BAR
+};
+
/* Virtual screen. */
struct screen_sel;
struct screen_titles;
@@ -823,8 +835,8 @@ struct screen {
u_int cx; /* cursor x */
u_int cy; /* cursor y */
- u_int cstyle; /* cursor style */
- char *ccolour; /* cursor colour string */
+ enum screen_cursor_style cstyle; /* cursor style */
+ char *ccolour; /* cursor colour */
u_int rupper; /* scroll region top */
u_int rlower; /* scroll region bottom */
@@ -1312,7 +1324,7 @@ struct tty {
u_int cx;
u_int cy;
- u_int cstyle;
+ enum screen_cursor_style cstyle;
char *ccolour;
int oflag;
@@ -1564,6 +1576,16 @@ struct status_line {
struct status_line_entry entries[STATUS_LINES_LIMIT];
};
+/* Prompt type. */
+#define PROMPT_NTYPES 4
+enum prompt_type {
+ PROMPT_TYPE_COMMAND,
+ PROMPT_TYPE_SEARCH,
+ PROMPT_TYPE_TARGET,
+ PROMPT_TYPE_WINDOW_TARGET,
+ PROMPT_TYPE_INVALID = 0xff
+};
+
/* File in client. */
typedef void (*client_file_cb) (struct client *, const char *, int, int,
struct evbuffer *, void *);
@@ -1727,18 +1749,16 @@ struct client {
prompt_input_cb prompt_inputcb;
prompt_free_cb prompt_freecb;
void *prompt_data;
- u_int prompt_hindex;
+ u_int prompt_hindex[PROMPT_NTYPES];
enum { PROMPT_ENTRY, PROMPT_COMMAND } prompt_mode;
struct utf8_data *prompt_saved;
-
#define PROMPT_SINGLE 0x1
#define PROMPT_NUMERIC 0x2
#define PROMPT_INCREMENTAL 0x4
#define PROMPT_NOFORMAT 0x8
#define PROMPT_KEY 0x10
-#define PROMPT_WINDOW 0x20
-#define PROMPT_TARGET 0x40
int prompt_flags;
+ enum prompt_type prompt_type;
struct session *session;
struct session *last_session;
@@ -2510,6 +2530,8 @@ void server_check_unattached(void);
void server_unzoom_window(struct window *);
/* status.c */
+extern char **status_prompt_hlist[];
+extern u_int status_prompt_hsize[];
void status_timer_start(struct client *);
void status_timer_start_all(void);
void status_update_cache(struct session *);
@@ -2524,13 +2546,15 @@ void status_message_clear(struct client *);
int status_message_redraw(struct client *);
void status_prompt_set(struct client *, struct cmd_find_state *,
const char *, const char *, prompt_input_cb, prompt_free_cb,
- void *, int);
+ void *, int, enum prompt_type);
void status_prompt_clear(struct client *);
int status_prompt_redraw(struct client *);
int status_prompt_key(struct client *, key_code);
void status_prompt_update(struct client *, const char *, const char *);
void status_prompt_load_history(void);
void status_prompt_save_history(void);
+const char *status_prompt_type_string(u_int);
+enum prompt_type status_prompt_type(const char *type);
/* resize.c */
void resize_window(struct window *, u_int, u_int, int, int);
@@ -2620,7 +2644,7 @@ void grid_reader_cursor_end_of_line(struct grid_reader *, int, int);
void grid_reader_cursor_next_word(struct grid_reader *, const char *);
void grid_reader_cursor_next_word_end(struct grid_reader *, const char *);
void grid_reader_cursor_previous_word(struct grid_reader *, const char *,
- int);
+ int, int);
int grid_reader_cursor_jump(struct grid_reader *,
const struct utf8_data *);
int grid_reader_cursor_jump_back(struct grid_reader *,
@@ -2742,6 +2766,7 @@ void screen_select_cell(struct screen *, struct grid_cell *,
const struct grid_cell *);
void screen_alternate_on(struct screen *, struct grid_cell *, int);
void screen_alternate_off(struct screen *, struct grid_cell *, int);
+const char *screen_mode_to_string(int);
/* window.c */
extern struct windows windows;