rofi 2.1.0
ViewGlobal
Collaboration diagram for ViewGlobal:

Functions

RofiViewState * rofi_view_get_active (void)
textbox * rofi_view_get_active_text (void)
void rofi_view_set_active (RofiViewState *state)
void rofi_view_remove_active (RofiViewState *state)
int rofi_view_error_dialog (const char *msg, int markup)
void rofi_view_queue_redraw (void)
void rofi_view_calculate_window_position (RofiViewState *state)
void rofi_view_cleanup (void)
Mode * rofi_view_get_mode (RofiViewState *state)
void rofi_view_hide (void)
void rofi_view_reload (void)
void rofi_view_switch_mode (RofiViewState *state, Mode *mode)
void rofi_view_set_overlay (RofiViewState *state, const char *text)
void rofi_view_set_overlay_timeout (RofiViewState *state, const char *text)
void rofi_view_clear_input (RofiViewState *state)
void __create_window (MenuFlags menu_flags)
xcb_window_t rofi_view_get_window (void)

Detailed Description

Global menu view functions. These do not work on the view itself but modifies the global state.

Function Documentation

◆ __create_window()

void __create_window ( MenuFlags menu_flags)
Parameters
menu_flagsThe state of the new window.

Creates the internal 'Cached' window that gets reused between views. TODO: Internal call to view exposed.

Definition at line 2223 of file view.c.

References __create_window(), _view_proxy::__create_window, and proxy.

Referenced by __create_window(), and startup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_view_calculate_window_position()

void rofi_view_calculate_window_position ( RofiViewState * state)

Definition at line 2199 of file view.c.

References _view_proxy::calculate_window_position, proxy, and rofi_view_calculate_window_position().

Referenced by rofi_view_calculate_window_position(), rofi_view_create(), rofi_view_error_dialog(), and rofi_view_refilter_real().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_view_cleanup()

void rofi_view_cleanup ( void )

Cleanup internal data of the view.

Definition at line 2217 of file view.c.

References _view_proxy::cleanup, proxy, and rofi_view_cleanup().

Referenced by rofi_view_cleanup(), and teardown().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_view_clear_input()

void rofi_view_clear_input ( RofiViewState * state)
Parameters
stateThe handle to the view.

Clears the user entry box, set selected to 0.

Definition at line 2136 of file view.c.

References rofi_view_clear_input(), rofi_view_set_selected_line(), RofiViewState::text, and textbox_text().

Referenced by process_result(), and rofi_view_clear_input().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_view_error_dialog()

int rofi_view_error_dialog ( const char * msg,
int markup )

◆ rofi_view_get_active()

◆ rofi_view_get_active_text()

textbox * rofi_view_get_active_text ( void )

Get the current active textbox with the user input.

Returns
the active textbox or NULL

Definition at line 323 of file view.c.

References rofi_view_get_active(), rofi_view_get_active_text(), and RofiViewState::text.

Referenced by rofi_view_get_active_text(), and update_cursor_rectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_view_get_mode()

Mode * rofi_view_get_mode ( RofiViewState * state)
Parameters
stateThe handle to the view

Get the mode currently displayed by the view.

Returns
the mode currently displayed by the view

Definition at line 2092 of file view.c.

References rofi_view_get_mode(), and RofiViewState::sw.

Referenced by dmenu_finalize(), and rofi_view_get_mode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_view_get_window()

xcb_window_t rofi_view_get_window ( void )

Get the handle of the main window.

Returns
the xcb_window_t for rofi's view or XCB_WINDOW_NONE.

Definition at line 2227 of file view.c.

References _view_proxy::get_window, proxy, and rofi_view_get_window().

Referenced by main_loop_x11_event_handler_view(), and rofi_view_get_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_view_hide()

void rofi_view_hide ( void )

Unmap the current view.

Definition at line 2219 of file view.c.

References _view_proxy::hide, proxy, and rofi_view_hide().

Referenced by rofi_view_hide().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_view_queue_redraw()

void rofi_view_queue_redraw ( void )

Queue a redraw. This triggers a X11 Expose Event.

Definition at line 2193 of file view.c.

References proxy, _view_proxy::queue_redraw, and rofi_view_queue_redraw().

Referenced by rofi_view_overlay_timeout(), rofi_view_queue_redraw(), rofi_view_set_active(), rofi_view_set_overlay(), textbox_blink(), and xcb_rofi_view_update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_view_reload()

void rofi_view_reload ( void )

Indicate the current view needs to reload its data. This can only be done when more information is available.

The reloading happens 'lazy', multiple calls might be handled at once.

Definition at line 2221 of file view.c.

References proxy, _view_proxy::reload, and rofi_view_reload().

Referenced by dmenu_async_read_proc(), recursive_browser_async_read_proc(), rofi_icon_fetcher_worker(), and rofi_view_reload().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_view_remove_active()

void rofi_view_remove_active ( RofiViewState * state)
Parameters
stateremove view handle.

remove state handle from queue, if current view, pop view from stack.

Definition at line 340 of file view.c.

References CacheState, current_active_menu, rofi_view_remove_active(), rofi_view_set_active(), and _rofi_view_cache_state::views.

Referenced by process_result(), and rofi_view_remove_active().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_view_set_active()

void rofi_view_set_active ( RofiViewState * state)
Parameters
statethe new active view handle.

Set the current active view Handle, If NULL passed a queued view is popped from stack.

Definition at line 347 of file view.c.

References CacheState, current_active_menu, rofi_view_queue_redraw(), rofi_view_set_active(), rofi_view_window_update_size(), and _rofi_view_cache_state::views.

Referenced by dmenu_finish(), dmenu_mode_dialog(), rofi_view_error_dialog(), rofi_view_remove_active(), rofi_view_set_active(), and run_mode_index().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_view_set_overlay()

void rofi_view_set_overlay ( RofiViewState * state,
const char * text )
Parameters
stateThe handle to the view
textAn UTF-8 encoded character array with the text to overlay.

Overlays text over the current view. Passing NULL for text hides the overlay.

Definition at line 2118 of file view.c.

References CacheState, RofiViewState::list_view, RofiViewState::overlay, _rofi_view_cache_state::overlay_timeout, rofi_view_queue_redraw(), rofi_view_set_overlay(), textbox_text(), WIDGET, widget_disable(), and widget_enable().

Referenced by dmenu_async_read_proc(), dmenu_finalize(), dmenu_mode_dialog(), rofi_view_set_overlay(), and rofi_view_set_overlay_timeout().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_view_set_overlay_timeout()

void rofi_view_set_overlay_timeout ( RofiViewState * state,
const char * text )
Parameters
stateThe handle to the view
textAn UTF-8 encoded character array with the text to overlay.

Overlays text over the current view. Passing NULL for text hides the overlay. This message is automatically removed after X seconds.

Definition at line 2104 of file view.c.

References CacheState, RofiViewState::list_view, RofiViewState::overlay, _rofi_view_cache_state::overlay_timeout, rofi_theme_get_integer(), rofi_view_overlay_timeout(), rofi_view_set_overlay(), rofi_view_set_overlay_timeout(), WIDGET, and widget_disable().

Referenced by rofi_view_set_overlay_timeout(), and rofi_view_trigger_global_action().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_view_switch_mode()

void rofi_view_switch_mode ( RofiViewState * state,
Mode * mode )
Parameters
stateThe handle to the view
modeThe new mode to display

Change the current view to show a different mode.

Definition at line 2148 of file view.c.

References HIGHLIGHT, mode_get_display_name(), RofiViewState::modes, NORMAL, RofiViewState::num_modes, RofiViewState::prompt, RofiViewState::refilter, RofiViewState::reload, rofi_get_mode(), rofi_view_refilter_force(), rofi_view_restart(), rofi_view_set_window_title(), rofi_view_switch_mode(), rofi_view_update(), rofi_view_update_prompt(), RofiViewState::sidebar_bar, RofiViewState::sw, and textbox_font().

Referenced by process_result(), and rofi_view_switch_mode().

Here is the call graph for this function:
Here is the caller graph for this function: