rofi 1.7.9
view.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_H
29#define ROFI_VIEW_H
30
31#include "mode.h"
32#include "widgets/widget.h"
33#include <pango/pango.h>
34#include <xcb/xcb.h>
42
62
73RofiViewState *rofi_view_create(Mode *sw, const char *input,
75 void (*finalize)(RofiViewState *));
76
83
99unsigned int rofi_view_get_next_position(const RofiViewState *state);
106void rofi_view_handle_text(RofiViewState *state, char *text);
115void rofi_view_handle_mouse_motion(RofiViewState *state, gint x, gint y,
116 gboolean find_mouse_target);
124 xcb_configure_notify_event_t *xce);
125void rofi_view_temp_click_to_exit(RofiViewState *state, xcb_window_t target);
129void rofi_view_frame_callback(void);
135unsigned int rofi_view_get_completed(const RofiViewState *state);
141const char *rofi_view_get_user_input(const RofiViewState *state);
142
150 unsigned int selected_line);
151
159unsigned int rofi_view_get_selected_line(const RofiViewState *state);
167
176 guint action);
177
184 guint action);
185
192void rofi_view_free(RofiViewState *state);
202
209
217
219
234int rofi_view_error_dialog(const char *msg, int markup);
235
240void rofi_view_queue_redraw(void);
241
245void rofi_view_cleanup(void);
246
255
259void rofi_view_hide(void);
260
267void rofi_view_reload(void);
268
275void rofi_view_switch_mode(RofiViewState *state, Mode *mode);
276
283void rofi_view_set_overlay(RofiViewState *state, const char *text);
291void rofi_view_set_overlay_timeout (RofiViewState *state, const char *text);
292
299
307
313xcb_window_t rofi_view_get_window(void);
315
333
342
346void rofi_capture_screenshot(void);
350void rofi_view_set_window_title(const char *title);
351
358 PangoEllipsizeMode mode);
359
367gboolean rofi_set_im_window_pos(int new_x, int new_y);
368
381 widget *wid, MouseBindingMouseDefaultAction action, G_GNUC_UNUSED gint x,
382 G_GNUC_UNUSED gint y, G_GNUC_UNUSED void *user_data);
383
385#endif
BindingsScope
Definition keyb.h:43
MouseBindingMouseDefaultAction
Definition keyb.h:174
struct rofi_mode Mode
Definition mode.h:49
MenuReturn
Definition mode.h:70
void rofi_view_cleanup(void)
Definition view.c:2728
void rofi_view_set_overlay(RofiViewState *state, const char *text)
Definition view.c:2871
void __create_window(MenuFlags menu_flags)
Definition view.c:1022
void rofi_view_clear_input(RofiViewState *state)
Definition view.c:2889
void rofi_view_switch_mode(RofiViewState *state, Mode *mode)
Definition view.c:2901
Mode * rofi_view_get_mode(RofiViewState *state)
Definition view.c:2845
void rofi_view_hide(void)
Definition view.c:2720
void rofi_view_reload(void)
Definition view.c:602
xcb_window_t rofi_view_get_window(void)
Definition view.c:2929
void rofi_view_remove_active(RofiViewState *state)
Definition view.c:625
void rofi_view_set_overlay_timeout(RofiViewState *state, const char *text)
Definition view.c:2857
int rofi_view_error_dialog(const char *msg, int markup)
Definition view.c:2675
void rofi_view_set_active(RofiViewState *state)
Definition view.c:632
void rofi_view_queue_redraw(void)
Definition view.c:609
RofiViewState * rofi_view_get_active(void)
Definition view.c:623
void rofi_view_restart(RofiViewState *state)
Definition view.c:618
MenuFlags
Definition view.h:50
void rofi_view_handle_text(RofiViewState *state, char *text)
Definition view.c:2074
void rofi_view_trigger_action(RofiViewState *state, BindingsScope scope, guint action)
Definition view.c:2033
MenuReturn rofi_view_get_return_value(const RofiViewState *state)
Definition view.c:692
unsigned int rofi_view_get_completed(const RofiViewState *state)
Definition view.c:709
gboolean rofi_view_check_action(RofiViewState *state, BindingsScope scope, guint action)
Definition view.c:2002
const char * rofi_view_get_user_input(const RofiViewState *state)
Definition view.c:713
void rofi_view_handle_mouse_motion(RofiViewState *state, gint x, gint y, gboolean find_mouse_target)
Definition view.c:2116
void rofi_view_temp_click_to_exit(RofiViewState *state, xcb_window_t target)
Definition view.c:2238
void rofi_view_finalize(RofiViewState *state)
Definition view.c:1656
void rofi_view_set_selected_line(RofiViewState *state, unsigned int selected_line)
Definition view.c:655
void rofi_view_temp_configure_notify(RofiViewState *state, xcb_configure_notify_event_t *xce)
Definition view.c:2204
void rofi_view_frame_callback(void)
Definition view.c:2247
void rofi_view_free(RofiViewState *state)
Definition view.c:674
RofiViewState * rofi_view_create(Mode *sw, const char *input, MenuFlags menu_flags, void(*finalize)(RofiViewState *))
Definition view.c:2565
unsigned int rofi_view_get_selected_line(const RofiViewState *state)
Definition view.c:696
unsigned int rofi_view_get_next_position(const RofiViewState *state)
Definition view.c:700
void rofi_view_maybe_update(RofiViewState *state)
Definition view.c:2175
@ MENU_PASSWORD
Definition view.h:54
@ MENU_TRANSIENT_WINDOW
Definition view.h:60
@ MENU_NORMAL_WINDOW
Definition view.h:56
@ MENU_ERROR_DIALOG
Definition view.h:58
@ MENU_NORMAL
Definition view.h:52
gboolean rofi_set_im_window_pos(int new_x, int new_y)
void rofi_capture_screenshot(void)
Definition view.c:233
void rofi_view_workers_initialize(void)
Definition view.c:2809
WidgetTriggerActionResult textbox_button_trigger_action(widget *wid, MouseBindingMouseDefaultAction action, G_GNUC_UNUSED gint x, G_GNUC_UNUSED gint y, G_GNUC_UNUSED void *user_data)
Definition view.c:2273
void rofi_view_set_window_title(const char *title)
Definition view.c:2931
void rofi_view_ellipsize_listview(RofiViewState *state, PangoEllipsizeMode mode)
Definition view.c:2896
void rofi_view_get_current_monitor(int *width, int *height)
Definition view.c:186
void rofi_view_workers_finalize(void)
Definition view.c:2838
struct _widget widget
Definition widget.h:51
WidgetTriggerActionResult
Definition widget.h:76
textbox * text
void(* finalize)(struct RofiViewState *state)
unsigned int selected_line
MenuFlags menu_flags