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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
#ifndef __XKL_CONFIG_ITEM_H__
#define __XKL_CONFIG_ITEM_H__
#include <glib-object.h>
/*
* Maximum name length, including '\'0' character
*/
#define XKL_MAX_CI_NAME_LENGTH 32
/*
* Maximum short description length, including '\\0' character
* (this length is in bytes, so for UTF-8 encoding in
* XML file the actual maximum length can be smaller)
*/
#define XKL_MAX_CI_SHORT_DESC_LENGTH 10
/*
* Maximum description length, including '\\0' character
* (this length is in bytes, so for UTF-8 encoding in
* XML file the actual maximum length can be smaller)
*/
#define XKL_MAX_CI_DESC_LENGTH 192
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct _XklConfigItem XklConfigItem;
typedef struct _XklConfigItemClass XklConfigItemClass;
#define XKL_TYPE_CONFIG_ITEM (xkl_config_item_get_type ())
#define XKL_CONFIG_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XKL_TYPE_CONFIG_ITEM, XklConfigItem))
#define XKL_CONFIG_ITEM_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), XKL_CONFIG_ITEM, XklConfigItemClass))
#define XKL_IS_CONFIG_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XKL_TYPE_CONFIG_ITEM))
#define XKL_IS_CONFIG_ITEM_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), XKL_TYPE_CONFIG_ITEM))
#define XKL_CONFIG_ITEM_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), XKL_TYPE_CONFIG_ITEM, XklConfigItemClass))
/**
* The configuration item. Corresponds to XML element "configItem".
*/
struct _XklConfigItem {
/**
* The superclass object
*/
GObject parent;
/**
* The configuration item name. Corresponds to XML element "name".
*/
gchar name[XKL_MAX_CI_NAME_LENGTH];
/**
* The configuration item short description. Corresponds to XML element "shortDescription".
*/
gchar short_description[XKL_MAX_CI_DESC_LENGTH];
/**
* The configuration item description. Corresponds to XML element "description".
*/
gchar description[XKL_MAX_CI_DESC_LENGTH];
};
/**
* Extra property for the XklConfigItem, defining whether the group allows multiple selection
*/
#define XCI_PROP_ALLOW_MULTIPLE_SELECTION "allowMultipleSelection"
/**
* The XklConfigItem class, derived from GObject
*/
struct _XklConfigItemClass {
/**
* The superclass
*/
GObjectClass parent_class;
};
/**
* xkl_config_item_get_type:
*
* Get type info for XklConfigItem
*
* Returns: GType for XklConfigItem
*/
extern GType xkl_config_item_get_type(void);
/**
* xkl_config_item_new:
*
* Create new XklConfigItem
*
* Returns: new instance
*/
extern XklConfigItem *xkl_config_item_new(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
|