aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-03-28 12:24:38 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-03-28 12:24:38 +0000
commit0d0ebebb64980be47c948a1c712925c100bb4ebd (patch)
tree3812d1a380f74d30747402ce54efd1f1a694cf87 /terminal.h
parentchangelog: 1.7.0 (diff)
parentMerge branch 'search-treat-empty-cells-as-spaces' (diff)
Merge branch 'master' into releases/1.7
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h24
1 files changed, 9 insertions, 15 deletions
diff --git a/terminal.h b/terminal.h
index 044fc581..ce808ce8 100644
--- a/terminal.h
+++ b/terminal.h
@@ -261,6 +261,12 @@ struct url {
};
typedef tll(struct url) url_list_t;
+/* If px != 0 then px is valid, otherwise pt is valid */
+struct pt_or_px {
+ int16_t px;
+ float pt;
+};
+
struct terminal {
struct fdm *fdm;
struct reaper *reaper;
@@ -312,6 +318,7 @@ struct terminal {
struct fcft_font *fonts[4];
struct config_font *font_sizes[4];
+ struct pt_or_px font_line_height;
float font_dpi;
int font_scale;
int16_t font_x_ofs;
@@ -560,20 +567,7 @@ struct terminal {
struct grid *url_grid_snapshot;
#if defined(FOOT_IME_ENABLED) && FOOT_IME_ENABLED
- struct {
- bool enabled;
- struct {
- wchar_t *text;
- struct cell *cells;
- int count;
-
- struct {
- bool hidden;
- int start; /* Cell index, inclusive */
- int end; /* Cell index, exclusive */
- } cursor;
- } preedit;
- } ime;
+ bool ime_enabled;
#endif
bool is_shutting_down;
@@ -706,7 +700,7 @@ bool term_view_to_text(
bool term_ime_is_enabled(const struct terminal *term);
void term_ime_enable(struct terminal *term);
void term_ime_disable(struct terminal *term);
-void term_ime_reset(struct terminal *term);
+bool term_ime_reset(struct terminal *term);
void term_ime_set_cursor_rect(
struct terminal *term, int x, int y, int width, int height);