Source tree in arch made more compact
[AROS.git] / arch / all-hosted / hidd / sdl / sdl_intern.h
bloba4b89bb63ef0570add3780d38e67acf3af4aedd8
1 /*
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.
7 */
9 #ifndef SDL_INTERN_H
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>
16 #include <oop/oop.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"
27 struct gfxdata {
30 #define IID_Hidd_SDLBitMap "hidd.bitmap.sdl"
32 enum {
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)
43 struct bmdata {
44 SDL_Surface *surface;
45 BOOL is_onscreen;
48 #define CLID_Hidd_SDLMouse "hidd.mouse.sdl"
49 #define IID_Hidd_SDLMouse "hidd.mouse.sdl"
51 struct mousedata {
52 VOID (*callback)(APTR, struct pHidd_Mouse_Event *);
53 APTR callbackdata;
56 enum {
57 moHidd_SDLMouse_HandleEvent
60 struct pHidd_SDLMouse_HandleEvent {
61 OOP_MethodID mID;
62 SDL_Event *e;
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"
70 struct kbddata {
71 VOID (*callback)(APTR, UWORD);
72 APTR callbackdata;
75 enum {
76 moHidd_SDLKbd_HandleEvent
79 struct pHidd_SDLKbd_HandleEvent {
80 OOP_MethodID mID;
81 SDL_Event *e;
84 VOID Hidd_SDLMouse_HandleEvent(OOP_Object *o, SDL_Event *e);
86 LIBBASETYPE {
87 struct Library lib;
89 struct SignalSemaphore lock;
91 OOP_Class *gfxclass;
92 OOP_Class *bmclass;
93 OOP_Class *mouseclass;
94 OOP_Class *kbdclass;
96 struct Task *eventtask;
98 OOP_Object *mousehidd;
99 OOP_Object *kbdhidd;
101 UBYTE keycode[SDLK_LAST];
103 BOOL use_hwsurface;
104 BOOL use_fullscreen;
107 /* these should be handled by some sort of configuration
108 * and/or commandline switches */
109 #define CFG_WANT_FULLSCREEN (0)
111 #endif