all repos — openbox @ d1ceea89bd811d776050d2f6a04370d30a0932b3

openbox fork - make it a bit more like ryudo

cwmcc/prop.h (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef __cwmcc_prop_h
#define __cwmcc_prop_h

#include <glib.h>
#include <X11/Xlib.h>

/* with the exception of prop_get32, all other prop_get_* functions require
   you to free the returned value with g_free or g_strfreev (for the char**s)
*/

gboolean cwmcc_prop_get32(Window win, Atom prop, Atom type, gulong *ret);

gboolean cwmcc_prop_get_array32(Window win, Atom prop, Atom type, gulong **ret,
                          gulong *nret);

gboolean cwmcc_prop_get_string(Window win, Atom prop, Atom type, char **ret);

/*! Gets a string from a property which is stored in UTF-8 encoding. */
gboolean cwmcc_prop_get_string_utf8(Window win, Atom prop, char **ret);

/*! Gets a string from a property which is stored in the current local
  encoding. The returned string is in UTF-8 encoding. */
gboolean cwmcc_prop_get_string_locale(Window win, Atom prop, char **ret);

/*! Gets a null terminated array of strings from a property which is stored in
  UTF-8 encoding. */
gboolean cwmcc_prop_get_strings_utf8(Window win, Atom prop, char ***ret);

/*! Gets a null terminated array of strings from a property which is stored in
  the current locale encoding. The returned string is in UTF-8 encoding. */
gboolean cwmcc_prop_get_strings_locale(Window win, Atom prop, char ***ret);

void cwmcc_prop_set32(Window win, Atom prop, Atom type, gulong val);

void cwmcc_prop_set_array32(Window win, Atom prop, Atom type,
                            gulong *val, gulong num);

void cwmcc_prop_set_string_utf8(Window win, Atom prop, char *val);

/*! Sets a null terminated array of strings in a property encoded as UTF-8. */
void cwmcc_prop_set_strings_utf8(Window win, Atom prop, char **strs);

void cwmcc_prop_erase(Window win, Atom prop);

#endif