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.

78 lines
2.4 KiB

  1. //
  2. // utb.h
  3. //
  4. #ifndef UTB_H
  5. #define UTB_H
  6. #include "private.h"
  7. #ifndef ASFW_ANY
  8. #define ASFW_ANY ((DWORD)-1)
  9. #endif
  10. typedef void (*REGISTERSYSTEMTHREAD)(DWORD dw, DWORD reserve);
  11. typedef BOOL (*ALLOWSETFOREGROUNDWINDOW)(DWORD dw);
  12. ALLOWSETFOREGROUNDWINDOW EnsureAllowSetForeground();
  13. REGISTERSYSTEMTHREAD EnsureRegSys();
  14. HRESULT RegisterLangBarNotifySink(ITfLangBarEventSink *pSink, HWND hwnd, DWORD dwFlags, DWORD *pdwCookie);
  15. HRESULT UnregisterLangBarNotifySink(DWORD dwCookie);
  16. BOOL CALLBACK EnumChildWndProc(HWND hwnd, LPARAM lParam);
  17. BOOL FindTrayEtc();
  18. BOOL IsNotifyTrayWnd(HWND hWnd);
  19. void LangBarClosed();
  20. //////////////////////////////////////////////////////////////////////////////
  21. //
  22. // CLangBarMgr
  23. //
  24. //////////////////////////////////////////////////////////////////////////////
  25. // If we ever go crazy for perf, this class could be a single static instance,
  26. // since it has no state. We need to get rid of the ATL CComCoClass and
  27. // CComObjectRoot to do this.
  28. class CLangBarMgr :
  29. public ITfLangBarMgr_P,
  30. public CComObjectRoot_CreateInstance<CLangBarMgr>
  31. {
  32. public:
  33. CLangBarMgr();
  34. ~CLangBarMgr();
  35. BEGIN_COM_MAP_IMMX(CLangBarMgr)
  36. COM_INTERFACE_ENTRY(ITfLangBarMgr)
  37. COM_INTERFACE_ENTRY(ITfLangBarMgr_P)
  38. END_COM_MAP_IMMX()
  39. //
  40. // ITfLangBarManager
  41. //
  42. STDMETHODIMP AdviseEventSink(ITfLangBarEventSink *pSink, HWND hwnd, DWORD dwFlags, DWORD *pdwCookie);
  43. STDMETHODIMP UnadviseEventSink(DWORD dwCookie);
  44. STDMETHODIMP GetThreadMarshalInterface(DWORD dwThreadId, DWORD dwType, REFIID riid, IUnknown **ppunk);
  45. STDMETHODIMP GetThreadLangBarItemMgr(DWORD dwThreadId, ITfLangBarItemMgr **pplbi, DWORD *pdwThreadId) ;
  46. STDMETHODIMP GetInputProcessorProfiles(DWORD dwThreadId, ITfInputProcessorProfiles **ppaip, DWORD *pdwThreadId) ;
  47. STDMETHODIMP RestoreLastFocus(DWORD *pdwThreadId, BOOL fPrev);
  48. STDMETHODIMP SetModalInput(ITfLangBarEventSink *pSink, DWORD dwThreadId, DWORD dwFlags);
  49. STDMETHODIMP ShowFloating(DWORD dwFlags);
  50. STDMETHODIMP GetShowFloatingStatus(DWORD *pdwFlags);
  51. //
  52. // ITfLangBarManager_P
  53. //
  54. STDMETHODIMP GetPrevShowFloatingStatus(DWORD *pdwFlags);
  55. static HRESULT s_ShowFloating(DWORD dwFlags);
  56. static HRESULT s_GetShowFloatingStatus(DWORD *pdwFlags);
  57. private:
  58. static BOOL CheckFloatingBits(DWORD dwBits);
  59. DBG_ID_DECLARE;
  60. };
  61. #endif //UTB_H