equal
deleted
inserted
replaced
929 PByteArray = ^TByteArray; |
929 PByteArray = ^TByteArray; |
930 |
930 |
931 TLongWordArray = array[0..16383] of LongWord; |
931 TLongWordArray = array[0..16383] of LongWord; |
932 PLongWordArray = ^TLongWordArray; |
932 PLongWordArray = ^TLongWordArray; |
933 |
933 |
|
934 TWordArray = array[0..16383] of Word; |
|
935 PWordArray = ^TWordArray; |
|
936 |
934 PSDL_Thread = Pointer; |
937 PSDL_Thread = Pointer; |
935 PSDL_mutex = Pointer; |
938 PSDL_mutex = Pointer; |
936 PSDL_sem = Pointer; |
939 PSDL_sem = Pointer; |
937 |
940 |
938 TSDL_GLattr = ( |
941 TSDL_GLattr = ( |
1031 end; |
1034 end; |
1032 |
1035 |
1033 {$IFDEF WINDOWS} |
1036 {$IFDEF WINDOWS} |
1034 TThreadFunction = function (p: pointer): Longword; stdcall; |
1037 TThreadFunction = function (p: pointer): Longword; stdcall; |
1035 pfnSDL_CurrentBeginThread = function ( |
1038 pfnSDL_CurrentBeginThread = function ( |
1036 _Security: pointer; |
1039 _Security: pointer; |
1037 _StackSize: LongWord; |
1040 _StackSize: LongWord; |
1038 _StartAddress: TThreadFunction; |
1041 _StartAddress: TThreadFunction; |
1039 _ArgList: pointer; |
1042 _ArgList: pointer; |
1040 _InitFlag: Longword; |
1043 _InitFlag: Longword; |
1041 _ThrdAddr: PLongword): PtrUInt; cdecl; |
1044 _ThrdAddr: PLongword): PtrUInt; cdecl; |
1042 pfnSDL_CurrentEndThread = procedure (_Retval: LongInt); cdecl; |
1045 pfnSDL_CurrentEndThread = procedure (_Retval: LongInt); cdecl; |
1043 {$ENDIF} |
1046 {$ENDIF} |
1044 |
1047 |
1045 ///////////////////////////////////////////////////////////////// |
1048 ///////////////////////////////////////////////////////////////// |
1046 ///////////////////// FUNCTION DEFINITIONS ///////////////////// |
1049 ///////////////////// FUNCTION DEFINITIONS ///////////////////// |
1047 ///////////////////////////////////////////////////////////////// |
1050 ///////////////////////////////////////////////////////////////// |
1048 |
1051 |
1140 function SDL_PollEvent(event: PSDL_Event): LongInt; cdecl; external SDLLibName; |
1143 function SDL_PollEvent(event: PSDL_Event): LongInt; cdecl; external SDLLibName; |
1141 function SDL_WaitEvent(event: PSDL_Event): LongInt; cdecl; external SDLLibName; |
1144 function SDL_WaitEvent(event: PSDL_Event): LongInt; cdecl; external SDLLibName; |
1142 procedure SDL_SetEventFilter(filter: TSDL_EventFilter); cdecl; external SDLLibName; |
1145 procedure SDL_SetEventFilter(filter: TSDL_EventFilter); cdecl; external SDLLibName; |
1143 |
1146 |
1144 function SDL_ShowCursor(toggle: LongInt): LongInt; cdecl; external SDLLibName; |
1147 function SDL_ShowCursor(toggle: LongInt): LongInt; cdecl; external SDLLibName; |
1145 procedure SDL_WarpMouse(x, y: Word); |
1148 procedure SDL_WarpMouse(x, y: Word); |
1146 |
1149 |
1147 function SDL_GetKeyboardState(numkeys: PLongInt): PByteArray; cdecl; external SDLLibName; |
1150 function SDL_GetKeyboardState(numkeys: PLongInt): PByteArray; cdecl; external SDLLibName; |
1148 |
1151 |
1149 procedure SDL_WM_SetIcon(icon: PSDL_Surface; mask : Byte); cdecl; external SDLLibName; |
1152 procedure SDL_WM_SetIcon(icon: PSDL_Surface; mask : Byte); cdecl; external SDLLibName; |
1150 procedure SDL_WM_SetCaption(title: PChar; icon: PChar); cdecl; external SDLLibName; |
1153 procedure SDL_WM_SetCaption(title: PChar; icon: PChar); cdecl; external SDLLibName; |
1295 |
1298 |
1296 // for sdl1.2 we directly call SDL_WarpMouse() |
1299 // for sdl1.2 we directly call SDL_WarpMouse() |
1297 // for sdl2 we provide a SDL_WarpMouse() which calls the right SDL_WarpMouseInWindow() function |
1300 // for sdl2 we provide a SDL_WarpMouse() which calls the right SDL_WarpMouseInWindow() function |
1298 // this has the advantage of reducing 'uses' and 'ifdef' statements |
1301 // this has the advantage of reducing 'uses' and 'ifdef' statements |
1299 // (SDLwindow is a private member of uStore module) |
1302 // (SDLwindow is a private member of uStore module) |
1300 procedure SDL_WarpMouse(x, y: Word); |
1303 procedure SDL_WarpMouse(x, y: Word); |
1301 begin |
1304 begin |
1302 WarpMouse(x, y); |
1305 WarpMouse(x, y); |
1303 end; |
1306 end; |
1304 |
1307 |
1305 function SDL_MustLock(Surface: PSDL_Surface): Boolean; |
1308 function SDL_MustLock(Surface: PSDL_Surface): Boolean; |
1338 |
1341 |
1339 {$IFDEF WINDOWS} |
1342 {$IFDEF WINDOWS} |
1340 function SDL_CreateThread(fn: Pointer; name: PChar; data: Pointer): PSDL_Thread; cdecl; |
1343 function SDL_CreateThread(fn: Pointer; name: PChar; data: Pointer): PSDL_Thread; cdecl; |
1341 begin |
1344 begin |
1342 SDL_CreateThread:= SDL_CreateThread(fn, name, data, nil, nil) |
1345 SDL_CreateThread:= SDL_CreateThread(fn, name, data, nil, nil) |
1343 end; |
1346 end; |
1344 {$ENDIF} |
1347 {$ENDIF} |
1345 |
1348 |
1346 end. |
1349 end. |
1347 |
1350 |