Back to index

im-sdk  12.3.91
le.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2003 Sun Microsystems Inc.
00003  *
00004  * This is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the
00016  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017  * Boston, MA 02111-1307, USA.
00018  *
00019  * Authors: Karl Park <karl.park@sun.com>
00020  */
00021 
00022 #ifndef __LE_H__
00023 #define __LE_H__
00024 
00025 #include "SunIM.h"
00026 #include "koinput.h"
00027 
00028 /* record the status of Auxiliary window */
00029 typedef struct {
00030   int  x;
00031   int  y;
00032   char on;           /* On or Off status of Auxiliary Window */
00033   char junjabanja;          /* JunJa/BanJa Status */
00034   char punct;        /* Punctuation Status       */ 
00035   int  engine_id;    /* Current Input Method ID */
00036 }   TPaletteAuxStatus;
00037 
00038 typedef struct {
00039   int  x;
00040   int  y;
00041   int  keyboard_id;    /* Virtual Keyboard ID */
00042   char key_status;
00043 }   TKeyboardAuxStatus;
00044 
00045 typedef struct {
00046   char        on;
00047   char lookup_id;    /* Lookup Table ID */
00048 }   TLookupAuxStatus;
00049 
00050 typedef struct {
00051   char        on;
00052 }   TSelectAuxStatus;
00053 
00054 typedef struct {
00055   char        on;
00056 }   TOptionAuxStatus;
00057 
00058 typedef enum {
00059   UNKNOWN_IMP,
00060   IIIMP,
00061   XIMP,
00062   XIMCP
00063 }   TIMProtocolType;
00064 
00065 typedef enum {
00066   UNKNOWN_CLIENT,
00067   JAVA_CLIENT,
00068   X11_CLIENT
00069 }   TClientType;
00070 
00071 /* data per desktop */
00072 typedef struct {
00073   iml_session_t      *current_session;
00074   iml_session_t      *root_session;
00075   CARD8              selectaux_started;
00076   CARD8              optionaux_started;
00077   CARD8              keyboardaux_started;
00078   CARD8              lookupaux_started;
00079   CARD8              actionaux_started;
00080   CARD8              paletteaux_started;
00081   CARD8              paletteaux_first_trigger_on;
00082   CARD8              paletteaux_ready;
00083   CARD8              aux_locale_id;
00084   CARD8              bSentKeymapToAux[MAX_ENGINE_NUM];
00085   IMEArgList  ime_args[MAX_ENGINE_NUM];
00086   UserPreference     user_pref;
00087 } MyDataPerDesktop;
00088 
00089 /* data per session */
00090 
00091 typedef struct _SessionCoreStruct SessionCoreStruct;
00092 struct _SessionCoreStruct{
00093   IMEBufferMethods ime_methods_table;
00094   IMEBuffer            ime_buffer;
00095 };
00096 typedef struct {
00097   TPaletteAuxStatus         paletteaux_status;
00098   TKeyboardAuxStatus        keyboardaux_status;
00099   TLookupAuxStatus   lookupaux_status;
00100   TSelectAuxStatus   selectaux_status;
00101   TOptionAuxStatus   optionaux_status;
00102   TIMProtocolType           protocol_type;
00103   TClientType                      client_type;
00104   int                     input_mode;
00105   SessionCoreStruct  session_core;
00106   IMEEngine *p_engine;
00107 } MyDataPerSession;
00108 
00109 #endif /* __LE_H__ */