|
rofi 2.1.0
|

Data Structures | |
| struct | RofiViewState |
| struct | RofiViewState::[struct].mouse |
Typedefs | |
| typedef struct RofiViewState | RofiViewState |
Enumerations | |
| enum | MenuFlags { MENU_NORMAL = 0 , MENU_PASSWORD = 1 , MENU_NORMAL_WINDOW = 2 , MENU_ERROR_DIALOG = 4 , MENU_TRANSIENT_WINDOW = 8 } |
| enum MenuFlags |
| gboolean rofi_view_check_action | ( | RofiViewState * | state, |
| BindingsScope | scope, | ||
| guint | action ) |
| state | The handle to the view |
| scope | The scope of the action |
| action | The action |
Definition at line 1391 of file view.c.
References RofiViewState::main_window, RofiViewState::mouse, rofi_view_check_action(), SCOPE_GLOBAL, SCOPE_MOUSE_EDITBOX, SCOPE_MOUSE_LISTVIEW, SCOPE_MOUSE_LISTVIEW_ELEMENT, SCOPE_MOUSE_MODE_SWITCHER, SCOPE_MOUSE_SCROLLBAR, WIDGET, widget_check_action(), widget_find_mouse_target(), WIDGET_TRIGGER_ACTION_RESULT_GRAB_MOTION_BEGIN, WIDGET_TRIGGER_ACTION_RESULT_GRAB_MOTION_END, WIDGET_TRIGGER_ACTION_RESULT_HANDLED, WIDGET_TRIGGER_ACTION_RESULT_IGNORED, widget_xy_to_relative(), RofiViewState::x, and RofiViewState::y.
Referenced by binding_check_action(), and rofi_view_check_action().


| RofiViewState * rofi_view_create | ( | Mode * | sw, |
| const char * | input, | ||
| MenuFlags | menu_flags, | ||
| void(* | finalize )(RofiViewState *) ) |
| sw | the Mode to show. |
| input | A pointer to a string where the inputted data is placed. |
| menu_flags | Flags indicating state of the menu. |
| finalize | the finalize callback |
Main menu callback.
Definition at line 1860 of file view.c.
References __rofi_view_state_create(), box_create(), CacheState, config, _xcb_stuff::connection, Settings::disable_history, display_set_input_focus(), RofiViewState::distance, _rofi_view_cache_state::entry_history_enable, RofiViewState::finalize, _rofi_view_cache_state::flags, RofiViewState::height, RofiViewState::line_map, RofiViewState::list_view, listview_set_fixed_num_lines(), _rofi_view_cache_state::main_window, RofiViewState::main_window, MENU_CANCEL, RofiViewState::menu_flags, MENU_NORMAL_WINDOW, MENU_PASSWORD, mode_get_display_name(), mode_get_num_entries(), RofiViewState::mouse_seen, RofiViewState::num_lines, RofiViewState::previous_line, RofiViewState::quit, RofiViewState::refilter, RofiViewState::retv, ROFI_ORIENTATION_VERTICAL, rofi_theme_get_list_strings(), rofi_view_add_widget(), rofi_view_calculate_window_height(), rofi_view_calculate_window_position(), rofi_view_calculate_window_width(), rofi_view_create(), rofi_view_ping_mouse(), rofi_view_refilter(), rofi_view_set_user_timeout(), rofi_view_set_window_title(), rofi_view_update(), rofi_view_window_update_size(), RofiViewState::selected_line, RofiViewState::skip_absorb, _xcb_stuff::sncontext, RofiViewState::sw, RofiViewState::text, textbox_cursor_end(), textbox_text(), TICK, TICK_N, WIDGET, widget_queue_redraw(), and xcb.
Referenced by dmenu_mode_dialog(), rofi_view_create(), and run_mode_index().


| void rofi_view_finalize | ( | RofiViewState * | state | ) |
| state | The Menu Handle |
Check if a finalize function is set, and if sets executes it.
Definition at line 1003 of file view.c.
References RofiViewState::finalize, and rofi_view_finalize().
Referenced by rofi_view_finalize(), and rofi_view_maybe_update().


| void rofi_view_frame_callback | ( | void | ) |
Update the state if needed.
Definition at line 2191 of file view.c.
References _view_proxy::frame_callback, proxy, and rofi_view_frame_callback().
Referenced by main_loop_x11_event_handler_view(), rofi_view_frame_callback(), and wayland_frame_callback().


| void rofi_view_free | ( | RofiViewState * | state | ) |
| state | The handle to the view |
Free's the memory allocated for this handle. After a call to this function, state is invalid and can no longer be used.
Definition at line 392 of file view.c.
References RofiViewState::distance, helper_tokenize_free(), RofiViewState::line_map, RofiViewState::main_window, RofiViewState::modes, RofiViewState::num_modes, rofi_view_free(), RofiViewState::tokens, WIDGET, and widget_free().
Referenced by dmenu_finish(), process_result(), and rofi_view_free().


| unsigned int rofi_view_get_completed | ( | const RofiViewState * | state | ) |
| state | the Menu handle |
Definition at line 435 of file view.c.
References RofiViewState::quit, and rofi_view_get_completed().
Referenced by rofi_view_get_completed(), and rofi_view_maybe_update().


| unsigned int rofi_view_get_element_pitch | ( | const RofiViewState * | state, |
| RofiOrientation | orientation ) |
| state | The Menu Handle |
| orientation | The axis to measure along |
The distance from one list element to the next along the axis.
Definition at line 418 of file view.c.
References RofiViewState::list_view, listview_get_element_pitch(), and rofi_view_get_element_pitch().
Referenced by rofi_view_get_element_pitch(), and wayland_touch_scroll_step().


| unsigned int rofi_view_get_next_position | ( | const RofiViewState * | state | ) |
| state | the Menu handle |
Returns the index of the next visible position.
Definition at line 426 of file view.c.
References RofiViewState::line_map, RofiViewState::list_view, listview_get_selected(), RofiViewState::num_lines, rofi_view_get_next_position(), and RofiViewState::selected_line.
Referenced by dmenu_finalize(), and rofi_view_get_next_position().


| MenuReturn rofi_view_get_return_value | ( | const RofiViewState * | state | ) |
| state | the Menu handle |
Get the return value associated to the users action.
Definition at line 410 of file view.c.
References RofiViewState::retv, and rofi_view_get_return_value().
Referenced by dmenu_finalize(), process_result(), and rofi_view_get_return_value().


| unsigned int rofi_view_get_selected_line | ( | const RofiViewState * | state | ) |
| state | The Menu Handle |
Get the selected line.
Definition at line 414 of file view.c.
References rofi_view_get_selected_line(), and RofiViewState::selected_line.
Referenced by dmenu_finalize(), process_result(), and rofi_view_get_selected_line().


| const char * rofi_view_get_user_input | ( | const RofiViewState * | state | ) |
| state | the Menu handle |
Definition at line 439 of file view.c.
References rofi_view_get_user_input(), RofiViewState::text, and textbox::text.
Referenced by dmenu_finalize(), process_result(), and rofi_view_get_user_input().


| void rofi_view_handle_mouse_motion | ( | RofiViewState * | state, |
| gint | x, | ||
| gint | y, | ||
| gboolean | find_mouse_target ) |
| state | the Menu handle |
| x | The X coordinates of the motion |
| y | The Y coordinates of the motion |
| find_mouse_target | if we should handle pure mouse motion |
Update the state if needed.
Definition at line 1500 of file view.c.
References RofiViewState::main_window, RofiViewState::mouse, rofi_view_handle_mouse_motion(), rofi_view_resolve_cursor(), rofi_view_set_cursor(), WIDGET, widget_find_mouse_target(), widget_motion_notify(), WIDGET_TYPE_LISTVIEW_ELEMENT, widget_xy_to_relative(), RofiViewState::x, and RofiViewState::y.
Referenced by main_loop_x11_event_handler_view(), rofi_view_handle_mouse_motion(), wayland_pointer_send_events(), and xcb_rofi_view_ping_mouse().


| void rofi_view_handle_text | ( | RofiViewState * | state, |
| const char * | text ) |
| state | the Menu handle |
| text | The text to add to the input box |
Update the state if needed.
Definition at line 1463 of file view.c.
References RofiViewState::refilter, rofi_view_handle_text(), rofi_view_input_changed(), RofiViewState::text, and textbox_append_text().
Referenced by rofi_key_press_event_handler(), rofi_view_handle_text(), rofi_view_paste(), text_input_commit_string(), wayland_key_repeat(), wayland_key_repeat_delay(), and wayland_keyboard_key().


| void rofi_view_maybe_update | ( | RofiViewState * | state | ) |
| state | the Menu handle |
Update the state if needed.
Definition at line 1560 of file view.c.
References RofiViewState::refilter, rofi_quit_main_loop(), rofi_quit_user_callback(), rofi_view_finalize(), rofi_view_get_active(), rofi_view_get_completed(), rofi_view_maybe_update(), rofi_view_refilter(), and rofi_view_update().
Referenced by main_loop_x11_event_handler(), main_loop_x11_event_handler_view(), rofi_view_maybe_update(), text_input_commit_string(), text_input_done(), text_input_preedit_string(), wayland_key_repeat(), wayland_key_repeat_delay(), wayland_keyboard_key(), wayland_keyboard_modifiers(), wayland_pointer_send_events(), wayland_rofi_view_reload_idle(), and wayland_rofi_view_repaint().


| void rofi_view_restart | ( | RofiViewState * | state | ) |
| state | The Menu Handle |
Restart the menu so it can be displayed again. Resets RofiViewState::quit and RofiViewState::retv.
Definition at line 316 of file view.c.
References MENU_CANCEL, RofiViewState::quit, RofiViewState::retv, and rofi_view_restart().
Referenced by dmenu_finalize(), rofi_view_restart(), and rofi_view_switch_mode().


| void rofi_view_set_selected_line | ( | RofiViewState * | state, |
| unsigned int | selected_line ) |
| state | The Menu Handle |
| selected_line | The line to select. |
Select a line.
Definition at line 369 of file view.c.
References Settings::backend, CacheState, config, _xcb_stuff::connection, DISPLAY_XCB, RofiViewState::filtered_lines, RofiViewState::line_map, RofiViewState::list_view, listview_set_selected(), _rofi_view_cache_state::main_window, rofi_view_set_selected_line(), RofiViewState::selected_line, and xcb.
Referenced by dmenu_finalize(), dmenu_mode_dialog(), rofi_view_clear_input(), rofi_view_set_selected_line(), run_mode_index(), and script_mode_result().


| void rofi_view_temp_click_to_exit | ( | RofiViewState * | state, |
| xcb_window_t | target ) |
Definition at line 2187 of file view.c.
References proxy, rofi_view_temp_click_to_exit(), and _view_proxy::temp_click_to_exit.
Referenced by main_loop_x11_event_handler_view(), and rofi_view_temp_click_to_exit().


| void rofi_view_temp_configure_notify | ( | RofiViewState * | state, |
| xcb_configure_notify_event_t * | xce ) |
Definition at line 2182 of file view.c.
References proxy, rofi_view_temp_configure_notify(), and _view_proxy::temp_configure_notify.
Referenced by main_loop_x11_event_handler_view(), and rofi_view_temp_configure_notify().


| void rofi_view_trigger_action | ( | RofiViewState * | state, |
| BindingsScope | scope, | ||
| guint | action ) |
| state | The handle to the view |
| scope | The scope of the action |
| action | The action |
Definition at line 1422 of file view.c.
References RofiViewState::main_window, RofiViewState::mouse, rofi_fallthrough, rofi_view_set_user_timeout(), rofi_view_trigger_action(), rofi_view_trigger_global_action(), SCOPE_GLOBAL, SCOPE_MOUSE_EDITBOX, SCOPE_MOUSE_LISTVIEW, SCOPE_MOUSE_LISTVIEW_ELEMENT, SCOPE_MOUSE_MODE_SWITCHER, SCOPE_MOUSE_SCROLLBAR, WIDGET, widget_find_mouse_target(), widget_trigger_action(), WIDGET_TRIGGER_ACTION_RESULT_GRAB_MOTION_BEGIN, WIDGET_TRIGGER_ACTION_RESULT_GRAB_MOTION_END, WIDGET_TRIGGER_ACTION_RESULT_HANDLED, WIDGET_TRIGGER_ACTION_RESULT_IGNORED, widget_xy_to_relative(), RofiViewState::x, and RofiViewState::y.
Referenced by binding_trigger_action(), rofi_view_take_action(), and rofi_view_trigger_action().

