1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

[Doc] Fix some missing docu.

This commit is contained in:
Dave Davenport 2022-11-19 21:50:34 +01:00
parent 063195922f
commit d9935e594e
13 changed files with 74 additions and 21 deletions

View file

@ -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.

View file

@ -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

View file

@ -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 */

View file

@ -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

View file

@ -33,7 +33,8 @@
/** Macro for initializing the RofiDistance struct. */
#define WIDGET_DISTANCE_INIT \
(RofiDistance) { \
.base = { \
.base = \
{ \
.distance = 0, \
.type = ROFI_PU_PX, \
.modtype = ROFI_DISTANCE_MODIFIER_NONE, \
@ -42,13 +43,11 @@
}, \
.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, \
.top = WIDGET_DISTANCE_INIT, .right = WIDGET_DISTANCE_INIT, \
.bottom = WIDGET_DISTANCE_INIT, .left = WIDGET_DISTANCE_INIT, \
}
/**

View file

@ -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

View file

@ -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);
/**

View file

@ -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;

View file

@ -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) {

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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,
};