2 * ion/ioncore/property.h
4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
9 #ifndef ION_IONCORE_PROPERTY_H
10 #define ION_IONCORE_PROPERTY_H
12 #include <X11/Xatom.h>
13 #include <X11/Xproto.h>
17 extern ulong
xwindow_get_property(Window win
, Atom atom
, Atom type
,
18 ulong n32expected
, bool more
, uchar
**p
);
19 extern char *xwindow_get_string_property(Window win
, Atom a
, int *nret
);
20 extern void xwindow_set_string_property(Window win
, Atom a
, const char *value
);
21 extern bool xwindow_get_integer_property(Window win
, Atom a
, int *vret
);
22 extern void xwindow_set_integer_property(Window win
, Atom a
, int value
);
23 extern bool xwindow_get_state_property(Window win
, int *state
);
24 extern void xwindow_set_state_property(Window win
, int state
);
25 extern char **xwindow_get_text_property(Window win
, Atom a
, int *nret
);
28 * Set a text property. The type of the property (STRING, COMPOUND_STRING,
29 * UTF8_STRING or even any custom multibyte encoding) is determined
30 * automatically based on the string and the current locale.
32 * This may be used for any property of type 'TEXT' (not 'STRING') in
33 * http://tronche.com/gui/x/icccm/sec-2.html#s-2.6.2
35 * @param p null-terminated list of input strings, in the current locale
38 extern void xwindow_set_text_property(Window win
, Atom a
,
39 const char **p
, int n
);
40 extern bool xwindow_get_cardinal_property(Window win
, Atom a
, CARD32
*vret
);
42 * Set a property as UTF8_STRING. To read UTF8_STRING properties, the normal
43 * xwindow_get_text_property can be used.
45 * @param p null-terminated list of input strings, in the current locale
48 extern void xwindow_set_utf8_property(Window win
, Atom a
,
49 const char **p
, int n
);
52 #endif /* ION_IONCORE_PROPERTY_H */