1XkbListComponents(3) XKB FUNCTIONS XkbListComponents(3)
2
3
4
6 XkbListComponents - List of components for one or more component types
7
9 XkbComponentListPtr XkbListComponents (Display *dpy, unsigned int
10 device_spec, XkbComponentNamesPtr ptrns, int *max_inout);
11
13 - dpy connection to X server
14
15 - device_spec
16 device ID, or XkbUseCoreKbd
17
18 - ptrns
19 namelist for components of interest
20
21 - max_inout
22 max # returned names, # left over
23
25 You may ask the server for a list of components for one or more compo‐
26 nent types. The request takes the form of a set of patterns, one pat‐
27 tern for each of the component types, including a pattern for the com‐
28 plete keyboard description. To obtain this list, use XkbListComponents.
29
30 XkbListComponents queries the server for a list of component names
31 matching the patterns specified in ptrns. It waits for a reply and
32 returns the matching component names in an XkbComponentListRec struc‐
33 ture. When you are done using the structure, you should free it using
34 XkbFreeComponentList. device_spec indicates a particular device in
35 which the caller is interested. A server is allowed (but not required)
36 to restrict its reply to portions of the database that are relevant for
37 that particular device.
38
39 ptrns is a pointer to an XkbComponentNamesRec. Each of the fields in
40 ptrns contains a pattern naming the components of interest. Each of the
41 patterns is composed of characters from the ISO Latin1 encoding, but
42 can contain only parentheses, the wildcard characters `?' and `*', and
43 characters permitted in a component class or member name. A pattern may
44 be NULL, in which case no components for that type is returned. Pattern
45 matches with component names are case sensitive. The `?' wildcard
46 matches any single character, except a left or right parenthesis; the
47 `*' wildcard matches any number of characters, except a left or right
48 parenthesis. If an implementation allows additional characters in a
49 component class or member name other than those required by the Xkb
50 extension, the result of comparing one of the additional characters to
51 either of the wildcard characters is implementation-dependent.
52
53 If a pattern contains illegal characters, the illegal characters are
54 ignored. The matching process is carried out as if the illegal charac‐
55 ters were omitted from the pattern.
56
57 max_inout is used to throttle the amount of data passed to and from the
58 server. On input, it specifies the maximum number of names to be
59 returned (the total number of names in all component categories). Upon
60 return from XkbListComponents, max_inout contains the number of names
61 that matched the request but were not returned because of the limit.
62
63 Component Names
64
65 Component names have the form class(member) where class describes a
66 subset of the available components for a particular type and the
67 optional member identifies a specific component from that subset. For
68 example, the name "atlantis(acme)" for a symbols component might spec‐
69 ify the symbols used for the atlantis national keyboard layout by the
70 vendor "acme." Each class has an optional default member - references
71 that specify a class but not a member refer to the default member of
72 the class, if one exists. Xkb places no constraints on the interpreta‐
73 tion of the class and member names used in component names.
74
75 The class and member names are both specified using characters from the
76 Latin-1 character set. Xkb implementations must accept all alphanumeric
77 characters, minus (`-') and underscore (`_') in class or member names,
78 and must not accept parentheses, plus, vertical bar, percent sign,
79 asterisk, question mark, or white space. The use of other characters is
80 implementation-dependent.
81
83 The component name patterns used to describe the request are passed to
84 XkbListComponents using an XkbComponentNamesRec structure. This struc‐
85 ture has no special allocation constraints or interrelationships with
86 other structures; allocate and free this structure using standard mal‐
87 loc and free calls or their equivalent:
88
89 typedef struct _XkbComponentNames {
90 char * keymap; /∗ keymap names */
91 char * keycodes; /∗ keycode names */
92 char * types; /∗ type names */
93 char * compat; /∗ compatibility map names */
94 char * symbols; /∗ symbol names */
95 char * geometry; /∗ geometry names */
96 } XkbComponentNamesRec, *XkbComponentNamesPtr;
97
98 XkbListComponents returns a pointer to an XkbComponentListRec:
99
100 typedef struct _XkbComponentList {
101 int num_keymaps; /∗ number of entries in keymap */
102 int num_keycodes; /∗ number of entries in keycodes */
103 int num_types; /∗ number of entries in types */
104 int num_compat; /∗ number of entries in compat */
105 int num_symbols; /∗ number of entries in symbols */
106 int num_geometry; /∗ number of entries in geometry;
107 XkbComponentNamePtr keymap; /∗ keymap names */
108 XkbComponentNamePtr keycodes; /∗ keycode names */
109 XkbComponentNamePtr types; /∗ type names */
110 XkbComponentNamePtr compat; /∗ compatibility map names */
111 XkbComponentNamePtr symbols; /∗ symbol names */
112 XkbComponentNamePtr geometry; /∗ geometry names */
113 } XkbComponentListRec, *XkbComponentListPtr;
114
115 typedef struct _XkbComponentName {
116 unsigned short flags; /∗ hints regarding component name */
117 char * name; /∗ name of component */
118 } XkbComponentNameRec, *XkbComponentNamePtr;
119
120
122 XkbFreeComponentList(3)
123
125 Note that the structure used to specify patterns on input is an XkbCom‐
126 ponentNamesRec, and that used to hold the individual component names
127 upon return is an XkbComponentNameRec (no trailing `s' in Name).
128
129
130
131X Version 11 libX11 1.3.4 XkbListComponents(3)