diff -aurwbB --exclude='*.m4' --exclude='*.in' --exclude='config*' --exclude=ltdl.c orig/gnash-0.8.2/gui/gnash.cpp gnash-0.8.2/gui/gnash.cpp --- orig/gnash-0.8.2/gui/gnash.cpp 2008-03-03 23:15:11.000000000 +0000 +++ gnash-0.8.2/gui/gnash.cpp 2008-06-30 17:06:44.000000000 +0100 @@ -124,8 +124,11 @@ " -vp Be (very) verbose about parsing\n" " -va Be (very) verbose about action execution\n" " -w Produce the disk based debug log\n" + " -B Borderless window (no close button, no borders etc.)\n" " -j Set window width\n" " -k Set window height\n" + " -X Set window x position\n" + " -Y Set window y position\n" " -1 Play once; exit when/if movie reaches the last frame\n" ), _( " -g Turn on the Flash debugger\n" @@ -228,7 +231,7 @@ } } - while ((c = getopt (argc, argv, "hvaps:cd:x:r:t:b:1wj:k:u:P:U:gVf:F:")) != -1) + while ((c = getopt (argc, argv, "hvaps:cd:x:r:t:b:1wj:k:u:P:U:gVf:F:X:Y:B")) != -1) { switch (c) { // case 'c' (Disable SDL core dumps) is decoded in sdl.cpp:init() @@ -290,6 +293,18 @@ player.setHostFD ( fd ); break; } + case 'B': + player.set_borderless(true); + log_debug (_("Setting borderless mode")); + break; + case 'Y': + player.setY ( strtol(optarg, NULL, 0) ); + log_debug (_("Setting y pos to " SIZET_FMT), player.getY()); + break; + case 'X': + player.setX ( strtol(optarg, NULL, 0) ); + log_debug (_("Setting x pos to " SIZET_FMT), player.getX()); + break; case 'j': width_given = true; player.setWidth ( strtol(optarg, NULL, 0) ); diff -aurwbB --exclude='*.m4' --exclude='*.in' --exclude='config*' --exclude=ltdl.c orig/gnash-0.8.2/gui/gui.h gnash-0.8.2/gui/gui.h --- orig/gnash-0.8.2/gui/gui.h 2008-01-21 20:55:42.000000000 +0000 +++ gnash-0.8.2/gui/gui.h 2008-06-30 16:56:05.000000000 +0100 @@ -91,6 +91,14 @@ */ virtual bool createWindow(const char* title, int width, int height) = 0; + /** \brief + * Move the window on screen + * + * @param x The desired window x position in pixels. + * @param y The desired window y position in pixels. + */ + virtual void moveWindow(int x, int y) { } + /// Start main rendering loop. virtual bool run() = 0; @@ -364,6 +372,12 @@ // True if Gnash is running in fullscreen bool _fullscreen; + /// Called by Gui::stop(). This can be used by GUIs to implement pause + /// widgets (so that resuming a stopped animation is more user-friendly) + virtual void stopHook() {} + /// Called by Gui::play(). + virtual void playHook() {} + private: bool display(movie_root* m); @@ -423,7 +437,7 @@ /// Named constructors std::auto_ptr createGTKGui(unsigned long xid, float scale, bool loop, unsigned int depth); -std::auto_ptr createKDEGui(unsigned long xid, float scale, bool loop, unsigned int depth); +std::auto_ptr createKDEGui(unsigned long xid, float scale, bool loop, unsigned int depth, bool borderless); std::auto_ptr createSDLGui(unsigned long xid, float scale, bool loop, unsigned int depth); std::auto_ptr createFLTKGui(unsigned long xid, float scale, bool loop, unsigned int depth); std::auto_ptr createFBGui(unsigned long xid, float scale, bool loop, unsigned int depth); Only in gnash-0.8.2/gui: .gui.h.swp diff -aurwbB --exclude='*.m4' --exclude='*.in' --exclude='config*' --exclude=ltdl.c orig/gnash-0.8.2/gui/gui_kde.cpp gnash-0.8.2/gui/gui_kde.cpp --- orig/gnash-0.8.2/gui/gui_kde.cpp 2008-01-21 20:55:41.000000000 +0000 +++ gnash-0.8.2/gui/gui_kde.cpp 2008-06-30 16:55:07.000000000 +0100 @@ -32,12 +32,14 @@ namespace gnash { #ifdef GUI_KDE -std::auto_ptr createKDEGui(unsigned long windowid, float scale, bool do_loop, unsigned int bit_depth) +std::auto_ptr createKDEGui(unsigned long windowid, float scale, bool do_loop, unsigned int bit_depth, bool borderless) { - return std::auto_ptr(new KdeGui(windowid, scale, do_loop, bit_depth)); + return std::auto_ptr(new KdeGui(windowid, scale, do_loop, bit_depth, + borderless)); } #else // ! GUI_KDE -std::auto_ptr createKDEGui(unsigned long , float , bool , unsigned int ) +std::auto_ptr createKDEGui(unsigned long , float , bool , unsigned int, + bool); { throw GnashException("Support for KDE gui was not compiled in"); } Only in gnash-0.8.2/gui: .gui_kde.cpp.swp Only in gnash-0.8.2/gui: Info.plist diff -aurwbB --exclude='*.m4' --exclude='*.in' --exclude='config*' --exclude=ltdl.c orig/gnash-0.8.2/gui/kde.cpp gnash-0.8.2/gui/kde.cpp --- orig/gnash-0.8.2/gui/kde.cpp 2008-02-06 13:51:07.000000000 +0000 +++ gnash-0.8.2/gui/kde.cpp 2008-06-30 17:09:46.000000000 +0100 @@ -39,6 +39,7 @@ #include "gnash.h" #include "movie_definition.h" #include "log.h" +#include #include "gui.h" #include "kdesup.h" @@ -55,8 +56,10 @@ } -KdeGui::KdeGui(unsigned long xid, float scale, bool loop, unsigned int depth) - : Gui(xid, scale, loop, depth) +KdeGui::KdeGui(unsigned long xid, float scale, bool loop, unsigned int depth, + bool borderless) + : Gui(xid, scale, loop, depth), + no_border(borderless) { } @@ -66,6 +69,7 @@ // GNASH_REPORT_FUNCTION; _qapp.reset(new QApplication(argc, *argv)); _qwidget.reset(new qwidget(this)); + /*_qwidget.setWFlags( Qt::WStyle_Customize | Qt::WStyle_NoBorder);*/ #ifdef HAVE_KDE if (_xid) { QXEmbed::initialize(); @@ -105,6 +109,12 @@ } void +KdeGui::moveWindow(int x, int y) +{ + _qwidget->move(x, y); +} + +void KdeGui::renderBuffer() { // GNASH_REPORT_FUNCTION; @@ -429,8 +439,12 @@ _godfather->notify_mouse_moved(newX, newY); } -qwidget::qwidget(KdeGui* godfather) +qwidget::qwidget(KdeGui* godfather): + WIDGETCLASS(0, 0, (godfather && godfather->no_border)?Qt::WStyle_Customize | Qt::WStyle_NoBorder : 0) { + if (godfather && godfather->no_border) + KWin::setState( winId(), NET::StaysOnTop ); + _qmenu.insertItem(_("Play Movie"), this, SLOT(menuitem_play_callback())); _qmenu.insertItem(_("Pause Movie"), this, SLOT(menuitem_pause_callback())); _qmenu.insertItem(_("Stop Movie"), this, SLOT(menuitem_stop_callback())); Only in gnash-0.8.2/gui: .kde.cpp.swp Only in gnash-0.8.2/gui: kde-gnash Only in gnash-0.8.2/gui: kde_gnash-gnash.o Only in gnash-0.8.2/gui: kde_gnash-gui_kde.o Only in gnash-0.8.2/gui: kde_gnash-gui.o Only in gnash-0.8.2/gui: kde_gnash-kde_glue_agg.o Only in gnash-0.8.2/gui: kde_gnash-kde.o Only in gnash-0.8.2/gui: kde_gnash-NullGui.o Only in gnash-0.8.2/gui: kde_gnash-Player.o diff -aurwbB --exclude='*.m4' --exclude='*.in' --exclude='config*' --exclude=ltdl.c orig/gnash-0.8.2/gui/kdesup.h gnash-0.8.2/gui/kdesup.h --- orig/gnash-0.8.2/gui/kdesup.h 2008-02-06 13:51:07.000000000 +0000 +++ gnash-0.8.2/gui/kdesup.h 2008-06-30 17:00:03.000000000 +0100 @@ -89,10 +89,12 @@ { public: - KdeGui(unsigned long xid, float scale, bool loop, unsigned int depth); + KdeGui(unsigned long xid, float scale, bool loop, unsigned int depth, + bool borderless); virtual ~KdeGui(); virtual bool init(int argc, char **argv[]); virtual bool createWindow(const char* windowtitle, int width, int height); + virtual void moveWindow(int x, int y); virtual bool run(); virtual bool createMenu(); virtual bool setupEvents(); @@ -104,7 +106,10 @@ void setInvalidatedRegions(const InvalidatedRanges& ranges); void resize(int width, int height); void quit(); + bool no_border; + private: + std::auto_ptr _qapp; std::auto_ptr _qwidget; GLUE _glue; Only in gnash-0.8.2/gui: .kdesup.h.swp Only in gnash-0.8.2/gui: klash.moc Only in gnash-0.8.2/gui: .libs Only in gnash-0.8.2/gui: Makefile diff -aurwbB --exclude='*.m4' --exclude='*.in' --exclude='config*' --exclude=ltdl.c orig/gnash-0.8.2/gui/Player.cpp gnash-0.8.2/gui/Player.cpp --- orig/gnash-0.8.2/gui/Player.cpp 2008-02-19 19:20:49.000000000 +0000 +++ gnash-0.8.2/gui/Player.cpp 2008-06-30 17:04:58.000000000 +0100 @@ -76,10 +76,13 @@ #endif scale(1.0f), delay(0), + xpos(0), + ypos(0), width(0), height(0), windowid(0), do_loop(true), + borderless(false), do_render(true), do_sound(true), exit_timeout(0), @@ -353,6 +356,8 @@ // Now that we know about movie size, create gui window. _gui->createWindow(_url.c_str(), width, height); + log_debug(_("moving to " SIZET_FMT "x" SIZET_FMT "."), getX(), getY()); + _gui->moveWindow(getX(), getY()); SystemClock clock; // use system clock here... movie_root& root = VM::init(*_movie_def, clock).getRoot(); @@ -404,7 +409,7 @@ #endif #ifdef GUI_KDE - return createKDEGui(windowid, scale, do_loop, bit_depth); + return createKDEGui(windowid, scale, do_loop, bit_depth, borderless); #endif #ifdef GUI_SDL Only in gnash-0.8.2/gui: .Player.cpp.swp diff -aurwbB --exclude='*.m4' --exclude='*.in' --exclude='config*' --exclude=ltdl.c orig/gnash-0.8.2/gui/Player.h gnash-0.8.2/gui/Player.h --- orig/gnash-0.8.2/gui/Player.h 2008-01-30 14:51:47.000000000 +0000 +++ gnash-0.8.2/gui/Player.h 2008-06-30 17:07:06.000000000 +0100 @@ -95,6 +95,14 @@ } #endif // def GNASH_FPS_DEBUG + void set_borderless(bool b) { borderless=b; } + + void setY(size_t y) { ypos=y; } + size_t getY() { return ypos; } + + void setX(size_t x) { xpos=x; } + size_t getX() { return xpos; } + void setWidth(size_t w) { width=w; } size_t getWidth() { return width; } @@ -170,12 +178,19 @@ unsigned int delay; + size_t xpos; + + size_t ypos; + size_t width; size_t height; unsigned long windowid; + // window should not have a border, or "close" button - nothing. + bool borderless; + bool do_loop; bool do_render;