Use void as argument for parameterless functions
This commit is contained in:
parent
c3e8bedfab
commit
3b6c5299be
10
src/queues.c
10
src/queues.c
@ -35,19 +35,19 @@ void queues_displayed_limit(unsigned int limit)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* misc getter functions */
|
/* misc getter functions */
|
||||||
const GList *queues_get_displayed()
|
const GList *queues_get_displayed(void)
|
||||||
{
|
{
|
||||||
return g_queue_peek_head_link(displayed);
|
return g_queue_peek_head_link(displayed);
|
||||||
}
|
}
|
||||||
unsigned int queues_length_waiting()
|
unsigned int queues_length_waiting(void)
|
||||||
{
|
{
|
||||||
return waiting->length;
|
return waiting->length;
|
||||||
}
|
}
|
||||||
unsigned int queues_length_displayed()
|
unsigned int queues_length_displayed(void)
|
||||||
{
|
{
|
||||||
return displayed->length;
|
return displayed->length;
|
||||||
}
|
}
|
||||||
unsigned int queues_length_history()
|
unsigned int queues_length_history(void)
|
||||||
{
|
{
|
||||||
return history->length;
|
return history->length;
|
||||||
}
|
}
|
||||||
@ -292,7 +292,7 @@ void queues_check_timeouts(bool idle)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void queues_update()
|
void queues_update(void)
|
||||||
{
|
{
|
||||||
if (pause_displayed) {
|
if (pause_displayed) {
|
||||||
while (displayed->length > 0) {
|
while (displayed->length > 0) {
|
||||||
|
10
src/queues.h
10
src/queues.h
@ -20,15 +20,15 @@ void queues_displayed_limit(unsigned int limit);
|
|||||||
/*
|
/*
|
||||||
* Return read only list of notifications
|
* Return read only list of notifications
|
||||||
*/
|
*/
|
||||||
const GList *queues_get_displayed();
|
const GList *queues_get_displayed(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns the current amount of notifications,
|
* Returns the current amount of notifications,
|
||||||
* which are shown, waiting or already in history
|
* which are shown, waiting or already in history
|
||||||
*/
|
*/
|
||||||
unsigned int queues_length_waiting();
|
unsigned int queues_length_waiting(void);
|
||||||
unsigned int queues_length_displayed();
|
unsigned int queues_length_displayed(void);
|
||||||
unsigned int queues_length_history();
|
unsigned int queues_length_history(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Insert a fully initialized notification into queues
|
* Insert a fully initialized notification into queues
|
||||||
@ -98,7 +98,7 @@ void queues_check_timeouts(bool idle);
|
|||||||
* and show them. In displayed queue, the amount of elements is limited
|
* and show them. In displayed queue, the amount of elements is limited
|
||||||
* to the amount set via queues_displayed_limit
|
* to the amount set via queues_displayed_limit
|
||||||
*/
|
*/
|
||||||
void queues_update();
|
void queues_update(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the distance to the next event in the queue,
|
* Return the distance to the next event in the queue,
|
||||||
|
@ -29,16 +29,16 @@ int randr_event_base = 0;
|
|||||||
static int randr_major_version = 0;
|
static int randr_major_version = 0;
|
||||||
static int randr_minor_version = 0;
|
static int randr_minor_version = 0;
|
||||||
|
|
||||||
void randr_init();
|
void randr_init(void);
|
||||||
void randr_update();
|
void randr_update(void);
|
||||||
void xinerama_update();
|
void xinerama_update(void);
|
||||||
void screen_update_fallback();
|
void screen_update_fallback(void);
|
||||||
static void x_follow_setup_error_handler(void);
|
static void x_follow_setup_error_handler(void);
|
||||||
static int x_follow_tear_down_error_handler(void);
|
static int x_follow_tear_down_error_handler(void);
|
||||||
static int FollowXErrorHandler(Display *display, XErrorEvent *e);
|
static int FollowXErrorHandler(Display *display, XErrorEvent *e);
|
||||||
static Window get_focused_window(void);
|
static Window get_focused_window(void);
|
||||||
|
|
||||||
static double get_xft_dpi_value()
|
static double get_xft_dpi_value(void)
|
||||||
{
|
{
|
||||||
static double dpi = -1;
|
static double dpi = -1;
|
||||||
//Only run this once, we don't expect dpi changes during runtime
|
//Only run this once, we don't expect dpi changes during runtime
|
||||||
@ -65,7 +65,7 @@ static double get_xft_dpi_value()
|
|||||||
return dpi;
|
return dpi;
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_screens()
|
void init_screens(void)
|
||||||
{
|
{
|
||||||
if (!settings.force_xinerama) {
|
if (!settings.force_xinerama) {
|
||||||
randr_init();
|
randr_init();
|
||||||
@ -87,7 +87,7 @@ void alloc_screen_ar(int n)
|
|||||||
screens_len = n;
|
screens_len = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
void randr_init()
|
void randr_init(void)
|
||||||
{
|
{
|
||||||
int randr_error_base = 0;
|
int randr_error_base = 0;
|
||||||
if (!XRRQueryExtension(xctx.dpy, &randr_event_base, &randr_error_base)) {
|
if (!XRRQueryExtension(xctx.dpy, &randr_event_base, &randr_error_base)) {
|
||||||
@ -99,7 +99,7 @@ void randr_init()
|
|||||||
XRRSelectInput(xctx.dpy, RootWindow(xctx.dpy, DefaultScreen(xctx.dpy)), RRScreenChangeNotifyMask);
|
XRRSelectInput(xctx.dpy, RootWindow(xctx.dpy, DefaultScreen(xctx.dpy)), RRScreenChangeNotifyMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
void randr_update()
|
void randr_update(void)
|
||||||
{
|
{
|
||||||
if (randr_major_version < 1
|
if (randr_major_version < 1
|
||||||
|| (randr_major_version == 1 && randr_minor_version < 5)) {
|
|| (randr_major_version == 1 && randr_minor_version < 5)) {
|
||||||
@ -148,7 +148,7 @@ void screen_check_event(XEvent event)
|
|||||||
randr_update();
|
randr_update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void xinerama_update()
|
void xinerama_update(void)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
XineramaScreenInfo *info = XineramaQueryScreens(xctx.dpy, &n);
|
XineramaScreenInfo *info = XineramaQueryScreens(xctx.dpy, &n);
|
||||||
@ -172,7 +172,7 @@ void xinerama_update()
|
|||||||
XFree(info);
|
XFree(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
void screen_update_fallback()
|
void screen_update_fallback(void)
|
||||||
{
|
{
|
||||||
alloc_screen_ar(1);
|
alloc_screen_ar(1);
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ void screen_update_fallback()
|
|||||||
* Select the screen on which the Window
|
* Select the screen on which the Window
|
||||||
* should be displayed.
|
* should be displayed.
|
||||||
*/
|
*/
|
||||||
screen_info *get_active_screen()
|
screen_info *get_active_screen(void)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
if (settings.monitor > 0 && settings.monitor < screens_len) {
|
if (settings.monitor > 0 && settings.monitor < screens_len) {
|
||||||
|
@ -21,10 +21,10 @@ typedef struct _screen_info {
|
|||||||
dimension_t dim;
|
dimension_t dim;
|
||||||
} screen_info;
|
} screen_info;
|
||||||
|
|
||||||
void init_screens();
|
void init_screens(void);
|
||||||
void screen_check_event(XEvent event);
|
void screen_check_event(XEvent event);
|
||||||
|
|
||||||
screen_info *get_active_screen();
|
screen_info *get_active_screen(void);
|
||||||
double get_dpi_for_screen(screen_info *scr);
|
double get_dpi_for_screen(screen_info *scr);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -773,7 +773,7 @@ static void setopacity(Window win, unsigned long opacity)
|
|||||||
/*
|
/*
|
||||||
* Returns the modifier which is NumLock.
|
* Returns the modifier which is NumLock.
|
||||||
*/
|
*/
|
||||||
static KeySym x_numlock_mod()
|
static KeySym x_numlock_mod(void)
|
||||||
{
|
{
|
||||||
static KeyCode nl = 0;
|
static KeyCode nl = 0;
|
||||||
KeySym sym = 0;
|
KeySym sym = 0;
|
||||||
@ -1199,7 +1199,7 @@ void x_win_show(void)
|
|||||||
/*
|
/*
|
||||||
* Hide the window and ungrab unused keyboard_shortcuts
|
* Hide the window and ungrab unused keyboard_shortcuts
|
||||||
*/
|
*/
|
||||||
void x_win_hide()
|
void x_win_hide(void)
|
||||||
{
|
{
|
||||||
x_shortcut_ungrab(&settings.close_ks);
|
x_shortcut_ungrab(&settings.close_ks);
|
||||||
x_shortcut_ungrab(&settings.close_all_ks);
|
x_shortcut_ungrab(&settings.close_all_ks);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user