summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/libflash/displaylist.h
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/libflash/displaylist.h') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libflash/displaylist.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/libflash/displaylist.h b/core/multimedia/opieplayer/libflash/displaylist.h
new file mode 100644
index 0000000..536f628
--- a/dev/null
+++ b/core/multimedia/opieplayer/libflash/displaylist.h
@@ -0,0 +1,80 @@
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 _DISPLAYLIST_H_
21#define _DISPLAYLIST_H_
22
23class Character;
24class Program;
25
26struct DisplayList;
27
28// Display List management
29struct DisplayListEntry {
30 Character *character;
31 long depth;
32 Matrix *matrix;
33 Cxform *cxform;
34 char *instanceName;
35
36 /* button state */
37 ButtonState renderState;
38 ButtonState oldState;
39 Character *buttonCharacter;
40 Matrix buttonMatrix;
41 Matrix renderMatrix; /* last render matrix */
42
43 DisplayListEntry*next;
44
45 DisplayList *owner;// Parent
46};
47
48struct DisplayList {
49 DisplayListEntry*list;
50 FlashMovie *movie;
51 Rect bbox; // Delta clipping region
52 int isSprite;
53public:
54 DisplayList(FlashMovie *movie);
55 ~DisplayList();
56 DisplayListEntry*getList();
57 void clearList();
58 void placeObject(GraphicDevice *gd,Character *character, long depth, Matrix *matrix = 0, Cxform *cxform = 0, char *name = 0);
59 Character *removeObject(GraphicDevice *gd, Character *character, long depth);
60
61 int render(GraphicDevice *gd, Matrix *m = 0, Cxform *cxform = 0);
62 void updateBoundingBox(DisplayListEntry *);
63 void updateButtons (FlashMovie *);
64 void getBoundary(Rect *bb);// Returns boundary of current displayed objects
65 int updateSprites();// Update sprites in the display list
66};
67
68typedef void (*DisplayListFunc)(DisplayListEntry *e, void *opaque);
69
70 void updateButtons(FlashMovie *m);
71 int computeActions(FlashMovie *m, Program **prog, ActionRecord **ar);
72 void renderFocus(FlashMovie *movie);
73
74typedef int (*ExploreButtonFunc)(void *opaque, Program *prg, DisplayListEntry *e);
75 int exploreButtons(FlashMovie *movie, void *opaque, ExploreButtonFunc func);
76 void updateBoundingBox(DisplayListEntry *e);
77 void transformBoundingBox(Rect *bb, Matrix *matrix, Rect *boundary, int reset);
78 void updateButtonState(DisplayListEntry *e, ButtonState state);
79
80#endif /* _DISPLAYLIST_H_ */