2 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010,
3 // 2011 Free Software Foundation, Inc
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 #include "gnashconfig.h"
30 #include "SDL_thread.h"
33 # include "sdl_agg_glue.h"
34 #elif defined(RENDERER_CAIRO)
35 # include "sdl_cairo_glue.h"
36 #elif defined(RENDERER_OPENGL)
37 # include "sdl_ogl_glue.h"
48 class SDLGui
: public Gui
51 SDLGui(unsigned long xid
, float scale
, bool loop
, RunResources
& r
);
53 virtual bool init(int argc
, char **argv
[]);
54 virtual bool createWindow(const char *title
, int width
, int height
,
55 int xPosition
= 0, int yPosition
= 0);
57 virtual bool createMenu();
58 virtual bool setupEvents();
59 virtual void renderBuffer();
60 virtual void setInterval(unsigned int interval
);
61 virtual void disableCoreTrap();
62 virtual void setTimeout(unsigned int timeout
);
64 void key_event(SDL_KeyboardEvent
* key
, bool down
);
66 // See gui.h for documentation
67 void setInvalidatedRegions(const InvalidatedRanges
& ranges
);
70 unsigned int _timeout
;
73 /// Handle VIDEORESIZE event
76 /// Handle VIDEOEXPOSE event
79 static key::code
sdl_to_gnash_key(SDL_KeyboardEvent
* key
);
80 static int sdl_to_gnash_modifier(int state
);
84 #elif defined(RENDERER_CAIRO)
86 #elif defined(RENDERER_OPENGL)
92 // void xt_event_handler(Widget xtwidget, gpointer instance,
93 // XEvent *xevent, Boolean *b);
95 // end of namespace gnash
98 // end of __SDLSUP_H__