author | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
commit | 15318cad33835e4e2dc620d033e43cd930676cdd (patch) (unidiff) | |
tree | c2fa0399a2c47fda8e2cd0092c73a809d17f68eb /core/multimedia/opieplayer/libflash/character.h | |
download | opie-15318cad33835e4e2dc620d033e43cd930676cdd.zip opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.gz opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.bz2 |
Initial revision
Diffstat (limited to 'core/multimedia/opieplayer/libflash/character.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/libflash/character.h | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/libflash/character.h b/core/multimedia/opieplayer/libflash/character.h new file mode 100644 index 0000000..583cb17 --- a/dev/null +++ b/core/multimedia/opieplayer/libflash/character.h | |||
@@ -0,0 +1,90 @@ | |||
1 | ///////////////////////////////////////////////////////////// | ||
2 | // Flash Plugin and Player | ||
3 | // Copyright (C) 1998 Olivier Debon | ||
4 | // | ||
5 | // This program is free software; you can redistribute it and/or | ||
6 | // modify it under the terms of the GNU General Public License | ||
7 | // as published by the Free Software Foundation; either version 2 | ||
8 | // of the License, or (at your option) any later version. | ||
9 | // | ||
10 | // This program is distributed in the hope that it will be useful, | ||
11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | // GNU General Public License for more details. | ||
14 | // | ||
15 | // You should have received a copy of the GNU General Public License | ||
16 | // along with this program; if not, write to the Free Software | ||
17 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | // | ||
19 | /////////////////////////////////////////////////////////////// | ||
20 | #ifndef _CHARACTER_H_ | ||
21 | #define _CHARACTER_H_ | ||
22 | |||
23 | enum ObjectType { | ||
24 | ShapeType, | ||
25 | TextType, | ||
26 | FontType, | ||
27 | SoundType, | ||
28 | BitmapType, | ||
29 | SpriteType, | ||
30 | ButtonType | ||
31 | }; | ||
32 | |||
33 | class DisplayListEntry; | ||
34 | |||
35 | // Character definition | ||
36 | |||
37 | class Character { | ||
38 | long tagId; | ||
39 | ObjectType type; | ||
40 | char *name; | ||
41 | |||
42 | public: | ||
43 | Character(ObjectType type, long tagId); | ||
44 | virtual ~Character(); | ||
45 | |||
46 | virtual int execute(GraphicDevice *, Matrix *, Cxform *);// Display, play or whatever | ||
47 | virtual int isButton(void);// True if Character is a button | ||
48 | virtual int isSprite(void); | ||
49 | virtual ActionRecord*eventHandler(GraphicDevice *, FlashEvent *); | ||
50 | virtual void getRegion(GraphicDevice *gd, Matrix *matrix, void *id, ScanLineFunc scan_line_func); | ||
51 | virtual void reset();// Reset internal state of object | ||
52 | virtual void getBoundingBox(Rect *bb, DisplayListEntry *de); | ||
53 | #ifdef DUMP | ||
54 | virtual void dump(BitStream *main); | ||
55 | |||
56 | int saved; | ||
57 | #endif | ||
58 | |||
59 | long getTagId();// Return tagId | ||
60 | ObjectType getType(); | ||
61 | char *getTypeString(); | ||
62 | char *getName(); | ||
63 | void setName(char *); | ||
64 | }; | ||
65 | |||
66 | struct sCharCell { | ||
67 | Character *elt; | ||
68 | struct sCharCell *next; | ||
69 | }; | ||
70 | |||
71 | class Dict { | ||
72 | struct sCharCell *head; | ||
73 | struct sCharCell *currentCell;// Iteration variable for dictNextCharacter | ||
74 | |||
75 | public: | ||
76 | Dict(); | ||
77 | ~Dict(); | ||
78 | |||
79 | void addCharacter(Character *character); | ||
80 | void nameCharacter(long id, char *string); | ||
81 | Character*getCharacter(long id); | ||
82 | void dictRewind(); | ||
83 | Character*dictNextCharacter(); | ||
84 | |||
85 | #ifdef DUMP | ||
86 | void dictSetUnsaved(); | ||
87 | #endif | ||
88 | }; | ||
89 | |||
90 | #endif /* _CHARACTER_H_ */ | ||