00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00020
00021
00022
00023
00024
00025
00026
00027 #define FLASH_WAKEUP 0x01
00028 #define FLASH_EVENT 0x02
00029 #define FLASH_CMD 0x04
00030
00031
00032 #define FLASH_CMD_MASK 0xf0
00033
00034 #define FLASH_STOP 0x10
00035 #define FLASH_CONT 0x20
00036 #define FLASH_REWIND 0x30
00037 #define FLASH_STEP 0x40
00038
00039
00040 #define FLASH_STATUS_WAKEUP 0x01
00041
00042 struct FlashInfo {
00043 long frameRate;
00044 long frameCount;
00045 long frameWidth;
00046 long frameHeight;
00047 long version;
00048 };
00049
00050
00051 #define PLAYER_LOOP (1<<0)
00052 #define PLAYER_QUALITY (1<<1)
00053 #define PLAYER_MENU (1<<2)
00054
00055
00056 #define FLASH_PARSE_ERROR 0
00057 #define FLASH_PARSE_START 1
00058 #define FLASH_PARSE_NEED_DATA 2
00059 #define FLASH_PARSE_EOM 4
00060 #define FLASH_PARSE_WAKEUP 8
00061 #define FLASH_PARSE_OOM 16
00062
00063 typedef void *FlashHandle;
00064
00065 #if defined(__cplusplus) || defined(c_plusplus)
00066 extern "C" {
00067 #endif
00068
00069 enum FlashEventType {
00070 FeNone,
00071 FeMouseMove,
00072 FeButtonPress,
00073 FeButtonRelease,
00074 FeRefresh,
00075 FeKeyPress,
00076
00077 FeKeyRelease,
00078 };
00079
00080 enum FlashKey {
00081 FeKeyUp = 1,
00082 FeKeyDown,
00083 FeKeyLeft,
00084 FeKeyRight,
00085 FeKeyEnter,
00086 FeKeyNext
00087 };
00088
00089
00090
00091 typedef struct FlashEvent {
00092 enum FlashEventType type;
00093 int x,y;
00094
00095 enum FlashKey key;
00096 } FlashEvent;
00097
00098 typedef struct FlashDisplay {
00099 void *pixels;
00100 int bpl;
00101 int width;
00102 int height;
00103 int depth;
00104 int bpp;
00105 int flash_refresh;
00106
00107 int clip_x, clip_y;
00108 int clip_width, clip_height;
00109 } FlashDisplay;
00110
00111 extern FlashHandle FlashNew();
00112 extern void FlashGetInfo(FlashHandle fh, struct FlashInfo *fi);
00113 extern long FlashGraphicInit(FlashHandle fh, FlashDisplay *fd);
00114 extern void FlashSoundInit(FlashHandle fh, char *device);
00115 extern int FlashParse(FlashHandle fh, int level, char *data, long size);
00116 extern long FlashExec(FlashHandle fh, long flag, FlashEvent *fe, struct timeval *wakeDate);
00117 extern void FlashClose(FlashHandle fh);
00118 extern void FlashSetGetUrlMethod(FlashHandle flashHandle, void (*getUrl)(char *, char *, void *), void *);
00119 extern void FlashSetGetSwfMethod(FlashHandle flashHandle, void (*getSwf)(char *url, int level, void *clientData), void *clientData);
00120 extern void FlashSetCursorOnOffMethod(FlashHandle flashHandle, void (*cursorOnOff)(int , void *), void *clientData);
00121 extern void FlashZoom(FlashHandle fh, int zoom);
00122 extern void FlashOffset(FlashHandle fh, int x, int y);
00123 extern void FlashSettings(FlashHandle fh, long settings);
00124
00125 #if defined(__cplusplus) || defined(c_plusplus)
00126 };
00127 #endif
00128
00129 #endif