From 494550d38d572801ba3924611b09c7ca2b20610a Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Mon, 15 May 2017 22:46:33 +0200 Subject: [ThemeParser] Add CSS color names support * [ThemeParser] Add css color names * Add CSS color support (WIP) * Parse color names in the lexer. * Add test for css color names * Indent and fix ordering --- include/css-colors.h | 12 ++++++++++++ include/helper.h | 2 +- include/settings.h | 8 ++++---- 3 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 include/css-colors.h (limited to 'include') diff --git a/include/css-colors.h b/include/css-colors.h new file mode 100644 index 00000000..0c47b393 --- /dev/null +++ b/include/css-colors.h @@ -0,0 +1,12 @@ +#ifndef ROFI_INCLUDE_CSS_COLORS_H +#define ROFI_INCLUDE_CSS_COLORS_H + +typedef struct CSSColor +{ + char *name; + uint8_t b, g, r, a; +}CSSColor; + +extern const CSSColor CSSColors[]; +extern const unsigned int num_CSSColors; +#endif // ROFI_INCLUDE_CSS_COLORS_H diff --git a/include/helper.h b/include/helper.h index e3648b6b..03d4515f 100644 --- a/include/helper.h +++ b/include/helper.h @@ -244,7 +244,7 @@ int rofi_scorer_fuzzy_evaluate ( const char *pattern, glong plen, const char *st * are found, respectively, to be less than, to match, or be greater than the first `n` * characters (not bytes) of `b`. */ -int utf8_strncmp ( const char *a, const char* b, size_t n ) __attribute__((nonnull(1,2))); +int utf8_strncmp ( const char *a, const char* b, size_t n ) __attribute__( ( nonnull ( 1, 2 ) ) ); /** * @param wd The work directory (optional) diff --git a/include/settings.h b/include/settings.h index b0506f64..f18be7a9 100644 --- a/include/settings.h +++ b/include/settings.h @@ -65,13 +65,13 @@ typedef enum /** Middle left */ WL_WEST = 8, /** Left top corner. */ - WL_NORTH_WEST = WL_NORTH|WL_WEST, + WL_NORTH_WEST = WL_NORTH | WL_WEST, /** Top right */ - WL_NORTH_EAST = WL_NORTH|WL_EAST, + WL_NORTH_EAST = WL_NORTH | WL_EAST, /** Bottom right */ - WL_SOUTH_EAST = WL_SOUTH|WL_EAST, + WL_SOUTH_EAST = WL_SOUTH | WL_EAST, /** Bottom left */ - WL_SOUTH_WEST = WL_SOUTH|WL_WEST, + WL_SOUTH_WEST = WL_SOUTH | WL_WEST, } WindowLocation; /** -- cgit v1.2.3