[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/avm2 r9527: Add flash.utils package to act
From: |
Tom Stellard |
Subject: |
[Gnash-commit] /srv/bzr/gnash/avm2 r9527: Add flash.utils package to actionscript objects. |
Date: |
Wed, 27 Aug 2008 13:27:40 +0800 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9527
committer: Tom Stellard <address@hidden>
branch nick: gnash_dev
timestamp: Wed 2008-08-27 13:27:40 +0800
message:
Add flash.utils package to actionscript objects.
added:
libcore/asobj/flash/utils_pkg.cpp
libcore/asobj/flash/utils_pkg.h
modified:
libcore/asobj/Makefile.am
libcore/asobj/flash_pkg.cpp
=== modified file 'libcore/asobj/Makefile.am'
--- a/libcore/asobj/Makefile.am 2008-08-22 15:42:16 +0000
+++ b/libcore/asobj/Makefile.am 2008-08-27 05:27:40 +0000
@@ -109,6 +109,7 @@
flash_pkg.cpp \
flash/text_pkg.cpp \
flash/text/TextRenderer_as.cpp \
+ flash/utils_pkg.cpp \
$(NULL)
noinst_HEADERS = \
@@ -186,6 +187,7 @@
flash_pkg.h \
flash/text_pkg.h \
flash/text/TextRenderer_as.h \
+ flash/utils_pkg.h \
$(NULL)
libgnashasobjs_la_LIBADD = \
=== added file 'libcore/asobj/flash/utils_pkg.cpp'
--- a/libcore/asobj/flash/utils_pkg.cpp 1970-01-01 00:00:00 +0000
+++ b/libcore/asobj/flash/utils_pkg.cpp 2008-08-27 05:27:40 +0000
@@ -0,0 +1,56 @@
+// utils_pkg.cpp: ActionScript "flash.utils" package, for Gnash.
+//
+// Copyright (C) 2005, 2006, 2007, 2008 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 3 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
+//
+
+#include "Object.h" // for getObjectInterface
+#include "as_object.h"
+#include "builtin_function.h"
+#include "utils_pkg.h"
+#include "string_table.h"
+#include "VM.h"
+#include "namedStrings.h"
+
+namespace gnash {
+
+static as_value getQualifiedClassName(const fn_call&);
+
+as_value
+get_flash_utils_package(const fn_call& /*fn*/)
+{
+ log_debug("Loading flash.utils package");
+
+ as_object* pkg = new as_object(getObjectInterface());
+
+ pkg->init_member("getQualifiedClassName", new
builtin_function(getQualifiedClassName));
+ return pkg;
+}
+
+void
+flash_utils_package_init(as_object& where)
+{
+ string_table& st = where.getVM().getStringTable();
+ where.init_destructive_property(st.find("utils"),
get_flash_utils_package);
+}
+
+static as_value
+getQualifiedClassName(const fn_call& fn){
+
+ return as_value(fn.arg(0).typeOf());
+}
+
+} // end of gnash namespace
=== added file 'libcore/asobj/flash/utils_pkg.h'
--- a/libcore/asobj/flash/utils_pkg.h 1970-01-01 00:00:00 +0000
+++ b/libcore/asobj/flash/utils_pkg.h 2008-08-27 05:27:40 +0000
@@ -0,0 +1,31 @@
+//
+// Copyright (C) 2005, 2006, 2007, 2008 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 3 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
+
+#ifndef __FLASH_UTILS_PACKAGE_H__
+#define __FLASH_UTILS_PACKAGE_H__
+
+namespace gnash {
+
+class as_object;
+
+void flash_utils_package_init(as_object& pkg);
+
+} // end of gnash namespace
+
+// __FLASH_UTILS_PACKAGE_H__
+#endif
+
=== modified file 'libcore/asobj/flash_pkg.cpp'
--- a/libcore/asobj/flash_pkg.cpp 2008-05-19 15:49:57 +0000
+++ b/libcore/asobj/flash_pkg.cpp 2008-08-27 05:27:40 +0000
@@ -28,6 +28,7 @@
#include "flash/geom_pkg.h"
#include "flash/net_pkg.h"
#include "flash/text_pkg.h"
+#include "flash/utils_pkg.h"
namespace gnash {
@@ -46,7 +47,7 @@
flash_geom_package_init(*pkg);
flash_net_package_init(*pkg);
flash_text_package_init(*pkg);
-
+ flash_utils_package_init(*pkg);
return pkg;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/avm2 r9527: Add flash.utils package to actionscript objects.,
Tom Stellard <=