Use 'goto_focus' instead of 'goto' in contrib
[notion.git] / ioncore / property.h
blob9db96dffdb9f552382da40cc9386c38af0621a6c
1 /*
2 * ion/ioncore/property.h
4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
7 */
9 #ifndef ION_IONCORE_PROPERTY_H
10 #define ION_IONCORE_PROPERTY_H
12 #include <X11/Xatom.h>
13 #include <X11/Xproto.h>
15 #include "common.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);
27 /**
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
36 * encoding
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);
41 /**
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
46 * encoding
48 extern void xwindow_set_utf8_property(Window win, Atom a,
49 const char **p, int n);
52 #endif /* ION_IONCORE_PROPERTY_H */