29
31
// the GUI and that only need to include interface.h for this.
30
32
// ------------------------------------------------------------
32
#include "ui/actions.h"
34
35
extern int use_gui; // this is defined in mplayer.c
35
36
// ------------------------------------------------------------
37
38
#define GMPlayer "gmplayer"
43
#define guiSetFileName 4
44
#define guiSetAudioOnly 6
45
#define guiReDrawSubWindow 7
46
#define guiSetShVideo 8
47
#define guiSetStream 9
49
#define guiSetVolume 11
50
#define guiSetDefaults 12
51
#define guiSetValues 13
52
#define guiSetFileFormat 14
53
#define guiSetDemuxer 15
54
#define guiSetParameters 16
55
#define guiSetAfilter 17
56
#define guiSetContext 18
40
/// gui() instructions
49
GUI_SETUP_VIDEO_WINDOW,
60
63
#define GUI_PAUSE 2
64
#define guiFilenames 4
65
#define guiALL 0xffffffff
67
#define gtkSetContrast 0
68
#define gtkSetBrightness 1
70
#define gtkSetSaturation 3
71
#define gtkSetEqualizer 4
72
#define gtkAddPlItem 5
73
#define gtkGetNextPlItem 6
74
#define gtkGetPrevPlItem 7
75
#define gtkGetCurrPlItem 8
77
#define gtkSetExtraStereo 10
78
#define gtkSetPanscan 11
79
#define gtkSetFontFactor 12
80
#define gtkSetAutoq 13
81
#define gtkClearStruct 14
82
#define gtkAddURLItem 15
83
#define gtkSetFontOutLine 16
84
#define gtkSetFontBlur 17
85
#define gtkSetFontTextScale 18
86
#define gtkSetFontOSDScale 19
87
#define gtkSetFontEncoding 20
88
#define gtkSetFontAutoScale 21
89
#define gtkSetSubEncoding 22
90
#define gtkDelCurrPlItem 23
91
#define gtkInsertPlItem 24
92
#define gtkSetCurrPlItem 25
94
#define fsPersistant_MaxPos 5
96
#define guiSetFilename(s, n) \
102
#define guiSetDF(s, d, n) \
105
s = malloc(strlen(d) + strlen(n) + 5); \
106
sprintf(s, "%s/%s", d, n); \
119
} guiUnknownErrorStruct;
129
#ifdef CONFIG_DVDREAD
137
int nr_of_audio_channels;
138
stream_language_t audio_streams[32];
140
stream_language_t subtitles[32];
146
guiResizeStruct resize;
147
guiVideoStruct videodata;
148
guiUnknownErrorStruct error;
150
struct MPContext *mpcontext;
159
#ifdef CONFIG_DVDREAD
68
#define GUI_FILE_SAME 1
69
#define GUI_FILE_NEW 2
72
/// mplayer() instructions
75
MPLAYER_SET_AUTO_QUALITY,
76
MPLAYER_SET_BRIGHTNESS,
78
MPLAYER_SET_EQUALIZER,
79
MPLAYER_SET_EXTRA_STEREO,
80
MPLAYER_SET_FONT_AUTOSCALE,
81
MPLAYER_SET_FONT_BLUR,
82
MPLAYER_SET_FONT_ENCODING,
83
MPLAYER_SET_FONT_FACTOR,
84
MPLAYER_SET_FONT_OSDSCALE,
85
MPLAYER_SET_FONT_OUTLINE,
86
MPLAYER_SET_FONT_TEXTSCALE,
89
MPLAYER_SET_SATURATION,
90
MPLAYER_SET_SUB_ENCODING
105
#ifdef CONFIG_DVDREAD
107
stream_language_t AudioStream[32];
110
stream_language_t Subtitle[32];
113
char *Filename; // public, read access by MPlayer
115
char *SubtitleFilename;
117
#if defined(CONFIG_VCD) || defined(CONFIG_DVDREAD)
121
int Track; // public, read access by MPlayer
123
#ifdef CONFIG_DVDREAD
125
int Chapter; // public, write access by MPlayer
130
int Playing; // public, read access by MPlayer
132
int RunningTime; // public, write access by MPlayer
133
int ElapsedTime; // public, write access by MPlayer
134
float Position; // public, write access by MPlayer
200
int AudioFileChanged;
139
int NewPlay; // public, read access by MPlayer
203
140
} guiInterface_t;
205
typedef struct plItem {
206
struct plItem *prev, *next;
211
typedef struct urlItem {
212
struct urlItem *next;
216
142
extern guiInterface_t guiInfo;
220
extern char *skinName;
221
extern char *skinDirInHome;
222
extern char *skinMPlayerDir;
224
extern plItem *plList;
225
extern plItem *plCurrent;
226
extern plItem *plLastPlayed;
228
extern urlItem *URLList;
230
extern char *fsHistory[fsPersistant_MaxPos];
232
extern float gtkEquChannels[6][10];
234
void gaddlist(char ***list, const char *entry);
235
void gfree(void **p);
236
void gmp_msg(int mod, int lev, const char *format, ...);
237
char *gstrchr(char *str, int c);
238
int gstrcmp(const char *a, const char *b);
239
char *gstrdup(const char *str);
240
void *gtkSet(int cmd, float fparam, void *vparam);
144
/// @name MPlayer -> GUI
146
int gui(int what, void *data);
241
147
void guiDone(void);
242
void guiEventHandling(void);
243
void guiExit(enum exit_reason how);
244
int guiGetEvent(int type, void *arg);
245
148
void guiInit(void);
246
void guiLoadFont(void);
247
void guiLoadSubtitle(char *name);
248
int import_initial_playtree_into_gui(play_tree_t *my_playtree, m_config_t *config, int enqueue);
249
int import_playtree_playlist_into_gui(play_tree_t *my_playtree, m_config_t *config);
149
int guiPlaylistAdd(play_tree_t *my_playtree, m_config_t *config);
150
int guiPlaylistInitialize(play_tree_t *my_playtree, m_config_t *config, int enqueue);
153
/// @name GUI -> MPlayer
155
void mplayer(int what, float value, void *data);
156
void mplayerLoadFont(void);
157
void mplayerLoadSubtitle(const char *name);
158
void gmp_msg(int mod, int lev, const char *format, ...);
251
161
#endif /* MPLAYER_GUI_INTERFACE_H */