-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHtmlEvent.h
51 lines (38 loc) · 807 Bytes
/
HtmlEvent.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
45
46
47
48
49
50
51
//
// HtmlEvent.h
// C++HTML
//
// Created by Denis Stadniczuk on 07/07/14.
// Copyright (c) 2014 Denis Stadniczuk. All rights reserved.
//
#ifndef __C__HTML__HtmlEvent__
#define __C__HTML__HtmlEvent__
#include <iostream>
class HtmlNode;
class EventData {
public:
};
class ScrollEventData : public EventData {
public:
float x, y;
float deltaX;
float deltaY;
};
class Event {
public:
Event();
~Event();
void initEvent(std::string type, bool canBubble, bool cancelable);
std::string type;
HtmlNode *target;
HtmlNode *currentTarget;
unsigned short eventPhase;
bool bubbles;
bool cancelable;
unsigned int timeStamp;
void stopPropagation();
void preventDefault();
bool canceled;
EventData *data;
};
#endif /* defined(__C__HTML__HtmlEvent__) */