typedef struct tagCOMPOSITIONSTR {
DWORD dwSize;
DWORD dwCompReadAttrLen;
DWORD dwCompReadAttrOffset;
DWORD dwCompReadClsLen;
DWORD dwCompReadClsOffset;
DWORD dwCompReadStrLen;
DWORD dwCompReadStrOffset;
DWORD dwCompAttrLen;
DWORD dwCompAttrOffset;
DWORD dwCompClsLen;
DWORD dwCompClsOffset;
DWORD dwCompStrLen;
DWORD dwCompStrOffset;
DWORD dwCursorPos;
DWORD dwDeltaStart;
DWORD dwResultReadClsLen;
DWORD dwResultReadClsOffset;
DWORD dwResultReadStrLen;
DWORD dwResultReadStrOffset;
DWORD dwResultClsLen;
DWORD dwResultClsOffset;
DWORD dwResultStrLen;
DWORD dwResultStrOffset;
DWORD dwPrivateSize;
DWORD dwPrivateOffset;
} COMPOSITIONSTR;
Contains composition information. During conversion, IME puts conversion information into this structure.
The attribute information is a single-byte array and specifies the attributes of the string. The contents of the array are as follows:
Value | Meaning |
---|---|
ATTR_xxxxxxxxxxxx | Specifies the status of the composition string. |
ATTR_INPUT | Character currently being entered. |
ATTR_TARGET_CONVERTED | Character currently being converted (already converted). |
ATTR_CONVERTED | Character given from conversion. |
ATTR_TARGET_NOTCONVERTED | Character currently being converted (yet to be converted). |
ATTR_INPUT_ERROR | The character is an error character and cannot be converted by the IME. |
Other than the preceding: | Reserved |
Each content is as follows:
Value | Meaning |
---|---|
Character currently being entered: | The character the user is entering. In Japanese, this character is a hiragana, katakana, or alphanumeric, which is yet to be converted by the IME. |
Character currently being converted (already converted): | The character that has been selected for conversion by the user and converted by the IME. |
Character given from conversion: | The character to which the IME has converted. |
Character currently being converted (yet to be converted): | The character that has been selected for conversion by the user and not yet converted by the IME. In Japanese, this character is a hiragana, katakana, or alphanumeric, which the user has entered. |
Character is an error character and cannot be converted by the IME: | The character is an error character, the IME cannot convert this character. For example, some consonants cannot be put together. |
The length of the attribute information is the same as the length of the string. Each byte corresponds to each byte of the string. Even if the string includes DBCS characters, the attribute information has the information bytes of both the lead byte and the second byte.
The clause information is a double word array and specifies the numbers that are the positions of the clause. The position of the clause is one of the positions of the composition string and this clause starts from this position. At a minimum, the length of this information is two double words. This means the length of the clause information is eight bytes. The first double word has to be zero. This is the starting position of the first clause. The last double word has to be the length of this string. For example, if the string has three clauses, the clause information has four double words. The first double word is zero. The second double word specifies the starting position of the second clause. The third double word specifies the starting position of the third clause. The last double word is the length of this string.
The dwCursorPos member specifies the character in the composition string where the cursor is located, in terms of the count of that character. The counting starts at zero. If the cursor is to be positioned immediately after the composition string, this value is equal to the length of the composition string. In case there is no cursor (if such a condition exists), a value -1 is specified here. If a composition string does not exist, this member is invalid.