rofi 1.7.5
listview.h
Go to the documentation of this file.
1/*
2 * rofi
3 *
4 * MIT/X11 License
5 * Copyright © 2013-2017 Qball Cow <qball@gmpclient.org>
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining
8 * a copy of this software and associated documentation files (the
9 * "Software"), to deal in the Software without restriction, including
10 * without limitation the rights to use, copy, modify, merge, publish,
11 * distribute, sublicense, and/or sell copies of the Software, and to
12 * permit persons to whom the Software is furnished to do so, subject to
13 * the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be
16 * included in all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *
26 */
27
28#ifndef ROFI_LISTVIEW_H
29#define ROFI_LISTVIEW_H
30
31#include "widgets/textbox.h"
32
44typedef struct _listview listview;
45
55
67typedef void (*listview_update_callback)(textbox *tb, icon *ico,
68 unsigned int entry, void *udata,
69 TextBoxFontType *type, gboolean full);
70
79 unsigned int index,
80 void *udata);
84typedef void (*listview_mouse_activated_cb)(listview *, gboolean, void *);
85
96listview *listview_create(widget *parent, const char *name,
98 unsigned int eh, gboolean reverse);
99
105
112void listview_set_num_elements(listview *lv, unsigned int rows);
113
120void listview_set_selected(listview *lv, unsigned int selected);
121
129unsigned int listview_get_selected(listview *lv);
130
145
152void listview_nav_up(listview *lv);
183
192
199void listview_set_show_scrollbar(listview *lv, gboolean enabled);
206void listview_set_scrollbar_width(listview *lv, unsigned int width);
207
223
233 void *udata);
240void listview_set_num_lines(listview *lv, unsigned int num_lines);
241
250
257
264void listview_set_max_lines(listview *lv, unsigned int max_lines);
265
272
280
286void listview_set_filtered(listview *lv, gboolean filtered);
289#endif // ROFI_LISTVIEW_H
TextBoxFontType
Definition textbox.h:100
void listview_nav_page_next(listview *lv)
Definition listview.c:989
void listview_set_fixed_num_lines(listview *lv)
Definition listview.c:1073
void listview_set_cycle(listview *lv, gboolean cycle)
void listview_set_num_lines(listview *lv, unsigned int num_lines)
Definition listview.c:1055
void listview_set_show_scrollbar(listview *lv, gboolean enabled)
Definition listview.c:1030
void listview_set_num_elements(listview *lv, unsigned int rows)
Definition listview.c:561
void listview_nav_right(listview *lv)
Definition listview.c:897
void listview_set_mouse_activated_cb(listview *lv, listview_mouse_activated_cb cb, void *udata)
Definition listview.c:1047
void listview_toggle_ellipsizing(listview *lv)
Definition listview.c:1088
void listview_set_selected(listview *lv, unsigned int selected)
Definition listview.c:585
void listview_set_max_lines(listview *lv, unsigned int max_lines)
Definition listview.c:1061
listview * listview_create(widget *parent, const char *name, listview_update_callback cb, void *udata, unsigned int eh, gboolean reverse)
Definition listview.c:711
void listview_nav_left(listview *lv)
Definition listview.c:876
void listview_set_scroll_type(listview *lv, ScrollType type)
Definition listview.c:1041
void(* listview_selection_changed_callback)(listview *lv, unsigned int index, void *udata)
Definition listview.h:78
gboolean listview_get_fixed_num_lines(listview *lv)
Definition listview.c:1067
void listview_set_ellipsize_start(listview *lv)
Definition listview.c:1079
void listview_nav_prev(listview *lv)
Definition listview.c:817
unsigned int listview_get_selected(listview *lv)
Definition listview.c:578
ScrollType
Definition listview.h:49
void listview_set_scrollbar_width(listview *lv, unsigned int width)
void(* listview_mouse_activated_cb)(listview *, gboolean, void *)
Definition listview.h:84
void(* listview_update_callback)(textbox *tb, icon *ico, unsigned int entry, void *udata, TextBoxFontType *type, gboolean full)
Definition listview.h:67
void listview_set_filtered(listview *lv, gboolean filtered)
Definition listview.c:1105
void listview_nav_up(listview *lv)
Definition listview.c:839
void listview_nav_next(listview *lv)
Definition listview.c:811
void listview_nav_page_prev(listview *lv)
Definition listview.c:979
void listview_set_selection_changed_callback(listview *lv, listview_selection_changed_callback cb, void *udata)
Definition listview.c:1111
void listview_nav_down(listview *lv)
Definition listview.c:857
@ LISTVIEW_SCROLL_PER_PAGE
Definition listview.h:51
@ LISTVIEW_SCROLL_CONTINIOUS
Definition listview.h:53
Definition icon.c:39
gboolean cycle
Definition listview.c:104
void * udata
Definition listview.c:112
gboolean filtered
Definition listview.c:102
unsigned int reverse
Definition listview.c:100
RofiOrientation type
Definition listview.c:69
unsigned int selected
Definition listview.c:81
unsigned int eh
Definition listview.c:99