polytreewm/src/atoms.h

39 lines
813 B
C
Raw Permalink Normal View History

2021-11-12 09:02:46 +00:00
#ifndef _ATOMS_H
#define _ATOMS_H
2021-11-21 06:11:11 +00:00
#include <stddef.h>
2021-11-12 09:02:46 +00:00
#include <X11/Xutil.h>
2021-11-21 06:11:11 +00:00
#define ATOMS_DELETE(atoms) { \
atoms_delete(atoms); \
atoms = NULL; \
}
2021-11-12 09:02:46 +00:00
/* EWMH atoms */
2022-09-09 15:01:37 +00:00
#define NetSupported 0
#define NetWMName 1
#define NetWMState 2
#define NetWMCheck 3
#define NetWMFullscreen 4
#define NetActiveWindow 5
#define NetWMWindowType 6
#define NetWMWindowTypeDialog 7
#define NetClientList 8
#define NetLast 9
2021-11-12 09:02:46 +00:00
/* default atoms */
2022-09-09 15:01:37 +00:00
#define WMProtocols 0
#define WMDelete 1
#define WMState 2
#define WMTakeFocus 3
#define WMLast 4
2021-11-12 09:02:46 +00:00
2021-11-12 09:07:15 +00:00
typedef struct Atoms {
Atom wmatom[WMLast], netatom[NetLast], utf8string;
2021-11-12 09:07:15 +00:00
} *Atoms;
2021-11-12 09:02:46 +00:00
2021-11-12 09:07:15 +00:00
Atoms atoms_create(Display *dpy);
2021-11-21 06:11:11 +00:00
void atoms_delete(Atoms atoms);
2021-11-12 09:02:46 +00:00
#endif // _ATOMS_H