1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
/*
* Copyright (C) 2000-2001 the xine project
*
* This file is part of xine for win32 video player.
*
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
* xine win32 UI
* by Matthew Grooms <elon@altavista.com>
*/
#ifdef __CYGWIN32__
# define _WIN32_IE 0xFFFF
#endif
#include <windows.h>
#include <commctrl.h>
#include <stdio.h>
#include <math.h>
#ifdef _MSC_VER
# include <ddraw.h>
#endif
#include <xine.h>
#include "xineint.h"
#include "resource.h"
#include "common.h"
#ifdef XINE_COMPILE
# include "video_out.h"
# include "audio_out.h"
#else
# include <xine/video_out.h>
# include <xine/audio_out.h>
#endif
#ifndef _XINEUI_H_
#define _XINEUI_H_
#define ID_PANEL 10001
#define ID_TIMEBAR 10002
#define ID_TOOLBAR 10003
#define ID_PLAY_BTTN 20001
#define ID_PAUSE_BTTN 20002
#define ID_STOP_BTTN 20003
#define ID_PREV_BTTN 20004
#define ID_NEXT_BTTN 20005
#define ID_FFWD_BTTN 20006
#define ID_RWND_BTTN 20007
#define ID_EJECT_BTTN 20008
#define ID_TITLE 10001
#define ID_TIME 10002
#define ID_CONFIG 10003
#define ID_FULLSCREEN 10004
#define ID_SPULABEL 10005
#define ID_SPUINC 10006
#define ID_SPUDEC 10007
#define ID_SPUVALUE 10008
#define ID_AUDIOLABEL 10009
#define ID_AUDIOINC 10010
#define ID_AUDIODEC 10011
#define ID_AUDIOVALUE 10012
#define ID_VOLBUTTON 10013
#define ID_VOLBAR 10014
#define ID_STATUS 10001
#define ID_LIST 10002
#define ID_ADD 10003
#define ID_DEL 10004
typedef struct _PLAYITEM
{
char * mrl_short_name;
char * mrl_long_name;
int mrl_type;
}PLAYITEM;
#define MAX_PLAYITEMS 10004
typedef class _XINE_UI
{
public:
config_values_t * config;
gGui_t *gui;
bool init_ctrlwnd();
void end_ctrlwnd();
bool init_videownd();
void end_videownd();
bool init_panelwnd();
void end_panelwnd();
bool init_playlistwnd();
void end_playlistwnd();
void error( LPSTR szfmt, ... );
void warning( LPSTR szfmt, ... );
char * mrl_long_name;
char * mrl_short_name;
int mrl_type;
int mrl_time_length;
int mrl_time_current;
int spu_channel;
int audio_channel;
int mode;
PLAYITEM * playlist[ MAX_PLAYITEMS ];
int playcount;
int playindex;
win32_visual_t win32_visual;
HINSTANCE hinst;
HWND hctrlwnd;
HWND hpanelwnd;
HWND hvideownd;
HWND hplaylistwnd;
bool tracking;
_XINE_UI();
~_XINE_UI();
DWORD UpdateLoop();
bool UpdateCtrl();
bool UpdatePanel();
bool InitGui( HINSTANCE hinstance );
void EndGui();
bool InitXine();
void EndXine();
PLAYITEM * PlaylistAdd( char * short_name, char * long_name, int type );
bool PlaylistDel( int index );
bool Play( int playindex );
bool Stop();
bool SetTime( int time );
bool SetSpeed( int speed );
int GetSpeed();
bool SelectSpuChannel( int channel );
bool SelectAudioChannel( int channel );
bool SetVolume( int volume );
bool SetMute( bool mute );
bool DriverMessage( int type, void * param );
}XINE_UI;
extern gGui_t *gGui;
#endif
|