-
Notifications
You must be signed in to change notification settings - Fork 0
/
mlx_event.h
64 lines (58 loc) · 1.68 KB
/
mlx_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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* mlx_event.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gphilipp <gphilipp@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/12/26 18:06:24 by gphilipp #+# #+# */
/* Updated: 2022/01/02 15:57:35 by gphilipp ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef MLX_EVENT_H
# define MLX_EVENT_H
/*
** ON_EVENT
*/
enum {
ON_KEYDOWN,
ON_KEYUP,
ON_MOUSEDOWN,
ON_MOUSEUP,
ON_MOUSEMOVE,
ON_MOUSEWHEEL,
ON_FOCUSCHANGE,
ON_KEYFOCUSCHANGE,
ON_VISIBILITYCHANGE,
ON_DESTROY
};
typedef struct s_xpoint {
int x;
int y;
} t_xpoint;
typedef struct s_xwheel {
float dx;
float dy;
} t_xwheel;
// https://developer.apple.com/documentation/appkit/nscursor?language=objc
enum {
ARROW_CURSOR,
IBEAM_CURSOR,
CROSSHAIR_CURSOR,
CLOSEDHAND_CURSOR,
OPENHAND_CURSOR,
POINTINGHAND_CURSOR,
RESIZELEFT_CURSOR,
RESIZERIGHT_CURSOR,
RESIZELEFTRIGHT_CURSOR,
RESIZEUP_CURSOR,
RESIZEDOWN_CURSOR,
RESIZEUPDOWN_CURSOR,
DISAPPEARINGITEM_CURSOR,
IBEAM_CURSOR_FORVERTICALLAYOUT,
OPERATIONNOTALLOWED_CURSOR,
DRAGLINK_CURSOR,
DRAGCOPY_CURSOR,
CONTEXTUALMENU_CURSOR
};
#endif