1 /* 2 * $Id: define.h,v 1.2 2001/06/14 18:16:11 ura Exp $ 3 */ 4 5 /* 6 * FreeWnn is a network-extensible Kana-to-Kanji conversion system. 7 * This file is part of FreeWnn. 8 * 9 * Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999 10 * 11 * Author: OMRON SOFTWARE Co., Ltd. <freewnn@rd.kyoto.omronsoft.co.jp> 12 * 13 * This program is free software; you can redistribute it and/or modify 14 * it under the terms of the GNU General Public License as published by 15 * the Free Software Foundation; either version 2, or (at your option) 16 * any later version. 17 * 18 * This program is distributed in the hope that it will be useful, 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 * GNU General Public License for more details. 22 * 23 * You should have received a copy of the GNU General Public License 24 * along with GNU Emacs; see the file COPYING. If not, write to the 25 * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 26 * 27 * Commentary: 28 * 29 * Change log: 30 * 31 * Last modified date: 8,Feb.1999 32 * 33 * Code: 34 * 35 */ 36 37 /* 38 * X11R5 Input Method Test Program 39 * define.h v 1.0 Fri Mar 8 18:21:25 JST 1991 40 */ 41 42 /* 43 * Author: Takashi Inoue OMRON Corporation 44 * takashi@ari.ncl.omron.co.jp 45 */ 46 47 48 /***************************/ 49 /* definition of XIMTEST.C */ 50 /***************************/ 51 52 /* definition of error */ 53 #define ENV_ERR 1 54 55 /* definition of buffer size */ 56 #define MAX_BUF 256 /* MAXimum BUFfer size */ 57 58 /* definition of judge flag about IC mode */ 59 #define ONSP 0x0001 /* mode of ON-the-SPot */ 60 #define OVERSP 0x0002 /* mode of OVER-the-SPot */ 61 #define OFFSP 0x0004 /* mode of OFF-the-SPot */ 62 #define ROOTW 0x0008 /* mode of ROOT-Window */ 63 #define ENDAT 0x000F /* END of All Tests */ 64 65 /* definition of judge flag about test result of change IC */ 66 #define COMP 0x0001 /* COMPleted test */ 67 #define DIC 0x0002 /* Destroy IC and continue test */ 68 #define MENU 0x0004 /* return main MENU */ 69 70 /* definition of judge flag OK or NG */ 71 #undef OK 72 #define OK 0x0000 /* result is OK */ 73 #define NG 0x0001 /* result is No Good */ 74 75 /*****************************/ 76 /* definition of XRESOURCE.C */ 77 /*****************************/ 78 79 /* definition of geometry about bitmap data */ 80 #define BIT_WIDTH 10 /* BITmap data WIDTH */ 81 #define BIT_HEIGHT 10 /* BITmap data HEIGHT */ 82 83 /* definition of number of data on FontSet, Pixmap, Colormap .... */ 84 #define ARRAY_MAX 2 /* ARRAY MAXimum */ 85 86 /* definition of pixel value */ 87 #define PLANE_MAX 1 /* PLANE MAXimum */ 88 #define PIX_MAX 4 /* PIXel MAXimum */ 89 90 /* definition of bitmap element value */ 91 #define BITS_MAX 20 /* BITS MAXimum */ 92 93 /* definition of number of menu windows */ 94 #define MENU_MAX 20 95 96 /* definition of geometry on test window */ 97 #define W1_X 680 /* Window1 X axis */ 98 #define W23_X 0 /* Window2,3 X axis */ 99 #define W1_Y 480 /* Winddow1 Y axis */ 100 #define W2_Y 200 /* Window2, Y axis */ 101 #define W3_Y 50 /* Window3 Y axis */ 102 #define W1_WIDTH 600 /* Winddow1 WIDTH */ 103 #define W2_WIDTH 400 /* Window2, WITDH */ 104 #define W3_WIDTH 550 /* Window3 WIDTH */ 105 #define W1_HEIGHT 450 /* Window1 HEIGHT */ 106 #define W23_HEIGHT 150 /* Window2,3 HEIGHT */ 107 #define W_BORDER 2 /* Window BORDER */ 108 109 /* definition of geometry on name window of test window */ 110 #define NW_WIDTH 80 /* Name Window WIDTH */ 111 #define NW_HEIGHT 30 /* Name Window HEIGHT */ 112 #define WIN_ITV 10 /* WINdow InTerVal */ 113 114 /* definition of geometry on menu window */ 115 #define MROOT_X 20 /* Menu ROOT window X axis */ 116 #define MROOT_Y 930 /* Menu ROOT window Y axia */ 117 #define MSUB_Y 30 /* Menu SUB window Y axis */ 118 #define MSUB_WIDTH 90 /* Menu SUB window WIDTH */ 119 #define MSUB_HEIGHT 30 /* Menu SUB window HEIGHT */ 120 #define M_BORDER 2 /* Menu window BORDER_width */ 121 122 /*************************/ 123 /* definition of CHKIC.C */ 124 /*************************/ 125 126 /* definition of mode numer */ 127 #define MODENUM 5 /* MODE NUMber */ 128 129 /* definition of error code for XCreateIC and XGetICValues */ 130 #define NOERR 0x0000 /* NO ERRor */ 131 #define OPIMERR 0x0001 /* OPen IM ERRor */ 132 #define GIMERR 0x0002 /* GetIMvalues ERRor */ 133 #define CRICERR 0x0004 /* CReate IC ERRor */ 134 #define GICERR 0x0008 /* GetICvalues ERRor */ 135 136 /* definition of item-numbers of valuables */ 137 #define ONMUST 15 /* ON-the-spot (MUST) */ 138 #define ONMAY 17 /* ON-the-spot (MAY) */ 139 #define OVERMUST 5 /* OVER-the-spot (MUST) */ 140 #define OVERMAY 28 /* OVER-the-spot (MAY) */ 141 #define OFFMUST 3 /* OFF-the-spot (MUST) */ 142 #define OFFMAY 25 /* OFF-the-spot (MAY) */ 143 #define ROOTMUST 1 /* ROOT-window (MUST) */ 144 #define ROOTMAY 17 /* ROOT-window (MAY) */ 145 146 #define V_NUM 3 147 148 /* definition of dummy valuable for XVaCreateNestedList */ 149 #define DUMMY 0 150 151 /* definition of valuables for Set/GetICValues */ 152 #define IS "InputStyle" 153 #define CW "CreateWindow" 154 #define FW "FocusWindow" 155 #define RN "ResouceName" 156 #define RC "ResouceClass" 157 #define PAX "Preedit-Area.x" 158 #define PAY "Preedit-Area.y" 159 #define PAW "Preedit-Area.width" 160 #define PAH "Preedit-Area.height" 161 #define PNW "Preedit-AreaNeeded.width" 162 #define PNH "Preedit-AreaNeeded.height" 163 #define PSLX "Preedit-SpotLocation.x" 164 #define PSLY "Preedit-SpotLocation.y" 165 #define PCM "Preedit-Colormap" 166 #define PFG "Preedit-Foreground" 167 #define PBG "Preedit-Background" 168 #define PBP "Preedit-Bg/Pixmap" 169 #define PFS "Preedit-FontSet" 170 #define PLS "Preedit-LineSpacing" 171 #define PCU "Preedit-Cursor" 172 #define PSL "Preedit-StartCallbacks.client_data" 173 #define PSA "Preedit-StartCallbacks.callback" 174 #define POL "Preedit-DoneCallbacks.client_data" 175 #define POA "Preedit-DoneCallback.callback" 176 #define PRL "Preedit-DrawCallback.client_data" 177 #define PRA "Preedit-DrawCallback.callback" 178 #define PCL "Preedit-CaretCallback.client_data" 179 #define PCA "Preedit-CaretCallback.callback" 180 #define SAX "Status-Area.x" 181 #define SAY "Status-Area.y" 182 #define SAW "Status-Area.width" 183 #define SAH "Status-Area.height" 184 #define SNW "Status-AreaNeeded.width" 185 #define SNH "Status-AreaNeeded.height" 186 #define SCM "Status-Colormap" 187 #define SFG "Status-Foreground" 188 #define SBG "Status-Background" 189 #define SBP "Status-Bg/Pixmap" 190 #define SFS "Status-FontSet" 191 #define SCU "Status-Cursor" 192 #define SSL "Status-StartCallbacks.client_data" 193 #define SSA "Status-StartCallbacks.callback" 194 #define SOL "Status-DoneCallbacks.client_data" 195 #define SOA "Status-DoneCallbacks.callback" 196 #define SRL "Status-DrawCallbacks.client_data" 197 #define SRA "Status-DrawCallbacks.callback" 198 199 /* definition of flag for output style */ 200 #define DEC 0x000a 201 #define HEX 0x0010 202 #define STR 0x0100 203 204 /* definition of PreEdit/Status window area */ 205 /* Preedit area on OVER-the-spot mode */ 206 #define XPOVER 0 /* X axis */ 207 #define YPOVER 0 /* Y axis */ 208 #define WPOVER1 400 /* Width pattern 1 */ 209 #define WPOVER2 150 /* Width pattern 2 */ 210 #define HPOVER 300 /* Height */ 211 #define XPSL1 0 /* X axis of SpotLocation pattern 1 */ 212 #define XPSL2 300 /* X axis of SpotLocation pattern 2 */ 213 #define YPSL 16 /* Y axis of SpotLocation */ 214 #define LSPC1 5 /* LineSpacing pattern1 */ 215 #define LSPC2 10 /* LineSpacing pattern2 */ 216 /* Preedit area on OFF-the-spot mode */ 217 #define WPOFF1 600 /* Width pattern 1 */ 218 #define WPOFF2 800 /* Width pattern 2 */ 219 /* Status area on OVer-the-spot mode & OFf-the-spot mode */ 220 #define XSOVOF 20 /* X axis */ 221 #define YSOVOF 370 /* Y axis */ 222 #define WSOVOF1 100 /* Width pattern 1 */ 223 #define WSOVOF2 50 /* Width pattern 2 */ 224 225 #define ST_WIDTH 50 /* STatus WIDTH */ 226 #define PS_HEIGHT 20 /* Preedit/Status HEIGHT */ 227 228 /*************************/ 229 /* definition of KEYEV.C */ 230 /*************************/ 231 232 /* flags for XSet/UnsetICFocus check */ 233 #define SUICF 0x0001 /* Set/UnsetICFocus */ 234 235 /* flags for SetICValues check */ 236 #define FOCUS 0x0002 /* FOCUS window */ 237 #define RESNC 0x0004 /* RESource Name/RESource Class */ 238 #define AREA 0x0008 /* preedit/status AREA */ 239 #define NEEDED 0x0010 /* preedit/status area NEEDED */ 240 #define SPOT 0x0020 /* preedit SPOTlocation */ 241 #define COLORMAP 0x0040 /* preedit/status COLORMAP */ 242 #define GROUND 0x0080 /* preedit/status fore GROUND/back GROUND */ 243 #define PIXMAP 0x0100 /* preedit/status bg/PIXMAP */ 244 #define FONTSET 0x0200 /* preedit/status FONTSET */ 245 #define LINESPC 0x0400 /* preedit LINE SPaCing (only over-the-spot) */ 246 #define CURSOR 0x0800 /* preedit/status CURSOR */ 247 #define RESET 0x1000 /* xmb/wcRESETic */ 248 #define CHMOD 0x2000 /* return main menu to CHange MODe */ 249 250 /* window name geometry */ 251 #define MSTR_XY 5, 20 252 253 /***************************/ 254 /* definition of CHKCSET.C */ 255 /***************************/ 256 257 #define CHKRES 2 /* CHecK items, array of RESource name/class */ 258 259 /****************************/ 260 /* definition of CHKPSSET.C */ 261 /****************************/ 262 263 #define CHKAREA 8 264 #define CHKNEEDED 4 265 #define CHKSPOT 2 266 #define CHKCMAP 2 267 #define CHKFBGND 4 268 #define CHKPIX 2 269 #define CHKFONT 2 270 #define CHKCUR 2 271 272 /**************************/ 273 /* definition of curses.c */ 274 /**************************/ 275 #define PRDISP_GEOM 22, 80, 0, 1 /* geometry of print part */ 276 #define MODISP_GEOM 1, 80, 22, 1 /* geometry of mode part */ 277 #define STDISP_GEOM 1, 80, 23, 1 /* geometry of status part */ 278 279 #define TITLE_YX 6, 26 /* geometry of title(title) */ 280 #define COPYR_YX 14, 24 /* geometry of title(copyright) */ 281 282 #define MTITLE_YX 3, 33 /* geometry of menu mode (title) */ 283 #define MON_YX 7, 31 /* geometry of menu mode (mode1) */ 284 #define MOVER_YX 10, 31 /* geometry of menu mode (mode2) */ 285 #define MOFF_YX 13, 31 /* geometry of menu mode (mode3) */ 286 #define MROOT_YX 16, 31 /* geometry of menu mode (mode4) */ 287 #define EXIT_YX 19, 31 /* geometry of menu mode (exit) */ 288 #define MODISP_YX 22, 1 /* (y, x) of mode part */ 289 #define STDISP_YX 23, 1 /* (y, x) of status part */ 290 291 #define SLEEP_TIME 1 /* SLEEP TIME for process */ 292 293 294 /* macro */ 295 #define CALCY(winy, winh) ((winy) - ((winh) + (WIN_ITV))) 296 297 #define MB 0 /* Multi Byte string mode */ 298 #define WC 1 /* Wide Character string mode */ 299