Gnash  0.8.11dev
aquasup.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010,
3 // 2011 Free Software Foundation, Inc
4 //
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.
9 //
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.
14 //
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
18 
19 
20 #ifndef __AQUASUP_H__
21 #define __AQUASUP_H__
22 
23 #ifdef HAVE_CONFIG_H
24 #include "gnashconfig.h"
25 #endif
26 
27 #include <vector>
28 
29 #include "gui.h"
30 
31 #if defined(RENDERER_OPENGL)
32 #include "aqua_ogl_glue.h"
33 #endif
34 
35 namespace gnash {
36 
37 class DSOEXPORT AquaGui : public Gui
38 {
39  private:
40 
41  std::vector< geometry::Range2d<int> > _drawbounds;
42 
43  int m_stage_width;
44  int m_stage_height;
45 
46  int valid_x(int x);
47  int valid_y(int y);
48  void key_event(int key, bool down);
49  unsigned int _timeout;
50 
51  EventLoopTimerRef* _advance_timer;
52 
53 #if defined(RENDERER_OPENGL)
54  AquaOglGlue _glue;
55 #endif
56 
57  public:
58  AquaGui(unsigned long xid, float scale, bool loop, RunResources& r);
59  virtual ~AquaGui();
60  virtual bool init(int argc, char **argv[]);
61  virtual void setCursor(gnash_cursor_type newcursor);
62  virtual bool createWindow(const char *title, int width, int height,
63  int xPosition = 0, int yPosition = 0);
64  virtual bool run();
65  virtual bool createMenu();
66  virtual bool setupEvents();
67  virtual void renderBuffer();
68  virtual void setTimeout(unsigned int timeout);
69 };
70 
71 }
72 
73 #endif
Definition: aqua_ogl_glue.h:29
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
gnash_cursor_type
Enumerates mouse cursor types.
Definition: gui.h:81
Definition: klash_part.cpp:329
Parent class from which all GUI implementations will depend.
Definition: gui.h:88
Definition: GnashKey.h:164
Definition: aquasup.h:37
Definition: klash_part.cpp:329
Class to group together per-run and external resources for Gnash.
Definition: RunResources.h:53
std::int32_t x
Definition: BitmapData_as.cpp:434
#define DSOEXPORT
Definition: dsodefs.h:55
std::int32_t y
Definition: BitmapData_as.cpp:435