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.

47 lines
1008 B

  1. //
  2. // lpns.h
  3. //
  4. // Generic ITfActiveInputProcessorNotifySink object
  5. //
  6. #ifndef LPAN_H
  7. #define LPAN_H
  8. #include "private.h"
  9. #define LPNS_INVALID_COOKIE ((DWORD)(-1))
  10. typedef HRESULT (*LPNSCALLBACK)(BOOL fChanged, LANGID langid, BOOL *pfAccept, void *pv);
  11. class CLanguageProfileNotifySink : public ITfLanguageProfileNotifySink
  12. {
  13. public:
  14. CLanguageProfileNotifySink(LPNSCALLBACK pfn, void *pv);
  15. //
  16. // IUnknown methods
  17. //
  18. STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj);
  19. STDMETHODIMP_(ULONG) AddRef(void);
  20. STDMETHODIMP_(ULONG) Release(void);
  21. //
  22. // ITfLanguageProfilesNotifySink
  23. //
  24. STDMETHODIMP OnLanguageChange(LANGID langid, BOOL *pfAccept);
  25. STDMETHODIMP OnLanguageChanged();
  26. HRESULT _Advise(ITfInputProcessorProfiles *pipp);
  27. HRESULT _Unadvise();
  28. private:
  29. long _cRef;
  30. ITfInputProcessorProfiles *_pipp;
  31. DWORD _dwCookie;
  32. LPNSCALLBACK _pfn;
  33. void *_pv;
  34. };
  35. #endif // LPAN_H