head 1.1;
branch 1.1.1;
access;
symbols
libX11-1-8-12:1.1.1.3
netbsd-10-1-RELEASE:1.1.1.3
libX11-1-8-10:1.1.1.3
libX11-1-8-9:1.1.1.3
netbsd-8-3-RELEASE:1.1.1.3
netbsd-9-4-RELEASE:1.1.1.3
netbsd-10-0-RELEASE:1.1.1.3
netbsd-10-0-RC6:1.1.1.3
netbsd-10-0-RC5:1.1.1.3
netbsd-10-0-RC4:1.1.1.3
netbsd-10-0-RC3:1.1.1.3
netbsd-10-0-RC2:1.1.1.3
netbsd-10-0-RC1:1.1.1.3
libX11-1-8-7:1.1.1.3
libX11-1-8-6:1.1.1.3
libX11-1-8-4:1.1.1.3
libX11-1-8-3:1.1.1.3
netbsd-10:1.1.1.3.0.6
netbsd-10-base:1.1.1.3
libX11-1-8-2:1.1.1.3
netbsd-9-3-RELEASE:1.1.1.3
libX11-1-8-1:1.1.1.3
libX11-1-7-2:1.1.1.3
libX11-1-7-1:1.1.1.3
netbsd-9-2-RELEASE:1.1.1.3
libX11-1-7-0:1.1.1.3
netbsd-9-1-RELEASE:1.1.1.3
libX11-1-6-12:1.1.1.3
libX11-1-6-10:1.1.1.3
netbsd-8-2-RELEASE:1.1.1.3
libX11-1-6-9:1.1.1.3
netbsd-9-0-RELEASE:1.1.1.3
netbsd-9-0-RC2:1.1.1.3
netbsd-9-0-RC1:1.1.1.3
netbsd-9:1.1.1.3.0.4
netbsd-9-base:1.1.1.3
libX11-1-6-8:1.1.1.3
netbsd-8-1-RELEASE:1.1.1.3
netbsd-8-1-RC1:1.1.1.3
libX11-1-6-7:1.1.1.3
netbsd-7-2-RELEASE:1.1.1.2
libX11-1-6-6:1.1.1.3
netbsd-8-0-RELEASE:1.1.1.3
netbsd-8-0-RC2:1.1.1.3
netbsd-8-0-RC1:1.1.1.3
netbsd-7-1-2-RELEASE:1.1.1.2
netbsd-7-1-1-RELEASE:1.1.1.2
netbsd-8:1.1.1.3.0.2
netbsd-8-base:1.1.1.3
netbsd-7-1:1.1.1.2.0.8
netbsd-7-1-RELEASE:1.1.1.2
libX11-1-6-5:1.1.1.3
netbsd-7-1-RC2:1.1.1.2
netbsd-7-1-RC1:1.1.1.2
netbsd-7-0-2-RELEASE:1.1.1.2
libX11-1-6-4:1.1.1.3
netbsd-7-0-1-RELEASE:1.1.1.2
netbsd-7-0:1.1.1.2.0.6
netbsd-7-0-RELEASE:1.1.1.2
netbsd-7-0-RC3:1.1.1.2
netbsd-7-0-RC2:1.1.1.2
libX11-1-6-3:1.1.1.3
netbsd-7-0-RC1:1.1.1.2
netbsd-6-0-6-RELEASE:1.1.1.1
netbsd-6-1-5-RELEASE:1.1.1.1
netbsd-7:1.1.1.2.0.4
netbsd-7-base:1.1.1.2
netbsd-6-1-4-RELEASE:1.1.1.1
netbsd-6-0-5-RELEASE:1.1.1.1
riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.2
libX11-1-6-2:1.1.1.2
riastradh-drm2:1.1.1.2.0.2
riastradh-drm2-base:1.1.1.2
netbsd-6-1-3-RELEASE:1.1.1.1
netbsd-6-0-4-RELEASE:1.1.1.1
netbsd-6-1-2-RELEASE:1.1.1.1
netbsd-6-0-3-RELEASE:1.1.1.1
netbsd-6-1-1-RELEASE:1.1.1.1
libX11-1-6-0:1.1.1.2
libX11-1-5-99-902:1.1.1.2
netbsd-6-1:1.1.1.1.0.6
netbsd-6-0-2-RELEASE:1.1.1.1
netbsd-6-1-RELEASE:1.1.1.1
netbsd-6-1-RC4:1.1.1.1
netbsd-6-1-RC3:1.1.1.1
netbsd-6-1-RC2:1.1.1.1
netbsd-6-1-RC1:1.1.1.1
netbsd-6-0-1-RELEASE:1.1.1.1
netbsd-6-0:1.1.1.1.0.4
netbsd-6-0-RELEASE:1.1.1.1
netbsd-6-0-RC2:1.1.1.1
netbsd-6-0-RC1:1.1.1.1
netbsd-6:1.1.1.1.0.2
netbsd-6-base:1.1.1.1
libX11-1-4-4:1.1.1.1
libX11-1-4-3:1.1.1.1
libX11-1-4-1:1.1.1.1
xorg:1.1.1;
locks; strict;
comment @# @;
1.1
date 2011.02.23.07.55.46; author mrg; state Exp;
branches
1.1.1.1;
next ;
1.1.1.1
date 2011.02.23.07.55.46; author mrg; state Exp;
branches;
next 1.1.1.2;
1.1.1.2
date 2013.05.30.23.04.38; author mrg; state Exp;
branches;
next 1.1.1.3;
commitid IUyYawfUjfmA1IRw;
1.1.1.3
date 2015.07.19.08.08.35; author mrg; state Exp;
branches;
next ;
commitid u9SvqCeNOT4JZRty;
desc
@@
1.1
log
@Initial revision
@
text
@Complete Keyboard Description
The complete Xkb description for a keyboard device is accessed using a single
structure containing pointers to major Xkb components. This chapter describes
this single structure and provides references to other sections of this
document that discuss the major Xkb components in detail.
The XkbDescRec Structure
The complete description of an Xkb keyboard is given by an
XkbDescRec
. The component structures in the
XkbDescRec
represent the major Xkb components outlined in Figure 1.1.
typedef struct {
struct _XDisplay * display; /* connection to
X server */
unsigned short flags; /* private to Xkb, do
not modify */
unsigned short device_spec; /* device of
interest */
KeyCode min_key_code; /* minimum keycode for
device */
KeyCode max_key_code; /* maximum keycode for
device */
XkbControlsPtr ctrls; /* controls */
XkbServerMapPtr server; /* server keymap */
XkbClientMapPtr map; /* client keymap */
XkbIndicatorPtr indicators; /* indicator map
*/
XkbNamesPtr names; /* names for all
components */
XkbCompatMapPtr compat; /* compatibility map
*/
XkbGeometryPtr geom; /* physical geometry of
keyboard */
}
XkbDescRec
, *XkbDescPtr;
The
display
field points to an X display structure. The
flags
field is private to the library: modifying
flags
may yield unpredictable results. The
device_spec
field specifies the device identifier of the keyboard input device, or
XkbUseCoreKeyboard
, which specifies the core keyboard device. The
min_key_code
and
max_key_code
fields specify the least and greatest keycode that can be returned by the
keyboard.
The other fields specify structure components of the keyboard description and
are described in detail in other sections of this document. Table 6.1
identifies the subsequent sections of this document that discuss the individual
components of the
XkbDescRec
.
Each structure component has a corresponding mask bit that is used in function
calls to indicate that the structure should be manipulated in some manner, such
as allocating it or freeing it. These masks and their relationships to the
fields in the
XkbDescRec
are shown in Table 6.2.
Mask Bits for XkbDescRecMask BitXkbDescRec FieldValueXkbControlsMaskctrls(1L<<0)XkbServerMapMaskserver(1L<<1)XkbIClientMapMaskmap(1L<<2)XkbIndicatorMapMaskindicators(1L<<3)XkbNamesMasknames(1L<<4)XkbCompatMapMaskcompat(1L<<5)XkbGeometryMaskgeom(1L<<6)XkbAllComponentsMaskAll Fields(0x7f)
Obtaining a Keyboard Description from the Server
To retrieve one or more components of a keyboard device description, use
XkbGetKeyboard
(see also
XkbGetKeyboardbyName
).
XkbDescPtr
XkbGetKeyboard
(
display, which, device_spec
)
Display *
display
; /* connection to X server */
unsigned int
which
; /* mask indicating components to return */
unsigned int
device_spec
; /* device for which to fetch description, or
XkbUseCoreKbd
*/
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 6.2.
XkbGetKeyboard
can generate
BadAlloc
protocol errors.
To free the returned keyboard description, use
XkbFreeKeyboard
(see section 6.4).
Tracking Changes to the Keyboard Description in the Server
The server can generate events whenever its copy of the keyboard description
for a device changes. Refer to section 14.4 for detailed information on
tracking changes to the keyboard description.
Allocating and Freeing a Keyboard Description
Applications seldom need to directly allocate a keyboard description; calling
XkbGetKeyboard
usually suffices. In the event you need to create a keyboard description from
scratch, however, use
XkbAllocKeyboard
rather than directly calling
malloc
or
Xmalloc
.
XkbDescRec *
XkbAllocKeyboard
(void)
If
XkbAllocKeyboard
fails to allocate the keyboard description, it returns
NULL
. Otherwise, it returns a pointer to an empty keyboard description structure.
The
device_spec
field will have been initialized to
XkbUseCoreKbd
. You may then either fill in the structure components or use Xkb functions to
obtain values for the structure components from a keyboard device.
To destroy either an entire an
XkbDescRec
or just some of its members, use
XkbFreeKeyboard.
void
XkbFreeKeyboard
(xkb, which, free_all
)
XkbDescPtr
xkb
; /* keyboard description with components to free */
unsigned int
which
; /* mask selecting components to free */
Bool
free_all
; /*
True
=> free all components and
xkb
*/
XkbFreeKeyboard
frees the components of
xkb
specified by
which
and sets the corresponding values to
NULL
. If
free_all
is
True
,
XkbFreeKeyboard
frees every non-
NULL
component of
xkb
and then frees the
xkb
structure itself.
@
1.1.1.1
log
@initial import of libX11-1.4.1:
- remove support for building without XCB
- many man page updates
- many random bug fixes
- several new nls aliases (need to enable these yet.)
@
text
@@
1.1.1.2
log
@initial import of libX11-1.5.99.902
@
text
@d1 1
a1 1
d11 1
a11 1
d80 1
a80 1
d135 4
a138 5
d140 1
a140 1
d147 1
a147 1
d152 1
a152 1
d157 1
a157 1
d162 1
a162 1
d167 1
a167 1
d172 1
a172 1
d177 1
a177 1
d182 1
a182 1
d192 1
a192 1
d205 2
a206 3
d208 1
a208 1
d217 1
a217 1
d224 1
a224 1
d231 1
a231 1
d280 1
a280 1
d291 1
a291 1
d309 2
a310 3
d312 1
a312 1
d347 2
a348 3
d350 1
a350 1
d359 1
a359 1
d366 1
a366 1
d373 1
a373 1
@
1.1.1.3
log
@initial import of libX11-1.6.3
@
text
@a0 3
a13 3
XkbDescRec
d15 5
a19 5
The complete description of an Xkb keyboard is given by an
XkbDescRec.
The component structures in the
XkbDescRec
represent the major Xkb components outlined in Figure 1.1.
d24 24
a47 13
struct _XDisplay * display; /* connection to X server */
unsigned short flags; /* private to Xkb, do not modify */
unsigned short device_spec; /* device of interest */
KeyCode min_key_code; /* minimum keycode for device */
KeyCode max_key_code; /* maximum keycode for device */
XkbControlsPtr ctrls; /* controls */
XkbServerMapPtr server; /* server keymap */
XkbClientMapPtr map; /* client keymap */
XkbIndicatorPtr indicators; /* indicator map */
XkbNamesPtr names; /* names for all components */
XkbCompatMapPtr compat; /* compatibility map */
XkbGeometryPtr geom; /* physical geometry of keyboard */
} XkbDescRec, *XkbDescPtr;
d51 16
a66 15
The
display
field points to an X display structure. The
flags
field is private to the library: modifying
flags
may yield unpredictable results. The
device_spec
field specifies the device identifier of the keyboard input device, or
XkbUseCoreKbd,
which specifies the core keyboard device. The
min_key_code
and
max_key_code
fields specify the least and greatest keycode that can be returned by the
d73 1
a73 2
are described in detail in other sections of this document.
Table 6.1
d75 3
a77 2
components of the
XkbDescRec.
d80 1
a80 1
d150 1
a150 1
XkbControlsMask
d155 1
a155 1
XkbServerMapMask
d165 1
a165 1
XkbIndicatorMapMask
d170 1
a170 1
XkbNamesMask
d175 1
a175 1
XkbCompatMapMask
d180 1
a180 1
XkbGeometryMask
d185 1
a185 1
XkbAllComponentsMask
d199 5
a203 4
XkbGetKeyboard
(see also
XkbGetKeyboardByName).
d206 40
a245 46
XkbGetKeyboardXkbDescPtr XkbGetKeyboardDisplay *displayunsigned int whichunsigned int device_specdisplay
connection to X server
which
mask indicating components to return
device_spec
device for which to fetch description, or
XkbUseCoreKbd
d248 2
a249 1
XkbGetKeyboard
d251 12
a262 11
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 6.2.
d267 5
a271 4
XkbGetKeyboard
can generate
BadAlloc
protocol errors.
d276 3
a278 3
To free the returned keyboard description, use
XkbFreeKeyboard
(see section 6.4).
d288 1
a288 1
for a device changes. Refer to section 14.4 for detailed information on
d299 39
a337 30
XkbGetKeyboard
usually suffices. In the event you need to create a keyboard description from
scratch, however, use
XkbAllocKeyboard
rather than directly calling
malloc
or
Xmalloc.
XkbAllocKeyboardXkbDescRec *XkbAllocKeyboard
If
XkbAllocKeyboard
fails to allocate the keyboard description, it returns
NULL.
Otherwise, it returns a pointer to an empty keyboard description structure.
The
device_spec
field will have been initialized to
XkbUseCoreKbd.
You may then either fill in the structure components or use Xkb functions to
d343 72
a414 73
To destroy either an entire an
XkbDescRec
or just some of its members, use
XkbFreeKeyboard.
XkbFreeKeyboardvoid XkbFreeKeyboardXkbDescPtr xkbunsigned int whichBool free_allxkb
keyboard description with components to free
which
mask selecting components to free
free_allTrue ⇒ free all components and xkbXkbFreeKeyboard
frees the components of
xkb
specified by
which
and sets the corresponding values to
NULL.
If
free_all
is
True,
XkbFreeKeyboard
frees every non-
NULL
component of
xkb
and then frees the
xkb
structure itself.
@