Back to index

im-sdk  12.3.91
SunIMProt.h
Go to the documentation of this file.
00001 /*
00002 Copyright 1990-2001 Sun Microsystems, Inc. All Rights Reserved.
00003 
00004 Permission is hereby granted, free of charge, to any person obtaining a
00005 copy of this software and associated documentation files (the
00006 "Software"), to deal in the Software without restriction, including
00007 without limitation the rights to use, copy, modify, merge, publish,
00008 distribute, sublicense, and/or sell copies of the Software, and to
00009 permit persons to whom the Software is furnished to do so, subject to
00010 the following conditions: The above copyright notice and this
00011 permission notice shall be included in all copies or substantial
00012 portions of the Software.
00013 
00014 
00015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00016 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00017 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00018 IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE
00019 FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
00020 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
00021 THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF
00022 ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
00023 
00024 
00025 Except as contained in this notice, the names of The Open Group and/or
00026 Sun Microsystems, Inc. shall not be used in advertising or otherwise to
00027 promote the sale, use or other dealings in this Software without prior
00028 written authorization from The Open Group and/or Sun Microsystems,
00029 Inc., as applicable.
00030 
00031 
00032 X Window System is a trademark of The Open Group
00033 
00034 OSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF
00035 logo, LBX, X Window System, and Xinerama are trademarks of the Open
00036 Group. All other trademarks and registered trademarks mentioned herein
00037 are the property of their respective owners. No right, title or
00038 interest in or to any trademark, service mark, logo or trade name of
00039 Sun Microsystems, Inc. or its licensors is granted.
00040 
00041 */
00042 #ifndef SUNIMPROT_H
00043 #define SUNIMPROT_H
00044 
00045 #ifndef Private
00046 #define Private static
00047 #define Public       
00048 #endif /* Private */
00049 
00050 /*
00051  * This is for public_status in iml_session_t/status in IC. Used by
00052  * IML_SET_STATUS/IML_GET_STATUS
00053  */
00054 typedef int iml_status_t;
00055 
00056 #define IMLSTATUS_Henkan_Mode                 0x00000001
00057 #define IMLSTATUS_Mode_switch                 0x00000002
00058 #define IMLSTATUS_Backfront                   0x00000004       /* if 1, backend */
00059 #define IMLSTATUS_Backfront_Recommendation    0x00000008       /* if 1, backend */
00060 
00061 /* ------------------------------------------------------------ */
00062 
00063 /*
00064  * IML to IMM opcode
00065  */
00066 typedef unsigned int IMM_Opcode;
00067 
00068 #define IMM_NOP                  0 /* Nop */
00069 
00070 #define IMM_RESET                1 /* Reset the IC */
00071 
00072 #define IMM_COMMIT               2 /* Returning a committed
00073                                     * string */
00074 
00075 #define IMM_SET_STATUS           3 /* iml status i.e.ConvOn/off
00076                                     * kana etc.. */
00077 
00078 #define IMM_PREEDIT_START        4 /* Call the preedit_start
00079                                     * callback */
00080 
00081 #define IMM_PREEDIT_DRAW         5 /* Call the preedit_draw
00082                                     * callback */
00083 
00084 #define IMM_PREEDIT_CARET        6 /* Call the preedit_caret
00085                                     * callback */
00086 
00087 #define IMM_PREEDIT_DONE         7 /* Call the preedit_done call
00088                                     * back */
00089 
00090 #define IMM_LOOKUP_START         8 /* Call the lookup_start
00091                                     * callback */
00092 
00093 #define IMM_LOOKUP_DRAW          9 /* Call the lookup_draw
00094                                     * callback */
00095 
00096 #define IMM_LOOKUP_PROCESS      10 /* Call the lookup_process
00097                                     * callback */
00098 
00099 #define IMM_LOOKUP_DONE         11 /* Call the lookup_done
00100                                     * callback */
00101 
00102 #define IMM_KEY_INFO            12 /* Return the key that
00103                                     * corresponds to */
00104 /* specified function */
00105 /* operand : keymaps_t */
00106 #define IMM_PUT_QUEUE           13 /* Put the string back to X
00107                                     * queue */
00108 
00109 #define IMM_STATUS_START        14 /* Call the status_start
00110                                     * callback */
00111 
00112 #define IMM_STATUS_DRAW         15 /* Call the status_draw
00113                                     * callback */
00114 
00115 #define IMM_STATUS_DONE         16 /* Call the status_done
00116                                     * callback */
00117 
00118 #define IMM_KEYPRESS            17 /* Return X event to the
00119                                     * client */
00120 
00121 #define IMM_RESET_RETURN        18 /* same as commit */
00122 
00123 #define IMM_AUX_START_2            20     /* Call the aux_start
00124                                     * callback */
00125 
00126 #define IMM_AUX_DRAW_2             21     /* Call the aux_draw callback */
00127 
00128 #define IMM_AUX_DONE_2             22     /* Call the aux_done callback */
00129 
00130 #define IMM_OBJECTDOWNLOADING      23     /* Call the aux_done callback */
00131 
00132 #define IMM_NS_LISTENER         24 /* Call the ns_listener callback  */
00133 
00134 #define MAX_IMM_OPCODE          25 /* maximam opcode value */
00135 
00136 #define IMM_CB_RESULT_REQUIRED  0x10000000
00137 
00138 /*
00139  * iml_inst structure
00140  */
00141 typedef struct _iml_inst {
00142     struct _iml_inst *next;
00143     int size_of_operand;
00144     IMM_Opcode opcode;
00145     char *operand;
00146 }   iml_inst;
00147 
00148 #endif /* SUNIMPROT_H */