diff options
author | Dave Davenport <qball@blame.services> | 2022-06-27 16:56:59 +0200 |
---|---|---|
committer | Dave Davenport <qball@blame.services> | 2022-06-27 16:56:59 +0200 |
commit | 8ee05a718e7aa6d3f6f6928a4fb78bb43835a6d9 (patch) | |
tree | 880bc32d05dfc02dcad5ccafa3e85e8d6be7def4 /include | |
parent | 3c6fc083f248782dd8875fcc7f3e15af07d42158 (diff) |
[View] Add textbox-current-entry widget.
Diffstat (limited to 'include')
-rw-r--r-- | include/view-internal.h | 2 | ||||
-rw-r--r-- | include/widgets/listview.h | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/include/view-internal.h b/include/view-internal.h index 44bf2bcb..b942e4e1 100644 --- a/include/view-internal.h +++ b/include/view-internal.h @@ -107,6 +107,8 @@ struct RofiViewState { /** filtered rows */ textbox *tb_filtered_rows; + textbox *tb_current_entry; + /** Settings of the menu */ MenuFlags menu_flags; /** If mouse was within view previously */ diff --git a/include/widgets/listview.h b/include/widgets/listview.h index 3a10436e..a2e95675 100644 --- a/include/widgets/listview.h +++ b/include/widgets/listview.h @@ -68,6 +68,16 @@ typedef void (*listview_update_callback)(textbox *tb, icon *ico, TextBoxFontType *type, gboolean full); /** + * @param lv The listview + * @param index the selected row + * @param udata user data + * + * Selection changed callback. + */ +typedef void (*listview_selection_changed_callback)(listview *lv, + unsigned int index, + void *udata); +/** * Callback when a element is activated. */ typedef void (*listview_mouse_activated_cb)(listview *, gboolean, void *); @@ -87,6 +97,12 @@ listview *listview_create(widget *parent, const char *name, unsigned int eh, gboolean reverse); /** + * Set the selection changed callback. + */ +void listview_set_selection_changed_callback( + listview *lv, listview_selection_changed_callback cb, void *udata); + +/** * @param lv The listview handle * @param rows Number of elements * @@ -273,7 +289,7 @@ void listview_set_ellipsize_start(listview *lv); * @param filtered boolean indicating if list is filtered. * */ -void listview_set_filtered ( listview *lv, gboolean filtered ); +void listview_set_filtered(listview *lv, gboolean filtered); /** @} */ #endif // ROFI_LISTVIEW_H |