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.

256 lines
7.4 KiB

  1. //
  2. // mstub.h
  3. //
  4. #ifndef MSTUB_H
  5. #define MSTUB_H
  6. #include "private.h"
  7. #include "marshal.h"
  8. #include "ptrary.h"
  9. #include "strary.h"
  10. #include "cicmutex.h"
  11. #include "smblock.h"
  12. typedef HRESULT (*MSTUBCALL)(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb);
  13. CStub *StubCreator(REFIID riid, IUnknown *punk, ULONG ulStubId, DWORD dwStubTime, DWORD dwCurThreadId, DWORD dwCurProcessId, DWORD dwSrcThreadId);
  14. #define STUBINVOKE_IMPL(interface_name) \
  15. public: \
  16. HRESULT Invoke(MARSHALMSG *pMsg, CSharedBlock *psb) \
  17. { \
  18. TraceMsg(TF_FUNC, \
  19. "Stub " #interface_name " ulMethodId - %x", \
  20. pMsg->ulMethodId); \
  21. return _StubTbl[pMsg->ulMethodId](this, pMsg, psb); \
  22. } \
  23. private: \
  24. static MSTUBCALL _StubTbl[];
  25. #define STUBFUNC_DEF(method_name) \
  26. static HRESULT stub_ ## method_name ## (CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb);
  27. //////////////////////////////////////////////////////////////////////////////
  28. //
  29. // CStubIUnknown
  30. //
  31. //////////////////////////////////////////////////////////////////////////////
  32. class CStubIUnknown : public CStub
  33. {
  34. STUBINVOKE_IMPL(IUnknwon);
  35. protected:
  36. STUBFUNC_DEF(QueryInterface)
  37. STUBFUNC_DEF(AddRef)
  38. STUBFUNC_DEF(Release)
  39. };
  40. //////////////////////////////////////////////////////////////////////////////
  41. //
  42. // CStubITfLangBarMgr
  43. //
  44. //////////////////////////////////////////////////////////////////////////////
  45. class CStubITfLangBarMgr : public CStubIUnknown
  46. {
  47. STUBINVOKE_IMPL(ITfLangBarMgr);
  48. private:
  49. STUBFUNC_DEF(AdviseEventSink)
  50. STUBFUNC_DEF(UnadviseEventSink)
  51. STUBFUNC_DEF(GetThreadMarshalInterface)
  52. STUBFUNC_DEF(GetThreadLangBarItemMgr)
  53. STUBFUNC_DEF(GetInputProcessorProfiles)
  54. STUBFUNC_DEF(RestoreLastFocus)
  55. STUBFUNC_DEF(SetModalInput)
  56. STUBFUNC_DEF(ShowFloating)
  57. STUBFUNC_DEF(GetShowFloatingStatus)
  58. };
  59. //////////////////////////////////////////////////////////////////////////////
  60. //
  61. // CStubITfLangBarItemMgr
  62. //
  63. //////////////////////////////////////////////////////////////////////////////
  64. class CStubITfLangBarItemMgr : public CStubIUnknown
  65. {
  66. STUBINVOKE_IMPL(ITfLangBarItemMgr);
  67. private:
  68. STUBFUNC_DEF(EnumItems)
  69. STUBFUNC_DEF(GetItem)
  70. STUBFUNC_DEF(AddItem)
  71. STUBFUNC_DEF(RemoveItem)
  72. STUBFUNC_DEF(AdviseItemSink)
  73. STUBFUNC_DEF(UnadviseItemSink)
  74. STUBFUNC_DEF(GetItemFloatingRect)
  75. STUBFUNC_DEF(GetItemsStatus)
  76. STUBFUNC_DEF(GetItemNum)
  77. STUBFUNC_DEF(GetItems)
  78. STUBFUNC_DEF(AdviseItemsSink)
  79. STUBFUNC_DEF(UnadviseItemsSink)
  80. };
  81. //////////////////////////////////////////////////////////////////////////////
  82. //
  83. // CStubITfLangBarItemSink
  84. //
  85. //////////////////////////////////////////////////////////////////////////////
  86. class CStubITfLangBarItemSink : public CStubIUnknown
  87. {
  88. STUBINVOKE_IMPL(ITfLangBarItemSink);
  89. public:
  90. STUBFUNC_DEF(OnUpdate)
  91. };
  92. //////////////////////////////////////////////////////////////////////////////
  93. //
  94. // CStubIEnumTfLangBarItemMgr
  95. //
  96. //////////////////////////////////////////////////////////////////////////////
  97. class CStubIEnumTfLangBarItems : public CStubIUnknown
  98. {
  99. STUBINVOKE_IMPL(IEnumTfLangBarItems);
  100. public:
  101. STUBFUNC_DEF(Clone)
  102. STUBFUNC_DEF(Next)
  103. STUBFUNC_DEF(Reset)
  104. STUBFUNC_DEF(Skip)
  105. };
  106. //////////////////////////////////////////////////////////////////////////////
  107. //
  108. // CStubITfLangBarItem
  109. //
  110. //////////////////////////////////////////////////////////////////////////////
  111. class CStubITfLangBarItem : public CStubIUnknown
  112. {
  113. STUBINVOKE_IMPL(ITfLangBarItem);
  114. public:
  115. STUBFUNC_DEF(GetInfo)
  116. STUBFUNC_DEF(GetStatus)
  117. STUBFUNC_DEF(Show)
  118. STUBFUNC_DEF(GetTooltipString)
  119. };
  120. //////////////////////////////////////////////////////////////////////////////
  121. //
  122. // CStubITfLangBarItemButton
  123. //
  124. //////////////////////////////////////////////////////////////////////////////
  125. class CStubITfLangBarItemButton : public CStubITfLangBarItem
  126. {
  127. STUBINVOKE_IMPL(ITfLangBarItemButton);
  128. public:
  129. STUBFUNC_DEF(OnClick)
  130. STUBFUNC_DEF(InitMenu)
  131. STUBFUNC_DEF(OnMenuSelect)
  132. STUBFUNC_DEF(GetIcon)
  133. STUBFUNC_DEF(GetText)
  134. };
  135. //////////////////////////////////////////////////////////////////////////////
  136. //
  137. // CStubITfLangBarItemBitmapButton
  138. //
  139. //////////////////////////////////////////////////////////////////////////////
  140. class CStubITfLangBarItemBitmapButton : public CStubITfLangBarItem
  141. {
  142. STUBINVOKE_IMPL(ITfLangBarItemBitmapButton);
  143. public:
  144. STUBFUNC_DEF(OnClick)
  145. STUBFUNC_DEF(InitMenu)
  146. STUBFUNC_DEF(OnMenuSelect)
  147. STUBFUNC_DEF(GetPreferredSize)
  148. STUBFUNC_DEF(DrawBitmap)
  149. STUBFUNC_DEF(GetText)
  150. };
  151. //////////////////////////////////////////////////////////////////////////////
  152. //
  153. // CStubITfLangBarItemBitmap
  154. //
  155. //////////////////////////////////////////////////////////////////////////////
  156. class CStubITfLangBarItemBitmap : public CStubITfLangBarItem
  157. {
  158. STUBINVOKE_IMPL(ITfLangBarItemBitmap);
  159. public:
  160. STUBFUNC_DEF(OnClick)
  161. STUBFUNC_DEF(GetPreferredSize)
  162. STUBFUNC_DEF(DrawBitmap)
  163. };
  164. //////////////////////////////////////////////////////////////////////////////
  165. //
  166. // CStubITfLangBarItemBalloon
  167. //
  168. //////////////////////////////////////////////////////////////////////////////
  169. class CStubITfLangBarItemBalloon : public CStubITfLangBarItem
  170. {
  171. STUBINVOKE_IMPL(ITfLangBarItemBalloon);
  172. public:
  173. STUBFUNC_DEF(OnClick)
  174. STUBFUNC_DEF(GetPreferredSize)
  175. STUBFUNC_DEF(GetBalloonInfo)
  176. };
  177. //////////////////////////////////////////////////////////////////////////////
  178. //
  179. // CStubITfMenu
  180. //
  181. //////////////////////////////////////////////////////////////////////////////
  182. class CStubITfMenu : public CStubITfLangBarItem
  183. {
  184. STUBINVOKE_IMPL(ITfMenu);
  185. public:
  186. STUBFUNC_DEF(AddItemMenu)
  187. };
  188. //////////////////////////////////////////////////////////////////////////////
  189. //
  190. // CStubITfMenu
  191. //
  192. //////////////////////////////////////////////////////////////////////////////
  193. class CStubITfInputProcessorProfiles : public CStubIUnknown
  194. {
  195. STUBINVOKE_IMPL(ITfInputProcessorProfiles);
  196. public:
  197. STUBFUNC_DEF(Register)
  198. STUBFUNC_DEF(Unregister)
  199. STUBFUNC_DEF(AddLanguageProfile)
  200. STUBFUNC_DEF(RemoveLanguageProfile)
  201. STUBFUNC_DEF(EnumInputProcessorInfo)
  202. STUBFUNC_DEF(GetDefaultLanguageProfile)
  203. STUBFUNC_DEF(SetDefaultLanguageProfile)
  204. STUBFUNC_DEF(ActivateLanguageProfile)
  205. STUBFUNC_DEF(GetActiveLanguageProfile)
  206. STUBFUNC_DEF(GetLanguageProfileDescription)
  207. STUBFUNC_DEF(GetCurrentLanguage)
  208. STUBFUNC_DEF(ChangeCurrentLanguage)
  209. STUBFUNC_DEF(GetLanguageList)
  210. STUBFUNC_DEF(EnumLanguageProfiles)
  211. STUBFUNC_DEF(EnableLanguageProfile)
  212. STUBFUNC_DEF(IsEnabledLanguageProfile)
  213. STUBFUNC_DEF(EnableLanguageProfileByDefault)
  214. STUBFUNC_DEF(SubstituteKeyboardLayout)
  215. };
  216. #endif MSTUB_H