⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 character.h

📁 Ming is a library for generating Macromedia Flash files (.swf), written in C, and includes useful ut
💻 H
字号:
/*    Ming, an SWF output library    Copyright (C) 2001  Opaque Industries - http://www.opaque.net/    This library is free software; you can redistribute it and/or    modify it under the terms of the GNU Lesser General Public    License as published by the Free Software Foundation; either    version 2.1 of the License, or (at your option) any later version.    This library 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    Lesser General Public License for more details.    You should have received a copy of the GNU Lesser General Public    License along with this library; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*//* character.h * * $Id: character.h,v 1.11 2007/03/26 18:29:34 krechert Exp $ *  * Notice: This header file contains declarations of functions and types that * are just used internally. All library functions and types that are supposed * to be publicly accessable are defined in ./src/ming.h. */#ifndef SWF_CHARACTER_H_INCLUDED#define SWF_CHARACTER_H_INCLUDED#include "ming.h"#include "block.h"#include "rect.h"#include "../displaylist.h"extern int SWF_gNumCharacters;#define CHARACTER(c) ((SWFCharacter)(c))#define CHARACTERID(c) (((SWFCharacter)(c))->id)/* characters are things that can be placed on the stage-   shapes, text, sprites.. */struct SWFCharacter_s{  struct SWFBlock_s block;  int id;  SWFRect bounds;  /* some characters depend on others- e.g., a shape may need a jpeg for     a fill or some text needs a font..  we keep track of these dependencies     so that we write them in the right order, regardless of when/if the user     adds them to the movie */  int nDependencies;  SWFCharacter *dependencies;  /* We shouldn't allow users to modify characters after they've been added     to a container- movie, sprite, or button. */  BOOL isFinished;	   /* will be called if a character is placed first   * character can add additional blocks to the movies blocklist   * all blocks are added _before_ the place tag   * onPlace ist called only for the first place event   * returns the number of added blocks   */  int (*onPlace)(SWFDisplayItem, SWFBlockList);  /* will be called for each frame   * returns the number of blocks added   */  int (*onFrame)(SWFDisplayItem, SWFBlockList);};/* initialize character values to something sane */void SWFCharacterInit(SWFCharacter character);/* destroy this character */void destroySWFCharacter(SWFCharacter character);/* marks the given block as a dependency of the character- that is,   we should define the block before defining the character */voidSWFCharacter_addDependency(SWFCharacter character, SWFCharacter dependency);/* returns the character's dependency list */BOOLSWFCharacter_getDependencies(SWFCharacter character,			     SWFCharacter** depsPtr, int* nDepsPtr);/* returns the scaled (i.e., in twips) width of the character */intSWFCharacter_getScaledWidth(SWFCharacter character);/* returns the scaled (i.e., in twips) height of the character */intSWFCharacter_getScaledHeight(SWFCharacter character);/* returns the character's SWFRect bounds object */SWFRectSWFCharacter_getBounds(SWFCharacter character);/* returns TRUE if the given block is a character type, else FALSE */BOOLSWFBlock_isCharacter(SWFBlock block);/* notify the character that it's been added to a container */voidSWFCharacter_setFinished(SWFCharacter character);/* returns TRUE if the character has been added to a container */BOOLSWFCharacter_isFinished(SWFCharacter character);#endif /* SWF_CHARACTER_H_INCLUDED */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -