mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
replace UICB_PROTO macro by a typedef
This commit is contained in:
parent
b832f96ba1
commit
909f92d500
28 changed files with 73 additions and 52 deletions
|
@ -22,10 +22,12 @@
|
|||
#ifndef AWESOME_AWESOME_H
|
||||
#define AWESOME_AWESOME_H
|
||||
|
||||
#include "common.h"
|
||||
#include <X11/Xlib.h>
|
||||
#include "uicb.h"
|
||||
|
||||
int xerror(Display *, XErrorEvent *);
|
||||
UICB_PROTO(uicb_quit);
|
||||
|
||||
Uicb uicb_quit;
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
2
client.c
2
client.c
|
@ -22,7 +22,9 @@
|
|||
#include <stdio.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/extensions/shape.h>
|
||||
#include <X11/extensions/Xinerama.h>
|
||||
|
||||
#include "client.h"
|
||||
#include "screen.h"
|
||||
#include "awesome.h"
|
||||
#include "layout.h"
|
||||
|
|
15
client.h
15
client.h
|
@ -22,7 +22,8 @@
|
|||
#ifndef AWESOME_CLIENT_H
|
||||
#define AWESOME_CLIENT_H
|
||||
|
||||
#include "common.h"
|
||||
#include "config.h"
|
||||
#include "uicb.h"
|
||||
|
||||
Bool client_isvisible(Client *, int);
|
||||
Client * get_client_bywin(Client *, Window);
|
||||
|
@ -41,12 +42,12 @@ void client_updatetitle(Client *);
|
|||
void client_saveprops(Client *);
|
||||
void client_kill(Client *);
|
||||
|
||||
UICB_PROTO(uicb_client_kill);
|
||||
UICB_PROTO(uicb_client_moveresize);
|
||||
UICB_PROTO(uicb_client_settrans);
|
||||
UICB_PROTO(uicb_setborder);
|
||||
UICB_PROTO(uicb_client_swapnext);
|
||||
UICB_PROTO(uicb_client_swapprev);
|
||||
Uicb uicb_client_kill;
|
||||
Uicb uicb_client_moveresize;
|
||||
Uicb uicb_client_settrans;
|
||||
Uicb uicb_setborder;
|
||||
Uicb uicb_client_swapnext;
|
||||
Uicb uicb_client_swapprev;
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
3
common.h
3
common.h
|
@ -24,9 +24,6 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
/** Common prototype definition for ui_callback functions */
|
||||
#define UICB_PROTO(name) void name(int, char *)
|
||||
|
||||
/** Common prototype definition for layouts function */
|
||||
#define LAYOUT_PROTO(name) void name(int)
|
||||
|
||||
|
|
1
event.c
1
event.c
|
@ -35,6 +35,7 @@
|
|||
#include "window.h"
|
||||
#include "mouse.h"
|
||||
#include "ewmh.h"
|
||||
#include "client.h"
|
||||
#include "layouts/tile.h"
|
||||
#include "layouts/floating.h"
|
||||
|
||||
|
|
1
ewmh.c
1
ewmh.c
|
@ -27,6 +27,7 @@
|
|||
#include "tag.h"
|
||||
#include "focus.h"
|
||||
#include "screen.h"
|
||||
#include "client.h"
|
||||
#include "layout.h"
|
||||
|
||||
extern AwesomeConf globalconf;
|
||||
|
|
1
focus.c
1
focus.c
|
@ -23,6 +23,7 @@
|
|||
#include "tag.h"
|
||||
#include "layout.h"
|
||||
#include "focus.h"
|
||||
#include "client.h"
|
||||
|
||||
extern AwesomeConf globalconf;
|
||||
|
||||
|
|
5
focus.h
5
focus.h
|
@ -23,13 +23,14 @@
|
|||
#define AWESOME_FOCUS_H
|
||||
|
||||
#include "config.h"
|
||||
#include "uicb.h"
|
||||
|
||||
void focus_add_client(Client *);
|
||||
void focus_delete_client(Client *);
|
||||
Client * focus_get_current_client(int);
|
||||
|
||||
UICB_PROTO(uicb_focus_history);
|
||||
UICB_PROTO(uicb_focus_client_byname);
|
||||
Uicb uicb_focus_history;
|
||||
Uicb uicb_focus_client_byname;
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
1
layout.c
1
layout.c
|
@ -30,6 +30,7 @@
|
|||
#include "focus.h"
|
||||
#include "statusbar.h"
|
||||
#include "ewmh.h"
|
||||
#include "client.h"
|
||||
#include "layouts/tile.h"
|
||||
#include "layouts/max.h"
|
||||
#include "layouts/fibonacci.h"
|
||||
|
|
17
layout.h
17
layout.h
|
@ -22,7 +22,8 @@
|
|||
#ifndef AWESOME_LAYOUT_H
|
||||
#define AWESOME_LAYOUT_H
|
||||
|
||||
#include "common.h"
|
||||
#include "config.h"
|
||||
#include "uicb.h"
|
||||
|
||||
#define AWESOMEPROPS_ATOM(disp) XInternAtom(disp, "_AWESOME_PROPERTIES", False)
|
||||
|
||||
|
@ -32,13 +33,13 @@ void loadawesomeprops(int);
|
|||
void saveawesomeprops(int);
|
||||
void client_maximize(Client *c, int, int, int, int);
|
||||
|
||||
UICB_PROTO(uicb_client_focusnext);
|
||||
UICB_PROTO(uicb_client_focusprev);
|
||||
UICB_PROTO(uicb_tag_setlayout);
|
||||
UICB_PROTO(uicb_client_togglemax);
|
||||
UICB_PROTO(uicb_client_toggleverticalmax);
|
||||
UICB_PROTO(uicb_client_togglehorizontalmax);
|
||||
UICB_PROTO(uicb_client_zoom);
|
||||
Uicb uicb_client_focusnext;
|
||||
Uicb uicb_client_focusprev;
|
||||
Uicb uicb_tag_setlayout;
|
||||
Uicb uicb_client_togglemax;
|
||||
Uicb uicb_client_toggleverticalmax;
|
||||
Uicb uicb_client_togglehorizontalmax;
|
||||
Uicb uicb_client_zoom;
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "screen.h"
|
||||
#include "tag.h"
|
||||
#include "util.h"
|
||||
#include "client.h"
|
||||
#include "layouts/fibonacci.h"
|
||||
|
||||
extern AwesomeConf globalconf;
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "client.h"
|
||||
#include "tag.h"
|
||||
#include "layouts/floating.h"
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#ifndef AWESOME_FLOATING_H
|
||||
#define AWESOME_FLOATING_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
LAYOUT_PROTO(layout_floating);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "tag.h"
|
||||
#include "screen.h"
|
||||
#include "util.h"
|
||||
#include "client.h"
|
||||
#include "layouts/max.h"
|
||||
|
||||
extern AwesomeConf globalconf;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "awesome.h"
|
||||
#include "tag.h"
|
||||
#include "layout.h"
|
||||
#include "client.h"
|
||||
#include "layouts/tile.h"
|
||||
|
||||
extern AwesomeConf globalconf;
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
LAYOUT_PROTO(layout_tile);
|
||||
LAYOUT_PROTO(layout_tileleft);
|
||||
|
||||
UICB_PROTO(uicb_tag_setnmaster);
|
||||
UICB_PROTO(uicb_tag_setncol);
|
||||
UICB_PROTO(uicb_tag_setmwfact);
|
||||
Uicb uicb_tag_setnmaster;
|
||||
Uicb uicb_tag_setncol;
|
||||
Uicb uicb_tag_setmwfact;
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
1
mouse.c
1
mouse.c
|
@ -29,6 +29,7 @@
|
|||
#include "event.h"
|
||||
#include "window.h"
|
||||
#include "statusbar.h"
|
||||
#include "client.h"
|
||||
#include "layouts/floating.h"
|
||||
#include "layouts/tile.h"
|
||||
|
||||
|
|
8
mouse.h
8
mouse.h
|
@ -22,12 +22,12 @@
|
|||
#ifndef AWESOME_MOUSE_H
|
||||
#define AWESOME_MOUSE_H
|
||||
|
||||
#include "common.h"
|
||||
#include "uicb.h"
|
||||
|
||||
#define MOUSEMASK (BUTTONMASK | PointerMotionMask)
|
||||
#define MOUSEMASK (ButtonPressMask | ButtonReleaseMask | PointerMotionMask)
|
||||
|
||||
UICB_PROTO(uicb_client_movemouse);
|
||||
UICB_PROTO(uicb_client_resizemouse);
|
||||
Uicb uicb_client_movemouse;
|
||||
Uicb uicb_client_resizemouse;
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
3
screen.c
3
screen.c
|
@ -19,12 +19,15 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <X11/extensions/Xinerama.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "screen.h"
|
||||
#include "tag.h"
|
||||
#include "layout.h"
|
||||
#include "focus.h"
|
||||
#include "statusbar.h"
|
||||
#include "client.h"
|
||||
|
||||
extern AwesomeConf globalconf;
|
||||
|
||||
|
|
9
screen.h
9
screen.h
|
@ -22,9 +22,8 @@
|
|||
#ifndef AWESOME_SCREEN_H
|
||||
#define AWESOME_SCREEN_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <X11/extensions/Xinerama.h>
|
||||
#include "config.h"
|
||||
#include "uicb.h"
|
||||
|
||||
Area get_screen_area(int, Statusbar *, Padding *);
|
||||
Area get_display_area(int, Statusbar *, Padding *);
|
||||
|
@ -33,8 +32,8 @@ int get_screen_count(void);
|
|||
int get_phys_screen(int);
|
||||
void move_client_to_screen(Client *, int, Bool);
|
||||
|
||||
UICB_PROTO(uicb_screen_focus);
|
||||
UICB_PROTO(uicb_client_movetoscreen);
|
||||
Uicb uicb_screen_focus;
|
||||
Uicb uicb_client_movetoscreen;
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
#ifndef AWESOME_STATUSBAR_H
|
||||
#define AWESOME_STATUSBAR_H
|
||||
|
||||
#include "common.h"
|
||||
#include "config.h"
|
||||
#include "uicb.h"
|
||||
|
||||
void statusbar_draw_all(int);
|
||||
void statusbar_init(Statusbar *, int);
|
||||
|
@ -30,7 +31,7 @@ void statusbar_display(Statusbar *);
|
|||
int statusbar_get_position_from_str(const char *);
|
||||
void statusbar_update_position(Statusbar *);
|
||||
|
||||
UICB_PROTO(uicb_statusbar_toggle);
|
||||
Uicb uicb_statusbar_toggle;
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
1
tag.c
1
tag.c
|
@ -27,6 +27,7 @@
|
|||
#include "tag.h"
|
||||
#include "util.h"
|
||||
#include "rules.h"
|
||||
#include "client.h"
|
||||
#include "ewmh.h"
|
||||
|
||||
extern AwesomeConf globalconf;
|
||||
|
|
19
tag.h
19
tag.h
|
@ -22,7 +22,8 @@
|
|||
#ifndef AWESOME_TAG_H
|
||||
#define AWESOME_TAG_H
|
||||
|
||||
#include "client.h"
|
||||
#include "config.h"
|
||||
#include "uicb.h"
|
||||
|
||||
/** Check if a client is tiled */
|
||||
#define IS_TILED(client, screen) (client && !client->isfloating && client_isvisible(client, screen))
|
||||
|
@ -35,14 +36,14 @@ void tag_client_with_current_selected(Client *);
|
|||
void tag_client_with_rules(Client *);
|
||||
void tag_view(int, int);
|
||||
|
||||
UICB_PROTO(uicb_client_tag);
|
||||
UICB_PROTO(uicb_client_togglefloating);
|
||||
UICB_PROTO(uicb_client_toggletag);
|
||||
UICB_PROTO(uicb_tag_toggleview);
|
||||
UICB_PROTO(uicb_tag_view);
|
||||
UICB_PROTO(uicb_tag_prev_selected);
|
||||
UICB_PROTO(uicb_tag_viewnext);
|
||||
UICB_PROTO(uicb_tag_viewprev);
|
||||
Uicb uicb_client_tag;
|
||||
Uicb uicb_client_togglefloating;
|
||||
Uicb uicb_client_toggletag;
|
||||
Uicb uicb_tag_toggleview;
|
||||
Uicb uicb_tag_view;
|
||||
Uicb uicb_tag_prev_selected;
|
||||
Uicb uicb_tag_viewnext;
|
||||
Uicb uicb_tag_viewprev;
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
2
uicb.c
2
uicb.c
|
@ -22,7 +22,6 @@
|
|||
#include "awesome.h"
|
||||
#include "util.h"
|
||||
#include "xutil.h"
|
||||
#include "uicb.h"
|
||||
#include "screen.h"
|
||||
#include "tag.h"
|
||||
#include "layout.h"
|
||||
|
@ -30,6 +29,7 @@
|
|||
#include "statusbar.h"
|
||||
#include "widget.h"
|
||||
#include "focus.h"
|
||||
#include "client.h"
|
||||
#include "layouts/tile.h"
|
||||
|
||||
extern AwesomeConf globalconf;
|
||||
|
|
2
uicb.h
2
uicb.h
|
@ -22,7 +22,7 @@
|
|||
#ifndef AWESOME_UICB_H
|
||||
#define AWESOME_UICB_H
|
||||
|
||||
#include "config.h"
|
||||
typedef void (Uicb)(int, char *);
|
||||
|
||||
int parse_control(char *);
|
||||
|
||||
|
|
5
widget.h
5
widget.h
|
@ -24,9 +24,10 @@
|
|||
#define AWESOME_WIDGET_H
|
||||
|
||||
#include <confuse.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "draw.h"
|
||||
#include "common.h"
|
||||
#include "uicb.h"
|
||||
|
||||
enum { AlignLeft, AlignRight, AlignFlex };
|
||||
|
||||
|
@ -44,7 +45,7 @@ WidgetConstructor iconbox_new;
|
|||
WidgetConstructor netwmicon_new;
|
||||
WidgetConstructor progressbar_new;
|
||||
|
||||
UICB_PROTO(uicb_widget_tell);
|
||||
Uicb uicb_widget_tell;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
2
window.h
2
window.h
|
@ -22,7 +22,7 @@
|
|||
#ifndef AWESOME_WINDOW_H
|
||||
#define AWESOME_WINDOW_H
|
||||
|
||||
#include "config.h"
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
/** Mask shorthands, used in event.c and window.c */
|
||||
#define BUTTONMASK (ButtonPressMask | ButtonReleaseMask)
|
||||
|
|
4
xutil.h
4
xutil.h
|
@ -27,8 +27,8 @@
|
|||
|
||||
Bool xgettextprop(Display *, Window, Atom, char *, ssize_t);
|
||||
XColor initxcolor(int, const char *);
|
||||
UICB_PROTO(uicb_spawn);
|
||||
UICB_PROTO(uicb_exec);
|
||||
Uicb uicb_spawn;
|
||||
Uicb uicb_exec;
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
Loading…
Reference in a new issue