mirror of
https://github.com/davatorium/rofi.git
synced 2025-07-31 21:59:25 -04:00
[Doc] Try to fix some of the doxygen coverage warnings.
This commit is contained in:
parent
5edde4ee87
commit
e60e6bab2a
7 changed files with 76 additions and 10 deletions
|
@ -71,6 +71,9 @@ const Mode *rofi_get_mode(unsigned int index);
|
||||||
*/
|
*/
|
||||||
void rofi_add_error_message(GString *str);
|
void rofi_add_error_message(GString *str);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear the list of stored error messages.
|
||||||
|
*/
|
||||||
void rofi_clear_error_messages(void);
|
void rofi_clear_error_messages(void);
|
||||||
/**
|
/**
|
||||||
* @param code the code to return
|
* @param code the code to return
|
||||||
|
|
|
@ -177,8 +177,11 @@ typedef struct {
|
||||||
char *application_fallback_icon;
|
char *application_fallback_icon;
|
||||||
} Settings;
|
} Settings;
|
||||||
|
|
||||||
|
/** Default number of lines in the list view */
|
||||||
#define DEFAULT_MENU_LINES 15
|
#define DEFAULT_MENU_LINES 15
|
||||||
|
/** Default number of columns in the list view */
|
||||||
#define DEFAULT_MENU_COLUMNS 1
|
#define DEFAULT_MENU_COLUMNS 1
|
||||||
|
/** Default window width */
|
||||||
#define DEFAULT_MENU_WIDTH 50.0f
|
#define DEFAULT_MENU_WIDTH 50.0f
|
||||||
|
|
||||||
/** Global Settings structure. */
|
/** Global Settings structure. */
|
||||||
|
|
|
@ -85,10 +85,13 @@ typedef struct ThemeWidget {
|
||||||
extern ThemeWidget *rofi_theme;
|
extern ThemeWidget *rofi_theme;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to store config options.
|
* Used to store theme.
|
||||||
*/
|
*/
|
||||||
extern ThemeWidget *rofi_theme;
|
extern ThemeWidget *rofi_theme;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to store config options.
|
||||||
|
*/
|
||||||
extern ThemeWidget *rofi_configuration;
|
extern ThemeWidget *rofi_configuration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -108,6 +111,13 @@ ThemeWidget *rofi_theme_find_or_create_name(ThemeWidget *base,
|
||||||
* Print out the widget to the commandline.
|
* Print out the widget to the commandline.
|
||||||
*/
|
*/
|
||||||
void rofi_theme_print(ThemeWidget *widget);
|
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);
|
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,
|
ThemeWidget *rofi_theme_find_widget(const char *name, const char *state,
|
||||||
gboolean exact);
|
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,
|
ThemeWidget *rofi_config_find_widget(const char *name, const char *state,
|
||||||
gboolean exact);
|
gboolean exact);
|
||||||
|
|
||||||
|
|
|
@ -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.
|
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 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
|
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
|
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.
|
some of the more 'off-script' use of rofi.
|
||||||
|
|
|
@ -57,18 +57,33 @@
|
||||||
|
|
||||||
#include "rofi-icon-fetcher.h"
|
#include "rofi-icon-fetcher.h"
|
||||||
|
|
||||||
|
/** The filename of the history cache file. */
|
||||||
#define DRUN_CACHE_FILE "rofi3.druncache"
|
#define DRUN_CACHE_FILE "rofi3.druncache"
|
||||||
|
|
||||||
|
/** The filename of the drun quick-load cache file. */
|
||||||
#define DRUN_DESKTOP_CACHE_FILE "rofi-drun-desktop.cache"
|
#define DRUN_DESKTOP_CACHE_FILE "rofi-drun-desktop.cache"
|
||||||
|
|
||||||
|
/** The group name used in desktop files */
|
||||||
char *DRUN_GROUP_NAME = "Desktop Entry";
|
char *DRUN_GROUP_NAME = "Desktop Entry";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*The Internal data structure for the drun mode.
|
||||||
|
*/
|
||||||
typedef struct _DRunModePrivateData DRunModePrivateData;
|
typedef struct _DRunModePrivateData DRunModePrivateData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to determine the type of desktop file.
|
||||||
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
/** Unknown. */
|
||||||
DRUN_DESKTOP_ENTRY_TYPE_UNDETERMINED = 0,
|
DRUN_DESKTOP_ENTRY_TYPE_UNDETERMINED = 0,
|
||||||
|
/** Application */
|
||||||
DRUN_DESKTOP_ENTRY_TYPE_APPLICATION,
|
DRUN_DESKTOP_ENTRY_TYPE_APPLICATION,
|
||||||
|
/** Link */
|
||||||
DRUN_DESKTOP_ENTRY_TYPE_LINK,
|
DRUN_DESKTOP_ENTRY_TYPE_LINK,
|
||||||
|
/** KDE Service File */
|
||||||
DRUN_DESKTOP_ENTRY_TYPE_SERVICE,
|
DRUN_DESKTOP_ENTRY_TYPE_SERVICE,
|
||||||
|
/** Directory */
|
||||||
DRUN_DESKTOP_ENTRY_TYPE_DIRECTORY,
|
DRUN_DESKTOP_ENTRY_TYPE_DIRECTORY,
|
||||||
} DRunDesktopEntryType;
|
} DRunDesktopEntryType;
|
||||||
|
|
||||||
|
@ -90,9 +105,9 @@ typedef struct {
|
||||||
char *desktop_id;
|
char *desktop_id;
|
||||||
/* Icon stuff */
|
/* Icon stuff */
|
||||||
char *icon_name;
|
char *icon_name;
|
||||||
/* Icon size is used to indicate what size is requested by the gui.
|
/* Icon size is used to indicate what size is requested by the
|
||||||
* secondary it indicates if the request for a lookup has been issued (0 not
|
* gui. secondary it indicates if the request for a lookup has
|
||||||
* issued )
|
* been issued (0 not issued )
|
||||||
*/
|
*/
|
||||||
int icon_size;
|
int icon_size;
|
||||||
/* Surface holding the icon. */
|
/* Surface holding the icon. */
|
||||||
|
@ -109,13 +124,13 @@ typedef struct {
|
||||||
char **keywords;
|
char **keywords;
|
||||||
/* Comments */
|
/* Comments */
|
||||||
char *comment;
|
char *comment;
|
||||||
|
/* Underlying key-file. */
|
||||||
GKeyFile *key_file;
|
GKeyFile *key_file;
|
||||||
|
/* Used for sorting. */
|
||||||
gint sort_index;
|
gint sort_index;
|
||||||
|
/* UID for the icon to display */
|
||||||
uint32_t icon_fetch_uid;
|
uint32_t icon_fetch_uid;
|
||||||
|
/* Type of desktop file */
|
||||||
DRunDesktopEntryType type;
|
DRunDesktopEntryType type;
|
||||||
} DRunModeEntry;
|
} DRunModeEntry;
|
||||||
|
|
||||||
|
@ -125,16 +140,26 @@ typedef struct {
|
||||||
gboolean enabled_display;
|
gboolean enabled_display;
|
||||||
} DRunEntryField;
|
} DRunEntryField;
|
||||||
|
|
||||||
|
/** The fields that can be displayed and used for matching */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
/** Name */
|
||||||
DRUN_MATCH_FIELD_NAME,
|
DRUN_MATCH_FIELD_NAME,
|
||||||
|
/** Generic Name */
|
||||||
DRUN_MATCH_FIELD_GENERIC,
|
DRUN_MATCH_FIELD_GENERIC,
|
||||||
|
/** Exec */
|
||||||
DRUN_MATCH_FIELD_EXEC,
|
DRUN_MATCH_FIELD_EXEC,
|
||||||
|
/** List of categories */
|
||||||
DRUN_MATCH_FIELD_CATEGORIES,
|
DRUN_MATCH_FIELD_CATEGORIES,
|
||||||
|
/** List of keywords */
|
||||||
DRUN_MATCH_FIELD_KEYWORDS,
|
DRUN_MATCH_FIELD_KEYWORDS,
|
||||||
|
/** Comment */
|
||||||
DRUN_MATCH_FIELD_COMMENT,
|
DRUN_MATCH_FIELD_COMMENT,
|
||||||
|
/** Number of DRunMatchingFields entries. */
|
||||||
DRUN_MATCH_NUM_FIELDS,
|
DRUN_MATCH_NUM_FIELDS,
|
||||||
} DRunMatchingFields;
|
} DRunMatchingFields;
|
||||||
|
|
||||||
|
/** Stores what fields should be matched on user input. based on user setting.
|
||||||
|
*/
|
||||||
static DRunEntryField matching_entry_fields[DRUN_MATCH_NUM_FIELDS] = {
|
static DRunEntryField matching_entry_fields[DRUN_MATCH_NUM_FIELDS] = {
|
||||||
{
|
{
|
||||||
.entry_field_name = "name",
|
.entry_field_name = "name",
|
||||||
|
@ -802,6 +827,7 @@ static gint drun_int_sort_list(gconstpointer a, gconstpointer b,
|
||||||
* Cache voodoo *
|
* Cache voodoo *
|
||||||
*******************************************/
|
*******************************************/
|
||||||
|
|
||||||
|
/** Version of the DRUN cache file format. */
|
||||||
#define CACHE_VERSION 2
|
#define CACHE_VERSION 2
|
||||||
static void drun_write_str(FILE *fd, const char *str) {
|
static void drun_write_str(FILE *fd, const char *str) {
|
||||||
size_t l = (str == NULL ? 0 : strlen(str));
|
size_t l = (str == NULL ? 0 : strlen(str));
|
||||||
|
@ -1441,6 +1467,7 @@ static char *drun_get_message(const Mode *sw) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#include "mode-private.h"
|
#include "mode-private.h"
|
||||||
|
/** The DRun Mode interface. */
|
||||||
Mode drun_mode = {.name = "drun",
|
Mode drun_mode = {.name = "drun",
|
||||||
.cfg_name_key = "display-drun",
|
.cfg_name_key = "display-drun",
|
||||||
._init = drun_mode_init,
|
._init = drun_mode_init,
|
||||||
|
|
|
@ -93,9 +93,15 @@ typedef struct {
|
||||||
unsigned int array_length;
|
unsigned int array_length;
|
||||||
} FileBrowserModePrivateData;
|
} FileBrowserModePrivateData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The sorting settings used in file-browser.
|
||||||
|
*/
|
||||||
struct {
|
struct {
|
||||||
|
/** Field to sort on. */
|
||||||
enum FBSortingMethod sorting_method;
|
enum FBSortingMethod sorting_method;
|
||||||
|
/** If sorting on time, what time entry. */
|
||||||
enum FBSortingTime sorting_time;
|
enum FBSortingTime sorting_time;
|
||||||
|
/** If we want to display directories above files. */
|
||||||
gboolean directories_first;
|
gboolean directories_first;
|
||||||
} file_browser_config = {
|
} file_browser_config = {
|
||||||
.sorting_method = FB_SORT_NAME,
|
.sorting_method = FB_SORT_NAME,
|
||||||
|
|
|
@ -29,9 +29,9 @@
|
||||||
/** Log domain for this module */
|
/** Log domain for this module */
|
||||||
#define G_LOG_DOMAIN "X11Helper"
|
#define G_LOG_DOMAIN "X11Helper"
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
#include <cairo-xcb.h>
|
#include <cairo-xcb.h>
|
||||||
#include <cairo.h>
|
#include <cairo.h>
|
||||||
#include "config.h"
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -100,11 +100,17 @@ static xcb_visualtype_t *root_visual = NULL;
|
||||||
xcb_atom_t netatoms[NUM_NETATOMS];
|
xcb_atom_t netatoms[NUM_NETATOMS];
|
||||||
const char *netatom_names[] = {EWMH_ATOMS(ATOM_CHAR)};
|
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_t cursors[NUM_CURSORS] = {XCB_CURSOR_NONE, XCB_CURSOR_NONE,
|
||||||
XCB_CURSOR_NONE};
|
XCB_CURSOR_NONE};
|
||||||
|
|
||||||
|
/** Mapping between theme name and system name for mouse cursor. */
|
||||||
const struct {
|
const struct {
|
||||||
|
/** Theme name */
|
||||||
const char *css_name;
|
const char *css_name;
|
||||||
|
/** System name */
|
||||||
const char *traditional_name;
|
const char *traditional_name;
|
||||||
} cursor_names[] = {
|
} cursor_names[] = {
|
||||||
{"default", "left_ptr"}, {"pointer", "hand"}, {"text", "xterm"}};
|
{"default", "left_ptr"}, {"pointer", "hand"}, {"text", "xterm"}};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue