• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • Examples
  • File List
  • File Members

NullGui.h

Go to the documentation of this file.
00001 // 
00002 //   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
00003 //   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 _NULLGUI_H_
00021 #define _NULLGUI_H_
00022 
00023 #ifdef HAVE_CONFIG_H
00024 #include "gnashconfig.h"
00025 #endif
00026 
00027 #include "gui.h"
00028 
00029 namespace gnash
00030 {
00031 
00033 class NullGui : public Gui {
00034 
00035 public: 
00036 
00037         NullGui(bool do_loop, RunResources& r)
00038                 :
00039                 Gui(0,0,do_loop, r),
00040                 _timeout(0),
00041                 _quit(false)
00042         {}
00043 
00044         ~NullGui() {}
00045         void setInterval(unsigned int interval)
00046         {
00047                 _interval=interval;
00048         }
00049         void setTimeout(unsigned int to)
00050         {
00051                 _timeout=to;
00052         }
00053         bool init(int, char ***) { return true; }
00054         bool createWindow(const char* /*title*/, int /*width*/, int /*height*/,
00055                           int /*yPosition*/, int /*xPosition*/)
00056         {
00057                 return true;
00058         }
00059         bool run();
00060         bool createMenu()  { return true; }
00061         bool setupEvents()  { return true; }
00062         void renderBuffer()  { }
00063 
00064         void quitUI() { _quit = true; }
00065 
00066 private:
00067 
00069         unsigned int _timeout;
00070 
00072         bool _quit;
00073 };
00074 
00075 } // end of gnash namespace
00076 
00077 // end of _NULLGUI_H_
00078 #endif

Generated on Fri Mar 16 2012 15:46:11 for Gnash by  doxygen 1.7.1