Back to index

im-sdk  12.3.91
Classes | Defines | Typedefs | Enumerations | Functions
ime.h File Reference
#include "imkey.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ImeKeyRec
struct  ImeFeedbackRec
 decoration/feedback for sub-string More...
struct  ImeTextRec
 Text with decorations. More...
struct  ImePreeditRec
 Preedit data with decoration and caret position. More...
struct  ImeCandidatesRec
struct  ImeStringPropertyRangeRec
 limits for the string length. More...
struct  ImeIntPropertyRange
 limits for integer values. More...
struct  ImeFloatPropertyRangeRec
 limits for float values, (0, 0) means no limits More...
union  ImePropertyRangeRec
 simple union for serveral range types More...
union  ImePropertyValueRec
 union type for property values More...
struct  ImePropertyRec
 standard property for configuration More...
struct  ImePropertyListRec
 Infact a property array with count information. More...
struct  ImeInfoRec
struct  ImeEventHeadRec
 Standard event head, also used for common event. More...
struct  ImeEventImmNotifyRec
 Standard notification from status bar, including full/half punc status, confige request, etc. More...
struct  ImeMoveEventRec
 Move Event type must be IME_EVENT_MOVE, param is not used. More...
struct  ImePreeditDataEventRec
 Preedit data event. More...
struct  ImeCandidateDataEventRec
 Candidates data event. More...
struct  ImePropertyEventRec
 event for propertis. More...
struct  ImeDataEventRec
 common user customized event/message More...
union  ImeEventRec
struct  ImmServicesRec
struct  ImeMethodsRec
struct  ImmServicesUiRec
struct  ImUiMethodsRec

Defines

#define IME_RGB_COLOR(red, green, blue)   ((int)((red<<16) + (green<<8) + blue))
#define IME_RGB_COLOR_RED(color)   ((int)(color>>16))
#define IME_RGB_COLOR_GREEN(color)   ((int)((color>>8)&0x00ff))
#define IME_RGB_COLOR_BLUE(color)   ((int)(color&0x0000ff))
#define IME_MOVE_FREELY   (-65535)
 When used in ImeMoveEventRec, means UI determines the position/size.

Typedefs

typedef ImeKeyRecImeKey
 Pointer type to ImeKeyRec.
typedef unsigned ImHandle
typedef ImHandle ImeInputContext
typedef ImeFeedbackRecImeFeedback
 pointer type to ImeFeedbackRec
typedef ImeTextRecImeText
 Pointer type to ImeTextRec.
typedef ImePreeditRecImePreedit
 Pointer type to ImePreeditRec.
typedef ImeCandidatesRecImeCandidates
 Pointer type to ImeCandidatesRec.
typedef ImePropertyRecImeProperty
 Pointer type to ImePropertyRec.
typedef ImePropertyListRecImePropertyList
 Pointer type to ImePropertyListRec.
typedef ImeInfoRecImeInfo
typedef ImeEventHeadRecImeEventHead
 Pointer type to ImeEventHeadRec.
typedef ImeEventImmNotifyRecImeEventImmNotify
typedef ImeEventHeadRec ImeQuitEventRec
 Quit event, same as ImeEventHeadRec.
typedef ImeQuitEventRecImeQuitEvent
 Pointer type to ImeQuitEventRec.
typedef ImeEventHeadRec ImeExposeEventRec
 Expose event, same as ImeEventHeadRec.
typedef ImeExposeEventRecImeExposeEvent
 Pointer type to ImeExposeEventRec.
typedef ImeEventHeadRec ImeCandidateSelectEventRec
typedef ImeEventHeadRec ImeCandidatePageEventRec
typedef ImeMoveEventRecImeMoveEvent
 Pointer type to ImeMoveEventRec.
typedef ImePreeditDataEventRecImePreeditDataEvent
 Pointer type to ImePreeditDataEventRec.
typedef ImeEventHeadRec ImePreeditCaretMoveEventRec
 Preedit caret move event, same as ImeEventHeadRec.
typedef
ImePreeditCaretMoveEventRec
ImePreeditCaretMoveEvent
 Pointer type to ImePreeditCaretMoveEventRec.
typedef ImeCandidateDataEventRecImeCandidateDataEvent
 Pointer type to ImeCandidateDataEventRec.
typedef ImePropertyEventRecImePropertyEvent
typedef ImeDataEventRecImeDataEvent
 Pointer type to ImeDataEventRec.
typedef ImeEventRecImeEvent
 Pointer type to ImeEventRec.
typedef ImmServicesRecImmServices
 Pointer type to ImmServicesRec.
typedef ImeMethodsRecImeMethods
 Pointer to ImeMethodsRec.
typedef ImmServicesUiRecImmServicesUi
typedef ImUiMethodsRecImUiMethods

Enumerations

enum  ImeEncoding {
  ENCODE_INVALID = -1, ENCODE_GB2312 = 0, ENCODE_GBK, ENCODE_GB18030,
  ENCODE_BIG5, ENCODE_BIG5HKSCS, ENCODE_EUCTW, ENCODE_EUCKR,
  ENCODE_EUCJP, ENCODE_EUCTH, ENCODE_UTF8, ENCODE_UTF16,
  ENCODE_UTF16BE, ENCODE_UTF16LE, ENCODE_UTF32, ENCODE_UCS4,
  ENCODE_UCS4LE, ENCODE_UCS4BE, ENCODES_NUM, ENCODE_INVALID = -1,
  ENCODE_GB2312 = 0, ENCODE_GBK, ENCODE_GB18030, ENCODE_BIG5,
  ENCODE_BIG5HKSCS, ENCODE_EUCTW, ENCODE_EUCKR, ENCODE_EUCJP,
  ENCODE_EUCTH, ENCODE_UTF8, ENCODE_UTF16, ENCODE_UTF16BE,
  ENCODE_UTF16LE, ENCODE_UTF32, ENCODE_UCS4, ENCODE_UCS4LE,
  ENCODE_UCS4BE, ENCODES_NUM, ENCODE_INVALID = -1, ENCODE_GB2312 = 0,
  ENCODE_GBK, ENCODE_GB18030, ENCODE_BIG5, ENCODE_BIG5HKSCS,
  ENCODE_EUCTW, ENCODE_EUCKR, ENCODE_EUCJP, ENCODE_EUCTH,
  ENCODE_UTF8, ENCODE_UTF16, ENCODE_UTF16BE, ENCODE_UTF16LE,
  ENCODE_UTF32, ENCODE_UCS4, ENCODE_UCS4LE, ENCODE_UCS4BE,
  ENCODES_NUM
}
 The Encoding alias definition for exchange between LE and IME. More...
enum  ImeFeedbackType {
  ImeFeedbackDecoration = 0, ImeFeedbackForegroundRGB, ImeFeedbackBackgroundRGB, ImeFeedbackDecoration = 0,
  ImeFeedbackForegroundRGB, ImeFeedbackBackgroundRGB
}
enum  ImeScopeType {
  IME_SCOPE_SESSION = 0, IME_SCOPE_DESKTOP, IME_SCOPE_USER, IME_SCOPE_SESSION = 0,
  IME_SCOPE_DESKTOP, IME_SCOPE_USER
}
enum  ImeDecorationStyle {
  IME_DECORATION_NORMAL = 0, IME_DECORATION_REVERSE = 1, IME_DECORATION_HIGHLIGHT = (IME_DECORATION_REVERSE << 1), IME_DECORATION_UNDERLINE = (IME_DECORATION_HIGHLIGHT << 1),
  IME_DECORATION_UNDERWAVE = (IME_DECORATION_UNDERLINE << 1), IME_DECORATION_NORMAL = 0, IME_DECORATION_REVERSE = 1, IME_DECORATION_HIGHLIGHT = (IME_DECORATION_REVERSE << 1),
  IME_DECORATION_UNDERLINE = (IME_DECORATION_HIGHLIGHT << 1), IME_DECORATION_UNDERWAVE = (IME_DECORATION_UNDERLINE << 1)
}
 possible values for ImeFeedbackRec::value when ImeFeedbackRec::type is ImeFeedbackDecoration More...
enum  ImeCandidatePageMask { ImeCandidatesFirstPage = 1, ImeCandidatesLastPage = 2, ImeCandidatesFirstPage = 1, ImeCandidatesLastPage = 2 }
 bit mask to indicate whether or not current page is first page or last page. More...
enum  ImePropertyType {
  ImeProperty_String, ImeProperty_Int, ImeProperty_Float, ImeProperty_Toggle,
  ImeProperty_Selection, ImeProperty_String, ImeProperty_Int, ImeProperty_Float,
  ImeProperty_Toggle, ImeProperty_Selection
}
 Propertyies type. More...
enum  ImeAuxEventType {
  IME_EVENT_CUSTOM_DATA = 0, IME_EVENT_IMM_NOTIFY, IME_EVENT_QUIT, IME_EVENT_EXPOSE,
  IME_EVENT_MOVE, IME_EVENT_PREEDIT_DATA, IME_EVENT_PREEDIT_CARET_MOVE, IME_EVENT_CANDI_DATA,
  IME_EVENT_PROPERTY, IME_EVENT_CANDI_PAGE, IME_EVENT_CANDI_FOCUS, IME_EVENT_CANDI_SELECT,
  IME_EVENT_NONE, IME_EVENT_CUSTOM_DATA = 0, IME_EVENT_IMM_NOTIFY, IME_EVENT_QUIT,
  IME_EVENT_EXPOSE, IME_EVENT_MOVE, IME_EVENT_PREEDIT_DATA, IME_EVENT_PREEDIT_CARET_MOVE,
  IME_EVENT_CANDI_DATA, IME_EVENT_PROPERTY, IME_EVENT_CANDI_PAGE, IME_EVENT_CANDI_FOCUS,
  IME_EVENT_CANDI_SELECT, IME_EVENT_NONE
}
 standard event/message type definition More...
enum  ImmTriggerType {
  IMM_TRIGGER_FULL_HALF_SIMBOL = 0, IMM_TRIGGER_FULL_HALF_PUNC, IMM_TRIGGER_LANGUAGE, IMM_TRIGGER_CONFIG_REQUEST,
  IMM_TRIGGER_FULL_HALF_SIMBOL = 0, IMM_TRIGGER_FULL_HALF_PUNC, IMM_TRIGGER_LANGUAGE, IMM_TRIGGER_CONFIG_REQUEST
}
enum  ImeUIStatusMask {
  IMUI_STATE_SHOW = 1, IMUI_STATE_ENABLE = (IMUI_STATE_SHOW <<1), IMUI_STATE_CHECK = (IMUI_STATE_ENABLE<<1), IMUI_STATE_SHOW = 1,
  IMUI_STATE_ENABLE = (IMUI_STATE_SHOW <<1), IMUI_STATE_CHECK = (IMUI_STATE_ENABLE<<1)
}
 Status definition for GUI status about show/hide, bit masks. More...
enum  ImePageOperation {
  ImeCandidatesPageFirst, ImeCandidatesPagePrevious, ImeCandidatesPageNext, ImeCandidatesPageLast,
  ImeCandidatesPageFirst, ImeCandidatesPagePrevious, ImeCandidatesPageNext, ImeCandidatesPageLast
}
 page operations More...
enum  ImeBeepType { ImeBeepWarning, ImeBeepError, ImeBeepWarning, ImeBeepError }
 Type of beeps. More...
enum  ImeKeyType {
  IME_FILTERED_KEY_UNUSED = 0, IME_FILTERED_KEY_ESCAPE, IME_FILTERED_KEY_ENTER, IME_FILTERED_KEY_SPACEBAR,
  IME_FILTERED_KEY_PAGEUP, IME_FILTERED_KEY_PAGEDOWN, IME_FILTERED_KEY_INSERT, IME_FILTERED_KEY_DELETE,
  IME_FILTERED_KEY_BACKSPACE, IME_FILTERED_KEY_HOME, IME_FILTERED_KEY_END, IME_FILTERED_KEY_LEFT,
  IME_FILTERED_KEY_RIGHT, IME_FILTERED_KEY_UP, IME_FILTERED_KEY_DOWN, IME_FILTERED_KEY_UNUSED = 0,
  IME_FILTERED_KEY_ESCAPE, IME_FILTERED_KEY_ENTER, IME_FILTERED_KEY_SPACEBAR, IME_FILTERED_KEY_PAGEUP,
  IME_FILTERED_KEY_PAGEDOWN, IME_FILTERED_KEY_INSERT, IME_FILTERED_KEY_DELETE, IME_FILTERED_KEY_BACKSPACE,
  IME_FILTERED_KEY_HOME, IME_FILTERED_KEY_END, IME_FILTERED_KEY_LEFT, IME_FILTERED_KEY_RIGHT,
  IME_FILTERED_KEY_UP, IME_FILTERED_KEY_DOWN
}
 some key value definition returned by ImmPrefilterKey More...
enum  ImmResult { IMM_OK = 0, IMM_FAIL, IMM_OK = 0, IMM_FAIL }
enum  ImeResult {
  IME_OK = 0, IME_FAIL, IME_UNUSED_KEY, IME_INVALID_KEY,
  IME_UNPROCESSED_EVENT, IME_UNSUPPORT_VERSION, IME_WRONG_ARGS, IME_FIRST_CUSTOM_ERROR = 1000,
  IME_OK = 0, IME_FAIL, IME_UNUSED_KEY, IME_INVALID_KEY,
  IME_UNPROCESSED_EVENT, IME_UNSUPPORT_VERSION, IME_WRONG_ARGS, IME_FIRST_CUSTOM_ERROR = 1000
}

Functions

ImeResult RegisterIME (ImmServices srvs, ImeInfo *ppinfo, ImeMethods *pmthds, int argc, char **argv)

Class Documentation

struct ImeKeyRec

Definition at line 29 of file ime.h.

Class Members
int keychar corresponding ASCII char value if the key press is an ASCII value. Valid for
and [0x20-0x7E]
int keycode virtual key code for the key just be pressed, please IME_VK_xxx
int modifier status for modify key and mouse buttons, reference IME_XXX_MASK definition
int time_stamp incremental integers (per client), time_stamp when the key press happened.
struct ImeFeedbackRec

decoration/feedback for sub-string

A feedback would specify decoration of all characters in a specific range of an string.

Definition at line 58 of file ime.h.

Class Members
int length number of characters in the sub-string
int start starting position of the sub-string, (count start from 0)
ImeFeedbackType type type of the decoration
int value depending on type, value could be style, color
struct ImeTextRec

Text with decorations.

A string could have multiple feedback to give it presentation. When IME sends these Decoration, it should make sure there is no conflicts among them. Otherwise, the exact decoration result is not defined. Please note that the sub-strings in different feedback could be overlaped as long as they do not conflicts with each other.

Definition at line 90 of file ime.h.

Collaboration diagram for ImeTextRec:
Class Members
unsigned int count_feedbacks number of feedbacks
ImeFeedbackRec * feedbacks feedback array
unsigned char * text pointer to the text buffer
struct ImePreeditRec

Preedit data with decoration and caret position.

Definition at line 99 of file ime.h.

Collaboration diagram for ImePreeditRec:
Class Members
int caret the caret lays just before which character
int cl_start the candidate list starting position, to locate the candidate list window position
ImeTextRec preedit the decorated text
struct ImeCandidatesRec

Definition at line 113 of file ime.h.

Collaboration diagram for ImeCandidatesRec:
Class Members
ImeText candidates Pointer array, 'count' items in the array.
int count How many candidates here.
int focus current focused candidate, [0..count], 0 means no focused candidate
int horizental 1 to use horizental layout, 0 to use vertical layout, to make it compatible default vertical (0)
unsigned char * numbers numbering
int page_state first/last page information, safe to set it to 0 for those IME do not know how many pages and current page.
unsigned char * title title for the candidates, whether or not Aux support candidate area title is implementation depenedent.
struct ImeStringPropertyRangeRec

limits for the string length.

(0, 0) means no limitation

Definition at line 142 of file ime.h.

Class Members
unsigned int max_length maximum length
unsigned int min_length minimum length
struct ImeIntPropertyRange

limits for integer values.

(0, 0) means no limitation

Definition at line 148 of file ime.h.

Class Members
int max max value
int min min value
struct ImeFloatPropertyRangeRec

limits for float values, (0, 0) means no limits

Definition at line 154 of file ime.h.

Class Members
float max max value
float min min value
union ImePropertyRangeRec

simple union for serveral range types

Definition at line 160 of file ime.h.

Collaboration diagram for ImePropertyRangeRec:
Class Members
ImeFloatPropertyRangeRec float_range float range
ImeIntPropertyRange int_range integer value range
ImeStringPropertyRangeRec len_range string len range
char ** multiString_range MultiString to select, the last string must be NULL.
union ImePropertyValueRec

union type for property values

Definition at line 168 of file ime.h.

Class Members
float float_value float value
int int_value int value
char * string_value string value
struct ImePropertyRec

standard property for configuration

Definition at line 175 of file ime.h.

Collaboration diagram for ImePropertyRec:
Class Members
ImeEncoding encode encode for the following strings
int id ??? maybe not needed???
const char * key Path string looks like unix file path, for uniquely identify a property.
const char * name for display usage
ImePropertyRangeRec range range of the property
const char * tip simple description
ImePropertyType type type of the property
ImePropertyValueRec value current value of the property
struct ImePropertyListRec

Infact a property array with count information.

Note:
Please look at ImeMethodsRec::ImmConfigIme()

Definition at line 192 of file ime.h.

Collaboration diagram for ImePropertyListRec:
Class Members
int count number of properties
ImeProperty properties pointer to properties array
struct ImeInfoRec

Definition at line 200 of file ime.h.

Collaboration diagram for ImeInfoRec:
Class Members
const char * author IME's author.
const char * copyright Copyright string.
ImeEncoding encoding encoding used by all strings communicating with IMM, like preedit
const char * hinting Simple descrition for the IME. Maybe displayed as StatusBar's button hinting.
const char * icon_file If relative path, to the dir of IME's so file. File format: XPM.
int mt_safe whether or not this IME is MultiThread safe.
const char * name localized input method name, also in above encoding
ImePropertyList pl property list used to do standard configuration. could be NULL.
void * specific_data IME's specific data. used for single so get into serveral IMEs.
const char * support_locales locale the IME supports, string with different locales seperated by ',' .
const char * uuid IME's English name.
int version IME's version. version%100 is minor version, version/100 is major version.

Define Documentation

#define IME_RGB_COLOR (   red,
  green,
  blue 
)    ((int)((red<<16) + (green<<8) + blue))

Definition at line 77 of file ime.h.

#define IME_RGB_COLOR_BLUE (   color)    ((int)(color&0x0000ff))

Definition at line 80 of file ime.h.

#define IME_RGB_COLOR_GREEN (   color)    ((int)((color>>8)&0x00ff))

Definition at line 79 of file ime.h.

#define IME_RGB_COLOR_RED (   color)    ((int)(color>>16))

Definition at line 78 of file ime.h.


Typedef Documentation

Pointer type to ImeCandidatesRec.

Definition at line 123 of file ime.h.

pointer type to ImeFeedbackRec

Definition at line 65 of file ime.h.

typedef ImeInfoRec* ImeInfo

Definition at line 215 of file ime.h.

Definition at line 40 of file ime.h.

typedef ImeKeyRec* ImeKey

Pointer type to ImeKeyRec.

Definition at line 36 of file ime.h.

Pointer to ImeMethodsRec.

Definition at line 541 of file ime.h.

Pointer type to ImePreeditRec.

Definition at line 105 of file ime.h.

Pointer type to ImePropertyRec.

Definition at line 186 of file ime.h.

Pointer type to ImePropertyListRec.

Definition at line 197 of file ime.h.

typedef ImeTextRec* ImeText

Pointer type to ImeTextRec.

Definition at line 96 of file ime.h.

typedef unsigned ImHandle

Definition at line 38 of file ime.h.

Pointer type to ImmServicesRec.

Definition at line 498 of file ime.h.

Definition at line 555 of file ime.h.

Definition at line 564 of file ime.h.


Enumeration Type Documentation

Type of beeps.

Enumerator:
ImeBeepWarning 

beep for warning

ImeBeepError 

beep for an error

ImeBeepWarning 

beep for warning

ImeBeepError 

beep for an error

Definition at line 417 of file ime.h.

bit mask to indicate whether or not current page is first page or last page.

Used as value for ImeCandidatsRec::page_state

Enumerator:
ImeCandidatesFirstPage 

is first page

ImeCandidatesLastPage 

is last page

ImeCandidatesFirstPage 

is first page

ImeCandidatesLastPage 

is last page

Definition at line 108 of file ime.h.

possible values for ImeFeedbackRec::value when ImeFeedbackRec::type is ImeFeedbackDecoration

Enumerator:
IME_DECORATION_NORMAL 

No specitial decoration.

IME_DECORATION_REVERSE 

reverse

IME_DECORATION_HIGHLIGHT 

highligh

IME_DECORATION_UNDERLINE 

under_line

IME_DECORATION_UNDERWAVE 

under_line wave

IME_DECORATION_NORMAL 

No specitial decoration.

IME_DECORATION_REVERSE 

reverse

IME_DECORATION_HIGHLIGHT 

highligh

IME_DECORATION_UNDERLINE 

under_line

IME_DECORATION_UNDERWAVE 

under_line wave

Definition at line 68 of file ime.h.

The Encoding alias definition for exchange between LE and IME.

Enumerator:
ENCODE_INVALID 
ENCODE_GB2312 
ENCODE_GBK 
ENCODE_GB18030 
ENCODE_BIG5 
ENCODE_BIG5HKSCS 
ENCODE_EUCTW 
ENCODE_EUCKR 
ENCODE_EUCJP 
ENCODE_EUCTH 
ENCODE_UTF8 
ENCODE_UTF16 
ENCODE_UTF16BE 
ENCODE_UTF16LE 
ENCODE_UTF32 
ENCODE_UCS4 
ENCODE_UCS4LE 
ENCODE_UCS4BE 
ENCODES_NUM 
ENCODE_INVALID 
ENCODE_GB2312 
ENCODE_GBK 
ENCODE_GB18030 
ENCODE_BIG5 
ENCODE_BIG5HKSCS 
ENCODE_EUCTW 
ENCODE_EUCKR 
ENCODE_EUCJP 
ENCODE_EUCTH 
ENCODE_UTF8 
ENCODE_UTF16 
ENCODE_UTF16BE 
ENCODE_UTF16LE 
ENCODE_UTF32 
ENCODE_UCS4 
ENCODE_UCS4LE 
ENCODE_UCS4BE 
ENCODES_NUM 
ENCODE_INVALID 
ENCODE_GB2312 
ENCODE_GBK 
ENCODE_GB18030 
ENCODE_BIG5 
ENCODE_BIG5HKSCS 
ENCODE_EUCTW 
ENCODE_EUCKR 
ENCODE_EUCJP 
ENCODE_EUCTH 
ENCODE_UTF8 
ENCODE_UTF16 
ENCODE_UTF16BE 
ENCODE_UTF16LE 
ENCODE_UTF32 
ENCODE_UCS4 
ENCODE_UCS4LE 
ENCODE_UCS4BE 
ENCODES_NUM 

Definition at line 7 of file ime.h.

Enumerator:
ImeFeedbackDecoration 

common decoration, such as highlight, underline, etc

ImeFeedbackForegroundRGB 

decoration with foreground color

ImeFeedbackBackgroundRGB 

decoration with background color

ImeFeedbackDecoration 

common decoration, such as highlight, underline, etc

ImeFeedbackForegroundRGB 

decoration with foreground color

ImeFeedbackBackgroundRGB 

decoration with background color

Definition at line 42 of file ime.h.

enum ImeKeyType

some key value definition returned by ImmPrefilterKey

Enumerator:
IME_FILTERED_KEY_UNUSED 
IME_FILTERED_KEY_ESCAPE 
IME_FILTERED_KEY_ENTER 
IME_FILTERED_KEY_SPACEBAR 
IME_FILTERED_KEY_PAGEUP 
IME_FILTERED_KEY_PAGEDOWN 
IME_FILTERED_KEY_INSERT 
IME_FILTERED_KEY_DELETE 
IME_FILTERED_KEY_BACKSPACE 
IME_FILTERED_KEY_HOME 
IME_FILTERED_KEY_END 
IME_FILTERED_KEY_LEFT 
IME_FILTERED_KEY_RIGHT 
IME_FILTERED_KEY_UP 
IME_FILTERED_KEY_DOWN 
IME_FILTERED_KEY_UNUSED 
IME_FILTERED_KEY_ESCAPE 
IME_FILTERED_KEY_ENTER 
IME_FILTERED_KEY_SPACEBAR 
IME_FILTERED_KEY_PAGEUP 
IME_FILTERED_KEY_PAGEDOWN 
IME_FILTERED_KEY_INSERT 
IME_FILTERED_KEY_DELETE 
IME_FILTERED_KEY_BACKSPACE 
IME_FILTERED_KEY_HOME 
IME_FILTERED_KEY_END 
IME_FILTERED_KEY_LEFT 
IME_FILTERED_KEY_RIGHT 
IME_FILTERED_KEY_UP 
IME_FILTERED_KEY_DOWN 

Definition at line 423 of file ime.h.

Propertyies type.

Property could be used to construct GUI for user to specify their values.

Note:
, Properties used only for configuration user preference, do not think about using this could help other things greatly.
Enumerator:
ImeProperty_String 

String type, have length limits.

ImeProperty_Int 

Integer type, have value limits.

ImeProperty_Float 

float type, have value limits

ImeProperty_Toggle 

boolean, or [0,1] int value, value is int value, do not care range

ImeProperty_Selection 

select one from multiple strings. Range is char **, value is the selection idx.

ImeProperty_String 

String type, have length limits.

ImeProperty_Int 

Integer type, have value limits.

ImeProperty_Float 

float type, have value limits

ImeProperty_Toggle 

boolean, or [0,1] int value, value is int value, do not care range

ImeProperty_Selection 

select one from multiple strings. Range is char **, value is the selection idx.

Definition at line 133 of file ime.h.

enum ImeResult
Enumerator:
IME_OK 

success

IME_FAIL 

general error

IME_UNUSED_KEY 

return by ImeProcessKeyEvent()

IME_INVALID_KEY 

unexpected key, should not return to application, normally ring a bell

IME_UNPROCESSED_EVENT 

a event is not cared by the ime, IMM may continue processing, like some StatusEvent

IME_UNSUPPORT_VERSION 

error version

IME_WRONG_ARGS 

error in args

IME_FIRST_CUSTOM_ERROR 

user could define his own error using error larger than this.

IME_OK 

success

IME_FAIL 

general error

IME_UNUSED_KEY 

return by ImeProcessKeyEvent()

IME_INVALID_KEY 

unexpected key, should not return to application, normally ring a bell

IME_UNPROCESSED_EVENT 

a event is not cared by the ime, IMM may continue processing, like some StatusEvent

IME_UNSUPPORT_VERSION 

error version

IME_WRONG_ARGS 

error in args

IME_FIRST_CUSTOM_ERROR 

user could define his own error using error larger than this.

Definition at line 501 of file ime.h.

Enumerator:
IME_SCOPE_SESSION 
IME_SCOPE_DESKTOP 
IME_SCOPE_USER 
IME_SCOPE_SESSION 
IME_SCOPE_DESKTOP 
IME_SCOPE_USER 

Definition at line 48 of file ime.h.

enum ImmResult
Enumerator:
IMM_OK 

Success.

IMM_FAIL 

general fail

IMM_OK 

Success.

IMM_FAIL 

general fail

Definition at line 441 of file ime.h.


Function Documentation

ImeResult RegisterIME ( ImmServices  srvs,
ImeInfo ppinfo,
ImeMethods pmthds,
int  argc,
char **  argv 
)

Definition at line 54 of file ctim_interface.c.

{
        ImeInfoRec *ctim_info = NULL;
        char *codetable_file_name = NULL;
        char *base_dir = NULL;
        char file_path[256];
        CodeTableStruct ctHeader;
        codetable_im_data_t *ctim_data = NULL;

        int version_num, i, ret;

        DEBUG_printf("Register Codetable IM: argc: %d\n", argc);
        for (i=0; i<argc; i++) {
                if (!strcasecmp(argv[i], "-basedir")) {
                        if (argv[i+1]) {
                                base_dir = argv[i+1];
                                DEBUG_printf("       setting base dir to: %s\n", argv[i+1]);
                        }
                        i++;
                } else if (!strcasecmp(argv[i], "-codetable")) {
                        if (argv[i+1]) {
                                codetable_file_name = argv[i+1];
                                DEBUG_printf("       setting codetable file to: %s\n", argv[i+1]);
                        }
                        i++;
                }
        }

        if (!codetable_file_name || !*codetable_file_name)
                return (IME_FAIL);

        if (base_dir == NULL)
                base_dir = LE_BASE_DIR;

        if (base_dir && *base_dir && *codetable_file_name != '/') {
                snprintf(file_path, 256, "%s/%s", base_dir, codetable_file_name);
        }

        DEBUG_printf("file_path: %s\n", file_path);
        ret = LoadCodeTableHeader(file_path, &ctHeader);
        if (ret == -1)
                return (IME_FAIL);

        ctim_data = (codetable_im_data_t *)calloc(1, sizeof(codetable_im_data_t));
        if (ctim_data == NULL)
                return (IME_FAIL);

        ctim_info = (ImeInfoRec *)calloc(1, sizeof(ImeInfoRec));
        if (ctim_info == NULL)  {
                free ((char *)ctim_data);
                return (IME_FAIL);
        }

        version_num = 1;
        if (*(ctHeader.Version))
                version_num = atoi(ctHeader.Version);
        version_num += CODETABLE_VERSION * 100;

        ctim_info->version           = version_num;
        ctim_info->encoding          = ctHeader.Encode;
        ctim_info->name              = (char *)strdup(ctHeader.Cname);
        ctim_info->uuid              = (char *)strdup(ctHeader.UUID);

        if (*ctHeader.Author)
                ctim_info->author    = (char *)strdup(ctHeader.Author);
        else
                ctim_info->author    = (char *)strdup(AUTHOR);
        if (*ctHeader.Copyright)
                ctim_info->copyright = (char *)strdup(ctHeader.Copyright);
        else
                ctim_info->copyright = (char *)strdup(COPYRIGHT);
        if (*ctHeader.Hinting)
                ctim_info->hinting   = (char *)strdup(ctHeader.Hinting);
        else
                ctim_info->hinting   = (char *)strdup(HINTING);

        ctim_info->icon_file         = (char *)strdup(ctHeader.IconPath);

        ctim_info->support_locales = CTIM_SUPPORT_LOCALES;

        ctim_data->file_name = (char *)strdup(file_path);
        ctim_data->ctHeader  = NULL;

        ctim_info->specific_data     = (void *)ctim_data;

        *ppinfo = ctim_info;
        *pmthds = &ctim_methods;

        imm_services = srvs;

        DEBUG_printf("begin leave Register IME\n");
        return (IME_OK);
}

Here is the call graph for this function: