aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authornicm <nicm>2022-06-30 09:55:53 +0000
committernicm <nicm>2022-06-30 09:55:53 +0000
commitcdacc12ce305ad2f3e65e2a01328a988e3200b51 (patch)
treec886b2047969edb95bb711b7dccc9ee4fa29b5ec /tmux.h
parentb22edcf3a5e6271625141992c1a842d295c8b89f (diff)
downloadrtmux-cdacc12ce305ad2f3e65e2a01328a988e3200b51.tar.gz
rtmux-cdacc12ce305ad2f3e65e2a01328a988e3200b51.tar.bz2
rtmux-cdacc12ce305ad2f3e65e2a01328a988e3200b51.zip
Add support for OSC 8 hyperlinks (a VTE extension now supported by other
terminals such as iTerm2). Originally written by me then extended and completed by first Will Noble and later Jeff Chiang. GitHub issues 911, 2621, 2890, 3240.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/tmux.h b/tmux.h
index c77b77c7..71245ffc 100644
--- a/tmux.h
+++ b/tmux.h
@@ -49,6 +49,8 @@ struct control_state;
struct environ;
struct format_job_tree;
struct format_tree;
+struct hyperlinks_uri;
+struct hyperlinks;
struct input_ctx;
struct job;
struct menu_data;
@@ -365,6 +367,7 @@ enum tty_code_code {
TTYC_ENFCS,
TTYC_ENMG,
TTYC_FSL,
+ TTYC_HLS,
TTYC_HOME,
TTYC_HPA,
TTYC_ICH,
@@ -689,6 +692,7 @@ struct grid_cell {
int fg;
int bg;
int us;
+ u_int link;
};
/* Grid extended cell entry. */
@@ -699,6 +703,7 @@ struct grid_extd_entry {
int fg;
int bg;
int us;
+ u_int link;
} __packed;
/* Grid cell entry. */
@@ -850,6 +855,8 @@ struct screen {
struct screen_sel *sel;
struct screen_write_cline *write_list;
+
+ struct hyperlinks *hyperlinks;
};
/* Screen write context. */
@@ -2246,7 +2253,8 @@ void tty_update_window_offset(struct window *);
void tty_update_client_offset(struct client *);
void tty_raw(struct tty *, const char *);
void tty_attributes(struct tty *, const struct grid_cell *,
- const struct grid_cell *, struct colour_palette *);
+ const struct grid_cell *, struct colour_palette *,
+ struct hyperlinks *);
void tty_reset(struct tty *);
void tty_region_off(struct tty *);
void tty_margin_off(struct tty *);
@@ -2263,7 +2271,8 @@ void tty_puts(struct tty *, const char *);
void tty_putc(struct tty *, u_char);
void tty_putn(struct tty *, const void *, size_t, u_int);
void tty_cell(struct tty *, const struct grid_cell *,
- const struct grid_cell *, struct colour_palette *);
+ const struct grid_cell *, struct colour_palette *,
+ struct hyperlinks *);
int tty_init(struct tty *, struct client *);
void tty_resize(struct tty *);
void tty_set_size(struct tty *, u_int, u_int, u_int, u_int);
@@ -2893,6 +2902,7 @@ void screen_init(struct screen *, u_int, u_int, u_int);
void screen_reinit(struct screen *);
void screen_free(struct screen *);
void screen_reset_tabs(struct screen *);
+void screen_reset_hyperlinks(struct screen *);
void screen_set_cursor_style(u_int, enum screen_cursor_style *, int *);
void screen_set_cursor_colour(struct screen *, int);
int screen_set_title(struct screen *, const char *);
@@ -3298,4 +3308,13 @@ void server_acl_user_deny_write(uid_t);
int server_acl_join(struct client *);
uid_t server_acl_get_uid(struct server_acl_user *);
+/* hyperlink.c */
+u_int hyperlinks_put(struct hyperlinks *, const char *,
+ const char *);
+int hyperlinks_get(struct hyperlinks *, u_int,
+ const char **, const char **);
+struct hyperlinks *hyperlinks_init(void);
+void hyperlinks_reset(struct hyperlinks *);
+void hyperlinks_free(struct hyperlinks *);
+
#endif /* TMUX_H */