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