Mercurial > mplayer.hg
comparison Gui/mplayer/play.c @ 1800:f5ffb03ebdb5
move skin changing here.
author | pontscho |
---|---|
date | Fri, 31 Aug 2001 12:59:04 +0000 |
parents | d1aabeb7274f |
children | 82e77faa7341 |
comparison
equal
deleted
inserted
replaced
1799:b26a936b24e4 | 1800:f5ffb03ebdb5 |
---|---|
20 | 20 |
21 #include "widgets.h" | 21 #include "widgets.h" |
22 #include "./mplayer.h" | 22 #include "./mplayer.h" |
23 #include "psignal.h" | 23 #include "psignal.h" |
24 #include "play.h" | 24 #include "play.h" |
25 | |
26 #include "../skin/skin.h" | |
27 #include "../config.h" | |
28 #include "../error.h" | |
29 #include "../language.h" | |
25 | 30 |
26 mplCommStruct * mplShMem; | 31 mplCommStruct * mplShMem; |
27 char * Filename = NULL; | 32 char * Filename = NULL; |
28 | 33 |
29 extern float rel_seek_secs; | 34 extern float rel_seek_secs; |
132 //printf("%%%%%% AbsSEEK=%5.3f \n",s); | 137 //printf("%%%%%% AbsSEEK=%5.3f \n",s); |
133 rel_seek_secs=0.01*s; abs_seek_pos=3; | 138 rel_seek_secs=0.01*s; abs_seek_pos=3; |
134 // --- | 139 // --- |
135 } | 140 } |
136 | 141 |
142 listItems tmpList; | |
143 | |
144 void ChangeSkin( void ) | |
145 { | |
146 if ( strcmp( cfgSkin,gtkShMem->sb.name ) ) | |
147 { | |
148 int ret; | |
149 #ifdef DEBUG | |
150 dbprintf( 1,"[psignal] skin: %s\n",gtkShMem->sb.name ); | |
151 #endif | |
152 | |
153 mainVisible=0; | |
154 | |
155 appInitStruct( &tmpList ); | |
156 skinAppMPlayer=&tmpList; | |
157 ret=skinRead( gtkShMem->sb.name ); | |
158 | |
159 appInitStruct( &tmpList ); | |
160 skinAppMPlayer=&appMPlayer; | |
161 appInitStruct( &appMPlayer ); | |
162 if ( !ret ) strcpy( cfgSkin,gtkShMem->sb.name ); | |
163 skinRead( cfgSkin ); | |
164 | |
165 if ( ret ) | |
166 { | |
167 mainVisible=1; | |
168 return; | |
169 } | |
170 | |
171 // appCopy( &appMPlayer,&tmpList ); | |
172 // appInitStruct( &tmpList ); | |
173 // skinAppMPlayer=&appMPlayer; | |
174 // strcpy( cfgSkin,gtkShMem->sb.name ); | |
175 | |
176 if ( mplDrawBuffer ) free( mplDrawBuffer ); | |
177 if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL ) | |
178 { message( False,langNEMDB ); return; } | |
179 wsResizeWindow( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height ); | |
180 wsMoveWindow( &appMPlayer.mainWindow,appMPlayer.main.x,appMPlayer.main.y ); | |
181 wsResizeImage( &appMPlayer.mainWindow ); | |
182 wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image ); | |
183 mainVisible=1; mplMainRender=1; wsPostRedisplay( &appMPlayer.mainWindow ); | |
184 btnModify( evSetVolume,mplShMem->Volume ); | |
185 btnModify( evSetBalance,mplShMem->Balance ); | |
186 btnModify( evSetMoviePosition,mplShMem->Position ); | |
187 | |
188 if ( appMPlayer.menuBase.Bitmap.Image ) | |
189 { | |
190 if ( mplMenuDrawBuffer ) free( mplMenuDrawBuffer ); | |
191 if ( ( mplMenuDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL ) | |
192 { message( False,langNEMDB ); return; } | |
193 wsResizeWindow( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height ); | |
194 wsResizeImage( &appMPlayer.menuWindow ); | |
195 } | |
196 | |
197 mplSkinChanged=1; | |
198 if ( !mplShMem->Playing ) | |
199 { | |
200 mplSkinChanged=0; | |
201 if ( appMPlayer.subWindow.isFullScreen ) wsFullScreen( &appMPlayer.subWindow ); | |
202 wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height ); | |
203 wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y ); | |
204 if ( appMPlayer.sub.Bitmap.Image ) wsResizeImage( &appMPlayer.subWindow ); | |
205 mplSubRender=1; wsPostRedisplay( &appMPlayer.subWindow ); | |
206 } | |
207 } | |
208 } |