rofi 1.7.7
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>
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);
209
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);
284
291
299
305xcb_window_t rofi_view_get_window(void);
325
334
338void rofi_capture_screenshot(void);
342void rofi_view_set_window_title(const char *title);
343
350 PangoEllipsizeMode mode);
351
359gboolean rofi_set_im_window_pos(int new_x, int new_y);
360
373 widget *wid, MouseBindingMouseDefaultAction action, G_GNUC_UNUSED gint x,
374 G_GNUC_UNUSED gint y, G_GNUC_UNUSED void *user_data);
375
377#endif
BindingsScope
Definition keyb.h:43
MouseBindingMouseDefaultAction
Definition keyb.h:172
MenuReturn
Definition mode.h:65
void rofi_view_cleanup(void)
Definition view.c:2624
void rofi_view_set_overlay(RofiViewState *state, const char *text)
Definition view.c:2739
void __create_window(MenuFlags menu_flags)
Definition view.c:1004
void rofi_view_clear_input(RofiViewState *state)
Definition view.c:2753
void rofi_view_switch_mode(RofiViewState *state, Mode *mode)
Definition view.c:2765
Mode * rofi_view_get_mode(RofiViewState *state)
Definition view.c:2737
void rofi_view_hide(void)
Definition view.c:2616
void rofi_view_reload(void)
Definition view.c:586
xcb_window_t rofi_view_get_window(void)
Definition view.c:2793
void rofi_view_remove_active(RofiViewState *state)
Definition view.c:609
int rofi_view_error_dialog(const char *msg, int markup)
Definition view.c:2574
void rofi_view_set_active(RofiViewState *state)
Definition view.c:616
void rofi_view_queue_redraw(void)
Definition view.c:593
RofiViewState * rofi_view_get_active(void)
Definition view.c:607
void rofi_view_restart(RofiViewState *state)
Definition view.c:602
MenuFlags
Definition view.h:50
void rofi_view_handle_text(RofiViewState *state, char *text)
Definition view.c:2019
void rofi_view_trigger_action(RofiViewState *state, BindingsScope scope, guint action)
Definition view.c:1978
MenuReturn rofi_view_get_return_value(const RofiViewState *state)
Definition view.c:675
unsigned int rofi_view_get_completed(const RofiViewState *state)
Definition view.c:692
gboolean rofi_view_check_action(RofiViewState *state, BindingsScope scope, guint action)
Definition view.c:1947
const char * rofi_view_get_user_input(const RofiViewState *state)
Definition view.c:696
void rofi_view_handle_mouse_motion(RofiViewState *state, gint x, gint y, gboolean find_mouse_target)
Definition view.c:2061
void rofi_view_temp_click_to_exit(RofiViewState *state, xcb_window_t target)
Definition view.c:2150
void rofi_view_finalize(RofiViewState *state)
Definition view.c:1610
void rofi_view_set_selected_line(RofiViewState *state, unsigned int selected_line)
Definition view.c:639
void rofi_view_temp_configure_notify(RofiViewState *state, xcb_configure_notify_event_t *xce)
Definition view.c:2116
void rofi_view_frame_callback(void)
Definition view.c:2159
void rofi_view_free(RofiViewState *state)
Definition view.c:657
RofiViewState * rofi_view_create(Mode *sw, const char *input, MenuFlags menu_flags, void(*finalize)(RofiViewState *))
Definition view.c:2477
unsigned int rofi_view_get_selected_line(const RofiViewState *state)
Definition view.c:679
unsigned int rofi_view_get_next_position(const RofiViewState *state)
Definition view.c:683
void rofi_view_maybe_update(RofiViewState *state)
Definition view.c:2089
@ 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:218
void rofi_view_workers_initialize(void)
Definition view.c:2701
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:2185
void rofi_view_set_window_title(const char *title)
Definition view.c:2795
void rofi_view_ellipsize_listview(RofiViewState *state, PangoEllipsizeMode mode)
Definition view.c:2760
void rofi_view_get_current_monitor(int *width, int *height)
Definition view.c:183
void rofi_view_workers_finalize(void)
Definition view.c:2730
WidgetTriggerActionResult
Definition widget.h:76
textbox * text
void(* finalize)(struct RofiViewState *state)
unsigned int selected_line
MenuFlags menu_flags