rofi 1.7.5
|
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 *) |
Enumerations | |
enum | ScrollType { LISTVIEW_SCROLL_PER_PAGE , LISTVIEW_SCROLL_CONTINIOUS } |
Handle to the listview. No internal fields should be accessed directly.
Definition at line 44 of file listview.h.
typedef void(* listview_mouse_activated_cb) (listview *, gboolean, void *) |
Callback when a element is activated.
Definition at line 84 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 78 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 67 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 49 of file listview.h.
listview * listview_create | ( | widget * | parent, |
const char * | name, | ||
listview_update_callback | 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. |
udata | The user data to pass to the callback |
eh | The height of one element |
reverse | Reverse the listview order. |
Definition at line 711 of file listview.c.
References _listview_draw(), _listview_row::box, _listview::callback, config, _listview::cycle, Settings::cycle, DEFAULT_MENU_COLUMNS, 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_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::pack_direction, _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 rofi_view_add_widget().
gboolean listview_get_fixed_num_lines | ( | listview * | lv | ) |
lv | Handler to the listview object. |
Get the fixed-height property.
Definition at line 1067 of file listview.c.
References _listview::fixed_num_lines.
unsigned int listview_get_selected | ( | listview * | lv | ) |
lv | The listview handle |
Returns the selected row.
Definition at line 578 of file listview.c.
References _listview::selected.
Referenced by listview_element_motion_notify(), 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 857 of file listview.c.
References listview_nav_column_left_int(), listview_nav_column_right_int(), listview_nav_down_int(), listview_nav_up_int(), _listview::pack_direction, _listview::reverse, and ROFI_ORIENTATION_HORIZONTAL.
Referenced by 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 876 of file listview.c.
References BARVIEW, 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_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 811 of file listview.c.
References listview_nav_down_int().
Referenced by 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 989 of file listview.c.
References listview_nav_page_next_int(), listview_nav_page_prev_int(), and _listview::reverse.
Referenced by 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 979 of file listview.c.
References listview_nav_page_next_int(), listview_nav_page_prev_int(), and _listview::reverse.
Referenced by rofi_view_trigger_global_action().
void listview_nav_prev | ( | listview * | lv | ) |
lv | The listview handle |
Move the selection previous element.
Definition at line 817 of file listview.c.
References listview_nav_up_int().
Referenced by 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 897 of file listview.c.
References BARVIEW, listview_nav_down_int(), _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_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 839 of file listview.c.
References listview_nav_column_left_int(), listview_nav_column_right_int(), listview_nav_down_int(), listview_nav_up_int(), _listview::pack_direction, _listview::reverse, and ROFI_ORIENTATION_HORIZONTAL.
Referenced by 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.
void listview_set_ellipsize_start | ( | listview * | lv | ) |
lv | Handler to the listview object. |
Set ellipsize mode to start.
Definition at line 1079 of file listview.c.
References _listview::boxes, _listview::cur_elements, _listview::emode, _listview_row::textbox, and textbox_set_ellipsize().
Referenced by rofi_view_ellipsize_start().
void listview_set_filtered | ( | listview * | lv, |
gboolean | filtered ) |
lv | Handler to the listview object. |
filtered | boolean indicating if list is filtered. |
Definition at line 1105 of file listview.c.
References _listview::filtered.
Referenced by 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 1073 of file listview.c.
References _listview::fixed_num_lines.
Referenced by 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 1061 of file listview.c.
References _listview::max_displayed_lines.
Referenced by _rofi_view_reload_row(), 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 1047 of file listview.c.
References _listview::mouse_activated, and _listview::mouse_activated_data.
Referenced by 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 561 of file listview.c.
References _listview::filtered, listview_recompute_elements(), listview_set_selected(), _listview::req_elements, _listview::require_input, _listview::selected, TICK_N, WIDGET, and widget_queue_redraw().
Referenced by rofi_view_refilter_real().
void listview_set_num_lines | ( | listview * | lv, |
unsigned int | num_lines ) |
lv | Handler to the listview object. |
num_lines | the maximum number of lines to display. |
Set the maximum number of lines to display.
Definition at line 1055 of file listview.c.
References _listview::menu_lines.
Referenced by rofi_view_add_widget().
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 1041 of file listview.c.
References _listview::scroll_type.
Referenced by 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
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 585 of file listview.c.
References _listview::barview, _listview::direction, LEFT_TO_RIGHT, _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(), 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 1111 of file listview.c.
References _listview::sc_callback, and _listview::sc_udata.
Referenced by 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 1030 of file listview.c.
References listview_recompute_elements(), _listview::scrollbar, WIDGET, widget_disable(), and widget_enable().
Referenced by listview_create().
void listview_toggle_ellipsizing | ( | listview * | lv | ) |
lv | Handler to the listview object. |
Set ellipsize mode.
Definition at line 1088 of file listview.c.
References _listview::boxes, _listview::cur_elements, _listview::emode, _listview_row::textbox, and textbox_set_ellipsize().
Referenced by rofi_view_trigger_global_action().