summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@blame.services>2021-08-20 11:36:31 +0200
committerDave Davenport <DaveDavenport@users.noreply.github.com>2021-08-29 11:16:59 +0200
commitca75beb8a6168a1ef4a69dc39386467ea6c5661c (patch)
tree2add625067bc4f333e3aafb83768fbc36809f1ca
parent216098a541cf813bcb867f3ce60b4a3d5e2c89dc (diff)
[Doc] Try to fix some of the doxygen coverage warnings.
-rw-r--r--include/rofi.h3
-rw-r--r--include/settings.h3
-rw-r--r--include/theme.h23
-rw-r--r--releasenotes/1.7.0/release-1.7.0.markdown2
-rw-r--r--source/dialogs/drun.c41
-rw-r--r--source/dialogs/filebrowser.c6
-rw-r--r--source/xcb.c8
7 files changed, 76 insertions, 10 deletions
diff --git a/include/rofi.h b/include/rofi.h
index 7dfb4c94..ac9dc849 100644
--- a/include/rofi.h
+++ b/include/rofi.h
@@ -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
diff --git a/include/settings.h b/include/settings.h
index 82cadb4a..a5dcf5fc 100644
--- a/include/settings.h
+++ b/include/settings.h
@@ -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. */
diff --git a/include/theme.h b/include/theme.h
index 1750a6d1..729a8264 100644
--- a/include/theme.h
+++ b/include/theme.h
@@ -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);
diff --git a/releasenotes/1.7.0/release-1.7.0.markdown b/releasenotes/1.7.0/release-1.7.0.markdown
index 2a3927a3..fa2a23bc 100644
--- a/releasenotes/1.7.0/release-1.7.0.markdown
+++ b/releasenotes/1.7.0/release-1.7.0.markdown
@@ -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.
diff --git a/source/dialogs/drun.c b/source/dialogs/drun.c
index 06d3595c..53c70147 100644
--- a/source/dialogs/drun.c
+++ b/source/dialogs/drun.c
@@ -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,
diff --git a/source/dialogs/filebrowser.c b/source/dialogs/filebrowser.c
index c572e279..e4e0d68e 100644
--- a/source/dialogs/filebrowser.c
+++ b/source/dialogs/filebrowser.c
@@ -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,
diff --git a/source/xcb.c b/source/xcb.c
index 80c24934..6a4ae45c 100644
--- a/source/xcb.c
+++ b/source/xcb.c
@@ -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"}};