summaryrefslogtreecommitdiffstats
path: root/include/widgets
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-12-28 19:42:14 +0100
committerDave Davenport <qball@gmpclient.org>2016-12-28 19:42:14 +0100
commita2001d1b9ced299d05a643a032380529a1df2e60 (patch)
tree427146fef8b2847a94844132cbab0c49dbfaeda9 /include/widgets
parent2db879e9794c12700061de860f33cba8f545f324 (diff)
Add window widget, play with logic for sizing (broken)
Diffstat (limited to 'include/widgets')
-rw-r--r--include/widgets/widget-internal.h9
-rw-r--r--include/widgets/window.h37
2 files changed, 46 insertions, 0 deletions
diff --git a/include/widgets/widget-internal.h b/include/widgets/widget-internal.h
index 940738fc..efb43f78 100644
--- a/include/widgets/widget-internal.h
+++ b/include/widgets/widget-internal.h
@@ -57,4 +57,13 @@ struct _widget
void widget_init ( widget *widget , const char *name, const char *class_name );
void widget_set_state ( widget *widget, const char *state );
+
+int widget_padding_get_left ( const widget *wid );
+int widget_padding_get_right ( const widget *wid );
+int widget_padding_get_top ( const widget *wid );
+int widget_padding_get_bottom ( const widget *wid );
+int widget_padding_get_remaining_width ( const widget *wid );
+int widget_padding_get_remaining_height ( const widget *wid );
+int widget_padding_get_padding_height ( const widget *wid );
+int widget_padding_get_padding_width ( const widget *wid );
#endif // WIDGET_INTERNAL_H
diff --git a/include/widgets/window.h b/include/widgets/window.h
new file mode 100644
index 00000000..6d8a90a1
--- /dev/null
+++ b/include/widgets/window.h
@@ -0,0 +1,37 @@
+#ifndef ROFI_WINDOW_H
+#define ROFI_WINDOW_H
+
+#include "widget.h"
+
+/**
+ * @defgroup window window
+ * @ingroup widget
+ *
+ *
+ * @{
+ */
+
+/**
+ * Abstract handle to the window widget internal state.
+ */
+typedef struct _window window;
+
+/**
+ * @param name The name of the widget.
+ * @param type The packing direction of the newly created window.
+ *
+ * @returns a newly created window, free with #widget_free
+ */
+window * window_create ( const char *name );
+
+/**
+ * @param window Handle to the window widget.
+ * @param child Handle to the child widget to pack.
+ *
+ * Add a widget to the window.
+ */
+void window_add ( window *window, widget *child );
+
+int window_get_border_width ( const window *window );
+/*@}*/
+#endif // ROFI_WINDOW_H