rofi 2.0.0
view-internal.h
Go to the documentation of this file.
1/*
2 * rofi
3 *
4 * MIT/X11 License
5 * Copyright © 2013-2023 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 "display.h"
31#include "keyb.h"
32#include "mode.h"
33#include "theme.h"
34#include "view.h"
35#include "widgets/box.h"
36#include "widgets/container.h"
37#include "widgets/icon.h"
38#include "widgets/listview.h"
39#include "widgets/textbox.h"
40#include "widgets/widget.h"
41
42#ifdef ENABLE_XCB
43#include "xcb.h"
44#else
45#include "xcb-dummy.h"
46#endif
47
48#ifdef ENABLE_WAYLAND
49#include "wayland.h"
50#endif
51
57// State of the menu.
58
167
168
169typedef struct _view_proxy {
170 void (*update)(struct RofiViewState *state, gboolean qr);
173 void (*temp_click_to_exit)(struct RofiViewState *state, xcb_window_t target);
174 void (*frame_callback)(void);
175
176 void (*queue_redraw)(void);
177
178 void (*set_window_title)(const char *title);
180 void (*calculate_window_width)(struct RofiViewState *state);
182 void (*window_update_size)(struct RofiViewState *state);
184 void (*ping_mouse)(struct RofiViewState *state);
185
186 void (*cleanup)(void);
187 void (*hide)(void);
188 void (*reload)(void);
189 void (*__create_window)(MenuFlags menu_flags);
191
192 void (*get_current_monitor)(int *width, int *height);
193
194 void (*set_size)(struct RofiViewState *state, gint width, gint height);
195 void (*get_size)(struct RofiViewState *state, gint *width, gint *height);
196
197 void (*pool_refresh)(void);
199
200typedef struct {
201 char *string;
202 int index;
204
239
240void rofi_view_update(struct RofiViewState *state, gboolean qr);
245void rofi_view_refilter(struct RofiViewState *state);
246void rofi_view_set_window_title(const char *title);
247
248#endif
struct _workarea workarea
KeyBindingAction
Definition keyb.h:58
struct rofi_mode Mode
Definition mode.h:49
MenuReturn
Definition mode.h:70
MenuFlags
Definition view.h:54
struct _box box
Definition box.h:49
struct _container container
Definition container.h:44
struct _icon icon
Definition icon.h:44
struct _listview listview
Definition listview.h:45
struct _widget widget
Definition widget.h:49
struct rofi_int_matcher_t rofi_int_matcher
RofiCursorType
Definition rofi-types.h:147
unsigned int filtered_lines
container * mesg_box
textbox * text
widget * motion_target
textbox * mesg_tb
textbox * overlay
icon * icon_current_entry
gboolean case_sensitive
textbox ** modes
struct RofiViewState::@205064276262334135157147273370175004036316141305 mouse
listview * list_view
unsigned int num_lines
unsigned int previous_line
unsigned int num_modes
MenuReturn retv
void(* finalize)(struct RofiViewState *state)
xcb_timestamp_t last_button_press
textbox * prompt
unsigned int * line_map
textbox * tb_filtered_rows
rofi_int_matcher ** tokens
textbox * tb_current_entry
textbox * tb_total_rows
unsigned int selected_line
KeyBindingAction prev_action
textbox * case_indicator
MenuFlags menu_flags
EntryHistoryIndex * entry_history
void(* frame_callback)(void)
void(* calculate_window_position)(struct RofiViewState *state)
void(* window_update_size)(struct RofiViewState *state)
void(* __create_window)(MenuFlags menu_flags)
void(* queue_redraw)(void)
void(* temp_configure_notify)(struct RofiViewState *state, xcb_configure_notify_event_t *xce)
void(* update)(struct RofiViewState *state, gboolean qr)
void(* get_size)(struct RofiViewState *state, gint *width, gint *height)
void(* pool_refresh)(void)
void(* get_current_monitor)(int *width, int *height)
void(* set_cursor)(RofiCursorType type)
void(* reload)(void)
int(* calculate_window_height)(struct RofiViewState *state)
xcb_window_t(* get_window)(void)
void(* temp_click_to_exit)(struct RofiViewState *state, xcb_window_t target)
void(* cleanup)(void)
void(* ping_mouse)(struct RofiViewState *state)
void(* set_window_title)(const char *title)
void(* calculate_window_width)(struct RofiViewState *state)
void(* hide)(void)
void(* set_size)(struct RofiViewState *state, gint width, gint height)
void rofi_view_calculate_window_position(struct RofiViewState *state)
Definition view.c:2135
void rofi_view_window_update_size(struct RofiViewState *state)
Definition view.c:2147
void rofi_view_refilter(struct RofiViewState *state)
Definition view.c:899
void rofi_view_set_window_title(const char *title)
Definition view.c:2131
struct _view_proxy view_proxy
void rofi_view_calculate_window_width(struct RofiViewState *state)
Definition view.c:2139
void rofi_view_update(struct RofiViewState *state, gboolean qr)
Definition view.c:2114
int rofi_view_calculate_window_height(struct RofiViewState *state)
Definition view.c:2143
struct _rofi_view_cache_state CacheState
Definition view.c:75
struct _display_buffer_pool display_buffer_pool
Definition wayland.h:36
int xcb_timestamp_t
Definition xcb-dummy.h:10
int xcb_window_t
Definition xcb-dummy.h:9
int xcb_configure_notify_event_t
Definition xcb-dummy.h:8