00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _IMdkit_h
00022 #define _IMdkit_h
00023
00024 #include <X11/Xmd.h>
00025
00026 #ifdef __cplusplus
00027 extern "C"
00028 {
00029 #endif
00030
00031
00032 #define IMModifiers "modifiers"
00033 #define IMServerWindow "serverWindow"
00034 #define IMServerName "serverName"
00035 #define IMServerTransport "serverTransport"
00036 #define IMLocale "locale"
00037 #define IMInputStyles "inputStyles"
00038 #define IMProtocolHandler "protocolHandler"
00039 #define IMOnKeysList "onKeysList"
00040 #define IMOffKeysList "offKeysList"
00041 #define IMEncodingList "encodingList"
00042 #define IMFilterEventMask "filterEventMask"
00043 #define IMProtocolDepend "protocolDepend"
00044
00045
00046 #define I18N_IMSERVER_WIN 0x0001
00047 #define I18N_IM_NAME 0x0002
00048 #define I18N_IM_LOCALE 0x0004
00049 #define I18N_IM_ADDRESS 0x0008
00050 #define I18N_INPUT_STYLES 0x0010
00051 #define I18N_ON_KEYS 0x0020
00052 #define I18N_OFF_KEYS 0x0040
00053 #define I18N_IM_HANDLER 0x0080
00054 #define I18N_ENCODINGS 0x0100
00055 #define I18N_FILTERMASK 0x0200
00056 #define I18N_PROTO_DEPEND 0x0400
00057
00058 typedef struct {
00059 char *name;
00060 XPointer value;
00061 } XIMArg;
00062
00063 typedef struct {
00064 CARD32 keysym;
00065 CARD32 modifier;
00066 CARD32 modifier_mask;
00067 } XIMTriggerKey;
00068
00069 typedef struct {
00070 unsigned short count_keys;
00071 XIMTriggerKey *keylist;
00072 } XIMTriggerKeys;
00073
00074 typedef const char *XIMEncoding;
00075
00076 typedef struct {
00077 unsigned short count_encodings;
00078 XIMEncoding *supported_encodings;
00079 } XIMEncodings;
00080
00081 typedef struct _XIMS *XIMS;
00082
00083 typedef struct {
00084 void* (*setup)(Display *, XIMArg *);
00085 Status(*openIM)(XIMS);
00086 Status(*closeIM)(XIMS);
00087 char*(*setIMValues)(XIMS, XIMArg *);
00088 char*(*getIMValues)(XIMS, XIMArg *);
00089 Status(*forwardEvent)(XIMS, XPointer);
00090 Status(*commitString)(XIMS, XPointer);
00091 int (*callCallback)(XIMS, XPointer);
00092 int (*preeditStart)(XIMS, XPointer);
00093 int (*preeditEnd)(XIMS, XPointer);
00094 int (*syncXlib)(XIMS, XPointer);
00095 } IMMethodsRec, *IMMethods;
00096
00097 typedef struct {
00098 Display *display;
00099 int screen;
00100 } IMCoreRec, *IMCore;
00101
00102 typedef struct _XIMS {
00103 IMMethods methods;
00104 IMCoreRec core;
00105 Bool sync;
00106 void *protocol;
00107 } XIMProtocolRec;
00108
00109
00110
00111
00112 extern XIMS IMOpenIM(Display *, ...);
00113 extern Status IMCloseIM(XIMS);
00114 extern char *IMSetIMValues(XIMS, ...);
00115 extern char *IMGetIMValues(XIMS, ...);
00116 void IMForwardEvent(XIMS, XPointer);
00117 void IMCommitString(XIMS, XPointer);
00118 int IMCallCallback(XIMS, XPointer);
00119 int IMPreeditStart(XIMS, XPointer);
00120 int IMPreeditEnd(XIMS, XPointer);
00121 int IMSyncXlib(XIMS, XPointer);
00122
00123 #ifdef __cplusplus
00124 }
00125 #endif
00126
00127 #endif