Gnash  0.8.11dev
haikusup.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010,
3 // 2011 Free Software Foundation, Inc.
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 
20 #ifndef HAIKUGUI_H
21 #define HAIKUGUI_H
22 
23 #ifdef HAVE_CONFIG_H
24 #include "gnashconfig.h"
25 #endif
26 
27 #include "gui.h"
28 
29 #ifndef RENDERER_AGG
30 #error "Haiku GUI needs AGG renderer"
31 #endif
32 
33 #include "haiku_agg_glue.h"
34 
35 #include <string>
36 
37 #include "OS.h"
38 
39 
40 namespace gnash
41 {
42 class BeApp;
43 
44 
45 
46 class HaikuGui : public Gui
47 {
48  BeApp *_app;
49 #ifdef RENDERER_AGG
50  HaikuAggGlue _glue;
51 #endif
52  unsigned int _timeout;
53  std::string _sharefilename;
54 public:
55  HaikuGui(unsigned long xid, float scale, bool loop, RunResources& r);
56  virtual ~HaikuGui();
57 
58  virtual bool init(int argc, char **argv[]);
59  void init_dumpfile();
60  virtual bool createWindow(const char *title, int width, int height,
61  int xPosition = 0, int yPosition = 0);
62  virtual bool run();
63  virtual bool createMenu();
64  virtual bool createMenuBar();
65  virtual bool setupEvents();
66  virtual void setFullscreen();
67  virtual void unsetFullscreen();
68  virtual void setFullscreenEtc();
69  virtual void unsetFullscreenEtc();
70  virtual void renderBuffer();
71  virtual void setInterval(unsigned int interval);
72  virtual void setTimeout(unsigned int timeout);
73  virtual void error(const std::string &msg);
74  virtual bool yesno(const std::string &question);
75 
76  void GnashPulse();
77  unsigned int getInterval();
78  virtual void resize_view(int width, int height);
79  void Shown();
80  void Hidden();
81 
82  void setInvalidatedRegions(const InvalidatedRanges& ranges);
83 };
84 
85 
86 };
87 
88 #endif
89 
gnash::geometry::SnappingRanges2d< std::int32_t >
height
@ height
Definition: klash_part.cpp:329
gnash::HaikuGui::Hidden
void Hidden()
Definition: haiku.cpp:586
gnash::HaikuGui::init
virtual bool init(int argc, char **argv[])
/ Initialise the gui and the associated renderer.
Definition: haiku.cpp:364
gnash::HaikuGui::createMenu
virtual bool createMenu()
Definition: haiku.cpp:485
gnash::HaikuGui::createMenuBar
virtual bool createMenuBar()
Definition: haiku.cpp:492
gnash
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
gnash::Gui
Parent class from which all GUI implementations will depend.
Definition: gui.h:88
gnash::HaikuGui::setInterval
virtual void setInterval(unsigned int interval)
Set main loop delay in milliseconds.
Definition: haiku.cpp:447
gnash::HaikuGui::setupEvents
virtual bool setupEvents()
Definition: haiku.cpp:499
gnash::HaikuGui::resize_view
virtual void resize_view(int width, int height)
Definition: haiku.cpp:572
gnash::HaikuGui::getInterval
unsigned int getInterval()
Definition: haiku.cpp:566
gnash::HaikuGui::HaikuGui
HaikuGui(unsigned long xid, float scale, bool loop, RunResources &r)
Definition: haiku.cpp:349
gnash::HaikuGui::GnashPulse
void GnashPulse()
Definition: haiku.cpp:554
gnash::HaikuGui::unsetFullscreen
virtual void unsetFullscreen()
Definition: haiku.cpp:532
gnash::key::r
@ r
Definition: GnashKey.h:164
gnash::HaikuGui::setFullscreenEtc
virtual void setFullscreenEtc()
Definition: haiku.cpp:513
gnash::HaikuGui::renderBuffer
virtual void renderBuffer()
Definition: haiku.cpp:441
gnash::HaikuGui::error
virtual void error(const std::string &msg)
Handle error message from the core.
Definition: haiku.cpp:460
gnash::HaikuGui::run
virtual bool run()
Start main rendering loop.
Definition: haiku.cpp:433
gnash::HaikuGui::~HaikuGui
virtual ~HaikuGui()
Definition: haiku.cpp:356
gnash::HaikuAggGlue
Definition: haiku_agg_glue.h:49
gnash::HaikuGui::setTimeout
virtual void setTimeout(unsigned int timeout)
Set the time in milliseconds after which the programme should exit.
Definition: haiku.cpp:453
gnash::HaikuGui::init_dumpfile
void init_dumpfile()
gnash::RunResources
Class to group together per-run and external resources for Gnash.
Definition: RunResources.h:54
gnash::HaikuGui::setInvalidatedRegions
void setInvalidatedRegions(const InvalidatedRanges &ranges)
Definition: haiku.cpp:479
gnash::HaikuGui::unsetFullscreenEtc
virtual void unsetFullscreenEtc()
Definition: haiku.cpp:539
gnash::HaikuGui
Definition: haikusup.h:47
gnash::HaikuGui::Shown
void Shown()
Definition: haiku.cpp:580
gnashconfig.h
haiku_agg_glue.h
gnash::HaikuGui::yesno
virtual bool yesno(const std::string &question)
Prompt user with a question she can answer with yes/no.
Definition: haiku.cpp:469
gui.h
gnash::HaikuGui::setFullscreen
virtual void setFullscreen()
Definition: haiku.cpp:506
width
@ width
Definition: klash_part.cpp:329
gnash::HaikuGui::createWindow
virtual bool createWindow(const char *title, int width, int height, int xPosition=0, int yPosition=0)
Create and display our window.
Definition: haiku.cpp:403