rofi  1.5.4
ViewGlobal
Collaboration diagram for ViewGlobal:

Functions

RofiViewStaterofi_view_get_active (void)
 
void rofi_view_set_active (RofiViewState *state)
 
int rofi_view_error_dialog (const char *msg, int markup)
 
void rofi_view_queue_redraw (void)
 
void rofi_view_cleanup (void)
 
Moderofi_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_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 678 of file view.c.

References box_create(), CacheState, config, _xcb_stuff::connection, depth, Settings::dpi, _xcb_stuff::ewmh, Settings::fake_background, Settings::fake_transparency, Settings::fullscreen, helper_validate_font(), map, Settings::menu_font, MENU_NORMAL_WINDOW, monitor_active(), ROFI_ORIENTATION_HORIZONTAL, rofi_theme_get_boolean(), rofi_theme_get_string(), rofi_view_setup_fake_transparency(), _xcb_stuff::screen, _xcb_stuff::sncontext, textbox_set_pango_context(), TICK_N, visual, WIDGET, widget_free(), window_set_atom_prop(), x11_disable_decoration(), xcb, and xcb_stuff_get_root_window().

Referenced by startup().

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 1814 of file view.c.

References CacheState, _xcb_stuff::connection, map, and xcb.

Referenced by teardown().

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 1906 of file view.c.

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

Referenced by process_result().

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

◆ rofi_view_error_dialog()

◆ rofi_view_get_active()

RofiViewState* rofi_view_get_active ( void  )

Get the current active view Handle.

Returns
the active view handle or NULL

Definition at line 447 of file view.c.

References current_active_menu.

Referenced by async_read_callback(), binding_trigger_action(), main_loop_x11_event_handler(), main_loop_x11_event_handler_view(), rofi_view_maybe_update(), rofi_view_trigger_global_action(), and run_switcher().

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 1886 of file view.c.

References RofiViewState::sw.

Referenced by dmenu_finalize().

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 1934 of file view.c.

References CacheState.

◆ rofi_view_hide()

void rofi_view_hide ( void  )

Unmap the current view.

Definition at line 1806 of file view.c.

References CacheState, _xcb_stuff::connection, display_early_cleanup(), and xcb.

Here is the call 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 432 of file view.c.

References CacheState, current_active_menu, and rofi_view_repaint().

Referenced by rofi_view_reload_idle(), rofi_view_set_active(), rofi_view_set_overlay(), rofi_view_update(), and textbox_blink().

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 425 of file view.c.

References CacheState, and rofi_view_reload_idle().

Referenced by async_read_callback(), and rofi_icon_fetcher_worker().

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, NULL to clear.

Set the current active view Handle.

Definition at line 452 of file view.c.

References CacheState, current_active_menu, rofi_view_queue_redraw(), and rofi_view_window_update_size().

Referenced by dmenu_finish(), dmenu_switcher_dialog(), process_result(), rofi_view_error_dialog(), and run_switcher().

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 1891 of file view.c.

References RofiViewState::list_view, RofiViewState::overlay, rofi_view_queue_redraw(), textbox_text(), WIDGET, widget_disable(), and widget_enable().

Referenced by async_read_callback(), dmenu_finalize(), and dmenu_switcher_dialog().

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 1914 of file view.c.

References HIGHLIGHT, RofiViewState::modi, NORMAL, RofiViewState::num_modi, RofiViewState::prompt, RofiViewState::refilter, RofiViewState::reload, rofi_get_mode(), rofi_view_refilter(), rofi_view_restart(), rofi_view_update(), rofi_view_update_prompt(), RofiViewState::sidebar_bar, RofiViewState::sw, and textbox_font().

Referenced by process_result().

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