gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog Makefile.am configure.ac gui/Ma...


From: Bastiaan Jacques
Subject: [Gnash-commit] gnash ChangeLog Makefile.am configure.ac gui/Ma...
Date: Tue, 16 Jan 2007 14:02:45 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Bastiaan Jacques <bjacques>     07/01/16 14:02:45

Modified files:
        .              : ChangeLog Makefile.am configure.ac 
        gui            : Makefile.am fltk.cpp fltk_glue_agg.cpp 
                         fltk_glue_agg.h fltksup.h 

Log message:
                * configure.ac, Makefile.am, gui/Makefile.am: Stop abusing
                gnashpkgtool.m4 and use GNASH_PKG_FIND. Update the users of the 
FLTK
                compiler and linker flags to use FLTK2_flag.
                * gui/fltk.cpp: Code cleanups. Fix the menu rendering bug by 
moving
                drawing calls into draw(). Actually enable the region rendering 
code.
                Redraw the whole window when it is moved.
                * gui/{fltk_glue_agg.h, fltk_glue_agg.cpp, fltksup.h}: Trivial 
code
                cleanups.
                * gui/fltksup.h: Remove the Mozilla exception.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2113&r2=1.2114
http://cvs.savannah.gnu.org/viewcvs/gnash/Makefile.am?cvsroot=gnash&r1=1.57&r2=1.58
http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.233&r2=1.234
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Makefile.am?cvsroot=gnash&r1=1.55&r2=1.56
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fltk.cpp?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fltk_glue_agg.cpp?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fltk_glue_agg.h?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fltksup.h?cvsroot=gnash&r1=1.1&r2=1.2

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2113
retrieving revision 1.2114
diff -u -b -r1.2113 -r1.2114
--- ChangeLog   15 Jan 2007 20:58:52 -0000      1.2113
+++ ChangeLog   16 Jan 2007 14:02:45 -0000      1.2114
@@ -1,3 +1,15 @@
+2007-01-16 Bastiaan Jacques <address@hidden>
+
+       * configure.ac, Makefile.am, gui/Makefile.am: Stop abusing
+       gnashpkgtool.m4 and use GNASH_PKG_FIND. Update the users of the FLTK
+       compiler and linker flags to use FLTK2_flag.
+       * gui/fltk.cpp: Code cleanups. Fix the menu rendering bug by moving
+       drawing calls into draw(). Actually enable the region rendering code.
+       Redraw the whole window when it is moved.
+       * gui/{fltk_glue_agg.h, fltk_glue_agg.cpp, fltksup.h}: Trivial code
+       cleanups.
+       * gui/fltksup.h: Remove the Mozilla exception.  
+
 2007-01-15 Tomas Groth Christensen <address@hidden>
 
        * libbase/gstgnashsrc.{c,h}: Fixed some warnings.

Index: Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/Makefile.am,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- Makefile.am 9 Jan 2007 00:43:43 -0000       1.57
+++ Makefile.am 16 Jan 2007 14:02:45 -0000      1.58
@@ -15,7 +15,7 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 # 
 
-# $Id: Makefile.am,v 1.57 2007/01/09 00:43:43 rsavoye Exp $
+# $Id: Makefile.am,v 1.58 2007/01/16 14:02:45 bjacques Exp $
 
 ## Process this file with automake to produce Makefile.in
 AUTOMAKE_OPTIONS = 1.6.0
@@ -156,8 +156,8 @@
        @echo "GLEXT_LIBS is $(GLEXT_LIBS)"
        @echo "GTK2_CFLAGS is $(GTK2_CFLAGS)"
        @echo "GTK2_LIBS is $(GTK2_LIBS)"
-       @echo "FLTK_CFLAGS is $(FLTK_CFLAGS)"
-       @echo "FLTK_LIBS is $(FLTK_LIBS)"
+       @echo "FLTK2_CFLAGS is $(FLTK2_CFLAGS)"
+       @echo "FLTK2_LIBS is $(FLTK2_LIBS)"
        @echo "XFT_CFLAGS is $(XFT_CFLAGS)"
        @echo "XFT_LIBS is $(XFT_LIBS)"
        @echo "PANGO_CFLAGS is $(PANGO_CFLAGS)"

Index: configure.ac
===================================================================
RCS file: /sources/gnash/gnash/configure.ac,v
retrieving revision 1.233
retrieving revision 1.234
diff -u -b -r1.233 -r1.234
--- configure.ac        11 Jan 2007 09:58:04 -0000      1.233
+++ configure.ac        16 Jan 2007 14:02:45 -0000      1.234
@@ -15,7 +15,7 @@
 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 dnl  
 
-dnl $Id: configure.ac,v 1.233 2007/01/11 09:58:04 strk Exp $
+dnl $Id: configure.ac,v 1.234 2007/01/16 14:02:45 bjacques Exp $
 
 AC_PREREQ(2.50)
 AC_INIT(gnash, cvs)
@@ -668,16 +668,10 @@
 AM_CONDITIONAL(HAVE_GST, test x$sound_handler = xgst)
 
 if test x$gui = xfltk; then
-  dnl Because the fltk2 include directory is called fltk, whereas the library
-  dnl is called libfltk2, we call the PKG macros separately.
-  GNASH_PKG_INCLUDES(fltk, [FL_API.h], [Fast Light Toolkit])
-  GNASH_PKG_LIBS(fltk2, fl_window_flush, [Fast Light Toolkit])
-
-  FLTK_LIBS="$FLTK2_LIBS"
-  AC_SUBST(FLTK_LIBS)
+  GNASH_PKG_FIND(fltk2, [fltk/FL_API.h], [Fast Light Toolkit], fl_window_flush)
 fi
 
-AM_CONDITIONAL(HAS_FLTK, [ test x$has_fltk = xyes ])
+AM_CONDITIONAL(HAS_FLTK2, [ test x$has_fltk2 = xyes ])
 AM_CONDITIONAL(HAS_XFT, [ test x$has_xft = xyes ])
 
 
@@ -1214,13 +1208,13 @@
 fi
 
 if test x$gui = xfltk; then
-  if test x"$FLTK_LIBS" != x; then
-    if test x"$FLTK_CFLAGS" != x; then
-      echo "        Fltk flags are: $FLTK_CFLAGS"
+  if test x"$FLTK2_LIBS" != x; then
+    if test x"$FLTK2_CFLAGS" != x; then
+      echo "        Fltk flags are: $FLTK2_CFLAGS"
     else
       echo "        Fltk flags are: default include path"
     fi
-      echo "        Fltk libs are: $FLTK_LIBS"
+      echo "        Fltk libs are: $FLTK2_LIBS"
   else
     echo "ERROR: No Fltk2 development package installed!\
  You need to have the fltk2 development package installed\

Index: gui/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/gui/Makefile.am,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- gui/Makefile.am     10 Jan 2007 19:21:14 -0000      1.55
+++ gui/Makefile.am     16 Jan 2007 14:02:45 -0000      1.56
@@ -17,7 +17,7 @@
 
 # 
 
-# $Id: Makefile.am,v 1.55 2007/01/10 19:21:14 bjacques Exp $
+# $Id: Makefile.am,v 1.56 2007/01/16 14:02:45 bjacques Exp $
 
 AUTOMAKE_OPTIONS = 
 
@@ -166,8 +166,8 @@
 
 if USE_GUI_FLTK
  FLTK_SRCS = fltk.cpp fltksup.h $(FLTK_AGG_SRCS) $(FLTK_CAIRO_SRCS)
- AM_CPPFLAGS += $(FLTK_CFLAGS) 
- AM_LDFLAGS += $(FLTK_LIBS)
+ AM_CPPFLAGS += $(FLTK2_CFLAGS) 
+ AM_LDFLAGS += $(FLTK2_LIBS)
 else
  FLTK_SRCS = 
 endif

Index: gui/fltk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/fltk.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- gui/fltk.cpp        10 Jan 2007 19:27:35 -0000      1.2
+++ gui/fltk.cpp        16 Jan 2007 14:02:45 -0000      1.3
@@ -19,27 +19,15 @@
 #endif
 
 #include <fltk/Item.h>
-#include <fltk/ItemGroup.h>
-#include <fltk/PopupMenu.h>
-#include <fltk/Widget.h>
-#include <fltk/ask.h>
+#include <fltk/Window.h>
+#include <fltk/x11.h>
 #include <fltk/events.h>
 #include <fltk/run.h>
-#include <fltk/visual.h>
-#include <fltk/Window.h>
-#include <fltk/draw.h>
-#include <fltk/x.h>
-#include <fltk/damage.h>
-#include <fltk/layout.h>
 #include <fltk/Cursor.h>
-
-
-
-
+#include <fltk/layout.h>
 
 #include "fltksup.h"
 #include "gnash.h"
-#include "log.h"
 #include "gui.h"
 #include "VM.h"
 
@@ -53,15 +41,13 @@
 
 
 FltkGui::FltkGui(unsigned long xid, float scale, bool loop, unsigned int depth)
-  : Window(100,100,"Gnash"),
+  : Window(0, 0),
     Gui(xid, scale, loop, depth)
 {
 }
 
 FltkGui::~FltkGui()
 {
-    GNASH_REPORT_FUNCTION;
-
     delete _popup_menu;
 }
 
@@ -69,32 +55,33 @@
 void
 FltkGui::renderBuffer()
 {
-    GNASH_REPORT_FUNCTION;
-    _glue.draw();
     redraw();
 }
 
+// All drawing operations (i.e., the drawing calls the renderer makes) must 
take
+// place in draw().
 void
 FltkGui::draw()
 {
-   GNASH_REPORT_FUNCTION;
-#if 0
-    if (! (damage() & DAMAGE_EXPOSE) || damage) {
-      return;
-    }
-#endif
-    rect draw_bounds(-1e10f, -1e10f, +1e10f, +1e10f);
+    // FLTK has a nice mechanism where you can set damage() to whatever you 
want
+    // so in draw() you can check what exactly you want to redraw. But
+    // unfortunately it doesn't seem to remember what bits you turn on. So I'll
+    // just do it the old-fashioned way.
+    static bool firstRun = true;
 
+    if (firstRun) {
+      // Redraw the whole rendering area.
+      rect draw_bounds(-1e10f, -1e10f, +1e10f, +1e10f);
     set_invalidated_region(draw_bounds);
+      firstRun = false;
+    }
 
-    renderBuffer();
+    _glue.draw();
 }
 
 int
 FltkGui::handle(int event)
 {
-    GNASH_REPORT_FUNCTION;
-
     switch (event) {
       case TIMEOUT:
         advance_movie(this);
@@ -119,8 +106,7 @@
         handleKey(event_key());
         return true;
       default:
-       // cout << "Captured unknown event: " << event << std::endl;
-        return true; //Window::handle(event);
+        return Window::handle(event);
     }
 }
 
@@ -159,7 +145,7 @@
       { NumLockKey,         gnash::key::NUM_LOCK },
       { SubtractKey,        gnash::key::MINUS },
       { DivideKey,          gnash::key::SLASH },
-      { 0,                  gnash::key::INVALID } // Terminator
+      { 0,                  gnash::key::INVALID }
 #if 0
             // These appear to be unavailable in fltk
             { bracketleft, gnash::key::LEFT_BRACKET },
@@ -183,18 +169,14 @@
 bool
 FltkGui::run()
 {
-    GNASH_REPORT_FUNCTION;
-
     fltk::run();
 
-    return false;
+    return true;
 }
 
 bool
 FltkGui::init(int argc, char **argv[])
 {
-    GNASH_REPORT_FUNCTION;
-
     _renderer = _glue.createRenderHandler();
     set_render_handler(_renderer);
 
@@ -211,7 +193,7 @@
 void
 FltkGui::create()
 {
-    // XXX ensure _xid is set before this function is called
+    // TODO: make the set_xid() call conditional on the availability of X11.
     if (_xid) {
       CreatedWindow::set_xid(this, _xid);
     } else {
@@ -222,8 +204,6 @@
 bool
 FltkGui::createWindow(const char* title, int width, int height)
 {
-    GNASH_REPORT_FUNCTION;
-
     resize(width, height);
 
     _glue.initBuffer(width, height);
@@ -233,7 +213,8 @@
     createMenu();
     end();
 
-    size_range (1, 1); // XXX
+    // The minimum size of the window is 1x1 pixels.
+    size_range (1, 1);
 
     show();
 
@@ -243,28 +224,24 @@
 bool
 FltkGui::createMenu()
 {
-    GNASH_REPORT_FUNCTION;
-
     _popup_menu = new PopupMenu(0, 0, w(), h());
     _popup_menu->type(PopupMenu::POPUP3);
 
     _popup_menu->begin();
-    new Item("Play Movie", 0, reinterpret_cast<Callback*>(menu_play));
-    new Item("Pause Movie", 0, reinterpret_cast<Callback*>(menu_pause));
-    new Item("Stop Movie", 0, reinterpret_cast<Callback*>(menu_stop));
-    new Item("Restart Movie", 0,
-                   reinterpret_cast<Callback*>(menu_restart));
-    new Item("Step Forward Frame", 0,
-                   reinterpret_cast<Callback*>(menu_step_forward));
-    new Item("Step Backward Frame", 0,
-                   reinterpret_cast<Callback*>(menu_step_backward));
-    new Item("Jump Forward 10 Frames", 0,
-                   reinterpret_cast<Callback*>(menu_jump_forward));
-    new Item("Jump Backward 10 Frames", 0,
-                   reinterpret_cast<Callback*>(menu_jump_backward));
-    new Item("Toggle Sound", 0,
-                   reinterpret_cast<Callback*>(menu_toggle_sound));
-    new Item("Quit", 0, reinterpret_cast<Callback*>(menu_quit));
+
+#define callback_cast(ptr) reinterpret_cast<Callback*>(ptr)
+    new Item("Play Movie",              0, callback_cast(menu_play));
+    new Item("Pause Movie",             0, callback_cast(menu_pause));
+    new Item("Stop Movie",              0, callback_cast(menu_stop));
+    new Item("Restart Movie",           0, callback_cast(menu_restart));
+    new Item("Step Forward Frame",      0, callback_cast(menu_step_forward));
+    new Item("Step Backward Frame",     0, callback_cast(menu_step_backward));
+    new Item("Jump Forward 10 Frames",  0, callback_cast(menu_jump_forward));
+    new Item("Jump Backward 10 Frames", 0, callback_cast(menu_jump_backward));
+    new Item("Toggle Sound",            0, callback_cast(menu_toggle_sound));
+    new Item("Quit",                    0, callback_cast(menu_quit));
+#undef callback_cast
+
     _popup_menu->end();
 
     return true;
@@ -273,36 +250,33 @@
 void
 FltkGui::layout()
 {
-    GNASH_REPORT_FUNCTION;
-    if (!(layout_damage() & ~LAYOUT_WH)) {
-      // We're only interested in size changes.
-      //  return;
-    }
-#if 0
-    if (!get_current_root()) {
-      
+    if ((layout_damage() & LAYOUT_CHILD )) {
+      // We're not interested in children. Sorry.
       return;
     }
-#endif
     if (!VM::isInitialized()) {
       // No movie yet; don't bother resizing anything.
       return;
     }
 
+    // Let FLTK update the window borders, etc.
     Window::layout();
 
+    if ((layout_damage() & LAYOUT_WH)) {
     _glue.resize(w(), h());
     resize_view(w(), h());
+    }
 
-    redraw();
+    // Invalidate the whole drawing area.
+    rect draw_bounds(-1e10f, -1e10f, +1e10f, +1e10f);
+    set_invalidated_region(draw_bounds);
 
+    redraw();
 }
 
 void 
 FltkGui::setCursor(gnash_cursor_type newcursor)
 {
-    //GNASH_REPORT_FUNCTION;
-
     fltk::Cursor* cursortype;
 
     switch(newcursor) {

Index: gui/fltk_glue_agg.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/fltk_glue_agg.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- gui/fltk_glue_agg.cpp       10 Jan 2007 19:27:35 -0000      1.2
+++ gui/fltk_glue_agg.cpp       16 Jan 2007 14:02:45 -0000      1.3
@@ -18,35 +18,17 @@
 #include "config.h"
 #endif
 
-#include <fltk/Item.h>
-#include <fltk/ItemGroup.h>
-#include <fltk/PopupMenu.h>
-#include <fltk/Widget.h>
-#include <fltk/ask.h>
-#include <fltk/events.h>
-#include <fltk/run.h>
-#include <fltk/visual.h>
-#include <fltk/Window.h>
 #include <fltk/draw.h>
-#include <fltk/x.h>
-#include <fltk/damage.h>
-#include <fltk/layout.h>
-#include <fltk/Cursor.h>
 
 
 
-
-#include "fltksup.h"
 #include "fltk_glue_agg.h"
 #include "gnash.h"
-#include "log.h"
-#include "gui.h"
 
 #include "render_handler.h"
 #include "render_handler_agg.h"
 
 using namespace std;
-//using namespace fltk;
 
 namespace gnash {
 

Index: gui/fltk_glue_agg.h
===================================================================
RCS file: /sources/gnash/gnash/gui/fltk_glue_agg.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- gui/fltk_glue_agg.h 10 Jan 2007 19:27:35 -0000      1.2
+++ gui/fltk_glue_agg.h 16 Jan 2007 14:02:45 -0000      1.3
@@ -21,25 +21,6 @@
 #include "config.h"
 #endif
 
-#include <fltk/Item.h>
-#include <fltk/ItemGroup.h>
-#include <fltk/PopupMenu.h>
-#include <fltk/Widget.h>
-#include <fltk/ask.h>
-#include <fltk/events.h>
-#include <fltk/run.h>
-#include <fltk/visual.h>
-#include <fltk/Window.h>
-#include <fltk/draw.h>
-#include <fltk/x.h>
-#include <fltk/damage.h>
-#include <fltk/layout.h>
-#include <fltk/Cursor.h>
-
-
-
-
-#include "fltksup.h"
 #include "gnash.h"
 #include "log.h"
 #include "gui.h"

Index: gui/fltksup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/fltksup.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- gui/fltksup.h       10 Jan 2007 19:21:14 -0000      1.1
+++ gui/fltksup.h       16 Jan 2007 14:02:45 -0000      1.2
@@ -14,27 +14,6 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-// Linking Gnash statically or dynamically with other modules is making a
-// combined work based on Gnash. Thus, the terms and conditions of the GNU
-// General Public License cover the whole combination.
-//
-// As a special exception, the copyright holders of Gnash give you
-// permission to combine Gnash with free software programs or libraries
-// that are released under the GNU LGPL and with code included in any
-// release of Talkback distributed by the Mozilla Foundation. You may
-// copy and distribute such a system following the terms of the GNU GPL
-// for all but the LGPL-covered parts and Talkback, and following the
-// LGPL for the LGPL-covered parts.
-//
-// Note that people who make modified versions of Gnash are not obligated
-// to grant this special exception for their modified versions; it is their
-// choice whether to do so. The GNU General Public License gives permission
-// to release a modified version without this exception; this exception
-// also makes it possible to release a modified version which carries
-// forward this exception.
-// 
-//
-
 #ifndef __FLTKSUP_H__
 #define __FLTKSUP_H__
 
@@ -46,21 +25,8 @@
 #include "log.h"
 #include "gui.h"
 
-#if 0
-#include <FL/Fl.H>
-#include <FL/gl.h>
-#include <FL/x.H>
-#include <FL/Fl_Window.H>
-#endif
-
-#include <fltk/Item.h>
-#include <fltk/Menu.h>
 #include <fltk/Window.h>
 #include <fltk/PopupMenu.h>
-#include <fltk/Widget.h>
-#include <fltk/gl.h>
-#include <fltk/visual.h>
-#include <fltk/GlWindow.h>
 
 #ifdef RENDERER_AGG
 # include "fltk_glue_agg.h"
@@ -107,8 +73,6 @@
 #endif
 };
  
-// end of namespace gnash 
-}
+} // end of namespace gnash 
 
-// end of __FLTKSUP_H__
-#endif
+#endif // end of __FLTKSUP_H__




reply via email to

[Prev in Thread] Current Thread [Next in Thread]