summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-01-06 16:41:23 +0100
committerDave Davenport <qball@gmpclient.org>2017-01-06 16:41:23 +0100
commitaf8a6541a2608c387c6df95b4e0bd57a1fade6e6 (patch)
tree4ccc8392d0968eb050d0a7fce02c902bc12730ca /include
parent50780346729d2e9f4feb2725824c8df173b0df5b (diff)
Order entries in box based on index, allow theme to override.
Diffstat (limited to 'include')
-rw-r--r--include/theme.h10
-rw-r--r--include/widgets/box.h4
-rw-r--r--include/widgets/widget-internal.h2
3 files changed, 14 insertions, 2 deletions
diff --git a/include/theme.h b/include/theme.h
index a0b55675..ee5acb6f 100644
--- a/include/theme.h
+++ b/include/theme.h
@@ -202,6 +202,16 @@ Distance rofi_theme_get_distance ( const widget *widget, const char *property, i
* @returns The integer value of this property for this widget.
*/
int rofi_theme_get_integer ( const widget *widget, const char *property, int def );
+/**
+ * @param widget The widget to query
+ * @param property The property to query.
+ * @param def The default value.
+ *
+ * Obtain the integer of the widget.
+ *
+ * @returns The integer value of this property for this widget.
+ */
+int rofi_theme_get_integer_exact ( const widget *widget, const char *property, int def );
/**
* @param widget The widget to query
diff --git a/include/widgets/box.h b/include/widgets/box.h
index b0688c83..2c067598 100644
--- a/include/widgets/box.h
+++ b/include/widgets/box.h
@@ -43,11 +43,11 @@ box * box_create ( const char *name, boxType type );
* @param box Handle to the box widget.
* @param child Handle to the child widget to pack.
* @param expand If the child widget should expand and use all available space.
- * @param end If the child widget should be packed at the end.
+ * @param index The position index.
*
* Add a widget to the box.
*/
-void box_add ( box *box, widget *child, gboolean expand, gboolean end );
+void box_add ( box *box, widget *child, gboolean expand, int index );
/**
* @param box Handle to the box widget.
diff --git a/include/widgets/widget-internal.h b/include/widgets/widget-internal.h
index cdd9d2f9..e26fb8f2 100644
--- a/include/widgets/widget-internal.h
+++ b/include/widgets/widget-internal.h
@@ -24,6 +24,8 @@ struct _widget
gboolean enabled;
/** Expand the widget when packed */
gboolean expand;
+ /*** The packing index */
+ int index;
/** Place widget at end of parent */
gboolean end;
/** Parent widget */