// // imepadsv.idl - IDL source for ximepad. // This is the IDL to test Executable IMEPad. // // The MIDL compiler generates proxy/stub code and a type library // from this file. // // // Interface descriptions // import "unknwn.idl" ; cpp_quote("#pragma pack(8)") cpp_quote("//////////////////////////////////////////////////////////////////") cpp_quote("//IMEPad's client IME's substitute INPUT ID ") cpp_quote("#define IMEINPUTID_DEFAULT 0 //Default IME input ID") cpp_quote("#define IMEINPUTID_BOPOMOFO 0 //BOPOMOFO IME input ID") cpp_quote("#define IMEINPUTID_CHANGJIE 1 //Changjie IME input ID") cpp_quote("") cpp_quote("#define SZ_IMEPADCLIENTCLASS_IMM TEXT(\"msimePad81IMMCLClass\")") cpp_quote("#define SZ_IMEPADSERVERCLASS_IMM TEXT(\"msimePad81IMMSVClass\")") cpp_quote("#define SZ_IMEPADCLIENTCLASS_UIM TEXT(\"msimePad81UIMCLClass\")") cpp_quote("#define SZ_IMEPADSERVERCLASS_UIM TEXT(\"msimePad81UIMSVClass\")") cpp_quote("") cpp_quote("//PassData's Data structure ID") cpp_quote("#define IMEDATAID_ICONINFO 1") cpp_quote("#define IMEDATAID_BITMAPINFO 2") cpp_quote("#define IMEDATAID_CONTROL 10") cpp_quote("#define IMEDATAID_STRING 11") cpp_quote("#define IMEDATAID_STRINGCAND 12") cpp_quote("#define IMEDATAID_COMPOSITION 13") cpp_quote("#define IMEDATAID_APPINFO 20") cpp_quote("#define IMEDATAID_CONVSTATUS 30") cpp_quote("//Command ID") cpp_quote("#define IMECMDID_INSERTSTRING 10") cpp_quote("#define IMECMDID_DELETESTRING 11") cpp_quote("#define IMECMDID_CHANGESTRING 12") cpp_quote("#define IMECMDID_INSERTSTRINGINFO 13") cpp_quote("#define IMECMDID_CHANGESTRINGINFO 14") cpp_quote("#define IMECMDID_INSERTSTRINGCAND 15") cpp_quote("#define IMECMDID_INSERTSTRINGCANDINFO 16") cpp_quote("#define IMECMDID_CHANGESTRINGCANDINFO 17") cpp_quote("#define IMECMDID_GETCOMPOSITIONSTRING 18") cpp_quote("#define IMECMDID_GETCOMPOSITIONINFO 19") cpp_quote("#define IMECMDID_GETAPPLHWND 20") cpp_quote("#define IMECMDID_SENDCTRL 21") cpp_quote("#define IMECMDID_GETCONVERSIONSTATUS 22") cpp_quote("#define IMECMDVALUE_DEFAULT_INSERT_POS ((DWORD)~0)") cpp_quote("//Common data header") typedef struct tagIMEDATAHEADER { DWORD dwSize; //Total Data size. DWORD dwCmdID; //Command ID. DWORD dwDataID; //Data ID. DWORD dwDummy; //Dummy Data for pack }IMEDATAHEADER, *LPIMEDATAHEADER; typedef struct tagIMEDATACONTROL { IMEDATAHEADER header; DWORD dwControl; //imepad.h's IMEPADCTL_XXXX) DWORD dwReserved1; DWORD dwReserved2; }IMEDATACONTROL, *LPIMEDATACONTROL; typedef struct tagIMEDATASTRING { IMEDATAHEADER header; DWORD dwStartPos; DWORD dwDeleteLength; BOOL fPreConv; DWORD dwCharID; DWORD dwInfoMask; DWORD dwDummy; WCHAR wChar[1]; }IMEDATASTRING, *LPIMEDATASTRING; typedef struct tagIMEDATASTRINGCAND { IMEDATAHEADER header; DWORD dwStartPos; DWORD dwDeleteLength; BOOL fPreConv; DWORD dwCharID; DWORD dwInfoMask; DWORD dwExtraInfoSize; DWORD dwExtraInfoOffset; DWORD dwSelIndex; DWORD dwStringCount; DWORD dwOffsetString[1]; }IMEDATASTRINGCAND, *LPIMEDATASTRINGCAND; typedef struct tagIMEDATACOMPOSITION { IMEDATAHEADER header; DWORD dwCaretPos; DWORD dwUndeterminedStartPos; DWORD dwUndeterminedLength; DWORD dwEditStartPos; DWORD dwEditLength; DWORD dwStringCount; DWORD dwOffsetString; DWORD dwOffsetCharID; DWORD dwReserved1; DWORD dwReserved2; }IMEDATACOMPOSITION, *LPIMEDATACOMPOSITION; typedef struct tagIMEDATAAPPLINFO { IMEDATAHEADER header; HWND hwndApp; DWORD dwProcessID; DWORD dwThreadID; }IMEDATAAPPLINFO, *LPIMEDATAAPPLINFO; typedef struct tagIMEDATACONVSTATUS { IMEDATAHEADER header; DWORD dwConversionMode; DWORD dwSentenceMode; }IMEDATACONVSTATUS, *LPIMEDATACONVSTATUS; cpp_quote("#pragma pack()") cpp_quote("//////////////////////////////////////////////////////////////////") cpp_quote("//") cpp_quote("// IMEPADAPPLETCFG structure") cpp_quote("//") cpp_quote("#pragma pack(1)") cpp_quote("") cpp_quote("#define IMEPADAPPLETCFGMASK_TITLE 0x0001") cpp_quote("#define IMEPADAPPLETCFGMASK_TITLEFONTFACE 0x0002") cpp_quote("#define IMEPADAPPLETCFGMASK_CLSID 0x0004") cpp_quote("#define IMEPADAPPLETCFGMASK_IID 0x0008") cpp_quote("#define IMEPADAPPLETCFGMASK_CATID 0x0010") cpp_quote("#define IMEPADAPPLETCFGMASK_ICON 0x0020") cpp_quote("#define IMEPADAPPLETCFGMASK_ALL 0x003F") cpp_quote("") typedef struct tagIMEPADAPPLETCONFIG { DWORD dwMask; WCHAR wchTitle[64]; WCHAR wchTitleFontFace[32]; //set title's font face. DWORD dwCharSet; //set character set. CLSID clsId; IID iid; DWORD dwCategory; LPARAM hIcon; LPARAM lReserved1; LPARAM lReserved2; }IMEPADAPPLETCONFIG, *LPIMEPADAPPLETCONFIG; typedef struct tagIMEPADAPPLYCANDINFO { LPWSTR lpwstrDisplay; LPWSTR lpwstrReading; }IMEPADAPPLYCANDINFO, *LPIMEPADAPPLYCANDINFO; cpp_quote("#pragma pack()") interface IImePadCallback; // Interface IImePadServer [ object, uuid(efb26460-aeba-11d2-83d2-00c04f7a06e5), helpstring("IImePadServer Interface"), pointer_default(unique) ] interface IImePadServer: IUnknown { HRESULT Initialize ([in] DWORD dwProccessID, [in] DWORD dwThreadID, [in] DWORD dwImeLangId, [in] DWORD dwImeSubId, [in] BOOL fUIM, [in] IImePadCallback *lpIImePadCallback, [out] LPARAM * pdwReg, [in] LPARAM dwReserved1, [in] LPARAM dwReserved2); HRESULT Terminate ([in] LPARAM dwReg, [in] LPARAM dwReserved1); HRESULT ShowUI ([in] BOOL fShow); HRESULT IsVisible ([in, out] BOOL *pfVisible); HRESULT Notify ([in] UINT notify, [in] WPARAM wParam, [in] LPARAM lParam); HRESULT NotifyWithData([in] UINT notify, [in] DWORD dwCharID, [in] DWORD dwSelIndex, [in, string] wchar_t *lpwstrDisplay, [in, string] wchar_t *lpwstrReading); HRESULT ActivateApplet([in] UINT activateId, [in] LPARAM dwActivateParam, [in, string] wchar_t *lpwstrAppletParam1, [in, string] wchar_t *lpwstrAppletParam2); HRESULT GetAppletConfigList([in] DWORD dwMask, [out] UINT *pCount, [out, size_is(, *pCount)] IMEPADAPPLETCONFIG **ppCfgList); }; //Dummy interface to specify Sharedmemory proxy/stbu //changed uuid for Satori 8.1.0 [ object, uuid(cefcbea2-bbc2-11d4-84c0-00c04f7a06e5), helpstring("IImePadServerSHM"), pointer_default(unique) ] interface IImePadServerSHM:IImePadServer { }; // Interface IImePadCallback [ object, uuid(efb26461-aeba-11d2-83d2-00c04f7a06e5), helpstring("IImePadCallback Interface"), pointer_default(unique) ] interface IImePadCallback: IUnknown { HRESULT OnStart ([in] DWORD dwParam); HRESULT OnClose ([in] DWORD dwParam); HRESULT OnPing ([in] DWORD dwParam); HRESULT PassData ([in] long nSize, [in, size_is(nSize)] byte *pByte, [in,out] DWORD *pdwCharID); HRESULT ReceiveData ([in] DWORD dwCmdID, [in] DWORD dwDataID, [out] long *pSize, [out, size_is(, *pSize)] byte **ppByte); }; // // Component descriptions // [ //changed uuid for Satori 8.1.0 uuid(cefcbea0-bbc2-11d4-84c0-00c04f7a06e5), version(1.0), helpstring("Component1.0 Type Library") ] library IImePadServerLib { importlib("stdole32.tlb") ; // Component 1 //changed uuid for Satori 8.1.0 [ uuid(cefcbea1-bbc2-11d4-84c0-00c04f7a06e5), helpstring("Component 1 Class") ] coclass IImePadServerComponent { [default] interface IImePadServer; }; }; // Interface ISHMClassFactory [ object, uuid(edc298c2-038d-11d4-8464-00c04f7a06e5), helpstring("ISHMClassFactory Interface"), pointer_default(unique) ] interface ISHMClassFactory: IUnknown { HRESULT CreateObject([in] REFIID refiid, [out, iid_is(refiid)] void **p); }; cpp_quote("//define") cpp_quote("//----------------------------------------------------------------") cpp_quote("//IImePadApplet category ID") cpp_quote("//----------------------------------------------------------------") cpp_quote("#define IPACID_NONE 0x0000") cpp_quote("#define IPACID_SOFTKEY 0x0001") cpp_quote("#define IPACID_HANDWRITING 0x0002") cpp_quote("#define IPACID_STROKESEARCH 0x0003") cpp_quote("#define IPACID_RADICALSEARCH 0x0004") cpp_quote("#define IPACID_SYMBOLSEARCH 0x0005") cpp_quote("#define IPACID_VOICE 0x0006") cpp_quote("#define IPACID_EPWING 0x0007") cpp_quote("#define IPACID_OCR 0x0008") cpp_quote("#define IPACID_USER 0x0100") cpp_quote("") cpp_quote("//////////////////////////////////////////////////////////////////") cpp_quote("//") cpp_quote("//Notify message for IImePadInternal::Notify()") cpp_quote("//") cpp_quote("//----------------------------------------------------------------") cpp_quote("// Notify composition string's window rect") cpp_quote("// WPARAM wParam: no use") cpp_quote("// LPARAM lParam: LPRECT lpRect = (LPRECT)lParam;") cpp_quote("//----------------------------------------------------------------") cpp_quote("#define IMEPADNOTIFY_RECTCHANGED 0x0001") cpp_quote("") cpp_quote("//----------------------------------------------------------------") cpp_quote("// Notify context's activation") cpp_quote("// WPARAM wParam: BOOL fActivate = (BOOL)wParam;") cpp_quote("// LPARAM lParam: no use") cpp_quote("//----------------------------------------------------------------") cpp_quote("#define IMEPADNOTIFY_ACTIVATECONTEXT 0x0002") cpp_quote("") cpp_quote("//----------------------------------------------------------------") cpp_quote("// Notify for mode changed") cpp_quote("// WPARAM wParam: (INT) convMode = (INT)wParam;") cpp_quote("// LPARAM lParam: (INT) sentenceMode= (INT)lParam;") cpp_quote("// conversion mode and sentence mode are IME_CMODE_XX or IME_SMODE_XX ") cpp_quote("//----------------------------------------------------------------") cpp_quote("#define IMEPADNOTIFY_MODECHANGED 0x0006") cpp_quote("") cpp_quote("//----------------------------------------------------------------") cpp_quote("// Notify for start composition ") cpp_quote("// WPARAM wParam: not defined") cpp_quote("// LPARAM lParam: not defined") cpp_quote("//----------------------------------------------------------------") cpp_quote("#define IMEPADNOTIFY_STARTCOMPOSITION 0x0007") cpp_quote("") cpp_quote("//----------------------------------------------------------------") cpp_quote("// Notify for composition") cpp_quote("// WPARAM wParam: not defined") cpp_quote("// LPARAM lParam: not defined") cpp_quote("//----------------------------------------------------------------") cpp_quote("#define IMEPADNOTIFY_COMPOSITION 0x0008") cpp_quote("") cpp_quote("//----------------------------------------------------------------") cpp_quote("// Notify for end composition ") cpp_quote("// WPARAM wParam: not defined") cpp_quote("// LPARAM lParam: not defined") cpp_quote("//----------------------------------------------------------------") cpp_quote("#define IMEPADNOTIFY_ENDCOMPOSITION 0x0009") cpp_quote("") cpp_quote("//----------------------------------------------------------------") cpp_quote("// Notify for open candidate") cpp_quote("// WPARAM wParam: not defined") cpp_quote("// LPARAM lParam: not defined") cpp_quote("//----------------------------------------------------------------") cpp_quote("#define IMEPADNOTIFY_OPENCANDIDATE 0x000A") cpp_quote("") cpp_quote("//----------------------------------------------------------------") cpp_quote("// Notify for close candidate") cpp_quote("// WPARAM wParam: not defined") cpp_quote("// LPARAM lParam: not defined") cpp_quote("//----------------------------------------------------------------") cpp_quote("#define IMEPADNOTIFY_CLOSECANDIDATE 0x000B") cpp_quote("") cpp_quote("//----------------------------------------------------------------") cpp_quote("// Notify for Candidate Applied") cpp_quote("// WPARAM wParam: dwCharId = (DWORD)wParam;") cpp_quote("// LPARAM lParam: iSelIndex = (INT)lParam;") cpp_quote("//----------------------------------------------------------------") cpp_quote("#define IMEPADNOTIFY_APPLYCANDIDATE 0x000C") cpp_quote("") cpp_quote("//----------------------------------------------------------------") cpp_quote("// Notify for Querying Candidate") cpp_quote("// WPARAM wParam: dwCharId = (DWORD)wParam;") cpp_quote("// LPARAM lParam: 0. not used.") cpp_quote("//----------------------------------------------------------------") cpp_quote("#define IMEPADNOTIFY_QUERYCANDIDATE 0x000D") cpp_quote("") cpp_quote("") cpp_quote("//----------------------------------------------------------------") cpp_quote("// Notify for Candidate Applied") cpp_quote("// WPARAM wParam: dwCharId = (DWORD)wParam;") cpp_quote("// LPARAM lParam: lpApplyCandEx = (LPIMEPADAPPLYCANDEX)lParam;") cpp_quote("//----------------------------------------------------------------") cpp_quote("#define IMEPADNOTIFY_APPLYCANDIDATE_EX 0x000E") cpp_quote("") cpp_quote("") cpp_quote("") cpp_quote("//----------------------------------------------------------------") cpp_quote("//Notify for Destroying ImePad's current thread window") cpp_quote("//WPARAM wParam: no use ") cpp_quote("//LPARAM lParam: no use") cpp_quote("//----------------------------------------------------------------") cpp_quote("#define IMEPADNOTIFY_ONIMEWINDOWDESTROY 0x0100") cpp_quote("") cpp_quote("") cpp_quote("") cpp_quote("") cpp_quote("//////////////////////////////////////////////////////////////////") cpp_quote("//") cpp_quote("// ActivateId for IImePadInternal::ActivateApplet()") cpp_quote("//") cpp_quote("//----------------------------------------------------------------") cpp_quote("// IMEPADACTID_ACTIVATEBYCATID requests ImePad to ") cpp_quote("// Activate Applet by CategoryId.") cpp_quote("//") cpp_quote("// UINT activateId: IMEPADACTID_ACTIVATEBYCATID;") cpp_quote("// LPARAM lParamActivate: IPACID_XXXX;") cpp_quote("// LPWSTR lpwstrAppletParam1: string passed to applet.") cpp_quote("// LPWSTR lpwstrAppletParam2: string passed to applet.") cpp_quote("") cpp_quote("#define IMEPADACTID_ACTIVATEBYCATID 1000") cpp_quote("") cpp_quote("//----------------------------------------------------------------") cpp_quote("// IMEPADACTID_ACTIVATEBYIID requests ImePad to ") cpp_quote("// activate applet by Interface ID") cpp_quote("//") cpp_quote("// UINT activateId: IMEPADACTID_ACTIVATEBYIID;") cpp_quote("// DWORD dwActivateParam: (DWORD)(IID *)pIID;") cpp_quote("// LPWSTR lpwstrAppletParam1: string passed to applet.") cpp_quote("// LPWSTR lpwstrAppletParam2: string passed to applet.") cpp_quote("") cpp_quote("#define IMEPADACTID_ACTIVATEBYIID 1001") cpp_quote("") cpp_quote("//----------------------------------------------------------------") cpp_quote("// IMEPADACTID_ACTIVATEBYNAME requests ImePad to ") cpp_quote("// activaet applet by applet's title name.") cpp_quote("//") cpp_quote("// UINT activateId: IMEPADACTID_ACTIVATEBYNAME") cpp_quote("// DWORD dwActivateParam: (DWORD)(LPWSTR)lpwstrTitle;") cpp_quote("// LPWSTR lpwstrAppletParam1: string passed to applet.") cpp_quote("// LPWSTR lpwstrAppletParam2: string passed to applet.") cpp_quote("") cpp_quote("#define IMEPADACTID_ACTIVATEBYNAME 1003")