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 #define       NS_LOCAL "local"
00051 #define NS_REMOTE "remote"
00052 #define NS_DATABASE "database"
00053 
00054 /*
00055  * This is for public_status in iml_session_t/status in IC. Used by
00056  * IML_SET_STATUS/IML_GET_STATUS
00057  */
00058 typedef int iml_status_t;
00059 
00060 #define IMLSTATUS_Henkan_Mode                 0x00000001
00061 #define IMLSTATUS_Mode_switch                 0x00000002
00062 #define IMLSTATUS_Backfront                   0x00000004       /* if 1, backend */
00063 #define IMLSTATUS_Backfront_Recommendation    0x00000008       /* if 1, backend */
00064 
00065 /* ------------------------------------------------------------ */
00066 
00067 /*
00068  * IML to IMM opcode
00069  */
00070 typedef unsigned int IMM_Opcode;
00071 
00072 #define IMM_NOP                  0 /* Nop */
00073 
00074 #define IMM_RESET                1 /* Reset the IC */
00075 
00076 #define IMM_COMMIT               2 /* Returning a committed
00077                                     * string */
00078 
00079 #define IMM_SET_STATUS           3 /* iml status i.e.ConvOn/off
00080                                     * kana etc.. */
00081 
00082 #define IMM_PREEDIT_START        4 /* Call the preedit_start
00083                                     * callback */
00084 
00085 #define IMM_PREEDIT_DRAW         5 /* Call the preedit_draw
00086                                     * callback */
00087 
00088 #define IMM_PREEDIT_CARET        6 /* Call the preedit_caret
00089                                     * callback */
00090 
00091 #define IMM_PREEDIT_DONE         7 /* Call the preedit_done call
00092                                     * back */
00093 
00094 #define IMM_LOOKUP_START         8 /* Call the lookup_start
00095                                     * callback */
00096 
00097 #define IMM_LOOKUP_DRAW          9 /* Call the lookup_draw
00098                                     * callback */
00099 
00100 #define IMM_LOOKUP_PROCESS      10 /* Call the lookup_process
00101                                     * callback */
00102 
00103 #define IMM_LOOKUP_DONE         11 /* Call the lookup_done
00104                                     * callback */
00105 
00106 #define IMM_KEY_INFO            12 /* Return the key that
00107                                     * corresponds to */
00108 /* specified function */
00109 /* operand : keymaps_t */
00110 #define IMM_PUT_QUEUE           13 /* Put the string back to X
00111                                     * queue */
00112 
00113 #define IMM_STATUS_START        14 /* Call the status_start
00114                                     * callback */
00115 
00116 #define IMM_STATUS_DRAW         15 /* Call the status_draw
00117                                     * callback */
00118 
00119 #define IMM_STATUS_DONE         16 /* Call the status_done
00120                                     * callback */
00121 
00122 #define IMM_KEYPRESS            17 /* Return X event to the
00123                                     * client */
00124 
00125 #define IMM_RESET_RETURN        18 /* same as commit */
00126 
00127 #define IMM_AUX_START_2            20     /* Call the aux_start
00128                                     * callback */
00129 
00130 #define IMM_AUX_DRAW_2             21     /* Call the aux_draw callback */
00131 
00132 #define IMM_AUX_DONE_2             22     /* Call the aux_done callback */
00133 
00134 #define IMM_OBJECTDOWNLOADING      23     /* Call the aux_done callback */
00135 
00136 #define IMM_NS_LISTENER         24 /* Call the ns_listener callback  */
00137 
00138 #define MAX_IMM_OPCODE          25 /* maximam opcode value */
00139 
00140 #define IMM_CB_RESULT_REQUIRED  0x10000000
00141 
00142 /*
00143  * iml_inst structure
00144  */
00145 typedef struct _iml_inst {
00146     struct _iml_inst *next;
00147     int size_of_operand;
00148     IMM_Opcode opcode;
00149     char *operand;
00150 }   iml_inst;
00151 
00152 #endif /* SUNIMPROT_H */