Skip to content

Commit 65a275a

Browse files
Add files via upload
1 parent 5f133f6 commit 65a275a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+5478
-0
lines changed

SDL2/SDL.fs

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
\ table >order definitions
2+
require c-helper.fs
3+
require SDL_platform.fs
4+
require SDL_config.fs
5+
require SDL_stdinc.fs
6+
require SDL_main.fs
7+
require SDL_assert.fs
8+
require SDL_atomic.fs
9+
require SDL_error.fs
10+
require SDL_endian.fs
11+
require SDL_mutex.fs
12+
require SDL_thread.fs
13+
require SDL_rwops.fs
14+
require SDL_audio.fs
15+
require SDL_clipboard.fs
16+
require SDL_cpuinfo.fs
17+
require SDL_pixels.fs
18+
require SDL_rect.fs
19+
require SDL_blendmode.fs
20+
require SDL_surface.fs
21+
require SDL_video.fs
22+
require SDL_scancode.fs
23+
require SDL_keycode.fs
24+
require SDL_keyboard.fs
25+
require SDL_mouse.fs
26+
require SDL_guid.fs
27+
require SDL_joystick.fs
28+
require SDL_sensor.fs
29+
require SDL_gamecontroller.fs
30+
require SDL_quit.fs
31+
require SDL_touch.fs
32+
require SDL_gesture.fs
33+
require SDL_events.fs
34+
require SDL_filesystem.fs
35+
require SDL_haptic.fs
36+
require SDL_hidapi.fs
37+
require SDL_hints.fs
38+
require SDL_loadso.fs
39+
require SDL_log.fs
40+
require SDL_messagebox.fs
41+
require SDL_metal.fs
42+
require SDL_power.fs
43+
require SDL_render.fs
44+
require SDL_shape.fs
45+
require SDL_system.fs
46+
require SDL_timer.fs
47+
require SDL_version.fs
48+
require SDL_locale.fs
49+
require SDL_misc.fs
50+
51+
\ wordlist >order definitions
52+
53+
\ ----===< prefix >===-----
54+
c-library sdl
55+
s" SDL2" add-lib
56+
\c #include <SDL2/SDL.h>
57+
58+
\ ----===< int constants >===-----
59+
#1 constant SDL_INIT_TIMER
60+
#16 constant SDL_INIT_AUDIO
61+
#32 constant SDL_INIT_VIDEO
62+
#512 constant SDL_INIT_JOYSTICK
63+
#4096 constant SDL_INIT_HAPTIC
64+
#8192 constant SDL_INIT_GAMECONTROLLER
65+
#16384 constant SDL_INIT_EVENTS
66+
#32768 constant SDL_INIT_SENSOR
67+
#1048576 constant SDL_INIT_NOPARACHUTE
68+
#62001 constant SDL_INIT_EVERYTHING
69+
70+
\ ------===< functions >===-------
71+
c-function SDL_Init SDL_Init n -- n ( flags -- )
72+
c-function SDL_InitSubSystem SDL_InitSubSystem n -- n ( flags -- )
73+
c-function SDL_QuitSubSystem SDL_QuitSubSystem n -- void ( flags -- )
74+
c-function SDL_WasInit SDL_WasInit n -- n ( flags -- )
75+
c-function SDL_Quit SDL_Quit -- void ( -- )
76+
77+
\ ----===< postfix >===-----
78+
end-c-library

SDL2/SDL_assert.fs

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
\ ----===< prefix >===-----
2+
c-library sdl_assert
3+
s" SDL2" add-lib
4+
\c #include <SDL2/SDL_assert.h>
5+
6+
\ ----===< int constants >===-----
7+
#2 constant SDL_ASSERT_LEVEL
8+
#205 constant SDL_LINE
9+
#0 constant SDL_NULL_WHILE_LOOP_CONDITION
10+
11+
\ --------===< enums >===---------
12+
#0 constant SDL_ASSERTION_RETRY
13+
#1 constant SDL_ASSERTION_BREAK
14+
#2 constant SDL_ASSERTION_ABORT
15+
#3 constant SDL_ASSERTION_IGNORE
16+
#4 constant SDL_ASSERTION_ALWAYS_IGNORE
17+
18+
\ -------===< structs >===--------
19+
20+
\ struct SDL_AssertData
21+
begin-structure SDL_AssertData
22+
c-int: SDL_AssertData-always_ignore
23+
c-uint: SDL_AssertData-trigger_count
24+
c-char-ptr: SDL_AssertData-condition
25+
c-char-ptr: SDL_AssertData-filename
26+
c-int: SDL_AssertData-linenum
27+
c-uint32: SDL_AssertData-padding
28+
c-char-ptr: SDL_AssertData-function
29+
c-struct-ptr: SDL_AssertData-next
30+
end-structure
31+
32+
\ ------===< functions >===-------
33+
c-function SDL_ReportAssertion SDL_ReportAssertion a a a n -- n ( <noname> <noname> <noname> <noname> -- )
34+
c-function SDL_SetAssertionHandler SDL_SetAssertionHandler a a -- void ( handler userdata -- )
35+
c-function SDL_GetDefaultAssertionHandler SDL_GetDefaultAssertionHandler -- a ( -- )
36+
c-function SDL_GetAssertionHandler SDL_GetAssertionHandler a -- a ( puserdata -- )
37+
c-function SDL_GetAssertionReport SDL_GetAssertionReport -- a ( -- )
38+
c-function SDL_ResetAssertionReport SDL_ResetAssertionReport -- void ( -- )
39+
40+
\ ----===< postfix >===-----
41+
end-c-library

SDL2/SDL_atomic.fs

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
\ ----===< prefix >===-----
2+
c-library sdl_atomic
3+
s" SDL2" add-lib
4+
\c #include <SDL2/SDL_atomic.h>
5+
6+
\ -------===< structs >===--------
7+
\ SDL_atomic_t
8+
begin-structure SDL_atomic_t
9+
c-int: SDL_atomic_t-value
10+
end-structure
11+
12+
\ ------===< functions >===-------
13+
c-function SDL_AtomicTryLock SDL_AtomicTryLock a -- n ( lock -- )
14+
c-function SDL_AtomicLock SDL_AtomicLock a -- void ( lock -- )
15+
c-function SDL_AtomicUnlock SDL_AtomicUnlock a -- void ( lock -- )
16+
c-function SDL_MemoryBarrierReleaseFunction SDL_MemoryBarrierReleaseFunction -- void ( -- )
17+
c-function SDL_MemoryBarrierAcquireFunction SDL_MemoryBarrierAcquireFunction -- void ( -- )
18+
c-function SDL_AtomicCAS SDL_AtomicCAS a n n -- n ( a oldval newval -- )
19+
c-function SDL_AtomicSet SDL_AtomicSet a n -- n ( a v -- )
20+
c-function SDL_AtomicGet SDL_AtomicGet a -- n ( a -- )
21+
c-function SDL_AtomicAdd SDL_AtomicAdd a n -- n ( a v -- )
22+
c-function SDL_AtomicCASPtr SDL_AtomicCASPtr a a a -- n ( a oldval newval -- )
23+
c-function SDL_AtomicSetPtr SDL_AtomicSetPtr a a -- a ( a v -- )
24+
c-function SDL_AtomicGetPtr SDL_AtomicGetPtr a -- a ( a -- )
25+
26+
\ ----===< postfix >===-----
27+
end-c-library

SDL2/SDL_audio.fs

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
\ ----===< prefix >===-----
2+
c-library sdl_audio
3+
s" SDL2" add-lib
4+
\c #include <SDL2/SDL_audio.h>
5+
6+
\ ----===< int constants >===-----
7+
#255 constant SDL_AUDIO_MASK_BITSIZE
8+
#256 constant SDL_AUDIO_MASK_DATATYPE
9+
#4096 constant SDL_AUDIO_MASK_ENDIAN
10+
#32768 constant SDL_AUDIO_MASK_SIGNED
11+
#8 constant AUDIO_U8
12+
#32776 constant AUDIO_S8
13+
#16 constant AUDIO_U16LSB
14+
#32784 constant AUDIO_S16LSB
15+
#4112 constant AUDIO_U16MSB
16+
#36880 constant AUDIO_S16MSB
17+
#16 constant AUDIO_U16
18+
#32784 constant AUDIO_S16
19+
#32800 constant AUDIO_S32LSB
20+
#36896 constant AUDIO_S32MSB
21+
#32800 constant AUDIO_S32
22+
#33056 constant AUDIO_F32LSB
23+
#37152 constant AUDIO_F32MSB
24+
#33056 constant AUDIO_F32
25+
#16 constant AUDIO_U16SYS
26+
#32784 constant AUDIO_S16SYS
27+
#32800 constant AUDIO_S32SYS
28+
#33056 constant AUDIO_F32SYS
29+
#1 constant SDL_AUDIO_ALLOW_FREQUENCY_CHANGE
30+
#2 constant SDL_AUDIO_ALLOW_FORMAT_CHANGE
31+
#4 constant SDL_AUDIO_ALLOW_CHANNELS_CHANGE
32+
#8 constant SDL_AUDIO_ALLOW_SAMPLES_CHANGE
33+
#15 constant SDL_AUDIO_ALLOW_ANY_CHANGE
34+
#9 constant SDL_AUDIOCVT_MAX_FILTERS
35+
#128 constant SDL_MIX_MAXVOLUME
36+
37+
\ --------===< enums >===---------
38+
#0 constant SDL_AUDIO_STOPPED
39+
#1 constant SDL_AUDIO_PLAYING
40+
#2 constant SDL_AUDIO_PAUSED
41+
42+
\ -------===< structs >===--------
43+
44+
\ struct SDL_AudioSpec
45+
begin-structure SDL_AudioSpec
46+
c-int: SDL_AudioSpec-freq
47+
c-uint16: SDL_AudioSpec-format
48+
c-uint8: SDL_AudioSpec-channels
49+
c-uint8: SDL_AudioSpec-silence
50+
c-uint16: SDL_AudioSpec-samples
51+
c-uint16: SDL_AudioSpec-padding
52+
c-uint32: SDL_AudioSpec-size
53+
c-func-ptr: SDL_AudioSpec-callback
54+
c-pointer: SDL_AudioSpec-userdata
55+
end-structure
56+
57+
\ struct SDL_AudioCVT
58+
begin-structure SDL_AudioCVT
59+
c-int: SDL_AudioCVT-needed
60+
c-uint16: SDL_AudioCVT-src_format
61+
c-uint16: SDL_AudioCVT-dst_format
62+
c-double: SDL_AudioCVT-rate_incr
63+
c-uint8-ptr: SDL_AudioCVT-buf
64+
c-int: SDL_AudioCVT-len
65+
c-int: SDL_AudioCVT-len_cvt
66+
c-int: SDL_AudioCVT-len_mult
67+
c-double: SDL_AudioCVT-len_ratio
68+
10 c-func-ptrs: SDL_AudioCVT-filters
69+
c-int: SDL_AudioCVT-filter_index
70+
end-structure
71+
72+
\ ------===< functions >===-------
73+
c-function SDL_GetNumAudioDrivers SDL_GetNumAudioDrivers -- n ( -- )
74+
c-function SDL_GetAudioDriver SDL_GetAudioDriver n -- a ( index -- )
75+
c-function SDL_AudioInit SDL_AudioInit a -- n ( driver_name -- )
76+
c-function SDL_AudioQuit SDL_AudioQuit -- void ( -- )
77+
c-function SDL_GetCurrentAudioDriver SDL_GetCurrentAudioDriver -- a ( -- )
78+
c-function SDL_OpenAudio SDL_OpenAudio a a -- n ( desired obtained -- )
79+
c-function SDL_GetNumAudioDevices SDL_GetNumAudioDevices n -- n ( iscapture -- )
80+
c-function SDL_GetAudioDeviceName SDL_GetAudioDeviceName n n -- a ( index iscapture -- )
81+
c-function SDL_GetAudioDeviceSpec SDL_GetAudioDeviceSpec n n a -- n ( index iscapture spec -- )
82+
c-function SDL_GetDefaultAudioInfo SDL_GetDefaultAudioInfo a a n -- n ( name spec iscapture -- )
83+
c-function SDL_OpenAudioDevice SDL_OpenAudioDevice a n a a n -- n ( device iscapture desired obtained allowed_changes -- )
84+
c-function SDL_GetAudioStatus SDL_GetAudioStatus -- n ( -- )
85+
c-function SDL_GetAudioDeviceStatus SDL_GetAudioDeviceStatus n -- n ( dev -- )
86+
c-function SDL_PauseAudio SDL_PauseAudio n -- void ( pause_on -- )
87+
c-function SDL_PauseAudioDevice SDL_PauseAudioDevice n n -- void ( dev pause_on -- )
88+
c-function SDL_LoadWAV_RW SDL_LoadWAV_RW a n a a a -- a ( src freesrc spec audio_buf audio_len -- )
89+
c-function SDL_FreeWAV SDL_FreeWAV a -- void ( audio_buf -- )
90+
c-function SDL_BuildAudioCVT SDL_BuildAudioCVT a n n n n n n -- n ( cvt src_format src_channels src_rate dst_format dst_channels dst_rate -- )
91+
c-function SDL_ConvertAudio SDL_ConvertAudio a -- n ( cvt -- )
92+
c-function SDL_NewAudioStream SDL_NewAudioStream n n n n n n -- a ( src_format src_channels src_rate dst_format dst_channels dst_rate -- )
93+
c-function SDL_AudioStreamPut SDL_AudioStreamPut a a n -- n ( stream buf len -- )
94+
c-function SDL_AudioStreamGet SDL_AudioStreamGet a a n -- n ( stream buf len -- )
95+
c-function SDL_AudioStreamAvailable SDL_AudioStreamAvailable a -- n ( stream -- )
96+
c-function SDL_AudioStreamFlush SDL_AudioStreamFlush a -- n ( stream -- )
97+
c-function SDL_AudioStreamClear SDL_AudioStreamClear a -- void ( stream -- )
98+
c-function SDL_FreeAudioStream SDL_FreeAudioStream a -- void ( stream -- )
99+
c-function SDL_MixAudio SDL_MixAudio a a n n -- void ( dst src len volume -- )
100+
c-function SDL_MixAudioFormat SDL_MixAudioFormat a a n n n -- void ( dst src format len volume -- )
101+
c-function SDL_QueueAudio SDL_QueueAudio n a n -- n ( dev data len -- )
102+
c-function SDL_DequeueAudio SDL_DequeueAudio n a n -- n ( dev data len -- )
103+
c-function SDL_GetQueuedAudioSize SDL_GetQueuedAudioSize n -- n ( dev -- )
104+
c-function SDL_ClearQueuedAudio SDL_ClearQueuedAudio n -- void ( dev -- )
105+
c-function SDL_LockAudio SDL_LockAudio -- void ( -- )
106+
c-function SDL_LockAudioDevice SDL_LockAudioDevice n -- void ( dev -- )
107+
c-function SDL_UnlockAudio SDL_UnlockAudio -- void ( -- )
108+
c-function SDL_UnlockAudioDevice SDL_UnlockAudioDevice n -- void ( dev -- )
109+
c-function SDL_CloseAudio SDL_CloseAudio -- void ( -- )
110+
c-function SDL_CloseAudioDevice SDL_CloseAudioDevice n -- void ( dev -- )
111+
112+
\ ----===< postfix >===-----
113+
end-c-library

SDL2/SDL_blendmode.fs

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
\ ----===< prefix >===-----
2+
c-library sdl_blendmode
3+
s" SDL2" add-lib
4+
\c #include <SDL2/SDL_blendmode.h>
5+
6+
\ --------===< enums >===---------
7+
#0 constant SDL_BLENDMODE_NONE
8+
#1 constant SDL_BLENDMODE_BLEND
9+
#2 constant SDL_BLENDMODE_ADD
10+
#4 constant SDL_BLENDMODE_MOD
11+
#8 constant SDL_BLENDMODE_MUL
12+
#2147483647 constant SDL_BLENDMODE_INVALID
13+
#1 constant SDL_BLENDOPERATION_ADD
14+
#2 constant SDL_BLENDOPERATION_SUBTRACT
15+
#3 constant SDL_BLENDOPERATION_REV_SUBTRACT
16+
#4 constant SDL_BLENDOPERATION_MINIMUM
17+
#5 constant SDL_BLENDOPERATION_MAXIMUM
18+
#1 constant SDL_BLENDFACTOR_ZERO
19+
#2 constant SDL_BLENDFACTOR_ONE
20+
#3 constant SDL_BLENDFACTOR_SRC_COLOR
21+
#4 constant SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR
22+
#5 constant SDL_BLENDFACTOR_SRC_ALPHA
23+
#6 constant SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA
24+
#7 constant SDL_BLENDFACTOR_DST_COLOR
25+
#8 constant SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR
26+
#9 constant SDL_BLENDFACTOR_DST_ALPHA
27+
#10 constant SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA
28+
29+
\ ------===< functions >===-------
30+
c-function SDL_ComposeCustomBlendMode SDL_ComposeCustomBlendMode n n n n n n -- n ( srcColorFactor dstColorFactor colorOperation srcAlphaFactor dstAlphaFactor alphaOperation -- )
31+
32+
\ ----===< postfix >===-----
33+
end-c-library

SDL2/SDL_clipboard.fs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
\ ----===< prefix >===-----
2+
c-library sdl_clipboard
3+
s" SDL2" add-lib
4+
\c #include <SDL2/SDL_clipboard.h>
5+
6+
\ ------===< functions >===-------
7+
c-function SDL_SetClipboardText SDL_SetClipboardText a -- n ( text -- )
8+
c-function SDL_GetClipboardText SDL_GetClipboardText -- a ( -- )
9+
c-function SDL_HasClipboardText SDL_HasClipboardText -- n ( -- )
10+
c-function SDL_SetPrimarySelectionText SDL_SetPrimarySelectionText a -- n ( text -- )
11+
c-function SDL_GetPrimarySelectionText SDL_GetPrimarySelectionText -- a ( -- )
12+
c-function SDL_HasPrimarySelectionText SDL_HasPrimarySelectionText -- n ( -- )
13+
14+
\ ----===< postfix >===-----
15+
end-c-library

0 commit comments

Comments
 (0)