aboutsummaryrefslogtreecommitdiff
path: root/Src/Wasabi/api/syscb/callbacks/skincb.h
blob: 41df3aa7b7fd1115a9a391b98dde87e6ad87fd46 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef _SKINCB_H
#define _SKINCB_H

#include <api/syscb/callbacks/syscbi.h>

namespace SkinCallback {
  enum {
    UNLOADING=100,	// beginning, haven't killed anything yet
    RESET=200,		// skin is gone
    RELOAD=300,		// stuff is loading
    BEFORELOADINGELEMENTS=350,
    GUILOADED=400,	// skin gui objects loaded from xml
    LOADED=500,		// all done, new skin in place
    CHECKPREVENTSWITCH=600,		// we're about to switch skin, wanna abort ? return 1 if so
    COLORTHEMECHANGED=700,		// color theme has been changed, trap this if you're not using automaticly themed widgets
    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
  };
};

#define SKINCALLBACKI_PARENT SysCallbackI
class SkinCallbackI : public SKINCALLBACKI_PARENT {
public:
  virtual FOURCC syscb_getEventType() { return SysCallback::SKINCB; }

protected:
  // override these
  virtual int skincb_onUnloading() { return 0; }
  virtual int skincb_onReset() { return 0; }
  virtual int skincb_onReload() { return 0; }
  virtual int skincb_onBeforeLoadingElements() { return 0; }
  virtual int skincb_onGuiLoaded() { return 0; }
  virtual int skincb_onLoaded() { return 0; }
  virtual int skincb_onCheckPreventSwitch(const wchar_t *skinname) { return 0; }
  virtual int skincb_onColorThemeChanged(const wchar_t *newcolortheme) { return 0; }
  virtual int skincb_onColorThemesListChanged() { return 0; }

private:
  virtual int syscb_notify(int msg, intptr_t param1=0, intptr_t param2=0);
};

#endif