Gnash  0.8.10
aquasup.h
Go to the documentation of this file.
00001 // 
00002 //   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010,
00003 //   2011 Free Software Foundation, Inc
00004 // 
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 3 of the License, or
00008 // (at your option) any later version.
00009 // 
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018 
00019 
00020 #ifndef __AQUASUP_H__
00021 #define __AQUASUP_H__
00022 
00023 #ifdef HAVE_CONFIG_H
00024 #include "gnashconfig.h"
00025 #endif
00026 
00027 #include <vector>
00028 
00029 #include "gui.h"
00030 
00031 #if defined(RENDERER_OPENGL)
00032 #include "aqua_ogl_glue.h"
00033 #endif
00034 
00035 namespace gnash {
00036 
00037 class DSOEXPORT AquaGui : public Gui
00038 {
00039         private:
00040         
00041     std::vector< geometry::Range2d<int> > _drawbounds;
00042 
00043     int m_stage_width;
00044     int m_stage_height;
00045         
00046         int valid_x(int x);
00047         int valid_y(int y);
00048         void key_event(int key, bool down);
00049         unsigned int    _timeout;
00050 
00051     EventLoopTimerRef* _advance_timer;
00052 
00053 #if defined(RENDERER_OPENGL)
00054     AquaOglGlue         _glue;
00055 #endif
00056         
00057         public:
00058         AquaGui(unsigned long xid, float scale, bool loop, RunResources& r);
00059     virtual ~AquaGui();
00060     virtual bool init(int argc, char **argv[]);
00061     virtual void setCursor(gnash_cursor_type newcursor);
00062     virtual bool createWindow(const char *title, int width, int height,
00063                               int xPosition = 0, int yPosition = 0);
00064     virtual bool run();
00065     virtual bool createMenu();
00066     virtual bool setupEvents();
00067     virtual void renderBuffer();
00068     virtual void setTimeout(unsigned int timeout);
00069 };
00070 
00071 }
00072 
00073 #endif