Gnash  0.8.11dev
kde_glue.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 #ifdef HAVE_CONFIG_H
20 #include "gnashconfig.h"
21 #endif
22 
23 #if GNASH_QT_VERSION == 4
24 # include <Qt/qwidget.h>
25 #else
26 # include <qwidget.h>
27 #endif
28 #include "snappingrange.h"
29 
30 namespace gnash {
31 
32 class Renderer;
33 class KdeGlue
34 {
35  public:
36  KdeGlue() : _drawing_area(NULL) {}
37  virtual ~KdeGlue() { }
38  virtual bool init(int argc, char **argv[]) = 0;
39 
40  virtual void prepDrawingArea(QWidget *drawing_area) = 0;
41  virtual Renderer* createRenderHandler() = 0;
42  virtual void render() = 0;
43  virtual void setInvalidatedRegions(const InvalidatedRanges& /* ranges */) {}
44  virtual void resize(int, int) {}
45  virtual void initBuffer(int, int) {}
46  protected:
47  QWidget *_drawing_area;
48 };
49 
50 } // namespace gnash
gnash::geometry::SnappingRanges2d< std::int32_t >
gnash::gnash_cursor_type
gnash_cursor_type
Enumerates mouse cursor types.
Definition: gui.h:81
gnash::key::GNASH_MOD_CONTROL
@ GNASH_MOD_CONTROL
Definition: GnashKey.h:37
gnash::geometry::Range2d< int >
position
@ position
Definition: klash_part.cpp:329
gnash::key::DOWN
@ DOWN
Definition: GnashKey.h:207
gnash::Gui::_renderer
std::shared_ptr< Renderer > _renderer
The handler which is called to update the client area of our window.
Definition: gui.h:506
gnash::key::BACKSPACE
@ BACKSPACE
Definition: GnashKey.h:53
gnash::CURSOR_INPUT
@ CURSOR_INPUT
Definition: gui.h:84
gnash::KdeGlue::setInvalidatedRegions
virtual void setInvalidatedRegions(const InvalidatedRanges &)
Definition: kde_glue.h:43
gnash::qwidget::paintEvent
void paintEvent(QPaintEvent *event)
Definition: kde.cpp:485
height
@ height
Definition: klash_part.cpp:329
gnash::KdeGui::setInvalidatedRegions
void setInvalidatedRegions(const InvalidatedRanges &ranges)
Definition: kde.cpp:130
gnash::KdeGlue::_drawing_area
QWidget * _drawing_area
Definition: kde_glue.h:47
gnash::KdeGui::resize
void resize(int width, int height)
Definition: kde.cpp:328
gnash::qwidget::keyReleaseEvent
void keyReleaseEvent(QKeyEvent *event)
Definition: kde.cpp:473
gnash::qwidget
Definition: kdesup.h:54
gnash::key::i
@ i
Definition: GnashKey.h:155
kdesup.h
gnash::KdeGui::handleKeyEvent
virtual void handleKeyEvent(QKeyEvent *event, bool down)
Definition: kde.cpp:320
gnash::pixelsToTwips
std::int32_t pixelsToTwips(double a)
Definition: GnashNumeric.h:144
_
#define _(String)
Definition: log.h:44
gnash::qwidget::menuitem_pause_callback
void menuitem_pause_callback()
toggle that's playing or paused.
Definition: kde.cpp:381
gnash::key::modifier
modifier
Definition: GnashKey.h:34
gnash::qwidget::mousePressEvent
void mousePressEvent(QMouseEvent *event)
Definition: kde.cpp:454
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::KdeGlue::initBuffer
virtual void initBuffer(int, int)
Definition: kde_glue.h:45
gnash::key::DELETEKEY
@ DELETEKEY
Definition: GnashKey.h:177
gnash::key::CONTROL
@ CONTROL
Definition: GnashKey.h:62
gnash::key::CAPSLOCK
@ CAPSLOCK
Definition: GnashKey.h:65
gnash::KdeGui::setInterval
virtual void setInterval(unsigned int interval)
Set main loop delay in milliseconds.
Definition: kde.cpp:143
gnash::key::F1
@ F1
Definition: GnashKey.h:190
gnash::KdeGui::createMenu
virtual bool createMenu()
Definition: kde.cpp:182
gnash::KdeGlue::~KdeGlue
virtual ~KdeGlue()
Definition: kde_glue.h:37
gnash::KdeGlue::prepDrawingArea
virtual void prepDrawingArea(QWidget *drawing_area)=0
gnash::Renderer
Base class for render handlers.
Definition: Renderer.h:189
gnash::KdeGui::renderBuffer
virtual void renderBuffer()
Definition: kde.cpp:122
gnash::key::GNASH_MOD_NONE
@ GNASH_MOD_NONE
Definition: GnashKey.h:35
gnash::KdeGui::setTimeout
virtual void setTimeout(unsigned int timeout)
Set the time in milliseconds after which the programme should exit.
Definition: kde.cpp:136
gnash::qwidget::menuitem_quit_callback
void menuitem_quit_callback()
quit complete, and close the application
Definition: kde.cpp:365
gnash::qwidget::menuitem_restart_callback
void menuitem_restart_callback()
restart the movie from the beginning
Definition: kde.cpp:349
gnash::Gui::pause
void pause()
Toggle between "stop" and "play" mode.
Definition: gui.cpp:875
gnash::key::KP_0
@ KP_0
Definition: GnashKey.h:179
gnash::key::PGUP
@ PGUP
Definition: GnashKey.h:213
gnash::Gui::_runResources
RunResources & _runResources
Per-run resources.
Definition: gui.h:500
gnash::RunResources::setRenderer
void setRenderer(std::shared_ptr< Renderer > r)
Definition: RunResources.h:108
gnash::key::LEFT
@ LEFT
Definition: GnashKey.h:209
gnash::qwidget::timerEvent
void timerEvent(QTimerEvent *)
Definition: kde.cpp:440
gnash::key::RIGHT
@ RIGHT
Definition: GnashKey.h:208
gnash::key::COLON
@ COLON
Definition: GnashKey.h:105
gnash::Gui::notifyMouseClick
void notifyMouseClick(bool mouse_pressed)
Mouse notification callback to be called when the mouse is clicked.
Definition: gui.cpp:531
gnash::Gui::refreshView
void refreshView()
Definition: gui.cpp:547
gnash::KdeGlue
Definition: kde_glue.h:34
gnash::KdeGui::init
virtual bool init(int argc, char **argv[])
/ Initialise the gui and the associated renderer.
Definition: kde.cpp:66
gnash::key::r
@ r
Definition: GnashKey.h:164
gnash::KdeGlue::createRenderHandler
virtual Renderer * createRenderHandler()=0
gnash::key::GNASH_MOD_SHIFT
@ GNASH_MOD_SHIFT
Definition: GnashKey.h:36
gnash::key::INSERT
@ INSERT
Definition: GnashKey.h:210
gnash::key::ALT
@ ALT
Definition: GnashKey.h:63
gnash::key::PGDN
@ PGDN
Definition: GnashKey.h:214
gnash::key::END
@ END
Definition: GnashKey.h:212
gnash::key::code
code
Definition: GnashKey.h:44
gnash::key::_0
@ _0
Definition: GnashKey.h:94
gnash::key::ENTER
@ ENTER
Definition: GnashKey.h:58
gnash::KdeGui
Definition: kdesup.h:85
gnash::Gui::notifyMouseMove
void notifyMouseMove(int x, int y)
Mouse notification callback to be called when the mouse is moved.
Definition: gui.cpp:469
gnash::qwidget::mouseMoveEvent
void mouseMoveEvent(QMouseEvent *event)
Definition: kde.cpp:402
gnash::Gui::_width
int _width
Desired window width.
Definition: gui.h:494
gnash::qwidget::resizeEvent
void resizeEvent(QResizeEvent *event)
Definition: kde.cpp:479
gnash::key::TAB
@ TAB
Definition: GnashKey.h:54
gnash::qwidget::keyPressEvent
void keyPressEvent(QKeyEvent *event)
Definition: kde.cpp:467
gnash::qwidget::menuitem_refresh_callback
void menuitem_refresh_callback()
force redraw of current frame
Definition: kde.cpp:357
gnash::Gui::advance_movie
static bool advance_movie(Gui *gui)
Convenience static wrapper around advanceMovie for callbacks happiness.
Definition: gui.h:272
gnash::key::CLEAR
@ CLEAR
Definition: GnashKey.h:57
gnash::key::INVALID
@ INVALID
Definition: GnashKey.h:45
gnash::key::SHIFT
@ SHIFT
Definition: GnashKey.h:61
gnash::KdeGlue::init
virtual bool init(int argc, char **argv[])=0
gnash::KdeGlue::KdeGlue
KdeGlue()
Definition: kde_glue.h:36
gnash::KdeGui::createWindow
virtual bool createWindow(const char *windowtitle, int width, int height, int xPosition=0, int yPosition=0)
Create and display our window.
Definition: kde.cpp:83
gnash::key::UP
@ UP
Definition: GnashKey.h:206
gnash::key::HOME
@ HOME
Definition: GnashKey.h:211
GnashNumeric.h
gnash::Gui::resize_view
void resize_view(int width, int height)
Resize the client area view and the window accordingly.
Definition: gui.cpp:429
gnash::RunResources
Class to group together per-run and external resources for Gnash.
Definition: RunResources.h:54
gnash::Gui::play
void play()
Put the application in "play" mode.
Definition: gui.cpp:830
gnash::KdeGlue::resize
virtual void resize(int, int)
Definition: kde_glue.h:44
gnash::Gui::quit
void quit()
Always called on exit.
Definition: gui.cpp:215
gnash::CURSOR_HAND
@ CURSOR_HAND
Definition: gui.h:82
gnash::KdeGlue::render
virtual void render()=0
log.h
gnash::geometry::SnappingRanges2d::add
void add(const RangeType &range)
Add a Range to the set, merging when possible and appropriate.
Definition: snappingrange.h:250
gnash::Gui::restart
void restart()
Definition: gui.cpp:269
gnash::qwidget::setInterval
void setInterval(unsigned int interval)
Definition: kde.cpp:433
gnash::key::ESCAPE
@ ESCAPE
Definition: GnashKey.h:72
gnashconfig.h
RunResources.h
gnash::Gui::_xid
unsigned long _xid
The X Window ID to attach to. If zero, we create a new window.
Definition: gui.h:486
gnash::key::c
@ c
Definition: GnashKey.h:149
gnash::qwidget::mouseReleaseEvent
void mouseReleaseEvent(QMouseEvent *)
Definition: kde.cpp:461
gnash::KdeGui::setCursor
virtual void setCursor(gnash_cursor_type newcursor)
Sets the current mouse cursor for the Gui window.
Definition: kde.cpp:150
movie_definition.h
gui.h
gnash::key::GNASH_MOD_ALT
@ GNASH_MOD_ALT
Definition: GnashKey.h:38
gnash::key::NOBREAKSPACE
@ NOBREAKSPACE
Definition: GnashKey.h:227
gnash::KdeGui::quitUI
void quitUI()
End main rendering loop calling GUI-specific exit functions.
Definition: kde.cpp:335
gnash::KdeGui::run
virtual bool run()
Start main rendering loop.
Definition: kde.cpp:173
gnash::key::SPACE
@ SPACE
Definition: GnashKey.h:77
gnash::Gui::notify_key_event
void notify_key_event(gnash::key::code k, int modifier, bool pressed)
Key event notification to be called when a key is pressed or depressed.
Definition: gui.cpp:560
width
@ width
Definition: klash_part.cpp:329
gnash::key::HELP
@ HELP
Definition: GnashKey.h:325
gnash::qwidget::menuitem_play_callback
void menuitem_play_callback()
Start the movie playing from the current frame.
Definition: kde.cpp:373
gnash::qwidget::menuitem_stop_callback
void menuitem_stop_callback()
stop the movie that's playing.
Definition: kde.cpp:389
snappingrange.h
gnash::KdeGui::setupEvents
virtual bool setupEvents()
Definition: kde.cpp:190
gnash::Gui::_height
int _height
Desired window height.
Definition: gui.h:497
Range2d.h
gnash::qwidget::qwidget
qwidget(KdeGui *godfather)
Definition: kde.cpp:411
gnash::Gui::stop
void stop()
Put the application in "stop" mode.
Definition: gui.cpp:853
gnash::key::NUM_LOCK
@ NUM_LOCK
Definition: GnashKey.h:223