2 * sdl.hidd - SDL graphics/sound/keyboard for AROS hosted
3 * Copyright (c) 2007 Robert Norris. All rights reserved.
4 * Copyright (c) 2007-2011 The AROS Development Team
6 * This program is free software; you can redistribute it and/or modify it
7 * under the same terms as AROS itself.
10 #define timeval sys_timeval
11 #include "SDL_platform.h"
12 #include "SDL_config.h"
19 #include <exec/semaphores.h>
20 #include <proto/hostlib.h>
24 char * (*SDL_GetError
) (void);
25 char * (*SDL_VideoDriverName
) (char *namebuf
, int maxlen
);
26 SDL_Surface
* (*SDL_GetVideoSurface
) (void);
27 const SDL_VideoInfo
* (*SDL_GetVideoInfo
) (void);
28 SDL_Rect
** (*SDL_ListModes
) (SDL_PixelFormat
*format
, Uint32 flags
);
29 SDL_Surface
* (*SDL_SetVideoMode
) (int width
, int height
, int bpp
, Uint32 flags
);
30 void (*SDL_UpdateRect
) (SDL_Surface
*screen
, Sint32 x
, Sint32 y
, Uint32 w
, Uint32 h
);
31 int (*SDL_SetColors
) (SDL_Surface
*surface
, SDL_Color
*colors
, int firstcolor
, int ncolors
);
32 SDL_Surface
* (*SDL_CreateRGBSurface
) (Uint32 flags
, int width
, int height
, int depth
, Uint32 Rmask
, Uint32 Gmask
, Uint32 Bmask
, Uint32 Amask
);
33 SDL_Surface
* (*SDL_CreateRGBSurfaceFrom
) (void *pixels
, int width
, int height
, int depth
, int pitch
, Uint32 Rmask
, Uint32 Gmask
, Uint32 Bmask
, Uint32 Amask
);
34 void (*SDL_FreeSurface
) (SDL_Surface
*surface
);
35 int (*SDL_LockSurface
) (SDL_Surface
*surface
);
36 void (*SDL_UnlockSurface
) (SDL_Surface
*surface
);
37 int (*SDL_UpperBlit
) (SDL_Surface
*src
, SDL_Rect
*srcrect
, SDL_Surface
*dst
, SDL_Rect
*dstrect
);
38 int (*SDL_FillRect
) (SDL_Surface
*dst
, SDL_Rect
*dstrect
, Uint32 color
);
39 void (*SDL_WM_SetCaption
) (const char *title
, const char *icon
);
40 void (*SDL_WM_SetIcon
) (SDL_Surface
*icon
, Uint8
*mask
);
41 int (*SDL_ShowCursor
) (int toggle
);
42 void (*SDL_PumpEvents
) (void);
43 int (*SDL_PeepEvents
) (SDL_Event
*events
, int numevents
, SDL_eventaction action
, Uint32 mask
);
44 const SDL_version
* (*SDL_Linked_Version
) (void);
45 int (*SDL_Init
) (Uint32 flags
);
46 void (*SDL_Quit
) (void);
49 extern struct sdl_funcs sdl_funcs
;
51 #define SDL_SOFILE "libSDL.so"
52 #define SDL_DLLFILE "SDL.dll"
54 #define S(name, ...) \
57 int __sdlret = sdl_funcs.name(__VA_ARGS__); \
62 #define SP(name, ...) \
65 const void *__sdlret = sdl_funcs.name(__VA_ARGS__); \
70 #define SV(name, ...) \
73 sdl_funcs.name(__VA_ARGS__); \
79 int sdl_hostlib_init(struct sdlhidd
*LIBBASE
);
80 int sdl_hostlib_expunge(struct sdlhidd
*LIBBASE
);