+// swfobject.c
+
+// The following 3 routines only use placeobject2:
+
+extern char*blendModeNames[];
+
+int swf_ObjectPlace(TAG * t,U16 id,U16 depth,MATRIX * m,CXFORM * cx,const U8 * name);
+int swf_ObjectPlaceClip(TAG * t,U16 id,U16 depth,MATRIX * m,CXFORM * cx,const U8 * name, U16 clipaction);
+int swf_ObjectPlaceBlend(TAG * t,U16 id,U16 depth,MATRIX * m,CXFORM * cx,const U8 * name, U8 blendmode);
+int swf_ObjectMove(TAG * t,U16 depth,MATRIX * m,CXFORM * cx);
+
+#define PF_MOVE 0x01
+#define PF_CHAR 0x02
+#define PF_MATRIX 0x04
+#define PF_CXFORM 0x08
+#define PF_RATIO 0x10
+#define PF_NAME 0x20
+#define PF_CLIPDEPTH 0x40
+#define PF_ACTIONEVENT 0x80
+
+#define PF2_FILTERS 0x01
+#define PF2_BLENDMODE 0x02
+#define PF2_ASBITMAP 0x04
+//...
+
+#define BLENDMODE_NORMAL 0
+#define BLENDMODE_NORMAL2 1
+#define BLENDMODE_LAYER 2
+#define BLENDMODE_MULTIPLY 3
+#define BLENDMODE_SCREEN 4
+#define BLENDMODE_LIGHTEN 5
+#define BLENDMODE_DARKEN 6
+#define BLENDMODE_ADD 7
+#define BLENDMODE_SUBSTRACT 8
+#define BLENDMODE_DIFFERENCE 9
+#define BLENDMODE_INVERT 10
+#define BLENDMODE_ALPHA 11
+#define BLENDMODE_ERASE 12
+#define BLENDMODE_OVERLAY 13
+#define BLENDMODE_HARDLIGHT 14
+
+typedef struct _SWFPLACEOBJECT {
+ U16 depth;
+ U16 id; // may be 0
+ char move; //true: move/replace character, false: set character
+ MATRIX matrix;
+ CXFORM cxform;
+ U16 ratio;
+ U8*name;
+ U16 clipdepth;
+ ActionTAG* actions;
+ U8 blendmode;
+ FILTERLIST*filters;
+} SWFPLACEOBJECT;
+
+void swf_SetPlaceObject(TAG * t,SWFPLACEOBJECT* obj);
+void swf_GetPlaceObject(TAG * t,SWFPLACEOBJECT* obj);
+void swf_PlaceObjectFree(SWFPLACEOBJECT* obj);
+
+// swfvideo.c
+
+typedef struct _VIDEOSTREAM
+{
+ int width;
+ int height;
+ int linex;
+
+ int owidth;
+ int oheight;
+ int olinex;
+
+ int frame;
+ YUV*oldpic;
+ YUV*current;
+ int bbx;
+ int bby;
+ int*mvdx;
+ int*mvdy;
+ int quant;
+
+ /* modifyable: */
+ int do_motion; //enable motion compensation (slow!)
+
+} VIDEOSTREAM;
+
+void swf_SetVideoStreamDefine(TAG*tag, VIDEOSTREAM*stream, U16 frames, U16 width, U16 height);
+void swf_SetVideoStreamIFrame(TAG*tag, VIDEOSTREAM*s, RGBA*pic, int quant/* 1-31, 1=best quality, 31=best compression*/);
+void swf_SetVideoStreamBlackFrame(TAG*tag, VIDEOSTREAM*s);
+void swf_SetVideoStreamPFrame(TAG*tag, VIDEOSTREAM*s, RGBA*pic, int quant/* 1-31, 1=best quality, 31=best compression*/);
+void swf_SetVideoStreamMover(TAG*tag, VIDEOSTREAM*s, signed char* movex, signed char* movey, void** image, int quant);
+void swf_VideoStreamClear(VIDEOSTREAM*stream);
+
+// swfbutton.c
+
+// Button States
+
+#define BS_HIT 0x08
+#define BS_DOWN 0x04
+#define BS_OVER 0x02
+#define BS_UP 0x01
+
+// Button Conditions
+
+/* missing: IDLE_OUTDOWN
+ OUTDOWN_OVERUP
+ OVERUP_OUTDOWN
+*/
+#define BC_OVERDOWN_IDLE 0x0100
+#define BC_IDLE_OVERDOWN 0x0080
+#define BC_OUTDOWN_IDLE 0x0040
+#define BC_OUTDOWN_OVERDOWN 0x0020
+#define BC_OVERDOWN_OUTDOWN 0x0010
+#define BC_OVERDOWN_OVERUP 0x0008
+#define BC_OVERUP_OVERDOWN 0x0004
+#define BC_OVERUP_IDLE 0x0002
+#define BC_IDLE_OVERUP 0x0001
+
+#define BC_KEY(c) (c<<9)
+
+#define BC_CURSORLEFT 0x0200
+#define BC_CURSORRIGHT 0x0400
+#define BC_POS1 0x0600
+#define BC_END 0x0800
+#define BC_INSERT 0x0a00
+#define BC_DELETE 0x0c00
+#define BC_CLEAR 0x0e00
+#define BC_BACKSPACE 0x1000
+#define BC_ENTER 0x1a00
+#define BC_CURSORUP 0x1c00
+#define BC_CURSORDOWN 0x1e00
+#define BC_PAGEUP 0x2000
+#define BC_PAGEDOWN 0x2200
+#define BC_TAB 0x2400
+#define BC_ESCAPE 0x3600
+#define BC_SPACE 0x4000
+
+/* these are probably only valid with linux:
+ Ctrl-A 0x0200
+ Ctrl-X 0x3000
+ Ctrl-Y 0x3200
+ Ctrl-Z 0x3400
+ Escape/Ctrl-[ 0x3600
+ Ctrl-\ 0x3800
+ Ctrl-] 0x3a00
+ Ctrl-^ 0x3c00
+ Ctrl-/ 0x3e00
+ */
+
+/* everything above 0x4000 is standard ascii:
+ 0x4000 ' ' 0x4200 '!' 0x4600 '#' 0x4800 '$' 0x4a00 '%' 0x4c00 '&' ...
+ 0x6000 '0' ... 0x7200 '9'
+ 0x8000 '@'
+ 0x8200 'A' ... 0xb400 'Z'
+ ...
+ 0xfc00 '~'
+ */
+
+// Button Flag
+
+#define BF_TRACKMENU 0x01
+
+int swf_ButtonSetRecord(TAG * t,U8 state,U16 id,U16 layer,MATRIX * m,CXFORM * cx);
+int swf_ButtonSetCondition(TAG * t,U16 condition); // for DefineButton2
+int swf_ButtonSetFlags(TAG * t,U8 flags); // necessary for DefineButton2
+int swf_ButtonPostProcess(TAG * t,int anz_action); // Set all offsets in DefineButton2-Tags (how many conditions to process)
+ActionTAG* swf_ButtonGetAction(TAG*t);
+
+// swfrender.c
+
+typedef struct RENDERBUF
+{
+ int width;
+ int height;
+ int posx,posy;
+ void*internal;
+} RENDERBUF;
+
+void swf_Render_Init(RENDERBUF*buf, int posx, int posy, int width, int height, int antialize, int multiply);
+void swf_Render_SetBackground(RENDERBUF*buf, RGBA*img, int width, int height);
+void swf_Render_SetBackgroundColor(RENDERBUF*buf, RGBA color);
+RGBA* swf_Render(RENDERBUF*dest);
+void swf_RenderShape(RENDERBUF*dest, SHAPE2*shape, MATRIX*m, CXFORM*c, U16 depth,U16 clipdepth);
+void swf_RenderSWF(RENDERBUF*buf, SWF*swf);
+void swf_Render_AddImage(RENDERBUF*buf, U16 id, RGBA*img, int width, int height); /* img is non-premultiplied */
+void swf_Render_ClearCanvas(RENDERBUF*dest);
+void swf_Render_Delete(RENDERBUF*dest);
+
+// swffilter.c
+
+#define FILTERTYPE_DROPSHADOW 0
+#define FILTERTYPE_BLUR 1
+#define FILTERTYPE_GLOW 2
+#define FILTERTYPE_BEVEL 3
+#define FILTERTYPE_GRADIENTGLOW 4
+#define FILTERTYPE_CONVOLUTION 5
+#define FILTERTYPE_COLORMATRIX 6
+#define FILTERTYPE_GRADIENTBEVEL 7
+
+extern char*filtername[];
+
+typedef struct _FILTER_GRADIENTGLOW {
+ U8 type;
+ GRADIENT*gradient;
+ double blurx;
+ double blury;
+ double angle;
+ double distance;
+ float strength;
+ char innershadow;
+ char knockout;
+ char composite;
+ char ontop;
+ int passes;
+} FILTER_GRADIENTGLOW;
+
+typedef struct _FILTER_DROPSHADOW {
+ U8 type;
+ RGBA color;
+ double blurx;
+ double blury;
+ double angle;
+ double distance;
+ float strength;
+ char innershadow;
+ char knockout;
+ char composite;
+ int passes;
+} FILTER_DROPSHADOW;
+
+typedef struct _FILTER_BEVEL {
+ U8 type;
+ RGBA shadow;
+ RGBA highlight;
+ double blurx;
+ double blury;
+ double angle;
+ double distance;
+ float strength;
+ char innershadow;
+ char knockout;
+ char composite;
+ char ontop;
+ int passes;
+} FILTER_BEVEL;
+
+typedef struct _FILTER_BLUR {
+ U8 type;
+ double blurx;
+ double blury;
+ int passes;
+} FILTER_BLUR;
+
+typedef struct _FILTER_GLOW {
+ U8 type;
+ RGBA rgba;
+ double blurx;
+ double blury;
+ double strength;
+ int passes;
+ char innerglow;
+ char knockout;
+ char composite;
+} FILTER_GLOW;
+
+void swf_SetFilter(TAG*tag, FILTER*f);
+FILTER*swf_GetFilter(TAG*tag);
+FILTER*swf_NewFilter(U8 type);
+void swf_DeleteFilter(FILTER*f);
+
+#ifdef __cplusplus
+}
+#endif
+