summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-08-17 19:04:01 +0200
committerDave Davenport <qball@gmpclient.org>2017-08-17 19:04:01 +0200
commit686be5856ce421edf79d147abd52954f7d0cb634 (patch)
tree60ec94dbe1488630e77557e6d152bfe0f1c4c992 /include
parentfb8f56dab3f8d2d1eaa54e33b1c4873af5473983 (diff)
Move PropertyType into rofi-types header and add check for names pairs.
Diffstat (limited to 'include')
-rw-r--r--include/rofi-types.h37
-rw-r--r--include/theme.h31
2 files changed, 38 insertions, 30 deletions
diff --git a/include/rofi-types.h b/include/rofi-types.h
index 4970e453..0e75c389 100644
--- a/include/rofi-types.h
+++ b/include/rofi-types.h
@@ -1,6 +1,41 @@
#ifndef INCLUDE_ROFI_TYPES_H
#define INCLUDE_ROFI_TYPES_H
-extern const char *PropertyTypeName[];
+/**
+ * Type of property
+ */
+typedef enum
+{
+ /** Integer */
+ P_INTEGER,
+ /** Double */
+ P_DOUBLE,
+ /** String */
+ P_STRING,
+ /** Boolean */
+ P_BOOLEAN,
+ /** Color */
+ P_COLOR,
+ /** RofiPadding */
+ P_PADDING,
+ /** Link to global setting */
+ P_LINK,
+ /** Position */
+ P_POSITION,
+ /** Highlight */
+ P_HIGHLIGHT,
+ /** List */
+ P_LIST,
+ /** Orientation */
+ P_ORIENTATION,
+ /** Number of types. */
+ P_NUM_TYPES,
+} PropertyType;
+
+/**
+ * This array maps PropertyType to a user-readable name.
+ * It is important this is kept in sync.
+ */
+extern const char * const PropertyTypeName[P_NUM_TYPES];
#endif // INCLUDE_ROFI_TYPES_H
diff --git a/include/theme.h b/include/theme.h
index c0182e64..5e554b4c 100644
--- a/include/theme.h
+++ b/include/theme.h
@@ -31,7 +31,8 @@
#include <cairo.h>
#include <widgets/widget.h>
#include <settings.h>
-#include "theme.h"
+
+#include "rofi-types.h"
/** Style of text highlight */
typedef enum
@@ -95,34 +96,6 @@ typedef enum
ROFI_ORIENTATION_VERTICAL,
ROFI_ORIENTATION_HORIZONTAL
} RofiOrientation;
-/**
- * Type of property
- */
-typedef enum
-{
- /** Integer */
- P_INTEGER,
- /** Double */
- P_DOUBLE,
- /** String */
- P_STRING,
- /** Boolean */
- P_BOOLEAN,
- /** Color */
- P_COLOR,
- /** RofiPadding */
- P_PADDING,
- /** Link to global setting */
- P_LINK,
- /** Position */
- P_POSITION,
- /** Highlight */
- P_HIGHLIGHT,
- /** List */
- P_LIST,
- /** Orientation */
- P_ORIENTATION,
-} PropertyType;
/**
* Represent the color in theme.