289 {* SDL_image *} |
289 {* SDL_image *} |
290 IMG_INIT_JPG = $00000001; |
290 IMG_INIT_JPG = $00000001; |
291 IMG_INIT_PNG = $00000002; |
291 IMG_INIT_PNG = $00000002; |
292 IMG_INIT_TIF = $00000004; |
292 IMG_INIT_TIF = $00000004; |
293 |
293 |
|
294 {* SDL_EventMask type definition *} |
|
295 {$IFNDEF SDL13} |
|
296 SDL_ALLEVENTS = $FFFFFFFF; |
|
297 {$ENDIF} |
|
298 |
294 ///////////////////////////////////////////////////////////////// |
299 ///////////////////////////////////////////////////////////////// |
295 /////////////////////// TYPE DEFINITIONS /////////////////////// |
300 /////////////////////// TYPE DEFINITIONS /////////////////////// |
296 ///////////////////////////////////////////////////////////////// |
301 ///////////////////////////////////////////////////////////////// |
297 |
302 |
298 type |
303 type |
486 state: byte; |
491 state: byte; |
487 {$IFDEF SDL13} |
492 {$IFDEF SDL13} |
488 type_: LongInt; |
493 type_: LongInt; |
489 windowID: LongInt; |
494 windowID: LongInt; |
490 padding1, padding2: byte; |
495 padding1, padding2: byte; |
491 x, y, z,xrel, yrel : LongInt; |
496 x, y, z, xrel, yrel : LongInt; |
492 pressure, pressure_max, pressure_min, |
497 pressure, pressure_max, pressure_min, |
493 rotation, tilt, cursor: LongInt; |
498 rotation, tilt, cursor: LongInt; |
494 {$ELSE} |
499 {$ELSE} |
495 type_: byte; |
500 type_: byte; |
496 x, y, xrel, yrel : word; |
501 x, y, xrel, yrel : word; |
640 //SDL_SYSWMEVENT,SDL_EVENT_RESERVEDA,SDL_EVENT_RESERVEDB |
645 //SDL_SYSWMEVENT,SDL_EVENT_RESERVEDA,SDL_EVENT_RESERVEDB |
641 SDL_VIDEORESIZE: (resize: TSDL_ResizeEvent); |
646 SDL_VIDEORESIZE: (resize: TSDL_ResizeEvent); |
642 {$ENDIF} |
647 {$ENDIF} |
643 end; |
648 end; |
644 |
649 |
|
650 |
|
651 TSDL_EventFilter = function( event : PSDL_Event ): Integer; cdecl; |
|
652 |
|
653 |
645 PByteArray = ^TByteArray; |
654 PByteArray = ^TByteArray; |
646 TByteArray = array[0..65535] of Byte; |
655 TByteArray = array[0..65535] of Byte; |
647 PLongWordArray = ^TLongWordArray; |
656 PLongWordArray = ^TLongWordArray; |
648 TLongWordArray = array[0..16383] of LongWord; |
657 TLongWordArray = array[0..16383] of LongWord; |
649 |
658 |
820 function SDL_GetRelativeMouseState(x, y: PLongInt): Byte; cdecl; external SDLLibName; |
829 function SDL_GetRelativeMouseState(x, y: PLongInt): Byte; cdecl; external SDLLibName; |
821 function SDL_GetNumMice: LongInt; cdecl; external SDLLibName; |
830 function SDL_GetNumMice: LongInt; cdecl; external SDLLibName; |
822 function SDL_PixelFormatEnumToMasks(format: TSDL_ArrayByteOrder; bpp: PLongInt; Rmask, Gmask, Bmask, Amask: PLongInt): boolean; cdecl; external SDLLibName; |
831 function SDL_PixelFormatEnumToMasks(format: TSDL_ArrayByteOrder; bpp: PLongInt; Rmask, Gmask, Bmask, Amask: PLongInt): boolean; cdecl; external SDLLibName; |
823 |
832 |
824 |
833 |
825 procedure SDL_WarpMouseInWindow(window: PSDL_Window; x, y: LongInt); cdecl; external SDLLibName ; |
834 procedure SDL_WarpMouseInWindow(window: PSDL_Window; x, y: LongInt); cdecl; external SDLLibName; |
826 |
835 function SDL_SetHint(name, value: PChar): boolean; cdecl; external SDLLibName; |
827 function SDL_SetHint(name, value: PChar): boolean; cdecl; external SDLLibName; |
|
828 |
836 |
829 function SDL_PeepEvents(event: PSDL_Event; numevents: LongInt; action: SDL_eventaction; minType, maxType: LongInt): LongInt; cdecl; external SDLLibName; |
837 function SDL_PeepEvents(event: PSDL_Event; numevents: LongInt; action: SDL_eventaction; minType, maxType: LongInt): LongInt; cdecl; external SDLLibName; |
830 |
838 {$ELSE} |
|
839 function SDL_PeepEvents(event: PSDL_Event; numevents: LongInt; action: SDL_eventaction; mask: LongInt): LongInt; cdecl; external SDLLibName; |
831 {$ENDIF} |
840 {$ENDIF} |
832 |
841 |
833 function SDL_GetMouseState(x, y: PLongInt): Byte; cdecl; external SDLLibName; |
842 function SDL_GetMouseState(x, y: PLongInt): Byte; cdecl; external SDLLibName; |
834 function SDL_GetKeyName(key: Longword): PChar; cdecl; external SDLLibName; |
843 function SDL_GetKeyName(key: Longword): PChar; cdecl; external SDLLibName; |
835 |
844 |
836 procedure SDL_PumpEvents; cdecl; external SDLLibName; |
845 procedure SDL_PumpEvents; cdecl; external SDLLibName; |
837 function SDL_PollEvent(event: PSDL_Event): LongInt; cdecl; external SDLLibName; |
846 function SDL_PollEvent(event: PSDL_Event): LongInt; cdecl; external SDLLibName; |
838 function SDL_WaitEvent(event: PSDL_Event): LongInt; cdecl; external SDLLibName; |
847 function SDL_WaitEvent(event: PSDL_Event): LongInt; cdecl; external SDLLibName; |
|
848 procedure SDL_SetEventFilter( filter : TSDL_EventFilter ); cdecl; external SDLLibName; |
839 |
849 |
840 function SDL_ShowCursor(toggle: LongInt): LongInt; cdecl; external SDLLibName; |
850 function SDL_ShowCursor(toggle: LongInt): LongInt; cdecl; external SDLLibName; |
841 |
851 |
842 procedure SDL_WM_SetIcon(icon: PSDL_Surface; mask : byte); cdecl; external SDLLibName; |
852 procedure SDL_WM_SetIcon(icon: PSDL_Surface; mask : byte); cdecl; external SDLLibName; |
843 procedure SDL_WM_SetCaption(title: PChar; icon: PChar); cdecl; external SDLLibName; |
853 procedure SDL_WM_SetCaption(title: PChar; icon: PChar); cdecl; external SDLLibName; |
888 function TTF_SizeUTF8(font: PTTF_Font; const text: PChar; out w, h: LongInt): LongInt; cdecl; external SDL_TTFLibName; |
898 function TTF_SizeUTF8(font: PTTF_Font; const text: PChar; out w, h: LongInt): LongInt; cdecl; external SDL_TTFLibName; |
889 |
899 |
890 function TTF_RenderUTF8_Solid(font: PTTF_Font; const text: PChar; fg: TSDL_Color): PSDL_Surface; cdecl; external SDL_TTFLibName; |
900 function TTF_RenderUTF8_Solid(font: PTTF_Font; const text: PChar; fg: TSDL_Color): PSDL_Surface; cdecl; external SDL_TTFLibName; |
891 function TTF_RenderUTF8_Blended(font: PTTF_Font; const text: PChar; fg: TSDL_Color): PSDL_Surface; cdecl; external SDL_TTFLibName; |
901 function TTF_RenderUTF8_Blended(font: PTTF_Font; const text: PChar; fg: TSDL_Color): PSDL_Surface; cdecl; external SDL_TTFLibName; |
892 function TTF_RenderUTF8_Shaded(font: PTTF_Font; const text: PChar; fg, bg: TSDL_Color): PSDL_Surface; cdecl; external SDL_TTFLibName; |
902 function TTF_RenderUTF8_Shaded(font: PTTF_Font; const text: PChar; fg, bg: TSDL_Color): PSDL_Surface; cdecl; external SDL_TTFLibName; |
|
903 |
893 function TTF_OpenFont(const filename: PChar; size: LongInt): PTTF_Font; cdecl; external SDL_TTFLibName; |
904 function TTF_OpenFont(const filename: PChar; size: LongInt): PTTF_Font; cdecl; external SDL_TTFLibName; |
894 procedure TTF_SetFontStyle(font: PTTF_Font; style: LongInt); cdecl; external SDL_TTFLibName; |
905 procedure TTF_SetFontStyle(font: PTTF_Font; style: LongInt); cdecl; external SDL_TTFLibName; |
895 |
906 |
896 (* SDL_mixer *) |
907 (* SDL_mixer *) |
897 function Mix_Init(flags: LongInt): LongInt; cdecl; external SDL_MixerLibName; |
908 function Mix_Init(flags: LongInt): LongInt; cdecl; external SDL_MixerLibName; |