Mercurial > mplayer.hg
comparison Gui/skin/skin.c @ 6625:54cfbaaf161b
remove unneded config files
author | pontscho |
---|---|
date | Wed, 03 Jul 2002 08:55:26 +0000 |
parents | 297d43688572 |
children | 72700fefd3dc |
comparison
equal
deleted
inserted
replaced
6624:122efdee5b52 | 6625:54cfbaaf161b |
---|---|
72 case -8: ERRORMESSAGE( MSGTR_SKIN_BITMAP_ConvertError,fname ); break; | 72 case -8: ERRORMESSAGE( MSGTR_SKIN_BITMAP_ConvertError,fname ); break; |
73 } | 73 } |
74 return i; | 74 return i; |
75 } | 75 } |
76 | 76 |
77 int __section( char * in ) | 77 int cmd_section( char * in ) |
78 { | 78 { |
79 strlower( in ); | 79 strlower( in ); |
80 defList=NULL; | 80 defList=NULL; |
81 if ( !strcmp( in,"movieplayer" ) ) defList=skinAppMPlayer; | 81 if ( !strcmp( in,"movieplayer" ) ) defList=skinAppMPlayer; |
82 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] sectionname: %s\n",in ); | 82 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] sectionname: %s\n",in ); |
83 return 0; | 83 return 0; |
84 } | 84 } |
85 | 85 |
86 int __end( char * in ) | 86 int cmd_end( char * in ) |
87 { | 87 { |
88 if ( strlen( winList ) ) winList[0]=0; | 88 if ( strlen( winList ) ) winList[0]=0; |
89 else defList=NULL; | 89 else defList=NULL; |
90 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] end section\n" ); | 90 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] end section\n" ); |
91 return 0; | 91 return 0; |
92 } | 92 } |
93 | 93 |
94 int __window( char * in ) | 94 int cmd_window( char * in ) |
95 { | 95 { |
96 CHECKDEFLIST( "window" ); | 96 CHECKDEFLIST( "window" ); |
97 | 97 |
98 strlower( in ); | 98 strlower( in ); |
99 strcpy( winList,in ); | 99 strcpy( winList,in ); |
100 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] window: %s\n",winList ); | 100 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] window: %s\n",winList ); |
101 return 0; | 101 return 0; |
102 } | 102 } |
103 | 103 |
104 int __base( char * in ) | 104 int cmd_base( char * in ) |
105 { | 105 { |
106 unsigned char fname[512]; | 106 unsigned char fname[512]; |
107 unsigned char tmp[512]; | 107 unsigned char tmp[512]; |
108 int x,y; | 108 int x,y; |
109 int sx=0,sy=0; | 109 int sx=0,sy=0; |
186 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] width: %d height: %d\n",defList->menuBase.width,defList->menuBase.height ); | 186 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] width: %d height: %d\n",defList->menuBase.width,defList->menuBase.height ); |
187 } | 187 } |
188 return 0; | 188 return 0; |
189 } | 189 } |
190 | 190 |
191 int __background( char * in ) | 191 int cmd_background( char * in ) |
192 { | 192 { |
193 CHECKDEFLIST( "background" ); | 193 CHECKDEFLIST( "background" ); |
194 CHECKWINLIST( "background" ); | 194 CHECKWINLIST( "background" ); |
195 | 195 |
196 if ( !strcmp( winList,"sub" ) ) | 196 if ( !strcmp( winList,"sub" ) ) |
201 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] subwindow background color is #%x%x%x.\n",defList->subR,defList->subG,defList->subB ); | 201 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] subwindow background color is #%x%x%x.\n",defList->subR,defList->subG,defList->subB ); |
202 } | 202 } |
203 return 0; | 203 return 0; |
204 } | 204 } |
205 | 205 |
206 int __button( char * in ) | 206 int cmd_button( char * in ) |
207 { | 207 { |
208 unsigned char fname[512]; | 208 unsigned char fname[512]; |
209 unsigned char tmp[512]; | 209 unsigned char tmp[512]; |
210 int x,y,sx,sy; | 210 int x,y,sx,sy; |
211 char msg[32]; | 211 char msg[32]; |
244 if ( skinBPRead( tmp,&defList->Items[ defList->NumberOfItems ].Bitmap ) ) return 1; | 244 if ( skinBPRead( tmp,&defList->Items[ defList->NumberOfItems ].Bitmap ) ) return 1; |
245 } | 245 } |
246 return 0; | 246 return 0; |
247 } | 247 } |
248 | 248 |
249 int __selected( char * in ) | 249 int cmd_selected( char * in ) |
250 { | 250 { |
251 unsigned char fname[512]; | 251 unsigned char fname[512]; |
252 unsigned char tmp[512]; | 252 unsigned char tmp[512]; |
253 | 253 |
254 CHECKDEFLIST( "selected" ); | 254 CHECKDEFLIST( "selected" ); |
263 defList->menuSelected.height=defList->menuSelected.Bitmap.Height; | 263 defList->menuSelected.height=defList->menuSelected.Bitmap.Height; |
264 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] width: %d height: %d\n",defList->menuSelected.width,defList->menuSelected.height ); | 264 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] width: %d height: %d\n",defList->menuSelected.width,defList->menuSelected.height ); |
265 return 0; | 265 return 0; |
266 } | 266 } |
267 | 267 |
268 int __menu( char * in ) | 268 int cmd_menu( char * in ) |
269 { // menu = number,x,y,sx,sy,msg | 269 { // menu = number,x,y,sx,sy,msg |
270 int x,y,sx,sy,msg; | 270 int x,y,sx,sy,msg; |
271 unsigned char tmp[64]; | 271 unsigned char tmp[64]; |
272 | 272 |
273 CHECKDEFLIST( "menu" ); | 273 CHECKDEFLIST( "menu" ); |
295 | 295 |
296 defList->MenuItems[ defList->NumberOfMenuItems ].Bitmap.Image=NULL; | 296 defList->MenuItems[ defList->NumberOfMenuItems ].Bitmap.Image=NULL; |
297 return 0; | 297 return 0; |
298 } | 298 } |
299 | 299 |
300 int __hpotmeter( char * in ) | 300 int cmd_hpotmeter( char * in ) |
301 { // hpotmeter=buttonbitmaps,sx,sy,phasebitmaps,phases,default value,x,y,sx,sy,msg | 301 { // hpotmeter=buttonbitmaps,sx,sy,phasebitmaps,phases,default value,x,y,sx,sy,msg |
302 int x,y,psx,psy,ph,sx,sy,msg,d; | 302 int x,y,psx,psy,ph,sx,sy,msg,d; |
303 unsigned char tmp[512]; | 303 unsigned char tmp[512]; |
304 unsigned char pfname[512]; | 304 unsigned char pfname[512]; |
305 unsigned char phfname[512]; | 305 unsigned char phfname[512]; |
352 } | 352 } |
353 | 353 |
354 return 0; | 354 return 0; |
355 } | 355 } |
356 | 356 |
357 int __potmeter( char * in ) | 357 int cmd_potmeter( char * in ) |
358 { // potmeter=phasebitmaps,phases,default value,x,y,sx,sy,msg | 358 { // potmeter=phasebitmaps,phases,default value,x,y,sx,sy,msg |
359 int x,y,ph,sx,sy,msg,d; | 359 int x,y,ph,sx,sy,msg,d; |
360 unsigned char tmp[512]; | 360 unsigned char tmp[512]; |
361 unsigned char phfname[512]; | 361 unsigned char phfname[512]; |
362 wItem * item; | 362 wItem * item; |
395 if ( skinBPRead( tmp,&item->Bitmap ) ) return 1; | 395 if ( skinBPRead( tmp,&item->Bitmap ) ) return 1; |
396 } | 396 } |
397 return 0; | 397 return 0; |
398 } | 398 } |
399 | 399 |
400 int __font( char * in ) | 400 int cmd_font( char * in ) |
401 { // font=fontname,fontid | 401 { // font=fontname,fontid |
402 char name[512]; | 402 char name[512]; |
403 char id[512]; | 403 char id[512]; |
404 wItem * item; | 404 wItem * item; |
405 | 405 |
424 case -4: ERRORMESSAGE( MSGTR_SKIN_FONT_FontImageNotFound ); return 1; | 424 case -4: ERRORMESSAGE( MSGTR_SKIN_FONT_FontImageNotFound ); return 1; |
425 } | 425 } |
426 return 0; | 426 return 0; |
427 } | 427 } |
428 | 428 |
429 int __slabel( char * in ) | 429 int cmd_slabel( char * in ) |
430 { | 430 { |
431 char tmp[512]; | 431 char tmp[512]; |
432 char sid[63]; | 432 char sid[63]; |
433 int x,y,id; | 433 int x,y,id; |
434 wItem * item; | 434 wItem * item; |
458 strcpy( item->label,tmp ); | 458 strcpy( item->label,tmp ); |
459 | 459 |
460 return 0; | 460 return 0; |
461 } | 461 } |
462 | 462 |
463 int __dlabel( char * in ) | 463 int cmd_dlabel( char * in ) |
464 { // dlabel=x,y,sx,align,fontid,string ... | 464 { // dlabel=x,y,sx,align,fontid,string ... |
465 char tmp[512]; | 465 char tmp[512]; |
466 char sid[63]; | 466 char sid[63]; |
467 int x,y,sx,id,a; | 467 int x,y,sx,id,a; |
468 wItem * item; | 468 wItem * item; |
494 strcpy( item->label,tmp ); | 494 strcpy( item->label,tmp ); |
495 | 495 |
496 return 0; | 496 return 0; |
497 } | 497 } |
498 | 498 |
499 int __decoration( char * in ) | 499 int cmd_decoration( char * in ) |
500 { | 500 { |
501 char tmp[512]; | 501 char tmp[512]; |
502 | 502 |
503 CHECKDEFLIST( "decoration" ); | 503 CHECKDEFLIST( "decoration" ); |
504 CHECKWINLIST( "decoration" ); | 504 CHECKWINLIST( "decoration" ); |
519 int (*func)( char * in ); | 519 int (*func)( char * in ); |
520 } _item; | 520 } _item; |
521 | 521 |
522 _item skinItem[] = | 522 _item skinItem[] = |
523 { | 523 { |
524 { "section", __section }, | 524 { "section", cmd_section }, |
525 { "end", __end }, | 525 { "end", cmd_end }, |
526 { "window", __window }, | 526 { "window", cmd_window }, |
527 { "base", __base }, | 527 { "base", cmd_base }, |
528 { "button", __button }, | 528 { "button", cmd_button }, |
529 { "selected", __selected }, | 529 { "selected", cmd_selected }, |
530 { "background", __background }, | 530 { "background", cmd_background }, |
531 { "hpotmeter", __hpotmeter }, | 531 { "hpotmeter", cmd_hpotmeter }, |
532 { "potmeter", __potmeter }, | 532 { "potmeter", cmd_potmeter }, |
533 { "font", __font }, | 533 { "font", cmd_font }, |
534 { "slabel", __slabel }, | 534 { "slabel", cmd_slabel }, |
535 { "dlabel", __dlabel }, | 535 { "dlabel", cmd_dlabel }, |
536 { "decoration", __decoration }, | 536 { "decoration", cmd_decoration }, |
537 { "menu", __menu } | 537 { "menu", cmd_menu } |
538 }; | 538 }; |
539 | 539 |
540 #define ITEMS (int)( sizeof( skinItem )/sizeof( _item ) ) | 540 #define ITEMS (int)( sizeof( skinItem )/sizeof( _item ) ) |
541 | 541 |
542 char * strdelspacesbeforecommand( char * in ) | 542 char * strdelspacesbeforecommand( char * in ) |