[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/asobj/MovieClipLoader.cp...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/asobj/MovieClipLoader.cp... |
Date: |
Sun, 11 Feb 2007 22:07:29 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/02/11 22:07:29
Modified files:
. : ChangeLog
server/asobj : MovieClipLoader.cpp
testsuite/actionscript.all: Makefile.am
Added files:
testsuite/actionscript.all: MovieClipLoader.as
Log message:
* server/asobj/MovieClipLoader.cpp: properly register
the MovieClipLoader global class (use builtin_function,
not a "dumb" c_function.
* testsuite/actionscript.all/: Makefile.am, MovieClipLoader.as:
simple test for MovieClipLoader (just inheritance and
functions
availability).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2314&r2=1.2315
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/MovieClipLoader.cpp?cvsroot=gnash&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Makefile.am?cvsroot=gnash&r1=1.64&r2=1.65
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/MovieClipLoader.as?cvsroot=gnash&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2314
retrieving revision 1.2315
diff -u -b -r1.2314 -r1.2315
--- ChangeLog 11 Feb 2007 19:24:26 -0000 1.2314
+++ ChangeLog 11 Feb 2007 22:07:28 -0000 1.2315
@@ -1,3 +1,12 @@
+2007-02-11 Sandro Santilli <address@hidden>
+
+ * server/asobj/MovieClipLoader.cpp: properly register
+ the MovieClipLoader global class (use builtin_function,
+ not a "dumb" c_function.
+ * testsuite/actionscript.all/: Makefile.am, MovieClipLoader.as:
+ simple test for MovieClipLoader (just inheritance and functions
+ availability).
+
2007-02-11 Markus Gothe <address@hidden>
* server/asobj/Number.cpp: Reverted stupid mistake.
Index: server/asobj/MovieClipLoader.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/MovieClipLoader.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- server/asobj/MovieClipLoader.cpp 8 Feb 2007 17:01:01 -0000 1.16
+++ server/asobj/MovieClipLoader.cpp 11 Feb 2007 22:07:28 -0000 1.17
@@ -36,6 +36,7 @@
#include "character.h" // for loadClip (get_parent)
#include "log.h"
#include "URL.h" // for url parsing
+#include "builtin_function.h"
#include <typeinfo>
#include <string>
@@ -81,6 +82,7 @@
if ( o == NULL )
{
o = new as_object();
+ //log_msg("MovieClipLoader interface @ %p", o.get());
attachMovieClipLoaderInterface(*o);
}
return o.get();
@@ -187,7 +189,11 @@
dispatchEvent("onLoadStart", events_call);
bool ret = target.loadMovie(url);
- if ( ! ret ) return false;
+ if ( ! ret )
+ {
+ // TODO: dispatchEvent("onLoadError", ...)
+ return false;
+ }
/// This event must be dispatched when actions
@@ -211,6 +217,8 @@
mcl_data->bytes_loaded = 666; // fake values for now
mcl_data->bytes_total = 666;
+ // TODO: dispatchEvent("onLoadProgress", ...)
+
log_warning("FIXME: MovieClipLoader calling onLoadComplete *before*
movie has actually been fully loaded (cheating)");
dispatchEvent("onLoadComplete", events_call);
@@ -359,6 +367,7 @@
{
as_object* mov_obj = new MovieClipLoader;
+ //log_msg("MovieClipLoader instance @ %p", mov_obj);
fn.result->set_as_object(mov_obj); // will store in a boost::intrusive_ptr
}
@@ -421,7 +430,18 @@
void
moviecliploader_class_init(as_object& global)
{
- global.init_member("MovieClipLoader", as_value(moviecliploader_new));
+ // This is going to be the global Number "class"/"function"
+ static boost::intrusive_ptr<builtin_function> cl=NULL;
+
+ if ( cl == NULL )
+ {
+ cl=new builtin_function(&moviecliploader_new,
getMovieClipLoaderInterface());
+ // replicate all interface to class, to be able to access
+ // all methods as static functions
+ attachMovieClipLoaderInterface(*cl); // not sure we should be
doing this..
+ }
+ global.init_member("MovieClipLoader", cl.get());
//as_value(moviecliploader_new));
+ log_msg("MovieClipLoader class @ %p", cl.get());
}
} // end of gnash namespace
Index: testsuite/actionscript.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Makefile.am,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -b -r1.64 -r1.65
--- testsuite/actionscript.all/Makefile.am 17 Jan 2007 14:39:31 -0000
1.64
+++ testsuite/actionscript.all/Makefile.am 11 Feb 2007 22:07:29 -0000
1.65
@@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-# $Id: Makefile.am,v 1.64 2007/01/17 14:39:31 strk Exp $
+# $Id: Makefile.am,v 1.65 2007/02/11 22:07:29 strk Exp $
AUTOMAKE_OPTIONS = dejagnu
@@ -84,6 +84,7 @@
Microphone.as \
Mouse.as \
MovieClip.as \
+ MovieClipLoader.as \
NetStream.as \
Number.as \
Selection.as \
Index: testsuite/actionscript.all/MovieClipLoader.as
===================================================================
RCS file: testsuite/actionscript.all/MovieClipLoader.as
diff -N testsuite/actionscript.all/MovieClipLoader.as
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/actionscript.all/MovieClipLoader.as 11 Feb 2007 22:07:29
-0000 1.1
@@ -0,0 +1,62 @@
+//
+// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// 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
+
+//
+
+// Test case for MovieClipLoader ActionScript class
+// compile this test case with Ming makeswf, and then
+// execute it like this gnash -1 -r 0 -v out.swf
+
+rcsid="$Id: MovieClipLoader.as,v 1.1 2007/02/11 22:07:29 strk Exp $";
+
+#include "check.as"
+
+// MovieClipLoader was added in player7
+#if OUTPUT_VERSION >= 7
+
+check_equals(typeOf(MovieClipLoader), 'function');
+
+var mcl = new MovieClipLoader();
+check_equals(typeOf(mcl), 'object');
+check_equals(typeOf(mcl.addListener), 'function');
+check_equals(typeOf(mcl.getProgress), 'function');
+check_equals(typeOf(mcl.loadClip), 'function');
+check_equals(typeOf(mcl.removeListener), 'function');
+check_equals(typeOf(mcl.unloadClip), 'function');
+check(mcl instanceOf MovieClipLoader);
+
+// TODO: test even handlers (actionscript.all framework
+// not enough for this)
+//
+// Invoked when a file loaded with MovieClipLoader.loadClip() has completely
downloaded.
+// MovieClipLoader.onLoadComplete
+//
+// Invoked when a file loaded with MovieClipLoader.loadClip() has failed to
load.
+// MovieClipLoader.onLoadError
+//
+// Invoked when the actions on the first frame of the loaded clip have been
executed.
+// MovieClipLoader.onLoadInit
+//
+// Invoked every time the loading content is written to disk during the
loading process.
+// MovieClipLoader.onLoadProgress
+//
+// Invoked when a call to MovieClipLoader.loadClip() has successfully begun to
download a file.
+// MovieClipLoader.onLoadStart
+//
+
+#endif // OUTPUT_VERSION >= 7
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog server/asobj/MovieClipLoader.cp...,
Sandro Santilli <=