mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-21 05:33:45 -04:00
term: place frequently accessed members first in term struct
To hopefully use the cache better.
This commit is contained in:
parent
309e30ba97
commit
22c354c8fd
1 changed files with 34 additions and 35 deletions
69
terminal.h
69
terminal.h
|
|
@ -215,15 +215,45 @@ struct terminal {
|
||||||
|
|
||||||
pid_t slave;
|
pid_t slave;
|
||||||
int ptmx;
|
int ptmx;
|
||||||
bool quit;
|
|
||||||
|
|
||||||
|
struct vt vt;
|
||||||
|
struct grid *grid;
|
||||||
struct grid normal;
|
struct grid normal;
|
||||||
struct grid alt;
|
struct grid alt;
|
||||||
struct grid *grid;
|
|
||||||
|
int cols; /* number of columns */
|
||||||
|
int rows; /* number of rows */
|
||||||
|
struct scroll_region scroll_region;
|
||||||
|
|
||||||
|
struct charsets charsets;
|
||||||
|
struct charsets saved_charsets; /* For save/restore cursor + attributes */
|
||||||
|
|
||||||
|
bool auto_margin;
|
||||||
|
bool insert_mode;
|
||||||
|
bool reverse;
|
||||||
|
bool hide_cursor;
|
||||||
|
bool reverse_wrap;
|
||||||
|
bool bracketed_paste;
|
||||||
|
bool focus_events;
|
||||||
|
bool alt_scrolling;
|
||||||
|
enum cursor_origin origin;
|
||||||
|
enum cursor_keys cursor_keys_mode;
|
||||||
|
enum keypad_keys keypad_keys_mode;
|
||||||
|
enum mouse_tracking mouse_tracking;
|
||||||
|
enum mouse_reporting mouse_reporting;
|
||||||
|
|
||||||
|
tll(int) tab_stops;
|
||||||
|
|
||||||
size_t composed_count;
|
size_t composed_count;
|
||||||
struct composed *composed;
|
struct composed *composed;
|
||||||
|
|
||||||
|
/* Temporary: for FDM */
|
||||||
|
struct {
|
||||||
|
bool is_armed;
|
||||||
|
int lower_fd;
|
||||||
|
int upper_fd;
|
||||||
|
} delayed_render_timer;
|
||||||
|
|
||||||
struct fcft_font *fonts[4];
|
struct fcft_font *fonts[4];
|
||||||
struct config_font *font_sizes[4];
|
struct config_font *font_sizes[4];
|
||||||
float font_dpi;
|
float font_dpi;
|
||||||
|
|
@ -234,20 +264,6 @@ struct terminal {
|
||||||
ptmx_buffer_list_t ptmx_buffers;
|
ptmx_buffer_list_t ptmx_buffers;
|
||||||
ptmx_buffer_list_t ptmx_paste_buffers;
|
ptmx_buffer_list_t ptmx_paste_buffers;
|
||||||
|
|
||||||
enum cursor_origin origin;
|
|
||||||
enum cursor_keys cursor_keys_mode;
|
|
||||||
enum keypad_keys keypad_keys_mode;
|
|
||||||
bool reverse;
|
|
||||||
bool hide_cursor;
|
|
||||||
bool reverse_wrap;
|
|
||||||
bool auto_margin;
|
|
||||||
bool insert_mode;
|
|
||||||
bool bracketed_paste;
|
|
||||||
bool focus_events;
|
|
||||||
bool alt_scrolling;
|
|
||||||
enum mouse_tracking mouse_tracking;
|
|
||||||
enum mouse_reporting mouse_reporting;
|
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
bool esc_prefix;
|
bool esc_prefix;
|
||||||
bool eight_bit;
|
bool eight_bit;
|
||||||
|
|
@ -282,9 +298,6 @@ struct terminal {
|
||||||
uint32_t alt_screen:1;
|
uint32_t alt_screen:1;
|
||||||
} xtsave;
|
} xtsave;
|
||||||
|
|
||||||
struct charsets charsets;
|
|
||||||
struct charsets saved_charsets; /* For save/restore cursor + attributes */
|
|
||||||
|
|
||||||
char *window_title;
|
char *window_title;
|
||||||
tll(char *) window_title_stack;
|
tll(char *) window_title_stack;
|
||||||
|
|
||||||
|
|
@ -298,8 +311,6 @@ struct terminal {
|
||||||
int fd;
|
int fd;
|
||||||
} blink;
|
} blink;
|
||||||
|
|
||||||
struct vt vt;
|
|
||||||
|
|
||||||
int scale;
|
int scale;
|
||||||
int width; /* pixels */
|
int width; /* pixels */
|
||||||
int height; /* pixels */
|
int height; /* pixels */
|
||||||
|
|
@ -311,13 +322,9 @@ struct terminal {
|
||||||
int top;
|
int top;
|
||||||
int bottom;
|
int bottom;
|
||||||
} margins;
|
} margins;
|
||||||
int cols; /* number of columns */
|
|
||||||
int rows; /* number of rows */
|
|
||||||
int cell_width; /* pixels per cell, x-wise */
|
int cell_width; /* pixels per cell, x-wise */
|
||||||
int cell_height; /* pixels per cell, y-wise */
|
int cell_height; /* pixels per cell, y-wise */
|
||||||
|
|
||||||
struct scroll_region scroll_region;
|
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
uint32_t fg;
|
uint32_t fg;
|
||||||
uint32_t bg;
|
uint32_t bg;
|
||||||
|
|
@ -374,8 +381,6 @@ struct terminal {
|
||||||
size_t match_len;
|
size_t match_len;
|
||||||
} search;
|
} search;
|
||||||
|
|
||||||
tll(int) tab_stops;
|
|
||||||
|
|
||||||
struct wayland *wl;
|
struct wayland *wl;
|
||||||
struct wl_window *window;
|
struct wl_window *window;
|
||||||
bool visual_focus;
|
bool visual_focus;
|
||||||
|
|
@ -438,19 +443,12 @@ struct terminal {
|
||||||
struct timespec input_time;
|
struct timespec input_time;
|
||||||
} render;
|
} render;
|
||||||
|
|
||||||
/* Temporary: for FDM */
|
|
||||||
struct {
|
|
||||||
bool is_armed;
|
|
||||||
int lower_fd;
|
|
||||||
int upper_fd;
|
|
||||||
} delayed_render_timer;
|
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
enum {
|
enum {
|
||||||
SIXEL_DECSIXEL, /* DECSIXEL body part ", $, -, ? ... ~ */
|
SIXEL_DECSIXEL, /* DECSIXEL body part ", $, -, ? ... ~ */
|
||||||
SIXEL_DECGRA, /* DECGRA Set Raster Attributes " Pan; Pad; Ph; Pv */
|
SIXEL_DECGRA, /* DECGRA Set Raster Attributes " Pan; Pad; Ph; Pv */
|
||||||
SIXEL_DECGRI, /* DECGRI Graphics Repeat Introducer ! Pn Ch */
|
SIXEL_DECGRI, /* DECGRI Graphics Repeat Introducer ! Pn Ch */
|
||||||
SIXEL_DECGCI, /* DECGCI Graphics Color Introducer # Pc; Pu; Px; Py; Pz */
|
SIXEL_DECGCI, /* DECGCI Graphics Color Introducer # Pc; Pu; Px; Py; Pz */
|
||||||
} state;
|
} state;
|
||||||
|
|
||||||
struct coord pos; /* Current sixel coordinate */
|
struct coord pos; /* Current sixel coordinate */
|
||||||
|
|
@ -475,6 +473,7 @@ struct terminal {
|
||||||
unsigned max_height; /* Maximum image height, in pixels */
|
unsigned max_height; /* Maximum image height, in pixels */
|
||||||
} sixel;
|
} sixel;
|
||||||
|
|
||||||
|
bool quit;
|
||||||
bool hold_at_exit;
|
bool hold_at_exit;
|
||||||
bool is_shutting_down;
|
bool is_shutting_down;
|
||||||
void (*shutdown_cb)(void *data, int exit_code);
|
void (*shutdown_cb)(void *data, int exit_code);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue