Gnash
0.8.10
|
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 HAIKUGUI_H 00021 #define HAIKUGUI_H 00022 00023 #ifdef HAVE_CONFIG_H 00024 #include "gnashconfig.h" 00025 #endif 00026 00027 #include "gui.h" 00028 00029 #ifndef RENDERER_AGG 00030 #error "Haiku GUI needs AGG renderer" 00031 #endif 00032 00033 #include "haiku_agg_glue.h" 00034 00035 #include <string> 00036 00037 #include "OS.h" 00038 00039 00040 namespace gnash 00041 { 00042 class BeApp; 00043 00044 00045 00046 class HaikuGui : public Gui 00047 { 00048 BeApp *_app; 00049 #ifdef RENDERER_AGG 00050 HaikuAggGlue _glue; 00051 #endif 00052 unsigned int _timeout; 00053 std::string _sharefilename; 00054 public: 00055 HaikuGui(unsigned long xid, float scale, bool loop, RunResources& r); 00056 virtual ~HaikuGui(); 00057 00058 virtual bool init(int argc, char **argv[]); 00059 void init_dumpfile(); 00060 virtual bool createWindow(const char *title, int width, int height, 00061 int xPosition = 0, int yPosition = 0); 00062 virtual bool run(); 00063 virtual bool createMenu(); 00064 virtual bool createMenuBar(); 00065 virtual bool setupEvents(); 00066 virtual void setFullscreen(); 00067 virtual void unsetFullscreen(); 00068 virtual void setFullscreenEtc(); 00069 virtual void unsetFullscreenEtc(); 00070 virtual void renderBuffer(); 00071 virtual void setInterval(unsigned int interval); 00072 virtual void setTimeout(unsigned int timeout); 00073 virtual void error(const std::string &msg); 00074 virtual bool yesno(const std::string &question); 00075 00076 void GnashPulse(); 00077 unsigned int getInterval(); 00078 virtual void resize_view(int width, int height); 00079 void Shown(); 00080 void Hidden(); 00081 00082 void setInvalidatedRegions(const InvalidatedRanges& ranges); 00083 }; 00084 00085 00086 }; 00087 00088 #endif 00089