-
Notifications
You must be signed in to change notification settings - Fork 2
/
Event.h
44 lines (30 loc) · 806 Bytes
/
Event.h
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
42
43
44
//
// Created by hyperandroid on 02/02/2016.
//
#ifndef HYPERCASINO_EVENT_H
#define HYPERCASINO_EVENT_H
#include <v8.h>
#include "Wrappable.h"
using namespace v8;
/**
* A generic Event.
* This will be the base class for all other existing events like TouchEvent, SurfaceEvent, etc.
*/
class Event : public Wrappable {
DEFINE_WRAPPERTYPEINFO();
public:
Event( const char* const );
virtual ~Event();
// this class disallows copy and assignment to prevent referencing twice the same v8 Persistent
// ref.
Event(const Event&) = delete;
void operator=(const Event&) = delete;
const char* Type() const;
long TimeStamp() const;
Wrappable* target;
Wrappable* currentTarget;
long timeStamp;
protected:
char* type;
};
#endif //HYPERCASINO_EVENT_H