diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/theme.h | 10 | ||||
-rw-r--r-- | include/view-internal.h | 2 | ||||
-rw-r--r-- | include/widgets/box.h | 2 | ||||
-rw-r--r-- | include/widgets/widget-internal.h | 6 |
4 files changed, 19 insertions, 1 deletions
diff --git a/include/theme.h b/include/theme.h index a78d08f2..75acbc43 100644 --- a/include/theme.h +++ b/include/theme.h @@ -22,6 +22,15 @@ typedef struct double alpha; } ThemeColor; +typedef struct +{ + int left; + int right; + int top; + int bottom; + gboolean percentual; +} Padding; + typedef struct { char *name; PropertyType type; @@ -69,4 +78,5 @@ int rofi_theme_get_boolean ( const char *wclass, const char *name, const char char *rofi_theme_get_string ( const char *wclass, const char *name, const char *state, const char *property, char *def ); double rofi_theme_get_double ( const char *wclass, const char *name, const char *state, const char *property, double def ); void rofi_theme_get_color ( const char *wclass, const char *name, const char *state, const char *property, cairo_t *d); +Padding rofi_theme_get_padding ( const char *wclass, const char *name, const char *state, const char *property, Padding pad ); #endif diff --git a/include/view-internal.h b/include/view-internal.h index e55e01b7..14f8bb06 100644 --- a/include/view-internal.h +++ b/include/view-internal.h @@ -7,6 +7,7 @@ #include "widgets/box.h" #include "keyb.h" #include "x11-helper.h" +#include "theme.h" /** * @ingroup ViewHandle @@ -65,6 +66,7 @@ struct RofiViewState MenuReturn retv; /** Calculated border width */ unsigned int border; + Padding pad; /** Monitor #workarea the view is displayed on */ workarea mon; diff --git a/include/widgets/box.h b/include/widgets/box.h index 4e5274fb..4aa71212 100644 --- a/include/widgets/box.h +++ b/include/widgets/box.h @@ -57,7 +57,7 @@ void box_add ( box *box, widget *child, gboolean expand, gboolean end ); * @param box Handle to the box widget. * * Obtains the minimal size required to display all widgets. (expanding widgets are not counted, except for their - * padding) + * spacing) * * @returns the minimum size in pixels. */ diff --git a/include/widgets/widget-internal.h b/include/widgets/widget-internal.h index 1638d9f1..5d810cf2 100644 --- a/include/widgets/widget-internal.h +++ b/include/widgets/widget-internal.h @@ -1,6 +1,7 @@ #ifndef WIDGET_INTERNAL_H #define WIDGET_INTERNAL_H +#include "theme.h" /** * Data structure holding the internal state of the Widget */ @@ -14,6 +15,8 @@ struct _widget short w; /** Height of the widget */ short h; + /** Padding */ + Padding pad; /** enabled or not */ gboolean enabled; /** Expand the widget when packed */ @@ -48,5 +51,8 @@ struct _widget /** Name of widget (used for theming) */ char *name; + char *class_name; }; + +void widget_init ( widget *widget , const char *name, const char *class_name ); #endif // WIDGET_INTERNAL_H |