|
rofi 2.1.0
|

Typedefs | |
| typedef struct _listview | listview |
| typedef void(*) | listview_update_callback(textbox *tb, icon *ico, unsigned int entry, void *udata, TextBoxFontType *type, gboolean full) |
| typedef void(*) | listview_selection_changed_callback(listview *lv, unsigned int index, void *udata) |
| typedef void(*) | listview_mouse_activated_cb(listview *, gboolean, void *) |
| typedef void(*) | listview_page_changed_cb(void) |
Enumerations | |
| enum | ScrollType { LISTVIEW_SCROLL_PER_PAGE , LISTVIEW_SCROLL_CONTINIOUS } |
Handle to the listview. No internal fields should be accessed directly.
Definition at line 45 of file listview.h.
| typedef void(*) listview_mouse_activated_cb(listview *, gboolean, void *) |
Callback when a element is activated.
Definition at line 85 of file listview.h.
| typedef void(*) listview_page_changed_cb(void) |
Callback when current page is changed.
Definition at line 91 of file listview.h.
| typedef void(*) listview_selection_changed_callback(listview *lv, unsigned int index, void *udata) |
| lv | The listview |
| index | the selected row |
| udata | user data |
Selection changed callback.
Definition at line 79 of file listview.h.
| typedef void(*) listview_update_callback(textbox *tb, icon *ico, unsigned int entry, void *udata, TextBoxFontType *type, gboolean full) |
| tb | The textbox to set |
| ico | The icon to set |
| entry | The position of the textbox |
| udata | User data |
| type | The textbox font style to apply to this entry (normal, selected, alternative row) |
| full | If true Set both text and style. |
Update callback, this is called to set the value of each (visible) element.
Definition at line 68 of file listview.h.
| enum ScrollType |
The scrolling type used in the list view
| Enumerator | |
|---|---|
| LISTVIEW_SCROLL_PER_PAGE | Flip through the pages. |
| LISTVIEW_SCROLL_CONTINIOUS | keep selected item centered |
Definition at line 50 of file listview.h.
| listview * listview_create | ( | widget * | parent, |
| const char * | name, | ||
| listview_update_callback | cb, | ||
| listview_page_changed_cb | page_cb, | ||
| void * | udata, | ||
| unsigned int | eh, | ||
| gboolean | reverse ) |
| parent | The widget's parent. |
| name | The name of the to be created widget. |
| cb | The update callback. |
| page_cb | The page change callback. |
| udata | The user data to pass to the callback |
| eh | The height of one element |
| reverse | Reverse the listview order. |
Definition at line 789 of file listview.c.
References _listview_draw(), _listview_row::box, _listview::callback, config, _listview::cycle, Settings::cycle, DEFAULT_MENU_COLUMNS, DEFAULT_MENU_LINES, DEFAULT_SPACING, _widget::draw, _listview::dynamic, _listview::eh, _listview::element_height, _listview::emode, _widget::find_mouse_target, _listview::fixed_columns, _listview::fixed_num_lines, Settings::fixed_num_lines, _widget::free, _widget::get_desired_height, LISTVIEW, listview_create(), listview_create_row(), listview_find_mouse_target(), listview_free(), listview_get_desired_height(), _listview::listview_name, listview_resize(), listview_set_show_scrollbar(), listview_trigger_action(), _listview::menu_columns, _listview::menu_lines, _listview::pack_direction, _listview::page_callback, _listview::require_input, _widget::resize, _listview::reverse, ROFI_ORIENTATION_VERTICAL, rofi_theme_get_boolean(), rofi_theme_get_distance(), rofi_theme_get_integer(), rofi_theme_get_orientation(), _listview::scrollbar, scrollbar_create(), _listview::spacing, _listview_row::textbox, textbox_moveresize(), textbox_text(), _widget::trigger_action, _listview::type, _listview::udata, WIDGET, _listview::widget, widget_free(), widget_get_desired_height(), widget_init(), and WIDGET_TYPE_LISTVIEW.
Referenced by listview_create(), and rofi_view_add_widget().


| unsigned int listview_get_element_pitch | ( | listview * | lv, |
| RofiOrientation | orientation ) |
| lv | The listview handle |
| orientation | The axis to measure along |
The distance from one element to the next along the axis: the element size plus the spacing.
Definition at line 638 of file listview.c.
References _listview_row::box, _listview::boxes, _listview::cur_elements, distance_get_pixel(), _listview::element_height, listview_get_element_pitch(), ROFI_ORIENTATION_HORIZONTAL, ROFI_ORIENTATION_VERTICAL, _listview::spacing, WIDGET, and widget_get_width().
Referenced by listview_get_element_pitch(), and rofi_view_get_element_pitch().


| gboolean listview_get_fixed_num_lines | ( | listview * | lv | ) |
| lv | Handler to the listview object. |
Get the fixed-height property.
Definition at line 1167 of file listview.c.
References _listview::fixed_num_lines, and listview_get_fixed_num_lines().
Referenced by listview_get_fixed_num_lines(), and listview_set_cycle().


| unsigned int listview_get_selected | ( | listview * | lv | ) |
| lv | The listview handle |
Returns the selected row.
Definition at line 631 of file listview.c.
References listview_get_selected(), and _listview::selected.
Referenced by listview_element_motion_notify(), listview_get_selected(), rofi_quit_user_callback(), rofi_view_get_next_position(), rofi_view_listview_mouse_activated_cb(), rofi_view_nav_row_select(), rofi_view_nav_row_tab(), rofi_view_refilter_real(), rofi_view_trigger_global_action(), and textbox_button_trigger_action().


| void listview_nav_down | ( | listview * | lv | ) |
| lv | listview handle. |
Move the selection one row down.
Definition at line 950 of file listview.c.
References listview_nav_column_left_int(), listview_nav_column_right_int(), listview_nav_down(), listview_nav_down_int(), listview_nav_up_int(), _listview::pack_direction, _listview::reverse, and ROFI_ORIENTATION_HORIZONTAL.
Referenced by listview_nav_down(), listview_trigger_action(), rofi_view_nav_row_tab(), and rofi_view_trigger_global_action().


| void listview_nav_left | ( | listview * | lv | ) |
| lv | The listview handle |
Move the selection one column to the left.
Definition at line 969 of file listview.c.
References BARVIEW, listview_nav_left(), listview_nav_up_int(), _listview::max_rows, _listview::pack_direction, ROFI_ORIENTATION_HORIZONTAL, _listview::sc_callback, _listview::sc_udata, _listview::selected, _listview::type, WIDGET, and widget_queue_redraw().
Referenced by listview_nav_left(), listview_trigger_action(), and rofi_view_trigger_global_action().


| void listview_nav_next | ( | listview * | lv | ) |
| lv | The listview handle |
Move the selection next element.
Definition at line 900 of file listview.c.
References listview_nav_down_int(), and listview_nav_next().
Referenced by listview_nav_next(), and rofi_view_trigger_global_action().


| void listview_nav_page_next | ( | listview * | lv | ) |
| lv | The listview handle |
Move the selection one page down.
Definition at line 1094 of file listview.c.
References listview_nav_page_next(), listview_nav_page_next_int(), listview_nav_page_prev_int(), and _listview::reverse.
Referenced by listview_nav_page_next(), and rofi_view_trigger_global_action().


| void listview_nav_page_prev | ( | listview * | lv | ) |
| lv | The listview handle |
Move the selection one page up.
Definition at line 1084 of file listview.c.
References listview_nav_page_next_int(), listview_nav_page_prev(), listview_nav_page_prev_int(), and _listview::reverse.
Referenced by listview_nav_page_prev(), and rofi_view_trigger_global_action().


| void listview_nav_prev | ( | listview * | lv | ) |
| lv | The listview handle |
Move the selection previous element.
Definition at line 906 of file listview.c.
References listview_nav_prev(), and listview_nav_up_int().
Referenced by listview_nav_prev(), and rofi_view_trigger_global_action().


| void listview_nav_right | ( | listview * | lv | ) |
| lv | The listview handle |
Move the selection one column to the right.
Definition at line 992 of file listview.c.
References BARVIEW, listview_nav_down_int(), listview_nav_right(), _listview::max_rows, _listview::pack_direction, _listview::req_elements, ROFI_ORIENTATION_HORIZONTAL, _listview::sc_callback, _listview::sc_udata, _listview::selected, _listview::type, WIDGET, and widget_queue_redraw().
Referenced by listview_nav_right(), listview_trigger_action(), and rofi_view_trigger_global_action().


| void listview_nav_up | ( | listview * | lv | ) |
| lv | The listview handle |
Move the selection one row up.
Definition at line 932 of file listview.c.
References listview_nav_column_left_int(), listview_nav_column_right_int(), listview_nav_down_int(), listview_nav_up(), listview_nav_up_int(), _listview::pack_direction, _listview::reverse, and ROFI_ORIENTATION_HORIZONTAL.
Referenced by listview_nav_up(), listview_trigger_action(), and rofi_view_trigger_global_action().


| void listview_set_cycle | ( | listview * | lv, |
| gboolean | cycle ) |
| lv | Handler to the listview object |
| cycle | True for cycle mode |
Set cycle mode. On last entry go to first.
References listview_get_fixed_num_lines(), listview_set_cycle(), listview_set_ellipsize(), listview_set_filtered(), listview_set_fixed_num_lines(), listview_set_max_lines(), listview_set_mouse_activated_cb(), listview_set_scroll_type(), and listview_toggle_ellipsizing().
Referenced by listview_set_cycle().


| void listview_set_ellipsize | ( | listview * | lv, |
| PangoEllipsizeMode | mode ) |
| lv | Handler to the listview object. |
| mode | The ellipsize mode to set. |
Set ellipsize mode on the listview.
Definition at line 1179 of file listview.c.
References _listview::boxes, _listview::cur_elements, _listview::emode, listview_set_ellipsize(), _listview_row::textbox, and textbox_set_ellipsize().
Referenced by listview_set_cycle(), listview_set_ellipsize(), and rofi_view_ellipsize_listview().


| void listview_set_filtered | ( | listview * | lv, |
| gboolean | filtered ) |
| lv | Handler to the listview object. |
| filtered | boolean indicating if list is filtered. |
Definition at line 1205 of file listview.c.
References _listview::filtered, and listview_set_filtered().
Referenced by listview_set_cycle(), listview_set_filtered(), and rofi_view_refilter_real().


| void listview_set_fixed_num_lines | ( | listview * | lv | ) |
| lv | Handler to the listview object. |
Set fixed num lines mode.
Definition at line 1173 of file listview.c.
References _listview::fixed_num_lines, and listview_set_fixed_num_lines().
Referenced by listview_set_cycle(), listview_set_fixed_num_lines(), rofi_view_create(), and rofi_view_error_dialog().


| void listview_set_max_lines | ( | listview * | lv, |
| unsigned int | max_lines ) |
| lv | Handler to the listview object. |
| max_lines | the maximum number of lines to display. |
Set the maximum number of lines to display.
Definition at line 1161 of file listview.c.
References listview_set_max_lines(), and _listview::max_displayed_lines.
Referenced by _rofi_view_reload_row(), listview_set_cycle(), listview_set_max_lines(), and rofi_view_add_widget().


| void listview_set_mouse_activated_cb | ( | listview * | lv, |
| listview_mouse_activated_cb | cb, | ||
| void * | udata ) |
| lv | Handler to the listview object |
| cb | The callback |
| udata | User data |
Set the mouse activated callback.
Definition at line 1152 of file listview.c.
References listview_set_mouse_activated_cb(), _listview::mouse_activated, and _listview::mouse_activated_data.
Referenced by listview_set_cycle(), listview_set_mouse_activated_cb(), and rofi_view_add_widget().


| void listview_set_num_elements | ( | listview * | lv, |
| unsigned int | rows ) |
| lv | The listview handle |
| rows | Number of elements |
Set the maximum number of elements to display.
Definition at line 614 of file listview.c.
References _listview::filtered, listview_recompute_elements(), listview_set_num_elements(), listview_set_selected(), _listview::req_elements, _listview::require_input, _listview::selected, TICK_N, WIDGET, and widget_queue_redraw().
Referenced by listview_set_num_elements(), and rofi_view_refilter_real().


| void listview_set_scroll_type | ( | listview * | lv, |
| ScrollType | type ) |
| lv | Handler to the listview object |
| type | ScrollType |
Set the scroll type ScrollType::LISTVIEW_SCROLL_CONTINIOUS or ScrollType::LISTVIEW_SCROLL_PER_PAGE
Definition at line 1146 of file listview.c.
References listview_set_scroll_type(), and _listview::scroll_type.
Referenced by listview_set_cycle(), listview_set_scroll_type(), and rofi_view_add_widget().


| void listview_set_scrollbar_width | ( | listview * | lv, |
| unsigned int | width ) |
| lv | Handler to the listview object |
| width | Width in pixels |
Set the width of the scrollbar
References listview_set_scrollbar_width().
Referenced by listview_set_scrollbar_width().


| void listview_set_selected | ( | listview * | lv, |
| unsigned int | selected ) |
| lv | The listview handle |
| selected | The row index to select |
Select the row, if selected > the number of rows, it selects the last one.
Definition at line 651 of file listview.c.
References _listview::barview, LEFT_TO_RIGHT, listview_set_selected(), _listview::req_elements, _listview::sc_callback, _listview::sc_udata, _listview::selected, WIDGET, and widget_queue_redraw().
Referenced by listview_element_motion_notify(), listview_element_trigger_action(), listview_set_num_elements(), listview_set_selected(), rofi_view_nav_first(), rofi_view_nav_last(), rofi_view_set_selected_line(), and scrollbar_scroll().


| void listview_set_selection_changed_callback | ( | listview * | lv, |
| listview_selection_changed_callback | cb, | ||
| void * | udata ) |
Set the selection changed callback.
Definition at line 1211 of file listview.c.
References listview_set_selection_changed_callback(), _listview::sc_callback, and _listview::sc_udata.
Referenced by listview_set_selection_changed_callback(), and rofi_view_add_widget().


| void listview_set_show_scrollbar | ( | listview * | lv, |
| gboolean | enabled ) |
| lv | Handler to the listview object |
| enabled | enable |
Hide the scrollbar.
Definition at line 1135 of file listview.c.
References listview_recompute_elements(), listview_set_show_scrollbar(), _listview::scrollbar, WIDGET, widget_disable(), and widget_enable().
Referenced by listview_create(), and listview_set_show_scrollbar().


| void listview_toggle_ellipsizing | ( | listview * | lv | ) |
| lv | Handler to the listview object. |
Set ellipsize mode.
Definition at line 1188 of file listview.c.
References _listview::boxes, _listview::cur_elements, _listview::emode, listview_toggle_ellipsizing(), _listview_row::textbox, and textbox_set_ellipsize().
Referenced by listview_set_cycle(), listview_toggle_ellipsizing(), and rofi_view_trigger_global_action().

