1
0

skincb.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef _SKINCB_H
  2. #define _SKINCB_H
  3. #include <api/syscb/callbacks/syscbi.h>
  4. namespace SkinCallback {
  5. enum {
  6. UNLOADING=100, // beginning, haven't killed anything yet
  7. RESET=200, // skin is gone
  8. RELOAD=300, // stuff is loading
  9. BEFORELOADINGELEMENTS=350,
  10. GUILOADED=400, // skin gui objects loaded from xml
  11. LOADED=500, // all done, new skin in place
  12. CHECKPREVENTSWITCH=600, // we're about to switch skin, wanna abort ? return 1 if so
  13. COLORTHEMECHANGED=700, // color theme has been changed, trap this if you're not using automaticly themed widgets
  14. COLORTHEMESLISTCHANGED=710, // color theme list has been modified, trap this if you're showing a list of the colorthemes and you want to mirror changes
  15. };
  16. };
  17. #define SKINCALLBACKI_PARENT SysCallbackI
  18. class SkinCallbackI : public SKINCALLBACKI_PARENT {
  19. public:
  20. virtual FOURCC syscb_getEventType() { return SysCallback::SKINCB; }
  21. protected:
  22. // override these
  23. virtual int skincb_onUnloading() { return 0; }
  24. virtual int skincb_onReset() { return 0; }
  25. virtual int skincb_onReload() { return 0; }
  26. virtual int skincb_onBeforeLoadingElements() { return 0; }
  27. virtual int skincb_onGuiLoaded() { return 0; }
  28. virtual int skincb_onLoaded() { return 0; }
  29. virtual int skincb_onCheckPreventSwitch(const wchar_t *skinname) { return 0; }
  30. virtual int skincb_onColorThemeChanged(const wchar_t *newcolortheme) { return 0; }
  31. virtual int skincb_onColorThemesListChanged() { return 0; }
  32. private:
  33. virtual int syscb_notify(int msg, intptr_t param1=0, intptr_t param2=0);
  34. };
  35. #endif