summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-12-11 12:19:46 +0100
committerDave Davenport <qball@gmpclient.org>2016-12-11 12:19:46 +0100
commit1dfac3c4da2d1b52a3d1521b1501d8421c139d07 (patch)
tree0dc84d1fc479bc6607b97aef67b0d9aaa98611ca /include
parent5fd76b75b1e1e0d72f7bb821ac5db5bca4be10b7 (diff)
Update to new theme
Diffstat (limited to 'include')
-rw-r--r--include/theme.h2
-rw-r--r--include/widgets/box.h11
-rw-r--r--include/widgets/separator.h18
-rw-r--r--include/widgets/widget-internal.h3
-rw-r--r--include/widgets/widget.h3
5 files changed, 12 insertions, 25 deletions
diff --git a/include/theme.h b/include/theme.h
index 1d906a06..17853177 100644
--- a/include/theme.h
+++ b/include/theme.h
@@ -1,6 +1,7 @@
#ifndef THEME_H
#define THEME_H
#include <glib.h>
+#include <cairo.h>
typedef enum {
P_INTEGER,
P_DOUBLE,
@@ -65,4 +66,5 @@ int rofi_theme_get_integer ( const char *name, const char *property, int def );
int rofi_theme_get_boolean ( const char *name, const char *property, int def );
char *rofi_theme_get_string ( const char *name, const char *property, char *def );
double rofi_theme_get_double ( const char *name, const char *property, double def );
+void rofi_theme_get_color ( const char *name, const char *property, cairo_t *d);
#endif
diff --git a/include/widgets/box.h b/include/widgets/box.h
index 10d6a5a2..4e5274fb 100644
--- a/include/widgets/box.h
+++ b/include/widgets/box.h
@@ -32,6 +32,7 @@ typedef enum
} boxType;
/**
+ * @param name The name of the widget.
* @param type The packing direction of the newly created box.
* @param x The x position of the box relative to its parent.
* @param y The y position of the box relative to its parent.
@@ -40,7 +41,7 @@ typedef enum
*
* @returns a newly created box, free with #widget_free
*/
-box * box_create ( boxType type, short x, short y, short w, short h );
+box * box_create ( const char *name, boxType type, short x, short y, short w, short h );
/**
* @param box Handle to the box widget.
@@ -61,13 +62,5 @@ void box_add ( box *box, widget *child, gboolean expand, gboolean end );
* @returns the minimum size in pixels.
*/
int box_get_fixed_pixels ( box *box );
-
-/**
- * @param box Handle to the box widget.
- * @param padding The padding to apply.
- *
- * Set the padding to apply between the children in pixels.
- */
-void box_set_padding ( box * box, unsigned int padding );
/*@}*/
#endif // ROFI_HBOX_H
diff --git a/include/widgets/separator.h b/include/widgets/separator.h
index f0f27f8e..3d94a989 100644
--- a/include/widgets/separator.h
+++ b/include/widgets/separator.h
@@ -37,6 +37,7 @@ typedef enum
} separator_line_style;
/**
+ * @param name The name of the widget.
* @param type The type of separator.
* @param sw The thickness of the separator.
*
@@ -44,22 +45,7 @@ typedef enum
*
* @returns a new separator, free with ::widget_free
*/
-separator *separator_create ( separator_type type, short sw );
+separator *separator_create ( const char *name, separator_type type, short sw );
-/**
- * @param sp The separator widget handle.
- * @param style_str String representation of the style.
- *
- * Sets the line style based on the string style_str
- */
-void separator_set_line_style_from_string ( separator *sp, const char *style_str );
-
-/**
- * @param sp The separator widget handle.
- * @param style The new style.
- *
- * Sets the line style.
- */
-void separator_set_line_style ( separator *sp, separator_line_style style );
/*@}*/
#endif // ROFI_SEPARATOR_H
diff --git a/include/widgets/widget-internal.h b/include/widgets/widget-internal.h
index a50f3980..1638d9f1 100644
--- a/include/widgets/widget-internal.h
+++ b/include/widgets/widget-internal.h
@@ -45,5 +45,8 @@ struct _widget
/** Free widget callback */
void ( *free )( struct _widget *widget );
+
+ /** Name of widget (used for theming) */
+ char *name;
};
#endif // WIDGET_INTERNAL_H
diff --git a/include/widgets/widget.h b/include/widgets/widget.h
index ba7fa841..02aadb11 100644
--- a/include/widgets/widget.h
+++ b/include/widgets/widget.h
@@ -173,5 +173,8 @@ void widget_set_clicked_handler ( widget *wid, widget_clicked_cb cb, void *udata
* returns TRUE when handled.
*/
gboolean widget_motion_notify ( widget *wid, xcb_motion_notify_event_t *xme );
+
+
+void widget_set_name ( widget *wid, const char *name );
/*@}*/
#endif // ROFI_WIDGET_H