diff --git a/src/common.h b/src/common.h index c5aa6700..42b8bbae 100644 --- a/src/common.h +++ b/src/common.h @@ -231,20 +231,6 @@ typedef struct { bool invert_color : 1; } 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 { struct _ignore *next; unsigned long sequence; @@ -1584,19 +1570,6 @@ wid_has_prop(const session_t *ps, Window w, Atom atom) { 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. */ diff --git a/src/x.h b/src/x.h index 77d5dd02..09b4c75a 100644 --- a/src/x.h +++ b/src/x.h @@ -10,7 +10,20 @@ #include "region.h" 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(func, c, ...) ({ \ @@ -54,6 +67,15 @@ 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 value of a type-Window property of a window. *