Tizen 2.1 base
[framework/uifw/xorg/lib/libx11.git] / src / xlibi18n / XimintL.h
1 /******************************************************************
2
3           Copyright 1991, 1992, 1993, 1994 by FUJITSU LIMITED
4           Copyright 1993 by Digital Equipment Corporation
5
6 Permission to use, copy, modify, distribute, and sell this software
7 and its documentation for any purpose is hereby granted without fee,
8 provided that the above copyright notice appear in all copies and that
9 both that copyright notice and this permission notice appear in
10 supporting documentation, and that the name of FUJITSU LIMITED and
11 Digital Equipment Corporation not be used in advertising or publicity
12 pertaining to distribution of the software without specific, written
13 prior permission.  FUJITSU LIMITED and Digital Equipment Corporation
14 makes no representations about the suitability of this software for
15 any purpose.  It is provided "as is" without express or implied
16 warranty.
17
18 FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION DISCLAIM ALL
19 WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
20 WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
21 FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR
22 ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
23 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
24 IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
25 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
26 THIS SOFTWARE.
27
28   Author:    Takashi Fujiwara     FUJITSU LIMITED
29                                   fujiwara@a80.tech.yk.fujitsu.co.jp
30   Modifier:  Franky Ling          Digital Equipment Corporation
31                                   frankyling@hgrd01.enet.dec.com
32
33 ******************************************************************/
34
35 #ifndef _XIMINTL_H
36 #define _XIMINTL_H
37
38 #define COMPOSE_FILE    "Compose"
39
40 /*
41  * Data Structures for Local Processing
42  */
43 typedef INT32  DTIndex;
44 typedef INT32  DTCharIndex;
45 typedef BITS32 DTModifier;
46
47 typedef struct _DefTree {
48     DTIndex          next;
49     DTIndex          succession;        /* successive Key Sequence */
50                                         /* Key definitions */
51     DTModifier       modifier_mask;
52     DTModifier       modifier;
53     KeySym           keysym;            /* leaf only */
54     DTCharIndex      mb;
55     DTCharIndex      wc;                /* make from mb */
56     DTCharIndex      utf8;              /* make from mb */
57     KeySym           ks;
58 } DefTree;
59
60 typedef struct _DefTreeBase {
61     DefTree         *tree;
62     char            *mb;
63     wchar_t         *wc;
64     char            *utf8;
65     DTIndex          treeused, treesize;
66     DTCharIndex      mbused,   mbsize;
67     DTCharIndex      wcused,   wcsize;
68     DTCharIndex      utf8used, utf8size;
69 } DefTreeBase;
70
71 typedef struct _XimLocalPrivateRec {
72         /* The first fields are identical with XimCommonPrivateRec. */
73         XlcConv          ctom_conv;
74         XlcConv          ctow_conv;
75         XlcConv          ctoutf8_conv;
76         XlcConv          cstomb_conv;
77         XlcConv          cstowc_conv;
78         XlcConv          cstoutf8_conv;
79         XlcConv          ucstoc_conv;
80         XlcConv          ucstoutf8_conv;
81
82         XIC              current_ic;
83         DefTreeBase      base;
84         DTIndex          top;
85 } XimLocalPrivateRec;
86
87 typedef struct _XicThaiPart {
88         int             comp_state;
89         KeySym          keysym;
90         int             input_mode;
91 } XicThaiPart;
92
93 typedef struct _XicLocalPrivateRec {
94         long                     value_mask;
95         DefTreeBase              base;
96         DTIndex                  context;
97         DTIndex                  composed;
98         XicThaiPart              thai;
99
100         XIMResourceList          ic_resources;
101         unsigned int             ic_num_resources;
102
103         unsigned char            brl_pressed, brl_committing, brl_committed;
104         Time                     brl_release_start;
105 } XicLocalPrivateRec;
106 #endif /* _XIMINTL_H */