1XkbListComponents(3)             XKB FUNCTIONS            XkbListComponents(3)
2
3
4

NAME

6       XkbListComponents - List of components for one or more component types
7

SYNOPSIS

9       XkbComponentListPtr  XkbListComponents  (Display *dpy, unsigned int de‐
10              vice_spec, XkbComponentNamesPtr ptrns, int *max_inout);
11

ARGUMENTS

13       dpy    connection to X server
14
15       device_spec
16              device ID, or XkbUseCoreKbd
17
18       ptrns  namelist for components of interest
19
20       max_inout
21              max # returned names, # left over
22

DESCRIPTION

24       You may ask the server for a list of components for one or more  compo‐
25       nent  types.  The request takes the form of a set of patterns, one pat‐
26       tern for each of the component types, including a pattern for the  com‐
27       plete keyboard description. To obtain this list, use XkbListComponents.
28
29       XkbListComponents  queries  the  server  for  a list of component names
30       matching the patterns specified in ptrns.  It waits for a reply and re‐
31       turns the matching component names in an XkbComponentListRec structure.
32       When you are done  using  the  structure,  you  should  free  it  using
33       XkbFreeComponentList.  device_spec  indicates  a  particular  device in
34       which the caller is interested. A server is allowed (but not  required)
35       to restrict its reply to portions of the database that are relevant for
36       that particular device.
37
38       ptrns is a pointer to an XkbComponentNamesRec. Each of  the  fields  in
39       ptrns contains a pattern naming the components of interest. Each of the
40       patterns is composed of characters from the ISO  Latin1  encoding,  but
41       can  contain only parentheses, the wildcard characters `?' and `*', and
42       characters permitted in a component class or member name. A pattern may
43       be NULL, in which case no components for that type is returned. Pattern
44       matches with component names are  case  sensitive.  The  `?'   wildcard
45       matches  any  single character, except a left or right parenthesis; the
46       `*' wildcard matches any number of characters, except a left  or  right
47       parenthesis.  If  an  implementation  allows additional characters in a
48       component class or member name other than those required by the Xkb ex‐
49       tension,  the  result  of comparing one of the additional characters to
50       either of the wildcard characters is implementation-dependent.
51
52       If a pattern contains illegal characters, the  illegal  characters  are
53       ignored.  The matching process is carried out as if the illegal charac‐
54       ters were omitted from the pattern.
55
56       max_inout is used to throttle the amount of data passed to and from the
57       server.  On  input,  it specifies the maximum number of names to be re‐
58       turned (the total number of names in all  component  categories).  Upon
59       return  from  XkbListComponents, max_inout contains the number of names
60       that matched the request but were not returned because of the limit.
61
62       Component Names
63
64       Component names have the form class(member)  where  class  describes  a
65       subset  of  the  available components for a particular type and the op‐
66       tional member identifies a specific component from that subset. For ex‐
67       ample,  the name "atlantis(acme)" for a symbols component might specify
68       the symbols used for the atlantis national keyboard layout by the  ven‐
69       dor "acme." Each class has an optional default member - references that
70       specify a class but not a member refer to the  default  member  of  the
71       class,  if  one exists. Xkb places no constraints on the interpretation
72       of the class and member names used in component names.
73
74       The class and member names are both specified using characters from the
75       Latin-1 character set. Xkb implementations must accept all alphanumeric
76       characters, minus (`-') and underscore (`_') in class or member  names,
77       and  must not accept parentheses, plus, vertical bar, percent sign, as‐
78       terisk, question mark, or white space. The use of other  characters  is
79       implementation-dependent.
80

STRUCTURES

82       The  component name patterns used to describe the request are passed to
83       XkbListComponents using an XkbComponentNamesRec structure. This  struc‐
84       ture  has  no special allocation constraints or interrelationships with
85       other structures; allocate and free this structure using standard  mal‐
86       loc and free calls or their equivalent:
87
88           typedef struct _XkbComponentNames {
89               char *         keymap;           /* keymap names */
90               char *         keycodes;         /* keycode names */
91               char *         types;            /* type names */
92               char *         compat;           /* compatibility map names */
93               char *         symbols;          /* symbol names */
94               char *         geometry;         /* geometry names */
95           } XkbComponentNamesRec, *XkbComponentNamesPtr;
96
97       XkbListComponents returns a pointer to an XkbComponentListRec:
98
99           typedef struct _XkbComponentList {
100               int                      num_keymaps;  /* number of entries in keymap */
101               int                      num_keycodes; /* number of entries in keycodes */
102               int                      num_types;    /* number of entries in types */
103               int                      num_compat;   /* number of entries in compat */
104               int                      num_symbols;  /* number of entries in symbols */
105               int                      num_geometry; /* number of entries in geometry;
106               XkbComponentNamePtr      keymap;       /* keymap names */
107               XkbComponentNamePtr      keycodes;     /* keycode names */
108               XkbComponentNamePtr      types;        /* type names */
109               XkbComponentNamePtr      compat;       /* compatibility map names */
110               XkbComponentNamePtr      symbols;      /* symbol names */
111               XkbComponentNamePtr      geometry;     /* geometry names */
112           } XkbComponentListRec, *XkbComponentListPtr;
113
114           typedef struct _XkbComponentName {
115               unsigned short           flags;        /* hints regarding component name */
116               char *                   name;         /* name of component */
117           } XkbComponentNameRec, *XkbComponentNamePtr;
118
119

SEE ALSO

121       XkbFreeComponentList(3)
122

NOTES

124       Note that the structure used to specify patterns on input is an XkbCom‐
125       ponentNamesRec, and that used to hold the  individual  component  names
126       upon return is an XkbComponentNameRec (no trailing `s' in Name).
127
128
129
130X Version 11                     libX11 1.8.7             XkbListComponents(3)
Impressum