Part

Part

There are six pre-defined Parts and one private part to store the instance specific data. Each part data area is allocated by calling ImCreateIMIPart and destroyed by calling ImDestroyIMIPart. Data itself is accessible through ImRequestIMIPart and ImReleaseIMIPart calls (The exception is the Status part). Creating each part is IME's responsibility.
Status Part

This part is used to keep the current input related status information. Status part data may contain any string for displaying IME status.

        STATUSSTRINGHEADER
        {
                ULONG   ulSize;

                ULONG   ulStringLen;
                ULONG   ulStringOffset;
                ULONG   ulStringAttrOffset;

                ULONG   ulCursorPos;
                ULONG   ulCursorAttr;
        }

        where

                ulSize : Size of this structure.

                ulStringLen : String and attribute buffer length in bytes.

                ulStringOffset : Offset of the string buffer.

                ulStringAttrOffset : Offset of the string attribute buffer

                ulCursorPos : Cursor position in bytes

                ulCursorAttr : Cursor attribute

Attributes in ulStringAttrOffset have the same definition with ImGetStatusString API.
Conversion Part

This part is used to hold the conversion intermediate data. Basically this part contains two information and those attributes, i.e., the current intermediate converted string and its reading information.

                CONVERSIONSTRINGHEADER
                {
                        ULONG ulSize;

                        ULONG ulReadingAttrLen;
                        ULONG ulReadingAttrOffset;
                        ULONG ulReadingClauseLen;
                        ULONG ulReadingClauseOffset;
                        ULONG ulReadingStringLen;
                        ULONG ulReadingStringOffset;

                        ULONG ulConversionAttrLen;
                        ULONG ulConversionAttrOffset;
                        ULONG ulConversionClauseLen;
                        ULONG ulConversionClauseOffset;
                        ULONG ulConversionStringLen;
                        ULONG ulConversionStringOffset;

                        ULONG ulCursorPos;
                        ULONG ulCursorAttr;

                        ULONG ulChangeStart
                }

        where

                ulSize : Size of this structure.

                ulReadingAttrLen : Reading attribute buffer length.

                ulReadingAttrOffset : Offset of the reading attribute buffer.

                ulReadingClauseLen : Reading Clause buffer length.

                ulReadingClauseOffset : Offset of the Reading Clause buffer

                ulReadingStringLen : Reading string buffer length

                ulReadingStringOffset : Offset of the Reading String buffer

                ulConversionAttrLen : Conversion attribute buffer length.

                ulConversionAttrOffset : Offset of Conversion attribute buffer.

                ulConversionClauseLen : Conversion clause buffer length.

                ulConversionClauseOffset : Offset of Conversion clause buffer

                ulConversionStringLen : Conversion string buffer length

                ulConversionStringOffset : Offset of Conversion string buffer

                ulCursorPos : Cursor position in bytes

                ulCursorAttr : Cursor attribute

                ulChangeStart : Starting position of the changes in bytes

Attributes and Clause in Reading and Conversion fields have the same definition with ImGet/SetConversionString API.
Result Part

This part is filled with the data which is already converted and ready to be delivered to the application.

                RESULTSTRINGHEADER
                {
                        ULONG ulSize;

                        ULONG ulReadingAttrLen;
                        ULONG ulReadingAttrOffset;
                        ULONG ulReadingClauseLen;
                        ULONG ulReadingClauseOffset;
                        ULONG ulReadingStringLen;
                        ULONG ulReadingStringOffset;

                        ULONG ulResultAttrLen;
                        ULONG ulResultAttrOffset;
                        ULONG ulResultClauseLen;
                        ULONG ulResultClauseOffset;
                        ULONG ulResultStringLen;
                        ULONG ulResultStringOffset;
                }
where

        ulSize : Size of this structure

        ulReadingAttrLen : Reading attribute length

        ulReadingAttrOffset : Offset of Reading attribute

        ulReadingClauseLen : Reading clause length

        ulReadingClauseOffset : Offset of Reading clause

        ulReadingStringLen : Reading string length

        ulReadingStringOffset : Offset of Reading string

        ulResultAttrLen : Result attribute length

        ulResultAttrOffset : Offset of Result attribute

        ulResultClauseLen : Result clause length

        ulResultClauseOffset : Offset of Result clause

        ulResultStringLen : Result string length

        ulResultStringOffset : Offset of Result string

Attributes and Clause in Reading and Result fields have the same definition with ImQuery/SetResultString API.
Candidate Part

This part has the list of the conversion candidates.

        CANDIDATEINFOHEADER
        {
                ULONG ulSize;
                ULONG ulCount;
                ULONG ulListOffset[32];
                ULONG ulPrivateSize;
                ULONG ulPrivateOffset;
        }

where
        ulSize : Size of this structure

        ulCount : Count of candidate lists

        ulListOffset : Offsets of each candidate lists.

        ulPrivateSize : Size of Private data area

        ulPrivateOffset : Offset of Private data area

Each ulListOffset points to the candidate list structure which is described in IM Interface section.
InfoMsg Part

This part has the informational message which should be popped up.

                INFOMSGHEADER
                {
                        ULONG ulSize;
                        ULONG ulErrorLevel;
                        ULONG ulTypeID;
                        ULONG ulTitleLen;
                        ULONG ulTitleOffset;
                        ULONG ulStringLen;
                        ULONG ulStringOffset;
                        ULONG ulPrivateLen;
                        ULONG ulPrivateOffset;
                }

        where

                ulSize : Size of this structure

                ulErrorLevel : Error level

                ulTypeID : Error type index

                ulTitleLen : Error title length

                ulTitleOffset : Offset of error title

                ulStringLen : Error message length

                ulStringOffset : Offset of Error message

                ulPrivateLen : Private data area length

                ulPrivateOffset : Offset of Private data area

Value definitions of ulErrorLevel and ulTypeID are described in ImQueryInfoMsg API.
Register Word Part

This part has the initial information to dispaly the register word panel.

        REGISTERWORDHEADER
        {
                ULONG   ulSize;
                ULONG   ulReadingLen;
                ULONG   ulReadingOffset;
                ULONG   ulWordLen;
                ULONG   ulWordOffset;
        }

where

        ulSize          : Size of this structure

        ulReadingLen    : register word reading length

        ulReadingOffset : Offset of the register word reading

        ulWordlen       : register word string length

        ulWordOffset    : Offset of the register word string

Private Part

This part contains the IME specific data.


[Back: Input Method Instance]
[Next: IME Window]