summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-06-02 16:46:28 +0200
committerDave Davenport <qball@gmpclient.org>2017-06-02 16:46:28 +0200
commit1d622aa59c7e80cdfa71c24331dc2255b66960f4 (patch)
tree1427105e0ee05fa41a8b2c811835637750f5ce18
parent3e4622807425d9ca9964591a9c7c5b8e0fdd7c18 (diff)
Change ThemeHighlight to RofiHighlightColorStyle
-rw-r--r--include/helper-theme.h4
-rw-r--r--include/theme.h6
-rw-r--r--source/helper.c2
-rw-r--r--source/theme.c2
-rw-r--r--source/view.c2
-rw-r--r--test/theme-parser-test.c6
6 files changed, 11 insertions, 11 deletions
diff --git a/include/helper-theme.h b/include/helper-theme.h
index 472ca1b0..b2ed659b 100644
--- a/include/helper-theme.h
+++ b/include/helper-theme.h
@@ -34,7 +34,7 @@
* @{
*/
/**
- * @param th The ThemeHighlight
+ * @param th The RofiHighlightColorStyle
* @param tokens Array of regexes used for matching
* @param input The input string to find the matches on
* @param retv The Attribute list to update with matches
@@ -43,7 +43,7 @@
*
* @returns the updated retv list.
*/
-PangoAttrList *helper_token_match_get_pango_attr ( ThemeHighlight th, GRegex **tokens, const char *input, PangoAttrList *retv );
+PangoAttrList *helper_token_match_get_pango_attr ( RofiHighlightColorStyle th, GRegex **tokens, const char *input, PangoAttrList *retv );
/**
* @param pfd Pango font description to validate.
diff --git a/include/theme.h b/include/theme.h
index ceed0ec3..5afa982d 100644
--- a/include/theme.h
+++ b/include/theme.h
@@ -159,7 +159,7 @@ typedef struct
RofiHighlightStyle style;
/** Color */
ThemeColor color;
-} ThemeHighlight;
+} RofiHighlightColorStyle;
typedef union {
/** integer */
@@ -183,7 +183,7 @@ typedef union {
struct Property *ref;
} link;
/** Highlight Style */
- ThemeHighlight highlight;
+ RofiHighlightColorStyle highlight;
/** List */
GList *list;
} PropertyValue;
@@ -418,7 +418,7 @@ RofiPadding rofi_theme_get_padding ( const widget *widget, const char *property,
*
* @returns The highlight of this property for this widget.
*/
-ThemeHighlight rofi_theme_get_highlight ( widget *widget, const char *property, ThemeHighlight th );
+RofiHighlightColorStyle rofi_theme_get_highlight ( widget *widget, const char *property, RofiHighlightColorStyle th );
/**
* @param d The distance handle.
diff --git a/source/helper.c b/source/helper.c
index a299e612..b1220fbd 100644
--- a/source/helper.c
+++ b/source/helper.c
@@ -399,7 +399,7 @@ int find_arg_char ( const char * const key, char *val )
return FALSE;
}
-PangoAttrList *helper_token_match_get_pango_attr ( ThemeHighlight th, GRegex **tokens, const char *input, PangoAttrList *retv )
+PangoAttrList *helper_token_match_get_pango_attr ( RofiHighlightColorStyle th, GRegex **tokens, const char *input, PangoAttrList *retv )
{
// Do a tokenized match.
if ( tokens ) {
diff --git a/source/theme.c b/source/theme.c
index 6d620faa..f4f41003 100644
--- a/source/theme.c
+++ b/source/theme.c
@@ -626,7 +626,7 @@ GList *rofi_theme_get_list ( const widget *widget, const char * property, const
return NULL;
}
-ThemeHighlight rofi_theme_get_highlight ( widget *widget, const char *property, ThemeHighlight th )
+RofiHighlightColorStyle rofi_theme_get_highlight ( widget *widget, const char *property, RofiHighlightColorStyle th )
{
ThemeWidget *wid = rofi_theme_find_widget ( widget->name, widget->state, FALSE );
Property *p = rofi_theme_find_property ( wid, P_HIGHLIGHT, property, FALSE );
diff --git a/source/view.c b/source/view.c
index 72a98dcb..2b036481 100644
--- a/source/view.c
+++ b/source/view.c
@@ -911,7 +911,7 @@ static void update_callback ( textbox *t, unsigned int index, void *udata, TextB
textbox_icon ( t, icon );
if ( state->tokens && config.show_match ) {
- ThemeHighlight th = { ROFI_HL_BOLD | ROFI_HL_UNDERLINE, { 0.0, 0.0, 0.0, 0.0 } };
+ RofiHighlightColorStyle th = { ROFI_HL_BOLD | ROFI_HL_UNDERLINE, { 0.0, 0.0, 0.0, 0.0 } };
th = rofi_theme_get_highlight ( WIDGET ( t ), "highlight", th );
helper_token_match_get_pango_attr ( th, state->tokens, textbox_get_visible_text ( t ), list );
}
diff --git a/test/theme-parser-test.c b/test/theme-parser-test.c
index 45880b6f..6629c83f 100644
--- a/test/theme-parser-test.c
+++ b/test/theme-parser-test.c
@@ -366,7 +366,7 @@ START_TEST ( test_properties_style)
wid.name = "blaat";
wid.state = NULL;
rofi_theme_parse_string ( "* { none: none; bold: bold; underline: underline; italic: italic; st: italic strikethrough;}");
- ThemeHighlight th = { ROFI_HL_BOLD, {0.0,0.0,0.0,0.0}};
+ RofiHighlightColorStyle th = { ROFI_HL_BOLD, {0.0,0.0,0.0,0.0}};
th = rofi_theme_get_highlight ( &wid, "none", th);
ck_assert_int_eq ( th.style , ROFI_HL_NONE );
th = rofi_theme_get_highlight ( &wid, "underline", th);
@@ -386,7 +386,7 @@ START_TEST ( test_properties_style2 )
wid.state = NULL;
rofi_theme_parse_string ( "* { boldu: bold underline ; boldi: bold italic; underlinei: underline italic; italicu: italic underline;}");
- ThemeHighlight th = { ROFI_HL_BOLD, {0.0,0.0,0.0,0.0}};
+ RofiHighlightColorStyle th = { ROFI_HL_BOLD, {0.0,0.0,0.0,0.0}};
th = rofi_theme_get_highlight ( &wid, "boldu", th);
ck_assert_int_eq ( th.style , (ROFI_HL_UNDERLINE|ROFI_HL_BOLD));
th = rofi_theme_get_highlight ( &wid, "boldi", th);
@@ -403,7 +403,7 @@ START_TEST ( test_properties_style_color )
wid.name = "blaat";
wid.state = NULL;
rofi_theme_parse_string ( "* { comb: bold #123; }");
- ThemeHighlight th = { ROFI_HL_BOLD, {0.0,0.0,0.0,0.0}};
+ RofiHighlightColorStyle th = { ROFI_HL_BOLD, {0.0,0.0,0.0,0.0}};
th = rofi_theme_get_highlight ( &wid, "comb", th);
ck_assert_int_eq ( th.style , (ROFI_HL_BOLD|ROFI_HL_COLOR));
ck_assert_double_eq ( th.color.red , (1/15.0));