aboutsummaryrefslogtreecommitdiff
path: root/Src/Wasabi/api/syscb/callbacks/gccb.h
blob: 1e4087929ac3d407e3753a787420b6850a92b45b (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
#ifndef _GCCB_H
#define _GCCB_H

#include "syscbi.h"

namespace GarbageCollectCallback {
  enum {
    GARBAGECOLLECT=1,
  };
};

#define GARBAGECOLLECTCALLBACK_PARENT SysCallbackI
class GarbageCollectCallbackI : public GARBAGECOLLECTCALLBACK_PARENT {
protected:
  GarbageCollectCallbackI() {}

public:
  virtual int gccb_onGarbageCollect() { return 0; }

private:
  virtual FOURCC syscb_getEventType() { return SysCallback::GC; }
  virtual int syscb_notify(int msg, intptr_t param1=0, intptr_t param2=0) {
    switch (msg) {
      case GarbageCollectCallback::GARBAGECOLLECT:
        return gccb_onGarbageCollect();
    }
    return 0;
  }
};

#endif