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

[Doc] Try to fix some of the doxygen coverage warnings.

This commit is contained in:
Dave Davenport 2021-08-20 11:36:31 +02:00 committed by Dave Davenport
parent 216098a541
commit ca75beb8a6
7 changed files with 76 additions and 10 deletions

View file

@ -71,6 +71,9 @@ const Mode *rofi_get_mode(unsigned int index);
*/
void rofi_add_error_message(GString *str);
/**
* Clear the list of stored error messages.
*/
void rofi_clear_error_messages(void);
/**
* @param code the code to return

View file

@ -177,8 +177,11 @@ typedef struct {
char *application_fallback_icon;
} Settings;
/** Default number of lines in the list view */
#define DEFAULT_MENU_LINES 15
/** Default number of columns in the list view */
#define DEFAULT_MENU_COLUMNS 1
/** Default window width */
#define DEFAULT_MENU_WIDTH 50.0f
/** Global Settings structure. */

View file

@ -85,10 +85,13 @@ typedef struct ThemeWidget {
extern ThemeWidget *rofi_theme;
/**
* Used to store config options.
* Used to store theme.
*/
extern ThemeWidget *rofi_theme;
/**
* Used to store config options.
*/
extern ThemeWidget *rofi_configuration;
/**
@ -108,6 +111,13 @@ ThemeWidget *rofi_theme_find_or_create_name(ThemeWidget *base,
* Print out the widget to the commandline.
*/
void rofi_theme_print(ThemeWidget *widget);
/**
* @param widget The widget handle.
* @param index The indenting index.
*
* Print out the widget to the commandline indented by index.
*/
void rofi_theme_print_index(ThemeWidget *widget, int index);
/**
@ -353,6 +363,17 @@ void distance_get_linestyle(RofiDistance d, cairo_t *draw);
*/
ThemeWidget *rofi_theme_find_widget(const char *name, const char *state,
gboolean exact);
/**
* @param name The name of the element to find.
* @param state The state of the element.
* @param exact If the match should be exact, or parent can be included.
*
* Find the configuration element. If not exact, the closest specified element
* is returned.
*
* @returns the ThemeWidget if found, otherwise NULL.
*/
ThemeWidget *rofi_config_find_widget(const char *name, const char *state,
gboolean exact);

View file

@ -9,7 +9,7 @@ yet converted to the new format, I hope for some understanding. Even though this
deprecation in previous releases and consequential removal of these options is needed for two reasons.
The most important one is to keep rofi maintainable and secondary to open possibility to overhaul the config system in
the future and with that fixing some long standing bugs and add new options that
where hindered by the almost 10 year old system.
where hindered by the almost 10 year old system, the new system has been around for more than 4 years.
Beside mostly bug-fixes and removal of deprecated options, we also improved the theming and added features to help in
some of the more 'off-script' use of rofi.

View file

@ -57,18 +57,33 @@
#include "rofi-icon-fetcher.h"
/** The filename of the history cache file. */
#define DRUN_CACHE_FILE "rofi3.druncache"
/** The filename of the drun quick-load cache file. */
#define DRUN_DESKTOP_CACHE_FILE "rofi-drun-desktop.cache"
/** The group name used in desktop files */
char *DRUN_GROUP_NAME = "Desktop Entry";
/**
*The Internal data structure for the drun mode.
*/
typedef struct _DRunModePrivateData DRunModePrivateData;
/**
* Used to determine the type of desktop file.
*/
typedef enum {
/** Unknown. */
DRUN_DESKTOP_ENTRY_TYPE_UNDETERMINED = 0,
/** Application */
DRUN_DESKTOP_ENTRY_TYPE_APPLICATION,
/** Link */
DRUN_DESKTOP_ENTRY_TYPE_LINK,
/** KDE Service File */
DRUN_DESKTOP_ENTRY_TYPE_SERVICE,
/** Directory */
DRUN_DESKTOP_ENTRY_TYPE_DIRECTORY,
} DRunDesktopEntryType;
@ -90,9 +105,9 @@ typedef struct {
char *desktop_id;
/* Icon stuff */
char *icon_name;
/* Icon size is used to indicate what size is requested by the gui.
* secondary it indicates if the request for a lookup has been issued (0 not
* issued )
/* Icon size is used to indicate what size is requested by the
* gui. secondary it indicates if the request for a lookup has
* been issued (0 not issued )
*/
int icon_size;
/* Surface holding the icon. */
@ -109,13 +124,13 @@ typedef struct {
char **keywords;
/* Comments */
char *comment;
/* Underlying key-file. */
GKeyFile *key_file;
/* Used for sorting. */
gint sort_index;
/* UID for the icon to display */
uint32_t icon_fetch_uid;
/* Type of desktop file */
DRunDesktopEntryType type;
} DRunModeEntry;
@ -125,16 +140,26 @@ typedef struct {
gboolean enabled_display;
} DRunEntryField;
/** The fields that can be displayed and used for matching */
typedef enum {
/** Name */
DRUN_MATCH_FIELD_NAME,
/** Generic Name */
DRUN_MATCH_FIELD_GENERIC,
/** Exec */
DRUN_MATCH_FIELD_EXEC,
/** List of categories */
DRUN_MATCH_FIELD_CATEGORIES,
/** List of keywords */
DRUN_MATCH_FIELD_KEYWORDS,
/** Comment */
DRUN_MATCH_FIELD_COMMENT,
/** Number of DRunMatchingFields entries. */
DRUN_MATCH_NUM_FIELDS,
} DRunMatchingFields;
/** Stores what fields should be matched on user input. based on user setting.
*/
static DRunEntryField matching_entry_fields[DRUN_MATCH_NUM_FIELDS] = {
{
.entry_field_name = "name",
@ -802,6 +827,7 @@ static gint drun_int_sort_list(gconstpointer a, gconstpointer b,
* Cache voodoo *
*******************************************/
/** Version of the DRUN cache file format. */
#define CACHE_VERSION 2
static void drun_write_str(FILE *fd, const char *str) {
size_t l = (str == NULL ? 0 : strlen(str));
@ -1441,6 +1467,7 @@ static char *drun_get_message(const Mode *sw) {
return NULL;
}
#include "mode-private.h"
/** The DRun Mode interface. */
Mode drun_mode = {.name = "drun",
.cfg_name_key = "display-drun",
._init = drun_mode_init,

View file

@ -93,9 +93,15 @@ typedef struct {
unsigned int array_length;
} FileBrowserModePrivateData;
/**
* The sorting settings used in file-browser.
*/
struct {
/** Field to sort on. */
enum FBSortingMethod sorting_method;
/** If sorting on time, what time entry. */
enum FBSortingTime sorting_time;
/** If we want to display directories above files. */
gboolean directories_first;
} file_browser_config = {
.sorting_method = FB_SORT_NAME,

View file

@ -29,9 +29,9 @@
/** Log domain for this module */
#define G_LOG_DOMAIN "X11Helper"
#include "config.h"
#include <cairo-xcb.h>
#include <cairo.h>
#include "config.h"
#include <glib.h>
#include <math.h>
#include <stdint.h>
@ -100,11 +100,17 @@ static xcb_visualtype_t *root_visual = NULL;
xcb_atom_t netatoms[NUM_NETATOMS];
const char *netatom_names[] = {EWMH_ATOMS(ATOM_CHAR)};
/**
* Cached X11 cursors.
*/
xcb_cursor_t cursors[NUM_CURSORS] = {XCB_CURSOR_NONE, XCB_CURSOR_NONE,
XCB_CURSOR_NONE};
/** Mapping between theme name and system name for mouse cursor. */
const struct {
/** Theme name */
const char *css_name;
/** System name */
const char *traditional_name;
} cursor_names[] = {
{"default", "left_ptr"}, {"pointer", "hand"}, {"text", "xterm"}};