annotate Gui/mplayer/pb.c @ 12251:ac3c866f159b

cosmetics, wording update
author diego
date Thu, 22 Apr 2004 12:16:58 +0000
parents bc24dd70c6e2
children 4a56f15dee5f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8973
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
1
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
2 // main window
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
3
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
4 #include <stdlib.h>
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
5 #include <stdio.h>
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
6 #include <inttypes.h>
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
7 #include <sys/stat.h>
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
8 #include <unistd.h>
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
9
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
10 #include "../app.h"
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
11 #include "../skin/font.h"
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
12 #include "../skin/skin.h"
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
13 #include "../wm/ws.h"
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
14
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
15 #include "../../config.h"
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
16 #include "../../help_mp.h"
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
17 #include "../../libvo/x11_common.h"
9625
bc24dd70c6e2 many 10l for me ...
pontscho
parents: 9305
diff changeset
18 #include "../../libvo/fastmemcpy.h"
8973
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
19
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
20 #include "../../libmpdemux/stream.h"
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
21 #include "../../mixer.h"
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
22 #include "../../libvo/sub.h"
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
23 #include "../../mplayer.h"
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
24
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
25 #include "../../libmpdemux/demuxer.h"
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
26 #include "../../libmpdemux/stheader.h"
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
27 #include "../../codec-cfg.h"
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
28
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
29 #include "play.h"
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
30 #include "widgets.h"
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
31 #include "common.h"
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
32
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
33 extern unsigned int GetTimerMS( void );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
34 extern unsigned int GetTimer( void );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
35
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
36 unsigned char * mplPBDrawBuffer = NULL;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
37 int mplPBVisible = 0;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
38 int mplPBLength = 0;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
39 int mplPBFade = 0;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
40
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
41 void mplPBDraw( void )
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
42 {
9088
731e5dc57436 - fix -fs
pontscho
parents: 8975
diff changeset
43 int x;
731e5dc57436 - fix -fs
pontscho
parents: 8975
diff changeset
44
8973
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
45 if ( !appMPlayer.subWindow.isFullScreen ) return;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
46 if ( !mplPBVisible || !appMPlayer.barIsPresent ) return;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
47
9088
731e5dc57436 - fix -fs
pontscho
parents: 8975
diff changeset
48 // appMPlayer.bar.x=( appMPlayer.subWindow.Width - appMPlayer.bar.width ) / 2;
731e5dc57436 - fix -fs
pontscho
parents: 8975
diff changeset
49 switch( appMPlayer.bar.x )
731e5dc57436 - fix -fs
pontscho
parents: 8975
diff changeset
50 {
731e5dc57436 - fix -fs
pontscho
parents: 8975
diff changeset
51 case -1: x=( appMPlayer.subWindow.Width - appMPlayer.bar.width ) / 2; break;
731e5dc57436 - fix -fs
pontscho
parents: 8975
diff changeset
52 case -2: x=( appMPlayer.subWindow.Width - appMPlayer.bar.width ); break;
731e5dc57436 - fix -fs
pontscho
parents: 8975
diff changeset
53 default: x=appMPlayer.bar.x;
731e5dc57436 - fix -fs
pontscho
parents: 8975
diff changeset
54 }
731e5dc57436 - fix -fs
pontscho
parents: 8975
diff changeset
55
8973
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
56 switch ( mplPBFade )
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
57 {
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
58 case 1: // fade in
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
59 mplPBLength--;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
60 if ( appMPlayer.subWindow.Height - appMPlayer.bar.height >= mplPBLength )
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
61 {
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
62 mplPBLength=appMPlayer.subWindow.Height - appMPlayer.bar.height;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
63 mplPBFade=0;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
64 vo_mouse_autohide=0;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
65 }
9088
731e5dc57436 - fix -fs
pontscho
parents: 8975
diff changeset
66 wsMoveWindow( &appMPlayer.barWindow,0,x,mplPBLength );
8973
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
67 break;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
68 case 2: // fade out
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
69 mplPBLength+=10;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
70 if ( mplPBLength > appMPlayer.subWindow.Height )
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
71 {
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
72 mplPBLength=appMPlayer.subWindow.Height;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
73 mplPBFade=mplPBVisible=0;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
74 vo_mouse_autohide=1;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
75 wsVisibleWindow( &appMPlayer.barWindow,wsHideWindow );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
76 return;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
77 }
9088
731e5dc57436 - fix -fs
pontscho
parents: 8975
diff changeset
78 wsMoveWindow( &appMPlayer.barWindow,0,x,mplPBLength );
8973
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
79 break;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
80 }
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
81
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
82 // --- render
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
83 if ( appMPlayer.barWindow.State == wsWindowExpose )
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
84 {
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
85 btnModify( evSetMoviePosition,guiIntfStruct.Position );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
86 btnModify( evSetVolume,guiIntfStruct.Volume );
9305
91ed6378b9a6 another 10l
pontscho
parents: 9088
diff changeset
87
91ed6378b9a6 another 10l
pontscho
parents: 9088
diff changeset
88 vo_mouse_autohide=0;
8973
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
89
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
90 memcpy( mplPBDrawBuffer,appMPlayer.bar.Bitmap.Image,appMPlayer.bar.Bitmap.ImageSize );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
91 Render( &appMPlayer.barWindow,appMPlayer.barItems,appMPlayer.NumberOfBarItems,mplPBDrawBuffer,appMPlayer.bar.Bitmap.ImageSize );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
92 wsConvert( &appMPlayer.barWindow,mplPBDrawBuffer,appMPlayer.bar.Bitmap.ImageSize );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
93 }
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
94 wsPutImage( &appMPlayer.barWindow );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
95 }
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
96
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
97 #define itPLMButton (itNULL - 1)
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
98 #define itPRMButton (itNULL - 2)
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
99
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
100 void mplPBMouseHandle( int Button,int X,int Y,int RX,int RY )
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
101 {
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
102 static int itemtype = 0;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
103 int i;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
104 wItem * item = NULL;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
105 float value = 0.0f;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
106
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
107 static int SelectedItem = -1;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
108 int currentselected = -1;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
109
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
110 for ( i=0;i < appMPlayer.NumberOfBarItems + 1;i++ )
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
111 if ( ( appMPlayer.barItems[i].pressed != btnDisabled )&&
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
112 ( wgIsRect( X,Y,appMPlayer.barItems[i].x,appMPlayer.barItems[i].y,appMPlayer.barItems[i].x+appMPlayer.barItems[i].width,appMPlayer.barItems[i].y+appMPlayer.barItems[i].height ) ) )
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
113 { currentselected=i; break; }
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
114
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
115 switch ( Button )
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
116 {
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
117 case wsPMMouseButton:
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
118 gtkShow( evHidePopUpMenu,NULL );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
119 mplShowMenu( RX,RY );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
120 break;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
121 case wsRMMouseButton:
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
122 mplHideMenu( RX,RY,0 );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
123 break;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
124 case wsPRMouseButton:
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
125 gtkShow( evShowPopUpMenu,NULL );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
126 break;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
127 // ---
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
128 case wsPLMouseButton:
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
129 gtkShow( evHidePopUpMenu,NULL );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
130 SelectedItem=currentselected;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
131 if ( SelectedItem == -1 ) break; // yeees, i'm move the fucking window
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
132 item=&appMPlayer.barItems[SelectedItem];
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
133 itemtype=item->type;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
134 item->pressed=btnPressed;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
135
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
136 switch( item->type )
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
137 {
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
138 case itButton:
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
139 if ( ( SelectedItem > -1 ) &&
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
140 ( ( ( item->msg == evPlaySwitchToPause && item->msg == evPauseSwitchToPlay ) ) ||
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
141 ( ( item->msg == evPauseSwitchToPlay && item->msg == evPlaySwitchToPause ) ) ) )
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
142 { item->pressed=btnDisabled; }
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
143 break;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
144 }
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
145
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
146 break;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
147 case wsRLMouseButton:
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
148 item=&appMPlayer.barItems[SelectedItem];
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
149 item->pressed=btnReleased;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
150 SelectedItem=-1;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
151 if ( currentselected == - 1 ) { itemtype=0; break; }
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
152 value=0;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
153
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
154 switch( itemtype )
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
155 {
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
156 case itPotmeter:
8975
pontscho
parents: 8973
diff changeset
157 case itVPotmeter:
8973
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
158 case itHPotmeter:
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
159 btnModify( item->msg,(float)( X - item->x ) / item->width * 100.0f );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
160 mplEventHandling( item->msg,item->value );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
161 value=item->value;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
162 break;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
163 }
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
164 mplEventHandling( item->msg,value );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
165
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
166 itemtype=0;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
167 break;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
168 // ---
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
169 case wsP5MouseButton: value=-2.5f; goto rollerhandled;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
170 case wsP4MouseButton: value= 2.5f;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
171 rollerhandled:
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
172 item=&appMPlayer.barItems[currentselected];
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
173 if ( ( item->type == itHPotmeter )||( item->type == itVPotmeter )||( item->type == itPotmeter ) )
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
174 {
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
175 item->value+=value;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
176 btnModify( item->msg,item->value );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
177 mplEventHandling( item->msg,item->value );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
178 }
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
179 break;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
180 // ---
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
181 case wsMoveMouse:
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
182 item=&appMPlayer.barItems[SelectedItem];
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
183 switch ( itemtype )
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
184 {
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
185 case itPRMButton:
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
186 mplMenuMouseHandle( X,Y,RX,RY );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
187 break;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
188 case itPotmeter:
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
189 item->value=(float)( X - item->x ) / item->width * 100.0f;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
190 goto potihandled;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
191 case itHPotmeter:
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
192 item->value=(float)( X - item->x ) / item->width * 100.0f;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
193 potihandled:
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
194 if ( item->value > 100.0f ) item->value=100.0f;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
195 if ( item->value < 0.0f ) item->value=0.0f;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
196 mplEventHandling( item->msg,item->value );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
197 break;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
198 }
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
199 break;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
200 }
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
201 }
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
202
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
203 void mplPBShow( int x, int y )
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
204 {
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
205 if ( !appMPlayer.barIsPresent || !gtkEnablePlayBar ) return;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
206 if ( !appMPlayer.subWindow.isFullScreen ) return;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
207
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
208 if ( y > appMPlayer.subWindow.Height - appMPlayer.bar.height )
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
209 {
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
210 if ( !mplPBFade ) wsVisibleWindow( &appMPlayer.barWindow,wsShowWindow );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
211 mplPBFade=1; mplPBVisible=1; wsPostRedisplay( &appMPlayer.barWindow );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
212 }
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
213 else if ( !mplPBFade ) mplPBFade=2;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
214 }
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
215
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
216 void mplPBInit( void )
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
217 {
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
218 if ( !appMPlayer.barIsPresent ) return;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
219
9625
bc24dd70c6e2 many 10l for me ...
pontscho
parents: 9305
diff changeset
220 gfree( (void**)&mplPBDrawBuffer );
bc24dd70c6e2 many 10l for me ...
pontscho
parents: 9305
diff changeset
221
bc24dd70c6e2 many 10l for me ...
pontscho
parents: 9305
diff changeset
222 if ( ( mplPBDrawBuffer = (unsigned char *)malloc( appMPlayer.bar.Bitmap.ImageSize ) ) == NULL )
8973
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
223 {
9625
bc24dd70c6e2 many 10l for me ...
pontscho
parents: 9305
diff changeset
224 mp_msg( MSGT_GPLAYER,MSGL_FATAL,MSGTR_NEMDB );
8973
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
225 exit( 0 );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
226 }
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
227
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
228 appMPlayer.barWindow.Parent=appMPlayer.subWindow.WindowID;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
229 wsCreateWindow( &appMPlayer.barWindow,
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
230 appMPlayer.bar.x,appMPlayer.bar.y,appMPlayer.bar.width,appMPlayer.bar.height,
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
231 wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsHideFrame|wsHideWindow,"PlayBar" );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
232
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
233 wsSetShape( &appMPlayer.barWindow,appMPlayer.bar.Mask.Image );
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
234
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
235 appMPlayer.barWindow.ReDraw=(void *)mplPBDraw;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
236 appMPlayer.barWindow.MouseHandler=mplPBMouseHandle;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
237 appMPlayer.barWindow.KeyHandler=mplMainKeyHandle;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
238
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
239 mplPBLength=appMPlayer.subWindow.Height;
0a665389cf2b - add playbar
pontscho
parents:
diff changeset
240 }