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.

44 lines
958 B

  1. //
  2. // icpriv.h
  3. //
  4. #pragma once
  5. //
  6. // Input Context private data storage
  7. // < would be the place to store C&C grammar >
  8. //
  9. class CICPriv : public IUnknown
  10. {
  11. public:
  12. CICPriv (ITfContext *pic)
  13. {
  14. _pic = pic;
  15. _cRefCompositions = 0;
  16. _cRef = 1;
  17. }
  18. STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj);
  19. STDMETHODIMP_(ULONG) AddRef(void);
  20. STDMETHODIMP_(ULONG) Release(void);
  21. void _AddRefComposition() { _cRefCompositions++; }
  22. void _ReleaseComposition()
  23. {
  24. if ( _cRefCompositions > 0)
  25. _cRefCompositions--;
  26. }
  27. LONG _GetCompositionCount() { return _cRefCompositions; }
  28. CTextEventSink *m_pTextEvent;
  29. TfClientId _tid;
  30. ITfContext *_pic; // not AddRef'd!
  31. DWORD m_dwEditCookie;
  32. DWORD m_dwLayoutCookie;
  33. LONG _cRefCompositions;
  34. LONG _cRef;
  35. };
  36. CICPriv *GetInputContextPriv(TfClientId tid, ITfContext *pic);