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;
507 g_free ( state->
modi );
527 if ( ( selected + 1 ) < state->
num_lines ) {
528 ( next_pos ) = state->
line_map[selected + 1];
600 for (
unsigned int i = t->
start; i < t->stop; i++ ) {
608 glong slen = g_utf8_strlen ( str, -1 );
624 if ( t->
acount != NULL ) {
625 g_mutex_lock ( t->
mutex );
627 g_cond_signal ( t->
cond );
628 g_mutex_unlock ( t->
mutex );
634 cairo_surface_t *s = NULL;
640 if ( g_strcmp0 ( fake_background,
"real" ) == 0 ) {
643 else if ( g_strcmp0 ( fake_background,
"screenshot" ) == 0 ) {
646 else if ( g_strcmp0 ( fake_background,
"background" ) == 0 ) {
651 g_debug (
"Opening %s to use as background.", fpath );
652 s = cairo_image_surface_create_from_png ( fpath );
656 TICK_N (
"Get surface." );
658 if ( cairo_surface_status ( s ) != CAIRO_STATUS_SUCCESS ) {
659 g_debug (
"Failed to open surface fake background: %s",
660 cairo_status_to_string ( cairo_surface_status ( s ) ) );
661 cairo_surface_destroy ( s );
666 cairo_t *dr = cairo_create (
CacheState.fake_bg );
668 cairo_set_source_surface ( dr, s, 0, 0 );
674 cairo_destroy ( dr );
675 cairo_surface_destroy ( s );
678 TICK_N (
"Fake transparency" );
683 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;
684 uint32_t selval[] = {
685 XCB_BACK_PIXMAP_NONE, 0,
687 XCB_BACKING_STORE_NOT_USEFUL,
688 XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE |
689 XCB_EVENT_MASK_KEY_PRESS | XCB_EVENT_MASK_KEY_RELEASE | XCB_EVENT_MASK_KEYMAP_STATE |
690 XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_FOCUS_CHANGE | XCB_EVENT_MASK_BUTTON_1_MOTION,
694 xcb_window_t box_window = xcb_generate_id (
xcb->
connection );
696 0, 0, 200, 100, 0, XCB_WINDOW_CLASS_INPUT_OUTPUT,
697 visual->visual_id, selmask, selval );
698 xcb_generic_error_t *error;
701 g_error (
"xcb_create_window() failed error=0x%x\n", error->error_code );
702 exit ( EXIT_FAILURE );
704 TICK_N (
"xcb create window" );
708 TICK_N (
"xcb create gc" );
717 TICK_N (
"create cairo surface" );
719 cairo_font_options_t *fo = cairo_font_options_create ();
721 cairo_surface_get_font_options (
CacheState.edit_surf, fo );
723 PangoContext *p = pango_cairo_create_context (
CacheState.edit_draw );
725 pango_cairo_context_set_font_options ( p, fo );
726 TICK_N (
"pango cairo font setup" );
733 PangoFontMap *font_map = pango_cairo_font_map_get_default ();
734 pango_cairo_font_map_set_resolution ( (PangoCairoFontMap *) font_map, (
double)
config.
dpi );
743 dpi = (
xcb->
screen->height_in_pixels * 25.4 ) / (
double) (
xcb->
screen->height_in_millimeters );
746 g_debug (
"Auto-detected DPI: %.2lf", dpi );
747 PangoFontMap *font_map = pango_cairo_font_map_get_default ();
748 pango_cairo_font_map_set_resolution ( (PangoCairoFontMap *) font_map, dpi );
756 PangoFontDescription *pfd = pango_font_description_from_string ( font );
758 pango_context_set_font_description ( p, pfd );
760 pango_font_description_free ( pfd );
762 PangoLanguage *l = pango_language_get_default ();
763 pango_context_set_language ( p, l );
764 TICK_N (
"configure font" );
769 g_object_unref ( p );
770 cairo_font_options_destroy ( fo );
772 TICK_N (
"textbox setup" );
776 uint32_t values[] = { 1 };
777 xcb_change_window_attributes (
xcb->
connection, box_window, XCB_CW_OVERRIDE_REDIRECT, values );
784 TICK_N (
"setup window attributes" );
787 xcb_atom_t atoms[] = {
788 xcb->
ewmh._NET_WM_STATE_FULLSCREEN,
794 TICK_N (
"setup window fullscreen" );
796 xcb_change_property (
xcb->
connection, XCB_PROP_MODE_REPLACE, box_window,
xcb->
ewmh._NET_WM_NAME,
xcb->
ewmh.UTF8_STRING, 8, 4,
"rofi" );
797 xcb_change_property (
xcb->
connection, XCB_PROP_MODE_REPLACE, box_window, XCB_ATOM_WM_NAME, XCB_ATOM_STRING, 8, 4,
"rofi" );
799 const char wm_class_name[] =
"rofi\0Rofi";
800 xcb_icccm_set_wm_class (
xcb->
connection, box_window, sizeof ( wm_class_name ), wm_class_name );
802 TICK_N (
"setup window name and class" );
804 if ( transparency ) {
813 TICK_N (
"setup startup notification" );
818 pid_t pid = getpid ();
822 const char *hostname = g_get_host_name ();
823 char *ahost = g_hostname_to_ascii ( hostname );
824 if ( ahost != NULL ) {
828 strlen ( ahost ), ahost );
899 if ( selected < state->filtered_lines ) {
938 GList *add_list = NULL;
946 if ( list != NULL ) {
947 pango_attr_list_ref ( list );
950 list = pango_attr_list_new ();
962 for ( GList *iter = g_list_first ( add_list ); iter != NULL; iter = g_list_next ( iter ) ) {
963 pango_attr_list_insert ( list, (PangoAttribute *) ( iter->data ) );
966 pango_attr_list_unref ( list );
967 g_list_free ( add_list );
983 g_debug (
"Redraw view" );
986 cairo_set_operator ( d, CAIRO_OPERATOR_SOURCE );
989 cairo_set_source_surface ( d,
CacheState.fake_bg, 0.0, 0.0 );
992 cairo_set_source_surface ( d,
CacheState.fake_bg,
997 cairo_set_operator ( d, CAIRO_OPERATOR_OVER );
1001 cairo_set_source_rgba ( d, 0, 0, 0, 0.0 );
1007 cairo_set_operator ( d, CAIRO_OPERATOR_OVER );
1015 cairo_surface_flush (
CacheState.edit_surf );
1034 TICK_N (
"Filter start" );
1043 if ( state->
text && strlen ( state->
text->
text ) > 0 ) {
1046 glong plen = pattern ? g_utf8_strlen ( pattern, -1 ) : 0;
1054 unsigned int nt = MAX ( 1, state->
num_lines / 500 );
1058 g_mutex_init ( &mutex );
1059 g_cond_init ( &cond );
1060 unsigned int count = nt;
1061 unsigned int steps = ( state->
num_lines + nt ) / nt;
1062 for (
unsigned int i = 0; i < nt; i++ ) {
1063 states[i].
state = state;
1064 states[i].
start = i * steps;
1065 states[i].
stop = MIN ( state->
num_lines, ( i + 1 ) * steps );
1066 states[i].
count = 0;
1067 states[i].
cond = &cond;
1068 states[i].
mutex = &mutex;
1070 states[i].
plen = plen;
1074 g_thread_pool_push (
tpool, &states[i], NULL );
1081 g_mutex_lock ( &mutex );
1082 while (
count > 0 ) {
1083 g_cond_wait ( &cond, &mutex );
1085 g_mutex_unlock ( &mutex );
1087 g_cond_clear ( &cond );
1088 g_mutex_clear ( &mutex );
1089 for (
unsigned int i = 0; i < nt; i++ ) {
1090 if ( j != states[i].start ) {
1093 j += states[i].
count;
1104 for (
unsigned int i = 0; i < state->
num_lines; i++ ) {
1118 if ( height != state->
height ) {
1122 g_debug (
"Resize based on re-filter" );
1125 TICK_N (
"Filter done" );
1135 if ( state && state->
finalize != NULL ) {
1148 xcb->
ewmh.UTF8_STRING,
xcb->
ewmh.UTF8_STRING, XCB_CURRENT_TIME );
1153 xcb->
ewmh.UTF8_STRING,
xcb->
ewmh.UTF8_STRING, XCB_CURRENT_TIME );
1190 if ( selected < state->filtered_lines ) {
1209 if ( index < state->filtered_lines ) {
1238 if ( selected < state->filtered_lines ) {
1312 else if ( rc == 2 ) {
1321 if ( selected < state->filtered_lines ) {
1345 if ( selected < state->filtered_lines ) {
1375 if ( target == NULL ) {
1424 if ( state == NULL ) {
1444 if ( xce->window ==
CacheState.main_window ) {
1445 if ( state->
x != xce->x || state->
y != xce->y ) {
1450 if ( state->
width != xce->width || state->
height != xce->height ) {
1451 state->
width = xce->width;
1452 state->
height = xce->height;
1455 cairo_surface_destroy (
CacheState.edit_surf );
1464 g_debug (
"Re-size window based external request: %d %d", state->
width, state->
height );
1511 for ( i = 0; i < state->
num_modi; i++ ) {
1551 char *defaults = NULL;
1557 if ( strcmp ( name,
"mainbox" ) == 0 ) {
1560 defaults =
"inputbar,message,listview,sidebar";
1565 else if ( strcmp ( name,
"inputbar" ) == 0 ) {
1567 defaults =
"prompt,entry,case-indicator";
1573 else if ( strcmp ( name,
"prompt" ) == 0 ) {
1574 if ( state->
prompt != NULL ) {
1575 g_error (
"Prompt widget can only be added once to the layout." );
1587 else if ( strcmp ( name,
"case-indicator" ) == 0 ) {
1589 g_error (
"Case indicator widget can only be added once to the layout." );
1600 else if ( strcmp ( name,
"entry" ) == 0 ) {
1601 if ( state->
text != NULL ) {
1602 g_error (
"Entry textbox widget can only be added once to the layout." );
1614 else if ( strcmp ( name,
"message" ) == 0 ) {
1616 g_error (
"Message widget can only be added once to the layout." );
1628 else if ( strcmp ( name,
"listview" ) == 0 ) {
1630 g_error (
"Listview widget can only be added once to the layout." );
1647 else if ( strcmp ( name,
"sidebar" ) == 0 ) {
1649 g_error (
"Sidebar widget can only be added once to the layout." );
1657 for (
unsigned int j = 0; j < state->
num_modi; j++ ) {
1666 else if ( g_ascii_strncasecmp ( name,
"textbox", 7 ) == 0 ) {
1670 else if ( g_ascii_strncasecmp ( name,
"icon", 4 ) == 0 ) {
1681 for (
const GList *iter = list; iter != NULL; iter = g_list_next ( iter ) ) {
1684 g_list_free_full ( list, g_free );
1700 state->
quit = FALSE;
1710 TICK_N (
"Startup notification" );
1713 TICK_N (
"Get active monitor" );
1718 for (
const GList *iter = list; iter != NULL; iter = g_list_next ( iter ) ) {
1721 g_list_free_full ( list, g_free );
1723 if ( state->
text && input ) {
1748 state->
quit = FALSE;
1771 NORMAL, ( msg != NULL ) ? msg :
"", 0, 0 );
1805 if (
CacheState.main_window != XCB_WINDOW_NONE ) {
1813 g_debug (
"Cleanup." );
1819 g_source_remove (
CacheState.repaint_source );
1823 cairo_surface_destroy (
CacheState.fake_bg );
1831 cairo_surface_destroy (
CacheState.edit_surf );
1834 if (
CacheState.main_window != XCB_WINDOW_NONE ) {
1835 g_debug (
"Unmapping and free'ing window" );
1842 if (
map != XCB_COLORMAP_NONE ) {
1844 map = XCB_COLORMAP_NONE;
1847 g_assert ( g_queue_is_empty ( &(
CacheState.views ) ) );
1851 TICK_N (
"Setup Threadpool, start" );
1854 long procs = sysconf ( _SC_NPROCESSORS_CONF );
1860 GError *error = NULL;
1862 if ( error == NULL ) {
1864 g_thread_pool_set_max_idle_time ( 60000 );
1869 if ( error != NULL ) {
1870 g_warning (
"Failed to setup thread pool: '%s'", error->message );
1871 g_error_free ( error );
1872 exit ( EXIT_FAILURE );
1874 TICK_N (
"Setup Threadpool, done" );
1879 g_thread_pool_free (
tpool, TRUE, TRUE );
1893 if ( text == NULL ) {
1912 if ( state->
text ) {
1926 for (
unsigned int j = 0; j < state->
num_modi; j++ ) {
void listview_set_selected(listview *lv, unsigned int selected)
unsigned int levenshtein(const char *needle, const glong needlelen, const char *haystack, const glong haystacklen)
static const int loc_transtable[9]
void textbox_cursor_end(textbox *tb)
GList * rofi_theme_get_list(const widget *widget, const char *property, const char *defaults)
void rofi_view_get_current_monitor(int *width, int *height)
cairo_surface_t * fake_bg
MouseBindingMouseDefaultAction
void rofi_quit_main_loop(void)
unsigned int fake_transparency
void rofi_view_finalize(RofiViewState *state)
listview * listview_create(widget *parent, const char *name, listview_update_callback cb, void *udata, unsigned int eh, gboolean reverse)
void display_early_cleanup(void)
int mode_token_match(const Mode *mode, rofi_int_matcher **tokens, unsigned int selected_line)
void rofi_view_clear_input(RofiViewState *state)
unsigned int case_sensitive
static void rofi_view_nav_last(RofiViewState *state)
void x11_disable_decoration(xcb_window_t window)
void textbox_text(textbox *tb, const char *text)
static void update_callback(textbox *t, unsigned int index, void *udata, TextBoxFontType type, gboolean full)
struct _thread_state_view thread_state_view
void rofi_view_reload(void)
unsigned int sidebar_mode
PangoAttrList * helper_token_match_get_pango_attr(RofiHighlightColorStyle th, rofi_int_matcher **tokens, const char *input, PangoAttrList *retv)
void rofi_view_temp_configure_notify(RofiViewState *state, xcb_configure_notify_event_t *xce)
void listview_nav_up(listview *lv)
void listview_nav_page_prev(listview *lv)
void rofi_view_workers_finalize(void)
void textbox_icon(textbox *tb, cairo_surface_t *icon)
void rofi_view_queue_redraw(void)
xcb_window_t xcb_stuff_get_root_window(void)
Mode * rofi_view_get_mode(RofiViewState *state)
double textbox_get_estimated_char_width(void)
void listview_set_num_elements(listview *lv, unsigned int rows)
KeyBindingAction prev_action
cairo_surface_t * mode_get_icon(const Mode *mode, unsigned int selected_line, int height)
static void rofi_view_update_prompt(RofiViewState *state)
char * mode_preprocess_input(Mode *mode, const char *input)
const char * rofi_view_get_user_input(const RofiViewState *state)
void __create_window(MenuFlags menu_flags)
const char * rofi_theme_get_string(const widget *widget, const char *property, const char *def)
static void rofi_view_setup_fake_transparency(const char *const fake_background)
unsigned int scroll_method
void listview_set_scroll_type(listview *lv, ScrollType type)
static void rofi_view_nav_first(RofiViewState *state)
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)
void rofi_view_set_selected_line(RofiViewState *state, unsigned int selected_line)
void rofi_view_temp_click_to_exit(RofiViewState *state, xcb_window_t target)
void textbox_font(textbox *tb, TextBoxFontType tbft)
int rofi_theme_get_boolean(const widget *widget, const char *property, int def)
RofiViewState * rofi_view_get_active(void)
static void rofi_view_refilter(RofiViewState *state)
RofiDistance rofi_theme_get_distance(const widget *widget, const char *property, int def)
unsigned int rofi_get_num_enabled_modi(void)
textbox * textbox_create(widget *parent, WidgetType type, const char *name, TextboxFlags flags, TextBoxFontType tbft, const char *text, double xalign, double yalign)
cairo_surface_t * x11_helper_get_bg_surface(void)
static void filter_elements(thread_state *ts, G_GNUC_UNUSED gpointer user_data)
MenuReturn rofi_view_get_return_value(const RofiViewState *state)
void listview_nav_right(listview *lv)
xcb_ewmh_connection_t ewmh
void rofi_view_workers_initialize(void)
void listview_set_mouse_activated_cb(listview *lv, listview_mouse_activated_cb cb, void *udata)
void listview_set_num_lines(listview *lv, unsigned int num_lines)
void rofi_view_frame_callback(void)
rofi_int_matcher ** helper_tokenize(const char *input, int case_sensitive)
void rofi_view_free(RofiViewState *state)
RofiViewState * current_active_menu
void rofi_view_handle_mouse_motion(RofiViewState *state, gint x, gint y)
static void rofi_view_nav_row_select(RofiViewState *state)
RofiHighlightColorStyle rofi_theme_get_highlight(widget *widget, const char *property, RofiHighlightColorStyle th)
void rofi_view_hide(void)
xcb_window_t rofi_view_get_window(void)
void rofi_view_update(RofiViewState *state, gboolean qr)
struct RofiViewState::@4 mouse
unsigned int rofi_view_get_next_position(const RofiViewState *state)
static void rofi_view_listview_mouse_activated_cb(listview *lv, gboolean custom, void *udata)
unsigned int listview_get_selected(listview *lv)
int textbox_keybinding(textbox *tb, KeyBindingAction action)
icon * icon_create(widget *parent, const char *name)
void rofi_view_handle_text(RofiViewState *state, char *text)
const char * textbox_get_visible_text(const textbox *tb)
unsigned int rofi_view_get_completed(const RofiViewState *state)
void rofi_view_set_active(RofiViewState *state)
int rofi_view_error_dialog(const char *msg, int markup)
box * box_create(widget *parent, const char *name, RofiOrientation type)
gboolean rofi_view_trigger_action(RofiViewState *state, BindingsScope scope, guint action)
static void rofi_view_nav_row_tab(RofiViewState *state)
static char * get_matching_state(void)
static void rofi_view_window_update_size(RofiViewState *state)
void listview_set_multi_select(listview *lv, gboolean enable)
static void rofi_view_calculate_window_position(RofiViewState *state)
char * rofi_expand_path(const char *input)
xcb_connection_t * connection
void process_result(RofiViewState *state)
void listview_set_fixed_num_lines(listview *lv)
SortingMethod sorting_method_enum
void rofi_view_switch_mode(RofiViewState *state, Mode *mode)
unsigned int mode_get_num_entries(const Mode *mode)
void(* finalize)(struct RofiViewState *state)
int distance_get_pixel(RofiDistance d, RofiOrientation ori)
static int rofi_view_calculate_height(RofiViewState *state)
char * mode_get_display_value(const Mode *mode, unsigned int selected_line, int *state, GList **attribute_list, int get_entry)
int monitor_active(workarea *mon)
xcb_visualtype_t * visual
unsigned int filtered_lines
void window_set_atom_prop(xcb_window_t w, xcb_atom_t prop, xcb_atom_t *atoms, int count)
void listview_nav_page_next(listview *lv)
PangoAttrList * textbox_get_pango_attributes(textbox *tb)
static void rofi_view_add_widget(RofiViewState *state, widget *parent_widget, const char *name)
void rofi_view_restart(RofiViewState *state)
static void rofi_view_reload_message_bar(RofiViewState *state)
void helper_tokenize_free(rofi_int_matcher **tokens)
void(* callback)(struct _thread_state *t, gpointer data)
void rofi_view_maybe_update(RofiViewState *state)
int rofi_theme_get_position(const widget *widget, const char *property, int def)
static gboolean rofi_view_reload_idle(G_GNUC_UNUSED gpointer data)
SnLauncheeContext * sncontext
const Mode * rofi_get_mode(unsigned int index)
void listview_set_max_lines(listview *lv, unsigned int max_lines)
char * mode_get_message(const Mode *mode)
const char * mode_get_display_name(const Mode *mode)
rofi_int_matcher ** tokens
unsigned int rofi_view_get_selected_line(const RofiViewState *state)
static void rofi_view_calculate_window_width(RofiViewState *state)
void rofi_view_set_overlay(RofiViewState *state, const char *text)
int textbox_get_font_height(const textbox *tb)
gboolean listview_get_fixed_num_lines(listview *lv)
void listview_nav_left(listview *lv)
static gboolean rofi_view_repaint(G_GNUC_UNUSED void *data)
static void rofi_view_call_thread(gpointer data, gpointer user_data)
void container_add(container *container, widget *child)
unsigned int selected_line
static RofiViewState * __rofi_view_state_create(void)
void listview_nav_down(listview *lv)
cairo_surface_t * edit_surf
void textbox_set_pango_attributes(textbox *tb, PangoAttrList *list)
int rofi_theme_get_integer(const widget *widget, const char *property, int def)
void rofi_capture_screenshot(void)
static void rofi_view_trigger_global_action(KeyBindingAction action)
void box_add(box *box, widget *child, gboolean expand)
RofiViewState * rofi_view_create(Mode *sw, const char *input, MenuFlags menu_flags, void(*finalize)(RofiViewState *))
char * mode_get_completion(const Mode *mode, unsigned int selected_line)
xcb_atom_t netatoms[NUM_NETATOMS]
static void _rofi_view_reload_row(RofiViewState *state)
static int lev_sort(const void *p1, const void *p2, void *arg)
gboolean textbox_append_text(textbox *tb, const char *pad, const int pad_len)
int rofi_scorer_fuzzy_evaluate(const char *pattern, glong plen, const char *str, glong slen)
container * container_create(widget *parent, const char *name)
cairo_surface_t * x11_helper_get_screenshot_surface(void)
gboolean helper_validate_font(PangoFontDescription *pfd, const char *font)
void textbox_set_pango_context(const char *font, PangoContext *p)