mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
[Doc] Fix some missing docu.
This commit is contained in:
parent
063195922f
commit
d9935e594e
13 changed files with 74 additions and 21 deletions
|
@ -186,6 +186,9 @@ gboolean parse_keys_abe(NkBindings *bindings);
|
|||
*/
|
||||
void setup_abe(void);
|
||||
|
||||
/**
|
||||
* List all available key bindings to the terminal.
|
||||
*/
|
||||
void abe_list_all_bindings(gboolean is_term);
|
||||
/**
|
||||
* @param name Don't have the name.
|
||||
|
|
|
@ -142,9 +142,11 @@ void rofi_theme_property_free(Property *p);
|
|||
/**
|
||||
* @param p The property to free.
|
||||
*
|
||||
* Make a newly allocted copy of the property.
|
||||
*
|
||||
* @returns a copy of p
|
||||
*/
|
||||
Property *rofi_theme_property_copy(const Property *p, void *);
|
||||
Property *rofi_theme_property_copy(const Property *p, G_GNUC_UNUSED void *);
|
||||
/**
|
||||
* @param widget
|
||||
*
|
||||
|
@ -463,9 +465,24 @@ void rofi_theme_free_parsed_files(void);
|
|||
void rofi_theme_print_parsed_files(int is_term);
|
||||
|
||||
/**
|
||||
* @param widget The widget handle.
|
||||
* @param property The property to query.
|
||||
*
|
||||
* Returns a list of allocated RofiDistance objects that should be
|
||||
* freed.
|
||||
*
|
||||
* @returns a GList of RofiDistance objects.
|
||||
*/
|
||||
GList *rofi_theme_get_list_distance(const widget *widget, const char *property);
|
||||
|
||||
/**
|
||||
* @param widget The widget handle.
|
||||
* @param property The property to query.
|
||||
*
|
||||
* Returns a list of allocated strings othat should be
|
||||
* freed.
|
||||
*
|
||||
* @returns a GList of strings.
|
||||
*/
|
||||
GList *rofi_theme_get_list_strings(const widget *widget, const char *property);
|
||||
#endif
|
||||
|
|
|
@ -107,7 +107,9 @@ struct RofiViewState {
|
|||
/** filtered rows */
|
||||
textbox *tb_filtered_rows;
|
||||
|
||||
/** Extra icon widget that shows the current selected entries text. */
|
||||
textbox *tb_current_entry;
|
||||
/** Extra icon widget that shows the current selected entries icon. */
|
||||
icon *icon_current_entry;
|
||||
|
||||
/** Settings of the menu */
|
||||
|
|
|
@ -313,6 +313,7 @@ PangoAttrList *textbox_get_pango_attributes(textbox *tb);
|
|||
* @returns the visible text.
|
||||
*/
|
||||
const char *textbox_get_visible_text(const textbox *tb);
|
||||
|
||||
/**
|
||||
* @param wid The handle to the textbox.
|
||||
* @param height The height we want the desired width for
|
||||
|
@ -321,7 +322,7 @@ const char *textbox_get_visible_text(const textbox *tb);
|
|||
*
|
||||
* @returns the desired width of the textbox.
|
||||
*/
|
||||
int textbox_get_desired_width(widget *wid, const int height);
|
||||
int textbox_get_desired_width(widget *wid, G_GNUC_UNUSED const int height);
|
||||
|
||||
/**
|
||||
* @param tb Handle to the textbox
|
||||
|
|
|
@ -32,23 +32,22 @@
|
|||
|
||||
/** Macro for initializing the RofiDistance struct. */
|
||||
#define WIDGET_DISTANCE_INIT \
|
||||
(RofiDistance){ \
|
||||
.base = { \
|
||||
.distance = 0, \
|
||||
.type = ROFI_PU_PX, \
|
||||
.modtype = ROFI_DISTANCE_MODIFIER_NONE, \
|
||||
.left = NULL, \
|
||||
.right = NULL, \
|
||||
}, \
|
||||
(RofiDistance) { \
|
||||
.base = \
|
||||
{ \
|
||||
.distance = 0, \
|
||||
.type = ROFI_PU_PX, \
|
||||
.modtype = ROFI_DISTANCE_MODIFIER_NONE, \
|
||||
.left = NULL, \
|
||||
.right = NULL, \
|
||||
}, \
|
||||
.style = ROFI_HL_SOLID, \
|
||||
}
|
||||
/* Macro for initializing the RofiPadding struct. */
|
||||
/** Macro for initializing the RofiPadding struct. */
|
||||
#define WIDGET_PADDING_INIT \
|
||||
(RofiPadding){ \
|
||||
.top = WIDGET_DISTANCE_INIT, \
|
||||
.right = WIDGET_DISTANCE_INIT, \
|
||||
.bottom = WIDGET_DISTANCE_INIT, \
|
||||
.left = WIDGET_DISTANCE_INIT, \
|
||||
(RofiPadding) { \
|
||||
.top = WIDGET_DISTANCE_INIT, .right = WIDGET_DISTANCE_INIT, \
|
||||
.bottom = WIDGET_DISTANCE_INIT, .left = WIDGET_DISTANCE_INIT, \
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -284,8 +284,10 @@ widget *widget_find_mouse_target(widget *wid, WidgetType type, gint x, gint y);
|
|||
*
|
||||
* @returns Whether the action would be handled or not
|
||||
*/
|
||||
WidgetTriggerActionResult widget_check_action(widget *wid, guint action, gint x,
|
||||
gint y);
|
||||
WidgetTriggerActionResult widget_check_action(widget *wid,
|
||||
G_GNUC_UNUSED guint action,
|
||||
G_GNUC_UNUSED gint x,
|
||||
G_GNUC_UNUSED gint y);
|
||||
|
||||
/**
|
||||
* @param wid The widget handle
|
||||
|
|
|
@ -44,6 +44,11 @@ typedef struct _xcb_stuff xcb_stuff;
|
|||
*/
|
||||
extern xcb_stuff *xcb;
|
||||
|
||||
/**
|
||||
* @param data String to copy to clipboard.
|
||||
*
|
||||
* copies string to clipboard.
|
||||
*/
|
||||
void xcb_stuff_set_clipboard(char *data);
|
||||
|
||||
/**
|
||||
|
|
|
@ -114,6 +114,8 @@ typedef struct {
|
|||
char *ballot_unselected;
|
||||
} DmenuModePrivateData;
|
||||
|
||||
/** Maximum number of lines rofi parses async before it pushes it to the main
|
||||
* thread. */
|
||||
#define BLOCK_LINES_SIZE 2048
|
||||
typedef struct {
|
||||
unsigned int length;
|
||||
|
|
|
@ -463,12 +463,19 @@ static cairo_surface_t *script_get_icon(const Mode *sw,
|
|||
|
||||
#include "mode-private.h"
|
||||
|
||||
/** Structure that holds a user script
|
||||
* found in $config/rofi/scripts/
|
||||
*/
|
||||
typedef struct ScriptUser {
|
||||
/** name of the script */
|
||||
char *name;
|
||||
/** path to the script. */
|
||||
char *path;
|
||||
} ScriptUser;
|
||||
|
||||
/** list of user_scripts. */
|
||||
ScriptUser *user_scripts = NULL;
|
||||
/** number of user scripts collected */
|
||||
size_t num_scripts = 0;
|
||||
|
||||
void script_mode_cleanup(void) {
|
||||
|
@ -538,10 +545,10 @@ Mode *script_mode_parse_setup(const char *str) {
|
|||
unsigned int index = 0;
|
||||
const char *const sep = ":";
|
||||
char **tokens = g_strsplit(str, sep, 2);
|
||||
if ( tokens ){
|
||||
if (tokens) {
|
||||
index = g_strv_length(tokens);
|
||||
sw->name = g_strdup(tokens[0]);
|
||||
sw->ed = (void*)rofi_expand_path(tokens[1]);
|
||||
sw->ed = (void *)rofi_expand_path(tokens[1]);
|
||||
g_strfreev(tokens);
|
||||
}
|
||||
if (index == 2) {
|
||||
|
|
|
@ -85,6 +85,7 @@ const char *cache_dir = NULL;
|
|||
|
||||
/** List of error messages.*/
|
||||
GList *list_of_error_msgs = NULL;
|
||||
/** List of warning messages for the user.*/
|
||||
GList *list_of_warning_msgs = NULL;
|
||||
|
||||
static void rofi_collectmodes_destroy(void);
|
||||
|
|
|
@ -46,13 +46,22 @@
|
|||
#include "widgets/textbox.h"
|
||||
#include <gio/gio.h>
|
||||
|
||||
/**
|
||||
* list of config files we parsed.
|
||||
*/
|
||||
GList *parsed_config_files = NULL;
|
||||
|
||||
/** cleanup (free) the list of parsed config files. */
|
||||
void rofi_theme_free_parsed_files(void) {
|
||||
g_list_free_full(parsed_config_files, g_free);
|
||||
parsed_config_files = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param is_term if print to terminal
|
||||
*
|
||||
* print the list of parsed config files.
|
||||
*/
|
||||
void rofi_theme_print_parsed_files(gboolean is_term) {
|
||||
printf("\nParsed files:\n");
|
||||
for (GList *iter = g_list_first(parsed_config_files); iter != NULL;
|
||||
|
|
|
@ -130,9 +130,13 @@ struct {
|
|||
guint idle_timeout;
|
||||
/** timeout for reloading */
|
||||
guint refilter_timeout;
|
||||
/** amount of time refiltering delay got reset */
|
||||
guint refilter_timeout_count;
|
||||
|
||||
/** if filtering takes longer then this time,
|
||||
* reduce the amount of refilters. */
|
||||
double max_refilter_time;
|
||||
/** enable the reduced refilter mode. */
|
||||
gboolean delayed_mode;
|
||||
/** timeout handling */
|
||||
guint user_timeout;
|
||||
|
|
|
@ -992,8 +992,9 @@ static int monitor_active_from_id(int mon_id, workarea *mon) {
|
|||
|
||||
// determine which monitor holds the active window, or failing that the mouse
|
||||
// pointer
|
||||
|
||||
/** The cached monitor setup (mon_cache) is populated */
|
||||
gboolean mon_set = FALSE;
|
||||
/** cached monitor cache, to avoid multiple roundtrips to fetch this. */
|
||||
workarea mon_cache = {
|
||||
0,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue