1 (* |
1 (* |
2 * Hedgewars, a free turn based strategy game |
2 * Hedgewars, a free turn based strategy game |
3 * Copyright (c) 2004-2012 Andrey Korotaev <unC0Rr@gmail.com> |
3 * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com> |
4 * |
4 * |
5 * This program is free software; you can redistribute it and/or modify |
5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License as published by |
6 * it under the terms of the GNU General Public License as published by |
7 * the Free Software Foundation; version 2 of the License |
7 * the Free Software Foundation; version 2 of the License |
8 * |
8 * |
960 procedure SDL_WarpMouseInWindow(window: PSDL_Window; x, y: LongInt); cdecl; external SDLLibName; |
954 procedure SDL_WarpMouseInWindow(window: PSDL_Window; x, y: LongInt); cdecl; external SDLLibName; |
961 function SDL_SetHint(name, value: PChar): Boolean; cdecl; external SDLLibName; |
955 function SDL_SetHint(name, value: PChar): Boolean; cdecl; external SDLLibName; |
962 procedure SDL_StartTextInput; cdecl; external SDLLibName; |
956 procedure SDL_StartTextInput; cdecl; external SDLLibName; |
963 |
957 |
964 function SDL_PeepEvents(event: PSDL_Event; numevents: LongInt; action: TSDL_eventaction; minType, maxType: LongWord): LongInt; cdecl; external SDLLibName; |
958 function SDL_PeepEvents(event: PSDL_Event; numevents: LongInt; action: TSDL_eventaction; minType, maxType: LongWord): LongInt; cdecl; external SDLLibName; |
965 function SDL_CreateThread(fn: Pointer; name: PChar; data: Pointer): PSDL_Thread; cdecl; external SDLLibName; |
959 {$ELSE} |
966 {$ELSE} |
|
967 function SDL_CreateThread(fn: Pointer; data: Pointer): PSDL_Thread; cdecl; external SDLLibName; |
|
968 function SDL_PeepEvents(event: PSDL_Event; numevents: LongInt; action: TSDL_eventaction; mask: LongWord): LongInt; cdecl; external SDLLibName; |
960 function SDL_PeepEvents(event: PSDL_Event; numevents: LongInt; action: TSDL_eventaction; mask: LongWord): LongInt; cdecl; external SDLLibName; |
969 {$ENDIF} |
961 {$ENDIF} |
|
962 |
970 |
963 |
971 function SDL_GetMouseState(x, y: PLongInt): Byte; cdecl; external SDLLibName; |
964 function SDL_GetMouseState(x, y: PLongInt): Byte; cdecl; external SDLLibName; |
972 function SDL_GetKeyName(key: LongWord): PChar; cdecl; external SDLLibName; |
965 function SDL_GetKeyName(key: LongWord): PChar; cdecl; external SDLLibName; |
973 function SDL_GetScancodeName(key: LongWord): PChar; cdecl; external SDLLibName; |
966 function SDL_GetScancodeName(key: LongWord): PChar; cdecl; external SDLLibName; |
974 function SDL_GetKeyFromScancode(key: LongWord): LongInt; cdecl; external SDLLibName; |
967 function SDL_GetKeyFromScancode(key: LongWord): LongInt; cdecl; external SDLLibName; |
983 |
976 |
984 procedure SDL_WM_SetIcon(icon: PSDL_Surface; mask : Byte); cdecl; external SDLLibName; |
977 procedure SDL_WM_SetIcon(icon: PSDL_Surface; mask : Byte); cdecl; external SDLLibName; |
985 procedure SDL_WM_SetCaption(title: PChar; icon: PChar); cdecl; external SDLLibName; |
978 procedure SDL_WM_SetCaption(title: PChar; icon: PChar); cdecl; external SDLLibName; |
986 function SDL_WM_ToggleFullScreen(surface: PSDL_Surface): LongInt; cdecl; external SDLLibName; |
979 function SDL_WM_ToggleFullScreen(surface: PSDL_Surface): LongInt; cdecl; external SDLLibName; |
987 |
980 |
|
981 |
|
982 // remember to mark the threaded functions as 'cdecl; export;' |
|
983 // (or have fun debugging nil arguments) |
|
984 function SDL_CreateThread(fn: Pointer; {$IFDEF SDL13}name: PChar;{$ENDIF} data: Pointer): PSDL_Thread; cdecl; external SDLLibName; |
988 procedure SDL_WaitThread(thread: PSDL_Thread; status: PLongInt); cdecl; external SDLLibName; |
985 procedure SDL_WaitThread(thread: PSDL_Thread; status: PLongInt); cdecl; external SDLLibName; |
|
986 procedure SDL_KillThread(thread: PSDL_Thread); cdecl; external SDLLibName; |
|
987 |
989 function SDL_CreateMutex: PSDL_mutex; cdecl; external SDLLibName; |
988 function SDL_CreateMutex: PSDL_mutex; cdecl; external SDLLibName; |
990 procedure SDL_DestroyMutex(mutex: PSDL_mutex); cdecl; external SDLLibName; |
989 procedure SDL_DestroyMutex(mutex: PSDL_mutex); cdecl; external SDLLibName; |
991 function SDL_LockMutex(mutex: PSDL_mutex): LongInt; cdecl; external SDLLibName name 'SDL_mutexP'; |
990 function SDL_LockMutex(mutex: PSDL_mutex): LongInt; cdecl; external SDLLibName name 'SDL_mutexP'; |
992 function SDL_UnlockMutex(mutex: PSDL_mutex): LongInt; cdecl; external SDLLibName name 'SDL_mutexV'; |
991 function SDL_UnlockMutex(mutex: PSDL_mutex): LongInt; cdecl; external SDLLibName name 'SDL_mutexV'; |
993 |
992 |