|
rofi 2.0.0
|
#include <config.h>#include <errno.h>#include <locale.h>#include <signal.h>#include <stdint.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <time.h>#include <unistd.h>#include <xcb/xcb_ewmh.h>#include <xcb/xcb_icccm.h>#include <xcb/xkb.h>#include <xkbcommon/xkbcommon-x11.h>#include <cairo-xcb.h>#include <cairo.h>#include <gio/gio.h>#include "rofi.h"#include <libsn/sn.h>#include "settings.h"#include "timings.h"#include "display.h"#include "helper-theme.h"#include "helper.h"#include "mode.h"#include "modes/modes.h"#include "xcb-internal.h"#include "xrmoptions.h"#include "view-internal.h"#include "view.h"#include "theme.h"#include "xcb.h"
Go to the source code of this file.
Macros | |
| #define | G_LOG_DOMAIN "View" |
| #define | SN_API_NOT_YET_FROZEN |
Variables | |
| GThreadPool * | tpool |
| struct { | |
| cairo_surface_t * fake_bg | |
| xcb_gcontext_t gc | |
| xcb_pixmap_t edit_pixmap | |
| cairo_surface_t * edit_surf | |
| cairo_t * edit_draw | |
| int fake_bgrel | |
| workarea mon | |
| guint idle_timeout | |
| unsigned long long count | |
| guint repaint_source | |
| gboolean fullscreen | |
| X11CursorType cursor_type | |
| } | XcbState |
| gboolean | do_bench = TRUE |
| struct { | |
| GTimer * time | |
| uint64_t draws | |
| double last_ts | |
| double min | |
| } | BenchMark = {.time = NULL, .draws = 0, .last_ts = 0.0, .min = G_MAXDOUBLE} |
| static const int | loc_transtable [9] |
| static view_proxy | view_ |
| const view_proxy * | xcb_view_proxy = &view_ |
| #define SN_API_NOT_YET_FROZEN |
|
static |
Definition at line 168 of file view.c.
References BenchMark, and config.
Referenced by xcb_rofi_view_repaint().

|
static |
Definition at line 396 of file view.c.
References CURSOR_DEFAULT, CURSOR_POINTER, CURSOR_TEXT, ROFI_CURSOR_DEFAULT, ROFI_CURSOR_POINTER, and ROFI_CURSOR_TEXT.
Referenced by xcb_rofi_view_set_cursor().

|
static |
Definition at line 608 of file view.c.
References box_create(), CacheState, config, depth, helper_validate_font(), input_history_initialize(), map, MENU_NORMAL_WINDOW, monitor_active(), netatoms, ROFI_ORIENTATION_HORIZONTAL, rofi_theme_get_boolean(), rofi_theme_get_string(), textbox_set_pango_context(), TICK_N, visual, WIDGET, widget_free(), window_set_atom_prop(), x11_disable_decoration(), xcb, xcb_rofi_view_set_window_title(), xcb_rofi_view_setup_fake_transparency(), xcb_stuff_get_root_window(), and XcbState.

|
static |
Definition at line 860 of file view.c.
References distance_get_pixel(), RofiViewState::main_window, ROFI_ORIENTATION_VERTICAL, rofi_theme_get_distance(), WIDGET, widget_get_desired_height(), RofiViewState::width, and XcbState.

|
static |
Definition at line 280 of file view.c.
References config, distance_get_pixel(), RofiViewState::height, loc_transtable, RofiViewState::main_window, rofi_fallthrough, ROFI_ORIENTATION_HORIZONTAL, ROFI_ORIENTATION_VERTICAL, rofi_theme_get_distance(), rofi_theme_get_position(), WIDGET, RofiViewState::width, WL_CENTER, WL_EAST, WL_NORTH, WL_NORTH_EAST, WL_NORTH_WEST, WL_SOUTH, WL_SOUTH_EAST, WL_SOUTH_WEST, WL_WEST, RofiViewState::x, XcbState, and RofiViewState::y.

|
static |
| state | Internal state of the menu. |
Calculate the width of the window and the width of an element.
Definition at line 789 of file view.c.
References DEFAULT_MENU_WIDTH, distance_get_pixel(), RofiViewState::main_window, ROFI_ORIENTATION_HORIZONTAL, rofi_theme_get_distance(), WIDGET, RofiViewState::width, and XcbState.

|
static |
Definition at line 885 of file view.c.
References CacheState, input_history_save(), map, xcb, xcb_stuff_set_clipboard(), XCB_WINDOW_NONE, and XcbState.

|
static |
Definition at line 851 of file view.c.
References xcb_rofi_view_repaint(), and XcbState.

|
static |
|
static |
Definition at line 939 of file view.c.
References CacheState.
|
static |
Definition at line 877 of file view.c.
References CacheState, display_early_cleanup(), display_revert_input_focus(), xcb, and XCB_WINDOW_NONE.

|
static |
Definition at line 423 of file view.c.
References CacheState, config, rofi_view_handle_mouse_motion(), and xcb.

|
static |
Definition at line 464 of file view.c.
References rofi_view_get_active(), xcb_rofi_view_repaint(), and XcbState.
Referenced by xcb_rofi_view_reload_idle().


|
static |
Definition at line 457 of file view.c.
References xcb_rofi_view_reload_idle(), and XcbState.

|
static |
Definition at line 439 of file view.c.
References mode_get_num_entries(), RofiViewState::refilter, RofiViewState::reload, rofi_view_get_active(), RofiViewState::sw, RofiViewState::tb_total_rows, textbox_text(), xcb_rofi_view_queue_redraw(), and XcbState.
Referenced by xcb_rofi_view_reload().


|
static |
Definition at line 192 of file view.c.
References bench_update(), CacheState, RofiViewState::height, rofi_view_get_active(), rofi_view_update(), TICK_N, RofiViewState::width, xcb, and XcbState.
Referenced by xcb_rofi_view_frame_callback(), and xcb_rofi_view_queue_redraw().


|
static |
Definition at line 411 of file view.c.
References CacheState, rofi_cursor_type_to_x11_cursor_type(), x11_set_cursor(), and XcbState.

|
static |
Definition at line 943 of file view.c.
References CacheState, and xcb.
Referenced by xcb___create_window().

|
static |
Select Background to use for fake transparency. Current options: 'real', 'screenshot','background'
Definition at line 476 of file view.c.
References cairo_image_surface_blur(), rofi_expand_path(), rofi_theme_get_integer(), TICK_N, WIDGET, x11_helper_get_bg_surface(), x11_helper_get_screenshot_surface(), and XcbState.
Referenced by xcb___create_window().


|
static |
Quit rofi on click (outside of view )
Definition at line 841 of file view.c.
References CacheState, MENU_CANCEL, MENU_NORMAL_WINDOW, RofiViewState::quit, and RofiViewState::retv.
|
static |
Handle window configure event. Handles resizes.
Definition at line 807 of file view.c.
References CacheState, depth, RofiViewState::height, RofiViewState::main_window, visual, WIDGET, widget_queue_redraw(), widget_resize(), RofiViewState::width, RofiViewState::x, xcb, XcbState, and RofiViewState::y.

|
static |
| state | The handle to the view |
| qr | Indicate if queue_redraw should be called on changes. |
Update the state of the view. This involves filter state.
Definition at line 218 of file view.c.
References config, RofiViewState::main_window, rofi_set_im_window_pos(), rofi_view_queue_redraw(), RofiViewState::text, textbox_get_cursor_x_pos(), TICK, TICK_N, WIDGET, textbox::widget, widget_draw(), widget_get_height(), widget_get_x_pos(), widget_get_y_pos(), widget_need_redraw(), RofiViewState::x, XcbState, and RofiViewState::y.

|
static |
Definition at line 367 of file view.c.
References CacheState, depth, RofiViewState::height, RofiViewState::main_window, visual, WIDGET, widget_resize(), RofiViewState::width, RofiViewState::x, xcb, XcbState, and RofiViewState::y.

| struct { ... } BenchMark |
Internal structure that hold benchmarking information.
Referenced by bench_update().
| X11CursorType cursor_type |
| gboolean do_bench = TRUE |
| cairo_surface_t* fake_bg |
| int fake_bgrel |
|
static |
Calculates the window position Convert the old location to the new location type. 123 804 765
nw n ne w c e sw s se
| workarea mon |
Current work area
Definition at line 117 of file view.c.
Referenced by config_sanity_check(), display_init(), monitor_active(), monitor_active_from_id(), monitor_active_from_id_focused(), monitor_active_from_winid(), monitor_dimensions(), monitor_get_dimension(), rofi_theme_parse_process_conditionals(), rofi_theme_parse_process_conditionals_int(), wayland_display_monitor_active(), and xcb_display_monitor_active().
| GTimer* time |
timer used for timestamping.
Definition at line 159 of file view.c.
Referenced by data_device_handle_motion(), main_loop_x11_event_handler_view(), wayland_cursor_frame_callback(), wayland_keyboard_key(), wayland_pointer_axis(), wayland_pointer_axis_stop(), wayland_pointer_button(), and wayland_pointer_motion().
|
static |
| struct { ... } XcbState |
Structure holding cached state.
Referenced by xcb___create_window(), xcb_rofi_view_calculate_window_height(), xcb_rofi_view_calculate_window_position(), xcb_rofi_view_calculate_window_width(), xcb_rofi_view_cleanup(), xcb_rofi_view_frame_callback(), xcb_rofi_view_get_current_monitor(), xcb_rofi_view_queue_redraw(), xcb_rofi_view_reload(), xcb_rofi_view_reload_idle(), xcb_rofi_view_repaint(), xcb_rofi_view_set_cursor(), xcb_rofi_view_setup_fake_transparency(), xcb_rofi_view_temp_configure_notify(), xcb_rofi_view_update(), and xcb_rofi_view_window_update_size().