-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.h
56 lines (47 loc) · 2.81 KB
/
action.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
52
53
54
55
56
#ifndef _ACTION_H
#define _ACTION_H
#include "task.h"
#include "sheet.h"
#include "window.h"
struct ActionManager
{
void (*onClick)(struct Sheet *this, unsigned int x, unsigned y);
void (*onMouseIn)(struct Sheet *this, unsigned int x, unsigned y);
void (*onMouseLeftDown)(struct Sheet *this, unsigned int x, unsigned int y);
void (*onMouseLeftUp)(struct Sheet *this, unsigned int x, unsigned int y);
void (*onMouseRightDown)(struct Sheet *this, unsigned int x, unsigned int y);
void (*onMouseRightUp)(struct Sheet *this, unsigned int x, unsigned int y);
void (*onMouseMiddleDown)(struct Sheet *this, unsigned int x, unsigned int y);
void (*onMouseMiddleUp)(struct Sheet *this, unsigned int x, unsigned int y);
void (*onDoubleClick)(struct Sheet *this, unsigned int x, unsigned int y);
void (*onRightClick)(struct Sheet *this, unsigned int x, unsigned int y);
void (*onMiddleClick)(struct Sheet *this, unsigned int x, unsigned int y);
void (*onKeyPress)(struct Sheet *this, char c, unsigned int raw);
void (*onKeyUp)(struct Sheet *this, char c, unsigned int raw);
void (*onTextCursorTick)(struct Sheet *this, unsigned int tick);
};
void handleOnClickOfRoot(unsigned int x, unsigned int y);
void handleOnMouseMoveOfRoot(unsigned int x, unsigned int y);
void handleOnMouseLeftDownOfRoot(unsigned int x, unsigned int y);
void handleOnMouseLeftUpOfRoot(unsigned int x, unsigned int y);
void handleOnMouseRightDownOfRoot(unsigned int x, unsigned int y);
void handleOnMouseRightUpOfRoot(unsigned int x, unsigned int y);
void handleOnMouseMiddleDownOfRoot(unsigned int x, unsigned int y);
void handleOnMouseMiddleUpOfRoot(unsigned int x, unsigned int y);
void handleOnDoubleClickOfRoot(unsigned int x, unsigned int y);
void handleOnRightClickOfRoot(unsigned int x, unsigned int y);
void handleOnMiddleClickOfRoot(unsigned int x, unsigned int y);
void handleOnClick(struct Sheet *sheet, unsigned int x, unsigned int y);
void handleOnMouseMove(struct Sheet *sheet, unsigned int x, unsigned int y);
void handleOnMouseLeftDown(struct Sheet *sheet, unsigned int x, unsigned int y);
void handleOnMouseLeftUp(struct Sheet *sheet, unsigned int x, unsigned int y);
void handleOnMouseRightDown(struct Sheet *sheet, unsigned int x, unsigned int y);
void handleOnMouseRightUp(struct Sheet *sheet, unsigned int x, unsigned int y);
void handleOnMouseMiddleDown(struct Sheet *sheet, unsigned int x, unsigned int y);
void handleOnMouseMiddleUp(struct Sheet *sheet, unsigned int x, unsigned int y);
void handleOnDoubleClick(struct Sheet *sheet, unsigned int x, unsigned int y);
void handleOnRightClick(struct Sheet *sheet, unsigned int x, unsigned int y);
void handleOnMiddleClick(struct Sheet *sheet, unsigned int x, unsigned int y);
void handleKeyPress(char key, unsigned int raw);
void handleKeyUp(char key, unsigned int raw);
#endif