From 3c52f1514018c2a4af0c496193731a1035cadb17 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Fri, 18 Aug 2017 11:38:54 +0200 Subject: [PATCH] Move more enums to rofi-types.h --- config/config.c | 1 + include/rofi-types.h | 32 ++++++++++++++++++++++++++++++++ include/rofi.h | 1 + include/settings.h | 31 ------------------------------- include/theme.h | 2 -- source/rofi.c | 2 +- source/view.c | 2 +- source/xcb.c | 1 + 8 files changed, 37 insertions(+), 35 deletions(-) diff --git a/config/config.c b/config/config.c index fa8d4238..67342346 100644 --- a/config/config.c +++ b/config/config.c @@ -29,6 +29,7 @@ #include #include #include +#include "rofi-types.h" #include "settings.h" Settings config = { diff --git a/include/rofi-types.h b/include/rofi-types.h index e6a2026d..80998463 100644 --- a/include/rofi-types.h +++ b/include/rofi-types.h @@ -141,6 +141,38 @@ typedef struct ThemeColor color; } RofiHighlightColorStyle; + +/** + * Enumeration indicating location or gravity of window. + * + * \verbatim WL_NORTH_WEST WL_NORTH WL_NORTH_EAST \endverbatim + * \verbatim WL_EAST WL_CENTER WL_EAST \endverbatim + * \verbatim WL_SOUTH_WEST WL_SOUTH WL_SOUTH_EAST\endverbatim + * + * @ingroup CONFIGURATION + */ +typedef enum +{ + /** Center */ + WL_CENTER = 0, + /** Top middle */ + WL_NORTH = 1, + /** Middle right */ + WL_EAST = 2, + /** Bottom middle */ + WL_SOUTH = 4, + /** Middle left */ + WL_WEST = 8, + /** Left top corner. */ + WL_NORTH_WEST = WL_NORTH | WL_WEST, + /** Top right */ + WL_NORTH_EAST = WL_NORTH | WL_EAST, + /** Bottom right */ + WL_SOUTH_EAST = WL_SOUTH | WL_EAST, + /** Bottom left */ + WL_SOUTH_WEST = WL_SOUTH | WL_WEST, +} WindowLocation; + typedef union { /** integer */ diff --git a/include/rofi.h b/include/rofi.h index 8830b62d..5b513b88 100644 --- a/include/rofi.h +++ b/include/rofi.h @@ -32,6 +32,7 @@ #include #include #include +#include "rofi-types.h" #include "keyb.h" #include "mode.h" #include "view.h" diff --git a/include/settings.h b/include/settings.h index 2ea8b34c..295a8cd0 100644 --- a/include/settings.h +++ b/include/settings.h @@ -43,37 +43,6 @@ typedef enum MM_FUZZY = 3 } MatchingMethod; -/** - * Enumeration indicating location or gravity of window. - * - * \verbatim WL_NORTH_WEST WL_NORTH WL_NORTH_EAST \endverbatim - * \verbatim WL_EAST WL_CENTER WL_EAST \endverbatim - * \verbatim WL_SOUTH_WEST WL_SOUTH WL_SOUTH_EAST\endverbatim - * - * @ingroup CONFIGURATION - */ -typedef enum -{ - /** Center */ - WL_CENTER = 0, - /** Top middle */ - WL_NORTH = 1, - /** Middle right */ - WL_EAST = 2, - /** Bottom middle */ - WL_SOUTH = 4, - /** Middle left */ - WL_WEST = 8, - /** Left top corner. */ - WL_NORTH_WEST = WL_NORTH | WL_WEST, - /** Top right */ - WL_NORTH_EAST = WL_NORTH | WL_EAST, - /** Bottom right */ - WL_SOUTH_EAST = WL_SOUTH | WL_EAST, - /** Bottom left */ - WL_SOUTH_WEST = WL_SOUTH | WL_WEST, -} WindowLocation; - /** * Settings structure holding all (static) configurable options. * @ingroup CONFIGURATION diff --git a/include/theme.h b/include/theme.h index 6c06a956..f01a325c 100644 --- a/include/theme.h +++ b/include/theme.h @@ -30,8 +30,6 @@ #include #include #include -#include - #include "rofi-types.h" /** diff --git a/source/rofi.c b/source/rofi.c index 44e2a19d..fda23e4c 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -45,11 +45,11 @@ #include +#include "rofi.h" #include "display.h" #include "settings.h" #include "mode.h" -#include "rofi.h" #include "helper.h" #include "widgets/textbox.h" #include "xrmoptions.h" diff --git a/source/view.c b/source/view.c index 1827ee97..9f3b3c59 100644 --- a/source/view.c +++ b/source/view.c @@ -48,11 +48,11 @@ #define SN_API_NOT_YET_FROZEN #include +#include "rofi.h" #include "timings.h" #include "settings.h" -#include "rofi.h" #include "mode.h" #include "display.h" #include "xcb-internal.h" diff --git a/source/xcb.c b/source/xcb.c index ba4f73ff..db41ec70 100644 --- a/source/xcb.c +++ b/source/xcb.c @@ -52,6 +52,7 @@ #define SN_API_NOT_YET_FROZEN /* This function is declared as sn_launcher_context_set_application_id but implemented as sn_launcher_set_application_id */ #define sn_launcher_context_set_application_id sn_launcher_set_application_id +#include "rofi-types.h" #include #include "display.h" #include "xcb-internal.h"