replace UICB_PROTO macro by a typedef

This commit is contained in:
Julien Danjou 2008-01-01 17:25:48 +01:00
parent b832f96ba1
commit 909f92d500
28 changed files with 73 additions and 52 deletions

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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)

View file

@ -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
View file

@ -27,6 +27,7 @@
#include "tag.h"
#include "focus.h"
#include "screen.h"
#include "client.h"
#include "layout.h"
extern AwesomeConf globalconf;

View file

@ -23,6 +23,7 @@
#include "tag.h"
#include "layout.h"
#include "focus.h"
#include "client.h"
extern AwesomeConf globalconf;

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -22,6 +22,7 @@
#include "screen.h"
#include "tag.h"
#include "util.h"
#include "client.h"
#include "layouts/fibonacci.h"
extern AwesomeConf globalconf;

View file

@ -19,6 +19,7 @@
*
*/
#include "client.h"
#include "tag.h"
#include "layouts/floating.h"

View file

@ -23,6 +23,8 @@
#ifndef AWESOME_FLOATING_H
#define AWESOME_FLOATING_H
#include "common.h"
LAYOUT_PROTO(layout_floating);
#endif

View file

@ -22,6 +22,7 @@
#include "tag.h"
#include "screen.h"
#include "util.h"
#include "client.h"
#include "layouts/max.h"
extern AwesomeConf globalconf;

View file

@ -26,6 +26,7 @@
#include "awesome.h"
#include "tag.h"
#include "layout.h"
#include "client.h"
#include "layouts/tile.h"
extern AwesomeConf globalconf;

View file

@ -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

View file

@ -29,6 +29,7 @@
#include "event.h"
#include "window.h"
#include "statusbar.h"
#include "client.h"
#include "layouts/floating.h"
#include "layouts/tile.h"

View file

@ -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

View file

@ -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;

View file

@ -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

View file

@ -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
View file

@ -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
View file

@ -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
View file

@ -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
View file

@ -22,7 +22,7 @@
#ifndef AWESOME_UICB_H
#define AWESOME_UICB_H
#include "config.h"
typedef void (Uicb)(int, char *);
int parse_control(char *);

View file

@ -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

View file

@ -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)

View file

@ -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