rofi
1.7.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 "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.
#define DEFAULT_SPACING 2 |
Default spacing between the elements in the listview.
Definition at line 43 of file listview.c.
#define LISTVIEW ROFI_ORIENTATION_VERTICAL |
Orientation of the listview Vertical (classical) list
Definition at line 49 of file listview.c.
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 472 of file listview.c.
References barview_draw(), LISTVIEW, listview_draw(), and _listview::type.
Referenced by listview_create().
|
static |
Definition at line 300 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 160 of file listview.c.
References box_add(), box_create(), flags, _listview_row::icon, icon_create(), _listview_row::index, _listview::multi_select, NORMAL, ROFI_ORIENTATION_VERTICAL, rofi_theme_get_list(), TB_AUTOHEIGHT, TB_INDICATOR, _listview_row::textbox, textbox_create(), WIDGET, and WIDGET_TYPE_TEXTBOX_TEXT.
Referenced by listview_create_row().
|
static |
Definition at line 187 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(), 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 378 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::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 646 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 618 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 570 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 211 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 |
Definition at line 880 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().
Referenced by listview_create().
|
static |
Definition at line 737 of file listview.c.
References _listview::barview, _listview::cycle, _listview::direction, LEFT_TO_RIGHT, _listview::req_elements, _listview::selected, WIDGET, and widget_queue_redraw().
Referenced by listview_nav_down(), listview_nav_right(), and listview_nav_up().
|
static |
Definition at line 837 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::selected, _listview::type, WIDGET, and widget_queue_redraw().
Referenced by listview_nav_page_next(), and listview_nav_page_prev().
|
static |
Definition at line 815 of file listview.c.
References BARVIEW, _listview::barview, _listview::direction, _listview::last_offset, _listview::max_elements, RIGHT_TO_LEFT, _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 723 of file listview.c.
References _listview::barview, _listview::cycle, _listview::direction, _listview::req_elements, RIGHT_TO_LEFT, _listview::selected, WIDGET, and widget_queue_redraw().
Referenced by listview_nav_down(), listview_nav_left(), and listview_nav_up().
|
static |
State names used for theming.
Definition at line 483 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::rchanged, _listview::req_elements, 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 545 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 138 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 597 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 259 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 236 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 222 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 279 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 129 of file listview.c.
Referenced by listview_set_state().