1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2025-03-31 17:25:40 -04:00

Indenting, comments

This commit is contained in:
Dave Davenport 2016-10-15 15:39:08 +02:00
parent 9293c8b8ce
commit f0981d6697
14 changed files with 113 additions and 42 deletions

View file

@ -8,21 +8,62 @@
* @{
*/
#if TIMINGS
/**
* Init the timestamping mechanism .
* implementation.
*/
void rofi_timings_init ( void );
/**
* @param str function name.
* @param line line number
* @param msg message
*
* Report a tick.
*/
void rofi_timings_tick ( char const *str, int line, char const *msg );
/**
* Stop the timestamping mechanism
*/
void rofi_timings_quit ( void );
/**
* Start timestamping mechanism.
* Call to this function is time 0.
*/
#define TIMINGS_START() rofi_timings_init ()
/**
* Report current time since TIMINGS_START
*/
#define TICK() rofi_timings_tick ( __func__, __LINE__, "" )
/**
* @param a an string
* Report current time since TIMINGS_START
*/
#define TICK_N( a ) rofi_timings_tick ( __func__, __LINE__, a )
/**
* Stop timestamping mechanism.
*/
#define TIMINGS_STOP() rofi_timings_quit ()
#else
/**
* Start timestamping mechanism.
* Call to this function is time 0.
*/
#define TIMINGS_START()
/**
* Stop timestamping mechanism.
*/
#define TIMINGS_STOP()
/**
* Report current time since TIMINGS_START
*/
#define TICK()
/**
* @param a an string
* Report current time since TIMINGS_START
*/
#define TICK_N( a )
#endif // TIMINGS

View file

@ -1,6 +1,6 @@
#ifndef ROFI_XCB_INTERNAL_H
#define ROFI_XCB_INTERNAL_H
/** Indication we accept that startup notification api is not yet frozen */
#define SN_API_NOT_YET_FROZEN
#include <libsn/sn.h>
@ -10,7 +10,6 @@
/**
* Structure to keep xcb stuff around.
*/
struct _xcb_stuff
{
xcb_connection_t *connection;

View file

@ -1,10 +1,27 @@
#ifndef ROFI_XCB_H
#define ROFI_XCB_H
/**
* xcb data structure type declaration.
*/
typedef struct _xcb_stuff xcb_stuff;
/**
* Global pointer to xcb_stuff instance.
*/
extern xcb_stuff *xcb;
/**
* @param xcb the xcb data structure
*
* Get the root window.
*
* @returns the root window.
xcb_window_t xcb_stuff_get_root_window ( xcb_stuff *xcb );
/**
* @param xcb The xcb data structure.
*
* Disconnect and free all xcb connections and references.
*/
void xcb_stuff_wipe ( xcb_stuff *xcb );
#endif

View file

@ -1,5 +1,8 @@
#ifndef ROFI_XKB_H
#define ROFI_XKB_H
/**
* Structure holding xkb related state.
*/
typedef struct xkb_stuff xkb_stuff;
#endif

View file

@ -63,6 +63,9 @@ typedef enum
void config_parse_xresource_options ( xcb_stuff *xcb );
/**
* @param filename The xresources file to parse
*
* Parses filename and updates the config
* @ingroup CONFFile
*/
void config_parse_xresource_options_file ( const char *filename );
@ -90,6 +93,9 @@ void config_parse_cmd_options_dynamic ( void );
void config_parse_xresource_options_dynamic ( xcb_stuff *xcb );
/**
* @param filename The xresources file to parse
*
* Parses filename and updates the config. For dynamic options.
* @ingroup CONFFile
*/
void config_parse_xresource_options_dynamic_file ( const char *filename );

View file

@ -281,12 +281,15 @@ static void box_update ( widget *wid )
}
int box_get_fixed_pixels ( box *box )
{
if ( box != NULL ) {
return box->max_size;
}
return 0;
}
void box_set_padding ( box * box, unsigned int padding )
{
if ( box ) {
if ( box != NULL ) {
box->padding = padding;
widget_queue_redraw ( WIDGET ( box ) );
}

View file

@ -41,7 +41,9 @@ struct _separator
separator_type type;
};
/** Configuration value for separator style indicating no line */
const char *const _separator_style_none = "none";
/** Configuration value for separator style indicating dashed line. */
const char *const _separator_style_dash = "dash";
static void separator_draw ( widget *, cairo_t * );
static void separator_free ( widget * );