|
rofi 2.1.0
|
#include "config.h"#include <glib.h>#include <widgets/box.h>#include <widgets/icon.h>#include <widgets/listview.h>#include <widgets/scrollbar.h>#include <widgets/textbox.h>#include <widgets/widget.h>#include "helper.h"#include "settings.h"#include "theme.h"#include "view.h"#include "timings.h"
Go to the source code of this file.
Data Structures | |
| struct | _listview_row |
| struct | _listview |
Macros | |
| #define | DEFAULT_SPACING 2 |
| #define | LISTVIEW ROFI_ORIENTATION_VERTICAL |
| #define | BARVIEW ROFI_ORIENTATION_HORIZONTAL |
Enumerations | |
| enum | MoveDirection { LEFT_TO_RIGHT = 0 , RIGHT_TO_LEFT = 1 } |
Variables | |
| const char *const | listview_theme_prop_names [][3] |
| #define BARVIEW ROFI_ORIENTATION_HORIZONTAL |
Horizontal list. (barview)
Definition at line 53 of file listview.c.
Referenced by listview_get_desired_height(), listview_nav_left(), listview_nav_page_next_int(), listview_nav_page_prev_int(), listview_nav_right(), and listview_resize().
| #define DEFAULT_SPACING 2 |
Default spacing between the elements in the listview.
Definition at line 45 of file listview.c.
| #define LISTVIEW ROFI_ORIENTATION_VERTICAL |
Orientation of the listview Vertical (classical) list
Definition at line 51 of file listview.c.
Referenced by _listview_draw(), and listview_create().
| enum MoveDirection |
The moving direction of the selection, this (in barview) affects the scrolling.
| Enumerator | |
|---|---|
| LEFT_TO_RIGHT | |
| RIGHT_TO_LEFT | |
Definition at line 59 of file listview.c.
|
static |
Definition at line 563 of file listview.c.
References _listview_draw(), barview_draw(), LISTVIEW, listview_draw(), and _listview::type.
Referenced by _listview_draw(), and listview_create().


|
static |
Definition at line 372 of file listview.c.
References _listview::barview, barview_draw(), _listview_row::box, _listview::boxes, _listview::cur_elements, distance_get_pixel(), _listview::element_height, _listview::last_offset, LEFT_TO_RIGHT, _listview::rchanged, _listview::req_elements, ROFI_ORIENTATION_HORIZONTAL, scroll_per_page_barview(), _listview::spacing, update_element(), _widget::w, WIDGET, _listview::widget, widget_draw(), widget_get_desired_width(), widget_move(), widget_padding_get_left(), widget_padding_get_padding_width(), widget_padding_get_right(), widget_padding_get_top(), and widget_resize().
Referenced by _listview_draw(), and barview_draw().


|
static |
Definition at line 172 of file listview.c.
References box_add(), box_create(), _listview::emode, _listview_row::icon, icon_create(), _listview_row::index, listview_add_widget(), NORMAL, ROFI_ORIENTATION_VERTICAL, rofi_theme_get_list_strings(), rofi_theme_get_string(), TB_AUTOHEIGHT, TB_WRAP, _listview_row::textbox, textbox_button_trigger_action(), textbox_create(), textbox_set_ellipsize(), _listview::udata, WIDGET, widget_set_trigger_action_handler(), WIDGET_TYPE_EDITBOX, and WIDGET_TYPE_TEXTBOX_TEXT.
Referenced by listview_add_widget(), and listview_create_row().


|
static |
Definition at line 224 of file listview.c.
References _listview_row::box, box_create(), config, _listview_row::icon, _listview_row::index, listview_add_widget(), listview_create_row(), ROFI_ORIENTATION_HORIZONTAL, rofi_theme_get_list_strings(), Settings::show_icons, _listview_row::textbox, WIDGET, widget_set_type(), and WIDGET_TYPE_LISTVIEW_ELEMENT.
Referenced by listview_create(), listview_create_row(), and listview_recompute_elements().


|
static |
Definition at line 452 of file listview.c.
References _listview_row::box, _listview::boxes, _listview::cur_columns, _listview::cur_elements, distance_get_pixel(), _listview::element_height, _widget::h, _listview::last_offset, listview_draw(), LISTVIEW_SCROLL_PER_PAGE, _listview::max_rows, _listview::pack_direction, _listview::rchanged, _listview::req_elements, _listview::reverse, ROFI_ORIENTATION_HORIZONTAL, ROFI_ORIENTATION_VERTICAL, scroll_continious_elements(), scroll_continious_rows(), scroll_per_page(), _listview::scroll_type, _listview::scrollbar, scrollbar_set_handle(), scrollbar_set_handle_length(), scrollbar_set_max_value(), _listview::selected, _listview::spacing, update_element(), _widget::w, WIDGET, _listview::widget, widget_draw(), widget_enabled(), widget_get_width(), widget_move(), widget_padding_get_bottom(), widget_padding_get_left(), widget_padding_get_padding_width(), widget_padding_get_top(), and widget_resize().
Referenced by _listview_draw(), and listview_draw().


|
static |
Definition at line 775 of file listview.c.
References _listview_row::box, _listview::boxes, _listview::cur_elements, _listview::last_offset, listview_element_motion_notify(), listview_get_selected(), listview_set_selected(), _widget::parent, _listview::req_elements, and WIDGET.

|
static |
References listview_element_motion_notify().
Referenced by listview_element_motion_notify(), listview_element_motion_notify(), and listview_recompute_elements().


|
static |
Definition at line 747 of file listview.c.
References ACCEPT_HOVERED_CUSTOM, ACCEPT_HOVERED_ENTRY, _listview_row::box, _listview::boxes, _listview::cur_elements, _listview::last_offset, listview_element_trigger_action(), listview_set_selected(), _listview::mouse_activated, _listview::mouse_activated_data, _listview::req_elements, rofi_fallthrough, SELECT_HOVERED_ENTRY, WIDGET, WIDGET_TRIGGER_ACTION_RESULT_HANDLED, and WIDGET_TRIGGER_ACTION_RESULT_IGNORED.

|
static |
References listview_element_trigger_action().
Referenced by listview_element_trigger_action(), listview_element_trigger_action(), and listview_recompute_elements().


|
static |
Definition at line 699 of file listview.c.
References _listview_row::box, _listview::boxes, _listview::cur_elements, _listview::last_offset, listview_find_mouse_target(), _listview::req_elements, _listview::scrollbar, WIDGET, widget_enabled(), widget_find_mouse_target(), widget_get_x_pos(), widget_get_y_pos(), and widget_intersect().
Referenced by listview_create(), and listview_find_mouse_target().


|
static |
Definition at line 251 of file listview.c.
References _listview_row::box, _listview::boxes, _listview::cur_elements, listview_free(), _listview::listview_name, _listview::scrollbar, WIDGET, and widget_free().
Referenced by listview_create(), and listview_free().


|
static |
References listview_get_desired_height().
Referenced by listview_create(), listview_get_desired_height(), and listview_get_desired_height().


|
static |
Definition at line 1105 of file listview.c.
References BARVIEW, distance_get_pixel(), _listview::dynamic, _listview::element_height, _widget::enabled, _listview::fixed_num_lines, listview_get_desired_height(), _listview::max_displayed_lines, _listview::menu_lines, _listview::req_elements, ROFI_ORIENTATION_VERTICAL, _listview::spacing, _listview::type, WIDGET, _listview::widget, and widget_padding_get_padding_height().

|
static |
Definition at line 913 of file listview.c.
References _listview::cur_columns, listview_nav_column_left_int(), _listview::sc_callback, _listview::sc_udata, _listview::selected, WIDGET, and widget_queue_redraw().
Referenced by listview_nav_column_left_int(), listview_nav_down(), and listview_nav_up().


|
static |
Definition at line 922 of file listview.c.
References _listview::cur_columns, listview_nav_column_right_int(), _listview::req_elements, _listview::sc_callback, _listview::sc_udata, _listview::selected, WIDGET, and widget_queue_redraw().
Referenced by listview_nav_column_right_int(), listview_nav_down(), and listview_nav_up().


|
static |
Definition at line 883 of file listview.c.
References _listview::barview, _listview::cycle, LEFT_TO_RIGHT, listview_nav_down_int(), _listview::req_elements, _listview::sc_callback, _listview::sc_udata, _listview::selected, WIDGET, and widget_queue_redraw().
Referenced by listview_nav_down(), listview_nav_down_int(), listview_nav_next(), listview_nav_right(), and listview_nav_up().


|
static |
Definition at line 1056 of file listview.c.
References BARVIEW, _listview::barview, _listview::last_offset, LEFT_TO_RIGHT, listview_nav_page_next_int(), _listview::max_elements, _listview::req_elements, _listview::sc_callback, _listview::sc_udata, _listview::selected, _listview::type, WIDGET, and widget_queue_redraw().
Referenced by listview_nav_page_next(), listview_nav_page_next_int(), and listview_nav_page_prev().


|
static |
Definition at line 1031 of file listview.c.
References BARVIEW, _listview::barview, _listview::last_offset, listview_nav_page_prev_int(), _listview::max_elements, RIGHT_TO_LEFT, _listview::sc_callback, _listview::sc_udata, _listview::selected, _listview::type, WIDGET, and widget_queue_redraw().
Referenced by listview_nav_page_next(), listview_nav_page_prev(), and listview_nav_page_prev_int().


|
static |
Navigation commands.
Definition at line 865 of file listview.c.
References _listview::barview, _listview::cycle, listview_nav_up_int(), _listview::req_elements, RIGHT_TO_LEFT, _listview::sc_callback, _listview::sc_udata, _listview::selected, WIDGET, and widget_queue_redraw().
Referenced by listview_nav_down(), listview_nav_left(), listview_nav_prev(), listview_nav_up(), and listview_nav_up_int().


|
static |
State names used for theming.
Definition at line 574 of file listview.c.
References _listview_row::box, _listview::boxes, _listview::cur_columns, _listview::cur_elements, _listview::fixed_columns, listview_create_row(), listview_element_motion_notify(), listview_element_trigger_action(), listview_recompute_elements(), listview_set_state(), _listview::max_elements, _listview::max_rows, _listview::menu_columns, _widget::motion_notify, NORMAL, _listview::pack_direction, _listview::rchanged, _listview::req_elements, ROFI_ORIENTATION_VERTICAL, WIDGET, widget_free(), and widget_set_trigger_action_handler().
Referenced by listview_recompute_elements(), listview_resize(), listview_set_num_elements(), and listview_set_show_scrollbar().


|
static |
Definition at line 669 of file listview.c.
References BARVIEW, distance_get_pixel(), _listview::element_height, _widget::h, listview_recompute_elements(), listview_resize(), _listview::max_elements, _listview::max_rows, _listview::menu_columns, _listview::menu_lines, ROFI_ORIENTATION_VERTICAL, _listview::scrollbar, _listview::spacing, _listview::type, _widget::w, WIDGET, _listview::widget, widget_get_width(), widget_move(), widget_padding_get_padding_height(), widget_padding_get_right(), widget_padding_get_top(), widget_queue_redraw(), and widget_resize().
Referenced by listview_create(), and listview_resize().


|
static |
Definition at line 150 of file listview.c.
References ACTIVE, ALT, _listview_row::box, FMOD_MASK, HIGHLIGHT, listview_set_state(), listview_theme_prop_names, STATE_MASK, URGENT, WIDGET, and widget_set_state().
Referenced by listview_recompute_elements(), listview_set_state(), and update_element().


|
static |
Definition at line 726 of file listview.c.
References listview_nav_down(), listview_nav_left(), listview_nav_right(), listview_nav_up(), listview_trigger_action(), SCROLL_DOWN, SCROLL_LEFT, SCROLL_RIGHT, SCROLL_UP, and WIDGET_TRIGGER_ACTION_RESULT_HANDLED.
Referenced by listview_create(), and listview_trigger_action().


|
static |
Definition at line 304 of file listview.c.
References _listview::cur_page, _listview::max_elements, _listview::max_rows, _listview::menu_columns, _listview::rchanged, _listview::req_elements, scroll_continious_elements(), and _listview::selected.
Referenced by listview_draw(), and scroll_continious_elements().


|
static |
Definition at line 327 of file listview.c.
References _listview::cur_page, _listview::max_rows, _listview::menu_columns, _listview::rchanged, _listview::req_elements, scroll_continious_rows(), and _listview::selected.
Referenced by listview_draw(), and scroll_continious_rows().


|
static |
Definition at line 276 of file listview.c.
References _listview::cur_page, _listview::last_offset, _listview::max_elements, _listview::page_callback, _listview::rchanged, scroll_per_page(), and _listview::selected.
Referenced by listview_draw(), and scroll_per_page().


|
static |
Definition at line 262 of file listview.c.
References _listview::barview, _listview::last_offset, _listview::rchanged, scroll_per_page_barview(), and _listview::selected.
Referenced by barview_draw(), and scroll_per_page_barview().


|
static |
Definition at line 351 of file listview.c.
References ALT, _listview::boxes, _listview::callback, HIGHLIGHT, _listview_row::icon, _listview_row::index, listview_set_state(), NORMAL, _listview::selected, _listview_row::textbox, textbox_text(), _listview::udata, and update_element().
Referenced by barview_draw(), listview_draw(), and update_element().


| const char* const listview_theme_prop_names[][3] |
Names used for theming the elements in the listview. Each row can have 3 modes, normal, selected and alternate. Each row can have 3 states, normal, urgent and active.
Definition at line 141 of file listview.c.
Referenced by listview_set_state().