diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-05-28 16:10:11 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-05-28 16:10:11 +0200 |
commit | fa0380057bb801b1dbeb409c50bfe72c995dc2a9 (patch) | |
tree | 1c71558940e565aff9bbf9d43c9d5390cf7aa3f3 /include/widgets | |
parent | b82e1c7a78379ebafe95f444201df1beec78597a (diff) |
[Widget] Add desired width option.
Diffstat (limited to 'include/widgets')
-rw-r--r-- | include/widgets/widget-internal.h | 1 | ||||
-rw-r--r-- | include/widgets/widget.h | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/widgets/widget-internal.h b/include/widgets/widget-internal.h index 0ac497d5..762c4794 100644 --- a/include/widgets/widget-internal.h +++ b/include/widgets/widget-internal.h @@ -79,6 +79,7 @@ struct _widget gboolean ( *motion_notify )( struct _widget *, xcb_motion_notify_event_t * ); int ( *get_desired_height )( struct _widget * ); + int ( *get_desired_width )( struct _widget * ); /** widget clicked callback */ widget_clicked_cb clicked; diff --git a/include/widgets/widget.h b/include/widgets/widget.h index 990e50b4..36eecf90 100644 --- a/include/widgets/widget.h +++ b/include/widgets/widget.h @@ -210,5 +210,13 @@ gboolean widget_motion_notify ( widget *wid, xcb_motion_notify_event_t *xme ); */ int widget_get_desired_height ( widget *wid ); +/** + * @param wid The widget handle + * + * Get the desired width of this widget recursively. + * + * @returns the desired width of the widget in pixels. + */ +int widget_get_desired_width ( widget *wid ); /*@}*/ #endif // ROFI_WIDGET_H |