summaryrefslogtreecommitdiffstats
path: root/include/widgets/widget-internal.h
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-10-09 10:13:15 +0200
committerDave Davenport <qball@gmpclient.org>2016-10-09 10:13:15 +0200
commitf3298801f3a2fc11ab4a9d081f999b05fa5ab7fd (patch)
tree8893fc0e06f674ae30ca46f911ba2fb14e7dd540 /include/widgets/widget-internal.h
parentf10bc5004f34fd9d92066179a47a0f67233e8fc3 (diff)
Split internal widget into separate file
Diffstat (limited to 'include/widgets/widget-internal.h')
-rw-r--r--include/widgets/widget-internal.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/widgets/widget-internal.h b/include/widgets/widget-internal.h
new file mode 100644
index 00000000..b2f3b4f5
--- /dev/null
+++ b/include/widgets/widget-internal.h
@@ -0,0 +1,38 @@
+#ifndef WIDGET_INTERNAL_H
+#define WIDGET_INTERNAL_H
+
+struct _widget
+{
+ /** X position relative to parent */
+ short x;
+ /** Y position relative to parent */
+ short y;
+ /** Width of the widget */
+ short w;
+ /** Height of the widget */
+ short h;
+ /** enabled or not */
+ gboolean enabled;
+ /** Information about packing. */
+ gboolean expand;
+ gboolean end;
+
+ struct _widget *parent;
+ /** Internal */
+ gboolean need_redraw;
+ /** Function prototypes */
+ int ( *get_width )( struct _widget * );
+ int ( *get_height )( struct _widget * );
+
+ void ( *draw )( struct _widget *widget, cairo_t *draw );
+ void ( *resize )( struct _widget *, short, short );
+ void ( *update )( struct _widget * );
+
+ // Signals.
+ widget_clicked_cb clicked;
+ void *clicked_cb_data;
+
+ // Free
+ void ( *free )( struct _widget *widget );
+};
+#endif // WIDGET_INTERNAL_H