[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog plugin/klash/Makefile.am plugin...
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] gnash ChangeLog plugin/klash/Makefile.am plugin... |
Date: |
Wed, 17 Jan 2007 12:16:29 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Bastiaan Jacques <bjacques> 07/01/17 12:16:28
Modified files:
. : ChangeLog
plugin/klash : Makefile.am klash_part.cpp
gui : Makefile.am kde.cpp kdesup.h
Log message:
* gui/Makefile.am: Stop calling the KDE GUI executable Klash;
use
gnash instead.
* gui/kde{.cpp, sup.h}: Make a new class named qwidget derived
from
QGLWidget. This allows us to create the QApplication before
instantiating an object derived from QWidget, thereby fulfilling
QT requirements. And, this way, we can also pass it argv and
argc.
* plugin/klash/Makefile.am: Stop building the klash binary. The
klash
code is obsolete and hasn't compiled for a while.
* plugin/klash/klash_part.cpp: Use the gnash binary instead of
klash.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2122&r2=1.2123
http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/klash/Makefile.am?cvsroot=gnash&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/klash/klash_part.cpp?cvsroot=gnash&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Makefile.am?cvsroot=gnash&r1=1.56&r2=1.57
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/kde.cpp?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/kdesup.h?cvsroot=gnash&r1=1.10&r2=1.11
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2122
retrieving revision 1.2123
diff -u -b -r1.2122 -r1.2123
--- ChangeLog 17 Jan 2007 11:50:12 -0000 1.2122
+++ ChangeLog 17 Jan 2007 12:16:28 -0000 1.2123
@@ -1,3 +1,15 @@
+2007-01-17 Bastiaan Jacques <address@hidden>
+
+ * gui/Makefile.am: Stop calling the KDE GUI executable Klash; use
+ gnash instead.
+ * gui/kde{.cpp, sup.h}: Make a new class named qwidget derived from
+ QGLWidget. This allows us to create the QApplication before
+ instantiating an object derived from QWidget, thereby fulfilling
+ QT requirements. And, this way, we can also pass it argv and argc.
+ * plugin/klash/Makefile.am: Stop building the klash binary. The klash
+ code is obsolete and hasn't compiled for a while.
+ * plugin/klash/klash_part.cpp: Use the gnash binary instead of klash.
+
2007-01-17 Sandro Santilli <address@hidden>
* backend/Makefile.am, libbase/Makefile.am:
Index: plugin/klash/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/plugin/klash/Makefile.am,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- plugin/klash/Makefile.am 5 Dec 2006 19:49:00 -0000 1.21
+++ plugin/klash/Makefile.am 17 Jan 2007 12:16:28 -0000 1.22
@@ -17,7 +17,7 @@
#
-# $Id: Makefile.am,v 1.21 2006/12/05 19:49:00 strk Exp $
+# $Id: Makefile.am,v 1.22 2007/01/17 12:16:28 bjacques Exp $
AUTOMAKE_OPTIONS =
@@ -65,7 +65,7 @@
$(XGETTEXT) *.cpp -o $(podir)/klash.pot
if KLASH
-bin_PROGRAMS = klash
+#bin_PROGRAMS = klash
klash_SOURCES = klash.cpp
klash_CPPFLAGS = \
Index: plugin/klash/klash_part.cpp
===================================================================
RCS file: /sources/gnash/gnash/plugin/klash/klash_part.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- plugin/klash/klash_part.cpp 29 Oct 2006 18:34:17 -0000 1.8
+++ plugin/klash/klash_part.cpp 17 Jan 2007 12:16:28 -0000 1.9
@@ -166,7 +166,7 @@
if (m_width > 0 && m_height > 0)
dim = QString ("-j ") + QString::number (m_width) +
QString (" -k ") + QString::number (m_height);
- QString cmd = QString ("klash -x ") +
+ QString cmd = QString ("gnash -x ") +
QString::number (static_cast <KlashView *> (widget ())->embedId()) +
QChar (' ') + dim +
QChar (' ') + KProcess::quote (m_src_url);
Index: gui/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/gui/Makefile.am,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -b -r1.56 -r1.57
--- gui/Makefile.am 16 Jan 2007 14:02:45 -0000 1.56
+++ gui/Makefile.am 17 Jan 2007 12:16:28 -0000 1.57
@@ -17,7 +17,7 @@
#
-# $Id: Makefile.am,v 1.56 2007/01/16 14:02:45 bjacques Exp $
+# $Id: Makefile.am,v 1.57 2007/01/17 12:16:28 bjacques Exp $
AUTOMAKE_OPTIONS =
@@ -205,7 +205,7 @@
$(AM_LDFLAGS)
if USE_GUI_KDE
-bin_PROGRAMS = gnash klash
+bin_PROGRAMS = gnash # klash
else
bin_PROGRAMS = gnash
endif
@@ -240,19 +240,20 @@
$(GNASH_LIBS)
# $(LIBLTDL) "-dlopen" self "-dlopen"
-klash_SOURCES = gnash.cpp
-klash_CPPFLAGS = \
- $(KDE_INCLS) \
- -DUSE_KDE
+#klash_SOURCES = gnash.cpp
+#klash_CPPFLAGS = \
+# $(KDE_INCLS) \
+# -DUSE_KDE \
+# $(AM_CPPFLAGS)
# export our symbols so they can be used by Gnash plugins
-klash_LDFLAGS = -export-dynamic
-klash_LDADD = \
- $(LIB_KDECORE) \
- $(LIB_KDEUI) \
- $(GNASH_LIBS)
+#klash_LDFLAGS = -export-dynamic
+#klash_LDADD = \
+# $(LIB_KDECORE) \
+# $(LIB_KDEUI) \
+# $(GNASH_LIBS)
-klash_DEPENDENCIES = \
- $(GNASH_LIBS)
+#klash_DEPENDENCIES = \
+# $(GNASH_LIBS)
# $(LIBLTDL) "-dlopen" self "-dlopen"
CLEANFILES = klash.moc
Index: gui/kde.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/kde.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- gui/kde.cpp 29 Oct 2006 18:34:10 -0000 1.7
+++ gui/kde.cpp 17 Jan 2007 12:16:28 -0000 1.8
@@ -13,19 +13,20 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
//
//
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include <qapplication.h>
+
#include <qgl.h>
#include <qtimer.h>
#include <qwidget.h>
-#include <qpopupmenu.h>
+#include <qmessagebox.h>
+#include <qcursor.h>
#include "gnash.h"
#include "movie_definition.h"
@@ -40,64 +41,35 @@
using namespace std;
-// XXX ugly hack: qapp must be created before KdeGui (which inherits from
-// QGLWidget) can be created. This is a QT requirement.
-static QApplication* qapp = new QApplication (0, NULL);
-
-namespace gnash
-{
-
-KdeGui::KdeGui(WId embed)
-{
-// GNASH_REPORT_FUNCTION;
- create (embed);
- _qwidget = this;
- _qmenu = new QPopupMenu(this);
- _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()));
- _qmenu->insertItem("Restart Movie", this,
SLOT(menuitem_restart_callback()));
- _qmenu->insertItem("Step Forward", this,
SLOT(menuitem_step_forward_callback()));
- _qmenu->insertItem("Step Backward", this, SLOT(
menuitem_step_backward_callback()));
- _qmenu->insertItem("Jump Forward", this,
SLOT(menuitem_jump_forward_callback()));
- _qmenu->insertItem("Jump Backward", this,
SLOT(menuitem_jump_backward_callback()));
- _qmenu->insertItem("Quit Gnash", this, SLOT(menuitem_quit_callback()));
-
-
+namespace {
+gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
}
-void
-KdeGui::contextMenuEvent(QContextMenuEvent*)
-{
-// GNASH_REPORT_FUNCTION;
-// printf("Got Right Click!\n");
- _qmenu->exec();
-}
-
-void
-KdeGui::about()
+namespace gnash
{
-// GNASH_REPORT_FUNCTION;
- QMessageBox::about(this, "Klash", "The Gnash Flash player for KDE.\n");
-}
KdeGui::~KdeGui()
{
// GNASH_REPORT_FUNCTION;
+ delete _qwidget;
}
+
KdeGui::KdeGui(unsigned long xid, float scale, bool loop, unsigned int depth)
: Gui(xid, scale, loop, depth)
{
-// GNASH_REPORT_FUNCTION;
-}
+ GNASH_REPORT_FUNCTION;
+}
+
bool
KdeGui::init(int argc, char **argv[])
{
+ _qapp = new QApplication(argc, *argv);
+ _qwidget = new qwidget(_xid, this);
+
// GNASH_REPORT_FUNCTION;
- _qapp = qapp;
_glue.init (argc, argv);
return true;
@@ -106,11 +78,11 @@
bool
KdeGui::createWindow(const char* /*windowtitle*/, int width, int height)
{
-// GNASH_REPORT_FUNCTION;
+ GNASH_REPORT_FUNCTION;
- _qwidget = new KdeGui(_xid);
_qwidget->makeCurrent();
_qwidget->setGeometry(0, 0, width, height);
+ _qapp->setMainWidget(_qwidget);
_qwidget->show();
_glue.prepDrawingArea(_qwidget);
@@ -140,36 +112,16 @@
void
KdeGui::setInterval(unsigned int interval)
{
-// GNASH_REPORT_FUNCTION;
- _interval = interval;
-
- _timer = new QTimer(this);
- connect(_timer, SIGNAL(timeout()), this, SLOT(timer_advance_movie()));
- _timer->start(200);
-}
-
-void
-KdeGui::timer_advance_movie()
-{
-// GNASH_REPORT_FUNCTION;
- this->advance_movie(static_cast<Gui *>(this));
-}
+ GNASH_REPORT_FUNCTION;
+ _qwidget->setInterval(interval);
-void
-KdeGui::timerEvent(QTimerEvent *event)
-{
-// GNASH_REPORT_FUNCTION;
- if (event->timerId() == _timer->timerId()) {
- // advance the movie
- } else {
- QWidget::timerEvent(event);
- }
}
bool
KdeGui::run()
{
- connect(_qapp, SIGNAL(lastWindowClosed()), _qapp, SLOT(quit()));
+ GNASH_REPORT_FUNCTION;
+ // _qwidget->connect(&_qapp, SIGNAL(lastWindowClosed()), &_qapp,
SLOT(quit()));
_qapp->exec();
@@ -195,118 +147,156 @@
/// \brief restart the movie from the beginning
void
-KdeGui::menuitem_restart_callback()
+qwidget::menuitem_restart_callback()
{
// GNASH_REPORT_FUNCTION;
- menu_restart();
+ Gui::menu_restart();
}
/// \brief quit complete, and close the application
void
-KdeGui::menuitem_quit_callback()
+qwidget::menuitem_quit_callback()
{
// GNASH_REPORT_FUNCTION;
+#if 0
_qapp->closeAllWindows();
_qapp->quit();
+ #endif
+
+ exit(0);
}
/// \brief Start the movie playing from the current frame.
void
-KdeGui::menuitem_play_callback()
+qwidget::menuitem_play_callback()
{
// GNASH_REPORT_FUNCTION;
- menu_play();
+ Gui::menu_play();
}
/// \brief toggle that's playing or paused.
void
-KdeGui::menuitem_pause_callback()
+qwidget::menuitem_pause_callback()
{
// GNASH_REPORT_FUNCTION;
- menu_pause();
+ Gui::menu_pause();
}
/// \brief stop the movie that's playing.
void
-KdeGui::menuitem_stop_callback()
+qwidget::menuitem_stop_callback()
{
// GNASH_REPORT_FUNCTION;
- menu_stop();
+ Gui::menu_stop();
}
/// \brief step forward 1 frame
void
-KdeGui::menuitem_step_forward_callback()
+qwidget::menuitem_step_forward_callback()
{
// GNASH_REPORT_FUNCTION;
- menu_step_forward();
+ Gui::menu_step_forward();
}
/// \brief step backward 1 frame
void
-KdeGui::menuitem_step_backward_callback()
+qwidget::menuitem_step_backward_callback()
{
// GNASH_REPORT_FUNCTION;
- menu_step_backward();
+ Gui::menu_step_backward();
}
/// \brief jump forward 10 frames
void
-KdeGui::menuitem_jump_forward_callback()
+qwidget::menuitem_jump_forward_callback()
{
// GNASH_REPORT_FUNCTION;
- menu_jump_forward();
+ Gui::menu_jump_forward();
}
/// \brief jump backward 10 frames
void
-KdeGui::menuitem_jump_backward_callback()
+qwidget::menuitem_jump_backward_callback()
{
// GNASH_REPORT_FUNCTION;
- menu_jump_backward();
+ Gui::menu_jump_backward();
}
//
// Event handlers
//
+
+
void
-KdeGui::resizeEvent(QResizeEvent *event)
+qwidget::mouseMoveEvent(QMouseEvent *event)
{
-// GNASH_REPORT_FUNCTION;
- resize_view(int(event->size().width()), int(event->size().height()));
+ GNASH_REPORT_FUNCTION;
+ assert(_godfather);
+ QPoint position = event->pos();
+
+ _godfather->notify_mouse_moved(position.x(), position.y());
+}
+
+qwidget::qwidget(WId embed, KdeGui* godfather)
+ : QGLWidget(0, "hi")
+{
+ create (embed);
+
+ _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()));
+ _qmenu.insertItem("Restart Movie", this,
SLOT(menuitem_restart_callback()));
+ _qmenu.insertItem("Step Forward", this,
SLOT(menuitem_step_forward_callback()));
+ _qmenu.insertItem("Step Backward", this, SLOT(
menuitem_step_backward_callback()));
+ _qmenu.insertItem("Jump Forward", this,
SLOT(menuitem_jump_forward_callback()));
+ _qmenu.insertItem("Jump Backward", this,
SLOT(menuitem_jump_backward_callback()));
+ _qmenu.insertItem("Quit Gnash", this, SLOT(menuitem_quit_callback()));
+
+ _godfather = godfather;
+ setMouseTracking(true);
}
void
-KdeGui::mouseMoveEvent(QMouseEvent *event)
+qwidget::setInterval(unsigned int interval)
{
- GNASH_REPORT_FUNCTION;
-// mouseHandle(event->pos());
+ startTimer(interval);
}
void
-KdeGui::mousePressEvent(QMouseEvent *event)
+qwidget::timerEvent(QTimerEvent *)
{
- GNASH_REPORT_FUNCTION;
-// if (event->button() == QMouseEvent::LeftButton) {
-// mouseHandle( event->pos() );
-// }
+ Gui::advance_movie(_godfather);
}
void
-KdeGui::mouseHandle(const QPoint &pos)
+qwidget::contextMenuEvent(QContextMenuEvent*)
{
- GNASH_REPORT_FUNCTION;
+ _qmenu.exec(QCursor::pos());
+}
-// int i = pos2index(pos.x() );
-// int j = pos2index(pos.y() );
-// setPoint( i, j );
+void
+qwidget::mousePressEvent(QMouseEvent *event)
+{
+ _godfather->notify_mouse_clicked(true, 1);
+}
+
+void
+qwidget::mouseReleaseEvent(QMouseEvent *event)
+{
+ _godfather->notify_mouse_clicked(false, 1);
}
+void
+qwidget::resizeEvent(QResizeEvent *event)
+{
+ _godfather->resize_view(int(event->size().width()),
int(event->size().height()));
+}
// end of namespace gnash
}
+
Index: gui/kdesup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/kdesup.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- gui/kdesup.h 6 Dec 2006 10:58:34 -0000 1.10
+++ gui/kdesup.h 17 Jan 2007 12:16:28 -0000 1.11
@@ -27,17 +27,22 @@
#include "tu_config.h"
#include "gui.h"
+#if 0
#include <qobject.h>
#include <qgl.h>
#include <qwidget.h>
-#include <qpopupmenu.h>
+
#include <qtimer.h>
#include <qapplication.h>
#include <qeventloop.h>
#include <qlabel.h>
#include <qevent.h>
#include <qkeycode.h>
-#include <qmessagebox.h>
+
+#endif
+
+#include <qapplication.h>
+#include <qpopupmenu.h>
#ifdef RENDERER_OPENGL
# include <qgl.h>
@@ -51,22 +56,22 @@
namespace gnash
{
-class DSOEXPORT KdeGui : public QGLWidget, public Gui
+
+class KdeGui;
+
+class DSOEXPORT qwidget : public QGLWidget
{
Q_OBJECT
public:
-// KdeGui();
- KdeGui(WId embed);
- KdeGui(unsigned long xid, float scale, bool loop, unsigned int depth);
- virtual ~KdeGui();
- virtual bool init(int argc, char **argv[]);
- virtual bool createWindow(const char* title, int width, int height);
- virtual bool run();
- virtual bool createMenu();
- virtual bool setupEvents();
- virtual void renderBuffer();
- virtual void setInterval(unsigned int interval);
- virtual void setTimeout(unsigned int timeout);
+ qwidget(WId embed, KdeGui* godfather);
+ void setInterval(unsigned int interval);
+protected:
+ void contextMenuEvent(QContextMenuEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+ void mouseReleaseEvent( QMouseEvent * );
+ void mouseMoveEvent(QMouseEvent *event);
+ void timerEvent(QTimerEvent *);
+ void resizeEvent(QResizeEvent *event);
public slots:
void menuitem_restart_callback();
void menuitem_quit_callback();
@@ -77,24 +82,31 @@
void menuitem_step_backward_callback();
void menuitem_jump_forward_callback();
void menuitem_jump_backward_callback();
- void timer_advance_movie();
+private:
+ QPopupMenu _qmenu;
+ KdeGui* _godfather;
+};
- void about();
-protected:
- void resizeEvent(QResizeEvent *event);
- void timerEvent(QTimerEvent *event);
- void contextMenuEvent(QContextMenuEvent *event);
- void mouseMoveEvent(QMouseEvent *event);
- void mousePressEvent(QMouseEvent *event);
- void mouseHandle(const QPoint &pos);
-signals:
- void explain(const QString&);
-private:
+class DSOEXPORT KdeGui : public Gui
+{
+
+public:
+ KdeGui(unsigned long xid, float scale, bool loop, unsigned int depth);
+ virtual ~KdeGui();
+ virtual bool init(int argc, char **argv[]);
+ virtual bool createWindow(const char* windowtitle, int width, int height);
+ virtual bool run();
+ virtual bool createMenu();
+ virtual bool setupEvents();
+ virtual void renderBuffer();
+ virtual void setInterval(unsigned int interval);
+ virtual void setTimeout(unsigned int timeout);
+ private:
+ QApplication* _qapp;
+ qwidget* _qwidget;
KdeOpenGLGlue _glue;
- QPopupMenu *_qmenu;
- QApplication *_qapp;
- QGLWidget *_qwidget;
+
QTimer *_timer;
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog plugin/klash/Makefile.am plugin...,
Bastiaan Jacques <=