blob: 398021d24fe4f99af981f998f05853c7adf7e8dc (
plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
with
Interfaces.C;
use type
Interfaces.C.int;
package body FLTK.Event is
function fl_event_key
return Interfaces.C.int;
pragma Import (C, fl_event_key, "fl_event_key");
function fl_event_x
return Interfaces.C.int;
pragma Import (C, fl_event_x, "fl_event_x");
function fl_event_x_root
return Interfaces.C.int;
pragma Import (C, fl_event_x_root, "fl_event_x_root");
function fl_event_y
return Interfaces.C.int;
pragma Import (C, fl_event_y, "fl_event_y");
function fl_event_y_root
return Interfaces.C.int;
pragma Import (C, fl_event_y_root, "fl_event_y_root");
function fl_event_is_click
return Interfaces.C.int;
pragma Import (C, fl_event_is_click, "fl_event_is_click");
function Last_Keypress
return Shortcut_Key is
begin
return C_To_Key (Interfaces.C.unsigned_long (fl_event_key));
end Last_Keypress;
function Mouse_X
return Integer is
begin
return Integer (fl_event_x);
end Mouse_X;
function Mouse_X_Root
return Integer is
begin
return Integer (fl_event_x_root);
end Mouse_X_Root;
function Mouse_Y
return Integer is
begin
return Integer (fl_event_y);
end Mouse_Y;
function Mouse_Y_Root
return Integer is
begin
return Integer (fl_event_y_root);
end Mouse_Y_Root;
function Is_Click
return Boolean is
begin
return fl_event_is_click /= 0;
end Is_Click;
end FLTK.Event;
|