From 6457cbccdaa150aadc355723c4fac93e379ad7ff Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Tue, 31 Dec 2024 15:21:47 +0000 Subject: [PATCH] Make enum three_state public --- include/common/parse-bool.h | 2 +- include/common/three-state.h | 11 +++++++++++ include/view.h | 7 +------ 3 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 include/common/three-state.h diff --git a/include/common/parse-bool.h b/include/common/parse-bool.h index 2d26c4b8..97afd586 100644 --- a/include/common/parse-bool.h +++ b/include/common/parse-bool.h @@ -2,7 +2,7 @@ #ifndef LABWC_PARSE_BOOL_H #define LABWC_PARSE_BOOL_H #include -#include "view.h" +#include "common/three-state.h" /** * parse_three_state() - Parse boolean value of string as a three-state enum. diff --git a/include/common/three-state.h b/include/common/three-state.h new file mode 100644 index 00000000..2e3d69d2 --- /dev/null +++ b/include/common/three-state.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef LABWC_THREE_STATE_H +#define LABWC_THREE_STATE_H + +enum three_state { + LAB_STATE_UNSPECIFIED = 0, + LAB_STATE_ENABLED, + LAB_STATE_DISABLED +}; + +#endif /* LABWC_THREE_STATE_H */ diff --git a/include/view.h b/include/view.h index 966b792b..bec6431d 100644 --- a/include/view.h +++ b/include/view.h @@ -10,6 +10,7 @@ #include #include #include +#include "common/three-state.h" #define LAB_MIN_VIEW_HEIGHT 60 @@ -41,12 +42,6 @@ enum ssd_preference { LAB_SSD_PREF_SERVER, }; -enum three_state { - LAB_STATE_UNSPECIFIED = 0, - LAB_STATE_ENABLED, - LAB_STATE_DISABLED -}; - /** * Directions in which a view can be maximized. "None" is used * internally to mean "not maximized" but is not valid in rc.xml. -- 2.52.0