mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Cleanup code documentation.
This commit is contained in:
parent
37044dc27e
commit
f69f8fcb7b
10 changed files with 65 additions and 3 deletions
|
@ -38,7 +38,20 @@
|
|||
/** #Mode object representing the run dialog. */
|
||||
extern Mode file_browser_mode;
|
||||
|
||||
/**
|
||||
* Create a new filebrowser.
|
||||
* @returns a new filebrowser structure.
|
||||
*/
|
||||
Mode *create_new_file_browser ( void );
|
||||
/**
|
||||
* @param sw Mode object.
|
||||
* @param mretv return value passed in.
|
||||
* @param input The user input string.
|
||||
* @param selected_list The user selected line.
|
||||
* @param path The full path as output.
|
||||
*
|
||||
* @returns the state the user selected.
|
||||
*/
|
||||
ModeMode file_browser_mode_completer ( Mode *sw, int mretv, char **input, unsigned int selected_line, char **path );
|
||||
/**@}*/
|
||||
#endif // ROFI_DIALOG_FILE_BROWSER_H
|
||||
|
|
|
@ -45,6 +45,13 @@ uint32_t rofi_icon_fetcher_query ( const char *name, const int size );
|
|||
*/
|
||||
cairo_surface_t * rofi_icon_fetcher_get ( const uint32_t uid );
|
||||
|
||||
/**
|
||||
* @param path the image path to check.
|
||||
*
|
||||
* Checks if a file is a supported image. (by looking at extension).
|
||||
*
|
||||
* @returns true if image, false otherwise.
|
||||
*/
|
||||
gboolean rofi_icon_fetcher_file_is_image ( const char * const path );
|
||||
/** @} */
|
||||
#endif // ROFI_ICON_FETCHER_H
|
||||
|
|
|
@ -386,6 +386,12 @@ void rofi_theme_parse_merge_widgets ( ThemeWidget *parent, ThemeWidget *child );
|
|||
* Returns the media type described by type.
|
||||
*/
|
||||
ThemeMediaType rofi_theme_parse_media_type ( const char *type );
|
||||
|
||||
/**
|
||||
* @param distance The distance object to copy.
|
||||
*
|
||||
* @returns a copy of the distance.
|
||||
*/
|
||||
RofiDistance rofi_theme_property_copy_distance ( RofiDistance const distance );
|
||||
|
||||
/**
|
||||
|
|
|
@ -127,7 +127,16 @@ typedef struct _workarea
|
|||
*/
|
||||
int monitor_active ( workarea *mon );
|
||||
|
||||
/**
|
||||
* @param w rofis window
|
||||
*
|
||||
* Stores old input focus for reverting and set focus to rofi.
|
||||
*/
|
||||
void rofi_xcb_set_input_focus(xcb_window_t w);
|
||||
|
||||
/**
|
||||
* IF set, revert the focus back to the original applications.
|
||||
*/
|
||||
void rofi_xcb_revert_input_focus(void);
|
||||
|
||||
/**
|
||||
|
@ -194,5 +203,13 @@ extern WindowManagerQuirk current_window_manager;
|
|||
* @returns NULL if window was not found, or unmapped, otherwise returns a cairo_surface.
|
||||
*/
|
||||
cairo_surface_t *x11_helper_get_screenshot_surface_window ( xcb_window_t window, int size );
|
||||
|
||||
/**
|
||||
* @param surface
|
||||
* @param radius
|
||||
* @param deviation
|
||||
*
|
||||
* Blur the content of the surface with radius and deviation.
|
||||
*/
|
||||
void cairo_image_surface_blur(cairo_surface_t* surface, double radius, double deviation);
|
||||
#endif
|
||||
|
|
|
@ -58,6 +58,7 @@ enum FBFileType
|
|||
RFILE,
|
||||
NUM_FILE_TYPES,
|
||||
};
|
||||
/** Icons to use for the file type */
|
||||
const char *icon_name[NUM_FILE_TYPES] =
|
||||
{
|
||||
"go-up",
|
||||
|
|
|
@ -163,14 +163,22 @@ void rofi_icon_fetcher_destroy ( void )
|
|||
* Copyright (C) 2011-2018 Red Hat, Inc.
|
||||
*/
|
||||
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
||||
/** Location of red byte */
|
||||
#define RED_BYTE 2
|
||||
/** Location of green byte */
|
||||
#define GREEN_BYTE 1
|
||||
/** Location of blue byte */
|
||||
#define BLUE_BYTE 0
|
||||
/** Location of alpha byte */
|
||||
#define ALPHA_BYTE 3
|
||||
#else
|
||||
/** Location of red byte */
|
||||
#define RED_BYTE 1
|
||||
/** Location of green byte */
|
||||
#define GREEN_BYTE 2
|
||||
/** Location of blue byte */
|
||||
#define BLUE_BYTE 3
|
||||
/** Location of alpha byte */
|
||||
#define ALPHA_BYTE 0
|
||||
#endif
|
||||
|
||||
|
|
|
@ -119,6 +119,7 @@ static int dmenu_mode = FALSE;
|
|||
/** Rofi's return code */
|
||||
int return_code = EXIT_SUCCESS;
|
||||
|
||||
/** Flag indicating we are using old config format. */
|
||||
static gboolean old_config_format = FALSE;
|
||||
|
||||
void process_result ( RofiViewState *state );
|
||||
|
|
|
@ -227,11 +227,19 @@ void rofi_capture_screenshot ( void )
|
|||
* Code used for benchmarking drawing the gui, this will keep updating the UI as fast as possible.
|
||||
*/
|
||||
gboolean do_bench = TRUE;
|
||||
struct
|
||||
|
||||
/**
|
||||
* Internal structure that hold benchmarking information.
|
||||
*/
|
||||
static struct
|
||||
{
|
||||
/** timer used for timestamping. */
|
||||
GTimer *time;
|
||||
/** number of draws done. */
|
||||
uint64_t draws;
|
||||
/** previous timestamp */
|
||||
double last_ts;
|
||||
/** minimum draw time. */
|
||||
double min;
|
||||
} BenchMark = {
|
||||
.time = NULL,
|
||||
|
|
|
@ -55,8 +55,8 @@ static PangoContext *p_context = NULL;
|
|||
/** The pango font metrics */
|
||||
static PangoFontMetrics *p_metrics = NULL;
|
||||
|
||||
/* Default tbfc */
|
||||
TBFontConfig *tbfc_default = NULL;
|
||||
/** Default tbfc */
|
||||
static TBFontConfig *tbfc_default = NULL;
|
||||
|
||||
/** HashMap of previously parsed font descriptions. */
|
||||
static GHashTable *tbfc_cache = NULL;
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
/** Default padding. */
|
||||
#define WIDGET_DEFAULT_PADDING 0
|
||||
/** macro for initializing the padding struction. */
|
||||
#define WIDGET_PADDING_INIT { { WIDGET_DEFAULT_PADDING, ROFI_PU_PX, ROFI_DISTANCE_MODIFIER_NONE, NULL, NULL }, ROFI_HL_SOLID }
|
||||
|
||||
/* Corner radius - tl, tr, br, bl */
|
||||
|
|
Loading…
Reference in a new issue