comparison gui/skin/skin.c @ 29263:0f1b5b68af32

whitespace cosmetics: Remove all trailing whitespace.
author diego
date Wed, 13 May 2009 02:58:57 +0000
parents d58d06eafe83
children 5fbb30fa62cc
comparison
equal deleted inserted replaced
29262:7d545a6b8aff 29263:0f1b5b68af32
163 if ( !strcmp( window_name,"main" ) ) 163 if ( !strcmp( window_name,"main" ) )
164 { 164 {
165 defList->main.x=x; 165 defList->main.x=x;
166 defList->main.y=y; 166 defList->main.y=y;
167 defList->main.type=itBase; 167 defList->main.type=itBase;
168 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); 168 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp ));
169 if ( skinBPRead( tmp,&defList->main.Bitmap ) ) return 1; 169 if ( skinBPRead( tmp,&defList->main.Bitmap ) ) return 1;
170 defList->main.width=defList->main.Bitmap.Width; 170 defList->main.width=defList->main.Bitmap.Width;
171 defList->main.height=defList->main.Bitmap.Height; 171 defList->main.height=defList->main.Bitmap.Height;
172 #ifdef CONFIG_XSHAPE 172 #ifdef CONFIG_XSHAPE
173 Convert32to1( &defList->main.Bitmap,&defList->main.Mask,0x00ff00ff ); 173 Convert32to1( &defList->main.Bitmap,&defList->main.Mask,0x00ff00ff );
178 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] width: %d height: %d\n",defList->main.width,defList->main.height ); 178 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] width: %d height: %d\n",defList->main.width,defList->main.height );
179 } 179 }
180 if ( !strcmp( window_name,"sub" ) ) 180 if ( !strcmp( window_name,"sub" ) )
181 { 181 {
182 defList->sub.type=itBase; 182 defList->sub.type=itBase;
183 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); 183 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp ));
184 if ( skinBPRead( tmp,&defList->sub.Bitmap ) ) return 1; 184 if ( skinBPRead( tmp,&defList->sub.Bitmap ) ) return 1;
185 defList->sub.x=x; 185 defList->sub.x=x;
186 defList->sub.y=y; 186 defList->sub.y=y;
187 defList->sub.width=defList->sub.Bitmap.Width; 187 defList->sub.width=defList->sub.Bitmap.Width;
188 defList->sub.height=defList->sub.Bitmap.Height; 188 defList->sub.height=defList->sub.Bitmap.Height;
195 } 195 }
196 if ( !strcmp( window_name,"menu" ) ) 196 if ( !strcmp( window_name,"menu" ) )
197 { 197 {
198 defList->menuIsPresent=1; 198 defList->menuIsPresent=1;
199 defList->menuBase.type=itBase; 199 defList->menuBase.type=itBase;
200 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); 200 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp ));
201 if ( skinBPRead( tmp,&defList->menuBase.Bitmap ) ) return 1; 201 if ( skinBPRead( tmp,&defList->menuBase.Bitmap ) ) return 1;
202 defList->menuBase.width=defList->menuBase.Bitmap.Width; 202 defList->menuBase.width=defList->menuBase.Bitmap.Width;
203 defList->menuBase.height=defList->menuBase.Bitmap.Height; 203 defList->menuBase.height=defList->menuBase.Bitmap.Height;
204 #ifdef CONFIG_XSHAPE 204 #ifdef CONFIG_XSHAPE
205 Convert32to1( &defList->menuBase.Bitmap,&defList->menuBase.Mask,0x00ff00ff ); 205 Convert32to1( &defList->menuBase.Bitmap,&defList->menuBase.Mask,0x00ff00ff );
213 { 213 {
214 defList->barIsPresent=1; 214 defList->barIsPresent=1;
215 defList->bar.x=x; 215 defList->bar.x=x;
216 defList->bar.y=y; 216 defList->bar.y=y;
217 defList->bar.type=itBase; 217 defList->bar.type=itBase;
218 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); 218 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp ));
219 if ( skinBPRead( tmp,&defList->bar.Bitmap ) ) return 1; 219 if ( skinBPRead( tmp,&defList->bar.Bitmap ) ) return 1;
220 defList->bar.width=defList->bar.Bitmap.Width; 220 defList->bar.width=defList->bar.Bitmap.Width;
221 defList->bar.height=defList->bar.Bitmap.Height; 221 defList->bar.height=defList->bar.Bitmap.Height;
222 #ifdef CONFIG_XSHAPE 222 #ifdef CONFIG_XSHAPE
223 Convert32to1( &defList->bar.Bitmap,&defList->bar.Mask,0x00ff00ff ); 223 Convert32to1( &defList->bar.Bitmap,&defList->bar.Mask,0x00ff00ff );
235 CHECKDEFLIST( "background" ); 235 CHECKDEFLIST( "background" );
236 CHECKWINLIST( "background" ); 236 CHECKWINLIST( "background" );
237 237
238 CHECK( "menu" ); 238 CHECK( "menu" );
239 CHECK( "main" ); 239 CHECK( "main" );
240 240
241 currSection->R=cutItemToInt( in,',',0 ); 241 currSection->R=cutItemToInt( in,',',0 );
242 currSection->G=cutItemToInt( in,',',1 ); 242 currSection->G=cutItemToInt( in,',',1 );
243 currSection->B=cutItemToInt( in,',',2 ); 243 currSection->B=cutItemToInt( in,',',2 );
244 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] background color is #%x%x%x.\n",currSection->R,currSection->G,currSection->B ); 244 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] background color is #%x%x%x.\n",currSection->R,currSection->G,currSection->B );
245 245
246 return 0; 246 return 0;
247 } 247 }
248 248
249 int cmd_button( char * in ) 249 int cmd_button( char * in )
250 { 250 {
255 255
256 CHECKDEFLIST( "button" ); 256 CHECKDEFLIST( "button" );
257 CHECKWINLIST( "button" ); 257 CHECKWINLIST( "button" );
258 258
259 CHECK( "sub" ); 259 CHECK( "sub" );
260 CHECK( "menu" ); 260 CHECK( "menu" );
261 261
262 cutItem( in,fname,',',0 ); 262 cutItem( in,fname,',',0 );
263 x=cutItemToInt( in,',',1 ); 263 x=cutItemToInt( in,',',1 );
264 y=cutItemToInt( in,',',2 ); 264 y=cutItemToInt( in,',',2 );
265 sx=cutItemToInt( in,',',3 ); 265 sx=cutItemToInt( in,',',3 );
284 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] message: %d\n",currSubItems[ *currSubItem ].msg ); 284 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] message: %d\n",currSubItems[ *currSubItem ].msg );
285 285
286 currSubItems[ *currSubItem ].Bitmap.Image=NULL; 286 currSubItems[ *currSubItem ].Bitmap.Image=NULL;
287 if ( strcmp( fname,"NULL" ) ) 287 if ( strcmp( fname,"NULL" ) )
288 { 288 {
289 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); 289 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp ));
290 if ( skinBPRead( tmp,&currSubItems[ *currSubItem ].Bitmap ) ) return 1; 290 if ( skinBPRead( tmp,&currSubItems[ *currSubItem ].Bitmap ) ) return 1;
291 } 291 }
292 292
293 return 0; 293 return 0;
294 } 294 }
305 CHECK( "sub" ); 305 CHECK( "sub" );
306 CHECK( "playbar" ); 306 CHECK( "playbar" );
307 307
308 cutItem( in,fname,',',0 ); 308 cutItem( in,fname,',',0 );
309 defList->menuSelected.type=itBase; 309 defList->menuSelected.type=itBase;
310 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); 310 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp ));
311 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] selected: %s\n",fname ); 311 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] selected: %s\n",fname );
312 if ( skinBPRead( tmp,&defList->menuSelected.Bitmap ) ) return 1; 312 if ( skinBPRead( tmp,&defList->menuSelected.Bitmap ) ) return 1;
313 defList->menuSelected.width=defList->menuSelected.Bitmap.Width; 313 defList->menuSelected.width=defList->menuSelected.Bitmap.Width;
314 defList->menuSelected.height=defList->menuSelected.Bitmap.Height; 314 defList->menuSelected.height=defList->menuSelected.Bitmap.Height;
315 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] width: %d height: %d\n",defList->menuSelected.width,defList->menuSelected.height ); 315 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] width: %d height: %d\n",defList->menuSelected.width,defList->menuSelected.height );
325 CHECKWINLIST( "menu" ); 325 CHECKWINLIST( "menu" );
326 326
327 CHECK( "main" ); 327 CHECK( "main" );
328 CHECK( "sub" ); 328 CHECK( "sub" );
329 CHECK( "playbar" ); 329 CHECK( "playbar" );
330 330
331 x=cutItemToInt( in,',',0 ); 331 x=cutItemToInt( in,',',0 );
332 y=cutItemToInt( in,',',1 ); 332 y=cutItemToInt( in,',',1 );
333 sx=cutItemToInt( in,',',2 ); 333 sx=cutItemToInt( in,',',2 );
334 sy=cutItemToInt( in,',',3 ); 334 sy=cutItemToInt( in,',',3 );
335 cutItem( in,tmp,',',4 ); msg=appFindMessage( tmp ); 335 cutItem( in,tmp,',',4 ); msg=appFindMessage( tmp );
397 item->pressed=btnReleased; 397 item->pressed=btnReleased;
398 398
399 item->Bitmap.Image=NULL; 399 item->Bitmap.Image=NULL;
400 if ( strcmp( phfname,"NULL" ) ) 400 if ( strcmp( phfname,"NULL" ) )
401 { 401 {
402 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, phfname, sizeof( tmp )); 402 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, phfname, sizeof( tmp ));
403 if ( skinBPRead( tmp,&item->Bitmap ) ) return 1; 403 if ( skinBPRead( tmp,&item->Bitmap ) ) return 1;
404 } 404 }
405 405
406 item->Mask.Image=NULL; 406 item->Mask.Image=NULL;
407 if ( strcmp( pfname,"NULL" ) ) 407 if ( strcmp( pfname,"NULL" ) )
408 { 408 {
409 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, pfname, sizeof( tmp )); 409 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, pfname, sizeof( tmp ));
410 if ( skinBPRead( tmp,&item->Mask ) ) return 1; 410 if ( skinBPRead( tmp,&item->Mask ) ) return 1;
411 } 411 }
412 return 0; 412 return 0;
413 } 413 }
414 414
461 item->value=(float)d; 461 item->value=(float)d;
462 462
463 item->Bitmap.Image=NULL; 463 item->Bitmap.Image=NULL;
464 if ( strcmp( phfname,"NULL" ) ) 464 if ( strcmp( phfname,"NULL" ) )
465 { 465 {
466 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, phfname, sizeof( tmp )); 466 av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, phfname, sizeof( tmp ));
467 if ( skinBPRead( tmp,&item->Bitmap ) ) return 1; 467 if ( skinBPRead( tmp,&item->Bitmap ) ) return 1;
468 } 468 }
469 return 0; 469 return 0;
470 } 470 }
471 471