rofi 1.7.5
|
#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 "settings.h"
#include "theme.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 51 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 43 of file listview.c.
Referenced by listview_create().
#define LISTVIEW ROFI_ORIENTATION_VERTICAL |
Orientation of the listview Vertical (classical) list
Definition at line 49 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 57 of file listview.c.
|
static |
Definition at line 510 of file listview.c.
References barview_draw(), LISTVIEW, listview_draw(), and _listview::type.
Referenced by listview_create().
|
static |
Definition at line 313 of file listview.c.
References _listview::barview, _listview_row::box, _listview::boxes, _listview::cur_elements, _listview::cur_visible, _listview::direction, 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().
|
static |
Definition at line 168 of file listview.c.
References box_add(), box_create(), flags, _listview_row::icon, icon_create(), _listview_row::index, listview_add_widget(), NORMAL, ROFI_ORIENTATION_VERTICAL, rofi_theme_get_list_strings(), TB_AUTOHEIGHT, _listview_row::textbox, textbox_create(), WIDGET, and WIDGET_TYPE_TEXTBOX_TEXT.
Referenced by listview_add_widget(), and listview_create_row().
|
static |
Definition at line 197 of file listview.c.
References _listview_row::box, box_create(), config, _listview_row::icon, _listview_row::index, listview_add_widget(), 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(), and listview_recompute_elements().
|
static |
Definition at line 393 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_SCROLL_CONTINIOUS, _listview::max_rows, _listview::pack_direction, _listview::rchanged, _listview::req_elements, _listview::reverse, ROFI_ORIENTATION_HORIZONTAL, ROFI_ORIENTATION_VERTICAL, scroll_continious(), 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().
|
static |
Definition at line 697 of file listview.c.
References _listview_row::box, _listview::boxes, _listview::cur_elements, _listview::last_offset, listview_get_selected(), listview_set_selected(), _widget::parent, _listview::req_elements, and WIDGET.
|
static |
|
static |
Definition at line 669 of file listview.c.
References ACCEPT_HOVERED_CUSTOM, ACCEPT_HOVERED_ENTRY, _listview_row::box, _listview::boxes, _listview::cur_elements, _listview::last_offset, listview_set_selected(), _listview::mouse_activated, _listview::mouse_activated_data, _listview::req_elements, SELECT_HOVERED_ENTRY, WIDGET, WIDGET_TRIGGER_ACTION_RESULT_HANDLED, and WIDGET_TRIGGER_ACTION_RESULT_IGNORED.
|
static |
|
static |
Definition at line 621 of file listview.c.
References _listview_row::box, _listview::boxes, _listview::cur_elements, _listview::last_offset, _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().
|
static |
Definition at line 224 of file listview.c.
References _listview_row::box, _listview::boxes, _listview::cur_elements, _listview::listview_name, _listview::scrollbar, WIDGET, and widget_free().
Referenced by listview_create().
|
static |
|
static |
Definition at line 1000 of file listview.c.
References BARVIEW, distance_get_pixel(), _listview::dynamic, _listview::element_height, _widget::enabled, _listview::fixed_num_lines, _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 824 of file listview.c.
References _listview::cur_columns, _listview::sc_callback, _listview::sc_udata, _listview::selected, WIDGET, and widget_queue_redraw().
Referenced by listview_nav_down(), and listview_nav_up().
|
static |
Definition at line 831 of file listview.c.
References _listview::cur_columns, _listview::req_elements, _listview::sc_callback, _listview::sc_udata, _listview::selected, WIDGET, and widget_queue_redraw().
Referenced by listview_nav_down(), and listview_nav_up().
|
static |
Definition at line 796 of file listview.c.
References _listview::barview, _listview::cycle, _listview::direction, LEFT_TO_RIGHT, _listview::req_elements, _listview::sc_callback, _listview::sc_udata, _listview::selected, WIDGET, and widget_queue_redraw().
Referenced by listview_nav_down(), listview_nav_next(), listview_nav_right(), and listview_nav_up().
|
static |
Definition at line 955 of file listview.c.
References BARVIEW, _listview::barview, _listview::cur_visible, _listview::direction, _listview::last_offset, LEFT_TO_RIGHT, _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(), and listview_nav_page_prev().
|
static |
Definition at line 932 of file listview.c.
References BARVIEW, _listview::barview, _listview::direction, _listview::last_offset, _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(), and listview_nav_page_prev().
|
static |
Navigation commands.
Definition at line 780 of file listview.c.
References _listview::barview, _listview::cycle, _listview::direction, _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(), and listview_nav_up().
|
static |
State names used for theming.
Definition at line 521 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_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_resize(), listview_set_num_elements(), and listview_set_show_scrollbar().
|
static |
Definition at line 596 of file listview.c.
References BARVIEW, distance_get_pixel(), _listview::element_height, _widget::h, listview_recompute_elements(), _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().
|
static |
Definition at line 146 of file listview.c.
References ACTIVE, ALT, _listview_row::box, FMOD_MASK, HIGHLIGHT, listview_theme_prop_names, STATE_MASK, URGENT, WIDGET, and widget_set_state().
Referenced by listview_recompute_elements(), and update_element().
|
static |
Definition at line 648 of file listview.c.
References listview_nav_down(), listview_nav_left(), listview_nav_right(), listview_nav_up(), SCROLL_DOWN, SCROLL_LEFT, SCROLL_RIGHT, SCROLL_UP, and WIDGET_TRIGGER_ACTION_RESULT_HANDLED.
Referenced by listview_create().
|
static |
Definition at line 272 of file listview.c.
References _listview::cur_page, _listview::max_rows, _listview::rchanged, _listview::req_elements, and _listview::selected.
Referenced by listview_draw().
|
static |
Definition at line 249 of file listview.c.
References _listview::cur_page, _listview::last_offset, _listview::max_elements, _listview::rchanged, and _listview::selected.
Referenced by listview_draw().
|
static |
Definition at line 235 of file listview.c.
References _listview::barview, _listview::cur_visible, _listview::last_offset, _listview::rchanged, and _listview::selected.
Referenced by barview_draw().
|
static |
Definition at line 292 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(), and _listview::udata.
Referenced by barview_draw(), and listview_draw().
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 137 of file listview.c.
Referenced by listview_set_state().