XawImP.h revision 7a84e134
1/* $Xorg: XawImP.h,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ */
2
3/*
4 * Copyright 1991 by OMRON Corporation
5 *
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of OMRON not be used in advertising or
11 * publicity pertaining to distribution of the software without specific,
12 * written prior permission.  OMRON makes no representations about the
13 * suitability of this software for any purpose.  It is provided "as is"
14 * without express or implied warranty.
15 *
16 * OMRON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
17 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
18 * OMRON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
19 * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
20 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION,
21 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
22 * SOFTWARE.
23 *
24 *	Author:	Seiji Kuwari	OMRON Corporation
25 *				kuwa@omron.co.jp
26 *				kuwa%omron.co.jp@uunet.uu.net
27 */
28
29/*
30
31Copyright 1994, 1998  The Open Group
32
33Permission to use, copy, modify, distribute, and sell this software and its
34documentation for any purpose is hereby granted without fee, provided that
35the above copyright notice appear in all copies and that both that
36copyright notice and this permission notice appear in supporting
37documentation.
38
39The above copyright notice and this permission notice shall be included in
40all copies or substantial portions of the Software.
41
42THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
44FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
45OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
46AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
47CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
48
49Except as contained in this notice, the name of The Open Group shall not be
50used in advertising or otherwise to promote the sale, use or other dealings
51in this Software without prior written authorization from The Open Group.
52
53*/
54/* $XFree86: xc/lib/Xaw/XawImP.h,v 3.8 2001/01/17 19:42:36 dawes Exp $ */
55
56#ifndef _XawImP_h
57#define _XawImP_h
58
59#define XtNinputMethod		"inputMethod"
60#define XtCInputMethod		"InputMethod"
61#define XtNpreeditType		"preeditType"
62#define XtCPreeditType		"PreeditType"
63#define XtNopenIm		"openIm"
64#define XtCOpenIm		"OpenIm"
65#define XtNsharedIc		"sharedIc"
66#define XtCSharedIc		"SharedIc"
67
68#include <X11/Xaw/Text.h>
69
70#define	CIICFocus	(1 << 0)
71#define	CIFontSet	(1 << 1)
72#define	CIFg		(1 << 2)
73#define	CIBg		(1 << 3)
74#define	CIBgPixmap	(1 << 4)
75#define	CICursorP	(1 << 5)
76#define	CILineS		(1 << 6)
77
78typedef	struct _XawImPart {
79    XIM			xim;
80    XrmResourceList	resources;
81    Cardinal		num_resources;
82    Boolean		open_im;
83    Boolean		initialized;
84    Dimension		area_height;
85    String		input_method;
86    String		preedit_type;
87} XawImPart;
88
89typedef struct _XawIcTablePart {
90    Widget		widget;
91    XIC			xic;
92    XIMStyle		input_style;
93    unsigned long	flg;
94    unsigned long	prev_flg;
95    Boolean		ic_focused;
96    XFontSet		font_set;
97    Pixel		foreground;
98    Pixel		background;
99    Pixmap		bg_pixmap;
100    XawTextPosition	cursor_position;
101    unsigned long	line_spacing;
102    Boolean		openic_error;
103    struct _XawIcTablePart *next;
104} XawIcTablePart, *XawIcTableList;
105
106typedef	struct _XawIcPart {
107    XIMStyle		input_style;
108    Boolean		shared_ic;
109    XawIcTableList	shared_ic_table;
110    XawIcTableList	current_ic_table;
111    XawIcTableList	ic_table;
112} XawIcPart;
113
114typedef	struct _contextDataRec {
115    Widget		parent;
116    Widget		ve;
117} contextDataRec;
118
119typedef	struct _contextErrDataRec {
120    Widget		widget;
121    XIM			xim;
122} contextErrDataRec;
123
124void _XawImResizeVendorShell
125(
126 Widget			w
127 );
128
129Dimension _XawImGetShellHeight
130(
131 Widget			w
132);
133
134void _XawImRealize
135(
136 Widget			w
137 );
138
139void _XawImInitialize
140(
141 Widget			w,
142 Widget			ext
143 );
144
145void _XawImReconnect
146(
147 Widget			w
148 );
149
150void _XawImRegister
151(
152 Widget			w
153 );
154
155void _XawImUnregister
156(
157 Widget			w
158 );
159
160void _XawImSetValues
161(
162 Widget			w,
163 ArgList		args,
164 Cardinal		num_args
165 );
166
167void _XawImSetFocusValues
168(
169 Widget			w,
170 ArgList		args,
171 Cardinal		num_args
172);
173
174void _XawImUnsetFocus
175(
176 Widget			w
177 );
178
179int _XawImWcLookupString
180(
181 Widget			w,
182 XKeyPressedEvent	*event,
183 wchar_t		*buffer_return,
184 int			bytes_buffer,
185 KeySym			*keysym_return
186 );
187
188int _XawLookupString
189(
190 Widget			w,
191 XKeyEvent		*event,
192 char			*buffer_return,
193 int			buffer_size,
194 KeySym			*keysym_return
195 );
196
197int _XawImGetImAreaHeight
198(
199 Widget			w
200 );
201
202void _XawImCallVendorShellExtResize
203(
204 Widget			w
205 );
206
207void _XawImDestroy
208(
209 Widget			w,
210 Widget			ext
211 );
212
213#endif	/* _XawImP_h */
214