rofi  1.7.0
view-internal.h
Go to the documentation of this file.
1 /*
2  * rofi
3  *
4  * MIT/X11 License
5  * Copyright © 2013-2021 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_VIEW_INTERNAL_H
29 #define ROFI_VIEW_INTERNAL_H
30 #include "keyb.h"
31 #include "mode.h"
32 #include "theme.h"
33 #include "widgets/box.h"
34 #include "widgets/container.h"
35 #include "widgets/icon.h"
36 #include "widgets/listview.h"
37 #include "widgets/textbox.h"
38 #include "widgets/widget.h"
39 #include "xcb.h"
40 
46 // State of the menu.
47 
48 struct RofiViewState {
50  Mode *sw;
51 
53  int refilter;
62 
71 
73  int *distance;
75  unsigned int *line_map;
77  unsigned int num_lines;
78 
80  unsigned int filtered_lines;
81 
85  xcb_timestamp_t last_button_press;
86 
88  int quit;
92  unsigned int selected_line;
97 
101  unsigned int num_modi;
104 
109 
115  int reload;
117  void (*finalize)(struct RofiViewState *state);
118 
120  int width;
122  int height;
124  int x;
126  int y;
127 
129  struct {
131  int x;
133  int y;
136  } mouse;
137 
140 };
142 #endif
KeyBindingAction
Definition: keyb.h:58
MenuReturn
Definition: mode.h:65
MenuFlags
Definition: view.h:48
unsigned int filtered_lines
Definition: view-internal.h:80
container * mesg_box
Definition: view-internal.h:68
textbox * text
Definition: view-internal.h:59
widget * motion_target
textbox * mesg_tb
Definition: view-internal.h:70
textbox * overlay
Definition: view-internal.h:66
struct RofiViewState::@7 mouse
listview * list_view
Definition: view-internal.h:64
textbox ** modi
unsigned int num_lines
Definition: view-internal.h:77
MenuReturn retv
Definition: view-internal.h:94
void(* finalize)(struct RofiViewState *state)
xcb_timestamp_t last_button_press
Definition: view-internal.h:85
textbox * prompt
Definition: view-internal.h:57
unsigned int num_modi
unsigned int * line_map
Definition: view-internal.h:75
textbox * tb_filtered_rows
rofi_int_matcher ** tokens
workarea mon
Definition: view-internal.h:96
textbox * tb_total_rows
unsigned int selected_line
Definition: view-internal.h:92
KeyBindingAction prev_action
Definition: view-internal.h:83
textbox * case_indicator
Definition: view-internal.h:61
MenuFlags menu_flags
Definition: box.c:40
Definition: xcb.h:94