CIMEShare
August 2003
Microsoft Corporation
Summary: This document describes CIMEShare of Microsoft IME 2003, Japanese version. CIMEShare provides a global interface that allows clients to receive common display attributes for Microsoft IME, allowing an application to share the same behavior and interface as other IMEShare client applications. (7 printed pages)
Contents
Value Definitions
Creating CIMEShare Instance
General Functions
Getting Style Attributes
LID Management
Special Functions for the Control Panel
Interface ID: N/A (uses DLL-exported class factory)
Version 1.0
CIMEShare Methods | Description |
---|---|
FDeleteIMEShare | Release CIMEShare interface |
CustomizeIMEShare | Open control panel |
FSupportSty | Defines style substitution |
DwGetIMEStyle | Get various style settings given as idsty for given attr |
LidSetLid | Set current LID |
LidGetLid | Get Current LID |
DwGetIMEStyleCpl | Get various style settings given as idsty for given attr |
FSetIMEStyleCpl | Changes the style setting |
FSaveIMEShareCpl | Saves the style settings to registry |
Value Definitions
IME States
Possible values include:
- IMESATTR_INPUT
- IMESATTR_TARGET_CONVERTED
- IMESATTR_CONVERTED
- IMESATTR_TARGET_NOTCONVERTED
- IMESATTR_INPUT_ERROR
- IMESATTR_FIXEDCONVERTED
Underline styles
Possible values include:
- IMESTY_UL_NONE
- IMESTY_UL_SINGLE
- IMESTY_UL_DOTTED
- IMESTY_UL_THICK
- IMESTY_UL_THICKDITHLOWER
- IMESTY_UL_DITHLOWER
Idsty tokens and corresponding values:
Token | Value Type | Comment |
---|---|---|
IdstyIMEShareFBold | BOOL | TRUE if it has bold style |
IdstyIMEShareFItalic | BOOL | TRUE if it has italic style |
IdstyIMEShareFUl | BOOL | TRUE if it is underlined |
IdstyIMEShareUKul | UINT | Type of underline; will be ignored when IdstyIMEShareFUl is FALSE |
IdstyIMEShareFWinCol* | BOOL | TRUE if color for text is in Windows color definition |
IdstyIMEShareFFundCol* | BOOL | TRUE if color is in fundamental color definition |
IdstyIMEShareFRGBCol* | BOOL | TRUE if color is in RGB color definition |
IdstyIMEShareFSpecCol* | BOOL | TRUE if color is in special color definition |
IdstyIMEShareRGBCol* | COLORREF | Current color setting in RGB |
*Needs to specify subproperty ID (one of following):
Subproperty ID | Description |
---|---|
IdstyIMEShareSubText | Color for text |
IdstyIMEShareSubBack | Color for background |
IdstyIMEShareSubUl | Color for underline |
Creating CIMEShare Instance
This creates an CIMEShare object, and returns a pointer to the object. This is an exported DLL function.
CIMEShare * WINAPI PIMEShareCreate(void);
Return | Values |
---|---|
CIMEShare * | Pointer to CIMEShare interface |
General Functions
BOOL CIMEShare::FDeleteIMEShare(void);
This releases CIMEShare interface.
Return | Values |
---|---|
BOOL | TRUE when succeeded. |
void CIMEShare::CustomizeIMEShare(void);
This opens control panel with which user can customize IME attributes.
Getting Style Attributes
BOOL CIMEShare::FSupportSty(UINT sty, UINT styAltered);
This defines style substitution. If your application doesn't have the capability to draw sty attributes but styAltered, you may force IMEShare to return styAltered style whenever sty style is originally stated.
Note Only underlines are the subject to the substitution.
Parameter | Description |
---|---|
UINT sty | (IN) Style that will be substituted; one of IMESTY_UL_* |
UINT styAltered | (IN) Style override with; one of IMESTY_UL_* |
Return | Values |
---|---|
BOOL | TRUE when succeeded. |
DWORD CIMEShare::DwGetIMEStyle(const UINT attr, const UINT idsty);
This retrieves various style setting given as idsty for given attr.
Parameter | Description |
---|---|
UINT attr | (IN) One of IMESATTR_* |
UINT idsty | (IN) Style idsty token (IdstyIMEShare*), which requests corresponding attributes |
Return | Values |
---|---|
DWORD | Value for requested attributes; cast may be required |
LID Management
IMEShare uses LID to store attribute settings for each language separately. IMEShare can get the default LID by itself, but the client can change it.
LID CIMEShare::LidSetLid(LID lid);
This sets current LID.
Parameter | Description |
---|---|
LID lid | (IN) New LID |
Return Values:
Return | Values |
---|---|
LID | Old LID |
LID CIMEShare::LidGetLid(void);
This gets current LID.
Return Values:
Return | Values |
---|---|
LID | Current LID. |
Special Functions for the Control Panel
These methods are provided only for use by control panel for IME. Ordinary client should not use them.
DWORD CIMEShare::DwGetIMEStyleCpl(const UINT attr, const UINT idsty);
This basically does the same thing with DwGetIMEStyle, the only difference being that this doesn't go through the underline substitution.
Parameters:
Parameters | Description |
---|---|
UINT attr | (IN) One of IMESATTR_* |
UINT idsty | (IN) Style idsty token (IdstyIMEShare*), which requests corresponding attributes |
Return | Values |
---|---|
DWORD | Value for requested attributes; cast may be required |
BOOL CIMEShare::FSetIMEStyleCpl(const UINT attr, const UINT idsty, DWORD dwval);
This changes the style setting.
Parameters | Description |
---|---|
UINT attr | (IN) One of IMESATTR_* |
UINT idsty | (IN) Style idsty token (IdstyIMEShare*), which requests corresponding attributes |
DWORD dwval | (IN) Value to be set |
Return | Values |
---|---|
BOOL | TRUE when succeeded. |
BOOL CIMEShare::FSaveIMEShareCpl(void);
This saves the style settings to registry.
Return | Values |
---|---|
BOOL | TRUE when succeeded. |