1
0

ifc_setuppage.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #ifndef WINAMP_IFC_SETUP_PAGE_HEADER
  2. #define WINAMP_IFC_SETUP_PAGE_HEADER
  3. #include <bfc/dispatch.h>
  4. #include <windows.h>
  5. class NOVTABLE ifc_setuppage : public Dispatchable
  6. {
  7. protected:
  8. ifc_setuppage(void) {}
  9. virtual ~ifc_setuppage(void) {}
  10. public:
  11. HRESULT GetName(bool bShort, const wchar_t **pszName);
  12. HRESULT Save(HWND hwndText); // setup will allways call this no matter of IsDirty result. (you can check dirty state inside save());
  13. HRESULT CreateView(HWND hwndParent, HWND *phwnd);
  14. HRESULT Revert(void);
  15. HRESULT IsDirty(void); // S_OK - valid, S_FALSE - page is not dirty ( no save required), E_NOTIMPL - not impl. all errors counts as dirty
  16. HRESULT Validate(void); // S_OK - valid, S_FALSE - invalid, E_NOTIMPL - not impl. all errors counts as page is valid
  17. public:
  18. DISPATCH_CODES
  19. {
  20. API_SETUPPAGE_GET_NAME = 10,
  21. API_SETUPPAGE_CREATEVIEW = 20,
  22. API_SETUPPAGE_SAVE = 30,
  23. API_SETUPPAGE_ISDIRTY = 40,
  24. API_SETUPPAGE_REVERT = 50,
  25. API_SETUPPAGE_VALIDATE = 60,
  26. };
  27. };
  28. inline HRESULT ifc_setuppage::GetName(bool bShort, const wchar_t **pszName)
  29. {
  30. return _call(API_SETUPPAGE_GET_NAME, E_NOTIMPL, bShort, pszName);
  31. }
  32. inline HRESULT ifc_setuppage::CreateView(HWND hwndParent, HWND *phwnd)
  33. {
  34. return _call(API_SETUPPAGE_CREATEVIEW, E_NOTIMPL, hwndParent, phwnd);
  35. }
  36. inline HRESULT ifc_setuppage::Save(HWND hwndText)
  37. {
  38. return _call(API_SETUPPAGE_SAVE, E_NOTIMPL, hwndText);
  39. }
  40. inline HRESULT ifc_setuppage::IsDirty(void)
  41. {
  42. return _call(API_SETUPPAGE_ISDIRTY, E_NOTIMPL);
  43. }
  44. inline HRESULT ifc_setuppage::Revert(void)
  45. {
  46. return _call(API_SETUPPAGE_REVERT, E_NOTIMPL);
  47. }
  48. inline HRESULT ifc_setuppage::Validate(void)
  49. {
  50. return _call(API_SETUPPAGE_VALIDATE, E_NOTIMPL);
  51. }
  52. #endif //WINAMP_IFC_SETUP_PAGE_HEADER