diff options
author | marha <marha@users.sourceforge.net> | 2010-08-02 09:00:24 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-08-02 09:00:24 +0000 |
commit | 240baf59a219841c5f8942c82f7ed61da9d2323b (patch) | |
tree | 76937e127002c1ba58c5a379651f20a17e866627 | |
parent | 6c5a4ae0c8e57225ce31fb0a39c87ec9a5eed2b5 (diff) | |
parent | d2758df0a0091496717fe7a65c3e7563e7c82785 (diff) | |
download | vcxsrv-240baf59a219841c5f8942c82f7ed61da9d2323b.tar.gz vcxsrv-240baf59a219841c5f8942c82f7ed61da9d2323b.tar.bz2 vcxsrv-240baf59a219841c5f8942c82f7ed61da9d2323b.zip |
svn merge ^/branches/released .
60 files changed, 19197 insertions, 8308 deletions
diff --git a/libX11/configure.ac b/libX11/configure.ac index 9f749aae1..831f5f184 100644 --- a/libX11/configure.ac +++ b/libX11/configure.ac @@ -30,8 +30,6 @@ XORG_ENABLE_SPECS XORG_WITH_XMLTO(0.0.20)
XORG_WITH_FOP
XORG_CHECK_SGML_DOCTOOLS(1.5)
-XORG_WITH_GROFF
-XORG_WITH_PS2PDF
# Checks for programs.
AC_PROG_LIBTOOL
@@ -539,6 +537,9 @@ AC_OUTPUT([Makefile nls/zh_TW.UTF-8/Makefile
specs/Makefile
specs/i18n/Makefile
+ specs/i18n/framework/Makefile
+ specs/i18n/localedb/Makefile
+ specs/i18n/trans/Makefile
specs/libX11/Makefile
specs/XIM/Makefile
x11.pc
diff --git a/libX11/man/Compose.man b/libX11/man/Compose.man index db48cc4f4..7925d0862 100644 --- a/libX11/man/Compose.man +++ b/libX11/man/Compose.man @@ -1,158 +1,158 @@ -.\" Copyright 2009 Sun Microsystems, Inc. All rights reserved. -.\" -.\" 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. -.\" -.\" shorthand for double quote that works everywhere. -.ds q \N'34' -.ds xL Xlib \- C Language X Interface -.TH Compose __filemansuffix__ __vendorversion__ -.SH NAME -Compose \- X client mappings for multi-key input sequences -.SH DESCRIPTION -The X library, libX11, provides a simple input method for characters -beyond those represented on typical keyboards using sequences of key -strokes that are combined to enter a single character. -.PP -The compose file is searched for in the following order: -.IP - -If the environment variable -.B $XCOMPOSEFILE -is set, its value is used as the name of the Compose file. -.IP - -If the user's home directory has a file named -.IR .XCompose , -it is used as the Compose file. -.IP - -The system provided compose file is used by mapping the locale to a compose -file from the list in -.IR __xlocaledir__/compose.dir . -.PP -Compose files can use an -.RB \*q include \*q -instruction. This allows local modifications to be made to existing compose -files without including all of the content directly. For example, the -system's iso8859-1 compose file can be included with a line like this: -.RS 4 -.BI "include \*q" %S/iso8859-1/Compose \*q -.RE -.PP -There are several substitutions that can be made in the file name of the -include instruction: -.TP 4 -.I %H -expands to the user's home directory (the -.B $HOME -environment variable) -.TP 4 -.I %L -expands to the name of the locale specific Compose file (i.e., -.RI \*q __xlocaledir__/<localename>/Compose \*q) -.TP 4 -.I %S -expands to the name of the system directory for Compose files (i.e., -.RI \*q __xlocaledir__ \*q) -.PP -For example, you can include in your compose file the default Compose file -by using: -.RS -.B "include \*q%L\*q" -.RE -and then rewrite only the few rules that you need to change. New -compose rules can be added, and previous ones replaced. -.SH FILE FORMAT -.\" Based on grammar description in modules/im/ximcp/imLcPrs.c -Compose files are plain text files, with a separate line for each compose -sequence. Comments begin with \fB#\fP characters. Each compose sequence -specifies one or more events and a resulting input sequence, with an optional -comment at the end of the line: -.RS -\fIEVENT\fP [\fIEVENT\fP...] \fB:\fP \fIRESULT\fP [\fB#\fP \fICOMMENT\fP] -.RE -.PP -Each event consists of a specified input keysym, and optional modifier states: -.RS -[\fIMODIFIER_LIST\fP] \fB<\fP\fIkeysym\fP\fB>\fP -.RE -.PP -Each modifier consists of a specified modifier and a state: -.RS -(\fB!\fP \fIMODIFIER\fP ) | \fBNone\fP -.RE -Modifiers may be preceded by a -.RB \*q "~" \*q -character to indicate that the modifier must not be present. -.PP -The result specifies a string, keysym, or both, that the X client receives -as input when the sequence of events is input: -.RS -\fB\*q\fP\fISTRING\fP\fB\*q\fP | \fIkeysym\fP | \fB\*q\fP\fISTRING\fP\fB\*q\fP \fIkeysym\fP -.RE -.PP -Keysyms are specified without the \fBXK_\fP prefix. -.PP -Strings may be direct text encoded in the locale for which the compose file is -to be used, or an escaped octal or hexadecimal character code. Octal codes -are specified as \fB\*q\\123\*q\fP and hexadecimal codes as -\fB\*q\\0x123a\*q\fP. -It is not necessary to specify in the right part of a rule a locale encoded -string in addition to the keysym name. If the string is omitted, Xlib -figures it out from the keysym according to the current locale. -I.e., if a rule looks like: -.RS -\fB<dead_grave> <A> : \*q\\300\*q Agrave\fP -.RE -the result of the composition is always the letter with the "\\300" -code. But if the rule is: -.RS -\fB<dead_grave> <A> : Agrave\fP -.RE -the result depends on how Agrave is mapped in the current locale. -.SH ENVIRONMENT -.TP -.B XCOMPOSEFILE -File to use for compose sequences. -.TP -.B XCOMPOSECACHE -Directory to use for caching compiled compose files. -.SH FILES -.TP -.I $HOME/.Xcompose -User default compose file if XCOMPOSEFILE is not set. -.TP -.I __xlocaledir__/compose.dir -File listing the compose file path to use for each locale. -.TP -.I __xlocaledir__/<localemapping>/Compose -System default compose file for the locale, mapped via compose.dir. -.TP -.I /var/cache/libx11/compose/ -System-wide cache directory for compiled compose files. -.TP -.I $HOME/.compose-cache/ -Per-user cache directory for compiled compose files. -.SH SEE ALSO -.BR XLookupString (__libmansuffix__), -.BR XmbLookupString (__libmansuffix__), -.BR XwcLookupString (__libmansuffix__), -.BR Xutf8LookupString (__libmansuffix__), -.BR mkcomposecache (__appmansuffix__), -.BR locale (__miscmansuffix__). -.br -\fI\*(xL\fP +.\" Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+.\"
+.\" 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.
+.\"
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.ds xL Xlib \- C Language X Interface
+.TH Compose __filemansuffix__ __vendorversion__
+.SH NAME
+Compose \- X client mappings for multi-key input sequences
+.SH DESCRIPTION
+The X library, libX11, provides a simple input method for characters
+beyond those represented on typical keyboards using sequences of key
+strokes that are combined to enter a single character.
+.PP
+The compose file is searched for in the following order:
+.IP -
+If the environment variable
+.B $XCOMPOSEFILE
+is set, its value is used as the name of the Compose file.
+.IP -
+If the user's home directory has a file named
+.IR .XCompose ,
+it is used as the Compose file.
+.IP -
+The system provided compose file is used by mapping the locale to a compose
+file from the list in
+.IR __xlocaledir__/compose.dir .
+.PP
+Compose files can use an
+.RB \*q include \*q
+instruction. This allows local modifications to be made to existing compose
+files without including all of the content directly. For example, the
+system's iso8859-1 compose file can be included with a line like this:
+.RS 4
+.BI "include \*q" %S/iso8859-1/Compose \*q
+.RE
+.PP
+There are several substitutions that can be made in the file name of the
+include instruction:
+.TP 4
+.I %H
+expands to the user's home directory (the
+.B $HOME
+environment variable)
+.TP 4
+.I %L
+expands to the name of the locale specific Compose file (i.e.,
+.RI \*q __xlocaledir__/<localename>/Compose \*q)
+.TP 4
+.I %S
+expands to the name of the system directory for Compose files (i.e.,
+.RI \*q __xlocaledir__ \*q)
+.PP
+For example, you can include in your compose file the default Compose file
+by using:
+.RS
+.B "include \*q%L\*q"
+.RE
+and then rewrite only the few rules that you need to change. New
+compose rules can be added, and previous ones replaced.
+.SH FILE FORMAT
+.\" Based on grammar description in modules/im/ximcp/imLcPrs.c
+Compose files are plain text files, with a separate line for each compose
+sequence. Comments begin with \fB#\fP characters. Each compose sequence
+specifies one or more events and a resulting input sequence, with an optional
+comment at the end of the line:
+.RS
+\fIEVENT\fP [\fIEVENT\fP...] \fB:\fP \fIRESULT\fP [\fB#\fP \fICOMMENT\fP]
+.RE
+.PP
+Each event consists of a specified input keysym, and optional modifier states:
+.RS
+[\fIMODIFIER_LIST\fP] \fB<\fP\fIkeysym\fP\fB>\fP
+.RE
+.PP
+Each modifier consists of a specified modifier and a state:
+.RS
+(\fB!\fP \fIMODIFIER\fP ) | \fBNone\fP
+.RE
+Modifiers may be preceded by a
+.RB \*q "~" \*q
+character to indicate that the modifier must not be present.
+.PP
+The result specifies a string, keysym, or both, that the X client receives
+as input when the sequence of events is input:
+.RS
+\fB\*q\fP\fISTRING\fP\fB\*q\fP | \fIkeysym\fP | \fB\*q\fP\fISTRING\fP\fB\*q\fP \fIkeysym\fP
+.RE
+.PP
+Keysyms are specified without the \fBXK_\fP prefix.
+.PP
+Strings may be direct text encoded in the locale for which the compose file is
+to be used, or an escaped octal or hexadecimal character code. Octal codes
+are specified as \fB\*q\\123\*q\fP and hexadecimal codes as
+\fB\*q\\0x123a\*q\fP.
+It is not necessary to specify in the right part of a rule a locale encoded
+string in addition to the keysym name. If the string is omitted, Xlib
+figures it out from the keysym according to the current locale.
+I.e., if a rule looks like:
+.RS
+\fB<dead_grave> <A> : \*q\\300\*q Agrave\fP
+.RE
+the result of the composition is always the letter with the "\\300"
+code. But if the rule is:
+.RS
+\fB<dead_grave> <A> : Agrave\fP
+.RE
+the result depends on how Agrave is mapped in the current locale.
+.SH ENVIRONMENT
+.TP
+.B XCOMPOSEFILE
+File to use for compose sequences.
+.TP
+.B XCOMPOSECACHE
+Directory to use for caching compiled compose files.
+.SH FILES
+.TP
+.I $HOME/.XCompose
+User default compose file if XCOMPOSEFILE is not set.
+.TP
+.I __xlocaledir__/compose.dir
+File listing the compose file path to use for each locale.
+.TP
+.I __xlocaledir__/<localemapping>/Compose
+System default compose file for the locale, mapped via compose.dir.
+.TP
+.I /var/cache/libx11/compose/
+System-wide cache directory for compiled compose files.
+.TP
+.I $HOME/.compose-cache/
+Per-user cache directory for compiled compose files.
+.SH SEE ALSO
+.BR XLookupString (__libmansuffix__),
+.BR XmbLookupString (__libmansuffix__),
+.BR XwcLookupString (__libmansuffix__),
+.BR Xutf8LookupString (__libmansuffix__),
+.BR mkcomposecache (__appmansuffix__),
+.BR locale (__miscmansuffix__).
+.br
+\fI\*(xL\fP
diff --git a/libX11/nls/en_US.UTF-8/Compose.pre b/libX11/nls/en_US.UTF-8/Compose.pre index 142adab2e..e26ef2be6 100644 --- a/libX11/nls/en_US.UTF-8/Compose.pre +++ b/libX11/nls/en_US.UTF-8/Compose.pre @@ -211,7 +211,7 @@ XCOMM Other symbols <Multi_key> <Cyrillic_EN> <Cyrillic_o> : "№" numerosign # NUMERO SIGN
<Multi_key> <Cyrillic_EN> <Cyrillic_O> : "№" numerosign # NUMERO SIGN
-<Multi_key> <question> <exclam> : "‽" U203D # INTERROBANG
+<Multi_key> <question> <exclam> : "⸘" U2E18 # INVERTED INTERROBANG
<Multi_key> <exclam> <question> : "‽" U203D # INTERROBANG
<Multi_key> <C> <C> <C> <P> : "☭" U262D # HAMMER AND SICKLE
diff --git a/libX11/specs/Makefile.am b/libX11/specs/Makefile.am index 4a51cae70..e2ff4117e 100644 --- a/libX11/specs/Makefile.am +++ b/libX11/specs/Makefile.am @@ -1,3 +1,24 @@ -SUBDIRS=libX11 i18n XIM - -EXTRA_DIST=troffrules.in macros.t +#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# 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.
+#
+
+SUBDIRS=libX11 i18n XIM
diff --git a/libX11/specs/XIM/Makefile.am b/libX11/specs/XIM/Makefile.am index b9bb42fec..c3e191716 100644 --- a/libX11/specs/XIM/Makefile.am +++ b/libX11/specs/XIM/Makefile.am @@ -1,5 +1,5 @@ #
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -21,8 +21,20 @@ # DEALINGS IN THE SOFTWARE.
#
-# Based on xc/doc/specs/XIM/Makefile from X11R6.9
+if ENABLE_SPECS
-doc_sources = xim.ms
+specdir = $(docdir)/$(subdir)
+doc_sources = xim.xml
+dist_spec_DATA = \
+ $(doc_sources) \
+ dynamicflowsampleseq.svg \
+ dynamicflow.svg \
+ eventflow.svg \
+ sampleprotocolflow1.svg \
+ sampleprotocolflow2.svg \
+ staticflowsampleseq.svg \
+ staticflow.svg
-include $(top_srcdir)/specs/troffrules.in
+include $(top_srcdir)/specs/xmlrules.in
+
+endif ENABLE_SPECS
diff --git a/libX11/specs/XIM/dynamicflow.svg b/libX11/specs/XIM/dynamicflow.svg new file mode 100644 index 000000000..54fea7d6b --- /dev/null +++ b/libX11/specs/XIM/dynamicflow.svg @@ -0,0 +1,294 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="575.96063"
+ height="277.7157"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="dynamicflow.svg">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend"
+ style="overflow:visible">
+ <path
+ id="path3695"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.7"
+ inkscape:cx="217.60452"
+ inkscape:cy="141.45567"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ units="pt"
+ inkscape:window-width="675"
+ inkscape:window-height="567"
+ inkscape:window-x="31"
+ inkscape:window-y="48"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-21.177732,-766.10217)">
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="120"
+ y="775.21936"
+ id="text2816"><tspan
+ sodipodi:role="line"
+ id="tspan2818"
+ x="120"
+ y="775.21936">IM Library</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="362.28571"
+ y="775.79077"
+ id="text2820"><tspan
+ sodipodi:role="line"
+ id="tspan2822"
+ x="362.28571"
+ y="775.79077">IM Server</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="19.999998"
+ y="825.79077"
+ id="text2824"><tspan
+ sodipodi:role="line"
+ id="tspan2826"
+ x="19.999998"
+ y="825.79077">Keys in the on-key-list</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="22.571426"
+ y="871.21936"
+ id="text2828"><tspan
+ sodipodi:role="line"
+ id="tspan2830"
+ x="22.571426"
+ y="871.21936">event mask is changed</tspan><tspan
+ sodipodi:role="line"
+ x="22.571426"
+ y="886.21936"
+ id="tspan2832">to deselect the event</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="31.14286"
+ y="1025.2195"
+ id="text2834"><tspan
+ sodipodi:role="line"
+ id="tspan2836"
+ x="31.14286"
+ y="1025.2195">event mask is changed</tspan><tspan
+ sodipodi:role="line"
+ x="31.14286"
+ y="1040.2195"
+ id="tspan2838">to select the event</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="192.85715"
+ y="863.79077"
+ id="text2844"><tspan
+ sodipodi:role="line"
+ id="tspan2846"
+ x="192.85715"
+ y="863.79077">XIM_EXT_SET_EVENT_MASK</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="206.84494"
+ y="876.07648"
+ id="text2848"><tspan
+ sodipodi:role="line"
+ id="tspan2850"
+ x="206.84494"
+ y="876.07648"
+ style="font-size:10px">intercept-event-mask is set</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="192.85715"
+ y="1026.3622"
+ id="text2852"><tspan
+ sodipodi:role="line"
+ id="tspan2854"
+ x="192.85715"
+ y="1026.3622">XIM_EXT_SET_EVENT_MASK</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="214.70139"
+ y="1039.5051"
+ id="text2856"><tspan
+ sodipodi:role="line"
+ id="tspan2858"
+ x="214.70139"
+ y="1039.5051"
+ style="font-size:10px">select-event-mask is set</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="419.71429"
+ y="875.21936"
+ id="text2860"><tspan
+ sodipodi:role="line"
+ id="tspan2862"
+ x="419.71429"
+ y="875.21936">event mask is changed</tspan><tspan
+ sodipodi:role="line"
+ x="419.71429"
+ y="890.21936"
+ id="tspan2864">to select the event</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="418.85712"
+ y="957.21936"
+ id="text2866"><tspan
+ sodipodi:role="line"
+ id="tspan2868"
+ x="418.85712"
+ y="957.21936">X events directly come</tspan><tspan
+ sodipodi:role="line"
+ x="418.85712"
+ y="972.21936"
+ id="tspan2870">to the IM Server</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="422.85712"
+ y="996.07648"
+ id="text2872"><tspan
+ sodipodi:role="line"
+ id="tspan2874"
+ x="422.85712"
+ y="996.07648">when preediting is turned off</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="423.42859"
+ y="1028.6479"
+ id="text2876"><tspan
+ sodipodi:role="line"
+ id="tspan2878"
+ x="423.42859"
+ y="1028.6479">event mask is changed</tspan><tspan
+ sodipodi:role="line"
+ x="423.42859"
+ y="1043.6479"
+ id="tspan2880">to deselect the event</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 181.42857,780.93364 c 0,239.99996 0,248.57146 0,248.57146"
+ id="path2882" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 367.14286,783.21935 c 0,244.28575 0,242.85715 0,242.85715"
+ id="path2884" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Lend)"
+ d="m 92.857143,77.142857 79.999997,0"
+ id="path2886"
+ transform="translate(0,752.36221)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 192.85714,82.857143 162.85715,1.428571"
+ id="path2888"
+ transform="translate(0,752.36221)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 352.85714,94.285714 -160,1.428572"
+ id="path2890"
+ transform="translate(0,752.36221)"
+ inkscape:connector-type="polyline" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="202.60631"
+ y="827.71936"
+ id="text2854"><tspan
+ sodipodi:role="line"
+ id="tspan2856"
+ x="202.60631"
+ y="827.71936">XIM_TRIGGER_NOTIFY</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="186.89201"
+ y="902.86224"
+ id="text2858"><tspan
+ sodipodi:role="line"
+ id="tspan2860"
+ x="186.89201"
+ y="902.86224">XIM_TRIGGER_NOTIFY_REPLY</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 322.85714,145.3315 -151.42857,0"
+ id="path2918"
+ transform="translate(21.177732,766.10217)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 327.14286,235.3315 -150,-1.42858"
+ id="path3892"
+ transform="translate(21.177732,766.10217)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="M 447.14286,166.76007 378.57143,165.3315"
+ id="path3894"
+ transform="translate(21.177732,766.10217)"
+ inkscape:connector-type="polyline" />
+ </g>
+</svg>
diff --git a/libX11/specs/XIM/dynamicflowsampleseq.svg b/libX11/specs/XIM/dynamicflowsampleseq.svg new file mode 100644 index 000000000..b3839bcce --- /dev/null +++ b/libX11/specs/XIM/dynamicflowsampleseq.svg @@ -0,0 +1,436 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="502.63379"
+ height="290.44269"
+ id="svg4341"
+ version="1.1"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="dynamicflowsampleseq.svg">
+ <defs
+ id="defs4343">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective4349" />
+ <inkscape:perspective
+ id="perspective4272"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend"
+ style="overflow:visible">
+ <path
+ id="path3695"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker4278"
+ style="overflow:visible">
+ <path
+ id="path4280"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker4282"
+ style="overflow:visible">
+ <path
+ id="path4284"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker4286"
+ style="overflow:visible">
+ <path
+ id="path4288"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker4290"
+ style="overflow:visible">
+ <path
+ id="path4292"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker4294"
+ style="overflow:visible">
+ <path
+ id="path4296"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective2877"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-3"
+ style="overflow:visible">
+ <path
+ id="path3695-7"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective2905"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-31"
+ style="overflow:visible">
+ <path
+ id="path3695-4"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective2937"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-8"
+ style="overflow:visible">
+ <path
+ id="path3695-9"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.35"
+ inkscape:cx="362.98032"
+ inkscape:cy="-207.27231"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="677"
+ inkscape:window-height="660"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ inkscape:window-maximized="0"
+ inkscape:snap-nodes="false" />
+ <metadata
+ id="metadata4346">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-12.019684,-34.647186)">
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="110.84195"
+ y="43.764374"
+ id="text2816"><tspan
+ sodipodi:role="line"
+ id="tspan2818"
+ x="110.84195"
+ y="43.764374">IM Library</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="353.12766"
+ y="44.335777"
+ id="text2820"><tspan
+ sodipodi:role="line"
+ id="tspan2822"
+ x="353.12766"
+ y="44.335777">IM Server</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="10.841949"
+ y="94.335777"
+ id="text2824"><tspan
+ sodipodi:role="line"
+ id="tspan2826"
+ x="10.841949"
+ y="94.335777">Keys in the on-key-list</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="183.6991"
+ y="132.33578"
+ id="text2844"><tspan
+ sodipodi:role="line"
+ id="tspan2846"
+ x="183.6991"
+ y="132.33578">XIM_EXT_SET_EVENT_MASK</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="197.68689"
+ y="144.62149"
+ id="text2848"><tspan
+ sodipodi:role="line"
+ id="tspan2850"
+ x="197.68689"
+ y="144.62149"
+ style="font-size:10px">intercept-event-mask is set</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="183.6991"
+ y="260.90723"
+ id="text2852"><tspan
+ sodipodi:role="line"
+ id="tspan2854"
+ x="183.6991"
+ y="260.90723">XIM_EXT_SET_EVENT_MASK</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="205.54333"
+ y="274.05017"
+ id="text2856"><tspan
+ sodipodi:role="line"
+ id="tspan2858"
+ x="205.54333"
+ y="274.05017"
+ style="font-size:10px">select-event-mask is set</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1.05025411px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 172.27052,49.53018 c 0,264.72805 0,274.18271 0,274.18271"
+ id="path2882" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1.05972767px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 357.98481,51.82588 c 0,274.33848 0,272.73413 0,272.73413"
+ id="path2884" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Lend)"
+ d="m 83.6991,98.05008 79.99999,0"
+ id="path2886"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 183.69909,103.76437 162.85715,1.42857"
+ id="path2888"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 343.69909,115.19294 -160,1.42857"
+ id="path2890"
+ inkscape:connector-type="polyline" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="193.44826"
+ y="96.264374"
+ id="text2854"><tspan
+ sodipodi:role="line"
+ id="tspan2856"
+ x="193.44826"
+ y="96.264374">XIM_TRIGGER_NOTIFY</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 339.16254,235.97868 -150,-1.42858"
+ id="path3892"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 443.16254,227.40725 -68.57143,-1.42857"
+ id="path3894"
+ inkscape:connector-type="polyline" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="28.571426"
+ y="148.21933"
+ id="text4489"><tspan
+ sodipodi:role="line"
+ id="tspan4491"
+ x="28.571426"
+ y="148.21933">the specified events</tspan><tspan
+ sodipodi:role="line"
+ x="28.571426"
+ y="163.21933"
+ id="tspan4493">are being filtered</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="24.571426"
+ y="221.36218"
+ id="text4495"><tspan
+ sodipodi:role="line"
+ id="tspan4497"
+ x="24.571426"
+ y="221.36218">Keys in the off-key-list</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="19.428574"
+ y="300.79077"
+ id="text4499"><tspan
+ sodipodi:role="line"
+ id="tspan4501"
+ x="19.428574"
+ y="300.79077">the specified events</tspan><tspan
+ sodipodi:role="line"
+ x="19.428574"
+ y="315.79077"
+ id="tspan4503">are being processed</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="382.57144"
+ y="98.647888"
+ id="text4505"><tspan
+ sodipodi:role="line"
+ id="tspan4507"
+ x="382.57144"
+ y="98.647888">Keys in the on-key-list</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="383.42691"
+ y="148.21933"
+ id="text4513"><tspan
+ sodipodi:role="line"
+ id="tspan4515"
+ x="383.42691"
+ y="148.21933">the specified events</tspan><tspan
+ sodipodi:role="line"
+ x="383.42691"
+ y="163.21933"
+ id="tspan4517">are being processed</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="382.57144"
+ y="221.36218"
+ id="text4519"><tspan
+ sodipodi:role="line"
+ id="tspan4521"
+ x="382.57144"
+ y="221.36218">Keys in the off-key-list</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="383.42691"
+ y="300.79077"
+ id="text4523"><tspan
+ sodipodi:role="line"
+ id="tspan4525"
+ x="383.42691"
+ y="300.79077">the specified events</tspan><tspan
+ sodipodi:role="line"
+ x="383.42691"
+ y="315.79077"
+ id="tspan4527">are being discarded</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 436.85714,105.78486 -68.57143,-1.42857"
+ id="path3894-2"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Lend)"
+ d="m 79.14286,230.6479 79.99999,0"
+ id="path2886-9"
+ inkscape:connector-type="polyline" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="177.14285"
+ y="175.50504"
+ id="text2925"><tspan
+ sodipodi:role="line"
+ id="tspan2927"
+ x="177.14285"
+ y="175.50504">XIM_TRIGGER_NOTIFY_REPLY</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 339.28571,189.37172 -150,-1.42858"
+ id="path3892-4"
+ inkscape:connector-type="polyline" />
+ </g>
+</svg>
diff --git a/libX11/specs/XIM/eventflow.svg b/libX11/specs/XIM/eventflow.svg new file mode 100644 index 000000000..13886477b --- /dev/null +++ b/libX11/specs/XIM/eventflow.svg @@ -0,0 +1,314 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="224.5"
+ height="216.0125"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="eventflow.svg">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="Arrow1Lstart"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lstart"
+ style="overflow:visible">
+ <path
+ id="path3665"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(0.8,0,0,0.8,10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend"
+ style="overflow:visible">
+ <path
+ id="path3668"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Lend"
+ style="overflow:visible">
+ <path
+ id="path3686"
+ style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="matrix(-1.1,0,0,-1.1,-1.1,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Mend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Mend"
+ style="overflow:visible">
+ <path
+ id="path3692"
+ style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="scale(-0.6,-0.6)" />
+ </marker>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <inkscape:perspective
+ id="perspective4496"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-2"
+ style="overflow:visible">
+ <path
+ id="path3668-0"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4537"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-1"
+ style="overflow:visible">
+ <path
+ id="path3668-6"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4955"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-14"
+ style="overflow:visible">
+ <path
+ id="path3668-7"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.5570699"
+ inkscape:cx="130.77268"
+ inkscape:cy="93.49857"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="746"
+ inkscape:window-height="745"
+ inkscape:window-x="452"
+ inkscape:window-y="11"
+ inkscape:window-maximized="0"
+ units="pt" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-4.4747047,45.51725)">
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.31376761;stroke-opacity:1"
+ id="rect2818"
+ width="134.02251"
+ height="66.196053"
+ x="52.050224"
+ y="-17.612656"
+ ry="3.8066549" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.32876641;stroke-opacity:1"
+ id="rect2820"
+ width="85.332054"
+ height="22.29335"
+ x="93.551544"
+ y="21.494766"
+ ry="3.8002031" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.21471952;stroke-opacity:1"
+ id="rect2861"
+ width="76.668564"
+ height="28.791061"
+ x="91.898651"
+ y="70.911148"
+ ry="2.6885254" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.20091781;stroke-opacity:1"
+ id="rect2878"
+ width="72.692574"
+ height="24.815073"
+ x="63.165215"
+ y="119.57973"
+ ry="1.8175722" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.16700821px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 191.35869,-129.09736 0,-20.41139"
+ id="path2888-8"
+ inkscape:connector-type="polyline" />
+ <g
+ id="g5177"
+ transform="matrix(0.27928539,0,0,0.27928539,11.337125,-81.727333)">
+ <path
+ inkscape:connector-type="polyline"
+ id="path2888"
+ d="m 218.57142,720.35677 0,-251.23328"
+ style="fill:none;stroke:#000000;stroke-width:1.07757151px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)" />
+ <path
+ inkscape:connector-type="polyline"
+ id="path2888-3"
+ d="m 335.37064,546.2675 0,-200.11997"
+ style="fill:none;stroke:#000000;stroke-width:0.96785825px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Lstart);marker-end:none" />
+ <path
+ inkscape:connector-type="polyline"
+ id="path2888-82"
+ d="m 219.2031,466.56824 0,-120.80758"
+ style="fill:none;stroke:#000000;stroke-width:0.76102072px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:none" />
+ <path
+ inkscape:connector-type="polyline"
+ id="path5175"
+ d="m 219.26527,346.32772 116.0432,0.38074"
+ style="fill:none;stroke:#000000;stroke-width:1.12434793px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline" />
+ </g>
+ <text
+ xml:space="preserve"
+ style="font-size:3.62546563px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="67.625397"
+ y="136.94441"
+ id="text2865"><tspan
+ sodipodi:role="line"
+ id="tspan2867"
+ x="67.625397"
+ y="136.94441"
+ style="font-size:14.50186253px">X Server</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:3.35142469px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="17.946682"
+ y="107.43233"
+ id="text2869"><tspan
+ sodipodi:role="line"
+ id="tspan2871"
+ x="17.946682"
+ y="107.43233"
+ style="font-size:6.14427853px">Backend Method</tspan><tspan
+ sodipodi:role="line"
+ x="17.946682"
+ y="115.11268"
+ style="font-size:6.14427853px"
+ id="tspan2873">(Core)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:3.35142469px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="130.79489"
+ y="107.07356"
+ id="text2875"><tspan
+ sodipodi:role="line"
+ id="tspan2877"
+ x="130.79489"
+ y="107.07356"
+ style="font-size:6.14427853px">Frontend Method</tspan><tspan
+ sodipodi:role="line"
+ x="130.79489"
+ y="114.75391"
+ id="tspan2879"
+ style="font-size:6.14427853px">(Extension)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:3.71718764px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="94.060638"
+ y="91.657791"
+ id="text2881"><tspan
+ sodipodi:role="line"
+ id="tspan2883"
+ x="94.060638"
+ y="91.657791"
+ style="font-size:14.86875057px">IM Server</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:3.35142469px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="118.23929"
+ y="37.838333"
+ id="text2890"><tspan
+ sodipodi:role="line"
+ id="tspan2892"
+ x="118.23929"
+ y="37.838333"
+ style="font-size:13.40569878px">Library</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:3.35142469px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="58.689751"
+ y="1.2476349"
+ id="text2899"><tspan
+ sodipodi:role="line"
+ id="tspan2901"
+ x="58.689751"
+ y="1.2476349"
+ style="font-size:13.40569878px">Application</tspan></text>
+ </g>
+</svg>
diff --git a/libX11/specs/XIM/sampleprotocolflow1.svg b/libX11/specs/XIM/sampleprotocolflow1.svg new file mode 100644 index 000000000..622f9eed7 --- /dev/null +++ b/libX11/specs/XIM/sampleprotocolflow1.svg @@ -0,0 +1,939 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="382.78897"
+ height="202.96555"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="sampleprotocolflow1.svg">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="Arrow2Mstart"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Mstart"
+ style="overflow:visible">
+ <path
+ id="path4867"
+ style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="scale(0.6,0.6)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Mend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Mend"
+ style="overflow:visible">
+ <path
+ id="path4870"
+ style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="scale(-0.6,-0.6)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Send"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Send"
+ style="overflow:visible">
+ <path
+ id="path4858"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.2,0,0,-0.2,-1.2,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lstart"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lstart"
+ style="overflow:visible">
+ <path
+ id="path3946"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(0.8,0,0,0.8,10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend"
+ style="overflow:visible">
+ <path
+ id="path3949"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <inkscape:perspective
+ id="perspective4399"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-6"
+ style="overflow:visible">
+ <path
+ id="path3949-6"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4427"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-1"
+ style="overflow:visible">
+ <path
+ id="path3949-1"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4455"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-9"
+ style="overflow:visible">
+ <path
+ id="path3949-69"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4483"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-5"
+ style="overflow:visible">
+ <path
+ id="path3949-4"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4483-6"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-52"
+ style="overflow:visible">
+ <path
+ id="path3949-44"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4524"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0"
+ style="overflow:visible">
+ <path
+ id="path3949-7"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4946"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective4985"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective5010"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective5254"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0-8"
+ style="overflow:visible">
+ <path
+ id="path3949-7-3"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective5282"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0-9"
+ style="overflow:visible">
+ <path
+ id="path3949-7-9"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective5512"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0-9-9"
+ style="overflow:visible">
+ <path
+ id="path3949-7-9-5"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective5540"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0-9-1"
+ style="overflow:visible">
+ <path
+ id="path3949-7-9-1"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective5568"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0-5"
+ style="overflow:visible">
+ <path
+ id="path3949-7-5"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective5598"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0-6"
+ style="overflow:visible">
+ <path
+ id="path3949-7-7"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective5632"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0-0"
+ style="overflow:visible">
+ <path
+ id="path3949-7-39"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective6084"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0-9-3"
+ style="overflow:visible">
+ <path
+ id="path3949-7-9-6"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective6112"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-50"
+ style="overflow:visible">
+ <path
+ id="path3949-64"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective6140"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-4"
+ style="overflow:visible">
+ <path
+ id="path3949-3"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective6828"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-4-0"
+ style="overflow:visible">
+ <path
+ id="path3949-3-4"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4760"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-14"
+ style="overflow:visible">
+ <path
+ id="path3949-447"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4818"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0-2"
+ style="overflow:visible">
+ <path
+ id="path3949-7-58"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective3436"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.28"
+ inkscape:cx="191.3945"
+ inkscape:cy="47.71932"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1000"
+ inkscape:window-height="704"
+ inkscape:window-x="11"
+ inkscape:window-y="25"
+ inkscape:window-maximized="0"
+ units="pt"
+ borderlayer="true" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-47.418246,-76.438428)">
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="46.783585"
+ y="95.48922"
+ id="text2816"><tspan
+ sodipodi:role="line"
+ id="tspan2818"
+ x="46.783585"
+ y="95.48922">Key event</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="46.783585"
+ y="127.36035"
+ id="text2820"><tspan
+ sodipodi:role="line"
+ id="tspan2822"
+ x="46.783585"
+ y="127.36035">Key event</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="145.80858"
+ y="81.978302"
+ id="text2830"><tspan
+ sodipodi:role="line"
+ id="tspan2832"
+ x="145.80858"
+ y="81.978302">Xib API</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="235.207"
+ y="81.351532"
+ id="text2834"><tspan
+ sodipodi:role="line"
+ id="tspan2836"
+ x="235.207"
+ y="81.351532">IM library</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="133.49124"
+ y="93.73336"
+ id="text2838"><tspan
+ sodipodi:role="line"
+ id="tspan2840"
+ x="133.49124"
+ y="93.73336">XNextEvent</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="133.49124"
+ y="101.95583"
+ id="text2842"><tspan
+ sodipodi:role="line"
+ id="tspan2844"
+ x="133.49124"
+ y="101.95583">XFilterEvent</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="133.49124"
+ y="127.98712"
+ id="text2846"><tspan
+ sodipodi:role="line"
+ id="tspan2848"
+ x="133.49124"
+ y="127.98712">XNextEvent</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="133.49124"
+ y="135.05867"
+ id="text2850"><tspan
+ sodipodi:role="line"
+ id="tspan2852"
+ x="133.49124"
+ y="135.05867">XFilterEvent</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="133.49124"
+ y="162.35158"
+ id="text2854"><tspan
+ sodipodi:role="line"
+ id="tspan2856"
+ x="133.49124"
+ y="162.35158">XNextEvent</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="133.49124"
+ y="170.35785"
+ id="text2858"><tspan
+ sodipodi:role="line"
+ id="tspan2860"
+ x="133.49124"
+ y="170.35785">XFilterEvent(returns False)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="133.49124"
+ y="179.28792"
+ id="text2862"><tspan
+ sodipodi:role="line"
+ id="tspan2864"
+ x="133.49124"
+ y="179.28792">XmbLookupString</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="272.31775"
+ y="101.96278"
+ id="text2899"><tspan
+ sodipodi:role="line"
+ id="tspan2901"
+ x="272.31775"
+ y="101.96278">XIM_FORWARD_EVENT</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="272.31775"
+ y="123.1926"
+ id="text2903"><tspan
+ sodipodi:role="line"
+ id="tspan2905"
+ x="272.31775"
+ y="123.1926">XIM_FORWARD_EVENT</tspan><tspan
+ sodipodi:role="line"
+ x="272.31775"
+ y="131.27585"
+ id="tspan2907">or XIM_COMMIT</tspan><tspan
+ sodipodi:role="line"
+ x="272.31775"
+ y="139.35912"
+ id="tspan2909">(synchronous)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="272.31775"
+ y="160.72026"
+ id="text2911"><tspan
+ sodipodi:role="line"
+ id="tspan2913"
+ x="272.31775"
+ y="160.72026">XIM_FORWARD_EVENT</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="292.59851"
+ y="199.99501"
+ id="text2915"><tspan
+ sodipodi:role="line"
+ id="tspan2917"
+ x="292.59851"
+ y="199.99501">XIM_SYNC</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="281.20618"
+ y="211.76923"
+ id="text2919"><tspan
+ sodipodi:role="line"
+ id="tspan2921"
+ x="281.20618"
+ y="211.76923">XIM_SYNC_REPLY</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="277.69659"
+ y="228.37003"
+ id="text2933"><tspan
+ sodipodi:role="line"
+ id="tspan2935"
+ x="277.69659"
+ y="228.37003">XIM_SET_IC_FOCUS</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="272.31775"
+ y="244.28534"
+ id="text2937"><tspan
+ sodipodi:role="line"
+ id="tspan2939"
+ x="272.31775"
+ y="244.28534">XIM_SYNC_REPLY as</tspan><tspan
+ sodipodi:role="line"
+ x="272.31775"
+ y="252.36859"
+ id="tspan2941">a reply of the </tspan><tspan
+ sodipodi:role="line"
+ x="272.31775"
+ y="260.45184"
+ id="tspan2943">XIM_FORWARD_EVENT</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="347.37851"
+ y="81.921471"
+ id="text2953"><tspan
+ sodipodi:role="line"
+ id="tspan2955"
+ x="347.37851"
+ y="81.921471">IM Server</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="358.27658"
+ y="119.92648"
+ id="text2957"><tspan
+ sodipodi:role="line"
+ id="tspan2959"
+ x="358.27658"
+ y="119.92648">synchronous</tspan><tspan
+ sodipodi:role="line"
+ x="358.27658"
+ y="128.00974"
+ id="tspan2961">request</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="358.07132"
+ y="210.28015"
+ id="text2967"><tspan
+ sodipodi:role="line"
+ id="tspan2969"
+ x="358.07132"
+ y="210.28015">processed</tspan><tspan
+ sodipodi:role="line"
+ x="358.07132"
+ y="218.3634"
+ id="tspan2971">(The focused</tspan><tspan
+ sodipodi:role="line"
+ x="358.07132"
+ y="226.44667"
+ id="tspan2973">IC is changed)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="358.03976"
+ y="238.10788"
+ id="text2975"><tspan
+ sodipodi:role="line"
+ id="tspan2977"
+ x="358.03976"
+ y="238.10788">processed</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="358.03976"
+ y="268.33426"
+ id="text2979"><tspan
+ sodipodi:role="line"
+ id="tspan2981"
+ x="358.03976"
+ y="268.33426">processed</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);display:inline"
+ d="m 264.36299,105.03516 79.29289,9.23801"
+ id="path2987"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);display:inline"
+ d="m 268.13518,142.12302 79.29289,9.23801"
+ id="path2987-1"
+ inkscape:connector-type="polyline" />
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="133.49124"
+ y="204.28122"
+ id="text2866-5"><tspan
+ sodipodi:role="line"
+ id="tspan2868-5"
+ x="133.49124"
+ y="204.28122">XSetICFocus</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="133.49124"
+ y="245.50015"
+ id="text2846-4"><tspan
+ sodipodi:role="line"
+ id="tspan2848-7"
+ x="133.49124"
+ y="245.50015">XNextEvent</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-0);display:inline"
+ d="M 81.199995,92.94869 124.20402,92.404331"
+ id="path5048"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-0);display:inline"
+ d="m 83.759014,126.12468 43.004026,-0.54436"
+ id="path5048-6"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-0-9);display:inline"
+ d="m 174.28465,99.364052 87.64112,4.899188"
+ id="path5302"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-0-9)"
+ d="m 173.9906,134.66938 87.64111,6.53226"
+ id="path5302-2"
+ inkscape:connector-type="polyline" />
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="48.236271"
+ y="192.34102"
+ id="text5618"><tspan
+ sodipodi:role="line"
+ id="tspan5620"
+ x="48.236271"
+ y="192.34102">Application moves</tspan><tspan
+ sodipodi:role="line"
+ x="48.236271"
+ y="200.42427"
+ id="tspan5622">the focus</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.58549535px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-4)"
+ d="m 402.38807,157.92589 c 61.85166,62.00083 0.1653,103.10771 0,103.2156 l -3.85389,2.11508"
+ id="path6164-3"
+ sodipodi:nodetypes="ccc" />
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="360.99832"
+ y="155.02936"
+ id="text6848"><tspan
+ sodipodi:role="line"
+ id="tspan6850"
+ x="360.99832"
+ y="155.02936">Pending</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend);display:inline"
+ d="m 295.71429,348.34463 -72.85715,25"
+ id="path4838"
+ transform="translate(47.418246,-223.55662)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend);display:inline"
+ d="m 212.14286,376.91606 -80.71429,5"
+ id="path6508"
+ transform="translate(47.418246,-223.55662)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)"
+ d="M 218.57143,426.20177 300,424.7732"
+ id="path6746"
+ transform="translate(47.418246,-223.55662)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow2Mend)"
+ d="M 299.28571,439.05892 220,438.34463"
+ id="path6748"
+ transform="translate(47.418246,-223.55662)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)"
+ d="m 220,451.91606 77.85714,9.28571"
+ id="path6750"
+ transform="translate(47.418246,-223.55662)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)"
+ d="m 220,485.48749 80.71429,7.14285"
+ id="path6752"
+ transform="translate(47.418246,-223.55662)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)"
+ d="m 140.71429,426.20177 71.42857,-2.14285"
+ id="path6754"
+ transform="translate(47.418246,-223.55662)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)"
+ d="m 78.571429,400.48749 -41.428572,1.42857"
+ id="path6758"
+ transform="translate(47.418246,-223.55662)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)"
+ d="m 136.42857,466.20177 75.71429,16.42857"
+ id="path8600"
+ transform="translate(47.418246,-223.55662)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 216.73325,9.5118041 c 0.67941,192.9537359 0.67941,192.9537359 0.67941,192.9537359 l 0,0 0,0"
+ id="path3426"
+ transform="translate(47.418246,76.438428)" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 350.47303,85.950232 c 0.67941,192.953738 0.67941,192.953738 0.67941,192.953738 l 0,0 0,0"
+ id="path3426-4" />
+ </g>
+</svg>
diff --git a/libX11/specs/XIM/sampleprotocolflow2.svg b/libX11/specs/XIM/sampleprotocolflow2.svg new file mode 100644 index 000000000..ddc866b5a --- /dev/null +++ b/libX11/specs/XIM/sampleprotocolflow2.svg @@ -0,0 +1,997 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="380.64612"
+ height="310.49246"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="sampleprotocolflow2.svg">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="Arrow1Lstart"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lstart"
+ style="overflow:visible">
+ <path
+ id="path3946"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(0.8,0,0,0.8,10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend"
+ style="overflow:visible">
+ <path
+ id="path3949"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <inkscape:perspective
+ id="perspective4399"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-6"
+ style="overflow:visible">
+ <path
+ id="path3949-6"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4427"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-1"
+ style="overflow:visible">
+ <path
+ id="path3949-1"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4455"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-9"
+ style="overflow:visible">
+ <path
+ id="path3949-69"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4483"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-5"
+ style="overflow:visible">
+ <path
+ id="path3949-4"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4483-6"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-52"
+ style="overflow:visible">
+ <path
+ id="path3949-44"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4524"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0"
+ style="overflow:visible">
+ <path
+ id="path3949-7"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4946"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective4985"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective5010"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective5254"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0-8"
+ style="overflow:visible">
+ <path
+ id="path3949-7-3"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective5282"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0-9"
+ style="overflow:visible">
+ <path
+ id="path3949-7-9"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective5512"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0-9-9"
+ style="overflow:visible">
+ <path
+ id="path3949-7-9-5"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective5540"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0-9-1"
+ style="overflow:visible">
+ <path
+ id="path3949-7-9-1"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective5568"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0-5"
+ style="overflow:visible">
+ <path
+ id="path3949-7-5"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective5598"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0-6"
+ style="overflow:visible">
+ <path
+ id="path3949-7-7"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective5632"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0-0"
+ style="overflow:visible">
+ <path
+ id="path3949-7-39"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective6084"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-0-9-3"
+ style="overflow:visible">
+ <path
+ id="path3949-7-9-6"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective6112"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-50"
+ style="overflow:visible">
+ <path
+ id="path3949-64"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective6140"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-4"
+ style="overflow:visible">
+ <path
+ id="path3949-3"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective6828"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-4-0"
+ style="overflow:visible">
+ <path
+ id="path3949-3-4"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.7"
+ inkscape:cx="190.40212"
+ inkscape:cy="129.5884"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1000"
+ inkscape:window-height="704"
+ inkscape:window-x="11"
+ inkscape:window-y="25"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-47.418246,-76.438428)">
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="46.783585"
+ y="95.48922"
+ id="text2816"><tspan
+ sodipodi:role="line"
+ id="tspan2818"
+ x="46.783585"
+ y="95.48922">Key event</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="46.783585"
+ y="127.36035"
+ id="text2820"><tspan
+ sodipodi:role="line"
+ id="tspan2822"
+ x="46.783585"
+ y="127.36035">Key event</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="145.80858"
+ y="81.978302"
+ id="text2830"><tspan
+ sodipodi:role="line"
+ id="tspan2832"
+ x="145.80858"
+ y="81.978302">Xib API</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="235.207"
+ y="81.351532"
+ id="text2834"><tspan
+ sodipodi:role="line"
+ id="tspan2836"
+ x="235.207"
+ y="81.351532">IM library</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="133.49124"
+ y="93.73336"
+ id="text2838"><tspan
+ sodipodi:role="line"
+ id="tspan2840"
+ x="133.49124"
+ y="93.73336">XNextEvent</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="133.49124"
+ y="101.95583"
+ id="text2842"><tspan
+ sodipodi:role="line"
+ id="tspan2844"
+ x="133.49124"
+ y="101.95583">XFilterEvent</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="133.49124"
+ y="127.98712"
+ id="text2846"><tspan
+ sodipodi:role="line"
+ id="tspan2848"
+ x="133.49124"
+ y="127.98712">XNextEvent</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="133.49124"
+ y="135.05867"
+ id="text2850"><tspan
+ sodipodi:role="line"
+ id="tspan2852"
+ x="133.49124"
+ y="135.05867">XFilterEvent</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="133.49124"
+ y="214.35158"
+ id="text2854"><tspan
+ sodipodi:role="line"
+ id="tspan2856"
+ x="133.49124"
+ y="214.35158">XNextEvent</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="133.49124"
+ y="222.35785"
+ id="text2858"><tspan
+ sodipodi:role="line"
+ id="tspan2860"
+ x="133.49124"
+ y="222.35785">XFilterEvent(returns False)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="133.49124"
+ y="231.28792"
+ id="text2862"><tspan
+ sodipodi:role="line"
+ id="tspan2864"
+ x="133.49124"
+ y="231.28792">XmbLookupString</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="131.33569"
+ y="156.61403"
+ id="text2866"><tspan
+ sodipodi:role="line"
+ id="tspan2868"
+ x="131.33569"
+ y="156.61403">XSetICFocus</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.63770252px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 265.78566,87.858954 266.2312,384.03836"
+ id="path2895"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.68468785px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 350.18414,88.4268 1.48726,298.16174"
+ id="path2897"
+ inkscape:connector-type="polyline" />
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="272.31775"
+ y="101.96278"
+ id="text2899"><tspan
+ sodipodi:role="line"
+ id="tspan2901"
+ x="272.31775"
+ y="101.96278">XIM_FORWARD_EVENT</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="272.31775"
+ y="123.1926"
+ id="text2903"><tspan
+ sodipodi:role="line"
+ id="tspan2905"
+ x="272.31775"
+ y="123.1926">XIM_FORWARD_EVENT</tspan><tspan
+ sodipodi:role="line"
+ x="272.31775"
+ y="131.27585"
+ id="tspan2907">or XIM_COMMIT</tspan><tspan
+ sodipodi:role="line"
+ x="272.31775"
+ y="139.35912"
+ id="tspan2909">(synchronous)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="272.31775"
+ y="160.72026"
+ id="text2911"><tspan
+ sodipodi:role="line"
+ id="tspan2913"
+ x="272.31775"
+ y="160.72026">XIM_FORWARD_EVENT</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="292.59851"
+ y="175.99501"
+ id="text2915"><tspan
+ sodipodi:role="line"
+ id="tspan2917"
+ x="292.59851"
+ y="175.99501">XIM_SYNC</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="281.20618"
+ y="197.76923"
+ id="text2919"><tspan
+ sodipodi:role="line"
+ id="tspan2921"
+ x="281.20618"
+ y="197.76923">XIM_SYNC_REPLY</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="272.31302"
+ y="218.45467"
+ id="text2923"><tspan
+ sodipodi:role="line"
+ id="tspan2925"
+ x="272.31302"
+ y="218.45467">XIM_SET_IC_FOCUS is</tspan><tspan
+ sodipodi:role="line"
+ x="272.31302"
+ y="226.53792"
+ id="tspan2927">pend because another </tspan><tspan
+ sodipodi:role="line"
+ x="272.31302"
+ y="234.62119"
+ id="tspan2929">sync cycle is started</tspan><tspan
+ sodipodi:role="line"
+ x="272.31302"
+ y="242.70444"
+ id="tspan2931">by XIM_COMMIT</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="277.69659"
+ y="260.37003"
+ id="text2933"><tspan
+ sodipodi:role="line"
+ id="tspan2935"
+ x="277.69659"
+ y="260.37003">XIM_SET_IC_FOCUS</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="272.31775"
+ y="302.28534"
+ id="text2937"><tspan
+ sodipodi:role="line"
+ id="tspan2939"
+ x="272.31775"
+ y="302.28534">XIM_SYNC_REPLY as</tspan><tspan
+ sodipodi:role="line"
+ x="272.31775"
+ y="310.36859"
+ id="tspan2941">a reply of the </tspan><tspan
+ sodipodi:role="line"
+ x="272.31775"
+ y="318.45184"
+ id="tspan2943">XIM_FORWARD_EVENT</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="277.69659"
+ y="346.37805"
+ id="text2945"><tspan
+ sodipodi:role="line"
+ id="tspan2947"
+ x="277.69659"
+ y="346.37805">XIM_SET_IC_FOCUS</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="272.31775"
+ y="376.79626"
+ id="text2949"><tspan
+ sodipodi:role="line"
+ id="tspan2951"
+ x="272.31775"
+ y="376.79626">XIM_FORWARD_EVENT</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="347.37851"
+ y="81.921471"
+ id="text2953"><tspan
+ sodipodi:role="line"
+ id="tspan2955"
+ x="347.37851"
+ y="81.921471">IM Server</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="358.27658"
+ y="119.92648"
+ id="text2957"><tspan
+ sodipodi:role="line"
+ id="tspan2959"
+ x="358.27658"
+ y="119.92648">synchronous</tspan><tspan
+ sodipodi:role="line"
+ x="358.27658"
+ y="128.00974"
+ id="tspan2961">request</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="357.9924"
+ y="153.67647"
+ id="text2963"><tspan
+ sodipodi:role="line"
+ id="tspan2965"
+ x="357.9924"
+ y="153.67647">Pending</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="358.07132"
+ y="272.28015"
+ id="text2967"><tspan
+ sodipodi:role="line"
+ id="tspan2969"
+ x="358.07132"
+ y="272.28015">processed</tspan><tspan
+ sodipodi:role="line"
+ x="358.07132"
+ y="280.3634"
+ id="tspan2971">(The focused</tspan><tspan
+ sodipodi:role="line"
+ x="358.07132"
+ y="288.44666"
+ id="tspan2973">IC is changed)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="358.03976"
+ y="300.10788"
+ id="text2975"><tspan
+ sodipodi:role="line"
+ id="tspan2977"
+ x="358.03976"
+ y="300.10788">processed</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="358.03976"
+ y="332.33426"
+ id="text2979"><tspan
+ sodipodi:role="line"
+ id="tspan2981"
+ x="358.03976"
+ y="332.33426">processed</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="358.03976"
+ y="356.72079"
+ id="text2983"><tspan
+ sodipodi:role="line"
+ id="tspan2985"
+ x="358.03976"
+ y="356.72079">processed</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);display:inline"
+ d="m 264.36299,105.03516 79.29289,9.23801"
+ id="path2987"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);display:inline"
+ d="m 268.13518,142.12302 79.29289,9.23801"
+ id="path2987-1"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);display:inline"
+ d="m 269.52088,163.9863 79.29289,9.23801"
+ id="path2987-1-9"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);display:inline"
+ d="m 269.05898,262.06314 79.29289,9.238"
+ id="path2987-1-9-7"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);display:inline"
+ d="m 270.13675,321.80224 79.29289,9.23801"
+ id="path2987-1-9-7-2"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);display:inline"
+ d="m 270.13675,348.74643 79.29289,9.23801"
+ id="path2987-1-9-7-1"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);display:inline"
+ d="m 269.82882,357.06063 79.29289,9.23801"
+ id="path2987-1-9-7-1-2"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-0)"
+ d="m 341.34638,128.13018 -71.59455,48.49953"
+ id="path4544"
+ inkscape:connector-type="polyline" />
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="133.49124"
+ y="264.28122"
+ id="text2866-5"><tspan
+ sodipodi:role="line"
+ id="tspan2868-5"
+ x="133.49124"
+ y="264.28122">XSetICFocus</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="214.78569"
+ y="171.39485"
+ id="text4963"><tspan
+ sodipodi:role="line"
+ id="tspan4965"
+ x="214.78569"
+ y="171.39485">Pending until</tspan><tspan
+ sodipodi:role="line"
+ x="214.78569"
+ y="179.4781"
+ id="tspan4967">sync cycle is </tspan><tspan
+ sodipodi:role="line"
+ x="214.78569"
+ y="187.56137"
+ id="tspan4969">done</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="47.269844"
+ y="147.68396"
+ id="text4971"><tspan
+ sodipodi:role="line"
+ id="tspan4973"
+ x="47.269844"
+ y="147.68396">Button press causes</tspan><tspan
+ sodipodi:role="line"
+ x="47.269844"
+ y="155.76721"
+ id="tspan4975">focus change</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="58.639027"
+ y="305.18289"
+ id="text2820-7"><tspan
+ sodipodi:role="line"
+ id="tspan2822-8"
+ x="58.639027"
+ y="305.18289">Key event</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="141.03561"
+ y="303.50015"
+ id="text2846-4"><tspan
+ sodipodi:role="line"
+ id="tspan2848-7"
+ x="141.03561"
+ y="303.50015">XNextEvent</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="141.03561"
+ y="312.12228"
+ id="text2850-0"><tspan
+ sodipodi:role="line"
+ id="tspan2852-5"
+ x="141.03561"
+ y="312.12228">XFilterEvent</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-0);display:inline"
+ d="M 81.199995,92.94869 124.20402,92.404331"
+ id="path5048"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-0);display:inline"
+ d="m 83.759014,126.12468 43.004026,-0.54436"
+ id="path5048-6"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.47733891px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-0);display:inline"
+ d="m 93.961564,154.29857 33.267186,-0.55213"
+ id="path5048-6-8"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-0-9);display:inline"
+ d="m 174.28465,99.364052 87.64112,4.899188"
+ id="path5302"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-0-9)"
+ d="m 173.9906,134.66938 87.64111,6.53226"
+ id="path5302-2"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-0-9)"
+ d="m 173.30399,155.50805 87.64112,6.53226"
+ id="path5302-2-7"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-0);display:inline"
+ d="m 349.43674,176.36427 -78.8013,16.6288"
+ id="path4544-3"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-0);display:inline"
+ d="m 264.3103,194.20137 -78.8013,16.6288"
+ id="path4544-3-2"
+ inkscape:connector-type="polyline" />
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="56.236271"
+ y="254.34102"
+ id="text5618"><tspan
+ sodipodi:role="line"
+ id="tspan5620"
+ x="56.236271"
+ y="254.34102">Application moves</tspan><tspan
+ sodipodi:role="line"
+ x="56.236271"
+ y="262.42429"
+ id="tspan5622">the focus</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.47733891px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Lstart);marker-end:none;display:inline"
+ d="m 97.227685,228.25112 33.267185,-0.55213"
+ id="path5048-6-8-8"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-0-9);display:inline"
+ d="m 180.54474,262.43681 84.64716,-0.31069"
+ id="path5302-2-7-2"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);display:inline"
+ d="m 182.81773,303.5919 78.56369,15.14712"
+ id="path2987-1-9-7-1-0"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.53888369px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);display:inline"
+ d="m 182.83763,311.31095 79.08814,42.81112"
+ id="path2987-1-9-7-1-0-3"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.5115177px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-4)"
+ d="m 258.76887,219.70748 c -40.77117,71.79102 -0.10897,119.38886 0,119.51377 l 2.18035,2.44906"
+ id="path6164"
+ sodipodi:nodetypes="ccc" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.6913743px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-4)"
+ d="m 400.28515,175.83598 c 61.64296,86.74506 0.16474,144.25751 0,144.40845 l -3.84089,2.9592"
+ id="path6164-3"
+ sodipodi:nodetypes="ccc" />
+ <text
+ xml:space="preserve"
+ style="font-size:6.46660471px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="360.99832"
+ y="175.02936"
+ id="text6848"><tspan
+ sodipodi:role="line"
+ id="tspan6850"
+ x="360.99832"
+ y="175.02936">Pending</tspan></text>
+ </g>
+</svg>
diff --git a/libX11/specs/XIM/staticflow.svg b/libX11/specs/XIM/staticflow.svg new file mode 100644 index 000000000..43f536425 --- /dev/null +++ b/libX11/specs/XIM/staticflow.svg @@ -0,0 +1,278 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="575.96063"
+ height="263.90292"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="staticflow.svg">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend"
+ style="overflow:visible">
+ <path
+ id="path3695"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.7"
+ inkscape:cx="217.60452"
+ inkscape:cy="127.64289"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ units="pt"
+ inkscape:window-width="551"
+ inkscape:window-height="483"
+ inkscape:window-x="0"
+ inkscape:window-y="262"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-21.177732,-766.10217)">
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="120"
+ y="775.21936"
+ id="text2816"><tspan
+ sodipodi:role="line"
+ id="tspan2818"
+ x="120"
+ y="775.21936">IM Library</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="362.28571"
+ y="775.79077"
+ id="text2820"><tspan
+ sodipodi:role="line"
+ id="tspan2822"
+ x="362.28571"
+ y="775.79077">IM Server</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="19.999998"
+ y="825.79077"
+ id="text2824"><tspan
+ sodipodi:role="line"
+ id="tspan2826"
+ x="19.999998"
+ y="825.79077">Keys in the on-key-list</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="22.571426"
+ y="871.21936"
+ id="text2828"><tspan
+ sodipodi:role="line"
+ id="tspan2830"
+ x="22.571426"
+ y="871.21936">event mask is changed</tspan><tspan
+ sodipodi:role="line"
+ x="22.571426"
+ y="886.21936"
+ id="tspan2832">to deselect the event</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="31.14286"
+ y="993.21936"
+ id="text2834"><tspan
+ sodipodi:role="line"
+ id="tspan2836"
+ x="31.14286"
+ y="993.21936">event mask is changed</tspan><tspan
+ sodipodi:role="line"
+ x="31.14286"
+ y="1008.2194"
+ id="tspan2838">to select the event</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="208.14133"
+ y="832.36218"
+ id="text2840"><tspan
+ sodipodi:role="line"
+ id="tspan2842"
+ x="208.14133"
+ y="832.36218">XIM_FORWARD_EVENT</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="192.85715"
+ y="863.79077"
+ id="text2844"><tspan
+ sodipodi:role="line"
+ id="tspan2846"
+ x="192.85715"
+ y="863.79077">XIM_EXT_SET_EVENT_MASK</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="206.84494"
+ y="876.07648"
+ id="text2848"><tspan
+ sodipodi:role="line"
+ id="tspan2850"
+ x="206.84494"
+ y="876.07648"
+ style="font-size:10px">intercept-event-mask is set</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="192.85715"
+ y="994.36218"
+ id="text2852"><tspan
+ sodipodi:role="line"
+ id="tspan2854"
+ x="192.85715"
+ y="994.36218">XIM_EXT_SET_EVENT_MASK</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="214.70139"
+ y="1007.5051"
+ id="text2856"><tspan
+ sodipodi:role="line"
+ id="tspan2858"
+ x="214.70139"
+ y="1007.5051"
+ style="font-size:10px">select-event-mask is set</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="419.71429"
+ y="875.21936"
+ id="text2860"><tspan
+ sodipodi:role="line"
+ id="tspan2862"
+ x="419.71429"
+ y="875.21936">event mask is changed</tspan><tspan
+ sodipodi:role="line"
+ x="419.71429"
+ y="890.21936"
+ id="tspan2864">to select the event</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="418.85712"
+ y="925.21936"
+ id="text2866"><tspan
+ sodipodi:role="line"
+ id="tspan2868"
+ x="418.85712"
+ y="925.21936">X events directly come</tspan><tspan
+ sodipodi:role="line"
+ x="418.85712"
+ y="940.21936"
+ id="tspan2870">to the IM Server</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="422.85712"
+ y="964.07648"
+ id="text2872"><tspan
+ sodipodi:role="line"
+ id="tspan2874"
+ x="422.85712"
+ y="964.07648">when preediting is turned off</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="423.42859"
+ y="996.64789"
+ id="text2876"><tspan
+ sodipodi:role="line"
+ id="tspan2878"
+ x="423.42859"
+ y="996.64789">event mask is changed</tspan><tspan
+ sodipodi:role="line"
+ x="423.42859"
+ y="1011.6479"
+ id="tspan2880">to deselect the event</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 181.42857,780.93364 c 0,239.99996 0,248.57146 0,248.57146"
+ id="path2882" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 367.14286,783.21935 c 0,244.28575 0,242.85715 0,242.85715"
+ id="path2884" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Lend)"
+ d="m 92.857143,77.142857 79.999997,0"
+ id="path2886"
+ transform="translate(0,752.36221)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 192.85714,82.857143 162.85715,1.428571"
+ id="path2888"
+ transform="translate(0,752.36221)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 352.85714,94.285714 -160,1.428572"
+ id="path2890"
+ transform="translate(0,752.36221)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);display:inline"
+ d="m 335.71429,220 -138.57143,0"
+ id="path2892"
+ transform="translate(0,752.36221)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 472.85714,154.28571 -58.57143,-1.42857"
+ id="path2915"
+ transform="translate(0,752.36221)"
+ inkscape:connector-type="polyline" />
+ </g>
+</svg>
diff --git a/libX11/specs/XIM/staticflowsampleseq.svg b/libX11/specs/XIM/staticflowsampleseq.svg new file mode 100644 index 000000000..3b49716ff --- /dev/null +++ b/libX11/specs/XIM/staticflowsampleseq.svg @@ -0,0 +1,400 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="502.63379"
+ height="290.44269"
+ id="svg4341"
+ version="1.1"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="staticflowsampleseq.svg">
+ <defs
+ id="defs4343">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective4349" />
+ <inkscape:perspective
+ id="perspective4272"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend"
+ style="overflow:visible">
+ <path
+ id="path3695"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker4278"
+ style="overflow:visible">
+ <path
+ id="path4280"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker4282"
+ style="overflow:visible">
+ <path
+ id="path4284"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker4286"
+ style="overflow:visible">
+ <path
+ id="path4288"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker4290"
+ style="overflow:visible">
+ <path
+ id="path4292"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="marker4294"
+ style="overflow:visible">
+ <path
+ id="path4296"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective2877"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-3"
+ style="overflow:visible">
+ <path
+ id="path3695-7"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective2905"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-31"
+ style="overflow:visible">
+ <path
+ id="path3695-4"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.7"
+ inkscape:cx="310.98032"
+ inkscape:cy="88.727691"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="677"
+ inkscape:window-height="660"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata4346">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-64.019684,-330.64719)">
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="162.84195"
+ y="339.76437"
+ id="text2816"><tspan
+ sodipodi:role="line"
+ id="tspan2818"
+ x="162.84195"
+ y="339.76437">IM Library</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="405.12766"
+ y="340.33578"
+ id="text2820"><tspan
+ sodipodi:role="line"
+ id="tspan2822"
+ x="405.12766"
+ y="340.33578">IM Server</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="62.841949"
+ y="390.33578"
+ id="text2824"><tspan
+ sodipodi:role="line"
+ id="tspan2826"
+ x="62.841949"
+ y="390.33578">Keys in the on-key-list</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="235.6991"
+ y="428.33578"
+ id="text2844"><tspan
+ sodipodi:role="line"
+ id="tspan2846"
+ x="235.6991"
+ y="428.33578">XIM_EXT_SET_EVENT_MASK</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="249.68689"
+ y="440.62149"
+ id="text2848"><tspan
+ sodipodi:role="line"
+ id="tspan2850"
+ x="249.68689"
+ y="440.62149"
+ style="font-size:10px">intercept-event-mask is set</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="235.6991"
+ y="556.90723"
+ id="text2852"><tspan
+ sodipodi:role="line"
+ id="tspan2854"
+ x="235.6991"
+ y="556.90723">XIM_EXT_SET_EVENT_MASK</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="257.54333"
+ y="570.05017"
+ id="text2856"><tspan
+ sodipodi:role="line"
+ id="tspan2858"
+ x="257.54333"
+ y="570.05017"
+ style="font-size:10px">select-event-mask is set</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1.05025411px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 224.27052,345.53018 c 0,264.72805 0,274.18271 0,274.18271"
+ id="path2882" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1.05972767px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 409.98481,347.82588 c 0,274.33848 0,272.73413 0,272.73413"
+ id="path2884" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Lend)"
+ d="m 135.6991,394.05008 79.99999,0"
+ id="path2886"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 235.69909,399.76437 162.85715,1.42857"
+ id="path2888"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 395.69909,411.19294 -160,1.42857"
+ id="path2890"
+ inkscape:connector-type="polyline" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="245.44826"
+ y="392.26437"
+ id="text2854"><tspan
+ sodipodi:role="line"
+ id="tspan2856"
+ x="245.44826"
+ y="392.26437">XIM_FORWARD_EVENT</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 391.16254,531.97868 -150,-1.42858"
+ id="path3892"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 495.16254,523.40725 -68.57143,-1.42857"
+ id="path3894"
+ inkscape:connector-type="polyline" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="80.571426"
+ y="444.21933"
+ id="text4489"><tspan
+ sodipodi:role="line"
+ id="tspan4491"
+ x="80.571426"
+ y="444.21933">the specified events</tspan><tspan
+ sodipodi:role="line"
+ x="80.571426"
+ y="459.21933"
+ id="tspan4493">are being filtered</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="76.571426"
+ y="517.36218"
+ id="text4495"><tspan
+ sodipodi:role="line"
+ id="tspan4497"
+ x="76.571426"
+ y="517.36218">Keys in the off-key-list</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="71.428574"
+ y="596.79077"
+ id="text4499"><tspan
+ sodipodi:role="line"
+ id="tspan4501"
+ x="71.428574"
+ y="596.79077">the specified events</tspan><tspan
+ sodipodi:role="line"
+ x="71.428574"
+ y="611.79077"
+ id="tspan4503">are being processed</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="434.57144"
+ y="394.64789"
+ id="text4505"><tspan
+ sodipodi:role="line"
+ id="tspan4507"
+ x="434.57144"
+ y="394.64789">Keys in the on-key-list</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="435.42691"
+ y="444.21933"
+ id="text4513"><tspan
+ sodipodi:role="line"
+ id="tspan4515"
+ x="435.42691"
+ y="444.21933">the specified events</tspan><tspan
+ sodipodi:role="line"
+ x="435.42691"
+ y="459.21933"
+ id="tspan4517">are being processed</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="434.57144"
+ y="517.36218"
+ id="text4519"><tspan
+ sodipodi:role="line"
+ id="tspan4521"
+ x="434.57144"
+ y="517.36218">Keys in the off-key-list</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="435.42691"
+ y="596.79077"
+ id="text4523"><tspan
+ sodipodi:role="line"
+ id="tspan4525"
+ x="435.42691"
+ y="596.79077">the specified events</tspan><tspan
+ sodipodi:role="line"
+ x="435.42691"
+ y="611.79077"
+ id="tspan4527">are being discarded</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="m 488.85714,401.78486 -68.57143,-1.42857"
+ id="path3894-2"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Lend)"
+ d="m 131.14286,526.6479 79.99999,0"
+ id="path2886-9"
+ inkscape:connector-type="polyline" />
+ </g>
+</svg>
diff --git a/libX11/specs/XIM/xim.ms b/libX11/specs/XIM/xim.ms deleted file mode 100644 index 08bf637b4..000000000 --- a/libX11/specs/XIM/xim.ms +++ /dev/null @@ -1,4299 +0,0 @@ -.\" To print this out, type tbl macros.t ThisFile | troff -ms -.EH '''' -.OH '''' -.EF '''' -.OF '''' -.ps 11 -.nr PS 11 -\& -.sp 8 -.TL -\s+3\fBThe Input Method Protocol\fP\s-3 -.sp -\fBVersion 1.0\fP -.sp -\fBX Consortium Standard\fP -.sp -\fBX Version 11, Release 7\fP -.sp -\fB\*(xV\fP -.sp 3 -.AU -Masahiko Narita -.AI -FUJITSU Limited. -.AU -Hideki Hiura -.AI -SunSoft, Inc. -.sp 3 -.AB -.LP -This specifies a protocol between IM library and IM (Input Method) -Server for internationalized text input, which is independent from -any specific language, any specific input method and the transport layer -used in communication between the IM library and the IM Server, and uses -a client-server model. -This protocol allows user to use his/her favorite input method for all -applications within the stand-alone distributed environment. -.AE -.ce 0 -.br -\& -.LP -.ps 11 -.nr PS 11 -.bp -\& -.ps 9 -.nr PS 9 -.sp 8 -.LP -.DS C -X Window System is a trademark of X Consortium, Inc. -.sp -Copyright \(co 1993, 1994 by X Consortium, Inc. -.DE -.sp 2 -.LP -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: -.LP -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. -.LP -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 X CONSORTIUM 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. -.LP -Except as contained in this notice, the name of the X Consortium shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the X Consortium. -.sp 3 -.DS C -Copyright \(co 1993, 1994 by FUJITSU LIMITED -.DE -.sp 2 -.LP -Permission to use, copy, modify, and distribute this documentation -for any purpose and without fee is hereby granted, provided -that the above copyright notice and this permission -notice appear in all copies. -Fujitsu and Sun Microsystems make no representations -about the suitability for any purpose of the information in this document. -This documentation is provided as is without express or implied warranty. -.sp 3 -.DS C -Copyright \(co 1993, 1994 by Sun Microsystems, Inc. -.DE -.sp 2 -.LP -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: -.LP -The above copyright notice and this permission notice (including the next -paragraph) shall be included in all copies or substantial portions of the -Software. -.LP -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. -.ps 11 -.nr PS 11 -.bp 1 -.EH '\fBX Input Method Protocol\fP''\fB\*(xV\fP' -.OH '\fBX Input Method Protocol\fP''\fB\*(xV\fP' -.EF ''\fB % \fP'' -.OF ''\fB % \fP'' -.NH 1 -Introduction -.XS -\*(SN Introduction -.XE -.NH 2 -Scope -.XS -\*(SN Scope -.XE -.LP -The internationalization in the -X Window System -Version 11, Release 5 (X11R5) provides a common API which application -developers can use to create portable internationalized programs and to -adapt them to the requirements of different native languages, local customs, -and character string encodings (this is called ``localization''). -As one of its internationalization mechanisms X11R5 has defined a functional -interface for internationalized text input, called XIM (X Input Method). -.LP -When a client-server model is used with an IM (Input Method) implementation, -a protocol must be established between the client and the server. -However, the protocol used to interface Input Method Servers (IM Servers) -with the Input Method libraries (IM libraries) to which applications are -linked was not addressed in X11R5. -This led application developers to depend on vendor-specific input methods, -decreased the user's choice of available input methods, and made it more -difficult for developers to create portable applications. This paper describes -the Input Method Protocol developed for X11R6 to resolve the above problems -and to address the requirements of existing and future input methods. -.LP -The Input Method Protocol is independent from the transport layer used in -communication between the IM library and the IM Server. -Thus, the input method protocol can be built on any inter-process -communication mechanism, such as TCP/IP or the X protocol. -.LP -In addition, the protocol provides for future extensions such as differing -input model types. -.LP -.NH 2 -Background -.XS -\*(SN Background -.XE -.LP -Text input is much more simple for some languages than -others. English, for instance, uses an alphabet of a manageable size, -and input consists of pressing the corresponding key on a keyboard, -perhaps in combination with a shift key for capital letters or special -characters. -.LP -Some languages have larger alphabets, or modifiers such as accents, -which require the addition of special key combinations in order to enter -text. These input methods may require ``dead-keys'' or ``compose-keys'' -which, when followed by different combinations of key strokes, -generate different characters. -.LP -Text input for ideographic languages is much less simple. In these -languages, characters represent actual objects rather than phonetic -sounds used in pronouncing a word, and the number of characters -in these languages may continue to grow. In Japanese, for instance, most -text input methods involve entering characters in a phonetic alphabet, -after which the input method searches a dictionary for possible -ideographic equivalents (of which there may be many). The input method then -presents the candidate characters for the user to choose from. -.LP -In Japanese, either Kana (phonetic symbols) or Roman letters are -typed and then a region is selected for conversion to Kanji. Several -Kanji characters may have the same phonetic representation. If that -is the case with the string entered, a menu of characters is presented -and the user must choose the appropriate one. If no choice is necessary -or a preference has been established, the input method does the -substitution directly. -.LP -These complicated input methods must present state information (Status Area), -text entry and edit space (Preedit Area), and menu/choice presentations -(Auxiliary Area). Much of the protocol between the IM library and the IM -Server involves managing these IM areas. -Because of the size and complexity of these input methods, and because -of how widely they vary from one language or locale to another, they are -usually implemented as separate processes which can serve many client -processes on the same computer or network. -.LP -.NH 2 -Input Method Styles -.XS -\*(SN Input Method Styles -.XE -.LP -X11 internationalization support includes the following four types of -input method: -.RS -.IP "- on-the-spot:" 20 -The client application is directed by the IM Server to display all -pre-edit data at the site of text insertion. The client registers -callbacks invoked by the input method during pre-editing. -.IP "- off-the-spot:" 20 -The client application provides display windows for the pre-edit data -to the input method which displays into them directly. -.IP "- over-the-spot:" 20 -The input method displays pre-edit data in a window which it brings up -directly over the text insertion position. -.IP "- root-window:" 20 -The input method displays all pre-edit data in a separate area of the -screen in a window specific to the input method. -.RE -.LP -Client applications must choose from the available input methods -supported by the IM Server and provide the display areas and callbacks -required by the input method. -.LP -.NH 1 -Architecture -.XS -\*(SN Architecture -.XE -.NH 2 -Implementation Model -.XS -\*(SN Implementation Model -.XE -.LP -Within the X Window System environment, the following two typical -architectural models can be used as an input method's implementation -model. -.RS -.IP "- Client/Server model:" 20 -A separate process, the IM Server, processes input and handles preediting, -converting, and committing. The IM library within the application, acting -as client to the IM Server, simply receives the committed string from the -IM Server. -.IP "- Library model:" 20 -All input is handled by the IM library within the application. The -event process is closed within the IM library and a separate IM Server -process may not be required. -.RE -.LP -Most languages which need complex preediting, such as Asian languages, -are implemented using the Client/Server IM model. Other languages -which need only dead key or compose key processing, such as European -languages, are implemented using the Library model. -.LP -In this paper, we discuss mainly the Client/Server IM model and the -protocol used in communication between the IM library (client) and the IM -Server. -.LP -.NH 2 -Structure of IM -.XS -\*(SN Structure of IM -.XE -.LP -When the client connects or disconnects to the IM Server, an open or close -operation occurs between the client and the IM Server. -.LP -The IM can be specified at the time of XOpenIM() by setting the locale -of the client and a locale modifier. Since the IM remembers -the locale at the time of creation XOpenIM() can be called -multiple times (with the -setting for the locale and the locale modifier changed) to support -multiple languages. -.LP -In addition, the supported IM type can be obtained using XGetIMValues(). -.LP -The client usually holds multiple input (text) fields. Xlib provides a -value type called the ``Input Context'' (IC) to manage each individual -input field. An IC can be created by specifying XIM using XCreateIC(), -and it can be destroyed using XDestroyIC(). -.LP -The IC can specify the type of IM which is supported by XIM for each -input field, so each input field can handle a different type of IM. -.LP -Most importantly information such as the committed string sent from -the IM Server to the client, is exchanged based on each IC. -.LP -Since each IC corresponds to an input field, the focused input field -should be announced to the IM Server using XSetICFocus(). (XUnsetICFocus() -can also be used to change the focus.) -.LP -.NH 2 -Event Handling Model -.XS -\*(SN Event Handling Model -.XE -.LP -Existing input methods support either the FrontEnd method, the BackEnd method, -or both. This protocol specifically supports the BackEnd method as -the default method, but also supports the FrontEnd method as an optional -IM Server extension. -.LP -The difference between the FrontEnd and BackEnd methods is in how -events are delivered to the IM Server. (Fig. 1) -.LP -.NH 3 -BackEnd Method -.XS -\*(SN BackEnd Method -.XE -.LP -In the BackEnd method, client window input events are always delivered -to the IM library, which then passes them to the IM Server. Events are -handled serially in the order delivered, and therefore there is no -synchronization problem between the IM library and the IM Server. -.LP -Using this method, the IM library forwards all KeyPress and KeyRelease -events to the IM Server (as required by the Event Flow Control model -described in section 2.4. ``Event Flow Control''), and synchronizes -with the IM Server (as described in section 4.16. ``Filtering Events''). -.LP -.NH 3 -FrontEnd Method -.XS -\*(SN FrontEnd Method -.XE -.LP -In the FrontEnd method, client window input events are delivered by the -X server directly to both the IM Server and the IM library. Therefore this -method provides much better interactive performance while preediting -(particularly in cases such as when the IM Server is running locally on -the user's workstation and the client application is running on another -workstation over a relatively slow network). -.LP -However, the FrontEnd model may have synchronization problems between -the key events handled in the IM Server and other events handled in the -client, and these problems could possibly cause the loss or duplication -of key events. For this reason, the BackEnd method is the core method -supported, and the FrontEnd method is made available as an extension for -performance purposes. (Refer to Appendix A for more information.) -.LP -.LP -.bp -\^... 0.05 6.513 4.737 10.45 -\^... 0.000i 3.937i 4.687i 0.000i -.nr 00 \n(.u -.nf -.PS 3.937i 4.687i -.br -.ps -.ps 10 -\h'3.687i'\v'3.437i'\v'-.13m'\L'-0.500i\(br'\v'.13m' -.sp -1 -\h'3.712i'\v'3.037i'\D'l-0.025i -0.100i' -.sp -1 -\h'3.687i'\v'2.937i'\D'l-0.025i 0.100i' -.sp -1 -\h'2.187i'\v'1.938i'\v'-.13m'\L'-0.750i\(br'\v'.13m' -.sp -1 -\h'2.187i'\v'1.188i'\l'0.750i' -.sp -1 -\h'2.937i'\v'1.188i'\v'-.13m'\L'1.250i\(br'\v'.13m' -.sp -1 -\h'2.912i'\v'2.338i'\D'l0.025i 0.100i' -.sp -1 -\h'2.937i'\v'2.438i'\D'l0.025i -0.100i' -.sp -1 -\h'2.187i'\v'3.437i'\v'-.13m'\L'-1.499i\(br'\v'.13m' -.sp -1 -\h'2.212i'\v'2.038i'\D'l-0.025i -0.100i' -.sp -1 -\h'2.187i'\v'1.938i'\D'l-0.025i 0.100i' -.sp -1 -\h'1.938i'\v'3.437i'\l'1.999i' -.sp -1 -\h'3.937i'\v'3.437i'\v'-.13m'\L'0.500i\(br'\v'.13m' -.sp -1 -\h'3.937i'\v'3.937i'\l'-1.999i' -.sp -1 -\h'1.938i'\v'3.937i'\v'-.13m'\L'-0.500i\(br'\v'.13m' -.sp -1 -\h'2.562i'\v'2.438i'\l'2.125i' -.sp -1 -\h'4.687i'\v'2.438i'\v'-.13m'\L'0.499i\(br'\v'.13m' -.sp -1 -\h'4.687i'\v'2.937i'\l'-2.125i' -.sp -1 -\h'2.562i'\v'2.937i'\v'-.13m'\L'-0.499i\(br'\v'.13m' -.sp -1 -\h'2.562i'\v'1.438i'\l'1.313i' -.sp -1 -\h'3.875i'\v'1.438i'\v'-.13m'\L'0.437i\(br'\v'.13m' -.sp -1 -\h'3.875i'\v'1.875i'\l'-1.313i' -.sp -1 -\h'2.562i'\v'1.875i'\v'-.13m'\L'-0.437i\(br'\v'.13m' -.sp -1 -\h'1.938i'\v'0.438i'\l'1.999i' -.sp -1 -\h'3.937i'\v'0.438i'\v'-.13m'\L'1.500i\(br'\v'.13m' -.sp -1 -\h'3.937i'\v'1.938i'\l'-1.999i' -.sp -1 -\h'1.938i'\v'1.938i'\v'-.13m'\L'-1.500i\(br'\v'.13m' -.sp -1 -\D'l0.000i 0.000i' -.sp -1 -.ps -.ps 12 -\h'3.812i'\v'3.217i'\h'-0.0m'\v'0.2m'FrontEnd Method (Extension) -.sp -1 -\h'0.813i'\v'3.217i'\h'-0.0m'\v'0.2m'BackEnd Method (Core) -.sp -1 -\h'2.562i'\v'3.779i'\h'-0.0m'\v'0.2m'X Server -.sp -1 -\h'3.062i'\v'2.779i'\h'-0.0m'\v'0.2m'IM Server -.sp -1 -\h'3.062i'\v'1.717i'\h'-0.0m'\v'0.2m'Library -.sp -1 -\h'2.187i'\v'0.904i'\h'-0.0m'\v'0.2m'Application -.sp -1 -.ps -.ft -.sp 1+3.937i -.PE -.if \n(00 .fi -.ce -.sp -Fig.1 The Flow of Events -.LP -.NH 2 -Event Flow Control -.XS -\*(SN Event Flow Control -.XE -.LP -This protocol supports two event flow models for communication between the -IM library and the IM Server (Static and Dynamic). -.LP -Static Event Flow requires that input events always be sent to the IM -Server from the client. -.LP -Dynamic Event Flow, however, requires only that those input events which -need to be processed (converted) be sent to the IM Server from the client. -.LP -For instance, in the case of inputing a combination of ASCII characters -and Chinese characters, ASCII characters do not need to be processed in -the IM Server, so their key events do not have to be sent to the IM -Server. On the other hand, key events necessary for composing Chinese -characters must be sent to the IM Server. -.LP -Thus, by adopting the Dynamic Event Flow, the number of requests among the -X Server, the client, and the IM Server is significantly reduced, and the -number of context switches is also reduced, resulting in improved performance. -The IM Server can send -.PN XIM_REGISTER_TRIGGERKEYS -message in order to switch the event flow in the Dynamic Event Flow. -.LP -The protocol for this process is described in section 4.5. ``Event Flow -Control''. -.LP -.NH 1 -Default Preconnection Convention -.XS -\*(SN Default Preconnection Convention -.XE -.LP -IM Servers are strongly encouraged to register their symbolic -names as the ATOM names into the IM Server directory property, -.PN XIM_SERVERS, -on the root window of the screen_number 0. -This property can contain a list of ATOMs, and the each ATOM represents -each possible IM Server. -IM Server names are restricted to POSIX Portable Filename Character Set. -To discover if the IM Server is active, see if there is an owner for -the selection with that atom name. To learn the address of that IM Server, -convert the selection target -.PN TRANSPORT, -which will return a string form of the transport address(es). -To learn the supported locales of that IM Server, convert the selection target -.PN LOCALES, -which will return a set of names of the supported locales in the syntax -X/Open defines. -.LP -The basic semantics to determine the IM Server if there are -multiple ATOMs are found in -.PN XIM_SERVERS -property, is first fit if the IM Server name is not given as -a X modifier's category -.PN im. -.LP -The address information retrievable from the -.PN TRANSPORT -target is a transport-specific name. -The preregistered formats for transport-specific names are listed in Appendix B. -Additional transport-specific names may be registered with X Consortium. -.LP -For environments that lack X connections, or for IM Servers which -do not use the X Window System, the preconnection convention with IM Server -may be given outside the X Window system (e.g. using a Name Service). -.LP -.NH 1 -Protocol -.XS -\*(SN Protocol -.XE -.LP -The protocol described below uses the bi-directional -synchronous/asynchronous request/reply/error model and is specified -using the same conventions outlined in Section 2 of the core X Window -System protocol [1]: -.LP -.NH 2 -Basic Requests Packet Format -.XS -\*(SN Basic Requests Packet Format -.XE -.LP -This section describes the requests that may be exchanged between the client -and the IM Server. -.LP -The basic request packet header format is as follows. -.RS -.DS - major-opcode: CARD8 - minor-opcode: CARD8 - length: CARD16 -.DE -.RE -The MAJOR-OPCODE specifies which core request or extension package this -packet represents. If the MAJOR-OPCODE corresponds to a core request, -the MINOR-OPCODE contains 8 bits of request-specific data. -(If the MINOR-OPCODE is not used, it is 0.) -Otherwise, the MAJOR-OPCODE and the MINOR-OPCODE are specified by -.PN XIM_QUERY_EXTENSION -message. (Refer to 4.7. Query the supported extension protocol list.) -The LENGTH field specifies the number of 4 bytes elements following the -header. If no additional data is followed by the header, the LENGTH field -will be 0. -.LP -.NH 2 -Data Types -.XS -\*(SN Data Types -.XE -.LP -The following data types are used in the core X IM Server protocol: -.LP -.nf -.ta .2i .5i 2.0i -BITMASK16 - CARD16 -.sp -BITMASK32 - CARD32 -.sp -PADDING FORMAT - Where N is some expression, and Pad(N) is the number of bytes needed to round N up to a - multiple of four. - Pad(N) = (4 - (N mod 4)) mod 4 -.sp -LPCE - 1 A character from the4 X Portable Character Set in Latin Portable - Character Encoding -.bp -STRING - 2 n length of string in bytes - n LISTofLPCE string - p unused, p=Pad(2+n) -.sp -STR - 1 n length of name in bytes - n STRING8 name -.sp -XIMATTR - 2 CARD16 attribute ID (*1) - 2 CARD16 type of the value (*2) - 2 n length of im-attribute - n STRING8 im-attribute - p unused, p = Pad(2+n) -.sp -The im-attribute argument specifies XIM values such as XNQueryInputStyle. -.sp -XICATTR - 2 CARD16 attribute ID (*1) - 2 CARD16 type of the value (*2) - 2 n length of ic-attribute - n STRING8 ic-attribute - p unused, p = Pad(2+n) -.LP -.IP (*1) -XIMATTR and XICATTR are used during the setup stage and XIMATTRIBUTE and -XICATTRIBUTE are used after each attribute ID has been recognized by -the IM Server and the IM library. -.sp -.IP (*2) -The value types are defined as follows: -.TS H -tab(:); -l l l s s -l l l l l -l l l l l -l l l l l -l l l l l -l l l l l -l l l l l -l l l l l -l l l l l -l l l l l -l l l l l -l l l l l -l l l l l -l l l l l -l l l l l -l l l l l -l l l l l -l l l l l -l l l l l -l l l l l -l l l l l -l l l l l -l l l s s -l l l s s -l l l s s -l l l s s -l l l s s -l l l l l. -_ -.sp 6p -.B -values:data:format -.sp 6p -_ -.sp 6p -.TH -.R -#0:Separator of NestedList:----- (*3) -#1:byte data:CARD8 -#2:word data:CARD16 -#3:long data:CARD32 -#4:char data:STRING8 -#5:Window:CARD32 -#10:XIMStyles:2:n:number of XIMStyle list -::2::unused -::n:CARD32:XIMStyle list -#11:XRectangle:2:INT16:X -::2:INT16:Y -::2:CARD16:width -::2:CARD16:height -#12:XPoint:2:INT16:X -::2:INT16:Y -#13:XFontSet:2:n:length of Base font name -::n:STRING8:Base font name list -::p::unused, p = Pad(2+n) -#15:XIMHotKeyTriggers:4:n:T{ -number of XIMTRIGGERKEY list (*4) -T} -::n:XIMTRIGGERKEY:XIMHotkeyTrigger list -#16:XIMHotKeyState::XIMHOTKEYSTATE:T{ -HotKey processing state -T} -#17:XIMStringConversion:XIMSTRCONVTEXT -#18:XIMPreeditState:XIMPREEDITSTATE -#19:XIMResetState:XIMRESETSTATE -#x7fff:NestedList:----- -.sp 6p -_ -.TE -.LP -.IP (*3) -The IC value for the separator of NestedList is defined as follows, -.br - #define XNSeparatorofNestedList ``separatorofNestedList'' -.br -, which is registered in X Consortium and cannot be used for any -other purpose. -.sp -.IP (*4) -LISTofFOO -.RS -A Type name of the form LISTof FOO means a counted list of elements of -type FOO. -The size of the length field may vary (it is not necessarily the same -size as a FOO), and in some cases, it may be implicit. -.RE -.sp -.LP -.nf -.ta .2i .5i 2.0i -XIMTRIGGERKEY - 4 CARD32 keysym - 4 CARD32 modifier - 4 CARD32 modifier mask -.sp -ENCODINGINFO - 2 n length of encoding info - n STRING8 encoding info - p unused, p=Pad(2+n) -.sp -EXT - 1 CARD8 extension major-opcode - 1 CARD8 extension minor-opcode - 2 n length of extension name - n STRING8 extension name - p unused, p = Pad(n) -.sp -XIMATTRIBUTE - 2 CARD16 attribute ID - 2 n value length - n value - p unused, p = Pad(n) -.sp -XICATTRIBUTE - 2 CARD16 attribute ID - 2 n value length - n value - p unused, p = Pad(n) -.sp -.bp -.ta .2i .5i 3.0i -XIMSTRCONVTEXT - 2 CARD16 XIMStringConversionFeedback - #x0000001 XIMStringConversionLeftEdge - #x0000002 XIMStringConversionRightEdge - #x0000004 XIMStringConversionTopEdge - #x0000008 XIMStringConversionBottomEdge - #x0000010 XIMStringConversionConvealed - #x0000020 XIMStringConversionWrapped - 2 n byte length of the retrieved string - n STRING8 retrieved string - p unused, p = Pad(n) - 2 m byte length of feedback array - 2 unused - m LISTofXIMSTRCONVFEEDBACK feedback array(*1) -.IP (*1) -This field is reserved for future use. -.sp -.LP -.nf -.ta .2i .5i 2.0i -XIMFEEDBACK - 4 CARD32 XIMFeedback - #x000001 XIMReverse - #x000002 XIMUnderline - #x000004 XIMHighlight - #x000008 XIMPrimary - #x000010 XIMSecondary - #x000020 XIMTertiary - #x000040 XIMVisibleToForward - #x000080 XIMVisibleToBackward - #x000100 XIMVisibleCenter -.sp -XIMHOTKEYSTATE - 4 CARD32 XIMHotKeyState - #x0000001 XIMHotKeyStateON - #x0000002 XIMHotKeyStateOFF -.sp -XIMPREEDITSTATE - 4 CARD32 XIMPreeditState - #x0000001 XIMPreeditEnable - #x0000002 XIMPreeditDisable -.sp -XIMRESETSTATE - 4 CARD32 XIMResetState - #x0000001 XIMInitialState - #x0000002 XIMPreserveState -.LP -.NH 2 -Error Notification -.XS -\*(SN Error Notification -.XE -.LP -Both the IM Server and the IM library return -.PN XIM_ERROR -messages instead of the corresponding reply messages if any errors occur -during data processing. -.LP -At most one error is generated per request. If more than one error condition -is encountered in processing a request, the choice of which error is returned -is implementation-dependent. -.LP -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_ERROR (IM Server \(<-\(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:2:BITMASK16:flag (*1) -::#0000:Both Input-Method-ID and Input-Context-ID are invalid -::#0001:Input-Method-ID is valid -::#0002:Input-Context-ID is valid -:2:CARD16:Error Code -::#1:BadAlloc -::#2:BadStyle -::#3:BadClientWindow -::#4:BadFocusWindow -::#5:BadArea -::#6:BadSpotLocation -::#7:BadColormap -::#8:BadAtom -::#9:BadPixel -::#10:BadPixmap -::#11:BadName -::#12:BadCursor -::#13:BadProtocol -::#14:BadForeground -::#15:BadBackground -::#16:LocaleNotSupported -::#999:BadSomething (*2) -:2:n:byte length of error detail. -:2:CARD16:type of error detail (*3) -:n:STRING8:error detail (*4) -:p::unused, p = Pad(n) -.TE -.LP -.IP (*1) -Before an IM is created, both Input-Method-ID and -Input-Context-ID are invalid. -Before an IC is created, only Input-Method-ID is valid. -After that, both of Input-Method-ID and Input-Context-ID are valid. -.IP (*2) -Unspecific error, for example ``language engine died'' -.IP (*3) -This field is reserved for future use. -.IP (*4) -Vendor defined detail error message -.RE -.LP -.NH 2 -Connection Establishment -.XS -\*(SN Connection Establishment -.XE -.LP -.PN XIM_CONNECT -message requests to establish a connection over a mutually-understood virtual -stream. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_CONNECT (IM library \(-> IM Server) -.sp 6p -:1::byte order -::#x42 MSB first -::#x6c LSB first -:1::unused -:2:CARD16:client-major-protocol-version (*1) -:2:CARD16:client-minor-protocol-version (*1) -:2:CARD16:number of client-auth-protocol-names -:n:LISTofSTRING:client-auth-protocol-names -.TE -.LP -.IP (*1) -Specify the version of IM Protocol that the client supports. -.RE -.sp -.LP -A client must send -.PN XIM_CONNECT -message as the first message on the connection. -The list specifies the names of authentication protocols the sending -IM Server is willing to perform. -(If the client need not authenticate, the list may be omited.) -.LP -.PN XIM_AUTH_REQUIRED -message is used to send the authentication protocol name and protocol-specific -data. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_AUTH_REQUIRED (IM library \(<-\(-> IM Server) -.sp 6p -:1:CARD8:auth-protocol-index -:3::unused -:2:n:length of authentication data -:2::unused -:n:<varies>:data -:p::unused, p = Pad(n) -.TE -.RE -.LP -The auth-protocol is specified by an index into the list of names -given in the -.PN XIM_CONNECT -or -.PN XIM_AUTH_SETUP -message. Any protocol-specific data that might be required is also sent. -.LP -The IM library sends -.PN XIM_AUTH_REPLY -message as the reply to -.PN XIM_AUTH_REQUIRED -message, if the IM Server is authenticated. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_AUTH_REPLY (IM library \(-> IM Server) -.sp 6p -:2:n:length of authentication data -:2::unused -:2:n:length of authentication data -:2::unused -:n:<varies>:data -:p::unused, p = Pad(n) -.TE -.RE -.LP -The auth data is specific to the authentication protocol in use. -.LP -.PN XIM_AUTH_NEXT -message requests to send more auth data. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_AUTH_NEXT (IM library \(<-\(-> IM Server) -.sp 6p -:2:n:length of authentication data -:2::unused -:n:<varies>:data -:p::unused, p = Pad(n) -.TE -.RE -.LP -The auth data is specific to the authentication protocol in use. -.LP -The IM Server sends -.PN XIM_AUTH_SETUP -message to authenticate the client. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_AUTH_SETUP (IM Server \(-> IM library) -.sp 6p -:2:CARD16:number of client-auth-protocol-names -:2::unused -:n:LISTofSTRING:server-auth-protocol-names -.TE -.RE -.LP -The list specifies the names of authentication protocols the -client is willing to perform. -.LP -.PN XIM_AUTH_NG -message requests to give up the connection. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_AUTH_NG (IM library \(<-\(-> IM Server) -.TE -.RE -.LP -The IM Server sends -.PN XIM_CONNECT_REPLY -message as the reply to -.PN XIM_CONNECT -or -.PN XIM_AUTH_REQUIRED -message. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_CONNECT_REPLY (IM Server \(-> IM library) -.sp 6p -:2:CARD16:server-major-protocol-version (*1) -:2:CARD16:server-minor-protocol-version (*1) -.TE -.LP -.IP (*1) -Specify the version of IM Protocol that the IM Server supports. -This document specifies major version one, minor version zero. -.RE -.sp -.LP -Here are the state diagrams for the client and the IM Server. -.sp -.B -State transitions for the client -.R -.RS -.LP -\fIinit_status\fP: -.RS -Use authorization function \(-> \fIclient_ask\fP -.br -Not use authorization function \(-> \fIclient_no_check\fP -.RE -.sp -.LP -\fIstart\fP: -.RS -Send -.PN XIM_CONNECT -.RS -If \fIclient_ask\fP \(-> \fIclient_wait1\fP -.br -If \fIclient_no_check\fP, client-auth-protocol-names may be omited \(-> \fIclient_wait2\fP -.RE -.RE -.sp -.LP -\fIclient_wait1\fP: -.RS -Receive -.PN XIM_AUTH_REQUIRED -\(-> \fIclient_check\fP -.br -Receive <other> \(-> \fIclient_NG\fP -.RE -.sp -.LP -\fIclient_check\fP: -.RS -If no more auth needed, send -.PN XIM_AUTH_REPLY -\(-> \fIclient_wait2\fP -.br -If good auth data, send -.PN XIM_AUTH_NEXT -\(-> \fIclient_wait1\fP -.br -If bad auth data, send -.PN XIM_AUTH_NG -\(-> give up on this protocol -.RE -.sp -.LP -\fIclient_wait2\fP: -.RS -Receive -.PN XIM_CONNECT_REPLY -\(-> connect -.br -Receive -.PN XIM_AUTH_SETUP -\(-> \fIclient_more\fP -.br -Receive -.PN XIM_AUTH_NEXT -\(-> \fIclient_more\fP -.br -Receive -.PN XIM_AUTH_NG -\(-> give up on this protocol -.br -Receive <other> \(-> \fIclient_NG\fP -.RE -.sp -.LP -\fIclient_more\fP: -.RS -Send -.PN XIM_AUTH_REQUIRED -\(-> \fIclient_wait2\fP -.RE -.sp -.LP -\fIclient_NG\fP: -.RS -Send -.PN XIM_AUTH_NG -\(-> give up on this protocol -.RE -.RE -.sp -.LP -.B -State transitions for the IM Server -.R -.RS -.LP -\fIinit-status\fP: -.RS -Use authorization function \(-> \fIserver_ask\fP -.br -Not use authorization function \(-> \fIserver_no_check\fP -.RE -.sp -.LP -\fIstart\fP: -.RS -Receive -.PN XIM_CONNECT -\(-> \fIstart2\fP -.br -Receive <other> \(-> \fIserver_NG\fP -.RE -.sp -.LP -\fIstart2\fP: -.RS -If \fIclient_ask\fP, send -.PN XIM_AUTH_REQUIRED -\(-> \fIserver_wait1\fP -.br -If \fIclient_no_check\fP and \fIserver_ask\fP, send -.PN XIM_AUTH_SETUP -\(-> \fIserver_wait2\fP -.br -If \fIclient_no_check\fP and \fIserver_no_check\fP, send -.PN XIM_CONNECT_REPLY -\(-> connect -.RE -.sp -.LP -\fIserver_wait1\fP: -.RS -Receive -.PN XIM_AUTH_REPLY -\(-> \fIserver2\fP -.br -Receive -.PN XIM_AUTH_NEXT -\(-> \fIserver_more\fP -.br -Receive <other> \(-> \fIserver_NG\fP -.RE -.sp -.LP -\fIserver_more\fP -.RS -Send -.PN XIM_AUTH_REQUIRED -\(-> \fIserver_wait1\fP -.RE -.sp -.LP -\fIserver2\fP -.RS -If \fIserver_ask\fP, send -.PN XIM_AUTH_SETUP -\(-> \fIserver_wait2\fP -.br -If \fIserver_no_check\fP, send -.PN XIM_CONNECT_REPLY -\(-> connect -.RE -.sp -.LP -\fIserver_wait2\fP -.RS -Receive -.PN XIM_AUTH_REQUIRED -\(-> \fIserver_check\fP -.br -Receive <other> \(-> \fIserver_NG\fP -.RE -.sp -.LP -\fIserver_check\fP -.RS -If no more auth data, send -.PN XIM_CONNECT_REPLY -\(-> connect -.br -If bad auth data, send -.PN XIM_AUTH_NG -\(-> give up on this protocol -.br -If good auth data, send -.PN XIM_AUTH_NEXT -\(-> \fIserver_wait2\fP -.RE -.sp -.LP -\fIserver_NG\fP -.RS -Send -.PN XIM_AUTH_NG -\(-> give up on this protocol -.RE -.RE -.sp -.LP -.PN XIM_DISCONNECT -message requests to shutdown the connection over a mutually-understood -virtual stream. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_DISCONNECT (IM library \(-> IM Server) -.TE -.RE -.LP -.PN XIM_DISCONNECT -is a synchronous request. The IM library should wait until it receives -either an -.PN XIM_DISCONNECT_REPLY -packet or an -.PN XIM_ERROR -packet. -.LP -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_DISCONNECT_REPLY (IM Server \(-> IM library) -.TE -.RE -.LP -.PN XIM_OPEN -requests to establish a logical connection between the IM library and the IM -Server. -.LP -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_OPEN (IM library \(-> IM Server) -.sp 6p -:n:STR:locale name -:p::unused, p = Pad(n) -.TE -.RE -.LP -.PN XIM_OPEN -is a synchronous request. The IM library should wait until receiving -either an -.PN XIM_OPEN_REPLY -packet or an -.PN XIM_ERROR -packet. -.LP -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_OPEN_REPLY (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:n:byte length of IM attributes supported -:n:LISTofXIMATTR:IM attributes supported -:2:m:byte length of IC attributes supported -:2:CARD16:unused -:m:LISTofXICATTR: IC attributes supported -.TE -.RE -.LP -.PN XIM_OPEN_REPLY -message returns all supported IM and IC attributes in LISTofXIMATTR and -LISTofXICATTR. These IM and IC attribute IDs are used to reduce the amount -of data which must be transferred via the network. In addition, this -indicates to the IM library what kinds of IM/IC attributes can be used -in this session, and what types of data will be exchanged. This allows -the IM Server provider and application writer to support IM system -enhancements with new IM/IC attributes, without modifying Xlib. -The IC value for the separator of NestedList must be included in the -LISTofXICATTR. -.LP -.PN XIM_CLOSE -message requests to shutdown the logical connection between the IM library -and the IM Server. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_CLOSE (IM library \(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2::unused -.TE -.RE -.LP -.PN XIM_CLOSE -is a synchronous request. The IM library should wait until receiving -either an -.PN XIM_CLOSE_REPLY -packet or an -.PN XIM_ERROR -packet. -.LP -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_CLOSE_REPLY (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2::unused -.TE -.RE -.LP -.NH 2 -Event Flow Control -.XS -\*(SN Event Flow Control -.XE -.LP -An IM Server must send -.PN XIM_SET_EVENT_MASK -message to the IM library in order for events to be forwarded to the IM -Server, since the IM library initially doesn't forward any events to the -IM Server. In the protocol, the IM Server will specify masks of X events -to be forwarded and which need to be synchronized by the IM library. -.LP -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_SET_EVENT_MASK (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:4:EVENTMASK:forward-event-mask (*1) -:4:EVENTMASK:synchronous-event-mask (*2) -.TE -.LP -.IP (*1) -Specify all the events to be forwarded to the IM Server by the IM library. -.IP (*2) -Specify the events to be forwarded with synchronous flag on by the IM library. -.RE -.sp -.LP -.PN XIM_SET_EVENT_MASK -is an asynchronous request. The event masks are valid immediately after -they are set until changed by another -.PN XIM_SET_EVENT_MASK -message. If input-context-ID is set to zero, the default value of the -input-method-ID will be changed to the event masks specified in the request. -That value will be used for the IC's which have no individual values. -.LP -Using the Dynamic Event Flow model, an IM Server sends -.PN XIM_REGISTER_TRIGGERKEYS -message to the IM library before sending -.PN XIM_OPEN_REPLY -message. -Or the IM library may suppose that the IM Server uses the Static Event Flow -model. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_REGISTER_TRIGGERKEYS (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2::unused -:4:n:byte length of on-keys -:n:LISTofXIMTRIGGERKEY:on-keys list -:4:m:byte length of off-keys -:m:LISTofXIMTRIGGERKEY:off-keys list -.TE -.RE -.LP -.PN XIM_REGISTER_TRIGGERKEYS -is an asynchronous request. -The IM Server notifys the IM library of on-keys and off-keys lists with -this message. -.LP -The IM library notifys the IM Server with -.PN XIM_TRIGGER_NOTIFY -message that a key event matching either on-keys or off-keys has been occurred. -.LP -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_TRIGGER_NOTIFY (IM library \(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:4:CARD32:flag -::#0:on-keys list -::#1:off-keys list -:4:CARD32:index of keys list -:4:EVENTMASK:client-select-event-mask (*1) -.TE -.LP -.IP (*1) -Specify the events currently selected by the IM library with XSelectInput. -.RE -.sp -.LP -.PN XIM_TRIGGER_NOTIFY -is a synchronous request. The IM library should wait until receiving -either an -.PN XIM_TRIGGER_NOTIFY_REPLY -packet or an -.PN XIM_ERROR -packet. -.LP -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_TRIGGER_NOTIFY_REPLY (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -.TE -.RE -.LP -.NH 2 -Encoding Negotiation -.XS -\*(SN Encoding Negotiation -.XE -.LP -.PN XIM_ENCODING_NEGOTIATION -message requests to decide which encoding to be sent across the wire. -When the negotiation fails, the fallback default encoding is Portable -Character Encoding. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_ENCODING_NEGOTIATION (IM library \(-> IM Server).sp 6p -:2:CARD16:input-method-ID -:2:n:byte length of encodings listed by name -:n:LISTofSTR:list of encodings supported in the IM library. -:p::unused, p = Pad(n) -:2:m:byte length of encodings listed by detailed data -:2::unused -:m:LISTofENCODINGINFO:list of encordings supported in the IM library -.TE -.RE -.LP -The IM Server must choose one encoding from the list sent by the IM library. -If index of the encording determined is -1 to indicate that the negotiation -is failed, the fallback default encoding is used. -The message must be issued after sending -.PN XIM_OPEN -message via XOpenIM(). -The name of encoding may be registered with X Consortium. -.LP -.PN XIM_ENCODING_NEGOTIATION -is a synchronous request. The IM library should wait until receiving -either an -.PN XIM_ENCODING_NEGOTIATION_REPLY -packet or an -.PN XIM_ERROR -packet. -.LP -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_ENCODING_NEGOTIATION_REPLY (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:category of the encoding determined. -::#0:name -::#1:detailed data -:2:INT16:index of the encoding determinated. -:2::unused -.TE -.RE -.LP -.NH 2 -Query the supported extension protocol list -.XS -\*(SN Query the supported extension protocol list -.XE -.LP -.PN XIM_QUERY_EXTENSION -message requests to query the IM extensions supported by the IM Server to -which the client is being connected. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_QUERY_EXTENSION (IM library \(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2:n:T{ -byte length of extensions supported by the IM library -T} -:n:LISTofSTR:extensions supported by the IM library -:p::unused, p = Pad(n) -.TE -.RE -.LP -An example of a supported extension is FrontEnd. -The message must be issued after sending -.PN XIM_OPEN -message via XOpenIM(). -.LP -If n is 0, the IM library queries the IM Server for all extensions. -.LP -If n is not 0, the IM library queries whether the IM Server supports the -contents specified in the list. -.LP -If a client uses an extension request without previously having issued a -.PN XIM_QUERY_EXTENSION -message for that extension, the IM Server responds with a -.PN BadProtocol -error. If the IM Server encounters a request with an unknown MAJOR-OPCODE -or MINOR-OPCODE, it responds with a -.PN BadProtocol -error. -.LP -.PN XIM_QUERY_EXTENSION -is a synchronous request. The IM library should wait until receiving -either an -.PN XIM_QUERY_EXTENSION_REPLY -packet or an -.PN XIM_ERROR -packet. -.LP -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_QUERY_EXTENSION_REPLY (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:n:T{ -byte length of extensions supported by both the IM library and the IM Server -T} -:n:LISTofEXT:T{ -list of extensions supported by both the IM library and the IM Server -T} -.TE -.RE -.LP -.PN XIM_QUERY_EXTENSION_REPLY -message returns the list of extensions supported by both the IM library and -the IM Server. If the list passed in -.PN XIM_QUERY_EXTENSION -message is NULL, the IM Server returns the full list of extensions supported -by the IM Server. If the list is not NULL, the IM Server returns the -extensions in the list that are supported by the IM Server. -.LP -A zero-length string is not a valid extension name. The IM library should -disregard any zero-length strings that are returned in the extension list. -The IM library does not use the requests which are not supported by the IM -Server. -.LP -.NH 2 -Setting IM Values -.XS -\*(SN Setting IM Values -.XE -.LP -.PN XIM_SET_IM_VALUES -requests to set attributes to the IM. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_SET_IM_VALUES (IM library \(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2:n:byte length of im-attribute -:n:LISTofXIMATTRIBUTE:im-attributes -.TE -.RE -.LP -The im-attributes in -.PN XIM_SET_IM_VALUES -message are specified as a LISTofXIMATTRIBUTE, specifying the attributes -to be set. Attributes other than the ones returned by -.PN XIM_OPEN_REPLY -message should not be specified. -.LP -.PN XIM_SET_IM_VALUES -is a synchronous request. The IM library should wait until receiving -either an -.PN XIM_SET_IM_VALUES_REPLY -packet or an -.PN XIM_ERROR -packet, because it must receive the error attribute if -.PN XIM_ERROR -message is returned. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_SET_IM_VALUES_REPLY (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2::unused -.TE -.RE -.LP -.PN XIM_SET_IM_VALUES_REPLY -message returns the input-method-ID to distinguish replies from multiple IMs. -.LP -.NH 2 -Getting IM Values -.XS -\*(SN getting IM Values -.XE -.LP -.PN XIM_GET_IM_VALUES -requests to query IM values supported by the IM Server currently being -connected. -.LP -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_GET_IM_VALUES (IM library \(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2:n:byte length of im-attribute-id -:n:LISTofCARD16:im-attribute-id -:p::unused, p=Pad(n) -.TE -.RE -.LP -.PN XIM_GET_IM_VALUES -is a synchronous request. The IM library should wait until it receives -either an -.PN XIM_GET_IM_VALUES_REPLY -packet or an -.PN XIM_ERROR -packet. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_GET_IM_VALUES_REPLY (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:n:byte length of im-attributes returned -:n:LISTofXIMATTRIBUTE:im-attributes returned -.TE -.RE -.LP -The IM Server returns IM values with -.PN XIM_GET_IM_VALUES_REPLY -message. The order of the returned im-attribute values corresponds directly -to that of the list passed with the -.PN XIM_GET_IM_VALUES -message. -.LP -.NH 2 -Creating an IC -.XS -\*(SN Creating an IC -.XE -.LP -.PN XIM_CREATE_IC -message requests to create an IC. -.LP -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_CREATE_IC (IM library \(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2:n:byte length of ic-attributes -:n:LISTofXICATTRIBUTE:ic-attributes -.TE -.RE -.LP -The input-context-id is specified by the IM Server to identify the client -(IC). (It is not specified by the client in -.PN XIM_CREATE_IC -message.), and it should not be set to zero. -.LP -.PN XIM_CREATE_IC -is a synchronous request which returns the input-context-ID. -The IM library should wait until it receives either an -.PN XIM_CREATE_IC_REPLY -packet or an -.PN XIM_ERROR -packet. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_CREATE_IC_REPLY (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -.TE -.RE -.LP -.NH 2 -Destroying the IC -.XS -\*(SN Destroying the IC -.XE -.LP -.PN XIM_DESTROY_IC -message requests to destroy the IC. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_DESTROY_IC (IM library \(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -.TE -.RE -.LP -.PN XIM_DESTROY_IC -is a synchronous request. The IM library should not free its resources -until it receives an -.PN XIM_DESTROY_IC_REPLY -message because -.PN XIM_DESTROY_IC -message may result in Callback packets such as -.PN XIM_PREEDIT_DRAW -and -.PN XIM_PREEDIT_DONE. -.LP -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_DESTROY_IC_REPLY (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -.TE -.RE -.LP -.NH 2 -Setting IC Values -.XS -\*(SN Setting IC Values -.XE -.LP -.PN XIM_SET_IC_VALUES -messages requests to set attributes to the IC. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_SET_IC_VALUES (IM library \(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:2:n:byte length of ic-attributes -:2::unused -:n:LISTofXICATTRIBUTE:ic-attributes -.TE -.RE -.LP -The ic-attributes in -.PN XIM_SET_IC_VALUES -message are specified as a LISTofXICATTRIBUTE, specifying the attributes -to be set. Attributes other than the ones returned by -.PN XIM_OPEN_REPLY -message should not be specified. -.LP -.PN XIM_SET_IC_VALUES -is a synchronous request. The IM library should wait until receiving -either an -.PN XIM_SET_IC_VALUES_REPLY -packet or an -.PN XIM_ERROR -packet, because it must receive the error attribute if -.PN XIM_ERROR -message is returned. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_SET_IC_VALUES_REPLY (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -.TE -.RE -.LP -.NH 2 -Getting IC Values -.XS -\*(SN Getting IC Values -.XE -.LP -.PN XIM_GET_IC_VALUES -message requests to query IC values supported by the IM Server currently -being connected. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_GET_IC_VALUES (IM library \(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:2:n:byte length of ic-attribute-id -:n:LISTofCARD16:ic-attribute-id -:p::unused, p=Pad(2+n) -.TE -.RE -.LP -In LISTofCARD16, the appearance of the ic-attribute-id for the separator -of NestedList shows the end of the heading nested list. -.LP -.PN XIM_GET_IC_VALUES -is a synchronous request and returns each attribute with its values to -show the correspondence. The IM library should wait until receiving -either an -.PN XIM_GET_IC_VALUES_REPLY -packet or an -.PN XIM_ERROR -packet. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_GET_IC_VALUES_REPLY (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:2:n:byte length of ic-attribute -:2::unused -:n:LISTofXICATTRIBUTE:ic-attribute -.TE -.RE -.LP -.NH 2 -Setting IC Focus -.XS -\*(SN Setting IC Focus -.XE -.LP -.PN XIM_SET_IC_FOCUS -message requests to set the focus to the IC. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_SET_IC_FOCUS (IM library \(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -.TE -.RE -.LP -.PN XIM_SET_IC_FOCUS -is an asynchronous request. -.LP -.NH 2 -Unsetting IC Focus -.XS -\*(SN Unsetting IC Focus -.XE -.LP -.PN XIM_UNSET_IC_FOCUS -message requests to unset the focus to the focused IC. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_UNSET_IC_FOCUS (IM library \(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -.TE -.RE -.LP -.PN XIM_UNSET_IC_FOCUS -is an asynchronous request. -.LP -.NH 2 -Filtering Events -.XS -\*(SN Filtering Events -.XE -.LP -Event filtering is mainly provided for BackEnd method to allow input method -to capture X events transparently to clients. -.LP -X Events are forwarded by -.PN XIM_FORWARD_EVENT -message. -This message can be operated both synchronously and asynchronously. -If the requester sets the synchronous flag, the receiver must send -.PN XIM_SYNC_REPLY -message back to the requester when all the data processing is done. -.sp -.B -Protocol flow of BackEnd model -.R -.LP -.LP -With BackEnd method, the protocol flow can be classified into two -methods in terms of synchronization, depending on the synchronous-eventmask -of -.PN XIM_SET_EVENT_MASK -message. One can be called on-demand-synchronous method and another -can be called as full-synchronous method. -.LP -In on-demand-synchronous method, the IM library always receives -.PN XIM_FORWARD_EVENT -or -.PN XIM_COMMIT -message as a synchronous request. Also, the IM Server needs to synchronously -process the correspondent reply from the IM library and the following -.PN XIM_FORWARD_EVENT -message sent from the IM library when any of the event causes the IM Server -to send -.PN XIM_FORWARD_EVENT -or -.PN XIM_COMMIT -message to the IM library, so that the input service is consistent. If the -IM library gets the control back from the application after receiving the -synchronous request, the IM library replies for the synchronous request before -processing any of the events. In this time, the IM Server blocks -.PN XIM_FORWARD_EVENT -message which is sent by the IM library, and handles it after receiving the -reply. However, the IM Server handles the other protocols at any time. -.LP -In full-synchronous method, the IM library always sends -.PN XIM_FORWARD_EVENT -message to the IM Server as a synchronous request. Therefore, the reply to it -from the IM Server will be put between the -.PN XIM_FORWARD_EVENT -message and its -.PN XIM_SYNC_REPLY -message. -In case of sending -.PN XIM_FORWARD_EVENT -or -.PN XIM_COMMIT -message, the IM Server should set the synchronous flag off. Because the -synchronization can be done by the following -.PN XIM_SYNC_REPLY -message. -.sp -.LP -.B -Sample Protocol flow chart 1 -.R -.LP -Following chart shows one of the simplest protocol flow which only -deals with keyevents for preediting operation. -.LP -.\"====================== event flow figure start ===================== -\^... 0.425 6.888 6.3 10.296 -\^... 0.000i 3.408i 5.875i 0.000i -.nr 00 \n(.u -.nf -.PS 3.408i 5.875i -.br -.ps 11 -\h'3.125i'\v'0.496i'\D'l1.625i 0.250i' -.sp -1 -\h'4.647i'\v'0.756i'\D'l0.103i -0.010i' -.sp -1 -\h'4.655i'\v'0.706i'\D'l0.095i 0.040i' -.sp -1 -\h'3.125i'\v'1.221i'\D'l1.687i 0.188i' -.sp -1 -\h'4.710i'\v'1.423i'\D'l0.102i -0.014i' -.sp -1 -\h'4.715i'\v'1.373i'\D'l0.097i 0.036i' -.sp -1 -\h'4.750i'\v'0.971i'\D'l-1.625i 0.438i' -.sp -1 -\h'3.215i'\v'1.359i'\D'l-0.090i 0.050i' -.sp -1 -\h'3.228i'\v'1.407i'\D'l-0.103i 0.002i' -.sp -1 -\h'2.000i'\v'0.409i'\D'l1.000i 0.062i' -.sp -1 -\h'2.899i'\v'0.490i'\D'l0.101i -0.019i' -.sp -1 -\h'2.902i'\v'0.440i'\D'l0.098i 0.031i' -.sp -1 -\h'2.000i'\v'1.034i'\D'l1.000i 0.125i' -.sp -1 -\h'2.898i'\v'1.171i'\D'l0.102i -0.012i' -.sp -1 -\h'2.904i'\v'1.122i'\D'l0.096i 0.037i' -.sp -1 -\h'3.000i'\v'1.409i'\D'l-1.000i 0.062i' -.sp -1 -\h'2.098i'\v'1.440i'\D'l-0.098i 0.031i' -.sp -1 -\h'2.101i'\v'1.490i'\D'l-0.101i -0.019i' -.sp -1 -\h'1.125i'\v'1.846i'\l'-0.500i' -.sp -1 -\h'0.725i'\v'1.821i'\D'l-0.100i 0.025i' -.sp -1 -\h'0.725i'\v'1.871i'\D'l-0.100i -0.025i' -.sp -1 -\h'0.688i'\v'0.159i'\l'0.437i' -.sp -1 -\h'1.025i'\v'0.184i'\D'l0.100i -0.025i' -.sp -1 -\h'1.025i'\v'0.134i'\D'l0.100i 0.025i' -.sp -1 -\h'0.688i'\v'0.846i'\l'0.437i' -.sp -1 -\h'1.025i'\v'0.871i'\D'l0.100i -0.025i' -.sp -1 -\h'1.025i'\v'0.821i'\D'l0.100i 0.025i' -.sp -1 -\h'5.562i'\v'1.409i'\l'0.313i' -.sp -1 -\h'5.875i'\v'1.409i'\v'-.13m'\L'1.937i\(br'\v'.13m' -.sp -1 -\h'5.875i'\v'3.346i'\D'l-0.250i 0.000i' -.sp -1 -\h'5.725i'\v'3.321i'\D'l-0.100i 0.025i' -.sp -1 -\h'5.725i'\v'3.371i'\D'l-0.100i -0.025i' -.sp -1 -\h'2.062i'\v'2.096i'\l'0.875i' -.sp -1 -\h'2.837i'\v'2.121i'\D'l0.100i -0.025i' -.sp -1 -\h'2.837i'\v'2.071i'\D'l0.100i 0.025i' -.sp -1 -\h'3.000i'\v'0.034i'\v'-.13m'\L'3.374i\(br'\v'.13m' -.sp -1 -\h'4.875i'\v'0.034i'\v'-.13m'\L'3.374i\(br'\v'.13m' -.sp -1 -\h'2.013i'\v'2.871i'\D'l0.937i 0.250i' -.sp -1 -\h'2.847i'\v'3.119i'\D'l0.103i 0.002i' -.sp -1 -\h'2.860i'\v'3.071i'\D'l0.090i 0.050i' -.sp -1 -\h'3.062i'\v'3.134i'\D'l1.688i 0.187i' -.sp -1 -\h'4.648i'\v'3.335i'\D'l0.102i -0.014i' -.sp -1 -\h'4.653i'\v'3.285i'\D'l0.097i 0.036i' -.sp -1 -\h'3.062i'\v'2.533i'\D'l1.750i 0.213i' -.sp -1 -\h'4.710i'\v'2.759i'\D'l0.102i -0.013i' -.sp -1 -\h'4.716i'\v'2.709i'\D'l0.096i 0.037i' -.sp -1 -\h'3.062i'\v'2.096i'\l'1.750i' -.sp -1 -\h'4.712i'\v'2.121i'\D'l0.100i -0.025i' -.sp -1 -\h'4.712i'\v'2.071i'\D'l0.100i 0.025i' -.sp -1 -\h'4.812i'\v'2.284i'\l'-1.750i' -.sp -1 -\h'3.162i'\v'2.259i'\D'l-0.100i 0.025i' -.sp -1 -\h'3.162i'\v'2.309i'\D'l-0.100i -0.025i' -.sp -1 -\h'1.250i'\v'0.193i'\h'-0.0m'\v'0.2m'\s10\fRXNextEvent\fP -.sp -1 -\h'1.250i'\v'0.381i'\h'-0.0m'\v'0.2m'\s10\fRXFilterEvent\fP -.sp -1 -\h'1.250i'\v'0.881i'\h'-0.0m'\v'0.2m'\s10\fRXNextEvent\fP -.sp -1 -\h'1.250i'\v'1.068i'\h'-0.0m'\v'0.2m'\s10\fRXFilterEvent\fP -.sp -1 -\h'1.250i'\v'1.506i'\h'-0.0m'\v'0.2m'\s10\fRXNextEvent\fP -.sp -1 -\h'1.250i'\v'1.881i'\h'-0.0m'\v'0.2m'\s10\fRXmbLookupString\fP -.sp -1 -\h'4.875i'\h'-0.0m'\v'0.2m'\s12\fRIM Server\fP -.sp -1 -\h'2.437i'\h'-0.0m'\v'0.2m'\s12\fRIM library\fP -.sp -1 -\h'1.250i'\v'1.693i'\h'-0.0m'\v'0.2m'\s10\fRXFilterEvent (returns False) \fP -.sp -1 -\v'2.168i'\h'-0.0m'\v'0.2m'\s10\fRthe focus\fP -.sp -1 -\h'1.250i'\h'-0.0m'\v'0.2m'\s12\fRXlib API\fP -.sp -1 -\v'2.006i'\h'-0.0m'\v'0.2m'\s10\fRApplication moves\fP -.sp -1 -\h'3.187i'\v'0.443i'\h'-0.0m'\v'0.2m'\s10\fRXIM_FORWARD_EVENT\fP -.sp -1 -\h'3.187i'\v'0.881i'\h'-0.0m'\v'0.2m'\s10\fRXIM_FORWARD_EVENT\fP -.sp -1 -\h'3.187i'\v'1.631i'\h'-0.0m'\v'0.2m'\s10\fRXIM_FORWARD_EVENT\fP -.sp -1 -\h'3.187i'\v'1.006i'\h'-0.0m'\v'0.2m'\s10\fRor XIM_COMMIT\fP -.sp -1 -\h'5.000i'\v'0.881i'\h'-0.0m'\v'0.2m'\s10\fRsynchronous \fP -.sp -1 -\h'5.000i'\v'1.006i'\h'-0.0m'\v'0.2m'\s10\fRrequest\fP -.sp -1 -\h'0.062i'\v'0.193i'\h'-0.0m'\v'0.2m'\s10\fRKey event\fP -.sp -1 -\h'0.062i'\v'0.881i'\h'-0.0m'\v'0.2m'\s10\fRKey event\fP -.sp -1 -\h'3.187i'\v'1.131i'\h'-0.0m'\v'0.2m'\s10\fR(synchronous) \fP -.sp -1 -\h'5.000i'\v'1.443i'\h'-0.0m'\v'0.2m'\s10\fRPending\fP -.sp -1 -\h'5.000i'\v'2.381i'\h'-0.0m'\v'0.2m'\s10\fRprocessed\fP -.sp -1 -\h'5.000i'\v'2.506i'\h'-0.0m'\v'0.2m'\s10\fR(The focused\fP -.sp -1 -\h'5.000i'\v'2.631i'\h'-0.0m'\v'0.2m'\s10\fRIC is changed) \fP -.sp -1 -\h'5.000i'\v'2.881i'\h'-0.0m'\v'0.2m'\s10\fRprocessed\fP -.sp -1 -\h'1.250i'\v'2.131i'\h'-0.0m'\v'0.2m'\s10\fRXSetICFocus\fP -.sp -1 -\h'3.125i'\v'2.881i'\h'-0.0m'\v'0.2m'\s10\fRXIM_SYNC_REPLY as a reply\fP -.sp -1 -\h'3.125i'\v'3.043i'\h'-0.0m'\v'0.2m'\s10\fRof the XIM_FORWARD_EVENT\fP -.sp -1 -\h'1.250i'\v'2.881i'\h'-0.0m'\v'0.2m'\s10\fRXNextEvent\fP -.sp -1 -\h'3.312i'\v'2.506i'\h'-0.0m'\v'0.2m'\s10\fRXIM_SET_IC_FOCUS\fP -.sp -1 -\h'3.312i'\v'2.006i'\h'-0.0m'\v'0.2m'\s10\fRXIM_SYNC\fP -.sp -1 -\h'3.312i'\v'2.193i'\h'-0.0m'\v'0.2m'\s10\fRXIM_SYNC_REPLY\fP -.sp -1 -\h'5.000i'\v'3.381i'\h'-0.0m'\v'0.2m'\s10\fRprocessed\fP -.sp -1 -.sp 1+3.408i -.PE -.if \n(00 .fi - -.\"====================== event flow figure end ======================= -.ce -.sp -Fig.2 Sample Protocol Flow -.sp -.LP -.B -Sample Protocol flow chart 2 -.R -.LP -Following chart shows one of the complex protocol flow, which deals -with multiple focus windows and button press event as well as keyevent, -and the focus is moved by the application triggered by both of keyevent -and button press event. -.LP -.bp -.\"====================== event2 flow figure start ===================== -\^... 0.425 5.575 6.3 10.296 -\^... 0.000i 4.721i 5.875i 0.000i -.nr 00 \n(.u -.nf -.PS 4.721i 5.875i -.br -.ps 11 -\h'3.125i'\v'0.496i'\D'l1.625i 0.163i' -.sp -1 -\h'4.648i'\v'0.674i'\D'l0.102i -0.015i' -.sp -1 -\h'4.653i'\v'0.624i'\D'l0.097i 0.035i' -.sp -1 -\h'2.000i'\v'0.409i'\D'l1.000i 0.062i' -.sp -1 -\h'2.899i'\v'0.490i'\D'l0.101i -0.019i' -.sp -1 -\h'2.902i'\v'0.440i'\D'l0.098i 0.031i' -.sp -1 -\h'0.688i'\v'0.159i'\l'0.437i' -.sp -1 -\h'1.025i'\v'0.184i'\D'l0.100i -0.025i' -.sp -1 -\h'1.025i'\v'0.134i'\D'l0.100i 0.025i' -.sp -1 -\h'1.250i'\v'0.193i'\h'-0.0m'\v'0.2m'\s10\fRXNextEvent\fP -.sp -1 -\h'1.250i'\v'0.381i'\h'-0.0m'\v'0.2m'\s10\fRXFilterEvent\fP -.sp -1 -\h'3.187i'\v'0.443i'\h'-0.0m'\v'0.2m'\s10\fRXIM_FORWARD_EVENT\fP -.sp -1 -\h'0.062i'\v'0.193i'\h'-0.0m'\v'0.2m'\s10\fRKey event\fP -.sp -1 -\h'3.125i'\v'1.221i'\D'l1.687i 0.125i' -.sp -1 -\h'4.710i'\v'1.364i'\D'l0.102i -0.018i' -.sp -1 -\h'4.714i'\v'1.314i'\D'l0.098i 0.032i' -.sp -1 -\h'4.750i'\v'0.971i'\D'l-1.625i 0.750i' -.sp -1 -\h'3.205i'\v'1.656i'\D'l-0.080i 0.065i' -.sp -1 -\h'3.226i'\v'1.702i'\D'l-0.101i 0.019i' -.sp -1 -\h'2.000i'\v'1.034i'\D'l1.000i 0.125i' -.sp -1 -\h'2.898i'\v'1.171i'\D'l0.102i -0.012i' -.sp -1 -\h'2.904i'\v'1.122i'\D'l0.096i 0.037i' -.sp -1 -\h'0.688i'\v'0.846i'\l'0.437i' -.sp -1 -\h'1.025i'\v'0.871i'\D'l0.100i -0.025i' -.sp -1 -\h'1.025i'\v'0.821i'\D'l0.100i 0.025i' -.sp -1 -\h'3.000i'\v'0.034i'\v'-.13m'\L'4.687i\(br'\v'.13m' -.sp -1 -\h'0.750i'\v'1.346i'\l'0.313i' -.sp -1 -\h'0.963i'\v'1.371i'\D'l0.100i -0.025i' -.sp -1 -\h'0.963i'\v'1.321i'\D'l0.100i 0.025i' -.sp -1 -\h'3.125i'\v'1.509i'\D'l1.687i 0.125i' -.sp -1 -\h'4.710i'\v'1.652i'\D'l0.102i -0.018i' -.sp -1 -\h'4.714i'\v'1.602i'\D'l0.098i 0.032i' -.sp -1 -\h'4.812i'\v'1.721i'\D'l-1.687i 0.188i' -.sp -1 -\h'3.222i'\v'1.873i'\D'l-0.097i 0.036i' -.sp -1 -\h'3.227i'\v'1.923i'\D'l-0.102i -0.014i' -.sp -1 -\h'2.937i'\v'1.971i'\D'l-0.937i 0.188i' -.sp -1 -\h'2.093i'\v'2.115i'\D'l-0.093i 0.044i' -.sp -1 -\h'2.103i'\v'2.164i'\D'l-0.103i -0.005i' -.sp -1 -\h'1.125i'\v'2.533i'\l'-0.500i' -.sp -1 -\h'0.725i'\v'2.508i'\D'l-0.100i 0.025i' -.sp -1 -\h'0.725i'\v'2.558i'\D'l-0.100i -0.025i' -.sp -1 -\h'5.562i'\v'1.346i'\l'0.313i' -.sp -1 -\h'5.875i'\v'1.346i'\v'-.13m'\L'2.687i\(br'\v'.13m' -.sp -1 -\h'5.875i'\v'4.033i'\D'l-0.250i 0.000i' -.sp -1 -\h'5.725i'\v'4.008i'\D'l-0.100i 0.025i' -.sp -1 -\h'5.725i'\v'4.058i'\D'l-0.100i -0.025i' -.sp -1 -\h'2.013i'\v'3.559i'\D'l0.937i 0.250i' -.sp -1 -\h'2.847i'\v'3.807i'\D'l0.103i 0.002i' -.sp -1 -\h'2.860i'\v'3.759i'\D'l0.090i 0.050i' -.sp -1 -\h'3.062i'\v'3.821i'\D'l1.688i 0.188i' -.sp -1 -\h'4.648i'\v'4.023i'\D'l0.102i -0.014i' -.sp -1 -\h'4.653i'\v'3.973i'\D'l0.097i 0.036i' -.sp -1 -\h'2.000i'\v'1.358i'\D'l1.000i 0.126i' -.sp -1 -\h'2.898i'\v'1.496i'\D'l0.102i -0.012i' -.sp -1 -\h'2.904i'\v'1.447i'\D'l0.096i 0.037i' -.sp -1 -\h'3.062i'\v'2.159i'\D'l-0.250i 0.000i' -.sp -1 -\h'2.812i'\v'2.159i'\v'-.13m'\L'1.812i\(br'\v'.13m' -.sp -1 -\h'2.812i'\v'3.971i'\D'l0.125i 0.125i' -.sp -1 -\h'2.849i'\v'4.043i'\D'l0.088i 0.053i' -.sp -1 -\h'2.884i'\v'4.008i'\D'l0.053i 0.088i' -.sp -1 -\h'2.062i'\v'2.783i'\l'0.875i' -.sp -1 -\h'2.837i'\v'2.808i'\D'l0.100i -0.025i' -.sp -1 -\h'2.837i'\v'2.758i'\D'l0.100i 0.025i' -.sp -1 -\h'2.062i'\v'3.783i'\D'l0.813i 0.438i' -.sp -1 -\h'2.775i'\v'4.196i'\D'l0.100i 0.025i' -.sp -1 -\h'2.799i'\v'4.152i'\D'l0.076i 0.069i' -.sp -1 -\h'0.625i'\v'3.533i'\l'0.438i' -.sp -1 -\h'0.963i'\v'3.558i'\D'l0.100i -0.025i' -.sp -1 -\h'0.963i'\v'3.508i'\D'l0.100i 0.025i' -.sp -1 -\h'3.062i'\v'4.346i'\D'l1.625i 0.163i' -.sp -1 -\h'4.585i'\v'4.524i'\D'l0.102i -0.015i' -.sp -1 -\h'4.590i'\v'4.474i'\D'l0.097i 0.035i' -.sp -1 -\h'4.875i'\v'0.034i'\v'-.13m'\L'4.687i\(br'\v'.13m' -.sp -1 -\h'3.062i'\v'4.146i'\D'l1.688i 0.187i' -.sp -1 -\h'4.648i'\v'4.347i'\D'l0.102i -0.014i' -.sp -1 -\h'4.653i'\v'4.297i'\D'l0.097i 0.036i' -.sp -1 -\h'3.062i'\v'2.871i'\D'l1.750i 0.212i' -.sp -1 -\h'4.710i'\v'3.096i'\D'l0.102i -0.013i' -.sp -1 -\h'4.716i'\v'3.046i'\D'l0.096i 0.037i' -.sp -1 -\h'1.250i'\v'0.881i'\h'-0.0m'\v'0.2m'\s10\fRXNextEvent\fP -.sp -1 -\h'1.250i'\v'1.068i'\h'-0.0m'\v'0.2m'\s10\fRXFilterEvent\fP -.sp -1 -\h'4.875i'\h'-0.0m'\v'0.2m'\s12\fRIM Server\fP -.sp -1 -\h'2.437i'\h'-0.0m'\v'0.2m'\s12\fRIM library\fP -.sp -1 -\h'1.250i'\h'-0.0m'\v'0.2m'\s12\fRXlib API\fP -.sp -1 -\h'3.187i'\v'0.881i'\h'-0.0m'\v'0.2m'\s10\fRXIM_FORWARD_EVENT\fP -.sp -1 -\h'5.000i'\v'0.881i'\h'-0.0m'\v'0.2m'\s10\fRsynchronous \fP -.sp -1 -\h'5.000i'\v'1.006i'\h'-0.0m'\v'0.2m'\s10\fRrequest\fP -.sp -1 -\h'0.062i'\v'0.881i'\h'-0.0m'\v'0.2m'\s10\fRKey event\fP -.sp -1 -\h'3.187i'\v'1.131i'\h'-0.0m'\v'0.2m'\s10\fR(synchronous) \fP -.sp -1 -\h'0.062i'\v'1.256i'\h'-0.0m'\v'0.2m'\s10\fRButton press causes\fP -.sp -1 -\h'0.062i'\v'1.381i'\h'-0.0m'\v'0.2m'\s10\fRfocus change\fP -.sp -1 -\h'1.250i'\v'1.381i'\h'-0.0m'\v'0.2m'\s10\fRXSetICFocus\fP -.sp -1 -\h'3.250i'\v'1.006i'\h'-0.0m'\v'0.2m'\s10\fRor XIM_COMMIT\fP -.sp -1 -\h'3.187i'\v'1.443i'\h'-0.0m'\v'0.2m'\s10\fRXIM_FORWARD_EVENT\fP -.sp -1 -\h'3.687i'\v'1.693i'\h'-0.0m'\v'0.2m'\s10\fRXIM_SYNC\fP -.sp -1 -\h'3.375i'\v'2.006i'\h'-0.0m'\v'0.2m'\s10\fRXIM_SYNC_REPLY\fP -.sp -1 -\h'1.250i'\v'2.193i'\h'-0.0m'\v'0.2m'\s10\fRXNextEvent\fP -.sp -1 -\h'1.250i'\v'2.568i'\h'-0.0m'\v'0.2m'\s10\fRXmbLookupString\fP -.sp -1 -\h'1.250i'\v'2.381i'\h'-0.0m'\v'0.2m'\s10\fRXFilterEvent (returns False) \fP -.sp -1 -\v'2.856i'\h'-0.0m'\v'0.2m'\s10\fRthe focus\fP -.sp -1 -\v'2.693i'\h'-0.0m'\v'0.2m'\s10\fRApplication moves\fP -.sp -1 -\h'5.000i'\v'3.068i'\h'-0.0m'\v'0.2m'\s10\fRprocessed\fP -.sp -1 -\h'5.000i'\v'3.193i'\h'-0.0m'\v'0.2m'\s10\fR(The focused\fP -.sp -1 -\h'5.000i'\v'3.318i'\h'-0.0m'\v'0.2m'\s10\fRIC is changed) \fP -.sp -1 -\h'5.000i'\v'3.568i'\h'-0.0m'\v'0.2m'\s10\fRprocessed\fP -.sp -1 -\h'3.125i'\v'3.568i'\h'-0.0m'\v'0.2m'\s10\fRXIM_SYNC_REPLY as a reply\fP -.sp -1 -\h'3.125i'\v'3.731i'\h'-0.0m'\v'0.2m'\s10\fRof the XIM_FORWARD_EVENT\fP -.sp -1 -\h'1.250i'\v'3.568i'\h'-0.0m'\v'0.2m'\s10\fRXNextEvent\fP -.sp -1 -\h'5.000i'\v'4.068i'\h'-0.0m'\v'0.2m'\s10\fRprocessed\fP -.sp -1 -\h'5.000i'\v'1.381i'\h'-0.0m'\v'0.2m'\s10\fRPending\fP -.sp -1 -\h'5.000i'\v'4.256i'\h'-0.0m'\v'0.2m'\s10\fRprocessed\fP -.sp -1 -\h'1.250i'\v'2.818i'\h'-0.0m'\v'0.2m'\s10\fRXSetICFocus\fP -.sp -1 -\h'3.125i'\v'2.443i'\h'-0.0m'\v'0.2m'\s10\fRis started by XIM_COMMIT\fP -.sp -1 -\h'3.125i'\v'2.193i'\h'-0.0m'\v'0.2m'\s10\fRXIM_SET_IC_FOCUS is\fP -.sp -1 -\h'3.125i'\v'2.318i'\h'-0.0m'\v'0.2m'\s10\fRpend because another sync cycle\fP -.sp -1 -\h'2.062i'\v'1.693i'\h'-0.0m'\v'0.2m'\s10\fRsync cycle is done\fP -.sp -1 -\h'2.062i'\v'1.568i'\h'-0.0m'\v'0.2m'\s10\fRPending until\fP -.sp -1 -\v'3.568i'\h'-0.0m'\v'0.2m'\s10\fRKey event\fP -.sp -1 -\h'1.250i'\v'3.756i'\h'-0.0m'\v'0.2m'\s10\fRXFilterEvent\fP -.sp -1 -\h'3.125i'\v'4.631i'\h'-0.0m'\v'0.2m'\s10\fRXIM_FORWARD_EVENT\fP -.sp -1 -\h'3.375i'\v'4.131i'\h'-0.0m'\v'0.2m'\s10\fRXIM_SET_IC_FOCUS\fP -.sp -1 -\h'3.250i'\v'2.818i'\h'-0.0m'\v'0.2m'\s10\fRXIM_SET_IC_FOCUS\fP -.sp -1 -.sp 1+4.721i -.PE -.if \n(00 .fi - -.\"====================== event2 flow figure end ======================= -.ce -.sp -Fig.3 Sample Protocol Flow chart -.LP -.LP -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_FORWARD_EVENT (IM library \(<-\(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:2:BITMASK16:flag -::#0001:synchronous -::#0002:request filtering (*1) -::#0004:request lookupstring (*2) -:2:CARD16:serial number -::XEVENT:X event -.TE -.LP -.IP (*1) -Indicate the receiver should filter events and possible preedit may be invoked. -.IP (*2) -Indicate the receiver should only do lookup string. The IM Server is expected -to just do a conversion of the key event to the best candidate. This bit may -affect the state of the preedit state (e.g. compose of dead key sequences). -.RE -.LP -XEVENT format is same as the X Protocol event format(xEvent). -As the value of xEvent's sequenceNumber is the bottom of 16 bit of XEvent's -xany.serial, the top of 16 bit is sent by serial number(INT16). -.LP -.PN XIM_FORWARD_EVENT -message is used for forwarding the events from the IM library to the IM Server -in order for IM to be able to filter the event. On the other hand, this -message is also used for forwarding the events from the IM Server to the IM -library if the event forwarded from the IM library is not filtered. -The IM Server, which receives -.PN XIM_FORWARD_EVENT -message without synchronous bit, should set synchronous bit. -If both ``request event filtering'' and ``request lookupstring'' flag are -set, then both filtering and lookup should be done for the same event. -.LP -.NH 2 -Synchronizing with the IM Server -.XS -\*(SN Synchronizing with the IM Server -.XE -.LP -.PN XIM_SYNC -message requests to synchronize the IM library and the IM Server. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_SYNC (IM library \(<-\(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -.TE -.RE -.LP -This synchronization can be started either on the IM library side or on the -IM Server side. The side which receives -.PN XIM_SYNC -message should process all XIM requests before replying. The input-context-ID -is necessary to distinguish the IC with which the IM library and the IM -Server are synchronized. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_SYNC_REPLY (IM Server \(<-\(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -.TE -.RE -.LP -The side which receives -.PN XIM_FORWARD_EVENT, -.PN XIM_COMMIT -or any other message with synchronous bit, should process all XIM request -before replying, and send -.PN XIM_SYNC_REPLY -message as the reply to the previous message. -.LP -.NH 2 -Sending a committed string -.XS -\*(SN Sending a committed string -.XE -.LP -When the IM Server commits a string, the IM Server sends either the committed -string or list of KeySym, or both, by -.PN XIM_COMMIT -message. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_COMMIT (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:2:BITMASK16:flag -::#0001:synchronous -::#0002:XLookupChars -::#0004:XLookupKeySym -::#0006: XLookupBoth = XLookupChars | XLookupKeySym -.TE -.LP -If flag is XLookupKeySym, the arguments continue as follows: -.TS -tab(:); -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -:2::unused -:4:KEYSYM:KeySym -.TE -.LP -If flag is XLookupChars, the arguments continue as follows: -.TS -tab(:); -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -:2:m:byte length of committed string -:m:LISTofBYTE:committed string -:p::unused, p = Pad(m) -.TE -.LP -If flag is XLookupBoth, the arguments continue as follows: -.TS -tab(:); -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -:2::unused -:4:KEYSYM:KeySym -:2:n:byte length of committed string -:n:LISTofBYTE:committed string -:p::unused, p = Pad(2+n) -.TE -.RE -.LP -The IM Server which receives -.PN XIM_COMMIT -message without synchronous bit should set synchronous bit. -.LP -.NH 2 -Reset IC -.XS -\*(SN Reset IC -.XE -.LP -.PN XIM_RESET_IC -message requests to reset the status of IC in the IM Server. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_RESET_IC (IM library \(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -.TE -.RE -.LP -.PN XIM_RESET_IC -is a synchronous request. The IM library should wait until receiving either an -.PN XIM_RESET_IC_REPLY -packet or an -.PN XIM_ERROR -packet. -.LP -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_RESET_IC_REPLY (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:2:n:byte length of preedit string -:n:LISTofBYTE:preedit string -:p::unused, p = Pad(2+n) -.TE -.RE -.LP -.PN XIM_RESET_IC_REPLY -message returns the input-context-ID to distinguish replies from multiple ICs. -.LP -.\"============================== Callbacks =============================== -.NH 2 -Callbacks -.XS -\*(SN Callbacks -.XE -.LP -If XIMStyle has XIMPreeditArea or XIMStatusArea set, XIMGeometryCallback -may be used, and if XIMPreeditCallback and/or XIMStatusCallback are set, -corresponding callbacks may be used. -.LP -Any callback request may be sent from an IM Server to an IM client -asynchronously in response to any request previously sent by the IM client -to the IM Server. -.LP -When an IM Server needs to send a callback request synchronously with -the request previously sent by an IM client, the IM Server sends it -before replying to the previous request. -.LP -.NH 3 -Negotiating geometry -.XS -\*(SN Negotiating geometry -.XE -.LP -The IM Server sends -.PN XIM_GEOMETRY -message to start geometry negotiation, if XIMStyle has XIMPreeditArea or -XIMStatusArea set. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_GEOMETRY (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -.TE -.RE -.LP -There is always a single Focus Window, even if some input fields have only -one IC. -.LP -.NH 3 -Converting a string -.XS -\*(SN Converting a string -.XE -.LP -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_STR_CONVERSION (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:2:CARD16:XIMStringConversionPosition -:2::unused -:4:CARD32:XIMCaretDirection -::#0:XIMForwardChar -::#1:XIMBackwardChar -::#2:XIMForwardWord -::#3:XIMBackwardWord -::#4:XIMCaretUp -::#5:XIMCaretDown -::#6:XIMNextLine -::#7:XIMCPreviousLine -::#8:XIMLineStart -::#9:XIMLineEnd -::#10:XIMAbsolutePosition -::#11:XIMDontChange -:2:CARD16:factor -:2:CARD16:XIMStringConversionOperation -::#0001:XIMStringConversionSubstitution -::#0002:XIMStringConversionRetrieval -:2:INT16:T{ -byte length to multiply the XIMStringConversionType -T} -.TE -.RE -.sp -.LP -.PN XIM_STR_CONVERSION -message may be used to start the string conversion from the IM -Server. -.LP -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_STR_CONVERSION_REPLY (IM library \(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:4:CARD32:XIMStringConversionFeedback -::XIMSTRCONVTEXT:XIMStringConversionText -.sp -.TE -.RE -.LP -.PN XIM_STR_CONVERSION_REPLY -message returns the string to be converted and the feedback information array. -.LP -.NH 3 -Preedit Callbacks -.XS -\*(SN Preedit Callbacks -.XE -.LP -The IM Server sends -.PN XIM_PREEDIT_START -message to call the XIMPreeditStartCallback function. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_PREEDIT_START (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -.TE -.RE -.LP -The reply to this message must be sent synchronously. The reply forwards -the return value from the callback function to the IM Server. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_PREEDIT_START_REPLY (IM library \(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:4:INT32:return value -.TE -.RE -.LP -.PN XIM_PREEDIT_START_REPLY -message returns the input-context-ID to distinguish replies from multiple -IC's. The return value contains the return value of the function -XIMPreeditStartCallback. -.LP -The IM Server sends -.PN XIM_PREEDIT_DRAW -message to call the XIMPreeditDrawCallback function. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_PREEDIT_DRAW (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:4:INT32:caret -:4:INT32:chg_first -:4:INT32:chg_length -:4:BITMASK32:status -::#x0000001:no string -::#x0000002:no feedback -:2:n:length of preedit string -:n:STRING8:preedit string -:p::unused, p = Pad(2+n) -:2:m:byte length of feedback array -:2::unused -:m:LISTofXIMFEEDBACK:feedback array -.TE -.RE -.LP -The fields ``caret'', ``chg_first'' and ``chg_length'' correspond to the -fields of XIMPreeditDrawCallbackStruct. -When the ``no string'' bit of the status field is set, the text field of -XIMPreeditDrawCallbackStruct is NULL. -When the ``no feedback'' bit of the status field is set, the text feedback -field of XIMPreeditDrawCallbackStruct is NULL. -When the above bits are not set, ``preedit string'' contains the preedit -string to be displayed, and the feedback array contains feedback information. -.LP -The IM Server sends -.PN XIM_PREEDIT_CARET -message to call the PreeditCaretCallback function. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_PREEDIT_CARET (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:4:INT32:position -:4:CARD32:direction -::#0:XIMForwardChar -::#1:XIMBackwardChar -::#2:XIMForwardWord -::#3:XIMBackwardWord -::#4:XIMCaretUp -::#5:XIMCaretDown -::#6:XIMNextLine -::#7:XIMCPreviousLine -::#8:XIMLineStart -::#9:XIMLineEnd -::#10:XIMAbsolutePosition -::#11:XIMDontChange -:4:CARD32:style -::#0:XIMInvisible -::#1:XIMCPrimary -::#2:XIMSecondary -.TE -.RE -.LP -Each entry corresponds to a field of XIMPreeditCaretCallbackStruct. -Since this callback sets the caret position, its reply must be sent -synchronously. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_PREEDIT_CARET_REPLY (IM library \(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:4:CARD32:position -.TE -.RE -.LP -The position is the value returned by the callback function after it -has been called. -.LP -The IM Server sends -.PN XIM_PREEDIT_DONE -message to call the XIMPreeditDoneCallback function. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_PREEDIT_DONE (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -.TE -.RE -.LP -.NH 3 -Preedit state notify -.XS -\*(SN Preedit state notify -.XE -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_PREEDITSTATE (IM Server \(-> IM Library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:4:BITMASK32:XIMPreeditState -::#x0000000:XIMPreeditUnknown -::#x0000001:XIMPreeditEnable -::#x0000002:XIMPreeditDisable -.TE -.sp -.TE -.RE -.LP -.PN XIM_PREEDITSTATE -message is used to call the XIMPreeditStateNotifyCallback function. -.LP -.NH 3 -Status Callbacks -.XS -\*(SN Status Callbacks -.XE -.LP -The IM Server sends -.PN XIM_STATUS_START -message to call the XIMStatusStartCallback function. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_STATUS_START (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -.TE -.RE -.LP -The IM Server sends -.PN XIM_STATUS_DRAW -message to call the XIMStatusDrawCallback function. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_STATUS_DRAW (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:4:CARD32:type -::#0:XIMTextType -::#1:XIMBitmapType -.TE -.LP -If type is XIMTextType, the arguments continue as follows. -.TS -tab(:); -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -:4:BITMASK32:status -::#x0000001:no string -::#x0000002:no feedback -:2:n:length of status string -:n:STRING8:status string -:p::unused, p = Pad(2+n) -:2:m:byte length of feedback array -:2::unused -:m:LISTofXIMFEEDBACK:feedback array -.TE -.LP -If type is XIMBitmapType, the arguments continue as follows. -.TS -tab(:); -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -:4:PIXMAP:pixmap data -.TE -.RE -.LP -The field ``type'' corresponds to the field in XIMStatusDrawCallbackStruct. -.LP -The IM Server sends -.PN XIM_STATUS_DONE -message to call the XIMStatusDoneCallback function. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_STATUS_DONE (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -.TE -.RE -.LP -.bp -.NH 1 -Acknowledgements -.XS -\*(SN Acknowledgements -.XE -.LP -This document represents the culmination of several years of debate and -experiments done under the auspices of the MIT X Consortium i18n working -group. Although this was a group effort, the author remains responsible -for any errors or omissions. -.LP -We would like to thank to all members of this group. -And we would like to make special thanks to the following people -(in alphabetical order) for their participation in the IM Protocol -design, -Hector Chan, Takashi Fujiwara, Yoshio Horiuchi, Makoto Inada, -Hiromu Inukai, Mickael Kung, Seiji Kuwari, Franky Ling, Hiroyuki Machida, -Hiroyuki Miyamoto, Frank Rojas, Bob Scheifler, Makiko Shimamura, -Shoji Sugiyama, Hidetoshi Tajima, Masaki Takeuchi, Makoto Wakamatsu, -Masaki Wakao, Nobuyuki Tanaka, Shigeru Yamada, Katsuhisa Yano, Jinsoo Yoon. -.LP -.NH 1 -References -.XS -\*(SN References -.XE -.LP -All of the following documents are X Consortium standards available from MIT: -.LP -[1] Scheifler, Robert W., \fI``X Window System Protocol Version 11''\fP -.LP -[2] Scheifler, Robert W. etc., \fI``Xlib \- C Language X Interface''\fP -.LP -.bp -.XS -Appendix A \- Common Extensions -.XE -.ce 10 -.sp 5 -\s+2\fBAppendix A\fP\s-2 -.sp -\s+1\fBCommon Extensions\fP\s-1 -.ce 0 -.sp -.LP -Extension opcodes and packet names (e.g. -.PN XIM_EXT_SET_EVENT_MASK -) for additional extensions may be registered with X Consortium. -The following is a commonly well-known extended packet. -.LP -.LP -.IP \fB(1) -Extension to manipulate the event handling\fP -.LP -.PN XIM_EXT_SET_EVENT_MASK -message specifies the set of event masks that the IM library should manipulate. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_EXT_SET_EVENT_MASK (IM Server \(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:4:EVENTMASK:filter-event-mask (*1) -:4:EVENTMASK:intercept-event-mask (*2) -:4:EVENTMASK:select-event-mask (*3) -:4:EVENTMASK:forward-event-mask (*4) -:4:EVENTMASK:synchronous-event-mask (*5) -.TE -.IP (*1) -Specify the events to be neglected by the IM library via XFilterEvent. -.IP (*2) -Specify the events to be deselected by the IM library with XSelectInput. -.IP (*3) -Specify the events to be selected by the IM library with XSelectInput. -.IP (*4) -Specify all the events to be forwarded to the IM Server by the IM library. -.IP (*5) -Specify the events to be forwarded with synchronous flag on by the IM library. -.RE -.LP -The IM library must reply -.PN XIM_SYNC_REPLY -message to the IM Server. This request is valid after the ic is created. -.LP -.sp -.IP \fB(2) -Extension for improvement of performance\fR -.LP -The following requests may be used for improvement of performance. -.LP -.PN XIM_EXT_FORWARD_KEYEVENT -message may be used instead of -.PN XIM_FORWARD_EVENT -message. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_EXT_FORWARD_KEYEVENT (IM Server \(<-\(-> IM library) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:2:BITMASK16:flag -::#0001:synchronous -:2:CARD16:sequence number -:1:BYTE:xEvent.u.u.type -:1:BYTE:keycode -:2:CARD16:state -:4:CARD32:time -:4:CARD32:window -.TE -.RE -.LP -.bp -.PN XIM_EXT_MOVE -message may be used to change the spot location instead of -.PN -XIM_SET_IC_VALUES -message. -It is effective only if the client specified XIMPreeditPosition. -.RS -.TS -tab(:); -lfB s s s -lw(.25i) lw(.25i) lw(1.75i) lw(3.5i). -XIM_EXT_MOVE (IM library \(-> IM Server) -.sp 6p -:2:CARD16:input-method-ID -:2:CARD16:input-context-ID -:2:INT16:X -:2:INT16:Y -.TE -.RE -.LP -.PN XIM_EXT_MOVE -message is a asynchronous request. -.LP -.bp -.XS -Appendix B \- The list of transport specific IM Server names registered -.XE -.ce 10 -.sp 5 -\s+2\fBAppendix B\fP\s-2 -.sp -\s+1\fBThe list of transport specific IM Server address format registered\fP\s-1 -.ce 0 -.sp -.LP -The following format represents the ATOM contained in -.PN XIM_SERVERS -property and the string returned from the request converting -selection target LOCALES and TRANSPORT. -.DS - ``{@\^\fIcategory\fP\^=[\^\fIvalue\fP,...]}...'' -.DE -.LP -The following categories are currently registered. -.RS -.TS -tab(;); -l l. -\fBserver\fP;: IM Server name (used for XIM_SERVERS) -\fBlocale\fP;: XPG4 locale name (LOCALES) -\fBtransport\fP;: transport-specific name (TRANSPORT) -.TE -.RE -.LP -The preregistered formats for transport-specific names are as follows: -.RS -.LP -\fBTCP/IP Names\fP -.LP -.RS -The following syntax should be used for system internal domain names: -.DS -<\fIlocal name\fP> ::= ``local/''<\fIhostname\fP>``:''<\fIpathname\fP> -.DE -.LP -Where <\fIpathname\fP> is a path name of socket address. -.LP -IM Server's name should be set to <\fIpathname\fP> to run multiple IM Server -at the same time -.LP -The following syntax should be used for Internet domain names: -.DS -<\fITCP name\fP> ::= ``tcp/''<\fIhostname\fP>``:''<\fIipportnumber\fP> -.DE -where <\fIhostname\fP> is either symbolic (such as expo.lcs.mit.edu) or -numeric decimal (such as 18.30.0.212). The <\fIipportnumber\fP> is the -port on which the IM Server is listening for connections. -For example: -.DS -tcp/expo.lcs.mit.edu:8012 -tcp/18.30.0.212:7890 -.DE -.RE -.LP -\fBDECnet Names\fP -.LP -.RS -The following syntax should be used for DECnet names: -.DS -<\fIDECnet name\fP> ::= ``decnet/''<\fInodename\fP>``::IMSERVER$''<\fIobjname\fP> -.DE -where <\fInodename\fP> is either symbolic (such as SRVNOD) or the numeric -decimal form of the DECnet address (such as 44.70). The <\fIobjname\fP> -is normal, case-insensitive DECnet object name. For example: -.DS -DECNET/SRVNOD::IMSERVER$DEFAULT -decnet/44.70::IMSERVER$other -.DE -.RE -.LP -\fBX Names\fP -.LP -.RS -The following syntax should be used for X names: -.DS -<\fIX name\fP> ::= ``X/'' -.DE -.RE -.RE -.LP -If a given category has multiple values, the value is evaluated in order of -setting. -.bp -.XS -Appendix C \- Protocol number -.XE -.ce 10 -.sp 5 -\s+2\fBAppendix C\fP\s-2 -.sp -\s+1\fBProtocol number\fP\s-1 -.ce 0 -.sp -.LP -\fBMajor Protocol number\fP -.TS -center, tab(:); -lw(9c) l. -XIM_CONNECT:#001 -XIM_CONNECT_REPLY:#002 -XIM_DISCONNECT:#003 -XIM_DISCONNECT_REPLY:#004 - -XIM_AUTH_REQUIRED:#010 -XIM_AUTH_REPLY:#011 -XIM_AUTH_NEXT:#012 -XIM_AUTH_SETUP:#013 -XIM_AUTH_NG:#014 - -XIM_ERROR:#020 - -XIM_OPEN:#030 -XIM_OPEN_REPLY:#031 -XIM_CLOSE:#032 -XIM_CLOSE_REPLY:#033 -XIM_REGISTER_TRIGGERKEYS:#034 -XIM_TRIGGER_NOTIFY:#035 -XIM_TRIGGER_NOTIFY_REPLY:#036 -XIM_SET_EVENT_MASK:#037 -XIM_ENCODING_NEGOTIATION:#038 -XIM_ENCODING_NEGOTIATION_REPLY:#039 -XIM_QUERY_EXTENSION:#040 -XIM_QUERY_EXTENSION_REPLY:#041 -XIM_SET_IM_VALUES:#042 -XIM_SET_IM_VALUES_REPLY:#043 -XIM_GET_IM_VALUES:#044 -XIM_GET_IM_VALUES_REPLY:#045 - -XIM_CREATE_IC:#050 -XIM_CREATE_IC_REPLY:#051 -XIM_DESTROY_IC:#052 -XIM_DESTROY_IC_REPLY:#053 -XIM_SET_IC_VALUES:#054 -XIM_SET_IC_VALUES_REPLY:#055 -XIM_GET_IC_VALUES:#056 -XIM_GET_IC_VALUES_REPLY:#057 -XIM_SET_IC_FOCUS:#058 -XIM_UNSET_IC_FOCUS:#059 -XIM_FORWARD_EVENT:#060 -XIM_SYNC:#061 -XIM_SYNC_REPLY:#062 -XIM_COMMIT:#063 -XIM_RESET_IC:#064 -XIM_RESET_IC_REPLY:#065 - -XIM_GEOMETRY:#070 -XIM_STR_CONVERSION:#071 -XIM_STR_CONVERSION_REPLY:#072 -XIM_PREEDIT_START:#073 -XIM_PREEDIT_START_REPLY:#074 -XIM_PREEDIT_DRAW:#075 -XIM_PREEDIT_CARET:#076 -XIM_PREEDIT_CARET_REPLY:#077 -XIM_PREEDIT_DONE:#078 -XIM_STATUS_START:#079 -XIM_STATUS_DRAW:#080 -XIM_STATUS_DONE:#081 -XIM_PREEDITSTATE:#082 -.TE -.sp -(*) The IM Server's extension protocol number should be more than #128. -.bp -.XS -Appendix D \- Implementation Tips -.XE -.ce 10 -.sp 5 -\s+2\fBAppendix D\fP\s-2 -.sp -\s+1\fBImplementation Tips\fP\s-1 -.ce 0 -.sp -.LP -.B -.IP \fB(1) -FrontEnd Method\fP -.LP -FrontEnd method is recognized as a performance acceleration by the -trade off of the variety of the reliability. -.LP -In order to use the FrontEnd method, the IM library must query the IM -Server to see if the FrontEnd extension is available. The query is -made by using the -.PN XIM_QUERY_EXTENSION -message. The IM Server may send -.PN XIM_EXT_SET_EVENT_MASK -message with intercept-event-mask, forward-event-mask, and -synchronous-event-mask values set after replying -.PN XIM_QUERY_EXTENSION_REPLY -message. -.LP -FrontEnd method can be implemented in a couple of ways depending on -how the IM Server utilize -.PN XIM_EXT_SET_EVENT_MASK -message. -.LP -One approach is to update both of the input mask and the filter-event-mask -depending on the preeidting state. The sample protocol sequence using the -static event flow is as follows: -.LP -.\"=================================================================== -.sp -\^... 1.675 6.888 6.237 10.296 -\^... 0.000i 3.408i 4.562i 0.000i -.nr 00 \n(.u -.nf -.PS 3.408i 4.562i -.br -.ps 11 -\h'3.750i'\v'0.034i'\v'-.13m'\L'3.374i\(br'\v'.13m' -.sp -1 -\h'3.912i'\v'1.384i'\D'l-0.100i 0.025i' -.sp -1 -\h'3.912i'\v'1.434i'\D'l-0.100i -0.025i' -.sp -1 -\h'3.812i'\v'1.409i'\l'0.750i' -.sp -1 -\h'3.750i'\h'-0.0m'\v'0.2m'\s12\fRIM Server\fP -.sp -1 -\h'3.812i'\v'0.818i'\h'-0.0m'\v'0.2m'\s10\fRevent mask is changed\fP -.sp -1 -\h'3.812i'\v'1.006i'\h'-0.0m'\v'0.2m'\s10\fRto select the event\fP -.sp -1 -\h'3.875i'\v'2.381i'\h'-0.0m'\v'0.2m'\s10\fRevent mask is changed\fP -.sp -1 -\h'3.875i'\v'2.568i'\h'-0.0m'\v'0.2m'\s10\fRto deselect the event\fP -.sp -1 -\h'3.875i'\v'1.631i'\h'-0.0m'\v'0.2m'\s10\fRX events directly come\fP -.sp -1 -\h'3.875i'\v'1.756i'\h'-0.0m'\v'0.2m'\s10\fRto the IM Server.\fP -.sp -1 -\h'3.875i'\v'2.006i'\h'-0.0m'\v'0.2m'\s10\fRwhen preediting is turning off\fP -.sp -1 -\h'0.625i'\v'0.284i'\l'0.875i' -.sp -1 -\h'1.400i'\v'0.309i'\D'l0.100i -0.025i' -.sp -1 -\h'1.400i'\v'0.259i'\D'l0.100i 0.025i' -.sp -1 -\h'1.750i'\v'0.346i'\l'1.687i' -.sp -1 -\h'3.337i'\v'0.371i'\D'l0.100i -0.025i' -.sp -1 -\h'3.337i'\v'0.321i'\D'l0.100i 0.025i' -.sp -1 -\h'1.850i'\v'2.134i'\D'l-0.100i 0.025i' -.sp -1 -\h'1.850i'\v'2.184i'\D'l-0.100i -0.025i' -.sp -1 -\h'1.750i'\v'2.159i'\l'1.687i' -.sp -1 -\h'1.562i'\v'0.034i'\v'-.13m'\L'3.374i\(br'\v'.13m' -.sp -1 -\h'1.850i'\v'0.446i'\D'l-0.100i 0.025i' -.sp -1 -\h'1.850i'\v'0.496i'\D'l-0.100i -0.025i' -.sp -1 -\h'1.750i'\v'0.471i'\l'1.687i' -.sp -1 -\h'1.687i'\v'0.631i'\h'-0.0m'\v'0.2m'\s10\fRXIM_EXT_SET_EVENT_MASK\fP -.sp -1 -\h'1.875i'\v'0.818i'\h'-0.0m'\v'0.2m'\s10\fRintercept-event-mask is set\fP -.sp -1 -\h'1.687i'\v'2.318i'\h'-0.0m'\v'0.2m'\s10\fRXIM_EXT_SET_EVENT_MASK\fP -.sp -1 -\h'1.875i'\v'2.443i'\h'-0.0m'\v'0.2m'\s10\fRselect-event-mask is set\fP -.sp -1 -\h'0.937i'\h'-0.0m'\v'0.2m'\s12\fRIM library\fP -.sp -1 -\v'0.193i'\h'-0.0m'\v'0.2m'\s10\fRKeys in the on-key-list\fP -.sp -1 -\h'0.250i'\v'2.318i'\h'-0.0m'\v'0.2m'\s10\fRevent mask is changed\fP -.sp -1 -\h'0.250i'\v'2.506i'\h'-0.0m'\v'0.2m'\s10\fRto select the event\fP -.sp -1 -\h'0.250i'\v'1.006i'\h'-0.0m'\v'0.2m'\s10\fRto deselect the event\fP -.sp -1 -\h'0.250i'\v'0.818i'\h'-0.0m'\v'0.2m'\s10\fRevent mask is changed\fP -.sp -1 -\h'1.812i'\v'0.256i'\h'-0.0m'\v'0.2m'\s10\fRXIM_FORWARD_EVENT\fP -.sp -1 -.sp 1+3.408i -.PE -.if \n(00 .fi -.sp -.\"=================================================================== -.LP -To pursuit a maximum performance regardless of the preediting mode, -the IM Server may use the dynamic event flow with the following -sample protocol sequence. -.bp -.LP -.\"=================================================================== -\^... 1.675 6.888 6.237 10.296 -\^... 0.000i 3.408i 4.562i 0.000i -.nr 00 \n(.u -.nf -.PS 3.408i 4.562i -.br -.ps 11 -\h'3.750i'\v'0.034i'\v'-.13m'\L'3.374i\(br'\v'.13m' -.sp -1 -\h'3.912i'\v'1.384i'\D'l-0.100i 0.025i' -.sp -1 -\h'3.912i'\v'1.434i'\D'l-0.100i -0.025i' -.sp -1 -\h'3.812i'\v'1.409i'\l'0.750i' -.sp -1 -\h'3.750i'\h'-0.0m'\v'0.2m'\s12\fRIM Server\fP -.sp -1 -\h'3.812i'\v'0.818i'\h'-0.0m'\v'0.2m'\s10\fRevent mask is changed\fP -.sp -1 -\h'3.812i'\v'1.006i'\h'-0.0m'\v'0.2m'\s10\fRto select the event\fP -.sp -1 -\h'3.875i'\v'2.381i'\h'-0.0m'\v'0.2m'\s10\fRevent mask is changed\fP -.sp -1 -\h'3.875i'\v'2.568i'\h'-0.0m'\v'0.2m'\s10\fRto deselect the event\fP -.sp -1 -\h'3.875i'\v'1.631i'\h'-0.0m'\v'0.2m'\s10\fRX events directly come\fP -.sp -1 -\h'3.875i'\v'1.756i'\h'-0.0m'\v'0.2m'\s10\fRto the IM Server.\fP -.sp -1 -\h'3.875i'\v'2.006i'\h'-0.0m'\v'0.2m'\s10\fRwhen preediting is turning off\fP -.sp -1 -\h'0.625i'\v'0.284i'\l'0.875i' -.sp -1 -\h'1.400i'\v'0.309i'\D'l0.100i -0.025i' -.sp -1 -\h'1.400i'\v'0.259i'\D'l0.100i 0.025i' -.sp -1 -\h'1.750i'\v'0.346i'\l'1.687i' -.sp -1 -\h'3.337i'\v'0.371i'\D'l0.100i -0.025i' -.sp -1 -\h'3.337i'\v'0.321i'\D'l0.100i 0.025i' -.sp -1 -\h'1.850i'\v'1.196i'\D'l-0.100i 0.025i' -.sp -1 -\h'1.850i'\v'1.246i'\D'l-0.100i -0.025i' -.sp -1 -\h'1.750i'\v'1.221i'\l'1.687i' -.sp -1 -\h'1.850i'\v'2.134i'\D'l-0.100i 0.025i' -.sp -1 -\h'1.850i'\v'2.184i'\D'l-0.100i -0.025i' -.sp -1 -\h'1.750i'\v'2.159i'\l'1.687i' -.sp -1 -\h'1.562i'\v'0.034i'\v'-.13m'\L'3.374i\(br'\v'.13m' -.sp -1 -\h'1.850i'\v'0.446i'\D'l-0.100i 0.025i' -.sp -1 -\h'1.850i'\v'0.496i'\D'l-0.100i -0.025i' -.sp -1 -\h'1.750i'\v'0.471i'\l'1.687i' -.sp -1 -\h'1.812i'\v'0.256i'\h'-0.0m'\v'0.2m'\s10\fRXIM_TRIGGER_NOTIFY\fP -.sp -1 -\h'1.687i'\v'1.068i'\h'-0.0m'\v'0.2m'\s10\fRXIM_TRIGGER_NOTIFY_REPLY\fP -.sp -1 -\h'1.687i'\v'0.631i'\h'-0.0m'\v'0.2m'\s10\fRXIM_EXT_SET_EVENT_MASK\fP -.sp -1 -\h'1.875i'\v'0.818i'\h'-0.0m'\v'0.2m'\s10\fRintercept-event-mask is set\fP -.sp -1 -\h'1.687i'\v'2.318i'\h'-0.0m'\v'0.2m'\s10\fRXIM_EXT_SET_EVENT_MASK\fP -.sp -1 -\h'1.875i'\v'2.443i'\h'-0.0m'\v'0.2m'\s10\fRselect-event-mask is set\fP -.sp -1 -\h'0.937i'\h'-0.0m'\v'0.2m'\s12\fRIM library\fP -.sp -1 -\v'0.193i'\h'-0.0m'\v'0.2m'\s10\fRKeys in the on-key-list\fP -.sp -1 -\h'0.250i'\v'2.318i'\h'-0.0m'\v'0.2m'\s10\fRevent mask is changed\fP -.sp -1 -\h'0.250i'\v'2.506i'\h'-0.0m'\v'0.2m'\s10\fRto select the event\fP -.sp -1 -\h'0.250i'\v'1.006i'\h'-0.0m'\v'0.2m'\s10\fRto deselect the event\fP -.sp -1 -\h'0.250i'\v'0.818i'\h'-0.0m'\v'0.2m'\s10\fRevent mask is changed\fP -.sp -1 -.sp 1+3.408i -.PE -.if \n(00 .fi -.\"=================================================================== -.LP -This method can reduce the XIM protocol traffic dramatically -by updating intercept-event-mask and select-event-mask accordingly. -The tradeoff of this performance improvement is that the key -events may be lost or disordered in some particular situation, such as -when the user types the keyboard in following sequence really fast: -.sp 6p -.RS -<preediting on key>``some strings''<preediting off key>``another string'' -.RE -.sp 6p -Since this method requires the input mask updates to the both the IM Server -and Xlib when turning on and off the preediting, and there is a time lag -till the requests take effect when two client issues the input mask updates -simultaneously. -.LP -Another approach of the FrontEnd method is to update the filter-event-mask -depending on the preediting state and not to update the input mask. -The IM Server must register both of the preediting on key list and off key -list by -.PN XIM_REGISTER_TRIGGERKEYS -message. -In this method, Both the IM Server and the IM client select the same -events on the same client's window, so that the events are delivered -to both of the IM Server and the client. The preediting on and off -states are expressed by whether the key events are filtered or not. -The sample protocol sequence are as follows: -.LP -.bp -<<Using static event flow>> -.LP -.\"==================================================================== -.sp -\^... 1.488 7.325 6.487 10.358 -\^... 0.000i 3.033i 4.999i 0.000i -.nr 00 \n(.u -.nf -.PS 3.033i 4.999i -.br -.ps 11 -\h'4.099i'\v'0.383i'\D'l-0.100i 0.025i' -.sp -1 -\h'4.099i'\v'0.433i'\D'l-0.100i -0.025i' -.sp -1 -\h'3.999i'\v'0.408i'\l'1.000i' -.sp -1 -\h'4.099i'\v'1.696i'\D'l-0.100i 0.025i' -.sp -1 -\h'4.099i'\v'1.746i'\D'l-0.100i -0.025i' -.sp -1 -\h'3.999i'\v'1.721i'\l'1.000i' -.sp -1 -\h'3.937i'\v'0.096i'\v'-.13m'\L'2.937i\(br'\v'.13m' -.sp -1 -\h'3.937i'\v'0.062i'\h'-0.0m'\v'0.2m'\s12\fRIM Server\fP -.sp -1 -\h'4.062i'\v'0.755i'\h'-0.0m'\v'0.2m'\s10\fRthe specified events\fP -.sp -1 -\h'4.062i'\v'0.943i'\h'-0.0m'\v'0.2m'\s10\fRare being processed\fP -.sp -1 -\h'4.062i'\v'2.255i'\h'-0.0m'\v'0.2m'\s10\fRthe specified events\fP -.sp -1 -\h'4.062i'\v'2.443i'\h'-0.0m'\v'0.2m'\s10\fRare being discarded\fP -.sp -1 -\h'4.249i'\v'1.568i'\h'-0.0m'\v'0.2m'\s10\fRKeys in the off-key-list\fP -.sp -1 -\h'4.187i'\v'0.318i'\h'-0.0m'\v'0.2m'\s10\fRKeys in the on-key-list\fP -.sp -1 -\h'0.812i'\v'0.346i'\l'0.875i' -.sp -1 -\h'1.587i'\v'0.371i'\D'l0.100i -0.025i' -.sp -1 -\h'1.587i'\v'0.321i'\D'l0.100i 0.025i' -.sp -1 -\h'1.937i'\v'0.408i'\l'1.687i' -.sp -1 -\h'3.524i'\v'0.433i'\D'l0.100i -0.025i' -.sp -1 -\h'3.524i'\v'0.383i'\D'l0.100i 0.025i' -.sp -1 -\h'1.749i'\v'0.096i'\v'-.13m'\L'2.937i\(br'\v'.13m' -.sp -1 -\h'2.037i'\v'0.508i'\D'l-0.100i 0.025i' -.sp -1 -\h'2.037i'\v'0.558i'\D'l-0.100i -0.025i' -.sp -1 -\h'1.937i'\v'0.533i'\l'1.687i' -.sp -1 -\h'0.812i'\v'1.721i'\l'0.875i' -.sp -1 -\h'1.587i'\v'1.746i'\D'l0.100i -0.025i' -.sp -1 -\h'1.587i'\v'1.696i'\D'l0.100i 0.025i' -.sp -1 -\h'2.099i'\v'1.758i'\D'l-0.100i 0.025i' -.sp -1 -\h'2.099i'\v'1.808i'\D'l-0.100i -0.025i' -.sp -1 -\h'1.999i'\v'1.783i'\l'1.688i' -.sp -1 -\h'1.874i'\v'0.693i'\h'-0.0m'\v'0.2m'\s10\fRXIM_EXT_SET_EVENT_MASK\fP -.sp -1 -\v'0.255i'\h'-0.0m'\v'0.2m'\s10\fRKeys in the on-key-list\fP -.sp -1 -\h'2.062i'\v'0.880i'\h'-0.0m'\v'0.2m'\s10\fRfilter-event-mask is set\fP -.sp -1 -\h'0.624i'\v'0.755i'\h'-0.0m'\v'0.2m'\s10\fRthe specified events\fP -.sp -1 -\h'0.624i'\v'0.943i'\h'-0.0m'\v'0.2m'\s10\fRare being filtered\fP -.sp -1 -\h'1.937i'\v'1.943i'\h'-0.0m'\v'0.2m'\s10\fRXIM_EXT_SET_EVENT_MASK\fP -.sp -1 -\h'2.124i'\v'2.068i'\h'-0.0m'\v'0.2m'\s10\fRfilter-event-mask is set\fP -.sp -1 -\h'0.062i'\v'1.568i'\h'-0.0m'\v'0.2m'\s10\fRKeys in the off-key-list\fP -.sp -1 -\h'1.062i'\h'-0.0m'\v'0.2m'\s12\fRIM library\fP -.sp -1 -\h'0.624i'\v'2.255i'\h'-0.0m'\v'0.2m'\s10\fRthe specified events\fP -.sp -1 -\h'0.624i'\v'2.443i'\h'-0.0m'\v'0.2m'\s10\fRare being processed\fP -.sp -1 -\h'1.999i'\v'0.318i'\h'-0.0m'\v'0.2m'\s10\fRXIM_FORWARD_EVENT\fP -.sp -1 -.sp 1+3.033i -.PE -.if \n(00 .fi -.\"==================================================================== -.LP -<<Using the dynamic event flow>> -.LP -.\"==================================================================== -\^... 1.488 7.325 6.487 10.358 -\^... 0.000i 3.033i 4.999i 0.000i -.nr 00 \n(.u -.nf -.PS 3.033i 4.999i -.br -.ps 11 -\h'4.099i'\v'0.383i'\D'l-0.100i 0.025i' -.sp -1 -\h'4.099i'\v'0.433i'\D'l-0.100i -0.025i' -.sp -1 -\h'3.999i'\v'0.408i'\l'1.000i' -.sp -1 -\h'4.099i'\v'1.696i'\D'l-0.100i 0.025i' -.sp -1 -\h'4.099i'\v'1.746i'\D'l-0.100i -0.025i' -.sp -1 -\h'3.999i'\v'1.721i'\l'1.000i' -.sp -1 -\h'3.937i'\v'0.096i'\v'-.13m'\L'2.937i\(br'\v'.13m' -.sp -1 -\h'3.937i'\v'0.062i'\h'-0.0m'\v'0.2m'\s12\fRIM Server\fP -.sp -1 -\h'4.062i'\v'0.755i'\h'-0.0m'\v'0.2m'\s10\fRthe specified events\fP -.sp -1 -\h'4.062i'\v'0.943i'\h'-0.0m'\v'0.2m'\s10\fRare being processed\fP -.sp -1 -\h'4.062i'\v'2.255i'\h'-0.0m'\v'0.2m'\s10\fRthe specified events\fP -.sp -1 -\h'4.062i'\v'2.443i'\h'-0.0m'\v'0.2m'\s10\fRare being discarded\fP -.sp -1 -\h'4.249i'\v'1.568i'\h'-0.0m'\v'0.2m'\s10\fRKeys in the off-key-list\fP -.sp -1 -\h'4.187i'\v'0.318i'\h'-0.0m'\v'0.2m'\s10\fRKeys in the on-key-list\fP -.sp -1 -\h'0.812i'\v'0.346i'\l'0.875i' -.sp -1 -\h'1.587i'\v'0.371i'\D'l0.100i -0.025i' -.sp -1 -\h'1.587i'\v'0.321i'\D'l0.100i 0.025i' -.sp -1 -\h'1.937i'\v'0.408i'\l'1.687i' -.sp -1 -\h'3.524i'\v'0.433i'\D'l0.100i -0.025i' -.sp -1 -\h'3.524i'\v'0.383i'\D'l0.100i 0.025i' -.sp -1 -\h'2.037i'\v'1.258i'\D'l-0.100i 0.025i' -.sp -1 -\h'2.037i'\v'1.308i'\D'l-0.100i -0.025i' -.sp -1 -\h'1.937i'\v'1.283i'\l'1.687i' -.sp -1 -\h'1.749i'\v'0.096i'\v'-.13m'\L'2.937i\(br'\v'.13m' -.sp -1 -\h'2.037i'\v'0.508i'\D'l-0.100i 0.025i' -.sp -1 -\h'2.037i'\v'0.558i'\D'l-0.100i -0.025i' -.sp -1 -\h'1.937i'\v'0.533i'\l'1.687i' -.sp -1 -\h'0.812i'\v'1.721i'\l'0.875i' -.sp -1 -\h'1.587i'\v'1.746i'\D'l0.100i -0.025i' -.sp -1 -\h'1.587i'\v'1.696i'\D'l0.100i 0.025i' -.sp -1 -\h'2.099i'\v'1.758i'\D'l-0.100i 0.025i' -.sp -1 -\h'2.099i'\v'1.808i'\D'l-0.100i -0.025i' -.sp -1 -\h'1.999i'\v'1.783i'\l'1.688i' -.sp -1 -\h'1.999i'\v'0.318i'\h'-0.0m'\v'0.2m'\s10\fRXIM_TRIGGER_NOTIFY\fP -.sp -1 -\h'1.874i'\v'1.130i'\h'-0.0m'\v'0.2m'\s10\fRXIM_TRIGGER_NOTIFY_REPLY\fP -.sp -1 -\h'1.874i'\v'0.693i'\h'-0.0m'\v'0.2m'\s10\fRXIM_EXT_SET_EVENT_MASK\fP -.sp -1 -\v'0.255i'\h'-0.0m'\v'0.2m'\s10\fRKeys in the on-key-list\fP -.sp -1 -\h'2.062i'\v'0.880i'\h'-0.0m'\v'0.2m'\s10\fRfilter-event-mask is set\fP -.sp -1 -\h'0.624i'\v'0.755i'\h'-0.0m'\v'0.2m'\s10\fRthe specified events\fP -.sp -1 -\h'0.624i'\v'0.943i'\h'-0.0m'\v'0.2m'\s10\fRare being filtered\fP -.sp -1 -\h'1.937i'\v'1.943i'\h'-0.0m'\v'0.2m'\s10\fRXIM_EXT_SET_EVENT_MASK\fP -.sp -1 -\h'2.124i'\v'2.068i'\h'-0.0m'\v'0.2m'\s10\fRfilter-event-mask is set\fP -.sp -1 -\h'0.062i'\v'1.568i'\h'-0.0m'\v'0.2m'\s10\fRKeys in the off-key-list\fP -.sp -1 -\h'1.062i'\h'-0.0m'\v'0.2m'\s12\fRIM library\fP -.sp -1 -\h'0.624i'\v'2.255i'\h'-0.0m'\v'0.2m'\s10\fRthe specified events\fP -.sp -1 -\h'0.624i'\v'2.443i'\h'-0.0m'\v'0.2m'\s10\fRare being processed\fP -.sp -1 -.sp 1+3.033i -.PE -.if \n(00 .fi - -.\"==================================================================== -.LP -This method does not have the problem of the time lag when going across -the preediting on and off mode, however, the amount of the performance -acceleration is not as good as the method described above. -.LP -In general, the FrontEnd method requires some synchronization to some -of the X protocols, such as the ChangeWindowAttribute protocol for the -event mask change or the GrabKey protocol, since it relies on the X's -principal event dispatching mechanism. Any X protocol bindings do not -consider the synchronization might cause some mis-synchronization -between the IM clients and the IM Server. -.LP -.bp -.IP \fB(2) -Transport Layer\fP -.LP -The Xlib XIM implementation is layered into three functions, a protocol -layer, an interface layer and a transport layer. The purpose of this -layering is to make the protocol independent of transport implementation. -Each function of these layers are: -.RS 3 -.IP "\fIThe protocol layer\fP" -.br -implements overall function of XIM and calls the interface layer -functions when it needs to communicate to IM Server. -.IP "\fIThe interface layer\fP" -.br -separates the implementation of the transport layer from the protocol -layer, in other words, it provides implementation independent hook for -the transport layer functions. -.IP "\fIThe transport layer\fP" -.br -handles actual data communication with IM Server. It is done by a set -of several functions named transporters. -.RE -.LP -The interface layer and the transport layer make various communication -channels usable such as X Protocol, TCP/IP, DECnet or STREAM. -The following is a sample implementation for the transporter using -the X connection. -Refer to "xtrans" for the transporter using Socket Transport. -.LP -At the beginning of the X Transport connection for the XIM transport -mechanism, two different windows must be created either in an Xlib XIM -or in an IM Server, with which the Xlib and the IM Server exchange the -XIM transports by using the ClientMessage events and Window Properties. -In the following, the window created by the Xlib is referred as the -"client communication window", and on the other hand, the window created -by the IM Server is referred as the "IMS communication window". -.LP -.B -Connection -.LP -.RS -In order to establish a connection, a communication window is created. -A ClientMessage in the following event's format is sent to the owner -window of XIM_SERVER selection, which the IM Server has created. -.LP -Refer to "The Input Method Protocol" for the XIM_SERVER atom. -.LP -.ce -Table D-1; The ClientMessage sent to the IMS window. -.TS H -tab(:); -l s|l -l l|l. -_ -.sp 6p -.B -Structure Member:Contents -.sp 6p -_ -.sp 6p -.TH -.R -int:type:ClientMessage -u_long:serial:Set by the X Window System -Bool:send_event:Set by the X Window System -Display:*display:The display to which connects -Window:window:IMS Window ID -Atom:message_type:XInternAtom(display, ``_XIM_XCONNECT'', False) -int:format:32 -long:data.l[0]:client communication window ID -long:data.l[1]:client-major-transport-version (*1) -long:data.l[2]:client-major-transport-version (*1) -.sp 6p -_ -.TE -.LP -In order to establish the connection (to notify the IM Server communication -window), the IM Server sends a ClientMessage in the following event's -format to the client communication window. -.LP -.bp -.ce -Table D-2; The ClientMessage sent by IM Server. -.TS H -tab(:); -l s | l -l l | l. -_ -.sp 6p -.B -Structure Member:Contents -.sp 6p -_ -.sp 6p -.TH -.R -int:type:ClientMessage -u_long:serial:Set by the X Window System -Bool:send_event:Set by the X Window System -Display:*display:The display to which connects -Window:window:client communication window ID -Atom:message_type:XInternAtom(display, ``_XIM_XCONNECT'', False) -int:format:32 -long:data.l[0]:IMS communication window ID -long:data.l[1]:server-major-transport-version (*1) -long:data.l[2]:server-minor-transport-version (*1) -long:data.l[3]:dividing size between ClientMessage and Property (*2) -.sp 6p -_ -.TE -.LP -.IP (*1) -major/minor-transport-version -.RS -The read/write method is decided by the combination of -major/minor-transport-version, as follows: -.LP -.ce -Table D-3; The read/write method and the major/minor-transport-version -.TS -center, tab(:); -| c s | l | -| c | c | l |. -_ -.sp 6p -.B -Transport-version:read/write -.sp 6p -_ -.sp 6p -major:minor: -.sp 6p -_ -.sp 6p -.R -0:0:only-CM & Property-with-CM -:1:only-CM & multi-CM -:2:only-CM & multi-CM & Property-with-CM -.sp 6p -_ -.sp 6p -1:0:PropertyNotify -.sp 6p -_ -.sp 6p -2:0:only-CM & PropertyNotify -:1:only-CM & multi-CM & PropertyNotify -.sp 6p -_ -.TE -.LP -.RS -.TS -center, tab(;); -l n l. -only-CM;:;data is sent via a ClientMessage -multi-CM;:;data is sent via multiple ClientMessages -Property-with-CM;:;T{ -data is written in Property, and its Atom is send via ClientMessage -T} -PropertyNotify;:;T{ -data is written in Property, and its Atom is send via PropertyNotify -T} -.TE -.RE -.LP -The method to decide major/minor-transport-version is as follows: -.LP -.IP (1) -The client sends 0 as major/minor-transport-version to the IM Server. -The client must support all methods in Table D-3. -The client may send another number as major/minor-transport-version to -use other method than the above in the future. -.IP (2) -The IM Server sends its major/minor-transport-version number to -the client. The client sends data using the method specified by the -IM Server. -.IP (3) -If major/minor-transport-version number is not available, it is regarded -as 0. -.RE -.LP -.IP (*2) -dividing size between ClientMessage and Property -.RS -If data is sent via both of multi-CM and Property, specify the dividing -size between ClientMessage and Property. The data, which is smaller than -this size, is sent via multi-CM (or only-CM), and the data, which is -lager than this size, is sent via Property. -.RE -.RE -.LP -.sp -.LP -.B -read/write -.LP -.RS -The data is transferred via either ClientMessage or Window Property in -the X Window System. -.LP -.B -Format for the data from the Client to the IM Server -.LP -.RS -.B -ClientMessage -.LP -If data is sent via ClientMessage event, the format is as follows: -.LP -.ce -Table D-4; The ClientMessage event's format (first or middle) -.TS -tab(;); -l s | l -l l | l. -_ -.sp 6p -.B -Structure Member;Contents -.sp 6p -_ -.sp 6p -.R -int;type;ClientMessage -u_long;serial;Set by the X Window System -Bool;send_event;Set by the X Window System -Display;*display;The display to which connects -Window;window;IMS communication window ID -Atom;message_type;XInternAtom(display, ``_XIM_MOREDATA'', False) -int;format;8 -char;data.b[20];(read/write DATA : 20 byte) -.sp 6p -_ -.TE -.LP -.ce -Table D-5; The ClientMessage event's format (only or last) -.TS H -tab(;); -l s | l -l l | l. -_ -.sp 6p -.B -Structure Member;Contents -.sp 6p -_ -.sp 6p -.TH -.R -int;type;ClientMessage -u_long;serial;Set by the X Window System -Bool;send_event;Set by the X Window System -Display;*display;The display to which connects -Window;window;IMS communication window ID -Atom;message_type;XInternAtom(display, ``_XIM_PROTOCOL'', False) -int;format;8 -char;data.b[20];(read/write DATA : MAX 20 byte) (*1) -.sp 6p -_ -.TE -.IP (*1) -If the data is smaller than 20 byte, all data other than available data -must be 0. -.RE -.LP -.RS -.B -Property -.LP -In the case of large data, data will be sent via the Window Property -for the efficiency. There are the following two methods to notify -Property, and transport-version is decided which method is used. -.LP -.IP (1) -The XChangeProperty function is used to store data in the client -communication window, and Atom of the stored data is notified to the -IM Server via ClientMessage event. -.IP (2) -The XChangeProperty function is used to store data in the client -communication window, and Atom of the stored data is notified to the -IM Server via PropertyNotify event. -.LP -The arguments of the XChangeProperty are as follows: -.LP -.bp -.ce -Table D-6; The XChangeProperty event's format -.TS H -tab(:); -l s | l -l l | l. -_ -.sp 6p -.B -Argument:Contents -.sp 6p -_ -.sp 6p -.TH -.R -Display:*display:The display to which connects -Window:window:IMS communication window ID -Atom:property:read/write property Atom (*1) -Atom:type:XA_STRING -int:format:8 -int:mode:PropModeAppend -u_char:*data:read/write DATA -int:nelements:length of DATA -.sp 6p -_ -.TE -.LP -.IP (*1) -The read/write property ATOM allocates the following strings by -\fBXInternAtom\fP. -.RS -``_clientXXX'' -.RE -.LP -The client changes the property with the mode of PropModeAppend and -the IM Server will read it with the delete mode i.e. (delete = True). -.LP -If Atom is notified via ClientMessage event, the format of the ClientMessage -is as follows: -.LP -.ce -Table D-7; The ClientMessage event's format to send Atom of property -.TS H -tab(:); -l s | l -l l | l. -_ -.sp 6p -.B -Structure Member:Contents -.sp 6p -_ -.sp 6p -.TH -.R -int:type:ClientMessage -u_long:serial:Set by the X Window System -Bool:send_event:Set by the X Window System -Display:*display:The display to which connects -Window:window:IMS communication window ID -Atom:message_type:XInternAtom(display, ``_XIM_PROTOCOL'', False) -int:format:32 -long:data.l[0]:length of read/write property Atom -long:data.l[1]:read/write property Atom -.sp 6p -_ -.TE -.RE -.LP -.B -Format for the data from the IM Server to the Client -.LP -.RS -.B -ClientMessage -.LP -The format of the ClientMessage is as follows: -.LP -.ce -Table D-8; The ClientMessage event's format (first or middle) -.TS H -tab(;); -l s | l -l l | l. -_ -.sp 6p -.B -Structure Member;Contents -.sp 6p -_ -.sp 6p -.TH -.R -int;type;ClientMessage -u_long;serial;Set by the X Window System -Bool;send_event ;Set by the X Window System -Display;*display;The display to which connects -Window;window;client communication window ID -Atom;message_type;XInternAtom(display, ``_XIM_MOREDATA'', False) -int;format;8 -char;data.b[20];(read/write DATA : 20 byte) -.sp 6p -_ -.TE -.LP -.bp -.ce -Table D-9; The ClientMessage event's format (only or last) -.TS -tab(;); -l s | l -l l | l. -_ -.sp 6p -.B -Structure Member;Contents -.sp 6p -_ -.sp 6p -.R -int;type;ClientMessage -u_long;serial;Set by the X Window System -Bool;send_event ;Set by the X Window System -Display;*display;The display to which connects -Window;window;client communication window ID -Atom;message_type;XInternAtom(display, ``_XIM_PROTOCOL'', False) -int;format;8 -char;data.b[20];(read/write DATA : MAX 20 byte) (*1) -.sp 6p -_ -.TE -.LP -.IP (*1) -If the data size is smaller than 20 bytes, all data other than available -data must be 0. -.LP -.B -Property -.LP -In the case of large data, data will be sent via the Window Property -for the efficiency. There are the following two methods to notify -Property, and transport-version is decided which method is used. -.LP -.IP (1) -The XChangeProperty function is used to store data in the IMS -communication window, and Atom of the property is sent via the -ClientMessage event. -.IP (2) -The XChangeProperty function is used to store data in the IMS -communication window, and Atom of the property is sent via -PropertyNotify event. -.LP -The arguments of the XChangeProperty are as follows: -.LP -.ce -Table D-10; The XChangeProperty event's format -.TS H -tab(:); -l s | l -l l | l. -_ -.sp 6p -.B -Argument:Contents -.sp 6p -_ -.sp 6p -.TH -.R -Display:*display:The display which to connects -Window:window:client communication window ID -Atom:property:read/write property Atom (*1) -Atom:type:XA_STRING -int:format:8 -int:mode:PropModeAppend -u_char:*data:read/write DATA -int:nelements:length of DATA -.sp 6p -_ -.TE -.LP -.IP (*1) -The read/write property ATOM allocates some strings, which are not -allocated by the client, by \fBXInternAtom\fP. -.LP -The IM Server changes the property with the mode of PropModeAppend and -the client reads it with the delete mode, i.e. (delete = True). -.LP -If Atom is notified via ClientMessage event, the format of the ClientMessage -is as follows: -.LP -.bp -.ce -Table D-11; The ClientMessage event's format to send Atom of property -.TS H -tab(:); -l s | l -l l | l. -_ -.sp 6p -.B -Structure Member:Contents -.sp 6p -_ -.sp 6p -.TH -.R -int:type:ClientMessage -u_long:serial:Set by the X Window System -Bool:send_event:Set by the X Window System -Display:*display:The display to which connects -Window:window:client communication window ID -Atom:message_type:XInternAtom(display, ``_XIM_PROTOCOL'', False) -int:format:32 -long:data.l[0]:length of read/write property ATOM -long:data.l[1]:read/write property ATOM -.sp 6p -_ -.TE -.RE -.RE -.LP -.B -Closing Connection -.RS -.LP -If the client disconnect with the IM Server, shutdown function should -free the communication window properties and etc.. -.RE -.LP -.bp -.EH '''' -.OH '''' -.EF '''' -.OF '''' -.TC - diff --git a/libX11/specs/XIM/xim.xml b/libX11/specs/XIM/xim.xml new file mode 100644 index 000000000..66d559b07 --- /dev/null +++ b/libX11/specs/XIM/xim.xml @@ -0,0 +1,3918 @@ +<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+
+
+<!-- lifted from troff+ms+XMan by doclifter -->
+<book id="smlibms">
+
+<bookinfo>
+ <title>The Input Method Protocol</title>
+ <subtitle>X Consortium Standard</subtitle>
+ <releaseinfo>X Version 11, Release 6.4</releaseinfo>
+ <authorgroup>
+ <othercredit>
+ <firstname>Masahiko</firstname><surname>Narita</surname>
+ <affiliation><orgname>FUJITSU Limited.</orgname></affiliation>
+ </othercredit>
+ <othercredit>
+ <firstname>Hideki</firstname><surname>Hiura</surname>
+ <affiliation><orgname>SunSoft, Inc.</orgname></affiliation>
+ </othercredit>
+ </authorgroup>
+ <corpname>X Consortium Standard</corpname>
+ <copyright><year>1993</year><holder>X Consortium</holder></copyright>
+ <copyright><year>1994</year><holder>X Consortium</holder></copyright>
+ <copyright><year>1993</year><holder>FUJITSU LIMITED</holder></copyright>
+ <copyright><year>1994</year><holder>FUJITSU LIMITED</holder></copyright>
+ <copyright><year>1993</year><holder>Sun Microsystems</holder></copyright>
+ <copyright><year>1994</year><holder>Sun Microsystems</holder></copyright>
+ <releaseinfo>Version 1.0</releaseinfo>
+ <affiliation><orgname>X Consortium</orgname></affiliation>
+ <productnumber>X Version 11, Release 7</productnumber>
+
+<abstract>
+<para>
+This specifies a protocol between IM library and IM (Input Method) Server for internationalized text input, which is indepedent from any specific language, any specific input method and the transport layer used in communication between the IM library and the IM Server, and uses a client-server model. This protocol allows user to use his/her favorite method for all applications within the stand-along distrubuted environment.
+</para>
+</abstract>
+
+<legalnotice>
+<para>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:</para>
+
+<para>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</para>
+
+<para>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 X CONSORTIUM 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.</para>
+
+<para>Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium.</para>
+
+<para>X Window System is a trademark of The Open Group.</para>
+
+<para>Permission to use,copy and distribute this documetation for any purpose and without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. Fujitsu and Sun Microsystems make no representation about the suitability for any purpose of the information in this documen. This documentation is provided as is without express implied warranty.
+</para>
+
+</legalnotice>
+
+</bookinfo>
+
+<chapter><title>TITLE</title>
+<sect1 id="Introduction">
+<title>Introduction</title>
+<sect2 id="Scope">
+<title>Scope</title>
+<!-- .XS -->
+<!-- (SN Scope -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+The internationalization in the
+X Window System
+Version 11, Release 5 (X11R5) provides a common API which application
+developers can use to create portable internationalized programs and to
+adapt them to the requirements of different native languages, local customs,
+and character string encodings (this is called "localization").
+As one of its internationalization mechanisms X11R5 has defined a functional
+interface for internationalized text input, called XIM (X Input Method).
+</para>
+<para>
+<!-- .LP -->
+When a client-server model is used with an IM (Input Method) implementation,
+a protocol must be established between the client and the server.
+However, the protocol used to interface Input Method Servers (IM Servers)
+with the Input Method libraries (IM libraries) to which applications are
+linked was not addressed in X11R5.
+This led application developers to depend on vendor-specific input methods,
+decreased the user's choice of available input methods, and made it more
+difficult for developers to create portable applications. This paper describes
+the Input Method Protocol developed for X11R6 to resolve the above problems
+and to address the requirements of existing and future input methods.
+</para>
+<para>
+<!-- .LP -->
+The Input Method Protocol is independent from the transport layer used in
+communication between the IM library and the IM Server.
+Thus, the input method protocol can be built on any inter-process
+communication mechanism, such as TCP/IP or the X protocol.
+</para>
+<para>
+In addition, the protocol provides for future extensions such as differing
+input model types.
+</para>
+</sect2>
+
+<sect2 id="Background">
+<title>Background</title>
+<!-- .XS -->
+<!-- (SN Background -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+Text input is much more simple for some languages than
+others. English, for instance, uses an alphabet of a manageable size,
+and input consists of pressing the corresponding key on a keyboard,
+perhaps in combination with a shift key for capital letters or special
+characters.
+</para>
+<para>
+<!-- .LP -->
+Some languages have larger alphabets, or modifiers such as accents,
+which require the addition of special key combinations in order to enter
+text. These input methods may require "dead-keys" or "compose-keys"
+which, when followed by different combinations of key strokes,
+generate different characters.
+</para>
+<para>
+<!-- .LP -->
+Text input for ideographic languages is much less simple. In these
+languages, characters represent actual objects rather than phonetic
+sounds used in pronouncing a word, and the number of characters
+in these languages may continue to grow. In Japanese, for instance, most
+text input methods involve entering characters in a phonetic alphabet,
+after which the input method searches a dictionary for possible
+ideographic equivalents (of which there may be many). The input method then
+presents the candidate characters for the user to choose from.
+</para>
+<para>
+<!-- .LP -->
+In Japanese, either Kana (phonetic symbols) or Roman letters are
+typed and then a region is selected for conversion to Kanji. Several
+Kanji characters may have the same phonetic representation. If that
+is the case with the string entered, a menu of characters is presented
+and the user must choose the appropriate one. If no choice is necessary
+or a preference has been established, the input method does the
+substitution directly.
+</para>
+<para>
+<!-- .LP -->
+These complicated input methods must present state information (Status Area),
+text entry and edit space (Preedit Area), and menu/choice presentations
+(Auxiliary Area). Much of the protocol between the IM library and the IM
+Server involves managing these IM areas.
+Because of the size and complexity of these input methods, and because
+of how widely they vary from one language or locale to another, they are
+usually implemented as separate processes which can serve many client
+processes on the same computer or network.
+</para>
+<para>
+<!-- .LP -->
+</para>
+</sect2>
+<sect2 id="Input_Method_Styles">
+<title>Input Method Styles</title>
+<!-- .XS -->
+<!-- (SN Input Method Styles -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+X11 internationalization support includes the following four types of
+input method:
+<!-- .RS -->
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term>- on-the-spot:</term>
+ <listitem>
+ <para>
+The client application is directed by the IM Server to display all
+pre-edit data at the site of text insertion. The client registers
+callbacks invoked by the input method during pre-editing.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>- off-the-spot:</term>
+ <listitem>
+ <para>
+The client application provides display windows for the pre-edit data
+to the input method which displays into them directly.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>- over-the-spot:</term>
+ <listitem>
+ <para>
+The input method displays pre-edit data in a window which it brings up
+directly over the text insertion position.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>- root-window:</term>
+ <listitem>
+ <para>
+The input method displays all pre-edit data in a separate area of the
+screen in a window specific to the input method.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+Client applications must choose from the available input methods
+supported by the IM Server and provide the display areas and callbacks
+required by the input method.
+</para>
+</sect2>
+
+</sect1>
+<sect1 id="Architecture">
+<title>Architecture</title>
+<!-- .XS -->
+<!-- (SN Architecture -->
+<!-- .XE -->
+<sect2 id="Implementation_Model">
+<title>Implementation Model</title>
+<!-- .XS -->
+<!-- (SN Implementation Model -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+Within the X Window System environment, the following two typical
+architectural models can be used as an input method's implementation
+model.
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term>- Client/Server model:</term>
+ <listitem>
+ <para>
+A separate process, the IM Server, processes input and handles preediting,
+converting, and committing. The IM library within the application, acting
+as client to the IM Server, simply receives the committed string from the
+IM Server.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>- Library model:</term>
+ <listitem>
+ <para>
+All input is handled by the IM library within the application. The
+event process is closed within the IM library and a separate IM Server
+process may not be required.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+<!-- .LP -->
+Most languages which need complex preediting, such as Asian languages,
+are implemented using the Client/Server IM model. Other languages
+which need only dead key or compose key processing, such as European
+languages, are implemented using the Library model.
+</para>
+<para>
+<!-- .LP -->
+In this paper, we discuss mainly the Client/Server IM model and the
+protocol used in communication between the IM library (client) and the IM
+Server.
+</para>
+</sect2>
+
+<sect2 id="Structure_of_IM">
+<title>Structure of IM</title>
+<!-- .XS -->
+<!-- (SN Structure of IM -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+When the client connects or disconnects to the IM Server, an open or close
+operation occurs between the client and the IM Server.
+</para>
+<para>
+<!-- .LP -->
+The IM can be specified at the time of XOpenIM() by setting the locale
+of the client and a locale modifier. Since the IM remembers
+the locale at the time of creation XOpenIM() can be called
+multiple times (with the
+setting for the locale and the locale modifier changed) to support
+multiple languages.
+</para>
+<para>
+<!-- .LP -->
+In addition, the supported IM type can be obtained using XGetIMValues().
+</para>
+<para>
+<!-- .LP -->
+The client usually holds multiple input (text) fields. Xlib provides a
+value type called the "Input Context" (IC) to manage each individual
+input field. An IC can be created by specifying XIM using XCreateIC(),
+and it can be destroyed using XDestroyIC().
+</para>
+<para>
+<!-- .LP -->
+The IC can specify the type of IM which is supported by XIM for each
+input field, so each input field can handle a different type of IM.
+</para>
+<para>
+<!-- .LP -->
+Most importantly information such as the committed string sent from
+the IM Server to the client, is exchanged based on each IC.
+</para>
+<para>
+<!-- .LP -->
+Since each IC corresponds to an input field, the focused input field
+should be announced to the IM Server using XSetICFocus(). (XUnsetICFocus()
+can also be used to change the focus.)
+</para>
+<para>
+<!-- .LP -->
+</para>
+</sect2>
+<sect2 id="Event_Handling_Model">
+<title>Event Handling Model</title>
+<!-- .XS -->
+<!-- (SN Event Handling Model -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+Existing input methods support either the FrontEnd method, the BackEnd method,
+or both. This protocol specifically supports the BackEnd method as
+the default method, but also supports the FrontEnd method as an optional
+IM Server extension.
+</para>
+<para>
+<!-- .LP -->
+The difference between the FrontEnd and BackEnd methods is in how
+events are delivered to the IM Server. (Fig. 1) <!-- xref -->
+</para>
+
+<sect3 id="BackEnd_Method">
+<title>BackEnd Method</title>
+<!-- .XS -->
+<!-- (SN BackEnd Method -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+In the BackEnd method, client window input events are always delivered
+to the IM library, which then passes them to the IM Server. Events are
+handled serially in the order delivered, and therefore there is no
+synchronization problem between the IM library and the IM Server.
+</para>
+<para>
+<!-- .LP -->
+Using this method, the IM library forwards all KeyPress and KeyRelease
+events to the IM Server (as required by the Event Flow Control model
+described in
+<link linkend="event_flow_control">
+<xref linkend="event_flow_control"></xref></link>)
+and synchronizes with the IM Server (as described in
+<link linkend="filtering_events">
+<xref linkend="filtering_events"></xref></link>).
+
+</para>
+</sect3>
+
+<sect3 id="FrontEnd_Method">
+<title>FrontEnd Method</title>
+<!-- .XS -->
+<!-- (SN FrontEnd Method -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+In the FrontEnd method, client window input events are delivered by the
+X server directly to both the IM Server and the IM library. Therefore this
+method provides much better interactive performance while preediting
+(particularly in cases such as when the IM Server is running locally on
+the user's workstation and the client application is running on another
+workstation over a relatively slow network).
+</para>
+<para>
+<!-- .LP -->
+However, the FrontEnd model may have synchronization problems between
+the key events handled in the IM Server and other events handled in the
+client, and these problems could possibly cause the loss or duplication
+of key events. For this reason, the BackEnd method is the core method
+supported, and the FrontEnd method is made available as an extension for
+performance purposes. (Refer to
+<link linkend="common_extensions">
+<xref linkend="common_extensions"></xref></link>
+for more information.)
+</para>
+
+<mediaobject id="flow_of_events">
+ <imageobject>
+ <imagedata format="SVG" fileref="eventflow.svg"/>
+ </imageobject>
+ <caption>The flow of events</caption>
+</mediaobject>
+
+<!--
+<para>
+Fig.1 The Flow of Events
+</para>
+-->
+
+</sect3>
+</sect2>
+
+<sect2 id="event_flow_control">
+<title>Event Flow Control</title>
+<!-- .XS -->
+<!-- (SN Event Flow Control -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+This protocol supports two event flow models for communication between the
+IM library and the IM Server (Static and Dynamic).
+</para>
+<para>
+<!-- .LP -->
+Static Event Flow requires that input events always be sent to the IM
+Server from the client.
+</para>
+<para>
+<!-- .LP -->
+Dynamic Event Flow, however, requires only that those input events which
+need to be processed (converted) be sent to the IM Server from the client.
+</para>
+<para>
+<!-- .LP -->
+For instance, in the case of inputing a combination of ASCII characters
+and Chinese characters, ASCII characters do not need to be processed in
+the IM Server, so their key events do not have to be sent to the IM
+Server. On the other hand, key events necessary for composing Chinese
+characters must be sent to the IM Server.
+</para>
+<para>
+<!-- .LP -->
+Thus, by adopting the Dynamic Event Flow, the number of requests among the
+X Server, the client, and the IM Server is significantly reduced, and the
+number of context switches is also reduced, resulting in improved performance.
+The IM Server can send
+<function>XIM_REGISTER_TRIGGERKEYS </function>
+message in order to switch the event flow in the Dynamic Event Flow.
+</para>
+<para>
+<!-- .LP -->
+The protocol for this process is described in
+<link linkend="event_flow_control_2">
+<xref linkend="event_flow_control_2"></xref></link>.
+</para>
+</sect2>
+</sect1>
+
+<sect1 id="Default_Preconnection_Convention">
+<title>Default Preconnection Convention</title>
+<!-- .XS -->
+<!-- (SN Default Preconnection Convention -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+IM Servers are strongly encouraged to register their symbolic
+names as the ATOM names into the IM Server directory property,
+<function>XIM_SERVERS,</function>
+on the root window of the screen_number 0.
+This property can contain a list of ATOMs, and the each ATOM represents
+each possible IM Server.
+IM Server names are restricted to POSIX Portable Filename Character Set.
+To discover if the IM Server is active, see if there is an owner for
+the selection with that atom name. To learn the address of that IM Server,
+convert the selection target
+<function>TRANSPORT,</function>
+which will return a string form of the transport address(es).
+To learn the supported locales of that IM Server, convert the selection target
+<function>LOCALES,</function>
+which will return a set of names of the supported locales in the syntax
+X/Open defines.
+</para>
+<para>
+<!-- .LP -->
+The basic semantics to determine the IM Server if there are
+multiple ATOMs are found in
+<function>XIM_SERVERS</function>
+property, is first fit if the IM Server name is not given as
+a X modifier's category
+<function>im.</function>
+</para>
+<para>
+<!-- .LP -->
+The address information retrievable from the
+<function>TRANSPORT</function>
+target is a transport-specific name.
+The preregistered formats for transport-specific names are listed in
+<link linkend="transport_list">
+<xref linkend="transport_list"></xref></link>.
+Additional transport-specific names may be registered with X Consortium.
+</para>
+
+<para>
+For environments that lack X connections, or for IM Servers which
+do not use the X Window System, the preconnection convention with IM Server
+may be given outside the X Window system (e.g. using a Name Service).
+</para>
+</sect1>
+
+<sect1 id="Protocol">
+<title>Protocol</title>
+<!-- .XS -->
+<!-- (SN Protocol -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+The protocol described below uses the bi-directional
+synchronous/asynchronous request/reply/error model and is specified
+using the same conventions outlined in Section 2 of the core X Window
+System protocol [1]:
+</para>
+
+<sect2 id="Basic_Requests_Packet_Format">
+<title>Basic Requests Packet Format</title>
+<!-- .XS -->
+<!-- (SN Basic Requests Packet Format -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+This section describes the requests that may be exchanged between the client
+and the IM Server.
+</para>
+<para>
+<!-- .LP -->
+The basic request packet header format is as follows.
+</para>
+<literallayout class="monospaced">
+ major-opcode: CARD8
+ minor-opcode: CARD8
+ length: CARD16
+</literallayout>
+
+<para>
+The MAJOR-OPCODE specifies which core request or extension package this
+packet represents. If the MAJOR-OPCODE corresponds to a core request,
+the MINOR-OPCODE contains 8 bits of request-specific data.
+(If the MINOR-OPCODE is not used, it is 0.)
+Otherwise, the MAJOR-OPCODE and the MINOR-OPCODE are specified by
+<function>XIM_QUERY_EXTENSION</function>
+message. (Refer to 4.7. Query the supported extension protocol list.)
+The LENGTH field specifies the number of 4 bytes elements following the
+header. If no additional data is followed by the header, the LENGTH field
+will be 0.
+</para>
+</sect2>
+
+<sect2 id="Data_Types">
+<title>Data Types</title>
+<!-- .XS -->
+<!-- (SN Data Types -->
+<!-- .XE -->
+<para>
+The following data types are used in the core X IM Server protocol:
+</para>
+
+<literallayout class="monospaced">
+BITMASK16
+ CARD16
+BITMASK32
+ CARD32
+PADDING FORMAT
+ Where N is some expression, and Pad(N) is the number of bytes needed to round N up to a
+
+ Pad(N) = (4 - (N mod 4)) mod 4
+
+LPCE
+ 1 A character from the4 X Portable Character Set in Latin Portable
+ Character Encoding
+
+STRING
+ 2 n length of string in bytes
+ n LISTofLPCE string
+ p unused, p=Pad(2+n)
+
+STR
+ 1 n length of name in bytes
+ n STRING8 name
+
+XIMATTR
+ 2 CARD16 attribute ID (*1)
+ 2 CARD16 type of the value (*2)
+ 2 n length of im-attribute
+ n STRING8 im-attribute
+ p unused, p = Pad(2+n)
+
+The im-attribute argument specifies XIM values such as XNQueryInputStyle.
+
+XICATTR
+ 2 CARD16 attribute ID (*1)
+ 2 CARD16 type of the value (*2)
+ 2 n length of ic-attribute
+ n STRING8 ic-attribute
+ p unused, p = Pad(2+n)
+
+(*1) XIMATTR and XICATTR are used during the setup stage and XIMATTRIBUTE and
+ XICATTRIBUTE are used after each attribute ID has been recognized by
+ the IM Server and the IM library.
+
+(*2) The value types are defined as follows:
+</literallayout>
+<informaltable id="valuetypes" frame="none">
+ <tgroup cols="5">
+ <colspec colname="col1" colsep="0"/>
+ <colspec colname="col2" colsep="0"/>
+ <colspec colname="col3" colsep="0"/>
+ <colspec colname="col4" colsep="0"/>
+ <colspec colname="col5" colsep="0"/>
+ <spanspec namest="col3" nameend="col5" spanname="span-horiz" align="center"/>
+ <thead>
+ <row>
+ <entry>values</entry>
+ <entry>data</entry>
+ <entry>format</entry>
+ <!-- <entry spanname="span-horiz">format</entry> -->
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>#0</entry>
+ <entry>Separator of NestedList</entry>
+ <entry>-----(*3)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>#1</entry>
+ <entry>byte data</entry>
+ <entry>CARD8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>#2</entry>
+ <entry>word data</entry>
+ <entry>CARD16</entry>
+ </row>
+ <row rowsep="0">
+ <entry>#3</entry>
+ <entry>long data</entry>
+ <entry>CARD32</entry>
+ </row>
+ <row rowsep="0">
+ <entry>#4</entry>
+ <entry>char data</entry>
+ <entry>STRING8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>#5</entry>
+ <entry>Window</entry>
+ <entry>CARD32</entry>
+ </row>
+ <row rowsep="0">
+ <entry>#10</entry>
+ <entry>XIMStyles</entry>
+ <entry>2</entry>
+ <entry>n</entry>
+ <entry>number of XIMStyle list</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry>2</entry>
+ <entry></entry>
+ <entry>unused</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry>n</entry>
+ <entry>CARD32</entry>
+ <entry>XIMStyle list</entry>
+ </row>
+ <row rowsep="0">
+ <entry>#11</entry>
+ <entry>XRectangle</entry>
+ <entry>2</entry>
+ <entry>INT16</entry>
+ <entry>X</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry>2</entry>
+ <entry>INT16</entry>
+ <entry>Y</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry>2</entry>
+ <entry>CARD16</entry>
+ <entry>width</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry>2</entry>
+ <entry>CARD16</entry>
+ <entry>height</entry>
+ </row>
+ <row rowsep="0">
+ <entry>#12</entry>
+ <entry>XPoint</entry>
+ <entry>2</entry>
+ <entry>INT16</entry>
+ <entry>X</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry>2</entry>
+ <entry>INT16</entry>
+ <entry>Y</entry>
+ </row>
+ <row rowsep="0">
+ <entry>#13</entry>
+ <entry>XFontSet</entry>
+ <entry>2</entry>
+ <entry>n</entry>
+ <entry>length of Base font name</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry>n</entry>
+ <entry>STRING8</entry>
+ <entry>Base font name list</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry>p</entry>
+ <entry></entry>
+ <entry>unused, p = Pad(2+n)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>#15</entry>
+ <entry>XIMHotKeyTriggers</entry>
+ <entry>4</entry>
+ <entry>n</entry>
+ <entry>number of XIMTRIGGERKEY list (*4)</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry>n</entry>
+ <entry>XIMTRIGGERKEY</entry>
+ <entry>XIMHotkeyTrigger list</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry>n</entry>
+ <entry>XIMHOTKEYSTATE</entry>
+ <entry>HotKey processing state</entry>
+ </row>
+ <row rowsep="0">
+ <entry>#17</entry>
+ <entry>XIMStringConversion</entry>
+ <entry>XIMSTRCONVTEXT</entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row rowsep="0">
+ <entry>#18</entry>
+ <entry>XIMPreeditState</entry>
+ <entry>XIMPREEDITSTATE</entry>
+ </row>
+ <row rowsep="0">
+ <entry>#19</entry>
+ <entry>XIMResetState</entry>
+ <entry>XIMRESETSTATE</entry>
+ </row>
+ <row rowsep="0">
+ <entry>#x7fff</entry>
+ <entry>NestedList</entry>
+ <entry>-----</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<literallayout class="monospaced">
+(*3) The IC value for the separator of NestedList is defined as follows,
+ #define XNSeparatorofNestedList "separatorofNestedList"
+ , which is registered in X Consortium and cannot be used for any other purpose.
+
+(*4) LISTofFOO
+ A Type name of the form LISTof FOO means a counted list of elements of type FOO.
+ The size of the length field may vary (it is not necessarily the same
+ size as a FOO), and in some cases, it may be implicit.
+XIMTRIGGERKEY
+ 4 CARD32 keysym
+ 4 CARD32 modifier
+ 4 CARD32 modifier mask
+
+ENCODINGINFO
+ 2 n length of encoding info
+ n STRING8 encoding info
+ p unused, p=Pad(2+n)
+
+
+ 1 CARD8 extension major-opcode
+ 1 CARD8 extension minor-opcode
+ 2 n length of extension name
+ n STRING8 extension name
+ p unused, p = Pad(n)
+
+XIMATTRIBUTE
+ 2 CARD16 attribute ID
+ 2 n value length
+ n value
+ p unused, p = Pad(n)
+
+XICATTRIBUTE
+ 2 CARD16 attribute ID
+ 2 n value length
+ n value
+ p unused, p = Pad(n)
+
+
+
+XIMSTRCONVTEXT
+ 2 CARD16 XIMStringConversionFeedback
+ #x0000001 XIMStringConversionLeftEdge
+ #x0000002 XIMStringConversionRightEdge
+ #x0000004 XIMStringConversionTopEdge
+ #x0000008 XIMStringConversionBottomEdge
+ #x0000010 XIMStringConversionConvealed
+ #x0000020 XIMStringConversionWrapped
+ 2 n byte length of the retrieved string
+ n STRING8 retrieved string
+ p unused, p = Pad(n)
+ 2 m byte length of feedback array
+ 2 unused
+ m LISTofXIMSTRCONVFEEDBACK feedback array(*1)
+
+(*1) This field is reserved for future use.
+
+XIMFEEDBACK
+ 4 CARD32 XIMFeedback
+ #x000001 XIMReverse
+ #x000002 XIMUnderline
+ #x000004 XIMHighlight
+ #x000008 XIMPrimary
+ #x000010 XIMSecondary
+ #x000020 XIMTertiary
+ #x000040 XIMVisibleToForward
+ #x000080 XIMVisibleToBackward
+ #x000100 XIMVisibleCenter
+
+XIMHOTKEYSTATE
+ 4 CARD32 XIMHotKeyState
+ #x0000001 XIMHotKeyStateON
+ #x0000002 XIMHotKeyStateOFF
+
+XIMPREEDITSTATE
+ 4 CARD32 XIMPreeditState
+ #x0000001 XIMPreeditEnable
+ #x0000002 XIMPreeditDisable
+
+XIMRESETSTATE
+ 4 CARD32 XIMResetState
+ #x0000001 XIMInitialState
+ #x0000002 XIMPreserveState
+</literallayout>
+</sect2>
+
+<sect2 id="Error_Notification">
+<title>Error Notification</title>
+<!-- .XS -->
+<!-- (SN Error Notification -->
+<!-- .XE -->
+<para>
+Both the IM Server and the IM library return
+<function>XIM_ERROR</function>
+messages instead of the corresponding reply messages if any errors occur
+during data processing.
+</para>
+
+<para>
+At most one error is generated per request. If more than one error condition
+is encountered in processing a request, the choice of which error is returned
+is implementation-dependent.
+</para>
+
+<literallayout class="monospaced">
+XIM_ERROR (IM Server <--> IM library)
+<!-- .sp 6p -->
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 2 BITMASK16 flag (*1)
+ #0000 Both Input-Method-ID and Input-Context-ID are invalid
+ #0001 Input-Method-ID is valid
+ #0002 Input-Context-ID is valid
+ 2 CARD16 Error Code
+ #1 BadAlloc
+ #2 BadStyle
+ #3 BadClientWindow
+ #4 BadFocusWindow
+ #5 BadArea
+ #6 BadSpotLocation
+ #7 BadColormap
+ #8 BadAtom
+ #9 BadPixel
+ #10 BadPixmap
+ #11 BadName
+ #12 BadCursor
+ #13 BadProtocol
+ #14 BadForeground
+ #15 BadBackground
+ #16 LocaleNotSupported
+ #999 BadSomething (*2)
+ 2 n byte length of error detail.
+ 2 CARD16 type of error detail (*3)
+ n STRING8 error detail (*4)
+ p unused, p = Pad(n)
+
+(*1) Before an IM is created, both Input-Method-ID and
+ Input-Context-ID are invalid.
+ Before an IC is created, only Input-Method-ID is valid.
+ After that, both of Input-Method-ID and Input-Context-ID are valid.
+
+(*2) Unspecific error, for example "language engine died"
+
+(*3) This field is reserved for future use.
+
+(*4) Vendor defined detail error message
+</literallayout>
+</sect2>
+
+<sect2 id="Connection_Establishment">
+<title>Connection Establishment</title>
+<!-- .XS -->
+<!-- (SN Connection Establishment -->
+<!-- .XE -->
+<para>
+<function>XIM_CONNECT</function>
+message requests to establish a connection over a mutually-understood virtual
+stream.
+</para>
+
+<literallayout class="monospaced">
+XIM_CONNECT (IM library -> IM Server)
+ 1 byte order
+ #x42 MSB first
+ #x6c LSB first
+ 1 unused
+ 2 CARD16 client-major-protocol-version (*1)
+ 2 CARD16 client-minor-protocol-version (*1)
+ 2 CARD16 number of client-auth-protocol-names
+ n LISTofSTRING client-auth-protocol-names
+
+(*1) Specify the version of IM Protocol that the client supports.
+</literallayout>
+
+<para>
+A client must send
+<function>XIM_CONNECT</function>
+message as the first message on the connection.
+The list specifies the names of authentication protocols the sending
+IM Server is willing to perform.
+(If the client need not authenticate, the list may be omited.)
+</para>
+
+<para>
+<function>XIM_AUTH_REQUIRED </function>
+message is used to send the authentication protocol name and protocol-specific
+data.
+</para>
+
+<literallayout class="monospaced">
+XIM_AUTH_REQUIRED (IM library <--> IM Server)
+
+ 1 CARD8 auth-protocol-index
+ 3 unused
+ 2 n length of authentication data
+ 2 unused
+ n <varies> data
+ p unused, p = Pad(n)
+</literallayout>
+
+<para>
+The auth-protocol is specified by an index into the list of names
+given in the
+<function>XIM_CONNECT</function>
+or
+<function>XIM_AUTH_SETUP</function>
+message. Any protocol-specific data that might be required is also sent.
+</para>
+
+<para>
+The IM library sends
+<function>XIM_AUTH_REPLY</function>
+message as the reply to
+<function>XIM_AUTH_REQUIRED</function>
+message, if the IM Server is authenticated.
+</para>
+
+<literallayout class="monospaced">
+XIM_AUTH_REPLY (IM library -> IM Server)
+ 2 n length of authentication data
+ 2 unused
+ 2 n length of authentication data
+ 2 unused
+ n <varies> data
+ p unused, p = Pad(n)
+</literallayout>
+
+<para>
+The auth data is specific to the authentication protocol in use.
+</para>
+<para>
+<!-- .LP -->
+<function>XIM_AUTH_NEXT </function>
+message requests to send more auth data.
+</para>
+
+<literallayout class="monospaced">
+XIM_AUTH_NEXT (IM library <--> IM Server)
+ 2 n length of authentication data
+ 2 unused
+ n <varies> data
+ p unused, p = Pad(n)
+</literallayout>
+<para>
+The auth data is specific to the authentication protocol in use.
+</para>
+
+<para>
+<!-- .LP -->
+The IM Server sends
+<function>XIM_AUTH_SETUP</function>
+message to authenticate the client.
+</para>
+
+<literallayout class="monospaced">
+XIM_AUTH_SETUP (IM Server -> IM library)
+ 2 CARD16 number of client-auth-protocol-names
+ 2 unused
+ n LISTofSTRING server-auth-protocol-names
+</literallayout>
+
+<para>
+The list specifies the names of authentication protocols the
+client is willing to perform.
+</para>
+
+<para>
+<function>XIM_AUTH_NG</function>
+message requests to give up the connection.
+</para>
+
+<para>
+XIM_AUTH_NG (IM library <--> IM Server)
+</para>
+
+<para>
+The IM Server sends
+<function>XIM_CONNECT_REPLY</function>
+message as the reply to
+<function>XIM_CONNECT</function>
+or
+<function>XIM_AUTH_REQUIRED</function>
+message.
+</para>
+
+<literallayout class="monospaced">
+XIM_CONNECT_REPLY (IM Server -> IM library)
+ 2 CARD16 server-major-protocol-version (*1)
+ 2 CARD16 server-minor-protocol-version (*1)
+
+(*1) Specify the version of IM Protocol that the IM Server supports.
+This document specifies major version one, minor version zero.
+</literallayout>
+
+<para>
+Here are the state diagrams for the client and the IM Server.
+</para>
+
+<para>
+State transitions for the client
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term><emphasis remap='I'>init_status</emphasis>:</term>
+ <listitem>
+ <para>
+Use authorization function -> <emphasis remap='I'>client_ask</emphasis>
+ </para>
+ <para>
+Not use authorization function -> <emphasis remap='I'>client_no_check</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>start</emphasis>:</term>
+ <listitem>
+ <para>
+Send <function>XIM_CONNECT</function>
+ </para>
+ <para>
+If <emphasis remap='I'>client_ask</emphasis> -> <emphasis remap='I'>client_wait1</emphasis>
+ </para>
+ <para>
+If <emphasis remap='I'>client_no_check</emphasis>,
+client-auth-protocol-names may be omited -> <emphasis remap='I'>client_wait2</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>client_wait1</emphasis>:</term>
+ <listitem>
+ <para>
+Receive <function>XIM_AUTH_REQUIRED</function>
+-> <emphasis remap='I'>client_check</emphasis>
+ </para>
+ <para>
+Receive <other> -> <emphasis remap='I'>client_NG</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>client_check</emphasis>:</term>
+ <listitem>
+ <para>
+If no more auth needed, send <function>XIM_AUTH_REPLY</function>
+-> <emphasis remap='I'>client_wait2</emphasis>
+ </para>
+ <para>
+If good auth data, send <function>XIM_AUTH_NEXT</function>
+-> <emphasis remap='I'>client_wait1</emphasis>
+ </para>
+ <para>
+If bad auth data, send <function>XIM_AUTH_NG</function>
+-> give up on this protocol
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>client_wait2</emphasis>:</term>
+ <listitem>
+ <para>
+Receive <function>XIM_CONNECT_REPLY</function>
+-> connect Receive
+<function>XIM_AUTH_SETUP </function>
+-> <emphasis remap='I'>client_more</emphasis>
+ </para>
+ <para>
+Receive <function>XIM_AUTH_NEXT</function>
+-> <emphasis remap='I'>client_more</emphasis>
+ </para>
+ <para>
+Receive <function>XIM_AUTH_NG</function>
+-> give up on this protocol
+ </para>
+ <para>
+Receive <other> -> <emphasis remap='I'>client_NG</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>client_more</emphasis>:</term>
+ <listitem>
+ <para>
+Send <function>XIM_AUTH_REQUIRED</function>
+-> <emphasis remap='I'>client_wait2</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>client_NG</emphasis>:</term>
+ <listitem>
+ <para>
+Send <function>XIM_AUTH_NG</function>
+-> give up on this protocol
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+State transitions for the IM Server
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term><emphasis remap='I'>init_status</emphasis>:</term>
+ <listitem>
+ <para>
+Use authorization function -> <emphasis remap='I'>server_ask</emphasis>
+ </para>
+ <para>
+Not use authorization function -> <emphasis remap='I'>server_no_check</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>start</emphasis>:</term>
+ <listitem>
+ <para>
+Receive <function>XIM_CONNECT</function>
+ </para>
+ <para>
+-> <emphasis remap='I'>start2</emphasis>
+Receive <other> -> <emphasis remap='I'>server_NG</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>start2</emphasis>:</term>
+ <listitem>
+ <para>
+If <emphasis remap='I'>client_ask</emphasis>, send
+<function>XIM_AUTH_REQUIRED</function>
+-> <emphasis remap='I'>server_wait1</emphasis>
+ </para>
+ <para>
+If <emphasis remap='I'>client_no_check</emphasis> and
+<emphasis remap='I'>server_ask</emphasis>, send
+<function>XIM_AUTH_SETUP</function>
+-> <emphasis remap='I'>server_wait2</emphasis>
+ </para>
+ <para>
+If <emphasis remap='I'>client_no_check</emphasis> and
+<emphasis remap='I'>server_no_check</emphasis>, send
+<function>XIM_CONNECT_REPLY</function>
+-> connect
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>server_wait1</emphasis>:</term>
+ <listitem>
+ <para>
+Receive
+<function>XIM_AUTH_REPLY</function>
+-> <emphasis remap='I'>server2</emphasis>
+ </para>
+ <para>
+Receive
+<function>XIM_AUTH_NEXT</function>
+-> <emphasis remap='I'>server_more</emphasis>
+ </para>
+ <para>
+Receive <other> -> <emphasis remap='I'>server_NG</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>server_more</emphasis></term>
+ <listitem>
+ <para>
+Send
+<function>XIM_AUTH_REQUIRED</function>
+-> <emphasis remap='I'>server_wait1</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>server2</emphasis></term>
+ <listitem>
+ <para>
+If <emphasis remap='I'>server_ask</emphasis>, send
+<function>XIM_AUTH_SETUP</function>
+-> <emphasis remap='I'>server_wait2</emphasis>
+ </para>
+ <para>
+If <emphasis remap='I'>server_no_check</emphasis>, send
+<function>XIM_CONNECT_REPLY </function>
+-> connect
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>server_wait2</emphasis></term>
+ <listitem>
+ <para>
+Receive
+<function>XIM_AUTH_REQUIRED</function>
+-> <emphasis remap='I'>server_check</emphasis>
+ </para>
+ <para>
+Receive <other> -> <emphasis remap='I'>server_NG</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>server_check</emphasis></term>
+ <listitem>
+ <para>
+If no more auth data, send
+<function>XIM_CONNECT_REPLY</function>
+-> connect
+ </para>
+ <para>
+If bad auth data, send
+<function>XIM_AUTH_NG</function>
+-> give up on this protocol
+ </para>
+ <para>
+If good auth data, send
+<function>XIM_AUTH_NEXT</function>
+-> <emphasis remap='I'>server_wait2</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>server_NG</emphasis></term>
+ <listitem>
+ <para>
+Send
+<function>XIM_AUTH_NG</function>
+-> give up on this protocol
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+<function>XIM_DISCONNECT </function>
+message requests to shutdown the connection over a mutually-understood
+virtual stream.
+</para>
+
+<para>
+XIM_DISCONNECT (IM library -> IM Server)
+</para>
+
+<para>
+<function>XIM_DISCONNECT</function>
+is a synchronous request. The IM library should wait until it receives
+either an
+<function>XIM_DISCONNECT_REPLY</function>
+packet or an <function>XIM_ERROR</function> packet.
+</para>
+
+<para>
+XIM_DISCONNECT_REPLY (IM Server -> IM library)
+</para>
+
+<para>
+<function>XIM_OPEN</function>
+requests to establish a logical connection between the IM library and the IM
+Server.
+</para>
+
+<literallayout class="monospaced">
+XIM_OPEN (IM library -> IM Server)
+ n STR locale name
+ p unused, p = Pad(n)
+</literallayout>
+
+<para>
+<function>XIM_OPEN</function>
+is a synchronous request. The IM library should wait until receiving
+either an <function>XIM_OPEN_REPLY</function>
+packet or an <function>XIM_ERROR </function> packet.
+</para>
+
+<literallayout class="monospaced">
+XIM_OPEN_REPLY (IM Server -> IM library)
+ 2 CARD16 input-method-ID
+ 2 n byte length of IM attributes supported
+ n LISTofXIMATTR IM attributes supported
+ 2 m byte length of IC attributes supported
+ 2 CARD16 unused
+ m LISTofXICATTR IC attributes supported
+</literallayout>
+
+<para>
+<function>XIM_OPEN_REPLY</function>
+message returns all supported IM and IC attributes in LISTofXIMATTR and
+LISTofXICATTR. These IM and IC attribute IDs are used to reduce the amount
+of data which must be transferred via the network. In addition, this
+indicates to the IM library what kinds of IM/IC attributes can be used
+in this session, and what types of data will be exchanged. This allows
+the IM Server provider and application writer to support IM system
+enhancements with new IM/IC attributes, without modifying Xlib.
+The IC value for the separator of NestedList must be included in the
+LISTofXICATTR.
+</para>
+
+<para>
+<function>XIM_CLOSE </function>
+message requests to shutdown the logical connection between the IM library
+and the IM Server.
+</para>
+
+<literallayout class="monospaced">
+XIM_CLOSE (IM library -> IM Server)
+ 2 CARD16 input-method-ID
+ 2 unused
+</literallayout>
+
+<para>
+<function>XIM_CLOSE</function>
+is a synchronous request. The IM library should wait until receiving
+either an <function>XIM_CLOSE_REPLY</function>
+packet or an <function>XIM_ERROR</function> packet.
+</para>
+
+<literallayout class="monospaced">
+XIM_CLOSE_REPLY (IM Server -> IM library)
+ 2 CARD16 input-method-ID
+ 2 unused
+</literallayout>
+
+</sect2>
+
+<sect2 id="event_flow_control_2">
+<title>Event Flow Control</title>
+<!-- .XS -->
+<!-- (SN Event Flow Control -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+An IM Server must send
+<function>XIM_SET_EVENT_MASK </function>
+message to the IM library in order for events to be forwarded to the IM
+Server, since the IM library initially doesn't forward any events to the
+IM Server. In the protocol, the IM Server will specify masks of X events
+to be forwarded and which need to be synchronized by the IM library.
+</para>
+
+<literallayout class="monospaced">
+XIM_SET_EVENT_MASK (IM Server -> IM library)
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 4 EVENTMASK forward-event-mask (*1)
+ 4 EVENTMASK synchronous-event-mask (*2)
+
+(*1) Specify all the events to be forwarded to the IM Server by the IM library.
+(*2) Specify the events to be forwarded with synchronous flag on by the IM library.
+</literallayout>
+
+<para>
+<function>XIM_SET_EVENT_MASK </function>
+is an asynchronous request. The event masks are valid immediately after
+they are set until changed by another
+<function>XIM_SET_EVENT_MASK</function>
+message. If input-context-ID is set to zero, the default value of the
+input-method-ID will be changed to the event masks specified in the request.
+That value will be used for the IC's which have no individual values.
+</para>
+
+<para>
+Using the Dynamic Event Flow model, an IM Server sends
+<function>XIM_REGISTER_TRIGGERKEYS </function>
+message to the IM library before sending
+<function>XIM_OPEN_REPLY</function>
+message.
+Or the IM library may suppose that the IM Server uses the Static Event Flow
+model.
+</para>
+
+<literallayout class="monospaced">
+XIM_REGISTER_TRIGGERKEYS (IM Server -> IM library)
+<!-- .sp 6p -->
+ 2 CARD16 input-method-ID
+ 2 unused
+ 4 n byte length of on-keys
+ n LISTofXIMTRIGGERKEY on-keys list
+ 4 m byte length of off-keys
+ m LISTofXIMTRIGGERKEY off-keys list
+</literallayout>
+
+<para>
+<function>XIM_REGISTER_TRIGGERKEYS</function>
+is an asynchronous request.
+The IM Server notifys the IM library of on-keys and off-keys lists with
+this message.
+</para>
+
+<para>
+The IM library notifys the IM Server with
+<function>XIM_TRIGGER_NOTIFY </function>
+message that a key event matching either on-keys or off-keys has been occurred.
+</para>
+
+<literallayout class="monospaced">
+XIM_TRIGGER_NOTIFY (IM library -> IM Server)
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 4 CARD32 flag
+ #0 on-keys list
+ #1 off-keys list
+ 4 CARD32 index of keys list
+ 4 EVENTMASK client-select-event-mask (*1)
+
+(*1) Specify the events currently selected by the IM library with XSelectInput.
+
+</literallayout>
+
+<para>
+<function>XIM_TRIGGER_NOTIFY </function>
+is a synchronous request. The IM library should wait until receiving
+either an <function>XIM_TRIGGER_NOTIFY_REPLY</function>
+packet or an <function>XIM_ERROR</function> packet.
+</para>
+
+<literallayout class="monospaced">
+XIM_TRIGGER_NOTIFY_REPLY (IM Server -> IM library)
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+</literallayout>
+
+</sect2>
+
+<sect2 id="Encoding_Negotiation">
+<title>Encoding Negotiation</title>
+<para>
+<function>XIM_ENCODING_NEGOTIATION</function>
+message requests to decide which encoding to be sent across the wire.
+When the negotiation fails, the fallback default encoding is Portable
+Character Encoding.
+</para>
+
+<literallayout class="monospaced">
+XIM_ENCODING_NEGOTIATION (IM library -> IM Server).sp 6p
+ 2 CARD16 input-method-ID
+ 2 n byte length of encodings listed by name
+ n LISTofSTR list of encodings supported in the IM library.
+ p unused, p = Pad(n)
+ 2 m byte length of encodings listed by detailed data
+ 2 unused
+ m LISTofENCODINGINFO list of encordings supported in the IM library
+</literallayout>
+
+<para>
+The IM Server must choose one encoding from the list sent by the IM library.
+If index of the encording determined is -1 to indicate that the negotiation
+is failed, the fallback default encoding is used.
+The message must be issued after sending
+<function>XIM_OPEN</function> message via XOpenIM().
+The name of encoding may be registered with X Consortium.
+</para>
+
+<para>
+<function>XIM_ENCODING_NEGOTIATION</function>
+is a synchronous request. The IM library should wait until receiving
+either an <function>XIM_ENCODING_NEGOTIATION_REPLY</function>
+packet or an <function>XIM_ERROR</function> packet.
+</para>
+
+
+<literallayout class="monospaced">
+XIM_ENCODING_NEGOTIATION_REPLY (IM Server -> IM library)
+ 2 CARD16 input-method-ID
+ 2 CARD16 category of the encoding determined.
+ #0 name
+ #1 detailed data
+ 2 INT16 index of the encoding determinated.
+ 2 unused
+</literallayout>
+
+</sect2>
+
+<sect2 id="Query_the_supported_extension_protocol_list">
+<title>Query the supported extension protocol list</title>
+<para>
+<function>XIM_QUERY_EXTENSION</function>
+message requests to query the IM extensions supported by the IM Server to
+which the client is being connected.
+</para>
+
+<literallayout class="monospaced">
+XIM_QUERY_EXTENSION (IM library -> IM Server)
+ 2 CARD16 input-method-ID
+ 2 n byte length of extensions supported by the IM library
+ n LISTofSTR extensions supported by the IM library
+ p unused, p = Pad(n)
+</literallayout>
+
+<para>
+An example of a supported extension is FrontEnd.
+The message must be issued after sending
+<function>XIM_OPEN </function> message via XOpenIM().
+</para>
+
+<para>
+If n is 0, the IM library queries the IM Server for all extensions.
+</para>
+
+<para>
+If n is not 0, the IM library queries whether the IM Server supports the
+contents specified in the list.
+</para>
+
+<para>
+If a client uses an extension request without previously having issued a
+<function>XIM_QUERY_EXTENSION</function>
+message for that extension, the IM Server responds with a
+<function>BadProtocol</function>
+error. If the IM Server encounters a request with an unknown MAJOR-OPCODE
+or MINOR-OPCODE, it responds with a
+<function>BadProtocol</function> error.
+</para>
+
+<para>
+<function>XIM_QUERY_EXTENSION</function>
+is a synchronous request. The IM library should wait until receiving
+either an <function>XIM_QUERY_EXTENSION_REPLY</function>
+packet or an <function>XIM_ERROR</function> packet.
+</para>
+
+<literallayout class="monospaced">
+XIM_QUERY_EXTENSION_REPLY (IM Server -> IM library)
+ 2 CARD16 input-method-ID
+ 2 n byte length of extensions supported by both the IM library and the IM Server
+ n LISTofEXT list of extensions supported by both the IM library and the IM Server
+
+</literallayout>
+
+<para>
+<function>XIM_QUERY_EXTENSION_REPLY</function>
+message returns the list of extensions supported by both the IM library and
+the IM Server. If the list passed in
+<function>XIM_QUERY_EXTENSION</function>
+message is NULL, the IM Server returns the full list of extensions supported
+by the IM Server. If the list is not NULL, the IM Server returns the
+extensions in the list that are supported by the IM Server.
+</para>
+
+<para>
+<!-- .LP -->
+A zero-length string is not a valid extension name. The IM library should
+disregard any zero-length strings that are returned in the extension list.
+The IM library does not use the requests which are not supported by the IM
+Server.
+</para>
+
+</sect2>
+
+<sect2 id="Setting_IM_Values">
+<title>Setting IM Values</title>
+<para>
+<function>XIM_SET_IM_VALUES </function>
+requests to set attributes to the IM.
+</para>
+
+<literallayout class="monospaced">
+XIM_SET_IM_VALUES (IM library -> IM Server)
+ 2 CARD16 input-method-ID
+ 2 n byte length of im-attribute
+ n LISTofXIMATTRIBUTE im-attributes
+</literallayout>
+
+<para>
+The im-attributes in
+<function>XIM_SET_IM_VALUES</function>
+message are specified as a LISTofXIMATTRIBUTE, specifying the attributes
+to be set. Attributes other than the ones returned by
+<function>XIM_OPEN_REPLY</function>
+message should not be specified.
+</para>
+
+<para>
+<function>XIM_SET_IM_VALUES </function>
+is a synchronous request. The IM library should wait until receiving
+either an
+<function>XIM_SET_IM_VALUES_REPLY</function>
+packet or an
+<function>XIM_ERROR</function>
+packet, because it must receive the error attribute if
+<function>XIM_ERROR</function> message is returned.
+</para>
+
+<literallayout class="monospaced">
+XIM_SET_IM_VALUES_REPLY (IM Server -> IM library)
+ 2 CARD16 input-method-ID
+ 2 unused
+</literallayout>
+
+<para>
+<function>XIM_SET_IM_VALUES_REPLY</function>
+message returns the input-method-ID to distinguish replies from multiple IMs.
+</para>
+
+</sect2>
+<sect2 id="Getting_IM_Values">
+<title>Getting IM Values</title>
+<para>
+<function>XIM_GET_IM_VALUES </function>
+requests to query IM values supported by the IM Server currently being
+connected.
+</para>
+
+<literallayout class="monospaced">
+XIM_GET_IM_VALUES (IM library -> IM Server)
+ 2 CARD16 input-method-ID
+ 2 n byte length of im-attribute-id
+ n LISTofCARD16 im-attribute-id
+ p unused, p=Pad(n)
+</literallayout>
+
+<para>
+<function>XIM_GET_IM_VALUES</function>
+is a synchronous request. The IM library should wait until it receives
+either an
+<function>XIM_GET_IM_VALUES_REPLY</function>
+packet or an <function>XIM_ERROR</function> packet.
+</para>
+
+<literallayout class="monospaced">
+XIM_GET_IM_VALUES_REPLY (IM Server -> IM library)
+ 2 CARD16 input-method-ID
+ 2 n byte length of im-attributes returned
+ n LISTofXIMATTRIBUTE im-attributes returned
+</literallayout>
+
+<para>
+The IM Server returns IM values with
+<function>XIM_GET_IM_VALUES_REPLY</function>
+message. The order of the returned im-attribute values corresponds directly
+to that of the list passed with the
+<function>XIM_GET_IM_VALUES</function> message.
+</para>
+
+</sect2>
+<sect2 id="Creating_an_IC">
+<title>Creating an IC</title>
+<para>
+<function>XIM_CREATE_IC</function> message requests to create an IC.
+</para>
+
+<literallayout class="monospaced">
+XIM_CREATE_IC (IM library -> IM Server)
+ 2 CARD16 input-method-ID
+ 2 n byte length of ic-attributes
+ n LISTofXICATTRIBUTE ic-attributes
+</literallayout>
+
+<para>
+The input-context-id is specified by the IM Server to identify the client
+(IC). (It is not specified by the client in
+<function>XIM_CREATE_IC</function>
+message.), and it should not be set to zero.
+</para>
+
+<para>
+<function>XIM_CREATE_IC</function>
+is a synchronous request which returns the input-context-ID.
+The IM library should wait until it receives either an
+<function>XIM_CREATE_IC_REPLY</function>
+packet or an
+<function>XIM_ERROR</function>
+packet.
+</para>
+
+<literallayout class="monospaced">
+XIM_CREATE_IC_REPLY (IM Server -> IM library)
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+</literallayout>
+
+</sect2>
+<sect2 id="Destroying_the_IC">
+<title>Destroying the IC</title>
+<para>
+<function>XIM_DESTROY_IC</function>
+message requests to destroy the IC.
+</para>
+
+<literallayout class="monospaced">
+XIM_DESTROY_IC (IM library -> IM Server)
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+</literallayout>
+
+<para>
+<function>XIM_DESTROY_IC </function>
+is a synchronous request. The IM library should not free its resources
+until it receives an
+<function>XIM_DESTROY_IC_REPLY</function>
+message because <function>XIM_DESTROY_IC</function>
+message may result in Callback packets such as
+<function>XIM_PREEDIT_DRAW</function>
+and <function>XIM_PREEDIT_DONE.</function>
+</para>
+
+<literallayout class="monospaced">
+XIM_DESTROY_IC_REPLY (IM Server -> IM library)
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+</literallayout>
+
+</sect2>
+
+<sect2 id="Setting_IC_Values">
+<title>Setting IC Values</title>
+<para>
+<function>XIM_SET_IC_VALUES</function>
+messages requests to set attributes to the IC.
+</para>
+
+
+<literallayout class="monospaced">
+XIM_SET_IC_VALUES (IM library -> IM Server)
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 2 n byte length of ic-attributes
+ 2 unused
+ n LISTofXICATTRIBUTE ic-attributes
+</literallayout>
+
+<para>
+The ic-attributes in
+<function>XIM_SET_IC_VALUES</function>
+message are specified as a LISTofXICATTRIBUTE, specifying the attributes
+to be set. Attributes other than the ones returned by
+<function>XIM_OPEN_REPLY</function> message should not be specified.
+</para>
+
+<para>
+<function>XIM_SET_IC_VALUES </function>
+is a synchronous request. The IM library should wait until receiving
+either an <function>XIM_SET_IC_VALUES_REPLY </function>
+packet or an <function>XIM_ERROR</function>
+packet, because it must receive the error attribute if
+<function>XIM_ERROR</function> message is returned.
+</para>
+
+
+<literallayout class="monospaced">
+XIM_SET_IC_VALUES_REPLY (IM Server -> IM library)
+<!-- .sp 6p -->
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+</literallayout>
+
+</sect2>
+<sect2 id="Getting_IC_Values">
+<title>Getting IC Values</title>
+<para>
+<function>XIM_GET_IC_VALUES</function>
+message requests to query IC values supported by the IM Server currently
+being connected.
+</para>
+
+
+<literallayout class="monospaced">
+XIM_GET_IC_VALUES (IM library -> IM Server)
+<!-- .sp 6p -->
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 2 n byte length of ic-attribute-id
+ n LISTofCARD16 ic-attribute-id
+ p unused, p=Pad(2+n)
+</literallayout>
+
+<para>
+In LISTofCARD16, the appearance of the ic-attribute-id for the separator
+of NestedList shows the end of the heading nested list.
+</para>
+
+<para>
+<function>XIM_GET_IC_VALUES</function>
+is a synchronous request and returns each attribute with its values to
+show the correspondence. The IM library should wait until receiving
+either an <function>XIM_GET_IC_VALUES_REPLY</function>
+packet or an <function>XIM_ERROR</function> packet.
+</para>
+
+<literallayout class="monospaced">
+XIM_GET_IC_VALUES_REPLY (IM Server -> IM library)
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 2 n byte length of ic-attribute
+ 2 unused
+ n LISTofXICATTRIBUTE ic-attribute
+</literallayout>
+
+</sect2>
+<sect2 id="Setting_IC_Focus">
+<title>Setting IC Focus</title>
+<para>
+<function>XIM_SET_IC_FOCUS</function>
+message requests to set the focus to the IC.
+</para>
+
+<literallayout class="monospaced">
+XIM_SET_IC_FOCUS (IM library -> IM Server)
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+</literallayout>
+
+<para>
+<function>XIM_SET_IC_FOCUS</function> is an asynchronous request.
+</para>
+
+</sect2>
+<sect2 id="Unsetting_IC_Focus">
+<title>Unsetting IC Focus</title>
+<para>
+<function>XIM_UNSET_IC_FOCUS</function>
+message requests to unset the focus to the focused IC.
+</para>
+
+<literallayout class="monospaced">
+XIM_UNSET_IC_FOCUS (IM library -> IM Server)
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+</literallayout>
+
+<para>
+<function>XIM_UNSET_IC_FOCUS</function>
+is an asynchronous request.
+</para>
+
+</sect2>
+
+<sect2 id="filtering_events">
+<title>Filtering Events</title>
+<para>
+Event filtering is mainly provided for BackEnd method to allow input method
+to capture X events transparently to clients.
+</para>
+
+<para>
+X Events are forwarded by
+<function>XIM_FORWARD_EVENT</function> message.
+This message can be operated both synchronously and asynchronously.
+If the requester sets the synchronous flag, the receiver must send
+<function>XIM_SYNC_REPLY</function>
+message back to the requester when all the data processing is done.
+</para>
+<para>
+Protocol flow of BackEnd model
+</para>
+
+<para>
+With BackEnd method, the protocol flow can be classified into two
+methods in terms of synchronization, depending on the synchronous-eventmask
+of <function>XIM_SET_EVENT_MASK</function>
+message. One can be called on-demand-synchronous method and another
+can be called as full-synchronous method.
+</para>
+
+<para>
+In on-demand-synchronous method, the IM library always receives
+<function>XIM_FORWARD_EVENT</function>
+or
+<function>XIM_COMMIT</function>
+message as a synchronous request. Also, the IM Server needs to synchronously
+process the correspondent reply from the IM library and the following
+<function>XIM_FORWARD_EVENT</function>
+message sent from the IM library when any of the event causes the IM Server
+to send
+<function>XIM_FORWARD_EVENT</function>
+or
+<function>XIM_COMMIT</function>
+message to the IM library, so that the input service is consistent. If the
+IM library gets the control back from the application after receiving the
+synchronous request, the IM library replies for the synchronous request before
+processing any of the events. In this time, the IM Server blocks
+<function>XIM_FORWARD_EVENT</function>
+message which is sent by the IM library, and handles it after receiving the
+reply. However, the IM Server handles the other protocols at any time.
+</para>
+
+<para>
+In full-synchronous method, the IM library always sends
+<function>XIM_FORWARD_EVENT</function>
+message to the IM Server as a synchronous request. Therefore, the reply to it
+from the IM Server will be put between the
+<function>XIM_FORWARD_EVENT</function> message and its
+<function>XIM_SYNC_REPLY</function> message. In case of sending
+<function>XIM_FORWARD_EVENT</function> or
+<function>XIM_COMMIT</function>
+message, the IM Server should set the synchronous flag off. Because the
+synchronization can be done by the following
+<function>XIM_SYNC_REPLY</function> message.
+</para>
+
+<para>
+Following chart shows one of the simplest protocol flow which only
+deals with keyevents for preediting operation.
+</para>
+
+<mediaobject id="sampleprotocolflow">
+ <imageobject>
+ <imagedata format="SVG" fileref="sampleprotocolflow1.svg"/>
+ </imageobject>
+ <caption>Sample Protocol Flow</caption>
+</mediaobject>
+
+
+<para>
+Following chart shows one of the complex protocol flow, which deals
+with multiple focus windows and button press event as well as keyevent,
+and the focus is moved by the application triggered by both of keyevent
+and button press event.
+</para>
+<mediaobject id="sampleprotocolflow2">
+ <imageobject>
+ <imagedata format="SVG" fileref="sampleprotocolflow2.svg"/>
+ </imageobject>
+ <caption>Sample Protocol Flow 2</caption>
+</mediaobject>
+
+<literallayout class="monospaced">
+XIM_FORWARD_EVENT (IM library <--> IM Server)
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 2 BITMASK16 flag
+ #0001 synchronous
+ #0002 request filtering (*1)
+ #0004 request lookupstring (*2)
+ 2 CARD16 serial number
+ XEVENT X event
+
+(*1) Indicate the receiver should filter events and possible preedit may be invoked.
+
+(*2) Indicate the receiver should only do lookup string. The IM Server is expected
+to just do a conversion of the key event to the best candidate. This bit may
+affect the state of the preedit state (e.g. compose of dead key sequences).
+</literallayout>
+
+<para>
+XEVENT format is same as the X Protocol event format(xEvent).
+As the value of xEvent's sequenceNumber is the bottom of 16 bit of XEvent's
+xany.serial, the top of 16 bit is sent by serial number(INT16).
+</para>
+
+<para>
+<function>XIM_FORWARD_EVENT</function>
+message is used for forwarding the events from the IM library to the IM Server
+in order for IM to be able to filter the event. On the other hand, this
+message is also used for forwarding the events from the IM Server to the IM
+library if the event forwarded from the IM library is not filtered.
+The IM Server, which receives
+<function>XIM_FORWARD_EVENT</function>
+message without synchronous bit, should set synchronous bit.
+If both "request event filtering" and "request lookupstring" flag are
+set, then both filtering and lookup should be done for the same event.
+</para>
+
+</sect2>
+
+<sect2 id="Synchronizing_with_the_IM_Server">
+<title>Synchronizing with the IM Server</title>
+
+<para>
+<function>XIM_SYNC</function>
+message requests to synchronize the IM library and the IM Server.
+</para>
+
+<literallayout class="monospaced">
+XIM_SYNC (IM library <--> IM Server)
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+</literallayout>
+
+<para>
+This synchronization can be started either on the IM library side or on the
+IM Server side. The side which receives
+<function>XIM_SYNC</function>
+message should process all XIM requests before replying. The input-context-ID
+is necessary to distinguish the IC with which the IM library and the IM
+Server are synchronized.
+</para>
+
+<literallayout class="monospaced">
+XIM_SYNC_REPLY (IM Server <--> IM library)
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+</literallayout>
+
+
+
+<para>
+The side which receives
+<function>XIM_FORWARD_EVENT, </function>
+<function>XIM_COMMIT</function>
+or any other message with synchronous bit, should process all XIM request
+before replying, and send
+<function>XIM_SYNC_REPLY</function>
+message as the reply to the previous message.
+</para>
+
+</sect2>
+
+<sect2 id="Sending_a_committed_string">
+<title>Sending a committed string</title>
+<para>
+When the IM Server commits a string, the IM Server sends either the committed
+string or list of KeySym, or both, by
+<function>XIM_COMMIT</function>
+message.
+</para>
+
+<literallayout class="monospaced">
+XIM_COMMIT (IM Server -> IM library)
+
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 2 BITMASK16 flag
+ #0001 synchronous
+ #0002 XLookupChars
+ #0004 XLookupKeySym
+ #0006 XLookupBoth = XLookupChars | XLookupKeySym
+</literallayout>
+
+<para>
+If flag is XLookupKeySym, the arguments continue as follows:
+</para>
+
+<literallayout class="monospaced">
+ 2 unused
+ 4 KEYSYM KeySym
+</literallayout>
+
+<para>
+If flag is XLookupChars, the arguments continue as follows
+</para>
+
+<literallayout class="monospaced">
+ 2 m byte length of committed string
+ m LISTofBYTE committed string
+ p unused, p = Pad(m)
+</literallayout>
+
+<para>
+If flag is XLookupBoth, the arguments continue as follows
+</para>
+
+<literallayout class="monospaced">
+ 2 unused
+ 4 KEYSYM KeySym
+ 2 n byte length of committed string
+ n LISTofBYTE committed string
+ p unused, p = Pad(2+n)
+</literallayout>
+
+<para>
+The IM Server which receives
+<function>XIM_COMMIT</function>
+message without synchronous bit should set synchronous bit.
+</para>
+
+</sect2>
+
+<sect2 id="Reset_IC">
+<title>Reset IC</title>
+<para>
+<function>XIM_RESET_IC</function>
+message requests to reset the status of IC in the IM Server.
+</para>
+
+<literallayout class="monospaced">
+XIM_RESET_IC (IM library -> IM Server)
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+</literallayout>
+
+
+<para>
+<function>XIM_RESET_IC</function>
+is a synchronous request. The IM library should wait until receiving either an
+<function>XIM_RESET_IC_REPLY</function> packet or an
+<function>XIM_ERROR</function> packet.
+</para>
+
+<literallayout class="monospaced">
+XIM_RESET_IC_REPLY (IM Server -> IM library)
+
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 2 n byte length of preedit string
+ n LISTofBYTE preedit string
+ p unused, p = Pad(2+n)
+</literallayout>
+
+<para>
+<function>XIM_RESET_IC_REPLY </function>
+message returns the input-context-ID to distinguish replies from multiple ICs.
+</para>
+
+</sect2>
+<sect2 id="Callbacks">
+<title>Callbacks</title>
+<para>
+If XIMStyle has XIMPreeditArea or XIMStatusArea set, XIMGeometryCallback
+may be used, and if XIMPreeditCallback and/or XIMStatusCallback are set,
+corresponding callbacks may be used.
+</para>
+
+<para>
+Any callback request may be sent from an IM Server to an IM client
+asynchronously in response to any request previously sent by the IM client
+to the IM Server.
+</para>
+
+<para>
+When an IM Server needs to send a callback request synchronously with
+the request previously sent by an IM client, the IM Server sends it
+before replying to the previous request.
+</para>
+
+<sect3 id="Negotiating_geometry">
+<title>Negotiating geometry</title>
+<para>
+The IM Server sends
+<function>XIM_GEOMETRY </function>
+message to start geometry negotiation, if XIMStyle has XIMPreeditArea or
+XIMStatusArea set.
+</para>
+
+
+<literallayout class="monospaced">
+XIM_GEOMETRY (IM Server -> IM library)
+
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+</literallayout>
+
+<para>
+There is always a single Focus Window, even if some input fields have only
+one IC.
+</para>
+
+</sect3>
+
+<sect3 id="Converting_a_string">
+<title>Converting a string</title>
+
+<literallayout class="monospaced">
+XIM_STR_CONVERSION (IM Server -> IM library)
+
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 2 CARD16 XIMStringConversionPosition
+ 2 unused
+ 4 CARD32 XIMCaretDirection
+ #0 XIMForwardChar
+ #1 XIMBackwardChar
+ #2 XIMForwardWord
+ #3 XIMBackwardWord
+ #4 XIMCaretUp
+ #5 XIMCaretDown
+ #6 XIMNextLine
+ #7 XIMCPreviousLine
+ #8 XIMLineStart
+ #9 XIMLineEnd
+ #10 XIMAbsolutePosition
+ #11 XIMDontChange
+ 2 CARD16 factor
+ 2 CARD16 XIMStringConversionOperation
+ #0001 XIMStringConversionSubstitution
+ #0002 XIMStringConversionRetrieval
+ 2 INT16 byte length to multiply the XIMStringConversionType
+</literallayout>
+
+<para>
+<function>XIM_STR_CONVERSION </function>
+message may be used to start the string conversion from the IM Server.
+</para>
+
+<literallayout class="monospaced">
+XIM_STR_CONVERSION_REPLY (IM library -> IM Server)
+
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 4 CARD32 XIMStringConversionFeedback
+ XIMSTRCONVTEXT XIMStringConversionText
+</literallayout>
+
+<para>
+<function>XIM_STR_CONVERSION_REPLY </function>
+message returns the string to be converted and the feedback information array.
+</para>
+</sect3>
+
+<sect3 id="Preedit_Callbacks">
+<title>Preedit Callbacks</title>
+
+<para>
+The IM Server sends
+<function>XIM_PREEDIT_START </function>
+message to call the XIMPreeditStartCallback function.
+</para>
+
+<literallayout class="monospaced">
+XIM_PREEDIT_START (IM Server -> IM library)
+
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+</literallayout>
+
+<para>
+The reply to this message must be sent synchronously. The reply forwards
+the return value from the callback function to the IM Server.
+</para>
+
+<literallayout class="monospaced">
+XIM_PREEDIT_START_REPLY (IM library -> IM Server)
+
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 4 INT32 return value
+</literallayout>
+
+<para>
+<function>XIM_PREEDIT_START_REPLY</function>
+message returns the input-context-ID to distinguish replies from multiple
+IC's. The return value contains the return value of the function
+XIMPreeditStartCallback.
+</para>
+
+<para>
+The IM Server sends
+<function>XIM_PREEDIT_DRAW </function>
+message to call the XIMPreeditDrawCallback function.
+</para>
+
+<literallayout class="monospaced">
+XIM_PREEDIT_DRAW (IM Server -> IM library)
+
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 4 INT32 caret
+ 4 INT32 chg_first
+ 4 INT32 chg_length
+ 4 BITMASK32 status
+ #x0000001 no string
+ #x0000002 no feedback
+ 2 n length of preedit string
+ n STRING8 preedit string
+ p unused, p = Pad(2+n)
+ 2 m byte length of feedback array
+ 2 unused
+ m LISTofXIMFEEDBACK feedback array
+</literallayout>
+
+<para>
+The fields "caret", "chg_first" and "chg_length" correspond to the
+fields of XIMPreeditDrawCallbackStruct.
+When the "no string" bit of the status field is set, the text field of
+XIMPreeditDrawCallbackStruct is NULL.
+When the "no feedback" bit of the status field is set, the text feedback
+field of XIMPreeditDrawCallbackStruct is NULL.
+When the above bits are not set, "preedit string" contains the preedit
+string to be displayed, and the feedback array contains feedback information.
+</para>
+
+<para>
+The IM Server sends
+<function>XIM_PREEDIT_CARET</function>
+message to call the PreeditCaretCallback function.
+</para>
+
+<literallayout class="monospaced">
+XIM_PREEDIT_CARET (IM Server -> IM library)
+
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 4 INT32 position
+ 4 CARD32 direction
+ #0 XIMForwardChar
+ #1 XIMBackwardChar
+ #2 XIMForwardWord
+ #3 XIMBackwardWord
+ #4 XIMCaretUp
+ #5 XIMCaretDown
+ #6 XIMNextLine
+ #7 XIMCPreviousLine
+ #8 XIMLineStart
+ #9 XIMLineEnd
+ #10 XIMAbsolutePosition
+ #11 XIMDontChange
+ 4 CARD32 style
+ #0 XIMInvisible
+ #1 XIMCPrimary
+ #2 XIMSecondary
+</literallayout>
+
+<para>
+Each entry corresponds to a field of XIMPreeditCaretCallbackStruct.
+Since this callback sets the caret position, its reply must be sent
+synchronously.
+</para>
+
+<literallayout class="monospaced">
+XIM_PREEDIT_CARET_REPLY (IM library -> IM Server)
+
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 4 CARD32 position
+</literallayout>
+
+<para>
+The position is the value returned by the callback function after it
+has been called.
+</para>
+
+<para>
+The IM Server sends
+<function>XIM_PREEDIT_DONE </function>
+message to call the XIMPreeditDoneCallback function.
+</para>
+
+<literallayout class="monospaced">
+XIM_PREEDIT_DONE (IM Server -> IM library)
+
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+</literallayout>
+
+</sect3>
+
+<sect3 id="Preedit_state_notify">
+<title>Preedit state notify</title>
+
+<literallayout class="monospaced">
+XIM_PREEDITSTATE (IM Server -> IM Library)
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 4 BITMASK32 XIMPreeditState
+ #x0000000 XIMPreeditUnknown
+ #x0000001 XIMPreeditEnable
+ #x0000002 XIMPreeditDisable
+</literallayout>
+
+<para>
+<function>XIM_PREEDITSTATE</function>
+message is used to call the XIMPreeditStateNotifyCallback function.
+</para>
+
+</sect3>
+
+<sect3 id="Status_Callbacks">
+<title>Status Callbacks</title>
+
+<para>
+The IM Server sends
+<function>XIM_STATUS_START </function>
+message to call the XIMStatusStartCallback function.
+</para>
+
+<literallayout class="monospaced">
+XIM_STATUS_START (IM Server -> IM library)
+
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+</literallayout>
+
+<para>
+The IM Server sends
+<function>XIM_STATUS_DRAW </function>
+message to call the XIMStatusDrawCallback function.
+</para>
+
+<literallayout class="monospaced">
+XIM_STATUS_DRAW (IM Server -> IM library)
+
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 4 CARD32 type
+ #0 XIMTextType
+ #1 XIMBitmapType
+</literallayout>
+
+<para>
+If type is XIMTextType, the arguments continue as follows.
+</para>
+
+<literallayout class="monospaced">
+ 4 BITMASK32 status
+ #x0000001 no string
+ #x0000002 no feedback
+ 2 n length of status string
+ n STRING8 status string
+ p unused, p = Pad(2+n)
+ 2 m byte length of feedback array
+ 2 unused
+ m LISTofXIMFEEDBACK feedback array
+</literallayout>
+
+<para>
+If type is XIMBitmapType, the arguments continue as follows.
+</para>
+
+<literallayout class="monospaced">
+ 4 PIXMAP pixmap data
+</literallayout>
+
+<para>
+The field "type" corresponds to the field in XIMStatusDrawCallbackStruct.
+</para>
+
+<para>
+The IM Server sends
+<function>XIM_STATUS_DONE </function>
+message to call the XIMStatusDoneCallback function.
+</para>
+
+<literallayout class="monospaced">
+XIM_STATUS_DONE (IM Server -> IM library)
+
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+</literallayout>
+
+</sect3>
+</sect2>
+</sect1>
+
+<sect1 id="Acknowledgements">
+<title>Acknowledgements</title>
+<para>
+This document represents the culmination of several years of debate and
+experiments done under the auspices of the MIT X Consortium i18n working
+group. Although this was a group effort, the author remains responsible
+for any errors or omissions.
+</para>
+
+<para>
+We would like to thank to all members of this group.
+And we would like to make special thanks to the following people
+(in alphabetical order) for their participation in the IM Protocol
+design,
+Hector Chan, Takashi Fujiwara, Yoshio Horiuchi, Makoto Inada,
+Hiromu Inukai, Mickael Kung, Seiji Kuwari, Franky Ling, Hiroyuki Machida,
+Hiroyuki Miyamoto, Frank Rojas, Bob Scheifler, Makiko Shimamura,
+Shoji Sugiyama, Hidetoshi Tajima, Masaki Takeuchi, Makoto Wakamatsu,
+Masaki Wakao, Nobuyuki Tanaka, Shigeru Yamada, Katsuhisa Yano, Jinsoo Yoon.
+</para>
+
+</sect1>
+
+<bibliography>
+<title>References</title>
+<biblioentry>
+ <title>X Window System Protocol Version 11</title>
+ <author><firstname>Robert W.</firstname><surname>Scheifler</surname></author>
+</biblioentry>
+
+<biblioentry>
+ <title>Xlib - C Language X Interface"</title>
+ <author><firstname>Robert W.</firstname><surname>Scheifler</surname></author>
+</biblioentry>
+</bibliography>
+</chapter>
+
+<appendix id="common_extensions">
+<title>Common Extensions</title>
+<para>
+Extension opcodes and packet names (e.g.
+<function>XIM_EXT_SET_EVENT_MASK</function>
+) for additional extensions may be registered with X Consortium.
+The following is a commonly well-known extended packet.
+</para>
+
+<para>
+(1) Extension to manipulate the event handling\fP
+</para>
+
+<para>
+<!-- .LP -->
+<function>XIM_EXT_SET_EVENT_MASK </function>
+message specifies the set of event masks that the IM library should manipulate.
+</para>
+
+<literallayout class="monospaced">
+XIM_EXT_SET_EVENT_MASK (IM Server -> IM library)
+
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 4 EVENTMASK filter-event-mask (*1)
+ 4 EVENTMASK intercept-event-mask (*2)
+ 4 EVENTMASK select-event-mask (*3)
+ 4 EVENTMASK forward-event-mask (*4)
+ 4 EVENTMASK synchronous-event-mask (*5)
+
+ (*1) Specify the events to be neglected by the IM library via XFilterEvent.
+ (*2) Specify the events to be deselected by the IM library with XSelectInput.
+ (*3) Specify the events to be selected by the IM library with XSelectInput.
+ (*4) Specify all the events to be forwarded to the IM Server by the IM library.
+ (*5) Specify the events to be forwarded with synchronous flag on by the IM library.
+</literallayout>
+
+<para>
+<!-- .LP -->
+The IM library must reply
+<function>XIM_SYNC_REPLY</function>
+message to the IM Server. This request is valid after the ic is created.
+</para>
+
+<para>
+(2) Extension for improvement of performance.
+</para>
+<para>
+The following requests may be used for improvement of performance.
+</para>
+
+<para>
+<function>XIM_EXT_FORWARD_KEYEVENT</function>
+message may be used instead of
+<function>XIM_FORWARD_EVENT</function>
+message.
+</para>
+
+<literallayout class="monospaced">
+XIM_EXT_FORWARD_KEYEVENT (IM Server <--> IM library)
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 2 BITMASK16 flag
+ #0001 synchronous
+ 2 CARD16 sequence number
+ 1 BYTE xEvent.u.u.type
+ 1 BYTE keycode
+ 2 CARD16 state
+ 4 CARD32 time
+ 4 CARD32 window
+</literallayout>
+
+<para>
+<function>XIM_EXT_MOVE</function>
+message may be used to change the spot location instead of
+<function></function>
+XIM_SET_IC_VALUES
+message.
+It is effective only if the client specified XIMPreeditPosition.
+</para>
+
+
+<literallayout class="monospaced">
+XIM_EXT_MOVE (IM library -> IM Server)
+
+ 2 CARD16 input-method-ID
+ 2 CARD16 input-context-ID
+ 2 INT16 X
+ 2 INT16 Y
+</literallayout>
+
+<para>
+<function>XIM_EXT_MOVE</function>
+message is a asynchronous request.
+</para>
+
+</appendix>
+<appendix id="transport_list">
+<title>Transport List</title>
+
+<para>
+The list of transport specific IM Server address format registered
+</para>
+
+<para>
+The following format represents the ATOM contained in
+<function>XIM_SERVERS</function>
+property and the string returned from the request converting
+selection target LOCALES and TRANSPORT.
+</para>
+<literallayout class="monospaced">
+ "{<emphasis remap='I'>category</emphasis>=[<emphasis remap='I'>value</emphasis>,...]}..."
+</literallayout>
+<para>
+The following categories are currently registered.
+</para>
+
+<literallayout class="monospaced">
+<function>server</function>;: IM Server name (used for XIM_SERVERS)
+<function>locale</function>;: XPG4 locale name (LOCALES)
+<function>transport</function>;: transport-specific name (TRANSPORT)
+</literallayout>
+
+<para>
+The preregistered formats for transport-specific names are as follows:
+</para>
+
+<para>
+<function>TCP/IP Names</function>
+</para>
+
+<para>
+The following syntax should be used for system internal domain names:
+</para>
+<literallayout class="monospaced">
+<<emphasis remap='I'>local name</emphasis>> ::= "local/"<<emphasis remap='I'>hostname</emphasis>>":"<<emphasis remap='I'>pathname</emphasis>>
+</literallayout>
+<para>
+Where <<emphasis remap='I'>pathname</emphasis>> is a path name of socket address.
+</para>
+
+<para>
+IM Server's name should be set to <<emphasis remap='I'>pathname</emphasis>> to run multiple IM Server
+at the same time
+</para>
+
+<para>
+The following syntax should be used for Internet domain names:
+</para>
+<literallayout class="monospaced">
+<<emphasis remap='I'>TCP name</emphasis>> ::= "tcp/"<<emphasis remap='I'>hostname</emphasis>>":"<<emphasis remap='I'>ipportnumber</emphasis>>
+</literallayout>
+<para>
+where <<emphasis remap='I'>hostname</emphasis>> is either symbolic (such as expo.lcs.mit.edu) or
+numeric decimal (such as 18.30.0.212). The <<emphasis remap='I'>ipportnumber</emphasis>> is the
+port on which the IM Server is listening for connections.
+For example:
+</para>
+<literallayout class="monospaced">
+tcp/expo.lcs.mit.edu:8012
+tcp/18.30.0.212:7890
+</literallayout>
+
+<para>
+<function>DECnet Names</function>
+</para>
+
+<para>
+The following syntax should be used for DECnet names:
+</para>
+<literallayout class="monospaced">
+<<emphasis remap='I'>DECnet name</emphasis>> ::= "decnet/"<<emphasis remap='I'>nodename</emphasis>>"::IMSERVER$"<<emphasis remap='I'>objname</emphasis>>
+</literallayout>
+<para>
+where <<emphasis remap='I'>nodename</emphasis>> is either
+symbolic (such as SRVNOD) or the numeric
+decimal form of the DECnet address (such as 44.70).
+The <<emphasis remap='I'>objname</emphasis>>
+is normal, case-insensitive DECnet object name. For example:
+</para>
+
+<literallayout class="monospaced">
+DECNET/SRVNOD::IMSERVER$DEFAULT
+decnet/44.70::IMSERVER$other
+</literallayout>
+
+<para>
+<function>X Names</function>
+</para>
+
+<para>
+The following syntax should be used for X names:
+</para>
+<literallayout class="monospaced">
+<<emphasis remap='I'>X name</emphasis>> ::= "X/"
+</literallayout>
+
+<para>
+If a given category has multiple values, the value is evaluated in order of
+setting.
+</para>
+
+</appendix>
+<appendix id="protocol_number">
+<title>Protocol Number</title>
+
+<para>
+<function>Major Protocol number</function>
+</para>
+
+<literallayout class="monospaced">
+XIM_CONNECT #001
+XIM_CONNECT_REPLY #002
+XIM_DISCONNECT #003
+XIM_DISCONNECT_REPLY #004
+
+XIM_AUTH_REQUIRED #010
+XIM_AUTH_REPLY #011
+XIM_AUTH_NEXT #012
+XIM_AUTH_SETUP #013
+XIM_AUTH_NG #014
+
+XIM_ERROR #020
+
+XIM_OPEN #030
+XIM_OPEN_REPLY #031
+XIM_CLOSE #032
+XIM_CLOSE_REPLY #033
+XIM_REGISTER_TRIGGERKEYS #034
+XIM_TRIGGER_NOTIFY #035
+XIM_TRIGGER_NOTIFY_REPLY #036
+XIM_SET_EVENT_MASK #037
+XIM_ENCODING_NEGOTIATION #038
+XIM_ENCODING_NEGOTIATION_REPLY #039
+XIM_QUERY_EXTENSION #040
+XIM_QUERY_EXTENSION_REPLY #041
+XIM_SET_IM_VALUES #042
+XIM_SET_IM_VALUES_REPLY #043
+XIM_GET_IM_VALUES #044
+XIM_GET_IM_VALUES_REPLY #045
+
+XIM_CREATE_IC #050
+XIM_CREATE_IC_REPLY #051
+XIM_DESTROY_IC #052
+XIM_DESTROY_IC_REPLY #053
+XIM_SET_IC_VALUES #054
+XIM_SET_IC_VALUES_REPLY #055
+XIM_GET_IC_VALUES #056
+XIM_GET_IC_VALUES_REPLY #057
+XIM_SET_IC_FOCUS #058
+XIM_UNSET_IC_FOCUS #059
+XIM_FORWARD_EVENT #060
+XIM_SYNC #061
+XIM_SYNC_REPLY #062
+XIM_COMMIT #063
+XIM_RESET_IC #064
+XIM_RESET_IC_REPLY #065
+
+XIM_GEOMETRY #070
+XIM_STR_CONVERSION #071
+XIM_STR_CONVERSION_REPLY #072
+XIM_PREEDIT_START #073
+XIM_PREEDIT_START_REPLY #074
+XIM_PREEDIT_DRAW #075
+XIM_PREEDIT_CARET #076
+XIM_PREEDIT_CARET_REPLY #077
+XIM_PREEDIT_DONE #078
+XIM_STATUS_START #079
+XIM_STATUS_DRAW #080
+XIM_STATUS_DONE #081
+XIM_PREEDITSTATE #082
+
+(*) The IM Server's extension protocol number should be more than #128.
+</literallayout>
+</appendix>
+
+<appendix id="implementation_tips">
+
+<title>Implementation Tips</title>
+<para>
+(1) FrontEnd Method
+</para>
+
+<para>
+FrontEnd method is recognized as a performance acceleration by the
+trade off of the variety of the reliability.
+</para>
+
+<para>
+In order to use the FrontEnd method, the IM library must query the IM
+Server to see if the FrontEnd extension is available. The query is
+made by using the
+<function>XIM_QUERY_EXTENSION</function>
+message. The IM Server may send
+<function>XIM_EXT_SET_EVENT_MASK</function>
+message with intercept-event-mask, forward-event-mask, and
+synchronous-event-mask values set after replying
+<function>XIM_QUERY_EXTENSION_REPLY</function>
+message.
+</para>
+
+<para>
+FrontEnd method can be implemented in a couple of ways depending on
+how the IM Server utilize
+<function>XIM_EXT_SET_EVENT_MASK</function>
+message.
+</para>
+
+<para>
+One approach is to update both of the input mask and the filter-event-mask
+depending on the preeidting state. The sample protocol sequence using the
+static event flow is as follows:
+</para>
+
+<mediaobject id="staticflow">
+ <imageobject>
+ <imagedata scale="75" format="SVG" fileref="staticflow.svg"/>
+ </imageobject>
+ <caption>The flow of events</caption>
+</mediaobject>
+
+<para>
+To pursuit a maximum performance regardless of the preediting mode,
+the IM Server may use the dynamic event flow with the following
+sample protocol sequence.
+</para>
+
+<mediaobject id="dynamicflow">
+ <imageobject>
+ <imagedata scale="75" format="SVG" fileref="dynamicflow.svg"/>
+ </imageobject>
+ <caption>The flow of events</caption>
+</mediaobject>
+
+<para>
+This method can reduce the XIM protocol traffic dramatically
+by updating intercept-event-mask and select-event-mask accordingly.
+The tradeoff of this performance improvement is that the key
+events may be lost or disordered in some particular situation, such as
+when the user types the keyboard in following sequence really fast:
+</para>
+
+<para>
+<preediting on key>"some strings"<preediting off
+key>"another string"
+</para>
+
+<para>
+Since this method requires the input mask updates to the both the IM Server
+and Xlib when turning on and off the preediting, and there is a time lag
+till the requests take effect when two client issues the input mask updates
+simultaneously.
+</para>
+
+<para>
+Another approach of the FrontEnd method is to update the filter-event-mask
+depending on the preediting state and not to update the input mask.
+The IM Server must register both of the preediting on key list and off key
+list by
+<function>XIM_REGISTER_TRIGGERKEYS</function>
+message.
+In this method, Both the IM Server and the IM client select the same
+events on the same client's window, so that the events are delivered
+to both of the IM Server and the client. The preediting on and off
+states are expressed by whether the key events are filtered or not.
+The sample protocol sequence are as follows:
+</para>
+
+<para>
+<<Using static event flow>>
+</para>
+
+<mediaobject id="staticflowsampleseq">
+ <imageobject>
+ <imagedata scale="75" format="SVG" fileref="staticflowsampleseq.svg"/>
+ </imageobject>
+ <caption>The flow of events</caption>
+</mediaobject>
+
+<para>
+<<Using the dynamic event flow>>
+</para>
+
+<mediaobject id="dynamicflowsampleseq">
+ <imageobject>
+ <imagedata scale="75" format="SVG" fileref="dynamicflowsampleseq.svg"/>
+ </imageobject>
+ <caption>The flow of events</caption>
+</mediaobject>
+
+<para>
+This method does not have the problem of the time lag when going across
+the preediting on and off mode, however, the amount of the performance
+acceleration is not as good as the method described above.
+</para>
+
+<para>
+In general, the FrontEnd method requires some synchronization to some
+of the X protocols, such as the ChangeWindowAttribute protocol for the
+event mask change or the GrabKey protocol, since it relies on the X's
+principal event dispatching mechanism. Any X protocol bindings do not
+consider the synchronization might cause some mis-synchronization
+between the IM clients and the IM Server.
+</para>
+
+<para>
+(2) Transport Layer
+</para>
+
+<para>
+The Xlib XIM implementation is layered into three functions, a protocol
+layer, an interface layer and a transport layer. The purpose of this
+layering is to make the protocol independent of transport implementation.
+Each function of these layers are:
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term>The protocol layer</term>
+ <listitem>
+ <para>
+implements overall function of XIM and calls the interface layer
+functions when it needs to communicate to IM Server.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>The interface layer</term>
+ <listitem>
+ <para>
+separates the implementation of the transport layer from the protocol
+layer, in other words, it provides implementation independent hook for
+the transport layer functions.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>The transport layer</term>
+ <listitem>
+ <para>
+handles actual data communication with IM Server. It is done by a set
+of several functions named transporters.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The interface layer and the transport layer make various communication
+channels usable such as X Protocol, TCP/IP, DECnet or STREAM.
+The following is a sample implementation for the transporter using
+the X connection.
+Refer to "xtrans" for the transporter using Socket Transport. <!-- xref ?-->
+</para>
+
+<para>
+At the beginning of the X Transport connection for the XIM transport
+mechanism, two different windows must be created either in an Xlib XIM
+or in an IM Server, with which the Xlib and the IM Server exchange the
+XIM transports by using the ClientMessage events and Window Properties.
+In the following, the window created by the Xlib is referred as the
+"client communication window", and on the other hand, the window created
+by the IM Server is referred as the "IMS communication window".
+</para>
+
+<para>
+Connection
+</para>
+
+<para>
+In order to establish a connection, a communication window is created.
+A ClientMessage in the following event's format is sent to the owner
+window of XIM_SERVER selection, which the IM Server has created.
+</para>
+
+<para>
+Refer to "The Input Method Protocol" for the XIM_SERVER atom. <!-- xref -->
+</para>
+
+<table frame="none" id="clientmessage_sent_to_the_ims_window">
+<title>The ClientMessage sent to the IMS window.</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="center"/>
+ <thead>
+ <row>
+ <entry spanname="span-horiz">Structure Member</entry>
+ <entry>Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS Window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_XCONNECT", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>32</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.l[0]</entry>
+ <entry>client communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.l[1]</entry>
+ <entry>client-major-transport-version (*1)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.l[2]</entry>
+ <entry>client-major-transport-version (*1)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+In order to establish the connection (to notify the IM Server communication
+window), the IM Server sends a ClientMessage in the following event's
+format to the client communication window.
+</para>
+
+<table frame="none" id="clientmessage_sent_by_the_im_server">
+<title>The ClientMessage sent by the IM Server.</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="center"/>
+ <thead>
+ <row>
+ <entry spanname="span-horiz">Structure Member</entry>
+ <entry>Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>client communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_XCONNECT", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>32</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.l[0]</entry>
+ <entry>IMS communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.l[1]</entry>
+ <entry>server-major-transport-version (*1)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.l[2]</entry>
+ <entry>server-minor-transport-version (*1)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.l[3]</entry>
+ <entry>dividing size between ClientMessage and Property (*2)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+(*1) major/minor-transport-version
+</para>
+<para>
+The read/write method is decided by the combination of
+major/minor-transport-version, as follows:
+</para>
+
+
+<table frame="all" id="readwrite_method_and_the_majorminor_transport_version">
+<title>The read/write method and the major/minor-transport-version</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="1"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3*" colsep="1"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="center"/>
+ <thead>
+ <row>
+ <entry spanname="span-horiz">Transport-version</entry>
+ <entry>read/write</entry>
+ </row>
+ <row>
+ <entry>major</entry>
+ <entry>minor</entry>
+ <entry></entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry morerows="2">0</entry>
+ <entry>0</entry>
+ <entry>only-CM & Property-with-CM</entry>
+ </row>
+ <row rowsep="0">
+ <entry>1</entry>
+ <entry>only-CM & multi-CM</entry>
+ </row>
+ <row rowsep="1">
+ <entry>2</entry>
+ <entry>only-CM & multi-CM & Property-with-CM</entry>
+ </row>
+ <row rowsep="1">
+ <entry>1</entry>
+ <entry>0</entry>
+ <entry>PropertyNotify</entry>
+ </row>
+ <row rowsep="0">
+ <entry morerows="1">2</entry>
+ <entry>0</entry>
+ <entry>only-CM & PropertyNotify</entry>
+ </row>
+ <row>
+ <entry>1</entry>
+ <entry>only-CM & multi-CM & PropertyNotify</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<literallayout class="monospaced">
+only-CM : data is sent via a ClientMessage
+multi-CM : data is sent via multiple ClientMessages
+Property-with-CM : data is written in Property, and its Atom
+ is send via ClientMessage
+PropertyNotify : data is written in Property, and its Atom
+ is send via PropertyNotify
+
+</literallayout>
+
+<para>
+The method to decide major/minor-transport-version is as follows:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+The client sends 0 as major/minor-transport-version to the IM Server.
+The client must support all methods in Table D-3.
+The client may send another number as major/minor-transport-version to
+use other method than the above in the future.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The IM Server sends its major/minor-transport-version number to
+the client. The client sends data using the method specified by the
+IM Server.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If major/minor-transport-version number is not available, it is regarded
+as 0.
+<!-- .RE -->
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+(*2) dividing size between ClientMessage and Property
+</para>
+
+<para>
+If data is sent via both of multi-CM and Property, specify the dividing
+size between ClientMessage and Property. The data, which is smaller than
+this size, is sent via multi-CM (or only-CM), and the data, which is
+lager than this size, is sent via Property.
+</para>
+
+<para>
+<emphasis role="bold">read/write</emphasis>
+</para>
+
+<para>
+The data is transferred via either ClientMessage or Window Property in
+the X Window System.
+</para>
+
+<para>
+Format for the data from the Client to the IM Server
+</para>
+
+<para>
+ClientMessage
+</para>
+
+<para>
+If data is sent via ClientMessage event, the format is as follows:
+</para>
+
+
+<table frame="none" id="clientmessage_events_format_first_or_middle">
+<title>The ClientMessage event's format (first or middle)</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="center"/>
+ <thead>
+ <row>
+ <entry spanname="span-horiz">Structure Member</entry>
+ <entry>Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_MOREDATA", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>char</entry>
+ <entry>data.b[20]</entry>
+ <entry>(read/write DATA : 20 byte)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<table frame="none" id="clientmessage_events_format_only_or_last">
+<title>The ClientMessage event's format (only or last)</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="center"/>
+ <thead>
+ <row>
+ <entry spanname="span-horiz">Structure Member</entry>
+ <entry>Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_PROTOCOL", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>char</entry>
+ <entry>data.b[20]</entry>
+ <entry>(read/write DATA : MAX 20 byte) (*1)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+(*1) If the data is smaller than 20 byte, all data other than available data
+must be 0.
+</para>
+
+<para>
+Property
+</para>
+
+<para>
+In the case of large data, data will be sent via the Window Property
+for the efficiency. There are the following two methods to notify
+Property, and transport-version is decided which method is used.
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+The XChangeProperty function is used to store data in the client
+communication window, and Atom of the stored data is notified to the
+IM Server via ClientMessage event.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The XChangeProperty function is used to store data in the client
+communication window, and Atom of the stored data is notified to the
+IM Server via PropertyNotify event.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+The arguments of the XChangeProperty are as follows:
+</para>
+
+<table frame="none" id="xchangeproperty_events_format">
+<title>The XChangeProperty event's format</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="center"/>
+ <thead>
+ <row>
+ <entry spanname="span-horiz">Argument</entry>
+ <entry>Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>property</entry>
+ <entry>read/write property Atom (*1)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>type</entry>
+ <entry>XA_STRING </entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>mode</entry>
+ <entry>PropModeAppend</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_char</entry>
+ <entry>*data</entry>
+ <entry>read/write DATA</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>nelements</entry>
+ <entry>length of DATA</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+The read/write property ATOM allocates the following strings by
+<function>XInternAtom</function>.
+</para>
+
+<para>
+"_clientXXX"
+</para>
+
+<para>
+The client changes the property with the mode of PropModeAppend and
+the IM Server will read it with the delete mode i.e. (delete = True).
+</para>
+
+<para>
+If Atom is notified via ClientMessage event, the format of the ClientMessage
+is as follows:
+</para>
+
+<table frame="none" id="clientmessage_events_format_to_send_atom_of_property">
+<title>The ClientMessage event's format to send Atom of property</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="center"/>
+ <thead>
+ <row>
+ <entry spanname="span-horiz">Structure Members</entry>
+ <entry>Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_PROTOCOL", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>32</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.l[0]</entry>
+ <entry>length of read/write property Atom</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.l[1]</entry>
+ <entry>read/write property Atom</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+Format for the data from the IM Server to the Client
+</para>
+
+<para>
+<!-- .LP -->
+<!-- .RS -->
+<!-- .B -->
+ClientMessage
+</para>
+<para>
+<!-- .LP -->
+The format of the ClientMessage is as follows:
+</para>
+
+
+
+<table frame="none" id="clientmessage_events_format_for_first_or_middle">
+<title>The ClientMessage event's format (first or middle)</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="center"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Members</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event </entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>client communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_MOREDATA", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>char</entry>
+ <entry>data.b[20]</entry>
+ <entry>(read/write DATA : 20 byte)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+
+<table frame="none" id="clientmessage_events_format_for_only_or_last">
+<title>The ClientMessage event's format (only or last)</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="center"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Members</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event </entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>client communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_PROTOCOL", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>char</entry>
+ <entry>data.b[20]</entry>
+ <entry>(read/write DATA : MAX 20 byte) (*1)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+(*1) If the data size is smaller than 20 bytes, all data other than available
+data must be 0.
+</para>
+
+<para>
+Property
+</para>
+
+<para>
+In the case of large data, data will be sent via the Window Property
+for the efficiency. There are the following two methods to notify
+Property, and transport-version is decided which method is used.
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+The XChangeProperty function is used to store data in the IMS
+communication window, and Atom of the property is sent via the
+ClientMessage event.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The XChangeProperty function is used to store data in the IMS
+communication window, and Atom of the property is sent via
+PropertyNotify event.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+The arguments of the XChangeProperty are as follows:
+</para>
+
+<table frame="none" id="xchangeproperty_events_format_2">
+<title>The XChangeProperty event's format</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="center"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Argument</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display which to connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>client communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>property</entry>
+ <entry>read/write property Atom (*1)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>type</entry>
+ <entry>XA_STRING</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>mode</entry>
+ <entry>PropModeAppend</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_char</entry>
+ <entry>*data</entry>
+ <entry>read/write DATA</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>nelements</entry>
+ <entry>length of DATA</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+(*1) The read/write property ATOM allocates some strings, which are not
+allocated by the client, by <function>XInternAtom</function>.
+</para>
+
+<para>
+The IM Server changes the property with the mode of PropModeAppend and
+the client reads it with the delete mode, i.e. (delete = True).
+</para>
+
+<para>
+If Atom is notified via ClientMessage event, the format of the ClientMessage
+is as follows:
+</para>
+
+
+<table frame="none" id="clientmessage_events_format_to_send_atom_of_property_2">
+<title>The ClientMessage event's format to send Atom of property</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*"/>
+ <colspec colname="col3" colwidth="3.5*"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="center"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Member</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage </entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System </entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System </entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects </entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>client communication window ID </entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_PROTOCOL", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>32 </entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.l[0]</entry>
+ <entry>length of read/write property ATOM </entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.l[1]</entry>
+ <entry>read/write property ATOM </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+Closing Connection
+</para>
+
+<para>
+If the client disconnect with the IM Server, shutdown function should
+free the communication window properties and etc..
+</para>
+</appendix>
+</book>
diff --git a/libX11/specs/i18n/Framework.ms b/libX11/specs/i18n/Framework.ms deleted file mode 100644 index 98a61f930..000000000 --- a/libX11/specs/i18n/Framework.ms +++ /dev/null @@ -1,1564 +0,0 @@ -.\" To print this out, type tbl macros.t ThisFile | troff -ms -.EH '''' -.OH '''' -.EF '''' -.OF '''' -.ps 11 -.nr PS 11 -\& -.TL -\s+3\fBX11R6 Sample Implementation Frame Work\fP\s-3 -.sp 2 -.AU -Katsuhisa Yano -.AI -TOSHIBA Corporation -.AU -Yoshio Horiuchi -.AI -IBM Japan -.LP -.bp -.br -\& -.sp 15 -.ps 9 -.nr PS 9 -.LP -Copyright \(co 1994 by TOSHIBA Corporation -.br -Copyright \(co 1994 by IBM Corporation -.LP -Permission to use, copy, modify, and distribute this documentation -for any purpose and without fee is hereby granted, provided -that the above copyright notice and this permission notice appear -in all copies. -TOSHIBA Corporation and IBM Corporation make no representations about -the suitability for any purpose of the information in this document. -This documentation is provided as is without express or implied warranty. -.sp 5 -Copyright \(co 1994 X Consortium -.LP -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: -.LP -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. -.LP -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 -X CONSORTIUM 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. -.LP -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. -.sp 3 -\fIX Window System\fP is a trademark of The Open Group. -.ps 11 -.nr PS 11 -.bp 1 -.EH '\fBSample Implementation Frame Work\fP''\fB\*(xV\fP' -.OH '\fBSample Implementation Frame Work\fP''\fB\*(xV\fP' -.EF ''\fB % \fP'' -.OF ''\fB % \fP'' -.NH 1 -Preface -.XS \*(SN Preface -.XE -.LP -This document proposes to define the structures, methods and their -signatures that are expected to be common to all locale dependent -functions within the Xlib sample implementation. The following -illustration (Fig.1) is proposed to outline the separating of -the components within the sample implementation. -.LP -.\" figure start -.in +1c -\^... 0.237 5.796 5.24 10.14 -\^... 0.000i 4.344i 5.003i 0.000i -.nr 00 \n(.u -.nf -.PS 4.344i 5.003i -.br -.ps 11 -\h'1.753i'\v'2.130i'\v'-.13m'\L'-1.000i\(br'\v'.13m' -.sp -1 -\h'1.753i'\v'1.130i'\l'1.500i' -.sp -1 -\h'3.253i'\v'1.130i'\v'-.13m'\L'1.000i\(br'\v'.13m' -.sp -1 -\h'3.253i'\v'2.130i'\l'-1.500i' -.sp -1 -\h'1.751i'\v'1.628i'\l'1.499i' -.sp -1 -\h'2.500i'\v'1.128i'\v'-.13m'\L'0.500i\(br'\v'.13m' -.sp -1 -\h'1.875i'\v'1.344i'\h'-0.0m'\v'0.2m'\s12\fRInput\fP -.sp -1 -\h'1.875i'\v'1.532i'\h'-0.0m'\v'0.2m'\s12\fRMethod\fP -.sp -1 -\h'2.625i'\v'1.344i'\h'-0.0m'\v'0.2m'\s12\fROutput\fP -.sp -1 -\h'2.625i'\v'1.532i'\h'-0.0m'\v'0.2m'\s12\fRMethod\fP -.sp -1 -\h'1.938i'\v'1.844i'\h'-0.0m'\v'0.2m'\s12\fR<Locl. Serv. API>\fP -.sp -1 -\h'2.000i'\v'2.032i'\h'-0.0m'\v'0.2m'\s12\fRX Locale Object\fP -.sp -1 -\h'3.503i'\v'1.630i'\v'-.13m'\L'-0.500i\(br'\v'.13m' -.sp -1 -\h'3.503i'\v'1.130i'\l'1.500i' -.sp -1 -\h'5.003i'\v'1.130i'\v'-.13m'\L'0.500i\(br'\v'.13m' -.sp -1 -\h'5.003i'\v'1.630i'\l'-1.500i' -.sp -1 -\h'3.625i'\v'1.344i'\h'-0.0m'\v'0.2m'\s12\fRC Library\fP -.sp -1 -\h'4.250i'\v'1.532i'\h'-0.0m'\v'0.2m'\s12\fRANSI impl.\fP -.sp -1 -\h'0.003i'\v'1.630i'\v'-.13m'\L'-0.500i\(br'\v'.13m' -.sp -1 -\h'0.003i'\v'1.130i'\l'1.500i' -.sp -1 -\h'1.503i'\v'1.130i'\v'-.13m'\L'0.500i\(br'\v'.13m' -.sp -1 -\h'1.503i'\v'1.630i'\l'-1.500i' -.sp -1 -\h'0.125i'\v'1.344i'\h'-0.0m'\v'0.2m'\s12\fRLocale Library\fP -.sp -1 -\h'0.438i'\v'1.507i'\h'-0.0m'\v'0.2m'\s12\fRnon-AnSI impl.\fP -.sp -1 -\h'3.500i'\v'0.782i'\h'-0.0m'\v'0.2m'\s12\fR<< ANSI/MSE API >>\fP -.sp -1 -\h'4.250i'\v'0.969i'\h'-0.0m'\v'0.2m'\h'-\w'\s12\fR(X Contrib)\fP'u/2u'\s12\fR(X Contrib)\fP\h'-\w'\s12\fR(X Contrib)\fP'u/2u' -.sp -1 -\h'0.125i'\v'3.094i'\h'-0.0m'\v'0.2m'\s12\fRXLC_XLOCALE\fP -.sp -1 -\h'0.125i'\v'3.282i'\h'-0.0m'\v'0.2m'\s12\fR- MB_CUR_MAX\fP -.sp -1 -\h'0.125i'\v'3.444i'\h'-0.0m'\v'0.2m'\s12\fR- codeset info\fP -.sp -1 -\h'0.125i'\v'3.607i'\h'-0.0m'\v'0.2m'\s12\fRo char/charset\fP -.sp -1 -\h'0.125i'\v'3.769i'\h'-0.0m'\v'0.2m'\s12\fRo conv/charset\fP -.sp -1 -\h'0.003i'\v'3.880i'\v'-.13m'\L'-1.000i\(br'\v'.13m' -.sp -1 -\h'0.003i'\v'2.880i'\l'1.500i' -.sp -1 -\h'1.503i'\v'2.880i'\v'-.13m'\L'1.000i\(br'\v'.13m' -.sp -1 -\h'1.503i'\v'3.880i'\l'-1.500i' -.sp -1 -\h'1.875i'\v'3.094i'\h'-0.0m'\v'0.2m'\s12\fRXLC_FONTSET\fP -.sp -1 -\h'1.875i'\v'3.282i'\h'-0.0m'\v'0.2m'\s12\fR- fonset info\fP -.sp -1 -\h'1.875i'\v'3.444i'\h'-0.0m'\v'0.2m'\s12\fR- charset info\fP -.sp -1 -\h'1.875i'\v'3.607i'\h'-0.0m'\v'0.2m'\s12\fR- font/charset\fP -.sp -1 -\h'1.875i'\v'3.769i'\h'-0.0m'\v'0.2m'\s12\fR- XLFD, GL/GR\fP -.sp -1 -\h'1.753i'\v'3.880i'\v'-.13m'\L'-1.000i\(br'\v'.13m' -.sp -1 -\h'1.753i'\v'2.880i'\l'1.500i' -.sp -1 -\h'3.253i'\v'2.880i'\v'-.13m'\L'1.000i\(br'\v'.13m' -.sp -1 -\h'3.253i'\v'3.880i'\l'-1.500i' -.sp -1 -\h'3.625i'\v'3.444i'\h'-0.0m'\v'0.2m'\s12\fR- codeset info\fP -.sp -1 -\h'3.625i'\v'3.607i'\h'-0.0m'\v'0.2m'\s12\fRo char/charset\fP -.sp -1 -\h'3.625i'\v'3.769i'\h'-0.0m'\v'0.2m'\s12\fRo conv/charset\fP -.sp -1 -\h'3.625i'\v'3.282i'\h'-0.0m'\v'0.2m'\s12\fR- MB_CUR_MAX\fP -.sp -1 -\h'3.625i'\v'3.094i'\h'-0.0m'\v'0.2m'\s12\fRlocaledef DB\fP -.sp -1 -\h'3.503i'\v'3.880i'\v'-.13m'\L'-1.000i\(br'\v'.13m' -.sp -1 -\h'3.503i'\v'2.880i'\l'1.500i' -.sp -1 -\h'5.003i'\v'2.880i'\v'-.13m'\L'1.000i\(br'\v'.13m' -.sp -1 -\h'5.003i'\v'3.880i'\l'-1.500i' -.sp -1 -\h'0.753i'\v'0.250i'\D'l0.000i -0.250i' -.sp -1 -\h'0.753i'\l'3.500i' -.sp -1 -\h'4.253i'\D'l0.000i 0.250i' -.sp -1 -\h'4.253i'\v'0.250i'\l'-3.500i' -.sp -1 -\h'2.500i'\v'0.157i'\h'-0.0m'\v'0.2m'\h'-\w'\s12\fRApplication\fP'u/2u'\s12\fRApplication\fP\h'-\w'\s12\fRApplication\fP'u/2u' -.sp -1 -\v'0.782i'\h'-0.0m'\v'0.2m'\s12\fR<< ANSI/MSE API >>\fP -.sp -1 -\h'0.751i'\v'0.969i'\h'-0.0m'\v'0.2m'\h'-\w'\s12\fR(X Contrib)\fP'u/2u'\s12\fR(X Contrib)\fP\h'-\w'\s12\fR(X Contrib)\fP'u/2u' -.sp -1 -\h'2.500i'\v'2.128i'\v'-.13m'\L'0.749i\(br'\v'.13m' -.sp -1 -\h'2.475i'\v'2.777i'\D'l0.025i 0.100i' -.sp -1 -\h'2.525i'\v'2.777i'\D'l-0.025i 0.100i' -.sp -1 -\h'2.500i'\v'2.315i'\D'l-0.250i 0.187i' -.sp -1 -\h'2.250i'\v'2.502i'\l'-1.124i' -.sp -1 -\h'1.126i'\v'2.502i'\v'-.13m'\L'0.375i\(br'\v'.13m' -.sp -1 -\h'1.101i'\v'2.777i'\D'l0.025i 0.100i' -.sp -1 -\h'1.151i'\v'2.777i'\D'l-0.025i 0.100i' -.sp -1 -\h'2.500i'\v'2.315i'\D'l0.250i 0.187i' -.sp -1 -\h'2.750i'\v'2.502i'\l'1.125i' -.sp -1 -\h'3.875i'\v'2.502i'\v'-.13m'\L'0.375i\(br'\v'.13m' -.sp -1 -\h'3.850i'\v'2.777i'\D'l0.025i 0.100i' -.sp -1 -\h'3.900i'\v'2.777i'\D'l-0.025i 0.100i' -.sp -1 -\h'0.376i'\v'1.628i'\v'-.13m'\L'1.249i\(br'\v'.13m' -.sp -1 -\h'0.351i'\v'2.777i'\D'l0.025i 0.100i' -.sp -1 -\h'0.401i'\v'2.777i'\D'l-0.025i 0.100i' -.sp -1 -\h'4.625i'\v'1.628i'\v'-.13m'\L'1.249i\(br'\v'.13m' -.sp -1 -\h'4.600i'\v'2.777i'\D'l0.025i 0.100i' -.sp -1 -\h'4.650i'\v'2.777i'\D'l-0.025i 0.100i' -.sp -1 -\h'2.125i'\v'0.253i'\v'-.13m'\L'0.375i\(br'\v'.13m' -.sp -1 -\h'2.100i'\v'0.528i'\D'l0.025i 0.100i' -.sp -1 -\h'2.150i'\v'0.528i'\D'l-0.025i 0.100i' -.sp -1 -\h'2.875i'\v'0.253i'\v'-.13m'\L'0.375i\(br'\v'.13m' -.sp -1 -\h'2.850i'\v'0.528i'\D'l0.025i 0.100i' -.sp -1 -\h'2.900i'\v'0.528i'\D'l-0.025i 0.100i' -.sp -1 -\h'1.126i'\v'0.253i'\v'-.13m'\L'0.375i\(br'\v'.13m' -.sp -1 -\h'1.101i'\v'0.528i'\D'l0.025i 0.100i' -.sp -1 -\h'1.151i'\v'0.528i'\D'l-0.025i 0.100i' -.sp -1 -\h'3.875i'\v'0.253i'\v'-.13m'\L'0.375i\(br'\v'.13m' -.sp -1 -\h'3.850i'\v'0.528i'\D'l0.025i 0.100i' -.sp -1 -\h'3.900i'\v'0.528i'\D'l-0.025i 0.100i' -.sp -1 -\v'4.002i'\D'l0.125i 0.125i' -.sp -1 -\h'0.125i'\v'4.127i'\l'3.000i' -.sp -1 -\h'3.125i'\v'4.127i'\D'l0.125i -0.125i' -.sp -1 -\h'3.500i'\v'4.002i'\D'l0.125i 0.125i' -.sp -1 -\h'3.625i'\v'4.127i'\l'1.250i' -.sp -1 -\h'4.875i'\v'4.127i'\D'l0.125i -0.125i' -.sp -1 -\h'1.626i'\v'4.344i'\h'-0.0m'\v'0.2m'\h'-\w'\s12\fRXLocale Source (X Core)\fP'u/2u'\s12\fRXLocale Source (X Core)\fP\h'-\w'\s12\fRXLocale Source (X Core)\fP'u/2u' -.sp -1 -\h'4.250i'\v'4.344i'\h'-0.0m'\v'0.2m'\h'-\w'\s12\fRSystem LOcale Source\fP'u/2u'\s12\fRSystem LOcale Source\fP\h'-\w'\s12\fRSystem LOcale Source\fP'u/2u' -.sp -1 -\h'2.500i'\v'0.782i'\h'-0.0m'\v'0.2m'\h'-\w'\s12\fRXLib API\fP'u/2u'\s12\fRXLib API\fP\h'-\w'\s12\fRXLib API\fP'u/2u' -.sp -1 -\h'2.500i'\v'0.969i'\h'-0.0m'\v'0.2m'\h'-\w'\s12\fR(X Core)\fP'u/2u'\s12\fR(X Core)\fP\h'-\w'\s12\fR(X Core)\fP'u/2u' -.sp -1 -\h'1.751i'\v'0.782i'\h'-0.0m'\v'0.2m'\s12\fR<<\fP -.sp -1 -\h'3.063i'\v'0.782i'\h'-0.0m'\v'0.2m'\s12\fR>>\fP -.sp -1 -.sp 1+4.344i -.in -1c -.PE -.if \n(00 .fi -.\" figure end -.LP -.ce -.sp 6p -Fig.1 : Frame Work of Locale Service API Proposal -.LP -Generally speaking, the internationalized portion of Xlib (Locale -Dependent X, LDX) consists of three objects; -locale (LC) , input method (IM) and output method (OM). -The LC provides a set of information that depends on user's language -environment. The IM manages text inputing, and the OM manages text -drawing. Both IM and OM highly depend on LC data. -.LP -In X11R5, there are two sample implementations, Ximp and Xsi, for -Xlib internationalization. But in both implementations, IM and OM -actually refer the private extension of LC. It breaks coexistence -of these two sample implementations. For example, if a user creates -a new OM for special purpose as a part of Ximp, it will not work with -Xsi. -.LP -As a solution of this problem, we propose to define the standard -APIs between these three objects, and define the structure that are -common to these objects. -.LP -.NH 1 -Objective -.XS \*(SN Objective -.XE -.LP -.IP \(bu -Explain the current X11R6 sample implementation -.IP \(bu -Document the common set of locale dependent interfaces -.IP \(bu -Provide more flexible pluggable layer -.LP -.NH 1 -Locale Object Binding Functions -.XS \*(SN Locale Object Binding Functions -.XE -.LP -This chapter describes functions related locale object binding for -implementing the pluggable layer. -.LP -A locale loader is an entry point for locale object, which -instantiates XLCd object and binds locale methods with specified -locale name. The behavior of loader is implementation dependent. -And, what kind of loaders are available is also implementation -dependent. -.LP -The loader is called in -.PN _XOpenLC, -but caller of -.PN _XOpenLC -does not need to care about its inside. For example, if the loader is -implemented with dynamic load functions, and the dynamic module is -expected to be unloaded when the corresponding XLCd is freed, -close methods of XLCdMethods should handle unloading. -.LP -.sp -\fBInitializing a locale loader list\fP -.LP -.FD 0 -void _XlcInitLoader() -.FN -The -.PN _XlcInitLoader -function initializes the locale loader list with vendor specific -manner. Each loader is registered with calling -.PN _XlcAddLoader. -The number of loaders and their order in the loader list is -implementation dependent. -.sp -.LP -\fBAdd a loader\fP -.LP -.Ds 0 -.TA .5i 2.5i -.ta .5i 2.5i -typedef XLCd (*XLCdLoadProc)(\fIname\fP); - char \fI*name\fP; - -typedef int XlcPosition; -.De -.TS -lw(.5i) lw(2i) lw(2i). -T{ -#define -T} T{ -XlcHead -T} T{ - 0 -T} -T{ -#define -T} T{ -XlcTail -T} T{ --1 -T} -.TE -.LP -.FD 0 -Bool _XlcAddLoader(\fIproc, position\fP) -.br - XLCdLoadProc \fIproc\fP; -.br - XlcPosition \fIposition\fP; -.FN -.LP -The -.PN _XlcAddLoader -function registers the specified locale loader ``\fIproc\fP'' to the -internal loader list. The position specifies that the loader -``\fIproc\fP'' should be placed in the top of the loader list(XlcHead) -or last(XlcTail). -.LP -The object loader is called from the top of the loader list in order, -when calling time. -.sp -.LP -\fBRemove a loader\fP -.LP -.FD 0 -void _XlcRemoveLoader(\fIproc\fP) -.br - XLCdLoadProc \fIproc\fP; -.FN -.LP -The -.PN _XlcRemoveLoader -function removes the locale loader specified by ``\fIproc\fP'' from the -loader list. -.LP -Current implementation provides following locale loaders; -.DS -.PN _XlcDefaultLoader -.PN _XlcGenericLoader -.PN _XlcEucLoader -.PN _XlcSjisLoader -.PN _XlcUtfLoader -.PN _XaixOsDynamicLoad -.DE -.LP -.NH 1 -Locale Method Interface -.XS \*(SN Locale Method Interface -.XE -.LP -This chapter describes the locale method API, which is a set of -accessible functions from both IM and OM parts. -The locale method API provides the functionalities; obtaining locale -dependent information, handling charset, converting text, etc. -.LP -As a result of using these APIs instead of accessing vender private -extension of the locale object, we can keep locale, IM and OM -independently each other. -.LP -.NH 1 -Locale Method Functions -.XS \*(SN Locale Method Functions -.XE -.LP -\fBOpen a Locale Method\fP -.LP -.FD 0 -XLCd _XOpenLC(\fIname\fP) -.br - char \fI*name\fP; -.FN -.LP -The -.PN _XOpenLC -function opens a locale method which corresponds to the -specified locale name. -.PN _XOpenLC -calls a locale object loader, which is registered via -.PN _XlcAddLoader into the internal loader list. If the called loader -is valid and successfully opens a locale, -.PN _XOpenLC -returns the XLCd. If the loader is invalid or failed to open a locale, -.PN _XOpenLC -calls the next loader. If all registered loaders cannot open a locale, -.PN _XOpenLC -returns NULL. -.LP -.FD 0 -XLCd _XlcCurrentLC() -.FN -.LP -The -.PN _XlcCurrentLC -function returns an XLCd that are bound to current locale. -.sp -.LP -\fBClose a Locale Method\fP -.LP -.FD 0 -void _XCloseLC(\fIlcd\fP) -.br - XLCd \fIlcd\fP; -.FN -.LP -The -.PN _XCloseLC -function close a locale method the specified lcd. -.sp -.LP -\fBObtain Locale Method values\fP -.LP -.FD 0 -char * _XGetLCValues(\fIlcd\fP, ...) -.br - XLCd \fIlcd\fP; -.FN -.LP -The -.PN _XGetLCValues -function returns NULL if no error occurred; otherwise, it returns the -name of the first argument that could not be obtained. -The following values are defined as standard arguments. Other values -are implementation dependent. -.LP -.TS H -tab(:); -l l l. -_ -.sp 6p -.B -Name:Type:Description -.sp 6p -_ -.sp 6p -.TH -.R -XlcNCodeset:char*:codeset part of locale name -XlcNDefaultString:char*:XDefaultString() -XlcNEncodingName:char*:encoding name -XlcNLanguage:char*:language part of locale name -XlcNMbCurMax:int:ANSI C MB_CUR_MAX -XlcNStateDependentEncoding:Bool:is state-dependent encoding or not -XlcNTerritory:char*:territory part of locale name -.sp 6p -_ -.TE -.LP -.NH 1 -Charset functions -.XS \*(SN -Charset functions -.XE -.LP -The XlcCharSet is an identifier which represents a subset of characters -(character set) in the locale object. -.LP -.Ds 0 -.TA .5i 2.5i -.ta .5i 2.5i -typedef enum { - XlcUnknown, XlcC0, XlcGL, XlcC1, XlcGR, XlcGLGR, XlcOther -} XlcSide; - -typedef struct _XlcCharSetRec *XlcCharSet; - -typedef struct { - char *name; - XPointer value; -} XlcArg, *XlcArgList; - -typedef char* (*XlcGetCSValuesProc)(\fIcharset\fP, \fIargs\fP, \fInum_args\fP); - XlcCharSet \fIcharset\fP; - XlcArgList \fIargs\fP; - int \fInum_args\fP; - -typedef struct _XlcCharSetRec { - char *name; - XrmQuark xrm_name; - char *encoding_name; - XrmQuark xrm_encoding_name; - XlcSide side; - int char_size; - int set_size; - char *ct_sequence; - XlcGetCSValuesProc get_values; -} XlcCharSetRec; -.De -.sp -.LP -\fBGet an XlcCharSet\fP -.LP -.FD 0 -XlcCharSet _XlcGetCharSet(\fIname\fP) -.br - char \fI*name\fP; -.FN -.LP -The -.PN _XlcGetCharSet -function gets an XlcCharSet which corresponds to the charset name -specified by ``\fIname\fP''. -.PN _XlcGetCharSet -returns NULL, if no XlcCharSet bound to specified ``\fIname\fP''. -.LP -The following character sets are pre-registered. -.LP -.TS H -tab(@); -l l. -_ -.sp 6p -.B -Name@Description -.sp 6p -_ -.sp 6p -.TH -.R -ISO8859-1:GL@7-bit ASCII graphics (ANSI X3.4-1968), -@Left half of ISO 8859 sets -JISX0201.1976-0:GL@Left half of JIS X0201-1976 (reaffirmed 1984), -@8-Bit Alphanumeric-Katakana Code -.sp -ISO8859-1:GR@Right half of ISO 8859-1, Latin alphabet No. 1 -ISO8859-2:GR@Right half of ISO 8859-2, Latin alphabet No. 2 -ISO8859-3:GR@Right half of ISO 8859-3, Latin alphabet No. 3 -ISO8859-4:GR@Right half of ISO 8859-4, Latin alphabet No. 4 -ISO8859-7:GR@Right half of ISO 8859-7, Latin/Greek alphabet -ISO8859-6:GR@Right half of ISO 8859-6, Latin/Arabic alphabet -ISO8859-8:GR@Right half of ISO 8859-8, Latin/Hebrew alphabet -ISO8859-5:GR@Right half of ISO 8859-5, Latin/Cyrillic alphabet -ISO8859-9:GR@Right half of ISO 8859-9, Latin alphabet No. 5 -JISX0201.1976-0:GR@Right half of JIS X0201-1976 (reaffirmed 1984), -@8-Bit Alphanumeric-Katakana Code -.sp -GB2312.1980-0:GL@GB2312-1980, China (PRC) Hanzi defined as GL -GB2312.1980-0:GR@GB2312-1980, China (PRC) Hanzi defined as GR -JISX0208.1983-0:GL@JIS X0208-1983, Japanese Graphic Character Set -@defined as GL -JISX0208.1983-0:GR@JIS X0208-1983, Japanese Graphic Character Set -@defined as GR -KSC5601.1987-0:GL@KS C5601-1987, Korean Graphic Character Set -@defined as GL -KSC5601.1987-0:GR@KS C5601-1987, Korean Graphic Character Set -@defined as GR -JISX0212.1990-0:GL@JIS X0212-1990, Japanese Graphic Character Set -@defined as GL -JISX0212.1990-0:GR@JIS X0212-1990, Japanese Graphic Character Set -@defined as GR -.\" CNS11643.1986-0:GL -.\" CNS11643.1986-1:GL -.\" TIS620-0:GR -.sp 6p -_ -.TE -.LP -.sp -\fBAdd an XlcCharSet\fP -.LP -.FD 0 -Bool _XlcAddCharSet(\fIcharset\fP) - XlcCharSet \fIcharset\fP; -.FN -.LP -The -.PN _XlcAddCharSet -function registers XlcCharSet specified by ``\fIcharset\fP''. -.LP -.sp -\fBObtain Character Set values\fP -.LP -.FD 0 -char * _XlcGetCSValues(\fIcharset\fP, ...) -.br - XlcCharSet \fIcharset\fP; -.FN -.LP -The -.PN _XlcGetCSValues -function returns NULL if no error occurred; -otherwise, it returns the name of the first argument that could not -be obtained. The following values are defined as standard arguments. -Other values are implementation dependent. -.LP -.TS H -tab(:); -l l l. -_ -.sp 6p -.B -Name:Type:Description -.sp 6p -_ -.sp 6p -.TH -.R -XlcNName:char*:charset name -XlcNEncodingName:char*:XLFD CharSet Registry and Encoding -XlcNSide:XlcSide:charset side (GL, GR, ...) -XlcNCharSize:int:number of octets per character -XlcNSetSize:int:number of character sets -XlcNControlSequence:char*:control sequence of Compound Text -.sp 6p -_ -.TE -.LP -.NH 1 -Converter Functions -.XS \*(SN Converter Functions -.XE -.LP -We provide a set of the common converter APIs, that are independent -from both of source and destination text type. -.LP -.Ds 0 -.TA .5i 2.5i -.ta .5i 2.5i -typedef struct _XlcConvRec *XlcConv; - -typedef void (*XlcCloseConverterProc)(\fIconv\fP); - XlcConv \fIconv\fP; - -typedef int (*XlcConvertProc)(\fIconv\fP, \fIfrom\fP, \fIfrom_left\fP, \fIto\fP, \fIto_left\fP, \fIargs\fP, \fInum_args\fP); - XlcConv \fIconv\fP; - XPointer \fI*from\fP; - int \fI*from_left\fP; - XPointer \fI*to\fP; - int \fI*to_left\fP; - XPointer \fI*args\fP; - int \fInum_args\fP; - -typedef void (*XlcResetConverterProc)(\fIconv\fP); - XlcConv \fIconv\fP; - -typedef struct _XlcConvMethodsRec { - XlcCloseConverterProc close; - XlcConvertProc convert; - XlcResetConverterProc reset; -} XlcConvMethodsRec, *XlcConvMethods; - -typedef struct _XlcConvRec { - XlcConvMethods methods; - XPointer state; -} XlcConvRec; -.De -.LP -.sp -\fBOpen a converter\fP -.LP -.FD 0 -XlcConv _XlcOpenConverter(\fIfrom_lcd\fP, \fIfrom_type\fP, \fIto_lcd\fP, \fIto_type\fP) -.br - XLCd \fIfrom_lcd\fP; -.br - char \fI*from_type\fP; -.br - XLCd \fIto_lcd\fP; -.br - char \fI*to_type\fP; -.FN -.LP -.PN _XlcOpenConverter -function opens the converter which converts a text from specified -``\fIfrom_type\fP'' to specified ``\fIto_type\fP'' encoding. If the -function cannot find proper converter or cannot open a corresponding -converter, it returns NULL. Otherwise, it returns the conversion -descriptor. -.LP -The following types are pre-defined. Other types are implementation -dependent. -.LP -.TS H -tab(:); -l l l l. -_ -.sp 6p -.B -Name:Type:Description:Arguments -.sp 6p -_ -.sp 6p -.TH -.R -XlcNMultiByte:char *:multibyte:- -XlcNWideChar:wchar_t *:wide character:- -XlcNCompoundText:char *:COMPOUND_TEXT:- -XlcNString:char *:STRING:- -XlcNCharSet:char *:per charset:XlcCharSet -XlcNChar:char *:per character:XlcCharSet -.sp 6p -_ -.TE -.LP -.sp -\fBClose a converter\fP -.LP -.FD 0 -void _XlcCloseConverter(\fIconv\fP) -.br - XlcConv \fIconv\fP; -.FN -.LP -The -.PN _XlcCloseConverter -function closes the specified converter ``\fIconv\fP''. -.LP -.sp -\fBCode conversion\fP -.LP -.FD 0 -int _XlcConvert(\fIconv\fP, \fIfrom\fP, \fIfrom_left\fP, \fIto\fP, \fIto_left\fP, \fIargs\fP, \fInum_args\fP) -.br - XlcConv \fIconv\fP; -.br - XPointer \fI*from\fP; -.br - int \fI*from_left\fP; -.br - XPointer \fI*to\fP; -.br - int \fI*to_left\fP; -.br - XPointer \fI*args\fP; -.br - int \fInum_args\fP; -.FN -.LP -The -.PN _XlcConvert -function converts a sequence of characters from one type, in the array -specified by ``\fIfrom\fP'', into a sequence of corresponding characters -in another type, in the array specified by ``\fIto\fP''. The types are -those specified in the -.PN _XlcOpenConverter() -call that returned the conversion descriptor, ``\fIconv\fP''. -The arguments ``\fIfrom\fP'', ``\fIfrom_left\fP'', ``\fIto\fP'' and -``\fIto_left\fP'' have the same specification of XPG4 iconv function. -.LP -For state-dependent encodings, the conversion descriptor ``\fIconv\fP'' -is placed into its initial shift state by a call for which ``\fIfrom\fP'' -is a NULL pointer, or for which ``\fIfrom\fP'' points to a null pointer. -.LP -The following 2 converters prepared by locale returns appropriate -charset (XlcCharSet) in an area pointed by args[0]. -.LP -.TS -tab(:); -l l l. -_ -.sp 6p -.B -From:To:Description -.sp 6p -_ -.sp 6p -.R -XlcNMultiByte:XlcNCharSet:Segmentation (Decomposing) -XlcNWideChar:XlcNCharSet:Segmentation (Decomposing) -.sp 6p -_ -.TE -.LP -The conversion, from XlcNMultiByte/XlcNWideChar to XlcNCharSet, -extracts a segment which has same charset encoding characters. -More than one segment cannot be converted in a call. -.LP -.sp -\fBReset a converter\fP -.LP -.FD 0 -void _XlcResetConverter(\fIconv\fP) -.br - XlcConv \fIconv\fP; -.FN -.LP -The -.PN _XlcResetConverter -function reset the specified converter ``\fIconv\fP''. -.LP -.sp -\fBRegister a converter\fP -.LP -.Ds 0 -.TA .5i 2.5i -.ta .5i 2.5i -typedef XlcConv (*XlcOpenConverterProc)(\fIfrom_lcd\fP, \fIfrom_type\fP, \fIto_lcd\fP, \fIto_type\fP); - XLCd \fIfrom_lcd\fP; - char \fI*from_type\fP; - XLCd \fIto_lcd\fP; - char \fI*to_type\fP; -.De -.LP -.FD 0 -Bool _XlcSetConverter(\fIfrom_lcd\fP, \fIfrom\fP, \fIto_lcd\fP, \fIto\fP, \fIconverter\fP) -.br - XLCd \fIfrom_lcd\fP; -.br - char \fI*from\fP; -.br - XLCd \fIto_lcd\fP; -.br - char \fI*to\fP; -.br - XlcOpenConverterProc \fIconverter\fP; -.FN -.LP -The \fBXlcSetConverter\fP function registers a converter which convert -from ``\fIfrom_type\fP'' to ``\fIto_type\fP'' into the converter list -(in the specified XLCd). -.LP -.NH 1 -X Locale Database functions -.XS \*(SN X Locale Database functions -.XE -.LP -X Locale Database contains the subset of user's environment that -depends on language. The following APIs are provided for accessing -X Locale Database and other locale relative files. -.LP -For more detail about X Locale Database, please refer -X Locale Database Definition document. -.LP -.sp -\fBGet a resource from database\fP -.LP -.FD 0 -void _XlcGetResource(\fIlcd\fP, \fIcategory\fP, \fIclass\fP, \fIvalue\fP, \fIcount\fP) -.br - XLCd \fIlcd\fP; -.br - char \fI*category\fP; -.br - char \fI*class\fP; -.br - char \fI***value\fP; -.br - int \fI*count\fP; -.FN -.LP -The -.PN _XlcGetResource -function obtains a locale dependent data which is associated with the -locale of specified ``\fIlcd\fP''. -The locale data is provided by system locale or by X Locale Database -file, and what kind of data is available is implementation dependent. -.LP -The specified ``\fIcategory\fP'' and ``\fIclass\fP'' are used for -finding out the objective locale data. -.LP -The returned value is returned in value argument in string list form, -and the returned count shows the number of strings in the value. -.LP -The returned value is owned by locale method, and should not be modified -or freed by caller. -.LP -.sp -\fBGet a locale relative file name\fP -.LP -.FD 0 -char * _XlcFileName(\fIlcd\fP, \fIcategory\fP) -.br - XLCd \fIlcd\fP; -.br - char \fI*category\fP; -.FN -.LP -The -.PN _XlcFileName -functions returns a file name which is bound to the specified ``\fIlcd\fP'' -and ``\fIcategory\fP'', as a null-terminated string. If no file name can -be found, or there is no readable file for the found file name, -.PN _XlcFileName -returns NULL. The returned file name should be freed by caller. -.LP -The rule for searching a file name is implementation dependent. -In current implementation, -.PN _XlcFileName -uses ``{category}.dir'' file as mapping table, which has pairs of -strings, a full locale name and a corresponding file name. -.LP -.NH 1 -Utility Functions -.XS \*(SN Utility Functions -.XE -.LP -\fBCompare Latin-1 strings\fP -.LP -.FD 0 -int _XlcCompareISOLatin1(\fIstr1\fP, \fIstr2\fP) -.br - char \fI*str1\fP, \fI*str2\fP; -.FN -.FD 0 -int _XlcNCompareISOLatin1(\fIstr1\fP, \fIstr2\fP, \fIlen\fP) -.br - char \fI*str1\fP, \fI*str2\fP; -.br - int \fIlen\fP; -.FN -.LP -The -.PN _XlcCompareIsoLatin1 -function to compares two ISO-8859-1 strings. Bytes representing ASCII lower -case letters are converted to upper case before making the comparison. -The value returned is an integer less than, equal to, or greater than -zero, depending on whether ``\fIstr1\fP'' is lexicographicly less than, -equal to, or greater than ``\fIstr2\fP''. -.LP -The -.PN _XlcNCompareIsoLatin1 -function is identical to -.PN _XlcCompareISOLatin1, -except that at most ``\fIlen\fP'' bytes are compared. -.LP -.sp -\fBResource Utility\fP -.LP -.FD 0 -int XlcNumber(\fIarray\fP) - ArrayType \fIarray\fP; -.FN -.LP -Similar to XtNumber. -.LP -.FD 0 -void _XlcCopyFromArg(\fIsrc\fP, \fIdst\fP, \fIsize\fP) -.br - char \fI*src\fP; -.br - char \fI*dst\fP; -.br - int \fIsize\fP; -.FN -.FD 0 -void _XlcCopyToArg(\fIsrc\fP, \fIdst\fP, \fIsize\fP) -.br - char \fI*src\fP; -.br - char \fI**dst\fP; -.br - int \fIsize\fP; -.FN -.LP -Similar to -.PN _XtCopyFromArg -and -.PN _XtCopyToArg. -.LP -.FD 0 -void _XlcCountVaList(\fIvar\fP, \fIcount_ret\fP) -.br - va_list \fIvar\fP; -.br - int \fI*count_ret\fP; -.FN -.LP -Similar to -.PN _XtCountVaList. -.LP -.FD 0 -void _XlcVaToArgList(\fIvar\fP, \fIcount\fP, \fIargs_ret\fP) -.br - va_list \fIvar\fP; -.br - int \fIcount\fP; -.br - XlcArgList \fI*args_ret\fP; -.FN -.LP -Similar to -.PN _XtVaToArgList. -.LP -.Ds 0 -.TA .5i 2.5i -.ta .5i 2.5i -typedef struct _XlcResource { - char *name; - XrmQuark xrm_name; - int size; - int offset; - unsigned long mask; -} XlcResource, *XlcResourceList; -.De -.LP -.TS -lw(.5i) lw(2i) lw(2i). -T{ -#define -T} T{ -XlcCreateMask -T} T{ -(1L<<0) -T} -T{ -#define -T} T{ -XlcDefaultMask -T} T{ -(1L<<1) -T} -T{ -#define -T} T{ -XlcGetMask -T} T{ -(1L<<2) -T} -T{ -#define -T} T{ -XlcSetMask -T} T{ -(1L<<3) -T} -T{ -#define -T} T{ -XlcIgnoreMask -T} T{ -(1L<<4) -T} -.TE -.LP -.FD 0 -void _XlcCompileResourceList(\fIresources\fP, \fInum_resources\fP) -.br - XlcResourceList \fIresources\fP; -.br - int \fInum_resources\fP; -.FN -.LP -Similar to -.PN _XtCompileResourceList. -.LP -.FD 0 -char * _XlcGetValues(\fIbase\fP, \fIresources\fP, \fInum_resources\fP, \fIargs\fP, \fInum_args\fP, \fImask\fP) -.br - XPointer \fIbase\fP; -.br - XlcResourceList \fIresources\fP; -.br - int \fInum_resources\fP; -.br - XlcArgList \fIargs\fP; -.br - int \fInum_args\fP; -.br - unsigned long \fImask\fP; -.FN -.LP -Similar to XtGetSubvalues. -.LP -.FD 0 -char * _XlcSetValues(\fIbase\fP, \fIresources\fP, \fInum_resources\fP, \fIargs\fP, \fInum_args\fP, \fImask\fP) -.br - XPointer \fIbase\fP; -.br - XlcResourceList \fIresources\fP; -.br - int \fInum_resources\fP; -.br - XlcArgList \fIargs\fP; -.br - int \fInum_args\fP; -.br - unsigned long \fImask\fP; -.FN -.LP -Similar to XtSetSubvalues. -.LP -.sp -\fBANSI C Compatible Functions\fP -.LP -The following are ANSI C/MSE Compatible Functions for non-ANSI C environment. -.LP -.FD 0 -int _Xmblen(\fIstr\fP, \fIlen\fP) -.br - char \fI*str\fP; -.br - int \fIlen\fP; -.FN -.LP -The -.PN _Xmblen -function returns the number of characters pointed to by ``\fIstr\fP''. -Only ``\fIlen\fP'' bytes in ``\fIstr\fP'' are used in determining the -character count returned. ``\fIStr\fP'' may point at characters from -any valid codeset in the current locale. -.LP -The call -.PN _Xmblen -is equivalent to -.RS -_Xmbtowc(_Xmbtowc((\fIwchar_t*\fP)NULL, \fIstr\fP, \fIlen\fP)) -.RE -.LP -.FD 0 -int _Xmbtowc(\fIwstr\fP, \fIstr\fP, \fIlen\fP) -.br - wchar_t \fI*wstr\fP; -.br - char \fI*str\fP; -.br - int \fIlen\fP; -.FN -.LP -The -.PN _Xmbtowc -function converts the character(s) pointed to by ``\fIstr\fP'' -to their wide character representation(s) pointed to by ``\fIwstr\fP''. -``\fILen\fP'' is the number of bytes in ``\fIstr\fP'' to be converted. -The return value is the number of characters converted. -.LP -The call -.PN _Xmbtowc -is equivalent to -.RS -_Xlcmbtowc((XLCd)NULL, \fIwstr\fP, \fIstr\fP, \fIlen\fP) -.RE -.LP -.FD 0 -int _Xlcmbtowc(\fIlcd\fP, \fIwstr\fP, \fIstr\fP, \fIlen\fP) -.br - XLCd \fIlcd\fP; -.br - wchar_t \fI*wstr\fP; -.br - char \fI*str\fP; -.br - int \fIlen\fP; -.FN -.LP -The -.PN _Xlcmbtowc -function is identical to -.PN _Xmbtowc, -except that it requires the ``\fIlcd\fP'' argument. If ``\fIlcd\fP'' -is (XLCd) NULL, -.PN _Xlcmbtowc, -calls -.PN _XlcCurrentLC -to determine the current locale. -.LP -.FD 0 -int _Xwctomb(\fIstr\fP, \fIwc\fP) -.br - char \fI*str\fP; -.br - wchar_t \fIwc\fP; -.FN -.LP -The -.PN _Xwctomb -function converts a single wide character pointed to by ``\fIwc\fP'' to -its multibyte representation pointed to by ``\fIstr\fP''. -On success, the return value is 1. -.LP -The call -.PN _Xwctomb -is equivalent to -.RS -_Xlcwctomb((XLCd)NULL, \fIstr\fP, \fIwstr\fP) -.RE -.LP -.FD 0 -int _Xlcwctomb(\fIlcd\fP, \fIstr\fP, \fIwc\fP) -.br - XLCd \fIlcd\fP; -.br - char \fI*str\fP; -.br - wchar_t \fIwc\fP; -.FN -.LP -The -.PN _Xlcwctomb -function is identical to _Xwctomb, except that it requires the -``\fIlcd\fP'' argument. If ``\fIlcd\fP'' is (XLCd) NULL, -.PN _Xlcwctomb, -calls -.PN _XlcCurrentLC -to determine the current locale. -.LP -.FD 0 -int _Xmbstowcs(\fIwstr\fP, \fIstr\fP, \fIlen\fP) -.br - wchar_t \fI*wstr\fP; -.br - char \fI*str\fP; -.br - int \fIlen\fP; -.FN -.LP -The -.PN _Xmbstowcs -function converts the NULL-terminated string pointed to by ``\fIstr\fP'' -to its wide character string representation pointed to by ``\fIwstr\fP''. -``\fILen\fP'' is the number of characters in ``\fIstr\fP'' to be converted. -.LP -The call -.PN _Xmbstowcs -is equivalent to -.RS -_Xlcmbstowcs((XLCd)NULL, \fIwstr\fP, \fIstr\fP, \fIlen\fP) -.RE -.LP -.FD 0 -int _Xlcmbstowcs(\fIlcd\fP, \fIwstr\fP, \fIstr\fP, \fIlen\fP) -.br - XLCd \fIlcd\fP; -.br - wchar_t \fI*wstr\fP; -.br - char \fI*str\fP; -.br - int \fIlen\fP; -.FN -.LP -The -.PN _Xlcmbstowcs -function is identical to _Xmbstowcs, except that it requires the -``\fIlcd\fP'' argument. If ``\fIlcd\fP'' is (XLCd) NULL, -.PN _Xlcmbstowcs, -calls -.PN _XlcCurrentLC -to determine the current locale. -.LP -.FD 0 -int _Xwcstombs(\fIstr\fP, \fIwstr\fP, \fIlen\fP) -.br - char \fI*str\fP; -.br - wchar_t \fI*wstr\fP; -.br - int \fIlen\fP; -.FN -.LP -The -.PN _Xwcstombs -function converts the (wchar_t) NULL terminated wide character string -pointed to by ``\fIwstr\fP'' to the NULL terminated multibyte string -pointed to by ``\fIstr\fP''. -.LP -The call -.PN _Xwcstombs -is equivalent to -.RS -_Xlcwcstombs((XLCd)NULL, \fIstr\fP, \fIwstr\fP, \fIlen\fP) -.RE -.LP -.FD 0 -int _Xlcwcstombs(\fIlcd\fP, \fIstr\fP, \fIwstr\fP, \fIlen\fP) -.br - XLCd \fIlcd\fP; -.br - char \fI*str\fP; -.br - wchar_t \fI*wstr\fP; -.br - int \fIlen\fP; -.FN -.LP -The -.PN _Xlcwcstombs -function is identical to _Xwcstombs, except that it requires the -``\fIlcd\fP'' argument. If ``\fIlcd\fP'' is (XLCd) NULL, -.PN _Xlcwcstombs, -calls -.PN _XlcCurrentLC -to determine the current locale. -.LP -.FD 0 -int _Xwcslen(\fIwstr\fP) -.br - wchar_t \fI*wstr\fP; -.FN -.LP -The -.PN _Xwcslen -function returns the count of wide characters in the (wchar_t) NULL -terminated wide character string pointed to by ``\fIwstr\fP''. -.LP -.FD 0 -wchar_t * _Xwcscpy(\fIwstr1\fP, \fIwstr2\fP) -.br - wchar_t \fI*wstr1\fP, \fI*wstr2\fP; -.FN -.FD 0 -wchar_t * _Xwcsncpy(\fIwstr1\fP, \fIwstr2\fP, \fIlen\fP) -.br - wchar_t \fI*wstr1\fP, \fI*wstr2\fP; -.br - int \fIlen\fP; -.FN -.LP -The -.PN _Xwcscpy -function copies the (wchar_t) NULL terminated wide character string -pointed to by ``\fIwstr2\fP'' to the object pointed at by ``\fIwstr1\fP''. -``\fIWstr1\fP'' is (wchar_t) NULL terminated. The return value is a -pointer to ``\fIwstr1\fP''. -.LP -The -.PN _Xwcsncpy -function is identical to -.PN _Xwcscpy, -except that it copies ``\fIlen\fP'' wide characters from the object -pointed to by ``\fIwstr2\fP'' to the object pointed to ``\fIwstr1\fP''. -.LP -.FD 0 -int _Xwcscmp(\fIwstr1\fP, \fIwstr2\fP) -.br - wchar_t \fI*wstr1\fP, \fI*wstr2\fP; -.FN -.FD 0 -int _Xwcsncmp(\fIwstr1\fP, \fIwstr2\fP, \fIlen\fP) -.br - wchar_t \fI*wstr1\fP, \fI*wstr2\fP; -.br - int \fIlen\fP; -.FN -.LP -The -.PN _Xwcscmp -function compares two (wchar_t) NULL terminated wide character strings. -The value returned is an integer less than, equal to, or greater than zero, -depending on whether ``\fIwstr1\fP'' is lexicographicly less then, equal to, -or greater than ``\fIstr2\fP''. -.LP -The -.PN _Xwcsncmp -function is identical to -.PN _XlcCompareISOLatin1, -except that at most ``\fIlen\fP'' wide characters are compared. -.sp -.\" -------------------------------------------------------------------- -.\" .LP -.\" \fBLocale Method Internal Functions\fP -.\" .LP -.\" .FD 0 -.\" XlcCharSet _XlcCreateDefaultCharSet(\fIname\fP, \fIct_sequence\fP) -.\" .br -.\" char \fI*name\fP; -.\" .br -.\" char \fI*ct_sequence\fP; -.\" .FN -.\" .FD 0 -.\" Bool _XlcParseCharSet(\fIcharset\fP) -.\" .br -.\" XlcCharSet \fIcharset\fP; -.\" .FN -.\" .FD 0 -.\" void _XlcGetLocaleDataBase(\fIlcd\fP, \fIcategory\fP, \fIname\fP, \fIvalue\fP, \fIcount\fP) -.\" .br -.\" XLCd \fIlcd\fP; -.\" .br -.\" char \fI*category\fP; -.\" .br -.\" char \fI*name\fP; -.\" .br -.\" char \fI***value\fP; -.\" .br -.\" int \fI*count\fP; -.\" .FN -.\" .FD 0 -.\" void _XlcDestroyLocaleDataBase(\fIlcd\fP) -.\" .br -.\" XLCd \fIlcd\fP; -.\" .FN -.\" .FD 0 -.\" XPointer _XlcCreateLocaleDataBase(\fIlcd\fP) -.\" .br -.\" XLCd \fIlcd\fP; -.\" .FN -.\" .LP -.\" .sp -.\" \fBObtain an locale database path\fP -.\" .LP -.\" .FD 0 -.\" int _XlcResolveI18NPath(\fIdir\fP) -.\" .br -.\" char \fI*dir\fP; -.\" .FN -.\" .LP -.\" The -.\" .PN _XlcResolveI18NPath -.\" function returns path name list that is related to X Locale Database. -.\" The obtained path is stored into the array which is pointed by -.\" specified ``\fIdir\fP''. The path consists of directory paths which -.\" are separated with colon. -.\" If the environment variable XLOCALEDIR is specified, the path -.\" contains its contents. -.\" .LP -.\" The default path of X Locale Database is implementation dependent. -.\" In current implementation, it's determined in build time. -.\" .LP -.\" .PN _XlcResolveI18NPath -.\" does not check overflow of the array to which the ``\fIdir\fP'' -.\" parameter points. Caller should provide enough buffer to store this -.\" string. -.\" .LP -.\" .sp -.\" \fBObtain a full locale name\fP -.\" .LP -.\" .FD 0 -.\" int _XlcResolveLocaleName(\fIlc_name\fP, \fIfull_name\fP, \fIlanguage\fP, \fIterritory\fP, \fIcodeset\fP) -.\" .br -.\" char \fI*lc_name\fP; -.\" .br -.\" char \fI*full_name\fP; -.\" .br -.\" char \fI*language\fP; -.\" .br -.\" char \fI*territory\fP; -.\" .br -.\" char \fI*codeset\fP; -.\" .FN -.\" .LP -.\" The -.\" .PN _XlcResolveLocaleName -.\" function returns a full locale name. -.\" The obtained full locale name is stored into the array which is -.\" pointed by specified ``\fIfull_name\fP''. -.\" The language, territory and codeset part of the full locale name -.\" are copied to the return arguments, ``\fIlanguage\fP'', -.\" ``\fIterritory\fP'' and ``\fIcodeset\fP'', respectively. -.\" NULL can be specified for these arguments. -.\" .LP -.\" The rule for mapping from locale name to full locale name is -.\" implementation dependent. -.\" .LP -.\" .PN _XlcResolveLocaleName -.\" does not check overflow of the array to which -.\" ``\fIfull_name\fP'', ``\fIlanguage\fP'', ``\fIterritory\fP'' and -.\" ``\fIcodeset\fP'' parameter point. -.\" Caller should provide enough buffer to store those string. -.\" .LP -.\" In current implementation, -.\" .PN _XlcResolveLocaleName -.\" uses locale.alias file as mapping table, which has pairs of strings, -.\" a locale name and a full locale name. -.\" .LP -.\" .FD 0 -.\" int _XlcResolveDBName(\fIlc_name\fP, \fIfile_name\fP) -.\" .br -.\" char \fI*lc_name\fP; -.\" .br -.\" char \fI*file_name\fP; -.\" .FN -.\" .FD 0 -.\" XLCd _XlcCreateLC(\fIname\fP, \fImethods\fP) -.\" .br -.\" char \fI*name\fP; -.\" .br -.\" XLCdMethods \fImethods\fP; -.\" .FN -.\" .FD 0 -.\" void _XlcDestroyLC(\fIlcd\fP) -.\" .br -.\" XLCd \fIlcd\fP; -.\" .FN -.\" .LP -.\" - diff --git a/libX11/specs/i18n/LocaleDB.ms b/libX11/specs/i18n/LocaleDB.ms deleted file mode 100644 index 4592879d1..000000000 --- a/libX11/specs/i18n/LocaleDB.ms +++ /dev/null @@ -1,499 +0,0 @@ -.\" To print this out, type tbl macros.t ThisFile | troff -ms -.EH '''' -.OH '''' -.EF '''' -.OF '''' -.ps 11 -.nr PS 11 -\& -.TL -\s+3\fBX Locale Database Definition\fP\s-3 -.sp 2 -.AU -Yoshio Horiuchi -.AI -IBM Japan -.LP -.bp -.br -\& -.ps 9 -.nr PS 9 -.sp 2 -.LP -Copyright \(co IBM Corporation 1994 -.LP -All Rights Reserved -.LP -License to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of IBM not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. -.LP -IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND -NONINFRINGEMENT OF THIRD PARTY RIGHTS, IN NO EVENT SHALL -IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -.sp 5 -Copyright \(co 1994 X Consortium -.LP -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: -.LP -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. -.LP -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 -X CONSORTIUM 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. -.LP -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. -.sp 3 -\fIX Window System\fP is a trademark of The Open Group. -.LP -.bp 1 -.ps 11 -.nr PS 11 -.EH '\fBX Locale Database Definition\fP''\fB\*(xV\fP' -.OH '\fBX Locale Database Definition\fP''\fB\*(xV\fP' -.EF ''\fB % \fP'' -.OF ''\fB % \fP'' -.NH 1 -General -.XS -\*(SN General -.XE -.LP -An X Locale Database contains the subset of a user's environment that -depends on language, in X Window System. It is made up from one or more -categories. Each category consists of some classes and sub-classes. -.LP -It is provided as a plain ASCII text file, so a user can change its -contents easily. It allows a user to customize the behavior of -internationalized portion of Xlib without changing Xlib itself. -.LP -This document describes; -.RS -.IP -Database Format Definition -.IP -Contents of Database in sample implementation -.RE -.LP -Since it is hard to define the set of required information for all -platforms, only the flexible database format is defined. -The available entries in database are implementation dependent. -.LP -.NH 1 -Database Format Definition -.XS -\*(SN Database Format Definition -.XE -.LP -The X Locale Database contains one or more category definitions. -This section describes the format of each category definition. -.LP -The category definition consists of one or more class definitions. -Each class definition has a pair of class name and class value, or -has several subclasses which are enclosed by the left brace ({) and -the right brace (}). -.LP -Comments can be placed by using the number sign character (#). -Putting the number sign character on the top of the line indicates -that the entire line is comment. Also, putting any whitespace character -followed by the number sign character indicates that a part of the line -(from the number sign to the end of the line) is comment. -A line can be continued by placing backslash (\\) character as the -last character on the line; this continuation character will be -discarded from the input. Comment lines cannot be continued on -a subsequent line using an escaped new line character. -.LP -X Locale Database only accepts XPCS, the X Portable Character Set. -The reserved symbols are; the quotation mark("), the number sign (#), -the semicolon(;), the backslash(\\), the left brace({) and -the right brace(}). -.LP -The format of category definition is; -.RS -.TS -tab(@); -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l r l -l r l -l l l. -CategoryDefinition@::=@CategoryHeader CategorySpec CategoryTrailer -CategoryHeader@::=@CategoryName NL -CategorySpec@::=@{ ClassSpec } -CategoryTrailer@::=@"END" Delimiter CategoryName NL -CategoryName@::=@String -ClassSpec@::=@ClassName Delimiter ClassValue NL -ClassName@::=@String -ClassValue@::=@ValueList | "{" NL { ClassSpec } "}" -ValueList@::=@Value | Value ";" ValueList -Value@::=@ValuePiece | ValuePiece Value -ValuePiece@::=@String | QuotedString | NumericString -String@::=@Char { Char } -QuotedString@::=@""" QuotedChar { QuotedChar } """ -NumericString@::=@"\\\\o" OctDigit { OctDigit } -@|@"\\\\d" DecDigit { DecDigit } -@|@"\\\\x" HexDigit { HexDigit } -Char@::=@<XPCS except NL, Space or unescaped reserved symbols> -QuotedChar@::=@<XPCS except unescaped """> -OctDigit@::=@<character in the range of "0" - "7"> -DecDigit@::=@<character in the range of "0" - "9"> -HexDigit@::=@<character in the range of "0" - "9", "a" - "f", "A" - "F"> -Delimiter@::=@ Space { Space } -Space@::=@<space> | <horizontal tab> -NL@::=@<newline> -.TE -.RE -.LP -Elements separated by vertical bar (|) are alternatives. Curly -braces ({...}) indicate zero or more repetitions of the enclosed -elements. Square brackets ([...]) indicate that the enclosed element -is optional. Quotes ("...") are used around literal characters. -.LP -The backslash, which is not the top character of the NumericString, is -recognized as an escape character, so that the next one character is -treated as a literal character. For example, the two-character -sequence, ``\\"''(the backslash followed by the quotation mark) is -recognized and replaced with a quotation mark character. -Any whitespace character, that is not the Delimiter, unquoted and -unescaped, is ignored. -.LP -.NH 1 -Contents of Database -.XS -\*(SN Contents of Database -.XE -.LP -The available categories and classes depend on implementation, because -different platform will require different information set. -For example, some platform have system locale but some platform don't. -Furthermore, there might be a difference in functionality even if the -platform has system locale. -.LP -In current sample implementation, categories listed below are available. -.RS -.TS -tab(:); -l l. -XLC_FONTSET:XFontSet relative information -XLC_XLOCALE:Character classification and conversion information -.TE -.RE -.LP -.NH 1 -XLC_FONTSET Category -.XS -\*(SN XLC_FONTSET Category -.XE -.LP -The XLC_FONTSET category defines the XFontSet relative information. -It contains the CHARSET_REGISTRY-CHARSET_ENCODING name and character -mapping side (GL, GR, etc), and is used in Output Method (OM). -.RS -.TS H -tab(:); -lw(1.5i) l l. -_ -.sp 6p -.B -class:super class:description -.sp 6p -_ -.sp 6p -.TH -.R -fsN::Nth fontset (N=0,1,2, ...) -.sp -charset:fsN:list of encoding name -font:fsN:list of font encoding name -.sp 6p -_ -.TE -.RE -.LP -.IP "fsN" -.br -Includes an encoding information for Nth charset, where N is -the index number (0,1,2,...). If there are 4 charsets available -in current locale, 4 fontsets, fs0, fs1, fs2 and fs3, should be -defined. -This class has two subclasses, `charset' and `font'. -.IP "charset" -Specifies an encoding information to be used internally in Xlib -for this fontset. The format of value is; -.RS -.TS -tab(;); -l l l. -EncodingInfo;::=;EncodingName [ ":" EncodingSide ] -EncodingName;::=;CHARSET_REGISTRY-CHARSET_ENCODING -EncodingSide;::=;"GL" | "GR" -.TE -.RE -For detail definition of CHARSET_REGISTRY-CHARSET_ENCODING, refer -"X Logical Font Descriptions" document. -.IP -example: -.br - ISO8859-1:GL -.IP "font" -.br -Specifies a list of encoding information which is used for searching -appropriate font for this fontset. The left most entry has highest -priority. -.LP -.NH 1 -XLC_XLOCALE Category -.XS -\*(SN XLC_XLOCALE Category -.XE -.LP -The XLC_XLOCALE category defines character classification, conversion -and other character attributes. -.RS -.TS H -tab(:); -lw(1.5i) l l. -_ -.sp 6p -.B -class:super class:description -.sp 6p -_ -.sp 6p -.TH -.R -encoding_name::codeset name -mb_cur_max::MB_CUR_MAX -state_depend_encoding::state dependent or not -wc_encoding_mask::for parsing wc string -wc_shift_bits::for conversion between wc and mb -csN::Nth charset (N=0,1,2,...) -.sp -side:csN:mapping side (GL, etc) -length:csN:length of a character -mb_encoding:csN:for parsing mb string -wc_encoding:csN:for parsing wc string -ct_encoding:csN:list of encoding name for ct -.sp 6p -_ -.TE -.RE -.LP -.IP "encoding_name" -Specifies a codeset name of current locale. -.IP "mb_cur_max" -Specifies a maximum allowable number of bytes in a multi-byte character. -It is corresponding to MB_CUR_MAX of "ISO/IEC 9899:1990 C Language Standard". -.IP "state_depend_encoding" -Indicates a current locale is state dependent. The value should be -specified "True" or "False". -.IP "wc_encoding_mask" -Specifies a bit-mask for parsing wide-char string. Each wide character is -applied bit-and operation with this bit-mask, then is classified into -the unique charset, by using `wc_encoding'. -.IP "wc_shift_bits" -Specifies a number of bit to be shifted for converting from a multi-byte -character to a wide character, and vice-versa. -.IP "csN" -.br -Includes a character set information for Nth charset, where N is the -index number (0,1,2,...). If there are 4 charsets available in current -locale, cs0, cs1, cs2 and cs3 should be defined. This class has five -subclasses, `side', `length', `mb_encoding' `wc_encoding' and `ct_encoding'. -.IP "side" -.br -Specifies a mapping side of this charset. The format of this value is; -.RS -.TS -tab(@); -l l l. -Side@::=@EncodingSide [``:Default''] -.TE -.RE -The suffix ":Default" can be specified. It indicates that a character -belongs to the specified side is mapped to this charset in initial state. -.IP "length" -.br -Specifies a number of bytes of a multi-byte character of this charset. -It should not contain the length of any single-shift sequence. -.IP "mb_encoding" -Specifies a list of shift sequence for parsing multi-byte string. -The format of this value is; -.RS -.TS -tab(@); -l l l -l r l -l l l -l l l -l l l -l l l -c l s -c l s. -MBEncoding@::=@ShiftType ShiftSequence -@|@ShiftType ShiftSequence ";" MBEncoding -ShiftType@::=@"<SS>" | "<LSL>" | "<LSR>" -ShiftSequence@::=@SequenceValue | SequenceValue ShiftSequence -SequenceValue@::=@NumericString -.sp -shift types: -<SS>@Indicates single shift sequence -<LSL>@Indicates locking shift left sequence -<LSR>@Indicates locking shift right sequence -.TE -.RE -example: -.br - <LSL> \\x1b \\x28 \\x4a; <LSL> \\x1b \\x28 \\x42 -.LP -.IP "wc_encoding" -Specifies an integer value for parsing wide-char string. -It is used to determine the charset for each wide character, after -applying bit-and operation using `wc_encoding_mask'. -This value should be unique in all csN classes. -.IP "ct_encoding" -Specifies a list of encoding information that can be used for Compound -Text. -.LP -.NH 1 -Sample of X Locale Database -.XS -\*(SN Sample of X Locale Database -.XE -.LP -The following is sample X Locale Database file. -.LP -.sp -.RS -.nf -# XLocale Database Sample for ja_JP.euc -# - -# -# XLC_FONTSET category -# -XLC_FONTSET -# fs0 class (7 bit ASCII) -fs0 { - charset ISO8859-1:GL - font ISO8859-1:GL; JISX0201.1976-0:GL -} -# fs1 class (Kanji) -fs1 { - charset JISX0208.1983-0:GL - font JISX0208.1983-0:GL -} -# fs2 class (Half Kana) -fs2 { - charset JISX0201.1976-0:GR - font JISX0201.1976-0:GR -} -# fs3 class (User Defined Character) -# fs3 { -# charset JISX0212.1990-0:GL -# font JISX0212.1990-0:GL -# } -END XLC_FONTSET - -# -# XLC_XLOCALE category -# -XLC_XLOCALE - -encoding_name ja.euc -mb_cur_max 3 -state_depend_encoding False - -wc_encoding_mask \\x00008080 -wc_shift_bits 8 - -# cs0 class -cs0 { - side GL:Default - length 1 - wc_encoding \\x00000000 - ct_encoding ISO8859-1:GL; JISX0201.1976-0:GL -} -# cs1 class -cs1 { - side GR:Default - length 2 - - wc_encoding \\x00008080 - - ct_encoding JISX0208.1983-0:GL; JISX0208.1983-0:GR;\\ - JISX0208.1983-1:GL; JISX0208.1983-1:GR -} - -# cs2 class -cs2 { - side GR - length 1 - mb_encoding <SS> \\x8e - - wc_encoding \\x00000080 - - ct_encoding JISX0201.1976-0:GR -} - -# cs3 class -# cs3 { -# side GL -# length 2 -# mb_encoding <SS> \\x8f -# #if HasWChar32 -# wc_encoding \\x20000000 -# #else -# wc_encoding \\x00008000 -# #endif -# ct_encoding JISX0212.1990-0:GL; JISX0212.1990-0:GR -# } - -END XLC_XLOCALE -.fi -.RE -.LP -.NH 1 -Reference -.XS -\*(SN Reference -.XE -.LP -.XP -[1] \fIISO/IEC 9899:1990 C Language Standard\fP -.XP -[2] \fIX Logical Font Descriptions\fP -.LP diff --git a/libX11/specs/i18n/Makefile.am b/libX11/specs/i18n/Makefile.am index 9f5d51e9a..1fd341f21 100644 --- a/libX11/specs/i18n/Makefile.am +++ b/libX11/specs/i18n/Makefile.am @@ -1,5 +1,5 @@ #
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -21,8 +21,4 @@ # DEALINGS IN THE SOFTWARE.
#
-# Based on xc/doc/specs/i18n/Makefile from X11R6.9
-
-doc_sources = Framework.ms LocaleDB.ms Trans.ms
-
-include $(top_srcdir)/specs/troffrules.in
+SUBDIRS=framework localedb trans
diff --git a/libX11/specs/i18n/Trans.ms b/libX11/specs/i18n/Trans.ms deleted file mode 100644 index 1216ef254..000000000 --- a/libX11/specs/i18n/Trans.ms +++ /dev/null @@ -1,1146 +0,0 @@ -.\" To print this out, type tbl macros.t This File | troff -ms -.EH '''' -.OH '''' -.EF '''' -.OF '''' -.ps 11 -.nr PS 11 -.\" .nr PD 1v -.\" .nr DD 1v -\& -.sp 8 -.TL -\s+3\fBThe XIM Transport Specification\s-3\fP -.sp -.sp -\fBRevision 0.1\fP -.sp -\fBX Version 11, Release 7\fP -.sp -\fB\*(xV\fP -.sp 3 -.AU -Takashi Fujiwara -.AI -FUJITSU LIMITED -.sp 3 -.AB -.LP -This specification describes the transport layer interfaces between -Xlib and IM Server, which makes various channels usable such as X -protocol or, TCP/IP, DECnet and etc. -.AE -.ce 0 -.br -.LP -.bp -\& -.ps 9 -.nr PS 9 -.sp 8 -.LP -Copyright \(co 1994 by FUJITSU LIMITED -.LP -Permission to use, copy, modify, and distribute this documentation -for any purpose and without fee is hereby granted, provided -that the above copyright notice and this permission -notice appear in all copies. -Fujitsu makes no representations about the suitability -for any purpose of the information in this document. -This documentation is provided as is without express or implied warranty. -.sp 5 -Copyright \(co 1994 X Consortium -.LP -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: -.LP -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. -.LP -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 -X CONSORTIUM 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. -.LP -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. -.sp 3 -\fIX Window System\fP is a trademark of The Open Group. -.ps 11 -.nr PS 11 -.bp 1 -.EH '\fBXIM Transport Specification\fP''\fB\*(xV\fP' -.OH '\fBXIM Transport Specification\fP''\fB\*(xV\fP' -.EF ''\fB % \fP'' -.OF ''\fB % \fP'' -.NH 1 -Introduction -.XS -\*(SN Introduction -.XE -.LP -The Xlib XIM implementation is layered into three functions, a protocol -layer, an interface layer and a transport layer. The purpose of this -layering is to make the protocol independent of transport implementation. -Each function of these layers are: -.RS 3 -.IP "\fIThe protocol layer\fP" -.br -implements overall function of XIM and calls the interface layer -functions when it needs to communicate to IM Server. -.IP "\fIThe interface layer\fP" -.br -separates the implementation of the transport layer from the protocol -layer, in other words, it provides implementation independent hook for -the transport layer functions. -.IP "\fIThe transport layer\fP" -.br -handles actual data communication with IM Server. It is done by a set -of several functions named transporters. -.RE -.LP -This specification describes the interface layer and the transport -layer, which makes various communication channels usable such as -X protocol or, TCP/IP, DECnet, STREAM, etc., and provides -the information needed for adding another new transport layer. -In addition, sample implementations for the transporter using the -X connection is described in section 4. -.NH 1 -Initialization -.XS -\*(SN Initialization -.XE -.NH 2 -Registering structure to initialize -.XS -\*(SN Registering structure to initialize -.XE -.LP -The structure typed as TransportSW contains the list of the transport -layer the specific implementations supports. -.LP -.Ds 0 -.TA .5i 2.5i -.ta .5i 2.5i -typedef struct { -.br - char *transport_name; -.br - Bool (*config); -} TransportSW; -.De -.LP -.IP "\fItransport_name\fP" 15 -name of transport(*1) -.FS -(*1) Refer to "The Input Method Protocol: Appendix B" -.FE -.IP "\fIconfig\fP" 15 -initial configuration function -.LP -A sample entry for the Xlib supporting transporters is shown below: -.LP -.Ds 0 -.TA .5i 2.5i -.ta .5i 2.5i -TransportSW _XimTransportRec[] = { -.sp 3p -/* char \fI*: -\ * transport_name\fP, Bool \fI(*config)()\fP -\ */ - ``X'', _XimXConf, - ``tcp'', _XimTransConf, - ``local'', _XimTransConf, - ``decnet'', _XimTransConf, - ``streams'', _XimTransConf, - (char *)NULL, (Bool (*)())NULL, -}; -.De -.LP -.NH 2 -Initialization function -.XS -\*(SN Initialization function -.XE -.LP -The following function will be called once when Xlib configures the -transporter functions. -.sp 6p -.FD 0 -Bool (*config)(\fIim\fP, \fItransport_data\fP) -.br - XIM \fIim\fP; -.br - char \fI*transport_data\fP; -.br -.FN -.IP \fIim\fP 1i -Specifies XIM structure address. -.IP \fItransport_data\fP 1i -Specifies the data specific to the transporter, in IM Server address. (*1) -.FS -(*1) Refer to "The Input Method Protocol: Appendix B" -.FE -.sp 6p -.LP -This function must setup the transporter function pointers. -.LP -The actual \fIconfig\fP function will be chosen by IM Server at the -pre-connection time, matching by the \fItransport_name\fP specified -in the \fB_XimTransportRec\fP array; The specific members of XimProto -structure listed below must be initialized so that point they -appropriate transporter functions. -.LP -If the specified transporter has been configured successfully, this -function returns True. There is no Alternative Entry for config -function itself. -.LP -The structure XimProto contains the following function pointers: -.DS -.TA .5i 2.5i -.ta .5i 2.5i -Bool (*connect)(); /* Open connection */ -Bool (*shutdown)(); /* Close connection */ -Bool (*write)(); /* Write data */ -Bool (*read)(); /* Read data */ -Bool (*flush)(); /* Flush data buffer */ -Bool (*register_dispatcher)(); /* Register asynchronous data handler */ -Bool (*call_dispatcher)(); /* Call dispatcher */ -.DE -These functions are called when Xlib needs to communicate the -IM Server. These functions must process the appropriate procedure -described below. -.LP -.NH 1 -The interface/transport layer functions -.XS -\*(SN The interface/transport layer functions -.XE -.LP -Following functions are used for the transport interface. -.LP -.ce -Table 3-1; The Transport Layer Functions. -.SM -.TS -tab(:) center box; -cw(4c) | cw(4c) | c -c | c | c -l | l | c. -.B -Alternative Entry:XimProto member:Section -(Interface Layer):(Transport Layer):\^ -= -.R -\fB_XimConnect\fP:connect:3.1 -_ -\fB_XimShutdown\fP:shutdown:3.2 -_ -\fB_XimWrite\fP:write:3.3 -_ -\fB_XimRead\fP:read:3.4 -_ -\fB_XimFlush\fP:flush:3.5 -_ -\fB_XimRegisterDispatcher\fP:register_dispatcher:3.6 -_ -\fB_XimCallDispatcher\fP:call_dispatcher:3.7 -.TE -.NL -.LP -The Protocol layer calls the above functions using the Alternative -Entry in the left column. The transport implementation defines -XimProto member function in the right column. The Alternative Entry is -provided so as to make easier to implement the Protocol Layer. -.LP -.NH 2 -Opening connection -.XS -\*(SN Opening connection -.XE -.LP -When \fBXOpenIM\fP is called, the following function is called to connect -with the IM Server. -.sp 6p -.FD 0 -Bool (*connect)(\fIim\fP) -.br - XIM \fIim\fP; -.FN -.IP \fIim\fP 1i -Specifies XIM structure address. -.sp 6p -.LP -This function must establishes the connection to the IM Server. If the -connection is established successfully, this function returns True. -The Alternative Entry for this function is: -.sp 6p -.FD 0 -Bool _XimConnect(\fIim\fP) -.br - XIM \fIim\fP; -.FN -.IP \fIim\fP 1i -Specifies XIM structure address. -.LP -.NH 2 -Closing connection -.XS -\*(SN Closing connection -.XE -.LP -When \fBXCloseIM\fP is called, the following function is called to -disconnect the connection with the IM Server. The Alternative Entry -for this function is: -.sp 6p -.FD 0 -Bool (*shutdown)(\fIim\fP) -.br - XIM \fIim\fP; -.FN -.IP \fIim\fP 1i -Specifies XIM structure address. -.sp 6p -.LP -This function must close connection with the IM Server. If the -connection is closed successfully, this function returns True. The -Alternative Entry for this function is: -.sp 6p -.FD 0 -Bool _XimShutdown(\fIim\fP) -.br - XIM \fIim\fP; -.FN -.IP \fIim\fP -Specifies XIM structure address. -.LP -.NH 2 -Writing data -.XS -\*(SN Writing data -.XE -.LP -The following function is called, when Xlib needs to write data to the -IM Server. -.sp 6p -.FD 0 -Bool (*write)(\fIim\fP, \fIlen\fP, \fIdata\fP) -.br - XIM \fIim\fP; -.br - INT16 \fIlen\fP; -.br - XPointer \fIdata\fP; -.FN -.IP \fIim\fP 1i -Specifies XIM structure address. -.IP \fIlen\fP 1i -Specifies the length of writing data. -.IP \fIdata\fP 1i -Specifies the writing data. -.sp 6p -.LP -This function writes the \fIdata\fP to the IM Server, regardless -of the contents. The number of bytes is passed to \fIlen\fP. The -writing data is passed to \fIdata\fP. If data is sent successfully, -the function returns True. Refer to "The Input Method Protocol" for -the contents of the writing data. The Alternative Entry for this -function is: -.sp 6p -.FD 0 -Bool _XimWrite(\fIim\fP, \fIlen\fP, \fIdata\fP) -.br - XIM \fIim\fP; -.br - INT16 \fIlen\fP; -.br - XPointer \fIdata\fP; -.FN -.IP \fIim\fP 1i -Specifies XIM structure address. -.IP \fIlen\fP 1i -Specifies the length of writing data. -.IP \fIdata\fP 1i -Specifies the writing data. -.LP -.NH 2 -Reading data -.XS -\*(SN Reading data -.XE -.LP -The following function is called when Xlib waits for response from IM -server synchronously. -.sp 6p -.FD 0 -Bool (*read)(\fIim\fP, \fIread_buf\fP, \fIbuf_len\fP, \fIret_len\fP) -.br - XIM \fIim\fP; -.br - XPointer \fIread_buf\fP; -.br - int \fIbuf_len\fP; -.br - int \fI*ret_len\fP; -.FN -.IP \fIim\fP 1i -Specifies XIM structure address. -.IP \fIread_buf\fP 1i -Specifies the buffer to store data. -.IP \fIbuf_len\fP 1i -Specifies the size of the \fIbuffer\fP -.IP \fIret_len\fP -Specifies the length of stored data. -.sp 6p -.LP -This function stores the read data in \fIread_buf\fP, which size is -specified as \fIbuf_len\fP. The size of data is set to \fIret_len\fP. -This function return True, if the data is read normally or reading -data is completed. -.LP -The Alternative Entry for this function is: -.sp 6p -.FD 0 -Bool _XimRead(\fIim\fP, \fIret_len\fP, \fIbuf\fP, \fIbuf_len\fP, \fIpredicate\fP, \fIpredicate_arg\fP) -.br - XIM \fIim\fP; -.br - INT16 \fI*ret_len\fP; -.br - XPointer \fIbuf\fP; -.br - int \fIbuf_len\fP; -.br - Bool \fI(*predicate)()\fP; -.br - XPointer \fIpredicate_arg\fP; -.FN -.IP \fIim\fP 1i -Specifies XIM structure address. -.IP \fIret_len\fP 1i -Specifies the size of the \fIdata\fP buffer. -.IP \fIbuf\fP 1i -Specifies the buffer to store data. -.IP \fIbuf_len\fP 1i -Specifies the length of \fIbuffer\fP. -.IP \fIpredicate\fP 1i -Specifies the predicate for the XIM data. -.IP \fIpredicate_arg\fP 1i -Specifies the predicate specific data. -.sp 6p -.LP -The predicate procedure indicates whether the \fIdata\fP is for the -XIM or not. \fIlen\fP -This function stores the read data in \fIbuf\fP, which size is specified -as \fIbuf_len\fP. The size of data is set to \fIret_len\fP. -If \fIpreedicate()\fP returns True, this function returns True. -If not, it calls the registered callback function. -.LP -The procedure and its arguments are: -.LP -.sp 6p -.FD 0 -Bool (*predicate)(\fIim\fP, \fIlen\fP, \fIdata\fP, \fIpredicate_arg\fP) -.br - XIM \fIim\fP; -.br - INT16 \fIlen\fP; -.br - XPointer \fIdata\fP; -.br - XPointer \fIpredicate_arg\fP; -.FN -.IP \fIim\fP 1i -Specifies XIM structure address. -.IP \fIlen\fP 1i -Specifies the size of the \fIdata\fP buffer. -.IP \fIdata\fP 1i -Specifies the buffer to store data. -.IP \fIpredicate_arg\fP 1i -Specifies the predicate specific data. -.LP -.NH 2 -Flushing buffer -.XS -\*(SN Flushing buffer -.XE -.LP -The following function is called when Xlib needs to flush the data. -.sp 6p -.FD 0 -void (*flush)(\fIim\fP) -.br - XIM \fIim\fP; -.FN -.IP \fIim\fP 1i -Specifies XIM structure address. -.sp 6p -.LP -This function must flush the data stored in internal buffer on the -transport layer. If data transfer is completed, the function returns -True. The Alternative Entry for this function is: -.sp 6p -.FD 0 -void _XimFlush(\fIim\fP) -.br - XIM \fIim\fP; -.FN -.IP \fIim\fP 1i -Specifies XIM structure address. -.LP -.NH 2 -Registering asynchronous data handler -.XS -\*(SN Registering asynchronous data handler -.XE -.LP -Xlib needs to handle asynchronous response from IM Server. This is -because some of the XIM data occur asynchronously to X events. -.LP -Those data will be handled in the \fIFilter\fP, and the \fIFilter\fP -will call asynchronous data handler in the protocol layer. Then it -calls dispatchers in the transport layer. The dispatchers are -implemented by the protocol layer. This function must store the -information and prepare for later call of the dispatchers using -\fB_XimCallDispatcher\fP. -.LP -When multiple dispatchers are registered, they will be called -sequentially in order of registration, on arrival of asynchronous -data. The register_dispatcher is declared as following: -.sp 6p -.FD 0 -Bool (*register_dispatcher)(\fIim\fP, \fIdispatcher\fP, \fIcall_data\fP) -.br - XIM \fIim\fP; -.br - Bool \fI(*dispatcher)()\fP; -.br - XPointer \fIcall_data\fP; -.FN -.IP \fIim\fP 1i -Specifies XIM structure address. -.IP \fIdispatcher\fP 1i -Specifies the dispatcher function to register. -.IP \fIcall_data\fP 1i -Specifies a parameter for the \fIdispatcher\fP. -.LP -The dispatcher is a function of the following type: -.sp 6p -.FD 0 -Bool (*dispatcher)(\fIim\fP, \fIlen\fP, \fIdata\fP, \fIcall_data\fP) -.br - XIM \fIim\fP; -.br - INT16 \fIlen\fP; -.br - XPointer \fIdata\fP; -.br - XPointer \fIcall_data\fP; -.FN -.IP \fIim\fP 1i -Specifies XIM structure address. -.IP \fIlen\fP 1i -Specifies the size of the \fIdata\fP buffer. -.IP \fIdata\fP 1i -Specifies the buffer to store data. -.IP \fIcall_data\fP 1i -Specifies a parameter passed to the register_dispatcher. -.sp 6p -.LP -The dispatcher is provided by the protocol layer. They are called once -for every asynchronous data, in order of registration. If the data is -used, it must return True. otherwise, it must return False. -.LP -If the dispatcher function returns True, the Transport Layer assume -that the data has been processed by the upper layer. The Alternative -Entry for this function is: -.sp 6p -.FD 0 -Bool _XimRegisterDispatcher(\fIim\fP, \fIdispatcher\fP, \fIcall_data\fP) -.br - XIM \fIim\fP; -.br - Bool \fI(*dispatcher)()\fP; -.br - XPointer \fIcall_data\fP; -.FN -.IP \fIim\fP 1i -Specifies XIM structure address. -.IP \fIdispatcher\fP 1i -Specifies the dispatcher function to register. -.IP \fIcall_data\fP 1i -Specifies a parameter for the \fIdispatcher\fP. -.LP -.NH 2 -Calling dispatcher -.XS -\*(SN Calling dispatcher -.XE -.LP -The following function is used to call the registered dispatcher -function, when the asynchronous response from IM Server has arrived. -.sp 6p -.FD 0 -Bool (*call_dispatcher)(\fIim\fP, \fIlen\fP, \fIdata\fP) -.br - XIM \fIim\fP; -.br - INT16 \fIlen\fP; -.br - XPointer \fIdata\fP; -.FN -.IP \fIim\fP 1i -Specifies XIM structure address. -.IP \fIlen\fP 1i -Specifies the size of \fIdata\fP buffer. -.IP \fIdata\fP 1i -Specifies the buffer to store data. -.LP -The call_dispatcher must call the dispatcher function, in order of -their registration. \fIlen\fP and \fIdata\fP are the data passed to -register_dispatcher. -.LP -The return values are checked at each invocation, and if it finds -True, it immediately return with true for its return value. -.LP -It is depend on the upper layer whether the read data is XIM -Protocol packet unit or not. -The Alternative Entry for this function is: -.sp 6p -.FD 0 -Bool _XimCallDispatcher(\fIim\fP, \fIlen\fP, \fIdata\fP) -.br - XIM \fIim\fP; -.br - INT16 \fIlen\fP; -.br - XPointer \fIcall_data\fP; -.FN -.LP -.bp -.NH 1 -Sample implementations for the Transport Layer -.XS -\*(SN Sample implementations for the Transport Layer -.XE -.LP -Sample implementations for the transporter using the X connection is -described here. -.LP -.NH 2 -X Transport -.XS -\*(SN X Transport -.XE -.LP -At the beginning of the X Transport connection for the XIM transport -mechanism, two different windows must be created either in an Xlib XIM -or in an IM Server, with which the Xlib and the IM Server exchange the -XIM transports by using the ClientMessage events and Window Properties. -In the following, the window created by the Xlib is referred as the -"client communication window", and on the other hand, the window created -by the IM Server is referred as the "IMS communication window". -.LP -.NH 3 -Connection -.XS -\*(SN X Connection -.XE -.LP -In order to establish a connection, a communication window is created. -A ClientMessage in the following event's format is sent to the owner -window of XIM_SERVER selection, which the IM Server has created. -.LP -Refer to "The Input Method Protocol" for the XIM_SERVER atom. -.LP -.ce -Table 4-1; The ClientMessage sent to the IMS window. -.TS H -tab(:); -l s|l -l l|l. -_ -.sp 6p -.B -Structure Member:Contents -.sp 6p -_ -.sp 6p -.TH -.R -int:type:ClientMessage -u_long:serial:Set by the X Window System -Bool:send_event:Set by the X Window System -Display:*display:The display to which connects -Window:window:IMS Window ID -Atom:message_type:XInternAtom(display, ``_XIM_XCONNECT'', False) -int:format:32 -long:data.l[0]:client communication window ID -long:data.l[1]:client-major-transport-version (*1) -long:data.l[2]:client-major-transport-version (*1) -.sp 6p -_ -.TE -.LP -In order to establish the connection (to notify the IM Server communication -window), the IM Server sends a ClientMessage in the following event's -format to the client communication window. -.LP -.ce -Table 4-2; The ClientMessage sent by IM Server. -.TS H -tab(:); -l s | l -l l | l. -_ -.sp 6p -.B -Structure Member:Contents -.sp 6p -_ -.sp 6p -.TH -.R -int:type:ClientMessage -u_long:serial:Set by the X Window System -Bool:send_event:Set by the X Window System -Display:*display:The display to which connects -Window:window:client communication window ID -Atom:message_type:XInternAtom(display, ``_XIM_XCONNECT'', False) -int:format:32 -long:data.l[0]:IMS communication window ID -long:data.l[1]:server-major-transport-version (*1) -long:data.l[2]:server-minor-transport-version (*1) -long:data.l[3]:dividing size between ClientMessage and Property (*2) -.sp 6p -_ -.TE -.LP -.IP (*1) -major/minor-transport-version -.RS -The read/write method is decided by the combination of -major/minor-transport-version, as follows: -.LP -.ce -Table 4-3; The read/write method and the major/minor-transport-version -.TS -center, tab(:); -| c s | l | -| c | c | l |. -_ -.sp 6p -.B -Transport-version:read/write -.sp 6p -_ -.sp 6p -major:minor: -.sp 6p -_ -.sp 6p -.R -0:0:only-CM & Property-with-CM -:1:only-CM & multi-CM -:2:only-CM & multi-CM & Property-with-CM -.sp 6p -_ -.sp 6p -1:0:PropertyNotify -.sp 6p -_ -.sp 6p -2:0:only-CM & PropertyNotify -:1:only-CM & multi-CM & PropertyNotify -.sp 6p -_ -.TE -.LP -.RS -.TS -center, tab(;); -l n l. -only-CM;:;data is sent via a ClientMessage -multi-CM;:;data is sent via multiple ClientMessages -Property-with-CM;:;T{ -data is written in Property, and its Atom is send via ClientMessage -T} -PropertyNotify;:;T{ -data is written in Property, and its Atom is send via PropertyNotify -T} -.TE -.RE -.LP -The method to decide major/minor-transport-version is as follows: -.LP -.IP (1) -The client sends 0 as major/minor-transport-version to the IM Server. -The client must support all methods in Table 4-3. -The client may send another number as major/minor-transport-version to -use other method than the above in the future. -.IP (2) -The IM Server sends its major/minor-transport-version number to -the client. The client sends data using the method specified by the -IM Server. -.IP (3) -If major/minor-transport-version number is not available, it is regarded -as 0. -.RE -.LP -.IP (*2) -dividing size between ClientMessage and Property -.RS -If data is sent via both of multi-CM and Property, specify the dividing -size between ClientMessage and Property. The data, which is smaller than -this size, is sent via multi-CM (or only-CM), and the data, which is -lager than this size, is sent via Property. -.RE -.LP -.NH 3 -read/write -.XS -\*(SN read/write -.XE -.LP -The data is transferred via either ClientMessage or Window Property in -the X Window System. -.LP -.NH 4 -Format for the data from the Client to the IM Server -.XS -\*(SN Format for the data from the Client to the IM Server -.XE -.LP -.B -ClientMessage -.LP -.RS -If data is sent via ClientMessage event, the format is as follows: -.LP -.ce -Table 4-4; The ClientMessage event's format (first or middle) -.TS H -tab(;); -l s | l -l l | l. -_ -.sp 6p -.B -Structure Member;Contents -.sp 6p -_ -.sp 6p -.TH -.R -int;type;ClientMessage -u_long;serial;Set by the X Window System -Bool;send_event;Set by the X Window System -Display;*display;The display to which connects -Window;window;IMS communication window ID -Atom;message_type;XInternAtom(display, ``_XIM_MOREDATA'', False) -int;format;8 -char;data.b[20];(read/write DATA : 20 byte) -.sp 6p -_ -.TE -.LP -.ce -Table 4-5; The ClientMessage event's format (only or last) -.TS H -tab(;); -l s | l -l l | l. -_ -.sp 6p -.B -Structure Member;Contents -.sp 6p -_ -.sp 6p -.TH -.R -int;type;ClientMessage -u_long;serial;Set by the X Window System -Bool;send_event;Set by the X Window System -Display;*display;The display to which connects -Window;window;IMS communication window ID -Atom;message_type;XInternAtom(display, ``_XIM_PROTOCOL'', False) -int;format;8 -char;data.b[20];(read/write DATA : MAX 20 byte) (*1) -.sp 6p -_ -.TE -.IP (*1) -If the data is smaller than 20 byte, all data other than available data -must be 0. -.RE -.LP -.B -Property -.LP -.RS -In the case of large data, data will be sent via the Window Property -for the efficiency. There are the following two methods to notify -Property, and transport-version is decided which method is used. -.LP -.IP (1) -The XChangeProperty function is used to store data in the client -communication window, and Atom of the stored data is notified to the -IM Server via ClientMessage event. -.IP (2) -The XChangeProperty function is used to store data in the client -communication window, and Atom of the stored data is notified to the -IM Server via PropertyNotify event. -.LP -The arguments of the XChangeProperty are as follows: -.LP -.ce -Table 4-6; The XChangeProperty event's format -.TS H -tab(:); -l s | l -l l | l. -_ -.sp 6p -.B -Argument:Contents -.sp 6p -_ -.sp 6p -.TH -.R -Display:*display:The display to which connects -Window:window:IMS communication window ID -Atom:property:read/write property Atom (*1) -Atom:type:XA_STRING -int:format:8 -int:mode:PropModeAppend -u_char:*data:read/write DATA -int:nelements:length of DATA -.sp 6p -_ -.TE -.LP -.IP (*1) -The read/write property ATOM allocates the following strings by -\fBXInternAtom\fP. -.RS -``_clientXXX'' -.RE -.LP -The client changes the property with the mode of PropModeAppend and -the IM Server will read it with the delete mode i.e. (delete = True). -.LP -If Atom is notified via ClientMessage event, the format of the ClientMessage -is as follows: -.LP -.ce -Table 4-7; The ClientMessage event's format to send Atom of property -.TS H -tab(:); -l s | l -l l | l. -_ -.sp 6p -.B -Structure Member:Contents -.sp 6p -_ -.sp 6p -.TH -.R -int:type:ClientMessage -u_long:serial:Set by the X Window System -Bool:send_event:Set by the X Window System -Display:*display:The display to which connects -Window:window:IMS communication window ID -Atom:message_type:XInternAtom(display, ``_XIM_PROTOCOL'', False) -int:format:32 -long:data.l[0]:length of read/write property Atom -long:data.l[1]:read/write property Atom -.sp 6p -_ -.TE -.RE -.LP -.NH 4 -Format for the data from the IM Server to the Client -.XS -\*(SN Format for the data from the Client to the Client -.XE -.LP -.B -ClientMessage -.LP -.RS -The format of the ClientMessage is as follows: -.LP -.ce -Table 4-8; The ClientMessage event's format (first or middle) -.TS H -tab(;); -l s | l -l l | l. -_ -.sp 6p -.B -Structure Member;Contents -.sp 6p -_ -.sp 6p -.TH -.R -int;type;ClientMessage -u_long;serial;Set by the X Window System -Bool;send_event ;Set by the X Window System -Display;*display;The display to which connects -Window;window;client communication window ID -Atom;message_type;XInternAtom(display, ``_XIM_MOREDATA'', False) -int;format;8 -char;data.b[20];(read/write DATA : 20 byte) -.sp 6p -_ -.TE -.LP -.ce -Table 4-9; The ClientMessage event's format (only or last) -.TS H -tab(;); -l s | l -l l | l. -_ -.sp 6p -.B -Structure Member;Contents -.sp 6p -_ -.sp 6p -.TH -.R -int;type;ClientMessage -u_long;serial;Set by the X Window System -Bool;send_event ;Set by the X Window System -Display;*display;The display to which connects -Window;window;client communication window ID -Atom;message_type;XInternAtom(display, ``_XIM_PROTOCOL'', False) -int;format;8 -char;data.b[20];(read/write DATA : MAX 20 byte) (*1) -.sp 6p -_ -.TE -.LP -.IP (*1) -If the data size is smaller than 20 bytes, all data other than available -data must be 0. -.RE -.LP -.B -Property -.LP -.RS -In the case of large data, data will be sent via the Window Property -for the efficiency. There are the following two methods to notify -Property, and transport-version is decided which method is used. -.LP -.IP (1) -The XChangeProperty function is used to store data in the IMS -communication window, and Atom of the property is sent via the -ClientMessage event. -.IP (2) -The XChangeProperty function is used to store data in the IMS -communication window, and Atom of the property is sent via -PropertyNotify event. -.LP -The arguments of the XChangeProperty are as follows: -.LP -.ce -Table 4-10; The XChangeProperty event's format -.TS H -tab(:); -l s | l -l l | l. -_ -.sp 6p -.B -Argument:Contents -.sp 6p -_ -.sp 6p -.TH -.R -Display:*display:The display which to connects -Window:window:client communication window ID -Atom:property:read/write property Atom (*1) -Atom:type:XA_STRING -int:format:8 -int:mode:PropModeAppend -u_char:*data:read/write DATA -int:nelements:length of DATA -.sp 6p -_ -.TE -.LP -.IP (*1) -The read/write property ATOM allocates some strings, which are not -allocated by the client, by \fBXInternAtom\fP. -.LP -The IM Server changes the property with the mode of PropModeAppend and -the client reads it with the delete mode, i.e. (delete = True). -.LP -If Atom is notified via ClientMessage event, the format of the ClientMessage -is as follows: -.LP -.ce -Table 4-11; The ClientMessage event's format to send Atom of property -.TS H -tab(:); -l s | l -l l | l. -_ -.sp 6p -.B -Structure Member:Contents -.sp 6p -_ -.sp 6p -.TH -.R -int:type:ClientMessage -u_long:serial:Set by the X Window System -Bool:send_event:Set by the X Window System -Display:*display:The display to which connects -Window:window:client communication window ID -Atom:message_type:XInternAtom(display, ``_XIM_PROTOCOL'', False) -int:format:32 -long:data.l[0]:length of read/write property ATOM -long:data.l[1]:read/write property ATOM -.sp 6p -_ -.TE -.RE -.LP -.NH 3 -Closing Connection -.XS -\*(SN Closing Connection -.XE -.LP -If the client disconnect with the IM Server, shutdown function should -free the communication window properties and etc.. -.LP -.NH 1 -References -.XS -\*(SN References -.XE -.LP -[1] Masahiko Narita and Hideki Hiura, \fI``The Input Method Protocol''\fP -.LP - diff --git a/libX11/specs/i18n/framework/Makefile.am b/libX11/specs/i18n/framework/Makefile.am new file mode 100644 index 000000000..8f6364a03 --- /dev/null +++ b/libX11/specs/i18n/framework/Makefile.am @@ -0,0 +1,32 @@ +#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# 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.
+#
+
+if ENABLE_SPECS
+
+specdir = $(docdir)/$(subdir)
+doc_sources = framework.xml
+dist_spec_DATA = $(doc_sources) framework.svg
+
+include $(top_srcdir)/specs/xmlrules.in
+
+endif ENABLE_SPECS
diff --git a/libX11/specs/i18n/framework/framework.svg b/libX11/specs/i18n/framework/framework.svg new file mode 100644 index 000000000..7adfc1404 --- /dev/null +++ b/libX11/specs/i18n/framework/framework.svg @@ -0,0 +1,703 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="540.32245"
+ height="530.98114"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="framework.svg">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend"
+ style="overflow:visible">
+ <path
+ id="path3656"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <inkscape:perspective
+ id="perspective2824"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2844"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2874"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2874-0"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2915"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective4106"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-8"
+ style="overflow:visible">
+ <path
+ id="path3656-9"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4134"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-6"
+ style="overflow:visible">
+ <path
+ id="path3656-3"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4162"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-2"
+ style="overflow:visible">
+ <path
+ id="path3656-1"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4190"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-4"
+ style="overflow:visible">
+ <path
+ id="path3656-91"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4218"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-3"
+ style="overflow:visible">
+ <path
+ id="path3656-30"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4246"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-83"
+ style="overflow:visible">
+ <path
+ id="path3656-2"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4274"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-35"
+ style="overflow:visible">
+ <path
+ id="path3656-5"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4302"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend-20"
+ style="overflow:visible">
+ <path
+ id="path3656-0"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <inkscape:perspective
+ id="perspective4332"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.5911958"
+ inkscape:cx="236.83428"
+ inkscape:cy="268.26412"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1280"
+ inkscape:window-height="752"
+ inkscape:window-x="-3"
+ inkscape:window-y="-3"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-78.35714,-45.862183)">
+ <rect
+ style="fill:none;stroke:#000000;stroke-opacity:1"
+ id="rect2830"
+ width="451.42856"
+ height="38.57143"
+ x="128.85715"
+ y="46.362183"
+ ry="0" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-opacity:1"
+ id="rect2832"
+ width="125.71429"
+ height="67.14286"
+ x="98.571426"
+ y="186.07646"
+ ry="0" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-opacity:1"
+ id="rect2834"
+ width="65.714287"
+ height="45.714287"
+ x="274.85715"
+ y="188.55154"
+ ry="0" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:1.02407026;stroke-opacity:1"
+ id="rect2858"
+ width="133.40337"
+ height="48.547359"
+ x="274.86917"
+ y="235.23137"
+ ry="0" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-opacity:1"
+ id="rect2860"
+ width="157.14285"
+ height="62.857143"
+ x="443.71429"
+ y="188.93361"
+ ry="0" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-opacity:1"
+ id="rect2862"
+ width="167.14285"
+ height="130"
+ x="78.85714"
+ y="387.79074"
+ ry="0" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-opacity:1"
+ id="rect2862-6"
+ width="167.14285"
+ height="130"
+ x="261.57141"
+ y="388.50504"
+ ry="0" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-opacity:1"
+ id="rect2862-9"
+ width="167.14285"
+ height="130"
+ x="443.57141"
+ y="388.50504"
+ ry="0" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="303.85651"
+ y="72.885086"
+ id="text2897"><tspan
+ sodipodi:role="line"
+ id="tspan2899"
+ x="303.85651"
+ y="72.885086"
+ style="font-size:20px">Application</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="170.05533"
+ y="154.5576"
+ id="text2901"><tspan
+ sodipodi:role="line"
+ id="tspan2903"
+ x="170.05533"
+ y="154.5576"
+ style="font-size:16px;text-align:center;text-anchor:middle"><<ANSI/MSE API>></tspan><tspan
+ sodipodi:role="line"
+ x="170.05533"
+ y="174.5576"
+ id="tspan2905"
+ style="font-size:16px;text-align:center;text-anchor:middle">(X Contrib)</tspan></text>
+ <rect
+ style="fill:none;stroke:#000000;stroke-opacity:1"
+ id="rect2834-6"
+ width="65.714287"
+ height="45.714287"
+ x="341.6012"
+ y="188.55154"
+ ry="0" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="344.00778"
+ y="155.16107"
+ id="text2929"><tspan
+ sodipodi:role="line"
+ id="tspan2931"
+ x="344.00778"
+ y="155.16107"
+ style="font-size:16px;text-align:center;text-anchor:middle"><<XLib API>></tspan><tspan
+ sodipodi:role="line"
+ x="344.00778"
+ y="175.16107"
+ id="tspan2933"
+ style="font-size:16px;text-align:center;text-anchor:middle">(X Core)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="524.94836"
+ y="155.33501"
+ id="text2935"><tspan
+ sodipodi:role="line"
+ id="tspan2937"
+ x="524.94836"
+ y="155.33501"
+ style="font-size:16px;text-align:center;text-anchor:middle"><<ANSI/MSE API>></tspan><tspan
+ sodipodi:role="line"
+ x="524.94836"
+ y="175.33501"
+ id="tspan2939"
+ style="font-size:16px;text-align:center;text-anchor:middle">(X Contrib)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="278.00778"
+ y="205.31915"
+ id="text2941"><tspan
+ sodipodi:role="line"
+ id="tspan2943"
+ x="278.00778"
+ y="205.31915"
+ style="font-size:16px">Input</tspan><tspan
+ sodipodi:role="line"
+ x="278.00778"
+ y="225.31915"
+ id="tspan2945"
+ style="font-size:16px">Method</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="343.88126"
+ y="205.31915"
+ id="text2947"><tspan
+ sodipodi:role="line"
+ id="tspan2949"
+ x="343.88126"
+ y="205.31915"
+ style="font-size:16px">Output</tspan><tspan
+ sodipodi:role="line"
+ x="343.88126"
+ y="225.31915"
+ id="tspan2951"
+ style="font-size:16px">Method</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="280.57693"
+ y="253.82504"
+ id="text2953"><tspan
+ sodipodi:role="line"
+ id="tspan2955"
+ x="280.57693"
+ y="253.82504"
+ style="font-size:14px"><Locl. Serv. API></tspan><tspan
+ sodipodi:role="line"
+ x="280.57693"
+ y="271.32504"
+ id="tspan2957"
+ style="font-size:14px">X Locale Object</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="450.71121"
+ y="207.0899"
+ id="text2959"><tspan
+ sodipodi:role="line"
+ id="tspan2961"
+ x="450.71121"
+ y="207.0899"
+ style="font-size:16px">C Library</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="517.04321"
+ y="241.71439"
+ id="text2963"><tspan
+ sodipodi:role="line"
+ id="tspan2965"
+ x="517.04321"
+ y="241.71439"
+ style="font-size:16px">ANSI impl</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="104.89322"
+ y="419.56409"
+ id="text2967"><tspan
+ sodipodi:role="line"
+ id="tspan2969"
+ x="104.89322"
+ y="419.56409"
+ style="font-size:16px">XLC_XLOCALE</tspan><tspan
+ sodipodi:role="line"
+ x="104.89322"
+ y="439.56409"
+ id="tspan2971"
+ style="font-size:16px">- MB_CUR_MAX</tspan><tspan
+ sodipodi:role="line"
+ x="104.89322"
+ y="459.56409"
+ id="tspan2973"
+ style="font-size:16px">codeset info</tspan><tspan
+ sodipodi:role="line"
+ x="104.89322"
+ y="479.56409"
+ id="tspan2975"
+ style="font-size:16px">o char/charset</tspan><tspan
+ sodipodi:role="line"
+ x="104.89322"
+ y="499.56409"
+ id="tspan2977"
+ style="font-size:16px">o conv/charset</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="290.68759"
+ y="414.07794"
+ id="text2979"><tspan
+ sodipodi:role="line"
+ id="tspan2981"
+ x="290.68759"
+ y="414.07794"
+ style="font-size:16px">XLC_FONTSET</tspan><tspan
+ sodipodi:role="line"
+ x="290.68759"
+ y="434.07794"
+ id="tspan2983"
+ style="font-size:16px">- fontset info</tspan><tspan
+ sodipodi:role="line"
+ x="290.68759"
+ y="454.07794"
+ id="tspan2985"
+ style="font-size:16px">- charset info</tspan><tspan
+ sodipodi:role="line"
+ x="290.68759"
+ y="474.07794"
+ id="tspan2987"
+ style="font-size:16px">- font/charset</tspan><tspan
+ sodipodi:role="line"
+ x="290.68759"
+ y="494.07794"
+ id="tspan2989"
+ style="font-size:16px">- XLFD,GL/GR</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="469.39896"
+ y="416.07794"
+ id="text2991"><tspan
+ sodipodi:role="line"
+ id="tspan2993"
+ x="469.39896"
+ y="416.07794"
+ style="font-size:16px">localedef DB</tspan><tspan
+ sodipodi:role="line"
+ x="469.39896"
+ y="436.07794"
+ id="tspan2995"
+ style="font-size:16px">- MB_CUR_MAX</tspan><tspan
+ sodipodi:role="line"
+ x="469.39896"
+ y="456.07794"
+ id="tspan2997"
+ style="font-size:16px">- codset info</tspan><tspan
+ sodipodi:role="line"
+ x="469.39896"
+ y="476.07794"
+ id="tspan2999"
+ style="font-size:16px">o char/charset</tspan><tspan
+ sodipodi:role="line"
+ x="469.39896"
+ y="496.07794"
+ id="tspan3001"
+ style="font-size:16px">o conv/charset</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="106.83789"
+ y="204.34682"
+ id="text3026"><tspan
+ sodipodi:role="line"
+ id="tspan3028"
+ x="106.83789"
+ y="204.34682"
+ style="font-size:16px">Locale Library</tspan><tspan
+ sodipodi:role="line"
+ x="106.83789"
+ y="224.34682"
+ id="tspan3030"
+ style="font-size:16px" /></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="105.69164"
+ y="229.71439"
+ id="text3032"><tspan
+ sodipodi:role="line"
+ id="tspan3034"
+ x="105.69164"
+ y="229.71439"
+ style="font-size:16px">non-ANSI impl.</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 204.87737,342.20444 c 101.81022,0 101.81022,0 101.81022,0"
+ id="path4322" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 378.16996,341.36655 c 101.81022,0 101.81022,0 101.81022,0"
+ id="path4322-3" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 306.17376,342.94753 c 34.5652,-34.5652 33.93674,-33.93675 33.93674,-33.93675"
+ id="path4346" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 379.58874,342.20444 C 343.13816,305.75387 342.50971,305.12541 342.50971,305.12541"
+ id="path4348" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 81.699563,531.99881 c 16.339913,16.33991 16.339913,16.33991 16.339913,16.33991 312.972174,0 312.972174,0 312.972174,0"
+ id="path4350" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 411.01165,547.08181 426.7231,531.37035"
+ id="path4352" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 442.43456,533.25573 c 10.13348,17.55171 10.67774,18.49439 10.67774,18.49439 l 142.66605,0 0,-2.15448 13.82608,-13.82608"
+ id="path4354" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="170.25287"
+ y="574.73395"
+ id="text4356"><tspan
+ sodipodi:role="line"
+ id="tspan4358"
+ x="170.25287"
+ y="574.73395"
+ style="font-size:16px">XLocale Source (X Core)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="443.34363"
+ y="572.22015"
+ id="text4360"><tspan
+ sodipodi:role="line"
+ id="tspan4362"
+ x="443.34363"
+ y="572.22015"
+ style="font-size:16px">System Locale Source</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-20)"
+ d="m 46.505905,206.69672 1.256917,131.97622"
+ id="path3948"
+ transform="translate(78.35714,45.862183)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-20)"
+ d="m 482.65588,204.18289 0,135.74696"
+ id="path3950"
+ transform="translate(78.35714,45.862183)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Lend-20)"
+ d="m 110.60864,39.526842 0,43.992073"
+ id="path3952"
+ transform="translate(78.35714,45.862183)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Lend-20)"
+ d="m 218.70345,38.269926 0,43.992073"
+ id="path3954"
+ transform="translate(78.35714,45.862183)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Lend-20)"
+ d="m 290.34768,38.269926 0,43.992073"
+ id="path3956"
+ transform="translate(78.35714,45.862183)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-20)"
+ d="m 400.95632,34.499177 0,46.505905"
+ id="path3958"
+ transform="translate(78.35714,45.862183)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-20)"
+ d="m 124.43472,293.42395 -1.25692,45.24899"
+ id="path4960"
+ transform="translate(78.35714,45.862183)"
+ inkscape:connector-type="polyline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-20)"
+ d="m 395.92865,292.16703 0,49.01974"
+ id="path4962"
+ inkscape:connector-type="polyline"
+ transform="translate(78.35714,45.862183)" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-20);opacity:1"
+ d="m 258.92477,238.11963 1.25692,99.29639"
+ id="path4964"
+ inkscape:connector-type="polyline"
+ transform="translate(78.35714,45.862183)" />
+ </g>
+</svg>
diff --git a/libX11/specs/i18n/framework/framework.xml b/libX11/specs/i18n/framework/framework.xml new file mode 100644 index 000000000..ab1dac6b6 --- /dev/null +++ b/libX11/specs/i18n/framework/framework.xml @@ -0,0 +1,1620 @@ +<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+
+<book id="framework">
+
+<bookinfo>
+ <title>X11R6 Sample Implementation Frame Work</title>
+ <releaseinfo>X Version 11, Release 7</releaseinfo>
+ <authorgroup>
+ <othercredit>
+ <firstname>Katsuhisa</firstname><surname>Yano</surname>
+ <affiliation><orgname>TOSHIBA Corporation</orgname></affiliation>
+ </othercredit>
+ <othercredit>
+ <firstname>Yoshio</firstname><surname>Horiuchi</surname>
+ <affiliation><orgname>IBM Japan</orgname></affiliation>
+ </othercredit>
+ </authorgroup>
+ <copyright><year>1994</year><holder>TOSHIBA Corporation</holder></copyright>
+ <copyright><year>1994</year><holder>IBM Corporation</holder></copyright>
+
+<legalnotice>
+
+<para>
+Permission to use, copy, modify, and distribute this documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice and this permission notice appear in all copies. TOSHIBA Corporation and
+IBM Corporation make no representations about the suitability for any purpose of the information in this document.
+This documentation is provided as is without express or implied warranty.
+</para>
+
+<para>
+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:
+</para>
+
+<para>
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+</para>
+
+<para>
+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 X CONSORTIUM 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.
+</para>
+
+<para>
+Except as contained in this notice, the name of The Open Group shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from X Consortium.
+</para>
+
+<para>X Window System is a trademark of The Open Group.</para>
+
+</legalnotice>
+</bookinfo>
+
+<chapter id="framework_">
+<title>Framework</title>
+<sect1 id="preface">
+<title>Preface</title>
+<para>
+This document proposes to define the structures, methods and their
+signatures that are expected to be common to all locale dependent
+functions within the Xlib sample implementation. The following
+illustration (Fig.1) <!-- xref --> is proposed to outline the separating of
+the components within the sample implementation.
+</para>
+
+<para>
+Preface drawing.
+</para>
+
+<mediaobject id="framework_locale_service_api_proposal">
+ <imageobject>
+ <imagedata width="540px" depth="530px" contentwidth="560px" contentdepth="550px" format="SVG" fileref="framework.svg"/>
+ </imageobject>
+ <caption>Frame work of Locale Service API Proposal</caption>
+</mediaobject>
+
+<para>
+Generally speaking, the internationalized portion of Xlib (Locale
+Dependent X, LDX) consists of three objects;
+locale (LC) , input method (IM) and output method (OM).
+The LC provides a set of information that depends on user's language
+environment. The IM manages text inputing, and the OM manages text
+drawing. Both IM and OM highly depend on LC data.
+</para>
+
+<para>
+In X11R5, there are two sample implementations, Ximp and Xsi, for
+Xlib internationalization. But in both implementations, IM and OM
+actually refer the private extension of LC. It breaks coexistence
+of these two sample implementations. For example, if a user creates
+a new OM for special purpose as a part of Ximp, it will not work with
+Xsi.
+</para>
+
+<para>
+As a solution of this problem, we propose to define the standard
+APIs between these three objects, and define the structure that are
+common to these objects.
+</para>
+</sect1>
+
+<sect1 id="Objective">
+<title>Objective</title>
+
+<itemizedlist>
+ <listitem>
+ <para>
+Explain the current X11R6 sample implementation
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+Document the common set of locale dependent interfaces
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+Provide more flexible pluggable layer
+ </para>
+ </listitem>
+</itemizedlist>
+</sect1>
+
+<sect1 id="Locale_Object_Binding_Functions">
+<title>Locale Object Binding Functions</title>
+<!-- .XS (SN Locale Object Binding Functions -->
+<!-- .XE -->
+<para>
+This chapter describes functions related locale object binding for
+implementing the pluggable layer.
+</para>
+
+<para>
+A locale loader is an entry point for locale object, which
+instantiates XLCd object and binds locale methods with specified
+locale name. The behavior of loader is implementation dependent.
+And, what kind of loaders are available is also implementation
+dependent.
+</para>
+
+<para>
+<!-- .LP -->
+The loader is called in
+<function>_XOpenLC, </function>
+but caller of
+<function>_XOpenLC </function>
+does not need to care about its inside. For example, if the loader is
+implemented with dynamic load functions, and the dynamic module is
+expected to be unloaded when the corresponding XLCd is freed,
+close methods of XLCdMethods should handle unloading.
+</para>
+
+<para>
+<emphasis role="bold">Initializing a locale loader list</emphasis>
+</para>
+
+<para>void _XlcInitLoader</para>
+
+
+<para>
+The
+<function>_XlcInitLoader</function>
+function initializes the locale loader list with vendor specific
+manner. Each loader is registered with calling
+<function>_XlcAddLoader.</function>
+The number of loaders and their order in the loader list is
+implementation dependent.
+</para>
+
+<para>
+<emphasis role="bold">Add a loader</emphasis>
+</para>
+
+<literallayout>
+typedef XLCd (*XLCdLoadProc)(<emphasis remap='I'>name</emphasis>);
+ char <emphasis remap='I'>*name</emphasis>;
+
+typedef int XlcPosition;
+
+#define XlcHead
+#define XlcTail
+</literallayout>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XlcAddLoader</function></funcdef>
+ <paramdef>XLCdLoadProc<parameter> proc</parameter></paramdef>
+ <paramdef>XlcPosition<parameter> position</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcAddLoader</function>
+function registers the specified locale loader "<emphasis remap='I'>proc</emphasis>" to the
+internal loader list. The position specifies that the loader
+"<emphasis remap='I'>proc</emphasis>" should be placed in the top of the loader list(XlcHead)
+or last(XlcTail).
+</para>
+
+<para>
+The object loader is called from the top of the loader list in order,
+when calling time.
+</para>
+
+<para>
+<function>Remove a loader</function>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcRemoveLoader</function></funcdef>
+ <paramdef>XLCdLoadProc<parameter> proc</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcRemoveLoader</function>
+function removes the locale loader specified by "<emphasis remap='I'>proc</emphasis>" from the
+loader list.
+</para>
+
+<para>
+Current implementation provides following locale loaders;
+</para>
+
+<literallayout>
+<function>_XlcDefaultLoader</function>
+<function>_XlcGenericLoader</function>
+<function>_XlcEucLoader</function>
+<function>_XlcSjisLoader</function>
+<function>_XlcUtfLoader</function>
+<function>_XaixOsDynamicLoad</function>
+</literallayout>
+
+</sect1>
+
+<sect1 id="Locale_Method_Interface">
+<title>Locale Method Interface</title>
+
+<para>
+This chapter describes the locale method API, which is a set of
+accessible functions from both IM and OM parts.
+The locale method API provides the functionalities; obtaining locale
+dependent information, handling charset, converting text, etc.
+</para>
+
+<para>
+As a result of using these APIs instead of accessing vender private
+extension of the locale object, we can keep locale, IM and OM
+independently each other.
+</para>
+
+</sect1>
+
+<sect1 id="Locale_Method_Functions">
+<title>Locale Method Functions</title>
+<para>
+<function>Open a Locale Method</function>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>XLCd <function> _XOpenLC</function></funcdef>
+ <paramdef>char<parameter> *name</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XOpenLC</function>
+function opens a locale method which corresponds to the
+specified locale name.
+<function>_XOpenLC</function>
+calls a locale object loader, which is registered via
+<function>_XlcAddLoader into the internal loader list. If the called loader </function>
+is valid and successfully opens a locale,
+<function>_XOpenLC</function>
+returns the XLCd. If the loader is invalid or failed to open a locale,
+<function>_XOpenLC</function>
+calls the next loader. If all registered loaders cannot open a locale,
+<function>_XOpenLC</function>
+returns NULL.
+</para>
+
+<para>XLCd _XlcCurrentLC</para>
+
+<para>
+The
+<function>_XlcCurrentLC</function>
+function returns an XLCd that are bound to current locale.
+</para>
+
+<para>
+<emphasis role="bold">Close a Locale Method</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XCloseLC</function></funcdef>
+ <paramdef>XLCd<parameter> lcd</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+<!-- .LP -->
+The
+<function>_XCloseLC</function>
+function close a locale method the specified lcd.
+</para>
+
+<para>
+<emphasis role="bold">Obtain Locale Method values</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>char *<function>_XGetLCValues</function></funcdef>
+ <paramdef>XLCd<parameter> lcd</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XGetLCValues</function>
+function returns NULL if no error occurred; otherwise, it returns the
+name of the first argument that could not be obtained.
+The following values are defined as standard arguments. Other values
+are implementation dependent.
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colwidth="3*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="3*" colsep="0"/>
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>XlcNCodeset</entry>
+ <entry>char*</entry>
+ <entry>codeset part of locale name</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNDefaultString</entry>
+ <entry>char*</entry>
+ <entry>XDefaultString()</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNEncodingName</entry>
+ <entry>char*</entry>
+ <entry>encoding name</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNLanguage</entry>
+ <entry>char*</entry>
+ <entry>language part of locale name</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNMbCurMax</entry>
+ <entry>int</entry>
+ <entry>ANSI C MB_CUR_MAX</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNStateDependentEncoding</entry>
+ <entry>Bool</entry>
+ <entry>is state-dependent encoding or not</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNTerritory</entry>
+ <entry>char*</entry>
+ <entry>territory part of locale name</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+</sect1>
+
+<sect1 id="Charset_functions">
+<title>Charset functions</title>
+<para>
+The XlcCharSet is an identifier which represents a subset of characters
+(character set) in the locale object.
+</para>
+
+<literallayout class="monospaced">
+typedef enum {
+ XlcUnknown, XlcC0, XlcGL, XlcC1, XlcGR, XlcGLGR, XlcOther
+} XlcSide;
+
+typedef struct _XlcCharSetRec *XlcCharSet;
+
+typedef struct {
+ char *name;
+ XPointer value;
+} XlcArg, *XlcArgList;
+
+typedef char* (*XlcGetCSValuesProc)(<emphasis remap='I'>charset</emphasis>, <emphasis remap='I'>args</emphasis>, <emphasis remap='I'>num_args</emphasis>);
+ XlcCharSet <emphasis remap='I'>charset</emphasis>;
+ XlcArgList <emphasis remap='I'>args</emphasis>;
+ int <emphasis remap='I'>num_args</emphasis>;
+
+typedef struct _XlcCharSetRec {
+ char *name;
+ XrmQuark xrm_name;
+ char *encoding_name;
+ XrmQuark xrm_encoding_name;
+ XlcSide side;
+ int char_size;
+ int set_size;
+ char *ct_sequence;
+ XlcGetCSValuesProc get_values;
+} XlcCharSetRec;
+</literallayout>
+
+<para>
+<emphasis role="bold">Get an XlcCharSet</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>XlcCharSet <function> _XlcGetCharSet</function></funcdef>
+ <paramdef>char<parameter> *name</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcGetCharSet</function>
+function gets an XlcCharSet which corresponds to the charset name
+specified by "<emphasis remap='I'>name</emphasis>".
+<function>_XlcGetCharSet </function>
+returns NULL, if no XlcCharSet bound to specified "<emphasis remap='I'>name</emphasis>".
+</para>
+
+<para>
+The following character sets are pre-registered.
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='2' align='left'>
+ <colspec colname='c1' colwidth="1*" colsep="0"/>
+ <colspec colname='c2' colwidth="2*" colsep="0"/>
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>ISO8859-1:GL</entry>
+ <entry>7-bit ASCII graphics (ANSI X3.4-1968),</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>Left half of ISO 8859 sets</entry>
+ </row>
+ <row rowsep="0">
+ <entry>JISX0201.1976-0:GL</entry>
+ <entry>Left half of JIS X0201-1976 (reaffirmed 1984),</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>8-Bit Alphanumeric-Katakana Code</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-1:GR</entry>
+ <entry>Right half of ISO 8859-1, Latin alphabet No. 1</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-2:GR</entry>
+ <entry>Right half of ISO 8859-2, Latin alphabet No. 2</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-3:GR</entry>
+ <entry>Right half of ISO 8859-3, Latin alphabet No. 3</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-4:GR</entry>
+ <entry>Right half of ISO 8859-4, Latin alphabet No. 4</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-7:GR</entry>
+ <entry>Right half of ISO 8859-7, Latin/Greek alphabet</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-6:GR</entry>
+ <entry>Right half of ISO 8859-6, Latin/Arabic alphabet</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-8:GR</entry>
+ <entry>Right half of ISO 8859-8, Latin/Hebrew alphabet</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-5:GR</entry>
+ <entry>Right half of ISO 8859-5, Latin/Cyrillic alphabet</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ISO8859-9:GR</entry>
+ <entry>Right half of ISO 8859-9, Latin alphabet No. 5</entry>
+ </row>
+ <row rowsep="0">
+ <entry>JISX0201.1976-0:GR</entry>
+ <entry>Right half of JIS X0201-1976 (reaffirmed 1984),</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>8-Bit Alphanumeric-Katakana Code</entry>
+ </row>
+ <row rowsep="0">
+ <entry>GB2312.1980-0:GL</entry>
+ <entry>GB2312-1980, China (PRC) Hanzi defined as GL</entry>
+ </row>
+ <row rowsep="0">
+ <entry>GB2312.1980-0:GR</entry>
+ <entry>GB2312-1980, China (PRC) Hanzi defined as GR</entry>
+ </row>
+ <row rowsep="0">
+ <entry>JISX0208.1983-0:GL</entry>
+ <entry>JIS X0208-1983, Japanese Graphic Character Set</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>defined as GL</entry>
+ </row>
+ <row rowsep="0">
+ <entry>JISX0208.1983-0:GR</entry>
+ <entry>JIS X0208-1983, Japanese Graphic Character Set</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>defined as GR</entry>
+ </row>
+ <row rowsep="0">
+ <entry>KSC5601.1987-0:GL</entry>
+ <entry>KS C5601-1987, Korean Graphic Character Set</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>defined as GL</entry>
+ </row>
+ <row rowsep="0">
+ <entry>KSC5601.1987-0:GR</entry>
+ <entry>KS C5601-1987, Korean Graphic Character Set</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>defined as GR</entry>
+ </row>
+ <row rowsep="0">
+ <entry>JISX0212.1990-0:GL</entry>
+ <entry>JIS X0212-1990, Japanese Graphic Character Set</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>defined as GL</entry>
+ </row>
+ <row rowsep="0">
+ <entry>JISX0212.1990-0:GR</entry>
+ <entry>JIS X0212-1990, Japanese Graphic Character Set</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>defined as GR</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+<emphasis role="bold">Add an XlcCharSet</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XlcAddCharSet</function></funcdef>
+ <paramdef>XlcCharSet<parameter> charset</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcAddCharSet</function>
+function registers XlcCharSet specified by "<emphasis remap='I'>charset</emphasis>".
+</para>
+
+<para>
+<!-- .LP -->
+<!-- .sp -->
+<function>Obtain Character Set values</function>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>char * <function> _XlcGetCSValues</function></funcdef>
+ <paramdef>XlcCharSet<parameter> charset</parameter></paramdef>
+ <paramdef><parameter> ...</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcGetCSValues</function>
+function returns NULL if no error occurred;
+otherwise, it returns the name of the first argument that could not
+be obtained. The following values are defined as standard arguments.
+Other values are implementation dependent.
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colwidth="3*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="3*" colsep="0"/>
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>XlcNName</entry>
+ <entry>char*</entry>
+ <entry>charset name</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNEncodingName</entry>
+ <entry>char*</entry>
+ <entry>XLFD CharSet Registry and Encoding</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNSide</entry>
+ <entry>XlcSide</entry>
+ <entry>charset side (GL, GR, ...)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNCharSize</entry>
+ <entry>int</entry>
+ <entry>number of octets per character</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNSetSize</entry>
+ <entry>int</entry>
+ <entry>number of character sets</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNControlSequence</entry>
+ <entry>char*</entry>
+ <entry>control sequence of Compound Text</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+</sect1>
+
+<sect1 id="Converter_Functions">
+<title>Converter Functions</title>
+<para>
+We provide a set of the common converter APIs, that are independent
+from both of source and destination text type.
+</para>
+
+<literallayout class="monospaced">
+typedef struct _XlcConvRec *XlcConv;
+
+typedef void (*XlcCloseConverterProc)(<emphasis remap='I'>conv</emphasis>);
+ XlcConv <emphasis remap='I'>conv</emphasis>;
+
+typedef int (*XlcConvertProc)(<emphasis remap='I'>conv</emphasis>, <emphasis remap='I'>from</emphasis>, <emphasis remap='I'>from_left</emphasis>, <emphasis remap='I'>to</emphasis>, <emphasis remap='I'>to_left</emphasis>, <emphasis remap='I'>args</emphasis>, <emphasis remap='I'>num_args</emphasis>);
+ XlcConv <emphasis remap='I'>conv</emphasis>;
+ XPointer <emphasis remap='I'>*from</emphasis>;
+ int <emphasis remap='I'>*from_left</emphasis>;
+ XPointer <emphasis remap='I'>*to</emphasis>;
+ int <emphasis remap='I'>*to_left</emphasis>;
+ XPointer <emphasis remap='I'>*args</emphasis>;
+ int <emphasis remap='I'>num_args</emphasis>;
+
+typedef void (*XlcResetConverterProc)(<emphasis remap='I'>conv</emphasis>);
+ XlcConv <emphasis remap='I'>conv</emphasis>;
+
+typedef struct _XlcConvMethodsRec {
+ XlcCloseConverterProc close;
+ XlcConvertProc convert;
+ XlcResetConverterProc reset;
+} XlcConvMethodsRec, *XlcConvMethods;
+
+typedef struct _XlcConvRec {
+ XlcConvMethods methods;
+ XPointer state;
+} XlcConvRec;
+</literallayout>
+
+<para>
+<function>Open a converter</function>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>XlcConv <function> _XlcOpenConverter</function></funcdef>
+ <paramdef>XLCd<parameter> from_lcd</parameter></paramdef>
+ <paramdef>char<parameter> *from_type</parameter></paramdef>
+ <paramdef>XLCd<parameter> to_lcd</parameter></paramdef>
+ <paramdef>char<parameter> *to_type</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+<function>_XlcOpenConverter </function>
+function opens the converter which converts a text from specified
+"<emphasis remap='I'>from_type</emphasis>" to specified "<emphasis remap='I'>to_type</emphasis>" encoding. If the
+function cannot find proper converter or cannot open a corresponding
+converter, it returns NULL. Otherwise, it returns the conversion
+descriptor.
+</para>
+
+<para>
+The following types are pre-defined. Other types are implementation
+dependent.
+</para>
+
+<informaltable>
+ <tgroup cols='4' align='left'>
+ <colspec colname='c1' colwidth="3*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="3*" colsep="0"/>
+ <colspec colname='c4' colwidth="2*" colsep="0"/>
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Arguments</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>XlcNMultiByte</entry>
+ <entry>char *</entry>
+ <entry>multibyte</entry>
+ <entry>-</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNWideChar</entry>
+ <entry>wchar_t *</entry>
+ <entry>wide character</entry>
+ <entry>-</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNCompoundText</entry>
+ <entry>char *</entry>
+ <entry>COMPOUND_TEXT</entry>
+ <entry>-</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNString</entry>
+ <entry>char *</entry>
+ <entry>STRING</entry>
+ <entry>-</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNCharSet</entry>
+ <entry>char *</entry>
+ <entry>per charset</entry>
+ <entry>XlcCharSet</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNChar</entry>
+ <entry>char *</entry>
+ <entry>per character</entry>
+ <entry>XlcCharSet</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+<emphasis role="bold">Close a converter</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcCloseConverter</function></funcdef>
+ <paramdef>XlcConv<parameter> conv</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcCloseConverter</function>
+function closes the specified converter "<emphasis remap='I'>conv</emphasis>".
+</para>
+
+<para>
+<emphasis role="bold">Code conversion</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _XlcConvert</function></funcdef>
+ <paramdef>XlcConv<parameter> conv</parameter></paramdef>
+ <paramdef>XPointer<parameter> *from</parameter></paramdef>
+ <paramdef>int<parameter> *from_left</parameter></paramdef>
+ <paramdef>XPointer<parameter> *to</parameter></paramdef>
+ <paramdef>int<parameter> *to_left</parameter></paramdef>
+ <paramdef>XPointer<parameter> *args</parameter></paramdef>
+ <paramdef>int<parameter> num_args</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcConvert</function>
+function converts a sequence of characters from one type, in the array
+specified by "<emphasis remap='I'>from</emphasis>", into a sequence of corresponding characters
+in another type, in the array specified by "<emphasis remap='I'>to</emphasis>". The types are
+those specified in the
+<function>_XlcOpenConverter() </function>
+call that returned the conversion descriptor, "<emphasis remap='I'>conv</emphasis>".
+The arguments "<emphasis remap='I'>from</emphasis>", "<emphasis remap='I'>from_left</emphasis>", "<emphasis remap='I'>to</emphasis>" and
+"<emphasis remap='I'>to_left</emphasis>" have the same specification of XPG4 iconv function.
+</para>
+
+<para>
+For state-dependent encodings, the conversion descriptor "<emphasis remap='I'>conv</emphasis>"
+is placed into its initial shift state by a call for which "<emphasis remap='I'>from</emphasis>"
+is a NULL pointer, or for which "<emphasis remap='I'>from</emphasis>" points to a null pointer.
+</para>
+
+<para>
+The following 2 converters prepared by locale returns appropriate
+charset (XlcCharSet) in an area pointed by args[0].
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colwidth="1*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="2*" colsep="0"/>
+ <thead>
+ <row>
+ <entry>From</entry>
+ <entry>To</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>XlcNMultiByte</entry>
+ <entry>XlcNCharSet</entry>
+ <entry>Segmentation (Decomposing)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XlcNWideChar</entry>
+ <entry>XlcNCharSet</entry>
+ <entry>Segmentation (Decomposing)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+The conversion, from XlcNMultiByte/XlcNWideChar to XlcNCharSet,
+extracts a segment which has same charset encoding characters.
+More than one segment cannot be converted in a call.
+</para>
+
+<para>
+<emphasis role="bold">Reset a converter</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcResetConverter</function></funcdef>
+ <paramdef>XlcConv<parameter> conv</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcResetConverter </function>
+function reset the specified converter "<emphasis remap='I'>conv</emphasis>".
+</para>
+
+<para>
+<emphasis role="bold">Register a converter</emphasis>
+</para>
+
+<literallayout class="monospaced">
+typedef XlcConv (*XlcOpenConverterProc)(<emphasis remap='I'>from_lcd</emphasis>, <emphasis remap='I'>from_type</emphasis>, <emphasis remap='I'>to_lcd</emphasis>, <emphasis remap='I'>to_type</emphasis>);
+ XLCd <emphasis remap='I'>from_lcd</emphasis>;
+ char <emphasis remap='I'>*from_type</emphasis>;
+ XLCd <emphasis remap='I'>to_lcd</emphasis>;
+ char <emphasis remap='I'>*to_type</emphasis>;
+</literallayout>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XlcSetConverter</function></funcdef>
+ <paramdef>XLCd<parameter> from_lcd</parameter></paramdef>
+ <paramdef>char<parameter> *from</parameter></paramdef>
+ <paramdef>XLCd<parameter> to_lcd</parameter></paramdef>
+ <paramdef>char<parameter> *to</parameter></paramdef>
+ <paramdef>XlcOpenConverterProc<parameter> converter</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The <function>XlcSetConverter</function> function registers a converter which convert
+from "<emphasis remap='I'>from_type</emphasis>" to "<emphasis remap='I'>to_type</emphasis>" into the converter list
+(in the specified XLCd).
+</para>
+</sect1>
+
+<sect1 id="X_Locale_Database_functions">
+<title>X Locale Database functions</title>
+<para>
+X Locale Database contains the subset of user's environment that
+depends on language. The following APIs are provided for accessing
+X Locale Database and other locale relative files.
+</para>
+
+<para>
+For more detail about X Locale Database, please refer
+X Locale Database Definition document.
+</para>
+
+<para>
+<emphasis role="bold">Get a resource from database</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcGetResource</function></funcdef>
+ <paramdef>XLCd<parameter> lcd</parameter></paramdef>
+ <paramdef>char<parameter> *category</parameter></paramdef>
+ <paramdef>char<parameter> *class</parameter></paramdef>
+ <paramdef>char<parameter> ***value</parameter></paramdef>
+ <paramdef>int<parameter> *count</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcGetResource</function>
+function obtains a locale dependent data which is associated with the
+locale of specified "<emphasis remap='I'>lcd</emphasis>".
+The locale data is provided by system locale or by X Locale Database
+file, and what kind of data is available is implementation dependent.
+</para>
+
+<para>
+The specified "<emphasis remap='I'>category</emphasis>" and "<emphasis remap='I'>class</emphasis>" are used for
+finding out the objective locale data.
+</para>
+
+<para>
+The returned value is returned in value argument in string list form,
+and the returned count shows the number of strings in the value.
+</para>
+
+<para>
+The returned value is owned by locale method, and should not be modified
+or freed by caller.
+</para>
+
+<para>
+<emphasis role="bold">Get a locale relative file name</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>char *<function>_XlcFileName</function></funcdef>
+ <paramdef>XLCd<parameter> lcd</parameter></paramdef>
+ <paramdef>char<parameter> *category</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcFileName</function>
+functions returns a file name which is bound to the specified "<emphasis remap='I'>lcd</emphasis>"
+and "<emphasis remap='I'>category</emphasis>", as a null-terminated string. If no file name can
+be found, or there is no readable file for the found file name,
+<function>_XlcFileName</function>
+returns NULL. The returned file name should be freed by caller.
+</para>
+
+<para>
+The rule for searching a file name is implementation dependent.
+In current implementation,
+<function>_XlcFileName </function>
+uses "{category}.dir" file as mapping table, which has pairs of
+strings, a full locale name and a corresponding file name.
+</para>
+
+</sect1>
+
+<sect1 id="Utility_Functions">
+<title>Utility Functions</title>
+
+<para>
+<emphasis role="bold">Compare Latin-1 strings</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _XlcCompareISOLatin1</function></funcdef>
+ <paramdef>char*str1,<parameter> *str2</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _XlcNCompareISOLatin1</function></funcdef>
+ <paramdef>char*str1,<parameter> *str2</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_XlcCompareIsoLatin1 </function>
+function to compares two ISO-8859-1 strings. Bytes representing ASCII lower
+case letters are converted to upper case before making the comparison.
+The value returned is an integer less than, equal to, or greater than
+zero, depending on whether "<emphasis remap='I'>str1</emphasis>" is lexicographicly less than,
+equal to, or greater than "<emphasis remap='I'>str2</emphasis>".
+</para>
+
+<para>
+The
+<function>_XlcNCompareIsoLatin1</function>
+function is identical to
+<function>_XlcCompareISOLatin1,</function>
+except that at most "<emphasis remap='I'>len</emphasis>" bytes are compared.
+</para>
+
+<para>
+<emphasis role="bold">Resource Utility</emphasis>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> XlcNumber</function></funcdef>
+ <paramdef>ArrayType<parameter> array</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+Similar to XtNumber.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcCopyFromArg</function></funcdef>
+ <paramdef>char<parameter> *src</parameter></paramdef>
+ <paramdef>char<parameter> *dst</parameter></paramdef>
+ <paramdef>int<parameter> size</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcCopyToArg</function></funcdef>
+ <paramdef>char<parameter> *src</parameter></paramdef>
+ <paramdef>char<parameter> **dst</parameter></paramdef>
+ <paramdef>int<parameter> size</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+Similar to
+<function>_XtCopyFromArg </function>
+and
+<function>_XtCopyToArg.</function>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcCountVaList</function></funcdef>
+ <paramdef>va_list<parameter> var</parameter></paramdef>
+ <paramdef>int<parameter> *count_ret</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+Similar to
+<function>_XtCountVaList.</function>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcVaToArgList</function></funcdef>
+ <paramdef>va_list<parameter> var</parameter></paramdef>
+ <paramdef>int<parameter> count</parameter></paramdef>
+ <paramdef>XlcArgList<parameter> *args_ret</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+Similar to
+<function>_XtVaToArgList.</function>
+</para>
+
+<literallayout class="monospaced">
+typedef struct _XlcResource {
+ char *name;
+ XrmQuark xrm_name;
+ int size;
+ int offset;
+ unsigned long mask;
+} XlcResource, *XlcResourceList;
+</literallayout>
+
+<literallayout class="monospaced">
+#define XlcCreateMask (1L<<0)
+#define XlcDefaultMask (1L<<1)
+#define XlcGetMask (1L<<2)
+#define XlcSetMask (1L<<3)
+#define XlcIgnoreMask (1L<<4)
+</literallayout>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XlcCompileResourceList</function></funcdef>
+ <paramdef>XlcResourceList<parameter> resources</parameter></paramdef>
+ <paramdef>int<parameter> num_resources</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+Similar to
+<function>_XtCompileResourceList.</function>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>char * <function> _XlcGetValues</function></funcdef>
+ <paramdef>XPointer<parameter> base</parameter></paramdef>
+ <paramdef>XlcResourceList<parameter> resources</parameter></paramdef>
+ <paramdef>int<parameter> num_resources</parameter></paramdef>
+ <paramdef>XlcArgList<parameter> args</parameter></paramdef>
+ <paramdef>int<parameter> num_args</parameter></paramdef>
+ <paramdef>unsignedlong<parameter> mask</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+Similar to XtGetSubvalues.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>char * <function> _XlcSetValues</function></funcdef>
+ <paramdef>XPointer<parameter> base</parameter></paramdef>
+ <paramdef>XlcResourceList<parameter> resources</parameter></paramdef>
+ <paramdef>int<parameter> num_resources</parameter></paramdef>
+ <paramdef>XlcArgList<parameter> args</parameter></paramdef>
+ <paramdef>int<parameter> num_args</parameter></paramdef>
+ <paramdef>unsignedlong<parameter> mask</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+Similar to XtSetSubvalues.
+</para>
+
+<para>
+<emphasis role="bold">ANSI C Compatible Functions</emphasis>
+</para>
+
+<para>
+The following are ANSI C/MSE Compatible Functions for non-ANSI C environment.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xmblen</function></funcdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xmblen </function>
+function returns the number of characters pointed to by "<emphasis remap='I'>str</emphasis>".
+Only "<emphasis remap='I'>len</emphasis>" bytes in "<emphasis remap='I'>str</emphasis>" are used in determining the
+character count returned. "<emphasis remap='I'>Str</emphasis>" may point at characters from
+any valid codeset in the current locale.
+</para>
+
+<para>
+The call
+<function>_Xmblen</function>
+is equivalent to
+_Xmbtowc(_Xmbtowc((<emphasis remap='I'>wchar_t*</emphasis>)NULL, <emphasis remap='I'>str</emphasis>, <emphasis remap='I'>len</emphasis>))
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xmbtowc</function></funcdef>
+ <paramdef>wchar_t<parameter> *wstr</parameter></paramdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xmbtowc</function>
+function converts the character(s) pointed to by "<emphasis remap='I'>str</emphasis>"
+to their wide character representation(s) pointed to by "<emphasis remap='I'>wstr</emphasis>".
+"<emphasis remap='I'>Len</emphasis>" is the number of bytes in "<emphasis remap='I'>str</emphasis>" to be converted.
+The return value is the number of characters converted.
+</para>
+
+<para>
+The call
+<function>_Xmbtowc</function>
+is equivalent to
+_Xlcmbtowc((XLCd)NULL, <emphasis remap='I'>wstr</emphasis>, <emphasis remap='I'>str</emphasis>, <emphasis remap='I'>len</emphasis>)
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xlcmbtowc</function></funcdef>
+ <paramdef>XLCd<parameter> lcd</parameter></paramdef>
+ <paramdef>wchar_t<parameter> *wstr</parameter></paramdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xlcmbtowc</function>
+function is identical to
+<function>_Xmbtowc, </function>
+except that it requires the "<emphasis remap='I'>lcd</emphasis>" argument. If "<emphasis remap='I'>lcd</emphasis>"
+is (XLCd) NULL,
+<function>_Xlcmbtowc, </function>
+calls
+<function>_XlcCurrentLC </function>
+to determine the current locale.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xwctomb</function></funcdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>wchar_t<parameter> wc</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xwctomb </function>
+function converts a single wide character pointed to by "<emphasis remap='I'>wc</emphasis>" to
+its multibyte representation pointed to by "<emphasis remap='I'>str</emphasis>".
+On success, the return value is 1.
+</para>
+
+<para>
+The call
+<function>_Xwctomb</function>
+is equivalent to
+_Xlcwctomb((XLCd)NULL, <emphasis remap='I'>str</emphasis>, <emphasis remap='I'>wstr</emphasis>)
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xlcwctomb</function></funcdef>
+ <paramdef>XLCd<parameter> lcd</parameter></paramdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>wchar_t<parameter> wc</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xlcwctomb</function>
+function is identical to _Xwctomb, except that it requires the
+"<emphasis remap='I'>lcd</emphasis>" argument. If "<emphasis remap='I'>lcd</emphasis>" is (XLCd) NULL,
+<function>_Xlcwctomb, </function>
+calls
+<function>_XlcCurrentLC </function>
+to determine the current locale.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xmbstowcs</function></funcdef>
+ <paramdef>wchar_t<parameter> *wstr</parameter></paramdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xmbstowcs</function>
+function converts the NULL-terminated string pointed to by "<emphasis remap='I'>str</emphasis>"
+to its wide character string representation pointed to by "<emphasis remap='I'>wstr</emphasis>".
+"<emphasis remap='I'>Len</emphasis>" is the number of characters in "<emphasis remap='I'>str</emphasis>" to be converted.
+</para>
+
+<para>
+The call
+<function>_Xmbstowcs</function>
+is equivalent to
+_Xlcmbstowcs((XLCd)NULL, <emphasis remap='I'>wstr</emphasis>, <emphasis remap='I'>str</emphasis>, <emphasis remap='I'>len</emphasis>)
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xlcmbstowcs</function></funcdef>
+ <paramdef>XLCd<parameter> lcd</parameter></paramdef>
+ <paramdef>wchar_t<parameter> *wstr</parameter></paramdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xlcmbstowcs </function>
+function is identical to _Xmbstowcs, except that it requires the
+"<emphasis remap='I'>lcd</emphasis>" argument. If "<emphasis remap='I'>lcd</emphasis>" is (XLCd) NULL,
+<function>_Xlcmbstowcs, </function>
+calls
+<function>_XlcCurrentLC</function>
+to determine the current locale.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xwcstombs</function></funcdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>wchar_t<parameter> *wstr</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xwcstombs </function>
+function converts the (wchar_t) NULL terminated wide character string
+pointed to by "<emphasis remap='I'>wstr</emphasis>" to the NULL terminated multibyte string
+pointed to by "<emphasis remap='I'>str</emphasis>".
+</para>
+
+<para>
+The call
+<function>_Xwcstombs </function>
+is equivalent to
+_Xlcwcstombs((XLCd)NULL, <emphasis remap='I'>str</emphasis>, <emphasis remap='I'>wstr</emphasis>, <emphasis remap='I'>len</emphasis>)
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xlcwcstombs</function></funcdef>
+ <paramdef>XLCd<parameter> lcd</parameter></paramdef>
+ <paramdef>char<parameter> *str</parameter></paramdef>
+ <paramdef>wchar_t<parameter> *wstr</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xlcwcstombs </function>
+function is identical to _Xwcstombs, except that it requires the
+"<emphasis remap='I'>lcd</emphasis>" argument. If "<emphasis remap='I'>lcd</emphasis>" is (XLCd) NULL,
+<function>_Xlcwcstombs, </function>
+calls
+<function>_XlcCurrentLC </function>
+to determine the current locale.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xwcslen</function></funcdef>
+ <paramdef>wchar_t<parameter> *wstr</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xwcslen </function>
+function returns the count of wide characters in the (wchar_t) NULL
+terminated wide character string pointed to by "<emphasis remap='I'>wstr</emphasis>".
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>wchar_t *<function> _Xwcscpy</function></funcdef>
+ <paramdef>wchar_t<parameter> *wstr1</parameter></paramdef>
+ <paramdef>wchar_t<parameter> *wstr2</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>wchar_t * <function> _Xwcsncpy</function></funcdef>
+ <paramdef>wchar_t<parameter> *wstr1</parameter></paramdef>
+ <paramdef>wchar_t<parameter> *wstr2</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xwcscpy </function>
+function copies the (wchar_t) NULL terminated wide character string
+pointed to by "<emphasis remap='I'>wstr2</emphasis>" to the object pointed at by "<emphasis remap='I'>wstr1</emphasis>".
+"<emphasis remap='I'>Wstr1</emphasis>" is (wchar_t) NULL terminated. The return value is a
+pointer to "<emphasis remap='I'>wstr1</emphasis>".
+</para>
+
+<para>
+The
+<function>_Xwcsncpy</function>
+function is identical to
+<function>_Xwcscpy, </function>
+except that it copies "<emphasis remap='I'>len</emphasis>" wide characters from the object
+pointed to by "<emphasis remap='I'>wstr2</emphasis>" to the object pointed to "<emphasis remap='I'>wstr1</emphasis>".
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xwcscmp</function></funcdef>
+ <paramdef>wchar_t*wstr1,<parameter> *wstr2</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>int <function> _Xwcsncmp</function></funcdef>
+ <paramdef>wchar_t*wstr1,<parameter> *wstr2</parameter></paramdef>
+ <paramdef>int<parameter> len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+The
+<function>_Xwcscmp </function>
+function compares two (wchar_t) NULL terminated wide character strings.
+The value returned is an integer less than, equal to, or greater than zero,
+depending on whether "<emphasis remap='I'>wstr1</emphasis>" is lexicographicly less then, equal to,
+or greater than "<emphasis remap='I'>str2</emphasis>".
+</para>
+
+<para>
+The
+<function>_Xwcsncmp </function>
+function is identical to
+<function>_XlcCompareISOLatin1, </function>
+except that at most "<emphasis remap='I'>len</emphasis>" wide characters are compared.
+</para>
+
+
+<!-- .sp -->
+<!-- .\" .LP -->
+<!-- .\" <function>Locale Method Internal Functions</function> -->
+<!-- .\" .LP -->
+<!-- .\" .FD 0 -->
+<!-- .\" XlcCharSet _XlcCreateDefaultCharSet(<emphasis remap='I'>name</emphasis>, <emphasis remap='I'>ct_sequence</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*name</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*ct_sequence</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .FD 0 -->
+<!-- .\" Bool _XlcParseCharSet(<emphasis remap='I'>charset</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" XlcCharSet <emphasis remap='I'>charset</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .FD 0 -->
+<!-- .\" void _XlcGetLocaleDataBase(<emphasis remap='I'>lcd</emphasis>, <emphasis remap='I'>category</emphasis>, <emphasis remap='I'>name</emphasis>, <emphasis remap='I'>value</emphasis>, <emphasis remap='I'>count</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" XLCd <emphasis remap='I'>lcd</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*category</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*name</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>***value</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" int <emphasis remap='I'>*count</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .FD 0 -->
+<!-- .\" void _XlcDestroyLocaleDataBase(<emphasis remap='I'>lcd</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" XLCd <emphasis remap='I'>lcd</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .FD 0 -->
+<!-- .\" XPointer _XlcCreateLocaleDataBase(<emphasis remap='I'>lcd</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" XLCd <emphasis remap='I'>lcd</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .LP -->
+<!-- .\" .sp -->
+<!-- .\" <function>Obtain an locale database path</function> -->
+<!-- .\" .LP -->
+<!-- .\" .FD 0 -->
+<!-- .\" int _XlcResolveI18NPath(<emphasis remap='I'>dir</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*dir</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .LP -->
+<!-- .\" The -->
+<!-- .\" .PN _XlcResolveI18NPath -->
+<!-- .\" function returns path name list that is related to X Locale Database. -->
+<!-- .\" The obtained path is stored into the array which is pointed by -->
+<!-- .\" specified "<emphasis remap='I'>dir</emphasis>". The path consists of directory paths which -->
+<!-- .\" are separated with colon. -->
+<!-- .\" If the environment variable XLOCALEDIR is specified, the path -->
+<!-- .\" contains its contents. -->
+<!-- .\" .LP -->
+<!-- .\" The default path of X Locale Database is implementation dependent. -->
+<!-- .\" In current implementation, it's determined in build time. -->
+<!-- .\" .LP -->
+<!-- .\" .PN _XlcResolveI18NPath -->
+<!-- .\" does not check overflow of the array to which the "<emphasis remap='I'>dir</emphasis>" -->
+<!-- .\" parameter points. Caller should provide enough buffer to store this -->
+<!-- .\" string. -->
+<!-- .\" .LP -->
+<!-- .\" .sp -->
+<!-- .\" <function>Obtain a full locale name</function> -->
+<!-- .\" .LP -->
+<!-- .\" .FD 0 -->
+<!-- .\" int _XlcResolveLocaleName(<emphasis remap='I'>lc_name</emphasis>, <emphasis remap='I'>full_name</emphasis>, <emphasis remap='I'>language</emphasis>, <emphasis remap='I'>territory</emphasis>, <emphasis remap='I'>codeset</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*lc_name</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*full_name</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*language</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*territory</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*codeset</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .LP -->
+<!-- .\" The -->
+<!-- .\" .PN _XlcResolveLocaleName -->
+<!-- .\" function returns a full locale name. -->
+<!-- .\" The obtained full locale name is stored into the array which is -->
+<!-- .\" pointed by specified "<emphasis remap='I'>full_name</emphasis>". -->
+<!-- .\" The language, territory and codeset part of the full locale name -->
+<!-- .\" are copied to the return arguments, "<emphasis remap='I'>language</emphasis>", -->
+<!-- .\" "<emphasis remap='I'>territory</emphasis>" and "<emphasis remap='I'>codeset</emphasis>", respectively. -->
+<!-- .\" NULL can be specified for these arguments. -->
+<!-- .\" .LP -->
+<!-- .\" The rule for mapping from locale name to full locale name is -->
+<!-- .\" implementation dependent. -->
+<!-- .\" .LP -->
+<!-- .\" .PN _XlcResolveLocaleName -->
+<!-- .\" does not check overflow of the array to which -->
+<!-- .\" "<emphasis remap='I'>full_name</emphasis>", "<emphasis remap='I'>language</emphasis>", "<emphasis remap='I'>territory</emphasis>" and -->
+<!-- .\" "<emphasis remap='I'>codeset</emphasis>" parameter point. -->
+<!-- .\" Caller should provide enough buffer to store those string. -->
+<!-- .\" .LP -->
+<!-- .\" In current implementation, -->
+<!-- .\" .PN _XlcResolveLocaleName -->
+<!-- .\" uses locale.alias file as mapping table, which has pairs of strings, -->
+<!-- .\" a locale name and a full locale name. -->
+<!-- .\" .LP -->
+<!-- .\" .FD 0 -->
+<!-- .\" int _XlcResolveDBName(<emphasis remap='I'>lc_name</emphasis>, <emphasis remap='I'>file_name</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*lc_name</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*file_name</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .FD 0 -->
+<!-- .\" XLCd _XlcCreateLC(<emphasis remap='I'>name</emphasis>, <emphasis remap='I'>methods</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" char <emphasis remap='I'>*name</emphasis>; -->
+<!-- .\" .br -->
+<!-- .\" XLCdMethods <emphasis remap='I'>methods</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .FD 0 -->
+<!-- .\" void _XlcDestroyLC(<emphasis remap='I'>lcd</emphasis>) -->
+<!-- .\" .br -->
+<!-- .\" XLCd <emphasis remap='I'>lcd</emphasis>; -->
+<!-- .\" .FN -->
+<!-- .\" .LP -->
+<!-- .\" -->
+
+</sect1>
+</chapter>
+</book>
diff --git a/libX11/specs/i18n/localedb/Makefile.am b/libX11/specs/i18n/localedb/Makefile.am new file mode 100644 index 000000000..99b5086da --- /dev/null +++ b/libX11/specs/i18n/localedb/Makefile.am @@ -0,0 +1,32 @@ +#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# 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.
+#
+
+if ENABLE_SPECS
+
+specdir = $(docdir)/$(subdir)
+doc_sources = localedb.xml
+dist_spec_DATA = $(doc_sources)
+
+include $(top_srcdir)/specs/xmlrules.in
+
+endif ENABLE_SPECS
diff --git a/libX11/specs/i18n/localedb/localedb.xml b/libX11/specs/i18n/localedb/localedb.xml new file mode 100644 index 000000000..e5b96ab84 --- /dev/null +++ b/libX11/specs/i18n/localedb/localedb.xml @@ -0,0 +1,777 @@ +<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+
+<book id="localedbspec">
+
+<bookinfo>
+ <title>X Locale Database Specification</title>
+ <authorgroup>
+ <author>
+ <firstname>Yoshio</firstname><surname>Horiuchi</surname>
+ <affiliation><orgname>IBM Japan</orgname></affiliation>
+ </author>
+ </authorgroup>
+ <copyright><year>1994</year><holder>IBM Corporation</holder></copyright>
+ <copyright><year>1994</year><holder>X Consortium</holder></copyright>
+
+
+<legalnotice>
+
+<para>
+License to use, copy, modify, and distribute this software and its documentation for
+any purpose and without fee is hereby granted, provided that the above copyright notice
+appear in all copies and that both that copyright notice and this permission notice
+appear in supporting documentation, and that the name of IBM not be used in advertising
+or publicity pertaining to distribution of the software without specific, written
+prior permission.
+</para>
+<para>
+IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
+WARRANTIES OF MERCHANTABILITY, FITNESS, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS,
+IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
+OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+</para>
+
+<para>
+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:
+</para>
+
+<para>
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+</para>
+
+<para>
+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 X CONSORTIUM 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.
+</para>
+
+<para>
+Except as contained in this notice, the name of The Open Group shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from X Consortium.
+</para>
+
+<para>X Window System is a trademark of The Open Group.</para>
+
+</legalnotice>
+</bookinfo>
+
+<chapter id="localedb">
+<title>LocaleDB</title>
+
+<sect1 id="General">
+<title>General</title>
+<para>
+An X Locale Database contains the subset of a user's environment that
+depends on language, in X Window System. It is made up from one or more
+categories. Each category consists of some classes and sub-classes.
+</para>
+
+<para>
+It is provided as a plain ASCII text file, so a user can change its
+contents easily. It allows a user to customize the behavior of
+internationalized portion of Xlib without changing Xlib itself.
+</para>
+
+<para>
+This document describes;
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+Database Format Definition
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+Contents of Database in sample implementation
+<!-- .RE -->
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+Since it is hard to define the set of required information for all
+platforms, only the flexible database format is defined.
+The available entries in database are implementation dependent.
+</para>
+
+</sect1>
+<sect1 id="Database_Format_Definition">
+<title>Database Format Definition</title>
+<para>
+The X Locale Database contains one or more category definitions.
+This section describes the format of each category definition.
+</para>
+
+<para>
+The category definition consists of one or more class definitions.
+Each class definition has a pair of class name and class value, or
+has several subclasses which are enclosed by the left brace ({) and
+the right brace (}).
+</para>
+
+<para>
+Comments can be placed by using the number sign character (#).
+Putting the number sign character on the top of the line indicates
+that the entire line is comment. Also, putting any whitespace character
+followed by the number sign character indicates that a part of the line
+(from the number sign to the end of the line) is comment.
+A line can be continued by placing backslash (\) character as the
+last character on the line; this continuation character will be
+discarded from the input. Comment lines cannot be continued on
+a subsequent line using an escaped new line character.
+</para>
+
+<para>
+X Locale Database only accepts XPCS, the X Portable Character Set.
+The reserved symbols are; the quotation mark("), the number sign (#),
+the semicolon(;), the backslash(\), the left brace({) and
+the right brace(}).
+</para>
+
+<para>
+The format of category definition is;
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colwidth="3*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="6*" colsep="0"/>
+ <tbody>
+ <row rowsep="0">
+ <entry>CategoryDefinition</entry>
+ <entry>::=</entry>
+ <entry>CategoryHeader CategorySpec CategoryTrailer</entry>
+ </row>
+ <row rowsep="0">
+ <entry>CategoryHeader</entry>
+ <entry>::=</entry>
+ <entry>CategoryName NL</entry>
+ </row>
+ <row rowsep="0">
+ <entry>CategorySpec</entry>
+ <entry>::=</entry>
+ <entry>{ ClassSpec }</entry>
+ </row>
+ <row rowsep="0">
+ <entry>CategoryTrailer</entry>
+ <entry>::=</entry>
+ <entry>"END" Delimiter CategoryName NL</entry>
+ </row>
+ <row rowsep="0">
+ <entry>CategoryName</entry>
+ <entry>::=</entry>
+ <entry>String</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ClassSpec</entry>
+ <entry>::=</entry>
+ <entry>ClassName Delimiter ClassValue NL</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ClassName</entry>
+ <entry>::=</entry>
+ <entry>String</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ClassValue</entry>
+ <entry>::=</entry>
+ <entry>ValueList | "{" NL { ClassSpec } "}"</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ValueList</entry>
+ <entry>::=</entry>
+ <entry>Value | Value ";" ValueList</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Value</entry>
+ <entry>::=</entry>
+ <entry>ValuePiece | ValuePiece Value</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ValuePiece</entry>
+ <entry>::=</entry>
+ <entry>String | QuotedString | NumericString</entry>
+ </row>
+ <row rowsep="0">
+ <entry>String</entry>
+ <entry>::=</entry>
+ <entry>Char { Char }</entry>
+ </row>
+ <row rowsep="0">
+ <entry>QuotedString</entry>
+ <entry>::=</entry>
+ <entry>""" QuotedChar { QuotedChar } """</entry>
+ </row>
+ <row rowsep="0">
+ <entry>NumericString</entry>
+ <entry>::=</entry>
+ <entry>"\\o" OctDigit { OctDigit }</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>|</entry>
+ <entry>"\\d" DecDigit { DecDigit }</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>|</entry>
+ <entry>"\\x" HexDigit { HexDigit }</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Char</entry>
+ <entry>::=</entry>
+ <entry><XPCS except NL, Space or unescaped reserved symbols></entry>
+ </row>
+ <row rowsep="0">
+ <entry>QuotedChar</entry>
+ <entry>::=</entry>
+ <entry><XPCS except unescaped """></entry>
+ </row>
+ <row rowsep="0">
+ <entry>OctDigit</entry>
+ <entry>::=</entry>
+ <entry><character in the range of "0" - "7"></entry>
+ </row>
+ <row rowsep="0">
+ <entry>DecDigit</entry>
+ <entry>::=</entry>
+ <entry><character in the range of "0" - "9"></entry>
+ </row>
+ <row rowsep="0">
+ <entry>HexDigit</entry>
+ <entry>::=</entry>
+ <entry><character in the range of "0" - "9", "a" - "f", "A" - "F"></entry>
+ </row>
+ <row rowsep="0">
+ <entry>Delimiter</entry>
+ <entry>::=</entry>
+ <entry>Space { Space }</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Space</entry>
+ <entry>::=</entry>
+ <entry><space> | <horizontal tab></entry>
+ </row>
+ <row rowsep="0">
+ <entry>NL</entry>
+ <entry>::=</entry>
+ <entry><newline></entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+Elements separated by vertical bar (|) are alternatives. Curly
+braces ({...}) indicate zero or more repetitions of the enclosed
+elements. Square brackets ([...]) indicate that the enclosed element
+is optional. Quotes ("...") are used around literal characters.
+</para>
+
+<para>
+The backslash, which is not the top character of the NumericString, is
+recognized as an escape character, so that the next one character is
+treated as a literal character. For example, the two-character
+sequence, ""\"""(the backslash followed by the quotation mark) is
+recognized and replaced with a quotation mark character.
+Any whitespace character, that is not the Delimiter, unquoted and
+unescaped, is ignored.
+</para>
+
+</sect1>
+<sect1 id="Contents_of_Database_">
+<title>Contents of Database </title>
+<para>
+The available categories and classes depend on implementation, because
+different platform will require different information set.
+For example, some platform have system locale but some platform don't.
+Furthermore, there might be a difference in functionality even if the
+platform has system locale.
+</para>
+
+<para>
+In current sample implementation, categories listed below are available.
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colwidth="2*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <tbody>
+ <row rowsep="0">
+ <entry>XLC_FONTSET:XFontSet relative information</entry>
+ </row>
+ <row rowsep="0">
+ <entry>XLC_XLOCALE:Character classification and conversion information</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+</sect1>
+<sect1 id="XLC_FONTSET_Category">
+<title>XLC_FONTSET Category</title>
+<para>
+The XLC_FONTSET category defines the XFontSet relative information.
+It contains the CHARSET_REGISTRY-CHARSET_ENCODING name and character
+mapping side (GL, GR, etc), and is used in Output Method (OM).
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <thead>
+ <colspec colname='c1' colwidth="3*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="3*" colsep="0"/>
+ <row>
+ <entry>class</entry>
+ <entry>super class</entry>
+ <entry>description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>fsN</entry>
+ <entry></entry>
+ <entry>Nth fontset (N=0,1,2, ...)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>charset</entry>
+ <entry>fsN</entry>
+ <entry>list of encoding name</entry>
+ </row>
+ <row rowsep="0">
+ <entry>font</entry>
+ <entry>fsN</entry>
+ <entry>list of font encoding name</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<variablelist>
+ <varlistentry>
+ <term>fsN</term>
+ <listitem>
+ <para>
+Includes an encoding information for Nth charset, where N is
+the index number (0,1,2,...). If there are 4 charsets available
+in current locale, 4 fontsets, fs0, fs1, fs2 and fs3, should be
+defined.
+This class has two subclasses, 'charset' and 'font'.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>charset</term>
+ <listitem>
+ <para>
+Specifies an encoding information to be used internally in Xlib
+for this fontset. The format of value is;
+ </para>
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colwidth="3*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="4*" colsep="0"/>
+ <tbody>
+ <row rowsep="0">
+ <entry>EncodingInfo</entry>
+ <entry>::=</entry>
+ <entry>EncodingName [ ":" EncodingSide ]</entry>
+ </row>
+ <row rowsep="0">
+ <entry>EncodingName</entry>
+ <entry>::=</entry>
+ <entry>CHARSET_REGISTRY-CHARSET_ENCODING</entry>
+ </row>
+ <row rowsep="0">
+ <entry>EncodingSide</entry>
+ <entry>::=</entry>
+ <entry>"GL" | "GR"</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+For detail definition of CHARSET_REGISTRY-CHARSET_ENCODING, refer
+"X Logical Font Descriptions" document.
+</para>
+<literallayout>
+example:
+ ISO8859-1:GL
+</literallayout>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>font</term>
+ <listitem>
+ <para>
+Specifies a list of encoding information which is used for searching
+appropriate font for this fontset. The left most entry has highest
+priority.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</sect1>
+<sect1 id="XLC_XLOCALE_Category">
+<title>XLC_XLOCALE Category</title>
+<para>
+The XLC_XLOCALE category defines character classification, conversion
+and other character attributes.
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colwidth="3*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="3*" colsep="0"/>
+ <thead>
+ <row>
+ <entry>class</entry>
+ <entry>super class</entry>
+ <entry>description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>encoding_name</entry>
+ <entry></entry>
+ <entry>codeset name</entry>
+ </row>
+ <row rowsep="0">
+ <entry>mb_cur_max</entry>
+ <entry></entry>
+ <entry>MB_CUR_MAX</entry>
+ </row>
+ <row rowsep="0">
+ <entry>state_depend_encoding</entry>
+ <entry></entry>
+ <entry>state dependent or not</entry>
+ </row>
+ <row rowsep="0">
+ <entry>wc_encoding_mask</entry>
+ <entry></entry>
+ <entry>for parsing wc string</entry>
+ </row>
+ <row rowsep="0">
+ <entry>wc_shift_bits</entry>
+ <entry></entry>
+ <entry>for conversion between wc and mb</entry>
+ </row>
+ <row rowsep="0">
+ <entry>csN</entry>
+ <entry></entry>
+ <entry>Nth charset (N=0,1,2,...)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>side</entry>
+ <entry>csN</entry>
+ <entry>mapping side (GL, etc)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>length</entry>
+ <entry>csN</entry>
+ <entry>length of a character</entry>
+ </row>
+ <row rowsep="0">
+ <entry>mb_encoding</entry>
+ <entry>csN</entry>
+ <entry>for parsing mb string</entry>
+ </row>
+ <row rowsep="0">
+ <entry>wc_encoding</entry>
+ <entry>csN</entry>
+ <entry>for parsing wc string</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ct_encoding</entry>
+ <entry>csN</entry>
+ <entry>list of encoding name for ct</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<variablelist>
+ <varlistentry>
+ <term>encoding_name</term>
+ <listitem>
+ <para>
+Specifies a codeset name of current locale.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>mb_cur_max</term>
+ <listitem>
+ <para>
+Specifies a maximum allowable number of bytes in a multi-byte character.
+It is corresponding to MB_CUR_MAX of "ISO/IEC 9899:1990 C Language Standard".
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>state_depend_encoding</term>
+ <listitem>
+ <para>
+Indicates a current locale is state dependent. The value should be
+specified "True" or "False".
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>wc_encoding_mask</term>
+ <listitem>
+ <para>
+Specifies a bit-mask for parsing wide-char string. Each wide character is
+applied bit-and operation with this bit-mask, then is classified into
+the unique charset, by using 'wc_encoding'.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>wc_shift_bits</term>
+ <listitem>
+ <para>
+Specifies a number of bit to be shifted for converting from a multi-byte
+character to a wide character, and vice-versa.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>csN</term>
+ <listitem>
+ <para>
+<!-- .br -->
+Includes a character set information for Nth charset, where N is the
+index number (0,1,2,...). If there are 4 charsets available in current
+locale, cs0, cs1, cs2 and cs3 should be defined. This class has five
+subclasses, 'side', 'length', 'mb_encoding' 'wc_encoding' and 'ct_encoding'.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>side</term>
+ <listitem>
+ <para>
+Specifies a mapping side of this charset. The format of this value is;
+ </para>
+ <literallayout>
+ Side ::= EncodingSide[":Default"]
+ </literallayout>
+ <para>
+The suffix ":Default" can be specified. It indicates that a character
+belongs to the specified side is mapped to this charset in initial state.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>length</term>
+ <listitem>
+ <para>
+<!-- .br -->
+Specifies a number of bytes of a multi-byte character of this charset.
+It should not contain the length of any single-shift sequence.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>mb_encoding</term>
+ <listitem>
+ <para>
+Specifies a list of shift sequence for parsing multi-byte string.
+The format of this value is;
+ </para>
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colwidth="3*" colsep="0"/>
+ <colspec colname='c2' colwidth="1*" colsep="0"/>
+ <colspec colname='c3' colwidth="5*" colsep="0"/>
+ <tbody>
+ <row rowsep="0">
+ <entry>MBEncoding</entry>
+ <entry>::=</entry>
+ <entry>ShiftType ShiftSequence</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry>|</entry>
+ <entry>ShiftType ShiftSequence ";" MBEncoding</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ShiftType</entry>
+ <entry>::=</entry>
+ <entry>"<SS>"|"<LSL>"|"<LSR>"</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ShiftSequence</entry>
+ <entry>::=</entry>
+ <entry>SequenceValue|SequenceValue ShiftSequence</entry>
+ </row>
+ <row rowsep="0">
+ <entry>SequenceValue</entry>
+ <entry>::=</entry>
+ <entry>NumericString</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+ <literallayout>
+example:
+ <LSL> \x1b \x28 \x4a; <LSL> \x1b \x28 \x42
+ </literallayout>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>wc_encoding</term>
+ <listitem>
+ <para>
+Specifies an integer value for parsing wide-char string.
+It is used to determine the charset for each wide character, after
+applying bit-and operation using 'wc_encoding_mask'.
+This value should be unique in all csN classes.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>ct_encoding</term>
+ <listitem>
+ <para>
+Specifies a list of encoding information that can be used for Compound
+Text.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+</sect1>
+
+<sect1 id="Sample_of_X_Locale_Database">
+<title>Sample of X Locale Database</title>
+<para>
+The following is sample X Locale Database file.
+</para>
+
+<literallayout class="monospaced">
+# XLocale Database Sample for ja_JP.euc
+#
+
+#
+# XLC_FONTSET category
+#
+XLC_FONTSET
+# fs0 class (7 bit ASCII)
+fs0 {
+ charset ISO8859-1:GL
+ font ISO8859-1:GL; JISX0201.1976-0:GL
+}
+# fs1 class (Kanji)
+fs1 {
+ charset JISX0208.1983-0:GL
+ font JISX0208.1983-0:GL
+}
+# fs2 class (Half Kana)
+fs2 {
+ charset JISX0201.1976-0:GR
+ font JISX0201.1976-0:GR
+}
+# fs3 class (User Defined Character)
+# fs3 {
+# charset JISX0212.1990-0:GL
+# font JISX0212.1990-0:GL
+# }
+END XLC_FONTSET
+
+#
+# XLC_XLOCALE category
+#
+XLC_XLOCALE
+
+encoding_name ja.euc
+mb_cur_max 3
+state_depend_encoding False
+
+wc_encoding_mask \x00008080
+wc_shift_bits 8
+
+# cs0 class
+cs0 {
+ side GL:Default
+ length 1
+ wc_encoding \x00000000
+ ct_encoding ISO8859-1:GL; JISX0201.1976-0:GL
+}
+# cs1 class
+cs1 {
+ side GR:Default
+ length 2
+
+ wc_encoding \x00008080
+
+ ct_encoding JISX0208.1983-0:GL; JISX0208.1983-0:GR;\
+ JISX0208.1983-1:GL; JISX0208.1983-1:GR
+}
+
+# cs2 class
+cs2 {
+ side GR
+ length 1
+ mb_encoding <SS> \x8e
+
+ wc_encoding \x00000080
+
+ ct_encoding JISX0201.1976-0:GR
+}
+
+# cs3 class
+# cs3 {
+# side GL
+# length 2
+# mb_encoding <SS> \x8f
+# #if HasWChar32
+# wc_encoding \x20000000
+# #else
+# wc_encoding \x00008000
+# #endif
+# ct_encoding JISX0212.1990-0:GL; JISX0212.1990-0:GR
+# }
+
+END XLC_XLOCALE
+</literallayout>
+</sect1>
+
+<sect1 id="Reference">
+<title>Reference</title>
+<para>
+[1] <emphasis remap='I'>ISO/IEC 9899:1990 C Language Standard</emphasis>
+</para>
+<para>
+[2] <emphasis remap='I'>X Logical Font Descriptions</emphasis>
+</para>
+
+</sect1>
+</chapter>
+</book>
diff --git a/libX11/specs/i18n/trans/Makefile.am b/libX11/specs/i18n/trans/Makefile.am new file mode 100644 index 000000000..dfdf34f05 --- /dev/null +++ b/libX11/specs/i18n/trans/Makefile.am @@ -0,0 +1,32 @@ +#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# 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.
+#
+
+if ENABLE_SPECS
+
+specdir = $(docdir)/$(subdir)
+doc_sources = trans.xml
+dist_spec_DATA = $(doc_sources)
+
+include $(top_srcdir)/specs/xmlrules.in
+
+endif ENABLE_SPECS
diff --git a/libX11/specs/i18n/trans/trans.xml b/libX11/specs/i18n/trans/trans.xml new file mode 100644 index 000000000..9a01d97f6 --- /dev/null +++ b/libX11/specs/i18n/trans/trans.xml @@ -0,0 +1,1979 @@ +<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+
+<book id="xtransportspec">
+
+<bookinfo>
+ <title>The XIM Transport Specification</title>
+ <subtitle>Revision 0.1</subtitle>
+ <releaseinfo>X Version 11, Release 7</releaseinfo>
+ <authorgroup>
+ <author>
+ <firstname>Takashi</firstname><surname>Fujiwara</surname>
+ <affiliation><orgname>FUJITSU LIMITED</orgname></affiliation>
+ </author>
+ </authorgroup>
+ <copyright><year>1994</year><holder>FUJITSU LIMITED</holder></copyright>
+ <copyright><year>1994</year><holder>X Consortium</holder></copyright>
+
+ <productnumber>Revision 0.1</productnumber>
+
+
+<abstract>
+<para>
+This specification describes the transport layer interfaces between Xlib and IM Server,
+which makes various channels usable such as X protocol or TCP/IP, DECnet and etc.
+</para>
+</abstract>
+
+<legalnotice>
+
+<para>
+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:
+</para>
+
+<para>
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+</para>
+
+<para>
+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 X CONSORTIUM 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.
+</para>
+
+<para>
+Except as contained in this notice, the name of The Open Group shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from X Consortium.
+</para>
+
+<para>X Window System is a trademark of The Open Group.</para>
+
+</legalnotice>
+</bookinfo>
+
+<chapter id="xim_transport_specification">
+<title>X Transport Specification</title>
+
+<sect1 id="Introduction">
+<title>Introduction</title>
+<!-- .XS -->
+<!-- (SN Introduction -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+The Xlib XIM implementation is layered into three functions, a protocol
+layer, an interface layer and a transport layer. The purpose of this
+layering is to make the protocol independent of transport implementation.
+Each function of these layers are:
+<!-- .RS 3 -->
+</para>
+<variablelist>
+ <varlistentry>
+ <term><emphasis>The protocol layer</emphasis></term>
+ <listitem>
+ <para>
+implements overall function of XIM and calls the interface layer
+functions when it needs to communicate to IM Server.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>The interface layer</emphasis></term>
+ <listitem>
+ <para>
+separates the implementation of the transport layer from the protocol
+layer, in other words, it provides implementation independent hook for
+the transport layer functions.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><emphasis>The transport layer</emphasis></term>
+ <listitem>
+ <para>
+handles actual data communication with IM Server. It is done by a set
+of several functions named transporters.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+This specification describes the interface layer and the transport
+layer, which makes various communication channels usable such as
+X protocol or, TCP/IP, DECnet, STREAM, etc., and provides
+the information needed for adding another new transport layer.
+In addition, sample implementations for the transporter using the
+X connection is described in section 4. <!-- xref -->
+</para>
+</sect1>
+
+<sect1 id="Initialization">
+<title>Initialization</title>
+
+<sect2 id="Registering_structure_to_initialize">
+<title>Registering structure to initialize</title>
+
+<para>
+The structure typed as TransportSW contains the list of the transport
+layer the specific implementations supports.
+</para>
+
+<literallayout class="monospaced">
+typedef struct {
+ char *transport_name;
+ Bool (*config);
+} TransportSW;
+</literallayout>
+
+<informaltable frame="none">
+ <tgroup cols="2">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="0"/>
+ <tbody>
+ <row rowsep="0">
+ <entry><emphasis>transport_name</emphasis></entry>
+ <entry>name of transport<footnote><para>Refer to "The Input Method Protocol: Appendix B</para></footnote></entry>
+ </row>
+ <row rowsep="0">
+ <entry><emphasis>config</emphasis></entry>
+ <entry>initial configuration function</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+A sample entry for the Xlib supporting transporters is shown below:
+</para>
+
+<literallayout class="monospaced">
+TransportSW _XimTransportRec[] = {
+/* char <emphasis remap='I'>*</emphasis>:
+ * transport_name, Bool <emphasis remap='I'>(*config)()</emphasis>
+ */
+ "X", _XimXConf,
+ "tcp", _XimTransConf,
+ "local", _XimTransConf,
+ "decnet", _XimTransConf,
+ "streams", _XimTransConf,
+ (char *)NULL, (Bool (*)())NULL,
+};
+</literallayout>
+
+</sect2>
+<sect2 id="Initialization_function">
+<title>Initialization function</title>
+<!-- .XS -->
+<!-- (SN Initialization function -->
+<!-- .XE -->
+<para>
+The following function will be called once when Xlib configures the
+transporter functions.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function>(*config)</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>char<parameter> *transport_data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>transport_data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the data specific to the transporter, in IM Server address.<footnote><para>Refer to "The Input Method Protocol: Appendix B</para></footnote>
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+This function must setup the transporter function pointers.
+</para>
+
+<para>
+<!-- .LP -->
+The actual <emphasis remap='I'>config</emphasis> function will be chosen by IM Server at the
+pre-connection time, matching by the <emphasis remap='I'>transport_name</emphasis> specified
+in the <function>_XimTransportRec</function> array; The specific members of XimProto
+structure listed below must be initialized so that point they
+appropriate transporter functions.
+</para>
+
+<para>
+If the specified transporter has been configured successfully, this
+function returns True. There is no Alternative Entry for config
+function itself.
+</para>
+
+<para>
+The structure XimProto contains the following function pointers:
+</para>
+
+<literallayout class="monospaced">
+Bool (*connect)(); /* Open connection */
+Bool (*shutdown)(); /* Close connection */
+Bool (*write)(); /* Write data */
+Bool (*read)(); /* Read data */
+Bool (*flush)(); /* Flush data buffer */
+Bool (*register_dispatcher)(); /* Register asynchronous data handler */
+Bool (*call_dispatcher)(); /* Call dispatcher */
+</literallayout>
+
+<para>
+These functions are called when Xlib needs to communicate the
+IM Server. These functions must process the appropriate procedure
+described below.
+</para>
+
+</sect2>
+</sect1>
+<sect1 id="The_interface_transport_layer_functions">
+<title>The interface/transport layer functions</title>
+<para>
+Following functions are used for the transport interface.
+</para>
+
+<table frame="all" id="transport_layer_functions_2">
+ <title>The Transport Layer Functions</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="3*" colsep="1"/>
+ <colspec colname="col2" colwidth="3*" colsep="1"/>
+ <colspec colname="col3" colwidth="1*" colsep="1"/>
+ <thead>
+ <row>
+ <entry align="center">Alternate Entry (Interface Layer)</entry>
+ <entry align="center">XimProto member (Transport Layer)</entry>
+ <entry align="center">Section</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>_XimConnect</entry>
+ <entry>connect</entry>
+ <entry>3.1</entry>
+ </row>
+ <row>
+ <entry>_XimShutdown</entry>
+ <entry>shutdown</entry>
+ <entry>3.2</entry>
+ </row>
+ <row>
+ <entry>_XimWrite</entry>
+ <entry>write</entry>
+ <entry>3.3</entry>
+ </row>
+ <row>
+ <entry>_XimRead</entry>
+ <entry>read</entry>
+ <entry>3.4</entry>
+ </row>
+ <row>
+ <entry>_XimFlush</entry>
+ <entry>flush</entry>
+ <entry>3.5</entry>
+ </row>
+ <row>
+ <entry>_XimRegisterDispatcher</entry>
+ <entry>register_dispatcher</entry>
+ <entry>3.6</entry>
+ </row>
+ <row>
+ <entry>_XimCallDispatcher</entry>
+ <entry>call_dispatcher</entry>
+ <entry>3.7</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+The Protocol layer calls the above functions using the Alternative
+Entry in the left column. The transport implementation defines
+XimProto member function in the right column. The Alternative Entry is
+provided so as to make easier to implement the Protocol Layer.
+</para>
+
+<sect2 id="Opening_connection">
+<title>Opening connection</title>
+<para>
+<!-- .LP -->
+When <function>XOpenIM</function> is called, the following function is called to connect
+with the IM Server.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function>(*connect)</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+This function must establishes the connection to the IM Server. If the
+connection is established successfully, this function returns True.
+The Alternative Entry for this function is:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XimConnect</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+</sect2>
+
+<sect2 id="Closing_connection">
+<title>Closing connection</title>
+<!-- .XS -->
+<!-- (SN Closing connection -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+When <function>XCloseIM</function> is called, the following function is called to
+disconnect the connection with the IM Server. The Alternative Entry
+for this function is:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> (*shutdown)</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+<!-- .LP -->
+This function must close connection with the IM Server. If the
+connection is closed successfully, this function returns True. The
+Alternative Entry for this function is:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function>_XimShutdown</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</sect2>
+
+<sect2 id="Writing_data">
+<title>Writing data</title>
+<para>
+The following function is called, when Xlib needs to write data to the
+IM Server.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XimWrite</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>INT16<parameter> len</parameter></paramdef>
+ <paramdef>XPointer<parameter> data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the length of writing data.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the writing data.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+This function writes the <emphasis remap='I'>data</emphasis> to the IM Server, regardless
+of the contents. The number of bytes is passed to <emphasis remap='I'>len</emphasis>. The
+writing data is passed to <emphasis remap='I'>data</emphasis>. If data is sent successfully,
+the function returns True. Refer to "The Input Method Protocol" for
+the contents of the writing data. The Alternative Entry for this
+function is:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function>_XimWrite</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>INT16<parameter> len</parameter></paramdef>
+ <paramdef>XPointer<parameter> data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the length of writing data.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the writing data.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</sect2>
+<sect2 id="Reading_data">
+<title>Reading data</title>
+<para>
+The following function is called when Xlib waits for response from IM
+server synchronously.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XimRead</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>XPointer<parameter> read_buf</parameter></paramdef>
+ <paramdef>int<parameter> buf_len</parameter></paramdef>
+ <paramdef>int<parameter> *ret_len</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>read_buf</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the buffer to store data.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>buf_len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the size of the <emphasis remap='I'>buffer</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>ret_len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the length of stored data.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+This function stores the read data in <emphasis remap='I'>read_buf</emphasis>, which size is
+specified as <emphasis remap='I'>buf_len</emphasis>. The size of data is set to <emphasis remap='I'>ret_len</emphasis>.
+This function return True, if the data is read normally or reading
+data is completed.
+</para>
+<para>
+The Alternative Entry for this function is:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XimRead</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>INT16<parameter> *ret_len</parameter></paramdef>
+ <paramdef>XPointer<parameter> buf</parameter></paramdef>
+ <paramdef>int<parameter> buf_len</parameter></paramdef>
+ <paramdef>Bool<parameter> (*predicate)()</parameter></paramdef>
+ <paramdef>XPointer<parameter> predicate_arg</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>ret_len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the size of the <emphasis remap='I'>data</emphasis> buffer.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>buf</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the buffer to store data.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>buf_len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the length of <emphasis remap='I'>buffer</emphasis>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>predicate</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the predicate for the XIM data.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>predicate_arg</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the predicate specific data.
+<!-- .sp 6p -->
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The predicate procedure indicates whether the <emphasis remap='I'>data</emphasis> is for the
+XIM or not. <emphasis remap='I'>len</emphasis>
+This function stores the read data in <emphasis remap='I'>buf</emphasis>, which size
+is specified as <emphasis remap='I'>buf_len</emphasis>. The size of data is set to
+<emphasis remap='I'>ret_len</emphasis>. If <emphasis remap='I'>preedicate()</emphasis>
+returns True, this function returns True. If not, it calls the registered callback function.
+</para>
+
+<para>
+The procedure and its arguments are:
+</para>
+
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function>(*predicate)</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>INT16<parameter> len</parameter></paramdef>
+ <paramdef>XPointer<parameter> data</parameter></paramdef>
+ <paramdef>XPointer<parameter> predicate_arg</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the size of the <emphasis remap='I'>data</emphasis> buffer.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the buffer to store data.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>predicate_arg</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the predicate specific data.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</sect2>
+<sect2 id="Flushing_buffer">
+<title>Flushing buffer</title>
+<para>
+The following function is called when Xlib needs to flush the data.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function>(*flush)</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+This function must flush the data stored in internal buffer on the
+transport layer. If data transfer is completed, the function returns
+True. The Alternative Entry for this function is:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void <function> _XimFlush</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</sect2>
+<sect2 id="Registering_asynchronous_data_handler">
+<title>Registering asynchronous data handler</title>
+<para>
+Xlib needs to handle asynchronous response from IM Server. This is
+because some of the XIM data occur asynchronously to X events.
+</para>
+
+<para>
+Those data will be handled in the <emphasis remap='I'>Filter</emphasis>,
+and the <emphasis remap='I'>Filter</emphasis>
+will call asynchronous data handler in the protocol layer. Then it
+calls dispatchers in the transport layer. The dispatchers are
+implemented by the protocol layer. This function must store the
+information and prepare for later call of the dispatchers using
+<function>_XimCallDispatcher</function>.
+</para>
+
+<para>
+When multiple dispatchers are registered, they will be called
+sequentially in order of registration, on arrival of asynchronous
+data. The register_dispatcher is declared as following:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function>(*register_dispatcher)</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>Bool<parameter> (*dispatcher)()</parameter></paramdef>
+ <paramdef>XPointer<parameter> call_data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>dispatcher</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the dispatcher function to register.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>call_data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies a parameter for the <emphasis remap='I'>dispatcher</emphasis>.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The dispatcher is a function of the following type:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function>(*dispatcher)</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>INT16<parameter> len</parameter></paramdef>
+ <paramdef>XPointer<parameter> data</parameter></paramdef>
+ <paramdef>XPointer<parameter> call_data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the size of the <emphasis remap='I'>data</emphasis> buffer.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the buffer to store data.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>call_data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies a parameter passed to the register_dispatcher.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The dispatcher is provided by the protocol layer. They are called once
+for every asynchronous data, in order of registration. If the data is
+used, it must return True. otherwise, it must return False.
+</para>
+
+<para>
+If the dispatcher function returns True, the Transport Layer assume
+that the data has been processed by the upper layer. The Alternative
+Entry for this function is:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XimRegisterDispatcher</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>Bool<parameter> (*dispatcher)()</parameter></paramdef>
+ <paramdef>XPointer<parameter> call_data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>dispatcher</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the dispatcher function to register.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>call_data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies a parameter for the <emphasis remap='I'>dispatcher</emphasis>.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</sect2>
+<sect2 id="Calling_dispatcher">
+<title>Calling dispatcher</title>
+<para>
+The following function is used to call the registered dispatcher
+function, when the asynchronous response from IM Server has arrived.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function>(*call_dispatcher)</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>INT16<parameter> len</parameter></paramdef>
+ <paramdef>XPointer<parameter> data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>im</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies XIM structure address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>len</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the size of <emphasis remap='I'>data</emphasis> buffer.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <emphasis remap='I'>data</emphasis>
+ </term>
+ <listitem>
+ <para>
+Specifies the buffer to store data.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The call_dispatcher must call the dispatcher function, in order of
+their registration. <emphasis remap='I'>len</emphasis> and <emphasis remap='I'>data</emphasis> are the data passed to
+register_dispatcher.
+</para>
+
+<para>
+The return values are checked at each invocation, and if it finds
+True, it immediately return with true for its return value.
+</para>
+
+<para>
+It is depend on the upper layer whether the read data is XIM
+Protocol packet unit or not.
+The Alternative Entry for this function is:
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function> _XimCallDispatcher</function></funcdef>
+ <paramdef>XIM<parameter> im</parameter></paramdef>
+ <paramdef>INT16<parameter> len</parameter></paramdef>
+ <paramdef>XPointer<parameter> call_data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+</sect2>
+</sect1>
+<sect1 id="Sample_implementations_for_the_Transport_Layer">
+<title>Sample implementations for the Transport Layer</title>
+<para>
+Sample implementations for the transporter using the X connection is
+described here.
+</para>
+
+<sect2 id="X_Transport">
+<title>X Transport</title>
+<para>
+At the beginning of the X Transport connection for the XIM transport
+mechanism, two different windows must be created either in an Xlib XIM
+or in an IM Server, with which the Xlib and the IM Server exchange the
+XIM transports by using the ClientMessage events and Window Properties.
+In the following, the window created by the Xlib is referred as the
+"client communication window", and on the other hand, the window created
+by the IM Server is referred as the "IMS communication window".
+</para>
+
+<sect3 id="Connection">
+<title>Connection</title>
+<para>
+In order to establish a connection, a communication window is created.
+A ClientMessage in the following event's format is sent to the owner
+window of XIM_SERVER selection, which the IM Server has created.
+</para>
+
+<para>
+<!-- .LP -->
+Refer to "The Input Method Protocol" for the XIM_SERVER atom.
+</para>
+
+<table frame="none" id="transport_layer_functions">
+ <title>The ClientMessage sent to the IMS window.</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Member</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS Window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_CONNECT", false)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>32</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[0]</entry>
+ <entry>client communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[1]</entry>
+ <entry>client-major-transport-version(*1)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[2]</entry>
+ <entry>client-major-transport-version(*1)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+In order to establish the connection (to notify the IM Server communication
+window), the IM Server sends a ClientMessage in the following event's
+format to the client communication window.
+</para>
+
+<table frame="none" id="clientmessage_sent_by_im_server">
+ <title>The ClientMessage sent by IM Server.</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Member</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS Window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_CONNECT", false)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>32</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[0]</entry>
+ <entry>client communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[1]</entry>
+ <entry>client-major-transport-version(*1)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[2]</entry>
+ <entry>client-major-transport-version(*1)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[3]</entry>
+ <entry>dividing size between ClientMessage and Property(*2)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+(*1) major/minor-transport-version
+</para>
+
+<para>
+The read/write method is decided by the combination of
+major/minor-transport-version, as follows:
+</para>
+
+<table frame="all" id="readwrite_method_and_the_majorminor_transport_version">
+<title>The read/write method and the major/minor-transport-version</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="1"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3*" colsep="1"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="center"/>
+ <thead>
+ <row>
+ <entry spanname="span-horiz">Transport-version</entry>
+ <entry>read/write</entry>
+ </row>
+ <row>
+ <entry>major</entry>
+ <entry>minor</entry>
+ <entry></entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry morerows="2">0</entry>
+ <entry>0</entry>
+ <entry>only-CM & Property-with-CM</entry>
+ </row>
+ <row rowsep="0">
+ <entry>1</entry>
+ <entry>only-CM & multi-CM</entry>
+ </row>
+ <row rowsep="1">
+ <entry>2</entry>
+ <entry>only-CM & multi-CM & Property-with-CM</entry>
+ </row>
+ <row rowsep="1">
+ <entry>1</entry>
+ <entry>0</entry>
+ <entry>PropertyNotify</entry>
+ </row>
+ <row rowsep="0">
+ <entry morerows="1">2</entry>
+ <entry>0</entry>
+ <entry>only-CM & PropertyNotify</entry>
+ </row>
+ <row>
+ <entry>1</entry>
+ <entry>only-CM & multi-CM & PropertyNotify</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<literallayout class="monospaced">
+only-CM : data is sent via a ClientMessage
+multi-CM : data is sent via multiple ClientMessages
+Property-with-CM : data is written in Property, and its Atom
+ is send via ClientMessage
+PropertyNotify : data is written in Property, and its Atom
+ is send via PropertyNotify
+
+</literallayout>
+
+
+<para>
+The method to decide major/minor-transport-version is as follows:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+The client sends 0 as major/minor-transport-version to the IM Server.
+The client must support all methods in Table 4-3. <!-- xref -->
+The client may send another number as major/minor-transport-version to
+use other method than the above in the future.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The IM Server sends its major/minor-transport-version number to
+the client. The client sends data using the method specified by the
+IM Server.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If major/minor-transport-version number is not available, it is regarded
+as 0.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+(*2) dividing size between ClientMessage and Property
+</para>
+
+<para>
+If data is sent via both of multi-CM and Property, specify the dividing
+size between ClientMessage and Property. The data, which is smaller than
+this size, is sent via multi-CM (or only-CM), and the data, which is
+lager than this size, is sent via Property.
+</para>
+
+</sect3>
+
+<sect3 id="read_write_">
+<title>read/write </title>
+<para>
+The data is transferred via either ClientMessage or Window Property in
+the X Window System.
+</para>
+
+<sect4 id="Format_for_the_data_from_the_Client_to_the_IM_Server">
+<title>Format for the data from the Client to the IM Server</title>
+<para>
+<emphasis role="bold">ClientMessage</emphasis>
+</para>
+
+<para>
+If data is sent via ClientMessage event, the format is as follows:
+</para>
+
+<table frame="none" id="clientmessage_events_format_first_or_middle">
+ <title>The ClientMessage event's format (first or middle)</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Member</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS Window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_MOREDATA", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>char</entry>
+ <entry>data.b[20]</entry>
+ <entry>(read/write DATA : 20 byte)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+
+
+<table frame="none" id="clientmessage_events_format_only_or_last">
+ <title>The ClientMessage event's format (only or last)</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Member</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS Window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_PROTOCOL", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>char</entry>
+ <entry>data.b[20]</entry>
+ <entry>(read/write DATA : MAX 20 byte)
+<footnote><para>If the data is smaller
+than 20 bytes, all data other than available data must be 0.
+</para></footnote>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+<emphasis role="bold">Property</emphasis>
+</para>
+
+<para>
+In the case of large data, data will be sent via the Window Property
+for the efficiency. There are the following two methods to notify
+Property, and transport-version is decided which method is used.
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+The XChangeProperty function is used to store data in the client
+communication window, and Atom of the stored data is notified to the
+IM Server via ClientMessage event.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The XChangeProperty function is used to store data in the client
+communication window, and Atom of the stored data is notified to the
+IM Server via PropertyNotify event.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+The arguments of the XChangeProperty are as follows:
+</para>
+
+
+<table frame="none" id="xchangeproperty_events_format">
+ <title>The XChangeProperty event's format</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Argument</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>property</entry>
+ <entry>read/write property Atom (*1)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>mode</entry>
+ <entry>PropModeAppend</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_char</entry>
+ <entry>*data</entry>
+ <entry>read/write DATA</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>nelements</entry>
+ <entry>length of DATA</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+(*1) The read/write property ATOM allocates the following strings by
+<function>XInternAtom</function>.
+"_clientXXX"
+</para>
+
+<para>
+The client changes the property with the mode of PropModeAppend and
+the IM Server will read it with the delete mode i.e. (delete = True).
+</para>
+
+<para>
+If Atom is notified via ClientMessage event, the format of the ClientMessage
+is as follows:
+</para>
+
+<table frame="none" id="clientmessage_events_format_to_send_atom_of_property">
+ <title>The ClientMessage event's format to send Atom of property</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Member</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS Window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_PROTOCOL", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[0]</entry>
+ <entry>length of read/write property Atom</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[1]</entry>
+ <entry>read/write property Atom</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+</sect4>
+
+<sect4 id="Format_for_the_data_from_the_IM_Server_to_the_Client">
+<title>Format for the data from the IM Server to the Client</title>
+<para>
+<emphasis role="bold">ClientMessage</emphasis>
+</para>
+
+<para>
+The format of the ClientMessage is as follows:
+</para>
+
+<table frame="none" id="clientmessage_events_format_first_or_middle_2">
+ <title>The ClientMessage event's format (first or middle)</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Member</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS Window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_MOREDATA", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>char</entry>
+ <entry>data.b[20]</entry>
+ <entry>(read/write DATA : 20 byte)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+
+
+
+
+<table frame="none" id="clientmessage_events_format_only_or_last_2">
+ <title>The ClientMessage event's format (only or last)</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Member</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS Window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_PROTOCOL", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>char</entry>
+ <entry>data.b[20]</entry>
+ <entry>(read/write DATA : MAX 20 byte) (*1)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+(*1) If the data size is smaller than 20 bytes, all data other than available
+data must be 0.
+</para>
+
+<para>
+<emphasis role="bold">Property</emphasis>
+</para>
+
+<para>
+In the case of large data, data will be sent via the Window Property
+for the efficiency. There are the following two methods to notify
+Property, and transport-version is decided which method is used.
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+The XChangeProperty function is used to store data in the IMS
+communication window, and Atom of the property is sent via the
+ClientMessage event.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The XChangeProperty function is used to store data in the IMS
+communication window, and Atom of the property is sent via
+PropertyNotify event.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+The arguments of the XChangeProperty are as follows:
+</para>
+
+<table frame="none" id="xchangeproperty_events_format_b">
+ <title>The XChangeProperty event's format</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Argument</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS communication window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>property</entry>
+ <entry>read/write property Atom (*1)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>mode</entry>
+ <entry>PropModeAppend</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_char</entry>
+ <entry>*data</entry>
+ <entry>read/write DATA</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>nelements</entry>
+ <entry>length of DATA</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+<para>
+(*1) The read/write property ATOM allocates some strings, which are not
+allocated by the client, by <function>XInternAtom</function>.
+</para>
+
+<para>
+The IM Server changes the property with the mode of PropModeAppend and
+the client reads it with the delete mode, i.e. (delete = True).
+</para>
+
+<para>
+If Atom is notified via ClientMessage event, the format of the ClientMessage
+is as follows:
+</para>
+
+<table frame="none" id="clientmessage_events_format_to_send_atom_of_property_2">
+ <title>The ClientMessage event's format to send Atom of property</title>
+ <tgroup cols="3">
+ <colspec colname="col1" colwidth="1*" colsep="0"/>
+ <colspec colname="col2" colwidth="1*" colsep="1"/>
+ <colspec colname="col3" colwidth="3.5*" colsep="0"/>
+ <spanspec namest="col1" nameend="col2" spanname="span-horiz" align="left"/>
+ <thead>
+ <row>
+ <entry align="left" spanname="span-horiz">Structure Member</entry>
+ <entry align="left">Contents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>type</entry>
+ <entry>ClientMessage</entry>
+ </row>
+ <row rowsep="0">
+ <entry>u_long</entry>
+ <entry>serial</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Bool</entry>
+ <entry>send_event</entry>
+ <entry>Set by the X Window System</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Display</entry>
+ <entry>*display</entry>
+ <entry>The display to which connects</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Window</entry>
+ <entry>window</entry>
+ <entry>IMS Window ID</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Atom</entry>
+ <entry>message_type</entry>
+ <entry>XInternAtom(display, "_XIM_PROTOCOL", False)</entry>
+ </row>
+ <row rowsep="0">
+ <entry>int</entry>
+ <entry>format</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[0]</entry>
+ <entry>length of read/write property Atom</entry>
+ </row>
+ <row rowsep="0">
+ <entry>long</entry>
+ <entry>data.1[1]</entry>
+ <entry>read/write property Atom</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
+
+</sect4>
+</sect3>
+<sect3 id="Closing_Connection">
+<title>Closing Connection</title>
+
+<para>
+If the client disconnect with the IM Server, shutdown function should
+free the communication window properties and etc..
+</para>
+
+</sect3>
+</sect2>
+</sect1>
+
+<sect1 id="References">
+<title>References</title>
+<para>
+[1] Masahiko Narita and Hideki Hiura, <emphasis remap='I'>"The Input Method Protocol"</emphasis>
+</para>
+</sect1>
+
+</chapter>
+</book>
diff --git a/libX11/specs/libX11/Makefile.am b/libX11/specs/libX11/Makefile.am index 76fa0f688..bd51baf1f 100644 --- a/libX11/specs/libX11/Makefile.am +++ b/libX11/specs/libX11/Makefile.am @@ -1,5 +1,5 @@ #
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
diff --git a/libX11/specs/libX11/glossary.xml b/libX11/specs/libX11/glossary.xml index 6f909b2b0..0ad46b73c 100644 --- a/libX11/specs/libX11/glossary.xml +++ b/libX11/specs/libX11/glossary.xml @@ -5,8 +5,8 @@ <title>Glossary</title>
<glossentry id="glossary:Access_control_list">
<glossterm>Access control list</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Access control list</primary></indexterm>
+ <glossdef>
<para>
X maintains a list of hosts from which client programs can be run.
By default,
@@ -22,8 +22,8 @@ protocol name and data received by the server at connection setup. </glossentry>
<glossentry id="glossary:Active_grab">
<glossterm>Active grab</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Active grab</primary></indexterm>
+ <glossdef>
<para>
A grab is active when the pointer or keyboard is actually owned by the
single grabbing client.
@@ -32,8 +32,8 @@ single grabbing client. </glossentry>
<glossentry id="glossary:Ancestors">
<glossterm>Ancestors</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Ancestors</primary></indexterm>
+ <glossdef>
<para>
If W is an inferior of A, then A is an ancestor of W.
</para>
@@ -41,8 +41,8 @@ If W is an inferior of A, then A is an ancestor of W. </glossentry>
<glossentry id="glossary:Atom">
<glossterm>Atom</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Atom</primary></indexterm>
+ <glossdef>
<para>
An atom is a unique ID corresponding to a string name.
Atoms are used to identify properties, types, and selections.
@@ -51,8 +51,8 @@ Atoms are used to identify properties, types, and selections. </glossentry>
<glossentry id="glossary:Background">
<glossterm>Background</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Background</primary></indexterm>
+ <glossdef>
<para>
An
<symbol>InputOutput</symbol>
@@ -65,8 +65,8 @@ the server automatically tiles those regions with the background. </glossentry>
<glossentry id="glossary:Backing_store">
<glossterm>Backing store</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Backing store</primary></indexterm>
+ <glossdef>
<para>
When a server maintains the contents of a window,
the pixels saved off-screen are known as a backing store.
@@ -75,8 +75,8 @@ the pixels saved off-screen are known as a backing store. </glossentry>
<glossentry id="glossary:Base_font_name">
<glossterm>Base font name</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Base font name</primary></indexterm>
+ <glossdef>
<para>
A font name used to select a family of fonts whose members may be encoded
in various charsets.
@@ -104,8 +104,8 @@ to load the fonts required to render text. </glossentry>
<glossentry id="glossary:Bit_gravity">
<glossterm>Bit gravity</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Bit</primary><secondary>gravity</secondary></indexterm>
+ <glossdef>
<para>
When a window is resized,
the contents of the window are not necessarily discarded.
@@ -118,8 +118,8 @@ a window is known as bit gravity. </glossentry>
<glossentry id="glossary:Bit_plane">
<glossterm>Bit plane</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Bit</primary><secondary>plane</secondary></indexterm>
+ <glossdef>
<para>
When a pixmap or window is thought of as a stack of bitmaps,
each bitmap is called a bit plane or plane.
@@ -128,8 +128,8 @@ each bitmap is called a bit plane or plane. </glossentry>
<glossentry id="glossary:Bitmap">
<glossterm>Bitmap</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Bitmap</primary></indexterm>
+ <glossdef>
<para>
A bitmap is a <glossterm linkend="glossary:Pixmap">pixmap</glossterm> of depth one.
</para>
@@ -137,8 +137,8 @@ A bitmap is a <glossterm linkend="glossary:Pixmap">pixmap</glossterm> of depth o </glossentry>
<glossentry id="glossary:Border">
<glossterm>Border</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Border</primary></indexterm>
+ <glossdef>
<para>
An
<symbol>InputOutput</symbol>
@@ -151,8 +151,8 @@ Exposure events are never generated for border regions. </glossentry>
<glossentry id="glossary:Button_grabbing">
<glossterm>Button grabbing</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Button</primary><secondary>grabbing</secondary></indexterm>
+ <glossdef>
<para>
Buttons on the pointer can be passively grabbed by a client.
When the button is pressed,
@@ -162,8 +162,8 @@ the pointer is then actively grabbed by the client. </glossentry>
<glossentry id="glossary:Byte_order">
<glossterm>Byte order</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Byte</primary><secondary>order</secondary></indexterm>
+ <glossdef>
<para>
For image (pixmap/bitmap) data,
the server defines the byte order,
@@ -177,8 +177,8 @@ and the server swaps bytes as necessary. </glossentry>
<glossentry id="glossary:Character">
<glossterm>Character</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Character</primary></indexterm>
+ <glossdef>
<para>
A member of a set of elements used for the organization,
control, or representation of text (ISO2022, as adapted by XPG3).
@@ -189,8 +189,8 @@ until it is identified as part of a coded character set. </glossentry>
<glossentry id="glossary:Character_glyph">
<glossterm>Character glyph</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Character glyph</primary></indexterm>
+ <glossdef>
<para>
The abstract graphical symbol for a character.
Character glyphs may or may not map one-to-one to font glyphs,
@@ -201,8 +201,8 @@ Multiple characters may map to a single character glyph. </glossentry>
<glossentry id="glossary:Character_set">
<glossterm>Character set</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Character set</primary></indexterm>
+ <glossdef>
<para>
A collection of characters.
</para>
@@ -210,8 +210,8 @@ A collection of characters. </glossentry>
<glossentry id="glossary:Charset">
<glossterm>Charset</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Charset</primary></indexterm>
+ <glossdef>
<para>
An encoding with a uniform, state-independent mapping from characters
to codepoints.
@@ -236,8 +236,8 @@ for example, ISO8859-1. </glossentry>
<glossentry id="glossary:Children">
<glossterm>Children</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Children</primary></indexterm>
+ <glossdef>
<para>
The children of a window are its first-level subwindows.
</para>
@@ -245,8 +245,8 @@ The children of a window are its first-level subwindows. </glossentry>
<glossentry id="glossary:Class">
<glossterm>Class</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Class</primary></indexterm>
+ <glossdef>
<para>
Windows can be of different classes or types.
See the entries for
@@ -259,8 +259,8 @@ windows for further information about valid window types. </glossentry>
<glossentry id="glossary:Client">
<glossterm>Client</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Client</primary></indexterm>
+ <glossdef>
<para>
An application program connects to the window system server by some
interprocess communication (<acronym>IPC</acronym>) path, such as a <acronym>TCP</acronym> connection or a
@@ -277,8 +277,8 @@ connection lifetimes, not by program lifetimes. </glossentry>
<glossentry id="glossary:Clipping_region">
<glossterm>Clipping region</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Clipping region</primary></indexterm>
+ <glossdef>
<para>
In a graphics context,
a bitmap or list of rectangles can be specified
@@ -289,8 +289,8 @@ The image defined by the bitmap or rectangles is called a clipping region. </glossentry>
<glossentry id="glossary:Coded_character">
<glossterm>Coded character</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Coded character</primary></indexterm>
+ <glossdef>
<para>
A character bound to a codepoint.
</para>
@@ -298,8 +298,8 @@ A character bound to a codepoint. </glossentry>
<glossentry id="glossary:Coded_character_set">
<glossterm>Coded character set</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Coded character set</primary></indexterm>
+ <glossdef>
<para>
A set of unambiguous rules that establishes a character set
and the one-to-one relationship between each character of the set
@@ -312,8 +312,8 @@ codepoints. </glossentry>
<glossentry id="glossary:Codepoint">
<glossterm>Codepoint</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Codepoint</primary></indexterm>
+ <glossdef>
<para>
The coded representation of a single character in a coded character set.
</para>
@@ -321,8 +321,8 @@ The coded representation of a single character in a coded character set. </glossentry>
<glossentry id="glossary:Colormap">
<glossterm>Colormap</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Colormap</primary></indexterm>
+ <glossdef>
<para>
A colormap consists of a set of entries defining color values.
The colormap associated with a window is used to display the contents of
@@ -336,8 +336,8 @@ that windows associated with those maps display with true colors. </glossentry>
<glossentry id="glossary:Connection">
<glossterm>Connection</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Connection</primary></indexterm>
+ <glossdef>
<para>
The <acronym>IPC</acronym> path between the server and client program is known as a connection.
A client program typically (but not necessarily) has one
@@ -347,8 +347,8 @@ connection to the server over which requests and events are sent. </glossentry>
<glossentry id="glossary:Containment">
<glossterm>Containment</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Containment</primary></indexterm>
+ <glossdef>
<para>
A window contains the pointer if the window is viewable and the
hotspot of the cursor is within a visible region of the window or a
@@ -361,8 +361,8 @@ but no inferior contains the pointer. </glossentry>
<glossentry id="glossary:Coordinate_system">
<glossterm>Coordinate system</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Coordinate system</primary></indexterm>
+ <glossdef>
<para>
The coordinate system has X horizontal and Y vertical,
with the origin [0, 0] at the upper left.
@@ -375,8 +375,8 @@ the origin is inside the border at the inside upper-left corner. </glossentry>
<glossentry id="glossary:Cursor">
<glossterm>Cursor</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Cursor</primary></indexterm>
+ <glossdef>
<para>
A cursor is the visible shape of the pointer on a screen.
It consists of a hotspot, a source bitmap, a shape bitmap,
@@ -388,8 +388,8 @@ appearance when the pointer is in that window. </glossentry>
<glossentry id="glossary:Depth">
<glossterm>Depth</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Depth</primary></indexterm>
+ <glossdef>
<para>
The depth of a window or pixmap is the number of bits per pixel it has.
The depth of a graphics context is the depth of the drawables it can be
@@ -399,8 +399,8 @@ used in conjunction with graphics output. </glossentry>
<glossentry id="glossary:Device">
<glossterm>Device</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Device</primary></indexterm>
+ <glossdef>
<para>
Keyboards, mice, tablets, track-balls, button boxes, and so on are all
collectively known as input devices.
@@ -413,8 +413,8 @@ and the pointer. </glossentry>
<glossentry id="glossary:DirectColor">
<glossterm>DirectColor</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>DirectColor</primary></indexterm>
+ <glossdef>
<para>
<symbol>DirectColor</symbol>
is a class of colormap in which a pixel value is decomposed into three
@@ -429,13 +429,13 @@ changed dynamically. </glossentry>
<glossentry id="glossary:Display">
<glossterm>Display</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Display</primary></indexterm>
+<indexterm><primary>Display</primary><secondary>structure</secondary></indexterm>
+ <glossdef>
<para>
A server, together with its screens and input devices, is called a display.
The Xlib
<type>Display</type>
-<indexterm><primary>Display</primary><secondary>structure</secondary></indexterm>
structure contains all information about the particular display and its screens
as well as the state that Xlib needs to communicate with the display over a
particular connection.
@@ -444,8 +444,8 @@ particular connection. </glossentry>
<glossentry id="glossary:Drawable">
<glossterm>Drawable</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Drawable</primary></indexterm>
+ <glossdef>
<para>
Both windows and pixmaps can be used as sources and destinations
in graphics operations.
@@ -459,8 +459,8 @@ graphics operation. </glossentry>
<glossentry id="glossary:Encoding">
<glossterm>Encoding</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Encoding</primary></indexterm>
+ <glossdef>
<para>
A set of unambiguous rules that establishes a character set
and a relationship between the characters and their representations.
@@ -488,8 +488,8 @@ Character Set. </glossentry>
<glossentry id="glossary:Escapement">
<glossterm>Escapement</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Escapement</primary></indexterm>
+ <glossdef>
<para>
The escapement of a string is the distance in pixels in the
primary draw direction from the drawing origin to the origin of the next
@@ -499,8 +499,8 @@ character (that is, the one following the given string) to be drawn. </glossentry>
<glossentry id="glossary:Event">
<glossterm>Event</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Event</primary></indexterm>
+ <glossdef>
<para>
Clients are informed of information asynchronously by means of events.
These events can be either asynchronously generated from devices or
@@ -515,8 +515,8 @@ Events are typically reported relative to a window. </glossentry>
<glossentry id="glossary:Event_mask">
<glossterm>Event mask</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Event</primary><secondary>mask</secondary></indexterm>
+ <glossdef>
<para>
Events are requested relative to a window.
The set of event types a client requests relative to a window is described
@@ -526,8 +526,8 @@ by using an event mask. </glossentry>
<glossentry id="glossary:Event_propagation">
<glossterm>Event propagation</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Event</primary><secondary>propagation</secondary></indexterm>
+ <glossdef>
<para>
Device-related events propagate from the source window to ancestor
windows until some client has expressed interest in handling that type
@@ -537,8 +537,8 @@ of event or until the event is discarded explicitly. </glossentry>
<glossentry id="glossary:Event_source">
<glossterm>Event source</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Event</primary><secondary>source</secondary></indexterm>
+ <glossdef>
<para>
The deepest viewable window that the pointer is in is called
the source of a device-related event.
@@ -547,8 +547,8 @@ the source of a device-related event. </glossentry>
<glossentry id="glossary:Event_synchronization">
<glossterm>Event synchronization</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Event</primary><secondary>synchronization</secondary></indexterm>
+ <glossdef>
<para>
There are certain race conditions possible when demultiplexing device
events to clients (in particular, deciding where pointer and keyboard
@@ -561,8 +561,8 @@ device events. </glossentry>
<glossentry id="glossary:Exposure_event">
<glossterm>Exposure event</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Event</primary><secondary>Exposure</secondary></indexterm>
+ <glossdef>
<para>
Servers do not guarantee to preserve the contents of windows when
windows are obscured or reconfigured.
@@ -573,8 +573,8 @@ of windows have been lost. </glossentry>
<glossentry id="glossary:Extension">
<glossterm>Extension</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Extension</primary></indexterm>
+ <glossdef>
<para>
Named extensions to the core protocol can be defined to extend the system.
Extensions to output requests, resources, and event types are all possible
@@ -584,8 +584,8 @@ and expected. </glossentry>
<glossentry id="glossary:Font">
<glossterm>Font</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Font</primary></indexterm>
+ <glossdef>
<para>
A font is an array of glyphs (typically characters).
The protocol does no translation or interpretation of character sets.
@@ -597,8 +597,8 @@ and interline spacing. </glossentry>
<glossentry id="glossary:Font_glyph">
<glossterm>Font glyph</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Font glyph</primary></indexterm>
+ <glossdef>
<para>
The abstract graphical symbol for an index into a font.
</para>
@@ -606,8 +606,8 @@ The abstract graphical symbol for an index into a font. </glossentry>
<glossentry id="glossary:Frozen_events">
<glossterm>Frozen events</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Frozen events</primary></indexterm>
+ <glossdef>
<para>
Clients can freeze event processing during keyboard and pointer grabs.
</para>
@@ -615,8 +615,8 @@ Clients can freeze event processing during keyboard and pointer grabs. </glossentry>
<glossentry id="glossary:GC">
<glossterm>GC</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>GC</primary></indexterm>
+ <glossdef>
<para>
GC is an abbreviation for graphics context.
See <glossterm linkend="glossary:Graphics_context">Graphics context</glossterm>.
@@ -625,8 +625,8 @@ See <glossterm linkend="glossary:Graphics_context">Graphics context</glossterm>. </glossentry>
<glossentry id="glossary:Glyph">
<glossterm>Glyph</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Glyph</primary></indexterm>
+ <glossdef>
<para>
An identified abstract graphical symbol independent of any actual image.
(ISO/IEC/DIS 9541-1)
@@ -637,8 +637,8 @@ not bound to a codepoint. </glossentry>
<glossentry id="glossary:Glyph_image">
<glossterm>Glyph image</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Glyph image</primary></indexterm>
+ <glossdef>
<para>
An image of a glyph, as obtained from a glyph representation displayed
on a presentation surface.
@@ -648,8 +648,8 @@ on a presentation surface. </glossentry>
<glossentry id="glossary:Grab">
<glossterm>Grab</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Grab</primary></indexterm>
+ <glossdef>
<para>
Keyboard keys, the keyboard, pointer buttons, the pointer,
and the server can be grabbed for exclusive use by a client.
@@ -662,8 +662,8 @@ styles of user interfaces. </glossentry>
<glossentry id="glossary:Graphics_context">
<glossterm>Graphics context</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Graphics context</primary></indexterm>
+ <glossdef>
<para>
Various information for graphics output is stored in a graphics
context (<acronym>GC</acronym>), such as foreground pixel, background
@@ -676,8 +676,8 @@ the graphics context. </glossentry>
<glossentry id="glossary:Gravity">
<glossterm>Gravity</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Gravity</primary></indexterm>
+ <glossdef>
<para>
The contents of windows and windows themselves have a gravity,
which determines how the contents move when a window is resized.
@@ -688,8 +688,8 @@ See <glossterm linkend="glossary:Bit_gravity">Bit gravity</glossterm> and </glossentry>
<glossentry id="glossary:GrayScale">
<glossterm>GrayScale</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>GrayScale</primary></indexterm>
+ <glossdef>
<para>
<symbol>GrayScale</symbol>
can be viewed as a degenerate case of
@@ -702,8 +702,8 @@ The gray values can be changed dynamically. </glossentry>
<glossentry id="glossary:Host_Portable_Character_Encoding">
<glossterm>Host Portable Character Encoding</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Host Portable Character Encoding</primary></indexterm>
+ <glossdef>
<para>
The encoding of the <glossterm linkend="glossary:X_Portable_Character_Set">X Portable Character Set</glossterm> on the host.
The encoding itself is not defined by this standard,
@@ -716,8 +716,8 @@ in the host encoding. </glossentry>
<glossentry id="glossary:Hotspot">
<glossterm>Hotspot</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Hotspot</primary></indexterm>
+ <glossdef>
<para>
A cursor has an associated hotspot, which defines the point in the
cursor corresponding to the coordinates reported for the pointer.
@@ -726,8 +726,8 @@ cursor corresponding to the coordinates reported for the pointer. </glossentry>
<glossentry id="glossary:Identifier">
<glossterm>Identifier</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Identifier</primary></indexterm>
+ <glossdef>
<para>
An identifier is a unique value associated with a resource
that clients use to name that resource.
@@ -737,8 +737,8 @@ The identifier can be used over any connection to name the resource. </glossentry>
<glossentry id="glossary:Inferiors">
<glossterm>Inferiors</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Inferiors</primary></indexterm>
+ <glossdef>
<para>
The inferiors of a window are all of the subwindows nested below it:
the children, the children's children, and so on.
@@ -747,8 +747,8 @@ the children, the children's children, and so on. </glossentry>
<glossentry id="glossary:Input_focus">
<glossterm>Input focus</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Input</primary><secondary>focus</secondary></indexterm>
+ <glossdef>
<para>
The input focus is usually a window defining the scope for processing
of keyboard input.
@@ -764,8 +764,8 @@ of whatever screen the pointer is on at each keyboard event. </glossentry>
<glossentry id="glossary:Input_manager">
<glossterm>Input manager</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Input</primary><secondary>manager</secondary></indexterm>
+ <glossdef>
<para>
Control over keyboard input is typically provided by an input manager
client, which usually is part of a window manager.
@@ -774,8 +774,8 @@ client, which usually is part of a window manager. </glossentry>
<glossentry id="glossary:InputOnly_window">
<glossterm>InputOnly window</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Window</primary><secondary>InputOnly</secondary></indexterm>
+ <glossdef>
<para>
An
<symbol>InputOnly</symbol>
@@ -792,8 +792,8 @@ windows as inferiors. </glossentry>
<glossentry id="glossary:InputOutput_window">
<glossterm>InputOutput window</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Window</primary><secondary>InputOutput</secondary></indexterm>
+ <glossdef>
<para>
An
<symbol>InputOutput</symbol>
@@ -809,8 +809,8 @@ windows as inferiors. </glossentry>
<glossentry id="glossary:Internationalization">
<glossterm>Internationalization</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Internationalization</primary></indexterm>
+ <glossdef>
<para>
The process of making software adaptable to the requirements
of different native languages, local customs, and character string encodings.
@@ -821,8 +821,8 @@ without program source modifications or recompilation. </glossentry>
<glossentry id="glossary:ISO2022">
<glossterm>ISO2022</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>ISO2022</primary></indexterm>
+ <glossdef>
<para>
ISO standard for code extension techniques for 7-bit and 8-bit coded
character sets.
@@ -831,8 +831,8 @@ character sets. </glossentry>
<glossentry id="glossary:Key_grabbing">
<glossterm>Key grabbing</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Key</primary><secondary>grabbing</secondary></indexterm>
+ <glossdef>
<para>
Keys on the keyboard can be passively grabbed by a client.
When the key is pressed,
@@ -842,8 +842,8 @@ the keyboard is then actively grabbed by the client. </glossentry>
<glossentry id="glossary:Keyboard_grabbing">
<glossterm>Keyboard grabbing</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Keyboard</primary><secondary>grabbing</secondary></indexterm>
+ <glossdef>
<para>
A client can actively grab control of the keyboard, and key events
will be sent to that client rather than the client the events would
@@ -853,8 +853,8 @@ normally have been sent to. </glossentry>
<glossentry id="glossary:Keysym">
<glossterm>Keysym</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Keysym</primary></indexterm>
+ <glossdef>
<para>
An encoding of a symbol on a keycap on a keyboard.
</para>
@@ -862,8 +862,8 @@ An encoding of a symbol on a keycap on a keyboard. </glossentry>
<glossentry id="glossary:Latin-1">
<glossterm>Latin-1</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Latin-1</primary></indexterm>
+ <glossdef>
<para>
The coded character set defined by the ISO8859-1 standard.
</para>
@@ -871,8 +871,8 @@ The coded character set defined by the ISO8859-1 standard. </glossentry>
<glossentry id="glossary:Latin_Portable_Character_Encoding">
<glossterm>Latin Portable Character Encoding</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Latin Portable Character Encoding</primary></indexterm>
+ <glossdef>
<para>
The encoding of the X Portable Character Set using the Latin-1 codepoints
plus ASCII control characters.
@@ -884,8 +884,8 @@ not all of Latin-1. </glossentry>
<glossentry id="glossary:Locale">
<glossterm>Locale</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Locale</primary></indexterm>
+ <glossdef>
<para>
The international environment of a computer program defining the ``localized''
behavior of that program at run-time.
@@ -917,8 +917,8 @@ Encoding and decoding for inter-client text communication </glossentry>
<glossentry id="glossary:Locale_name">
<glossterm>Locale name</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Locale name</primary></indexterm>
+ <glossdef>
<para>
The identifier used to select the desired locale for the host C library
and X library functions.
@@ -931,8 +931,8 @@ function. </glossentry>
<glossentry id="glossary:Localization">
<glossterm>Localization</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Localization</primary></indexterm>
+ <glossdef>
<para>
The process of establishing information within a computer system specific
to the operation of particular native languages, local customs
@@ -943,8 +943,8 @@ and coded character sets. </glossentry>
<glossentry id="glossary:Mapped">
<glossterm>Mapped</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Mapped window</primary></indexterm>
+ <glossdef>
<para>
A window is said to be mapped if a map call has been performed on it.
Unmapped windows and their inferiors are never viewable or visible.
@@ -953,8 +953,8 @@ Unmapped windows and their inferiors are never viewable or visible. </glossentry>
<glossentry id="glossary:Modifier_keys">
<glossterm>Modifier keys</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Modifier keys</primary></indexterm>
+ <glossdef>
<para>
Shift, Control, Meta, Super, Hyper, Alt, Compose, Apple, CapsLock,
ShiftLock, and similar keys are called modifier keys.
@@ -963,8 +963,8 @@ ShiftLock, and similar keys are called modifier keys. </glossentry>
<glossentry id="glossary:Monochrome">
<glossterm>Monochrome</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Monochrome</primary></indexterm>
+ <glossdef>
<para>
Monochrome is a special case of
<glossterm linkend="glossary:StaticGray"><symbol>StaticGray</symbol></glossterm>
@@ -974,8 +974,8 @@ in which there are only two colormap entries. </glossentry>
<glossentry id="glossary:Multibyte">
<glossterm>Multibyte</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Multibyte</primary></indexterm>
+ <glossdef>
<para>
A character whose codepoint is stored in more than one byte;
any encoding which can contain multibyte characters;
@@ -988,8 +988,8 @@ imply only that the strings <emphasis remap='I'>may</emphasis> contain multibyte </glossentry>
<glossentry id="glossary:Obscure">
<glossterm>Obscure</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Obscure</primary></indexterm>
+ <glossdef>
<para>
A window is obscured if some other window obscures it.
A window can be partially obscured and so still have visible regions.
@@ -1005,8 +1005,8 @@ Also note that window borders are included in the calculation. </glossentry>
<glossentry id="glossary:Occlude">
<glossterm>Occlude</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Occlude</primary></indexterm>
+ <glossdef>
<para>
A window is occluded if some other window occludes it.
Window A occludes window B if both are mapped,
@@ -1023,8 +1023,8 @@ windows never obscure other windows but can occlude other windows. </glossentry>
<glossentry id="glossary:Padding">
<glossterm>Padding</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Padding</primary></indexterm>
+ <glossdef>
<para>
Some padding bytes are inserted in the data stream to maintain
alignment of the protocol requests on natural boundaries.
@@ -1034,8 +1034,8 @@ This increases ease of portability to some machine architectures. </glossentry>
<glossentry id="glossary:Parent_window">
<glossterm>Parent window</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Window</primary><secondary>parent</secondary></indexterm>
+ <glossdef>
<para>
If C is a child of P, then P is the parent of C.
</para>
@@ -1043,8 +1043,8 @@ If C is a child of P, then P is the parent of C. </glossentry>
<glossentry id="glossary:Passive_grab">
<glossterm>Passive grab</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Passive grab</primary></indexterm>
+ <glossdef>
<para>
Grabbing a key or button is a passive grab.
The grab activates when the key or button is actually pressed.
@@ -1053,8 +1053,8 @@ The grab activates when the key or button is actually pressed. </glossentry>
<glossentry id="glossary:Pixel_value">
<glossterm>Pixel value</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Pixel value</primary></indexterm>
+ <glossdef>
<para>
A pixel is an N-bit value,
where N is the number of bit planes used in a particular window or pixmap
@@ -1066,8 +1066,8 @@ displayed. </glossentry>
<glossentry id="glossary:Pixmap">
<glossterm>Pixmap</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Pixmap</primary></indexterm>
+ <glossdef>
<para>
A pixmap is a three-dimensional array of bits.
A pixmap is normally thought of as a two-dimensional array of pixels,
@@ -1080,8 +1080,8 @@ A pixmap can only be used on the screen that it was created in. </glossentry>
<glossentry id="glossary:Plane">
<glossterm>Plane</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Plane</primary></indexterm>
+ <glossdef>
<para>
When a pixmap or window is thought of as a stack of bitmaps, each
bitmap is called a plane or bit plane.
@@ -1090,8 +1090,8 @@ bitmap is called a plane or bit plane. </glossentry>
<glossentry id="glossary:Plane_mask">
<glossterm>Plane mask</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Plane</primary><secondary>mask</secondary></indexterm>
+ <glossdef>
<para>
Graphics operations can be restricted to only affect a subset of bit
planes of a destination.
@@ -1102,8 +1102,8 @@ The plane mask is stored in a graphics context. </glossentry>
<glossentry id="glossary:Pointer">
<glossterm>Pointer</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Pointer</primary></indexterm>
+ <glossdef>
<para>
The pointer is the pointing device currently attached to the cursor
and tracked on the screens.
@@ -1112,8 +1112,8 @@ and tracked on the screens. </glossentry>
<glossentry id="glossary:Pointer_grabbing">
<glossterm>Pointer grabbing</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Pointer</primary><secondary>grabbing</secondary></indexterm>
+ <glossdef>
<para>
A client can actively grab control of the pointer.
Then button and motion events will be sent to that client
@@ -1123,8 +1123,8 @@ rather than the client the events would normally have been sent to. </glossentry>
<glossentry id="glossary:Pointing_device">
<glossterm>Pointing device</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Pointing device</primary></indexterm>
+ <glossdef>
<para>
A pointing device is typically a mouse, tablet, or some other
device with effective dimensional motion.
@@ -1135,8 +1135,8 @@ which tracks whatever pointing device is attached as the pointer. </glossentry>
<glossentry id="glossary:POSIX">
<glossterm><acronym>POSIX</acronym></glossterm>
- <glossdef>
<indexterm significance="preferred"><primary><acronym>POSIX</acronym></primary></indexterm>
+ <glossdef>
<para>
Portable Operating System Interface, ISO/IEC 9945-1 (IEEE Std 1003.1).
</para>
@@ -1144,8 +1144,8 @@ Portable Operating System Interface, ISO/IEC 9945-1 (IEEE Std 1003.1). </glossentry>
<glossentry id="glossary:POSIX_Portable_Filename_Character_Set">
<glossterm><acronym>POSIX</acronym> Portable Filename Character Set</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary><acronym>POSIX</acronym> Portable Filename Character Set</primary></indexterm>
+ <glossdef>
<para>
The set of 65 characters which can be used in naming files on a <acronym>POSIX</acronym>-compliant
host that are correctly processed in all locales.
@@ -1160,8 +1160,8 @@ a..z A..Z 0..9 ._- </glossentry>
<glossentry id="glossary:Property">
<glossterm>Property</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Property</primary></indexterm>
+ <glossdef>
<para>
Windows can have associated properties that consist of a name, a type,
a data format, and some data.
@@ -1174,8 +1174,8 @@ hints, program names, and icon formats with a window manager. </glossentry>
<glossentry id="glossary:Property_list">
<glossterm>Property list</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Property list</primary></indexterm>
+ <glossdef>
<para>
The property list of a window is the list of properties that have
been defined for the window.
@@ -1184,8 +1184,8 @@ been defined for the window. </glossentry>
<glossentry id="glossary:PseudoColor">
<glossterm>PseudoColor</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>PseudoColor</primary></indexterm>
+ <glossdef>
<para>
<symbol>PseudoColor</symbol>
is a class of colormap in which a pixel value indexes the colormap entry to
@@ -1197,8 +1197,8 @@ The <acronym>RGB</acronym> values can be changed dynamically. </glossentry>
<glossentry id="glossary:Rectangle">
<glossterm>Rectangle</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Rectangle</primary></indexterm>
+ <glossdef>
<para>
A rectangle specified by [x,y,w,h] has an infinitely thin
outline path with corners at [x,y], [x+w,y], [x+w,y+h], and [x, y+h].
@@ -1214,8 +1214,8 @@ a single pixel would be drawn. </glossentry>
<glossentry id="glossary:Redirecting_control">
<glossterm>Redirecting control</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Redirecting control</primary></indexterm>
+ <glossdef>
<para>
Window managers (or client programs) may enforce window layout
policy in various ways.
@@ -1227,8 +1227,8 @@ rather than the operation actually being performed. </glossentry>
<glossentry id="glossary:Reply">
<glossterm>Reply</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Reply</primary></indexterm>
+ <glossdef>
<para>
Information requested by a client program using the X protocol
is sent back to the client with a reply.
@@ -1240,8 +1240,8 @@ but some requests generate multiple replies. </glossentry>
<glossentry id="glossary:Request">
<glossterm>Request</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Request</primary></indexterm>
+ <glossdef>
<para>
A command to the server is called a request.
It is a single block of data sent over a connection.
@@ -1250,8 +1250,8 @@ It is a single block of data sent over a connection. </glossentry>
<glossentry id="glossary:Resource">
<glossterm>Resource</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Resource</primary></indexterm>
+ <glossdef>
<para>
Windows, pixmaps, cursors, fonts, graphics contexts, and colormaps are
known as resources.
@@ -1263,8 +1263,8 @@ connection over which the resource was created. </glossentry>
<glossentry id="glossary:RGB_values">
<glossterm><acronym>RGB</acronym> values</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary><acronym>RGB</acronym> values</primary></indexterm>
+ <glossdef>
<para>
<acronym>RGB</acronym> values are the red, green, and blue intensity values that are used
to define a color.
@@ -1276,8 +1276,8 @@ The X server scales these values to match the display hardware. </glossentry>
<glossentry id="glossary:Root">
<glossterm>Root</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Root</primary></indexterm>
+ <glossdef>
<para>
The root of a pixmap or graphics context is the same as the root
of whatever drawable was used when the pixmap or GC was created.
@@ -1287,8 +1287,8 @@ The root of a window is the root window under which the window was created. </glossentry>
<glossentry id="glossary:Root_window">
<glossterm>Root window</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Window</primary><secondary>root</secondary></indexterm>
+ <glossdef>
<para>
Each screen has a root window covering it.
The root window cannot be reconfigured or unmapped,
@@ -1299,8 +1299,8 @@ A root window has no parent. </glossentry>
<glossentry id="glossary:Save_set">
<glossterm>Save set</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Save set</primary></indexterm>
+ <glossdef>
<para>
The save set of a client is a list of other clients' windows that,
if they are inferiors of one of the client's windows at connection
@@ -1313,8 +1313,8 @@ lost windows if the manager should terminate abnormally. </glossentry>
<glossentry id="glossary:Scanline">
<glossterm>Scanline</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Scanline</primary></indexterm>
+ <glossdef>
<para>
A scanline is a list of pixel or bit values viewed as a horizontal
row (all values having the same y coordinate) of an image, with the
@@ -1324,8 +1324,8 @@ values ordered by increasing the x coordinate. </glossentry>
<glossentry id="glossary:Scanline_order">
<glossterm>Scanline order</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Scanline</primary><secondary>order</secondary></indexterm>
+ <glossdef>
<para>
An image represented in scanline order contains scanlines ordered by
increasing the y coordinate.
@@ -1334,8 +1334,10 @@ increasing the y coordinate. </glossentry>
<glossentry id="glossary:Screen">
<glossterm>Screen</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Screen</primary></indexterm>
+<indexterm><primary>Screen</primary><secondary>structure</secondary></indexterm>
+<indexterm><primary>Display</primary><secondary>structure</secondary></indexterm>
+ <glossdef>
<para>
A server can provide several independent screens,
which typically have physically independent monitors.
@@ -1343,19 +1345,17 @@ This would be the expected configuration when there is only a single keyboard and pointer shared among the screens.
A
<type>Screen</type>
-<indexterm><primary>Screen</primary><secondary>structure</secondary></indexterm>
structure contains the information about that screen
and is linked to the
<type>Display</type>
-<indexterm><primary>Display</primary><secondary>structure</secondary></indexterm>
structure.
</para>
</glossdef>
</glossentry>
<glossentry id="glossary:Selection">
<glossterm>Selection</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Selection</primary></indexterm>
+ <glossdef>
<para>
A selection can be thought of as an indirect property with dynamic
type.
@@ -1387,8 +1387,8 @@ The protocol does not constrain the semantics. </glossentry>
<glossentry id="glossary:Server">
<glossterm>Server</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Server</primary></indexterm>
+ <glossdef>
<para>
The server, which is also referred to as the X server,
provides the basic windowing mechanism.
@@ -1400,8 +1400,8 @@ and demultiplexes input back to the appropriate clients. </glossentry>
<glossentry id="glossary:Server_grabbing">
<glossterm>Server grabbing</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Server</primary><secondary>grabbing</secondary></indexterm>
+ <glossdef>
<para>
The server can be grabbed by a single client for exclusive use.
This prevents processing of any requests from other client connections until
@@ -1413,8 +1413,8 @@ pop-up menus, or executing requests indivisibly. </glossentry>
<glossentry id="glossary:Shift_sequence">
<glossterm>Shift sequence</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Shift sequence</primary></indexterm>
+ <glossdef>
<para>
ISO2022 defines control characters and escape sequences
which temporarily (single shift) or permanently (locking shift) cause a
@@ -1424,8 +1424,8 @@ different character set to be in effect (``invoking'' a character set). </glossentry>
<glossentry id="glossary:Sibling">
<glossterm>Sibling</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Sibling</primary></indexterm>
+ <glossdef>
<para>
Children of the same parent window are known as sibling windows.
</para>
@@ -1433,8 +1433,8 @@ Children of the same parent window are known as sibling windows. </glossentry>
<glossentry id="glossary:Stacking_order">
<glossterm>Stacking order</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Stacking order</primary></indexterm>
+ <glossdef>
<para>
Sibling windows, similar to sheets of paper on a desk,
can stack on top of each other.
@@ -1445,8 +1445,8 @@ The relationship between sibling windows is known as the stacking order. </glossentry>
<glossentry id="glossary:State-dependent_encoding">
<glossterm>State-dependent encoding</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>State-dependent encoding</primary></indexterm>
+ <glossdef>
<para>
An encoding in which an invocation of a charset can apply to multiple
characters in sequence.
@@ -1460,8 +1460,8 @@ this means use of locking shifts, not single shifts. </glossentry>
<glossentry id="glossary:State-independent_encoding">
<glossterm>State-independent encoding</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>State-independent encoding</primary></indexterm>
+ <glossdef>
<para>
Any encoding in which the invocations of the charsets are fixed,
or span only a single character.
@@ -1472,8 +1472,8 @@ this means use of at most single shifts, not locking shifts. </glossentry>
<glossentry id="glossary:StaticColor">
<glossterm>StaticColor</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>StaticColor</primary></indexterm>
+ <glossdef>
<para>
<symbol>StaticColor</symbol>
can be viewed as a degenerate case of
@@ -1484,8 +1484,8 @@ in which the <acronym>RGB</acronym> values are predefined and read-only. </glossentry>
<glossentry id="glossary:StaticGray">
<glossterm>StaticGray</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>StaticGray</primary></indexterm>
+ <glossdef>
<para>
<symbol>StaticGray</symbol>
can be viewed as a degenerate case of
@@ -1497,8 +1497,8 @@ The values are typically linear or near-linear increasing ramps. </glossentry>
<glossentry id="glossary:Status">
<glossterm>Status</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Status</primary></indexterm>
+ <glossdef>
<para>
Many Xlib functions return a success status.
If the function does not succeed,
@@ -1508,8 +1508,8 @@ however, its arguments are not disturbed. </glossentry>
<glossentry id="glossary:Stipple">
<glossterm>Stipple</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Stipple</primary></indexterm>
+ <glossdef>
<para>
A stipple pattern is a bitmap that is used to tile a region to serve
as an additional clip mask for a fill operation with the foreground
@@ -1527,9 +1527,9 @@ color. </glossentry>
<glossentry id="glossary:String_Equivalence">
<glossterm>String Equivalence</glossterm>
+<indexterm significance="preferred"><primary>String Equivalence</primary></indexterm>
<glossdef>
<para>
-<indexterm significance="preferred"><primary>String Equivalence</primary></indexterm>
Two ISO Latin-1 STRING8 values are considered equal if they are the same
length and if corresponding bytes are either equal or are equivalent as
follows: decimal values 65 to 90 inclusive (characters ``A'' to ``Z'') are
@@ -1545,8 +1545,8 @@ are pairwise equivalent to decimal values 246 to 254 inclusive </glossentry>
<glossentry id="glossary:Tile">
<glossterm>Tile</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Tile</primary></indexterm>
+ <glossdef>
<para>
A pixmap can be replicated in two dimensions to tile a region.
The pixmap itself is also known as a tile.
@@ -1555,8 +1555,8 @@ The pixmap itself is also known as a tile. </glossentry>
<glossentry id="glossary:Timestamp">
<glossterm>Timestamp</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Timestamp</primary></indexterm>
+ <glossdef>
<para>
A timestamp is a time value expressed in milliseconds.
It is typically the time since the last server reset.
@@ -1574,8 +1574,8 @@ This value is reserved for use in requests to represent the current server time. </glossentry>
<glossentry id="glossary:TrueColor">
<glossterm>TrueColor</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>TrueColor</primary></indexterm>
+ <glossdef>
<para>
<symbol>TrueColor</symbol>
can be viewed as a degenerate case of
@@ -1589,8 +1589,8 @@ The values are typically linear or near-linear increasing ramps. </glossentry>
<glossentry id="glossary:Type">
<glossterm>Type</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Type</primary></indexterm>
+ <glossdef>
<para>
A type is an arbitrary atom used to identify the interpretation of property
data.
@@ -1603,8 +1603,8 @@ and clients also can define new types. </glossentry>
<glossentry id="glossary:Viewable">
<glossterm>Viewable</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Viewable</primary></indexterm>
+ <glossdef>
<para>
A window is viewable if it and all of its ancestors are mapped.
This does not imply that any portion of the window is actually visible.
@@ -1616,8 +1616,8 @@ backing store. </glossentry>
<glossentry id="glossary:Visible">
<glossterm>Visible</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Visible</primary></indexterm>
+ <glossdef>
<para>
A region of a window is visible if someone looking at the screen can
actually see it; that is, the window is viewable and the region is not occluded
@@ -1627,8 +1627,8 @@ by any other window. </glossentry>
<glossentry id="glossary:Whitespace">
<glossterm>Whitespace</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Whitespace</primary></indexterm>
+ <glossdef>
<para>
Any spacing character.
On implementations that conform to the ANSI C library,
@@ -1640,8 +1640,8 @@ returns true. </glossentry>
<glossentry id="glossary:Window_gravity">
<glossterm>Window gravity</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Window</primary><secondary>gravity</secondary></indexterm>
+ <glossdef>
<para>
When windows are resized,
subwindows may be repositioned automatically relative to some position in the
@@ -1653,8 +1653,8 @@ as window gravity. </glossentry>
<glossentry id="glossary:Window_manager">
<glossterm>Window manager</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Window</primary><secondary>manager</secondary></indexterm>
+ <glossdef>
<para>
Manipulation of windows on the screen and much of the user interface
(policy) is typically provided by a window manager client.
@@ -1663,8 +1663,8 @@ Manipulation of windows on the screen and much of the user interface </glossentry>
<glossentry id="glossary:X_Portable_Character_Set">
<glossterm>X Portable Character Set</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>X Portable Character Set</primary></indexterm>
+ <glossdef>
<para>
A basic set of 97 characters which are assumed to exist in all
locales supported by Xlib. This set contains the following characters:
@@ -1686,8 +1686,8 @@ see the <glossterm linkend="glossary:Host_Portable_Character_Encoding">Host Port </glossentry>
<glossentry id="glossary:XLFD">
<glossterm><acronym>XLFD</acronym></glossterm>
- <glossdef>
<indexterm significance="preferred"><primary><acronym>XLFD</acronym></primary></indexterm>
+ <glossdef>
<para>
The X Logical Font Description Conventions that define a standard syntax
for structured font names.
@@ -1696,8 +1696,8 @@ for structured font names. </glossentry>
<glossentry id="glossary:XY_format">
<glossterm>XY format</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>XY format</primary></indexterm>
+ <glossdef>
<para>
The data for a pixmap is said to be in XY format if it is organized as
a set of bitmaps representing individual bit planes with the planes
@@ -1707,8 +1707,8 @@ appearing from most-significant to least-significant bit order. </glossentry>
<glossentry id="glossary:Z_format">
<glossterm>Z format</glossterm>
- <glossdef>
<indexterm significance="preferred"><primary>Z format</primary></indexterm>
+ <glossdef>
<para>
The data for a pixmap is said to be in Z format if it is organized as
a set of pixel values in scanline order.
diff --git a/libX11/specs/macros.t b/libX11/specs/macros.t deleted file mode 100644 index 7d5562f54..000000000 --- a/libX11/specs/macros.t +++ /dev/null @@ -1,225 +0,0 @@ -.\" macros.t -- macros for X Consortium documents -.\" Revised and commented by smarks 93.12.20. -.\" -.\" global setup: set ragged right, assign string variables -.\" -.na -.ie n \{\ -.ds Q \&" -.ds U \&" -.ds - \%-- -.\} -.el \{\ -.ds Q `\h'-\w'\^'u'` -.ds U '\h'-\w'\^'u'' -.ds - \(em -.\} -.\" -.\" --- Ds --- displayed text (like .DS) with no keep -.\" .Ds is obsolete. Change to something from this table: -.\" for this use instead -.\" .Ds .ID -.\" .Ds n .LD (where "n" is a number) -.\" (Numbers don't work in these macros, so ".Ds 5" -.\" comes out the same as ".Ds 0".) -.\" -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft 1 -.ps \\n(PS -.if \\n(VS>=40 .vs \\n(VSu -.if \\n(VS<=39 .vs \\n(VSp -.. -.de D -.ID \\$1 -.. -.de 0D -.LD -.. -.\" backward compatibility for the Xt spec -.de 5D -.LD -.. -.\" -.\" --- De --- obsolete: use .DE instead -.\" -.de De -.DE -.. -.\" -.\" --- FD --- -.\" -.de FD -.LP -.KS -.TA .5i 3i -.ta .5i 3i -.nf -.. -.\" -.\" --- FN --- -.\" -.de FN -.fi -.KE -.LP -.. -.\" -.\" --- IN --- send an index entry to the stderr -.\" -.de IN -.tm \\n%:\\$1:\\$2:\\$3 -.. -.\" -.\" --- C{ --- -.\" -.de C{ -.KS -.nf -.D -.\" -.\" choose appropriate monospace font -.\" the imagen conditional, 480, -.\" may be changed to L if LB is too -.\" heavy for your eyes... -.\" -.ie "\\*(.T"480" .ft L -.el .ie "\\*(.T"300" .ft L -.el .ie "\\*(.T"202" .ft PO -.el .ie "\\*(.T"aps" .ft CW -.el .ft R -.ps \\n(PS -.ie \\n(VS>40 .vs \\n(VSu -.el .vs \\n(VSp -.. -.\" -.\" --- C} --- -.\" -.de C} -.DE -.R -.. -.\" -.\" --- Pn --- like PN, but use $2; $1 and $3 abut -.\" -.de Pn -.IN \\$2 -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.\" -.\" --- PN --- put $1 in boldface and add index entry; $2 abuts -.\" -.de PN -.IN \\$1 -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.\" -.\" --- hI --- add index entry for $1 as header file -.\" -.de hI -.IN <\\$1> -.IN Files <\\$1> -.IN Headers <\\$1> -.. -.\" -.\" --- hN --- put $1 in boldface as header and add index entry; $2 abuts -.\" -.de hN -.hI \\$1 -.ie t <\fB\\$1\fR>\\$2 -.el <\fI\\$1\fP>\\$2 -.. -.\" -.\" --- NT --- -.\" -.de NT -.br -.ne 7 -.ds NO Note -.if \\n(.$ .ds NO \\$1 -.ie n .sp -.el .sp 10p -.ce -\\*(NO -.ie n .sp -.el .sp 5p -.if '\\$1'C' .ce 99 -.if '\\$2'C' .ce 99 -.\" .QS/.QE macros don't exist in older versions of -ms -.ie \\n(GS .QS -.el \{\ -. in +5n -. ll -5n -.\} -.R -.. -.\" -.\" --- NE --- Note End (doug kraft 3/85) -.\" -.de NE -.ce 0 -.ie \\n(GS .QE -.el \{\ -. in -5n -. ll +5n -.\} -.ie n .sp -.el .sp 10p -.. -.\" -.\" --- nH --- numbered header (like NH) but with automatic TOC entry -.\" usage: .nH level "section title, preferable in quotes" -.\" -.de nH -.NH \\$1 -\\$2 -.XS -\\*(SN \\$2 -.XE -.. -.\" -.\" --- sM --- put start-marker in margin -.\" -.de sM -.KS -.sp 1 -\\h'-0.5i'\\L'-1v'\\v'1p'\\l'1v'\\v'1v-1p' -.sp -1 -.. -.\" -.\" --- eM --- put end-marker in margin -.\" -.de eM -.sp -1 -\\h'-0.5i'\\L'-1v'\\v'1v+1p'\\l'1v'\\v'-1p' -.sp 1 -.KE -.. -.\" -.\" --- YZ --- finish up; $1 is the starting page number of the TOC -.\" -.de YZ -. \" Force there to be an even number of pages, so the table of -. \" contents doesn't end up on the back of the last page in -. \" the case of duplex printing. -.if o .bp -. \" Emit a .pn directive with one plus the last page number. - \" This will be the number of the first page of the index. -.nr YZ \\n%+1 -.tm .pn \\n(YZ -. \" Issue the table of contents, setting roman numerals, -. \" and redefining the footer to use them. -.bp \\$1 -.af PN i -.EF ''\\\\\\\\n(PN'' -.OF ''\\\\\\\\n(PN'' -. \" Why all the backslashes? This string is evaluated -. \" three times: 1) during the definition of this macro, -. \" 2) when the .EF and .OF macros are expanded, and 3) -. \" when the bottom-of-page trap is invoked. Thus, -. \" eight backslashes are reduced to one in the final output. -.PX -.. diff --git a/libX11/specs/troffrules.in b/libX11/specs/troffrules.in deleted file mode 100644 index 3e643ecdc..000000000 --- a/libX11/specs/troffrules.in +++ /dev/null @@ -1,93 +0,0 @@ -#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-#
-# 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.
-#
-
-# Based on xc/doc/specs/*/Makefile from X11R6.9
-
-EXTRA_DIST = $(doc_sources)
-
-if HAVE_PS2PDF
-printable_format = .pdf
-else
-printable_format = .ps
-endif
-
-if ENABLE_SPECS
-if HAVE_GROFF_MS
-spec_DATA = $(doc_sources:.ms=.txt) \
- $(doc_sources:.ms=$(printable_format)) \
- $(doc_sources:.ms=.html)
-specdir = $(docdir)/$(subdir)
-imagesdir = $(specdir)/images
-
-CLEANFILES = $(spec_DATA)
-MOSTLYCLEANFILES = index.*
-
-# Install html generated images for specs
-install-data-local:
- test -z "$(imagesdir)" || $(mkdir_p) "$(DESTDIR)$(imagesdir)"
- @d="$(srcdir)/images/"; \
- list=`ls $$d`; \
- for p in $$list; do \
- echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(imagesdir)/$$p'"; \
- $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(imagesdir)/$$p"; \
- done;
-
-uninstall-local:
- @if test -n $(DESTDIR)$(imagesdir); then \
- if test -d $(DESTDIR)$(imagesdir); then \
- list=`ls $(DESTDIR)$(imagesdir)`; \
- for p in $$list; do \
- echo " rm -f '$(DESTDIR)$(imagesdir)/$$p'"; \
- rm -f "$(DESTDIR)$(imagesdir)/$$p"; \
- done \
- fi; \
- fi;
-
-mostlyclean-local:
- @rm -fr images
-
-# Pass version string as a troff string for substitution
-GROFF_DEFS = -dxV="$(PACKAGE_STRING)"
-
-# -e to run through eqn, -t to run through tbl
-GROFF_FLAGS = -e -t -ms $(GROFF_DEFS) -I$(srcdir) $(top_srcdir)/specs/macros.t
-
-SUFFIXES = .ms .ps .txt .html .pdf
-
-.ms.ps:
- -$(AM_V_GEN) $(GROFF) -Tps $(GROFF_FLAGS) $< 2> index.$@.raw > $@
- @if grep '^[^1-9.]' index.$@.raw | grep -v warning; then exit 1; \
- else test $$? -le 1; fi
-
-.ms.txt:
- $(AM_V_GEN) env GROFF_NO_SGR=TRUE $(GROFF) -Tutf8 $(GROFF_FLAGS) \
- $< 2> index.$@.raw > $@
-
-.ms.html:
- $(AM_V_GEN) $(GROFF) $(GROFF_FLAGS) -Thtml -P-Dimages -P-I$*-image $< 2> index.$@.raw > $@
-
-.ps.pdf:
- $(AM_V_GEN) $(PS2PDF) $< $@
-
-endif HAVE_GROFF_MS
-endif ENABLE_SPECS
diff --git a/libXdmcp/Makefile.am b/libXdmcp/Makefile.am index 4dfd0453a..118368ee6 100644 --- a/libXdmcp/Makefile.am +++ b/libXdmcp/Makefile.am @@ -1,3 +1,5 @@ +SUBDIRS=doc
+
lib_LTLIBRARIES = libXdmcp.la
AM_CPPFLAGS = -I${top_srcdir}/include
diff --git a/libXdmcp/configure.ac b/libXdmcp/configure.ac index 1b136320f..a005627ad 100644 --- a/libXdmcp/configure.ac +++ b/libXdmcp/configure.ac @@ -33,6 +33,10 @@ m4_ifndef([XORG_MACROS_VERSION], [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.3)
XORG_DEFAULT_OPTIONS
+XORG_ENABLE_DOCS
+XORG_WITH_XMLTO(0.0.20)
+XORG_WITH_FOP
+XORG_CHECK_SGML_DOCTOOLS(1.5)
AC_PROG_CC
AC_PROG_INSTALL
@@ -61,4 +65,5 @@ XORG_WITH_LINT XORG_LINT_LIBRARY([Xdmcp])
AC_OUTPUT([Makefile
+ doc/Makefile
xdmcp.pc])
diff --git a/libXdmcp/doc/Makefile.am b/libXdmcp/doc/Makefile.am new file mode 100644 index 000000000..ca5f7c9f3 --- /dev/null +++ b/libXdmcp/doc/Makefile.am @@ -0,0 +1,64 @@ +#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# 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.
+#
+
+if ENABLE_DOCS
+doc_sources = xdmcp.xml
+dist_doc_DATA = $(doc_sources)
+
+if HAVE_XMLTO
+doc_DATA = $(doc_sources:.xml=.html)
+
+if HAVE_FOP
+doc_DATA += $(doc_sources:.xml=.ps) $(doc_sources:.xml=.pdf)
+endif
+
+if HAVE_XMLTO_TEXT
+doc_DATA += $(doc_sources:.xml=.txt)
+endif
+
+if HAVE_STYLESHEETS
+XMLTO_FLAGS = -m $(XSL_STYLESHEET)
+
+doc_DATA += xorg.css
+xorg.css: $(STYLESHEET_SRCDIR)/xorg.css
+ $(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@
+endif
+
+CLEANFILES = $(doc_DATA)
+
+SUFFIXES = .xml .ps .pdf .txt .html
+
+.xml.txt:
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $<
+
+.xml.html:
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<
+
+.xml.pdf:
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $<
+
+.xml.ps:
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop ps $<
+
+endif HAVE_XMLTO
+endif ENABLE_DOCS
diff --git a/libXdmcp/doc/xdmcp.xml b/libXdmcp/doc/xdmcp.xml new file mode 100644 index 000000000..2b08ed7a7 --- /dev/null +++ b/libXdmcp/doc/xdmcp.xml @@ -0,0 +1,3895 @@ +<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+
+<book id="xdmcp">
+
+<bookinfo>
+ <title>X Display Manager Control Protocol</title>
+ <subtitle>X.Org Standard</subtitle>
+ <releaseinfo>Version 1.1</releaseinfo>
+ <authorgroup>
+ <author>
+ <firstname>Keith</firstname><surname>Packard</surname>
+ <affiliation><orgname>
+X Consortium,
+Laboratory for Computer Science,
+Massachusetts Institute of Technology
+ </orgname></affiliation>
+ </author>
+ </authorgroup>
+
+ <copyright><year>1989</year><holder>The Open Group</holder></copyright>
+ <copyright><year>2004</year><holder>The Open Group</holder></copyright>
+ <productnumber>X Version 11, Release 6.8</productnumber>
+
+<legalnotice>
+
+
+
+<para>
+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:
+</para>
+<para>
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+</para>
+<para>
+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
+OPEN GROUP 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.
+</para>
+<para>
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+</para>
+
+<para>
+<emphasis remap='I'>X Window System</emphasis> is a trademark of The Open Group.
+</para>
+</legalnotice>
+</bookinfo>
+
+<chapter id="TITLE">
+<title>TITLE</title>
+<sect1 id="Purpose_and_Goals">
+<title>Purpose and Goals</title>
+<!-- .XS -->
+<!-- (SN Purpose and Goals -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+The purpose of the X Display Manager Control Protocol (XDMCP)
+is to provide a uniform mechanism for an autonomous
+display to request login service from a remote host.
+By autonomous, we mean
+the display consists of hardware and processes that are independent of any
+particular host where login service is desired. (For example, the server
+cannot simply be started by a
+<function>fork/exec</function>
+sequence on the host.)
+An X terminal (screen, keyboard, mouse, processor, network interface)
+is a prime example of an autonomous display.
+</para>
+
+<para>
+From the point of view of the end user, it is very important to make
+autonomous displays as easy to use as traditional hardwired character
+terminals. Specifically, you can typically just power on a hardwired
+terminal and be greeted with a login prompt. The same should be possible
+with autonomous displays. However, in a network environment with multiple
+hosts, the end user may want to choose which host(s) to connect to. In an
+environment with many displays and many hosts, a site administrator may want
+to associate particular collections of hosts with particular displays. We
+would like to support the following options:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+The display has a single, fixed host to which it should connect. It should be
+possible to power on the display and receive a login prompt, without user
+intervention.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+Any one of several hosts on a network or subnetwork may be acceptable
+for accepting login from the display.
+(For example, the user's file systems can be mounted onto
+any such host, providing comparable environments.) It should be possible
+for the display to broadcast to find such hosts and to have the display
+either automatically choose a host or present the possible hosts to the
+user for selection.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The display has a fixed set of hosts that it can connect to. It should be
+possible for the display to have that set stored in RAM, but it should also be
+possible for a site administrator to be able to maintain host sets for a
+large number of displays using a centralized facility, without having to
+interact (physically or electronically) with each individual display.
+Particular hosts should be allowed to refuse login service, based on
+whatever local criteria are desired.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+The control protocol should be designed in such a way that it can be used over
+a reasonable variety of communication transport layers. In fact, it is quite
+desirable if every major network protocol family that supports the standard X
+protocol is also capable of supporting XDMCP, because the end result of XDMCP
+negotiation will be standard X protocol connections to the display.
+However, because the number of displays per host may be large,
+a connection-based protocol appears less desirable
+than a connection-less protocol. For this reason the protocol is designed
+to use datagram services with the display responsible for sequencing and
+retransmission.
+</para>
+<para>
+<!-- .LP -->
+To keep the burden on displays at a minimum (because display cost is not
+a factor that can be ignored), it is desirable that displays not be required
+to maintain permanent state (across power cycles) for the purposes
+of the control protocol,
+and it is desirable to keep required state at a minimum while the
+display is powered on.
+</para>
+<para>
+<!-- .LP -->
+Security is an important consideration and must be an integral part of the
+design. The important security goals in the context of XDMCP are:
+</para>
+<itemizedlist>
+ <listitem>
+ <para>
+It should be possible for the display to verify that it is communicating
+with a legitimate host login service. Because the user will present
+credentials (for example, password) to this service,
+it is important to avoid spoof attacks.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+It should be possible for the display and the login service to negotiate the
+authorization mechanism to be used for the standard X protocol.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+It should be possible to provide the same level of security in verifying the
+login service as is provided by the negotiated authorization mechanism.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+Because there are no firm standards yet in the area of security,
+XDMCP must be flexible enough to accomodate a variety of security mechanisms.
+ </para>
+ </listitem>
+</itemizedlist>
+</sect1>
+
+<sect1 id="Overview_of_the_Protocol">
+<title>Overview of the Protocol</title>
+<!-- .XS -->
+<!-- (SN Overview of the Protocol -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+XDMCP is designed to provide authenticated access to display management
+services for remote displays. A new network server, called a \fIDisplay
+Manager\fP, will use XDMCP to communicate with displays to negotiate the
+startup of X sessions. The protocol allows the display to authenticate the
+manager. It also allows most of the configuration information to be
+centralized with the manager and to ease the burden of system administration
+in a large network of displays.
+The essential goal is to provide plug-and-play
+services similar to those provided in the familiar mainframe/terminal world.
+</para>
+<para>
+<!-- .LP -->
+Displays may be turned off by the user at any time. Any existing session
+running on a display that has been turned off must be identifiable. This
+is made possible by requiring a three-way handshake to start a session. If
+the handshake succeeds, any existing session is terminated immediately and a
+new session started. There is the problem (at least with TCP) that
+connections may not be closed when the display is turned off. In most
+environments, the manager should reduce this problem by periodically XSync'ing
+on its own connection, perhaps every five to ten minutes, and terminating the
+session if its own connection ever closes.
+</para>
+<para>
+<!-- .LP -->
+Displays should not be required to retain permanent state for purposes of
+the control protocol. One solution to packets received out of sequence
+would be to use monotonically increasing message identifiers in each message
+to allow both sides to ignore messages that arrive out-of-sequence. For
+this to work, displays would at a minimum have to increment a stable crash
+count each time they are powered on and use that number as part of a
+larger sequence number. But if displays cannot retain permanent state this
+cannot work. Instead, the manager assumes the responsibility for permanent
+state by generating unique numbers that identify a particular session and
+the protocol simply ignores packets that correspond to an invalid session.
+</para>
+<para>
+<!-- .LP -->
+The Manager must not be responsible for packet reception. To prevent the
+Manager from becoming stuck because of a hostile display, no portion of the
+protocol requires the Manager to retransmit a packet. Part of this means
+that any valid packet that the Manager does receive must be
+acknowledged in some way to prevent the display from continuously resending
+packets. The display can keep the protocol running as it will always know
+when the Manager has received (at least one copy of) a packet. On the
+Manager side, this means that any packet may be received more than once (if
+the response was lost) and duplicates must be ignored.
+</para>
+</sect1>
+
+<sect1 id="Data_Types">
+<title>Data Types</title>
+<!-- .XS -->
+<!-- (SN Data Types -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+XDMCP packets contain several types of data. Integer values are always
+stored most significant byte first in the packet ("Big Endian" order).
+As XDMCP will not be used to transport large quantities of data, this
+restriction will not substantially hamper the efficiency of any
+implementation. Also, no padding of any sort will occur within the packets.
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colsep="0"/>
+ <colspec colname='c2' colsep="0"/>
+ <colspec colname='c3' colsep="0"/>
+ <thead>
+ <row>
+ <entry>Type Name</entry>
+ <entry>Length (Bytes)</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>CARD8</entry>
+ <entry>1</entry>
+ <entry>A single byte unsigned integer</entry>
+ </row>
+ <row rowsep="0">
+ <entry>CARD16</entry>
+ <entry>2</entry>
+ <entry>Two byte unsigned integer</entry>
+ </row>
+ <row rowsep="0">
+ <entry>CARD32</entry>
+ <entry>4</entry>
+ <entry>Four byte unsigned integer</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ARRAY8</entry>
+ <entry>n+2</entry>
+ <entry>
+This is actually a CARD16 followed by
+a collection of CARD8. The value of the CARD16
+field (n) specifies the number of CARD8 values to follow
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry>ARRAY16</entry>
+ <entry>2*m+1</entry>
+ <entry>
+This is a CARD8 (m) which specifies the
+number of CARD16 values to follow
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry>ARRAY32</entry>
+ <entry>4*l+1</entry>
+ <entry>
+This is a CARD8 (l) which specifies the
+number of CARD32 values to follow
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry>ARRAYofARRAY8</entry>
+ <entry>?</entry>
+ <entry>
+This is a CARD8 which specifies the
+number of ARRAY8 values to follow.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+</sect1>
+
+<sect1 id="Packet_Format">
+<title>Packet Format</title>
+<!-- .XS -->
+<!-- (SN Packet Format -->
+<!-- .XE -->
+<para>
+All XDMCP packets have the following information:
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='3' align='left'>
+ <colspec colname='c1' colsep="0"/>
+ <colspec colname='c2' colsep="0"/>
+ <colspec colname='c3' colsep="0"/>
+ <thead>
+ <row>
+ <entry>Length (Bytes)</entry>
+ <entry>Field Type</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>2</entry>
+ <entry>CARD16</entry>
+ <entry>version number</entry>
+ </row>
+ <row rowsep="0">
+ <entry>2</entry>
+ <entry>CARD16</entry>
+ <entry>opcode packet header</entry>
+ </row>
+ <row rowsep="0">
+ <entry>2</entry>
+ <entry>CARD16</entry>
+ <entry>n = length of remaining data in bytes</entry>
+ </row>
+ <row rowsep="0">
+ <entry>n</entry>
+ <entry>???</entry>
+ <entry>packet-specific data</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+<!-- .LP -->
+The fields are as follows:
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term>Version number</term>
+ <listitem>
+ <para>
+This specifies the version of XDMCP that generated this packet in
+case changes in this protocol are required. Displays and
+managers may choose to support older versions for compatibility.
+This field will initially be one (1).
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Opcode</term>
+ <listitem>
+ <para>
+This specifies what step of the protocol this packet represents and should
+contain one of the following values (encoding provided in section below):
+<emphasis role="bold">BroadcastQuery</emphasis>,
+<emphasis role="bold">Query</emphasis>,
+<emphasis role="bold">IndirectQuery</emphasis>,
+<emphasis role="bold">ForwardQuery</emphasis>,
+<emphasis role="bold">Willing</emphasis>,
+<emphasis role="bold">Unwilling</emphasis>,
+<emphasis role="bold">Request</emphasis>,
+<emphasis role="bold">Accept</emphasis>,
+<emphasis role="bold">Decline</emphasis>,
+<emphasis role="bold">Manage</emphasis>,
+<emphasis role="bold">Refuse</emphasis>,
+<emphasis role="bold">Failed</emphasis>,
+<emphasis role="bold">KeepAlive</emphasis>
+or
+<emphasis role="bold">Alive</emphasis>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Length of data in bytes</term>
+ <listitem>
+ <para>
+This specifies the length of the information following the first 6 bytes.
+Each packet-type has a different format and will need to be separately
+length-checked against this value. Because every data item has either an
+explicit or implicit length, this can be easily accomplished.
+Packets that have too little or too much data should be ignored.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+<para>
+Packets should be checked to make sure that they satisfy the following
+conditions:
+</para>
+
+<orderedlist>
+ <listitem>
+ <para>
+They must contain valid opcodes.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The length of the remaining data should correspond to the sum of the
+lengths of the individual remaining data items.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The opcode should be expected (a finite state diagram is given
+in a later section).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If the packet is of type
+<emphasis role="bold">Manage</emphasis> or
+<emphasis role="bold">Refuse</emphasis>,
+the Session ID should match the value sent in the preceding
+<emphasis role="bold">Accept</emphasis> packet.
+ </para>
+ </listitem>
+</orderedlist>
+</sect1>
+
+<sect1 id="Protocol">
+<title>Protocol</title>
+<!-- .XS -->
+<!-- (SN Protocol -->
+<!-- .XE -->
+<para>
+Each of the opcodes is described below. Because a given packet type is only
+ever sent one way, each packet description below indicates the direction.
+Most of the packets have additional information included beyond the
+description above. The additional information is appended to the packet
+header in the order described without padding, and the length field is
+computed accordingly.
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='10' align='left'>
+ <colspec colname='col1' colsep="0" colwidth="1*"/>
+ <colspec colname='col2' colsep="0" colwidth="1*"/>
+ <colspec colname='col3' colsep="0" colwidth="1*"/>
+ <colspec colname='col4' colsep="0" colwidth="1*"/>
+ <colspec colname='col5' colsep="0" colwidth="1*"/>
+ <colspec colname='col6' colsep="0" colwidth="1*"/>
+ <colspec colname='col7' colsep="0" colwidth="1*"/>
+ <colspec colname='col8' colsep="0" colwidth="1*"/>
+ <colspec colname='col9' colsep="0" colwidth="1*"/>
+ <colspec colname='col10' colsep="0" colwidth="1*"/>
+ <spanspec namest="col1" nameend="col10" spanname="col1_on" align="left"/>
+ <spanspec namest="col2" nameend="col10" spanname="col2_on" align="left"/>
+ <spanspec namest="col3" nameend="col10" spanname="col3_on" align="left"/>
+ <spanspec namest="col4" nameend="col10" spanname="col4_on" align="left"/>
+ <spanspec namest="col5" nameend="col10" spanname="col5_on" align="left"/>
+ <tbody>
+ <row rowsep="0">
+ <entry spanname="col1_on"><emphasis role="bold">Query</emphasis></entry>
+ </row>
+ <row rowsep="0">
+ <entry spanname="col1_on"><emphasis role="bold">BroadcastQuery</emphasis></entry>
+ </row>
+ <row rowsep="0">
+ <entry spanname="col1_on"><emphasis role="bold">IndirectQuery</emphasis></entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">Display -> Manager</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">Additional Fields:</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis>Authentication Names</emphasis>: ARRAYofARRAY8
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Specifies a list of authentication names that the display supports. The
+manager will choose one of these and return it in the
+<emphasis role="bold">Willing</emphasis> packet.
+ </entry>
+ </row>
+<!-- AAAAAAAAAAAAA -->
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry>Semantics</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+<para>
+A <function>Query</function>
+packet is sent from the display to a specific host to ask if
+that host is willing to provide management services to this display. The
+host should respond with
+<function>Willing</function>
+if it is willing to service the display or
+<function>Unwilling</function>
+if it is not.
+</para>
+
+<para>
+A
+<function>BroadcastQuery</function>
+packet is similar to the
+<function>Query</function>
+packet except that it is intended to be received by all hosts on the network
+(or subnetwork). However, unlike
+<function>Query</function>
+requests, hosts that are not willing to service the display
+should simply ignore
+<function>BroadcastQuery</function>
+requests.
+</para>
+
+<para>
+An
+<function>IndirectQuery</function>
+packet is sent to a well known manager that forwards
+the request to a larger collection of secondary managers using
+<function>ForwardQuery</function>
+packets.
+In this way, the collection of managers that respond can be grouped
+on other than network boundaries; the use of a central manager reduces
+system administrative overhead.
+The primary manager may also send a
+<function>Willing</function>
+packet in response to this packet.
+</para>
+
+<para>
+Each packet type has slightly different semantics:
+</para>
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+<para>
+The
+<function>Query</function>
+packet is destined only for a single host.
+If the display is instructed to
+<function>Query</function>
+multiple managers, it will send multiple
+<function>Query</function>
+packets. The
+<function>Query</function>
+packet also demands a response from the manager, either
+<function>Willing</function>
+or
+<function>Unwilling</function>.
+ </para>
+ <para>
+The
+<function>BroadcastQuery</function>
+packet is sent to many hosts.
+Each manager that receives this packet will not respond with an
+<function>Unwilling</function>
+packet.
+ </para>
+ <para>
+The
+<function>IndirectQuery</function>
+packet is sent to only one manager with the request
+that the request be forwarded to a larger list of managers using
+<function>ForwardQuery</function>
+packets. This list is expected to be maintained at one
+central site to reduce administrative overhead.
+The function of this packet type is similar to
+<function>BroadcastQuery except that</function>
+<function>BroadcastQuery</function>
+is not forwarded.
+ </para>
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">Valid Responses:</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<function>Willing</function>,
+<function>Unwilling</function>
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">Problems/Solutions:</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">Problem:</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+<para>Not all managers receive the query packet.</para>
+<para>Indication:</para>
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+None if
+<function>BroadcastQuery</function>
+or
+<function>IndirectQuery</function>
+was sent, else failure to receive
+<function>Willing</function>.
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">Solution:</entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Repeatedly send the packet while waiting for user to choose a manager.
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Timeout/Retransmission policy:
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+An exponential backoff algorithm should be used here to reduce network load
+for long-standing idle displays. Start at 2 seconds, back off by factors of
+2 to 32 seconds, and discontinue retransmit after 126 seconds. The display
+should reset the timeout when user-input is detected. In this way, the
+display will wakeup when touched by the user.
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry spanname="col1_on">
+<function>ForwardQuery</function>
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+<para>Primary Manager -> Secondary Manager</para>
+<para>Additional Fields:</para>
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Client Address</emphasis>: ARRAY8
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Specifies the network address of the client display.
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Client Port</emphasis>: ARRAY8
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Specifies an identification of the client task on the client display.
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Authentication Names</emphasis>: ARRAYofARRAY8
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Is a duplicate of Authentication Names array that was received
+in the
+<function>IndirectQuery</function>
+packet.
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Semantics:
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+ <para>
+When primary manager receives a
+<function>IndirectQuery</function>
+packet, it is responsible for sending
+<function>ForwardQuery</function>
+packets to an appropriate list of
+managers that can provide service to the display using the same network
+type as the one the original
+<function>IndirectQuery</function>
+packet was received from.
+The Client Address and Client Port fields must contain an
+address that the secondary manager can use to reach the display also using
+this same network. Each secondary manager sends a
+<function>Willing</function>
+packet to the display if it is willing to provide service.
+ </para>
+
+ <para>
+<function>ForwardQuery</function>
+packets are similar to
+<function>BroadcastQuery</function>
+packets in that managers that are not willing to service
+particular displays should not send a
+<function>Unwilling</function>
+packet.
+ </para>
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Valid Responses:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<function>Willing</function>
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Problems/Solutions:
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Identical to
+<function>BroadcastQuery</function>
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Timeout/Retransmission policy:
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Like all packets sent from a manager, this packet should never be
+retransmitted.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry spanname="col1_on">
+<function>Willing</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+ <para>
+Manager -> Display
+ </para>
+ <para>
+Additional Fields:
+ </para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Authentication Name</emphasis>: ARRAY8
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+<para>
+Specifies the authentication method, selected from the list offered in the
+<function>Query ,</function>
+<function>BroadcastQuery ,</function>
+or
+<function>IndirectQuery</function>
+packet that the manger expects the display to use in the subsequent
+<function>Request</function>
+packet.
+This choice should remain as constant as feasible so that displays that
+send multiple
+<function>Query</function>
+packets can use the Authentication Name from any
+<function>Willing</function>
+packet that arrives.
+</para>
+<para>
+The display is free to ignore managers that request an insufficient level
+of authentication.
+</para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Hostname</emphasis>: ARRAY8
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Is a human readable string describing the host from which the packet was sent.
+The protocol specifies no interpretation of the data in this field.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Status</emphasis>: ARRAY8
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Is a human readable string describing the status of the host. This could
+include load average/number of users connected or other information. The
+protocol specifies no interpretation of the data in this field.
+ </entry>
+ </row>
+
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Semantics:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+A
+<function>Willing</function>
+packet is sent by managers that may service connections from
+this display. It is sent in response to either a
+<function>Query ,</function>
+<function>BroadcastQuery ,</function>
+or
+<function>ForwardQuery</function>
+but does not imply a commitment to provide service
+(for example, it may later decide that it has accepted enough
+connections already).
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Problems/Solutions:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Problem:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+<para>
+<function>Willing</function>
+not received by the display.
+</para>
+<para>
+Indication:
+</para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+None if
+<function>BroadcastQuery</function>
+or
+<function>IndirectQuery</function>
+was sent, else failure to receive
+<function>Willing .</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Solution:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+The display should continue to send the query until a response is received.
+ </entry>
+ </row>
+
+
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Timeout/Retransmission policy:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Like all packets sent from the manager to the display, this packet should
+never be retransmitted.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry spanname="col1_on">
+<function>Unwilling</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+ <para>
+Manager -> Display
+ </para>
+ <para>
+Additional Fields:
+ </para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+The Hostname and Status fields as in the
+<function>Willing</function>
+packet.
+The Status field should indicate to the user a reason
+for the refusal of service.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Semantics:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+An
+<function>Unwilling</function>
+packet is sent by managers in response to direct
+<function>Query</function>
+requests (as opposed to
+<function>BroadcastQuery</function>
+or
+<function>IndirectQuery</function>
+requests) if the manager will not accept requests for management.
+This is typically sent by managers that wish to only service
+particular displays or that handle a limited number of displays at once.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Problems/Solutions:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Problem:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+<para>
+<function>Unwilling</function>
+not received by the display.
+</para>
+<para>
+Indication:
+</para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Display fails to receive
+<function>Unwilling .</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Solution:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+The display should continue to send
+<function>Query</function>
+messages until a response is received.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Timeout/Retransmission policy:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Like all packets sent from the manager to the display, this packet should
+never be retransmitted.
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry spanname="col1_on">
+<function>Request</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+ <para>
+Display -> Manager
+ </para>
+ <para>
+Additional Fields:
+ </para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Display Number</emphasis>: CARD16
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Specifies the index of this particular server for the host
+on which the display is resident.
+This value will be zero for most autonomous displays.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Connection Types</emphasis>: ARRAY16
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Specifies an array indicating the stream services accepted by the display.
+If the high-order byte in a particular entry is zero, the low-order byte
+corresponds to an X-protocol host family type.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Connection Addresses</emphasis>: ARRAYofARRAY8
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+For each connection type in the previous array, the corresponding entry in
+this array indicates the network address of the display device.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+ <para>
+<emphasis remap='I'>Authentication Name</emphasis>: ARRAY8
+ </para>
+ <para>
+<emphasis remap='I'>Authentication Data</emphasis>: ARRAY8
+ </para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Specifies the authentication protocol that the display expects
+the manager to validate itself with. The Authentication Data is
+expected to contain data that the manager will interpret, modify
+and use to authenticate itself.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Authorization Names</emphasis>: ARRAYofARRAY8
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Specifies which types of authorization the display supports. The
+manager may decide to reject displays with which it cannot perform
+authorization.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Manufacturer Display ID</emphasis>: ARRAY8
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Can be used by the manager to determine how to decrypt the
+Authentication Data field in this packet. See the section below on
+Manufacturer Display ID Format.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Semantics:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+A
+<function>Request</function>
+packet is sent by a display to a specific host to request a
+session ID in preparation for a establishing a connection. If the manager
+is willing to service a connection to this display, it should return an
+<function>Accept</function>
+packet with a valid session ID and should be ready for a subsequent
+<function>Manage</function>
+request. Otherwise, it should return a
+<function>Decline</function>
+packet.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Valid Responses:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<function>Accept ,</function>
+<function>Decline</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Problems/Solutions:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Problem:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Request not received by manager.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Indication:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Display timeout waiting for response.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Solution:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Display resends
+<function>Request</function>
+message.
+ </entry>
+ </row>
+
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Problem:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Message received out of order by manager.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Indication:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+None.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Solution:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Each time a
+<function>Request</function>
+is sent, the manager sends the Session ID
+associated with the next session in the
+<function>Accept .</function>
+If that next session is not yet started,
+the manager will simply resend with the same Session ID.
+If the session is in progress, the manager will reply
+with a new Session ID; in which case, the
+<function>Accept</function>
+will be discarded by the display.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Timeout/Retransmission policy:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Timeout after 2 seconds, exponential backoff to 32 seconds.
+After no more than 126 seconds, give up and report an error to the user.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry spanname="col1_on">
+<function>Accept</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+ <para>
+Manager -> Display
+ </para>
+ <para>
+Additional Fields:
+ </para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Session ID</emphasis>: CARD32
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Identifies the session that can be started by the manager.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+ <para>
+<emphasis remap='I'>Authentication Name</emphasis>: ARRAY8
+ </para>
+ <para>
+<emphasis remap='I'>Authentication Data</emphasis>: ARRAY8
+ </para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Is the data sent back to the display to authenticate the manager.
+If the Authentication Data is not the value expected by the display, it
+should terminate the protocol at this point and display an error to the user.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+ <para>
+<emphasis remap='I'>Authorization Name</emphasis>: ARRAY8
+ </para>
+ <para>
+<emphasis remap='I'>Authorization Data</emphasis>: ARRAY8
+ </para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Is the data sent to the display to indicate the type of authorization the
+manager will be using in the first call to
+<function>XOpenDisplay</function>
+after the
+<function>Manage</function>
+packet is received.
+ </entry>
+ </row>
+
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Semantics:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<para>
+An
+<function>Accept</function>
+packet is sent by a manager in response to a
+<function>Request</function>
+packet if the manager is willing to establish a connection for the display.
+The Session ID is used to identify this connection from any preceding
+ones and will be used by the display in its subsequent
+<function>Manage</function>
+packet.
+The Session ID is a 32-bit number that is incremented each time an
+<function>Accept</function>
+packet is sent as it must be unique over a reasonably long period of time.
+</para>
+<para>
+If the authentication information is invalid, a
+<function>Decline</function>
+packet will be returned with an appropriate
+<function>Status</function>
+message.
+</para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Problems/Solutions:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Problem:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+<function>Accept</function>
+or
+<function>Decline</function>
+not received by display.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Indication:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Display timeout waiting for response to
+<function>Request .</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Solution:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Display resends
+<function>Request</function>
+message.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Problem:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Message received out of order by display.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Indication:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Display receives
+<function>Accept</function>
+after
+<function>Manage</function>
+has been sent.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Solution:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Display discards
+<function>Accept</function>
+messages after it has sent a
+<function>Manage</function>
+message.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Timeout/Retransmission policy:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Like all packets sent from the manager to the display, this packet should
+never be retransmitted.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry spanname="col1_on">
+<function>Decline</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+ <para>
+Manager -> Display
+ </para>
+ <para>
+Additional Fields:
+ </para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Status</emphasis>: ARRAY8
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Is a human readable string indicating the reason for refusal of
+service.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+ <para>
+<emphasis remap='I'>Authentication Name</emphasis>:
+ARRAY8
+ </para>
+ <para>
+<emphasis remap='I'>Authentication Data</emphasis>:
+ARRAY8
+ </para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Is the data sent back to the display to authenticate the manager. If the
+Authentication Data is not the value expected by the display, it
+should terminate the protocol at this point and display an error to the user.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Semantics:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+A
+<function>Decline</function>
+packet is sent by a manager in response to a
+<function>Request</function>
+packet if the manager is unwilling to establish a connection for the
+display.
+This is allowed even if the manager had responded
+<function>Willing</function>
+to a previous query.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Problems/Solutions:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Same as for
+<function>Accept .</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Timeout/Retransmission policy:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Like all packets sent from a manager to a display, this packet should never
+be retransmitted.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry spanname="col1_on">
+<function>Manage</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+ <para>
+Display -> Manager
+ </para>
+ <para>
+Additional Fields:
+ </para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Session ID</emphasis>: CARD32
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Should contain the nonzero session ID returned in the
+<function>Accept</function>
+packet.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Display Number</emphasis>: CARD16
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Must match the value sent in the previous
+<function>Request</function>
+packet.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Display Class</emphasis>: ARRAY8
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Specifies the class of the display.
+See the Display Class Format section,
+which discusses the format of this field.
+ </entry>
+ </row>
+
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Semantics:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+A
+<function>Manage</function>
+packet is sent by a display to ask the manager to begin a
+session on the display. If the Session ID is correct the manager
+should open a connection; otherwise, it should respond with a
+<function>Refuse</function>
+or
+<function>Failed</function>
+packet, unless the Session ID matches a currently
+running session or a session that has not yet successfully opened the
+display but has not given up the attempt. In this latter case, the
+<function>Manage</function>
+packet should be ignored.
+This will work as stream connections give positive success indication
+to both halves of the stream, and positive failure indication
+to the connection initiator (which will eventually generate a
+<function>Failed</function>
+packet).
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Valid Responses:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+X connection with correct auth info,
+<function>Refuse ,</function>
+<function>Failed .</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Problems/Solutions:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Problem:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+<function>Manage</function>
+not received by manager.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Indication:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Display timeout waiting for response.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Solution:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Display resends
+<function>Manage</function>
+message.
+ </entry>
+ </row>
+
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Problem:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+<function>Manage</function>
+received out of order by manager.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Indication:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Session already in progress with matching Session ID.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Solution:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+<function>Manage</function>
+packet ignored.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Indication:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Session ID does not match next Session ID.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Solution:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+<function>Refuse</function>
+message is sent.
+ </entry>
+ </row>
+
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Problem:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Display cannot be opened on selected stream.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Indication:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Display connection setup fails.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Solution:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+<function>Failed</function>
+message is sent including a human readable reason.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Problem:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Display open does not succeed before a second manage packet is received
+because of a timeout occuring in the display.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Indication:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+<function>Manage</function>
+packet received with Session ID matching the session
+attempting to connect to the display.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Solution:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+<function>Manage</function>
+packet is ignored. As the stream connection will either
+succeed, which will result in an active session, or the stream will
+eventually give up hope of connecting and send a
+<function>Failed</function>
+packet; no response to this
+<function>Manage</function>
+packet is necessary.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Timeout/Retransmission policy:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Timeout after 2 seconds, exponential backoff to 32 seconds. After no more
+than 126 seconds, give up and report an error to the user.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry spanname="col1_on">
+<function>Refuse</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+ <para>
+Manager -> Display
+ </para>
+ <para>
+Additional Fields:
+ </para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Session ID</emphasis>: CARD32
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Should be set to the Session ID received in the
+<function>Manage</function>
+packet.
+ </entry>
+ </row>
+
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Semantics:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+A
+<function>Refuse</function>
+packet is sent by a manager when the Session ID received in the
+<function>Manage</function>
+packet does not match the current Session ID.
+The display should assume that it received an old
+<function>Accept</function>
+packet and should resend its
+<function>Request</function>
+packet.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Problems/Solutions:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Problem:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Error message is lost.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Indication:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Display times out waiting for
+new connection,
+<function>Refuse</function>
+or
+<function>Failed .</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Solution:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Display resends
+<function>Manage</function>
+message.
+ </entry>
+ </row>
+
+
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Timeout/Retransmission policy:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Like all packets sent from a manager to a display, this packet should never be
+retransmitted.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry spanname="col1_on">
+<function>Failed</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+ <para>
+Manager -> Display
+ </para>
+ <para>
+Additional Fields:
+ </para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Session ID</emphasis>: CARD32
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Should be set to the Session ID received in the
+<function>Manage</function>
+packet.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Status</emphasis>: ARRAY8
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Is a human readable string indicating the reason for failure.
+ </entry>
+ </row>
+
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Semantics:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+A
+<function>Failed</function>
+packet is sent by a manager when it has problems establishing
+the initial X connection in response to the
+<function>Manage</function>
+packet.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Problems/Solutions
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Same as for
+<function>Refuse .</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry spanname="col1_on">
+<function>KeepAlive</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+ <para>
+Display -> Manager
+ </para>
+ <para>
+Additional Fields:
+ </para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Display Number</emphasis>: CARD16
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Set to the display index for the display host.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Session ID</emphasis>: CARD32
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Should be set to the Session ID received in the
+<function>Manage</function>
+packet during the negotiation for the current session.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Sematics:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+ <para>
+A
+<function>KeepAlive</function>
+packet can be sent at any time during the session by a
+display to discover if the manager is running.
+The manager should respond with
+<function>Alive</function>
+whenever it receives this type of packet.
+ </para>
+ <para>
+This allows the display to discover when the manager host
+is no longer running.
+A display is not required to send
+<function>KeepAlive</function>
+packets and, upon lack of receipt of
+<function>Alive</function>
+packets, is not required to perform any specific action.
+ </para>
+ <para>
+The expected use of this packet is to terminate an active session when the
+manager host or network link fails. The display should keep track of the
+time since any packet has been received from the manager host and use
+<function>KeepAlive</function>
+packets when a substantial time has elapsed since the
+most recent packet.
+ </para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Valid Responses:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<function>Alive</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Problems/Solutions:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+Problem:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Manager does not receive the packet or display does not receive the response.
+ </entry>
+ </row>
+
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Indication:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+No
+<function>Alive</function>
+packet is returned.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Solution:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col5_on">
+Retransmit the packet with an exponential backoff; start at 2 seconds and
+assume the host is not up after no less than 30 seconds.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry spanname="col1_on">
+<function>Alive</function>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+ <para>
+Manager -> Display
+ </para>
+ <para>
+Additional Fields:
+ </para>
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Session Running</emphasis>: CARD8
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Indicates that the session identified by Session ID is
+currently active. The value is zero if no session is active
+or one if a session
+is active.
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+<emphasis remap='I'>Session ID</emphasis>: CARD32
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col4_on">
+Specifies the ID of the currently running session; if any.
+When no session is active this field should be zero.
+ </entry>
+ </row>
+
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry spanname="col2_on">
+Semantics:
+ </entry>
+ </row>
+
+ <row rowsep="0">
+ <entry></entry>
+ <entry></entry>
+ <entry spanname="col3_on">
+An
+<function>Alive</function>
+packet is sent in response to a
+<function>KeepAlive</function>
+request.
+If a session is currently active on the display, the manager includes the
+Session ID in the packet. The display can use this information to
+determine the status of the manager.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+</sect1>
+
+<sect1 id="Session_Termination">
+<title>Session Termination</title>
+<para>
+When the session is over, the initial connection with the display (the one
+that acknowledges the
+<function>Manage</function>
+packet) will be closed by the manager.
+If only a single session was active on the display,
+all other connections should be closed by the display
+and the display should be reset. If multiple sessions
+are active simultaneously and the display can identify which connections
+belong to the terminated sesssion, those connections should be closed.
+Otherwise, all connections should be closed and the display reset only when
+all sessions have been terminated (that is, all initial connections closed).
+</para>
+
+<para>
+The session may also be terminated at any time by the display if the
+managing host no longer responds to
+<function>KeepAlive</function>
+packets.
+The exact time-outs for sending
+<function>KeepAlive</function>
+packets is not specified in this protocol as the trade off
+should not be fixed between loading an otherwise idle system with spurious
+<function>KeepAlive</function>
+packets and not noticing that the manager host is down for a long time.
+</para>
+</sect1>
+
+<sect1 id="State_Diagrams">
+<title>State Diagrams</title>
+<!-- .XS -->
+<!-- (SN State Diagrams -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+The following state diagrams are designed to cover all actions of both
+the display and the manager. Any packet that is received out-of-sequence
+will be ignored.
+</para>
+<para>
+<!-- .LP -->
+Display:
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term><emphasis remap='I'>start</emphasis>:</term>
+ <listitem>
+ <para>
+User-requested connect to one host -> <emphasis remap='I'>query</emphasis>
+ </para>
+ <para>
+User-requested connect to some host -> <emphasis remap='I'>broadcast</emphasis>
+ </para>
+ <para>
+User-requested connect to site host-list -> <emphasis remap='I'>indirect</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>query</emphasis>:</term>
+ <listitem>
+ <para>
+Send <function>Query</function> packet
+-> <emphasis remap='I'>collect-query</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>collect-query</emphasis>:</term>
+ <listitem>
+ <para>
+Receive <function>Willing</function> ->
+<emphasis remap='I'>start-connection</emphasis>
+ </para>
+ <para>
+Receive <function>Unwilling</function> ->
+<emphasis remap='I'>stop-connection</emphasis>
+ </para>
+ <para>
+Timeout -> <emphasis remap='I'>query</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><emphasis remap='I'>broadcast</emphasis>:</term>
+ <listitem>
+ <para>
+Send <function>BroadcastQuery</function> packet
+ </para>
+ <para>
+-> <emphasis remap='I'>collect-broadcast-query</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>collect-broadcast-query</emphasis>:</term>
+ <listitem>
+ <para>
+Receive <function>Willing</function> ->
+<emphasis remap='I'>update-broadcast-willing</emphasis>
+ </para>
+ <para>
+User-requested connect to one host ->
+<emphasis remap='I'>start-connection</emphasis>
+ </para>
+ <para>
+Timeout -> <emphasis remap='I'>broadcast</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>update-broadcast-willing</emphasis>:</term>
+ <listitem>
+ <para>
+Add new host to the host list presented to the user
+ </para>
+ <para>
+-> <emphasis remap='I'>collect-broadcast-query</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>indirect</emphasis>:</term>
+ <listitem>
+ <para>
+Send <function>IndirectQuery</function> packet
+ </para>
+ <para>
+-> <emphasis remap='I'>collect-indirect-query</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>collect-indirect-query</emphasis>:</term>
+ <listitem>
+ <para>
+Receive <function>Willing</function> ->
+<emphasis remap='I'>update-indirect-willing</emphasis>
+ </para>
+ <para>
+User-requested connect to one host ->
+<emphasis remap='I'>start-connection</emphasis>
+ </para>
+ <para>
+Timeout -> <emphasis remap='I'>indirect</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>update-indirect-willing</emphasis>:</term>
+ <listitem>
+ <para>
+Add new host to the host list presented to the user
+ </para>
+ <para>
+-> <emphasis remap='I'>collect-indirect-query</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><emphasis remap='I'>start-connection</emphasis>:</term>
+ <listitem>
+ <para>
+Send <function>Request</function> packet
+ </para>
+ <para>
+-> <emphasis remap='I'>await-request-response</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>await-request-response</emphasis>:</term>
+ <listitem>
+ <para>
+Receive <function>Accept</function> ->
+<emphasis remap='I'>manage</emphasis>
+ </para>
+ <para>
+Receive <function>Decline</function> ->
+<emphasis remap='I'>stop-connection</emphasis>
+ </para>
+ <para>
+Timeout -> <emphasis remap='I'>start-connection</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>manage</emphasis>:</term>
+ <listitem>
+ <para>
+Save Session ID
+ </para>
+ <para>
+Send <function>Manage</function> packet with Session ID
+ </para>
+ <para>
+-> <emphasis remap='I'>await-manage-response</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>await-manage-response</emphasis>:</term>
+ <listitem>
+ <para>
+Receive <function>XOpenDisplay :</function> ->
+<emphasis remap='I'>run-session</emphasis>
+ </para>
+ <para>
+Receive <function>Refuse</function> with matching Session ID
+-> <emphasis remap='I'>start-connection</emphasis>
+ </para>
+ <para>
+Receive <function>Failed</function> with matching Session ID
+-> <emphasis remap='I'>stop-connection</emphasis>
+ </para>
+ <para>
+Timeout -> <emphasis remap='I'>manage</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>stop-connection</emphasis>:</term>
+ <listitem>
+ <para>
+Display cause of termination to user
+ </para>
+ <para>
+-> <emphasis remap='I'>start</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>run-session</emphasis>:</term>
+ <listitem>
+ <para>
+Decide to send <function>KeepAlive</function> packet ->
+<emphasis remap='I'>keep-alive</emphasis>
+ </para>
+ <para>
+wait close of first display connection
+ </para>
+ <para>
+-> <emphasis remap='I'>reset-display</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>keep-alive</emphasis>:</term>
+ <listitem>
+ <para>
+Send <function>KeepAlive</function> packet with current Session ID
+ </para>
+ <para>
+-> <emphasis remap='I'>await-alive</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>await-alive</emphasis>:</term>
+ <listitem>
+ <para>
+Receive <function>Alive</function> with matching Session ID ->
+<emphasis remap='I'>run-session</emphasis>
+ </para>
+ <para>
+Receive <function>Alive</function> with nonmatching Session ID
+or FALSE Session Running -> <emphasis remap='I'>reset-display</emphasis>
+ </para>
+ <para>
+Final timeout without receiving <function>Alive</function>
+packet -> <emphasis remap='I'>reset-display</emphasis>
+ </para>
+ <para>
+Timeout -> <emphasis remap='I'>keep-alive</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>reset-display</emphasis>:</term>
+ <listitem>
+ <para>
+(if possible) -> close all display connections associated with this session
+ </para>
+ <para>
+Last session -> close all display connections
+ </para>
+ <para>
+-> <emphasis remap='I'>start</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+
+<para>
+Manager:
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term><emphasis remap='I'>idle</emphasis>:</term>
+ <listitem>
+ <para>
+Receive <function>Query</function> ->
+<emphasis remap='I'>query-respond</emphasis>
+ </para>
+ <para>
+Receive
+<function>BroadcastQuery</function>
+-> <emphasis remap='I'>broadcast-respond</emphasis>
+ </para>
+ <para>
+Receive
+<function>IndirectQuery</function>
+-> <emphasis remap='I'>indirect-respond</emphasis>
+ </para>
+ <para>
+Receive
+<function>ForwardQuery</function>
+-> <emphasis remap='I'>forward-respond</emphasis>
+Receive
+ </para>
+ <para>
+<function>Request</function>
+-> <emphasis remap='I'>request-respond</emphasis>
+ </para>
+ <para>
+Receive
+<function>Manage</function>
+-> <emphasis remap='I'>manage</emphasis>
+ </para>
+ <para>
+An active session terminates
+-> <emphasis remap='I'>finish-session</emphasis>
+ </para>
+ <para>
+Receive <function>KeepAlive</function>
+-> <emphasis remap='I'>send-alive</emphasis>
+ </para>
+ <para>
+-> <emphasis remap='I'>idle</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>query-respond</emphasis>:</term>
+ <listitem>
+ <para>
+If willing to manage -> <emphasis remap='I'>send-willing</emphasis>
+ </para>
+ <para>
+-> <emphasis remap='I'>send-unwilling</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>broadcast-respond</emphasis>:</term>
+ <listitem>
+ <para>
+If willing to manage -> <emphasis remap='I'>send-willing</emphasis>
+ </para>
+ <para>
+-> <emphasis remap='I'>idle</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>indirect-respond</emphasis>:</term>
+ <listitem>
+ <para>
+Send <function>ForwardQuery</function>
+packets to all managers on redirect list
+ </para>
+ <para>
+If willing to manage -> <emphasis remap='I'>send-willing</emphasis>
+ </para>
+ <para>
+-> <emphasis remap='I'>idle</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>forward-respond</emphasis>:</term>
+ <listitem>
+ <para>
+Decode destination address, if willing to manage ->
+<emphasis remap='I'>send-willing</emphasis>
+ </para>
+ <para>
+-> <emphasis remap='I'>idle</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>send-willing</emphasis>:</term>
+ <listitem>
+ <para>
+Send <function>Willing</function> packet
+ </para>
+ <para>
+-> <emphasis remap='I'>idle</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>send-unwilling</emphasis>:</term>
+ <listitem>
+ <para>
+Send <function>Unwilling</function> packet
+-> <emphasis remap='I'>idle</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>request-respond</emphasis>:</term>
+ <listitem>
+ <para>
+If manager is willing to allow a session on display
+-> <emphasis remap='I'>accept-session</emphasis>
+ </para>
+ <para>
+-> <emphasis remap='I'>decline-session</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>accept-session</emphasis>:</term>
+ <listitem>
+ <para>
+Generate Session ID and save Session ID, display address, and
+display number somewhere
+ </para>
+ <para>
+Send <function>Accept</function> packet
+ </para>
+ <para>
+-> <emphasis remap='I'>idle</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>decline-session</emphasis>:</term>
+ <listitem>
+ <para>
+Send <function>Decline</function> packet
+ </para>
+ <para>
+-> <emphasis remap='I'>idle</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>manage</emphasis>:</term>
+ <listitem>
+ <para>
+If Session ID matches saved Session ID ->
+<emphasis remap='I'>run-session</emphasis>
+ </para>
+ <para>
+If Session ID matches Session ID of session in process of
+starting up, or currently active session ->
+<emphasis remap='I'>idle</emphasis>
+ </para>
+ <para>
+-> <emphasis remap='I'>refuse</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>refuse</emphasis>:</term>
+ <listitem>
+ <para>
+Send <function>Refuse</function> packet
+ </para>
+ <para>
+-> <emphasis remap='I'>idle</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>run-session</emphasis>:</term>
+ <listitem>
+ <para>
+Terminate any session in progress
+ </para>
+ <para>
+<function>XOpenDisplay</function>
+ </para>
+ <para>
+Open display succeeds ->
+<emphasis remap='I'>start-session</emphasis>
+ </para>
+ <para>
+-> <emphasis remap='I'>failed</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>failed</emphasis>:</term>
+ <listitem>
+ <para>
+Send <function>Failed</function> packet
+ </para>
+ <para>
+-> <emphasis remap='I'>idle</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>start-session</emphasis>:</term>
+ <listitem>
+ <para>
+Start a new session
+ </para>
+ <para>
+-> <emphasis remap='I'>idle</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>finish-session</emphasis>:</term>
+ <listitem>
+ <para>
+<function>XCloseDisplay</function>
+ </para>
+ <para>
+-> <emphasis remap='I'>idle</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>send-alive</emphasis>:</term>
+ <listitem>
+ <para>
+Send <function>Alive</function> packet containing current status
+ </para>
+ <para>
+-> <emphasis remap='I'>idle</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</sect1>
+
+<sect1 id="Protocol_Encoding">
+<title>Protocol Encoding</title>
+<para>
+When XDMCP is implemented on top of the Internet User Datagram Protocol (UDP),
+port number 177 is to be used. When using UDP over IPv4, Broadcast Query
+packets are sent via UDP broadcast. When using UDP over IPv6, Broadcast Query
+packets are sent via multicast, either to an address in the IANA registered
+XDMCP multicast address range of
+FF0<emphasis remap='I'>X</emphasis>:0:0:0:0:0:0:12B
+(where the <emphasis remap='I'>X</emphasis> is replaced by a valid scope id)
+or to a locally assigned
+multicast address. The version number in all packets will be 1.
+Packet opcodes are 16-bit integers.
+</para>
+
+<informaltable frame="none">
+ <tgroup cols='2' align='left'>
+ <colspec colname='c1' colsep="0"/>
+ <colspec colname='c2' colsep="0"/>
+ <thead>
+ <row>
+ <entry>Packet Name</entry>
+ <entry>Encoding</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep="0">
+ <entry>BroadcastQuery</entry>
+ <entry>1</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Query</entry>
+ <entry>2</entry>
+ </row>
+ <row rowsep="0">
+ <entry>IndirectQuery</entry>
+ <entry>3</entry>
+ </row>
+ <row rowsep="0">
+ <entry>ForwardQuery</entry>
+ <entry>4</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Willing</entry>
+ <entry>5</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Unwilling</entry>
+ <entry>6</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Request</entry>
+ <entry>7</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Accept</entry>
+ <entry>8</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Decline</entry>
+ <entry>9</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Manage</entry>
+ <entry>10</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Refuse</entry>
+ <entry>11</entry>
+ </row>
+ <row rowsep="0">
+ <entry>Failed</entry>
+ <entry>12</entry>
+ </row>
+ <row rowsep="0">
+ <entry>KeepAlive</entry>
+ <entry>13
+<footnote><para>
+A previous version of this document incorrectly reversed the opcodes of
+<emphasis role="bold">Alive</emphasis> and
+<emphasis role="bold">KeepAlive</emphasis>.
+</para></footnote>
+ </entry>
+ </row>
+ <row rowsep="0">
+ <entry>Alive</entry>
+ <entry>14
+<footnote><para>
+A previous version of this document incorrectly reversed the opcodes of
+<emphasis role="bold">Alive</emphasis> and
+<emphasis role="bold">KeepAlive</emphasis>.
+</para></footnote>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+Per packet information follows:
+</para>
+
+<para>
+<function>Query</function>,
+<function>BroadcastQuery</function>,
+<function>IndirectQuery</function>
+</para>
+
+<literallayout class="monospaced">
+ 2 CARD16 version number (always 1)
+ 2 CARD16 opcode (always Query, BroadcastQuery or IndirectQuery)
+ 2 CARD16 length
+ 1 CARD8 number of Authentication Names sent (m)
+ 2 CARD16 length of first Authentication Name (m<emphasis role="subscript">1</emphasis>)
+ m<emphasis role="subscript">1</emphasis> CARD8 first Authentication Name
+ ... Other Authentication Names
+</literallayout>
+
+<para>
+Note that these three packets are identical except for the opcode field.
+</para>
+
+<literallayout class="monospaced">
+<function>ForwardQuery</function>
+ 2 CARD16 version number (always 1)
+ 2 CARD16 opcode (always ForwardQuery)
+ 2 CARD16 length
+ 2 CARD16 length of Client Address (m)
+ m CARD8 Client Address
+ 2 CARD16 length of Client Port (n)
+ n CARD8 Client Port
+ 1 CARD8 number of Authentication Names sent (o)
+ 2 CARD16 length of first Authentication Name (o<emphasis role="subscript">1</emphasis>)
+ o<emphasis role="subscript">1</emphasis> CARD8 first Authentication Name
+ ... Other Authentication Names
+</literallayout>
+
+<literallayout class="monospaced">
+<function>Willing</function>
+ 2 CARD16 version number (always 1)
+ 2 CARD16 opcode (always Willing)
+ 2 CARD16 length (6 + m + n + o)
+ 2 CARD16 Length of Authentication Name (m)
+ m CARD8 Authentication Name
+ 2 CARD16 Hostname length (n)
+ n CARD8 Hostname
+ 2 CARD16 Status length (o)
+ o CARD8 Status
+</literallayout>
+
+<literallayout class="monospaced">
+<function>Unwilling</function>
+ 2 CARD16 version number (always 1)
+ 2 CARD16 opcode (always Unwilling)
+ 2 CARD16 length (4 + m + n)
+ 2 CARD16 Hostname length (m)
+ m CARD8 Hostname
+ 2 CARD16 Status length (n)
+ n CARD8 Status
+</literallayout>
+
+<literallayout class="monospaced">
+<function>Request</function>
+ 2 CARD16 version number (always 1)
+ 2 CARD16 opcode (always Request)
+ 2 CARD16 length
+ 2 CARD16 Display Number
+ 1 CARD8 Count of Connection Types (m)
+ 2xm CARD16 Connection Types
+ 1 CARD8 Count of Connection Addresses (n)
+ 2 CARD16 Length of first Connection Address (n<emphasis role="subscript">1</emphasis>)
+ n<emphasis role="subscript">1</emphasis> CARD8 First Connection Address
+ ... Other connection addresses
+ 2 CARD16 Length of Authentication Name (o)
+ o CARD8 Authentication Name
+ 2 CARD16 Length of Authentication Data (p)
+ p CARD8 Authentication Data
+ 1 CARD8 Count of Authorization Names (q)
+ 2 CARD16 Length of first Authorization Name (q<emphasis role="subscript">1</emphasis>)
+ q<emphasis role="subscript">1</emphasis> CARD8 First Authorization Name
+ ... Other authorization names
+ 2 CARD16 Length of Manufacturer Display ID (r)
+ r CARD8 Manufacturer Display ID
+</literallayout>
+
+<literallayout class="monospaced">
+<function>Accept</function>
+ 2 CARD16 version number (always 1)
+ 2 CARD16 opcode (always Accept)
+ 2 CARD16 length (12 + n + m + o + p)
+ 4 CARD32 Session ID
+ 2 CARD16 Length of Authentication Name (n)
+ n CARD8 Authentication Name
+ 2 CARD16 Length of Authentication Data (m)
+ m CARD8 Authentication Data
+ 2 CARD16 Length of Authorization Name (o)
+ o CARD8 Authorization Name
+ 2 CARD16 Length of Authorization Data (p)
+ p CARD8 Authorization Data
+</literallayout>
+
+<literallayout class="monospaced">
+<function>Decline</function>
+ 2 CARD16 version number (always 1)
+ 2 CARD16 opcode (always Decline)
+ 2 CARD16 length (6 + m + n + o)
+ 2 CARD16 Length of Status (m)
+ m CARD8 Status
+ 2 CARD16 Length of Authentication Name (n)
+ n CARD8 Authentication Name
+ 2 CARD16 Length of Authentication Data (o)
+ o CARD8 Authentication Data
+</literallayout>
+
+<literallayout class="monospaced">
+<function>Manage</function>
+ 2 CARD16 version number (always 1)
+ 2 CARD16 opcode (always Manage)
+ 2 CARD16 length (8 + m)
+ 4 CARD32 Session ID
+ 2 CARD16 Display Number
+ 2 CARD16 Length of Display Class (m)
+ m CARD8 Display Class
+</literallayout>
+
+<literallayout class="monospaced">
+<function>Refuse</function>
+ 2 CARD16 version number (always 1)
+ 2 CARD16 opcode (always Refuse)
+ 2 CARD16 length (4)
+ 4 CARD32 Session ID
+</literallayout>
+
+<literallayout class="monospaced">
+<function>Failed</function>
+ 2 CARD16 version number (always 1)
+ 2 CARD16 opcode (always Failed)
+ 2 CARD16 length (6 + m)
+ 4 CARD32 Session ID
+ 2 CARD16 Length of Status (m)
+ m CARD8 Status
+</literallayout>
+
+<literallayout class="monospaced">
+<function>KeepAlive</function>
+ 2 CARD16 version number (always 1)
+ 2 CARD16 opcode (always KeepAlive)
+ 2 CARD16 length (6)
+ 2 CARD16 Display Number
+ 4 CARD32 Session ID
+</literallayout>
+
+<literallayout class="monospaced">
+<function>Alive</function>
+ 2 CARD16 version number (always 1)
+ 2 CARD16 opcode (always Alive)
+ 2 CARD16 length (5)
+ 1 CARD8 Session Running (0: not running 1: running)
+ 4 CARD32 Session ID (0: not running)
+</literallayout>
+</sect1>
+
+<sect1 id="Display_Class_Format">
+<title>Display Class Format</title>
+<!-- .XS -->
+<!-- (SN Display Class Format -->
+<!-- .XE -->
+<para>
+The Display Class field of the
+<function>Manage</function>
+packet is used by the display manager to collect common sorts of
+displays into manageable groups. This field is a string encoded of
+ISO-LATIN-1 characters in the following format:
+</para>
+
+<literallayout class="monospaced">
+<emphasis remap='I'>ManufacturerID</emphasis>-<emphasis remap='I'>ModelNumber</emphasis>
+</literallayout>
+
+<para>
+Both elements of this string must exclude characters of the set
+{ <function>-</function>,
+<function>.</function>,
+<function>:</function>,
+<function>*</function>,
+<function>?</function>,
+<emphasis remap='I'><space></emphasis> }.
+The ManufacturerID is a string that should be registered
+with the X Consortium.
+The ModelNumber is designed to identify characteristics of the display
+within the manufacturer's product line.
+This string should be documented in the users manual for the
+particular device and should probably not be specifiable by the
+display user to avoid unexpected configuration errors.
+</para>
+</sect1>
+
+<sect1 id="Manufacturer_Display_ID_Format">
+<title>Manufacturer Display ID Format</title>
+<!-- .XS -->
+<!-- (SN Manufacturer Display ID Format -->
+<!-- .XE -->
+<para>
+To authenticate the manager, the display and manager will share a private
+key.
+The manager, then, must be able to discover which key to use for a
+particular device.
+The Manufacturer Display ID field of the
+<function>Request</function>
+packet is intended for this purpose. Typically, the manager host will
+contain a map between this number and the key. This field is intended to be
+unique per display, possibly the ethernet address of the display in the form:
+</para>
+
+<literallayout class="monospaced">
+-Ethernet-8:0:2b:a:f:d2
+</literallayout>
+
+<para>
+It can also be a string of the form:
+</para>
+
+<literallayout class="monospaced">
+<emphasis remap='I'>ManufacturerID</emphasis>-<emphasis remap='I'>ModelNumber</emphasis>-<emphasis remap='I'>SerialNumber</emphasis>
+</literallayout>
+
+<para>
+The ManufacturerID, ModelNumber and SerialNumber are encoded using
+ISO-LATIN-1 characters, excluding {
+<function>-</function>,
+<function>.</function>,
+<function>*</function>,
+<function>?</function>,
+<emphasis remap='I'><space></emphasis> }
+</para>
+
+<para>
+When the display is shipped to a customer, it should include both the
+Manufacturer Display ID and the private key in the documentation set.
+This information should not be modifiable by the display user.
+</para>
+
+</sect1>
+
+<sect1 id="Authentication">
+<title>Authentication</title>
+<!-- .XS -->
+<!-- (SN Authentication -->
+<!-- .XE -->
+<para>
+In an environment where authentication is not needed, XDMCP can disable
+authentication by having the display send empty Authentication Name
+and Authentication Data fields in the
+<function>Request</function>
+packet.
+In this case, the manager will not attempt to authenticate itself.
+Other authentication protocols may be developed, depending on local needs.
+</para>
+
+<para>
+In an unsecure environment, the display must be able to verify that the
+source of the various packets is a trusted manager. These packets will
+contain authentication information. As an example of such a system, the
+following discussion describes the "XDM-AUTHENTICATION-1" authentication
+system. This system uses a 56-bit shared private key, and 64 bits of
+authentication data. An associated example X authorization protocol
+"XDM-AUTHORIZATION-1" will also be discussed. The 56-bit key is represented
+as a 64-bit number in network order (big endian). This means that the first
+octet in the representation will be zero. When incrementing a 64-bit value,
+the 8 octets of data will be interpreted in network order (big endian).
+That is, the last octet will be incremented, subsequent carries propogate
+towards the first octet.
+</para>
+
+<para>
+Assumptions:
+</para>
+
+<orderedlist>
+ <listitem>
+ <para>
+The display and manager share a private key. This key could be programmed
+into the display by the manufacturer and shipped with the unit. It must not
+be available from the display itself, but should allow the value to be
+modified in some way. The system administrator would be responsible for
+managing a database of terminal keys.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The display can generate random authentication numbers.
+ </para>
+ </listitem>
+</orderedlist>
+
+<para>
+Some definitions first:
+</para>
+
+<!-- FIXME: -->
+<!-- double chk math symbols, use mathml to display them? -->
+<itemizedlist>
+ <listitem>
+ <para>
+{D}= encryption of plain text D by key κ
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+{Δ}*κ = decryption of crypto text Δ with key κ
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+τ = private key shared by display and manager
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ρ = 64 bit random number generated by display
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+α = authentication data in XDMCP packets
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+σ = per-session private key, generated by manager
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+β = authorization data
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+Encryption will use the Data Encryption Standard (DES, FIPS 46-3); blocks
+shorter than 64 bits will be zero-filled
+on the right to 64 bits. Blocks longer than 64 bits will use block chaining:
+</para>
+<para>
+{D}κ = {D1 }κ {D2 xor {D1 }κ }κ
+</para>
+
+<para>
+The display generates the first authentication data in the
+<function>Request</function>
+packet:
+</para>
+
+<para>
+αRequest = {ρ}τ
+
+</para>
+
+<para>
+For the <function>Accept</function>
+packet, the manager decrypts the initial message and returns
+αAccept:
+
+</para>
+
+<para>
+ρ = {α Request } *τ
+</para>
+
+<para>
+α Accept = { ρ + 1}τ
+</para>
+
+<para>
+The <function>Accept</function>
+packet also contains the authorization intended for use by
+the X server. A description of authorization type "XDM-AUTHORIZATION-1"
+follows.
+</para>
+
+<para>
+The <function>Accept</function>
+packet contains the authorization name
+"XDM-AUTHORIZATION-1". The authorization data is the string:
+</para>
+<para>
+β Accept = {σ}τ
+</para>
+
+<para>
+To create authorization information for connection setup with the X server
+using the XDM-AUTHORIZATION-1 authorization protocol, the client computes the
+following:
+</para>
+<para>
+N mark = "X client identifier"
+</para>
+<para>
+T lineup = "Current time in seconds on client host (32 bits)"
+</para>
+<para>
+β = {ρNT}σ
+</para>
+
+<para>
+For TCP connections @N@ is 48 bits long and contains the 32-bit IPv4 address of
+the client host followed by the 16-bit port number of the client socket.
+Formats for other connections must be registered.
+The resulting value, β, is 192 bits of authorization data that is sent
+in the connection setup to the server. The server receives the packet,
+decrypts the contents. To accept the connection, the following must hold:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ρ must match the value generated for the most recent XDMCP negotiation.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+T must be within 1200 seconds of the internally stored time. If no time
+been received before, the current time is set to @T@.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+No packet containing the same pair (N, T) can have been received
+in the last 1200 seconds (20 minutes).
+ </para>
+ </listitem>
+</itemizedlist>
+</sect1>
+</chapter>
+</book>
diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac index 979f4db86..50313b616 100644 --- a/xorg-server/configure.ac +++ b/xorg-server/configure.ac @@ -32,12 +32,13 @@ AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
+# Require xorg-macros minimum of 1.10 for XORG_CHECK_SGML_DOCTOOLS
m4_ifndef([XORG_MACROS_VERSION],
- [m4_fatal([must install xorg-macros 1.6 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.6)
+ [m4_fatal([must install xorg-macros 1.10 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.10)
XORG_DEFAULT_OPTIONS
XORG_WITH_DOXYGEN(1.6.1)
+XORG_CHECK_SGML_DOCTOOLS(1.5)
m4_ifndef([XORG_FONT_MACROS_VERSION], [m4_fatal([must install fontutil 1.1 or later before running autoconf/autogen])])
XORG_FONT_MACROS_VERSION(1.1)
@@ -2182,6 +2183,7 @@ dbe/Makefile dix/Makefile
doc/Makefile
doc/xml/Makefile
+doc/xml/dtrace/Makefile
doc/xml/xserver.ent
fb/Makefile
record/Makefile
diff --git a/xorg-server/doc/xml/Makefile.am b/xorg-server/doc/xml/Makefile.am index 3eba24e8c..2913eff55 100644 --- a/xorg-server/doc/xml/Makefile.am +++ b/xorg-server/doc/xml/Makefile.am @@ -21,6 +21,8 @@ # DEALINGS IN THE SOFTWARE.
#
+SUBDIRS = dtrace
+
XML_FILES = Xserver-spec.xml
include xmlrules.in
diff --git a/xorg-server/doc/xml/Xserver-spec.xml b/xorg-server/doc/xml/Xserver-spec.xml index 7249d4267..a457063bd 100644 --- a/xorg-server/doc/xml/Xserver-spec.xml +++ b/xorg-server/doc/xml/Xserver-spec.xml @@ -357,11 +357,15 @@ Resource types are integer values starting at 1. Get a resource type by calling
<blockquote><programlisting>
- RESTYPE CreateNewResourceType(deleteFunc)
+ RESTYPE CreateNewResourceType(deleteFunc, char *name)
</programlisting></blockquote>
deleteFunc will be called to destroy all resources with this
-type.</para>
+type. name will be used to identify this type of resource
+to clients using the X-Resource extension, to security
+extensions such as SELinux, and to tracing frameworks such as DTrace.
+[The name argument was added in xorg-server 1.8.]
+</para>
<para>
Resource classes are masks starting at 1 << 31 which can
be or'ed with any resource type to provide attributes for the
diff --git a/xorg-server/doc/xml/dtrace/Makefile.am b/xorg-server/doc/xml/dtrace/Makefile.am new file mode 100644 index 000000000..946fba7d8 --- /dev/null +++ b/xorg-server/doc/xml/dtrace/Makefile.am @@ -0,0 +1,36 @@ +#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# 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.
+#
+
+XML_FILES = Xserver-DTrace.xml
+
+include ../xmlrules.in
+
+if XSERVER_DTRACE
+doc_DATA = $(BUILT_DOC_FILES)
+else
+noinst_DATA = $(BUILT_DOC_FILES)
+endif
+
+CLEANFILES = $(CLEAN_DOC_FILES)
+
+EXTRA_DIST = $(XML_FILES)
diff --git a/xorg-server/doc/xml/dtrace/Xserver-DTrace.xml b/xorg-server/doc/xml/dtrace/Xserver-DTrace.xml new file mode 100644 index 000000000..e0425c8ee --- /dev/null +++ b/xorg-server/doc/xml/dtrace/Xserver-DTrace.xml @@ -0,0 +1,579 @@ +<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+ <!ENTITY % defs SYSTEM "/xserver/doc/xml/xserver.ent"> %defs;
+]>
+
+<article id="Xserver-DTrace">
+ <articleinfo>
+ <title>Xserver provider for DTrace</title>
+ <author>
+ <firstname>Alan</firstname><surname>Coopersmith</surname>
+ <affiliation>
+ <orgname>Oracle Corporation</orgname>
+ <orgdiv>Solaris Engineering</orgdiv>
+ </affiliation>
+ </author>
+ <releaseinfo>X.Org Xserver version &xserver.version;</releaseinfo>
+ <legalnotice>
+ <para>
+Copyright (c) 2005, 2006, 2007, 2010, Oracle and/or its affiliates.
+All rights reserved.
+ </para><para>
+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:
+ </para><para>
+The above copyright notice and this permission notice (including the next
+paragraph) shall be included in all copies or substantial portions of the
+Software.
+ </para><para>
+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.
+ </para>
+ </legalnotice>
+ </articleinfo>
+
+ <sect1 id="introduction">
+ <title>Introduction</title>
+ <para>
+ This page provides details on a
+ <ulink url="http://wikis.sun.com/display/DTrace/Statically+Defined+Tracing+for+User+Applications">statically defined user application tracing provider</ulink>
+ for the
+ <ulink url="http://hub.opensolaris.org/bin/view/Community+Group+dtrace/">DTrace</ulink>
+ facility in <productname>Solaris</productname> 10,
+ <productname>MacOS X</productname> 10.5, and later releases. This
+ provider instruments various points in the X server, to allow
+ tracing what client applications are up to.
+ </para>
+
+ <para>
+ The provider was integrated into the X.Org git master repository
+ with Solaris 10 & OpenSolaris support for the Xserver 1.4 release,
+ released in 2007 with X11R7.3. Support for DTrace on MacOS X
+ was added in Xserver 1.7.
+ </para>
+
+ <para>
+ These probes expose the request and reply structure of the X protocol
+ between clients and the X server, so an understanding of that basic
+ nature will aid in learning how to use these probes.
+ </para>
+ </sect1>
+
+ <sect1 id="probes">
+ <title>Available probes</title>
+
+ <para>
+ Due to the way User-Defined DTrace probes work, arguments to
+ these probes all bear undistinguished names of
+ <parameter>arg0</parameter>, <parameter>arg1</parameter>,
+ <parameter>arg2</parameter>, etc. These tables should help you
+ determine what the real data is for each of the probe arguments.
+
+ <table>
+ <title>Probes and their arguments</title>
+ <tgroup cols='7'>
+ <colspec colname="probe" colwidth="2*"/>
+ <colspec colname="desc" colwidth="3*"/>
+ <colspec colname="arg0" colwidth="1*"/>
+ <colspec colname="arg1" colwidth="1*"/>
+ <colspec colname="arg2" colwidth="1*"/>
+ <colspec colname="arg3" colwidth="1*"/>
+ <colspec colname="arg4" colwidth="1*"/>
+ <spanspec spanname="all" namest="probe" nameend="arg4"/>
+ <thead>
+ <row>
+ <entry>Probe name</entry>
+ <entry>Description</entry>
+ <entry>arg0</entry>
+ <entry>arg1</entry>
+ <entry>arg2</entry>
+ <entry>arg3</entry>
+ <entry>arg4</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry spanname="all" class="grouphead">Request Probes</entry>
+ </row>
+ <row>
+ <entry>request-start</entry>
+ <entry>Called just before processing each client request.</entry>
+ <entry><parameter>requestName</parameter></entry>
+ <entry><parameter>requestCode</parameter></entry>
+ <entry><parameter>requestLength</parameter></entry>
+ <entry><parameter>clientId</parameter></entry>
+ <entry><parameter>requestBuffer</parameter></entry>
+ </row>
+ <row>
+ <entry>request-done</entry>
+ <entry>Called just after processing each client request.</entry>
+ <entry><parameter>requestName</parameter></entry>
+ <entry><parameter>requestCode</parameter></entry>
+ <entry><parameter>sequenceNumber</parameter></entry>
+ <entry><parameter>clientId</parameter></entry>
+ <entry><parameter>resultCode</parameter></entry>
+ </row>
+ <row>
+ <entry spanname="all" class="grouphead">Event Probes</entry>
+ </row>
+ <row>
+ <entry>send-event</entry>
+ <entry>Called just before send each event to a client.</entry>
+ <entry><parameter>clientId</parameter></entry>
+ <entry><parameter>eventCode</parameter></entry>
+ <entry><parameter>eventBuffer</parameter></entry>
+ <entry nameend="arg4" class="unused"/>
+ </row>
+ <row>
+ <entry spanname="all" class="grouphead">Client Connection Probes</entry>
+ </row>
+ <row>
+ <entry>client-connect</entry>
+ <entry>Called when a new connection is opened from a client</entry>
+ <entry><parameter>clientId</parameter></entry>
+ <entry><parameter>clientFD</parameter></entry>
+ <entry nameend="arg4" class="unused"/>
+ </row>
+ <row>
+ <entry>client-auth</entry>
+ <entry>Called when client authenticates (normally just after connection opened)</entry>
+ <entry><parameter>clientId</parameter></entry>
+ <entry><parameter>clientAddr</parameter></entry>
+ <entry><parameter>clientPid</parameter></entry>
+ <entry><parameter>clientZoneId</parameter></entry>
+ <entry nameend="arg4" class="unused"/>
+ </row>
+ <row>
+ <entry>client-disconnect</entry>
+ <entry>Called when a client connection is closed</entry>
+ <entry><parameter>clientId</parameter></entry>
+ <entry nameend="arg4" class="unused"/>
+ </row>
+ <row>
+ <entry spanname="all" class="grouphead">Resource Allocation Probes</entry>
+ </row>
+ <row>
+ <entry>resource-alloc</entry>
+ <entry>Called when a new resource (pixmap, gc, colormap, etc.) is allocated</entry>
+ <entry><parameter>resourceId</parameter></entry>
+ <entry><parameter>resourceTypeId</parameter></entry>
+ <entry><parameter>resourceValue</parameter></entry>
+ <entry><parameter>resourceTypeName</parameter></entry>
+ <entry nameend="arg4" class="unused"/>
+ </row>
+ <row>
+ <entry>resource-free</entry>
+ <entry>Called when a resource is freed</entry>
+ <entry><parameter>resourceId</parameter></entry>
+ <entry><parameter>resourceTypeId</parameter></entry>
+ <entry><parameter>resourceValue</parameter></entry>
+ <entry><parameter>resourceTypeName</parameter></entry>
+ <entry nameend="arg4" class="unused"/>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </para>
+ </sect1>
+
+ <sect1 id="arguments">
+ <title>Data Available in Probe Arguments</title>
+
+ <para>
+ To access data in arguments of type <type>string</type>, you will need
+ to use <ulink url="http://wikis.sun.com/display/DTrace/Actions+and+Subroutines#ActionsandSubroutines-{{copyinstr}}"><function>copyinstr()</function></ulink>.
+ To access data buffers referenced via <type>uintptr_t</type>'s, you will
+ need to use <ulink url="http://wikis.sun.com/display/DTrace/Actions+and+Subroutines#ActionsandSubroutines-{{copyin}}"><function>copyin()</function></ulink>.
+
+ <table>
+ <title>Probe Arguments</title>
+ <tgroup cols='3'>
+ <colspec colname="arg" colwidth="2*"/>
+ <colspec colname="type" colwidth="1*"/>
+ <colspec colname="desc" colwidth="7*"/>
+ <thead>
+ <row>
+ <entry>Argument name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><parameter>clientAddr</parameter></entry>
+ <entry><type>string</type></entry>
+ <entry>String representing address client connected from</entry>
+ </row>
+ <row>
+ <entry><parameter>clientFD</parameter></entry>
+ <entry><type>int</type></entry>
+ <entry>X server's file descriptor for server side of each connection</entry>
+ </row>
+ <row>
+ <entry><parameter>clientId</parameter></entry>
+ <entry><type>int</type></entry>
+ <entry>Unique integer identifier for each connection to the
+ X server</entry>
+ </row>
+ <row>
+ <entry><parameter>clientPid</parameter></entry>
+ <entry><type>pid_t</type></entry>
+ <entry>Process id of client, if connection is local
+ (from <function>getpeerucred()</function>)</entry>
+ </row>
+ <row>
+ <entry><parameter>clientZoneId</parameter></entry>
+ <entry><type>zoneid_t</type></entry>
+ <entry>Solaris: Zone id of client, if connection is local
+ (from <function>getpeerucred()</function>)</entry>
+ </row>
+ <row>
+ <entry><parameter>eventBuffer</parameter></entry>
+ <entry><type>uintptr_t</type></entry>
+ <entry>Pointer to buffer containing X event - decode using
+ structures in
+ <<ulink url="http://cgit.freedesktop.org/xorg/proto/xproto/tree/Xproto.h"><filename class="headerfile">X11/Xproto.h</filename></ulink>>
+ and similar headers for each extension</entry>
+ </row>
+ <row>
+ <entry><parameter>eventCode</parameter></entry>
+ <entry><type>uint8_t</type></entry>
+ <entry>Event number of X event</entry>
+ </row>
+ <row>
+ <entry><parameter>resourceId</parameter></entry>
+ <entry><type>uint32_t</type></entry>
+ <entry>X resource id (XID)</entry>
+ </row>
+ <row>
+ <entry><parameter>resourceTypeId</parameter></entry>
+ <entry><type>uint32_t</type></entry>
+ <entry>Resource type id</entry>
+ </row>
+ <row>
+ <entry><parameter>resourceTypeName</parameter></entry>
+ <entry><type>string</type></entry>
+ <entry>String representing X resource type
+ (<literal>"PIXMAP"</literal>, etc.)</entry>
+ </row>
+ <row>
+ <entry><parameter>resourceValue</parameter></entry>
+ <entry><type>uintptr_t</type></entry>
+ <entry>Pointer to data for X resource</entry>
+ </row>
+ <row>
+ <entry><parameter>resultCode</parameter></entry>
+ <entry><type>int</type></entry>
+ <entry>Integer code representing result status of request</entry>
+ </row>
+ <row>
+ <entry><parameter>requestBuffer</parameter></entry>
+ <entry><type>uintptr_t</type></entry>
+ <entry>Pointer to buffer containing X request - decode using
+ structures in
+ <<ulink url="http://cgit.freedesktop.org/xorg/proto/xproto/tree/Xproto.h"><filename class="headerfile">X11/Xproto.h</filename></ulink>>
+ and similar headers for each extension</entry>
+ </row>
+ <row>
+ <entry><parameter>requestCode</parameter></entry>
+ <entry><type>uint8_t</type></entry>
+ <entry>Request number of X request or Extension</entry>
+ </row>
+ <row>
+ <entry><parameter>requestName</parameter></entry>
+ <entry><type>string</type></entry>
+ <entry>Name of X request or Extension</entry>
+ </row>
+ <row>
+ <entry><parameter>requestLength</parameter></entry>
+ <entry><type>uint16_t</type></entry>
+ <entry>Length of X request</entry>
+ </row>
+ <row>
+ <entry><parameter>sequenceNumber</parameter></entry>
+ <entry><type>uint32_t</type></entry>
+ <entry>Number of X request in in this connection</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </para>
+ </sect1>
+
+ <sect1 id="examples">
+ <title>Examples</title>
+
+ <example>
+ <title>Counting requests by request name</title>
+
+ <para>
+ This script simply increments a counter for each different request
+ made, and when you exit the script (such as by hitting
+ <keycombo action='simul'><keycap>Control</keycap><keycap>C</keycap>
+ </keycombo>) prints the counts.
+
+ <programlisting>
+#!/usr/sbin/dtrace -s
+
+Xserver*:::request-start
+{
+ @counts[copyinstr(arg0)] = count();
+}
+ </programlisting>
+
+ The output from a short run may appear as:
+ <screen>
+ QueryPointer 1
+ CreatePixmap 2
+ FreePixmap 2
+ PutImage 2
+ ChangeGC 10
+ CopyArea 10
+ CreateGC 14
+ FreeGC 14
+ RENDER 28
+ SetClipRectangles 40
+ </screen>
+ </para>
+
+ <para>
+ This can be rewritten slightly to cache the string containing the name
+ of the request since it will be reused many times, instead of copying
+ it over and over from the kernel:
+
+ <programlisting>
+#!/usr/sbin/dtrace -s
+
+string Xrequest[uintptr_t];
+
+Xserver*:::request-start
+/Xrequest[arg0] == ""/
+{
+ Xrequest[arg0] = copyinstr(arg0);
+}
+
+Xserver*:::request-start
+{
+ @counts[Xrequest[arg0]] = count();
+}
+ </programlisting>
+ </para>
+ </example>
+
+ <example>
+ <title>Get average CPU time per request</title>
+
+ <para>This script records the CPU time used between the probes at
+ the start and end of each request and aggregates it per request type.
+
+ <programlisting>
+#!/usr/sbin/dtrace -s
+
+Xserver*:::request-start
+{
+ reqstart = vtimestamp;
+}
+
+Xserver*:::request-done
+{
+ @times[copyinstr(arg0)] = avg(vtimestamp - reqstart);
+}
+ </programlisting>
+
+ The output from a sample run might look like:
+
+ <screen>
+ ChangeGC 889
+ MapWindow 907
+ SetClipRectangles 1319
+ PolyPoint 1413
+ PolySegment 1434
+ PolyRectangle 1828
+ FreeCursor 1895
+ FreeGC 1950
+ CreateGC 2244
+ FreePixmap 2246
+ GetInputFocus 2249
+ TranslateCoords 8508
+ QueryTree 8846
+ GetGeometry 9948
+ CreatePixmap 12111
+ AllowEvents 14090
+ GrabServer 14791
+ MIT-SCREEN-SAVER 16747
+ ConfigureWindow 22917
+ SetInputFocus 28521
+ PutImage 240841
+
+ </screen>
+ </para>
+ </example>
+
+ <example>
+ <title>Monitoring clients that connect and disconnect</title>
+
+ <para>
+ This script simply prints information about each client that
+ connects or disconnects from the server while it is running.
+ Since the provider is specified as <code>Xserver$1</code> instead
+ of <code>Xserver*</code> like previous examples, it won't monitor
+ all Xserver processes running on the machine, but instead expects
+ the process id of the X server to monitor to be specified as the
+ argument to the script.
+
+ <programlisting>
+#!/usr/sbin/dtrace -s
+
+Xserver$1:::client-connect
+{
+ printf("** Client Connect: id %d\n", arg0);
+}
+
+Xserver$1:::client-auth
+{
+ printf("** Client auth'ed: id %d => %s pid %d\n",
+ arg0, copyinstr(arg1), arg2);
+}
+
+Xserver$1:::client-disconnect
+{
+ printf("** Client Disconnect: id %d\n", arg0);
+}
+ </programlisting>
+
+ A sample run:
+
+ <screen>
+<prompt>#</prompt> <userinput>./foo.d 5790</userinput>
+<computeroutput>dtrace: script './foo.d' matched 4 probes
+CPU ID FUNCTION:NAME
+ 0 15774 CloseDownClient:client-disconnect ** Client Disconnect: id 65
+
+ 2 15774 CloseDownClient:client-disconnect ** Client Disconnect: id 64
+
+ 0 15773 EstablishNewConnections:client-connect ** Client Connect: id 64
+
+ 0 15772 AuthAudit:client-auth ** Client auth'ed: id 64 => local host pid 2034
+
+ 0 15773 EstablishNewConnections:client-connect ** Client Connect: id 65
+
+ 0 15772 AuthAudit:client-auth ** Client auth'ed: id 65 => local host pid 2034
+
+ 0 15774 CloseDownClient:client-disconnect ** Client Disconnect: id 64
+ </computeroutput>
+ </screen>
+
+ </para>
+ </example>
+
+ <example>
+ <title>Monitoring clients creating Pixmaps</title>
+
+ <para>
+ This script can be used to determine which clients are creating
+ pixmaps in the X server, printing information about each client
+ as it connects to help trace it back to the program on the other
+ end of the X connection.
+
+ <programlisting>
+#!/usr/sbin/dtrace -qs
+
+string Xrequest[uintptr_t];
+string Xrestype[uintptr_t];
+
+Xserver$1:::request-start
+/Xrequest[arg0] == ""/
+{
+ Xrequest[arg0] = copyinstr(arg0);
+}
+
+Xserver$1:::resource-alloc
+/arg3 != 0 && Xrestype[arg3] == ""/
+{
+ Xrestype[arg3] = copyinstr(arg3);
+}
+
+
+Xserver$1:::request-start
+/Xrequest[arg0] == "X_CreatePixmap"/
+{
+ printf("-> %s: client %d\n", Xrequest[arg0], arg3);
+}
+
+Xserver$1:::request-done
+/Xrequest[arg0] == "X_CreatePixmap"/
+{
+ printf("<- %s: client %d\n", Xrequest[arg0], arg3);
+}
+
+Xserver$1:::resource-alloc
+/Xrestype[arg3] == "PIXMAP"/
+{
+ printf("** Pixmap alloc: %08x\n", arg0);
+}
+
+
+Xserver$1:::resource-free
+/Xrestype[arg3] == "PIXMAP"/
+{
+ printf("** Pixmap free: %08x\n", arg0);
+}
+
+Xserver$1:::client-connect
+{
+ printf("** Client Connect: id %d\n", arg0);
+}
+
+Xserver$1:::client-auth
+{
+ printf("** Client auth'ed: id %d => %s pid %d\n",
+ arg0, copyinstr(arg1), arg2);
+}
+
+Xserver$1:::client-disconnect
+{
+ printf("** Client Disconnect: id %d\n", arg0);
+}
+ </programlisting>
+
+ Sample output from a run of this script:
+ <screen><computeroutput>
+** Client Connect: id 17
+** Client auth'ed: id 17 => local host pid 20273
+-> X_CreatePixmap: client 17
+** Pixmap alloc: 02200009
+<- X_CreatePixmap: client 17
+-> X_CreatePixmap: client 15
+** Pixmap alloc: 01e00180
+<- X_CreatePixmap: client 15
+-> X_CreatePixmap: client 15
+** Pixmap alloc: 01e00181
+<- X_CreatePixmap: client 15
+-> X_CreatePixmap: client 14
+** Pixmap alloc: 01c004c8
+<- X_CreatePixmap: client 14
+** Pixmap free: 02200009
+** Client Disconnect: id 17
+** Pixmap free: 01e00180
+** Pixmap free: 01e00181
+ </computeroutput></screen>
+
+ </para>
+
+ </example>
+
+
+ </sect1>
+
+</article>
+
diff --git a/xorg-server/doc/xml/xmlrules.in b/xorg-server/doc/xml/xmlrules.in index 1db7f128e..667cc2ebb 100644 --- a/xorg-server/doc/xml/xmlrules.in +++ b/xorg-server/doc/xml/xmlrules.in @@ -39,6 +39,14 @@ SUFFIXES = .xml .txt .html .pdf XML_ENT_DIR = $(abs_top_builddir)/doc/xml
XMLTO_FLAGS = --searchpath $(XML_ENT_DIR)
+if HAVE_STYLESHEETS
+XMLTO_FLAGS += -m $(XSL_STYLESHEET)
+BUILT_DOC_FILES += xorg.css
+
+xorg.css: $(STYLESHEET_SRCDIR)/xorg.css
+ $(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@
+endif
+
if HAVE_XMLTO
BUILT_DOC_FILES += $(TXT_FILES)
.xml.txt:
@@ -59,7 +67,7 @@ endif endif
-CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES)
+CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES) xorg.css
# All the files we build depend on the entities
$(BUILT_DOC_FILES): $(XML_ENT_DIR)/xserver.ent
diff --git a/xorg-server/hw/xfree86/ddc/ddc.c b/xorg-server/hw/xfree86/ddc/ddc.c index 3b70ce508..975e07620 100644 --- a/xorg-server/hw/xfree86/ddc/ddc.c +++ b/xorg-server/hw/xfree86/ddc/ddc.c @@ -102,7 +102,7 @@ resort(unsigned char *s_block) }
static int
-DDC_checksum(unsigned char *block, int len)
+DDC_checksum(const unsigned char *block, int len)
{
int i, result = 0;
int not_null = 0;
@@ -149,7 +149,10 @@ GetEDID_DDC1(unsigned int *s_ptr) d_pos++;
}
free(s_ptr);
- if (d_block && DDC_checksum(d_block,EDID1_LEN)) return NULL;
+ if (d_block && DDC_checksum(d_block,EDID1_LEN)) {
+ free(d_block);
+ return NULL;
+ }
return (resort(d_block));
}
diff --git a/xorg-server/hw/xquartz/GL/indirect.c b/xorg-server/hw/xquartz/GL/indirect.c index b432ec750..718727ebe 100644 --- a/xorg-server/hw/xquartz/GL/indirect.c +++ b/xorg-server/hw/xquartz/GL/indirect.c @@ -271,8 +271,7 @@ static void __glXAquaContextDestroy(__GLXcontext *baseContext) { __GLXAquaContext *context = (__GLXAquaContext *) baseContext;
- GLAQUA_DEBUG_MSG("glAquaContextDestroy (ctx 0x%x)\n",
- (unsigned int) baseContext);
+ GLAQUA_DEBUG_MSG("glAquaContextDestroy (ctx %p)\n", baseContext);
if (context != NULL) {
if (context->sid != 0 && surface_hash != NULL) {
lst = x_hash_table_lookup(surface_hash, x_cvt_uint_to_vptr(context->sid), NULL);
@@ -321,7 +320,7 @@ static void surface_notify(void *_arg, void *data) { case AppleDRISurfaceNotifyDestroyed:
if (surface_hash != NULL)
x_hash_table_remove(surface_hash, x_cvt_uint_to_vptr(arg->id));
- draw->base.pDraw = NULL;
+ draw->pDraw = NULL;
draw->sid = 0;
break;
diff --git a/xorg-server/hw/xquartz/pbproxy/main.m b/xorg-server/hw/xquartz/pbproxy/main.m index 560cf0182..cfdc7696d 100644 --- a/xorg-server/hw/xquartz/pbproxy/main.m +++ b/xorg-server/hw/xquartz/pbproxy/main.m @@ -1,163 +1,165 @@ -/* main.m - Copyright (c) 2002, 2008 Apple Computer, Inc. All rights reserved. - - 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 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 ABOVE LISTED COPYRIGHT - HOLDER(S) 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. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. - */ - -#include "pbproxy.h" -#import "x-selection.h" - -#include <pthread.h> -#include <unistd.h> -#include <X11/extensions/applewm.h> - -Display *xpbproxy_dpy; -int xpbproxy_apple_wm_event_base, xpbproxy_apple_wm_error_base; -int xpbproxy_xfixes_event_base, xpbproxy_xfixes_error_base; -BOOL xpbproxy_have_xfixes; - -extern char *display; - -#ifdef STANDALONE_XPBPROXY -BOOL xpbproxy_is_standalone = NO; -#endif - -x_selection *_selection_object; - -extern BOOL serverInitComplete; -extern pthread_mutex_t serverInitCompleteMutex; -extern pthread_cond_t serverInitCompleteCond; - -static inline void wait_for_server_init(void) { - /* If the server hasn't finished initializing, wait for it... */ - if(!serverInitComplete) { - pthread_mutex_lock(&serverInitCompleteMutex); - while(!serverInitComplete) - pthread_cond_wait(&serverInitCompleteCond, &serverInitCompleteMutex); - pthread_mutex_unlock(&serverInitCompleteMutex); - } -} - -static int x_io_error_handler (Display *dpy) { - /* We lost our connection to the server. */ - - TRACE (); - - /* trigger the thread to restart? - * NO - this would be to a "deeper" problem, and restarts would just - * make things worse... - */ -#ifdef STANDALONE_XPBPROXY - if(xpbproxy_is_standalone) - exit(EXIT_FAILURE); -#endif - - return 0; -} - -static int x_error_handler (Display *dpy, XErrorEvent *errevent) { - return 0; -} - -int xpbproxy_run (void) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - size_t i; - - wait_for_server_init(); - - for(i=0, xpbproxy_dpy=NULL; !xpbproxy_dpy && i<5; i++) { - xpbproxy_dpy = XOpenDisplay(NULL); - - if(!xpbproxy_dpy && display) { - char _display[32]; - snprintf(_display, sizeof(_display), ":%s", display); - setenv("DISPLAY", _display, TRUE); - - xpbproxy_dpy=XOpenDisplay(_display); - } - if(!xpbproxy_dpy) - sleep(1); - } - - if (xpbproxy_dpy == NULL) { - fprintf (stderr, "xpbproxy: can't open default display\n"); - [pool release]; - return EXIT_FAILURE; - } - - XSetIOErrorHandler (x_io_error_handler); - XSetErrorHandler (x_error_handler); - - if (!XAppleWMQueryExtension (xpbproxy_dpy, &xpbproxy_apple_wm_event_base, - &xpbproxy_apple_wm_error_base)) { - fprintf (stderr, "xpbproxy: can't open AppleWM server extension\n"); - [pool release]; - return EXIT_FAILURE; - } - - xpbproxy_have_xfixes = XFixesQueryExtension(xpbproxy_dpy, &xpbproxy_xfixes_event_base, &xpbproxy_xfixes_error_base); - - XAppleWMSelectInput (xpbproxy_dpy, AppleWMActivationNotifyMask | - AppleWMPasteboardNotifyMask); - - _selection_object = [[x_selection alloc] init]; - - if(!xpbproxy_input_register()) { - [pool release]; - return EXIT_FAILURE; - } - - [pool release]; - - CFRunLoopRun(); - - return EXIT_SUCCESS; -} - -id xpbproxy_selection_object (void) { - return _selection_object; -} - -Time xpbproxy_current_timestamp (void) { - /* FIXME: may want to fetch a timestamp from the server.. */ - return CurrentTime; -} - -void debug_printf (const char *fmt, ...) { - static int spew = -1; - - if (spew == -1) { - char *x = getenv ("DEBUG"); - spew = (x != NULL && atoi (x) != 0); - } - - if (spew) { - va_list args; - va_start(args, fmt); - vfprintf (stderr, fmt, args); - va_end(args); - } -} +/* main.m
+ Copyright (c) 2002, 2008 Apple Computer, Inc. All rights reserved.
+
+ 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 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 ABOVE LISTED COPYRIGHT
+ HOLDER(S) 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.
+
+ Except as contained in this notice, the name(s) of the above
+ copyright holders shall not be used in advertising or otherwise to
+ promote the sale, use or other dealings in this Software without
+ prior written authorization.
+ */
+
+#include "pbproxy.h"
+#import "x-selection.h"
+
+#include <pthread.h>
+#include <unistd.h>
+#include <X11/extensions/applewm.h>
+
+Display *xpbproxy_dpy;
+int xpbproxy_apple_wm_event_base, xpbproxy_apple_wm_error_base;
+int xpbproxy_xfixes_event_base, xpbproxy_xfixes_error_base;
+BOOL xpbproxy_have_xfixes;
+
+extern char *display;
+
+#ifdef STANDALONE_XPBPROXY
+BOOL xpbproxy_is_standalone = NO;
+#endif
+
+x_selection *_selection_object;
+
+extern BOOL serverInitComplete;
+extern pthread_mutex_t serverInitCompleteMutex;
+extern pthread_cond_t serverInitCompleteCond;
+
+static inline void wait_for_server_init(void) {
+ /* If the server hasn't finished initializing, wait for it... */
+ if(!serverInitComplete) {
+ pthread_mutex_lock(&serverInitCompleteMutex);
+ while(!serverInitComplete)
+ pthread_cond_wait(&serverInitCompleteCond, &serverInitCompleteMutex);
+ pthread_mutex_unlock(&serverInitCompleteMutex);
+ }
+}
+
+static int x_io_error_handler (Display *dpy) {
+ /* We lost our connection to the server. */
+
+ TRACE ();
+
+ /* trigger the thread to restart?
+ * NO - this would be to a "deeper" problem, and restarts would just
+ * make things worse...
+ */
+#ifdef STANDALONE_XPBPROXY
+ if(xpbproxy_is_standalone)
+ exit(EXIT_FAILURE);
+#endif
+
+ /* Prevent _XIOError from calling exit() */
+ pthread_exit(NULL);
+ return 0;
+}
+
+static int x_error_handler (Display *dpy, XErrorEvent *errevent) {
+ return 0;
+}
+
+int xpbproxy_run (void) {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ size_t i;
+
+ wait_for_server_init();
+
+ for(i=0, xpbproxy_dpy=NULL; !xpbproxy_dpy && i<5; i++) {
+ xpbproxy_dpy = XOpenDisplay(NULL);
+
+ if(!xpbproxy_dpy && display) {
+ char _display[32];
+ snprintf(_display, sizeof(_display), ":%s", display);
+ setenv("DISPLAY", _display, TRUE);
+
+ xpbproxy_dpy=XOpenDisplay(_display);
+ }
+ if(!xpbproxy_dpy)
+ sleep(1);
+ }
+
+ if (xpbproxy_dpy == NULL) {
+ fprintf (stderr, "xpbproxy: can't open default display\n");
+ [pool release];
+ return EXIT_FAILURE;
+ }
+
+ XSetIOErrorHandler (x_io_error_handler);
+ XSetErrorHandler (x_error_handler);
+
+ if (!XAppleWMQueryExtension (xpbproxy_dpy, &xpbproxy_apple_wm_event_base,
+ &xpbproxy_apple_wm_error_base)) {
+ fprintf (stderr, "xpbproxy: can't open AppleWM server extension\n");
+ [pool release];
+ return EXIT_FAILURE;
+ }
+
+ xpbproxy_have_xfixes = XFixesQueryExtension(xpbproxy_dpy, &xpbproxy_xfixes_event_base, &xpbproxy_xfixes_error_base);
+
+ XAppleWMSelectInput (xpbproxy_dpy, AppleWMActivationNotifyMask |
+ AppleWMPasteboardNotifyMask);
+
+ _selection_object = [[x_selection alloc] init];
+
+ if(!xpbproxy_input_register()) {
+ [pool release];
+ return EXIT_FAILURE;
+ }
+
+ [pool release];
+
+ CFRunLoopRun();
+
+ return EXIT_SUCCESS;
+}
+
+id xpbproxy_selection_object (void) {
+ return _selection_object;
+}
+
+Time xpbproxy_current_timestamp (void) {
+ /* FIXME: may want to fetch a timestamp from the server.. */
+ return CurrentTime;
+}
+
+void debug_printf (const char *fmt, ...) {
+ static int spew = -1;
+
+ if (spew == -1) {
+ char *x = getenv ("DEBUG");
+ spew = (x != NULL && atoi (x) != 0);
+ }
+
+ if (spew) {
+ va_list args;
+ va_start(args, fmt);
+ vfprintf (stderr, fmt, args);
+ va_end(args);
+ }
+}
diff --git a/xorg-server/xkeyboard-config/tests/genLists4Comparizon.sh b/xorg-server/xkeyboard-config/tests/genLists4Comparizon.sh new file mode 100644 index 000000000..ccaaba7e0 --- /dev/null +++ b/xorg-server/xkeyboard-config/tests/genLists4Comparizon.sh @@ -0,0 +1,43 @@ +#!/bin/sh
+
+#
+# This script compares the group names which "have to be", according to the descriptions in base.xml -
+# and actually existing in the symbol files. Some differences are ok (like extra double quotes or
+# extra escaping character) - but all the rest should be in sync.
+#
+
+ROOT="`dirname $0`/.."
+F1=reg2ll.lst
+F2=gn2ll.lst
+
+xsltproc $ROOT/xslt/reg2ll.xsl $ROOT/rules/base.xml | sort | uniq > $F1
+
+for i in $ROOT/symbols/*; do
+ if [ -f $i ]; then
+ id="`basename $i`"
+ export id
+ gawk 'BEGIN{
+ FS = "\"";
+ id = ENVIRON["id"];
+ isDefault = 0;
+}
+/.*default.*/{
+ isDefault = 1;
+}
+/xkb_symbols/{
+ variant = $2;
+}/^[[:space:]]*name\[Group1\][[:space:]]*=/{
+ if (isDefault == 1)
+ {
+ printf "%s:\"%s\"\n",id,$2;
+ isDefault=0;
+ } else
+ {
+ name=$2;
+ printf "%s(%s):\"%s\"\n", id, variant, name;
+ }
+}' $i
+ fi
+done | sort | uniq > $F2
+
+diff $F1 $F2
diff --git a/xorg-server/xkeyboard-config/tests/listCI2.xsl b/xorg-server/xkeyboard-config/tests/listCI2.xsl new file mode 100644 index 000000000..09ee37abb --- /dev/null +++ b/xorg-server/xkeyboard-config/tests/listCI2.xsl @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ >
+<xsl:output method="text"/>
+
+ <xsl:param name="type"/>
+ <xsl:param name="parentId"/>
+
+ <xsl:template match="xkbConfigRegistry">
+ <xsl:apply-templates select=".//configItem[(name(..) = $type) and (../../../configItem/name = $parentId or ../../configItem/name = $parentId )]">
+ <xsl:sort select="name"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template match="configItem">
+ <xsl:value-of select="./name"/><xsl:text>
+</xsl:text>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xorg-server/xkeyboard-config/tests/listCIs.xsl b/xorg-server/xkeyboard-config/tests/listCIs.xsl new file mode 100644 index 000000000..87e5bd9de --- /dev/null +++ b/xorg-server/xkeyboard-config/tests/listCIs.xsl @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ >
+<xsl:output method="text"/>
+
+ <xsl:param name="type"/>
+
+ <xsl:template match="xkbConfigRegistry">
+ <xsl:apply-templates select=".//configItem[name(..) = $type]">
+ <xsl:sort select="name"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template match="configItem">
+ <xsl:value-of select="./name"/><xsl:text>
+</xsl:text>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/xorg-server/xkeyboard-config/tests/mxkbledpanel/Imakefile b/xorg-server/xkeyboard-config/tests/mxkbledpanel/Imakefile new file mode 100644 index 000000000..3fd46021e --- /dev/null +++ b/xorg-server/xkeyboard-config/tests/mxkbledpanel/Imakefile @@ -0,0 +1,8 @@ +LOCAL_LIBRARIES1 = -lXm
+ SRCS1 = mxkbledpanel.c
+ OBJS1 = mxkbledpanel.o
+
+PROGRAMS=mxkbledpanel
+
+ComplexProgramTarget_1(mxkbledpanel,$(LOCAL_LIBRARIES1),)
+
diff --git a/xorg-server/xkeyboard-config/tests/mxkbledpanel/mxkbledpanel.c b/xorg-server/xkeyboard-config/tests/mxkbledpanel/mxkbledpanel.c new file mode 100644 index 000000000..5d52c52c1 --- /dev/null +++ b/xorg-server/xkeyboard-config/tests/mxkbledpanel/mxkbledpanel.c @@ -0,0 +1,605 @@ +#include <stdio.h>
+#include <stdlib.h>
+#include <X11/Xlib.h>
+#include <X11/Intrinsic.h>
+#include <X11/XKBlib.h>
+#include <Xm/MainW.h>
+#include <Xm/RowColumn.h>
+#include <Xm/ToggleB.h>
+
+Display *theDisplay;
+XtAppContext appContext;
+int xkbEventBase;
+Widget topLevel;
+Widget leds[XkbNumIndicators];
+Atom ledAtoms[XkbNumIndicators];
+XmString ledNames[XkbNumIndicators];
+XkbDescPtr xkb_desc;
+
+void valueChangedProc(Widget,XtPointer,XmToggleButtonCallbackStruct *);
+XtCallbackRec valueChangedCB[2]={(XtCallbackProc)valueChangedProc,NULL};
+
+/************************************************************************/
+/* */
+/* Application Resources */
+/* */
+/************************************************************************/
+#define YES 1
+#define NO 0
+#define DONT_CARE -1
+
+typedef struct
+{
+ int wanted;
+ int wantAutomatic;
+ int wantExplicit;
+ int wantNamed;
+ int wantReal;
+ int wantVirtual;
+ int useUnion;
+} OptionsRec;
+
+OptionsRec options;
+
+#define Offset(field) XtOffsetOf(OptionsRec,field)
+XtResource resources[] =
+{
+ {"wanted", "Wanted", XtRInt, sizeof(int),
+ Offset(wanted), XtRImmediate, (XtPointer) DONT_CARE },
+ {"wantAutomatic", "WantAutomatic", XtRInt, sizeof(int),
+ Offset(wantAutomatic), XtRImmediate, (XtPointer) DONT_CARE},
+ {"wantExplicit", "WantExplicit", XtRInt, sizeof(int),
+ Offset(wantExplicit), XtRImmediate, (XtPointer) DONT_CARE},
+ {"wantNamed", "WantNamed", XtRInt, sizeof(int),
+ Offset(wantNamed), XtRImmediate, (XtPointer) DONT_CARE},
+ {"wantReal", "WantReal", XtRInt, sizeof(int),
+ Offset(wantReal), XtRImmediate, (XtPointer) DONT_CARE},
+ {"wantVirtual", "WantVirtual", XtRInt, sizeof(int),
+ Offset(wantVirtual), XtRImmediate, (XtPointer) DONT_CARE},
+ {"useUnion", "UseUnion", XtRInt, sizeof(int),
+ Offset(useUnion), XtRImmediate, (XtPointer) YES},
+ NULL
+};
+#undef Offset
+
+String fallbackResources[] =
+{
+ "*mainWindow.width: 100",
+ "*mainWindow.height: 50",
+ NULL
+};
+
+XrmOptionDescRec optionDesc[] =
+{
+ {"-watch", "*wanted", XrmoptionSepArg, (XtPointer) "0"},
+ {"-automatic", "*wantAutomatic", XrmoptionNoArg, (XtPointer) "0"},
+ {"+automatic", "*wantAutomatic", XrmoptionNoArg, (XtPointer) "1"},
+ {"-explicit", "*wantExplicit", XrmoptionNoArg, (XtPointer) "0"},
+ {"+explicit", "*wantExplicit", XrmoptionNoArg, (XtPointer) "1"},
+ {"-named", "*wantNamed", XrmoptionNoArg, (XtPointer) "0"},
+ {"+named", "*wantNamed", XrmoptionNoArg, (XtPointer) "1"},
+ {"-real", "*wantReal", XrmoptionNoArg, (XtPointer) "0"},
+ {"+real", "*wantReal", XrmoptionNoArg, (XtPointer) "1"},
+ {"-virtual", "*wantVirtual", XrmoptionNoArg, (XtPointer) "0"},
+ {"+virtual", "*wantVirtual", XrmoptionNoArg, (XtPointer) "1"},
+ {"-intersection", "*useUnion", XrmoptionNoArg, (XtPointer) "0"},
+ {"-union", "*useUnion", XrmoptionNoArg, (XtPointer) "1"}
+};
+
+/************************************************************************/
+/* */
+/* usage */
+/* */
+/************************************************************************/
+void usage(char *program)
+{
+ printf("Usage: %s <options>\n",program);
+ printf("Legal options include the usual X toolkit options plus:\n");
+ printf(" -help Print this message\n");
+ printf(" -indpy <name> Name of display to watch\n");
+ printf(" -watch <leds> Mask of LEDs to watch\n");
+ printf(" [-+]automatic (Don't) watch automatic LEDs\n");
+ printf(" [-+]explicit (Don't) watch explicit LEDs\n");
+ printf(" [-+]named (Don't) watch named LEDs\n");
+ printf(" [-+]real (Don't) watch real LEDs\n");
+ printf(" [-+]virtual (Don't) watch virtual LEDs\n");
+ printf(" -intersection Watch only LEDs in all desired sets\n");
+ printf(" -union Watch LEDs in any desired sets\n");
+ printf("The default set of LEDs is -intersection +named +virtual\n");
+ return;
+}
+/************************************************************************/
+/* */
+/* XkbEventHandler */
+/* */
+/* DESCRIPTION: */
+/* */
+/* Handles events generated by the Xkb server extension. */
+/* */
+/************************************************************************/
+Boolean XkbEventHandler(XEvent *event)
+{
+ XkbEvent *xkbEv = (XkbEvent *) event;
+
+ if (xkbEv->any.xkb_type==XkbIndicatorStateNotify) {
+ register int i;
+ register unsigned bit;
+ for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1)
+ if ((xkbEv->indicators.changed&bit)&&(leds[i]))
+ {
+ if (xkbEv->indicators.state&bit)
+ XmToggleButtonSetState(leds[i],True,False);
+ else
+ XmToggleButtonSetState(leds[i],False,False);
+ }
+ }
+ else if (xkbEv->any.xkb_type==XkbIndicatorMapNotify) {
+ unsigned change= xkbEv->indicators.changed;
+
+ if (XkbGetIndicatorMap(theDisplay,change,xkb_desc)!=Success)
+ fprintf(stderr,"Couldn't get changed indicator maps\n");
+ }
+
+ return True;
+
+} /* XkbEventHandler */
+
+/************************************************************************/
+/* */
+/* InitXkb */
+/* */
+/************************************************************************/
+Boolean InitXkb(Display *theDisplay)
+{
+ int i,opcode,errorBase,major,minor;
+ XkbDescPtr xkb;
+ unsigned int bit;
+ unsigned int real,virtual,named,explicit,automatic;
+ char *name;
+
+ if (!XkbQueryExtension(theDisplay,
+ &opcode,
+ &xkbEventBase,
+ &errorBase,
+ &major,
+ &minor))
+ return False;
+
+ if (!XkbUseExtension(theDisplay,&major,&minor))
+ return False;
+
+ XkbSelectEvents(theDisplay,
+ XkbUseCoreKbd,
+ XkbIndicatorStateNotifyMask|XkbIndicatorMapNotifyMask,
+ XkbIndicatorStateNotifyMask|XkbIndicatorMapNotifyMask);
+
+ XtSetEventDispatcher(theDisplay,
+ xkbEventBase+XkbEventCode,
+ XkbEventHandler);
+
+ xkb=XkbGetMap(theDisplay,0,XkbUseCoreKbd);
+ real=virtual=named=explicit=automatic=0;
+
+ if (!xkb)
+ {
+ fprintf(stderr,"Couldn't get keymap\n");
+ return False;
+ }
+ if (XkbGetIndicatorMap(theDisplay,XkbAllIndicatorsMask,xkb)!=Success)
+ {
+ fprintf(stderr,"Couldn't read indicator map\n");
+ XkbFreeKeyboard(xkb,XkbAllComponentsMask,True);
+ return False;
+ }
+ real=virtual=named=explicit=automatic=0;
+
+ if (XkbGetNames(theDisplay,XkbIndicatorNamesMask,xkb)!=Success)
+ {
+ fprintf(stderr,"Couldn't read indicator names\n");
+ XkbFreeKeyboard(xkb,XkbAllComponentsMask,True);
+ return False;
+ }
+ real=virtual=named=explicit=automatic=0;
+
+ for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1)
+ {
+ XkbIndicatorMapPtr map= &xkb->indicators->maps[i];
+ name = NULL;
+ if (xkb->names->indicators[i]!=None)
+ {
+ named|= bit;
+ name = XGetAtomName(theDisplay,xkb->names->indicators[i]);
+ }
+ if (name != NULL)
+ {
+ ledAtoms[i] = xkb->names->indicators[i];
+ ledNames[i] = XmStringCreate(name,XmSTRING_DEFAULT_CHARSET);
+ }
+ else
+ {
+ char temp[12];
+ sprintf(temp,"led%d\0",i+1);
+ ledAtoms[i] = None;
+ ledNames[i] = XmStringCreate(temp,XmSTRING_DEFAULT_CHARSET);
+ }
+ if (xkb->indicators->phys_indicators&bit)
+ real|= bit;
+ if ((((map->which_groups!=0)&&(map->groups!=0))||
+ ((map->which_mods!=0)&&
+ ((map->mods.real_mods!=0)||(map->mods.vmods!=0)))||
+ (map->ctrls!=0))&&
+ ((map->flags&XkbIM_NoAutomatic)==0)) {
+ automatic|= bit;
+ }
+ else explicit|= bit;
+ }
+
+ virtual = ~real;
+
+ if (options.useUnion)
+ {
+ if ((options.wantReal==NO) || (options.wantReal==DONT_CARE))
+ real = 0;
+ if ((options.wantVirtual==NO) || (options.wantVirtual==DONT_CARE))
+ virtual = 0;
+ if ((options.wantNamed==NO) || (options.wantNamed==DONT_CARE))
+ named = 0;
+ if ((options.wantAutomatic==NO) || (options.wantAutomatic==DONT_CARE))
+ automatic = 0;
+ if ((options.wantExplicit==NO) || (options.wantExplicit==DONT_CARE))
+ explicit = 0;
+
+ options.wanted |= real|virtual|named|automatic|explicit;
+ }
+ else
+ {
+ if (options.wanted == DONT_CARE)
+ options.wanted = ~0;
+
+ if (options.wantReal==NO)
+ real = ~real;
+ else if (options.wantReal==DONT_CARE)
+ real = ~0;
+
+ if (options.wantVirtual==NO)
+ virtual = ~virtual;
+ else if (options.wantVirtual==DONT_CARE)
+ virtual = ~0;
+
+ if (options.wantNamed==NO)
+ named = ~named;
+ else if (options.wantNamed==DONT_CARE)
+ named = ~0;
+
+ if (options.wantAutomatic==NO)
+ automatic = ~automatic;
+ else if (options.wantAutomatic==DONT_CARE)
+ automatic = ~0;
+
+ if (options.wantExplicit==NO)
+ explicit = ~explicit;
+ else if (options.wantExplicit==DONT_CARE)
+ explicit = ~0;
+
+ options.wanted &= real&virtual&named&automatic&explicit;
+ }
+
+ XkbFreeKeyboard(xkb,XkbAllComponentsMask,True);
+ return True;
+
+} /* InitXkb */
+
+/************************************************************************/
+/* */
+/* valueChangedProc - called when a toggle button is pressed. */
+/* */
+/************************************************************************/
+void valueChangedProc(Widget w,
+ XtPointer clientData,
+ XmToggleButtonCallbackStruct *callbackData)
+{
+ int led = (int) clientData;
+ XkbDescPtr xkb;
+
+ xkb = XkbGetMap(theDisplay,0,XkbUseCoreKbd);
+ if (!xkb)
+ {
+ fprintf(stderr,"XkbGetMap failed\n");
+ return;
+ }
+
+ if (XkbGetIndicatorMap(theDisplay,XkbAllIndicatorsMask,xkb)!=Success)
+ {
+ fprintf(stderr,"GetIndicatorMap failed\n");
+ XkbFreeKeyboard(xkb,XkbAllComponentsMask,True);
+ return;
+ }
+
+ /* The 'flags' field tells whether this indicator is automatic
+ * (XkbIM_NoExplicit - 0x80), explicit (XkbIM_NoAutomatic - 0x40),
+ * or neither (both - 0xC0).
+ *
+ * If NoAutomatic is set, the server ignores the rest of the
+ * fields in the indicator map (i.e. it disables automatic control
+ * of the LED). If NoExplicit is set, the server prevents clients
+ * from explicitly changing the value of the LED (using the core
+ * protocol *or* XKB). If NoAutomatic *and* NoExplicit are set,
+ * the LED cannot be changed (unless you change the map first).
+ * If neither NoAutomatic nor NoExplicit are set, the server will
+ * change the LED according to the indicator map, but clients can
+ * override that (until the next automatic change) using the core
+ * protocol or XKB.
+ */
+ switch (xkb->indicators->maps[led].flags &
+ (XkbIM_NoExplicit|XkbIM_NoAutomatic))
+ {
+ case XkbIM_NoExplicit|XkbIM_NoAutomatic:
+ {
+ XmToggleButtonSetState(w,!callbackData->set,FALSE);
+ XkbFreeKeyboard(xkb,XkbAllComponentsMask,True);
+ return;
+ }
+
+ case XkbIM_NoAutomatic:
+ {
+ if (ledAtoms[led] != None)
+ XkbSetNamedIndicator(theDisplay,XkbUseCoreKbd,
+ ledAtoms[led],callbackData->set,
+ FALSE,NULL);
+ else
+ {
+ XKeyboardControl xkc;
+ xkc.led= led;
+ if (callbackData->set)
+ xkc.led_mode= LedModeOn;
+ else xkc.led_mode= LedModeOff;
+ XChangeKeyboardControl(theDisplay,KBLed|KBLedMode,&xkc);
+ XSync(theDisplay,0);
+ }
+
+ XkbFreeKeyboard(xkb,XkbAllComponentsMask,True);
+ return;
+ }
+
+ case XkbIM_NoExplicit:
+ break;
+ }
+
+ /* The 'ctrls' field tells what controls tell this indicator to
+ * to turn on: RepeatKeys (0x1), SlowKeys (0x2), BounceKeys (0x4),
+ * StickyKeys (0x8), MouseKeys (0x10), AccessXKeys (0x20),
+ * TimeOut (0x40), Feedback (0x80), ToggleKeys (0x100),
+ * Overlay1 (0x200), Overlay2 (0x400), GroupsWrap (0x800),
+ * InternalMods (0x1000), IgnoreLockMods (0x2000),
+ * PerKeyRepeat (0x3000), or ControlsEnabled (0x4000)
+ */
+ if (xkb->indicators->maps[led].ctrls)
+ {
+ unsigned long which = xkb->indicators->maps[led].ctrls;
+
+ XkbGetControls(theDisplay,XkbAllControlsMask,xkb);
+ if (callbackData->set)
+ xkb->ctrls->enabled_ctrls |= which;
+ else
+ xkb->ctrls->enabled_ctrls &= ~which;
+ XkbSetControls(theDisplay,which|XkbControlsEnabledMask,xkb);
+ }
+
+ /* The 'which_groups' field tells when this indicator turns on
+ * for the 'groups' field: base (0x1), latched (0x2), locked (0x4),
+ * or effective (0x8).
+ */
+ if (xkb->indicators->maps[led].groups)
+ {
+ int i;
+ unsigned int group = 1;
+
+ /* Turning on a group indicator is kind of tricky. For
+ * now, we will just Latch or Lock the first group we find
+ * if that is what this indicator does. Otherwise, we're
+ * just going to punt and get out of here.
+ */
+ if (callbackData->set)
+ {
+ for (i = XkbNumKbdGroups-1; i >= 0; i--)
+ if ((1 << i) &
+ xkb->indicators->maps[led].groups)
+ group = i;
+ if (xkb->indicators->maps[led].which_groups &
+ (XkbIM_UseLocked | XkbIM_UseEffective))
+ XkbLockGroup(theDisplay,XkbUseCoreKbd,group);
+ else if (xkb->indicators->maps[led].which_groups&XkbIM_UseLatched)
+ XkbLatchGroup(theDisplay,XkbUseCoreKbd,group);
+ else
+ {
+ XmToggleButtonSetState(w,!callbackData->set,FALSE);
+ XkbFreeKeyboard(xkb,XkbAllComponentsMask,True);
+ return;
+ }
+ }
+ /* Turning off a group indicator will mean that we just
+ * Lock the first group that this indicator doesn't watch.
+ */
+ else
+ {
+ for (i = XkbNumKbdGroups-1; i >= 0; i--)
+ if (!((1 << i) &
+ xkb->indicators->maps[led].groups))
+ group = i;
+ XkbLockGroup(theDisplay,XkbUseCoreKbd,group);
+ }
+ }
+
+ /* The 'which_mods' field tells when this indicator turns on
+ * for the modifiers: base (0x1), latched (0x2), locked (0x4),
+ * or effective (0x8).
+ *
+ * The 'real_mods' field tells whether this turns on when one of
+ * the real X modifiers is set: Shift (0x1), Lock (0x2), Control (0x4),
+ * Mod1 (0x8), Mod2 (0x10), Mod3 (0x20), Mod4 (0x40), or Mod5 (0x80).
+ *
+ * The 'virtual_mods' field tells whether this turns on when one of
+ * the virtual modifiers is set.
+ *
+ * The 'mask' field tells what real X modifiers the virtual_modifiers
+ * map to?
+ */
+ if (xkb->indicators->maps[led].mods.real_mods ||
+ xkb->indicators->maps[led].mods.mask)
+ {
+ XkbStateRec state;
+ unsigned int affect,mods;
+
+ affect = (xkb->indicators->maps[led].mods.real_mods |
+ xkb->indicators->maps[led].mods.mask);
+
+ if (callbackData->set)
+ mods = affect;
+ else
+ mods = 0;
+
+ if (xkb->indicators->maps[led].which_mods &
+ (XkbIM_UseLocked | XkbIM_UseEffective))
+ XkbLockModifiers(theDisplay,XkbUseCoreKbd,affect,mods);
+ else if (xkb->indicators->maps[led].which_mods &
+ XkbIM_UseLatched)
+ XkbLatchModifiers(theDisplay,XkbUseCoreKbd,affect,mods);
+ else
+ {
+ XmToggleButtonSetState(w,!callbackData->set,FALSE);
+ XkbFreeKeyboard(xkb,XkbAllComponentsMask,True);
+ return;
+ }
+ }
+
+ XkbFreeKeyboard(xkb,XkbAllComponentsMask,True);
+
+} /* valueChangedProc */
+
+/************************************************************************/
+/* */
+/* InitializeUI */
+/* */
+/************************************************************************/
+void InitializeUI(Widget topLevel)
+{
+ Arg argList[3];
+ char buf[256];
+ int i;
+ unsigned int bit,n;
+ Widget mainWindow,rowColumn;
+ XmString tempString;
+
+ mainWindow = (Widget) XmCreateMainWindow(topLevel,"mainWindow",NULL,0);
+ XtManageChild(mainWindow);
+ rowColumn = (Widget) XmCreateRowColumn(mainWindow,"rowColumn",NULL,0);
+ XtManageChild(rowColumn);
+
+ XkbGetIndicatorState(theDisplay,XkbUseCoreKbd,&n);
+ for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1)
+ {
+ if (options.wanted&bit)
+ {
+ /* [[[ WDW - If we wanted to be really fancy, we
+ * would look for a "*ledxx.labelString" value
+ * in the resource database so the I18N dudes
+ * can see localized strings. ]]]
+ */
+ XtSetArg(argList[0], XmNlabelString,ledNames[i]);
+ if (n&bit) XtSetArg(argList[1], XmNset, True);
+ else XtSetArg(argList[1], XmNset, False);
+ sprintf(buf,"led%d\0",i);
+ valueChangedCB[0].closure = (XtPointer) i;
+ XtSetArg(argList[2], XmNvalueChangedCallback, valueChangedCB);
+ leds[i]= XmCreateToggleButton(rowColumn,buf,argList,3);
+ XtManageChild(leds[i]);
+ }
+ else
+ leds[i]=0;
+ }
+
+} /* InitializeUI */
+
+/************************************************************************/
+/* */
+/* main */
+/* */
+/************************************************************************/
+#if NeedFunctionPrototypes
+int main(int argc,
+ char *argv[])
+#else
+int main(argc, argv)
+ int argc;
+ char *argv[];
+#endif
+{
+ /********************************************************************/
+ /* */
+ /* Initialize the toolkit */
+ /* */
+ /********************************************************************/
+ Arg argList[2];
+ topLevel = XtAppInitialize(&appContext, "xkbleds",
+ optionDesc, XtNumber(optionDesc),
+ &argc, argv,
+ fallbackResources,
+ NULL, 0);
+ XtSetArg(argList[0], XtNallowShellResize, TRUE);
+ XtSetValues(topLevel,argList,1);
+ XtGetApplicationResources(topLevel, (XtPointer)&options, resources,
+ XtNumber(resources), NULL, 0);
+
+ if (argc > 1)
+ {
+ usage(argv[0]);
+ exit(0);
+ }
+
+ /* Defaults
+ */
+ if ((options.wanted == DONT_CARE) &&
+ (options.wantReal == DONT_CARE) &&
+ (options.wantVirtual == DONT_CARE) &&
+ (options.wantNamed == DONT_CARE) &&
+ (options.wantAutomatic == DONT_CARE) &&
+ (options.wantExplicit == DONT_CARE) &&
+ (options.useUnion == YES))
+ {
+ options.wanted = 0;
+ options.wantReal = YES;
+ options.wantNamed = YES;
+ options.wantAutomatic = YES;
+ }
+
+ /********************************************************************/
+ /* */
+ /* See if the server has XKB. */
+ /* */
+ /********************************************************************/
+ theDisplay = XtDisplay(topLevel);
+ if (!InitXkb(theDisplay))
+ {
+ fprintf(stderr,"Could not initialize XKB extension.\n");
+ exit(0);
+ }
+
+ if (options.wanted == 0)
+ {
+ fprintf(stderr,"No LED's were selected.\n\n");
+ usage(argv[0]);
+ exit(0);
+ }
+
+ /********************************************************************/
+ /* */
+ /* Set up the UI and go. */
+ /* */
+ /********************************************************************/
+ XtRealizeWidget(topLevel);
+ InitializeUI(topLevel);
+ XtAppMainLoop(appContext);
+
+ /* NOT REACHED */
+ exit(0L);
+}
diff --git a/xorg-server/xkeyboard-config/tests/mxkbledpanel/mxkbledpanel.man b/xorg-server/xkeyboard-config/tests/mxkbledpanel/mxkbledpanel.man new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/xorg-server/xkeyboard-config/tests/mxkbledpanel/mxkbledpanel.man diff --git a/xorg-server/xkeyboard-config/tests/ruby/README b/xorg-server/xkeyboard-config/tests/ruby/README new file mode 100644 index 000000000..2ddf58a82 --- /dev/null +++ b/xorg-server/xkeyboard-config/tests/ruby/README @@ -0,0 +1,3 @@ +This is just some stuff to play with symbols/inet file, trying to analize it.
+Only maintainers might be interested. It is written in Ruby - but it will
+never be actually used in xkeyboard-config distribution.
diff --git a/xorg-server/xkeyboard-config/tests/ruby/find_fragments.rb b/xorg-server/xkeyboard-config/tests/ruby/find_fragments.rb new file mode 100644 index 000000000..f991ad0ab --- /dev/null +++ b/xorg-server/xkeyboard-config/tests/ruby/find_fragments.rb @@ -0,0 +1,52 @@ +#!/usr/bin/ruby
+#
+# $Id$
+# The script finds the fragments
+#
+
+require "xkbparser.rb"
+
+baseDir = "../.."
+
+symbolsDir = "#{baseDir}/symbols"
+#symbolsDir = "."
+
+parser = Parser.new
+
+allSyms = parser.parse("#{symbolsDir}/inet")
+
+everything = allSyms.merge
+
+everything.filter(1)
+
+#numCombinations = 1
+
+#puts "everything:"
+
+#everything.find_all do | symName, keycodes |
+#puts "#{symName}, #{keycodes.length} mappings -> "
+# keycodes.find_all do | keycode, counter |
+# puts " #{keycode} -> #{counter} occurences"
+# end
+# numCombinations *= (keycodes.length + 1)
+#end
+
+#puts "Total mappings: #{everything.length}/#{everything.full_length()}, #{numCombinations} combinations"
+#
+
+numCombinations = 0
+allSyms.find_all do | symsName, symbols |
+ puts "n: #{symsName}"
+
+ # Counting only symbols which used more than once
+ numDupSymbols = symbols.keys.inject(0) do | rv, keycode |
+ c = everything.cardinality(keycode, symbols[keycode])
+ puts "#{keycode} -> #{symbols[keycode]}, #{c}"
+ (c > 0) ? rv : rv + 1
+ end
+
+ numCombinations += (1 << numDupSymbols)
+ puts "l: #{symbols.length} d: #{numDupSymbols} c: #{numCombinations}"
+end
+
+puts "numCombinations: #{numCombinations}"
diff --git a/xorg-server/xkeyboard-config/tests/ruby/find_match.rb b/xorg-server/xkeyboard-config/tests/ruby/find_match.rb new file mode 100644 index 000000000..43af93482 --- /dev/null +++ b/xorg-server/xkeyboard-config/tests/ruby/find_match.rb @@ -0,0 +1,42 @@ +#!/usr/bin/ruby
+#
+# $Id$
+# The script finds best matching xkb_symbols in symbols/in
+#
+# Parameters: $0 - the name of the file with new xkb_symbols
+# $1 - max number of non-matching mappings (0 by default)
+#
+
+require "xkbparser.rb"
+
+baseDir = "../.."
+
+symbolsDir = "#{baseDir}/symbols"
+#symbolsDir = "."
+
+parser = Parser.new
+
+allSyms = parser.parse("#{symbolsDir}/inet")
+
+newSyms = parser.parse(ARGV[0])
+limit = ARGV[1].to_i
+
+newSyms.find_all do | key, value |
+
+ if value.hidden?
+ next
+ end
+
+ puts "Existing xkb_symbols matching #{key}: "
+
+ sorted = allSyms.match_symbols(value,limit).sort_by do | symsName, diff |
+ sprintf "%03d_%s", diff.size, symsName
+ end
+
+ sorted.find_all do | symsName, diff |
+ puts " #{symsName}, up to #{allSyms[symsName].size} keys (difference #{diff.size})-> #{diff}"
+ end
+
+end
+
+
diff --git a/xorg-server/xkeyboard-config/tests/ruby/utils.rb b/xorg-server/xkeyboard-config/tests/ruby/utils.rb new file mode 100644 index 000000000..93ff0ee5e --- /dev/null +++ b/xorg-server/xkeyboard-config/tests/ruby/utils.rb @@ -0,0 +1,64 @@ +#
+# $Id$
+#
+# Commont classes
+#
+
+#
+# The hash containing non-unique mappings
+# It can have a->b and a->c together
+# Also, for every mapping it counts the number of times this mapping was set
+#
+class NonuniqueCountingHash < Hash
+
+ alias get_original []
+ alias put_original []=
+
+ def []=(key, value)
+ own = self.get_original(key)
+ hash = get_original(key)
+ if hash.nil?
+ put_original(key, hash = Hash.new)
+ end
+ if hash.has_key?(value)
+ hash[value] += 1
+ else
+ hash[value] = 1
+ end
+ end
+
+ #
+ # Number of all mappings (a->b and a->c counted as 2 mappings)
+ #
+ def full_length()
+ values.inject(0) do | rv, hash |
+ rv + hash.length
+ end
+ end
+
+ def cardinality(key1, key2)
+ if has_key?(key1)
+ hash = get_original(key1)
+ if hash.has_key?(key2)
+ hash[key2]
+ else
+ 0
+ end
+ else
+ 0
+ end
+ end
+
+ def filter(limit)
+ find_all do | key, hash |
+ hash.find_all do | key1, counter |
+ if (counter <= limit)
+ hash.delete(key1)
+ end
+ end
+ if hash.empty?
+ delete(key)
+ end
+ end
+ end
+end
diff --git a/xorg-server/xkeyboard-config/tests/ruby/xkbparser.rb b/xorg-server/xkeyboard-config/tests/ruby/xkbparser.rb new file mode 100644 index 000000000..ecf246b6c --- /dev/null +++ b/xorg-server/xkeyboard-config/tests/ruby/xkbparser.rb @@ -0,0 +1,185 @@ +#
+# $Id$
+#
+# Commont parsing classes for symbols/inet
+# The parsing is simplified, based on regex - it is NOT a real parser for very
+# complex XKB format
+#
+
+require "utils.rb"
+
+class Symbols < Hash
+
+ #
+ # Constructor
+ #
+ def initialize
+ @includedSyms = Array.new
+ end
+
+ # Write-only property, parent list of symbols definitions
+ def symbols_list=(symbolsList)
+ @symbolsList = symbolsList
+ end
+
+ # Whether this set of symbols is hidden or not
+ def hidden?
+ @hidden
+ end
+
+ def hidden=(h)
+ @hidden = h
+ end
+
+ #
+ # Add "dependency" - the symbols referenced using the "include" statement.
+ #
+ def add_included(other)
+ @includedSyms.push(other)
+ end
+
+ alias get_original []
+ alias keys_original keys
+
+ #
+ # Get the symbol, trying first own definitions, then walking through all
+ # dependenies
+ #
+ def [](symName)
+ own = self.get_original(symName)
+ if own.nil?
+ @includedSyms.find_all do | symsName |
+ syms = @symbolsList[symsName]
+ his = syms[symName]
+ if !his.nil?
+ own = his
+ break
+ end
+ end
+ end
+ own
+ end
+
+ #
+ # All keys - including the ones specified in the included sections
+ #
+ def keys()
+ @includedSyms.inject(keys_original) do | rv, symsName |
+ syms = @symbolsList[symsName]
+ rv | syms.keys
+ end
+ end
+
+ # Size of all keys
+ def length()
+ keys().length()
+ end
+
+ #
+ # Size - takes into account overlapping key definitions
+ #
+ def size()
+ keys.size()
+ end
+
+ #
+ # Create a hash including all elements of this hash which are not in the
+ # other hash, use symbols + and * for marking the elements which existed in
+ # the original hash (+ if not existed)
+ #
+ def -(other)
+ diff = self.class.new
+ self.find_all do | key, value |
+ existing = other[key]
+ if existing != value
+ diff[key] = [ value, existing.nil? ? '+' : '' ]
+ end
+ end
+ diff
+ end
+
+
+ def to_s
+ s = "{\n"
+ # First output included syms
+ @includedSyms.find_all do | symsName |
+ s += " include \"inet(#{symsName})\"\n"
+ end
+ # Then - own definitions
+ self.find_all do | key, value |
+ s += " key #{key} { [ #{value} ] };\n"
+ end
+ s + "}";
+ end
+
+end
+
+class SymbolsList < Hash
+
+ #
+ # Add new xkb_symbols
+ #
+ def add_symbols (symbolsName, hidden)
+ newSyms = Symbols.new
+ newSyms.symbols_list = self
+ newSyms.hidden = hidden
+ self[symbolsName] = newSyms
+ end
+
+ def to_s
+ s = "// Autogenerated\n\n"
+ self.find_all do | symbols, mapping |
+ s += "partial alphanumeric_keys\nxkb_symbols \"#{symbols}\" #{mapping};\n\n"
+ end
+ s
+ end
+
+ def match_symbols(new_symbols,limit)
+ matching = Hash.new
+ find_all do | symbols, mapping |
+ diff = new_symbols - mapping
+ if diff.size <= limit
+ matching[symbols] = diff
+ end
+ end
+ matching
+ end
+
+ def merge()
+ everything = NonuniqueCountingHash.new
+ find_all do | symsName, syms |
+ syms.find_all do | symName, keycode |
+ everything[symName] = keycode
+ end
+ end
+ everything
+ end
+
+end
+
+class Parser
+
+ def parse (fileName)
+ allSyms = SymbolsList.new;
+ currentSyms = nil
+ hidden = false
+ File.open(fileName) do | file |
+ file.each_line do | line |
+ line.scan(/xkb_symbols\s+"(\w+)"/) do | symsName |
+ currentSyms = allSyms.add_symbols(symsName[0], hidden)
+ end
+ line.scan(/^\s*key\s*<(\w+)>\s*\{\s*\[\s*(\w+)/) do | keycode, keysym |
+ currentSyms[keycode] = keysym
+ end
+ line.scan(/^partial\s+(hidden\s+)?alphanumeric_keys/) do | h |
+ hidden = !h[0].nil?
+ end
+ line.scan(/^\s*include\s+"inet\((\w+)\)"/) do | otherPart |
+ currentSyms.add_included(otherPart[0])
+ end
+ end
+ end
+ allSyms
+ end
+
+end
diff --git a/xorg-server/xkeyboard-config/tests/testLayouts.pl b/xorg-server/xkeyboard-config/tests/testLayouts.pl new file mode 100644 index 000000000..a1d43a395 --- /dev/null +++ b/xorg-server/xkeyboard-config/tests/testLayouts.pl @@ -0,0 +1,17 @@ +#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use xkbTestFunc;
+
+xkbTestFunc::backupXkbSettings();
+
+xkbTestFunc::dumpXkbSettingsBackup();
+
+xkbTestFunc::testLevel2( "layout", "variant", 2, "(", ")", 1, 1, 0 );
+
+sleep 2;
+
+xkbTestFunc::restoreXkbSettings();
+
+print "Done!\n";
diff --git a/xorg-server/xkeyboard-config/tests/testModels.pl b/xorg-server/xkeyboard-config/tests/testModels.pl new file mode 100644 index 000000000..ed4f99341 --- /dev/null +++ b/xorg-server/xkeyboard-config/tests/testModels.pl @@ -0,0 +1,15 @@ +#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use xkbTestFunc;
+
+xkbTestFunc::backupXkbSettings();
+
+xkbTestFunc::dumpXkbSettingsBackup();
+
+xkbTestFunc::testLevel1( "model", 1 );
+
+xkbTestFunc::restoreXkbSettings();
+
+print "Done!\n";
diff --git a/xorg-server/xkeyboard-config/tests/testOptions.pl b/xorg-server/xkeyboard-config/tests/testOptions.pl new file mode 100644 index 000000000..57ccc58d3 --- /dev/null +++ b/xorg-server/xkeyboard-config/tests/testOptions.pl @@ -0,0 +1,15 @@ +#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use xkbTestFunc;
+
+xkbTestFunc::backupXkbSettings();
+
+xkbTestFunc::dumpXkbSettingsBackup();
+
+xkbTestFunc::testLevel2( "group", "option", 4, ":", "", 0, 0, 1 );
+
+xkbTestFunc::restoreXkbSettings();
+
+print "Done!\n";
diff --git a/xorg-server/xkeyboard-config/tests/testShortDescriptions b/xorg-server/xkeyboard-config/tests/testShortDescriptions new file mode 100644 index 000000000..c05299e97 --- /dev/null +++ b/xorg-server/xkeyboard-config/tests/testShortDescriptions @@ -0,0 +1,6 @@ +#!/bin/sh
+
+awk '/shortDescr/{print toupper($0)}' ../rules/base.xml.in | sed 's/<[^>]*>//g;s/ //g' | sort | uniq > xml.sd
+awk '{print $1}' ../docs/iso3166-3.csv | sort > iso.sd
+diff -u iso.sd xml.sd | grep '+'
+
diff --git a/xorg-server/xkeyboard-config/tests/xkbTestFunc.pm b/xorg-server/xkeyboard-config/tests/xkbTestFunc.pm new file mode 100644 index 000000000..1d7881d23 --- /dev/null +++ b/xorg-server/xkeyboard-config/tests/xkbTestFunc.pm @@ -0,0 +1,164 @@ +package xkbTestFunc;
+
+use strict;
+use warnings;
+
+our $VERSION='1.00';
+
+our $origXkbRules;
+our $origXkbModel;
+our $origXkbLayouts;
+our $origXkbOptions;
+our $origXkbVariants;
+
+sub backupXkbSettings
+{
+ ( $origXkbRules, $origXkbModel, $origXkbLayouts, $origXkbVariants, $origXkbOptions ) = getXkbSettings();
+}
+
+sub getXkbSettings
+{
+ my ( $xkbRules, $xkbModel, $xkbLayouts, $xkbVariants, $xkbOptions );
+
+ open (XPROP, "xprop -root |") or die "Could not start xprop";
+ PROP: while (<XPROP>)
+ {
+ if (/_XKB_RULES_NAMES\(STRING\) = \"(.*)\", \"(.*)\", \"(.*)\", \"(.*)\", \"(.*)\"/)
+ {
+ ( $xkbRules, $xkbModel, $xkbLayouts, $xkbVariants, $xkbOptions ) =
+ ( $1, $2, $3, $4, $5 ) ;
+ last PROP;
+ }
+ }
+ close XPROP;
+
+ return ( $xkbRules, $xkbModel, $xkbLayouts, $xkbVariants, $xkbOptions );
+}
+
+sub setXkbSettings
+{
+ my ( $xkbRules, $xkbModel, $xkbLayouts, $xkbVariants, $xkbOptions ) = @_;
+ ( system ( "setxkbmap", "-synch",
+ "-rules", $xkbRules,
+ "-model", $xkbModel,
+ "-layout", $xkbLayouts,
+ "-variant", $xkbVariants,
+ "-option", $xkbOptions ) == 0 ) or die "Could not set xkb configuration";
+ sleep 1;
+}
+
+sub restoreXkbSettings
+{
+ setXkbSettings( $origXkbRules, $origXkbModel, $origXkbLayouts, $origXkbVariants, $origXkbOptions );
+}
+
+sub defaultXkbSettings
+{
+ return ( "base", "pc105", "us", "", "" );
+}
+
+sub dumpXkbSettings
+{
+ my ( $xkbRules, $xkbModel, $xkbLayouts, $xkbVariants, $xkbOptions ) = @_;
+ print "rules: [$xkbRules]\n" ;
+ print "model: [$xkbModel]\n" ;
+ print "layouts: [$xkbLayouts]\n" ;
+ print "variants: [$xkbVariants]\n" ;
+ print "options: [$xkbOptions]\n" ;
+}
+
+sub dumpXkbSettingsBackup
+{
+ dumpXkbSettings( $origXkbRules, $origXkbModel, $origXkbLayouts, $origXkbVariants, $origXkbOptions );
+}
+
+sub testLevel1
+{
+ my ( $type, $idx ) = @_;
+
+ open ( XSLTPROC, "xsltproc --stringparam type $type listCIs.xsl ../rules/base.xml.in |" ) or
+ die ( "Could not start xsltproc" );
+ while (<XSLTPROC>)
+ {
+ chomp();
+ if (/(\S+)/)
+ {
+ my $paramValue=$1;
+ print "--- setting $type: [$paramValue]\n";
+ my @params = defaultXkbSettings();
+ $params[$idx] = $paramValue;
+ dumpXkbSettings ( @params );
+ setXkbSettings ( @params );
+ #print "--- dump:\n";
+ #dumpXkbSettings( getXkbSettings() );
+ }
+ }
+ close XSLTPROC;
+}
+
+sub testLevel2
+{
+ my ( $type, $subtype, $idx, $delim1, $delim2, $ifCheckLevel1, $ifAddLevel1, $ifResetToDefault ) = @_;
+
+ open ( XSLTPROC, "xsltproc --stringparam type $type listCIs.xsl ../rules/base.xml.in |" ) or
+ die ( "Could not start xsltproc" );
+ while (<XSLTPROC>)
+ {
+ chomp();
+ if (/(\S+)/)
+ {
+ my $paramValue=$1;
+ print "--- scanning $type: [$paramValue]\n";
+
+ if ( $ifCheckLevel1 )
+ {
+ my @params = defaultXkbSettings();
+ if ( $ifResetToDefault )
+ {
+ setXkbSettings ( @params );
+ }
+ $params[$idx] = "$paramValue";
+ dumpXkbSettings ( @params );
+ setXkbSettings ( @params );
+ #print "--- dump:\n";
+ #dumpXkbSettings( getXkbSettings() );
+ }
+
+ open ( XSLTPROC2, "xsltproc --stringparam type $subtype --stringparam parentId $paramValue listCI2.xsl ../rules/base.xml.in |" ) or
+ die ( "Could not start xsltproc" );
+ while (<XSLTPROC2>)
+ {
+ chomp();
+ if (/(\S+)/)
+ {
+ my $paramValue2=$1;
+ print " --- $subtype: [$paramValue2]\n";
+ my @params = defaultXkbSettings();
+ if ( $ifResetToDefault )
+ {
+ setXkbSettings ( @params );
+ }
+ if ( $ifAddLevel1 )
+ {
+ $params[$idx] = "$paramValue$delim1$paramValue2$delim2";
+ }
+ else
+ {
+ $params[$idx] = "$paramValue2";
+ }
+ dumpXkbSettings ( @params );
+ setXkbSettings ( @params );
+ #print "--- dump:\n";
+ #dumpXkbSettings( getXkbSettings() );
+ }
+ }
+ close XSLTPROC2;
+ }
+ }
+ close XSLTPROC;
+}
+
+1;
+__END__
+
+No docs yet
diff --git a/xorg-server/xkeyboard-config/xslt/reg2ll.xsl b/xorg-server/xkeyboard-config/xslt/reg2ll.xsl new file mode 100644 index 000000000..5cb4c8bec --- /dev/null +++ b/xorg-server/xkeyboard-config/xslt/reg2ll.xsl @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ >
+<xsl:output method="text"
+ encoding="UTF-8"
+ doctype-system="xkb.dtd"
+ indent="no"/>
+
+<xsl:template match="modelList|optionList|name|description|shortDescription|configItem"/>
+<xsl:strip-space elements="*"/>
+
+<xsl:template match="layoutList"><xsl:apply-templates select="./layout"/></xsl:template>
+
+<xsl:template match="variantList"><xsl:apply-templates select="./variant"/></xsl:template>
+
+<xsl:template match="layout"><xsl:text>
+</xsl:text><xsl:value-of select="./configItem/name"/>:"<xsl:value-of select="./configItem/description"/>"<xsl:apply-templates match="./variantList/variant"/></xsl:template>
+
+<xsl:template match="variant"><xsl:text>
+</xsl:text><xsl:value-of select="../../configItem/name"/>(<xsl:value-of select="./configItem/name"/>):"<xsl:value-of select="../../configItem/description"/> - <xsl:value-of select="./configItem/description"/>"</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xorg-server/xkeyboard-config/xslt/xfree86.xsl b/xorg-server/xkeyboard-config/xslt/xfree86.xsl new file mode 100644 index 000000000..8b4e84976 --- /dev/null +++ b/xorg-server/xkeyboard-config/xslt/xfree86.xsl @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ >
+<xsl:output method="xml"
+ encoding="UTF-8"
+ doctype-system="xkb.dtd"
+ indent="yes"/>
+
+ <!-- Transform all "simple" elements as they are -->
+ <xsl:template match="@*|xkbConfigRegistry|layout|layoutList|model|modelList|group|option|optionList|variant|variantList">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|*"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <!-- Tricky business: configItem -->
+ <xsl:template match="configItem">
+ <configItem xsl:space="preserve">
+ <name><xsl:value-of select="./name"/></name>
+ <!-- If there are some shortDescriptions -->
+ <xsl:if test="count(./shortDescription)!=0">
+ <!-- First, put the non-translated version -->
+ <shortDescription><xsl:value-of select="./shortDescription[not(@xml:lang)]"/></shortDescription>
+ <!-- For all translated versions ... -->
+ <xsl:for-each select="./shortDescription[@xml:lang]">
+ <!-- ... which are different from non-translated one ... -->
+ <xsl:if test="../shortDescription[not(@xml:lang)]/text() != ./text()">
+ <!-- ... - output! -->
+ <shortDescription xml:lang="{./@xml:lang}"><xsl:value-of select="./text()"/></shortDescription>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:if>
+ <!-- If there are some descriptions -->
+ <xsl:if test="count(./description)!=0">
+ <!-- First, put the non-translated version -->
+ <description><xsl:value-of select="./description[not(@xml:lang)]"/></description>
+ <!-- For all translated versions ... -->
+ <xsl:for-each select="./description[@xml:lang]">
+ <!-- ... which are different from non-translated one ... -->
+ <xsl:if test="../description[not(@xml:lang)]/text() != ./text()">
+ <!-- ... - output! -->
+ <description xml:lang="{./@xml:lang}"><xsl:value-of select="./text()"/></description>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:if>
+ </configItem>
+ </xsl:template>
+
+</xsl:stylesheet>
|