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
1.3 KiB

  1. /*++
  2. Copyright (c) 1985 - 1999, Microsoft Corporation
  3. Module Name:
  4. mouse.h
  5. Abstract:
  6. This file defines the CMouseSink Class.
  7. Author:
  8. Revision History:
  9. Notes:
  10. --*/
  11. #ifndef _MOUSE_H_
  12. #define _MOUSE_H_
  13. #include "cime.h"
  14. class ImmIfIME;
  15. class CMouseSink
  16. {
  17. public:
  18. CMouseSink()
  19. {
  20. m_ref = 1;
  21. m_prgMouseSinks = NULL;
  22. }
  23. virtual ~CMouseSink()
  24. {
  25. if (m_prgMouseSinks)
  26. {
  27. delete m_prgMouseSinks;
  28. m_prgMouseSinks = NULL;
  29. }
  30. }
  31. BOOL Init()
  32. {
  33. Assert(!m_prgMouseSinks);
  34. m_prgMouseSinks = new CStructArray<GENERICSINK>;
  35. if (!m_prgMouseSinks)
  36. return FALSE;
  37. return TRUE;
  38. }
  39. public:
  40. ULONG InternalAddRef(void);
  41. ULONG InternalRelease(void);
  42. public:
  43. //
  44. // Mouse sink
  45. //
  46. public:
  47. HRESULT AdviseMouseSink(HIMC hImc, ITfRangeACP* range, ITfMouseSink* pSink, DWORD* pdwCookie);
  48. HRESULT UnadviseMouseSink(DWORD dwCookie);
  49. LRESULT MsImeMouseHandler(ULONG uEdge, ULONG uQuadrant, ULONG dwBtnStatus, IMCLock& imc,
  50. ImmIfIME* ImmIfIme);
  51. public:
  52. CStructArray<GENERICSINK> *m_prgMouseSinks;
  53. protected:
  54. long m_ref;
  55. };
  56. #endif // _MOUSE_H_