17a84e134Smrg/*
27a84e134Smrg * Copyright 1991 by OMRON Corporation
37a84e134Smrg *
47a84e134Smrg * Permission to use, copy, modify, distribute, and sell this software and its
57a84e134Smrg * documentation for any purpose is hereby granted without fee, provided that
67a84e134Smrg * the above copyright notice appear in all copies and that both that
77a84e134Smrg * copyright notice and this permission notice appear in supporting
87a84e134Smrg * documentation, and that the name of OMRON not be used in advertising or
97a84e134Smrg * publicity pertaining to distribution of the software without specific,
107a84e134Smrg * written prior permission.  OMRON makes no representations about the
117a84e134Smrg * suitability of this software for any purpose.  It is provided "as is"
127a84e134Smrg * without express or implied warranty.
137a84e134Smrg *
147a84e134Smrg * OMRON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
157a84e134Smrg * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
167a84e134Smrg * OMRON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
177a84e134Smrg * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
187a84e134Smrg * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION,
197a84e134Smrg * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
20421c997bSmrg * SOFTWARE.
217a84e134Smrg *
227a84e134Smrg *	Author:	Seiji Kuwari	OMRON Corporation
237a84e134Smrg *				kuwa@omron.co.jp
247a84e134Smrg *				kuwa%omron.co.jp@uunet.uu.net
25421c997bSmrg */
267a84e134Smrg
277a84e134Smrg/*
287a84e134Smrg
297a84e134SmrgCopyright 1994, 1998  The Open Group
307a84e134Smrg
317a84e134SmrgPermission to use, copy, modify, distribute, and sell this software and its
327a84e134Smrgdocumentation for any purpose is hereby granted without fee, provided that
337a84e134Smrgthe above copyright notice appear in all copies and that both that
347a84e134Smrgcopyright notice and this permission notice appear in supporting
357a84e134Smrgdocumentation.
367a84e134Smrg
377a84e134SmrgThe above copyright notice and this permission notice shall be included in
387a84e134Smrgall copies or substantial portions of the Software.
397a84e134Smrg
407a84e134SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
417a84e134SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
427a84e134SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
437a84e134SmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
447a84e134SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
457a84e134SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
467a84e134Smrg
477a84e134SmrgExcept as contained in this notice, the name of The Open Group shall not be
487a84e134Smrgused in advertising or otherwise to promote the sale, use or other dealings
497a84e134Smrgin this Software without prior written authorization from The Open Group.
507a84e134Smrg
517a84e134Smrg*/
527a84e134Smrg
537a84e134Smrg#ifndef _XawImP_h
547a84e134Smrg#define _XawImP_h
557a84e134Smrg
567a84e134Smrg#define XtNinputMethod		"inputMethod"
577a84e134Smrg#define XtCInputMethod		"InputMethod"
587a84e134Smrg#define XtNpreeditType		"preeditType"
597a84e134Smrg#define XtCPreeditType		"PreeditType"
607a84e134Smrg#define XtNopenIm		"openIm"
617a84e134Smrg#define XtCOpenIm		"OpenIm"
627a84e134Smrg#define XtNsharedIc		"sharedIc"
637a84e134Smrg#define XtCSharedIc		"SharedIc"
647a84e134Smrg
657a84e134Smrg#include <X11/Xaw/Text.h>
667a84e134Smrg
677a84e134Smrg#define	CIICFocus	(1 << 0)
687a84e134Smrg#define	CIFontSet	(1 << 1)
697a84e134Smrg#define	CIFg		(1 << 2)
707a84e134Smrg#define	CIBg		(1 << 3)
717a84e134Smrg#define	CIBgPixmap	(1 << 4)
727a84e134Smrg#define	CICursorP	(1 << 5)
737a84e134Smrg#define	CILineS		(1 << 6)
747a84e134Smrg
757a84e134Smrgtypedef	struct _XawImPart {
767a84e134Smrg    XIM			xim;
777a84e134Smrg    XrmResourceList	resources;
787a84e134Smrg    Cardinal		num_resources;
797a84e134Smrg    Boolean		open_im;
807a84e134Smrg    Boolean		initialized;
817a84e134Smrg    Dimension		area_height;
827a84e134Smrg    String		input_method;
837a84e134Smrg    String		preedit_type;
847a84e134Smrg} XawImPart;
857a84e134Smrg
867a84e134Smrgtypedef struct _XawIcTablePart {
877a84e134Smrg    Widget		widget;
887a84e134Smrg    XIC			xic;
897a84e134Smrg    XIMStyle		input_style;
907a84e134Smrg    unsigned long	flg;
917a84e134Smrg    unsigned long	prev_flg;
927a84e134Smrg    Boolean		ic_focused;
937a84e134Smrg    XFontSet		font_set;
947a84e134Smrg    Pixel		foreground;
957a84e134Smrg    Pixel		background;
967a84e134Smrg    Pixmap		bg_pixmap;
977a84e134Smrg    XawTextPosition	cursor_position;
987a84e134Smrg    unsigned long	line_spacing;
997a84e134Smrg    Boolean		openic_error;
1007a84e134Smrg    struct _XawIcTablePart *next;
1017a84e134Smrg} XawIcTablePart, *XawIcTableList;
1027a84e134Smrg
1037a84e134Smrgtypedef	struct _XawIcPart {
1047a84e134Smrg    XIMStyle		input_style;
1057a84e134Smrg    Boolean		shared_ic;
1067a84e134Smrg    XawIcTableList	shared_ic_table;
1077a84e134Smrg    XawIcTableList	current_ic_table;
1087a84e134Smrg    XawIcTableList	ic_table;
1097a84e134Smrg} XawIcPart;
1107a84e134Smrg
1117a84e134Smrgtypedef	struct _contextDataRec {
1127a84e134Smrg    Widget		parent;
1137a84e134Smrg    Widget		ve;
1147a84e134Smrg} contextDataRec;
1157a84e134Smrg
1167a84e134Smrgtypedef	struct _contextErrDataRec {
1177a84e134Smrg    Widget		widget;
1187a84e134Smrg    XIM			xim;
1197a84e134Smrg} contextErrDataRec;
1207a84e134Smrg
1217a84e134Smrgvoid _XawImResizeVendorShell
1227a84e134Smrg(
1237a84e134Smrg Widget			w
1247a84e134Smrg );
1257a84e134Smrg
1267a84e134SmrgDimension _XawImGetShellHeight
1277a84e134Smrg(
1287a84e134Smrg Widget			w
1297a84e134Smrg);
1307a84e134Smrg
1317a84e134Smrgvoid _XawImRealize
1327a84e134Smrg(
1337a84e134Smrg Widget			w
1347a84e134Smrg );
1357a84e134Smrg
1367a84e134Smrgvoid _XawImInitialize
1377a84e134Smrg(
1387a84e134Smrg Widget			w,
1397a84e134Smrg Widget			ext
1407a84e134Smrg );
1417a84e134Smrg
1427a84e134Smrgvoid _XawImReconnect
1437a84e134Smrg(
1447a84e134Smrg Widget			w
1457a84e134Smrg );
1467a84e134Smrg
1477a84e134Smrgvoid _XawImRegister
1487a84e134Smrg(
1497a84e134Smrg Widget			w
1507a84e134Smrg );
1517a84e134Smrg
1527a84e134Smrgvoid _XawImUnregister
1537a84e134Smrg(
1547a84e134Smrg Widget			w
1557a84e134Smrg );
1567a84e134Smrg
1577a84e134Smrgvoid _XawImSetValues
1587a84e134Smrg(
1597a84e134Smrg Widget			w,
1607a84e134Smrg ArgList		args,
1617a84e134Smrg Cardinal		num_args
1627a84e134Smrg );
1637a84e134Smrg
1647a84e134Smrgvoid _XawImSetFocusValues
1657a84e134Smrg(
1667a84e134Smrg Widget			w,
1677a84e134Smrg ArgList		args,
1687a84e134Smrg Cardinal		num_args
1697a84e134Smrg);
1707a84e134Smrg
1717a84e134Smrgvoid _XawImUnsetFocus
1727a84e134Smrg(
1737a84e134Smrg Widget			w
1747a84e134Smrg );
1757a84e134Smrg
1767a84e134Smrgint _XawImWcLookupString
1777a84e134Smrg(
1787a84e134Smrg Widget			w,
1797a84e134Smrg XKeyPressedEvent	*event,
1807a84e134Smrg wchar_t		*buffer_return,
1817a84e134Smrg int			bytes_buffer,
1827a84e134Smrg KeySym			*keysym_return
1837a84e134Smrg );
1847a84e134Smrg
1857a84e134Smrgint _XawLookupString
1867a84e134Smrg(
1877a84e134Smrg Widget			w,
1887a84e134Smrg XKeyEvent		*event,
1897a84e134Smrg char			*buffer_return,
1907a84e134Smrg int			buffer_size,
1917a84e134Smrg KeySym			*keysym_return
1927a84e134Smrg );
1937a84e134Smrg
1947a84e134Smrgint _XawImGetImAreaHeight
1957a84e134Smrg(
1967a84e134Smrg Widget			w
1977a84e134Smrg );
1987a84e134Smrg
1997a84e134Smrgvoid _XawImCallVendorShellExtResize
2007a84e134Smrg(
2017a84e134Smrg Widget			w
2027a84e134Smrg );
2037a84e134Smrg
2047a84e134Smrgvoid _XawImDestroy
2057a84e134Smrg(
2067a84e134Smrg Widget			w,
2077a84e134Smrg Widget			ext
2087a84e134Smrg );
2097a84e134Smrg
2107a84e134Smrg#endif	/* _XawImP_h */
211