gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/BevelFilter.h server/Blu...


From: Chad Musick
Subject: [Gnash-commit] gnash ChangeLog server/BevelFilter.h server/Blu...
Date: Mon, 27 Aug 2007 18:13:44 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Chad Musick <cmusick>   07/08/27 18:13:44

Modified files:
        .              : ChangeLog 
        server         : BevelFilter.h BlurFilter.cpp BlurFilter.h 
                         ColorMatrixFilter.cpp ColorMatrixFilter.h 
                         ConvolutionFilter.cpp ConvolutionFilter.h 
                         DropShadowFilter.cpp DropShadowFilter.h 
                         GlowFilter.cpp GlowFilter.h 
                         GradientBevelFilter.cpp GradientBevelFilter.h 
                         GradientGlowFilter.cpp GradientGlowFilter.h 
        server/asobj   : BevelFilter_as.cpp BevelFilter_as.h 
                         BitmapFilter_as.cpp BitmapFilter_as.h 
                         Makefile.am 
        server/parser  : filter_factory.cpp 
Added files:
        server/asobj   : 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 prophelper.h 

Log message:
        Adding functionality to support the Filter type objects in ActionScript.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4123&r2=1.4124
http://cvs.savannah.gnu.org/viewcvs/gnash/server/BevelFilter.h?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/server/BlurFilter.cpp?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/BlurFilter.h?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/ColorMatrixFilter.cpp?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/ColorMatrixFilter.h?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/ConvolutionFilter.cpp?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/ConvolutionFilter.h?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/DropShadowFilter.cpp?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/DropShadowFilter.h?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/GlowFilter.cpp?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/GlowFilter.h?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/GradientBevelFilter.cpp?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/GradientBevelFilter.h?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/GradientGlowFilter.cpp?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/GradientGlowFilter.h?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/BevelFilter_as.cpp?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/BevelFilter_as.h?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/BitmapFilter_as.cpp?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/BitmapFilter_as.h?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Makefile.am?cvsroot=gnash&r1=1.42&r2=1.43
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/BlurFilter_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/BlurFilter_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/ColorMatrixFilter_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/ColorMatrixFilter_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/ConvolutionFilter_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/ConvolutionFilter_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/DropShadowFilter_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/DropShadowFilter_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/GlowFilter_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/GlowFilter_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/GradientBevelFilter_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/GradientBevelFilter_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/GradientGlowFilter_as.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/GradientGlowFilter_as.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/prophelper.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/filter_factory.cpp?cvsroot=gnash&r1=1.3&r2=1.4

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4123
retrieving revision 1.4124
diff -u -b -r1.4123 -r1.4124
--- ChangeLog   27 Aug 2007 18:12:29 -0000      1.4123
+++ ChangeLog   27 Aug 2007 18:13:38 -0000      1.4124
@@ -1,9 +1,38 @@
+<<<<<<< ChangeLog
+2007-08-28 Chad Musick <address@hidden>
+
+       * server/asobj/BlurFilter_as.cpp,.h
+       * server/asobj/ColorMatrixFilter_as.cpp,.h
+       * server/asobj/ConvolutionFilter_as.cpp,.h
+       * server/asobj/DropShadowFilter_as.cpp,.h
+       * server/asobj/GlowFilter_as.cpp,.h
+       * server/asobj/GradientBevelFilter_as.cpp,.h
+       * server/asobj/GradientGlowFilter_as.cpp,.h
+       * server/asobj/BevelFilter_as.cpp,.h
+       * server/asobj/BitmapFilter_as.cpp,.h
+         Make ActionScript compatible filters
+       * server/BevelFilter.h,.cpp
+       * server/BlurFilter.h,.cpp
+       * server/ColorMatrixFilter.h,.cpp
+       * server/ConvolutionFilter.h,.cpp
+       * server/DropShadowFilter.h,.cpp
+       * server/GlowFilter.h,.cpp
+       * server/GradientBevelFilter.h,.cpp
+       * server/GradientGlowFilter.h,.cpp
+         Changes necessary for adapter compatibility
+       * server/asobj/prophelper.h
+         File to make writing AS classes easier using an adapter
+       * server/asobj/Makefile.am
+         Add new files
+        
+=======
 2007-08-27 Sandro Santilli <address@hidden>
 
        * libbase/utility.h: don't define exp2(), it's going to clash
          with existing symbol on most systems (except some BSDen)...
          Please provide a better patch for BSD.
 
+>>>>>>> 1.4123
 2007-08-27 Deanna Phillips <deanna>
 
        * testsuite/misc-ming.all/NetStream-SquareTestRunner.cpp: include

Index: server/BevelFilter.h
===================================================================
RCS file: /sources/gnash/gnash/server/BevelFilter.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- server/BevelFilter.h        27 Aug 2007 03:06:41 -0000      1.2
+++ server/BevelFilter.h        27 Aug 2007 18:13:39 -0000      1.3
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: BevelFilter.h,v 1.2 2007/08/27 03:06:41 cmusick Exp $ */
+/* $Id: BevelFilter.h,v 1.3 2007/08/27 18:13:39 cmusick Exp $ */
 
 #ifndef GNASH_BEVELFILTER_H
 #define GNASH_BEVELFILTER_H
@@ -49,7 +49,7 @@
     virtual ~BevelFilter() { return; }
 
     // Clone this object and return a copy of it. (AS accessible function.)
-    // Guaranteed to return an object which can be cast to BlurFilter
+    // Guaranteed to return an object which can be cast to BevelFilter
     Filter const clone();
 
     BevelFilter(as_object* o) : BitmapFilter(o),

Index: server/BlurFilter.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/BlurFilter.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/BlurFilter.cpp       26 Aug 2007 15:14:11 -0000      1.1
+++ server/BlurFilter.cpp       27 Aug 2007 18:13:39 -0000      1.2
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: BlurFilter.cpp,v 1.1 2007/08/26 15:14:11 cmusick Exp $ */
+/* $Id: BlurFilter.cpp,v 1.2 2007/08/27 18:13:39 cmusick Exp $ */
 
 #include "BlurFilter.h"
 
@@ -28,6 +28,9 @@
 BlurFilter::clone()
 {
     Filter p(new BlurFilter(m_blurX, m_blurY, m_quality));
+    p->set_prototype(get_prototype());
+    p->copyProperties(*this);
+
     return p;
 }
 

Index: server/BlurFilter.h
===================================================================
RCS file: /sources/gnash/gnash/server/BlurFilter.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/BlurFilter.h 26 Aug 2007 15:14:11 -0000      1.1
+++ server/BlurFilter.h 27 Aug 2007 18:13:39 -0000      1.2
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: BlurFilter.h,v 1.1 2007/08/26 15:14:11 cmusick Exp $ */
+/* $Id: BlurFilter.h,v 1.2 2007/08/27 18:13:39 cmusick Exp $ */
 
 #ifndef GNASH_BLURFILTER_H
 #define GNASH_BLURFILTER_H
@@ -28,10 +28,14 @@
 
 namespace gnash {
 
+class BlurFilter_as; // Adapater for ActionScript
+
 // A blur effect filter.
 class BlurFilter : public BitmapFilter
 {
 public:
+    friend class BlurFilter_as;
+
     // Fill from a stream. See parser/filter_factory.cpp for the 
implementations.
     virtual bool read(stream* in);
 
@@ -41,6 +45,10 @@
     // Guaranteed to return an object which can be cast to BlurFilter
     Filter const clone();
 
+    BlurFilter(as_object* obj) : BitmapFilter(obj),
+        m_blurX(0.0f), m_blurY(0.0f), m_quality(0)
+    { return; }
+
     BlurFilter() : 
         m_blurX(0.0f), m_blurY(0.0f), m_quality(0)
     { return; }

Index: server/ColorMatrixFilter.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/ColorMatrixFilter.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/ColorMatrixFilter.cpp        26 Aug 2007 15:14:11 -0000      1.1
+++ server/ColorMatrixFilter.cpp        27 Aug 2007 18:13:39 -0000      1.2
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: ColorMatrixFilter.cpp,v 1.1 2007/08/26 15:14:11 cmusick Exp $ */
+/* $Id: ColorMatrixFilter.cpp,v 1.2 2007/08/27 18:13:39 cmusick Exp $ */
 
 #include "ColorMatrixFilter.h"
 
@@ -28,6 +28,9 @@
 ColorMatrixFilter::clone()
 {
     Filter p(new ColorMatrixFilter(m_matrix));
+    p->set_prototype(get_prototype());
+    p->copyProperties(*this);
+
     return p;
 }
 

Index: server/ColorMatrixFilter.h
===================================================================
RCS file: /sources/gnash/gnash/server/ColorMatrixFilter.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/ColorMatrixFilter.h  26 Aug 2007 15:14:11 -0000      1.1
+++ server/ColorMatrixFilter.h  27 Aug 2007 18:13:39 -0000      1.2
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: ColorMatrixFilter.h,v 1.1 2007/08/26 15:14:11 cmusick Exp $ */
+/* $Id: ColorMatrixFilter.h,v 1.2 2007/08/27 18:13:39 cmusick Exp $ */
 
 #ifndef GNASH_COLORMATRIXFILTER_H
 #define GNASH_COLORMATRIXFILTER_H
@@ -29,10 +29,14 @@
 
 namespace gnash {
 
+class ColorMatrixFilter_as; // Adapter for ActionScript
+
 // A color matrix effect filter.
 class ColorMatrixFilter : public BitmapFilter
 {
 public:
+    friend class ColorMatrixFilter_as;
+
     // Fill from a stream. See parser/filter_factory.cpp for the 
implementations.
     virtual bool read(stream* in);
 
@@ -42,16 +46,20 @@
     // Guaranteed to return an object which can be cast to ColorMatrixFilter
     Filter const clone();
 
+    ColorMatrixFilter(as_object* obj) : BitmapFilter(obj),
+        m_matrix()
+    { return; }
+
     ColorMatrixFilter() : 
         m_matrix()
     { return; }
 
-    ColorMatrixFilter(as_array_object a_matrix) :
+    ColorMatrixFilter(boost::intrusive_ptr<as_array_object> a_matrix) :
         m_matrix(a_matrix)
     { return; }
 
 private:
-    as_array_object m_matrix; // The color matrix
+    boost::intrusive_ptr<as_array_object> m_matrix; // The color matrix
 };
 
 } // Namespace gnash

Index: server/ConvolutionFilter.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/ConvolutionFilter.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/ConvolutionFilter.cpp        26 Aug 2007 15:14:11 -0000      1.1
+++ server/ConvolutionFilter.cpp        27 Aug 2007 18:13:39 -0000      1.2
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: ConvolutionFilter.cpp,v 1.1 2007/08/26 15:14:11 cmusick Exp $ */
+/* $Id: ConvolutionFilter.cpp,v 1.2 2007/08/27 18:13:39 cmusick Exp $ */
 
 #include "ConvolutionFilter.h"
 
@@ -29,6 +29,9 @@
 {
     Filter p(new ConvolutionFilter(m_matrixX, m_matrixY, m_matrix,
         m_divisor, m_bias, m_preserveAlpha, m_clamp, m_color, m_alpha));
+    p->set_prototype(get_prototype());
+    p->copyProperties(*this);
+
     return p;
 }
 

Index: server/ConvolutionFilter.h
===================================================================
RCS file: /sources/gnash/gnash/server/ConvolutionFilter.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/ConvolutionFilter.h  26 Aug 2007 15:14:11 -0000      1.1
+++ server/ConvolutionFilter.h  27 Aug 2007 18:13:39 -0000      1.2
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: ConvolutionFilter.h,v 1.1 2007/08/26 15:14:11 cmusick Exp $ */
+/* $Id: ConvolutionFilter.h,v 1.2 2007/08/27 18:13:39 cmusick Exp $ */
 
 #ifndef GNASH_CONVOLUTIONFILTER_H
 #define GNASH_CONVOLUTIONFILTER_H
@@ -29,25 +29,35 @@
 
 namespace gnash {
 
+class ConvolutionFilter_as; // Adapter to ActionScript
+
 // A convolution effect filter.
 class ConvolutionFilter : public BitmapFilter
 {
 public:
+    friend class ConvolutionFilter_as;
+
     // Fill from a stream. See parser/filter_factory.cpp for the 
implementations.
     virtual bool read(stream* in);
 
     virtual ~ConvolutionFilter() { return; }
 
     // Clone this object and return a copy of it. (AS accessible function.)
-    // Guaranteed to return an object which can be cast to BlurFilter
+    // Guaranteed to return an object which can be cast to ConvolutionFilter
     Filter const clone();
 
+    ConvolutionFilter(as_object* obj) : BitmapFilter(obj),
+        m_matrixX(), m_matrixY(), m_matrix(), m_divisor(), m_bias(),
+        m_preserveAlpha(false), m_clamp(false), m_color(), m_alpha()
+    { return; }
+
     ConvolutionFilter() : 
         m_matrixX(), m_matrixY(), m_matrix(), m_divisor(), m_bias(),
         m_preserveAlpha(false), m_clamp(false), m_color(), m_alpha()
     { return; }
 
-    ConvolutionFilter(uint8_t matrixX, uint8_t matrixY, as_array_object 
a_matrix,
+    ConvolutionFilter(uint8_t matrixX, uint8_t matrixY, 
+        boost::intrusive_ptr<as_array_object> a_matrix,
         float divisor, float bias, bool preserveAlpha, bool clamp, uint32_t 
color,
         uint8_t alpha) :
         m_matrixX(matrixX), m_matrixY(matrixY), m_matrix(a_matrix),
@@ -58,7 +68,7 @@
 private:
     uint8_t m_matrixX; // Number of columns
     uint8_t m_matrixY; // Number of rows
-    as_array_object m_matrix; // The convolution matrix
+    boost::intrusive_ptr<as_array_object> m_matrix; // The convolution matrix
     float m_divisor;
     float m_bias;
     bool m_preserveAlpha; // If true, don't convolute the alpha channel

Index: server/DropShadowFilter.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/DropShadowFilter.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/DropShadowFilter.cpp 26 Aug 2007 15:14:11 -0000      1.1
+++ server/DropShadowFilter.cpp 27 Aug 2007 18:13:39 -0000      1.2
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: DropShadowFilter.cpp,v 1.1 2007/08/26 15:14:11 cmusick Exp $ */
+/* $Id: DropShadowFilter.cpp,v 1.2 2007/08/27 18:13:39 cmusick Exp $ */
 
 #include "DropShadowFilter.h"
 
@@ -30,6 +30,8 @@
     Filter p(new DropShadowFilter(m_distance, m_angle, m_color, m_alpha,
         m_blurX, m_blurY, m_strength, m_quality, m_inner, m_knockout,
         m_hideObject));
+    p->set_prototype(get_prototype());
+    p->copyProperties(*this);
     return p;
 }
 

Index: server/DropShadowFilter.h
===================================================================
RCS file: /sources/gnash/gnash/server/DropShadowFilter.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/DropShadowFilter.h   26 Aug 2007 15:14:11 -0000      1.1
+++ server/DropShadowFilter.h   27 Aug 2007 18:13:40 -0000      1.2
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: DropShadowFilter.h,v 1.1 2007/08/26 15:14:11 cmusick Exp $ */
+/* $Id: DropShadowFilter.h,v 1.2 2007/08/27 18:13:40 cmusick Exp $ */
 
 #ifndef GNASH_DROPSHADOWFILTER_H
 #define GNASH_DROPSHADOWFILTER_H
@@ -28,10 +28,14 @@
 
 namespace gnash {
 
+class DropShadowFilter_as;
+
 // A drop shadow effect filter.
 class DropShadowFilter : public BitmapFilter
 {
 public:
+    friend class DropShadowFilter_as;
+
     // Fill from a stream. See parser/filter_factory.cpp for the 
implementations.
     virtual bool read(stream* in);
 
@@ -41,6 +45,12 @@
     // Guaranteed to return an object which can be cast to BlurFilter
     Filter const clone();
 
+    DropShadowFilter(as_object* obj) : BitmapFilter(obj),
+        m_distance(0.0f), m_angle(0.0f), m_color(0), m_alpha(0),
+        m_blurX(0.0f), m_blurY(0.0f),  m_strength(0.0f), m_quality(0),
+        m_inner(false), m_knockout(false), m_hideObject(false)
+    { return; }
+
     DropShadowFilter() : 
         m_distance(0.0f), m_angle(0.0f), m_color(0), m_alpha(0),
         m_blurX(0.0f), m_blurY(0.0f),  m_strength(0.0f), m_quality(0),

Index: server/GlowFilter.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/GlowFilter.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/GlowFilter.cpp       26 Aug 2007 15:14:12 -0000      1.1
+++ server/GlowFilter.cpp       27 Aug 2007 18:13:40 -0000      1.2
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: GlowFilter.cpp,v 1.1 2007/08/26 15:14:12 cmusick Exp $ */
+/* $Id: GlowFilter.cpp,v 1.2 2007/08/27 18:13:40 cmusick Exp $ */
 
 #include "GlowFilter.h"
 
@@ -29,6 +29,8 @@
 {
     Filter p(new GlowFilter(m_color, m_alpha,
         m_blurX, m_blurY, m_strength, m_quality, m_inner, m_knockout));
+    p->set_prototype(get_prototype());
+    p->copyProperties(*this);
     return p;
 }
 

Index: server/GlowFilter.h
===================================================================
RCS file: /sources/gnash/gnash/server/GlowFilter.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/GlowFilter.h 26 Aug 2007 15:14:12 -0000      1.1
+++ server/GlowFilter.h 27 Aug 2007 18:13:40 -0000      1.2
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: GlowFilter.h,v 1.1 2007/08/26 15:14:12 cmusick Exp $ */
+/* $Id: GlowFilter.h,v 1.2 2007/08/27 18:13:40 cmusick Exp $ */
 
 #ifndef GNASH_GLOWFILTER_H
 #define GNASH_GLOWFILTER_H
@@ -28,10 +28,14 @@
 
 namespace gnash {
 
+class GlowFilter_as;
+
 // A glow effect filter.
 class GlowFilter : public BitmapFilter
 {
 public:
+    friend class GlowFilter_as;
+
     // Fill from a stream. See parser/filter_factory.cpp for the 
implementations.
     virtual bool read(stream* in);
 
@@ -41,6 +45,12 @@
     // Guaranteed to return an object which can be cast to BlurFilter
     Filter const clone();
 
+    GlowFilter(as_object* obj) : BitmapFilter(obj),
+        m_color(0), m_alpha(0),
+        m_blurX(0.0f), m_blurY(0.0f),  m_strength(0.0f), m_quality(0),
+        m_inner(false), m_knockout(false)
+    { return; }
+
     GlowFilter() : 
         m_color(0), m_alpha(0),
         m_blurX(0.0f), m_blurY(0.0f),  m_strength(0.0f), m_quality(0),

Index: server/GradientBevelFilter.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/GradientBevelFilter.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/GradientBevelFilter.cpp      26 Aug 2007 15:14:12 -0000      1.1
+++ server/GradientBevelFilter.cpp      27 Aug 2007 18:13:40 -0000      1.2
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: GradientBevelFilter.cpp,v 1.1 2007/08/26 15:14:12 cmusick Exp $ */
+/* $Id: GradientBevelFilter.cpp,v 1.2 2007/08/27 18:13:40 cmusick Exp $ */
 
 #include "GradientBevelFilter.h"
 
@@ -28,7 +28,9 @@
 GradientBevelFilter::clone()
 {
     Filter p(new GradientBevelFilter(m_distance, m_angle, m_colors, m_alphas,
-        m_blurX, m_blurY, m_strength, m_quality, m_type, m_knockout));
+        m_ratios, m_blurX, m_blurY, m_strength, m_quality, m_type, 
m_knockout));
+    p->set_prototype(get_prototype());
+    p->copyProperties(*this);
     return p;
 }
 

Index: server/GradientBevelFilter.h
===================================================================
RCS file: /sources/gnash/gnash/server/GradientBevelFilter.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/GradientBevelFilter.h        26 Aug 2007 15:14:12 -0000      1.1
+++ server/GradientBevelFilter.h        27 Aug 2007 18:13:40 -0000      1.2
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: GradientBevelFilter.h,v 1.1 2007/08/26 15:14:12 cmusick Exp $ */
+/* $Id: GradientBevelFilter.h,v 1.2 2007/08/27 18:13:40 cmusick Exp $ */
 
 #ifndef GNASH_GRADIENTBEVELFILTER_H
 #define GNASH_GRADIENTBEVELFILTER_H
@@ -29,10 +29,14 @@
 
 namespace gnash {
 
+class GradientBevelFilter_as;
+
 // A gradient bevel effect filter.
 class GradientBevelFilter : public BitmapFilter
 {
 public:
+    friend class GradientBevelFilter_as;
+
     typedef enum
     {
         INNER_BEVEL = 2,
@@ -49,26 +53,36 @@
     // Guaranteed to return an object which can be cast to BlurFilter
     Filter const clone();
 
+    GradientBevelFilter(as_object *obj) : BitmapFilter(obj),
+        m_distance(0.0f), m_angle(0.0f), m_colors(), m_alphas(), m_ratios(),
+        m_blurX(0.0f), m_blurY(0.0f),  m_strength(0.0f), m_quality(0),
+        m_type(INNER_BEVEL), m_knockout(false)
+    { return; }
+
     GradientBevelFilter() : 
-        m_distance(0.0f), m_angle(0.0f), m_colors(), m_alphas(),
+        m_distance(0.0f), m_angle(0.0f), m_colors(), m_alphas(), m_ratios(),
         m_blurX(0.0f), m_blurY(0.0f),  m_strength(0.0f), m_quality(0),
         m_type(INNER_BEVEL), m_knockout(false)
     { return; }
 
-    GradientBevelFilter(float distance, float angle, as_array_object colors,
-        as_array_object alphas, float blurX, float blurY, float strength,
+    GradientBevelFilter(float distance, float angle,
+        boost::intrusive_ptr<as_array_object> colors,
+        boost::intrusive_ptr<as_array_object> alphas,
+        boost::intrusive_ptr<as_array_object> ratios,
+        float blurX, float blurY, float strength,
         uint8_t quality, glow_types type, bool knockout) :
-        m_distance(distance), m_angle(angle), m_colors(colors),
-        m_alphas(alphas), m_blurX(blurX), m_blurY(blurY), m_strength(strength),
+        m_distance(distance), m_angle(angle),
+        m_colors(colors), m_alphas(alphas), m_ratios(ratios),
+        m_blurX(blurX), m_blurY(blurY), m_strength(strength),
         m_quality(quality), m_type(type), m_knockout(knockout)
     { return; }
 
 private:
     float m_distance; // Distance of the filter in pixels.
     float m_angle; // Angle of the filter.
-    as_array_object m_colors; // Colors of the gradients.
-    as_array_object m_alphas; // Alphas of the gradients.
-    as_array_object m_ratios; // Ratios of the gradients.
+    boost::intrusive_ptr<as_array_object> m_colors; // Colors of the gradients.
+    boost::intrusive_ptr<as_array_object> m_alphas; // Alphas of the gradients.
+    boost::intrusive_ptr<as_array_object> m_ratios; // Ratios of the gradients.
     float m_blurX; // horizontal blur
     float m_blurY; // vertical blur
     float m_strength; // How strong is the filter.

Index: server/GradientGlowFilter.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/GradientGlowFilter.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/GradientGlowFilter.cpp       26 Aug 2007 15:14:12 -0000      1.1
+++ server/GradientGlowFilter.cpp       27 Aug 2007 18:13:40 -0000      1.2
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: GradientGlowFilter.cpp,v 1.1 2007/08/26 15:14:12 cmusick Exp $ */
+/* $Id: GradientGlowFilter.cpp,v 1.2 2007/08/27 18:13:40 cmusick Exp $ */
 
 #include "GradientGlowFilter.h"
 
@@ -28,7 +28,9 @@
 GradientGlowFilter::clone()
 {
     Filter p(new GradientGlowFilter(m_distance, m_angle, m_colors, m_alphas,
-        m_blurX, m_blurY, m_strength, m_quality, m_type, m_knockout));
+        m_ratios, m_blurX, m_blurY, m_strength, m_quality, m_type, 
m_knockout));
+    p->set_prototype(get_prototype());
+    p->copyProperties(*this);
     return p;
 }
 

Index: server/GradientGlowFilter.h
===================================================================
RCS file: /sources/gnash/gnash/server/GradientGlowFilter.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/GradientGlowFilter.h 26 Aug 2007 15:14:12 -0000      1.1
+++ server/GradientGlowFilter.h 27 Aug 2007 18:13:40 -0000      1.2
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: GradientGlowFilter.h,v 1.1 2007/08/26 15:14:12 cmusick Exp $ */
+/* $Id: GradientGlowFilter.h,v 1.2 2007/08/27 18:13:40 cmusick Exp $ */
 
 #ifndef GNASH_GRADIENTGLOWFILTER_H
 #define GNASH_GRADIENTGLOWFILTER_H
@@ -29,10 +29,14 @@
 
 namespace gnash {
 
+class GradientGlowFilter_as;
+
 // A gradient glow effect filter.
 class GradientGlowFilter : public BitmapFilter
 {
 public:
+    friend class GradientGlowFilter_as;
+
     typedef enum
     {
         INNER_GLOW = 2,
@@ -49,26 +53,35 @@
     // Guaranteed to return an object which can be cast to BlurFilter
     Filter const clone();
 
+    GradientGlowFilter(as_object* obj) : BitmapFilter(obj),
+        m_distance(0.0f), m_angle(0.0f), m_colors(), m_alphas(), m_ratios(),
+        m_blurX(0.0f), m_blurY(0.0f),  m_strength(0.0f), m_quality(0),
+        m_type(INNER_GLOW), m_knockout(false)
+    { return; }
+
     GradientGlowFilter() : 
-        m_distance(0.0f), m_angle(0.0f), m_colors(), m_alphas(),
+        m_distance(0.0f), m_angle(0.0f), m_colors(), m_alphas(), m_ratios(),
         m_blurX(0.0f), m_blurY(0.0f),  m_strength(0.0f), m_quality(0),
         m_type(INNER_GLOW), m_knockout(false)
     { return; }
 
-    GradientGlowFilter(float distance, float angle, as_array_object colors,
-        as_array_object alphas, float blurX, float blurY, float strength,
+    GradientGlowFilter(float distance, float angle,
+        boost::intrusive_ptr<as_array_object> colors,
+        boost::intrusive_ptr<as_array_object> alphas,
+        boost::intrusive_ptr<as_array_object> ratios,
+        float blurX, float blurY, float strength,
         uint8_t quality, glow_types type, bool knockout) :
-        m_distance(distance), m_angle(angle), m_colors(colors),
-        m_alphas(alphas), m_blurX(blurX), m_blurY(blurY), m_strength(strength),
+        m_distance(distance), m_angle(angle), m_colors(colors), 
m_alphas(alphas),
+        m_ratios(ratios), m_blurX(blurX), m_blurY(blurY), m_strength(strength),
         m_quality(quality), m_type(type), m_knockout(knockout)
     { return; }
 
 private:
     float m_distance; // Distance of the filter in pixels.
     float m_angle; // Angle of the filter.
-    as_array_object m_colors; // Colors of the gradients.
-    as_array_object m_alphas; // Alphas of the gradients.
-    as_array_object m_ratios; // Ratios of the gradients.
+    boost::intrusive_ptr<as_array_object> m_colors; // Colors of the gradients.
+    boost::intrusive_ptr<as_array_object> m_alphas; // Alphas of the gradients.
+    boost::intrusive_ptr<as_array_object> m_ratios; // Ratios of the gradients.
     float m_blurX; // horizontal blur
     float m_blurY; // vertical blur
     float m_strength; // How strong is the filter.

Index: server/asobj/BevelFilter_as.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/BevelFilter_as.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/asobj/BevelFilter_as.cpp     27 Aug 2007 03:06:42 -0000      1.1
+++ server/asobj/BevelFilter_as.cpp     27 Aug 2007 18:13:40 -0000      1.2
@@ -15,285 +15,71 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: BevelFilter_as.cpp,v 1.1 2007/08/27 03:06:42 cmusick Exp $ */
+/* $Id: BevelFilter_as.cpp,v 1.2 2007/08/27 18:13:40 cmusick Exp $ */
 
 #include "BitmapFilter_as.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
+#define phelp_class BevelFilter
+#include "prophelper.h"
+
 namespace gnash {
 
 class BevelFilter_as
 {
+    phelp_base_def;
 public:
-    static as_object* Interface(); // To a BitmapFilter
-    static void attachInterface(as_object& o); // Attach the interface.
-    static void attachProperties(as_object& o); // Attach the properties.
-
-    static void registerCtor(as_object& global); // public ctor
-    static as_value ctor(const fn_call& fn); // constructor for BitmapFilter
-
-    // Get set functions for ActionScript
-    static as_value distance_gs(const fn_call& fn);
-    static as_value angle_gs(const fn_call& fn);
-    static as_value highlightColor_gs(const fn_call& fn);
-    static as_value highlightAlpha_gs(const fn_call& fn);
-    static as_value shadowColor_gs(const fn_call& fn);
-    static as_value shadowAlpha_gs(const fn_call& fn);
-    static as_value blurX_gs(const fn_call& fn);
-    static as_value blurY_gs(const fn_call& fn);
-    static as_value strength_gs(const fn_call& fn);
-    static as_value quality_gs(const fn_call& fn);
-    static as_value type_gs(const fn_call& fn);
-    static as_value knockout_gs(const fn_call& fn);
-
-private:
-    static boost::intrusive_ptr<as_object> s_interface;
-    static boost::intrusive_ptr<builtin_function> s_ctor;
+    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);
 };
 
-boost::intrusive_ptr<as_object> BevelFilter_as::s_interface;
-boost::intrusive_ptr<builtin_function> BevelFilter_as::s_ctor;
-
-as_object*
-BevelFilter_as::Interface()
-{
-    if (BevelFilter_as::s_interface == NULL)
-    {
-        BevelFilter_as::s_interface = new as_object(bitmapFilter_interface());
-        VM::get().addStatic(BevelFilter_as::s_interface.get());
-
-        BevelFilter_as::attachInterface(*BevelFilter_as::s_interface);
-    }
-
-    return BevelFilter_as::s_interface.get();
-}
-
-void
-BevelFilter_as::attachInterface(as_object& /*o*/)
-{
-    // Filters are all properties.
-    return;
-}
-
-void
-BevelFilter_as::attachProperties(as_object& o)
-{
-    boost::intrusive_ptr<builtin_function> gs;
-
-    gs = new builtin_function(BevelFilter_as::distance_gs, NULL);
-    o.init_property("distance", *gs, *gs);
-
-    gs = new builtin_function(BevelFilter_as::angle_gs, NULL);
-    o.init_property("angle", *gs, *gs);
-
-    gs = new builtin_function(BevelFilter_as::highlightColor_gs, NULL);
-    o.init_property("highlightColor", *gs, *gs);
-
-    gs = new builtin_function(BevelFilter_as::highlightAlpha_gs, NULL);
-    o.init_property("highlightAlpha", *gs, *gs);
-
-    gs = new builtin_function(BevelFilter_as::shadowColor_gs, NULL);
-    o.init_property("shadowColor", *gs, *gs);
-
-    gs = new builtin_function(BevelFilter_as::shadowAlpha_gs, NULL);
-    o.init_property("shadowAlpha", *gs, *gs);
-
-    gs = new builtin_function(BevelFilter_as::blurX_gs, NULL);
-    o.init_property("blurX", *gs, *gs);
-
-    gs = new builtin_function(BevelFilter_as::blurY_gs, NULL);
-    o.init_property("blurY", *gs, *gs);
+phelp_base_imp((bitmapFilter_interface()), BevelFilter);
 
-    gs = new builtin_function(BevelFilter_as::strength_gs, NULL);
-    o.init_property("strength", *gs, *gs);
+// Filters are purely property based.
+phelp_i_attach_empty
 
-    gs = new builtin_function(BevelFilter_as::quality_gs, NULL);
-    o.init_property("quality", *gs, *gs);
-
-    gs = new builtin_function(BevelFilter_as::type_gs, NULL);
-    o.init_property("type", *gs, *gs);
-
-    gs = new builtin_function(BevelFilter_as::knockout_gs, NULL);
-    o.init_property("knockout", *gs, *gs);
-}
-
-as_value
-BevelFilter_as::distance_gs(const fn_call& fn)
-{
-    boost::intrusive_ptr<BevelFilter> ptr = 
ensureType<BevelFilter>(fn.this_ptr);
-
-    if (fn.nargs == 0) // getter
-    {
-        return as_value(ptr->m_distance);
-    }
-    // setter
-    float distance = fn.arg(0).to_number<float>();
-    ptr->m_distance = distance;
-
-    return as_value();
-}
-
-as_value
-BevelFilter_as::angle_gs(const fn_call& fn)
-{
-    boost::intrusive_ptr<BevelFilter> ptr = 
ensureType<BevelFilter>(fn.this_ptr);
-
-    if (fn.nargs == 0) // getter
-    {
-        return as_value(ptr->m_angle);
-    }
-    // setter
-    float angle = fn.arg(0).to_number<float>();
-    ptr->m_angle = angle;
-
-    return as_value();
-}
-
-as_value
-BevelFilter_as::highlightColor_gs(const fn_call& fn)
-{
-    boost::intrusive_ptr<BevelFilter> ptr = 
ensureType<BevelFilter>(fn.this_ptr);
-
-    if (fn.nargs == 0) // getter
-    {
-        return as_value(ptr->m_highlightColor);
-    }
-    // setter
-    uint32_t highlightColor = fn.arg(0).to_number<uint32_t>();
-    ptr->m_highlightColor = highlightColor;
-
-    return as_value();
-}
-
-as_value
-BevelFilter_as::highlightAlpha_gs(const fn_call& fn)
-{
-    boost::intrusive_ptr<BevelFilter> ptr = 
ensureType<BevelFilter>(fn.this_ptr);
-
-    if (fn.nargs == 0) // getter
-    {
-        return as_value(ptr->m_highlightAlpha);
-    }
-    // setter
-    uint8_t highlightAlpha = fn.arg(0).to_number<uint8_t>();
-    ptr->m_highlightAlpha = highlightAlpha;
-
-    return as_value();
-}
-
-as_value
-BevelFilter_as::shadowColor_gs(const fn_call& fn)
-{
-    boost::intrusive_ptr<BevelFilter> ptr = 
ensureType<BevelFilter>(fn.this_ptr);
-
-    if (fn.nargs == 0) // getter
-    {
-        return as_value(ptr->m_shadowColor);
-    }
-    // setter
-    uint32_t shadowColor = fn.arg(0).to_number<uint32_t>();
-    ptr->m_shadowColor = shadowColor;
-
-    return as_value();
-}
-
-as_value
-BevelFilter_as::shadowAlpha_gs(const fn_call& fn)
-{
-    boost::intrusive_ptr<BevelFilter> ptr = 
ensureType<BevelFilter>(fn.this_ptr);
-
-    if (fn.nargs == 0) // getter
-    {
-        return as_value(ptr->m_shadowAlpha);
-    }
-    // setter
-    uint8_t shadowAlpha = fn.arg(0).to_number<uint8_t>();
-    ptr->m_shadowAlpha = shadowAlpha;
-
-    return as_value();
-}
-
-as_value
-BevelFilter_as::blurX_gs(const fn_call& fn)
-{
-    boost::intrusive_ptr<BevelFilter> ptr = 
ensureType<BevelFilter>(fn.this_ptr);
-
-    if (fn.nargs == 0) // getter
-    {
-        return as_value(ptr->m_blurX);
-    }
-    // setter
-    float blurX = fn.arg(0).to_number<float>();
-    ptr->m_blurX = blurX;
-
-    return as_value();
-}
-
-as_value
-BevelFilter_as::blurY_gs(const fn_call& fn)
-{
-    boost::intrusive_ptr<BevelFilter> ptr = 
ensureType<BevelFilter>(fn.this_ptr);
-
-    if (fn.nargs == 0) // getter
-    {
-        return as_value(ptr->m_blurY);
-    }
-    // setter
-    float blurY = fn.arg(0).to_number<float>();
-    ptr->m_blurY = blurY;
-
-    return as_value();
-}
-
-as_value
-BevelFilter_as::strength_gs(const fn_call& fn)
-{
-    boost::intrusive_ptr<BevelFilter> ptr = 
ensureType<BevelFilter>(fn.this_ptr);
-
-    if (fn.nargs == 0) // getter
-    {
-        return as_value(ptr->m_strength);
-    }
-    // setter
-    float strength = fn.arg(0).to_number<float>();
-    ptr->m_strength = strength;
-
-    return as_value();
-}
-
-void
-BevelFilter_as::registerCtor(as_object& global)
-{
-    if (BevelFilter_as::s_ctor != NULL)
-        return;
-
-    BevelFilter_as::s_ctor = new builtin_function(&BevelFilter_as::ctor,
-        BevelFilter_as::Interface());
-    VM::get().addStatic(BevelFilter_as::s_ctor.get());
-
-    // TODO: Is this correct?
-    BevelFilter_as::attachInterface(*BevelFilter_as::s_ctor);
-
-    global.init_member("BevelFilter", BevelFilter_as::s_ctor.get());
-}
-
-as_value
-BevelFilter_as::quality_gs(const fn_call& fn)
-{
-    boost::intrusive_ptr<BevelFilter> ptr = 
ensureType<BevelFilter>(fn.this_ptr);
-
-    if (fn.nargs == 0) // getter
-    {
-        return as_value(ptr->m_quality);
-    }
-    // setter
-    uint8_t quality = fn.arg(0).to_number<uint8_t>();
-    ptr->m_quality = quality;
-
-    return as_value();
-}
+// 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(uint32_t, number<uint32_t>, highlightColor)
+phelp_property(uint8_t, number<uint8_t>, highlightAlpha)
+phelp_property(uint32_t, number<uint32_t>, shadowColor)
+phelp_property(uint8_t, number<uint8_t>, shadowAlpha)
+phelp_property(float, number<float>, blurX)
+phelp_property(float, number<float>, blurY)
+phelp_property(float, number<float>, strength)
+phelp_property(uint8_t, number<uint8_t>, quality)
+phelp_property(bool, bool, knockout)
 
 as_value
 BevelFilter_as::type_gs(const fn_call& fn)
@@ -329,22 +115,6 @@
 }
 
 as_value
-BevelFilter_as::knockout_gs(const fn_call& fn)
-{
-    boost::intrusive_ptr<BevelFilter> ptr = 
ensureType<BevelFilter>(fn.this_ptr);
-
-    if (fn.nargs == 0) // getter
-    {
-        return as_value(ptr->m_knockout);
-    }
-    // setter
-    bool knockout = fn.arg(0).to_bool();
-    ptr->m_knockout = knockout;
-
-    return as_value();
-}
-
-as_value
 BevelFilter_as::ctor(const fn_call& /*fn*/)
 {
     boost::intrusive_ptr<as_object> obj = new 
BevelFilter(BevelFilter_as::Interface());
@@ -353,10 +123,5 @@
     return as_value(obj.get());
 }
 
-void bevelFilter_class_init(as_object& global)
-{
-   BevelFilter_as::registerCtor(global);
-}
-
 } // Namespace gnash
 

Index: server/asobj/BevelFilter_as.h
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/BevelFilter_as.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/asobj/BevelFilter_as.h       27 Aug 2007 03:06:42 -0000      1.1
+++ server/asobj/BevelFilter_as.h       27 Aug 2007 18:13:40 -0000      1.2
@@ -28,7 +28,7 @@
 class as_object;
 
 /// Initialize the global BitmapFilter class
-void bevelFilter_class_init(as_object& global);
+void BevelFilter_class_init(as_object& global);
 
 } // end of gnash namespace
 

Index: server/asobj/BitmapFilter_as.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/BitmapFilter_as.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/asobj/BitmapFilter_as.cpp    27 Aug 2007 03:06:42 -0000      1.1
+++ server/asobj/BitmapFilter_as.cpp    27 Aug 2007 18:13:40 -0000      1.2
@@ -15,67 +15,30 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: BitmapFilter_as.cpp,v 1.1 2007/08/27 03:06:42 cmusick Exp $ */
+/* $Id: BitmapFilter_as.cpp,v 1.2 2007/08/27 18:13:40 cmusick Exp $ */
 
 #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
 {
+    phelp_base_def;
 public:
-    static as_object* Interface(); // To a BitmapFilter
-    static void attachInterface(as_object& o); // Attach the interface.
-    static void registerCtor(as_object& global); // public ctor
-    static as_value ctor(const fn_call& fn); // constructor for BitmapFilter
-
-    static as_value bitmap_clone(const fn_call& fn);
-
-private:
-    static boost::intrusive_ptr<as_object> s_interface;
-    static boost::intrusive_ptr<builtin_function> s_ctor;
+    phelp_i(bitmap_clone);
 };
 
-boost::intrusive_ptr<as_object> BitmapFilter_as::s_interface;
-boost::intrusive_ptr<builtin_function> BitmapFilter_as::s_ctor;
-
-as_object*
-BitmapFilter_as::Interface()
-{
-    if (BitmapFilter_as::s_interface == NULL)
-    {
-        BitmapFilter_as::s_interface = new as_object;
-        VM::get().addStatic(BitmapFilter_as::s_interface.get());
-
-        BitmapFilter_as::attachInterface(*BitmapFilter_as::s_interface);
-    }
-
-    return BitmapFilter_as::s_interface.get();
-}
-
-void
-BitmapFilter_as::attachInterface(as_object& o)
-{
-    o.init_member("clone", new builtin_function(bitmap_clone));
-}
-
-void
-BitmapFilter_as::registerCtor(as_object& global)
-{
-    if (BitmapFilter_as::s_ctor != NULL)
-        return;
+phelp_base_imp( , BitmapFilter);
 
-    BitmapFilter_as::s_ctor = new builtin_function(&BitmapFilter_as::ctor,
-        BitmapFilter_as::Interface());
-    VM::get().addStatic(BitmapFilter_as::s_ctor.get());
-
-    // TODO: Is this correct?
-    BitmapFilter_as::attachInterface(*BitmapFilter_as::s_ctor);
-
-    global.init_member("BitmapFilter", BitmapFilter_as::s_ctor.get());
-}
+phelp_i_attach_begin
+phelp_i_attach(clone, bitmap_clone);
+phelp_i_attach_end
 
 as_value
 BitmapFilter_as::ctor(const fn_call& /*fn*/)
@@ -93,11 +56,6 @@
     return as_value(retval);
 }
 
-void bitmapFilter_class_init(as_object& global)
-{
-   BitmapFilter_as::registerCtor(global);
-}
-
 as_object*
 bitmapFilter_interface()
 {

Index: server/asobj/BitmapFilter_as.h
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/BitmapFilter_as.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/asobj/BitmapFilter_as.h      27 Aug 2007 03:06:42 -0000      1.1
+++ server/asobj/BitmapFilter_as.h      27 Aug 2007 18:13:41 -0000      1.2
@@ -28,7 +28,7 @@
 class as_object;
 
 /// Initialize the global BitmapFilter class
-void bitmapFilter_class_init(as_object& global);
+void BitmapFilter_class_init(as_object& global);
 
 /// Get the interface, for inheritance.
 as_object *bitmapFilter_interface();

Index: server/asobj/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Makefile.am,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- server/asobj/Makefile.am    27 Aug 2007 03:06:42 -0000      1.42
+++ server/asobj/Makefile.am    27 Aug 2007 18:13:43 -0000      1.43
@@ -15,7 +15,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-# $Id: Makefile.am,v 1.42 2007/08/27 03:06:42 cmusick Exp $
+# $Id: Makefile.am,v 1.43 2007/08/27 18:13:43 cmusick Exp $
 
 AUTOMAKE_OPTIONS = 
 
@@ -46,13 +46,20 @@
         BevelFilter_as.cpp \
         BitmapFilter_as.cpp \
        Boolean.cpp     \
+        BlurFilter_as.cpp \
        Camera.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\
@@ -81,14 +88,21 @@
         BevelFilter_as.h \
         BitmapFilter_as.h \
        Boolean.h       \
+       BlurFilter_as.h \
        Camera.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\
@@ -101,6 +115,7 @@
        NetStreamGst.h \
        Number.h        \
        Object.h        \
+       prophelper.h \
        Selection.h     \
        SharedObject.h  \
        Sound.h         \

Index: server/parser/filter_factory.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/parser/filter_factory.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- server/parser/filter_factory.cpp    27 Aug 2007 12:44:28 -0000      1.3
+++ server/parser/filter_factory.cpp    27 Aug 2007 18:13:43 -0000      1.4
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: filter_factory.cpp,v 1.3 2007/08/27 12:44:28 strk Exp $ */
+/* $Id: filter_factory.cpp,v 1.4 2007/08/27 18:13:43 cmusick Exp $ */
 
 #include "filter_factory.h"
 #include "BitmapFilter.h"
@@ -200,13 +200,13 @@
 
     for (int i = 0; i < count; ++i)
     {
-        m_colors.push(as_value(in->read_u8() << 16 + in->read_u8() << 8 + 
in->read_u8()));
-        m_alphas.push(as_value(in->read_u8()));
+        m_colors->push(as_value(in->read_u8() << 16 + in->read_u8() << 8 + 
in->read_u8()));
+        m_alphas->push(as_value(in->read_u8()));
     }
 
     for (int i = 0; i < count; ++i)
     {
-        m_ratios.push(as_value(in->read_u8()));
+        m_ratios->push(as_value(in->read_u8()));
     }
 
     m_blurX = in->read_fixed();
@@ -237,9 +237,14 @@
     m_divisor = in->read_float();
     m_bias = in->read_float();
 
+    if (m_matrix == NULL)
+    {
+        m_matrix = new as_array_object;
+    }
+
     for (int i = 0; i < m_matrixX * m_matrixY; ++i)
     {
-        m_matrix.push(as_value(in->read_float()));
+        m_matrix->push(as_value(in->read_float()));
     }
 
     m_color = in->read_u8() << 16 + in->read_u8() << 8 + in->read_u8();
@@ -255,9 +260,12 @@
 
 bool ColorMatrixFilter::read(stream* in)
 {
+    if (m_matrix == NULL)
+        m_matrix = new as_array_object;
+
     for (int i = 0; i < 20; ++i)
     {
-        m_matrix.push(in->read_float());
+        m_matrix->push(in->read_float());
     }
 
     return true;
@@ -269,13 +277,13 @@
 
     for (int i = 0; i < count; ++i)
     {
-        m_colors.push(as_value(in->read_u8() << 16 + in->read_u8() << 8 + 
in->read_u8()));
-        m_alphas.push(as_value(in->read_u8()));
+        m_colors->push(as_value(in->read_u8() << 16 + in->read_u8() << 8 + 
in->read_u8()));
+        m_alphas->push(as_value(in->read_u8()));
     }
 
     for (int i = 0; i < count; ++i)
     {
-        m_ratios.push(as_value(in->read_u8()));
+        m_ratios->push(as_value(in->read_u8()));
     }
 
     m_blurX = in->read_fixed();

Index: server/asobj/BlurFilter_as.cpp
===================================================================
RCS file: server/asobj/BlurFilter_as.cpp
diff -N server/asobj/BlurFilter_as.cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ server/asobj/BlurFilter_as.cpp      27 Aug 2007 18:13:41 -0000      1.1
@@ -0,0 +1,66 @@
+// 
+//   Copyright (C) 2007 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
+
+/* $Id: BlurFilter_as.cpp,v 1.1 2007/08/27 18:13:41 cmusick Exp $ */
+
+#include "BitmapFilter_as.h"
+#include "BlurFilter.h"
+#include "VM.h"
+#include "builtin_function.h"
+
+// These _must_ be defined.
+#define phelp_helper BlurFilter_as
+#define phelp_class BlurFilter
+#include "prophelper.h"
+
+namespace gnash {
+
+class BlurFilter_as
+{
+    phelp_base_def;
+public:
+    phelp_gs(blurX);
+    phelp_gs(blurY);
+    phelp_gs(quality);
+};
+
+phelp_base_imp((bitmapFilter_interface()), BlurFilter);
+
+// Filters are property based.
+phelp_i_attach_empty
+
+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(uint8_t, number<uint8_t>, quality)
+
+as_value
+BlurFilter_as::ctor(const fn_call& /*fn*/)
+{
+    boost::intrusive_ptr<as_object> obj = new 
BlurFilter(BlurFilter_as::Interface());
+    BlurFilter_as::attachProperties(*obj);
+
+    return as_value(obj.get());
+}
+
+} // Namespace gnash
+

Index: server/asobj/BlurFilter_as.h
===================================================================
RCS file: server/asobj/BlurFilter_as.h
diff -N server/asobj/BlurFilter_as.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ server/asobj/BlurFilter_as.h        27 Aug 2007 18:13:41 -0000      1.1
@@ -0,0 +1,37 @@
+// 
+//   Copyright (C) 2007 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__
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+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
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ server/asobj/ColorMatrixFilter_as.cpp       27 Aug 2007 18:13:41 -0000      
1.1
@@ -0,0 +1,59 @@
+// 
+//   Copyright (C) 2007 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
+
+/* $Id: ColorMatrixFilter_as.cpp,v 1.1 2007/08/27 18:13:41 cmusick Exp $ */
+
+#include "BitmapFilter_as.h"
+#include "ColorMatrixFilter.h"
+#include "VM.h"
+#include "builtin_function.h"
+
+#define phelp_helper ColorMatrixFilter_as
+#define phelp_class ColorMatrixFilter
+#include "prophelper.h"
+
+namespace gnash {
+
+class ColorMatrixFilter_as
+{
+    phelp_base_def;
+public:
+    phelp_gs(matrix);
+};
+
+phelp_base_imp((bitmapFilter_interface()), ColorMatrixFilter);
+
+// Filters are purely property based.
+phelp_i_attach_empty
+
+phelp_gs_attach_begin
+phelp_gs_attach(matrix);
+phelp_gs_attach_end
+
+phelp_array_property(matrix);
+
+as_value
+ColorMatrixFilter_as::ctor(const fn_call& /*fn*/)
+{
+    boost::intrusive_ptr<as_object> obj = new 
ColorMatrixFilter(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
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ server/asobj/ColorMatrixFilter_as.h 27 Aug 2007 18:13:41 -0000      1.1
@@ -0,0 +1,37 @@
+// 
+//   Copyright (C) 2007 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__
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+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
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ server/asobj/ConvolutionFilter_as.cpp       27 Aug 2007 18:13:41 -0000      
1.1
@@ -0,0 +1,82 @@
+// 
+//   Copyright (C) 2007 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
+
+/* $Id: ConvolutionFilter_as.cpp,v 1.1 2007/08/27 18:13:41 cmusick Exp $ */
+
+#include "BitmapFilter_as.h"
+#include "ConvolutionFilter.h"
+#include "VM.h"
+#include "builtin_function.h"
+
+#define phelp_helper ConvolutionFilter_as
+#define phelp_class ConvolutionFilter
+#include "prophelper.h"
+
+namespace gnash {
+
+class ConvolutionFilter_as
+{
+    phelp_base_def;
+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_base_imp((bitmapFilter_interface()), ConvolutionFilter);
+
+phelp_i_attach_empty
+
+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(uint8_t, number<uint8_t>, matrixX)
+phelp_property(uint8_t, number<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(uint32_t, number<uint32_t>, color)
+phelp_property(uint8_t, number<uint8_t>, alpha)
+phelp_array_property(matrix)
+
+as_value
+ConvolutionFilter_as::ctor(const fn_call& /*fn*/)
+{
+    boost::intrusive_ptr<as_object> obj = new 
ConvolutionFilter(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
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ server/asobj/ConvolutionFilter_as.h 27 Aug 2007 18:13:42 -0000      1.1
@@ -0,0 +1,37 @@
+// 
+//   Copyright (C) 2007 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__
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+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
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ server/asobj/DropShadowFilter_as.cpp        27 Aug 2007 18:13:42 -0000      
1.1
@@ -0,0 +1,90 @@
+// 
+//   Copyright (C) 2007 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
+
+/* $Id: DropShadowFilter_as.cpp,v 1.1 2007/08/27 18:13:42 cmusick Exp $ */
+
+#include "BitmapFilter_as.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"
+
+namespace gnash {
+
+class DropShadowFilter_as
+{
+    phelp_base_def;
+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_base_imp((bitmapFilter_interface()), DropShadowFilter);
+
+// Filters are property based.
+phelp_i_attach_empty
+
+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(uint32_t, number<uint32_t>, color)
+phelp_property(uint8_t, number<uint8_t>, alpha)
+phelp_property(float, number<float>, blurX)
+phelp_property(float, number<float>, blurY)
+phelp_property(float, number<float>, strength)
+phelp_property(uint8_t, number<uint8_t>, quality)
+phelp_property(bool, bool, inner)
+phelp_property(bool, bool, knockout)
+phelp_property(bool, bool, hideObject)
+
+as_value
+DropShadowFilter_as::ctor(const fn_call& /*fn*/)
+{
+    boost::intrusive_ptr<as_object> obj = new 
DropShadowFilter(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
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ server/asobj/DropShadowFilter_as.h  27 Aug 2007 18:13:42 -0000      1.1
@@ -0,0 +1,37 @@
+// 
+//   Copyright (C) 2007 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__
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+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
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ server/asobj/GlowFilter_as.cpp      27 Aug 2007 18:13:42 -0000      1.1
@@ -0,0 +1,81 @@
+// 
+//   Copyright (C) 2007 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
+
+/* $Id: GlowFilter_as.cpp,v 1.1 2007/08/27 18:13:42 cmusick Exp $ */
+
+#include "BitmapFilter_as.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"
+
+namespace gnash {
+
+class GlowFilter_as
+{
+    phelp_base_def;
+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_base_imp((bitmapFilter_interface()), GlowFilter);
+
+// Filters are property based.
+phelp_i_attach_empty
+
+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(uint32_t, number<uint32_t>, color)
+phelp_property(uint8_t, number<uint8_t>, alpha)
+phelp_property(float, number<float>, blurX)
+phelp_property(float, number<float>, blurY)
+phelp_property(float, number<float>, strength)
+phelp_property(uint8_t, number<uint8_t>, quality)
+phelp_property(bool, bool, inner)
+phelp_property(bool, bool, knockout)
+
+as_value
+GlowFilter_as::ctor(const fn_call& /*fn*/)
+{
+    boost::intrusive_ptr<as_object> obj = new 
GlowFilter(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
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ server/asobj/GlowFilter_as.h        27 Aug 2007 18:13:42 -0000      1.1
@@ -0,0 +1,37 @@
+// 
+//   Copyright (C) 2007 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__
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+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
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ server/asobj/GradientBevelFilter_as.cpp     27 Aug 2007 18:13:43 -0000      
1.1
@@ -0,0 +1,125 @@
+// 
+//   Copyright (C) 2007 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
+
+/* $Id: GradientBevelFilter_as.cpp,v 1.1 2007/08/27 18:13:43 cmusick Exp $ */
+
+#include "BitmapFilter_as.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"
+
+namespace gnash {
+
+class GradientBevelFilter_as
+{
+    phelp_base_def;
+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_base_imp((bitmapFilter_interface()), GradientBevelFilter);
+
+// Filters are purely property based.
+phelp_i_attach_empty
+
+// 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(uint8_t, number<uint8_t>, quality)
+// Type is not automatable.
+phelp_property(bool, bool, knockout)
+
+as_value
+GradientBevelFilter_as::type_gs(const fn_call& fn)
+{
+    boost::intrusive_ptr<GradientBevelFilter> ptr = 
ensureType<GradientBevelFilter>(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
+    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(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
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ server/asobj/GradientBevelFilter_as.h       27 Aug 2007 18:13:43 -0000      
1.1
@@ -0,0 +1,37 @@
+// 
+//   Copyright (C) 2007 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__
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+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
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ server/asobj/GradientGlowFilter_as.cpp      27 Aug 2007 18:13:43 -0000      
1.1
@@ -0,0 +1,125 @@
+// 
+//   Copyright (C) 2007 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
+
+/* $Id: GradientGlowFilter_as.cpp,v 1.1 2007/08/27 18:13:43 cmusick Exp $ */
+
+#include "BitmapFilter_as.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"
+
+namespace gnash {
+
+class GradientGlowFilter_as
+{
+    phelp_base_def;
+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_base_imp((bitmapFilter_interface()), GradientGlowFilter);
+
+// Filters are purely property based.
+phelp_i_attach_empty
+
+// 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(uint8_t, number<uint8_t>, quality)
+// Type is not automatable.
+phelp_property(bool, bool, knockout)
+
+as_value
+GradientGlowFilter_as::type_gs(const fn_call& fn)
+{
+    boost::intrusive_ptr<GradientGlowFilter> ptr = 
ensureType<GradientGlowFilter>(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
+    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(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
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ server/asobj/GradientGlowFilter_as.h        27 Aug 2007 18:13:43 -0000      
1.1
@@ -0,0 +1,37 @@
+// 
+//   Copyright (C) 2007 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__
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+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/prophelper.h
===================================================================
RCS file: server/asobj/prophelper.h
diff -N server/asobj/prophelper.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ server/asobj/prophelper.h   27 Aug 2007 18:13:43 -0000      1.1
@@ -0,0 +1,191 @@
+// 
+//   Copyright (C) 2007 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
+//
+
+// A few defines to make life easier on standard properties.
+// #include this where you need it, not at the top.
+// First invoke: start_properties(phelp_helper, phelp_class) with
+// the helper class (adapter) name and the object class name.
+// sp_type -- the C++ type of the member
+// sp_convert -- the conversion function from as_value
+// sp_name -- the name of the property.
+//   Defines a function in phelp_helper with sp_name##_gs as its name
+//   that depends on m_##sp_name being the member of the class which
+//   corresponds to the sp_name property in ActionScript.
+//   See BlurFilter_as.cpp for usage.
+//
+#ifdef phelp_done
+#undef phelp_helper
+#undef phelp_class
+#undef phelp_property
+#undef phelp_array_property
+#undef phelp_base_def
+#undef phelp_base_imp
+#undef phelp_gs
+#undef phelp_gs_attach
+#undef phelp_gs_attach_begin
+#undef phelp_gs_attach_end
+#undef phelp_gs_attach_empty
+#undef phelp_i
+#undef phelp_i_attach
+#undef phelp_i_attach_begin
+#undef phelp_i_attach_end
+#undef phelp_i_attach_empty
+#else /* phelp_done */
+#ifdef phelp_helper
+#ifdef phelp_class
+
+#define phelp_property(sp_type, sp_convert, sp_name) \
+as_value \
+phelp_helper::sp_name##_gs(const fn_call& fn) \
+{ \
+    boost::intrusive_ptr<phelp_class> ptr = 
ensureType<phelp_class>(fn.this_ptr); \
+\
+    if (fn.nargs == 0) /* getter */ \
+    { \
+        return as_value(ptr->m_##sp_name ); \
+    } \
+    /* setter */ \
+    sp_type sp_##sp_name = fn.arg(0).to_##sp_convert (); \
+    ptr->m_##sp_name = sp_##sp_name; \
+\
+    return as_value(); \
+}
+
+#define phelp_array_property(sp_name) \
+as_value \
+phelp_helper::sp_name##_gs(const fn_call& fn) \
+{ \
+    boost::intrusive_ptr<phelp_class> ptr = 
ensureType<phelp_class>(fn.this_ptr); \
+\
+    if (fn.nargs == 0) /* getter */ \
+    { \
+        boost::intrusive_ptr<as_object> tmp = 
ensureType<as_object>(ptr->m_##sp_name); \
+        return as_value(tmp); \
+    } \
+    /* setter */ \
+    boost::intrusive_ptr<as_object> obj = fn.arg(0).to_object(); \
+    boost::intrusive_ptr<as_array_object> ap = 
ensureType<as_array_object>(obj); \
+    ptr->m_##sp_name = ap; \
+\
+    return as_value(); \
+}
+
+#define phelp_base_def \
+public: \
+    static as_object* Interface(); \
+    static void attachInterface(as_object& o); \
+    static void attachProperties(as_object& o); \
+\
+    static void registerCtor(as_object& global); \
+\
+    static as_value ctor(const fn_call& fn); \
+private: \
+    static boost::intrusive_ptr<as_object> s_interface; \
+    static boost::intrusive_ptr<builtin_function> s_ctor
+
+#define phelp_base_imp(sp_interface, sp_regname) \
+boost::intrusive_ptr<as_object> phelp_helper::s_interface; \
+boost:: intrusive_ptr<builtin_function> phelp_helper::s_ctor; \
+\
+as_object* \
+phelp_helper::Interface() \
+{ \
+    if (phelp_helper::s_interface == NULL) \
+    { \
+        phelp_helper::s_interface = new as_object sp_interface; \
+        VM::get().addStatic(phelp_helper::s_interface.get()); \
+\
+        phelp_helper::attachInterface(*phelp_helper::s_interface); \
+     } \
+\
+     return phelp_helper::s_interface.get(); \
+} \
+\
+void \
+phelp_helper::registerCtor(as_object& global) \
+{ \
+    if (phelp_helper::s_ctor != NULL) \
+        return; \
+\
+    phelp_helper::s_ctor = new builtin_function(&phelp_helper::ctor, \
+        phelp_helper::Interface()); \
+    VM::get().addStatic(phelp_helper::s_ctor.get()); \
+\
+    /* TODO: Is this correct? */ \
+    phelp_helper::attachInterface(*phelp_helper::s_ctor); \
+\
+    global.init_member(#sp_regname , phelp_helper::s_ctor.get()); \
+} \
+\
+void sp_regname##_class_init(as_object& global) \
+{ \
+    phelp_helper::registerCtor(global); \
+} 
+
+#define phelp_i(sp_name) \
+    static as_value sp_name(const fn_call& fn)
+
+#define phelp_gs(sp_name) \
+    static as_value sp_name##_gs(const fn_call& fn)
+
+#define phelp_gs_attach_begin \
+void \
+phelp_helper::attachProperties(as_object& o) \
+{ \
+    boost::intrusive_ptr<builtin_function> gs;
+
+#define phelp_gs_attach_end \
+}
+
+#define phelp_gs_attach_empty \
+void \
+phelp_helper::attachProperties(as_object& /* o */) \
+{ \
+    return; \
+}
+
+#define phelp_gs_attach(sp_name) \
+    gs = new builtin_function(phelp_helper::sp_name##_gs, NULL); \
+    o.init_property(#sp_name , *gs, *gs)
+
+#define phelp_i_attach_begin \
+void \
+phelp_helper::attachInterface(as_object& o) \
+{ \
+    boost::intrusive_ptr<builtin_function> gs; 
+
+#define phelp_i_attach_end \
+}
+
+#define phelp_i_attach_empty \
+void \
+phelp_helper::attachInterface(as_object& /* o */) \
+{ \
+}
+
+#define phelp_i_attach(sp_name, sp_code_name) \
+    o.init_member(#sp_name , new builtin_function(sp_code_name))
+
+#else /* phelp_class */
+#error phelp_class must be defined.
+#endif /* phelp_class */
+#else /* phelp_helper */
+#error phelp_helper must be defined.
+#endif /* phelp_helper */
+#endif /* phelp_done */
+




reply via email to

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