aboutsummaryrefslogtreecommitdiff
path: root/libX11/specs/XKB/ch18.xml
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/specs/XKB/ch18.xml')
-rw-r--r--libX11/specs/XKB/ch18.xml1551
1 files changed, 793 insertions, 758 deletions
diff --git a/libX11/specs/XKB/ch18.xml b/libX11/specs/XKB/ch18.xml
index 806b09a45..0f283ecfc 100644
--- a/libX11/specs/XKB/ch18.xml
+++ b/libX11/specs/XKB/ch18.xml
@@ -1,3 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<chapter id='Symbolic_Names'>
<title>Symbolic Names</title>
@@ -7,13 +10,12 @@ actually used to interpret events. This makes it difficult to write an
application that presents the keyboard to a user in an easy-to-understand way.
Such applications have to examine the vendor string and keycodes to determine
the type of keyboard connected to the server and then examine keysyms and
-modifier mappings to determine the effects of most modifiers (the <emphasis>
-Shift</emphasis>
-, <emphasis>
-Lock</emphasis>
- and <emphasis>
-Control</emphasis>
- modifiers are defined by the core protocol but no semantics are implied for
+modifier mappings to determine the effects of most modifiers (the
+<symbol>Shift</symbol>,
+<symbol>Lock</symbol>
+and
+<symbol>Control</symbol>
+modifiers are defined by the core protocol but no semantics are implied for
any other modifiers).
</para>
@@ -21,69 +23,76 @@ any other modifiers).
<para>
To make it easier for applications to present a keyboard to the user, Xkb
supports symbolic names for most components of the keyboard extension. Most of
-these symbolic names are grouped into the <emphasis>
-names</emphasis>
- component of the keyboard description.
+these symbolic names are grouped into the
+<structfield>names</structfield>
+component of the keyboard description.
</para>
<sect1 id='The_XkbNamesRec_Structure'>
<title>The XkbNamesRec Structure</title>
+<indexterm significance="preferred" zone="The_XkbNamesRec_Structure">
+<primary><structname>XkbKeyNameRec</structname></primary></indexterm>
+<indexterm significance="preferred" zone="The_XkbNamesRec_Structure">
+<primary><structname>XkbKeyAliasRec</structname></primary></indexterm>
+<indexterm significance="preferred" zone="The_XkbNamesRec_Structure">
+<primary><structname>XkbNamesRec</structname></primary></indexterm>
<para>
The names component of the keyboard description is defined as follows:
-</para>
-<para><programlisting>
+<programlisting>
#define XkbKeyNameLength 4
#define XkbKeyNumVirtualMods 16
#define XkbKeyNumIndicators 32
#define XkbKeyNumKbdGroups 4
#define XkbMaxRadioGroups 32
-</programlisting></para>
-<para><programlisting>
typedef struct {
- char name[XkbKeyNameLength]; /* symbolic key names */
-} <emphasis>XkbKeyNameRec</emphasis>,*XkbKeyNamePtr;
-</programlisting></para>
+ char name[XkbKeyNameLength]; /* symbolic key names */
+} <structname>XkbKeyNameRec</structname>, *XkbKeyNamePtr;
-<para><programlisting>
typedef struct {
- char real[XkbKeyNameLength];
- /* this key name must be in the keys array */
- char alias[XkbKeyNameLength];
- /* symbolic key name as alias for the key */
-} <emphasis>XkbKeyAliasRec</emphasis>,*XkbKeyAliasPtr;
-</programlisting></para>
+ char real[XkbKeyNameLength];
+ /* this key name must be in the keys array */
+ char alias[XkbKeyNameLength];
+ /* symbolic key name as alias for the key */
+} <structname>XkbKeyAliasRec</structname>, *XkbKeyAliasPtr;
-<para><programlisting>
typedef struct _XkbNamesRec {
- Atom keycodes; /* identifies range and meaning of keycodes */
- Atom geometry; /* identifies physical location, size, and shape of keys */
- Atom symbols; /* identifies the symbols logically bound to the keys */
- Atom types; /* identifies the set of key types */
- Atom compat; /* identifies actions for keys using core protocol */
- Atom vmods[XkbNumVirtualMods]; /* symbolic names for virtual modifiers */
- Atom indicators[XkbNumIndicators]; /* symbolic names for indicators */
- Atom groups[XkbNumKbdGroups]; /* symbolic names for keyboard groups */
- XkbKeyNamePtr keys; /* symbolic key name array */
- XkbKeyAliasPtr key_aliases; /* real/alias symbolic name pairs array */
- Atom * radio_groups; /* radio group name array */
- Atom phys_symbols; /* identifies the symbols engraved on the keyboard */
- unsigned char num_keys; /* number of keys in the <emphasis> keys</emphasis> array */
- unsigned char num_key_aliases; /* number of keys in the
- <emphasis> key_aliases</emphasis> array */
- unsigned short num_rg; /* number of radio groups */
-} <emphasis>XkbNamesRec</emphasis>,*XkbNamesPtr; /*
+ Atom keycodes; /* identifies range and meaning
+ of keycodes */
+ Atom geometry; /* identifies physical location,
+ size, and shape of keys */
+ Atom symbols; /* identifies the symbols logically
+ bound to the keys */
+ Atom types; /* identifies the set of key types */
+ Atom compat; /* identifies actions for keys using
+ core protocol */
+ Atom vmods[XkbNumVirtualMods]; /* symbolic names for
+ virtual modifiers */
+ Atom indicators[XkbNumIndicators]; /* symbolic names
+ for indicators */
+ Atom groups[XkbNumKbdGroups]; /* symbolic names for
+ keyboard groups */
+ XkbKeyNamePtr keys; /* symbolic key name array */
+ XkbKeyAliasPtr key_aliases; /* real/alias symbolic name pairs array */
+ Atom * radio_groups; /* radio group name array */
+ Atom phys_symbols; /* identifies the symbols engraved
+ on the keyboard */
+ unsigned char num_keys; /* number of keys in the <structfield>keys</structfield> array */
+ unsigned char num_key_aliases; /* number of keys in the
+ <structfield>key_aliases</structfield> array */
+ unsigned short num_rg; /* number of radio groups */
+} <structname>XkbNamesRec</structname>, *XkbNamesPtr;
</programlisting></para>
<para>
-The <emphasis>
-keycodes</emphasis>
- name identifies the range and meaning of the keycodes returned by the keyboard
-in question. The <emphasis>
-geometry</emphasis>
- name, on the other hand, identifies the physical location, size and shape of
+The
+<structfield>keycodes</structfield>
+name identifies the range and meaning of the keycodes returned by the keyboard
+in question. The
+<structfield>geometry</structfield>
+name, on the other hand, identifies the physical location, size and shape of
the various keys on the keyboard. As an example to distinguish between these
two names, consider function keys on PC-compatible keyboards. Function keys are
sometimes above the main keyboard and sometimes to the left of the main
@@ -96,36 +105,35 @@ similar keycodes name but may have different geometry names.
the keycodes returned by a keyboard; a single keycodes name might cover
keyboards with differing numbers of keys provided all keys have the same
semantics when present. For example, 101 and 102 key PC keyboards might use the
-same name. In these cases, applications can use the keyboard <emphasis>
-geometry</emphasis>
- name to determine which subset of the named keycodes is in use.</para></note>
+same name. In these cases, applications can use the keyboard
+<structfield>geometry</structfield>
+name to determine which subset of the named keycodes is in use.</para></note>
<para>
-The <emphasis>
-symbols</emphasis>
- name identifies the symbols logically bound to the keys. The symbols name is a
+The
+<structfield>symbols</structfield>
+name identifies the symbols logically bound to the keys. The symbols name is a
human or application-readable description of the intended locale or usage of
-the keyboard with these symbols. The <emphasis>
-phys_symbols</emphasis>
- name, on the other hand, identifies the symbols actually engraved on the
-keyboard. Given this, the <emphasis>
-symbols</emphasis>
- name and <emphasis>
-phys_symbols</emphasis>
- names might be different. For example, the description for a keyboard that has
+the keyboard with these symbols. The
+<structfield>phys_symbols</structfield>
+name, on the other hand, identifies the symbols actually engraved on the
+keyboard. Given this, the
+<structfield>symbols</structfield>
+name and
+<structfield>phys_symbols</structfield>
+names might be different. For example, the description for a keyboard that has
English US engravings, but that is using Swiss German symbols might have a
-<emphasis>
-phys_symbols</emphasis>
- name of "en_US" and a <emphasis>
-symbols</emphasis>
- name of "de_CH."
+<structfield>phys_symbols</structfield>
+name of "en_US" and a
+<structfield>symbols</structfield>
+name of "de_CH."
</para>
<para>
-The <emphasis>
-types</emphasis>
- name provides some information about the set of key types (see section 15.2)
+The
+<structfield>types</structfield>
+name provides some information about the set of key types (see <link linkend="Key_Types">section 15.2</link>)
that can be associated with the keyboard. In addition, each key type can have a
name, and each shift level of a type can have a name. Although these names are
stored in the map description with each of the types, they are accessed using
@@ -134,9 +142,9 @@ the same methods as the other symbolic names.
<para>
-The <emphasis>
-compat</emphasis>
- name provides some information about the rules used to bind actions to keys
+The
+<structfield>compat</structfield>
+name provides some information about the rules used to bind actions to keys
that are changed using core protocol requests.
</para>
@@ -144,27 +152,26 @@ that are changed using core protocol requests.
<para>
Xkb provides symbolic names for each of the 4 keyboard groups, 16 virtual
modifiers, 32 keyboard indicators, and 4 keyboard groups. These names are held
-in the <emphasis>
-vmods</emphasis>
-, <emphasis>
-indicators</emphasis>
-, and <emphasis>
-groups</emphasis>
- fixed-length arrays.
+in the
+<structfield>vmods</structfield>,
+<structfield>indicators</structfield>,
+and
+<structfield>groups</structfield>
+fixed-length arrays.
</para>
<para>
Each key has a four-byte symbolic name. All of the symbolic key names are held
-in the <emphasis>
-keys</emphasis>
- array, and <emphasis>
-num_keys</emphasis>
- reports the number of entries that are in the keys array. For each key, the
+in the
+<structfield>keys</structfield>
+array, and
+<structfield>num_keys</structfield>
+reports the number of entries that are in the keys array. For each key, the
key name links keys with similar functions or in similar positions on keyboards
-that report different keycodes. For example, the <emphasis>
-F1</emphasis>
- key may emit keycode 23 on one keyboard and keycode 86 on another. By naming
+that report different keycodes. For example, the
+<keycap>F1</keycap>
+key may emit keycode 23 on one keyboard and keycode 86 on another. By naming
this key "FK01" on both keyboards, the keyboard layout designer can reuse parts
of keyboard descriptions for different keyboards.
</para>
@@ -173,37 +180,38 @@ of keyboard descriptions for different keyboards.
<para>
Key aliases allow the keyboard layout designer to assign multiple key names to
a single key. This allows the keyboard layout designer to refer to keys using
-either their position or their "function." For example, a keyboard layout
+either their position or their <quote>function</quote>.
+For example, a keyboard layout
designer may wish to refer to the left arrow key on a PC keyboard using the
ISO9995-5 positional specification of A31 or using the functional specification
-of LEFT. The <emphasis>
-key_aliases</emphasis>
- field holds a variable-length array of real and alias key name pairs, and the
-total number of entries in the <emphasis>
-key_aliases</emphasis>
- array is held in <emphasis>
-num_key_aliases</emphasis>
-. For each real and alias key name pair, the <emphasis>
-real</emphasis>
- field refers to the a name in the keys array, and the <emphasis>
-alias</emphasis>
- field refers to the alias for that key. Using the previous example, the
+of LEFT. The
+<structfield>key_aliases</structfield>
+field holds a variable-length array of real and alias key name pairs, and the
+total number of entries in the
+<structfield>key_aliases</structfield>
+array is held in
+<structfield>num_key_aliases</structfield>.
+For each real and alias key name pair, the
+<structfield>real</structfield>
+field refers to the a name in the keys array, and the
+<structfield>alias</structfield>
+field refers to the alias for that key. Using the previous example, the
keyboard designer may use the name A31 in the keys array, but also define the
-name LEFT as an alias for A31 in the <emphasis>
-key_aliases</emphasis>
- array.
+name LEFT as an alias for A31 in the
+<structfield>key_aliases</structfield>
+array.
</para>
<note><para>Key aliases defined in the geometry component of a keyboard mapping
-(see Chapter 13) override those defined in the keycodes component of the server
-database, which are stored in the <emphasis>
-XkbNamesRec</emphasis>
- (<emphasis>
-xkb-&gt;names</emphasis>
-). Therefore, consider the key aliases defined by the geometry before
-considering key aliases supplied by the <emphasis>
-XkbNamesRec</emphasis>
-.</para></note>
+(see <xref linkend="Keyboard_Geometry" />) override those defined in the keycodes component of the server
+database, which are stored in the
+<structname>XkbNamesRec</structname>
+
+(<structfield>xkb-&gt;names</structfield>).
+Therefore, consider the key aliases defined by the geometry before
+considering key aliases supplied by the
+<structname>XkbNamesRec</structname>.
+</para></note>
<para>
A radio group is a set of keys whose behavior simulates a set of radio buttons.
@@ -216,13 +224,13 @@ be logically depressed at one time.
<para>
Each radio group in the keyboard description can have a name. These names are
-held in the variable-length array <emphasis>
-radio_groups</emphasis>
-, and <emphasis>
-num_rg</emphasis>
- tells how many elements are in the <emphasis>
-radio_groups</emphasis>
- array.
+held in the variable-length array
+<structfield>radio_groups</structfield>,
+and
+<structfield>num_rg</structfield>
+tells how many elements are in the
+<structfield>radio_groups</structfield>
+array.
</para>
@@ -234,10 +242,10 @@ radio_groups</emphasis>
Xkb provides several functions that work with symbolic names. Each of these
functions uses a mask to specify individual fields of the structures described
above. These masks and their relationships to the fields in a keyboard
-description are shown in Table 18.1.
+description are shown in <link linkend="table18.1">Table 18.1</link>.
</para>
-<table frame='topbot'>
+<table id='table18.1' frame='topbot'>
<title>Symbolic Names Masks</title>
<?dbfo keep-together="always" ?>
<tgroup cols='4' align='left' colsep='0' rowsep='0'>
@@ -255,91 +263,91 @@ description are shown in Table 18.1.
</thead>
<tbody>
<row>
- <entry>XkbKeycodesNameMask</entry>
+ <entry><symbol>XkbKeycodesNameMask</symbol></entry>
<entry>(1&lt;&lt;0)</entry>
<entry>Xkb-&gt;names</entry>
<entry>keycodes</entry>
</row>
<row>
- <entry>XkbGeometryNameMask</entry>
+ <entry><symbol>XkbGeometryNameMask</symbol></entry>
<entry>(1&lt;&lt;1)</entry>
<entry>Xkb-&gt;names</entry>
<entry>geometry</entry>
</row>
<row>
- <entry>XkbSymbolsNameMask</entry>
+ <entry><symbol>XkbSymbolsNameMask</symbol></entry>
<entry>(1&lt;&lt;2)</entry>
<entry>Xkb-&gt;names</entry>
<entry>symbols</entry>
</row>
<row>
- <entry>XkbPhysSymbolsNameMask</entry>
+ <entry><symbol>XkbPhysSymbolsNameMask</symbol></entry>
<entry>(1&lt;&lt;3)</entry>
<entry>Xkb-&gt;names</entry>
<entry>phys_symbols</entry>
</row>
<row>
- <entry>XkbTypesNameMask</entry>
+ <entry><symbol>XkbTypesNameMask</symbol></entry>
<entry>(1&lt;&lt;4)</entry>
<entry>Xkb-&gt;names</entry>
<entry>type</entry>
</row>
<row>
- <entry>XkbCompatNameMask</entry>
+ <entry><symbol>XkbCompatNameMask</symbol></entry>
<entry>(1&lt;&lt;5)</entry>
<entry>Xkb-&gt;names</entry>
<entry>compat</entry>
</row>
<row>
- <entry>XkbKeyTypeNamesMask</entry>
+ <entry><symbol>XkbKeyTypeNamesMask</symbol></entry>
<entry>(1&lt;&lt;6)</entry>
<entry>Xkb-&gt;map</entry>
<entry>type[*].name</entry>
</row>
<row>
- <entry>XkbKTLevelNamesMask</entry>
+ <entry><symbol>XkbKTLevelNamesMask</symbol></entry>
<entry>(1&lt;&lt;7)</entry>
<entry>Xkb-&gt;map</entry>
<entry>type[*].lvl_names[*]</entry>
</row>
<row>
- <entry>XkbIndicatorNamesMask</entry>
+ <entry><symbol>XkbIndicatorNamesMask</symbol></entry>
<entry>(1&lt;&lt;8)</entry>
<entry>Xkb-&gt;names</entry>
<entry>indicators[*]</entry>
</row>
<row>
- <entry>XkbKeyNamesMask</entry>
+ <entry><symbol>XkbKeyNamesMask</symbol></entry>
<entry>(1&lt;&lt;9)</entry>
<entry>Xkb-&gt;names</entry>
<entry>keys[*], num_keys</entry>
</row>
<row>
- <entry>XkbKeyAliasesMask</entry>
+ <entry><symbol>XkbKeyAliasesMask</symbol></entry>
<entry>(1&lt;&lt;10)</entry>
<entry>Xkb-&gt;names</entry>
<entry>key_aliases[*], num_key_aliases</entry>
</row>
<row>
- <entry>XkbVirtualModNamesMask</entry>
+ <entry><symbol>XkbVirtualModNamesMask</symbol></entry>
<entry>(1&lt;&lt;11)</entry>
<entry>Xkb-&gt;names</entry>
<entry>vmods[*]</entry>
</row>
<row>
- <entry>XkbGroupNamesMask</entry>
+ <entry><symbol>XkbGroupNamesMask</symbol></entry>
<entry>(1&lt;&lt;12)</entry>
<entry>Xkb-&gt;names</entry>
<entry>groups[*]</entry>
</row>
<row>
- <entry>XkbRGNamesMask</entry>
+ <entry><symbol>XkbRGNamesMask</symbol></entry>
<entry>(1&lt;&lt;13)</entry>
<entry>Xkb-&gt;names</entry>
<entry>radio_groups[*], num_rg</entry>
</row>
<row>
- <entry>XkbComponentNamesMask</entry>
+ <entry><symbol>XkbComponentNamesMask</symbol></entry>
<entry>(0x3f)</entry>
<entry>Xkb-&gt;names</entry>
<entry>
@@ -352,7 +360,7 @@ description are shown in Table 18.1.
</entry>
</row>
<row>
- <entry>XkbAllNamesMask</entry>
+ <entry><symbol>XkbAllNamesMask</symbol></entry>
<entry>(0x3fff)</entry>
<entry>Xkb-&gt;names</entry>
<entry>all name components</entry>
@@ -366,133 +374,129 @@ description are shown in Table 18.1.
<title>Getting Symbolic Names From the Server</title>
<para>
-To obtain symbolic names from the server, use <emphasis>
-XkbGetNames</emphasis>
-.
+To obtain symbolic names from the server, use
+<function>XkbGetNames</function>.
</para>
-<informaltable frame='none'>
-<?dbfo keep-together="always" ?>
-<tgroup cols='1' align='left' colsep='0' rowsep='0'>
-<colspec colname='c1' colwidth='1.0*'/>
-<tbody>
- <row>
- <entry role='functiondecl'>
-Status <emphasis>
-XkbGetNames</emphasis>
-(<emphasis>
-dpy, which, Xkb</emphasis>
-)
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-Display * <emphasis>
-dpy</emphasis>
-; /* connection to the X server */
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-unsigned int <emphasis>
-which</emphasis>
-; /* mask of names or map components to be updated */
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-XkbDescPtr <emphasis>
-xkb</emphasis>
- /* keyboard description to be updated */
- </entry>
-</row>
-</tbody>
-</tgroup>
-</informaltable>
+<indexterm significance="preferred" zone="XkbGetNames"><primary><function>XkbGetNames</function></primary></indexterm>
+<funcsynopsis id="XkbGetNames">
+ <funcprototype>
+ <funcdef>Status <function>XkbGetNames</function></funcdef>
+<!-- (
+<parameter>dpy, which, Xkb</parameter>
+) -->
+
+ <paramdef>Display *<parameter>dpy</parameter></paramdef>
+ <paramdef>unsigned int <parameter>which</parameter></paramdef>
+ <paramdef>XkbDescPtr <parameter>xkb</parameter></paramdef>
+ </funcprototype>
+</funcsynopsis>
+<variablelist>
+ <varlistentry>
+ <term>
+ <parameter>dpy</parameter>
+ </term>
+ <listitem>
+ <para>
+ connection to the X server
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>which</parameter>
+ </term>
+ <listitem>
+ <para>
+ mask of names or map components to be updated
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>xkb</parameter>
+ </term>
+ <listitem>
+ <para>
+ keyboard description to be updated
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
<para>
-<emphasis>
-XkbGetNames</emphasis>
- retrieves symbolic names for the components of the keyboard extension from the
-X server. The <emphasis>
-which</emphasis>
- parameter specifies the name components to be updated in the <emphasis>
-xkb</emphasis>
- parameter, and is the bitwise inclusive OR of the valid names mask bits
-defined in Table 18.1.
+<function>XkbGetNames</function>
+retrieves symbolic names for the components of the keyboard extension from the
+X server. The
+<parameter>which</parameter>
+parameter specifies the name components to be updated in the
+<parameter>xkb</parameter>
+parameter, and is the bitwise inclusive OR of the valid names mask bits
+defined in <link linkend="table18.1">Table 18.1</link>.
</para>
<para>
-If the <emphasis>
-names</emphasis>
- field of the keyboard description <emphasis>
-xkb</emphasis>
- is <emphasis>
-NULL</emphasis>
-, <emphasis>
-XkbGetNames</emphasis>
- allocates and initializes the <emphasis>
-names</emphasis>
- component of the keyboard description before obtaining the values specified by
-<emphasis>
-which</emphasis>
-. If the <emphasis>
-names</emphasis>
- field of <emphasis>
-xkb</emphasis>
- is not <emphasis>
-NULL</emphasis>
-, <emphasis>
-XkbGetNames</emphasis>
- obtains the values specified by <emphasis>
-which</emphasis>
- and copies them into the keyboard description <emphasis>
-Xkb</emphasis>
-.
+If the
+<structfield>names</structfield>
+field of the keyboard description
+<parameter>xkb</parameter>
+is
+<symbol>NULL</symbol>,
+<function>XkbGetNames</function>
+allocates and initializes the
+<structfield>names</structfield>
+component of the keyboard description before obtaining the values specified by
+<parameter>which</parameter>.
+If the
+<structfield>names</structfield>
+field of
+<parameter>xkb</parameter>
+is not
+<symbol>NULL</symbol>,
+<function>XkbGetNames</function>
+obtains the values specified by
+<parameter>which</parameter>
+and copies them into the keyboard description
+<parameter>xkb</parameter>.
</para>
<para>
-If the <emphasis>
-map</emphasis>
- component of the <emphasis>
-xkb</emphasis>
- parameter is <emphasis>
-NULL</emphasis>
-, <emphasis>
-XkbGetNames</emphasis>
- does not retrieve type or shift level names, even if <emphasis>
-XkbKeyTypeNamesMask</emphasis>
- or <emphasis>
-XkbKTLevelNamesMask</emphasis>
- are set in <emphasis>
-which</emphasis>
-.
+If the
+<structfield>map</structfield>
+component of the
+<parameter>xkb</parameter>
+parameter is
+<symbol>NULL</symbol>,
+<function>XkbGetNames</function>
+does not retrieve type or shift level names, even if
+<symbol>XkbKeyTypeNamesMask</symbol>
+or
+<symbol>XkbKTLevelNamesMask</symbol>
+are set in
+<parameter>which</parameter>.
</para>
<para>
-<emphasis>
-XkbGetNames</emphasis>
- can return <emphasis>
-Success</emphasis>
-, or <emphasis>
-BadAlloc</emphasis>
-, <emphasis>
-BadLength</emphasis>
-, <emphasis>
-BadMatch</emphasis>
-, and <emphasis>
-BadImplementation</emphasis>
- errors.
+<function>XkbGetNames</function>
+can return
+<symbol>Success</symbol>,
+or
+<errorname>BadAlloc</errorname>,
+<errorname>BadLength</errorname>,
+<errorname>BadMatch</errorname>,
+and
+<errorname>BadImplementation</errorname>
+errors.
</para>
<para>
-To free symbolic names, use <emphasis>
-XkbFreeNames</emphasis>
- (see section 18.6)
+To free symbolic names, use
+<function>XkbFreeNames</function>
+(see <link linkend="Allocating_and_Freeing_Symbolic_Names">section 18.6</link>)
</para>
@@ -502,122 +506,133 @@ XkbFreeNames</emphasis>
<para>
To change the symbolic names in the server, first modify a local copy of the
-keyboard description and then use either <emphasis>
-XkbSetNames,</emphasis>
- or, to save network traffic, use a <emphasis>
-XkbNameChangesRec</emphasis>
-structure and call <emphasis>
-XkbChangeNames</emphasis>
- to download the changes to the server. <emphasis>
-XkbSetNames</emphasis>
- and <emphasis>
-XkbChangeNames</emphasis>
- can generate <emphasis>
-BadAlloc</emphasis>
-, <emphasis>
-BadAtom</emphasis>
-, <emphasis>
-BadLength</emphasis>
-, <emphasis>
-BadMatch,</emphasis>
- and <emphasis>
-BadImplementation</emphasis>
- errors.
+keyboard description and then use either
+<function>XkbSetNames</function>,
+or, to save network traffic, use a
+<structname>XkbNameChangesRec</structname>
+structure and call
+<function>XkbChangeNames</function>
+to download the changes to the server.
+<function>XkbSetNames</function>
+and
+<function>XkbChangeNames</function>
+can generate
+<errorname>BadAlloc</errorname>,
+<errorname>BadAtom</errorname>,
+<errorname>BadLength</errorname>,
+<errorname>BadMatch</errorname>,
+and
+<errorname>BadImplementation</errorname>
+errors.
</para>
-<informaltable frame='none'>
-<?dbfo keep-together="always" ?>
-<tgroup cols='1' align='left' colsep='0' rowsep='0'>
-<colspec colname='c1' colwidth='1.0*'/>
-<tbody>
- <row>
- <entry role='functiondecl'>
-Bool <emphasis>
-XkbSetNames</emphasis>
-(<emphasis>
-dpy, which, first_type, num_types, xkb</emphasis>
-)
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-Display * <emphasis>
-dpy</emphasis>
-; /* connection to the X server */
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-unsigned int <emphasis>
-which</emphasis>
-; /* mask of names or map components to be changed */
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-unsigned int <emphasis>
-first_type</emphasis>
- ; /* first type whose name is to be changed */
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-unsigned int <emphasis>
-num_types</emphasis>
-; /* number of types for which names are to be changed */
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-XkbDescPtr <emphasis>
-xkb</emphasis>
-; /* keyboard description from which names are to be taken */
- </entry>
-</row>
-</tbody>
-</tgroup>
-</informaltable>
+<indexterm significance="preferred" zone="XkbSetNames"><primary><function>XkbSetNames</function></primary></indexterm>
+<funcsynopsis id="XkbSetNames">
+ <funcprototype>
+ <funcdef>Bool <function>XkbSetNames</function></funcdef>
+<!-- (
+<parameter>dpy, which, first_type, num_types, xkb</parameter>
+) -->
+
+ <paramdef>Display *<parameter>dpy</parameter></paramdef>
+ <paramdef>unsigned int <parameter>which</parameter></paramdef>
+ <paramdef>unsigned int <parameter>first_type</parameter></paramdef>
+ <paramdef>unsigned int <parameter>num_types</parameter></paramdef>
+ <paramdef>XkbDescPtr <parameter>xkb</parameter></paramdef>
+ </funcprototype>
+</funcsynopsis>
+<variablelist>
+ <varlistentry>
+ <term>
+ <parameter>dpy</parameter>
+ </term>
+ <listitem>
+ <para>
+ connection to the X server
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>which</parameter>
+ </term>
+ <listitem>
+ <para>
+ mask of names or map components to be changed
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>first_type</parameter>
+ </term>
+ <listitem>
+ <para>
+ first type whose name is to be changed
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>num_types</parameter>
+ </term>
+ <listitem>
+ <para>
+ number of types for which names are to be changed
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>xkb</parameter>
+ </term>
+ <listitem>
+ <para>
+ keyboard description from which names are to be taken
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
<para>
-Use<emphasis>
- XkbSetNames</emphasis>
- to change many names at the same time. For each bit set in <emphasis>
-which</emphasis>
-, <emphasis>
-XkbSetNames</emphasis>
- takes the corresponding value (or values in the case of arrays) from the
-keyboard description <emphasis>
-xkb</emphasis>
- and sends it to the server.
+Use
+<function>XkbSetNames</function>
+to change many names at the same time. For each bit set in
+<parameter>which</parameter>,
+<function>XkbSetNames</function>
+takes the corresponding value (or values in the case of arrays) from the
+keyboard description
+<parameter>xkb</parameter>
+and sends it to the server.
</para>
<para>
-The <emphasis>
-first_type</emphasis>
- and <emphasis>
-num_types</emphasis>
- arguments are used only if <emphasis>
-XkbKeyTypeNamesMask</emphasis>
- or <emphasis>
-XkbKTLevelNamesMask</emphasis>
- is set in <emphasis>
-which</emphasis>
- and specify a subset of the types for which the corresponding names are to be
+The
+<parameter>first_type</parameter>
+and
+<parameter>num_types</parameter>
+arguments are used only if
+<symbol>XkbKeyTypeNamesMask</symbol>
+or
+<symbol>XkbKTLevelNamesMask</symbol>
+is set in
+<parameter>which</parameter>
+and specify a subset of the types for which the corresponding names are to be
changed. If either or both of these mask bits are set but the specified types
-are illegal, <emphasis>
-XkbSetNames</emphasis>
- returns <emphasis>
-False</emphasis>
- and does not update any of the names specified in <emphasis>
-which</emphasis>
-. The specified types are illegal if <emphasis>
-xkb</emphasis>
- does not include a map component or if <emphasis>
-first_type</emphasis>
- and <emphasis>
-num_types</emphasis>
- specify types that are not defined in the keyboard description.
+are illegal,
+<function>XkbSetNames</function>
+returns
+<symbol>False</symbol>
+and does not update any of the names specified in
+<parameter>which</parameter>.
+The specified types are illegal if
+<parameter>xkb</parameter>
+does not include a map component or if
+<parameter>first_type</parameter>
+and
+<parameter>num_types</parameter>
+specify types that are not defined in the keyboard description.
</para>
@@ -626,52 +641,52 @@ num_types</emphasis>
<sect3 id='The_XkbNameChangesRec_Structure'>
<title>The XkbNameChangesRec Structure</title>
+<indexterm significance="preferred" zone="The_XkbNameChangesRec_Structure">
+<primary><structname>XkbNameChangesRec</structname></primary></indexterm>
<para>
-The <emphasis>
-XkbNameChangesRec</emphasis>
- allows applications to identify small modifications to the symbolic names and
+The
+<structname>XkbNameChangesRec</structname>
+allows applications to identify small modifications to the symbolic names and
effectively reduces the amount of traffic sent to the server:
-</para>
-<para><programlisting>
+<programlisting>
typedef struct _XkbNameChanges {
- unsigned int changed; /* name components that have
- changed */
- unsigned char first_type; /* first key type with a new
- name */
- unsigned char num_types; /* number of types with new
- names */
- unsigned char first_lvl; /* first key type with new level
- names */
- unsigned char num_lvls; /* number of key types with new
- level names */
- unsigned char num_aliases; /* if key aliases changed,
- total number of key aliases */
- unsigned char num_rg; /* if radio groups changed, total
- number of radio groups */
- unsigned char first_key; /* first key with a new name */
- unsigned char num_keys; /* number of keys with new names
- */
- unsigned short changed_vmods; /* mask of virtual
- modifiers for which names have changed */
- unsigned long changed_indicators; /* mask of indicators
- for which names were changed */
- unsigned char changed_groups; /* mask of groups for
- which names were changed */
-} <emphasis>XkbNameChangesRec</emphasis>, *XkbNameChangesPtr
+ unsigned int changed; /* name components that have
+ changed */
+ unsigned char first_type; /* first key type with a new name */
+ unsigned char num_types; /* number of types with new names */
+ unsigned char first_lvl; /* first key type with new level
+ names */
+ unsigned char num_lvls; /* number of key types with new
+ level names */
+ unsigned char num_aliases; /* if key aliases changed,
+ total number of key aliases */
+ unsigned char num_rg; /* if radio groups changed, total
+ number of radio groups */
+ unsigned char first_key; /* first key with a new name */
+ unsigned char num_keys; /* number of keys with new names */
+ unsigned short changed_vmods; /* mask of virtual modifiers
+ for which names have changed */
+ unsigned long changed_indicators; /* mask of indicators
+ for which names were changed */
+ unsigned char changed_groups; /* mask of groups for
+ which names were changed */
+} <structname>XkbNameChangesRec</structname>, *XkbNameChangesPtr;
</programlisting></para>
<para>
-The <emphasis>
-changed</emphasis>
- field specifies the name components that have changed and is the bitwise
-inclusive OR of the valid names mask bits defined in Table 18.1. The rest of
+The
+<structfield>changed</structfield>
+field specifies the name components that have changed and is the bitwise
+inclusive OR of the valid names mask bits defined in
+<link linkend="table18.1">Table 18.1</link>. The rest of
the fields in the structure specify the ranges that have changed for the
-various kinds of symbolic names, as shown in Table 18.2.
+various kinds of symbolic names, as shown in
+<link linkend="table18.2">Table 18.2</link>.
</para>
-<table frame='topbot'>
+<table id='table18.2' frame='topbot'>
<title>XkbNameChanges Fields</title>
<?dbfo keep-together="always" ?>
<tgroup cols='4' align='left' colsep='0' rowsep='0'>
@@ -689,7 +704,7 @@ various kinds of symbolic names, as shown in Table 18.2.
</thead>
<tbody>
<row>
- <entry>XkbKeyTypeNamesMask</entry>
+ <entry><symbol>XkbKeyTypeNamesMask</symbol></entry>
<entry>
<para>first_type,</para>
<para>num_types</para>
@@ -698,7 +713,7 @@ various kinds of symbolic names, as shown in Table 18.2.
<entry>type[*].name</entry>
</row>
<row>
- <entry>XkbKTLevelNamesMask</entry>
+ <entry><symbol>XkbKTLevelNamesMask</symbol></entry>
<entry>
<para>first_lvl,</para>
<para>num_lvls</para>
@@ -707,19 +722,19 @@ various kinds of symbolic names, as shown in Table 18.2.
<entry>type[*].lvl_names[*]</entry>
</row>
<row>
- <entry>XkbKeyAliasesMask</entry>
+ <entry><symbol>XkbKeyAliasesMask</symbol></entry>
<entry>num_aliases</entry>
<entry>Xkb-&gt;names</entry>
<entry>key_aliases[*]</entry>
</row>
<row>
- <entry>XkbRGNamesMask</entry>
+ <entry><symbol>XkbRGNamesMask</symbol></entry>
<entry>num_rg</entry>
<entry>Xkb-&gt;names</entry>
<entry>radio_groups[*]</entry>
</row>
<row>
- <entry>XkbKeyNamesMask</entry>
+ <entry><symbol>XkbKeyNamesMask</symbol></entry>
<entry>
<para>first_key,</para>
<para>num_keys</para>
@@ -728,19 +743,19 @@ various kinds of symbolic names, as shown in Table 18.2.
<entry>keys[*]</entry>
</row>
<row>
- <entry>XkbVirtualModNamesMask</entry>
+ <entry><symbol>XkbVirtualModNamesMask</symbol></entry>
<entry>changed_vmods</entry>
<entry>Xkb-&gt;names</entry>
<entry>vmods[*]</entry>
</row>
<row>
- <entry>XkbIndicatorNamesMask</entry>
+ <entry><symbol>XkbIndicatorNamesMask</symbol></entry>
<entry>changed_indicators</entry>
<entry>Xkb-&gt;names</entry>
<entry>indicators[*]</entry>
</row>
<row>
- <entry>XkbGroupNamesMask</entry>
+ <entry><symbol>XkbGroupNamesMask</symbol></entry>
<entry>changed_groups</entry>
<entry>Xkb-&gt;names</entry>
<entry>groups[*]</entry>
@@ -750,70 +765,73 @@ various kinds of symbolic names, as shown in Table 18.2.
</table>
<para>
-<emphasis>
-XkbChangeNames</emphasis>
- provides a more flexible method for changing symbolic names than <emphasis>
-XkbSetNames</emphasis>
- and requires the use of an <emphasis>
-XkbNameChangesRec</emphasis>
- structure.
+<function>XkbChangeNames</function>
+provides a more flexible method for changing symbolic names than
+<function>XkbSetNames</function>
+and requires the use of an
+<structname>XkbNameChangesRec</structname>
+structure.
</para>
-<informaltable frame='none'>
-<?dbfo keep-together="always" ?>
-<tgroup cols='1' align='left' colsep='0' rowsep='0'>
-<colspec colname='c1' colwidth='1.0*'/>
-<tbody>
- <row>
- <entry role='functiondecl'>
-Bool <emphasis>
-XkbChangeNames</emphasis>
-(<emphasis>
-dpy, xkb, changes</emphasis>
-)
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-Display * <emphasis>
-dpy</emphasis>
-; /* connection to the X server */
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-XkbDescPtr <emphasis>
- xkb</emphasis>
-; /* keyboard description from which names are to be taken */
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-XkbNameChangesPtr <emphasis>
- changes</emphasis>
-; /* names map components to be updated on the server */
- </entry>
-</row>
-</tbody>
-</tgroup>
-</informaltable>
+<indexterm significance="preferred" zone="XkbChangeNames"><primary><function>XkbChangeNames</function></primary></indexterm>
+<funcsynopsis id="XkbChangeNames">
+ <funcprototype>
+ <funcdef>Bool <function>XkbChangeNames</function></funcdef>
+<!-- (
+<parameter>dpy, xkb, changes</parameter>
+) -->
+
+ <paramdef>Display *<parameter>dpy</parameter></paramdef>
+ <paramdef>XkbDescPtr <parameter>xkb</parameter></paramdef>
+ <paramdef>XkbNameChangesPtr <parameter>changes</parameter></paramdef>
+ </funcprototype>
+</funcsynopsis>
+<variablelist>
+ <varlistentry>
+ <term>
+ <parameter>dpy</parameter>
+ </term>
+ <listitem>
+ <para>
+ connection to the X server
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>xkb</parameter>
+ </term>
+ <listitem>
+ <para>
+ keyboard description from which names are to be taken
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>changes</parameter>
+ </term>
+ <listitem>
+ <para>
+ names map components to be updated on the server
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
<para>
-<emphasis>
-XkbChangeNames</emphasis>
- copies any names specified by <emphasis>
-changes</emphasis>
- from the keyboard description, <emphasis>
-xkb</emphasis>
-, to the X server specified by <emphasis>
-dpy</emphasis>
-.<emphasis>
- XkbChangeNames</emphasis>
- aborts and returns <emphasis>
-False</emphasis>
- if any illegal type names or type shift level names are specified by <emphasis>
-changes</emphasis>
-.
+<function>XkbChangeNames</function>
+copies any names specified by
+<parameter>changes</parameter>
+from the keyboard description,
+<parameter>xkb</parameter>,
+to the X server specified by
+<parameter>dpy</parameter>.
+<function>XkbChangeNames</function>
+aborts and returns
+<symbol>False</symbol>
+if any illegal type names or type shift level names are specified by
+<parameter>changes</parameter>.
</para>
</sect3>
@@ -821,232 +839,236 @@ changes</emphasis>
</sect1>
<sect1 id='Tracking_Name_Changes'>
<title>Tracking Name Changes</title>
+<indexterm significance="preferred" zone="Tracking_Name_Changes">
+<primary>events</primary><secondary><symbol>XkbNamesNotify</symbol></secondary></indexterm>
+<indexterm significance="preferred" zone="Tracking_Name_Changes">
+<primary><structname>XkbNamesNotifyEvent</structname></primary></indexterm>
<para>
Whenever a symbolic name changes in the server’s keyboard description, the
-server sends a <emphasis>
-XkbNamesNotify</emphasis>
- event to all interested clients. To receive name notify events, use <emphasis>
-XkbSelectEvents</emphasis>
- (see section 4.3) with <emphasis>
-XkbNamesNotifyMask</emphasis>
- in both the <emphasis>
-bits_to_change</emphasis>
- and <emphasis>
-values_for_bits</emphasis>
- parameters.
+server sends a
+<symbol>XkbNamesNotify</symbol>
+event to all interested clients. To receive name notify events, use
+<function>XkbSelectEvents</function>
+(see <link linkend="Selecting_Xkb_Events">section 4.3</link>) with
+<symbol>XkbNamesNotifyMask</symbol>
+in both the
+<parameter>bits_to_change</parameter>
+and
+<parameter>values_for_bits</parameter>
+parameters.
</para>
<para>
-To receive events for only specific names, use <emphasis>
-XkbSelectEventDetails</emphasis>
-. Set the <emphasis>
-event_type</emphasis>
- parameter to <emphasis>
-XkbNamesNotify</emphasis>
-, and set both the <emphasis>
-bits_to_change </emphasis>
-and<emphasis>
- values_for_bits</emphasis>
- detail parameter to a mask composed of a bitwise OR of masks in Table 18.1.
+To receive events for only specific names, use
+<function>XkbSelectEventDetails</function>.
+Set the
+<structfield>event_type</structfield>
+parameter to
+<symbol>XkbNamesNotify</symbol>,
+and set both the
+<parameter>bits_to_change</parameter>
+and
+<parameter>values_for_bits</parameter>
+detail parameter to a mask composed of a bitwise OR of masks in
+<link linkend="table18.1">Table 18.1</link>.
</para>
<para>
-The structure for the <emphasis>
-XkbNamesNotify</emphasis>
- event is defined as follows:
-</para>
+The structure for the
+<symbol>XkbNamesNotify</symbol>
+event is defined as follows:
-<para><programlisting>
+<programlisting>
typedef struct {
- int type; /* Xkb extension base event code */
- unsigned long serial; /* X server serial number for
- event */
- Bool send_event; /* <emphasis>True</emphasis>
- =&gt; synthetically generated */
- Display * display; /* server connection where event
- generated */
- Time time; /* server time when event generated */
- int xkb_type; /* <emphasis>XkbNamesNotify</emphasis> */
- int device; /* Xkb device ID, will not be
- <emphasis>XkbUseCoreKbd</emphasis> */
- unsigned int changed; /* mask of name components
-that have changed */
- int first_type; /* first key type with a new name */
- int num_types; /* number of types with new names */
- int first_lvl; /* first key type with new level names */
- int num_lvls; /* number of key types with new level names */
- int num_aliases; /* if key aliases changed, total number
- of key aliases */
- int num_radio_groups; /* if radio groups changed,
+ int type; /* Xkb extension base event code */
+ unsigned long serial; /* X server serial number for event */
+ Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
+ Display * display; /* server connection where event generated */
+ Time time; /* server time when event generated */
+ int xkb_type; /* <symbol>XkbNamesNotify</symbol> */
+ int device; /* Xkb device ID, will not be
+ <symbol>XkbUseCoreKbd</symbol> */
+ unsigned int changed; /* mask of name components
+ that have changed */
+ int first_type; /* first key type with a new name */
+ int num_types; /* number of types with new names */
+ int first_lvl; /* first key type with new level names */
+ int num_lvls; /* number of key types with new level names */
+ int num_aliases; /* if key aliases changed, total number
+ of key aliases */
+ int num_radio_groups; /* if radio groups changed,
total number of radio groups */
- unsigned int changed_vmods; /* mask of virtual modifiers for
- which names have changed */
- unsigned int changed_groups; /* mask of groups for
- which names were changed */
- unsigned int changed_indicators; /* mask of indicators for which
- names were changed */
- int first_key; /* first key with a new name */
- int num_keys; /* number of keys with new names */
-} <emphasis>XkbNamesNotifyEvent</emphasis>;
+ unsigned int changed_vmods; /* mask of virtual modifiers for
+ which names have changed */
+ unsigned int changed_groups; /* mask of groups for
+ which names were changed */
+ unsigned int changed_indicators; /* mask of indicators for which
+ names were changed */
+ int first_key; /* first key with a new name */
+ int num_keys; /* number of keys with new names */
+} <structname>XkbNamesNotifyEvent</structname>;
</programlisting></para>
<para>
-The <emphasis>
-changed</emphasis>
- field specifies the name components that have changed and is the bitwise
-inclusive OR of the valid names mask bits defined in Table 18.1. The other
-fields in this event are interpreted as the like-named fields in an <emphasis>
-XkbNameChangesRec</emphasis> , as previously defined.
+The
+<structfield>changed</structfield>
+field specifies the name components that have changed and is the bitwise
+inclusive OR of the valid names mask bits defined in
+<link linkend="table18.1">Table 18.1</link>. The other
+fields in this event are interpreted as the like-named fields in an
+<structname>XkbNameChangesRec</structname> , as previously defined.
</para>
<para>
-When your application receives a X<emphasis>
-kbNamesNotify</emphasis>
- event, you can note the changed names in a changes structure using <emphasis>
-XkbNoteNameChanges</emphasis>
-.
+When your application receives a
+<symbol>XkbNamesNotify</symbol>
+event, you can note the changed names in a changes structure using
+<function>XkbNoteNameChanges</function>.
</para>
-<informaltable frame='none'>
-<?dbfo keep-together="always" ?>
-<tgroup cols='1' align='left' colsep='0' rowsep='0'>
-<colspec colname='c1' colwidth='1.0*'/>
-<tbody>
- <row>
- <entry role='functiondecl'>
-void <emphasis>
-XkbNoteNameChanges</emphasis>
-(<emphasis>
-old</emphasis>
-,<emphasis>
- new</emphasis>
-,<emphasis>
- wanted</emphasis>
-)
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-XkbNameChangesPtr <emphasis>
-old</emphasis>
-; /* <emphasis>
-XkbNameChanges</emphasis>
- structure to be updated */
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-XkbNamesNotifyEvent * <emphasis>
-new</emphasis>
-; /* event from which changes are to be copied */
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-unsigned int <emphasis>
-wanted</emphasis>
-; /* types of names for which changes are to be noted */
- </entry>
-</row>
-</tbody>
-</tgroup>
-</informaltable>
+<indexterm significance="preferred" zone="XkbNoteNameChanges"><primary><function>XkbNoteNameChanges</function></primary></indexterm>
+<funcsynopsis id="XkbNoteNameChanges">
+ <funcprototype>
+ <funcdef>void <function>XkbNoteNameChanges</function></funcdef>
+<!-- (
+<parameter>old</parameter>,
+<parameter>new</parameter>,
+<parameter>wanted</parameter>
+) -->
+
+ <paramdef>XkbNameChangesPtr <parameter>old</parameter></paramdef>
+ <paramdef>XkbNamesNotifyEvent *<parameter>new</parameter></paramdef>
+ <paramdef>unsigned int <parameter>wanted</parameter></paramdef>
+ </funcprototype>
+</funcsynopsis>
+<variablelist>
+ <varlistentry>
+ <term>
+ <parameter>old</parameter>
+ </term>
+ <listitem>
+ <para>
+ <structname>XkbNameChangesRec</structname> structure to be updated
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>new</parameter>
+ </term>
+ <listitem>
+ <para>
+ event from which changes are to be copied
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>wanted</parameter>
+ </term>
+ <listitem>
+ <para>
+ types of names for which changes are to be noted
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
<para>
-The <emphasis>
-wanted</emphasis>
- parameter is the bitwise inclusive OR of the valid names mask bits shown in
-Table 18.1. <emphasis>
-XkbNoteNameChanges</emphasis>
- copies any changes that are reported in <emphasis>
-new</emphasis>
- and specified in <emphasis>
-wanted</emphasis>
- into the changes record specified by <emphasis>
-old</emphasis>
-.
+The
+<parameter>wanted</parameter>
+parameter is the bitwise inclusive OR of the valid names mask bits shown in
+<link linkend="table18.1">Table 18.1</link>.
+<function>XkbNoteNameChanges</function>
+copies any changes that are reported in
+<parameter>new</parameter>
+and specified in
+<parameter>wanted</parameter>
+into the changes record specified by
+<parameter>old</parameter>.
</para>
<para>
To update the local copy of the keyboard description with the actual values,
-pass to <emphasis>
-XkbGetNameChanges</emphasis>
- the results of one or more calls to <emphasis>
-XkbNoteNameChanges</emphasis>
-.
+pass to
+<function>XkbGetNameChanges</function>
+the results of one or more calls to
+<function>XkbNoteNameChanges</function>.
</para>
-<informaltable frame='none'>
-<?dbfo keep-together="always" ?>
-<tgroup cols='1' align='left' colsep='0' rowsep='0'>
-<colspec colname='c1' colwidth='1.0*'/>
-<tbody>
- <row>
- <entry role='functiondecl'>
-Status <emphasis>
-XkbGetNameChanges</emphasis>
-(<emphasis>
-dpy</emphasis>
-,<emphasis>
- xkb</emphasis>
-,<emphasis>
- changes</emphasis>
-)
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-Display * <emphasis>
-dpy</emphasis>
-; /* connection to the X server */
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-XkbDescPtr <emphasis>
-xkb</emphasis>
-; /* keyboard description to which names are copied */
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-XkbNameChangesPtr <emphasis>
-changes</emphasis>
-; /* names components to be obtained from the server */
- </entry>
-</row>
-</tbody>
-</tgroup>
-</informaltable>
+<indexterm significance="preferred" zone="XkbGetNameChanges"><primary><function>XkbGetNameChanges</function></primary></indexterm>
+<funcsynopsis id="XkbGetNameChanges">
+ <funcprototype>
+ <funcdef>Status <function>XkbGetNameChanges</function></funcdef>
+<!-- (
+<parameter>dpy</parameter>,
+<parameter>xkb</parameter>,
+<parameter>changes</parameter>
+) -->
+
+ <paramdef>Display *<parameter>dpy</parameter></paramdef>
+ <paramdef>XkbDescPtr <parameter>xkb</parameter></paramdef>
+ <paramdef>XkbNameChangesPtr <parameter>changes</parameter></paramdef>
+ </funcprototype>
+</funcsynopsis>
+<variablelist>
+ <varlistentry>
+ <term>
+ <parameter>dpy</parameter>
+ </term>
+ <listitem>
+ <para>
+ connection to the X server
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>xkb</parameter>
+ </term>
+ <listitem>
+ <para>
+ keyboard description to which names are copied
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>changes</parameter>
+ </term>
+ <listitem>
+ <para>
+ names components to be obtained from the server
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
<para>
-<emphasis>
-XkbGetNameChanges</emphasis>
- examines the <emphasis>
-changes</emphasis>
- parameter, retrieves the necessary information from the server, and places the
-results into the <emphasis>
-xkb</emphasis>
- keyboard description.
+<function>XkbGetNameChanges</function>
+examines the
+<parameter>changes</parameter>
+parameter, retrieves the necessary information from the server, and places the
+results into the
+<parameter>xkb</parameter>
+keyboard description.
</para>
<para>
-<emphasis>
-XkbGetNamesChanges</emphasis>
- can generate <emphasis>
-BadAlloc</emphasis>
-, <emphasis>
-BadImplementation,</emphasis>
- and <emphasis>
-BadMatch</emphasis>
- errors.
+<function>XkbGetNameChanges</function>
+can generate
+<errorname>BadAlloc</errorname>,
+<errorname>BadImplementation</errorname>,
+and
+<errorname>BadMatch</errorname>
+errors.
</para>
@@ -1056,136 +1078,149 @@ BadMatch</emphasis>
<para>
Most applications do not need to directly allocate symbolic names structures.
-Do not allocate a names structure directly using <emphasis>
-malloc</emphasis>
- or <emphasis>
-Xmalloc</emphasis>
- if your application changes the number of key aliases or radio groups or
+Do not allocate a names structure directly using
+<function>malloc</function>
+or
+<function>Xmalloc</function>
+if your application changes the number of key aliases or radio groups or
constructs a symbolic names structure without loading the necessary components
-from the X server. Instead use <emphasis>
-XkbAllocNames</emphasis>
-.
+from the X server. Instead use
+<function>XkbAllocNames</function>.
</para>
-<informaltable frame='none'>
-<?dbfo keep-together="always" ?>
-<tgroup cols='1' align='left' colsep='0' rowsep='0'>
-<colspec colname='c1' colwidth='1.0*'/>
-<tbody>
- <row>
- <entry role='functiondecl'>
-Status <emphasis>
-XkbAllocNames</emphasis>
-(<emphasis>
-xkb, which, num_rg, num_key_aliases)</emphasis>
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-XkbDescPtr <emphasis>
-xkb;</emphasis>
- /* keyboard description for which names are to be allocated */
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-unsigned int <emphasis>
-which;</emphasis>
- /* mask of names to be allocated */
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-int <emphasis>
-num_rg;</emphasis>
- /* total number of radio group names needed */
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-int <emphasis>
-num_key_aliases;</emphasis>
- /* total number of key aliases needed */
- </entry>
-</row>
-</tbody>
-</tgroup>
-</informaltable>
+<indexterm significance="preferred" zone="XkbAllocNames"><primary><function>XkbAllocNames</function></primary></indexterm>
+<funcsynopsis id="XkbAllocNames">
+ <funcprototype>
+ <funcdef>Status <function>XkbAllocNames</function></funcdef>
+<!-- (
+<parameter>xkb, which, num_rg, num_key_aliases)</parameter> -->
+
+ <paramdef>XkbDescPtr <parameter>xkb</parameter></paramdef>
+ <paramdef>unsigned int <parameter>which</parameter></paramdef>
+ <paramdef>int <parameter>num_rg</parameter></paramdef>
+ <paramdef>int <parameter>num_key_aliases</parameter></paramdef>
+ </funcprototype>
+</funcsynopsis>
+<variablelist>
+ <varlistentry>
+ <term>
+ <parameter>xkb</parameter>
+ </term>
+ <listitem>
+ <para>
+ keyboard description for which names are to be allocated
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>which</parameter>
+ </term>
+ <listitem>
+ <para>
+ mask of names to be allocated
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>num_rg</parameter>
+ </term>
+ <listitem>
+ <para>
+ total number of radio group names needed
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>num_key_aliases</parameter>
+ </term>
+ <listitem>
+ <para>
+ total number of key aliases needed
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
<para>
-<emphasis>
-XkbAllocNames</emphasis>
- can return <emphasis>
-BadAlloc</emphasis>
-, <emphasis>
-BadMatch,</emphasis>
- and <emphasis>
-BadValue</emphasis>
- errors.<emphasis>
- </emphasis>
-The <emphasis>
-which</emphasis>
- parameter is the bitwise inclusive OR of the valid names mask bits defined in
-Table 18.1.
+<function>XkbAllocNames</function>
+can return
+<errorname>BadAlloc</errorname>,
+<errorname>BadMatch</errorname>,
+and
+<errorname>BadValue</errorname>
+errors.
+The
+<parameter>which</parameter>
+parameter is the bitwise inclusive OR of the valid names mask bits defined in
+<link linkend="table18.1">Table 18.1</link>.
</para>
<para>
-Do not free symbolic names structures directly using <emphasis>
-free</emphasis>
- or <emphasis>
-XFree</emphasis>
-. Use <emphasis>
-XkbFreeNames</emphasis>
- instead.
+Do not free symbolic names structures directly using
+<function>free</function>
+or
+<function>XFree</function>.
+Use
+<function>XkbFreeNames</function>
+instead.
</para>
-<informaltable frame='none'>
-<?dbfo keep-together="always" ?>
-<tgroup cols='1' align='left' colsep='0' rowsep='0'>
-<colspec colname='c1' colwidth='1.0*'/>
-<tbody>
- <row>
- <entry role='functiondecl'>
-void <emphasis>
-XkbFreeNames</emphasis>
-(<emphasis>
-xkb, which, free_map)</emphasis>
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-XkbDescPtr <emphasis>
-xkb</emphasis>
-; /* keyboard description for which names are to be freed */
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-unsigned int <emphasis>
-which</emphasis>
-; /* mask of names components to be freed */
- </entry>
- </row>
- <row>
- <entry role='functionargdecl'>
-Bool <emphasis>
-free_map</emphasis>
-; /* <emphasis>
-True</emphasis>
- =&gt; XkbNamesRec structure itself should be freed */
- </entry>
-</row>
-</tbody>
-</tgroup>
-</informaltable>
+<indexterm significance="preferred" zone="XkbFreeNames"><primary><function>XkbFreeNames</function></primary></indexterm>
+<funcsynopsis id="XkbFreeNames">
+ <funcprototype>
+ <funcdef>void <function>XkbFreeNames</function></funcdef>
+<!-- (
+<parameter>xkb, which, free_map)</parameter> -->
+
+ <paramdef>XkbDescPtr <parameter>xkb</parameter></paramdef>
+ <paramdef>unsigned int <parameter>which</parameter></paramdef>
+ <paramdef>Bool <parameter>free_map</parameter></paramdef>
+ </funcprototype>
+</funcsynopsis>
+<variablelist>
+ <varlistentry>
+ <term>
+ <parameter>xkb</parameter>
+ </term>
+ <listitem>
+ <para>
+ keyboard description for which names are to be freed
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>which</parameter>
+ </term>
+ <listitem>
+ <para>
+ mask of names components to be freed
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>free_map</parameter>
+ </term>
+ <listitem>
+ <para>
+ <symbol>True</symbol>
+ &rArr; XkbNamesRec structure itself should be freed
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
<para>
-The <emphasis>
-which</emphasis>
- parameter is the bitwise inclusive OR of the valid names mask bits defined in
-Table 18.1.
+The
+<parameter>which</parameter>
+parameter is the bitwise inclusive OR of the valid names mask bits defined in
+<link linkend="table18.1">Table 18.1</link>.
</para>
</sect1>
</chapter>