]> icculus.org git repositories - dana/openbox.git/blob - cwmcc/prop.h
add all functions for getting and setting window properties
[dana/openbox.git] / cwmcc / prop.h
1 #ifndef __prop_h
2 #define __prop_h
3
4 #include <X11/Xlib.h>
5
6 /* with the exception of prop_get32, all other prop_get_* functions require
7    you to free the returned value with g_free or g_strfreev (for the char**s)
8 */
9
10 gboolean prop_get32(Window win, Atom prop, Atom type, gulong *ret);
11
12 gboolean prop_get_array32(Window win, Atom prop, Atom type, gulong **ret,
13                           gulong *nret);
14
15 gboolean prop_get_string(Window win, Atom prop, Atom type, char **ret);
16
17 /*! Gets a string from a property which is stored in UTF-8 encoding. */
18 gboolean prop_get_string_utf(Window win, Atom prop, char **ret);
19
20 /*! Gets a string from a property which is stored in the current local
21   encoding. The returned string is in UTF-8 encoding. */
22 gboolean prop_get_string_locale(Window win, Atom prop, char **ret);
23
24 /*! Gets a null terminated array of strings from a property which is stored in
25   UTF-8 encoding. */
26 gboolean prop_get_strings_utf(Window win, Atom prop, Atom type, char ***ret);
27
28 /*! Gets a null terminated array of strings from a property which is stored in
29   the current locale encoding. The returned string is in UTF-8 encoding. */
30 gboolean prop_get_strings_locale(Window win, Atom prop, Atom type,char ***ret);
31
32 /*! Sets a null terminated array of strings in a property encoded as UTF-8. */
33 void prop_set_strings_utf(Window win, Atom prop, Atom type, char **strs);
34
35 void prop_erase(Window win, Atom prop);
36
37 #endif