29#define G_LOG_DOMAIN "View"
78 .views = G_QUEUE_INIT,
79 .refilter_timeout = 0,
80 .refilter_timeout_count = 0,
81 .max_refilter_time = 0.0,
82 .delayed_mode = FALSE,
85 .entry_history_enable = TRUE,
86 .entry_history = NULL,
87 .entry_history_length = 0,
88 .entry_history_index = 0,
109static int lev_sort(
const void *p1,
const void *p2,
void *arg) {
112 int *distances = arg;
114 return distances[*a] - distances[*b];
118 if (
config.on_screenshot_taken == NULL)
135 g_warning(
"Nothing to screenshot.");
138 const char *outp = g_getenv(
"ROFI_PNG_OUTPUT");
139 const char *xdg_pict_dir = g_get_user_special_dir(G_USER_DIRECTORY_PICTURES);
140 if (outp == NULL && xdg_pict_dir == NULL) {
141 g_warning(
"XDG user picture directory or ROFI_PNG_OUTPUT is not set. "
142 "Cannot store screenshot.");
146 GDateTime *now = g_date_time_new_now_local();
148 char *timestmp = g_date_time_format(now,
"rofi-%Y-%m-%d-%H%M");
149 char *filename = g_strdup_printf(
"%s-%05d.png", timestmp, 0);
154 fpath = g_build_filename(xdg_pict_dir, filename, NULL);
155 while (g_file_test(fpath, G_FILE_TEST_EXISTS) && index < 99999) {
161 filename = g_strdup_printf(
"%s-%05d.png", timestmp, index);
163 fpath = g_build_filename(xdg_pict_dir, filename, NULL);
166 fpath = g_strdup(outp);
169 cairo_surface_t *surf = cairo_image_surface_create(
171 cairo_status_t status = cairo_surface_status(surf);
172 if (status != CAIRO_STATUS_SUCCESS) {
173 g_warning(
"Failed to produce screenshot '%s', got error: '%s'", fpath,
174 cairo_status_to_string(status));
176 cairo_t *draw = cairo_create(surf);
177 status = cairo_status(draw);
178 if (status != CAIRO_STATUS_SUCCESS) {
179 g_warning(
"Failed to produce screenshot '%s', got error: '%s'", fpath,
180 cairo_status_to_string(status));
183 status = cairo_surface_write_to_png(surf, fpath);
184 if (status != CAIRO_STATUS_SUCCESS) {
185 g_warning(
"Failed to produce screenshot '%s', got error: '%s'", fpath,
186 cairo_status_to_string(status));
193 cairo_surface_destroy(surf);
197 g_date_time_unref(now);
216 GString *emesg = g_string_new(msg);
219 g_string_append_c(emesg,
'\n');
222 emesg,
"The following warnings were detected when starting rofi:\n");
225 for (; iter != NULL && index < 2; iter = g_list_next(iter)) {
226 GString *in_msg = (GString *)(iter->data);
227 g_string_append(emesg,
"\n\n");
228 g_string_append(emesg, in_msg->str);
231 if (g_list_length(iter) > 1) {
232 g_string_append_printf(emesg,
"\nThere are <b>%u</b> more errors.",
233 g_list_length(iter) - 1);
238 g_string_free(emesg, TRUE);
251 const char *action = p->
value.
s;
253 if (
id != UINT32_MAX) {
256 g_warning(
"Failed to parse keybinding: %s\r\n", action);
264 return G_SOURCE_REMOVE;
285 double delay = prop->
value.
f;
313 g_debug(
"stack view.");
317 }
else if (state == NULL && !g_queue_is_empty(&(
CacheState.views))) {
318 g_debug(
"pop view.");
331 unsigned int selected_line) {
334 unsigned int selected = 0;
335 for (
unsigned int i = 0; ((state->
selected_line)) < UINT32_MAX && !selected &&
347 xcb_clear_area(
xcb->connection, 1,
CacheState.main_window, 0, 0, 1, 1);
348 xcb_flush(
xcb->connection);
366 g_free(state->
modes);
383 (next_pos) = state->
line_map[selected + 1];
448 G_GNUC_UNUSED gpointer user_data) {
450 for (
unsigned int i = t->
start; i < t->stop; i++) {
458 glong slen = g_utf8_strlen(str, -1);
459 switch (
config.sorting_method_enum) {
476 g_mutex_lock(t->
mutex);
478 g_cond_signal(t->
cond);
479 g_mutex_unlock(t->
mutex);
484 if (
CacheState.entry_history_enable == FALSE) {
491 gchar *path = g_build_filename(
cache_dir,
"rofi-entry-history.txt", NULL);
492 if (g_file_test(path, G_FILE_TEST_EXISTS)) {
493 FILE *fp = fopen(path,
"r");
498 while ((nread = getline(&line, &len, fp)) != -1) {
502 if (line[nread - 1] ==
'\n') {
503 line[nread - 1] =
'\0';
527 if (
CacheState.entry_history_enable == FALSE) {
532 int max_history = 20;
541 gchar *path = g_build_filename(
cache_dir,
"rofi-entry-history.txt", NULL);
542 g_debug(
"Entry filename output: '%s'", path);
543 FILE *fp = fopen(path,
"w");
545 gssize start = MAX(0, (
CacheState.entry_history_length - max_history));
546 for (gssize i = start; i <
CacheState.entry_history_length; i++) {
547 if (strlen(
CacheState.entry_history[i].string) > 0) {
548 fprintf(fp,
"%s\n",
CacheState.entry_history[i].string);
557 for (ssize_t i = 0; i <
CacheState.entry_history_length; i++) {
606 if (selected < state->filtered_lines) {
640 if (
config.on_selection_changed == NULL)
645 &fstate, NULL, TRUE);
655 unsigned int index,
void *udata) {
657 if (index < state->filtered_lines) {
664 if (index < state->filtered_lines) {
667 &fstate, NULL, TRUE);
675 if (index < state->filtered_lines) {
679 cairo_surface_t *surf_icon =
691 GList *add_list = NULL;
694 &fstate, &add_list, TRUE);
699 cairo_surface_t *surf_icon =
710 pango_attr_list_ref(list);
712 list = pango_attr_list_new();
717 {0.0, 0.0, 0.0, 0.0}};
722 for (GList *iter = g_list_first(add_list); iter != NULL;
723 iter = g_list_next(iter)) {
724 pango_attr_list_insert(list, (PangoAttribute *)(iter->data));
727 pango_attr_list_unref(list);
730 g_list_free(add_list);
760 if (state->
sw == NULL) {
761 return G_SOURCE_REMOVE;
763 GTimer *timer = g_timer_new();
769 TICK_N(
"Filter reload rows");
774 TICK_N(
"Filter tokenize");
780 glong plen = pattern ? g_utf8_strlen(pattern, -1) : 0;
794 unsigned int nt = MAX(1, state->
num_lines / 500);
797 nt = MIN(nt,
config.threads * 4);
801 g_mutex_init(&mutex);
803 unsigned int count = nt;
804 unsigned int steps = (state->
num_lines + nt) / nt;
805 for (
unsigned int i = 0; i < nt; i++) {
806 states[i].
state = state;
807 states[i].
start = i * steps;
810 states[i].
cond = &cond;
811 states[i].
mutex = &mutex;
813 states[i].
plen = plen;
819 g_thread_pool_push(
tpool, &states[i], NULL);
826 g_mutex_lock(&mutex);
828 g_cond_wait(&cond, &mutex);
830 g_mutex_unlock(&mutex);
833 g_mutex_clear(&mutex);
834 for (
unsigned int i = 0; i < nt; i++) {
835 if (j != states[i].start) {
837 sizeof(
unsigned int) * (states[i].
count));
839 j += states[i].
count;
850 double elapsed = g_timer_elapsed(timer, NULL);
855 for (
unsigned int i = 0; i < state->
num_lines; i++) {
860 TICK_N(
"Filter matching done");
869 char *r = g_strdup_printf(
"%u", state->
num_lines);
873 TICK_N(
"Update filter lines");
885 if (height != state->
height) {
889 g_debug(
"Resize based on re-filter");
891 TICK_N(
"Filter resize window based on window ");
896 g_timer_destroy(timer);
897 return G_SOURCE_REMOVE;
906 if (
CacheState.max_refilter_time > (
config.refilter_timeout_limit / 1000.0) &&
911 "Filtering took %f seconds ( %f ), switching to delayed filter\n",
922 "Filtering took %f seconds , switching back to instant filter\n",
945 if (state && state->
finalize != NULL) {
958 if (
CacheState.entry_history_enable && state) {
971static void rofi_view_clipboard_callback(
char *
clipboard_data, G_GNUC_UNUSED
void *user_data) {
989 xcb_convert_selection(
xcb->connection,
CacheState.main_window,
990 XCB_ATOM_PRIMARY,
xcb->ewmh.UTF8_STRING,
991 xcb->ewmh.UTF8_STRING, XCB_CURRENT_TIME);
992 xcb_flush(
xcb->connection);
1004 xcb_convert_selection(
xcb->connection,
CacheState.main_window,
1006 xcb->ewmh.UTF8_STRING, XCB_CURRENT_TIME);
1007 xcb_flush(
xcb->connection);
1010#ifdef ENABLE_WAYLAND
1019 if (selected < state->filtered_lines) {
1022 data = g_strdup(state->
text->
text);
1028 xcb_set_selection_owner(
xcb->connection,
CacheState.main_window,
1029 netatoms[CLIPBOARD], XCB_CURRENT_TIME);
1030 xcb_flush(
xcb->connection);
1033#ifdef ENABLE_WAYLAND
1069 if (selected < state->filtered_lines) {
1088 if (selected < state->filtered_lines) {
1106 if (index < state->filtered_lines) {
1134 if (selected < state->filtered_lines) {
1212 }
else if (rc == 2) {
1221 if (selected < state->filtered_lines) {
1251 if (selected < state->filtered_lines) {
1342 if (target == NULL) {
1376 if (target == NULL) {
1380 if (target == NULL) {
1436 gboolean find_mouse_target) {
1444 if (find_mouse_target) {
1448 if (target != NULL) {
1457 if (find_mouse_target) {
1465 if (
config.on_entry_accepted == NULL)
1474 &fstate, NULL, TRUE);
1483 if (
config.on_menu_canceled == NULL)
1488 if (
config.on_mode_changed == NULL)
1505 if (state == NULL) {
1521 G_GNUC_UNUSED gint y, G_GNUC_UNUSED
void *user_data) {
1534 if (
id != UINT32_MAX) {
1550 G_GNUC_UNUSED gint y, G_GNUC_UNUSED
void *user_data) {
1553 for (i = 0; i < state->
num_modes; i++) {
1592 char *defaults = NULL;
1598 if (strcmp(name,
"mainbox") == 0) {
1601 if (
config.sidebar_mode) {
1602 defaults =
"inputbar,message,listview,mode-switcher";
1604 defaults =
"inputbar,message,listview";
1610 else if (strcmp(name,
"inputbar") == 0) {
1613 defaults =
"prompt,entry,overlay,case-indicator";
1619 else if (strcmp(name,
"prompt") == 0) {
1620 if (state->
prompt != NULL) {
1621 g_error(
"Prompt widget can only be added once to the layout.");
1631 }
else if (strcmp(name,
"num-rows") == 0) {
1637 }
else if (strcmp(name,
"num-filtered-rows") == 0) {
1643 }
else if (strcmp(name,
"textbox-current-entry") == 0) {
1649 }
else if (strcmp(name,
"icon-current-entry") == 0) {
1657 else if (strcmp(name,
"case-indicator") == 0) {
1659 g_error(
"Case indicator widget can only be added once to the layout.");
1672 else if (strcmp(name,
"entry") == 0) {
1673 if (state->
text != NULL) {
1674 g_error(
"Entry textbox widget can only be added once to the layout.");
1688 else if (strcmp(name,
"message") == 0) {
1690 g_error(
"Message widget can only be added once to the layout.");
1704 else if (strcmp(name,
"listview") == 0) {
1706 g_error(
"Listview widget can only be added once to the layout.");
1724 else if (strcmp(name,
"mode-switcher") == 0 || strcmp(name,
"sidebar") == 0) {
1726 g_error(
"Mode-switcher can only be added once to the layout.");
1734 for (
unsigned int j = 0; j < state->
num_modes; j++) {
1744 }
else if (g_ascii_strcasecmp(name,
"overlay") == 0) {
1750 }
else if (g_ascii_strncasecmp(name,
"textbox", 7) == 0) {
1754 }
else if (g_ascii_strncasecmp(name,
"button", 6) == 0) {
1760 }
else if (g_ascii_strncasecmp(name,
"icon", 4) == 0) {
1779 char **a = g_strsplit(defaults,
",", 0);
1780 for (
int i = 0; a && a[i]; i++) {
1786 for (
const GList *iter = g_list_first(list); iter != NULL;
1787 iter = g_list_next(iter)) {
1790 g_list_free_full(list, g_free);
1806 state->
quit = FALSE;
1816 g_debug(
"Disable entry history, because password setup.");
1818 if (
config.disable_history) {
1820 g_debug(
"Disable entry history, because history disable flag.");
1833 TICK_N(
"Startup notification");
1836 TICK_N(
"Get active monitor");
1845 for (
const GList *iter = list; iter != NULL; iter = g_list_next(iter)) {
1847 (
const char *)iter->data);
1849 g_list_free_full(list, g_free);
1852 if (state->
text && input) {
1872 state->
quit = FALSE;
1876 if (
xcb->connection) {
1883 if (
xcb->connection) {
1884 xcb_flush(
xcb->connection);
1896 if (
xcb->sncontext != NULL) {
1897 sn_launchee_context_complete(
xcb->sncontext);
1904 if (
config.on_menu_error == NULL)
1928 NORMAL, (msg != NULL) ? msg :
"", 0, 0);
1953 if (
xcb->sncontext != NULL) {
1954 sn_launchee_context_complete(
xcb->sncontext);
1967 gpointer data G_GNUC_UNUSED) {
1980 if (GPOINTER_TO_UINT(data) == 1) {
1982 g_debug(
"Glib thread-pool bug, received pointer with value 1.");
1993 TICK_N(
"Setup Threadpool, start");
1994 if (
config.threads == 0) {
1996 long procs = sysconf(_SC_NPROCESSORS_CONF);
1998 config.threads = MIN(procs, 128l);
2002 GError *error = NULL;
2006 if (error == NULL) {
2008 g_thread_pool_set_max_idle_time(60000);
2010 g_thread_pool_set_max_threads(
tpool,
config.threads, &error);
2013 if (error != NULL) {
2014 g_warning(
"Failed to setup thread pool: '%s'", error->message);
2015 g_error_free(error);
2019 TICK_N(
"Setup Threadpool, done");
2024 g_thread_pool_free(
tpool, TRUE, FALSE);
2037 return G_SOURCE_REMOVE;
2080 PangoEllipsizeMode mode) {
2099 for (
unsigned int j = 0; j < state->
num_modes; j++) {
2115 proxy->update(state, qr);
2120 proxy->temp_configure_notify(state, xce);
2124 proxy->temp_click_to_exit(state, target);
2132 proxy->set_window_title(title);
2136 proxy->calculate_window_position(state);
2140 proxy->calculate_window_width(state);
2144 return proxy->calculate_window_height(state);
2148 proxy->window_update_size(state);
2160 proxy->__create_window(menu_flags);
2166 proxy->get_current_monitor(width, height);
2170 proxy->set_size(state, width, height);
2174 proxy->get_size(state, width, height);
void display_get_clipboard_data(enum clipboard_type type, ClipboardCb callback, void *user_data)
static const display_proxy * proxy
void display_set_input_focus(guint w)
PangoAttrList * helper_token_match_get_pango_attr(RofiHighlightColorStyle th, rofi_int_matcher **tokens, const char *input, PangoAttrList *retv)
rofi_int_matcher ** helper_tokenize(const char *input, int case_sensitive)
unsigned int levenshtein(const char *needle, const glong needlelen, const char *haystack, const glong haystacklen, int case_sensitive)
Property * rofi_theme_find_property(ThemeWidget *wid, PropertyType type, const char *property, gboolean exact)
gboolean helper_execute_command(const char *wd, const char *cmd, gboolean run_in_term, RofiHelperExecuteContext *context)
void helper_select_next_matching_mode(void)
void helper_tokenize_free(rofi_int_matcher **tokens)
const char * helper_get_matching_mode_str(void)
gboolean helper_execute(const char *wd, char **args, const char *error_precmd, const char *error_cmd, RofiHelperExecuteContext *context)
ThemeWidget * rofi_config_find_widget(const char *name, const char *state, gboolean exact)
int helper_parse_setup(char *string, char ***output, int *length,...)
void helper_select_previous_matching_mode(void)
int parse_case_sensitivity(const char *input)
int rofi_scorer_fuzzy_evaluate(const char *pattern, glong plen, const char *str, glong slen, int case_sensitive)
guint key_binding_get_action_from_name(const char *name)
MouseBindingMouseDefaultAction
@ SCOPE_MOUSE_LISTVIEW_ELEMENT
@ SCOPE_MOUSE_MODE_SWITCHER
@ TOGGLE_CASE_SENSITIVITY
char * mode_preprocess_input(Mode *mode, const char *input)
cairo_surface_t * mode_get_icon(Mode *mode, unsigned int selected_line, unsigned int height)
const char * mode_get_display_name(const Mode *mode)
unsigned int mode_get_num_entries(const Mode *mode)
char * mode_get_message(const Mode *mode)
int mode_token_match(const Mode *mode, rofi_int_matcher **tokens, unsigned int selected_line)
char * mode_get_display_value(const Mode *mode, unsigned int selected_line, int *state, GList **attribute_list, int get_entry)
char * mode_get_completion(const Mode *mode, unsigned int selected_line)
const Mode * rofi_get_mode(unsigned int index)
void rofi_quit_main_loop(void)
unsigned int rofi_get_num_enabled_modes(void)
void textbox_font(textbox *tb, TextBoxFontType tbft)
int textbox_keybinding(textbox *tb, KeyBindingAction action)
void textbox_set_pango_attributes(textbox *tb, PangoAttrList *list)
const char * textbox_get_visible_text(const textbox *tb)
int textbox_get_cursor(const textbox *tb)
void textbox_cursor(textbox *tb, int pos)
textbox * textbox_create(widget *parent, WidgetType type, const char *name, TextboxFlags flags, TextBoxFontType tbft, const char *text, double xalign, double yalign)
void textbox_cursor_end(textbox *tb)
gboolean textbox_append_text(textbox *tb, const char *pad, const int pad_len)
PangoAttrList * textbox_get_pango_attributes(textbox *tb)
void textbox_text(textbox *tb, const char *text)
char * textbox_get_text(const textbox *tb)
void rofi_view_cleanup(void)
void rofi_view_set_overlay(RofiViewState *state, const char *text)
void __create_window(MenuFlags menu_flags)
void rofi_view_clear_input(RofiViewState *state)
void rofi_view_switch_mode(RofiViewState *state, Mode *mode)
Mode * rofi_view_get_mode(RofiViewState *state)
void rofi_view_hide(void)
void rofi_view_calculate_window_position(RofiViewState *state)
void rofi_view_reload(void)
xcb_window_t rofi_view_get_window(void)
void rofi_view_remove_active(RofiViewState *state)
void rofi_view_set_overlay_timeout(RofiViewState *state, const char *text)
int rofi_view_error_dialog(const char *msg, int markup)
void rofi_view_set_active(RofiViewState *state)
void rofi_view_queue_redraw(void)
RofiViewState * rofi_view_get_active(void)
void rofi_view_restart(RofiViewState *state)
void rofi_view_handle_text(RofiViewState *state, char *text)
void rofi_view_trigger_action(RofiViewState *state, BindingsScope scope, guint action)
MenuReturn rofi_view_get_return_value(const RofiViewState *state)
unsigned int rofi_view_get_completed(const RofiViewState *state)
gboolean rofi_view_check_action(RofiViewState *state, BindingsScope scope, guint action)
const char * rofi_view_get_user_input(const RofiViewState *state)
void rofi_view_handle_mouse_motion(RofiViewState *state, gint x, gint y, gboolean find_mouse_target)
void rofi_view_temp_click_to_exit(RofiViewState *state, xcb_window_t target)
void rofi_view_finalize(RofiViewState *state)
void rofi_view_set_selected_line(RofiViewState *state, unsigned int selected_line)
void rofi_view_temp_configure_notify(RofiViewState *state, xcb_configure_notify_event_t *xce)
void rofi_view_frame_callback(void)
void rofi_view_free(RofiViewState *state)
RofiViewState * rofi_view_create(Mode *sw, const char *input, MenuFlags menu_flags, void(*finalize)(RofiViewState *))
unsigned int rofi_view_get_selected_line(const RofiViewState *state)
unsigned int rofi_view_get_next_position(const RofiViewState *state)
void rofi_view_maybe_update(RofiViewState *state)
void rofi_view_ping_mouse(RofiViewState *state)
void rofi_capture_screenshot(void)
void rofi_view_workers_initialize(void)
WidgetTriggerActionResult textbox_button_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_size(RofiViewState *state, gint width, gint height)
void rofi_view_set_window_title(const char *title)
void input_history_save(void)
void input_history_initialize(void)
void rofi_view_ellipsize_listview(RofiViewState *state, PangoEllipsizeMode mode)
void rofi_view_set_cursor(RofiCursorType type)
void rofi_view_get_current_monitor(int *width, int *height)
void rofi_view_workers_finalize(void)
void rofi_view_pool_refresh(void)
void rofi_view_get_size(RofiViewState *state, gint *width, gint *height)
void box_add(box *wid, widget *child, gboolean expand)
box * box_create(widget *parent, const char *name, RofiOrientation type)
void container_add(container *cont, widget *child)
container * container_create(widget *parent, const char *name)
void icon_set_surface(icon *icon_widget, cairo_surface_t *surf)
icon * icon_create(widget *parent, const char *name)
void listview_nav_page_next(listview *lv)
void listview_set_fixed_num_lines(listview *lv)
struct _listview listview
listview * listview_create(widget *parent, const char *name, listview_update_callback cb, listview_page_changed_cb page_cb, void *udata, unsigned int eh, gboolean reverse)
void listview_set_num_elements(listview *lv, unsigned int rows)
void listview_nav_right(listview *lv)
void listview_set_mouse_activated_cb(listview *lv, listview_mouse_activated_cb cb, void *udata)
void listview_toggle_ellipsizing(listview *lv)
void listview_set_ellipsize(listview *lv, PangoEllipsizeMode mode)
void listview_set_selected(listview *lv, unsigned int selected)
void listview_set_max_lines(listview *lv, unsigned int max_lines)
void listview_nav_left(listview *lv)
void listview_set_scroll_type(listview *lv, ScrollType type)
void listview_nav_prev(listview *lv)
unsigned int listview_get_selected(listview *lv)
void listview_set_filtered(listview *lv, gboolean filtered)
void listview_nav_up(listview *lv)
void listview_nav_next(listview *lv)
void listview_nav_page_prev(listview *lv)
void listview_set_selection_changed_callback(listview *lv, listview_selection_changed_callback cb, void *udata)
void listview_nav_down(listview *lv)
@ ROFI_ORIENTATION_HORIZONTAL
@ ROFI_ORIENTATION_VERTICAL
struct _thread_state thread_state
GList * list_of_warning_msgs
void process_result(RofiViewState *state)
unsigned int filtered_lines
icon * icon_current_entry
struct RofiViewState::@205064276262334135157147273370175004036316141305 mouse
unsigned int previous_line
void(* finalize)(struct RofiViewState *state)
textbox * tb_filtered_rows
rofi_int_matcher ** tokens
textbox * tb_current_entry
unsigned int selected_line
KeyBindingAction prev_action
void(* callback)(struct _thread_state *t, gpointer data)
int rofi_theme_get_integer(const widget *wid, const char *property, int def)
RofiHighlightColorStyle rofi_theme_get_highlight(widget *wid, const char *property, RofiHighlightColorStyle th)
GList * rofi_theme_get_list_strings(const widget *wid, const char *property)
const char * rofi_theme_get_string(const widget *wid, const char *property, const char *def)
struct _view_proxy view_proxy
static void rofi_view_call_thread(gpointer data, gpointer user_data)
static void rofi_view_nav_last(RofiViewState *state)
void view_init(const view_proxy *view_in)
static void rofi_view_set_user_timeout(G_GNUC_UNUSED gpointer data)
void rofi_view_refilter(RofiViewState *state)
static void rofi_error_user_callback(const char *msg)
static char * get_matching_state(RofiViewState *state)
struct _thread_state_view thread_state_view
static void rofi_view_nav_row_select(RofiViewState *state)
static void rofi_view_listview_mouse_activated_cb(listview *lv, gboolean custom, void *udata)
static gboolean rofi_view_overlay_timeout(G_GNUC_UNUSED gpointer user_data)
static void screenshot_taken_user_callback(const char *path)
static void rofi_view_add_widget(RofiViewState *state, widget *parent_widget, const char *name)
static void update_callback(textbox *t, icon *ico, unsigned int index, void *udata, TextBoxFontType *type, gboolean full)
static void rofi_view_nav_row_tab(RofiViewState *state)
void rofi_view_window_update_size(RofiViewState *state)
static void rofi_view_reload_message_bar(RofiViewState *state)
static void rofi_view_nav_first(RofiViewState *state)
static gboolean rofi_view_refilter_real(RofiViewState *state)
static void page_changed_callback(void)
void rofi_view_update(RofiViewState *state, gboolean qr)
static RofiViewState * __rofi_view_state_create(void)
static void rofi_view_trigger_global_action(KeyBindingAction action)
static void rofi_view_input_changed(void)
void rofi_view_calculate_window_width(struct RofiViewState *state)
static void filter_elements(thread_state *ts, G_GNUC_UNUSED gpointer user_data)
void process_result(RofiViewState *state)
static void rofi_view_update_prompt(RofiViewState *state)
static gboolean rofi_view_user_timeout(G_GNUC_UNUSED gpointer data)
RofiViewState * current_active_menu
static void rofi_thread_pool_state_free(gpointer data)
static int rofi_thread_workers_sort(gconstpointer a, gconstpointer b, gpointer data G_GNUC_UNUSED)
int rofi_view_calculate_window_height(RofiViewState *state)
static void selection_changed_user_callback(unsigned int index, RofiViewState *state)
static void rofi_view_take_action(const char *name)
static void selection_changed_callback(G_GNUC_UNUSED listview *lv, unsigned int index, void *udata)
static void rofi_quit_user_callback(RofiViewState *state)
struct _rofi_view_cache_state CacheState
static RofiCursorType rofi_view_resolve_cursor(RofiViewState *state, gint x, gint y)
static int lev_sort(const void *p1, const void *p2, void *arg)
static WidgetTriggerActionResult textbox_sidebar_modes_trigger_action(widget *wid, MouseBindingMouseDefaultAction action, G_GNUC_UNUSED gint x, G_GNUC_UNUSED gint y, G_GNUC_UNUSED void *user_data)
static void _rofi_view_reload_row(RofiViewState *state)
static void rofi_view_refilter_force(RofiViewState *state)
int xcb_configure_notify_event_t
void xcb_stuff_set_clipboard(char *data)
xcb_atom_t netatoms[NUM_NETATOMS]
X11CursorType cursor_type
static X11CursorType rofi_cursor_type_to_x11_cursor_type(RofiCursorType type)