-
-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathproperty.h
54 lines (46 loc) · 1.96 KB
/
property.h
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
46
47
48
49
50
51
52
53
/*
* ion/ioncore/property.h
*
* Copyright (c) Tuomo Valkonen 1999-2007.
*
* See the included file LICENSE for details.
*/
#ifndef ION_IONCORE_PROPERTY_H
#define ION_IONCORE_PROPERTY_H
#include <X11/Xatom.h>
#include <X11/Xproto.h>
#include "common.h"
extern ulong xwindow_get_property(Window win, Atom atom, Atom type,
ulong n32expected, bool more, uchar **p);
extern char *xwindow_get_string_property(Window win, Atom a, int *nret);
extern void xwindow_set_string_property(Window win, Atom a, const char *value);
extern bool xwindow_get_integer_property(Window win, Atom a, int *vret);
extern void xwindow_set_integer_property(Window win, Atom a, int value);
extern bool xwindow_get_state_property(Window win, unsigned int *state);
extern void xwindow_set_state_property(Window win, unsigned int state);
extern char **xwindow_get_text_property(Window win, Atom a, int *nret);
/**
* Set a text property. The type of the property (STRING, COMPOUND_STRING,
* UTF8_STRING or even any custom multibyte encoding) is determined
* automatically based on the string and the current locale.
*
* This may be used for any property of type 'TEXT' (not 'STRING') in
* http://tronche.com/gui/x/icccm/sec-2.html#s-2.6.2
*
* @param p null-terminated list of input strings, in the current locale
* encoding
*/
extern void xwindow_set_text_property(Window win, Atom a,
const char **p, int n);
extern bool xwindow_get_cardinal_property(Window win, Atom a, CARD32 *vret);
extern bool xwindow_get_atom_property(Window win, Atom a, Atom *vret);
/**
* Set a property as UTF8_STRING. To read UTF8_STRING properties, the normal
* xwindow_get_text_property can be used.
*
* @param p null-terminated list of input strings, in the current locale
* encoding
*/
extern void xwindow_set_utf8_property(Window win, Atom a,
const char **p, int n);
#endif /* ION_IONCORE_PROPERTY_H */