194 BMask = $0000FF00; |
195 BMask = $0000FF00; |
195 AMask = $000000FF; |
196 AMask = $000000FF; |
196 {$ENDIF} |
197 {$ENDIF} |
197 |
198 |
198 {$IFDEF SDL13} |
199 {$IFDEF SDL13} |
199 // SDL_WindowFlags (enum) |
200 // SDL_WindowFlags (enum) |
200 SDL_WINDOW_FULLSCREEN = $00000001; //*< fullscreen window, implies borderless */ |
201 SDL_WINDOW_FULLSCREEN = $00000001; //*< fullscreen window, implies borderless */ |
201 SDL_WINDOW_OPENGL = $00000002; //*< window usable with OpenGL context */ |
202 SDL_WINDOW_OPENGL = $00000002; //*< window usable with OpenGL context */ |
202 SDL_WINDOW_SHOWN = $00000004; //*< window is visible */ |
203 SDL_WINDOW_SHOWN = $00000004; //*< window is visible */ |
203 SDL_WINDOW_BORDERLESS = $00000008; //*< no window decoration */ |
204 SDL_WINDOW_BORDERLESS = $00000008; //*< no window decoration */ |
204 SDL_WINDOW_RESIZABLE = $00000010; //*< window can be resized */ |
205 SDL_WINDOW_RESIZABLE = $00000010; //*< window can be resized */ |
206 SDL_WINDOW_MAXIMIZED = $00000040; //*< window is maximized */ |
207 SDL_WINDOW_MAXIMIZED = $00000040; //*< window is maximized */ |
207 SDL_WINDOW_INPUT_GRABBED = $00000100; //*< window has grabbed input focus */ |
208 SDL_WINDOW_INPUT_GRABBED = $00000100; //*< window has grabbed input focus */ |
208 SDL_WINDOW_INPUT_FOCUS = $00000200; //*< window has input focus */ |
209 SDL_WINDOW_INPUT_FOCUS = $00000200; //*< window has input focus */ |
209 SDL_WINDOW_MOUSE_FOCUS = $00000400; //*< window has mouse focus */ |
210 SDL_WINDOW_MOUSE_FOCUS = $00000400; //*< window has mouse focus */ |
210 SDL_WINDOW_FOREIGN = $00000800; //*< window not created by SDL */ |
211 SDL_WINDOW_FOREIGN = $00000800; //*< window not created by SDL */ |
|
212 |
|
213 // SDL_WindowEventID (enum) |
|
214 SDL_WINDOWEVENT_NONE = 0; //*< Never used |
|
215 SDL_WINDOWEVENT_SHOWN = 1; //*< Window has been shown |
|
216 SDL_WINDOWEVENT_HIDDEN = 2; //*< Window has been hidden |
|
217 SDL_WINDOWEVENT_EXPOSED = 3; //*< Window has been exposed and should be redrawn |
|
218 SDL_WINDOWEVENT_MOVED = 4; //*< Window has been moved to data1, data2 |
|
219 SDL_WINDOWEVENT_RESIZED = 5; //*< Window size changed to data1xdata2 |
|
220 SDL_WINDOWEVENT_MINIMIZED = 6; //*< Window has been minimized |
|
221 SDL_WINDOWEVENT_MAXIMIZED = 7; //*< Window has been maximized |
|
222 SDL_WINDOWEVENT_RESTORED = 8; //*< Window has been restored to normal size and position |
|
223 SDL_WINDOWEVENT_ENTER = 9; //*< Window has gained mouse focus |
|
224 SDL_WINDOWEVENT_LEAVE = 10; //*< Window has lost mouse focus |
|
225 SDL_WINDOWEVENT_FOCUS_GAINED = 11; //*< Window has gained keyboard focus |
|
226 SDL_WINDOWEVENT_FOCUS_LOST = 12; //*< Window has lost keyboard focus |
|
227 SDL_WINDOWEVENT_CLOSE = 13; //*< The window manager requests that the window be closed */ |
211 {$ENDIF} |
228 {$ENDIF} |
212 |
229 |
213 {* SDL_mixer *} |
230 {* SDL_mixer *} |
214 MIX_MAX_VOLUME = 128; |
231 MIX_MAX_VOLUME = 128; |
215 MIX_INIT_FLAC = $00000001; |
232 MIX_INIT_FLAC = $00000001; |
355 windowID: LongInt; |
365 windowID: LongInt; |
356 event: byte; |
366 event: byte; |
357 padding1, padding2, padding3: byte; |
367 padding1, padding2, padding3: byte; |
358 data1, data2: LongInt; |
368 data1, data2: LongInt; |
359 end; |
369 end; |
|
370 |
|
371 TSDL_KeySym = record |
|
372 scancode, |
|
373 sym, |
|
374 modifier, |
|
375 unicode: LongInt; |
|
376 end; |
360 |
377 |
361 // implement SDL_TextEditingEvent + SDL_TextInputEvent for sdl13 |
378 // implement SDL_TextEditingEvent + SDL_TextInputEvent for sdl13 |
362 {$ELSE} |
379 {$ELSE} |
|
380 TSDL_KeySym = record |
|
381 scancode: Byte; |
|
382 sym: Longword; |
|
383 modifier: Longword; |
|
384 unicode: Word; |
|
385 end; |
|
386 |
363 // these two are present in sdl1.3 but only for backward compatibility |
387 // these two are present in sdl1.3 but only for backward compatibility |
364 // and in 1.3 type_ is LongInt, not byte |
388 // and in 1.3 type_ is LongInt, not byte |
365 TSDL_ActiveEvent = record |
389 TSDL_ActiveEvent = record |
366 type_: byte; |
390 type_: byte; |
367 gain: byte; |
391 gain: byte; |
484 {$ENDIF} |
511 {$ENDIF} |
485 end; |
512 end; |
486 |
513 |
487 PSDL_Event = ^TSDL_Event; |
514 PSDL_Event = ^TSDL_Event; |
488 TSDL_Event = record |
515 TSDL_Event = record |
489 case Byte of |
516 {$IFDEF SDL13} |
490 {$IFDEF SDL13} |
517 case LongInt of |
491 SDL_FIRSTEVENT: (type_: byte); |
518 SDL_FIRSTEVENT: (type_: LongInt); |
492 SDL_QUITEV: (quit: TSDL_QuitEvent); |
519 SDL_QUITEV: (quit: TSDL_QuitEvent); |
493 SDL_WINDOWEVENT: (active: TSDL_WindowEvent); |
520 SDL_WINDOWEVENT: (wevent: TSDL_WindowEvent); |
494 SDL_KEYDOWN, |
521 SDL_KEYDOWN, |
495 SDL_KEYUP: (key: TSDL_KeyboardEvent); |
522 SDL_KEYUP: (key: TSDL_KeyboardEvent); |
496 SDL_TEXTEDITING, |
523 SDL_TEXTEDITING, |
497 SDL_TEXTINPUT: (txtin: byte); |
524 SDL_TEXTINPUT: (txtin: byte); |
498 SDL_MOUSEMOTION: (motion: TSDL_MouseMotionEvent); |
525 SDL_MOUSEMOTION: (motion: TSDL_MouseMotionEvent); |
503 SDL_JOYHATMOTION: (jhat: TSDL_JoyHatEvent); |
530 SDL_JOYHATMOTION: (jhat: TSDL_JoyHatEvent); |
504 SDL_JOYBALLMOTION: (jball: TSDL_JoyBallEvent); |
531 SDL_JOYBALLMOTION: (jball: TSDL_JoyBallEvent); |
505 SDL_JOYBUTTONDOWN, |
532 SDL_JOYBUTTONDOWN, |
506 SDL_JOYBUTTONUP: (jbutton: TSDL_JoyButtonEvent); |
533 SDL_JOYBUTTONUP: (jbutton: TSDL_JoyButtonEvent); |
507 {$ELSE} |
534 {$ELSE} |
|
535 case Byte of |
508 SDL_NOEVENT: (type_: byte); |
536 SDL_NOEVENT: (type_: byte); |
509 SDL_ACTIVEEVENT: (active: TSDL_ActiveEvent); |
537 SDL_ACTIVEEVENT: (active: TSDL_ActiveEvent); |
510 SDL_KEYDOWN, |
538 SDL_KEYDOWN, |
511 SDL_KEYUP: (key: TSDL_KeyboardEvent); |
539 SDL_KEYUP: (key: TSDL_KeyboardEvent); |
512 SDL_MOUSEMOTION: (motion: TSDL_MouseMotionEvent); |
540 SDL_MOUSEMOTION: (motion: TSDL_MouseMotionEvent); |