📄 swf.h
字号:
void SWFTextField_setScaledFieldHeight(SWFTextField field, int height);void SWFTextField_setScaledLeftMargin(SWFTextField field, int leftMargin);void SWFTextField_setScaledRightMargin(SWFTextField field, int rightMargin);void SWFTextField_setScaledIndentation(SWFTextField field, int indentation);void SWFTextField_setScaledLineSpacing(SWFTextField field, int lineSpacing);void SWFTextField_setScaledpadding(SWFTextField field, int padding);void SWFTextField_setAlignment(SWFTextField field, SWFTextFieldAlignment alignment);void SWFTextField_setLength(SWFTextField field, int length); /* SWFFillStyle */typedef void *SWFFillStyle;#define SWFFILL_SOLID 0x00#define SWFFILL_GRADIENT 0x10#define SWFFILL_LINEAR_GRADIENT 0x10#define SWFFILL_RADIAL_GRADIENT 0x12#define SWFFILL_BITMAP 0x40#define SWFFILL_TILED_BITMAP 0x40#define SWFFILL_CLIPPED_BITMAP 0x41SWFFillStyle newSWFSolidFillStyle(byte r, byte g, byte b, byte a);SWFFillStyle newSWFGradientFillStyle(SWFGradient gradient, byte radial);SWFFillStyle newSWFBitmapFillStyle(SWFCharacter bitmap, byte flags);SWFMatrix SWFFillStyle_getMatrix(SWFFillStyle fill); /* SWFLineStyle */typedef void *SWFLineStyle;SWFLineStyle newSWFLineStyle(unsigned short width, byte r, byte g, byte b, byte a);byte SWFLineStyle_equals(SWFLineStyle line, unsigned short width, byte r, byte g, byte b, byte a); /* SWFShape */typedef struct SWFShape_s *SWFShape;SWFShape newSWFShape();void destroySWFShape(SWFBlock block);int SWFShape_getScaledPenX(SWFShape shape);int SWFShape_getScaledPenY(SWFShape shape);void SWFShape_moveScaledPenTo(SWFShape shape, int x, int y);void SWFShape_moveScaledPen(SWFShape shape, int x, int y);void SWFShape_drawScaledLineTo(SWFShape shape, int x, int y);void SWFShape_drawScaledLine(SWFShape shape, int dx, int dy);void SWFShape_drawScaledCurveTo(SWFShape shape, int controlx, int controly, int anchorx, int anchory);void SWFShape_drawScaledCurve(SWFShape shape, int controldx, int controldy, int anchordx, int anchordy);void SWFShape_drawScaledGlyph(SWFShape shape, SWFFont font, unsigned short c, int size);/* deprecated: */#define SWFShape_moveTo SWFShape_moveScaledPenTo#define SWFShape_moveToRelative SWFShape_moveScaledPen#define SWFShape_lineTo SWFShape_drawScaledLineTo#define SWFShape_lineToRelative SWFShape_drawScaledLine#define SWFShape_curveTo SWFShape_drawScaledCurveTo#define SWFShape_curveToRelative SWFShape_drawScaledCurvevoid SWFShape_end(SWFShape shape);int SWFShape_setLineStyle(SWFShape shape, unsigned short width, byte r, byte g, byte b, byte a);SWFFillStyle SWFShape_addSolidFillStyle(SWFShape shape, byte r, byte g, byte b, byte a);SWFFillStyle SWFShape_addGradientFillStyle(SWFShape shape, SWFGradient gradient, byte flags);SWFFillStyle SWFShape_addBitmapFillStyle(SWFShape shape, SWFBitmap bitmap, byte flags);void SWFShape_setLeftFillStyle(SWFShape shape, SWFFillStyle fill);void SWFShape_setRightFillStyle(SWFShape shape, SWFFillStyle fill); /* SWFMorph */typedef struct SWFMorph_s *SWFMorph;SWFMorph newSWFMorphShape();void destroySWFMorph(SWFBlock block);SWFShape SWFMorph_getShape1(SWFMorph morph);SWFShape SWFMorph_getShape2(SWFMorph morph); /* sound - only mp3 streaming implemented */typedef struct SWFSound_s *SWFSound;#define SWF_SOUND_COMPRESSION 0xf0#define SWF_SOUND_NOT_COMPRESSED (0<<4)#define SWF_SOUND_ADPCM_COMPRESSED (1<<4)#define SWF_SOUND_RATE 0x0c#define SWF_SOUND_5KHZ (0<<2)#define SWF_SOUND_11KHZ (1<<2)#define SWF_SOUND_22KHZ (2<<2)#define SWF_SOUND_44KHZ (3<<2)#define SWF_SOUND_BITS 0x02#define SWF_SOUND_8BIT (0<<1)#define SWF_SOUND_16BIT (1<<1)#define SWF_SOUND_CHANNELS 0x01#define SWF_SOUND_MONO (0<<0)#define SWF_SOUND_STEREO (1<<0)SWFSound newSWFSound(FILE *file);SWFSound newSWFSound_fromInput(SWFInput input);void destroySWFSound(SWFSound sound);SWFBlock SWFSound_getStreamHead(SWFSound sound, float frameRate);SWFBlock SWFSound_getStreamBlock(SWFSound sound);void SWFSound_rewind(SWFSound sound); /* SWFCXform */typedef struct SWFCXform_s *SWFCXform;SWFCXform newSWFCXform(int rAdd, int gAdd, int bAdd, int aAdd, float rMult, float gMult, float bMult, float aMult);SWFCXform newSWFAddCXform(int rAdd, int gAdd, int bAdd, int aAdd);SWFCXform newSWFMultCXform(float rMult, float gMult, float bMult, float aMult);void SWFCXform_setColorAdd(SWFCXform cXform, int rAdd, int gAdd, int bAdd, int aAdd);void SWFCXform_setColorMult(SWFCXform cXform, float rMult, float gMult, float bMult, float aMult);void destroySWFCXform(SWFCXform cXform); /* SWFAction */typedef struct SWFAction_s *SWFAction;SWFAction compileSWFActionCode(const char *script);void destroySWFAction(SWFAction action); /* placeobject.h */typedef struct SWFPlaceObject2Block_s *SWFPlaceObject2Block;#define SWF_PLACEACTION_ONLOAD (1<<0)#define SWF_PLACEACTION_ENTERFRAME (1<<1)#define SWF_PLACEACTION_UNLOAD (1<<2)#define SWF_PLACEACTION_MOUSEMOVE (1<<3)#define SWF_PLACEACTION_MOUSEDOWN (1<<4)#define SWF_PLACEACTION_MOUSEUP (1<<5)#define SWF_PLACEACTION_KEYDOWN (1<<6)#define SWF_PLACEACTION_KEYUP (1<<7)#define SWF_PLACEACTION_DATA (1<<8)SWFPlaceObject2Block newSWFPlaceObject2Block(int depth);void SWFPlaceObject2Block_setDepth(SWFPlaceObject2Block block, int depth);void SWFPlaceObject2Block_setName(SWFPlaceObject2Block block, const char *name);void SWFPlaceObject2Block_setRatio(SWFPlaceObject2Block block, int ratio);void SWFPlaceObject2Block_setMaskLevel(SWFPlaceObject2Block block, int masklevel);void SWFPlaceObject2Block_setCXform(SWFPlaceObject2Block block, SWFCXform cXform);void SWFPlaceObject2Block_setColorAdd(SWFPlaceObject2Block block, int r, int g, int b, int a);void SWFPlaceObject2Block_setColorMult(SWFPlaceObject2Block block, float r, float g, float b, float a);void SWFPlaceObject2Block_setMatrix(SWFPlaceObject2Block block, SWFMatrix matrix);void SWFPlaceObject2Block_setCharacter(SWFPlaceObject2Block block, SWFCharacter character);void SWFPlaceObject2Block_setMove(SWFPlaceObject2Block block);void SWFPlaceObject2Block_addAction(SWFPlaceObject2Block block, SWFAction action, int flags); /* random blocks */typedef struct SWFOutputBlock_s *SWFOutputBlock;typedef struct SWFExports_s *SWFExports;SWFBlock newSWFPlaceObjectBlock(SWFCharacter character, int depth, SWFMatrix matrix, SWFCXform cXform);SWFOutputBlock newSWFRemoveObjectBlock(SWFCharacter character, int depth);SWFOutputBlock newSWFRemoveObject2Block(int depth);SWFOutputBlock newSWFFrameLabelBlock(const char *string);SWFBlock newSWFSetBackgroundBlock(byte r, byte g, byte b);SWFBlock newSWFShowFrameBlock();SWFBlock newSWFEndBlock();SWFOutputBlock newSWFExportBlock(SWFExports exports, int nExports); /* SWFProtect */SWFBlock newSWFProtect(char *); /* SWFButton */typedef struct SWFButton_s *SWFButton;#define SWFBUTTON_HIT (1<<3)#define SWFBUTTON_DOWN (1<<2)#define SWFBUTTON_OVER (1<<1)#define SWFBUTTON_UP (1<<0)/* deprecated: */ #define SWFBUTTONRECORD_HITSTATE (1<<3) #define SWFBUTTONRECORD_DOWNSTATE (1<<2) #define SWFBUTTONRECORD_OVERSTATE (1<<1) #define SWFBUTTONRECORD_UPSTATE (1<<0)#define SWFBUTTON_KEYPRESS(c) (((c)&0x7f)<<9)#define SWFBUTTON_ONKEYPRESS(c) (((c)&0x7f)<<9)#define SWFBUTTON_OVERDOWNTOIDLE (1<<8)#define SWFBUTTON_IDLETOOVERDOWN (1<<7)#define SWFBUTTON_OUTDOWNTOIDLE (1<<6)#define SWFBUTTON_OUTDOWNTOOVERDOWN (1<<5)#define SWFBUTTON_OVERDOWNTOOUTDOWN (1<<4)#define SWFBUTTON_OVERDOWNTOOVERUP (1<<3)#define SWFBUTTON_OVERUPTOOVERDOWN (1<<2)#define SWFBUTTON_OVERUPTOIDLE (1<<1)#define SWFBUTTON_IDLETOOVERUP (1<<0)/* easier to remember: */#define SWFBUTTON_MOUSEUPOUTSIDE SWFBUTTON_OUTDOWNTOIDLE#define SWFBUTTON_DRAGOVER (SWFBUTTON_OUTDOWNTOOVERDOWN | SWFBUTTON_IDLETOOVERDOWN)#define SWFBUTTON_DRAGOUT (SWFBUTTON_OVERDOWNTOOUTDOWN | SWFBUTTON_OVERDOWNTOIDLE)#define SWFBUTTON_MOUSEUP SWFBUTTON_OVERDOWNTOOVERUP#define SWFBUTTON_MOUSEDOWN SWFBUTTON_OVERUPTOOVERDOWN#define SWFBUTTON_MOUSEOUT SWFBUTTON_OVERUPTOIDLE#define SWFBUTTON_MOUSEOVER SWFBUTTON_IDLETOOVERUPSWFButton newSWFButton();void destroySWFButton(SWFBlock block);void SWFButton_addShape(SWFButton button, SWFCharacter character, byte flags);void SWFButton_addAction(SWFButton button, SWFAction action, int flags);void SWFButton_setMenu(SWFButton button, int flag);SWFBlock newSWFButtonCXform(SWFButton button, SWFCXform *cXforms);SWFBlock newSWFButtonSound(SWFButton button, SWFSound sound); /* SWFSprite */typedef struct SWFSprite_s *SWFSprite;SWFSprite newSWFSprite();void destroySWFSprite(SWFBlock block);void SWFSprite_setNumberOfFrames(SWFSprite sprite, int totalFrames);void SWFSprite_setBlocks(SWFSprite sprite, SWFBlock *blocks, int nBlocks);void SWFSprite_addBlock(SWFSprite sprite, SWFBlock block);#endif /* SWF_H_INCLUDED */#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -