2 * sdl.hidd - SDL graphics/sound/keyboard for AROS hosted
3 * Copyright (c) 2007 Robert Norris. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the same terms as AROS itself.
10 #define SDL_INTERN_H 1
12 #include <exec/types.h>
13 #include <exec/tasks.h>
14 #include <exec/libraries.h>
15 #include <exec/semaphores.h>
17 #include <hidd/graphics.h>
18 #include <hidd/mouse.h>
20 #include LC_LIBDEFS_FILE
22 #include "sdl_hostlib.h"
24 #define CLID_Hidd_SDLGfx "hidd.gfx.sdl"
25 #define IID_Hidd_SDLGFX "hidd.gfx.sdl"
30 #define IID_Hidd_SDLBitMap "hidd.bitmap.sdl"
33 aoHidd_SDLBitMap_Surface
,
34 aoHidd_SDLBitMap_IsOnScreen
,
35 num_Hidd_SDLBitMap_Attrs
38 #define aHidd_SDLBitMap_Surface (((ULONG) HiddSDLBitMapAttrBase) + aoHidd_SDLBitMap_Surface)
39 #define aHidd_SDLBitMap_IsOnScreen (((ULONG) HiddSDLBitMapAttrBase) + aoHidd_SDLBitMap_IsOnScreen)
41 #define SDLBM_ATTR(id) ((id)-HiddSDLBitMapAttrBase)
48 #define CLID_Hidd_SDLMouse "hidd.mouse.sdl"
49 #define IID_Hidd_SDLMouse "hidd.mouse.sdl"
52 VOID (*callback
)(APTR
, struct pHidd_Mouse_Event
*);
57 moHidd_SDLMouse_HandleEvent
60 struct pHidd_SDLMouse_HandleEvent
{
65 VOID
Hidd_SDLMouse_HandleEvent(OOP_Object
*o
, SDL_Event
*e
);
67 #define CLID_Hidd_SDLKbd "hidd.kbd.sdl"
68 #define IID_Hidd_SDLKbd "hidd.kbd.sdl"
71 VOID (*callback
)(APTR
, UWORD
);
76 moHidd_SDLKbd_HandleEvent
79 struct pHidd_SDLKbd_HandleEvent
{
84 VOID
Hidd_SDLMouse_HandleEvent(OOP_Object
*o
, SDL_Event
*e
);
89 struct SignalSemaphore lock
;
95 OOP_Class
*mouseclass
;
98 struct Task
*eventtask
;
100 OOP_Object
*mousehidd
;
103 UBYTE keycode
[SDLK_LAST
];
109 /* these should be handled by some sort of configuration
110 * and/or commandline switches */
111 #define CFG_WANT_FULLSCREEN (0)