1
- from .__init__ import ctypes , typing , SDL_POINTER , \
1
+ from .__init__ import ctypes , typing , abc , SDL_POINTER , \
2
2
SDL_FUNC , SDL_TYPE , SDL_SET_CURRENT_BINARY , SDL_GET_BINARY , SDL_BINARY
3
3
4
4
SDL_SET_CURRENT_BINARY (SDL_BINARY )
5
5
6
6
SDL_SpinLock : typing .TypeAlias = SDL_TYPE ["SDL_SpinLock" , ctypes .c_int ]
7
7
8
- SDL_FUNC ( "SDL_TryLockSpinlock" , ctypes .c_bool , SDL_POINTER [SDL_SpinLock ])
9
- SDL_FUNC ( "SDL_LockSpinlock" , None , SDL_POINTER [SDL_SpinLock ])
10
- SDL_FUNC ( "SDL_UnlockSpinlock" , None , SDL_POINTER [SDL_SpinLock ])
8
+ SDL_TryLockSpinlock : abc . Callable [..., typing . Any ] = SDL_FUNC [ "SDL_TryLockSpinlock" , ctypes .c_bool , [ SDL_POINTER [SDL_SpinLock ]]]
9
+ SDL_LockSpinlock : abc . Callable [..., typing . Any ] = SDL_FUNC [ "SDL_LockSpinlock" , None , [ SDL_POINTER [SDL_SpinLock ]]]
10
+ SDL_UnlockSpinlock : abc . Callable [..., typing . Any ] = SDL_FUNC [ "SDL_UnlockSpinlock" , None , [ SDL_POINTER [SDL_SpinLock ]]]
11
11
12
- SDL_FUNC ( "SDL_MemoryBarrierReleaseFunction" , None )
13
- SDL_FUNC ( "SDL_MemoryBarrierAcquireFunction" , None )
12
+ SDL_MemoryBarrierReleaseFunction : abc . Callable [..., typing . Any ] = SDL_FUNC [ "SDL_MemoryBarrierReleaseFunction" , None , []]
13
+ SDL_MemoryBarrierAcquireFunction : abc . Callable [..., typing . Any ] = SDL_FUNC [ "SDL_MemoryBarrierAcquireFunction" , None , []]
14
14
15
15
class SDL_AtomicInt (ctypes .Structure ):
16
16
_fields_ = [
17
17
("value" , ctypes .c_int )
18
18
]
19
19
20
- SDL_FUNC ( "SDL_CompareAndSwapAtomicInt" , ctypes .c_bool , SDL_POINTER [SDL_AtomicInt ], ctypes .c_int , ctypes .c_int )
21
- SDL_FUNC ( "SDL_SetAtomicInt" , ctypes .c_int , SDL_POINTER [SDL_AtomicInt ], ctypes .c_int )
22
- SDL_FUNC ( "SDL_GetAtomicInt" , ctypes .c_int , SDL_POINTER [SDL_AtomicInt ])
23
- SDL_FUNC ( "SDL_AddAtomicInt" , ctypes .c_int , SDL_POINTER [SDL_AtomicInt ], ctypes .c_int )
20
+ SDL_CompareAndSwapAtomicInt : abc . Callable [..., typing . Any ] = SDL_FUNC [ "SDL_CompareAndSwapAtomicInt" , ctypes .c_bool , [ SDL_POINTER [SDL_AtomicInt ], ctypes .c_int , ctypes .c_int ]]
21
+ SDL_SetAtomicInt : abc . Callable [..., typing . Any ] = SDL_FUNC [ "SDL_SetAtomicInt" , ctypes .c_int , [ SDL_POINTER [SDL_AtomicInt ], ctypes .c_int ]]
22
+ SDL_GetAtomicInt : abc . Callable [..., typing . Any ] = SDL_FUNC [ "SDL_GetAtomicInt" , ctypes .c_int , [ SDL_POINTER [SDL_AtomicInt ]]]
23
+ SDL_AddAtomicInt : abc . Callable [..., typing . Any ] = SDL_FUNC [ "SDL_AddAtomicInt" , ctypes .c_int , [ SDL_POINTER [SDL_AtomicInt ], ctypes .c_int ]]
24
24
25
25
class LP_SDL_AtomicInt (ctypes ._Pointer ):
26
26
...
@@ -36,10 +36,10 @@ class SDL_AtomicU32(ctypes.Structure):
36
36
("value" , ctypes .c_uint32 )
37
37
]
38
38
39
- SDL_FUNC ( "SDL_CompareAndSwapAtomicU32" , ctypes .c_bool , SDL_POINTER [SDL_AtomicU32 ], ctypes .c_uint32 , ctypes .c_uint32 )
40
- SDL_FUNC ( "SDL_SetAtomicU32" , ctypes .c_uint32 , SDL_POINTER [SDL_AtomicU32 ], ctypes .c_uint32 )
41
- SDL_FUNC ( "SDL_GetAtomicU32" , ctypes .c_uint32 , SDL_POINTER [SDL_AtomicU32 ])
39
+ SDL_CompareAndSwapAtomicU32 : abc . Callable [..., typing . Any ] = SDL_FUNC [ "SDL_CompareAndSwapAtomicU32" , ctypes .c_bool , [ SDL_POINTER [SDL_AtomicU32 ], ctypes .c_uint32 , ctypes .c_uint32 ]]
40
+ SDL_SetAtomicU32 : abc . Callable [..., typing . Any ] = SDL_FUNC [ "SDL_SetAtomicU32" , ctypes .c_uint32 , [ SDL_POINTER [SDL_AtomicU32 ], ctypes .c_uint32 ]]
41
+ SDL_GetAtomicU32 : abc . Callable [..., typing . Any ] = SDL_FUNC [ "SDL_GetAtomicU32" , ctypes .c_uint32 , [ SDL_POINTER [SDL_AtomicU32 ]]]
42
42
43
- SDL_FUNC ( "SDL_CompareAndSwapAtomicPointer" , ctypes .c_bool , SDL_POINTER [ctypes .c_void_p ], ctypes .c_void_p , ctypes .c_void_p )
44
- SDL_FUNC ( "SDL_SetAtomicPointer" , ctypes .c_void_p , SDL_POINTER [ctypes .c_void_p ], ctypes .c_void_p )
45
- SDL_FUNC ( "SDL_GetAtomicPointer" , ctypes .c_void_p , SDL_POINTER [ctypes .c_void_p ])
43
+ SDL_CompareAndSwapAtomicPointer : abc . Callable [..., typing . Any ] = SDL_FUNC [ "SDL_CompareAndSwapAtomicPointer" , ctypes .c_bool , [ SDL_POINTER [ctypes .c_void_p ], ctypes .c_void_p , ctypes .c_void_p ]]
44
+ SDL_SetAtomicPointer : abc . Callable [..., typing . Any ] = SDL_FUNC [ "SDL_SetAtomicPointer" , ctypes .c_void_p , [ SDL_POINTER [ctypes .c_void_p ], ctypes .c_void_p ]]
45
+ SDL_GetAtomicPointer : abc . Callable [..., typing . Any ] = SDL_FUNC [ "SDL_GetAtomicPointer" , ctypes .c_void_p , [ SDL_POINTER [ctypes .c_void_p ]]]
0 commit comments