Copyright (c) 1999, Oracle and/or its affiliates.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
XkbDescPtr XkbGetKeyboard "(\^Display *" "display" "\^," "unsigned int " "which" "\^," "unsigned int " "device_spec" "\^);"
display connection to the X server
device_spec device ID, or XkbUseCoreKbd
bits_to_change determines events to be selected / deselected
values_for_bits 1=>select, 0->deselect; for events in bits_to_change
XkbGetKeyboard allocates and returns a pointer to a keyboard description. It queries the server for those components specified in the which parameter for device device_spec and copies the results to the XkbDescRec it allocated. The remaining fields in the keyboard description are set to NULL. The valid masks for which are those listed in Table 1.
| Table 1 Mask Bits for XkbDescRec |
| Mask Bit XkbDescRec Field Value |
| XkbControlsMask ctrls (1L<<0) |
| XkbServerMapMask server (1L<<1) |
| XkbIClientMapMask map (1L<<2) |
| XkbIndicatorMapMask indicators (1L<<3) |
| XkbNamesMask names (1L<<4) |
| XkbCompatMapMask compat (1L<<5) |
| XkbGeometryMask geom (1L<<6) |
| XkbAllComponentsMask All Fields (1L<<7) |
If successful, XkbGetKeyboard returns a pointer to a newly allocated XkbDescRec structure, which is described in XkbGetKeyboardByName (__libmansuffix__), and which should be freed with XkbFreeKeyboard (__libmansuffix__). If XkbGetKeyboard does not succeed, it returns NULL .
15 BadAlloc Unable to allocate storage