Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
3.4 KiB

  1. //////////////////////////////////////////////////////////////////
  2. // File : cpadsvrc.h
  3. // Purpose : CImePadServer for COM(Component Object Model) interface.
  4. // (ImePad executable COM server)
  5. //
  6. //
  7. // Date : Fri Apr 16 14:34:49 1999
  8. // Author : ToshiaK
  9. //
  10. // Copyright(c) 1995-1999, Microsoft Corp. All rights reserved
  11. //////////////////////////////////////////////////////////////////
  12. #ifndef __C_IMEPAD_SERVER_COM_H__
  13. #define __C_IMEPAD_SERVER_COM_H__
  14. #include "cpadsvr.h"
  15. interface IImePadServer;
  16. //----------------------------------------------------------------
  17. // CLASS: CImePadSvrCom
  18. //
  19. // This is simple wrapper class for IImePadLocal COM interface.
  20. // dot IME can use this class to access/control ImePad without
  21. // using COM API directly.
  22. // And this class also wraps 16bit/32bit difference.
  23. // As you know, we cannot use COM API in 16bit Application.
  24. // So, Client does not need to care if it work in 16bit/32bit.
  25. //----------------------------------------------------------------
  26. class CImePadSvrCOM;
  27. typedef CImePadSvrCOM* LPCImePadSvrCOM;
  28. class CImePadSvrCOM:public CImePadSvr
  29. {
  30. public:
  31. CImePadSvrCOM(VOID);
  32. ~CImePadSvrCOM(VOID);
  33. virtual BOOL IsAvailable (VOID);
  34. virtual BOOL OnIMEPadClose (VOID);
  35. virtual INT Initialize (LANGID imeLangID, DWORD dwImeInputID, LPVOID lpVoid);
  36. virtual INT Terminate (LPVOID lpVoid);
  37. virtual INT ForceDisConnect (VOID);
  38. virtual INT ShowUI (BOOL fShow);
  39. virtual INT IsVisible (BOOL *pfVisible);
  40. virtual INT ActivateApplet (UINT activateID, DWORD dwActParam,LPWSTR lpwstr1,LPWSTR lpwstr2);
  41. virtual INT Notify (INT id, WPARAM wParam, LPARAM lParam);
  42. virtual INT GetAppletInfoList (INT *pCountApplet, LPVOID *pList);
  43. virtual IUnknown* SetIUnkIImeIPoint (IUnknown *pIUnk);
  44. virtual IUnknown* SetIUnkIImeCallback (IUnknown *pIUnk);
  45. virtual IUnknown* GetIUnkIImeIPoint (VOID);
  46. virtual IUnknown* GetIUnkIImeCallback (VOID);
  47. private:
  48. BOOL IsCoInitialized(VOID);
  49. //----------------------------------------------------------------
  50. //private methods.
  51. //----------------------------------------------------------------
  52. static LRESULT CALLBACK InterfaceWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  53. LRESULT RealWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  54. LRESULT MsgCopyData(HWND hwnd, WPARAM wParam, LPARAM lParam);
  55. LRESULT MsgTimer (HWND hwnd, WPARAM wParam, LPARAM lParam);
  56. LRESULT MsgUser (HWND hwnd, WPARAM wParam, LPARAM lParam);
  57. HWND CreateIFHWND (VOID);
  58. BOOL DestroyIFHWND (BOOL fReserved);
  59. //----------------------------------------------------------------
  60. //private member
  61. //----------------------------------------------------------------
  62. BOOL m_fShowReqStatus; //Save ShowUI()'s bool value.
  63. BOOL m_fLastActiveCtx; //Save IMEPADNOTIFY_ACTIVATECONTEXT
  64. HWND m_hwndIF; //Internal I/F Window handle.
  65. IUnknown* m_lpIUnkIImeIPoint; //IImeIPoint I/F pointer as IUnknown.
  66. IUnknown* m_lpIUnkIImeCallback; //IImeCallback I/F pointer as IUnknown.
  67. IImePadServer* m_lpIImePadServer; //IImePadServer I/F pointer.
  68. LPCImePadCallback m_lpCImePadCallback; //CImePadCallback instance pointer.
  69. DWORD m_dwRegAdvise; //Callbacck interface connect cookie.
  70. BOOL m_fCoInitSuccess; //Flag for CoInitialize() successed or not.
  71. };
  72. #endif //__C_IMEPAD_SERVER_COM_H__