Gnash 0.8.9
|
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 __ROSUP_H__ 00021 #define __ROSUP_H__ 00022 00023 #ifdef HAVE_CONFIG_H 00024 #include "gnashconfig.h" 00025 #endif 00026 00027 #include "gnash.h" 00028 00029 #include "oslib/colourtrans.h" 00030 #include "oslib/wimp.h" 00031 00032 #ifdef RENDERER_AGG 00033 #include "riscos_glue_agg.h" 00034 #endif 00035 00036 #include "gui.h" 00037 00038 namespace gnash 00039 { 00040 00041 class RiscosGui : public Gui 00042 { 00043 public: 00044 RiscosGui(unsigned long xid, float scale, bool loop, RunResources& r); 00045 virtual ~RiscosGui(); 00046 virtual bool init(int argc, char **argv[]); 00047 virtual bool createWindow(int width, int height); 00048 virtual bool createWindow(const char *title, int width, int height, 00049 int xPosition = 0, int yPosition = 0); 00050 virtual bool run(); 00051 virtual bool createMenu(); 00052 virtual bool setupEvents(); 00053 virtual void renderBuffer(); 00054 virtual void setInterval(unsigned int interval); 00055 virtual void setTimeout(unsigned int timeout); 00056 virtual void setInvalidatedRegion(const SWFRect& bounds); 00057 00058 00059 private: 00060 bool create_window(); 00061 int valid_coord(int coord, int max); 00062 00063 wimp_t _task; 00064 wimp_w _window; 00065 bool _quit; 00066 os_t _timeout; 00067 00068 int m_draw_minx; 00069 int m_draw_miny; 00070 int m_draw_maxx; 00071 int m_draw_maxy; 00072 00073 int _screen_height; 00074 int _screen_width; 00075 00076 #ifdef RENDERER_AGG 00077 RiscosAggGlue glue; 00078 #endif 00079 }; 00080 00081 } 00082 00083 #endif