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.

116 lines
2.4 KiB

  1. //
  2. // canduies.h
  3. //
  4. #ifndef CANDUIES_H
  5. #define CANDUIES_H
  6. #include "private.h"
  7. #include "korimx.h"
  8. #include "globals.h"
  9. #include "mscandui.h"
  10. //
  11. // Callback functions
  12. //
  13. typedef HRESULT (*PFNONBUTTONPRESSED)(LONG id, ITfContext *pic, void *pVoid);
  14. typedef HRESULT (*PFNONFILTEREVENT)(CANDUIFILTEREVENT ev, ITfContext *pic, void *pVoid);
  15. typedef HRESULT (*PFNINITMENU)(ITfMenu *pMenu, ITfContext *pic, void *pVoid);
  16. typedef HRESULT (*PFNONCANDUIMENUCOMMAND)( UINT uiCmd, ITfContext *pic, void *pVoid);
  17. //
  18. // CCandUIExtButtonEventSink
  19. //
  20. class CCandUIExtButtonEventSink : public ITfCandUIExtButtonEventSink
  21. {
  22. public:
  23. CCandUIExtButtonEventSink(PFNONBUTTONPRESSED pfnOnButtonPressed, ITfContext *pic, void *pVoid);
  24. ~CCandUIExtButtonEventSink();
  25. //
  26. // IUnknown
  27. //
  28. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  29. STDMETHODIMP_(ULONG) AddRef( void );
  30. STDMETHODIMP_(ULONG) Release( void );
  31. //
  32. // ITfCandUIExtButtonEventSink
  33. //
  34. STDMETHODIMP OnButtonPressed(LONG id);
  35. protected:
  36. long m_cRef;
  37. ITfContext *m_pic;
  38. void *m_pv;
  39. PFNONBUTTONPRESSED m_pfnOnButtonPressed;
  40. };
  41. //
  42. // CCandUIAutoFilterEventSink
  43. //
  44. class CCandUIAutoFilterEventSink : public ITfCandUIAutoFilterEventSink
  45. {
  46. public:
  47. CCandUIAutoFilterEventSink(PFNONFILTEREVENT pfnOnFilterEvent, ITfContext *pic, void *pVoid);
  48. ~CCandUIAutoFilterEventSink();
  49. //
  50. // IUnknown
  51. //
  52. STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj);
  53. STDMETHODIMP_(ULONG) AddRef();
  54. STDMETHODIMP_(ULONG) Release();
  55. //
  56. // ITfCandUIAutoFilterEventSink
  57. //
  58. STDMETHODIMP OnFilterEvent(CANDUIFILTEREVENT ev);
  59. protected:
  60. long m_cRef;
  61. ITfContext *m_pic;
  62. void *m_pv;
  63. PFNONFILTEREVENT m_pfnOnFilterEvent;
  64. };
  65. //
  66. // CCandUIMenuEventSink
  67. //
  68. class CCandUIMenuEventSink : public ITfCandUIMenuEventSink
  69. {
  70. public:
  71. CCandUIMenuEventSink(PFNINITMENU pfnInitMenu, PFNONCANDUIMENUCOMMAND pfnOnCandUIMenuCommand, ITfContext *pic, void *pVoid);
  72. ~CCandUIMenuEventSink();
  73. //
  74. // IUnknown
  75. //
  76. STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj);
  77. STDMETHODIMP_(ULONG) AddRef();
  78. STDMETHODIMP_(ULONG) Release();
  79. //
  80. // ITfCandUIMenuEventSink
  81. //
  82. STDMETHODIMP InitMenu(ITfMenu *pMenu);
  83. STDMETHODIMP OnMenuCommand(UINT uiCmd);
  84. protected:
  85. long m_cRef;
  86. ITfContext *m_pic;
  87. void *m_pv;
  88. PFNINITMENU m_pfnInitMenu;
  89. PFNONCANDUIMENUCOMMAND m_pfnOnCandUIMenuCommand;
  90. };
  91. #endif // CANDUIES_H