Gnash  0.8.10
NullGui.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 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 
00046     void setInterval(unsigned int interval) {
00047                 _interval=interval;
00048         }
00049 
00050         void setTimeout(unsigned int to) {
00051                 _timeout=to;
00052         }
00053 
00054         bool init(int, char ***) { return true; }
00055         
00056     bool createWindow(const char* /*title*/, int /*width*/, int /*height*/,
00057                           int /*yPosition*/, int /*xPosition*/) {
00058                 return true;
00059         }
00060 
00061         bool run();
00062         bool createMenu() { return true; }
00063         bool setupEvents() { return true; }
00064         void renderBuffer() { }
00065 
00066         void quitUI() { _quit = true; }
00067 
00068 private:
00069 
00071         unsigned int _timeout;
00072 
00074         bool _quit;
00075 };
00076 
00077 } // namespace gnash
00078 
00079 #endif