summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/libflash/flash.h
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/libflash/flash.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libflash/flash.h129
1 files changed, 129 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/libflash/flash.h b/core/multimedia/opieplayer/libflash/flash.h
new file mode 100644
index 0000000..9330713
--- a/dev/null
+++ b/core/multimedia/opieplayer/libflash/flash.h
@@ -0,0 +1,129 @@
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 _FLASH_H_
21#define _FLASH_H_
22
23#define PLUGIN_NAME "Shockwave Flash"
24#define FLASH_VERSION_STRING "Version 0.4.10"
25
26/* Flags to pass to FlashExec */
27#define FLASH_WAKEUP 0x01
28#define FLASH_EVENT 0x02
29#define FLASH_CMD 0x04
30
31/* Mask to extract commands */
32#define FLASH_CMD_MASK 0xf0
33/* Commands */
34 #define FLASH_STOP 0x10/* Pause the movie */
35 #define FLASH_CONT 0x20/* Continue the movie after pause */
36 #define FLASH_REWIND 0x30/* Rewind the movie and pause */
37 #define FLASH_STEP 0x40/* Frame by frame operation */
38
39/* return codes of FlashExec */
40#define FLASH_STATUS_WAKEUP 0x01 /* FlashExec must be called again after a given time */
41
42struct FlashInfo {
43 long frameRate;
44 long frameCount;
45 long frameWidth;
46 long frameHeight;
47 long version;
48};
49
50/* Player settings */
51 #define PLAYER_LOOP(1<<0)
52 #define PLAYER_QUALITY(1<<1)
53 #define PLAYER_MENU(1<<2)
54
55/* Parser status */
56#define FLASH_PARSE_ERROR 0
57#define FLASH_PARSE_START 1
58#define FLASH_PARSE_NEED_DATA 2
59#define FLASH_PARSE_EOM 4
60#define FLASH_PARSE_WAKEUP 8
61#define FLASH_PARSE_OOM 16 /* Out Of Memory */
62
63typedef void *FlashHandle;
64
65#if defined(__cplusplus) || defined(c_plusplus)
66extern "C" {
67#endif
68
69enum FlashEventType {
70 FeNone,
71 FeMouseMove,
72 FeButtonPress,
73 FeButtonRelease,
74 FeRefresh,
75 FeKeyPress,
76 /* internal events */
77 FeKeyRelease,
78};
79
80enum FlashKey {
81 FeKeyUp = 1,
82 FeKeyDown,
83 FeKeyLeft,
84 FeKeyRight,
85 FeKeyEnter,
86 FeKeyNext
87};
88
89
90
91typedef struct FlashEvent {
92 enum FlashEventType type;
93 int x,y; /* Mouse coordinates,
94 relative to upper-left window corner */
95 enum FlashKey key;
96} FlashEvent;
97
98typedef struct FlashDisplay {
99 void *pixels;
100 int bpl; /* bytes per line */
101 int width;
102 int height;
103 int depth;
104 int bpp;
105 int flash_refresh;
106 /* Clipping region */
107 int clip_x, clip_y;
108 int clip_width, clip_height;
109} FlashDisplay;
110
111extern FlashHandle FlashNew();
112extern void FlashGetInfo(FlashHandle fh, struct FlashInfo *fi);
113extern long FlashGraphicInit(FlashHandle fh, FlashDisplay *fd);
114extern void FlashSoundInit(FlashHandle fh, char *device);
115extern int FlashParse(FlashHandle fh, int level, char *data, long size);
116extern long FlashExec(FlashHandle fh, long flag, FlashEvent *fe, struct timeval *wakeDate);
117extern void FlashClose(FlashHandle fh);
118extern void FlashSetGetUrlMethod(FlashHandle flashHandle, void (*getUrl)(char *, char *, void *), void *);
119extern void FlashSetGetSwfMethod(FlashHandle flashHandle, void (*getSwf)(char *url, int level, void *clientData), void *clientData);
120extern void FlashSetCursorOnOffMethod(FlashHandle flashHandle, void (*cursorOnOff)(int , void *), void *clientData);
121extern void FlashZoom(FlashHandle fh, int zoom);
122extern void FlashOffset(FlashHandle fh, int x, int y);
123extern void FlashSettings(FlashHandle fh, long settings);
124
125#if defined(__cplusplus) || defined(c_plusplus)
126};
127#endif
128
129#endif /* _FLASH_H_ */