annotate gui/mplayer/mw.c @ 30245:bef93e623403

Make sure that sfence is used after any non temporal stores.
author zuxy
date Tue, 12 Jan 2010 02:34:33 +0000
parents 0f1b5b68af32
children f4e017b6921a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26458
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
1 /*
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
2 * main window
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
3 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
4 * This file is part of MPlayer.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
5 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
6 * MPlayer is free software; you can redistribute it and/or modify
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
7 * it under the terms of the GNU General Public License as published by
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
9 * (at your option) any later version.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
10 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
11 * MPlayer is distributed in the hope that it will be useful,
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
14 * GNU General Public License for more details.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
15 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
16 * You should have received a copy of the GNU General Public License along
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
17 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
19 */
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
20
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
21 #include <stdlib.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
22 #include <stdio.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
23 #include <inttypes.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
24 #include <sys/stat.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
25 #include <unistd.h>
23305
22d3d12c6dfb Include string.h for memcpy, fastmemcpy.h alone is not enough.
reimar
parents: 23154
diff changeset
26 #include <string.h>
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
27
26382
b2f4abcf20ed Make include paths consistent; do not use ../ in them.
diego
parents: 26365
diff changeset
28 #include "config.h"
23154
e564b9cd7290 Fix several implicit declarations of functions warnings.
diego
parents: 23077
diff changeset
29 #include "gmplayer.h"
26365
10dfbc523184 Add gui/ prefix to some #include paths so that compilation from the
diego
parents: 26203
diff changeset
30 #include "gui/app.h"
10dfbc523184 Add gui/ prefix to some #include paths so that compilation from the
diego
parents: 26203
diff changeset
31 #include "gui/skin/font.h"
10dfbc523184 Add gui/ prefix to some #include paths so that compilation from the
diego
parents: 26203
diff changeset
32 #include "gui/skin/skin.h"
10dfbc523184 Add gui/ prefix to some #include paths so that compilation from the
diego
parents: 26203
diff changeset
33 #include "gui/wm/ws.h"
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
34
26382
b2f4abcf20ed Make include paths consistent; do not use ../ in them.
diego
parents: 26365
diff changeset
35 #include "help_mp.h"
b2f4abcf20ed Make include paths consistent; do not use ../ in them.
diego
parents: 26365
diff changeset
36 #include "libvo/x11_common.h"
b2f4abcf20ed Make include paths consistent; do not use ../ in them.
diego
parents: 26365
diff changeset
37 #include "libvo/fastmemcpy.h"
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
38
26382
b2f4abcf20ed Make include paths consistent; do not use ../ in them.
diego
parents: 26365
diff changeset
39 #include "stream/stream.h"
b2f4abcf20ed Make include paths consistent; do not use ../ in them.
diego
parents: 26365
diff changeset
40 #include "stream/url.h"
b2f4abcf20ed Make include paths consistent; do not use ../ in them.
diego
parents: 26365
diff changeset
41 #include "mixer.h"
b2f4abcf20ed Make include paths consistent; do not use ../ in them.
diego
parents: 26365
diff changeset
42 #include "libvo/sub.h"
b2f4abcf20ed Make include paths consistent; do not use ../ in them.
diego
parents: 26365
diff changeset
43 #include "access_mpcontext.h"
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
44
26382
b2f4abcf20ed Make include paths consistent; do not use ../ in them.
diego
parents: 26365
diff changeset
45 #include "libmpdemux/demuxer.h"
b2f4abcf20ed Make include paths consistent; do not use ../ in them.
diego
parents: 26365
diff changeset
46 #include "libmpdemux/stheader.h"
b2f4abcf20ed Make include paths consistent; do not use ../ in them.
diego
parents: 26365
diff changeset
47 #include "codec-cfg.h"
b2f4abcf20ed Make include paths consistent; do not use ../ in them.
diego
parents: 26365
diff changeset
48 #include "m_option.h"
b2f4abcf20ed Make include paths consistent; do not use ../ in them.
diego
parents: 26365
diff changeset
49 #include "m_property.h"
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
50
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
51 #define GUI_REDRAW_WAIT 375
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
52
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
53 #include "play.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
54 #include "widgets.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
55
28051
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 27370
diff changeset
56 unsigned int GetTimerMS( void );
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
57
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
58 unsigned char * mplDrawBuffer = NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
59 int mplMainRender = 1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
60
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
61 int mplMainAutoPlay = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
62 int mplMiddleMenu = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
63
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
64 int mainVisible = 1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
65
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
66 int boxMoved = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
67 int sx = 0,sy = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
68 int i,pot = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
69
25603
01754b23193e Rename common.[ch], there are too many files by that name.
diego
parents: 24113
diff changeset
70 #include "gui_common.h"
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
71
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
72 void mplMainDraw( void )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
73 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
74
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
75 if ( appMPlayer.mainWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit );
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
76
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
77 if ( appMPlayer.mainWindow.Visible == wsWindowNotVisible ||
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
78 !mainVisible ) return;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
79 // !appMPlayer.mainWindow.Mapped ) return;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
80
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
81 if ( mplMainRender && appMPlayer.mainWindow.State == wsWindowExpose )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
82 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
83 btnModify( evSetMoviePosition,guiIntfStruct.Position );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
84 btnModify( evSetVolume,guiIntfStruct.Volume );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
85
23457
a124f3abc1ec Replace implicit use of fast_memcpy via macro by explicit use to allow
reimar
parents: 23305
diff changeset
86 fast_memcpy( mplDrawBuffer,appMPlayer.main.Bitmap.Image,appMPlayer.main.Bitmap.ImageSize );
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
87 Render( &appMPlayer.mainWindow,appMPlayer.Items,appMPlayer.NumberOfItems,mplDrawBuffer,appMPlayer.main.Bitmap.ImageSize );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
88 mplMainRender=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
89 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
90 wsPutImage( &appMPlayer.mainWindow );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
91 // XFlush( wsDisplay );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
92 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
93
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
94 static unsigned last_redraw_time = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
95
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
96 void mplEventHandling( int msg,float param )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
97 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
98 int iparam = (int)param;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
99 mixer_t *mixer = mpctx_get_mixer(guiIntfStruct.mpcontext);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
100
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
101 switch( msg )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
102 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
103 // --- user events
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
104 case evExit:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
105 exit_player( "Exit" );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
106 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
107
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
108 case evPlayNetwork:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
109 gfree( (void **)&guiIntfStruct.Subtitlename );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
110 gfree( (void **)&guiIntfStruct.AudioFile );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
111 guiIntfStruct.StreamType=STREAMTYPE_STREAM;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
112 goto play;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
113 case evSetURL:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
114 gtkShow( evPlayNetwork,NULL );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
115 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
116
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
117 case evSetAudio:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
118 if ( !guiIntfStruct.demuxer || audio_id == iparam ) break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
119 audio_id=iparam;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
120 goto play;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
121
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
122 case evSetVideo:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
123 if ( !guiIntfStruct.demuxer || video_id == iparam ) break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
124 video_id=iparam;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
125 goto play;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
126
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
127 case evSetSubtitle:
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
128 mp_property_do("sub",M_PROPERTY_SET,&iparam,guiIntfStruct.mpcontext);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
129 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
130
27370
14c5017f40d2 Change a bunch of video/audio-output-specific preprocessor directives from
diego
parents: 27341
diff changeset
131 #ifdef CONFIG_VCD
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
132 case evSetVCDTrack:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
133 guiIntfStruct.Track=iparam;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
134 case evPlayVCD:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
135 gtkSet( gtkClearStruct,0,(void *)guiALL );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
136 guiIntfStruct.StreamType=STREAMTYPE_VCD;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
137 goto play;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
138 #endif
27341
e7c989f7a7c9 Start unifying names of internal preprocessor directives.
diego
parents: 26458
diff changeset
139 #ifdef CONFIG_DVDREAD
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
140 case evPlayDVD:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
141 guiIntfStruct.DVD.current_title=1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
142 guiIntfStruct.DVD.current_chapter=1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
143 guiIntfStruct.DVD.current_angle=1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
144 play_dvd_2:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
145 gtkSet( gtkClearStruct,0,(void *)(guiALL - guiDVD) );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
146 guiIntfStruct.StreamType=STREAMTYPE_DVD;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
147 goto play;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
148 #endif
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
149 case evPlay:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
150 case evPlaySwitchToPause:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
151 play:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
152
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
153 if ( ( msg == evPlaySwitchToPause )&&( guiIntfStruct.Playing == 2 ) ) goto NoPause;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
154
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
155 if ( gtkSet( gtkGetCurrPlItem,0,NULL ) &&( guiIntfStruct.StreamType == STREAMTYPE_FILE ) )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
156 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
157 plItem * next = gtkSet( gtkGetCurrPlItem,0,NULL );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
158 plLastPlayed=next;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
159 mplSetFileName( next->path,next->name,STREAMTYPE_FILE );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
160 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
161
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
162 switch ( guiIntfStruct.StreamType )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
163 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
164 case STREAMTYPE_STREAM:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
165 case STREAMTYPE_FILE:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
166 gtkSet( gtkClearStruct,0,(void *)(guiALL - guiFilenames) );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
167 break;
27370
14c5017f40d2 Change a bunch of video/audio-output-specific preprocessor directives from
diego
parents: 27341
diff changeset
168 #ifdef CONFIG_VCD
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
169 case STREAMTYPE_VCD:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
170 gtkSet( gtkClearStruct,0,(void *)(guiALL - guiVCD - guiFilenames) );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
171 if ( !cdrom_device ) cdrom_device=gstrdup( DEFAULT_CDROM_DEVICE );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
172 mplSetFileName( NULL,cdrom_device,STREAMTYPE_VCD );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
173 if ( guiIntfStruct.Playing != 2 )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
174 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
175 if ( !guiIntfStruct.Track )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
176 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
177 if ( guiIntfStruct.VCDTracks > 1 ) guiIntfStruct.Track=2;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
178 else guiIntfStruct.Track=1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
179 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
180 guiIntfStruct.DiskChanged=1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
181 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
182 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
183 #endif
27341
e7c989f7a7c9 Start unifying names of internal preprocessor directives.
diego
parents: 26458
diff changeset
184 #ifdef CONFIG_DVDREAD
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
185 case STREAMTYPE_DVD:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
186 gtkSet( gtkClearStruct,0,(void *)(guiALL - guiDVD - guiFilenames) );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
187 if ( !dvd_device ) dvd_device=gstrdup( DEFAULT_DVD_DEVICE );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
188 mplSetFileName( NULL,dvd_device,STREAMTYPE_DVD );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
189 if ( guiIntfStruct.Playing != 2 )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
190 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
191 guiIntfStruct.Title=guiIntfStruct.DVD.current_title;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
192 guiIntfStruct.Chapter=guiIntfStruct.DVD.current_chapter;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
193 guiIntfStruct.Angle=guiIntfStruct.DVD.current_angle;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
194 guiIntfStruct.DiskChanged=1;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
195 }
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
196 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
197 #endif
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
198 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
199 guiIntfStruct.NewPlay=1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
200 mplPlay();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
201 break;
27341
e7c989f7a7c9 Start unifying names of internal preprocessor directives.
diego
parents: 26458
diff changeset
202 #ifdef CONFIG_DVDREAD
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
203 case evSetDVDSubtitle:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
204 dvdsub_id=iparam;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
205 goto play_dvd_2;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
206 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
207 case evSetDVDAudio:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
208 audio_id=iparam;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
209 goto play_dvd_2;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
210 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
211 case evSetDVDChapter:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
212 guiIntfStruct.DVD.current_chapter=iparam;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
213 goto play_dvd_2;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
214 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
215 case evSetDVDTitle:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
216 guiIntfStruct.DVD.current_title=iparam;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
217 guiIntfStruct.DVD.current_chapter=1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
218 guiIntfStruct.DVD.current_angle=1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
219 goto play_dvd_2;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
220 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
221 #endif
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
222
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
223 case evPause:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
224 case evPauseSwitchToPlay:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
225 NoPause:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
226 mplPause();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
227 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
228
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
229 case evStop:
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
230 guiIntfStruct.Playing=guiSetStop;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
231 mplState();
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
232 guiIntfStruct.NoWindow=False;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
233 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
234
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
235 case evLoadPlay:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
236 mplMainAutoPlay=1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
237 // guiIntfStruct.StreamType=STREAMTYPE_FILE;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
238 case evLoad:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
239 gtkSet( gtkDelPl,0,NULL );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
240 gtkShow( evLoad,NULL );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
241 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
242 case evLoadSubtitle: gtkShow( evLoadSubtitle,NULL ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
243 case evDropSubtitle:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
244 gfree( (void **)&guiIntfStruct.Subtitlename );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
245 guiLoadSubtitle( NULL );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
246 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
247 case evLoadAudioFile: gtkShow( evLoadAudioFile,NULL ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
248 case evPrev: mplPrev(); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
249 case evNext: mplNext(); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
250
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
251 case evPlayList: gtkShow( evPlayList,NULL ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
252 case evSkinBrowser: gtkShow( evSkinBrowser,skinName ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
253 case evAbout: gtkShow( evAbout,NULL ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
254 case evPreferences: gtkShow( evPreferences,NULL ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
255 case evEqualizer: gtkShow( evEqualizer,NULL ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
256
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
257 case evForward10min: mplRelSeek( 600 ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
258 case evBackward10min: mplRelSeek( -600 );break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
259 case evForward1min: mplRelSeek( 60 ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
260 case evBackward1min: mplRelSeek( -60 ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
261 case evForward10sec: mplRelSeek( 10 ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
262 case evBackward10sec: mplRelSeek( -10 ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
263 case evSetMoviePosition: mplAbsSeek( param ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
264
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
265 case evIncVolume: vo_x11_putkey( wsGrayMul ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
266 case evDecVolume: vo_x11_putkey( wsGrayDiv ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
267 case evMute: mixer_mute( mixer ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
268
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
269 case evSetVolume:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
270 guiIntfStruct.Volume=param;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
271 goto set_volume;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
272 case evSetBalance:
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
273 guiIntfStruct.Balance=param;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
274 set_volume:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
275 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
276 float l = guiIntfStruct.Volume * ( ( 100.0 - guiIntfStruct.Balance ) / 50.0 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
277 float r = guiIntfStruct.Volume * ( ( guiIntfStruct.Balance ) / 50.0 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
278 if ( l > guiIntfStruct.Volume ) l=guiIntfStruct.Volume;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
279 if ( r > guiIntfStruct.Volume ) r=guiIntfStruct.Volume;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
280 // printf( "!!! v: %.2f b: %.2f -> %.2f x %.2f\n",guiIntfStruct.Volume,guiIntfStruct.Balance,l,r );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
281 mixer_setvolume( mixer,l,r );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
282 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
283 if ( osd_level )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
284 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
285 osd_visible=(GetTimerMS() + 1000) | 1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
286 vo_osd_progbar_type=OSD_VOLUME;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
287 vo_osd_progbar_value=( ( guiIntfStruct.Volume ) * 256.0 ) / 100.0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
288 vo_osd_changed( OSDTYPE_PROGBAR );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
289 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
290 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
291
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
292
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
293 case evIconify:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
294 switch ( iparam )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
295 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
296 case 0: wsIconify( appMPlayer.mainWindow ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
297 case 1: wsIconify( appMPlayer.subWindow ); break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
298 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
299 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
300 case evHalfSize:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
301 btnSet( evFullScreen,btnReleased );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
302 if ( guiIntfStruct.Playing )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
303 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
304 if ( appMPlayer.subWindow.isFullScreen )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
305 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
306 mplFullScreen();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
307 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
308 wsResizeWindow( &appMPlayer.subWindow, guiIntfStruct.MovieWidth / 2, guiIntfStruct.MovieHeight / 2 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
309 wsMoveWindow( &appMPlayer.subWindow, 0,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
310 ( wsMaxX - guiIntfStruct.MovieWidth/2 )/2 + wsOrgX,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
311 ( wsMaxY - guiIntfStruct.MovieHeight/2 )/2 + wsOrgY );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
312 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
313 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
314 case evDoubleSize:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
315 btnSet( evFullScreen,btnReleased );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
316 if ( guiIntfStruct.Playing )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
317 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
318 if ( appMPlayer.subWindow.isFullScreen )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
319 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
320 mplFullScreen();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
321 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
322 wsResizeWindow( &appMPlayer.subWindow, guiIntfStruct.MovieWidth * 2, guiIntfStruct.MovieHeight * 2 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
323 wsMoveWindow( &appMPlayer.subWindow, 0,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
324 ( wsMaxX - guiIntfStruct.MovieWidth*2 )/2 + wsOrgX,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
325 ( wsMaxY - guiIntfStruct.MovieHeight*2 )/2 + wsOrgY );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
326 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
327 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
328 case evNormalSize:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
329 btnSet( evFullScreen,btnReleased );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
330 if ( guiIntfStruct.Playing )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
331 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
332 if ( appMPlayer.subWindow.isFullScreen )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
333 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
334 mplFullScreen();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
335 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
336 wsResizeWindow( &appMPlayer.subWindow, guiIntfStruct.MovieWidth, guiIntfStruct.MovieHeight );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
337 wsMoveWindow( &appMPlayer.subWindow, 0,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
338 ( wsMaxX - guiIntfStruct.MovieWidth )/2 + wsOrgX,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
339 ( wsMaxY - guiIntfStruct.MovieHeight )/2 + wsOrgY );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
340 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
341 } else if ( !appMPlayer.subWindow.isFullScreen ) break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
342 case evFullScreen:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
343 if ( !guiIntfStruct.Playing && !gtkShowVideoWindow ) break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
344 mplFullScreen();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
345 if ( appMPlayer.subWindow.isFullScreen ) btnSet( evFullScreen,btnPressed );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
346 else btnSet( evFullScreen,btnReleased );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
347 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
348
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
349 case evSetAspect:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
350 switch ( iparam )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
351 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
352 case 2: movie_aspect=16.0f / 9.0f; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
353 case 3: movie_aspect=4.0f / 3.0f; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
354 case 4: movie_aspect=2.35; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
355 case 1:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
356 default: movie_aspect=-1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
357 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
358 wsClearWindow( appMPlayer.subWindow );
27341
e7c989f7a7c9 Start unifying names of internal preprocessor directives.
diego
parents: 26458
diff changeset
359 #ifdef CONFIG_DVDREAD
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
360 if ( guiIntfStruct.StreamType == STREAMTYPE_DVD || guiIntfStruct.StreamType == STREAMTYPE_VCD ) goto play_dvd_2;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
361 else
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
362 #endif
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
363 guiIntfStruct.NewPlay=1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
364 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
365
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
366 // --- timer events
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
367 case evRedraw:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
368 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
369 unsigned now = GetTimerMS();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
370 extern int mplPBFade;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
371 if ((now > last_redraw_time) &&
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
372 (now < last_redraw_time + GUI_REDRAW_WAIT) &&
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
373 !mplPBFade)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
374 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
375 last_redraw_time = now;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
376 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
377 mplMainRender=1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
378 wsPostRedisplay( &appMPlayer.mainWindow );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
379 wsPostRedisplay( &appMPlayer.barWindow );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
380 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
381 // --- system events
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
382 #ifdef MP_DEBUG
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
383 case evNone:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
384 mp_msg( MSGT_GPLAYER,MSGL_STATUS,"[mw] event none received.\n" );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
385 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
386 default:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
387 mp_msg( MSGT_GPLAYER,MSGL_STATUS,"[mw] unknown event received ( %d,%.2f ).\n",msg,param );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
388 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
389 #endif
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
390 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
391 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
392
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
393 #define itPLMButton (itNULL - 1)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
394 #define itPRMButton (itNULL - 2)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
395
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
396 void mplMainMouseHandle( int Button,int X,int Y,int RX,int RY )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
397 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
398 static int itemtype = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
399 int i;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
400 wItem * item = NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
401 float value = 0.0f;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
402
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
403 static int SelectedItem = -1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
404 int currentselected = -1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
405
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
406 for ( i=0;i < appMPlayer.NumberOfItems + 1;i++ )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
407 if ( ( appMPlayer.Items[i].pressed != btnDisabled )&&
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
408 ( wgIsRect( X,Y,appMPlayer.Items[i].x,appMPlayer.Items[i].y,appMPlayer.Items[i].x+appMPlayer.Items[i].width,appMPlayer.Items[i].y+appMPlayer.Items[i].height ) ) )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
409 { currentselected=i; break; }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
410
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
411 switch ( Button )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
412 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
413 case wsPMMouseButton:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
414 gtkShow( evHidePopUpMenu,NULL );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
415 mplShowMenu( RX,RY );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
416 itemtype=itPRMButton;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
417 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
418 case wsRMMouseButton:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
419 mplHideMenu( RX,RY,0 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
420 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
421
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
422 case wsPLMouseButton:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
423 gtkShow( evHidePopUpMenu,NULL );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
424 sx=X; sy=Y; boxMoved=1; itemtype=itPLMButton;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
425 SelectedItem=currentselected;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
426 if ( SelectedItem == -1 ) break;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
427 boxMoved=0;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
428 item=&appMPlayer.Items[SelectedItem];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
429 itemtype=item->type;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
430 item->pressed=btnPressed;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
431 switch( item->type )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
432 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
433 case itButton:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
434 if ( ( SelectedItem > -1 ) &&
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
435 ( ( ( item->msg == evPlaySwitchToPause && item->msg == evPauseSwitchToPlay ) ) ||
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
436 ( ( item->msg == evPauseSwitchToPlay && item->msg == evPlaySwitchToPause ) ) ) )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
437 { item->pressed=btnDisabled; }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
438 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
439 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
440 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
441 case wsRLMouseButton:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
442 boxMoved=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
443 item=&appMPlayer.Items[SelectedItem];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
444 item->pressed=btnReleased;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
445 SelectedItem=-1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
446 if ( currentselected == - 1 ) { itemtype=0; break; }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
447 value=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
448 switch( itemtype )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
449 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
450 case itPotmeter:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
451 case itHPotmeter:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
452 btnModify( item->msg,(float)( X - item->x ) / item->width * 100.0f );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
453 mplEventHandling( item->msg,item->value );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
454 value=item->value;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
455 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
456 case itVPotmeter:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
457 btnModify( item->msg, ( 1. - (float)( Y - item->y ) / item->height) * 100.0f );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
458 mplEventHandling( item->msg,item->value );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
459 value=item->value;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
460 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
461 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
462 mplEventHandling( item->msg,value );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
463 itemtype=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
464 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
465
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
466 case wsRRMouseButton:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
467 gtkShow( evShowPopUpMenu,NULL );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
468 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
469
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
470 // --- rolled mouse ... de szar :)))
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
471 case wsP5MouseButton: value=-2.5f; goto rollerhandled;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
472 case wsP4MouseButton: value= 2.5f;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
473 rollerhandled:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
474 item=&appMPlayer.Items[currentselected];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
475 if ( ( item->type == itHPotmeter )||( item->type == itVPotmeter )||( item->type == itPotmeter ) )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
476 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
477 item->value+=value;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
478 btnModify( item->msg,item->value );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
479 mplEventHandling( item->msg,item->value );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
480 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
481 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
482
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
483 // --- moving
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
484 case wsMoveMouse:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
485 item=&appMPlayer.Items[SelectedItem];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
486 switch ( itemtype )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
487 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
488 case itPLMButton:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
489 wsMoveWindow( &appMPlayer.mainWindow,False,RX - abs( sx ),RY - abs( sy ) );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
490 mplMainRender=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
491 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
492 case itPRMButton:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
493 mplMenuMouseHandle( X,Y,RX,RY );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
494 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
495 case itPotmeter:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
496 item->value=(float)( X - item->x ) / item->width * 100.0f;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
497 goto potihandled;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
498 case itVPotmeter:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
499 item->value=(1. - (float)( Y - item->y ) / item->height) * 100.0f;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
500 goto potihandled;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
501 case itHPotmeter:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
502 item->value=(float)( X - item->x ) / item->width * 100.0f;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
503 potihandled:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
504 if ( item->value > 100.0f ) item->value=100.0f;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
505 if ( item->value < 0.0f ) item->value=0.0f;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
506 mplEventHandling( item->msg,item->value );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
507 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
508 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
509 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
510 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
511 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
512
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
513 int keyPressed = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
514
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
515 void mplMainKeyHandle( int KeyCode,int Type,int Key )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
516 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
517 int msg = evNone;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
518
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
519 if ( Type != wsKeyPressed ) return;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
520
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
521 if ( !Key )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
522 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
523 switch ( KeyCode )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
524 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
525 case wsXFMMPrev: msg=evPrev; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
526 case wsXFMMStop: msg=evStop; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
527 case wsXFMMPlay: msg=evPlaySwitchToPause; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
528 case wsXFMMNext: msg=evNext; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
529 case wsXFMMVolUp: msg=evIncVolume; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
530 case wsXFMMVolDown: msg=evDecVolume; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
531 case wsXFMMMute: msg=evMute; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
532 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
533 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
534 else
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
535 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
536 switch ( Key )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
537 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
538 case wsEnter: msg=evPlay; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
539 case wsXF86LowerVolume: msg=evDecVolume; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
540 case wsXF86RaiseVolume: msg=evIncVolume; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
541 case wsXF86Mute: msg=evMute; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
542 case wsXF86Play: msg=evPlaySwitchToPause; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
543 case wsXF86Stop: msg=evStop; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
544 case wsXF86Prev: msg=evPrev; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
545 case wsXF86Next: msg=evNext; break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
546 case wsXF86Media: msg=evLoad; break;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
547 case wsEscape:
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
548 if ( appMPlayer.subWindow.isFullScreen )
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
549 {
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
550 if ( guiIntfStruct.event_struct ) ((XEvent *)guiIntfStruct.event_struct)->type=None;
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
551 mplEventHandling( evNormalSize,0 );
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
552 return;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
553 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
554 default: vo_x11_putkey( Key ); return;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
555 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
556 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
557 if ( msg != evNone ) mplEventHandling( msg,0 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
558 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
559
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
560 /* this will be used to handle Drag&Drop files */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
561 void mplDandDHandler(int num,char** files)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
562 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
563 struct stat buf;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
564 int f = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
565
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
566 char* subtitles = NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
567 char* filename = NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
568
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
569 if (num <= 0)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
570 return;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
571
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
572
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
573 /* now fill it with new items */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
574 for(f=0; f < num; f++){
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
575 char* str = strdup( files[f] );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
576 plItem* item;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
577
24086
f5b32d12b691 remove gconvert_uri_to_filename() and use url_unescape_string() instead.
iive
parents: 23457
diff changeset
578 url_unescape_string(str, files[f]);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
579
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
580 if(stat(str,&buf) == 0 && S_ISDIR(buf.st_mode) == 0) {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
581 /* this is not a directory so try to play it */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
582 mp_msg( MSGT_GPLAYER,MSGL_V,"Received D&D %s\n",str );
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
583
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
584 /* check if it is a subtitle file */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
585 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
586 char* ext = strrchr(str,'.');
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
587 if (ext) {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
588 static char supported[] = "utf/sub/srt/smi/rt//txt/ssa/aqt/";
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
589 char* type;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
590 int len;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
591 if((len=strlen(++ext)) && (type=strstr(supported,ext)) &&\
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
592 (type-supported)%4 == 0 && *(type+len) == '/'){
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
593 /* handle subtitle file */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
594 gfree((void**)&subtitles);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
595 subtitles = str;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
596 continue;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
597 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
598 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
599 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
600
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
601 /* clear playlist */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
602 if (filename == NULL) {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
603 filename = files[f];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
604 gtkSet(gtkDelPl,0,NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
605 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
606
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
607 item = calloc(1,sizeof(plItem));
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
608
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
609 /* FIXME: decompose file name ? */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
610 /* yes -- Pontscho */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
611 if ( strrchr( str,'/' ) ) {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
612 char * s = strrchr( str,'/' ); *s=0; s++;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
613 item->name = gstrdup( s );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
614 item->path = gstrdup( str );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
615 } else {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
616 item->name = strdup(str);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
617 item->path = strdup("");
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
618 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
619 gtkSet(gtkAddPlItem,0,(void*)item);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
620 } else {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
621 mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_NotAFile,str );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
622 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
623 free( str );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
624 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
625
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
626 if (filename) {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
627 mplSetFileName( NULL,filename,STREAMTYPE_FILE );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
628 if ( guiIntfStruct.Playing == 1 ) mplEventHandling( evStop,0 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
629 mplEventHandling( evPlay,0 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
630 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
631 if (subtitles) {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
632 gfree((void**)&guiIntfStruct.Subtitlename);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
633 guiIntfStruct.Subtitlename = subtitles;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
634 guiLoadSubtitle(guiIntfStruct.Subtitlename);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
635 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
636 }