Diffstat (limited to 'core/multimedia/opieplayer/libflash/button.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/libflash/button.h | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/libflash/button.h b/core/multimedia/opieplayer/libflash/button.h new file mode 100644 index 0000000..75781b2 --- a/dev/null +++ b/core/multimedia/opieplayer/libflash/button.h | |||
@@ -0,0 +1,88 @@ | |||
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 _BUTTON_H_ | ||
21 | #define _BUTTON_H_ | ||
22 | |||
23 | struct ButtonRecord { | ||
24 | ButtonState state; | ||
25 | Character *character; | ||
26 | long layer; | ||
27 | Matrix buttonMatrix; | ||
28 | Cxform *cxform; | ||
29 | |||
30 | struct ButtonRecord*next; | ||
31 | }; | ||
32 | |||
33 | struct Condition { | ||
34 | long transition; | ||
35 | ActionRecord *actions; | ||
36 | |||
37 | Condition *next; | ||
38 | }; | ||
39 | |||
40 | class Button : public Character { | ||
41 | public: | ||
42 | long defLevel; | ||
43 | |||
44 | ButtonRecord *buttonRecords; | ||
45 | ActionRecord *actionRecords; | ||
46 | Condition *conditionList; | ||
47 | |||
48 | long isMenu; | ||
49 | |||
50 | Sound *sound[4]; | ||
51 | |||
52 | Button(long id, int level = 1); | ||
53 | ~Button(); | ||
54 | void addActionRecord( ActionRecord *ar ); | ||
55 | void addButtonRecord( ButtonRecord *br ); | ||
56 | void addCondition( long transition ); | ||
57 | int execute(GraphicDevice *gd, Matrix *matrix, | ||
58 | Cxform *cxform, ButtonState renderState); | ||
59 | ActionRecord*getActionFromTransition(ButtonState currentState, | ||
60 | ButtonState old); | ||
61 | void getRegion(GraphicDevice *gd, Matrix *matrix, | ||
62 | void *id, ScanLineFunc scan_line_func); | ||
63 | ButtonRecord*getButtonRecords(); | ||
64 | void setButtonSound(Sound *, int); | ||
65 | void setButtonMenu(int); | ||
66 | |||
67 | ActionRecord*getActionRecords(); | ||
68 | Condition*getConditionList(); | ||
69 | Sound **getSounds(); | ||
70 | |||
71 | void getBoundingBox(Rect *bb, DisplayListEntry *); | ||
72 | |||
73 | void updateButtonState(DisplayListEntry *); | ||
74 | Character*getRenderCharacter(ButtonState state); | ||
75 | |||
76 | // Builtin | ||
77 | int isButton() { | ||
78 | return 1; | ||
79 | }; | ||
80 | |||
81 | #ifdef DUMP | ||
82 | void dump(BitStream *); | ||
83 | void dumpButtonRecords(BitStream *, int putCxform = 0); | ||
84 | void dumpButtonConditions(BitStream *); | ||
85 | #endif | ||
86 | }; | ||
87 | |||
88 | #endif /* _BUTTON_H_ */ | ||