From d04bc6ab10345f842cc05cb98959ad8b5db569f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 7 Feb 2022 19:35:52 +0100 Subject: [PATCH] config: move structs and enums used by config from terminal.h -> config.h --- config.h | 12 ++++++++++-- server.h | 1 + terminal.h | 10 +--------- wayland.h | 1 + 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/config.h b/config.h index 2f318d1d..a329af70 100644 --- a/config.h +++ b/config.h @@ -4,11 +4,11 @@ #include #include +#include #include +#include -#include "terminal.h" #include "user-notification.h" -#include "wayland.h" #define DEFINE_LIST(type) \ type##_list { \ @@ -16,6 +16,14 @@ type *arr; \ } +/* If px != 0 then px is valid, otherwise pt is valid */ +struct pt_or_px { + int16_t px; + float pt; +}; + +enum cursor_style { CURSOR_BLOCK, CURSOR_UNDERLINE, CURSOR_BEAM }; + enum conf_size_type {CONF_SIZE_PX, CONF_SIZE_CELLS}; struct config_font { diff --git a/server.h b/server.h index 55a031b4..50797540 100644 --- a/server.h +++ b/server.h @@ -2,6 +2,7 @@ #include "fdm.h" #include "config.h" +#include "reaper.h" #include "wayland.h" struct server; diff --git a/terminal.h b/terminal.h index d3602383..f1523939 100644 --- a/terminal.h +++ b/terminal.h @@ -14,7 +14,7 @@ #include #include -//#include "config.h" +#include "config.h" #include "composed.h" #include "debug.h" #include "fdm.h" @@ -248,8 +248,6 @@ enum mouse_reporting { MOUSE_SGR_PIXELS, /* ?1016h */ }; -enum cursor_style { CURSOR_BLOCK, CURSOR_UNDERLINE, CURSOR_BEAM }; - enum selection_kind { SELECTION_NONE, SELECTION_CHAR_WISE, @@ -299,12 +297,6 @@ 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; diff --git a/wayland.h b/wayland.h index c3e6bb6d..fe77152f 100644 --- a/wayland.h +++ b/wayland.h @@ -23,6 +23,7 @@ #include #include +#include "config.h" #include "fdm.h" /* Forward declarations */