gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog testsuite/swfdec/PASSING gui/Pl...


From: Benjamin Wolsey
Subject: [Gnash-commit] gnash ChangeLog testsuite/swfdec/PASSING gui/Pl...
Date: Mon, 07 Apr 2008 21:44:57 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Benjamin Wolsey <bwy>   08/04/07 21:44:57

Modified files:
        .              : ChangeLog 
        testsuite/swfdec: PASSING 
        gui            : Player.cpp fb.cpp fbsup.h gtk.cpp gtksup.h 
                         gui.cpp gui.h 
        server/asobj   : Mouse.cpp 
        utilities      : processor.cpp 

Log message:
                * server/asobj/Mouse.cpp: expect a return value from Mouse.show 
and
                  Mouse.hide callbacks, and return it (as an integer 1 or 0, 
not a
                  boolean).
                * gui/gtk{.cpp,sup.h}, gui/fb{.cpp,sup.h}, gui/gui.{cpp,h}: 
return
                  true if Mouse was visible before the call; otherwise false.
                * gui/Player.cpp: pass Mouse return as "true" or "false".
                * utilities/processor.cpp: replicate event callback for 
Mouse.show
                  and .hide. Return whether hypothetical mouse was visible or 
not.
                * testsuite/swfdec/PASSING: mouse-show-hide test passes (relies 
on
                  processor and gui acting the same).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6210&r2=1.6211
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/swfdec/PASSING?cvsroot=gnash&r1=1.122&r2=1.123
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.97&r2=1.98
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fb.cpp?cvsroot=gnash&r1=1.53&r2=1.54
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fbsup.h?cvsroot=gnash&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk.cpp?cvsroot=gnash&r1=1.161&r2=1.162
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtksup.h?cvsroot=gnash&r1=1.69&r2=1.70
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.147&r2=1.148
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.h?cvsroot=gnash&r1=1.81&r2=1.82
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Mouse.cpp?cvsroot=gnash&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/gnash/utilities/processor.cpp?cvsroot=gnash&r1=1.94&r2=1.95

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6210
retrieving revision 1.6211
diff -u -b -r1.6210 -r1.6211
--- ChangeLog   7 Apr 2008 20:25:14 -0000       1.6210
+++ ChangeLog   7 Apr 2008 21:44:55 -0000       1.6211
@@ -1,3 +1,16 @@
+2008-04-07 Benjamin Wolsey <address@hidden>
+
+       * server/asobj/Mouse.cpp: expect a return value from Mouse.show and
+         Mouse.hide callbacks, and return it (as an integer 1 or 0, not a
+         boolean).
+       * gui/gtk{.cpp,sup.h}, gui/fb{.cpp,sup.h}, gui/gui.{cpp,h}: return
+         true if Mouse was visible before the call; otherwise false.
+       * gui/Player.cpp: pass Mouse return as "true" or "false".
+       * utilities/processor.cpp: replicate event callback for Mouse.show
+         and .hide. Return whether hypothetical mouse was visible or not.
+       * testsuite/swfdec/PASSING: mouse-show-hide test passes (relies on
+         processor and gui acting the same).
+
 2008-04-07 Sandro Santilli <address@hidden>
 
        * libnet/cque.cpp: implement safe ::merge method. 

Index: testsuite/swfdec/PASSING
===================================================================
RCS file: /sources/gnash/gnash/testsuite/swfdec/PASSING,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -b -r1.122 -r1.123
--- testsuite/swfdec/PASSING    7 Apr 2008 17:39:52 -0000       1.122
+++ testsuite/swfdec/PASSING    7 Apr 2008 21:44:55 -0000       1.123
@@ -356,6 +356,9 @@
 mouse-movie-below-movie-5.swf:c7d97de8768c341a64df75dca2686c0b
 mouse-movie-below-nonevent-movie-5.swf:9027280bdb516e12f2e4255776c079a1
 mouse-scaled-5.swf:9138b10aab35c2d4e969057b9c253b42
+mouse-show-hide-5.swf:7eb796e980c9cfb987c397fc2fadd6d2
+mouse-show-hide-6.swf:366d7ceced6510a5164c2d41a12e07bc
+mouse-show-hide-7.swf:dedc6c33011c29bca0514f343ce71541
 movieclip-get-bounds-line-5.swf:0d495cbfeded26977068abc96d665a2d
 movieclip-get-bounds-line-6.swf:fcfd161ce0b738fd0932d55c4572ba90
 movieclip-get-bounds-line-7.swf:c1dc1aa64576e1d0e09ccbbbc74f5f2c

Index: gui/Player.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.cpp,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -b -r1.97 -r1.98
--- gui/Player.cpp      5 Apr 2008 11:08:19 -0000       1.97
+++ gui/Player.cpp      7 Apr 2008 21:44:55 -0000       1.98
@@ -520,14 +520,12 @@
 {
     if (event == "Mouse.hide")
     {
-        _gui->showMouse(false);
-        return "";
+        return _gui->showMouse(false) ? "true" : "false";
     }
 
     if (event == "Mouse.show")
     {
-        _gui->showMouse(true);
-        return "";
+        return _gui->showMouse(true) ? "true" : "false";
     }
     
     if (event == "Stage.displayState")

Index: gui/fb.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/fb.cpp,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- gui/fb.cpp  4 Apr 2008 09:11:59 -0000       1.53
+++ gui/fb.cpp  7 Apr 2008 21:44:55 -0000       1.54
@@ -476,9 +476,12 @@
   log_unimpl(_("This GUI does not yet support menus"));
 }
 
-void FBGui::showMouse(bool /*show*/)
+bool FBGui::showMouse(bool /*show*/)
 {
   log_unimpl(_("This GUI does not yet support a mouse pointer"));
+  // Should return true if the pointer was visible before call,
+  // otherwise false;
+  return true;
 }
 
 

Index: gui/fbsup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/fbsup.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- gui/fbsup.h 4 Apr 2008 09:11:59 -0000       1.26
+++ gui/fbsup.h 7 Apr 2008 21:44:56 -0000       1.27
@@ -205,7 +205,7 @@
     virtual void unsetFullscreen();
     
     virtual void showMenu(bool show);
-    virtual void showMouse(bool show);
+    virtual bool showMouse(bool show);
     
     virtual void setInvalidatedRegions(const InvalidatedRanges& ranges);
     virtual bool want_multiple_regions() { return true; }

Index: gui/gtk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gtk.cpp,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -b -r1.161 -r1.162
--- gui/gtk.cpp 4 Apr 2008 10:39:09 -0000       1.161
+++ gui/gtk.cpp 7 Apr 2008 21:44:56 -0000       1.162
@@ -361,11 +361,14 @@
     }
 }
 
-void
+// Returns whether the mouse was visible before call.
+bool
 GtkGui::showMouse(bool show)
 {
 
-    if (show == _mouseShown) return;
+    bool state = _mouseShown;
+
+    if (show == _mouseShown) return state;
 
     if (!show)
     {
@@ -391,6 +394,7 @@
         _mouseShown = true;    
     } 
 
+    return state;
 }
 
 void

Index: gui/gtksup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gtksup.h,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -b -r1.69 -r1.70
--- gui/gtksup.h        29 Mar 2008 10:13:55 -0000      1.69
+++ gui/gtksup.h        7 Apr 2008 21:44:56 -0000       1.70
@@ -183,7 +183,7 @@
 
     virtual void setCursor(gnash_cursor_type newcursor);
     
-    virtual void showMouse(bool show);
+    virtual bool showMouse(bool show);
 
     virtual void showMenu(bool show);
 

Index: gui/gui.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.cpp,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -b -r1.147 -r1.148
--- gui/gui.cpp 7 Apr 2008 10:59:26 -0000       1.147
+++ gui/gui.cpp 7 Apr 2008 21:44:56 -0000       1.148
@@ -175,7 +175,7 @@
     log_unimpl(_("Fullscreen not yet supported in this GUI"));
 }
 
-void
+bool
 Gui::showMouse(bool /* show */)
 {
        static bool warned = false;
@@ -184,6 +184,8 @@
        log_unimpl(_("Mouse show/hide not yet supported in this GUI"));
        warned = true;
        }
+       
+       return true;
 }
 
 void

Index: gui/gui.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.h,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -b -r1.81 -r1.82
--- gui/gui.h   29 Mar 2008 10:13:55 -0000      1.81
+++ gui/gui.h   7 Apr 2008 21:44:56 -0000       1.82
@@ -231,7 +231,8 @@
     /// Sets whether the gui should show the system mouse pointer
     //
     /// @param show true if the mouse should be shown.
-    virtual void showMouse(bool show);
+    /// @return true if the state changed.
+    virtual bool showMouse(bool show);
 
     /// Sets whether the menus should be shown (for fscommand)
     //

Index: server/asobj/Mouse.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Mouse.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- server/asobj/Mouse.cpp      10 Mar 2008 08:19:39 -0000      1.18
+++ server/asobj/Mouse.cpp      7 Apr 2008 21:44:56 -0000       1.19
@@ -94,17 +94,19 @@
     boost::intrusive_ptr<mouse_as_object> 
obj=ensureType<mouse_as_object>(fn.this_ptr);
     UNUSED(obj);
 
+    int success = 0;
+
        if (movie_root::interfaceHandle)
        {
-               (*movie_root::interfaceHandle)("Mouse.hide", "");
+               success = ((*movie_root::interfaceHandle)("Mouse.hide", "") == 
"true") ? 1 : 0;
        }
        else
        {
                log_error(_("No callback to handle Mouse.hide"));
        }
 
-       /// Returns nothing
-    return as_value();
+    // returns 1 if mouse was visible before call.
+    return as_value(success);
 }
 
 as_value mouse_show(const fn_call& fn)
@@ -112,16 +114,19 @@
     boost::intrusive_ptr<mouse_as_object> 
obj=ensureType<mouse_as_object>(fn.this_ptr);
     UNUSED(obj);
 
+    int success = 0;
+
        if (movie_root::interfaceHandle)
        {
-               (*movie_root::interfaceHandle)("Mouse.show", "");
+               success = ((*movie_root::interfaceHandle)("Mouse.show", "") == 
"true") ? 1 : 0;
        }
        else
        {
                log_error(_("No callback to handle Mouse.show"));
        }
-       /// Returns nothing
-    return as_value();
+
+    // returns 1 if Mouse was visible before call.
+    return as_value(success);
 }
 
 as_value

Index: utilities/processor.cpp
===================================================================
RCS file: /sources/gnash/gnash/utilities/processor.cpp,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -b -r1.94 -r1.95
--- utilities/processor.cpp     7 Apr 2008 10:59:27 -0000       1.94
+++ utilities/processor.cpp     7 Apr 2008 21:44:57 -0000       1.95
@@ -140,6 +140,33 @@
     if ( ncasecomp(command, "quit") ) quitrequested = true;
 }
 
+std::string eventCallback(const std::string& event,
+                                                       const std::string& arg)
+{
+    log_debug(_("eventCallback: %s %s"), event, arg);
+    
+    StringNoCaseEqual ncasecomp;  
+
+    static bool mouseShown = true;
+
+    // These should return "true" if the mouse was visible before
+    // the call.
+    if ( ncasecomp(event, "Mouse.hide") ) {
+        bool state = mouseShown;
+        mouseShown = false;
+        return state ? "true" : "false";
+    }
+
+    if ( ncasecomp(event, "Mouse.show") ) {
+        bool state = mouseShown;
+        mouseShown = true;
+        return state ? "true" : "false" ;
+    }
+    
+    return "";
+
+}
+
 int
 main(int argc, char *argv[])
 {
@@ -277,6 +304,7 @@
     }
 
     registerFSCommandCallback(execFsCommand);
+    gnash::movie_root::registerEventCallback(&eventCallback);
 
     // Play through all the movies.
     for (int i = 0, n = infiles.size(); i < n; i++) {




reply via email to

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