Files
amiwm-neo/icc.h
Lucas de Sena 5bbae05fec icc: use compound literal rather than static object to return pointer
thus make mkcmessage reentrant (and a macro, rather than a function)
2026-01-31 01:25:50 +00:00

37 lines
947 B
C

#ifndef ICC_H
#define ICC_H
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include "client.h"
extern void init_atoms(void);
extern void setsupports(Window, Window);
extern void sendcmessage(Window, Atom, long);
extern void getproto(Client *c);
extern void getwmstate(Client *c);
extern void setwmstate(Client *c);
extern void setstringprop(Window, Atom, char *);
extern void propertychange(Client *, Atom);
extern long _getprop(Window, Atom, Atom, long, char **);
extern void getwflags(Client *);
extern Atom wm_state, wm_change_state, wm_protocols, wm_delete, wm_take_focus, wm_colormaps, wm_hints, amiwm_screen, swm_vroot;
#define Pdelete 1
#define Ptakefocus 2
#define Psizebottom 4
#define Psizeright 8
#define Psizetrans 16
#define mkcmessage(w, a, x, ...) (&(XEvent){.xclient = { \
.type = ClientMessage, \
.window = (w), \
.message_type = (a), \
.format = 32, \
.data.l = {(long)(x), CurrentTime, __VA_ARGS__}, \
}})
#endif