summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-10-09 10:07:32 +0200
committerDave Davenport <qball@gmpclient.org>2016-10-09 10:07:32 +0200
commitf10bc5004f34fd9d92066179a47a0f67233e8fc3 (patch)
tree4bfddbe43dcab5043f8a2d3fd086a1e7ae187b5d /include
parentad02f8f0b74977e7d0a0cdec8fb892842709407f (diff)
Make separator work in both directions ( hori/vert ).
Diffstat (limited to 'include')
-rw-r--r--include/widgets/box.h4
-rw-r--r--include/widgets/separator.h15
-rw-r--r--include/widgets/textbox.h20
3 files changed, 25 insertions, 14 deletions
diff --git a/include/widgets/box.h b/include/widgets/box.h
index e5507731..d764821f 100644
--- a/include/widgets/box.h
+++ b/include/widgets/box.h
@@ -45,7 +45,7 @@ box * box_create ( boxType type, short x, short y, short w, short h );
* @param end If the child widget should be packed at the end.
*
* Add a widget to the box.
- */
+ */
void box_add ( box *box, widget *child, gboolean expand, gboolean end );
/**
@@ -53,7 +53,7 @@ void box_add ( box *box, widget *child, gboolean expand, gboolean end );
*
* Obtains the minimal size required to display all widgets. (expanding widgets are not counted, except for their
* padding)
- *
+ *
* @returns the minimum size in pixels.
*/
int box_get_fixed_pixels ( box *box );
diff --git a/include/widgets/separator.h b/include/widgets/separator.h
index c2406a2f..5294f8da 100644
--- a/include/widgets/separator.h
+++ b/include/widgets/separator.h
@@ -14,13 +14,24 @@
typedef struct _separator separator;
/**
- * @param h The height of the separator.
+ * Direction of the separator.
+ */
+
+typedef enum
+{
+ S_HORIZONTAL = 0,
+ S_VERTICAL = 1
+} separator_type;
+
+/**
+ * @param type The type of separator.
+ * @param sw The thickness of the separator.
*
* Create a horizontal separator with height h.
*
* @returns a new separator, free with ::widget_free
*/
-separator *separator_create ( short h );
+separator *separator_create ( separator_type type, short sw );
/*@}*/
#endif // ROFI_SEPARATOR_H
diff --git a/include/widgets/textbox.h b/include/widgets/textbox.h
index 759220bf..e0ae62b1 100644
--- a/include/widgets/textbox.h
+++ b/include/widgets/textbox.h
@@ -38,16 +38,16 @@ typedef struct
typedef enum
{
- TB_AUTOHEIGHT = 1 << 0,
- TB_AUTOWIDTH = 1 << 1,
- TB_LEFT = 1 << 16,
- TB_RIGHT = 1 << 17,
- TB_CENTER = 1 << 18,
- TB_EDITABLE = 1 << 19,
- TB_MARKUP = 1 << 20,
- TB_WRAP = 1 << 21,
- TB_PASSWORD = 1 << 22,
- TB_INDICATOR = 1 << 23,
+ TB_AUTOHEIGHT = 1 << 0,
+ TB_AUTOWIDTH = 1 << 1,
+ TB_LEFT = 1 << 16,
+ TB_RIGHT = 1 << 17,
+ TB_CENTER = 1 << 18,
+ TB_EDITABLE = 1 << 19,
+ TB_MARKUP = 1 << 20,
+ TB_WRAP = 1 << 21,
+ TB_PASSWORD = 1 << 22,
+ TB_INDICATOR = 1 << 23,
} TextboxFlags;
typedef enum