@@ -55,6 +55,47 @@ def _get_library_crossplatform():
5555except NameError :
5656 c_bool = c_byte
5757
58+ # ---------------- SDL ----------------
59+
60+ class SDL_Rect (Structure ):
61+ _fields_ = [('x' , c_int16 ),
62+ ('y' , c_int16 ),
63+ ('width' , c_uint16 ),
64+ ('height' , c_uint16 )]
65+
66+ class SDL_PixelFormat (Structure ):
67+ _fields_ = [('palette' , c_void_p ),
68+ ('BitsPerPixel' , c_uint8 ),
69+ ('BytesPerPixel' , c_uint8 ),
70+ ('Rloss' , c_uint8 ),
71+ ('Gloss' , c_uint8 ),
72+ ('Bloss' , c_uint8 ),
73+ ('Aloss' , c_uint8 ),
74+ ('Rshift' , c_uint8 ),
75+ ('Gshift' , c_uint8 ),
76+ ('Bshift' , c_uint8 ),
77+ ('Ashift' , c_uint8 ),
78+ ('Rmask' , c_uint32 ),
79+ ('Gmask' , c_uint32 ),
80+ ('Bmask' , c_uint32 ),
81+ ('Amask' , c_uint32 ),
82+ ('colorkey' , c_uint32 ),
83+ ('alpha' , c_uint8 ),
84+ ]
85+
86+ class SDL_Surface (Structure ):
87+ _fields_ = [('flags' , c_uint32 ),
88+ ('PixelFormat' , POINTER (SDL_PixelFormat )),
89+ ('width' , c_int ),
90+ ('height' , c_int ),
91+ ('pitch' , c_uint16 ),
92+ ('pixels' , c_void_p ), # Read-write
93+ ('rect' , SDL_Rect ),
94+ ('refcount' , c_int )
95+ ]
96+
97+ # ---------------- libtcod ----------------
98+
5899# COLOR
59100
60101class _Color (Structure ):
@@ -392,6 +433,15 @@ def __iter__(self):
392433_lib .TCOD_sys_get_current_resolution .restype = None
393434_lib .TCOD_sys_get_current_resolution .argtypes = (POINTER (c_int ), POINTER (c_int ))
394435
436+ _lib .TCOD_sys_clipboard_set .restype = None
437+ _lib .TCOD_sys_clipboard_set .argtypes = (c_char_p ,)
438+ _lib .TCOD_sys_clipboard_get .restype = c_char_p
439+ _lib .TCOD_sys_clipboard_get .argtypes = ()
440+
441+ _RENDERCALL = CFUNCTYPE (None , POINTER (SDL_Surface ))
442+ _lib .TCOD_sys_register_SDL_renderer .restype = None
443+ _lib .TCOD_sys_register_SDL_renderer .argtypes = None
444+
395445# IMAGE
396446
397447# TCOD_image_t = c_void_p
0 commit comments