Go to the documentation of this file.
29 #define G_LOG_DOMAIN "View"
41 #include <xkbcommon/xkbcommon-x11.h>
43 #include <xcb/xcb_ewmh.h>
44 #include <xcb/xcb_icccm.h>
47 #include <cairo-xcb.h>
50 #define SN_API_NOT_YET_FROZEN
122 .main_window = XCB_WINDOW_NONE,
128 .views = G_QUEUE_INIT,
165 static int lev_sort (
const void *p1,
const void *p2,
void *arg )
169 int *distances = arg;
171 return distances[*a] - distances[*b];
179 const char *outp = g_getenv (
"ROFI_PNG_OUTPUT" );
182 g_warning (
"There is no rofi surface to store" );
185 const char *xdg_pict_dir = g_get_user_special_dir ( G_USER_DIRECTORY_PICTURES );
186 if ( outp == NULL && xdg_pict_dir == NULL ) {
187 g_warning (
"XDG user picture directory or ROFI_PNG_OUTPUT is not set. Cannot store screenshot." );
191 GDateTime *now = g_date_time_new_now_local ();
193 char *timestmp = g_date_time_format ( now,
"rofi-%Y-%m-%d-%H%M" );
194 char *filename = g_strdup_printf (
"%s-%05d.png", timestmp, 0 );
197 if ( outp == NULL ) {
199 fpath = g_build_filename ( xdg_pict_dir, filename, NULL );
200 while ( g_file_test ( fpath, G_FILE_TEST_EXISTS ) && index < 99 ) {
206 filename = g_strdup_printf (
"%s-%05d.png", timestmp, index );
208 fpath = g_build_filename ( xdg_pict_dir, filename, NULL );
212 fpath = g_strdup ( outp );
215 cairo_status_t status = cairo_surface_write_to_png (
CacheState.edit_surf, fpath );
216 if ( status != CAIRO_STATUS_SUCCESS ) {
217 g_warning (
"Failed to produce screenshot '%s', got error: '%s'", fpath,
218 cairo_status_to_string ( status ) );
223 g_date_time_unref ( now );
233 g_debug (
"expose event" );
241 return G_SOURCE_REMOVE;
278 int anchor = location;
284 else if ( location ==
WL_EAST ) {
287 else if ( location ==
WL_WEST ) {
339 state->
x -= state->
width / 2;
352 state->
x -= state->
width / 2;
363 state->
x -= state->
width / 2;
377 uint16_t mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT;
378 uint32_t vals[] = { state->
x, state->
y, state->
width, state->
height };
383 cairo_surface_destroy (
CacheState.edit_surf );
393 g_debug (
"Re-size window based internal request: %dx%d.", state->
width, state->
height );
422 return G_SOURCE_REMOVE;
458 g_debug (
"stack view." );
463 else if ( state == NULL && !g_queue_is_empty ( &(
CacheState.views ) ) ) {
464 g_debug (
"pop view." );
479 unsigned int selected = 0;
505 g_free ( state->
modi );
524 if ( ( selected + 1 ) < state->
num_lines ) {
525 ( next_pos ) = state->
line_map[selected + 1];
597 for (
unsigned int i = t->
start; i < t->stop; i++ ) {
605 glong slen = g_utf8_strlen ( str, -1 );
621 if ( t->
acount != NULL ) {
622 g_mutex_lock ( t->
mutex );
624 g_cond_signal ( t->
cond );
625 g_mutex_unlock ( t->
mutex );
631 cairo_surface_t *s = NULL;
637 if ( g_strcmp0 ( fake_background,
"real" ) == 0 ) {
640 else if ( g_strcmp0 ( fake_background,
"screenshot" ) == 0 ) {
643 else if ( g_strcmp0 ( fake_background,
"background" ) == 0 ) {
648 g_debug (
"Opening %s to use as background.", fpath );
649 s = cairo_image_surface_create_from_png ( fpath );
653 TICK_N (
"Get surface." );
655 if ( cairo_surface_status ( s ) != CAIRO_STATUS_SUCCESS ) {
656 g_debug (
"Failed to open surface fake background: %s",
657 cairo_status_to_string ( cairo_surface_status ( s ) ) );
658 cairo_surface_destroy ( s );
663 cairo_t *dr = cairo_create (
CacheState.fake_bg );
665 cairo_set_source_surface ( dr, s, 0, 0 );
671 cairo_destroy ( dr );
672 cairo_surface_destroy ( s );
675 TICK_N (
"Fake transparency" );
680 uint32_t selmask = XCB_CW_BACK_PIXMAP | XCB_CW_BORDER_PIXEL | XCB_CW_BIT_GRAVITY | XCB_CW_BACKING_STORE | XCB_CW_EVENT_MASK | XCB_CW_COLORMAP;
681 uint32_t selval[] = {
682 XCB_BACK_PIXMAP_NONE, 0,
684 XCB_BACKING_STORE_NOT_USEFUL,
685 XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE |
686 XCB_EVENT_MASK_KEY_PRESS | XCB_EVENT_MASK_KEY_RELEASE | XCB_EVENT_MASK_KEYMAP_STATE |
687 XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_FOCUS_CHANGE | XCB_EVENT_MASK_BUTTON_1_MOTION,
691 xcb_window_t box_window = xcb_generate_id (
xcb->
connection );
693 0, 0, 200, 100, 0, XCB_WINDOW_CLASS_INPUT_OUTPUT,
694 visual->visual_id, selmask, selval );
695 xcb_generic_error_t *error;
698 g_error (
"xcb_create_window() failed error=0x%x\n", error->error_code );
699 exit ( EXIT_FAILURE );
701 TICK_N (
"xcb create window" );
705 TICK_N (
"xcb create gc" );
714 TICK_N (
"create cairo surface" );
716 cairo_font_options_t *fo = cairo_font_options_create ();
718 cairo_surface_get_font_options (
CacheState.edit_surf, fo );
720 PangoContext *p = pango_cairo_create_context (
CacheState.edit_draw );
722 pango_cairo_context_set_font_options ( p, fo );
723 TICK_N (
"pango cairo font setup" );
730 PangoFontMap *font_map = pango_cairo_font_map_get_default ();
731 pango_cairo_font_map_set_resolution ( (PangoCairoFontMap *) font_map, (
double)
config.
dpi );
740 dpi = (
xcb->
screen->height_in_pixels * 25.4 ) / (
double) (
xcb->
screen->height_in_millimeters );
743 g_debug (
"Auto-detected DPI: %.2lf", dpi );
744 PangoFontMap *font_map = pango_cairo_font_map_get_default ();
745 pango_cairo_font_map_set_resolution ( (PangoCairoFontMap *) font_map, dpi );
753 PangoFontDescription *pfd = pango_font_description_from_string ( font );
755 pango_context_set_font_description ( p, pfd );
757 pango_font_description_free ( pfd );
759 PangoLanguage *l = pango_language_get_default ();
760 pango_context_set_language ( p, l );
761 TICK_N (
"configure font" );
766 g_object_unref ( p );
767 cairo_font_options_destroy ( fo );
769 TICK_N (
"textbox setup" );
773 uint32_t values[] = { 1 };
774 xcb_change_window_attributes (
xcb->
connection, box_window, XCB_CW_OVERRIDE_REDIRECT, values );
781 TICK_N (
"setup window attributes" );
784 xcb_atom_t atoms[] = {
785 xcb->
ewmh._NET_WM_STATE_FULLSCREEN,
791 TICK_N (
"setup window fullscreen" );
793 xcb_change_property (
xcb->
connection, XCB_PROP_MODE_REPLACE, box_window,
xcb->
ewmh._NET_WM_NAME,
xcb->
ewmh.UTF8_STRING, 8, 4,
"rofi" );
794 xcb_change_property (
xcb->
connection, XCB_PROP_MODE_REPLACE, box_window, XCB_ATOM_WM_NAME, XCB_ATOM_STRING, 8, 4,
"rofi" );
796 const char wm_class_name[] =
"rofi\0Rofi";
797 xcb_icccm_set_wm_class (
xcb->
connection, box_window, sizeof ( wm_class_name ), wm_class_name );
799 TICK_N (
"setup window name and class" );
801 if ( transparency ) {
810 TICK_N (
"setup startup notification" );
815 pid_t pid = getpid ();
819 const char *hostname = g_get_host_name ();
820 char *ahost = g_hostname_to_ascii ( hostname );
821 if ( ahost != NULL ) {
825 strlen ( ahost ), ahost );
896 if ( selected < state->filtered_lines ) {
935 GList *add_list = NULL;
943 if ( list != NULL ) {
944 pango_attr_list_ref ( list );
947 list = pango_attr_list_new ();
959 for ( GList *iter = g_list_first ( add_list ); iter != NULL; iter = g_list_next ( iter ) ) {
960 pango_attr_list_insert ( list, (PangoAttribute *) ( iter->data ) );
963 pango_attr_list_unref ( list );
964 g_list_free ( add_list );
980 g_debug (
"Redraw view" );
983 cairo_set_operator ( d, CAIRO_OPERATOR_SOURCE );
986 cairo_set_source_surface ( d,
CacheState.fake_bg, 0.0, 0.0 );
989 cairo_set_source_surface ( d,
CacheState.fake_bg,
994 cairo_set_operator ( d, CAIRO_OPERATOR_OVER );
998 cairo_set_source_rgba ( d, 0, 0, 0, 0.0 );
1004 cairo_set_operator ( d, CAIRO_OPERATOR_OVER );
1008 cairo_surface_flush (
CacheState.edit_surf );
1027 TICK_N (
"Filter start" );
1036 if ( state->
text && strlen ( state->
text->
text ) > 0 ) {
1039 glong plen = pattern ? g_utf8_strlen ( pattern, -1 ) : 0;
1047 unsigned int nt = MAX ( 1, state->
num_lines / 500 );
1051 g_mutex_init ( &mutex );
1052 g_cond_init ( &cond );
1053 unsigned int count = nt;
1054 unsigned int steps = ( state->
num_lines + nt ) / nt;
1055 for (
unsigned int i = 0; i < nt; i++ ) {
1056 states[i].
state = state;
1057 states[i].
start = i * steps;
1058 states[i].
stop = MIN ( state->
num_lines, ( i + 1 ) * steps );
1059 states[i].
count = 0;
1060 states[i].
cond = &cond;
1061 states[i].
mutex = &mutex;
1063 states[i].
plen = plen;
1067 g_thread_pool_push (
tpool, &states[i], NULL );
1074 g_mutex_lock ( &mutex );
1075 while (
count > 0 ) {
1076 g_cond_wait ( &cond, &mutex );
1078 g_mutex_unlock ( &mutex );
1080 g_cond_clear ( &cond );
1081 g_mutex_clear ( &mutex );
1082 for (
unsigned int i = 0; i < nt; i++ ) {
1083 if ( j != states[i].start ) {
1086 j += states[i].
count;
1097 for (
unsigned int i = 0; i < state->
num_lines; i++ ) {
1111 if ( height != state->
height ) {
1115 g_debug (
"Resize based on re-filter" );
1118 TICK_N (
"Filter done" );
1128 if ( state && state->
finalize != NULL ) {
1141 xcb->
ewmh.UTF8_STRING,
xcb->
ewmh.UTF8_STRING, XCB_CURRENT_TIME );
1146 xcb->
ewmh.UTF8_STRING,
xcb->
ewmh.UTF8_STRING, XCB_CURRENT_TIME );
1188 if ( selected < state->filtered_lines ) {
1207 if ( index < state->filtered_lines ) {
1236 if ( selected < state->filtered_lines ) {
1310 else if ( rc == 2 ) {
1319 if ( selected < state->filtered_lines ) {
1343 if ( selected < state->filtered_lines ) {
1373 if ( target == NULL ) {
1422 if ( state == NULL ) {
1442 if ( xce->window ==
CacheState.main_window ) {
1443 if ( state->
x != xce->x || state->
y != xce->y ) {
1448 if ( state->
width != xce->width || state->
height != xce->height ) {
1449 state->
width = xce->width;
1450 state->
height = xce->height;
1453 cairo_surface_destroy (
CacheState.edit_surf );
1462 g_debug (
"Re-size window based external request: %d %d", state->
width, state->
height );
1509 for ( i = 0; i < state->
num_modi; i++ ) {
1549 char *defaults = NULL;
1555 if ( strcmp ( name,
"mainbox" ) == 0 ) {
1559 defaults =
"inputbar,message,listview,mode-switcher";
1561 defaults =
"inputbar,message,listview";
1567 else if ( strcmp ( name,
"inputbar" ) == 0 ) {
1569 defaults =
"prompt,entry,overlay,case-indicator";
1575 else if ( strcmp ( name,
"prompt" ) == 0 ) {
1576 if ( state->
prompt != NULL ) {
1577 g_error (
"Prompt widget can only be added once to the layout." );
1589 else if ( strcmp ( name,
"case-indicator" ) == 0 ) {
1591 g_error (
"Case indicator widget can only be added once to the layout." );
1602 else if ( strcmp ( name,
"entry" ) == 0 ) {
1603 if ( state->
text != NULL ) {
1604 g_error (
"Entry textbox widget can only be added once to the layout." );
1616 else if ( strcmp ( name,
"message" ) == 0 ) {
1618 g_error (
"Message widget can only be added once to the layout." );
1630 else if ( strcmp ( name,
"listview" ) == 0 ) {
1632 g_error (
"Listview widget can only be added once to the layout." );
1649 else if ( strcmp ( name,
"mode-switcher" ) == 0 ) {
1651 g_error (
"Mode-switcher can only be added once to the layout." );
1658 for (
unsigned int j = 0; j < state->
num_modi; j++ ) {
1666 else if ( g_ascii_strcasecmp ( name,
"overlay" ) == 0 ) {
1671 else if ( g_ascii_strncasecmp ( name,
"textbox", 7 ) == 0 ) {
1675 else if ( g_ascii_strncasecmp ( name,
"icon", 4 ) == 0 ) {
1686 for (
const GList *iter = list; iter != NULL; iter = g_list_next ( iter ) ) {
1689 g_list_free_full ( list, g_free );
1705 state->
quit = FALSE;
1715 TICK_N (
"Startup notification" );
1718 TICK_N (
"Get active monitor" );
1723 for (
const GList *iter = list; iter != NULL; iter = g_list_next ( iter ) ) {
1726 g_list_free_full ( list, g_free );
1728 if ( state->
text && input ) {
1751 state->
quit = FALSE;
1774 NORMAL, ( msg != NULL ) ? msg :
"", 0, 0 );
1808 if (
CacheState.main_window != XCB_WINDOW_NONE ) {
1816 g_debug (
"Cleanup." );
1822 g_source_remove (
CacheState.repaint_source );
1826 cairo_surface_destroy (
CacheState.fake_bg );
1834 cairo_surface_destroy (
CacheState.edit_surf );
1837 if (
CacheState.main_window != XCB_WINDOW_NONE ) {
1838 g_debug (
"Unmapping and free'ing window" );
1845 if (
map != XCB_COLORMAP_NONE ) {
1847 map = XCB_COLORMAP_NONE;
1850 g_assert ( g_queue_is_empty ( &(
CacheState.views ) ) );
1854 TICK_N (
"Setup Threadpool, start" );
1857 long procs = sysconf ( _SC_NPROCESSORS_CONF );
1863 GError *error = NULL;
1865 if ( error == NULL ) {
1867 g_thread_pool_set_max_idle_time ( 60000 );
1872 if ( error != NULL ) {
1873 g_warning (
"Failed to setup thread pool: '%s'", error->message );
1874 g_error_free ( error );
1875 exit ( EXIT_FAILURE );
1877 TICK_N (
"Setup Threadpool, done" );
1882 g_thread_pool_free (
tpool, TRUE, TRUE );
1896 if ( text == NULL ) {
1908 if ( state->
text ) {
1922 for (
unsigned int j = 0; j < state->
num_modi; j++ ) {
int rofi_theme_get_position(const widget *widget, const char *property, int def)
RofiViewState * current_active_menu
void helper_tokenize_free(rofi_int_matcher **tokens)
void listview_toggle_ellipsizing(listview *lv)
void rofi_view_frame_callback(void)
static void rofi_view_add_widget(RofiViewState *state, widget *parent_widget, const char *name)
void textbox_font(textbox *tb, TextBoxFontType tbft)
static gboolean rofi_view_repaint(G_GNUC_UNUSED void *data)
static void rofi_view_call_thread(gpointer data, gpointer user_data)
cairo_surface_t * edit_surf
void rofi_view_workers_initialize(void)
void rofi_capture_screenshot(void)
void listview_nav_up(listview *lv)
char * mode_get_completion(const Mode *mode, unsigned int selected_line)
void listview_nav_page_prev(listview *lv)
static void rofi_view_nav_first(RofiViewState *state)
void textbox_icon(textbox *tb, cairo_surface_t *icon)
void listview_set_num_elements(listview *lv, unsigned int rows)
listview * listview_create(widget *parent, const char *name, listview_update_callback cb, void *udata, unsigned int eh, gboolean reverse)
static void rofi_view_nav_row_select(RofiViewState *state)
int mode_token_match(const Mode *mode, rofi_int_matcher **tokens, unsigned int selected_line)
rofi_int_matcher ** helper_tokenize(const char *input, int case_sensitive)
@ ROFI_ORIENTATION_VERTICAL
void rofi_view_clear_input(RofiViewState *state)
void textbox_text(textbox *tb, const char *text)
unsigned int rofi_view_get_next_position(const RofiViewState *state)
RofiViewState * rofi_view_get_active(void)
void x11_disable_decoration(xcb_window_t window)
void listview_set_scroll_type(listview *lv, ScrollType type)
container * container_create(widget *parent, const char *name)
void textbox_cursor_end(textbox *tb)
static void rofi_view_trigger_global_action(KeyBindingAction action)
int rofi_scorer_fuzzy_evaluate(const char *pattern, glong plen, const char *str, glong slen)
int distance_get_pixel(RofiDistance d, RofiOrientation ori)
box * box_create(widget *parent, const char *name, RofiOrientation type)
RofiDistance rofi_theme_get_distance(const widget *widget, const char *property, int def)
int rofi_theme_get_boolean(const widget *widget, const char *property, int def)
cairo_surface_t * mode_get_icon(const Mode *mode, unsigned int selected_line, int height)
gboolean textbox_append_text(textbox *tb, const char *pad, const int pad_len)
int rofi_view_error_dialog(const char *msg, int markup)
void rofi_view_maybe_update(RofiViewState *state)
const Mode * rofi_get_mode(unsigned int index)
void rofi_view_handle_text(RofiViewState *state, char *text)
SnLauncheeContext * sncontext
int rofi_theme_get_integer(const widget *widget, const char *property, int def)
static char * get_matching_state(void)
void rofi_view_queue_redraw(void)
unsigned int rofi_view_get_selected_line(const RofiViewState *state)
int textbox_get_font_height(const textbox *tb)
void box_add(box *box, widget *child, gboolean expand)
Mode * rofi_view_get_mode(RofiViewState *state)
void rofi_view_get_current_monitor(int *width, int *height)
void listview_set_mouse_activated_cb(listview *lv, listview_mouse_activated_cb cb, void *udata)
void __create_window(MenuFlags menu_flags)
SortingMethod sorting_method_enum
gboolean helper_validate_font(PangoFontDescription *pfd, const char *font)
cairo_surface_t * fake_bg
void rofi_view_free(RofiViewState *state)
rofi_int_matcher ** tokens
double textbox_get_estimated_char_width(void)
static void rofi_view_reload_message_bar(RofiViewState *state)
static void rofi_view_calculate_window_position(RofiViewState *state)
unsigned int fake_transparency
MouseBindingMouseDefaultAction
MenuReturn rofi_view_get_return_value(const RofiViewState *state)
int textbox_keybinding(textbox *tb, KeyBindingAction action)
unsigned int sidebar_mode
PangoAttrList * helper_token_match_get_pango_attr(RofiHighlightColorStyle th, rofi_int_matcher **tokens, const char *input, PangoAttrList *retv)
void rofi_quit_main_loop(void)
void rofi_view_set_active(RofiViewState *state)
static const int loc_transtable[9]
void listview_nav_right(listview *lv)
xcb_ewmh_connection_t ewmh
void listview_set_num_lines(listview *lv, unsigned int num_lines)
GList * rofi_theme_get_list(const widget *widget, const char *property, const char *defaults)
@ SCOPE_MOUSE_LISTVIEW_ELEMENT
void rofi_view_handle_mouse_motion(RofiViewState *state, gint x, gint y)
unsigned int mode_get_num_entries(const Mode *mode)
const char * textbox_get_visible_text(const textbox *tb)
@ SCOPE_MOUSE_MODE_SWITCHER
int monitor_active(workarea *mon)
unsigned int listview_get_selected(listview *lv)
KeyBindingAction prev_action
void rofi_view_temp_configure_notify(RofiViewState *state, xcb_configure_notify_event_t *xce)
icon * icon_create(widget *parent, const char *name)
char * mode_preprocess_input(Mode *mode, const char *input)
static int rofi_view_calculate_height(RofiViewState *state)
struct _thread_state_view thread_state_view
xcb_visualtype_t * visual
void rofi_view_finalize(RofiViewState *state)
void window_set_atom_prop(xcb_window_t w, xcb_atom_t prop, xcb_atom_t *atoms, int count)
cairo_surface_t * x11_helper_get_bg_surface(void)
char * rofi_expand_path(const char *input)
const char * rofi_theme_get_string(const widget *widget, const char *property, const char *def)
void rofi_view_restart(RofiViewState *state)
static void rofi_view_update_prompt(RofiViewState *state)
xcb_window_t rofi_view_get_window(void)
unsigned int selected_line
static RofiViewState * __rofi_view_state_create(void)
void rofi_view_temp_click_to_exit(RofiViewState *state, xcb_window_t target)
cairo_surface_t * x11_helper_get_screenshot_surface(void)
struct RofiViewState::@4 mouse
static WidgetTriggerActionResult textbox_sidebar_modi_trigger_action(widget *wid, MouseBindingMouseDefaultAction action, G_GNUC_UNUSED gint x, G_GNUC_UNUSED gint y, G_GNUC_UNUSED void *user_data)
unsigned int levenshtein(const char *needle, const glong needlelen, const char *haystack, const glong haystacklen)
void listview_set_multi_select(listview *lv, gboolean enable)
unsigned int rofi_get_num_enabled_modi(void)
void listview_nav_page_next(listview *lv)
@ TOGGLE_CASE_SENSITIVITY
PangoAttrList * textbox_get_pango_attributes(textbox *tb)
static void rofi_view_calculate_window_width(RofiViewState *state)
void container_add(container *container, widget *child)
const char * mode_get_display_name(const Mode *mode)
xcb_connection_t * connection
void listview_set_fixed_num_lines(listview *lv)
static void _rofi_view_reload_row(RofiViewState *state)
static void rofi_view_refilter(RofiViewState *state)
static int lev_sort(const void *p1, const void *p2, void *arg)
xcb_atom_t netatoms[NUM_NETATOMS]
void rofi_view_update(RofiViewState *state, gboolean qr)
static void filter_elements(thread_state *ts, G_GNUC_UNUSED gpointer user_data)
static void rofi_view_nav_row_tab(RofiViewState *state)
void(* finalize)(struct RofiViewState *state)
void display_early_cleanup(void)
void listview_set_max_lines(listview *lv, unsigned int max_lines)
void textbox_set_pango_attributes(textbox *tb, PangoAttrList *list)
void rofi_view_hide(void)
RofiHighlightColorStyle rofi_theme_get_highlight(widget *widget, const char *property, RofiHighlightColorStyle th)
gboolean listview_get_fixed_num_lines(listview *lv)
void listview_nav_left(listview *lv)
xcb_window_t xcb_stuff_get_root_window(void)
static void update_callback(textbox *t, unsigned int index, void *udata, TextBoxFontType type, gboolean full)
char * mode_get_display_value(const Mode *mode, unsigned int selected_line, int *state, GList **attribute_list, int get_entry)
void textbox_set_pango_context(const char *font, PangoContext *p)
RofiViewState * rofi_view_create(Mode *sw, const char *input, MenuFlags menu_flags, void(*finalize)(RofiViewState *))
unsigned int case_sensitive
static void rofi_view_nav_last(RofiViewState *state)
const char * rofi_view_get_user_input(const RofiViewState *state)
void rofi_view_workers_finalize(void)
char * mode_get_message(const Mode *mode)
static void rofi_view_listview_mouse_activated_cb(listview *lv, gboolean custom, void *udata)
unsigned int rofi_view_get_completed(const RofiViewState *state)
gboolean rofi_view_trigger_action(RofiViewState *state, BindingsScope scope, guint action)
void(* callback)(struct _thread_state *t, gpointer data)
void process_result(RofiViewState *state)
unsigned int scroll_method
unsigned int filtered_lines
@ ROFI_ORIENTATION_HORIZONTAL
void listview_set_selected(listview *lv, unsigned int selected)
void listview_nav_down(listview *lv)
static gboolean rofi_view_reload_idle(G_GNUC_UNUSED gpointer data)
static void rofi_view_setup_fake_transparency(const char *const fake_background)
void rofi_view_set_selected_line(RofiViewState *state, unsigned int selected_line)
void rofi_view_set_overlay(RofiViewState *state, const char *text)
static void rofi_view_window_update_size(RofiViewState *state)
void rofi_view_reload(void)
void rofi_view_switch_mode(RofiViewState *state, Mode *mode)
textbox * textbox_create(widget *parent, WidgetType type, const char *name, TextboxFlags flags, TextBoxFontType tbft, const char *text, double xalign, double yalign)