[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/asobj/Makefile.am server...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/asobj/Makefile.am server... |
Date: |
Mon, 05 May 2008 08:57:34 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/05/05 08:57:34
Modified files:
. : ChangeLog
server/asobj : Makefile.am
Added files:
server/asobj : flash_pkg.cpp flash_pkg.h
server/asobj/flash: display_pkg.cpp display_pkg.h
external_pkg.cpp external_pkg.h
filters_pkg.cpp filters_pkg.h geom_pkg.cpp
geom_pkg.h net_pkg.cpp net_pkg.h
text_pkg.cpp text_pkg.h
server/asobj/flash/display: BitmapData_as.cpp BitmapData_as.h
server/asobj/flash/external: ExternalInterface_as.cpp
ExternalInterface_as.h
server/asobj/flash/filters: BevelFilter_as.cpp BevelFilter_as.h
BitmapFilter_as.cpp
BitmapFilter_as.h BlurFilter_as.cpp
BlurFilter_as.h
ColorMatrixFilter_as.cpp
ColorMatrixFilter_as.h
ConvolutionFilter_as.cpp
ConvolutionFilter_as.h
DisplacementMapFilter_as.cpp
DisplacementMapFilter_as.h
DropShadowFilter_as.cpp
DropShadowFilter_as.h
GlowFilter_as.cpp GlowFilter_as.h
GradientBevelFilter_as.cpp
GradientBevelFilter_as.h
GradientGlowFilter_as.cpp
GradientGlowFilter_as.h
server/asobj/flash/geom: ColorTransform_as.cpp
ColorTransform_as.h Matrix_as.cpp
Matrix_as.h Point_as.cpp Point_as.h
Rectangle_as.cpp Rectangle_as.h
Transform_as.cpp Transform_as.h
server/asobj/flash/net: FileReferenceList_as.cpp
FileReferenceList_as.h
FileReference_as.cpp FileReference_as.h
server/asobj/flash/text: TextRenderer_as.cpp TextRenderer_as.h
Removed files:
server/asobj : BevelFilter_as.cpp BevelFilter_as.h
BitmapFilter_as.cpp BitmapFilter_as.h
BlurFilter_as.cpp BlurFilter_as.h
ColorMatrixFilter_as.cpp ColorMatrixFilter_as.h
ConvolutionFilter_as.cpp ConvolutionFilter_as.h
DropShadowFilter_as.cpp DropShadowFilter_as.h
GlowFilter_as.cpp GlowFilter_as.h
GradientBevelFilter_as.cpp
GradientBevelFilter_as.h
GradientGlowFilter_as.cpp
GradientGlowFilter_as.h
Log message:
* server/asobj/: create a new subtree for the 'flash'
ActionScript package. Stub all known classes there, moving
also there the existing BitmapFilter classes which belongs
in the flash.filters package.
NOTE: the package initialization function is not called
currently, I think we should call them from destructive
native getter-setters.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6497&r2=1.6498
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Makefile.am?cvsroot=gnash&r1=1.53&r2=1.54
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash_pkg.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash_pkg.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/BevelFilter_as.cpp?cvsroot=gnash&r1=1.9&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/BevelFilter_as.h?cvsroot=gnash&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/BitmapFilter_as.cpp?cvsroot=gnash&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/BitmapFilter_as.h?cvsroot=gnash&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/BlurFilter_as.cpp?cvsroot=gnash&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/BlurFilter_as.h?cvsroot=gnash&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/ColorMatrixFilter_as.cpp?cvsroot=gnash&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/ColorMatrixFilter_as.h?cvsroot=gnash&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/ConvolutionFilter_as.cpp?cvsroot=gnash&r1=1.7&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/ConvolutionFilter_as.h?cvsroot=gnash&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/DropShadowFilter_as.cpp?cvsroot=gnash&r1=1.7&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/DropShadowFilter_as.h?cvsroot=gnash&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/GlowFilter_as.cpp?cvsroot=gnash&r1=1.7&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/GlowFilter_as.h?cvsroot=gnash&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/GradientBevelFilter_as.cpp?cvsroot=gnash&r1=1.7&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/GradientBevelFilter_as.h?cvsroot=gnash&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/GradientGlowFilter_as.cpp?cvsroot=gnash&r1=1.7&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/GradientGlowFilter_as.h?cvsroot=gnash&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/display_pkg.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/display_pkg.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/external_pkg.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/external_pkg.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters_pkg.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters_pkg.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/geom_pkg.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/geom_pkg.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/net_pkg.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/net_pkg.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/text_pkg.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/text_pkg.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/display/BitmapData_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/display/BitmapData_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/external/ExternalInterface_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/external/ExternalInterface_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/BevelFilter_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/BevelFilter_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/BitmapFilter_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/BitmapFilter_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/BlurFilter_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/BlurFilter_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/ColorMatrixFilter_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/ColorMatrixFilter_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/ConvolutionFilter_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/ConvolutionFilter_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/DisplacementMapFilter_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/DisplacementMapFilter_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/DropShadowFilter_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/DropShadowFilter_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/GlowFilter_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/GlowFilter_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/GradientBevelFilter_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/GradientBevelFilter_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/GradientGlowFilter_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/filters/GradientGlowFilter_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/geom/ColorTransform_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/geom/ColorTransform_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/geom/Matrix_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/geom/Matrix_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/geom/Point_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/geom/Point_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/geom/Rectangle_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/geom/Rectangle_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/geom/Transform_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/geom/Transform_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/net/FileReferenceList_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/net/FileReferenceList_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/net/FileReference_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/net/FileReference_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/text/TextRenderer_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/flash/text/TextRenderer_as.h?cvsroot=gnash&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6497
retrieving revision 1.6498
diff -u -b -r1.6497 -r1.6498
--- ChangeLog 5 May 2008 08:47:41 -0000 1.6497
+++ ChangeLog 5 May 2008 08:57:26 -0000 1.6498
@@ -1,3 +1,13 @@
+2008-05-05 Sandro Santilli <address@hidden>
+
+ * server/asobj/: create a new subtree for the 'flash'
+ ActionScript package. Stub all known classes there, moving
+ also there the existing BitmapFilter classes which belongs
+ in the flash.filters package.
+ NOTE: the package initialization function is not called
+ currently, I think we should call them from destructive
+ native getter-setters.
+
2008-05-05 Udo Giacomozzi <address@hidden>
* server/shape.h: Add isClosed() to Path class
Index: server/asobj/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Makefile.am,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- server/asobj/Makefile.am 10 Apr 2008 00:41:08 -0000 1.53
+++ server/asobj/Makefile.am 5 May 2008 08:57:28 -0000 1.54
@@ -44,24 +44,15 @@
libgnashasobjs_la_SOURCES = \
AsBroadcaster.cpp \
- BevelFilter_as.cpp \
- BitmapFilter_as.cpp \
Boolean.cpp \
- BlurFilter_as.cpp \
Camera.cpp \
ClassHierarchy.cpp \
Color.cpp \
- ColorMatrixFilter_as.cpp \
ContextMenu.cpp \
- ConvolutionFilter_as.cpp \
CustomActions.cpp\
Date.cpp \
- DropShadowFilter_as.cpp \
Error.cpp \
Global.cpp \
- GlowFilter_as.cpp \
- GradientBevelFilter_as.cpp \
- GradientGlowFilter_as.cpp \
Key.cpp \
LoadVars.cpp \
LocalConnection.cpp\
@@ -85,29 +76,47 @@
xmlattrs.cpp \
xmlnode.cpp \
xmlsocket.cpp \
+ flash/display/BitmapData_as.cpp \
+ flash/display_pkg.cpp \
+ flash/external/ExternalInterface_as.cpp \
+ flash/external_pkg.cpp \
+ flash/filters/BevelFilter_as.cpp \
+ flash/filters/BitmapFilter_as.cpp \
+ flash/filters/DisplacementMapFilter_as.cpp \
+ flash/filters/BlurFilter_as.cpp \
+ flash/filters/ColorMatrixFilter_as.cpp \
+ flash/filters/ConvolutionFilter_as.cpp \
+ flash/filters/DropShadowFilter_as.cpp \
+ flash/filters/GlowFilter_as.cpp \
+ flash/filters/GradientBevelFilter_as.cpp \
+ flash/filters/GradientGlowFilter_as.cpp \
+ flash/filters_pkg.cpp \
+ flash/geom/ColorTransform_as.cpp \
+ flash/geom/Matrix_as.cpp \
+ flash/geom_pkg.cpp \
+ flash/geom/Point_as.cpp \
+ flash/geom/Rectangle_as.cpp \
+ flash/geom/Transform_as.cpp \
+ flash/net/FileReference_as.cpp \
+ flash/net/FileReferenceList_as.cpp \
+ flash/net_pkg.cpp \
+ flash_pkg.cpp \
+ flash/text_pkg.cpp \
+ flash/text/TextRenderer_as.cpp \
$(NULL)
noinst_HEADERS = \
AsBroadcaster.h \
- BevelFilter_as.h \
- BitmapFilter_as.h \
Boolean.h \
- BlurFilter_as.h \
Camera.h \
ClassHierarchy.h \
Color.h \
- ColorMatrixFilter_as.h \
ContextMenu.h \
- ConvolutionFilter_as.h \
CustomActions.h \
Date.h \
- DropShadowFilter_as.h \
Error.h \
GMath.h \
Global.h\
- GlowFilter_as.h \
- GradientBevelFilter_as.h \
- GradientGlowFilter_as.h \
Key.h \
LoadVars.h \
LocalConnection.h\
@@ -136,6 +145,33 @@
xmlsocket.h \
xmlattrs.h \
xmlnode.h \
+ flash/display/BitmapData_as.h \
+ flash/display_pkg.h \
+ flash/external/ExternalInterface_as.h \
+ flash/external_pkg.h \
+ flash/filters/BevelFilter_as.h \
+ flash/filters/BitmapFilter_as.h \
+ flash/filters/DisplacementMapFilter_as.h \
+ flash/filters/BlurFilter_as.h \
+ flash/filters/ColorMatrixFilter_as.h \
+ flash/filters/ConvolutionFilter_as.h \
+ flash/filters/DropShadowFilter_as.h \
+ flash/filters/GlowFilter_as.h \
+ flash/filters/GradientBevelFilter_as.h \
+ flash/filters/GradientGlowFilter_as.h \
+ flash/filters_pkg.h \
+ flash/geom/ColorTransform_as.h \
+ flash/geom/Matrix_as.h \
+ flash/geom_pkg.h \
+ flash/geom/Point_as.h \
+ flash/geom/Rectangle_as.h \
+ flash/geom/Transform_as.h \
+ flash/net/FileReference_as.h \
+ flash/net/FileReferenceList_as.h \
+ flash/net_pkg.h \
+ flash_pkg.h \
+ flash/text_pkg.h \
+ flash/text/TextRenderer_as.h \
$(NULL)
libgnashasobjs_la_LIBADD = \
Index: server/asobj/flash_pkg.cpp
===================================================================
RCS file: server/asobj/flash_pkg.cpp
diff -N server/asobj/flash_pkg.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash_pkg.cpp 5 May 2008 08:57:28 -0000 1.1
@@ -0,0 +1,54 @@
+// flash_pkg.cpp: ActionScript "flash" 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 "log.h"
+#include "VM.h" // for getPlayerVersion()
+#include "Object.h" // for getObjectInterface
+#include "as_object.h"
+
+#include "flash/display_pkg.h"
+#include "flash/external_pkg.h"
+#include "flash/filters_pkg.h"
+#include "flash/geom_pkg.h"
+#include "flash/net_pkg.h"
+#include "flash/text_pkg.h"
+
+namespace gnash {
+
+void
+flash_package_init(as_object& global)
+{
+ assert(global.getVM().getSWFVersion() >= 8);
+
+ as_object* pkg = new as_object(getObjectInterface());
+
+ // sub-packages:
+ // TODO: use a destructive getter-setter for these
+ flash_display_package_init(*pkg);
+ flash_external_package_init(*pkg);
+ flash_filters_package_init(*pkg);
+ flash_geom_package_init(*pkg);
+ flash_net_package_init(*pkg);
+ flash_text_package_init(*pkg);
+
+ // TODO: use a destructive getter-setter
+ global.init_member("flash", pkg);
+}
+
+} // end of gnash namespace
Index: server/asobj/flash_pkg.h
===================================================================
RCS file: server/asobj/flash_pkg.h
diff -N server/asobj/flash_pkg.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash_pkg.h 5 May 2008 08:57:28 -0000 1.1
@@ -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_PACKAGE_H__
+#define __FLASH_PACKAGE_H__
+
+namespace gnash {
+
+class as_object;
+
+void flash_package_init(as_object& global);
+
+} // end of gnash namespace
+
+// __FLASH_PACKAGE_H__
+#endif
+
Index: server/asobj/flash/display_pkg.cpp
===================================================================
RCS file: server/asobj/flash/display_pkg.cpp
diff -N server/asobj/flash/display_pkg.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/display_pkg.cpp 5 May 2008 08:57:29 -0000 1.1
@@ -0,0 +1,38 @@
+// display_pkg.cpp: ActionScript "flash.display" 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 "flash/display/BitmapData_as.h"
+
+namespace gnash {
+
+void
+flash_display_package_init(as_object& where)
+{
+ as_object* pkg = new as_object(getObjectInterface());
+
+ BitmapData_class_init(*pkg);
+
+ where.init_member("display", pkg);
+}
+
+
+} // end of gnash namespace
Index: server/asobj/flash/display_pkg.h
===================================================================
RCS file: server/asobj/flash/display_pkg.h
diff -N server/asobj/flash/display_pkg.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/display_pkg.h 5 May 2008 08:57:29 -0000 1.1
@@ -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_DISPLAY_PACKAGE_H__
+#define __FLASH_DISPLAY_PACKAGE_H__
+
+namespace gnash {
+
+class as_object;
+
+void flash_display_package_init(as_object& pkg);
+
+} // end of gnash namespace
+
+// __FLASH_DISPLAY_PACKAGE_H__
+#endif
+
Index: server/asobj/flash/external_pkg.cpp
===================================================================
RCS file: server/asobj/flash/external_pkg.cpp
diff -N server/asobj/flash/external_pkg.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/external_pkg.cpp 5 May 2008 08:57:29 -0000 1.1
@@ -0,0 +1,38 @@
+// external_pkg.cpp: ActionScript "flash.external" 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 "flash/external/ExternalInterface_as.h"
+
+namespace gnash {
+
+void
+flash_external_package_init(as_object& where)
+{
+ as_object* pkg = new as_object(getObjectInterface());
+
+ ExternalInterface_class_init(*pkg);
+
+ where.init_member("geom", pkg);
+}
+
+
+} // end of gnash namespace
Index: server/asobj/flash/external_pkg.h
===================================================================
RCS file: server/asobj/flash/external_pkg.h
diff -N server/asobj/flash/external_pkg.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/external_pkg.h 5 May 2008 08:57:29 -0000 1.1
@@ -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_EXTERNAL_PACKAGE_H__
+#define __FLASH_EXTERNAL_PACKAGE_H__
+
+namespace gnash {
+
+class as_object;
+
+void flash_external_package_init(as_object& pkg);
+
+} // end of gnash namespace
+
+// __FLASH_EXTERNAL_PACKAGE_H__
+#endif
+
Index: server/asobj/flash/filters_pkg.cpp
===================================================================
RCS file: server/asobj/flash/filters_pkg.cpp
diff -N server/asobj/flash/filters_pkg.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters_pkg.cpp 5 May 2008 08:57:29 -0000 1.1
@@ -0,0 +1,56 @@
+// filters_pkg.cpp: ActionScript "flash.filters" 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 "flash/filters/BevelFilter_as.h"
+#include "flash/filters/BitmapFilter_as.h"
+#include "flash/filters/BlurFilter_as.h"
+#include "flash/filters/ColorMatrixFilter_as.h"
+#include "flash/filters/ConvolutionFilter_as.h"
+#include "flash/filters/DisplacementMapFilter_as.h"
+#include "flash/filters/DropShadowFilter_as.h"
+#include "flash/filters/GlowFilter_as.h"
+#include "flash/filters/GradientBevelFilter_as.h"
+#include "flash/filters/GradientGlowFilter_as.h"
+
+namespace gnash {
+
+void
+flash_filters_package_init(as_object& where)
+{
+ as_object* pkg = new as_object(getObjectInterface());
+
+ BevelFilter_class_init(*pkg);
+ BitmapFilter_class_init(*pkg);
+ BlurFilter_class_init(*pkg);
+ ColorMatrixFilter_class_init(*pkg);
+ ConvolutionFilter_class_init(*pkg);
+ DisplacementMapFilter_class_init(*pkg);
+ DropShadowFilter_class_init(*pkg);
+ GlowFilter_class_init(*pkg);
+ GradientBevelFilter_class_init(*pkg);
+ GradientGlowFilter_class_init(*pkg);
+
+ where.init_member("filters", pkg);
+}
+
+
+} // end of gnash namespace
Index: server/asobj/flash/filters_pkg.h
===================================================================
RCS file: server/asobj/flash/filters_pkg.h
diff -N server/asobj/flash/filters_pkg.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters_pkg.h 5 May 2008 08:57:29 -0000 1.1
@@ -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_FILTERS_PACKAGE_H__
+#define __FLASH_FILTERS_PACKAGE_H__
+
+namespace gnash {
+
+class as_object;
+
+void flash_filters_package_init(as_object& pkg);
+
+} // end of gnash namespace
+
+// __FLASH_FILTERS_PACKAGE_H__
+#endif
+
Index: server/asobj/flash/geom_pkg.cpp
===================================================================
RCS file: server/asobj/flash/geom_pkg.cpp
diff -N server/asobj/flash/geom_pkg.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/geom_pkg.cpp 5 May 2008 08:57:29 -0000 1.1
@@ -0,0 +1,46 @@
+// geom_pkg.cpp: ActionScript "flash.geom" 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 "flash/geom/ColorTransform_as.h"
+#include "flash/geom/Matrix_as.h"
+#include "flash/geom/Point_as.h"
+#include "flash/geom/Rectangle_as.h"
+#include "flash/geom/Transform_as.h"
+
+namespace gnash {
+
+void
+flash_geom_package_init(as_object& where)
+{
+ as_object* pkg = new as_object(getObjectInterface());
+
+ ColorTransform_class_init(*pkg);
+ Matrix_class_init(*pkg);
+ Point_class_init(*pkg);
+ Rectangle_class_init(*pkg);
+ Transform_class_init(*pkg);
+
+ where.init_member("geom", pkg);
+}
+
+
+} // end of gnash namespace
Index: server/asobj/flash/geom_pkg.h
===================================================================
RCS file: server/asobj/flash/geom_pkg.h
diff -N server/asobj/flash/geom_pkg.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/geom_pkg.h 5 May 2008 08:57:29 -0000 1.1
@@ -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_GEOM_PACKAGE_H__
+#define __FLASH_GEOM_PACKAGE_H__
+
+namespace gnash {
+
+class as_object;
+
+void flash_geom_package_init(as_object& pkg);
+
+} // end of gnash namespace
+
+// __FLASH_GEOM_PACKAGE_H__
+#endif
+
Index: server/asobj/flash/net_pkg.cpp
===================================================================
RCS file: server/asobj/flash/net_pkg.cpp
diff -N server/asobj/flash/net_pkg.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/net_pkg.cpp 5 May 2008 08:57:29 -0000 1.1
@@ -0,0 +1,40 @@
+// net_pkg.cpp: ActionScript "flash.net" 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 "flash/net/FileReference_as.h"
+#include "flash/net/FileReferenceList_as.h"
+
+namespace gnash {
+
+void
+flash_net_package_init(as_object& where)
+{
+ as_object* pkg = new as_object(getObjectInterface());
+
+ FileReference_class_init(*pkg);
+ FileReferenceList_class_init(*pkg);
+
+ where.init_member("geom", pkg);
+}
+
+
+} // end of gnash namespace
Index: server/asobj/flash/net_pkg.h
===================================================================
RCS file: server/asobj/flash/net_pkg.h
diff -N server/asobj/flash/net_pkg.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/net_pkg.h 5 May 2008 08:57:29 -0000 1.1
@@ -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_NET_PACKAGE_H__
+#define __FLASH_NET_PACKAGE_H__
+
+namespace gnash {
+
+class as_object;
+
+void flash_net_package_init(as_object& pkg);
+
+} // end of gnash namespace
+
+// __FLASH_NET_PACKAGE_H__
+#endif
+
Index: server/asobj/flash/text_pkg.cpp
===================================================================
RCS file: server/asobj/flash/text_pkg.cpp
diff -N server/asobj/flash/text_pkg.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/text_pkg.cpp 5 May 2008 08:57:29 -0000 1.1
@@ -0,0 +1,38 @@
+// text_pkg.cpp: ActionScript "flash.text" 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 "flash/text/TextRenderer_as.h"
+
+namespace gnash {
+
+void
+flash_text_package_init(as_object& where)
+{
+ as_object* pkg = new as_object(getObjectInterface());
+
+ TextRenderer_class_init(*pkg);
+
+ where.init_member("geom", pkg);
+}
+
+
+} // end of gnash namespace
Index: server/asobj/flash/text_pkg.h
===================================================================
RCS file: server/asobj/flash/text_pkg.h
diff -N server/asobj/flash/text_pkg.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/text_pkg.h 5 May 2008 08:57:29 -0000 1.1
@@ -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_TEXT_PACKAGE_H__
+#define __FLASH_TEXT_PACKAGE_H__
+
+namespace gnash {
+
+class as_object;
+
+void flash_text_package_init(as_object& pkg);
+
+} // end of gnash namespace
+
+// __FLASH_TEXT_PACKAGE_H__
+#endif
+
Index: server/asobj/flash/display/BitmapData_as.cpp
===================================================================
RCS file: server/asobj/flash/display/BitmapData_as.cpp
diff -N server/asobj/flash/display/BitmapData_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/display/BitmapData_as.cpp 5 May 2008 08:57:30
-0000 1.1
@@ -0,0 +1,373 @@
+// BitmapData_as.cpp: ActionScript "BitmapData" class, 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
+//
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "BitmapData_as.h"
+#include "as_object.h" // for inheritance
+#include "log.h"
+#include "fn_call.h"
+#include "smart_ptr.h" // for boost intrusive_ptr
+#include "builtin_function.h" // need builtin_function
+#include "GnashException.h" // for ActionException
+#include "Object.h" // for AS inheritance
+
+#include <sstream>
+
+namespace gnash {
+
+static as_value BitmapData_applyFilter(const fn_call& fn);
+static as_value BitmapData_clone(const fn_call& fn);
+static as_value BitmapData_colorTransform(const fn_call& fn);
+static as_value BitmapData_copyChannel(const fn_call& fn);
+static as_value BitmapData_copyPixels(const fn_call& fn);
+static as_value BitmapData_dispose(const fn_call& fn);
+static as_value BitmapData_draw(const fn_call& fn);
+static as_value BitmapData_fillRect(const fn_call& fn);
+static as_value BitmapData_floodFill(const fn_call& fn);
+static as_value BitmapData_generateFilterRect(const fn_call& fn);
+static as_value BitmapData_getColorBoundsRect(const fn_call& fn);
+static as_value BitmapData_getPixel(const fn_call& fn);
+static as_value BitmapData_getPixel32(const fn_call& fn);
+static as_value BitmapData_hitTest(const fn_call& fn);
+static as_value BitmapData_loadBitmap(const fn_call& fn);
+static as_value BitmapData_merge(const fn_call& fn);
+static as_value BitmapData_noise(const fn_call& fn);
+static as_value BitmapData_paletteMap(const fn_call& fn);
+static as_value BitmapData_perlinNoise(const fn_call& fn);
+static as_value BitmapData_pixelDissolve(const fn_call& fn);
+static as_value BitmapData_scroll(const fn_call& fn);
+static as_value BitmapData_setPixel(const fn_call& fn);
+static as_value BitmapData_setPixel32(const fn_call& fn);
+static as_value BitmapData_threshold(const fn_call& fn);
+as_value BitmapData_ctor(const fn_call& fn);
+
+static void
+attachBitmapDataInterface(as_object& o)
+{
+ o.init_member("applyFilter", new builtin_function(BitmapData_applyFilter));
+ o.init_member("clone", new builtin_function(BitmapData_clone));
+ o.init_member("colorTransform", new
builtin_function(BitmapData_colorTransform));
+ o.init_member("copyChannel", new builtin_function(BitmapData_copyChannel));
+ o.init_member("copyPixels", new builtin_function(BitmapData_copyPixels));
+ o.init_member("dispose", new builtin_function(BitmapData_dispose));
+ o.init_member("draw", new builtin_function(BitmapData_draw));
+ o.init_member("fillRect", new builtin_function(BitmapData_fillRect));
+ o.init_member("floodFill", new builtin_function(BitmapData_floodFill));
+ o.init_member("generateFilterRect", new
builtin_function(BitmapData_generateFilterRect));
+ o.init_member("getColorBoundsRect", new
builtin_function(BitmapData_getColorBoundsRect));
+ o.init_member("getPixel", new builtin_function(BitmapData_getPixel));
+ o.init_member("getPixel32", new builtin_function(BitmapData_getPixel32));
+ o.init_member("hitTest", new builtin_function(BitmapData_hitTest));
+ o.init_member("loadBitmap", new builtin_function(BitmapData_loadBitmap));
+ o.init_member("merge", new builtin_function(BitmapData_merge));
+ o.init_member("noise", new builtin_function(BitmapData_noise));
+ o.init_member("paletteMap", new builtin_function(BitmapData_paletteMap));
+ o.init_member("perlinNoise", new builtin_function(BitmapData_perlinNoise));
+ o.init_member("pixelDissolve", new
builtin_function(BitmapData_pixelDissolve));
+ o.init_member("scroll", new builtin_function(BitmapData_scroll));
+ o.init_member("setPixel", new builtin_function(BitmapData_setPixel));
+ o.init_member("setPixel32", new builtin_function(BitmapData_setPixel32));
+ o.init_member("threshold", new builtin_function(BitmapData_threshold));
+}
+
+static as_object*
+getBitmapDataInterface()
+{
+ static boost::intrusive_ptr<as_object> o;
+ if ( ! o )
+ {
+ // TODO: check if this class should inherit from Object
+ // or from a different class
+ o = new as_object(getObjectInterface());
+ attachBitmapDataInterface(*o);
+ }
+ return o.get();
+}
+
+class BitmapData_as: public as_object
+{
+
+public:
+
+ BitmapData_as()
+ :
+ as_object(getBitmapDataInterface())
+ {}
+
+ // override from as_object ?
+ //std::string get_text_value() const { return "BitmapData"; }
+
+ // override from as_object ?
+ //double get_numeric_value() const { return 0; }
+};
+
+
+static as_value
+BitmapData_applyFilter(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_clone(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_colorTransform(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_copyChannel(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_copyPixels(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_dispose(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_draw(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_fillRect(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_floodFill(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_generateFilterRect(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_getColorBoundsRect(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_getPixel(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_getPixel32(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_hitTest(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_loadBitmap(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_merge(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_noise(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_paletteMap(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_perlinNoise(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_pixelDissolve(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_scroll(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_setPixel(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_setPixel32(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+BitmapData_threshold(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapData_as> ptr =
ensureType<BitmapData_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+as_value
+BitmapData_ctor(const fn_call& fn)
+{
+ boost::intrusive_ptr<as_object> obj = new BitmapData_as;
+
+ if ( fn.nargs )
+ {
+ std::stringstream ss;
+ fn.dump_args(ss);
+ LOG_ONCE( log_unimpl("BitmapData(%s): %s", ss.str(),
_("arguments discarded")) );
+ }
+
+ return as_value(obj.get()); // will keep alive
+}
+
+// extern (used by Global.cpp)
+void BitmapData_class_init(as_object& global)
+{
+ // This is going to be the global BitmapData "class"/"function"
+ static boost::intrusive_ptr<builtin_function> cl;
+
+ if ( cl == NULL )
+ {
+ cl=new builtin_function(&BitmapData_ctor,
getBitmapDataInterface());
+ // replicate all interface to class, to be able to access
+ // all methods as static functions
+ attachBitmapDataInterface(*cl);
+ }
+
+ // Register _global.BitmapData
+ global.init_member("BitmapData", cl.get());
+}
+
+} // end of gnash namespace
Index: server/asobj/flash/display/BitmapData_as.h
===================================================================
RCS file: server/asobj/flash/display/BitmapData_as.h
diff -N server/asobj/flash/display/BitmapData_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/display/BitmapData_as.h 5 May 2008 08:57:30 -0000
1.1
@@ -0,0 +1,42 @@
+// BitmapData_as.h: ActionScript "BitmapData" class, 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
+//
+
+#ifndef __GNASH_ASOBJ_BITMAPDATA_H__
+#define __GNASH_ASOBJ_BITMAPDATA_H__
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+//#include <memory> // for auto_ptr
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global BitmapData class
+void BitmapData_class_init(as_object& global);
+
+/// Return a BitmapData instance (in case the core lib needs it)
+//std::auto_ptr<as_object> init_BitmapData_instance();
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_BITMAPDATA_H__
+#endif
Index: server/asobj/flash/external/ExternalInterface_as.cpp
===================================================================
RCS file: server/asobj/flash/external/ExternalInterface_as.cpp
diff -N server/asobj/flash/external/ExternalInterface_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/external/ExternalInterface_as.cpp 5 May 2008
08:57:30 -0000 1.1
@@ -0,0 +1,131 @@
+// ExternalInterface_as.cpp: ActionScript "ExternalInterface" class, 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
+//
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "ExternalInterface_as.h"
+#include "as_object.h" // for inheritance
+#include "log.h"
+#include "fn_call.h"
+#include "smart_ptr.h" // for boost intrusive_ptr
+#include "builtin_function.h" // need builtin_function
+#include "GnashException.h" // for ActionException
+#include "Object.h" // for AS inheritance
+
+#include <sstream>
+
+namespace gnash {
+
+static as_value ExternalInterface_addCallback(const fn_call& fn);
+static as_value ExternalInterface_call(const fn_call& fn);
+as_value ExternalInterface_ctor(const fn_call& fn);
+
+static void
+attachExternalInterfaceInterface(as_object& o)
+{
+ o.init_member("addCallback", new
builtin_function(ExternalInterface_addCallback));
+ o.init_member("call", new builtin_function(ExternalInterface_call));
+}
+
+static as_object*
+getExternalInterfaceInterface()
+{
+ static boost::intrusive_ptr<as_object> o;
+ if ( ! o )
+ {
+ // TODO: check if this class should inherit from Object
+ // or from a different class
+ o = new as_object(getObjectInterface());
+ attachExternalInterfaceInterface(*o);
+ }
+ return o.get();
+}
+
+class ExternalInterface_as: public as_object
+{
+
+public:
+
+ ExternalInterface_as()
+ :
+ as_object(getExternalInterfaceInterface())
+ {}
+
+ // override from as_object ?
+ //std::string get_text_value() const { return "ExternalInterface"; }
+
+ // override from as_object ?
+ //double get_numeric_value() const { return 0; }
+};
+
+
+static as_value
+ExternalInterface_addCallback(const fn_call& fn)
+{
+ boost::intrusive_ptr<ExternalInterface_as> ptr =
ensureType<ExternalInterface_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+ExternalInterface_call(const fn_call& fn)
+{
+ boost::intrusive_ptr<ExternalInterface_as> ptr =
ensureType<ExternalInterface_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+as_value
+ExternalInterface_ctor(const fn_call& fn)
+{
+ boost::intrusive_ptr<as_object> obj = new ExternalInterface_as;
+
+ if ( fn.nargs )
+ {
+ std::stringstream ss;
+ fn.dump_args(ss);
+ LOG_ONCE( log_unimpl("ExternalInterface(%s): %s", ss.str(),
_("arguments discarded")) );
+ }
+
+ return as_value(obj.get()); // will keep alive
+}
+
+// extern (used by Global.cpp)
+void ExternalInterface_class_init(as_object& global)
+{
+ // This is going to be the global ExternalInterface "class"/"function"
+ static boost::intrusive_ptr<builtin_function> cl;
+
+ if ( cl == NULL )
+ {
+ cl=new builtin_function(&ExternalInterface_ctor,
getExternalInterfaceInterface());
+ // replicate all interface to class, to be able to access
+ // all methods as static functions
+ attachExternalInterfaceInterface(*cl);
+ }
+
+ // Register _global.ExternalInterface
+ global.init_member("ExternalInterface", cl.get());
+}
+
+} // end of gnash namespace
Index: server/asobj/flash/external/ExternalInterface_as.h
===================================================================
RCS file: server/asobj/flash/external/ExternalInterface_as.h
diff -N server/asobj/flash/external/ExternalInterface_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/external/ExternalInterface_as.h 5 May 2008 08:57:30
-0000 1.1
@@ -0,0 +1,42 @@
+// ExternalInterface_as.h: ActionScript "ExternalInterface" class, 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
+//
+
+#ifndef __GNASH_ASOBJ_EXTERNALINTERFACE_H__
+#define __GNASH_ASOBJ_EXTERNALINTERFACE_H__
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+//#include <memory> // for auto_ptr
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global ExternalInterface class
+void ExternalInterface_class_init(as_object& global);
+
+/// Return a ExternalInterface instance (in case the core lib needs it)
+//std::auto_ptr<as_object> init_ExternalInterface_instance();
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_EXTERNALINTERFACE_H__
+#endif
Index: server/asobj/flash/filters/BevelFilter_as.cpp
===================================================================
RCS file: server/asobj/flash/filters/BevelFilter_as.cpp
diff -N server/asobj/flash/filters/BevelFilter_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/BevelFilter_as.cpp 5 May 2008 08:57:30
-0000 1.1
@@ -0,0 +1,133 @@
+//
+// Copyright (C) 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 "as_object.h"
+#include "BevelFilter.h"
+#include "VM.h"
+#include "builtin_function.h"
+
+// These _must_ be defined for prophelpers to work correctly.
+// This is enforced by the file itself.
+#define phelp_helper BevelFilter_as
+#include "prophelper.h"
+#include "flash/filters/BitmapFilter_as.h"
+
+namespace gnash {
+
+class BevelFilter_as : public as_object, public BevelFilter
+{
+public:
+ phelp_gs(distance);
+ phelp_gs(angle);
+ phelp_gs(highlightColor);
+ phelp_gs(highlightAlpha);
+ phelp_gs(shadowColor);
+ phelp_gs(shadowAlpha);
+ phelp_gs(blurX);
+ phelp_gs(blurY);
+ phelp_gs(strength);
+ phelp_gs(quality);
+ phelp_gs(type);
+ phelp_gs(knockout);
+
+ phelp_i(bitmap_clone);
+private:
+ phelp_base_def;
+};
+
+phelp_base_imp((bitmapFilter_interface()), BevelFilter)
+
+// Replace BitmapFilter clone.
+phelp_i_attach_begin
+phelp_i_replace(clone, bitmap_clone);
+phelp_i_attach_end
+
+// Begin attaching properties, then attach them, then end.
+phelp_gs_attach_begin
+phelp_gs_attach(distance);
+phelp_gs_attach(angle);
+phelp_gs_attach(highlightColor);
+phelp_gs_attach(highlightAlpha);
+phelp_gs_attach(shadowColor);
+phelp_gs_attach(shadowAlpha);
+phelp_gs_attach(blurX);
+phelp_gs_attach(blurY);
+phelp_gs_attach(strength);
+phelp_gs_attach(quality);
+phelp_gs_attach(type);
+phelp_gs_attach(knockout);
+phelp_gs_attach_end
+
+phelp_property(float, number<float>, distance)
+phelp_property(float, number<float>, angle)
+phelp_property(boost::uint32_t, number<boost::uint32_t>, highlightColor)
+phelp_property(boost::uint8_t, number<boost::uint8_t>, highlightAlpha)
+phelp_property(boost::uint32_t, number<boost::uint32_t>, shadowColor)
+phelp_property(boost::uint8_t, number<boost::uint8_t>, shadowAlpha)
+phelp_property(float, number<float>, blurX)
+phelp_property(float, number<float>, blurY)
+phelp_property(float, number<float>, strength)
+phelp_property(boost::uint8_t, number<boost::uint8_t>, quality)
+phelp_property(bool, bool, knockout)
+
+easy_clone(BevelFilter_as)
+
+as_value
+BevelFilter_as::type_gs(const fn_call& fn)
+{
+ boost::intrusive_ptr<BevelFilter_as> ptr =
ensureType<BevelFilter_as>(fn.this_ptr);
+
+ if (fn.nargs == 0) // getter
+ {
+ switch (ptr->m_type)
+ {
+ case BevelFilter::FULL_BEVEL:
+ return as_value("full");
+ break;
+ default:
+ case BevelFilter::INNER_BEVEL:
+ return as_value("inner");
+ break;
+ case BevelFilter::OUTER_BEVEL:
+ return as_value("outer");
+ break;
+ }
+ }
+ // setter
+ std::string type = fn.arg(0).to_string();
+ if (type == "outer")
+ ptr->m_type = BevelFilter::OUTER_BEVEL;
+ if (type == "inner")
+ ptr->m_type = BevelFilter::INNER_BEVEL;
+ if (type == "full")
+ ptr->m_type = BevelFilter::FULL_BEVEL;
+
+ return as_value();
+}
+
+as_value
+BevelFilter_as::ctor(const fn_call& /*fn*/)
+{
+ boost::intrusive_ptr<as_object> obj = new
BevelFilter_as(BevelFilter_as::Interface());
+ BevelFilter_as::attachProperties(*obj);
+
+ return as_value(obj.get());
+}
+
+} // Namespace gnash
+
Index: server/asobj/flash/filters/BevelFilter_as.h
===================================================================
RCS file: server/asobj/flash/filters/BevelFilter_as.h
diff -N server/asobj/flash/filters/BevelFilter_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/BevelFilter_as.h 5 May 2008 08:57:30 -0000
1.1
@@ -0,0 +1,33 @@
+//
+// Copyright (C) 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 __GNASH_ASOBJ_BEVELFILTER_H__
+#define __GNASH_ASOBJ_BEVELFILTER_H__
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global BitmapFilter class
+void BevelFilter_class_init(as_object& global);
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_BEVELFILTER_H__
+#endif
+
Index: server/asobj/flash/filters/BitmapFilter_as.cpp
===================================================================
RCS file: server/asobj/flash/filters/BitmapFilter_as.cpp
diff -N server/asobj/flash/filters/BitmapFilter_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/BitmapFilter_as.cpp 5 May 2008 08:57:30
-0000 1.1
@@ -0,0 +1,79 @@
+//
+// Copyright (C) 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 "as_object.h"
+#include "BitmapFilter.h"
+#include "VM.h"
+#include "builtin_function.h"
+
+#define phelp_helper BitmapFilter_as
+#define phelp_class BitmapFilter
+#include "prophelper.h"
+
+namespace gnash {
+
+class BitmapFilter_as : public as_object, public BitmapFilter
+{
+public:
+ phelp_i(bitmap_clone);
+
+ virtual boost::intrusive_ptr<as_object> clone();
+
+private:
+ phelp_base_def;
+};
+
+phelp_base_imp( , BitmapFilter)
+
+phelp_i_attach_begin
+phelp_i_attach(clone, bitmap_clone);
+phelp_i_attach_end
+
+// Clone this object.
+boost::intrusive_ptr<as_object> BitmapFilter_as::clone()
+{
+ boost::intrusive_ptr<as_object> o = new
BitmapFilter_as(BitmapFilter_as::Interface());
+ return o;
+}
+
+as_value
+BitmapFilter_as::ctor(const fn_call& /*fn*/)
+{
+ boost::intrusive_ptr<as_object> obj = new
BitmapFilter_as(BitmapFilter_as::Interface());
+ return as_value(obj);
+}
+
+as_value BitmapFilter_as::bitmap_clone(const fn_call& fn)
+{
+ boost::intrusive_ptr<BitmapFilter_as> to_copy =
ensureType<BitmapFilter_as> (fn.this_ptr);
+ boost::intrusive_ptr<BitmapFilter_as> filter = new
BitmapFilter_as(*to_copy);
+ filter->set_prototype(filter->get_prototype());
+ filter->copyProperties(*filter);
+ boost::intrusive_ptr<as_object> r = filter;
+
+ return as_value(r);
+}
+
+as_object*
+bitmapFilter_interface()
+{
+ return BitmapFilter_as::Interface();
+}
+
+} // Namespace gnash
+
Index: server/asobj/flash/filters/BitmapFilter_as.h
===================================================================
RCS file: server/asobj/flash/filters/BitmapFilter_as.h
diff -N server/asobj/flash/filters/BitmapFilter_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/BitmapFilter_as.h 5 May 2008 08:57:30
-0000 1.1
@@ -0,0 +1,56 @@
+//
+// Copyright (C) 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 __GNASH_ASOBJ_BITMAPFILTER_H__
+#define __GNASH_ASOBJ_BITMAPFILTER_H__
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global BitmapFilter class
+void BitmapFilter_class_init(as_object& global);
+
+/// Get the interface, for inheritance.
+as_object *bitmapFilter_interface();
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_BITMAPFILTER_H__
+#endif
+
+#ifdef phelp_helper
+#ifndef easy_clone
+#define easy_clone(sp_name) \
+as_value \
+sp_name::bitmap_clone(const fn_call& fn) \
+{ \
+ boost::intrusive_ptr<sp_name> ptr = ensureType<sp_name>(fn.this_ptr); \
+ boost::intrusive_ptr<sp_name> obj = new sp_name(*ptr); \
+ boost::intrusive_ptr<as_object> r = obj; \
+ r->set_prototype(ptr->get_prototype()); \
+ r->copyProperties(*ptr); \
+\
+ return as_value(r); \
+}
+#endif /* easy_clone */
+#endif /* phelp_helper */
Index: server/asobj/flash/filters/BlurFilter_as.cpp
===================================================================
RCS file: server/asobj/flash/filters/BlurFilter_as.cpp
diff -N server/asobj/flash/filters/BlurFilter_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/BlurFilter_as.cpp 5 May 2008 08:57:30
-0000 1.1
@@ -0,0 +1,72 @@
+//
+// Copyright (C) 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 "as_object.h"
+#include "BlurFilter.h"
+#include "VM.h"
+#include "builtin_function.h"
+
+// These _must_ be defined.
+#define phelp_helper BlurFilter_as
+#include "prophelper.h"
+#include "BitmapFilter_as.h"
+
+namespace gnash {
+
+class BlurFilter_as : public as_object, public BlurFilter
+{
+public:
+ phelp_gs(blurX);
+ phelp_gs(blurY);
+ phelp_gs(quality);
+
+ phelp_i(bitmap_clone);
+private:
+ phelp_base_def;
+};
+
+phelp_base_imp((bitmapFilter_interface()), BlurFilter)
+
+// Filters are property based.
+phelp_i_attach_begin
+phelp_i_replace(clone, bitmap_clone);
+phelp_i_attach_end
+
+phelp_gs_attach_begin
+phelp_gs_attach(blurX);
+phelp_gs_attach(blurY);
+phelp_gs_attach(quality);
+phelp_gs_attach_end
+
+phelp_property(float, number<float>, blurX)
+phelp_property(float, number<float>, blurY)
+phelp_property(boost::uint8_t, number<boost::uint8_t>, quality)
+
+easy_clone(BlurFilter_as)
+
+as_value
+BlurFilter_as::ctor(const fn_call& /*fn*/)
+{
+ boost::intrusive_ptr<as_object> obj = new
BlurFilter_as(BlurFilter_as::Interface());
+ BlurFilter_as::attachProperties(*obj);
+
+ return as_value(obj);
+}
+
+} // Namespace gnash
+
Index: server/asobj/flash/filters/BlurFilter_as.h
===================================================================
RCS file: server/asobj/flash/filters/BlurFilter_as.h
diff -N server/asobj/flash/filters/BlurFilter_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/BlurFilter_as.h 5 May 2008 08:57:30 -0000
1.1
@@ -0,0 +1,33 @@
+//
+// Copyright (C) 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 __GNASH_ASOBJ_BLURFILTER_H__
+#define __GNASH_ASOBJ_BLURFILTER_H__
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global BlurFilter class
+void BlurFilter_class_init(as_object& global);
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_BLURFILTER_H__
+#endif
+
Index: server/asobj/flash/filters/ColorMatrixFilter_as.cpp
===================================================================
RCS file: server/asobj/flash/filters/ColorMatrixFilter_as.cpp
diff -N server/asobj/flash/filters/ColorMatrixFilter_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/ColorMatrixFilter_as.cpp 5 May 2008 08:57:30
-0000 1.1
@@ -0,0 +1,66 @@
+//
+// Copyright (C) 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 "as_object.h"
+#include "ColorMatrixFilter.h"
+#include "VM.h"
+#include "builtin_function.h"
+
+#define phelp_helper ColorMatrixFilter_as
+#include "prophelper.h"
+#include "BitmapFilter_as.h"
+
+namespace gnash {
+
+class ColorMatrixFilter_as : public as_object, public ColorMatrixFilter
+{
+public:
+ phelp_gs(matrix);
+
+ phelp_i(bitmap_clone);
+
+private:
+ phelp_base_def;
+};
+
+phelp_base_imp((bitmapFilter_interface()), ColorMatrixFilter)
+
+// Filters are purely property based.
+phelp_i_attach_begin
+phelp_i_replace(clone, bitmap_clone);
+phelp_i_attach_end
+
+phelp_gs_attach_begin
+phelp_gs_attach(matrix);
+phelp_gs_attach_end
+
+phelp_array_property(matrix)
+
+easy_clone(ColorMatrixFilter_as)
+
+as_value
+ColorMatrixFilter_as::ctor(const fn_call& /*fn*/)
+{
+ boost::intrusive_ptr<as_object> obj = new
ColorMatrixFilter_as(ColorMatrixFilter_as::Interface());
+ ColorMatrixFilter_as::attachProperties(*obj);
+
+ return as_value(obj.get());
+}
+
+} // Namespace gnash
+
Index: server/asobj/flash/filters/ColorMatrixFilter_as.h
===================================================================
RCS file: server/asobj/flash/filters/ColorMatrixFilter_as.h
diff -N server/asobj/flash/filters/ColorMatrixFilter_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/ColorMatrixFilter_as.h 5 May 2008 08:57:31
-0000 1.1
@@ -0,0 +1,33 @@
+//
+// Copyright (C) 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 __GNASH_ASOBJ_COLORMATRIXFILTER_H__
+#define __GNASH_ASOBJ_COLORMATRIXFILTER_H__
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global ColorMatrixFilter class
+void ColorMatrixFilter_class_init(as_object& global);
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_COLORMATRIXFILTER_H__
+#endif
+
Index: server/asobj/flash/filters/ConvolutionFilter_as.cpp
===================================================================
RCS file: server/asobj/flash/filters/ConvolutionFilter_as.cpp
diff -N server/asobj/flash/filters/ConvolutionFilter_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/ConvolutionFilter_as.cpp 5 May 2008 08:57:31
-0000 1.1
@@ -0,0 +1,89 @@
+//
+// Copyright (C) 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 "as_object.h"
+#include "ConvolutionFilter.h"
+#include "VM.h"
+#include "builtin_function.h"
+
+#define phelp_helper ConvolutionFilter_as
+#define phelp_class ConvolutionFilter
+#include "prophelper.h"
+#include "BitmapFilter_as.h"
+
+namespace gnash {
+
+class ConvolutionFilter_as : public as_object, public ConvolutionFilter
+{
+public:
+ phelp_gs(matrixX);
+ phelp_gs(matrixY);
+ phelp_gs(matrix);
+ phelp_gs(divisor);
+ phelp_gs(bias);
+ phelp_gs(preserveAlpha);
+ phelp_gs(clamp);
+ phelp_gs(color);
+ phelp_gs(alpha);
+
+ phelp_i(bitmap_clone);
+private:
+ phelp_base_def;
+};
+
+phelp_base_imp((bitmapFilter_interface()), ConvolutionFilter)
+
+phelp_i_attach_begin
+phelp_i_replace(clone, bitmap_clone);
+phelp_i_attach_end
+
+phelp_gs_attach_begin
+phelp_gs_attach(matrixX);
+phelp_gs_attach(matrixY);
+phelp_gs_attach(matrix);
+phelp_gs_attach(divisor);
+phelp_gs_attach(bias);
+phelp_gs_attach(preserveAlpha);
+phelp_gs_attach(clamp);
+phelp_gs_attach(color);
+phelp_gs_attach(alpha);
+phelp_gs_attach_end
+
+phelp_property(boost::uint8_t, number<boost::uint8_t>, matrixX)
+phelp_property(boost::uint8_t, number<boost::uint8_t>, matrixY)
+phelp_property(float, number<float>, divisor)
+phelp_property(float, number<float>, bias)
+phelp_property(bool, bool, preserveAlpha)
+phelp_property(bool, bool, clamp)
+phelp_property(boost::uint32_t, number<boost::uint32_t>, color)
+phelp_property(boost::uint8_t, number<boost::uint8_t>, alpha)
+phelp_array_property(matrix)
+
+easy_clone(ConvolutionFilter_as)
+
+as_value
+ConvolutionFilter_as::ctor(const fn_call& /*fn*/)
+{
+ boost::intrusive_ptr<as_object> obj = new
ConvolutionFilter_as(ConvolutionFilter_as::Interface());
+ ConvolutionFilter_as::attachProperties(*obj);
+
+ return as_value(obj.get());
+}
+
+} // Namespace gnash
+
Index: server/asobj/flash/filters/ConvolutionFilter_as.h
===================================================================
RCS file: server/asobj/flash/filters/ConvolutionFilter_as.h
diff -N server/asobj/flash/filters/ConvolutionFilter_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/ConvolutionFilter_as.h 5 May 2008 08:57:31
-0000 1.1
@@ -0,0 +1,33 @@
+//
+// Copyright (C) 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 __GNASH_ASOBJ_CONVOLUTIONFILTER_H__
+#define __GNASH_ASOBJ_CONVOLUTIONFILTER_H__
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global ConvolutionFilter class
+void ConvolutionFilter_class_init(as_object& global);
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_CONVOLUTIONFILTER_H__
+#endif
+
Index: server/asobj/flash/filters/DisplacementMapFilter_as.cpp
===================================================================
RCS file: server/asobj/flash/filters/DisplacementMapFilter_as.cpp
diff -N server/asobj/flash/filters/DisplacementMapFilter_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/DisplacementMapFilter_as.cpp 5 May 2008
08:57:31 -0000 1.1
@@ -0,0 +1,118 @@
+// DisplacementMapFilter_as.cpp: ActionScript "DisplacementMapFilter" class,
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
+//
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "DisplacementMapFilter_as.h"
+#include "as_object.h" // for inheritance
+#include "log.h"
+#include "fn_call.h"
+#include "smart_ptr.h" // for boost intrusive_ptr
+#include "builtin_function.h" // need builtin_function
+#include "GnashException.h" // for ActionException
+#include "flash/filters/BitmapFilter_as.h" // for AS inheritance
+
+#include <sstream>
+
+namespace gnash {
+
+static as_value DisplacementMapFilter_clone(const fn_call& fn);
+as_value DisplacementMapFilter_ctor(const fn_call& fn);
+
+static void
+attachDisplacementMapFilterInterface(as_object& o)
+{
+ o.init_member("clone", new builtin_function(DisplacementMapFilter_clone));
+}
+
+static as_object*
+getDisplacementMapFilterInterface()
+{
+ static boost::intrusive_ptr<as_object> o;
+ if ( ! o )
+ {
+ o = new as_object(bitmapFilter_interface());
+ attachDisplacementMapFilterInterface(*o);
+ }
+ return o.get();
+}
+
+class DisplacementMapFilter_as: public as_object
+{
+
+public:
+
+ DisplacementMapFilter_as()
+ :
+ as_object(getDisplacementMapFilterInterface())
+ {}
+
+ // override from as_object ?
+ //std::string get_text_value() const { return "DisplacementMapFilter"; }
+
+ // override from as_object ?
+ //double get_numeric_value() const { return 0; }
+};
+
+
+static as_value
+DisplacementMapFilter_clone(const fn_call& fn)
+{
+ boost::intrusive_ptr<DisplacementMapFilter_as> ptr =
ensureType<DisplacementMapFilter_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+as_value
+DisplacementMapFilter_ctor(const fn_call& fn)
+{
+ boost::intrusive_ptr<as_object> obj = new DisplacementMapFilter_as;
+
+ if ( fn.nargs )
+ {
+ std::stringstream ss;
+ fn.dump_args(ss);
+ LOG_ONCE( log_unimpl("DisplacementMapFilter(%s): %s", ss.str(),
_("arguments discarded")) );
+ }
+
+ return as_value(obj.get()); // will keep alive
+}
+
+// extern (used by Global.cpp)
+void DisplacementMapFilter_class_init(as_object& global)
+{
+ // This is going to be the global DisplacementMapFilter
"class"/"function"
+ static boost::intrusive_ptr<builtin_function> cl;
+
+ if ( cl == NULL )
+ {
+ cl=new builtin_function(&DisplacementMapFilter_ctor,
getDisplacementMapFilterInterface());
+ // replicate all interface to class, to be able to access
+ // all methods as static functions
+ attachDisplacementMapFilterInterface(*cl);
+ }
+
+ // Register _global.DisplacementMapFilter
+ global.init_member("DisplacementMapFilter", cl.get());
+}
+
+} // end of gnash namespace
Index: server/asobj/flash/filters/DisplacementMapFilter_as.h
===================================================================
RCS file: server/asobj/flash/filters/DisplacementMapFilter_as.h
diff -N server/asobj/flash/filters/DisplacementMapFilter_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/DisplacementMapFilter_as.h 5 May 2008
08:57:31 -0000 1.1
@@ -0,0 +1,42 @@
+// DisplacementMapFilter_as.h: ActionScript "DisplacementMapFilter" class,
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
+//
+
+#ifndef __GNASH_ASOBJ_DISPLACEMENTMAPFILTER_H__
+#define __GNASH_ASOBJ_DISPLACEMENTMAPFILTER_H__
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+//#include <memory> // for auto_ptr
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global DisplacementMapFilter class
+void DisplacementMapFilter_class_init(as_object& global);
+
+/// Return a DisplacementMapFilter instance (in case the core lib needs it)
+//std::auto_ptr<as_object> init_DisplacementMapFilter_instance();
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_DISPLACEMENTMAPFILTER_H__
+#endif
Index: server/asobj/flash/filters/DropShadowFilter_as.cpp
===================================================================
RCS file: server/asobj/flash/filters/DropShadowFilter_as.cpp
diff -N server/asobj/flash/filters/DropShadowFilter_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/DropShadowFilter_as.cpp 5 May 2008 08:57:31
-0000 1.1
@@ -0,0 +1,98 @@
+//
+// Copyright (C) 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 "as_object.h"
+#include "DropShadowFilter.h"
+#include "VM.h"
+#include "builtin_function.h"
+
+// These _must_ be defined.
+#define phelp_helper DropShadowFilter_as
+#define phelp_class DropShadowFilter
+#include "prophelper.h"
+#include "BitmapFilter_as.h"
+
+namespace gnash {
+
+class DropShadowFilter_as : public as_object, public DropShadowFilter
+{
+public:
+ phelp_gs(distance);
+ phelp_gs(angle);
+ phelp_gs(color);
+ phelp_gs(alpha);
+ phelp_gs(blurX);
+ phelp_gs(blurY);
+ phelp_gs(strength);
+ phelp_gs(quality);
+ phelp_gs(inner);
+ phelp_gs(knockout);
+ phelp_gs(hideObject);
+
+ phelp_i(bitmap_clone);
+
+private:
+ phelp_base_def;
+};
+
+phelp_base_imp((bitmapFilter_interface()), DropShadowFilter)
+
+// Filters are property based.
+phelp_i_attach_begin
+phelp_i_replace(clone, bitmap_clone);
+phelp_i_attach_end
+
+phelp_gs_attach_begin
+phelp_gs_attach(distance);
+phelp_gs_attach(angle);
+phelp_gs_attach(color);
+phelp_gs_attach(alpha);
+phelp_gs_attach(blurX);
+phelp_gs_attach(blurY);
+phelp_gs_attach(strength);
+phelp_gs_attach(quality);
+phelp_gs_attach(inner);
+phelp_gs_attach(knockout);
+phelp_gs_attach(hideObject);
+phelp_gs_attach_end
+
+phelp_property(float, number<float>, distance)
+phelp_property(float, number<float>, angle)
+phelp_property(boost::uint32_t, number<boost::uint32_t>, color)
+phelp_property(boost::uint8_t, number<boost::uint8_t>, alpha)
+phelp_property(float, number<float>, blurX)
+phelp_property(float, number<float>, blurY)
+phelp_property(float, number<float>, strength)
+phelp_property(boost::uint8_t, number<boost::uint8_t>, quality)
+phelp_property(bool, bool, inner)
+phelp_property(bool, bool, knockout)
+phelp_property(bool, bool, hideObject)
+
+easy_clone(DropShadowFilter_as)
+
+as_value
+DropShadowFilter_as::ctor(const fn_call& /*fn*/)
+{
+ boost::intrusive_ptr<as_object> obj = new
DropShadowFilter_as(DropShadowFilter_as::Interface());
+ DropShadowFilter_as::attachProperties(*obj);
+
+ return as_value(obj.get());
+}
+
+} // Namespace gnash
+
Index: server/asobj/flash/filters/DropShadowFilter_as.h
===================================================================
RCS file: server/asobj/flash/filters/DropShadowFilter_as.h
diff -N server/asobj/flash/filters/DropShadowFilter_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/DropShadowFilter_as.h 5 May 2008 08:57:31
-0000 1.1
@@ -0,0 +1,33 @@
+//
+// Copyright (C) 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 __GNASH_ASOBJ_DROPSHADOWFILTER_H__
+#define __GNASH_ASOBJ_DROPSHADOWFILTER_H__
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global DropShadowFilter class
+void DropShadowFilter_class_init(as_object& global);
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_DROPSHADOWFILTER_H__
+#endif
+
Index: server/asobj/flash/filters/GlowFilter_as.cpp
===================================================================
RCS file: server/asobj/flash/filters/GlowFilter_as.cpp
diff -N server/asobj/flash/filters/GlowFilter_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/GlowFilter_as.cpp 5 May 2008 08:57:31
-0000 1.1
@@ -0,0 +1,88 @@
+//
+// Copyright (C) 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 "as_object.h"
+#include "GlowFilter.h"
+#include "VM.h"
+#include "builtin_function.h"
+
+// These _must_ be defined.
+#define phelp_helper GlowFilter_as
+#define phelp_class GlowFilter
+#include "prophelper.h"
+#include "BitmapFilter_as.h"
+
+namespace gnash {
+
+class GlowFilter_as : public as_object, public GlowFilter
+{
+public:
+ phelp_gs(color);
+ phelp_gs(alpha);
+ phelp_gs(blurX);
+ phelp_gs(blurY);
+ phelp_gs(strength);
+ phelp_gs(quality);
+ phelp_gs(inner);
+ phelp_gs(knockout);
+
+ phelp_i(bitmap_clone);
+private:
+ phelp_base_def;
+};
+
+phelp_base_imp((bitmapFilter_interface()), GlowFilter)
+
+// Filters are property based.
+phelp_i_attach_begin
+phelp_i_replace(clone, bitmap_clone);
+phelp_i_attach_end
+
+phelp_gs_attach_begin
+phelp_gs_attach(color);
+phelp_gs_attach(alpha);
+phelp_gs_attach(blurX);
+phelp_gs_attach(blurY);
+phelp_gs_attach(strength);
+phelp_gs_attach(quality);
+phelp_gs_attach(inner);
+phelp_gs_attach(knockout);
+phelp_gs_attach_end
+
+phelp_property(boost::uint32_t, number<boost::uint32_t>, color)
+phelp_property(boost::uint8_t, number<boost::uint8_t>, alpha)
+phelp_property(float, number<float>, blurX)
+phelp_property(float, number<float>, blurY)
+phelp_property(float, number<float>, strength)
+phelp_property(boost::uint8_t, number<boost::uint8_t>, quality)
+phelp_property(bool, bool, inner)
+phelp_property(bool, bool, knockout)
+
+easy_clone(GlowFilter_as)
+
+as_value
+GlowFilter_as::ctor(const fn_call& /*fn*/)
+{
+ boost::intrusive_ptr<as_object> obj = new
GlowFilter_as(GlowFilter_as::Interface());
+ GlowFilter_as::attachProperties(*obj);
+
+ return as_value(obj.get());
+}
+
+} // Namespace gnash
+
Index: server/asobj/flash/filters/GlowFilter_as.h
===================================================================
RCS file: server/asobj/flash/filters/GlowFilter_as.h
diff -N server/asobj/flash/filters/GlowFilter_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/GlowFilter_as.h 5 May 2008 08:57:31 -0000
1.1
@@ -0,0 +1,33 @@
+//
+// Copyright (C) 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 __GNASH_ASOBJ_GLOWFILTER_H__
+#define __GNASH_ASOBJ_GLOWFILTER_H__
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global GlowFilter class
+void GlowFilter_class_init(as_object& global);
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_GLOWFILTER_H__
+#endif
+
Index: server/asobj/flash/filters/GradientBevelFilter_as.cpp
===================================================================
RCS file: server/asobj/flash/filters/GradientBevelFilter_as.cpp
diff -N server/asobj/flash/filters/GradientBevelFilter_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/GradientBevelFilter_as.cpp 5 May 2008
08:57:31 -0000 1.1
@@ -0,0 +1,133 @@
+//
+// Copyright (C) 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 "as_object.h"
+#include "GradientBevelFilter.h"
+#include "VM.h"
+#include "builtin_function.h"
+
+// These _must_ be defined for prophelpers to work correctly.
+// This is enforced by the file itself.
+#define phelp_helper GradientBevelFilter_as
+#define phelp_class GradientBevelFilter
+#include "prophelper.h"
+#include "BitmapFilter_as.h"
+
+namespace gnash {
+
+class GradientBevelFilter_as : public as_object, public GradientBevelFilter
+{
+public:
+ phelp_gs(distance);
+ phelp_gs(angle);
+ phelp_gs(colors);
+ phelp_gs(alphas);
+ phelp_gs(ratios);
+ phelp_gs(blurX);
+ phelp_gs(blurY);
+ phelp_gs(strength);
+ phelp_gs(quality);
+ phelp_gs(type); // No automation
+ phelp_gs(knockout);
+
+ phelp_i(bitmap_clone);
+
+private:
+ phelp_base_def;
+};
+
+phelp_base_imp((bitmapFilter_interface()), GradientBevelFilter)
+
+// Filters are purely property based.
+phelp_i_attach_begin
+phelp_i_replace(clone, bitmap_clone);
+phelp_i_attach_end
+
+// Begin attaching properties, then attach them, then end.
+phelp_gs_attach_begin
+phelp_gs_attach(distance);
+phelp_gs_attach(angle);
+phelp_gs_attach(colors);
+phelp_gs_attach(alphas);
+phelp_gs_attach(ratios);
+phelp_gs_attach(blurX);
+phelp_gs_attach(blurY);
+phelp_gs_attach(strength);
+phelp_gs_attach(quality);
+phelp_gs_attach(type);
+phelp_gs_attach(knockout);
+phelp_gs_attach_end
+
+phelp_property(float, number<float>, distance)
+phelp_property(float, number<float>, angle)
+phelp_array_property(colors)
+phelp_array_property(alphas)
+phelp_array_property(ratios)
+phelp_property(float, number<float>, blurX)
+phelp_property(float, number<float>, blurY)
+phelp_property(float, number<float>, strength)
+phelp_property(boost::uint8_t, number<boost::uint8_t>, quality)
+// Type is not automatable.
+phelp_property(bool, bool, knockout)
+
+easy_clone(GradientBevelFilter_as)
+
+as_value
+GradientBevelFilter_as::type_gs(const fn_call& fn)
+{
+ boost::intrusive_ptr<GradientBevelFilter_as> ptr =
ensureType<GradientBevelFilter_as>(fn.this_ptr);
+
+ if (fn.nargs == 0) // getter
+ {
+ switch (ptr->m_type)
+ {
+ case GradientBevelFilter::FULL_BEVEL:
+ return as_value("full");
+ break;
+ default:
+ case GradientBevelFilter::INNER_BEVEL:
+ return as_value("inner");
+ break;
+ case GradientBevelFilter::OUTER_BEVEL:
+ return as_value("outer");
+ break;
+ }
+ }
+ // setter
+ std::string type = fn.arg(0).to_string();
+ if (type == "outer")
+ ptr->m_type = GradientBevelFilter::OUTER_BEVEL;
+ if (type == "inner")
+ ptr->m_type = GradientBevelFilter::INNER_BEVEL;
+ if (type == "full")
+ ptr->m_type = GradientBevelFilter::FULL_BEVEL;
+
+ return as_value();
+}
+
+as_value
+GradientBevelFilter_as::ctor(const fn_call& /*fn*/)
+{
+ boost::intrusive_ptr<as_object> obj = new
GradientBevelFilter_as(GradientBevelFilter_as::Interface());
+ GradientBevelFilter_as::attachProperties(*obj);
+
+ return as_value(obj.get());
+}
+
+} // Namespace gnash
+
Index: server/asobj/flash/filters/GradientBevelFilter_as.h
===================================================================
RCS file: server/asobj/flash/filters/GradientBevelFilter_as.h
diff -N server/asobj/flash/filters/GradientBevelFilter_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/GradientBevelFilter_as.h 5 May 2008 08:57:31
-0000 1.1
@@ -0,0 +1,33 @@
+//
+// Copyright (C) 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 __GNASH_ASOBJ_GRADIENTBEVELFILTER_H__
+#define __GNASH_ASOBJ_GRADIENTBEVELFILTER_H__
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global GradientBevelFilter class
+void GradientBevelFilter_class_init(as_object& global);
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_GRADIENTBEVELFILTER_H__
+#endif
+
Index: server/asobj/flash/filters/GradientGlowFilter_as.cpp
===================================================================
RCS file: server/asobj/flash/filters/GradientGlowFilter_as.cpp
diff -N server/asobj/flash/filters/GradientGlowFilter_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/GradientGlowFilter_as.cpp 5 May 2008
08:57:31 -0000 1.1
@@ -0,0 +1,133 @@
+//
+// Copyright (C) 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 "as_object.h"
+#include "GradientGlowFilter.h"
+#include "VM.h"
+#include "builtin_function.h"
+
+// These _must_ be defined for prophelpers to work correctly.
+// This is enforced by the file itself.
+#define phelp_helper GradientGlowFilter_as
+#define phelp_class GradientGlowFilter
+#include "prophelper.h"
+#include "BitmapFilter_as.h"
+
+namespace gnash {
+
+class GradientGlowFilter_as : public as_object, public GradientGlowFilter
+{
+public:
+ phelp_gs(distance);
+ phelp_gs(angle);
+ phelp_gs(colors);
+ phelp_gs(alphas);
+ phelp_gs(ratios);
+ phelp_gs(blurX);
+ phelp_gs(blurY);
+ phelp_gs(strength);
+ phelp_gs(quality);
+ phelp_gs(type); // No automation
+ phelp_gs(knockout);
+
+ phelp_i(bitmap_clone);
+
+private:
+ phelp_base_def;
+};
+
+phelp_base_imp((bitmapFilter_interface()), GradientGlowFilter)
+
+// Filters are purely property based.
+phelp_i_attach_begin
+phelp_i_replace(clone, bitmap_clone);
+phelp_i_attach_end
+
+// Begin attaching properties, then attach them, then end.
+phelp_gs_attach_begin
+phelp_gs_attach(distance);
+phelp_gs_attach(angle);
+phelp_gs_attach(colors);
+phelp_gs_attach(alphas);
+phelp_gs_attach(ratios);
+phelp_gs_attach(blurX);
+phelp_gs_attach(blurY);
+phelp_gs_attach(strength);
+phelp_gs_attach(quality);
+phelp_gs_attach(type);
+phelp_gs_attach(knockout);
+phelp_gs_attach_end
+
+phelp_property(float, number<float>, distance)
+phelp_property(float, number<float>, angle)
+phelp_array_property(colors)
+phelp_array_property(alphas)
+phelp_array_property(ratios)
+phelp_property(float, number<float>, blurX)
+phelp_property(float, number<float>, blurY)
+phelp_property(float, number<float>, strength)
+phelp_property(boost::uint8_t, number<boost::uint8_t>, quality)
+// Type is not automatable.
+phelp_property(bool, bool, knockout)
+
+easy_clone(GradientGlowFilter_as)
+
+as_value
+GradientGlowFilter_as::type_gs(const fn_call& fn)
+{
+ boost::intrusive_ptr<GradientGlowFilter_as> ptr =
ensureType<GradientGlowFilter_as>(fn.this_ptr);
+
+ if (fn.nargs == 0) // getter
+ {
+ switch (ptr->m_type)
+ {
+ case GradientGlowFilter::FULL_GLOW:
+ return as_value("full");
+ break;
+ default:
+ case GradientGlowFilter::INNER_GLOW:
+ return as_value("inner");
+ break;
+ case GradientGlowFilter::OUTER_GLOW:
+ return as_value("outer");
+ break;
+ }
+ }
+ // setter
+ std::string type = fn.arg(0).to_string();
+ if (type == "outer")
+ ptr->m_type = GradientGlowFilter::OUTER_GLOW;
+ if (type == "inner")
+ ptr->m_type = GradientGlowFilter::INNER_GLOW;
+ if (type == "full")
+ ptr->m_type = GradientGlowFilter::FULL_GLOW;
+
+ return as_value();
+}
+
+as_value
+GradientGlowFilter_as::ctor(const fn_call& /*fn*/)
+{
+ boost::intrusive_ptr<as_object> obj = new
GradientGlowFilter_as(GradientGlowFilter_as::Interface());
+ GradientGlowFilter_as::attachProperties(*obj);
+
+ return as_value(obj.get());
+}
+
+} // Namespace gnash
+
Index: server/asobj/flash/filters/GradientGlowFilter_as.h
===================================================================
RCS file: server/asobj/flash/filters/GradientGlowFilter_as.h
diff -N server/asobj/flash/filters/GradientGlowFilter_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/filters/GradientGlowFilter_as.h 5 May 2008 08:57:32
-0000 1.1
@@ -0,0 +1,33 @@
+//
+// Copyright (C) 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 __GNASH_ASOBJ_GRADIENTGLOWFILTER_H__
+#define __GNASH_ASOBJ_GRADIENTGLOWFILTER_H__
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global GradientGlowFilter class
+void GradientGlowFilter_class_init(as_object& global);
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_GRADIENTGLOWFILTER_H__
+#endif
+
Index: server/asobj/flash/geom/ColorTransform_as.cpp
===================================================================
RCS file: server/asobj/flash/geom/ColorTransform_as.cpp
diff -N server/asobj/flash/geom/ColorTransform_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/geom/ColorTransform_as.cpp 5 May 2008 08:57:32
-0000 1.1
@@ -0,0 +1,131 @@
+// ColorTransform_as.cpp: ActionScript "ColorTransform" class, 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
+//
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "ColorTransform_as.h"
+#include "as_object.h" // for inheritance
+#include "log.h"
+#include "fn_call.h"
+#include "smart_ptr.h" // for boost intrusive_ptr
+#include "builtin_function.h" // need builtin_function
+#include "GnashException.h" // for ActionException
+#include "Object.h" // for AS inheritance
+
+#include <sstream>
+
+namespace gnash {
+
+static as_value ColorTransform_concat(const fn_call& fn);
+static as_value ColorTransform_toString(const fn_call& fn);
+as_value ColorTransform_ctor(const fn_call& fn);
+
+static void
+attachColorTransformInterface(as_object& o)
+{
+ o.init_member("concat", new builtin_function(ColorTransform_concat));
+ o.init_member("toString", new builtin_function(ColorTransform_toString));
+}
+
+static as_object*
+getColorTransformInterface()
+{
+ static boost::intrusive_ptr<as_object> o;
+ if ( ! o )
+ {
+ // TODO: check if this class should inherit from Object
+ // or from a different class
+ o = new as_object(getObjectInterface());
+ attachColorTransformInterface(*o);
+ }
+ return o.get();
+}
+
+class ColorTransform_as: public as_object
+{
+
+public:
+
+ ColorTransform_as()
+ :
+ as_object(getColorTransformInterface())
+ {}
+
+ // override from as_object ?
+ //std::string get_text_value() const { return "ColorTransform"; }
+
+ // override from as_object ?
+ //double get_numeric_value() const { return 0; }
+};
+
+
+static as_value
+ColorTransform_concat(const fn_call& fn)
+{
+ boost::intrusive_ptr<ColorTransform_as> ptr =
ensureType<ColorTransform_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+ColorTransform_toString(const fn_call& fn)
+{
+ boost::intrusive_ptr<ColorTransform_as> ptr =
ensureType<ColorTransform_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+as_value
+ColorTransform_ctor(const fn_call& fn)
+{
+ boost::intrusive_ptr<as_object> obj = new ColorTransform_as;
+
+ if ( fn.nargs )
+ {
+ std::stringstream ss;
+ fn.dump_args(ss);
+ LOG_ONCE( log_unimpl("ColorTransform(%s): %s", ss.str(),
_("arguments discarded")) );
+ }
+
+ return as_value(obj.get()); // will keep alive
+}
+
+// extern (used by Global.cpp)
+void ColorTransform_class_init(as_object& global)
+{
+ // This is going to be the global ColorTransform "class"/"function"
+ static boost::intrusive_ptr<builtin_function> cl;
+
+ if ( cl == NULL )
+ {
+ cl=new builtin_function(&ColorTransform_ctor,
getColorTransformInterface());
+ // replicate all interface to class, to be able to access
+ // all methods as static functions
+ attachColorTransformInterface(*cl);
+ }
+
+ // Register _global.ColorTransform
+ global.init_member("ColorTransform", cl.get());
+}
+
+} // end of gnash namespace
Index: server/asobj/flash/geom/ColorTransform_as.h
===================================================================
RCS file: server/asobj/flash/geom/ColorTransform_as.h
diff -N server/asobj/flash/geom/ColorTransform_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/geom/ColorTransform_as.h 5 May 2008 08:57:32 -0000
1.1
@@ -0,0 +1,42 @@
+// ColorTransform_as.h: ActionScript "ColorTransform" class, 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
+//
+
+#ifndef __GNASH_ASOBJ_COLORTRANSFORM_H__
+#define __GNASH_ASOBJ_COLORTRANSFORM_H__
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+//#include <memory> // for auto_ptr
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global ColorTransform class
+void ColorTransform_class_init(as_object& global);
+
+/// Return a ColorTransform instance (in case the core lib needs it)
+//std::auto_ptr<as_object> init_ColorTransform_instance();
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_COLORTRANSFORM_H__
+#endif
Index: server/asobj/flash/geom/Matrix_as.cpp
===================================================================
RCS file: server/asobj/flash/geom/Matrix_as.cpp
diff -N server/asobj/flash/geom/Matrix_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/geom/Matrix_as.cpp 5 May 2008 08:57:32 -0000
1.1
@@ -0,0 +1,241 @@
+// Matrix_as.cpp: ActionScript "Matrix" class, 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
+//
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "Matrix_as.h"
+#include "as_object.h" // for inheritance
+#include "log.h"
+#include "fn_call.h"
+#include "smart_ptr.h" // for boost intrusive_ptr
+#include "builtin_function.h" // need builtin_function
+#include "GnashException.h" // for ActionException
+#include "Object.h" // for AS inheritance
+
+#include <sstream>
+
+namespace gnash {
+
+static as_value Matrix_clone(const fn_call& fn);
+static as_value Matrix_concat(const fn_call& fn);
+static as_value Matrix_createBox(const fn_call& fn);
+static as_value Matrix_createGradientBox(const fn_call& fn);
+static as_value Matrix_deltaTransformPoint(const fn_call& fn);
+static as_value Matrix_identity(const fn_call& fn);
+static as_value Matrix_invert(const fn_call& fn);
+static as_value Matrix_rotate(const fn_call& fn);
+static as_value Matrix_scale(const fn_call& fn);
+static as_value Matrix_toString(const fn_call& fn);
+static as_value Matrix_transformPoint(const fn_call& fn);
+static as_value Matrix_translate(const fn_call& fn);
+as_value Matrix_ctor(const fn_call& fn);
+
+static void
+attachMatrixInterface(as_object& o)
+{
+ o.init_member("clone", new builtin_function(Matrix_clone));
+ o.init_member("concat", new builtin_function(Matrix_concat));
+ o.init_member("createBox", new builtin_function(Matrix_createBox));
+ o.init_member("createGradientBox", new
builtin_function(Matrix_createGradientBox));
+ o.init_member("deltaTransformPoint", new
builtin_function(Matrix_deltaTransformPoint));
+ o.init_member("identity", new builtin_function(Matrix_identity));
+ o.init_member("invert", new builtin_function(Matrix_invert));
+ o.init_member("rotate", new builtin_function(Matrix_rotate));
+ o.init_member("scale", new builtin_function(Matrix_scale));
+ o.init_member("toString", new builtin_function(Matrix_toString));
+ o.init_member("transformPoint", new
builtin_function(Matrix_transformPoint));
+ o.init_member("translate", new builtin_function(Matrix_translate));
+}
+
+static as_object*
+getMatrixInterface()
+{
+ static boost::intrusive_ptr<as_object> o;
+ if ( ! o )
+ {
+ // TODO: check if this class should inherit from Object
+ // or from a different class
+ o = new as_object(getObjectInterface());
+ attachMatrixInterface(*o);
+ }
+ return o.get();
+}
+
+class Matrix_as: public as_object
+{
+
+public:
+
+ Matrix_as()
+ :
+ as_object(getMatrixInterface())
+ {}
+
+ // override from as_object ?
+ //std::string get_text_value() const { return "Matrix"; }
+
+ // override from as_object ?
+ //double get_numeric_value() const { return 0; }
+};
+
+
+static as_value
+Matrix_clone(const fn_call& fn)
+{
+ boost::intrusive_ptr<Matrix_as> ptr =
ensureType<Matrix_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Matrix_concat(const fn_call& fn)
+{
+ boost::intrusive_ptr<Matrix_as> ptr =
ensureType<Matrix_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Matrix_createBox(const fn_call& fn)
+{
+ boost::intrusive_ptr<Matrix_as> ptr =
ensureType<Matrix_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Matrix_createGradientBox(const fn_call& fn)
+{
+ boost::intrusive_ptr<Matrix_as> ptr =
ensureType<Matrix_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Matrix_deltaTransformPoint(const fn_call& fn)
+{
+ boost::intrusive_ptr<Matrix_as> ptr =
ensureType<Matrix_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Matrix_identity(const fn_call& fn)
+{
+ boost::intrusive_ptr<Matrix_as> ptr =
ensureType<Matrix_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Matrix_invert(const fn_call& fn)
+{
+ boost::intrusive_ptr<Matrix_as> ptr =
ensureType<Matrix_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Matrix_rotate(const fn_call& fn)
+{
+ boost::intrusive_ptr<Matrix_as> ptr =
ensureType<Matrix_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Matrix_scale(const fn_call& fn)
+{
+ boost::intrusive_ptr<Matrix_as> ptr =
ensureType<Matrix_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Matrix_toString(const fn_call& fn)
+{
+ boost::intrusive_ptr<Matrix_as> ptr =
ensureType<Matrix_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Matrix_transformPoint(const fn_call& fn)
+{
+ boost::intrusive_ptr<Matrix_as> ptr =
ensureType<Matrix_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Matrix_translate(const fn_call& fn)
+{
+ boost::intrusive_ptr<Matrix_as> ptr =
ensureType<Matrix_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+as_value
+Matrix_ctor(const fn_call& fn)
+{
+ boost::intrusive_ptr<as_object> obj = new Matrix_as;
+
+ if ( fn.nargs )
+ {
+ std::stringstream ss;
+ fn.dump_args(ss);
+ LOG_ONCE( log_unimpl("Matrix(%s): %s", ss.str(), _("arguments
discarded")) );
+ }
+
+ return as_value(obj.get()); // will keep alive
+}
+
+// extern (used by Global.cpp)
+void Matrix_class_init(as_object& global)
+{
+ // This is going to be the global Matrix "class"/"function"
+ static boost::intrusive_ptr<builtin_function> cl;
+
+ if ( cl == NULL )
+ {
+ cl=new builtin_function(&Matrix_ctor, getMatrixInterface());
+ // replicate all interface to class, to be able to access
+ // all methods as static functions
+ attachMatrixInterface(*cl);
+ }
+
+ // Register _global.Matrix
+ global.init_member("Matrix", cl.get());
+}
+
+} // end of gnash namespace
Index: server/asobj/flash/geom/Matrix_as.h
===================================================================
RCS file: server/asobj/flash/geom/Matrix_as.h
diff -N server/asobj/flash/geom/Matrix_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/geom/Matrix_as.h 5 May 2008 08:57:32 -0000 1.1
@@ -0,0 +1,42 @@
+// Matrix_as.h: ActionScript "Matrix" class, 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
+//
+
+#ifndef __GNASH_ASOBJ_MATRIX_H__
+#define __GNASH_ASOBJ_MATRIX_H__
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+//#include <memory> // for auto_ptr
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global Matrix class
+void Matrix_class_init(as_object& global);
+
+/// Return a Matrix instance (in case the core lib needs it)
+//std::auto_ptr<as_object> init_Matrix_instance();
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_MATRIX_H__
+#endif
Index: server/asobj/flash/geom/Point_as.cpp
===================================================================
RCS file: server/asobj/flash/geom/Point_as.cpp
diff -N server/asobj/flash/geom/Point_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/geom/Point_as.cpp 5 May 2008 08:57:32 -0000
1.1
@@ -0,0 +1,219 @@
+// Point_as.cpp: ActionScript "Point" class, 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
+//
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "Point_as.h"
+#include "as_object.h" // for inheritance
+#include "log.h"
+#include "fn_call.h"
+#include "smart_ptr.h" // for boost intrusive_ptr
+#include "builtin_function.h" // need builtin_function
+#include "GnashException.h" // for ActionException
+#include "Object.h" // for AS inheritance
+
+#include <sstream>
+
+namespace gnash {
+
+static as_value Point_add(const fn_call& fn);
+static as_value Point_clone(const fn_call& fn);
+static as_value Point_distance(const fn_call& fn);
+static as_value Point_equals(const fn_call& fn);
+static as_value Point_interpolate(const fn_call& fn);
+static as_value Point_normalize(const fn_call& fn);
+static as_value Point_offset(const fn_call& fn);
+static as_value Point_polar(const fn_call& fn);
+static as_value Point_subtract(const fn_call& fn);
+static as_value Point_toString(const fn_call& fn);
+as_value Point_ctor(const fn_call& fn);
+
+static void
+attachPointInterface(as_object& o)
+{
+ o.init_member("add", new builtin_function(Point_add));
+ o.init_member("clone", new builtin_function(Point_clone));
+ o.init_member("distance", new builtin_function(Point_distance));
+ o.init_member("equals", new builtin_function(Point_equals));
+ o.init_member("interpolate", new builtin_function(Point_interpolate));
+ o.init_member("normalize", new builtin_function(Point_normalize));
+ o.init_member("offset", new builtin_function(Point_offset));
+ o.init_member("polar", new builtin_function(Point_polar));
+ o.init_member("subtract", new builtin_function(Point_subtract));
+ o.init_member("toString", new builtin_function(Point_toString));
+}
+
+static as_object*
+getPointInterface()
+{
+ static boost::intrusive_ptr<as_object> o;
+ if ( ! o )
+ {
+ // TODO: check if this class should inherit from Object
+ // or from a different class
+ o = new as_object(getObjectInterface());
+ attachPointInterface(*o);
+ }
+ return o.get();
+}
+
+class Point_as: public as_object
+{
+
+public:
+
+ Point_as()
+ :
+ as_object(getPointInterface())
+ {}
+
+ // override from as_object ?
+ //std::string get_text_value() const { return "Point"; }
+
+ // override from as_object ?
+ //double get_numeric_value() const { return 0; }
+};
+
+
+static as_value
+Point_add(const fn_call& fn)
+{
+ boost::intrusive_ptr<Point_as> ptr = ensureType<Point_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Point_clone(const fn_call& fn)
+{
+ boost::intrusive_ptr<Point_as> ptr = ensureType<Point_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Point_distance(const fn_call& fn)
+{
+ boost::intrusive_ptr<Point_as> ptr = ensureType<Point_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Point_equals(const fn_call& fn)
+{
+ boost::intrusive_ptr<Point_as> ptr = ensureType<Point_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Point_interpolate(const fn_call& fn)
+{
+ boost::intrusive_ptr<Point_as> ptr = ensureType<Point_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Point_normalize(const fn_call& fn)
+{
+ boost::intrusive_ptr<Point_as> ptr = ensureType<Point_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Point_offset(const fn_call& fn)
+{
+ boost::intrusive_ptr<Point_as> ptr = ensureType<Point_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Point_polar(const fn_call& fn)
+{
+ boost::intrusive_ptr<Point_as> ptr = ensureType<Point_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Point_subtract(const fn_call& fn)
+{
+ boost::intrusive_ptr<Point_as> ptr = ensureType<Point_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Point_toString(const fn_call& fn)
+{
+ boost::intrusive_ptr<Point_as> ptr = ensureType<Point_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+as_value
+Point_ctor(const fn_call& fn)
+{
+ boost::intrusive_ptr<as_object> obj = new Point_as;
+
+ if ( fn.nargs )
+ {
+ std::stringstream ss;
+ fn.dump_args(ss);
+ LOG_ONCE( log_unimpl("Point(%s): %s", ss.str(), _("arguments
discarded")) );
+ }
+
+ return as_value(obj.get()); // will keep alive
+}
+
+// extern (used by Global.cpp)
+void Point_class_init(as_object& global)
+{
+ // This is going to be the global Point "class"/"function"
+ static boost::intrusive_ptr<builtin_function> cl;
+
+ if ( cl == NULL )
+ {
+ cl=new builtin_function(&Point_ctor, getPointInterface());
+ // replicate all interface to class, to be able to access
+ // all methods as static functions
+ attachPointInterface(*cl);
+ }
+
+ // Register _global.Point
+ global.init_member("Point", cl.get());
+}
+
+} // end of gnash namespace
Index: server/asobj/flash/geom/Point_as.h
===================================================================
RCS file: server/asobj/flash/geom/Point_as.h
diff -N server/asobj/flash/geom/Point_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/geom/Point_as.h 5 May 2008 08:57:32 -0000 1.1
@@ -0,0 +1,42 @@
+// Point_as.h: ActionScript "Point" class, 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
+//
+
+#ifndef __GNASH_ASOBJ_POINT_H__
+#define __GNASH_ASOBJ_POINT_H__
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+//#include <memory> // for auto_ptr
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global Point class
+void Point_class_init(as_object& global);
+
+/// Return a Point instance (in case the core lib needs it)
+//std::auto_ptr<as_object> init_Point_instance();
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_POINT_H__
+#endif
Index: server/asobj/flash/geom/Rectangle_as.cpp
===================================================================
RCS file: server/asobj/flash/geom/Rectangle_as.cpp
diff -N server/asobj/flash/geom/Rectangle_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/geom/Rectangle_as.cpp 5 May 2008 08:57:32 -0000
1.1
@@ -0,0 +1,274 @@
+// Rectangle_as.cpp: ActionScript "Rectangle" class, 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
+//
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "Rectangle_as.h"
+#include "as_object.h" // for inheritance
+#include "log.h"
+#include "fn_call.h"
+#include "smart_ptr.h" // for boost intrusive_ptr
+#include "builtin_function.h" // need builtin_function
+#include "GnashException.h" // for ActionException
+#include "Object.h" // for AS inheritance
+
+#include <sstream>
+
+namespace gnash {
+
+static as_value Rectangle_clone(const fn_call& fn);
+static as_value Rectangle_contains(const fn_call& fn);
+static as_value Rectangle_containsPoint(const fn_call& fn);
+static as_value Rectangle_containsRectangle(const fn_call& fn);
+static as_value Rectangle_equals(const fn_call& fn);
+static as_value Rectangle_inflate(const fn_call& fn);
+static as_value Rectangle_inflatePoint(const fn_call& fn);
+static as_value Rectangle_intersection(const fn_call& fn);
+static as_value Rectangle_intersects(const fn_call& fn);
+static as_value Rectangle_isEmpty(const fn_call& fn);
+static as_value Rectangle_offset(const fn_call& fn);
+static as_value Rectangle_offsetPoint(const fn_call& fn);
+static as_value Rectangle_setEmpty(const fn_call& fn);
+static as_value Rectangle_toString(const fn_call& fn);
+static as_value Rectangle_union(const fn_call& fn);
+as_value Rectangle_ctor(const fn_call& fn);
+
+static void
+attachRectangleInterface(as_object& o)
+{
+ o.init_member("clone", new builtin_function(Rectangle_clone));
+ o.init_member("contains", new builtin_function(Rectangle_contains));
+ o.init_member("containsPoint", new
builtin_function(Rectangle_containsPoint));
+ o.init_member("containsRectangle", new
builtin_function(Rectangle_containsRectangle));
+ o.init_member("equals", new builtin_function(Rectangle_equals));
+ o.init_member("inflate", new builtin_function(Rectangle_inflate));
+ o.init_member("inflatePoint", new
builtin_function(Rectangle_inflatePoint));
+ o.init_member("intersection", new
builtin_function(Rectangle_intersection));
+ o.init_member("intersects", new builtin_function(Rectangle_intersects));
+ o.init_member("isEmpty", new builtin_function(Rectangle_isEmpty));
+ o.init_member("offset", new builtin_function(Rectangle_offset));
+ o.init_member("offsetPoint", new builtin_function(Rectangle_offsetPoint));
+ o.init_member("setEmpty", new builtin_function(Rectangle_setEmpty));
+ o.init_member("toString", new builtin_function(Rectangle_toString));
+ o.init_member("union", new builtin_function(Rectangle_union));
+}
+
+static as_object*
+getRectangleInterface()
+{
+ static boost::intrusive_ptr<as_object> o;
+ if ( ! o )
+ {
+ // TODO: check if this class should inherit from Object
+ // or from a different class
+ o = new as_object(getObjectInterface());
+ attachRectangleInterface(*o);
+ }
+ return o.get();
+}
+
+class Rectangle_as: public as_object
+{
+
+public:
+
+ Rectangle_as()
+ :
+ as_object(getRectangleInterface())
+ {}
+
+ // override from as_object ?
+ //std::string get_text_value() const { return "Rectangle"; }
+
+ // override from as_object ?
+ //double get_numeric_value() const { return 0; }
+};
+
+
+static as_value
+Rectangle_clone(const fn_call& fn)
+{
+ boost::intrusive_ptr<Rectangle_as> ptr =
ensureType<Rectangle_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Rectangle_contains(const fn_call& fn)
+{
+ boost::intrusive_ptr<Rectangle_as> ptr =
ensureType<Rectangle_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Rectangle_containsPoint(const fn_call& fn)
+{
+ boost::intrusive_ptr<Rectangle_as> ptr =
ensureType<Rectangle_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Rectangle_containsRectangle(const fn_call& fn)
+{
+ boost::intrusive_ptr<Rectangle_as> ptr =
ensureType<Rectangle_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Rectangle_equals(const fn_call& fn)
+{
+ boost::intrusive_ptr<Rectangle_as> ptr =
ensureType<Rectangle_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Rectangle_inflate(const fn_call& fn)
+{
+ boost::intrusive_ptr<Rectangle_as> ptr =
ensureType<Rectangle_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Rectangle_inflatePoint(const fn_call& fn)
+{
+ boost::intrusive_ptr<Rectangle_as> ptr =
ensureType<Rectangle_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Rectangle_intersection(const fn_call& fn)
+{
+ boost::intrusive_ptr<Rectangle_as> ptr =
ensureType<Rectangle_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Rectangle_intersects(const fn_call& fn)
+{
+ boost::intrusive_ptr<Rectangle_as> ptr =
ensureType<Rectangle_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Rectangle_isEmpty(const fn_call& fn)
+{
+ boost::intrusive_ptr<Rectangle_as> ptr =
ensureType<Rectangle_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Rectangle_offset(const fn_call& fn)
+{
+ boost::intrusive_ptr<Rectangle_as> ptr =
ensureType<Rectangle_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Rectangle_offsetPoint(const fn_call& fn)
+{
+ boost::intrusive_ptr<Rectangle_as> ptr =
ensureType<Rectangle_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Rectangle_setEmpty(const fn_call& fn)
+{
+ boost::intrusive_ptr<Rectangle_as> ptr =
ensureType<Rectangle_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Rectangle_toString(const fn_call& fn)
+{
+ boost::intrusive_ptr<Rectangle_as> ptr =
ensureType<Rectangle_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+Rectangle_union(const fn_call& fn)
+{
+ boost::intrusive_ptr<Rectangle_as> ptr =
ensureType<Rectangle_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+as_value
+Rectangle_ctor(const fn_call& fn)
+{
+ boost::intrusive_ptr<as_object> obj = new Rectangle_as;
+
+ if ( fn.nargs )
+ {
+ std::stringstream ss;
+ fn.dump_args(ss);
+ LOG_ONCE( log_unimpl("Rectangle(%s): %s", ss.str(),
_("arguments discarded")) );
+ }
+
+ return as_value(obj.get()); // will keep alive
+}
+
+// extern (used by Global.cpp)
+void Rectangle_class_init(as_object& global)
+{
+ // This is going to be the global Rectangle "class"/"function"
+ static boost::intrusive_ptr<builtin_function> cl;
+
+ if ( cl == NULL )
+ {
+ cl=new builtin_function(&Rectangle_ctor,
getRectangleInterface());
+ // replicate all interface to class, to be able to access
+ // all methods as static functions
+ attachRectangleInterface(*cl);
+ }
+
+ // Register _global.Rectangle
+ global.init_member("Rectangle", cl.get());
+}
+
+} // end of gnash namespace
Index: server/asobj/flash/geom/Rectangle_as.h
===================================================================
RCS file: server/asobj/flash/geom/Rectangle_as.h
diff -N server/asobj/flash/geom/Rectangle_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/geom/Rectangle_as.h 5 May 2008 08:57:33 -0000
1.1
@@ -0,0 +1,42 @@
+// Rectangle_as.h: ActionScript "Rectangle" class, 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
+//
+
+#ifndef __GNASH_ASOBJ_RECTANGLE_H__
+#define __GNASH_ASOBJ_RECTANGLE_H__
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+//#include <memory> // for auto_ptr
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global Rectangle class
+void Rectangle_class_init(as_object& global);
+
+/// Return a Rectangle instance (in case the core lib needs it)
+//std::auto_ptr<as_object> init_Rectangle_instance();
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_RECTANGLE_H__
+#endif
Index: server/asobj/flash/geom/Transform_as.cpp
===================================================================
RCS file: server/asobj/flash/geom/Transform_as.cpp
diff -N server/asobj/flash/geom/Transform_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/geom/Transform_as.cpp 5 May 2008 08:57:33 -0000
1.1
@@ -0,0 +1,109 @@
+// Transform_as.cpp: ActionScript "Transform" class, 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
+//
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "Transform_as.h"
+#include "as_object.h" // for inheritance
+#include "log.h"
+#include "fn_call.h"
+#include "smart_ptr.h" // for boost intrusive_ptr
+#include "builtin_function.h" // need builtin_function
+#include "GnashException.h" // for ActionException
+#include "Object.h" // for AS inheritance
+
+#include <sstream>
+
+namespace gnash {
+
+as_value Transform_ctor(const fn_call& fn);
+
+static void
+attachTransformInterface(as_object& o)
+{
+}
+
+static as_object*
+getTransformInterface()
+{
+ static boost::intrusive_ptr<as_object> o;
+ if ( ! o )
+ {
+ // TODO: check if this class should inherit from Object
+ // or from a different class
+ o = new as_object(getObjectInterface());
+ attachTransformInterface(*o);
+ }
+ return o.get();
+}
+
+class Transform_as: public as_object
+{
+
+public:
+
+ Transform_as()
+ :
+ as_object(getTransformInterface())
+ {}
+
+ // override from as_object ?
+ //std::string get_text_value() const { return "Transform"; }
+
+ // override from as_object ?
+ //double get_numeric_value() const { return 0; }
+};
+
+
+as_value
+Transform_ctor(const fn_call& fn)
+{
+ boost::intrusive_ptr<as_object> obj = new Transform_as;
+
+ if ( fn.nargs )
+ {
+ std::stringstream ss;
+ fn.dump_args(ss);
+ LOG_ONCE( log_unimpl("Transform(%s): %s", ss.str(),
_("arguments discarded")) );
+ }
+
+ return as_value(obj.get()); // will keep alive
+}
+
+// extern (used by Global.cpp)
+void Transform_class_init(as_object& global)
+{
+ // This is going to be the global Transform "class"/"function"
+ static boost::intrusive_ptr<builtin_function> cl;
+
+ if ( cl == NULL )
+ {
+ cl=new builtin_function(&Transform_ctor,
getTransformInterface());
+ // replicate all interface to class, to be able to access
+ // all methods as static functions
+ attachTransformInterface(*cl);
+ }
+
+ // Register _global.Transform
+ global.init_member("Transform", cl.get());
+}
+
+} // end of gnash namespace
Index: server/asobj/flash/geom/Transform_as.h
===================================================================
RCS file: server/asobj/flash/geom/Transform_as.h
diff -N server/asobj/flash/geom/Transform_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/geom/Transform_as.h 5 May 2008 08:57:33 -0000
1.1
@@ -0,0 +1,42 @@
+// Transform_as.h: ActionScript "Transform" class, 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
+//
+
+#ifndef __GNASH_ASOBJ_TRANSFORM_H__
+#define __GNASH_ASOBJ_TRANSFORM_H__
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+//#include <memory> // for auto_ptr
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global Transform class
+void Transform_class_init(as_object& global);
+
+/// Return a Transform instance (in case the core lib needs it)
+//std::auto_ptr<as_object> init_Transform_instance();
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_TRANSFORM_H__
+#endif
Index: server/asobj/flash/net/FileReferenceList_as.cpp
===================================================================
RCS file: server/asobj/flash/net/FileReferenceList_as.cpp
diff -N server/asobj/flash/net/FileReferenceList_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/net/FileReferenceList_as.cpp 5 May 2008 08:57:33
-0000 1.1
@@ -0,0 +1,142 @@
+// FileReferenceList_as.cpp: ActionScript "FileReferenceList" class, 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
+//
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "FileReferenceList_as.h"
+#include "as_object.h" // for inheritance
+#include "log.h"
+#include "fn_call.h"
+#include "smart_ptr.h" // for boost intrusive_ptr
+#include "builtin_function.h" // need builtin_function
+#include "GnashException.h" // for ActionException
+#include "Object.h" // for AS inheritance
+
+#include <sstream>
+
+namespace gnash {
+
+static as_value FileReferenceList_addListener(const fn_call& fn);
+static as_value FileReferenceList_browse(const fn_call& fn);
+static as_value FileReferenceList_removeListener(const fn_call& fn);
+as_value FileReferenceList_ctor(const fn_call& fn);
+
+static void
+attachFileReferenceListInterface(as_object& o)
+{
+ o.init_member("addListener", new
builtin_function(FileReferenceList_addListener));
+ o.init_member("browse", new builtin_function(FileReferenceList_browse));
+ o.init_member("removeListener", new
builtin_function(FileReferenceList_removeListener));
+}
+
+static as_object*
+getFileReferenceListInterface()
+{
+ static boost::intrusive_ptr<as_object> o;
+ if ( ! o )
+ {
+ // TODO: check if this class should inherit from Object
+ // or from a different class
+ o = new as_object(getObjectInterface());
+ attachFileReferenceListInterface(*o);
+ }
+ return o.get();
+}
+
+class FileReferenceList_as: public as_object
+{
+
+public:
+
+ FileReferenceList_as()
+ :
+ as_object(getFileReferenceListInterface())
+ {}
+
+ // override from as_object ?
+ //std::string get_text_value() const { return "FileReferenceList"; }
+
+ // override from as_object ?
+ //double get_numeric_value() const { return 0; }
+};
+
+
+static as_value
+FileReferenceList_addListener(const fn_call& fn)
+{
+ boost::intrusive_ptr<FileReferenceList_as> ptr =
ensureType<FileReferenceList_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+FileReferenceList_browse(const fn_call& fn)
+{
+ boost::intrusive_ptr<FileReferenceList_as> ptr =
ensureType<FileReferenceList_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+FileReferenceList_removeListener(const fn_call& fn)
+{
+ boost::intrusive_ptr<FileReferenceList_as> ptr =
ensureType<FileReferenceList_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+as_value
+FileReferenceList_ctor(const fn_call& fn)
+{
+ boost::intrusive_ptr<as_object> obj = new FileReferenceList_as;
+
+ if ( fn.nargs )
+ {
+ std::stringstream ss;
+ fn.dump_args(ss);
+ LOG_ONCE( log_unimpl("FileReferenceList(%s): %s", ss.str(),
_("arguments discarded")) );
+ }
+
+ return as_value(obj.get()); // will keep alive
+}
+
+// extern (used by Global.cpp)
+void FileReferenceList_class_init(as_object& global)
+{
+ // This is going to be the global FileReferenceList "class"/"function"
+ static boost::intrusive_ptr<builtin_function> cl;
+
+ if ( cl == NULL )
+ {
+ cl=new builtin_function(&FileReferenceList_ctor,
getFileReferenceListInterface());
+ // replicate all interface to class, to be able to access
+ // all methods as static functions
+ attachFileReferenceListInterface(*cl);
+ }
+
+ // Register _global.FileReferenceList
+ global.init_member("FileReferenceList", cl.get());
+}
+
+} // end of gnash namespace
Index: server/asobj/flash/net/FileReferenceList_as.h
===================================================================
RCS file: server/asobj/flash/net/FileReferenceList_as.h
diff -N server/asobj/flash/net/FileReferenceList_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/net/FileReferenceList_as.h 5 May 2008 08:57:33
-0000 1.1
@@ -0,0 +1,42 @@
+// FileReferenceList_as.h: ActionScript "FileReferenceList" class, 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
+//
+
+#ifndef __GNASH_ASOBJ_FILEREFERENCELIST_H__
+#define __GNASH_ASOBJ_FILEREFERENCELIST_H__
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+//#include <memory> // for auto_ptr
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global FileReferenceList class
+void FileReferenceList_class_init(as_object& global);
+
+/// Return a FileReferenceList instance (in case the core lib needs it)
+//std::auto_ptr<as_object> init_FileReferenceList_instance();
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_FILEREFERENCELIST_H__
+#endif
Index: server/asobj/flash/net/FileReference_as.cpp
===================================================================
RCS file: server/asobj/flash/net/FileReference_as.cpp
diff -N server/asobj/flash/net/FileReference_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/net/FileReference_as.cpp 5 May 2008 08:57:33 -0000
1.1
@@ -0,0 +1,175 @@
+// FileReference_as.cpp: ActionScript "FileReference" class, 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
+//
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "FileReference_as.h"
+#include "as_object.h" // for inheritance
+#include "log.h"
+#include "fn_call.h"
+#include "smart_ptr.h" // for boost intrusive_ptr
+#include "builtin_function.h" // need builtin_function
+#include "GnashException.h" // for ActionException
+#include "Object.h" // for AS inheritance
+
+#include <sstream>
+
+namespace gnash {
+
+static as_value FileReference_addListener(const fn_call& fn);
+static as_value FileReference_browse(const fn_call& fn);
+static as_value FileReference_cancel(const fn_call& fn);
+static as_value FileReference_download(const fn_call& fn);
+static as_value FileReference_removeListener(const fn_call& fn);
+static as_value FileReference_upload(const fn_call& fn);
+as_value FileReference_ctor(const fn_call& fn);
+
+static void
+attachFileReferenceInterface(as_object& o)
+{
+ o.init_member("addListener", new
builtin_function(FileReference_addListener));
+ o.init_member("browse", new builtin_function(FileReference_browse));
+ o.init_member("cancel", new builtin_function(FileReference_cancel));
+ o.init_member("download", new builtin_function(FileReference_download));
+ o.init_member("removeListener", new
builtin_function(FileReference_removeListener));
+ o.init_member("upload", new builtin_function(FileReference_upload));
+}
+
+static as_object*
+getFileReferenceInterface()
+{
+ static boost::intrusive_ptr<as_object> o;
+ if ( ! o )
+ {
+ // TODO: check if this class should inherit from Object
+ // or from a different class
+ o = new as_object(getObjectInterface());
+ attachFileReferenceInterface(*o);
+ }
+ return o.get();
+}
+
+class FileReference_as: public as_object
+{
+
+public:
+
+ FileReference_as()
+ :
+ as_object(getFileReferenceInterface())
+ {}
+
+ // override from as_object ?
+ //std::string get_text_value() const { return "FileReference"; }
+
+ // override from as_object ?
+ //double get_numeric_value() const { return 0; }
+};
+
+
+static as_value
+FileReference_addListener(const fn_call& fn)
+{
+ boost::intrusive_ptr<FileReference_as> ptr =
ensureType<FileReference_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+FileReference_browse(const fn_call& fn)
+{
+ boost::intrusive_ptr<FileReference_as> ptr =
ensureType<FileReference_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+FileReference_cancel(const fn_call& fn)
+{
+ boost::intrusive_ptr<FileReference_as> ptr =
ensureType<FileReference_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+FileReference_download(const fn_call& fn)
+{
+ boost::intrusive_ptr<FileReference_as> ptr =
ensureType<FileReference_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+FileReference_removeListener(const fn_call& fn)
+{
+ boost::intrusive_ptr<FileReference_as> ptr =
ensureType<FileReference_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+static as_value
+FileReference_upload(const fn_call& fn)
+{
+ boost::intrusive_ptr<FileReference_as> ptr =
ensureType<FileReference_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+as_value
+FileReference_ctor(const fn_call& fn)
+{
+ boost::intrusive_ptr<as_object> obj = new FileReference_as;
+
+ if ( fn.nargs )
+ {
+ std::stringstream ss;
+ fn.dump_args(ss);
+ LOG_ONCE( log_unimpl("FileReference(%s): %s", ss.str(),
_("arguments discarded")) );
+ }
+
+ return as_value(obj.get()); // will keep alive
+}
+
+// extern (used by Global.cpp)
+void FileReference_class_init(as_object& global)
+{
+ // This is going to be the global FileReference "class"/"function"
+ static boost::intrusive_ptr<builtin_function> cl;
+
+ if ( cl == NULL )
+ {
+ cl=new builtin_function(&FileReference_ctor,
getFileReferenceInterface());
+ // replicate all interface to class, to be able to access
+ // all methods as static functions
+ attachFileReferenceInterface(*cl);
+ }
+
+ // Register _global.FileReference
+ global.init_member("FileReference", cl.get());
+}
+
+} // end of gnash namespace
Index: server/asobj/flash/net/FileReference_as.h
===================================================================
RCS file: server/asobj/flash/net/FileReference_as.h
diff -N server/asobj/flash/net/FileReference_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/net/FileReference_as.h 5 May 2008 08:57:33 -0000
1.1
@@ -0,0 +1,42 @@
+// FileReference_as.h: ActionScript "FileReference" class, 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
+//
+
+#ifndef __GNASH_ASOBJ_FILEREFERENCE_H__
+#define __GNASH_ASOBJ_FILEREFERENCE_H__
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+//#include <memory> // for auto_ptr
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global FileReference class
+void FileReference_class_init(as_object& global);
+
+/// Return a FileReference instance (in case the core lib needs it)
+//std::auto_ptr<as_object> init_FileReference_instance();
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_FILEREFERENCE_H__
+#endif
Index: server/asobj/flash/text/TextRenderer_as.cpp
===================================================================
RCS file: server/asobj/flash/text/TextRenderer_as.cpp
diff -N server/asobj/flash/text/TextRenderer_as.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/text/TextRenderer_as.cpp 5 May 2008 08:57:34 -0000
1.1
@@ -0,0 +1,120 @@
+// TextRenderer_as.cpp: ActionScript "TextRenderer" class, 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
+//
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "TextRenderer_as.h"
+#include "as_object.h" // for inheritance
+#include "log.h"
+#include "fn_call.h"
+#include "smart_ptr.h" // for boost intrusive_ptr
+#include "builtin_function.h" // need builtin_function
+#include "GnashException.h" // for ActionException
+#include "Object.h" // for AS inheritance
+
+#include <sstream>
+
+namespace gnash {
+
+static as_value TextRenderer_setAdvancedAntialiasingTable(const fn_call& fn);
+as_value TextRenderer_ctor(const fn_call& fn);
+
+static void
+attachTextRendererInterface(as_object& o)
+{
+ o.init_member("setAdvancedAntialiasingTable", new
builtin_function(TextRenderer_setAdvancedAntialiasingTable));
+}
+
+static as_object*
+getTextRendererInterface()
+{
+ static boost::intrusive_ptr<as_object> o;
+ if ( ! o )
+ {
+ // TODO: check if this class should inherit from Object
+ // or from a different class
+ o = new as_object(getObjectInterface());
+ attachTextRendererInterface(*o);
+ }
+ return o.get();
+}
+
+class TextRenderer_as: public as_object
+{
+
+public:
+
+ TextRenderer_as()
+ :
+ as_object(getTextRendererInterface())
+ {}
+
+ // override from as_object ?
+ //std::string get_text_value() const { return "TextRenderer"; }
+
+ // override from as_object ?
+ //double get_numeric_value() const { return 0; }
+};
+
+
+static as_value
+TextRenderer_setAdvancedAntialiasingTable(const fn_call& fn)
+{
+ boost::intrusive_ptr<TextRenderer_as> ptr =
ensureType<TextRenderer_as>(fn.this_ptr);
+ UNUSED(ptr);
+ LOG_ONCE( log_unimpl (__FUNCTION__) );
+ return as_value();
+}
+
+as_value
+TextRenderer_ctor(const fn_call& fn)
+{
+ boost::intrusive_ptr<as_object> obj = new TextRenderer_as;
+
+ if ( fn.nargs )
+ {
+ std::stringstream ss;
+ fn.dump_args(ss);
+ LOG_ONCE( log_unimpl("TextRenderer(%s): %s", ss.str(),
_("arguments discarded")) );
+ }
+
+ return as_value(obj.get()); // will keep alive
+}
+
+// extern (used by Global.cpp)
+void TextRenderer_class_init(as_object& global)
+{
+ // This is going to be the global TextRenderer "class"/"function"
+ static boost::intrusive_ptr<builtin_function> cl;
+
+ if ( cl == NULL )
+ {
+ cl=new builtin_function(&TextRenderer_ctor,
getTextRendererInterface());
+ // replicate all interface to class, to be able to access
+ // all methods as static functions
+ attachTextRendererInterface(*cl);
+ }
+
+ // Register _global.TextRenderer
+ global.init_member("TextRenderer", cl.get());
+}
+
+} // end of gnash namespace
Index: server/asobj/flash/text/TextRenderer_as.h
===================================================================
RCS file: server/asobj/flash/text/TextRenderer_as.h
diff -N server/asobj/flash/text/TextRenderer_as.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/flash/text/TextRenderer_as.h 5 May 2008 08:57:34 -0000
1.1
@@ -0,0 +1,42 @@
+// TextRenderer_as.h: ActionScript "TextRenderer" class, 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
+//
+
+#ifndef __GNASH_ASOBJ_TEXTRENDERER_H__
+#define __GNASH_ASOBJ_TEXTRENDERER_H__
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+//#include <memory> // for auto_ptr
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global TextRenderer class
+void TextRenderer_class_init(as_object& global);
+
+/// Return a TextRenderer instance (in case the core lib needs it)
+//std::auto_ptr<as_object> init_TextRenderer_instance();
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_TEXTRENDERER_H__
+#endif
Index: server/asobj/BevelFilter_as.cpp
===================================================================
RCS file: server/asobj/BevelFilter_as.cpp
diff -N server/asobj/BevelFilter_as.cpp
--- server/asobj/BevelFilter_as.cpp 5 Mar 2008 03:56:00 -0000 1.9
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,133 +0,0 @@
-//
-// Copyright (C) 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 "as_object.h"
-#include "BevelFilter.h"
-#include "VM.h"
-#include "builtin_function.h"
-
-// These _must_ be defined for prophelpers to work correctly.
-// This is enforced by the file itself.
-#define phelp_helper BevelFilter_as
-#include "prophelper.h"
-#include "BitmapFilter_as.h"
-
-namespace gnash {
-
-class BevelFilter_as : public as_object, public BevelFilter
-{
-public:
- phelp_gs(distance);
- phelp_gs(angle);
- phelp_gs(highlightColor);
- phelp_gs(highlightAlpha);
- phelp_gs(shadowColor);
- phelp_gs(shadowAlpha);
- phelp_gs(blurX);
- phelp_gs(blurY);
- phelp_gs(strength);
- phelp_gs(quality);
- phelp_gs(type);
- phelp_gs(knockout);
-
- phelp_i(bitmap_clone);
-private:
- phelp_base_def;
-};
-
-phelp_base_imp((bitmapFilter_interface()), BevelFilter)
-
-// Replace BitmapFilter clone.
-phelp_i_attach_begin
-phelp_i_replace(clone, bitmap_clone);
-phelp_i_attach_end
-
-// Begin attaching properties, then attach them, then end.
-phelp_gs_attach_begin
-phelp_gs_attach(distance);
-phelp_gs_attach(angle);
-phelp_gs_attach(highlightColor);
-phelp_gs_attach(highlightAlpha);
-phelp_gs_attach(shadowColor);
-phelp_gs_attach(shadowAlpha);
-phelp_gs_attach(blurX);
-phelp_gs_attach(blurY);
-phelp_gs_attach(strength);
-phelp_gs_attach(quality);
-phelp_gs_attach(type);
-phelp_gs_attach(knockout);
-phelp_gs_attach_end
-
-phelp_property(float, number<float>, distance)
-phelp_property(float, number<float>, angle)
-phelp_property(boost::uint32_t, number<boost::uint32_t>, highlightColor)
-phelp_property(boost::uint8_t, number<boost::uint8_t>, highlightAlpha)
-phelp_property(boost::uint32_t, number<boost::uint32_t>, shadowColor)
-phelp_property(boost::uint8_t, number<boost::uint8_t>, shadowAlpha)
-phelp_property(float, number<float>, blurX)
-phelp_property(float, number<float>, blurY)
-phelp_property(float, number<float>, strength)
-phelp_property(boost::uint8_t, number<boost::uint8_t>, quality)
-phelp_property(bool, bool, knockout)
-
-easy_clone(BevelFilter_as)
-
-as_value
-BevelFilter_as::type_gs(const fn_call& fn)
-{
- boost::intrusive_ptr<BevelFilter_as> ptr =
ensureType<BevelFilter_as>(fn.this_ptr);
-
- if (fn.nargs == 0) // getter
- {
- switch (ptr->m_type)
- {
- case BevelFilter::FULL_BEVEL:
- return as_value("full");
- break;
- default:
- case BevelFilter::INNER_BEVEL:
- return as_value("inner");
- break;
- case BevelFilter::OUTER_BEVEL:
- return as_value("outer");
- break;
- }
- }
- // setter
- std::string type = fn.arg(0).to_string();
- if (type == "outer")
- ptr->m_type = BevelFilter::OUTER_BEVEL;
- if (type == "inner")
- ptr->m_type = BevelFilter::INNER_BEVEL;
- if (type == "full")
- ptr->m_type = BevelFilter::FULL_BEVEL;
-
- return as_value();
-}
-
-as_value
-BevelFilter_as::ctor(const fn_call& /*fn*/)
-{
- boost::intrusive_ptr<as_object> obj = new
BevelFilter_as(BevelFilter_as::Interface());
- BevelFilter_as::attachProperties(*obj);
-
- return as_value(obj.get());
-}
-
-} // Namespace gnash
-
Index: server/asobj/BevelFilter_as.h
===================================================================
RCS file: server/asobj/BevelFilter_as.h
diff -N server/asobj/BevelFilter_as.h
--- server/asobj/BevelFilter_as.h 26 Mar 2008 21:34:20 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-//
-// Copyright (C) 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 __GNASH_ASOBJ_BEVELFILTER_H__
-#define __GNASH_ASOBJ_BEVELFILTER_H__
-
-namespace gnash {
-
-class as_object;
-
-/// Initialize the global BitmapFilter class
-void BevelFilter_class_init(as_object& global);
-
-} // end of gnash namespace
-
-// __GNASH_ASOBJ_BEVELFILTER_H__
-#endif
-
Index: server/asobj/BitmapFilter_as.cpp
===================================================================
RCS file: server/asobj/BitmapFilter_as.cpp
diff -N server/asobj/BitmapFilter_as.cpp
--- server/asobj/BitmapFilter_as.cpp 5 Mar 2008 03:56:00 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,79 +0,0 @@
-//
-// Copyright (C) 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 "as_object.h"
-#include "BitmapFilter.h"
-#include "VM.h"
-#include "builtin_function.h"
-
-#define phelp_helper BitmapFilter_as
-#define phelp_class BitmapFilter
-#include "prophelper.h"
-
-namespace gnash {
-
-class BitmapFilter_as : public as_object, public BitmapFilter
-{
-public:
- phelp_i(bitmap_clone);
-
- virtual boost::intrusive_ptr<as_object> clone();
-
-private:
- phelp_base_def;
-};
-
-phelp_base_imp( , BitmapFilter)
-
-phelp_i_attach_begin
-phelp_i_attach(clone, bitmap_clone);
-phelp_i_attach_end
-
-// Clone this object.
-boost::intrusive_ptr<as_object> BitmapFilter_as::clone()
-{
- boost::intrusive_ptr<as_object> o = new
BitmapFilter_as(BitmapFilter_as::Interface());
- return o;
-}
-
-as_value
-BitmapFilter_as::ctor(const fn_call& /*fn*/)
-{
- boost::intrusive_ptr<as_object> obj = new
BitmapFilter_as(BitmapFilter_as::Interface());
- return as_value(obj);
-}
-
-as_value BitmapFilter_as::bitmap_clone(const fn_call& fn)
-{
- boost::intrusive_ptr<BitmapFilter_as> to_copy =
ensureType<BitmapFilter_as> (fn.this_ptr);
- boost::intrusive_ptr<BitmapFilter_as> filter = new
BitmapFilter_as(*to_copy);
- filter->set_prototype(filter->get_prototype());
- filter->copyProperties(*filter);
- boost::intrusive_ptr<as_object> r = filter;
-
- return as_value(r);
-}
-
-as_object*
-bitmapFilter_interface()
-{
- return BitmapFilter_as::Interface();
-}
-
-} // Namespace gnash
-
Index: server/asobj/BitmapFilter_as.h
===================================================================
RCS file: server/asobj/BitmapFilter_as.h
diff -N server/asobj/BitmapFilter_as.h
--- server/asobj/BitmapFilter_as.h 21 Jan 2008 20:55:53 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,56 +0,0 @@
-//
-// Copyright (C) 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 __GNASH_ASOBJ_BITMAPFILTER_H__
-#define __GNASH_ASOBJ_BITMAPFILTER_H__
-
-#ifdef HAVE_CONFIG_H
-#include "gnashconfig.h"
-#endif
-
-namespace gnash {
-
-class as_object;
-
-/// Initialize the global BitmapFilter class
-void BitmapFilter_class_init(as_object& global);
-
-/// Get the interface, for inheritance.
-as_object *bitmapFilter_interface();
-
-} // end of gnash namespace
-
-// __GNASH_ASOBJ_BITMAPFILTER_H__
-#endif
-
-#ifdef phelp_helper
-#ifndef easy_clone
-#define easy_clone(sp_name) \
-as_value \
-sp_name::bitmap_clone(const fn_call& fn) \
-{ \
- boost::intrusive_ptr<sp_name> ptr = ensureType<sp_name>(fn.this_ptr); \
- boost::intrusive_ptr<sp_name> obj = new sp_name(*ptr); \
- boost::intrusive_ptr<as_object> r = obj; \
- r->set_prototype(ptr->get_prototype()); \
- r->copyProperties(*ptr); \
-\
- return as_value(r); \
-}
-#endif /* easy_clone */
-#endif /* phelp_helper */
Index: server/asobj/BlurFilter_as.cpp
===================================================================
RCS file: server/asobj/BlurFilter_as.cpp
diff -N server/asobj/BlurFilter_as.cpp
--- server/asobj/BlurFilter_as.cpp 5 Mar 2008 03:56:00 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,72 +0,0 @@
-//
-// Copyright (C) 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 "as_object.h"
-#include "BlurFilter.h"
-#include "VM.h"
-#include "builtin_function.h"
-
-// These _must_ be defined.
-#define phelp_helper BlurFilter_as
-#include "prophelper.h"
-#include "BitmapFilter_as.h"
-
-namespace gnash {
-
-class BlurFilter_as : public as_object, public BlurFilter
-{
-public:
- phelp_gs(blurX);
- phelp_gs(blurY);
- phelp_gs(quality);
-
- phelp_i(bitmap_clone);
-private:
- phelp_base_def;
-};
-
-phelp_base_imp((bitmapFilter_interface()), BlurFilter)
-
-// Filters are property based.
-phelp_i_attach_begin
-phelp_i_replace(clone, bitmap_clone);
-phelp_i_attach_end
-
-phelp_gs_attach_begin
-phelp_gs_attach(blurX);
-phelp_gs_attach(blurY);
-phelp_gs_attach(quality);
-phelp_gs_attach_end
-
-phelp_property(float, number<float>, blurX)
-phelp_property(float, number<float>, blurY)
-phelp_property(boost::uint8_t, number<boost::uint8_t>, quality)
-
-easy_clone(BlurFilter_as)
-
-as_value
-BlurFilter_as::ctor(const fn_call& /*fn*/)
-{
- boost::intrusive_ptr<as_object> obj = new
BlurFilter_as(BlurFilter_as::Interface());
- BlurFilter_as::attachProperties(*obj);
-
- return as_value(obj);
-}
-
-} // Namespace gnash
-
Index: server/asobj/BlurFilter_as.h
===================================================================
RCS file: server/asobj/BlurFilter_as.h
diff -N server/asobj/BlurFilter_as.h
--- server/asobj/BlurFilter_as.h 26 Mar 2008 21:34:21 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-//
-// Copyright (C) 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 __GNASH_ASOBJ_BLURFILTER_H__
-#define __GNASH_ASOBJ_BLURFILTER_H__
-
-namespace gnash {
-
-class as_object;
-
-/// Initialize the global BlurFilter class
-void BlurFilter_class_init(as_object& global);
-
-} // end of gnash namespace
-
-// __GNASH_ASOBJ_BLURFILTER_H__
-#endif
-
Index: server/asobj/ColorMatrixFilter_as.cpp
===================================================================
RCS file: server/asobj/ColorMatrixFilter_as.cpp
diff -N server/asobj/ColorMatrixFilter_as.cpp
--- server/asobj/ColorMatrixFilter_as.cpp 5 Mar 2008 03:56:00 -0000
1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,66 +0,0 @@
-//
-// Copyright (C) 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 "as_object.h"
-#include "ColorMatrixFilter.h"
-#include "VM.h"
-#include "builtin_function.h"
-
-#define phelp_helper ColorMatrixFilter_as
-#include "prophelper.h"
-#include "BitmapFilter_as.h"
-
-namespace gnash {
-
-class ColorMatrixFilter_as : public as_object, public ColorMatrixFilter
-{
-public:
- phelp_gs(matrix);
-
- phelp_i(bitmap_clone);
-
-private:
- phelp_base_def;
-};
-
-phelp_base_imp((bitmapFilter_interface()), ColorMatrixFilter)
-
-// Filters are purely property based.
-phelp_i_attach_begin
-phelp_i_replace(clone, bitmap_clone);
-phelp_i_attach_end
-
-phelp_gs_attach_begin
-phelp_gs_attach(matrix);
-phelp_gs_attach_end
-
-phelp_array_property(matrix)
-
-easy_clone(ColorMatrixFilter_as)
-
-as_value
-ColorMatrixFilter_as::ctor(const fn_call& /*fn*/)
-{
- boost::intrusive_ptr<as_object> obj = new
ColorMatrixFilter_as(ColorMatrixFilter_as::Interface());
- ColorMatrixFilter_as::attachProperties(*obj);
-
- return as_value(obj.get());
-}
-
-} // Namespace gnash
-
Index: server/asobj/ColorMatrixFilter_as.h
===================================================================
RCS file: server/asobj/ColorMatrixFilter_as.h
diff -N server/asobj/ColorMatrixFilter_as.h
--- server/asobj/ColorMatrixFilter_as.h 26 Mar 2008 21:34:21 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-//
-// Copyright (C) 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 __GNASH_ASOBJ_COLORMATRIXFILTER_H__
-#define __GNASH_ASOBJ_COLORMATRIXFILTER_H__
-
-namespace gnash {
-
-class as_object;
-
-/// Initialize the global ColorMatrixFilter class
-void ColorMatrixFilter_class_init(as_object& global);
-
-} // end of gnash namespace
-
-// __GNASH_ASOBJ_COLORMATRIXFILTER_H__
-#endif
-
Index: server/asobj/ConvolutionFilter_as.cpp
===================================================================
RCS file: server/asobj/ConvolutionFilter_as.cpp
diff -N server/asobj/ConvolutionFilter_as.cpp
--- server/asobj/ConvolutionFilter_as.cpp 5 Mar 2008 03:56:00 -0000
1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,89 +0,0 @@
-//
-// Copyright (C) 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 "as_object.h"
-#include "ConvolutionFilter.h"
-#include "VM.h"
-#include "builtin_function.h"
-
-#define phelp_helper ConvolutionFilter_as
-#define phelp_class ConvolutionFilter
-#include "prophelper.h"
-#include "BitmapFilter_as.h"
-
-namespace gnash {
-
-class ConvolutionFilter_as : public as_object, public ConvolutionFilter
-{
-public:
- phelp_gs(matrixX);
- phelp_gs(matrixY);
- phelp_gs(matrix);
- phelp_gs(divisor);
- phelp_gs(bias);
- phelp_gs(preserveAlpha);
- phelp_gs(clamp);
- phelp_gs(color);
- phelp_gs(alpha);
-
- phelp_i(bitmap_clone);
-private:
- phelp_base_def;
-};
-
-phelp_base_imp((bitmapFilter_interface()), ConvolutionFilter)
-
-phelp_i_attach_begin
-phelp_i_replace(clone, bitmap_clone);
-phelp_i_attach_end
-
-phelp_gs_attach_begin
-phelp_gs_attach(matrixX);
-phelp_gs_attach(matrixY);
-phelp_gs_attach(matrix);
-phelp_gs_attach(divisor);
-phelp_gs_attach(bias);
-phelp_gs_attach(preserveAlpha);
-phelp_gs_attach(clamp);
-phelp_gs_attach(color);
-phelp_gs_attach(alpha);
-phelp_gs_attach_end
-
-phelp_property(boost::uint8_t, number<boost::uint8_t>, matrixX)
-phelp_property(boost::uint8_t, number<boost::uint8_t>, matrixY)
-phelp_property(float, number<float>, divisor)
-phelp_property(float, number<float>, bias)
-phelp_property(bool, bool, preserveAlpha)
-phelp_property(bool, bool, clamp)
-phelp_property(boost::uint32_t, number<boost::uint32_t>, color)
-phelp_property(boost::uint8_t, number<boost::uint8_t>, alpha)
-phelp_array_property(matrix)
-
-easy_clone(ConvolutionFilter_as)
-
-as_value
-ConvolutionFilter_as::ctor(const fn_call& /*fn*/)
-{
- boost::intrusive_ptr<as_object> obj = new
ConvolutionFilter_as(ConvolutionFilter_as::Interface());
- ConvolutionFilter_as::attachProperties(*obj);
-
- return as_value(obj.get());
-}
-
-} // Namespace gnash
-
Index: server/asobj/ConvolutionFilter_as.h
===================================================================
RCS file: server/asobj/ConvolutionFilter_as.h
diff -N server/asobj/ConvolutionFilter_as.h
--- server/asobj/ConvolutionFilter_as.h 26 Mar 2008 21:34:21 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-//
-// Copyright (C) 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 __GNASH_ASOBJ_CONVOLUTIONFILTER_H__
-#define __GNASH_ASOBJ_CONVOLUTIONFILTER_H__
-
-namespace gnash {
-
-class as_object;
-
-/// Initialize the global ConvolutionFilter class
-void ConvolutionFilter_class_init(as_object& global);
-
-} // end of gnash namespace
-
-// __GNASH_ASOBJ_CONVOLUTIONFILTER_H__
-#endif
-
Index: server/asobj/DropShadowFilter_as.cpp
===================================================================
RCS file: server/asobj/DropShadowFilter_as.cpp
diff -N server/asobj/DropShadowFilter_as.cpp
--- server/asobj/DropShadowFilter_as.cpp 5 Mar 2008 03:56:00 -0000
1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,98 +0,0 @@
-//
-// Copyright (C) 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 "as_object.h"
-#include "DropShadowFilter.h"
-#include "VM.h"
-#include "builtin_function.h"
-
-// These _must_ be defined.
-#define phelp_helper DropShadowFilter_as
-#define phelp_class DropShadowFilter
-#include "prophelper.h"
-#include "BitmapFilter_as.h"
-
-namespace gnash {
-
-class DropShadowFilter_as : public as_object, public DropShadowFilter
-{
-public:
- phelp_gs(distance);
- phelp_gs(angle);
- phelp_gs(color);
- phelp_gs(alpha);
- phelp_gs(blurX);
- phelp_gs(blurY);
- phelp_gs(strength);
- phelp_gs(quality);
- phelp_gs(inner);
- phelp_gs(knockout);
- phelp_gs(hideObject);
-
- phelp_i(bitmap_clone);
-
-private:
- phelp_base_def;
-};
-
-phelp_base_imp((bitmapFilter_interface()), DropShadowFilter)
-
-// Filters are property based.
-phelp_i_attach_begin
-phelp_i_replace(clone, bitmap_clone);
-phelp_i_attach_end
-
-phelp_gs_attach_begin
-phelp_gs_attach(distance);
-phelp_gs_attach(angle);
-phelp_gs_attach(color);
-phelp_gs_attach(alpha);
-phelp_gs_attach(blurX);
-phelp_gs_attach(blurY);
-phelp_gs_attach(strength);
-phelp_gs_attach(quality);
-phelp_gs_attach(inner);
-phelp_gs_attach(knockout);
-phelp_gs_attach(hideObject);
-phelp_gs_attach_end
-
-phelp_property(float, number<float>, distance)
-phelp_property(float, number<float>, angle)
-phelp_property(boost::uint32_t, number<boost::uint32_t>, color)
-phelp_property(boost::uint8_t, number<boost::uint8_t>, alpha)
-phelp_property(float, number<float>, blurX)
-phelp_property(float, number<float>, blurY)
-phelp_property(float, number<float>, strength)
-phelp_property(boost::uint8_t, number<boost::uint8_t>, quality)
-phelp_property(bool, bool, inner)
-phelp_property(bool, bool, knockout)
-phelp_property(bool, bool, hideObject)
-
-easy_clone(DropShadowFilter_as)
-
-as_value
-DropShadowFilter_as::ctor(const fn_call& /*fn*/)
-{
- boost::intrusive_ptr<as_object> obj = new
DropShadowFilter_as(DropShadowFilter_as::Interface());
- DropShadowFilter_as::attachProperties(*obj);
-
- return as_value(obj.get());
-}
-
-} // Namespace gnash
-
Index: server/asobj/DropShadowFilter_as.h
===================================================================
RCS file: server/asobj/DropShadowFilter_as.h
diff -N server/asobj/DropShadowFilter_as.h
--- server/asobj/DropShadowFilter_as.h 26 Mar 2008 21:34:21 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-//
-// Copyright (C) 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 __GNASH_ASOBJ_DROPSHADOWFILTER_H__
-#define __GNASH_ASOBJ_DROPSHADOWFILTER_H__
-
-namespace gnash {
-
-class as_object;
-
-/// Initialize the global DropShadowFilter class
-void DropShadowFilter_class_init(as_object& global);
-
-} // end of gnash namespace
-
-// __GNASH_ASOBJ_DROPSHADOWFILTER_H__
-#endif
-
Index: server/asobj/GlowFilter_as.cpp
===================================================================
RCS file: server/asobj/GlowFilter_as.cpp
diff -N server/asobj/GlowFilter_as.cpp
--- server/asobj/GlowFilter_as.cpp 5 Mar 2008 03:56:00 -0000 1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,88 +0,0 @@
-//
-// Copyright (C) 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 "as_object.h"
-#include "GlowFilter.h"
-#include "VM.h"
-#include "builtin_function.h"
-
-// These _must_ be defined.
-#define phelp_helper GlowFilter_as
-#define phelp_class GlowFilter
-#include "prophelper.h"
-#include "BitmapFilter_as.h"
-
-namespace gnash {
-
-class GlowFilter_as : public as_object, public GlowFilter
-{
-public:
- phelp_gs(color);
- phelp_gs(alpha);
- phelp_gs(blurX);
- phelp_gs(blurY);
- phelp_gs(strength);
- phelp_gs(quality);
- phelp_gs(inner);
- phelp_gs(knockout);
-
- phelp_i(bitmap_clone);
-private:
- phelp_base_def;
-};
-
-phelp_base_imp((bitmapFilter_interface()), GlowFilter)
-
-// Filters are property based.
-phelp_i_attach_begin
-phelp_i_replace(clone, bitmap_clone);
-phelp_i_attach_end
-
-phelp_gs_attach_begin
-phelp_gs_attach(color);
-phelp_gs_attach(alpha);
-phelp_gs_attach(blurX);
-phelp_gs_attach(blurY);
-phelp_gs_attach(strength);
-phelp_gs_attach(quality);
-phelp_gs_attach(inner);
-phelp_gs_attach(knockout);
-phelp_gs_attach_end
-
-phelp_property(boost::uint32_t, number<boost::uint32_t>, color)
-phelp_property(boost::uint8_t, number<boost::uint8_t>, alpha)
-phelp_property(float, number<float>, blurX)
-phelp_property(float, number<float>, blurY)
-phelp_property(float, number<float>, strength)
-phelp_property(boost::uint8_t, number<boost::uint8_t>, quality)
-phelp_property(bool, bool, inner)
-phelp_property(bool, bool, knockout)
-
-easy_clone(GlowFilter_as)
-
-as_value
-GlowFilter_as::ctor(const fn_call& /*fn*/)
-{
- boost::intrusive_ptr<as_object> obj = new
GlowFilter_as(GlowFilter_as::Interface());
- GlowFilter_as::attachProperties(*obj);
-
- return as_value(obj.get());
-}
-
-} // Namespace gnash
-
Index: server/asobj/GlowFilter_as.h
===================================================================
RCS file: server/asobj/GlowFilter_as.h
diff -N server/asobj/GlowFilter_as.h
--- server/asobj/GlowFilter_as.h 26 Mar 2008 21:34:21 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-//
-// Copyright (C) 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 __GNASH_ASOBJ_GLOWFILTER_H__
-#define __GNASH_ASOBJ_GLOWFILTER_H__
-
-namespace gnash {
-
-class as_object;
-
-/// Initialize the global GlowFilter class
-void GlowFilter_class_init(as_object& global);
-
-} // end of gnash namespace
-
-// __GNASH_ASOBJ_GLOWFILTER_H__
-#endif
-
Index: server/asobj/GradientBevelFilter_as.cpp
===================================================================
RCS file: server/asobj/GradientBevelFilter_as.cpp
diff -N server/asobj/GradientBevelFilter_as.cpp
--- server/asobj/GradientBevelFilter_as.cpp 5 Mar 2008 03:56:00 -0000
1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,133 +0,0 @@
-//
-// Copyright (C) 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 "as_object.h"
-#include "GradientBevelFilter.h"
-#include "VM.h"
-#include "builtin_function.h"
-
-// These _must_ be defined for prophelpers to work correctly.
-// This is enforced by the file itself.
-#define phelp_helper GradientBevelFilter_as
-#define phelp_class GradientBevelFilter
-#include "prophelper.h"
-#include "BitmapFilter_as.h"
-
-namespace gnash {
-
-class GradientBevelFilter_as : public as_object, public GradientBevelFilter
-{
-public:
- phelp_gs(distance);
- phelp_gs(angle);
- phelp_gs(colors);
- phelp_gs(alphas);
- phelp_gs(ratios);
- phelp_gs(blurX);
- phelp_gs(blurY);
- phelp_gs(strength);
- phelp_gs(quality);
- phelp_gs(type); // No automation
- phelp_gs(knockout);
-
- phelp_i(bitmap_clone);
-
-private:
- phelp_base_def;
-};
-
-phelp_base_imp((bitmapFilter_interface()), GradientBevelFilter)
-
-// Filters are purely property based.
-phelp_i_attach_begin
-phelp_i_replace(clone, bitmap_clone);
-phelp_i_attach_end
-
-// Begin attaching properties, then attach them, then end.
-phelp_gs_attach_begin
-phelp_gs_attach(distance);
-phelp_gs_attach(angle);
-phelp_gs_attach(colors);
-phelp_gs_attach(alphas);
-phelp_gs_attach(ratios);
-phelp_gs_attach(blurX);
-phelp_gs_attach(blurY);
-phelp_gs_attach(strength);
-phelp_gs_attach(quality);
-phelp_gs_attach(type);
-phelp_gs_attach(knockout);
-phelp_gs_attach_end
-
-phelp_property(float, number<float>, distance)
-phelp_property(float, number<float>, angle)
-phelp_array_property(colors)
-phelp_array_property(alphas)
-phelp_array_property(ratios)
-phelp_property(float, number<float>, blurX)
-phelp_property(float, number<float>, blurY)
-phelp_property(float, number<float>, strength)
-phelp_property(boost::uint8_t, number<boost::uint8_t>, quality)
-// Type is not automatable.
-phelp_property(bool, bool, knockout)
-
-easy_clone(GradientBevelFilter_as)
-
-as_value
-GradientBevelFilter_as::type_gs(const fn_call& fn)
-{
- boost::intrusive_ptr<GradientBevelFilter_as> ptr =
ensureType<GradientBevelFilter_as>(fn.this_ptr);
-
- if (fn.nargs == 0) // getter
- {
- switch (ptr->m_type)
- {
- case GradientBevelFilter::FULL_BEVEL:
- return as_value("full");
- break;
- default:
- case GradientBevelFilter::INNER_BEVEL:
- return as_value("inner");
- break;
- case GradientBevelFilter::OUTER_BEVEL:
- return as_value("outer");
- break;
- }
- }
- // setter
- std::string type = fn.arg(0).to_string();
- if (type == "outer")
- ptr->m_type = GradientBevelFilter::OUTER_BEVEL;
- if (type == "inner")
- ptr->m_type = GradientBevelFilter::INNER_BEVEL;
- if (type == "full")
- ptr->m_type = GradientBevelFilter::FULL_BEVEL;
-
- return as_value();
-}
-
-as_value
-GradientBevelFilter_as::ctor(const fn_call& /*fn*/)
-{
- boost::intrusive_ptr<as_object> obj = new
GradientBevelFilter_as(GradientBevelFilter_as::Interface());
- GradientBevelFilter_as::attachProperties(*obj);
-
- return as_value(obj.get());
-}
-
-} // Namespace gnash
-
Index: server/asobj/GradientBevelFilter_as.h
===================================================================
RCS file: server/asobj/GradientBevelFilter_as.h
diff -N server/asobj/GradientBevelFilter_as.h
--- server/asobj/GradientBevelFilter_as.h 26 Mar 2008 21:34:22 -0000
1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-//
-// Copyright (C) 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 __GNASH_ASOBJ_GRADIENTBEVELFILTER_H__
-#define __GNASH_ASOBJ_GRADIENTBEVELFILTER_H__
-
-namespace gnash {
-
-class as_object;
-
-/// Initialize the global GradientBevelFilter class
-void GradientBevelFilter_class_init(as_object& global);
-
-} // end of gnash namespace
-
-// __GNASH_ASOBJ_GRADIENTBEVELFILTER_H__
-#endif
-
Index: server/asobj/GradientGlowFilter_as.cpp
===================================================================
RCS file: server/asobj/GradientGlowFilter_as.cpp
diff -N server/asobj/GradientGlowFilter_as.cpp
--- server/asobj/GradientGlowFilter_as.cpp 5 Mar 2008 03:56:01 -0000
1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,133 +0,0 @@
-//
-// Copyright (C) 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 "as_object.h"
-#include "GradientGlowFilter.h"
-#include "VM.h"
-#include "builtin_function.h"
-
-// These _must_ be defined for prophelpers to work correctly.
-// This is enforced by the file itself.
-#define phelp_helper GradientGlowFilter_as
-#define phelp_class GradientGlowFilter
-#include "prophelper.h"
-#include "BitmapFilter_as.h"
-
-namespace gnash {
-
-class GradientGlowFilter_as : public as_object, public GradientGlowFilter
-{
-public:
- phelp_gs(distance);
- phelp_gs(angle);
- phelp_gs(colors);
- phelp_gs(alphas);
- phelp_gs(ratios);
- phelp_gs(blurX);
- phelp_gs(blurY);
- phelp_gs(strength);
- phelp_gs(quality);
- phelp_gs(type); // No automation
- phelp_gs(knockout);
-
- phelp_i(bitmap_clone);
-
-private:
- phelp_base_def;
-};
-
-phelp_base_imp((bitmapFilter_interface()), GradientGlowFilter)
-
-// Filters are purely property based.
-phelp_i_attach_begin
-phelp_i_replace(clone, bitmap_clone);
-phelp_i_attach_end
-
-// Begin attaching properties, then attach them, then end.
-phelp_gs_attach_begin
-phelp_gs_attach(distance);
-phelp_gs_attach(angle);
-phelp_gs_attach(colors);
-phelp_gs_attach(alphas);
-phelp_gs_attach(ratios);
-phelp_gs_attach(blurX);
-phelp_gs_attach(blurY);
-phelp_gs_attach(strength);
-phelp_gs_attach(quality);
-phelp_gs_attach(type);
-phelp_gs_attach(knockout);
-phelp_gs_attach_end
-
-phelp_property(float, number<float>, distance)
-phelp_property(float, number<float>, angle)
-phelp_array_property(colors)
-phelp_array_property(alphas)
-phelp_array_property(ratios)
-phelp_property(float, number<float>, blurX)
-phelp_property(float, number<float>, blurY)
-phelp_property(float, number<float>, strength)
-phelp_property(boost::uint8_t, number<boost::uint8_t>, quality)
-// Type is not automatable.
-phelp_property(bool, bool, knockout)
-
-easy_clone(GradientGlowFilter_as)
-
-as_value
-GradientGlowFilter_as::type_gs(const fn_call& fn)
-{
- boost::intrusive_ptr<GradientGlowFilter_as> ptr =
ensureType<GradientGlowFilter_as>(fn.this_ptr);
-
- if (fn.nargs == 0) // getter
- {
- switch (ptr->m_type)
- {
- case GradientGlowFilter::FULL_GLOW:
- return as_value("full");
- break;
- default:
- case GradientGlowFilter::INNER_GLOW:
- return as_value("inner");
- break;
- case GradientGlowFilter::OUTER_GLOW:
- return as_value("outer");
- break;
- }
- }
- // setter
- std::string type = fn.arg(0).to_string();
- if (type == "outer")
- ptr->m_type = GradientGlowFilter::OUTER_GLOW;
- if (type == "inner")
- ptr->m_type = GradientGlowFilter::INNER_GLOW;
- if (type == "full")
- ptr->m_type = GradientGlowFilter::FULL_GLOW;
-
- return as_value();
-}
-
-as_value
-GradientGlowFilter_as::ctor(const fn_call& /*fn*/)
-{
- boost::intrusive_ptr<as_object> obj = new
GradientGlowFilter_as(GradientGlowFilter_as::Interface());
- GradientGlowFilter_as::attachProperties(*obj);
-
- return as_value(obj.get());
-}
-
-} // Namespace gnash
-
Index: server/asobj/GradientGlowFilter_as.h
===================================================================
RCS file: server/asobj/GradientGlowFilter_as.h
diff -N server/asobj/GradientGlowFilter_as.h
--- server/asobj/GradientGlowFilter_as.h 26 Mar 2008 21:34:22 -0000
1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-//
-// Copyright (C) 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 __GNASH_ASOBJ_GRADIENTGLOWFILTER_H__
-#define __GNASH_ASOBJ_GRADIENTGLOWFILTER_H__
-
-namespace gnash {
-
-class as_object;
-
-/// Initialize the global GradientGlowFilter class
-void GradientGlowFilter_class_init(as_object& global);
-
-} // end of gnash namespace
-
-// __GNASH_ASOBJ_GRADIENTGLOWFILTER_H__
-#endif
-
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog server/asobj/Makefile.am server...,
Sandro Santilli <=