diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-08-17 22:45:35 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-08-17 22:52:17 +0200 |
commit | 9105e5549f32c0ff2130d6904c07cedc0094ffad (patch) | |
tree | e5d3a5579c532540604bec4b963eb853205b6164 /include | |
parent | 5dd8e216e1023b377fa1bf3879907e41c1652b9b (diff) |
Move all property structs/enums into rofi-types
Diffstat (limited to 'include')
-rw-r--r-- | include/rofi-types.h | 144 | ||||
-rw-r--r-- | include/theme.h | 140 |
2 files changed, 144 insertions, 140 deletions
diff --git a/include/rofi-types.h b/include/rofi-types.h index 0e75c389..e6a2026d 100644 --- a/include/rofi-types.h +++ b/include/rofi-types.h @@ -1,6 +1,8 @@ #ifndef INCLUDE_ROFI_TYPES_H #define INCLUDE_ROFI_TYPES_H +#include <glib.h> + /** * Type of property */ @@ -38,4 +40,146 @@ typedef enum */ extern const char * const PropertyTypeName[P_NUM_TYPES]; + +/** Style of text highlight */ +typedef enum +{ + /** no highlight */ + ROFI_HL_NONE = 0, + /** bold */ + ROFI_HL_BOLD = 1, + /** underline */ + ROFI_HL_UNDERLINE = 2, + /** strikethrough */ + ROFI_HL_STRIKETHROUGH = 16, + /** small caps */ + ROFI_HL_SMALL_CAPS = 32, + /** italic */ + ROFI_HL_ITALIC = 4, + /** color */ + ROFI_HL_COLOR = 8 +} RofiHighlightStyle; + +/** Style of line */ +typedef enum +{ + /** Solid line */ + ROFI_HL_SOLID, + /** Dashed line */ + ROFI_HL_DASH +} RofiLineStyle; + +/** + * Distance unit type. + */ +typedef enum +{ + /** PixelWidth in pixels. */ + ROFI_PU_PX, + /** PixelWidth in EM. */ + ROFI_PU_EM, + /** PixelWidget in percentage */ + ROFI_PU_PERCENT, +} RofiPixelUnit; + +/** + * Structure representing a distance. + */ +typedef struct +{ + /** Distance */ + double distance; + /** Unit type of the distance */ + RofiPixelUnit type; + /** Style of the line (optional)*/ + RofiLineStyle style; +} RofiDistance; + +/** + * Type of orientation. + */ +typedef enum +{ + ROFI_ORIENTATION_VERTICAL, + ROFI_ORIENTATION_HORIZONTAL +} RofiOrientation; + +/** + * Represent the color in theme. + */ +typedef struct +{ + /** red channel */ + double red; + /** green channel */ + double green; + /** blue channel */ + double blue; + /** alpha channel */ + double alpha; +} ThemeColor; + +/** + * RofiPadding + */ +typedef struct +{ + RofiDistance top; + RofiDistance right; + RofiDistance bottom; + RofiDistance left; +} RofiPadding; + +/** + * Theme highlight. + */ +typedef struct +{ + /** style to display */ + RofiHighlightStyle style; + /** Color */ + ThemeColor color; +} RofiHighlightColorStyle; + +typedef union +{ + /** integer */ + int i; + /** Double */ + double f; + /** String */ + char *s; + /** boolean */ + gboolean b; + /** Color */ + ThemeColor color; + /** RofiPadding */ + RofiPadding padding; + /** Reference */ + struct + { + /** Name */ + char *name; + /** Cached looked up ref */ + struct Property *ref; + } link; + /** Highlight Style */ + RofiHighlightColorStyle highlight; + /** List */ + GList *list; +} PropertyValue; + +/** + * Property structure. + */ +typedef struct Property +{ + /** Name of property */ + char *name; + /** Type of property. */ + PropertyType type; + /** Value */ + PropertyValue value; +} Property; + #endif // INCLUDE_ROFI_TYPES_H diff --git a/include/theme.h b/include/theme.h index 5e554b4c..6c06a956 100644 --- a/include/theme.h +++ b/include/theme.h @@ -34,146 +34,6 @@ #include "rofi-types.h" -/** Style of text highlight */ -typedef enum -{ - /** no highlight */ - ROFI_HL_NONE = 0, - /** bold */ - ROFI_HL_BOLD = 1, - /** underline */ - ROFI_HL_UNDERLINE = 2, - /** strikethrough */ - ROFI_HL_STRIKETHROUGH = 16, - /** small caps */ - ROFI_HL_SMALL_CAPS = 32, - /** italic */ - ROFI_HL_ITALIC = 4, - /** color */ - ROFI_HL_COLOR = 8 -} RofiHighlightStyle; - -/** Style of line */ -typedef enum -{ - /** Solid line */ - ROFI_HL_SOLID, - /** Dashed line */ - ROFI_HL_DASH -} RofiLineStyle; - -/** - * Distance unit type. - */ -typedef enum -{ - /** PixelWidth in pixels. */ - ROFI_PU_PX, - /** PixelWidth in EM. */ - ROFI_PU_EM, - /** PixelWidget in percentage */ - ROFI_PU_PERCENT, -} RofiPixelUnit; - -/** - * Structure representing a distance. - */ -typedef struct -{ - /** Distance */ - double distance; - /** Unit type of the distance */ - RofiPixelUnit type; - /** Style of the line (optional)*/ - RofiLineStyle style; -} RofiDistance; - -/** - * Type of orientation. - */ -typedef enum -{ - ROFI_ORIENTATION_VERTICAL, - ROFI_ORIENTATION_HORIZONTAL -} RofiOrientation; - -/** - * Represent the color in theme. - */ -typedef struct -{ - /** red channel */ - double red; - /** green channel */ - double green; - /** blue channel */ - double blue; - /** alpha channel */ - double alpha; -} ThemeColor; - -/** - * RofiPadding - */ -typedef struct -{ - RofiDistance top; - RofiDistance right; - RofiDistance bottom; - RofiDistance left; -} RofiPadding; - -/** - * Theme highlight. - */ -typedef struct -{ - /** style to display */ - RofiHighlightStyle style; - /** Color */ - ThemeColor color; -} RofiHighlightColorStyle; - -typedef union -{ - /** integer */ - int i; - /** Double */ - double f; - /** String */ - char *s; - /** boolean */ - gboolean b; - /** Color */ - ThemeColor color; - /** RofiPadding */ - RofiPadding padding; - /** Reference */ - struct - { - /** Name */ - char *name; - /** Cached looked up ref */ - struct Property *ref; - } link; - /** Highlight Style */ - RofiHighlightColorStyle highlight; - /** List */ - GList *list; -} PropertyValue; - -/** - * Property structure. - */ -typedef struct Property -{ - /** Name of property */ - char *name; - /** Type of property. */ - PropertyType type; - /** Value */ - PropertyValue value; -} Property; /** * ThemeWidget. */ |