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 
virtual void setFullscreen()
Definition: haiku.cpp:506
virtual bool createMenuBar()
Definition: haiku.cpp:492
virtual void resize_view(int width, int height)
Definition: haiku.cpp:572
virtual bool createMenu()
Definition: haiku.cpp:485
virtual bool setupEvents()
Definition: haiku.cpp:499
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
void Hidden()
Definition: haiku.cpp:586
virtual void setFullscreenEtc()
Definition: haiku.cpp:513
virtual bool init(int argc, char **argv[])
/ Initialise the gui and the associated renderer.
Definition: haiku.cpp:364
virtual void error(const std::string &msg)
Handle error message from the core.
Definition: haiku.cpp:460
Definition: klash_part.cpp:329
unsigned int getInterval()
Definition: haiku.cpp:566
virtual void setInterval(unsigned int interval)
Set main loop delay in milliseconds.
Definition: haiku.cpp:447
Parent class from which all GUI implementations will depend.
Definition: gui.h:88
Definition: GnashKey.h:164
HaikuGui(unsigned long xid, float scale, bool loop, RunResources &r)
Definition: haiku.cpp:349
void GnashPulse()
Definition: haiku.cpp:554
virtual ~HaikuGui()
Definition: haiku.cpp:356
Definition: haiku_agg_glue.h:48
Definition: klash_part.cpp:329
virtual void setTimeout(unsigned int timeout)
Set the time in milliseconds after which the programme should exit.
Definition: haiku.cpp:453
virtual void renderBuffer()
Definition: haiku.cpp:441
Class to group together per-run and external resources for Gnash.
Definition: RunResources.h:53
virtual void unsetFullscreen()
Definition: haiku.cpp:532
Definition: haikusup.h:46
virtual bool run()
Start main rendering loop.
Definition: haiku.cpp:433
virtual bool yesno(const std::string &question)
Prompt user with a question she can answer with yes/no.
Definition: haiku.cpp:469
void init_dumpfile()
void Shown()
Definition: haiku.cpp:580
void setInvalidatedRegions(const InvalidatedRanges &ranges)
Definition: haiku.cpp:479
virtual void unsetFullscreenEtc()
Definition: haiku.cpp:539
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