[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/sprite_instance.cpp test...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/sprite_instance.cpp test... |
Date: |
Wed, 21 Nov 2007 18:08:58 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/11/21 18:08:58
Modified files:
. : ChangeLog
server : sprite_instance.cpp
testsuite/misc-ming.all: DrawingApiTest.as
DrawingApiTestRunner.cpp
Log message:
Implement MovieClip.startDrag and MovieClip.stopDrag
(ready for test)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4908&r2=1.4909
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.390&r2=1.391
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/DrawingApiTest.as?cvsroot=gnash&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/DrawingApiTestRunner.cpp?cvsroot=gnash&r1=1.37&r2=1.38
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4908
retrieving revision 1.4909
diff -u -b -r1.4908 -r1.4909
--- ChangeLog 21 Nov 2007 17:11:52 -0000 1.4908
+++ ChangeLog 21 Nov 2007 18:08:57 -0000 1.4909
@@ -1,5 +1,12 @@
2007-11-21 Sandro Santilli <address@hidden>
+ * server/sprite_instance.cpp: implement MovieClip.{start,stop}Drag.
+ * testsuite/misc-ming.all/: DrawingApiTest.as,
+ DrawingApiTestRunner.cpp:
+ Prepare for testing MoveClip.{start,stop}Drag
+
+2007-11-21 Sandro Santilli <address@hidden>
+
* server/movie_root.{cpp,h}: generalize key and mouse
listeners management.
* server/sprite_instance.cpp (add_display_object): don't
Index: server/sprite_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
retrieving revision 1.390
retrieving revision 1.391
diff -u -b -r1.390 -r1.391
--- server/sprite_instance.cpp 21 Nov 2007 17:11:52 -0000 1.390
+++ server/sprite_instance.cpp 21 Nov 2007 18:08:58 -0000 1.391
@@ -1341,14 +1341,12 @@
sprite_startDrag(const fn_call& fn)
{
boost::intrusive_ptr<sprite_instance> sprite =
ensureType<sprite_instance>(fn.this_ptr);
- UNUSED(sprite);
- static bool warned = false;
- if ( ! warned )
- {
- log_unimpl("MovieClip.startDrag()");
- warned=true;
- }
+ drag_state st;
+ st.setCharacter( sprite.get() );
+ VM::get().getRoot().set_drag_state(st);
+
+ log_debug("MovieClip.startDrag() TESTING");
return as_value();
}
@@ -1359,12 +1357,9 @@
boost::intrusive_ptr<sprite_instance> sprite =
ensureType<sprite_instance>(fn.this_ptr);
UNUSED(sprite);
- static bool warned = false;
- if ( ! warned )
- {
- log_unimpl("MovieClip.stopDrag()");
- warned=true;
- }
+ VM::get().getRoot().stop_drag();
+
+ log_debug("MovieClip.stopDrag() TESTING");
return as_value();
}
Index: testsuite/misc-ming.all/DrawingApiTest.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/DrawingApiTest.as,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- testsuite/misc-ming.all/DrawingApiTest.as 10 Nov 2007 18:07:14 -0000
1.29
+++ testsuite/misc-ming.all/DrawingApiTest.as 21 Nov 2007 18:08:58 -0000
1.30
@@ -17,7 +17,7 @@
// 'h' toggles _visible
//
-rcsid="$Id: DrawingApiTest.as,v 1.29 2007/11/10 18:07:14 strk Exp $";
+rcsid="$Id: DrawingApiTest.as,v 1.30 2007/11/21 18:08:58 strk Exp $";
#include "../actionscript.all/check.as"
@@ -711,6 +711,16 @@
if ( newAlpha > 100 ) newAlpha = 100;
page[visibleIndex]._alpha = newAlpha;
}
+ else if ( ascii == 100 ) // 'd' - start/stop dragging something :)
+ {
+ if ( ! hitdetector.dragging ) {
+ hitdetector.dragging = true;
+ hitdetector.startDrag();
+ } else {
+ hitdetector.dragging = flase;
+ hitdetector.stopDrag();
+ }
+ }
};
Key.addListener(this);
Index: testsuite/misc-ming.all/DrawingApiTestRunner.cpp
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-ming.all/DrawingApiTestRunner.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- testsuite/misc-ming.all/DrawingApiTestRunner.cpp 13 Nov 2007 08:37:24
-0000 1.37
+++ testsuite/misc-ming.all/DrawingApiTestRunner.cpp 21 Nov 2007 18:08:58
-0000 1.38
@@ -746,5 +746,12 @@
// Cairo succeeds.
xcheck_pixel(xo + (20*scale), yo + (25*scale), 3, white, 2);
+ //----------------------------------------------------------
+ // TODO: check startDrag/stopDrag on the hit detector
+ // (hit 'd' key to toggle)
+ //----------------------------------------------------------
+ //
+
+
}