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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
---@meta
---
---Manages events, like keypresses.
---
---@class love.event
love.event = {}
---
---Clears the event queue.
---
function love.event.clear() end
---
---Returns an iterator for messages in the event queue.
---
---@return function i # Iterator function usable in a for loop.
function love.event.poll() end
---
---Pump events into the event queue.
---
---This is a low-level function, and is usually not called by the user, but by love.run.
---
---Note that this does need to be called for any OS to think you're still running,
---
---and if you want to handle OS-generated events at all (think callbacks).
---
function love.event.pump() end
---
---Adds an event to the event queue.
---
---From 0.10.0 onwards, you may pass an arbitrary amount of arguments with this function, though the default callbacks don't ever use more than six.
---
---@param n love.Event # The name of the event.
---@param a? any # First event argument.
---@param b? any # Second event argument.
---@param c? any # Third event argument.
---@param d? any # Fourth event argument.
---@param e? any # Fifth event argument.
---@param f? any # Sixth event argument.
---@vararg any # Further event arguments may follow.
function love.event.push(n, a, b, c, d, e, f, ...) end
---
---Adds the quit event to the queue.
---
---The quit event is a signal for the event handler to close LÖVE. It's possible to abort the exit process with the love.quit callback.
---
---@overload fun(restart: string|"'restart'")
---@param exitstatus? number # The program exit status to use when closing the application.
function love.event.quit(exitstatus) end
---
---Like love.event.poll(), but blocks until there is an event in the queue.
---
---@return love.Event n # The name of event.
---@return any a # First event argument.
---@return any b # Second event argument.
---@return any c # Third event argument.
---@return any d # Fourth event argument.
---@return any e # Fifth event argument.
---@return any f # Sixth event argument.
function love.event.wait() end
---
---Arguments to love.event.push() and the like.
---
---Since 0.8.0, event names are no longer abbreviated.
---
---@alias love.Event
---
---Window focus gained or lost
---
---| '"focus"'
---
---Joystick pressed
---
---| '"joystickpressed"'
---
---Joystick released
---
---| '"joystickreleased"'
---
---Key pressed
---
---| '"keypressed"'
---
---Key released
---
---| '"keyreleased"'
---
---Mouse pressed
---
---| '"mousepressed"'
---
---Mouse released
---
---| '"mousereleased"'
---
---Quit
---
---| '"quit"'
---
---Window size changed by the user
---
---| '"resize"'
---
---Window is minimized or un-minimized by the user
---
---| '"visible"'
---
---Window mouse focus gained or lost
---
---| '"mousefocus"'
---
---A Lua error has occurred in a thread
---
---| '"threaderror"'
---
---Joystick connected
---
---| '"joystickadded"'
---
---Joystick disconnected
---
---| '"joystickremoved"'
---
---Joystick axis motion
---
---| '"joystickaxis"'
---
---Joystick hat pressed
---
---| '"joystickhat"'
---
---Joystick's virtual gamepad button pressed
---
---| '"gamepadpressed"'
---
---Joystick's virtual gamepad button released
---
---| '"gamepadreleased"'
---
---Joystick's virtual gamepad axis moved
---
---| '"gamepadaxis"'
---
---User entered text
---
---| '"textinput"'
---
---Mouse position changed
---
---| '"mousemoved"'
---
---Running out of memory on mobile devices system
---
---| '"lowmemory"'
---
---Candidate text for an IME changed
---
---| '"textedited"'
---
---Mouse wheel moved
---
---| '"wheelmoved"'
---
---Touch screen touched
---
---| '"touchpressed"'
---
---Touch screen stop touching
---
---| '"touchreleased"'
---
---Touch press moved inside touch screen
---
---| '"touchmoved"'
---
---Directory is dragged and dropped onto the window
---
---| '"directorydropped"'
---
---File is dragged and dropped onto the window.
---
---| '"filedropped"'
---
---Joystick pressed
---
---| '"jp"'
---
---Joystick released
---
---| '"jr"'
---
---Key pressed
---
---| '"kp"'
---
---Key released
---
---| '"kr"'
---
---Mouse pressed
---
---| '"mp"'
---
---Mouse released
---
---| '"mr"'
---
---Quit
---
---| '"q"'
---
---Window focus gained or lost
---
---| '"f"'
|