aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h96
1 files changed, 65 insertions, 31 deletions
diff --git a/tmux.h b/tmux.h
index 67dc8631..7d7e0e2d 100644
--- a/tmux.h
+++ b/tmux.h
@@ -20,18 +20,20 @@
#define TMUX_H
#include <sys/time.h>
-#include <sys/queue.h>
-#include <sys/tree.h>
+#include <sys/uio.h>
-#include <bitstring.h>
#include <event.h>
#include <limits.h>
#include <stdarg.h>
-#include <stdint.h>
#include <stdio.h>
#include <termios.h>
#include <wchar.h>
+#ifdef HAVE_UTEMPTER
+#include <utempter.h>
+#endif
+
+#include "compat.h"
#include "xmalloc.h"
extern char **environ;
@@ -63,10 +65,13 @@ struct winlink;
/* Client-server protocol version. */
#define PROTOCOL_VERSION 8
-/* Default configuration files. */
+/* Default configuration files and socket paths. */
#ifndef TMUX_CONF
#define TMUX_CONF "/etc/tmux.conf:~/.tmux.conf"
#endif
+#ifndef TMUX_SOCK
+#define TMUX_SOCK "$TMUX_TMPDIR:" _PATH_TMP
+#endif
/* Minimum layout cell size, NOT including border lines. */
#define PANE_MINIMUM 1
@@ -254,6 +259,8 @@ enum tty_code_code {
TTYC_BOLD,
TTYC_CIVIS,
TTYC_CLEAR,
+ TTYC_CLMG,
+ TTYC_CMG,
TTYC_CNORM,
TTYC_COLORS,
TTYC_CR,
@@ -274,12 +281,18 @@ enum tty_code_code {
TTYC_DIM,
TTYC_DL,
TTYC_DL1,
+ TTYC_DSBP,
+ TTYC_DSFCS,
+ TTYC_DSMG,
TTYC_E3,
TTYC_ECH,
TTYC_ED,
TTYC_EL,
TTYC_EL1,
TTYC_ENACS,
+ TTYC_ENBP,
+ TTYC_ENFCS,
+ TTYC_ENMG,
TTYC_FSL,
TTYC_HOME,
TTYC_HPA,
@@ -445,11 +458,11 @@ enum tty_code_code {
TTYC_SITM,
TTYC_SMACS,
TTYC_SMCUP,
- TTYC_SMOL,
TTYC_SMKX,
+ TTYC_SMOL,
TTYC_SMSO,
- TTYC_SMULX,
TTYC_SMUL,
+ TTYC_SMULX,
TTYC_SMXX,
TTYC_SS,
TTYC_SYNC,
@@ -458,7 +471,7 @@ enum tty_code_code {
TTYC_U8,
TTYC_VPA,
TTYC_XENL,
- TTYC_XT,
+ TTYC_XT
};
/* Message codes. */
@@ -885,6 +898,9 @@ struct window_pane {
u_int xoff;
u_int yoff;
+ int fg;
+ int bg;
+
int flags;
#define PANE_REDRAW 0x1
#define PANE_DROP 0x2
@@ -917,8 +933,8 @@ struct window_pane {
struct input_ctx *ictx;
- struct style cached_style;
- struct style cached_active_style;
+ struct grid_cell cached_gc;
+ struct grid_cell cached_active_gc;
int *palette;
int pipe_fd;
@@ -939,6 +955,9 @@ struct window_pane {
size_t written;
size_t skipped;
+ int border_gc_set;
+ struct grid_cell border_gc;
+
TAILQ_ENTRY(window_pane) entry;
RB_ENTRY(window_pane) tree_entry;
};
@@ -1189,6 +1208,7 @@ struct tty_term {
#define TERM_DECSLRM 0x4
#define TERM_DECFRA 0x8
#define TERM_RGBCOLOURS 0x10
+#define TERM_VT100LIKE 0x20
int flags;
LIST_ENTRY(tty_term) entry;
@@ -1247,7 +1267,7 @@ struct tty {
#define TTY_FOCUS 0x40
#define TTY_BLOCK 0x80
#define TTY_HAVEDA 0x100
-#define TTY_HAVEDSR 0x200
+#define TTY_HAVEXDA 0x200
#define TTY_SYNCING 0x400
int flags;
@@ -1497,6 +1517,7 @@ struct client {
char *term_name;
int term_features;
+ char *term_type;
char *ttyname;
struct tty tty;
@@ -1583,6 +1604,8 @@ struct client {
#define PROMPT_INCREMENTAL 0x4
#define PROMPT_NOFORMAT 0x8
#define PROMPT_KEY 0x10
+#define PROMPT_WINDOW 0x20
+#define PROMPT_TARGET 0x40
int prompt_flags;
struct session *session;
@@ -1649,7 +1672,6 @@ enum options_table_type {
OPTIONS_TABLE_COLOUR,
OPTIONS_TABLE_FLAG,
OPTIONS_TABLE_CHOICE,
- OPTIONS_TABLE_STYLE,
OPTIONS_TABLE_COMMAND
};
@@ -1661,12 +1683,13 @@ enum options_table_type {
#define OPTIONS_TABLE_IS_ARRAY 0x1
#define OPTIONS_TABLE_IS_HOOK 0x2
+#define OPTIONS_TABLE_IS_STYLE 0x4
struct options_table_entry {
const char *name;
enum options_table_type type;
int scope;
- int flags;
+ int flags;
u_int minimum;
u_int maximum;
@@ -1705,7 +1728,7 @@ struct spawn_context {
const char *name;
char **argv;
int argc;
- struct environ *environ;
+ struct environ *environ;
int idx;
const char *cwd;
@@ -1742,6 +1765,8 @@ const char *sig2name(int);
const char *find_cwd(void);
const char *find_home(void);
const char *getversion(void);
+void expand_paths(const char *, char ***, u_int *);
+
/* proc.c */
struct imsg;
@@ -1810,7 +1835,14 @@ char *format_expand(struct format_tree *, const char *);
char *format_single(struct cmdq_item *, const char *,
struct client *, struct session *, struct winlink *,
struct window_pane *);
+char *format_single_from_state(struct cmdq_item *, const char *,
+ struct client *, struct cmd_find_state *);
char *format_single_from_target(struct cmdq_item *, const char *);
+struct format_tree *format_create_defaults(struct cmdq_item *, struct client *,
+ struct session *, struct winlink *, struct window_pane *);
+struct format_tree *format_create_from_state(struct cmdq_item *,
+ struct client *, struct cmd_find_state *);
+struct format_tree *format_create_from_target(struct cmdq_item *);
void format_defaults(struct format_tree *, struct client *,
struct session *, struct winlink *, struct window_pane *);
void format_defaults_window(struct format_tree *, struct window *);
@@ -1876,18 +1908,17 @@ struct options_entry *options_match_get(struct options *, const char *, int *,
int, int *);
const char *options_get_string(struct options *, const char *);
long long options_get_number(struct options *, const char *);
-struct style *options_get_style(struct options *, const char *);
struct options_entry * printflike(4, 5) options_set_string(struct options *,
const char *, int, const char *, ...);
struct options_entry *options_set_number(struct options *, const char *,
long long);
-struct options_entry *options_set_style(struct options *, const char *, int,
- const char *);
int options_scope_from_name(struct args *, int,
const char *, struct cmd_find_state *, struct options **,
char **);
int options_scope_from_flags(struct args *, int,
struct cmd_find_state *, struct options **, char **);
+struct style *options_string_to_style(struct options *, const char *,
+ struct format_tree *);
/* options-table.c */
extern const struct options_table_entry options_table[];
@@ -2019,6 +2050,7 @@ const char *tty_term_describe(struct tty_term *, enum tty_code_code);
void tty_add_features(int *, const char *, const char *);
const char *tty_get_features(int);
int tty_apply_features(struct tty_term *, int);
+void tty_default_features(int *, const char *, u_int);
/* tty-acs.c */
int tty_acs_needed(struct tty *);
@@ -2113,7 +2145,7 @@ enum cmd_retval cmd_attach_session(struct cmdq_item *, const char *, int, int,
int, const char *, int);
/* cmd-parse.c */
-void cmd_parse_empty(struct cmd_parse_input *);
+void cmd_parse_empty(struct cmd_parse_input *);
struct cmd_parse_result *cmd_parse_from_file(FILE *, struct cmd_parse_input *);
struct cmd_parse_result *cmd_parse_from_string(const char *,
struct cmd_parse_input *);
@@ -2204,8 +2236,8 @@ void file_fire_done(struct client_file *);
void file_fire_read(struct client_file *);
int file_can_print(struct client *);
void printflike(2, 3) file_print(struct client *, const char *, ...);
-void file_vprint(struct client *, const char *, va_list);
-void file_print_buffer(struct client *, void *, size_t);
+void file_vprint(struct client *, const char *, va_list);
+void file_print_buffer(struct client *, void *, size_t);
void printflike(2, 3) file_error(struct client *, const char *, ...);
void file_write(struct client *, const char *, int, const void *, size_t,
client_file_cb, void *);
@@ -2340,6 +2372,8 @@ int attributes_fromstring(const char *);
extern const struct grid_cell grid_default_cell;
void grid_empty_line(struct grid *, u_int, u_int);
int grid_cells_equal(const struct grid_cell *, const struct grid_cell *);
+int grid_cells_look_equal(const struct grid_cell *,
+ const struct grid_cell *);
struct grid *grid_create(u_int, u_int, u_int);
void grid_destroy(struct grid *);
int grid_compare(struct grid *, struct grid *);
@@ -2404,8 +2438,6 @@ void screen_write_vnputs(struct screen_write_ctx *, ssize_t,
const struct grid_cell *, const char *, va_list);
void screen_write_putc(struct screen_write_ctx *, const struct grid_cell *,
u_char);
-void screen_write_copy(struct screen_write_ctx *, struct screen *, u_int,
- u_int, u_int, u_int, bitstr_t *, const struct grid_cell *);
void screen_write_fast_copy(struct screen_write_ctx *, struct screen *,
u_int, u_int, u_int, u_int);
void screen_write_hline(struct screen_write_ctx *, u_int, int, int);
@@ -2701,10 +2733,10 @@ struct session *session_find_by_id_str(const char *);
struct session *session_find_by_id(u_int);
struct session *session_create(const char *, const char *, const char *,
struct environ *, struct options *, struct termios *);
-void session_destroy(struct session *, int, const char *);
+void session_destroy(struct session *, int, const char *);
void session_add_ref(struct session *, const char *);
void session_remove_ref(struct session *, const char *);
-int session_check_name(const char *);
+char *session_check_name(const char *);
void session_update_activity(struct session *, struct timeval *);
struct session *session_next_session(struct session *);
struct session *session_previous_session(struct session *);
@@ -2750,9 +2782,10 @@ char *utf8_padcstr(const char *, u_int);
char *utf8_rpadcstr(const char *, u_int);
int utf8_cstrhas(const char *, const struct utf8_data *);
-/* procname.c */
-char *get_proc_name(int, char *);
-char *get_proc_cwd(int);
+/* osdep-*.c */
+char *osdep_get_name(int, char *);
+char *osdep_get_cwd(int);
+struct event_base *osdep_event_init(void);
/* log.c */
void log_add_level(void);
@@ -2766,11 +2799,12 @@ __dead void printflike(1, 2) fatalx(const char *, ...);
/* menu.c */
#define MENU_NOMOUSE 0x1
+#define MENU_TAB 0x2
struct menu *menu_create(const char *);
void menu_add_items(struct menu *, const struct menu_item *,
struct cmdq_item *, struct client *,
struct cmd_find_state *);
-void menu_add_item(struct menu *, const struct menu_item *,
+void menu_add_item(struct menu *, const struct menu_item *,
struct cmdq_item *, struct client *,
struct cmd_find_state *);
void menu_free(struct menu *);
@@ -2793,12 +2827,12 @@ int popup_display(int, struct cmdq_item *, u_int, u_int, u_int,
int style_parse(struct style *,const struct grid_cell *,
const char *);
const char *style_tostring(struct style *);
+void style_add(struct grid_cell *, struct options *,
+ const char *, struct format_tree *);
void style_apply(struct grid_cell *, struct options *,
- const char *);
-int style_equal(struct style *, struct style *);
+ const char *, struct format_tree *);
void style_set(struct style *, const struct grid_cell *);
void style_copy(struct style *, struct style *);
-int style_is_default(struct style *);
/* spawn.c */
struct winlink *spawn_window(struct spawn_context *, char **);