Move winprop_t to win.h
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
733d5dcf54
commit
8805cfa986
27
src/common.h
27
src/common.h
|
@ -231,20 +231,6 @@ typedef struct {
|
||||||
bool invert_color : 1;
|
bool invert_color : 1;
|
||||||
} win_upd_t;
|
} win_upd_t;
|
||||||
|
|
||||||
/// Structure representing Window property value.
|
|
||||||
typedef struct winprop {
|
|
||||||
union {
|
|
||||||
void *ptr;
|
|
||||||
char *p8;
|
|
||||||
short *p16;
|
|
||||||
long *p32;
|
|
||||||
unsigned long *c32; // 32bit cardinal
|
|
||||||
};
|
|
||||||
unsigned long nitems;
|
|
||||||
Atom type;
|
|
||||||
int format;
|
|
||||||
} winprop_t;
|
|
||||||
|
|
||||||
typedef struct _ignore {
|
typedef struct _ignore {
|
||||||
struct _ignore *next;
|
struct _ignore *next;
|
||||||
unsigned long sequence;
|
unsigned long sequence;
|
||||||
|
@ -1584,19 +1570,6 @@ wid_has_prop(const session_t *ps, Window w, Atom atom) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
winprop_t
|
|
||||||
wid_get_prop_adv(const session_t *ps, Window w, Atom atom, long offset,
|
|
||||||
long length, Atom rtype, int rformat);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Wrapper of wid_get_prop_adv().
|
|
||||||
*/
|
|
||||||
static inline winprop_t
|
|
||||||
wid_get_prop(const session_t *ps, Window wid, Atom atom, long length,
|
|
||||||
Atom rtype, int rformat) {
|
|
||||||
return wid_get_prop_adv(ps, wid, atom, 0L, length, rtype, rformat);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the numeric property value from a win_prop_t.
|
* Get the numeric property value from a win_prop_t.
|
||||||
*/
|
*/
|
||||||
|
|
24
src/x.h
24
src/x.h
|
@ -10,7 +10,20 @@
|
||||||
#include "region.h"
|
#include "region.h"
|
||||||
|
|
||||||
typedef struct session session_t;
|
typedef struct session session_t;
|
||||||
typedef struct winprop winprop_t;
|
|
||||||
|
/// Structure representing Window property value.
|
||||||
|
typedef struct winprop {
|
||||||
|
union {
|
||||||
|
void *ptr;
|
||||||
|
char *p8;
|
||||||
|
short *p16;
|
||||||
|
long *p32;
|
||||||
|
unsigned long *c32; // 32bit cardinal
|
||||||
|
};
|
||||||
|
unsigned long nitems;
|
||||||
|
xcb_atom_t type;
|
||||||
|
int format;
|
||||||
|
} winprop_t;
|
||||||
|
|
||||||
#define XCB_SYNCED_VOID(func, c, ...) xcb_request_check(c, func##_checked(c, __VA_ARGS__));
|
#define XCB_SYNCED_VOID(func, c, ...) xcb_request_check(c, func##_checked(c, __VA_ARGS__));
|
||||||
#define XCB_SYNCED(func, c, ...) ({ \
|
#define XCB_SYNCED(func, c, ...) ({ \
|
||||||
|
@ -54,6 +67,15 @@ winprop_t
|
||||||
wid_get_prop_adv(const session_t *ps, Window w, Atom atom, long offset,
|
wid_get_prop_adv(const session_t *ps, Window w, Atom atom, long offset,
|
||||||
long length, Atom rtype, int rformat);
|
long length, Atom rtype, int rformat);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wrapper of wid_get_prop_adv().
|
||||||
|
*/
|
||||||
|
static inline winprop_t
|
||||||
|
wid_get_prop(const session_t *ps, Window wid, Atom atom, long length,
|
||||||
|
Atom rtype, int rformat) {
|
||||||
|
return wid_get_prop_adv(ps, wid, atom, 0L, length, rtype, rformat);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the value of a type-<code>Window</code> property of a window.
|
* Get the value of a type-<code>Window</code> property of a window.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue