mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-01 07:15:32 -04:00
urls: initial support for detecting URLs and rendering jump-labels
The jump labels work, but is currently hardcoded to use xdg-open
This commit is contained in:
parent
b255aea3ed
commit
2cc84db979
12 changed files with 503 additions and 28 deletions
16
terminal.h
16
terminal.h
|
|
@ -223,6 +223,14 @@ enum term_surface {
|
|||
|
||||
typedef tll(struct ptmx_buffer) ptmx_buffer_list_t;
|
||||
|
||||
struct url {
|
||||
wchar_t *url;
|
||||
wchar_t *text;
|
||||
wchar_t key[4];
|
||||
struct coord start;
|
||||
struct coord end;
|
||||
};
|
||||
|
||||
struct terminal {
|
||||
struct fdm *fdm;
|
||||
struct reaper *reaper;
|
||||
|
|
@ -421,6 +429,7 @@ struct terminal {
|
|||
bool csd;
|
||||
bool search;
|
||||
bool title;
|
||||
bool urls;
|
||||
} refresh;
|
||||
|
||||
/* Scheduled for rendering, in the next frame callback */
|
||||
|
|
@ -429,6 +438,7 @@ struct terminal {
|
|||
bool csd;
|
||||
bool search;
|
||||
bool title;
|
||||
bool urls;
|
||||
} pending;
|
||||
|
||||
bool margins; /* Someone explicitly requested a refresh of the margins */
|
||||
|
|
@ -499,6 +509,9 @@ struct terminal {
|
|||
unsigned max_height; /* Maximum image height, in pixels */
|
||||
} sixel;
|
||||
|
||||
tll(struct url) urls;
|
||||
wchar_t url_keys[5];
|
||||
|
||||
#if defined(FOOT_IME_ENABLED) && FOOT_IME_ENABLED
|
||||
struct {
|
||||
bool enabled;
|
||||
|
|
@ -646,3 +659,6 @@ void term_ime_disable(struct terminal *term);
|
|||
void term_ime_reset(struct terminal *term);
|
||||
void term_ime_set_cursor_rect(
|
||||
struct terminal *term, int x, int y, int width, int height);
|
||||
|
||||
void term_urls_reset(struct terminal *term);
|
||||
void term_collect_urls(struct terminal *term);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue