diff options
Diffstat (limited to 'gui')
119 files changed, 27739 insertions, 0 deletions
diff --git a/gui/Makefile b/gui/Makefile new file mode 100644 index 0000000000..8435035c58 --- /dev/null +++ b/gui/Makefile @@ -0,0 +1,53 @@ +include ../config.mak + +LIBNAME_MPLAYER = libgui.a + +#CFLAGS += -DDEBUG + +ifeq ($(TARGET_WIN32),yes) +SRCS_MPLAYER = win32/dialogs.c \ + win32/gui.c \ + win32/interface.c \ + win32/playlist.c \ + win32/preferences.c \ + win32/skinload.c \ + win32/widgetrender.c \ + win32/wincfg.c \ + +else +SRCS_MPLAYER = wm/ws.c \ + wm/wsxdnd.c \ + app.c \ + interface.c \ + cfg.c \ + bitmap.c \ + skin/skin.c \ + skin/font.c \ + skin/cut.c \ + mplayer/widgets.c \ + mplayer/play.c \ + mplayer/mw.c \ + mplayer/sw.c \ + mplayer/menu.c \ + mplayer/pb.c \ + mplayer/common.c \ + mplayer/gtk/menu.c \ + mplayer/gtk/mb.c \ + mplayer/gtk/about.c \ + mplayer/gtk/pl.c \ + mplayer/gtk/sb.c \ + mplayer/gtk/fs.c \ + mplayer/gtk/opts.c \ + mplayer/gtk/url.c \ + mplayer/gtk/eq.c \ + mplayer/gtk/common.c \ + +endif + +include ../mpcommon.mak + +clean:: + rm -f mplayer/*.o mplayer/*~ mplayer/gtk/*.o mplayer/gtk/*~ \ + skin/*.o skin/*~ \ + wm/*.o wm/*~ \ + win32/*.o win32/*~ \ diff --git a/gui/app.c b/gui/app.c new file mode 100644 index 0000000000..d375296dc4 --- /dev/null +++ b/gui/app.c @@ -0,0 +1,225 @@ + + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + +#include "config.h" +#include "mp_msg.h" +#include "help_mp.h" + +#include "app.h" +#include "wm/wskeys.h" +#include "skin/skin.h" +#include "mplayer/gmplayer.h" +#include "interface.h" + +evName evNames[] = + { + { evNone, "evNone" }, + { evPlay, "evPlay" }, + { evStop, "evStop" }, + { evPause, "evPause" }, + { evPrev, "evPrev" }, + { evNext, "evNext" }, + { evLoad, "evLoad" }, + { evEqualizer, "evEqualizer" }, + { evEqualizer, "evEqualeaser" }, + { evPlayList, "evPlaylist" }, + { evExit, "evExit" }, + { evIconify, "evIconify" }, + { evIncBalance, "evIncBalance" }, + { evDecBalance, "evDecBalance" }, + { evFullScreen, "evFullScreen" }, + { evFName, "evFName" }, + { evMovieTime, "evMovieTime" }, + { evAbout, "evAbout" }, + { evLoadPlay, "evLoadPlay" }, + { evPreferences, "evPreferences" }, + { evSkinBrowser, "evSkinBrowser" }, + { evBackward10sec, "evBackward10sec" }, + { evForward10sec, "evForward10sec" }, + { evBackward1min, "evBackward1min" }, + { evForward1min, "evForward1min" }, + { evBackward10min, "evBackward10min" }, + { evForward10min, "evForward10min" }, + { evIncVolume, "evIncVolume" }, + { evDecVolume, "evDecVolume" }, + { evMute, "evMute" }, + { evIncAudioBufDelay, "evIncAudioBufDelay" }, + { evDecAudioBufDelay, "evDecAudioBufDelay" }, + { evPlaySwitchToPause, "evPlaySwitchToPause" }, + { evPauseSwitchToPlay, "evPauseSwitchToPlay" }, + { evNormalSize, "evHalfSize" }, + { evNormalSize, "evNormalSize" }, + { evDoubleSize, "evDoubleSize" }, + { evSetMoviePosition, "evSetMoviePosition" }, + { evSetVolume, "evSetVolume" }, + { evSetBalance, "evSetBalance" }, + { evHelp, "evHelp" }, + { evLoadSubtitle, "evLoadSubtitle" }, + { evPlayDVD, "evPlayDVD" }, + { evPlayVCD, "evPlayVCD" }, + { evSetURL, "evSetURL" }, + { evLoadAudioFile, "evLoadAudioFile" }, + { evDropSubtitle, "evDropSubtitle" }, + { evSetAspect, "evSetAspect" } + }; + +int evBoxs = sizeof( evNames ) / sizeof( evName ); + +// --- + +extern char *get_path(const char *); + +listItems appMPlayer; + +/* FIXME: Eventually remove the obsolete directory names. */ +char * skinDirInHome=NULL; +char * skinDirInHome_obsolete=NULL; +char * skinMPlayerDir=NULL; +char * skinMPlayerDir_obsolete=NULL; +char * skinName = NULL; + +void appClearItem( wItem * item ) +{ + item->type=0; +// --- + item->x=0; item->y=0; item->width=0; item->height=0; +// --- + item->px=0; item->py=0; item->psx=0; item->psy=0; +// --- + item->msg=0; item->msg2=0; + item->pressed=btnReleased; + item->tmp=0; + item->key=0; item->key2=0; + item->Bitmap.Width=0; item->Bitmap.Height=0; item->Bitmap.BPP=0; item->Bitmap.ImageSize=0; + if ( item->Bitmap.Image ) free( item->Bitmap.Image ); + item->Bitmap.Image=NULL; +// --- + item->fontid=0; + if ( item->label ) free( item->label ); item->label=NULL; + item->event=0; +} + +void appCopy( listItems * dest,listItems * source ) +{ + dest->NumberOfItems=source->NumberOfItems; + memcpy( &dest->Items,&source->Items,128 * sizeof( wItem ) ); + + dest->NumberOfMenuItems=source->NumberOfMenuItems; + memcpy( &dest->MenuItems,&source->MenuItems,32 * sizeof( wItem ) ); + + memcpy( &dest->main,&source->main,sizeof( wItem ) ); + memcpy( &dest->sub,&source->sub,sizeof( wItem ) ); + memcpy( &dest->menuBase,&source->menuBase,sizeof( wItem ) ); + memcpy( &dest->menuSelected,&source->menuSelected,sizeof( wItem ) ); +} + +void appInitStruct( listItems * item ) +{ + int i; + for ( i=0;i<item->NumberOfItems;i++ ) + appClearItem( &item->Items[i] ); + for ( i=0;i<item->NumberOfMenuItems;i++ ) + appClearItem( &item->MenuItems[i] ); + for ( i=0;i<item->NumberOfBarItems;i++ ) + appClearItem( &item->barItems[i] ); + + item->NumberOfItems=-1; + memset( item->Items,0,256 * sizeof( wItem ) ); + item->NumberOfMenuItems=-1; + memset( item->MenuItems,0,64 * sizeof( wItem ) ); + item->NumberOfBarItems=-1; + memset( item->barItems,0,256 * sizeof( wItem ) ); + + appClearItem( &item->main ); + item->mainDecoration=0; + appClearItem( &item->sub ); + item->sub.width=0; item->sub.height=0; + item->sub.x=-1; item->sub.y=-1; + appClearItem( &item->menuBase ); + appClearItem( &item->menuSelected ); + item->sub.R=item->sub.G=item->sub.B=0; + item->bar.R=item->bar.G=item->bar.B=0; + item->main.R=item->main.G=item->main.B=0; + item->barIsPresent=0; + item->menuIsPresent=0; +} + +int appFindKey( unsigned char * name ) +{ + int i; + for ( i=0;i<wsKeyNumber;i++ ) + if ( !strcmp( wsKeyNames[i].name,name ) ) return wsKeyNames[i].code; + return -1; +} + +int appFindMessage( unsigned char * str ) +{ + int i; + for ( i=0;i<evBoxs;i++ ) + if ( !strcmp( evNames[i].name,str ) ) return evNames[i].msg; + return -1; +} + +void btnModify( int event,float state ) +{ + int j; + for ( j=0;j < appMPlayer.NumberOfItems + 1;j++ ) + if ( appMPlayer.Items[j].msg == event ) + { + switch ( appMPlayer.Items[j].type ) + { + case itButton: + appMPlayer.Items[j].pressed=(int)state; + appMPlayer.Items[j].tmp=(int)state; + break; + case itPotmeter: + case itVPotmeter: + case itHPotmeter: + if ( state < 0.0f ) state=0.0f; + if ( state > 100.f ) state=100.0f; + appMPlayer.Items[j].value=state; + break; + } + } + + for ( j=0;j < appMPlayer.NumberOfBarItems + 1;j++ ) + if ( appMPlayer.barItems[j].msg == event ) + { + switch ( appMPlayer.barItems[j].type ) + { + case itButton: + appMPlayer.barItems[j].pressed=(int)state; + appMPlayer.barItems[j].tmp=(int)state; + break; + case itPotmeter: + case itVPotmeter: + case itHPotmeter: + if ( state < 0.0f ) state=0.0f; + if ( state > 100.f ) state=100.0f; + appMPlayer.barItems[j].value=state; + break; + } + } +} + +float btnGetValue( int event ) +{ + int j; + for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ ) + if ( appMPlayer.Items[j].msg == event ) return appMPlayer.Items[j].value; + return 0; +} + +void btnSet( int event,int set ) +{ + int j; + for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ ) + if ( appMPlayer.Items[j].msg == event ) + { appMPlayer.Items[j].pressed=set; appMPlayer.barItems[j].tmp=0; } + for ( j=0;j<appMPlayer.NumberOfBarItems + 1;j++ ) + if ( appMPlayer.barItems[j].msg == event ) + { appMPlayer.barItems[j].pressed=set; appMPlayer.barItems[j].tmp=0; } +} diff --git a/gui/app.h b/gui/app.h new file mode 100644 index 0000000000..293ed7e30e --- /dev/null +++ b/gui/app.h @@ -0,0 +1,190 @@ + +#ifndef __APPS_H +#define __APPS_H + +#include "bitmap.h" +#include "wm/ws.h" +#include "wm/wskeys.h" + +// --- User events ------ + +#define evNone 0 +#define evPlay 1 +#define evStop 2 +#define evPause 3 +#define evPrev 6 +#define evNext 7 +#define evLoad 8 +#define evEqualizer 9 +#define evPlayList 10 +#define evIconify 11 +#define evAbout 12 +#define evLoadPlay 13 +#define evPreferences 14 +#define evSkinBrowser 15 +#define evPlaySwitchToPause 16 +#define evPauseSwitchToPlay 17 + +#define evBackward10sec 18 +#define evForward10sec 19 +#define evBackward1min 20 +#define evForward1min 21 +#define evBackward10min 22 +#define evForward10min 23 + +#define evHalfSize 301 +#define evNormalSize 24 +#define evDoubleSize 25 +#define evFullScreen 26 + +#define evSetMoviePosition 27 +#define evSetVolume 28 +#define evSetBalance 29 +#define evMute 30 + +#define evIncVolume 31 +#define evDecVolume 32 +#define evIncAudioBufDelay 33 +#define evDecAudioBufDelay 34 +#define evIncBalance 35 +#define evDecBalance 36 + +#define evHelp 37 + +#define evLoadSubtitle 38 +#define evDropSubtitle 43 +#define evPlayDVD 39 +#define evPlayVCD 40 +#define evPlayNetwork 41 +#define evLoadAudioFile 42 +#define evSetAspect 44 +#define evSetAudio 45 +#define evSetVideo 46 +#define evSetSubtitle 47 +// 48 ... + +#define evExit 1000 + +// --- General events --- + +#define evFileLoaded 5000 +#define evHideMouseCursor 5001 +#define evMessageBox 5002 +#define evGeneralTimer 5003 +#define evGtkIsOk 5004 +#define evShowPopUpMenu 5005 +#define evHidePopUpMenu 5006 +#define evSetDVDAudio 5007 +#define evSetDVDSubtitle 5008 +#define evSetDVDTitle 5009 +#define evSetDVDChapter 5010 +#define evSubtitleLoaded 5011 +#define evSetVCDTrack 5012 +#define evSetURL 5013 + +#define evFName 7000 +#define evMovieTime 7001 +#define evRedraw 7002 +#define evHideWindow 7003 +#define evShowWindow 7004 +#define evFirstLoad 7005 + +// ---------------------- + +typedef struct +{ + int msg; + const char * name; +} evName; + +extern int evBoxs; +extern evName evNames[]; + +#define itNULL 0 +#define itButton 101 // button +#define itHPotmeter 102 // horizontal potmeter +#define itVPotmeter 103 // vertical potmeter +#define itSLabel 104 // static label +#define itDLabel 105 // dynamic label +#define itBase 106 +#define itPotmeter 107 +#define itFont 108 +// --- +#define btnPressed 0 +#define btnReleased 1 +#define btnDisabled 2 +// --- +typedef struct +{ + int type; +// --- + int x,y; + int width,height; +// --- + int px,py,psx,psy; +// --- + int msg,msg2; + int pressed,tmp; + int key,key2; + int phases; + float value; + txSample Bitmap; + txSample Mask; +// --- + int fontid; + int align; + char * label; +// --- + int event; +// --- + int R,G,B; +} wItem; + +typedef struct +{ + wItem main; + wsTWindow mainWindow; + int mainDecoration; + + wItem sub; + wsTWindow subWindow; + + wItem bar; + wsTWindow barWindow; + int barIsPresent; + + wItem menuBase; + wItem menuSelected; + wsTWindow menuWindow; + int menuIsPresent; + +// --- + int NumberOfItems; + wItem Items[256]; +// --- + int NumberOfMenuItems; + wItem MenuItems[64]; +// --- + int NumberOfBarItems; + wItem barItems[256]; +} listItems; + +extern listItems appMPlayer; + +extern char * skinDirInHome; +extern char * skinDirInHome_obsolete; +extern char * skinMPlayerDir; +extern char * skinMPlayerDir_obsolete; +extern char * skinName; + +extern void appInitStruct( listItems * item ); +extern void appClearItem( wItem * item ); +extern void appCopy( listItems * item1,listItems * item2 ); +extern int appFindMessage( unsigned char * str ); +extern int appFindKey( unsigned char * name ); + +extern void btnModify( int event,float state ); +extern float btnGetValue( int event ); +extern void btnSet( int event,int set ); + +#endif diff --git a/gui/bitmap.c b/gui/bitmap.c new file mode 100644 index 0000000000..4367d99415 --- /dev/null +++ b/gui/bitmap.c @@ -0,0 +1,241 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include <png.h> + +#include "mp_msg.h" +#include "help_mp.h" +#include "bitmap.h" + +int pngRead( unsigned char * fname,txSample * bf ) +{ + unsigned char header[8]; + png_structp png; + png_infop info; + png_infop endinfo; + png_bytep * row_p; + png_bytep palette = NULL; + int color; + png_uint_32 i; + + FILE *fp=fopen( fname,"rb" ); + if ( !fp ) + { + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[png] file read error ( %s )\n",fname ); + return 1; + } + + fread( header,1,8,fp ); + if ( !png_check_sig( header,8 ) ) return 1; + + png=png_create_read_struct( PNG_LIBPNG_VER_STRING,NULL,NULL,NULL ); + info=png_create_info_struct( png ); + endinfo=png_create_info_struct( png ); + + png_init_io( png,fp ); + png_set_sig_bytes( png,8 ); + png_read_info( png,info ); + png_get_IHDR( png,info,&bf->Width,&bf->Height,&bf->BPP,&color,NULL,NULL,NULL ); + + row_p=malloc( sizeof( png_bytep ) * bf->Height ); + if ( !row_p ) + { + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[png] not enough memory for row buffer\n" ); + return 2; + } + bf->Image=(png_bytep)malloc( png_get_rowbytes( png,info ) * bf->Height ); + if ( !bf->Image ) + { + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[png] not enough memory for image buffer\n" ); + return 2; + } + for ( i=0; i < bf->Height; i++ ) row_p[i]=&bf->Image[png_get_rowbytes( png,info ) * i]; + + png_read_image( png,row_p ); + free( row_p ); + +#if 0 + if ( color == PNG_COLOR_TYPE_PALETTE ) + { + int cols; + png_get_PLTE( png,info,(png_colorp *)&palette,&cols ); + } +#endif + + if ( color&PNG_COLOR_MASK_ALPHA ) + { + if ( color&PNG_COLOR_MASK_PALETTE || color == PNG_COLOR_TYPE_GRAY_ALPHA ) bf->BPP*=2; + else bf->BPP*=4; + } + else + { + if ( color&PNG_COLOR_MASK_PALETTE || color == PNG_COLOR_TYPE_GRAY ) bf->BPP*=1; + else bf->BPP*=3; + } + + png_read_end( png,endinfo ); + png_destroy_read_struct( &png,&info,&endinfo ); + + if ( fclose( fp ) != 0 ) + { + free( bf->Image ); + free( palette ); + return 1; + } + bf->ImageSize=bf->Width * bf->Height * ( bf->BPP / 8 ); + + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[png] filename: %s.\n",fname ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[png] size: %dx%d bits: %d\n",bf->Width,bf->Height,bf->BPP ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[png] imagesize: %lu\n",bf->ImageSize ); + return 0; +} + +int conv24to32( txSample * bf ) +{ + unsigned char * tmpImage; + int i,c; + + if ( bf->BPP == 24 ) + { + tmpImage=bf->Image; + bf->ImageSize=bf->Width * bf->Height * 4; + bf->BPP=32; + if ( ( bf->Image=malloc( bf->ImageSize ) ) == NULL ) + { + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[bitmap] not enough memory for image\n" ); + return 1; + } + memset( bf->Image,0,bf->ImageSize ); + for ( c=0,i=0;i < (int)(bf->Width * bf->Height * 3); ) + { + bf->Image[c++]=tmpImage[i++]; //red + bf->Image[c++]=tmpImage[i++]; //green + bf->Image[c++]=tmpImage[i++]; c++; //blue + } + free( tmpImage ); + } + return 0; +} + +void bgr2rgb( txSample * bf ) +{ + unsigned char c; + int i; + + for ( i=0;i < (int)bf->ImageSize;i+=4 ) + { + c=bf->Image[i]; + bf->Image[i]=bf->Image[i+2]; + bf->Image[i+2]=c; + } +} + +void Normalize( txSample * bf ) +{ + int i; +#ifndef WORDS_BIGENDIAN + for ( i=0;i < (int)bf->ImageSize;i+=4 ) bf->Image[i+3]=0; +#else + for ( i=0;i < (int)bf->ImageSize;i+=4 ) bf->Image[i]=0; +#endif +} + +unsigned char tmp[512]; + +unsigned char * fExist( unsigned char * fname ) +{ + FILE * fl; + unsigned char ext[][6] = { ".png\0",".PNG\0" }; + int i; + + fl=fopen( fname,"rb" ); + if ( fl != NULL ) + { + fclose( fl ); + return fname; + } + for ( i=0;i<2;i++ ) + { + snprintf( tmp,511,"%s%s",fname,ext[i] ); + fl=fopen( tmp,"rb" ); + if ( fl != NULL ) + { + fclose( fl ); + return tmp; + } + } + return NULL; +} + +int bpRead( char * fname, txSample * bf ) +{ + fname=fExist( fname ); + if ( fname == NULL ) return -2; + if ( pngRead( fname,bf ) ) + { + mp_dbg( MSGT_GPLAYER,MSGL_FATAL,"[bitmap] unknown file type ( %s )\n",fname ); + return -5; + } + if ( bf->BPP < 24 ) + { + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[bitmap] Sorry, only 24 and 32 bpp bitmaps are supported.\n" ); + return -1; + } + if ( conv24to32( bf ) ) return -8; +#ifdef WORDS_BIGENDIAN + swab(bf->Image, bf->Image, bf->ImageSize); +#endif + bgr2rgb( bf ); + Normalize( bf ); + return 0; +} + +void Convert32to1( txSample * in,txSample * out,int adaptivlimit ) +{ + out->Width=in->Width; + out->Height=in->Height; + out->BPP=1; + out->ImageSize=(out->Width * out->Height + 7) / 8; + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c32to1] imagesize: %d\n",out->ImageSize ); + out->Image=calloc( 1,out->ImageSize ); + if ( out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_NotEnoughMemoryC32To1 ); + { + int i,b,c=0; unsigned int * buf = NULL; unsigned char tmp = 0; int nothaveshape = 1; + buf=(unsigned int *)in->Image; + for ( b=0,i=0;i < (int)(out->Width * out->Height);i++ ) + { + if ( (int)buf[i] != adaptivlimit ) tmp=( tmp >> 1 )|128; + else { tmp=tmp >> 1; buf[i]=nothaveshape=0; } + if ( b++ == 7 ) { out->Image[c++]=tmp; tmp=b=0; } + } + if ( b ) out->Image[c]=tmp; + if ( nothaveshape ) { free( out->Image ); out->Image=NULL; } + } +} + +void Convert1to32( txSample * in,txSample * out ) +{ + if ( in->Image == NULL ) return; + out->Width=in->Width; + out->Height=in->Height; + out->BPP=32; + out->ImageSize=out->Width * out->Height * 4; + out->Image=calloc( 1,out->ImageSize ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c1to32] imagesize: %d\n",out->ImageSize ); + if ( out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_NotEnoughMemoryC1To32 ); + { + int i,b,c=0; unsigned int * buf = NULL; unsigned char tmp = 0; + buf=(unsigned int *)out->Image; + for ( c=0,i=0;i < (int)(in->Width * in->Height / 8);i++ ) + { + tmp=in->Image[i]; + for ( b=0;b<8;b++ ) + { + buf[c]=0; + if ( tmp&0x1 ) buf[c]=0xffffffff; + c++; tmp=tmp>>1; + } + } + } +} diff --git a/gui/bitmap.h b/gui/bitmap.h new file mode 100644 index 0000000000..5b4075a7e7 --- /dev/null +++ b/gui/bitmap.h @@ -0,0 +1,18 @@ +#ifndef __BITMAP_H +#define __BITMAP_H + +typedef struct _txSample +{ + unsigned long Width; + unsigned long Height; + unsigned int BPP; + unsigned long ImageSize; + char * Image; +} txSample; + +extern int bpRead( char * fname, txSample * bf ); +extern int conv24to32( txSample * bf ); +extern void Convert32to1( txSample * in,txSample * out,int adaptivlimit ); +extern void Convert1to32( txSample * in,txSample * out ); + +#endif /* __BITMAP_H */ diff --git a/gui/cfg.c b/gui/cfg.c new file mode 100644 index 0000000000..f12ce3a422 --- /dev/null +++ b/gui/cfg.c @@ -0,0 +1,349 @@ + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + +#include "config.h" +#include "mp_msg.h" +#include "help_mp.h" +#include "mixer.h" +#include "mplayer.h" +#include "m_config.h" +#include "m_option.h" + +#include "libvo/video_out.h" + +#include "cfg.h" +#include "app.h" +#include "interface.h" +#include "mplayer/play.h" + +// --- params + +int gtkEnableAudioEqualizer = 0; + +int gtkVfPP = 0; +#ifdef USE_LIBAVCODEC + int gtkVfLAVC = 0; +#endif + +int gtkAONorm = 0; +int gtkAOSurround = 0; +int gtkAOExtraStereo = 0; +float gtkAOExtraStereoMul = 1.0; +#ifdef USE_OSS_AUDIO +char * gtkAOOSSMixer; +char * gtkAOOSSMixerChannel; +char * gtkAOOSSDevice; +#endif +#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) +char * gtkAOALSAMixer; +char * gtkAOALSAMixerChannel; +char * gtkAOALSADevice; +#endif +#ifdef HAVE_SDL +char * gtkAOSDLDriver; +#endif +#ifdef USE_ESD +char * gtkAOESDDevice; +#endif + +int gtkCacheOn = 0; +int gtkCacheSize = 2048; + +int gtkAutoSyncOn = 0; +int gtkAutoSync = 0; + +#ifdef HAVE_DXR3 + char * gtkDXR3Device; +#endif + +int gtkSubDumpMPSub = 0; +int gtkSubDumpSrt = 0; + +int gtkLoadFullscreen = 0; +int gtkShowVideoWindow = 1; +int gtkEnablePlayBar = 1; + +int gui_save_pos = 1; +int gui_main_pos_x = -2; +int gui_main_pos_y = -2; +int gui_sub_pos_x = -1; +int gui_sub_pos_y = -1; + +#ifdef USE_ASS +gtkASS_t gtkASS; +#endif +// --- + +extern char * get_path( const char * filename ); +extern int flip; +extern int frame_dropping; +extern int stop_xscreensaver; +extern int m_config_parse_config_file(m_config_t* config, char *conffile); + +static m_config_t * gui_conf; +static m_option_t gui_opts[] = +{ + { "enable_audio_equ",>kEnableAudioEqualizer,CONF_TYPE_FLAG,0,0,1,NULL }, + + { "vo_driver",&video_driver_list,CONF_TYPE_STRING_LIST,0,0,0,NULL }, + { "vo_panscan",&vo_panscan,CONF_TYPE_FLOAT,CONF_RANGE,0.0,1.0,NULL }, + { "vo_doublebuffering",&vo_doublebuffering,CONF_TYPE_FLAG,0,0,1,NULL }, + { "vo_direct_render",&vo_directrendering,CONF_TYPE_FLAG,0,0,1,NULL }, +#ifdef HAVE_DXR3 + { "vo_dxr3_device",>kDXR3Device,CONF_TYPE_STRING,0,0,0,NULL }, +#endif + + { "v_framedrop",&frame_dropping,CONF_TYPE_INT,CONF_RANGE,0,2,NULL }, + { "v_flip",&flip,CONF_TYPE_INT,CONF_RANGE,-1,1,NULL }, + { "v_ni",&force_ni,CONF_TYPE_FLAG,0,0,1,NULL }, + { "v_idx",&index_mode,CONF_TYPE_INT,CONF_RANGE,-1,2,NULL }, + { "v_vfm",&video_fm_list,CONF_TYPE_STRING_LIST,0,0,0,NULL }, + { "a_afm",&audio_fm_list,CONF_TYPE_STRING_LIST,0,0,0,NULL }, + + { "vf_pp",>kVfPP,CONF_TYPE_FLAG,0,0,1,NULL }, + { "vf_autoq",&auto_quality,CONF_TYPE_INT,CONF_RANGE,0,100,NULL }, +#ifdef USE_LIBAVCODEC + { "vf_lavc",>kVfLAVC,CONF_TYPE_FLAG,0,0,1,NULL }, +#endif + + { "ao_driver",&audio_driver_list,CONF_TYPE_STRING_LIST,0,0,0,NULL }, + { "ao_volnorm",>kAONorm,CONF_TYPE_FLAG,0,0,1,NULL }, + { "softvol",&soft_vol,CONF_TYPE_FLAG,0,0,1,NULL }, + { "ao_surround",>kAOSurround,CONF_TYPE_FLAG,0,0,1,NULL }, + { "ao_extra_stereo",>kAOExtraStereo,CONF_TYPE_FLAG,0,0,1,NULL }, + { "ao_extra_stereo_coefficient",>kAOExtraStereoMul,CONF_TYPE_FLOAT,CONF_RANGE,-10,10,NULL }, +#ifdef USE_OSS_AUDIO + { "ao_oss_mixer",>kAOOSSMixer,CONF_TYPE_STRING,0,0,0,NULL }, + { "ao_oss_mixer_channel",>kAOOSSMixerChannel,CONF_TYPE_STRING,0,0,0,NULL }, + { "ao_oss_device",>kAOOSSDevice,CONF_TYPE_STRING,0,0,0,NULL }, +#endif +#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) + { "ao_alsa_mixer",>kAOALSAMixer,CONF_TYPE_STRING,0,0,0,NULL }, + { "ao_alsa_mixer_channel",>kAOALSAMixerChannel,CONF_TYPE_STRING,0,0,0,NULL }, + { "ao_alsa_device",>kAOALSADevice,CONF_TYPE_STRING,0,0,0,NULL }, +#endif +#ifdef HAVE_SDL + { "ao_sdl_subdriver",>kAOSDLDriver,CONF_TYPE_STRING,0,0,0,NULL }, +#endif +#ifdef USE_ESD + { "ao_esd_device",>kAOESDDevice,CONF_TYPE_STRING,0,0,0,NULL }, +#endif + + { "dvd_device",&dvd_device,CONF_TYPE_STRING,0,0,0,NULL }, + { "cdrom_device",&cdrom_device,CONF_TYPE_STRING,0,0,0,NULL }, + + { "osd_level",&osd_level,CONF_TYPE_INT,CONF_RANGE,0,3,NULL }, + { "sub_auto_load",&sub_auto,CONF_TYPE_FLAG,0,0,1,NULL }, + { "sub_unicode",&sub_unicode,CONF_TYPE_FLAG,0,0,1,NULL }, +#ifdef USE_ASS + { "ass_enabled",&ass_enabled,CONF_TYPE_FLAG,0,0,1,NULL }, + { "ass_use_margins",&ass_use_margins,CONF_TYPE_FLAG,0,0,1,NULL }, + { "ass_top_margin",&ass_top_margin,CONF_TYPE_INT,CONF_RANGE,0,512,NULL }, + { "ass_bottom_margin",&ass_bottom_margin,CONF_TYPE_INT,CONF_RANGE,0,512,NULL }, +#endif + { "sub_pos",&sub_pos,CONF_TYPE_INT,CONF_RANGE,0,200,NULL }, + { "sub_overlap",&suboverlap_enabled,CONF_TYPE_FLAG,0,0,0,NULL }, +#ifdef USE_ICONV + { "sub_cp",&sub_cp,CONF_TYPE_STRING,0,0,0,NULL }, +#endif + { "font_factor",&font_factor,CONF_TYPE_FLOAT,CONF_RANGE,0.0,10.0,NULL }, + { "font_name",&font_name,CONF_TYPE_STRING,0,0,0,NULL }, +#ifdef HAVE_FREETYPE + { "font_encoding",&subtitle_font_encoding,CONF_TYPE_STRING,0,0,0,NULL }, + { "font_text_scale",&text_font_scale_factor,CONF_TYPE_FLOAT,CONF_RANGE,0,100,NULL }, + { "font_osd_scale",&osd_font_scale_factor,CONF_TYPE_FLOAT,CONF_RANGE,0,100,NULL }, + { "font_blur",&subtitle_font_radius,CONF_TYPE_FLOAT,CONF_RANGE,0,8,NULL }, + { "font_outline",&subtitle_font_thickness,CONF_TYPE_FLOAT,CONF_RANGE,0,8,NULL }, + { "font_autoscale",&subtitle_autoscale,CONF_TYPE_INT,CONF_RANGE,0,3,NULL }, +#endif + + { "cache",>kCacheOn,CONF_TYPE_FLAG,0,0,1,NULL }, + { "cache_size",>kCacheSize,CONF_TYPE_INT,CONF_RANGE,-1,65535,NULL }, + + { "playbar",>kEnablePlayBar,CONF_TYPE_FLAG,0,0,1,NULL }, + { "load_fullscreen",>kLoadFullscreen,CONF_TYPE_FLAG,0,0,1,NULL }, + { "show_videowin", >kShowVideoWindow,CONF_TYPE_FLAG,0,0,1,NULL }, + { "stopxscreensaver",&stop_xscreensaver,CONF_TYPE_FLAG,0,0,1,NULL }, + + { "autosync",>kAutoSyncOn,CONF_TYPE_FLAG,0,0,1,NULL }, + { "autosync_size",>kAutoSync,CONF_TYPE_INT,CONF_RANGE,0,10000,NULL }, + + { "gui_skin",&skinName,CONF_TYPE_STRING,0,0,0,NULL }, + + { "gui_save_pos", &gui_save_pos, CONF_TYPE_FLAG,0,0,1,NULL}, + { "gui_main_pos_x", &gui_main_pos_x, CONF_TYPE_INT,0,0,0,NULL}, + { "gui_main_pos_y", &gui_main_pos_y, CONF_TYPE_INT,0,0,0,NULL}, + { "gui_video_out_pos_x", &gui_sub_pos_x, CONF_TYPE_INT,0,0,0,NULL}, + { "gui_video_out_pos_y", &gui_sub_pos_y, CONF_TYPE_INT,0,0,0,NULL}, + + { "equ_channel_1",>kEquChannel1,CONF_TYPE_STRING,0,0,0,NULL }, + { "equ_channel_2",>kEquChannel2,CONF_TYPE_STRING,0,0,0,NULL }, + { "equ_channel_3",>kEquChannel3,CONF_TYPE_STRING,0,0,0,NULL }, + { "equ_channel_4",>kEquChannel4,CONF_TYPE_STRING,0,0,0,NULL }, + { "equ_channel_5",>kEquChannel5,CONF_TYPE_STRING,0,0,0,NULL }, + { "equ_channel_6",>kEquChannel6,CONF_TYPE_STRING,0,0,0,NULL }, + +#if 1 +#define audio_equ_row( i,j ) { "equ_band_"#i#j,>kEquChannels[i][j],CONF_TYPE_FLOAT,CONF_RANGE,-15.0,15.0,NULL }, + audio_equ_row( 0,0 ) audio_equ_row( 0,1 ) audio_equ_row( 0,2 ) audio_equ_row( 0,3 ) audio_equ_row( 0,4 ) audio_equ_row( 0,5 ) audio_equ_row( 0,6 ) audio_equ_row( 0,7 ) audio_equ_row( 0,8 ) audio_equ_row( 0,9 ) + audio_equ_row( 1,0 ) audio_equ_row( 1,1 ) audio_equ_row( 1,2 ) audio_equ_row( 1,3 ) audio_equ_row( 1,4 ) audio_equ_row( 1,5 ) audio_equ_row( 1,6 ) audio_equ_row( 1,7 ) audio_equ_row( 1,8 ) audio_equ_row( 1,9 ) + audio_equ_row( 2,0 ) audio_equ_row( 2,1 ) audio_equ_row( 2,2 ) audio_equ_row( 2,3 ) audio_equ_row( 2,4 ) audio_equ_row( 2,5 ) audio_equ_row( 2,6 ) audio_equ_row( 2,7 ) audio_equ_row( 2,8 ) audio_equ_row( 2,9 ) + audio_equ_row( 3,0 ) audio_equ_row( 3,1 ) audio_equ_row( 3,2 ) audio_equ_row( 3,3 ) audio_equ_row( 3,4 ) audio_equ_row( 3,5 ) audio_equ_row( 3,6 ) audio_equ_row( 3,7 ) audio_equ_row( 3,8 ) audio_equ_row( 3,9 ) + audio_equ_row( 4,0 ) audio_equ_row( 4,1 ) audio_equ_row( 4,2 ) audio_equ_row( 4,3 ) audio_equ_row( 4,4 ) audio_equ_row( 4,5 ) audio_equ_row( 4,6 ) audio_equ_row( 4,7 ) audio_equ_row( 4,8 ) audio_equ_row( 4,9 ) + audio_equ_row( 5,0 ) audio_equ_row( 5,1 ) audio_equ_row( 5,2 ) audio_equ_row( 5,3 ) audio_equ_row( 5,4 ) audio_equ_row( 5,5 ) audio_equ_row( 5,6 ) audio_equ_row( 5,7 ) audio_equ_row( 5,8 ) audio_equ_row( 5,9 ) +#undef audio_equ_row +#endif + + { NULL, NULL, 0, 0, 0, 0, NULL } +}; + +char * gfgets( char * str, int size, FILE * f ) +{ + char * s = fgets( str,size,f ); + char c; + if ( s ) + { + c=s[ strlen( s ) - 1 ]; if ( c == '\n' || c == '\r' ) s[ strlen( s ) - 1 ]=0; + c=s[ strlen( s ) - 1 ]; if ( c == '\n' || c == '\r' ) s[ strlen( s ) - 1 ]=0; + } + return s; +} + +int cfg_read( void ) +{ + char * cfg = get_path( "gui.conf" ); + FILE * f; + +// -- read configuration + mp_msg( MSGT_GPLAYER,MSGL_V,"[cfg] reading config file: %s\n",cfg ); + gui_conf=m_config_new(); + m_config_register_options( gui_conf,gui_opts ); + if ( m_config_parse_config_file( gui_conf,cfg ) < 0 ) + { + mp_msg( MSGT_GPLAYER,MSGL_FATAL,MSGTR_ConfigFileError ); +// exit( 1 ); + } + free( cfg ); + +// -- read pl + cfg=get_path( "gui.pl" ); + if ( (f=fopen( cfg,"rt" )) ) + { + while ( !feof( f ) ) + { + char tmp[512]; plItem * item; + if ( gfgets( tmp,512,f ) == NULL ) continue; + item=calloc( 1,sizeof( plItem ) ); + item->path=strdup( tmp ); + gfgets( tmp,512,f ); + item->name=strdup( tmp ); + gtkSet( gtkAddPlItem,0,(void*)item ); + } + fclose( f ); + } + free( cfg ); + + //-- read previously visited urls + cfg=get_path( "gui.url" ); + if ( (f=fopen( cfg,"rt" )) ) + { + while ( !feof( f ) ) + { + char tmp[512]; URLItem * item; + if ( gfgets( tmp,512,f ) == NULL ) continue; + item=calloc( 1,sizeof( URLItem ) ); + item->url=strdup( tmp ); + gtkSet( gtkAddURLItem,0,(void*)item ); + } + fclose( f ); + } + free( cfg ); + +// -- reade file loader history + cfg=get_path( "gui.history" ); + if ( (f=fopen( cfg,"rt+" )) ) + { + int i = 0; + while ( !feof( f ) ) + { + char tmp[512]; + if ( gfgets( tmp,512,f ) == NULL ) continue; + fsHistory[i++]=gstrdup( tmp ); + } + fclose( f ); + } + free( cfg ); + + return 0; +} + +int cfg_write( void ) +{ + char * cfg = get_path( "gui.conf" ); + FILE * f; + int i; + +// -- save configuration + if ( (f=fopen( cfg,"wt+" )) ) + { + for ( i=0;gui_opts[i].name;i++ ) + { + char* v = m_option_print(&gui_opts[i],gui_opts[i].p); + if(v) { + fprintf( f,"%s = \"%s\"\n",gui_opts[i].name, v); + free(v); + } else if((int)v == -1) + mp_msg(MSGT_GPLAYER,MSGL_WARN,MSGTR_UnableToSaveOption, gui_opts[i].name); + } + fclose( f ); + } + free( cfg ); + +// -- save playlist + cfg=get_path( "gui.pl" ); + if ( (f=fopen( cfg,"wt+" )) ) + { + plCurrent=plList; + while ( plCurrent ) + { + if ( plCurrent->path && plCurrent->name ) + { + fprintf( f,"%s\n",plCurrent->path ); + fprintf( f,"%s\n",plCurrent->name ); + } + plCurrent=plCurrent->next; + } + fclose( f ); + } + free( cfg ); + +// -- save URL's + cfg=get_path( "gui.url" ); + if ( (f=fopen( cfg,"wt+" )) ) + { + while ( URLList ) + { + if ( URLList->url ) fprintf( f,"%s\n",URLList->url ); + URLList=URLList->next; + } + fclose( f ); + } + free( cfg ); + +// -- save file loader history + cfg=get_path( "gui.history" ); + if ( (f=fopen( cfg,"wt+" )) ) + { + int i = 0; +// while ( fsHistory[i] != NULL ) + for ( i=0;i < 5; i++) + if( fsHistory[i] ) fprintf( f,"%s\n",fsHistory[i] ); + fclose( f ); + } + free( cfg ); + + return 0; +} + diff --git a/gui/cfg.h b/gui/cfg.h new file mode 100644 index 0000000000..f78e983524 --- /dev/null +++ b/gui/cfg.h @@ -0,0 +1,76 @@ + +#ifndef __CFG_H +#define __CFG_H + +extern int gtkEnableAudioEqualizer; + +extern int gtkVfPP; +extern int gtkVfLAVC; + +extern int gtkAONorm; +extern int gtkAOFakeSurround; +extern int gtkAOExtraStereo; +extern float gtkAOExtraStereoMul; +#ifdef USE_OSS_AUDIO +extern char * gtkAOOSSMixer; +extern char * gtkAOOSSMixerChannel; +extern char * gtkAOOSSDevice; +#endif +#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) +extern char * gtkAOALSAMixer; +extern char * gtkAOALSAMixerChannel; +extern char * gtkAOALSADevice; +#endif +#ifdef HAVE_SDL +extern char * gtkAOSDLDriver; +#endif +#ifdef USE_ESD +extern char * gtkAOESDDevice; +#endif +#ifdef HAVE_DXR3 +extern char * gtkDXR3Device; +#endif + +extern int gtkCacheOn; +extern int gtkCacheSize; + +extern int gtkAutoSyncOn; +extern int gtkAutoSync; + +extern int gtkSubDumpMPSub; +extern int gtkSubDumpSrt; + +extern char * gtkEquChannel1; +extern char * gtkEquChannel2; +extern char * gtkEquChannel3; +extern char * gtkEquChannel4; +extern char * gtkEquChannel5; +extern char * gtkEquChannel6; +extern int gtkLoadFullscreen; +extern int gtkShowVideoWindow; +extern int gtkEnablePlayBar; + +extern int gui_save_pos; +extern int gui_main_pos_x; +extern int gui_main_pos_y; +extern int gui_sub_pos_x; +extern int gui_sub_pos_y; + +#ifdef USE_ASS +typedef struct { + int enabled; + int use_margins; + int top_margin; + int bottom_margin; +} gtkASS_t; +extern gtkASS_t gtkASS; +extern int ass_enabled; +extern int ass_use_margins; +extern int ass_top_margin; +extern int ass_bottom_margin; +#endif + +extern int cfg_read( void ); +extern int cfg_write( void ); + +#endif diff --git a/gui/interface.c b/gui/interface.c new file mode 100644 index 0000000000..eb461bc7f7 --- /dev/null +++ b/gui/interface.c @@ -0,0 +1,1338 @@ + +#include <inttypes.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <sys/types.h> + +#include "wm/ws.h" +#include "wm/wsxdnd.h" +#include "interface.h" +#include "skin/skin.h" + +#include "mplayer/gtk/eq.h" +#include "mplayer/widgets.h" +#include "mplayer/gmplayer.h" +#include "mplayer/play.h" + +#include "mplayer.h" +#include "access_mpcontext.h" +#include "app.h" +#include "cfg.h" +#include "help_mp.h" +#include "subreader.h" +#include "libvo/x11_common.h" +#include "libvo/video_out.h" +#include "libvo/font_load.h" +#include "libvo/sub.h" +#include "input/input.h" +#include "libao2/audio_out.h" +#include "mixer.h" +#include "libaf/af.h" +#include "libaf/equalizer.h" + +extern af_cfg_t af_cfg; + +#ifdef USE_ICONV +#include <iconv.h> +#endif + +#include "stream/stream.h" +#include "libmpdemux/demuxer.h" +#include "libmpdemux/stheader.h" +#include "libmpcodecs/dec_video.h" + +#ifdef USE_DVDREAD +#include "stream/stream_dvd.h" +#endif + + +#include "m_config.h" +#include "m_option.h" + + +guiInterface_t guiIntfStruct; +int guiWinID=-1; + +char * gstrcat( char ** dest,const char * src ) +{ + char * tmp = NULL; + + if ( !src ) return NULL; + + if ( *dest ) + { + tmp=malloc( strlen( *dest ) + strlen( src ) + 1 ); + + if ( tmp ) /* TODO: advanced error handling */ + { + strcpy( tmp,*dest ); strcat( tmp,src ); free( *dest ); + } + } + else + { tmp=malloc( strlen( src ) + 1 ); strcpy( tmp,src ); } + *dest=tmp; + return tmp; +} + +int gstrcmp( const char * a,const char * b ) +{ + if ( !a && !b ) return 0; + if ( !a || !b ) return -1; + return strcmp( a,b ); +} + +int gstrncmp( const char * a,const char * b,int size ) +{ + if ( !a && !b ) return 0; + if ( !a || !b ) return -1; + return strncmp( a,b,size ); +} + +char * gstrdup( const char * str ) +{ + if ( !str ) return NULL; + return strdup( str ); +} + +char * gstrchr( char * str,int c ) +{ + if ( !str ) return NULL; + return strchr( str,c ); +} + +void gfree( void ** p ) +{ + if ( *p == NULL ) return; + free( *p ); *p=NULL; +} + +void gset( char ** str, const char * what ) +{ + if ( *str ) { if ( !strstr( *str,what ) ) { gstrcat( str,"," ); gstrcat( str,what ); }} + else gstrcat( str,what ); +} + +/** + * \brief this actually creates a new list containing only one element... + */ +void gaddlist( char *** list,const char * entry ) +{ + int i; + + if ( (*list) ) + { + for ( i=0;(*list)[i];i++ ) free( (*list)[i] ); + free( (*list) ); + } + + (*list)=malloc( 2 * sizeof(char **) ); + (*list)[0]=gstrdup( entry ); + (*list)[1]=NULL; +} + +/** + * \brief this replaces a string starting with search by replace. + * If not found, replace is appended. + */ +void greplace(char ***list, const char *search, const char *replace) +{ + int i = 0; + int len = (search) ? strlen(search) : 0; + + if (*list) { + for (i = 0; (*list)[i]; i++) { + if (search && (strncmp((*list)[i], search, len) == 0)) { + free((*list)[i]); + (*list)[i] = gstrdup(replace); + return; + } + } + *list = realloc(*list, (i + 2) * sizeof(char *)); + } + else + *list = malloc(2 * sizeof(char *)); + + (*list)[i] = gstrdup(replace); + (*list)[i + 1] = NULL; +} + +#ifdef USE_ICONV +char * gconvert_uri_to_filename( char * str ) +{ + iconv_t d; + char * out = strdup( str ); + char * tmp = NULL; + char * ize; + size_t inb,outb; + char * charset = "ISO8859-1"; + char * cs; + + if ( !strchr( str,'%' ) ) return str; + + { + char * t = calloc( 1,strlen( out ) ); + int i,c = 0; + for ( i=0;i < (int)strlen( out );i++ ) + if ( out[i] != '%' ) t[c++]=out[i]; + else + { + char tmp[5] = "0xXX"; +// if ( out[++i] == '%' ) { t[c++]='%'; continue; }; + tmp[2]=out[++i]; tmp[3]=out[++i]; + t[c++]=(char)strtol( tmp,(char **)NULL,0 ); + } + free( out ); + out=t; + } + + if ( (cs=getenv( "CHARSET" )) && *cs ) charset=cs; + + inb=outb=strlen( out ); + tmp=calloc( 1,outb + 1 ); + ize=tmp; + d=iconv_open( charset,"UTF-8" ); + if ( (iconv_t)(-1) == d ) return str; + iconv( d,&out,&inb,&tmp,&outb ); + iconv_close( d ); + free( out ); + return ize; +} +#endif + +void guiInit( void ) +{ + int i; + + memset( &guiIntfStruct,0,sizeof( guiIntfStruct ) ); + guiIntfStruct.Balance=50.0f; + guiIntfStruct.StreamType=-1; + + memset( >kEquChannels,0,sizeof( gtkEquChannels ) ); +#ifdef HAVE_DXR3 + if ( !gtkDXR3Device ) gtkDXR3Device=strdup( "/dev/em8300-0" ); +#endif + if ( stream_cache_size > 0 ) { gtkCacheOn=1; gtkCacheSize=stream_cache_size; } + else if ( stream_cache_size == 0 ) gtkCacheOn = 0; + if ( autosync && autosync != gtkAutoSync ) { gtkAutoSyncOn=1; gtkAutoSync=autosync; } + +#ifdef USE_ASS + gtkASS.enabled = ass_enabled; + gtkASS.use_margins = ass_use_margins; + gtkASS.top_margin = ass_top_margin; + gtkASS.bottom_margin = ass_bottom_margin; +#endif + + gtkInit(); +// --- initialize X + wsXInit( (void *)mDisplay ); +// --- load skin + skinDirInHome=get_path("skins"); + skinDirInHome_obsolete=get_path("Skin"); + skinMPlayerDir=MPLAYER_DATADIR "/skins"; + skinMPlayerDir_obsolete=MPLAYER_DATADIR "/Skin"; + mp_msg( MSGT_GPLAYER,MSGL_V,"SKIN dir 1: '%s'\n",skinDirInHome); + mp_msg( MSGT_GPLAYER,MSGL_V,"SKIN dir 1 (obsolete): '%s'\n",skinDirInHome_obsolete); + mp_msg( MSGT_GPLAYER,MSGL_V,"SKIN dir 2: '%s'\n",skinMPlayerDir); + mp_msg( MSGT_GPLAYER,MSGL_V,"SKIN dir 2 (obsolete): '%s'\n",skinMPlayerDir_obsolete); + if ( !skinName ) skinName=strdup( "default" ); + i = skinRead( skinName ); + if ((i == -1) && strcmp(skinName,"default")) + { + mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_SKIN_SKINCFG_SelectedSkinNotFound, skinName); + skinName=strdup( "default" ); + i = skinRead( skinName ); + } + switch (i) { + case -1: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinNotFound,skinName ); exit( 0 ); + case -2: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinCfgReadError,skinName ); exit( 0 ); + } +// --- initialize windows + if ( ( mplDrawBuffer = malloc( appMPlayer.main.Bitmap.ImageSize ) ) == NULL ) + { + fprintf( stderr,MSGTR_NEMDB ); + exit( 0 ); + } + + if ( gui_save_pos ) + { + appMPlayer.main.x = gui_main_pos_x; + appMPlayer.main.y = gui_main_pos_y; + appMPlayer.sub.x = gui_sub_pos_x; + appMPlayer.sub.y = gui_sub_pos_y; + } + + if (WinID>0) + { + appMPlayer.subWindow.Parent=WinID; + appMPlayer.sub.x=0; + appMPlayer.sub.y=0; + } + if (guiWinID>=0) appMPlayer.mainWindow.Parent=guiWinID; + + wsCreateWindow( &appMPlayer.subWindow, + appMPlayer.sub.x,appMPlayer.sub.y,appMPlayer.sub.width,appMPlayer.sub.height, + wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsShowFrame|wsHideWindow,"MPlayer - Video" ); + + wsDestroyImage( &appMPlayer.subWindow ); + wsCreateImage( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Width,appMPlayer.sub.Bitmap.Height ); + wsXDNDMakeAwareness(&appMPlayer.subWindow); + + mplMenuInit(); + mplPBInit(); + + vo_setwindow( appMPlayer.subWindow.WindowID, appMPlayer.subWindow.wGC ); + +// i=wsHideFrame|wsMaxSize|wsHideWindow; +// if ( appMPlayer.mainDecoration ) i=wsShowFrame|wsMaxSize|wsHideWindow; + i=wsShowFrame|wsMaxSize|wsHideWindow; + wsCreateWindow( &appMPlayer.mainWindow, + appMPlayer.main.x,appMPlayer.main.y,appMPlayer.main.width,appMPlayer.main.height, + wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,i,"MPlayer" ); + + wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image ); + wsXDNDMakeAwareness(&appMPlayer.mainWindow); + +#ifdef DEBUG + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[main] depth on screen: %d\n",wsDepthOnScreen ); + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[main] parent: 0x%x\n",(int)appMPlayer.mainWindow.WindowID ); + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[main] sub: 0x%x\n",(int)appMPlayer.subWindow.WindowID ); +#endif + + appMPlayer.mainWindow.ReDraw=(void *)mplMainDraw; + appMPlayer.mainWindow.MouseHandler=mplMainMouseHandle; + appMPlayer.mainWindow.KeyHandler=mplMainKeyHandle; + appMPlayer.mainWindow.DandDHandler=mplDandDHandler; + + appMPlayer.subWindow.ReDraw=(void *)mplSubDraw; + appMPlayer.subWindow.MouseHandler=mplSubMouseHandle; + appMPlayer.subWindow.KeyHandler=mplMainKeyHandle; + appMPlayer.subWindow.DandDHandler=mplDandDHandler; + + wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.sub.R,appMPlayer.sub.G,appMPlayer.sub.B ); + wsClearWindow( appMPlayer.subWindow ); + if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize ); + + btnModify( evSetVolume,guiIntfStruct.Volume ); + btnModify( evSetBalance,guiIntfStruct.Balance ); + btnModify( evSetMoviePosition,guiIntfStruct.Position ); + + wsSetIcon( wsDisplay,appMPlayer.mainWindow.WindowID,guiIcon,guiIconMask ); + wsSetIcon( wsDisplay,appMPlayer.subWindow.WindowID,guiIcon,guiIconMask ); + + guiIntfStruct.Playing=0; + + if ( !appMPlayer.mainDecoration ) wsWindowDecoration( &appMPlayer.mainWindow,0 ); + + wsVisibleWindow( &appMPlayer.mainWindow,wsShowWindow ); +#if 0 + wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow ); + + { + XEvent xev; + do { XNextEvent( wsDisplay,&xev ); } while ( xev.type != MapNotify || xev.xmap.event != appMPlayer.subWindow.WindowID ); + appMPlayer.subWindow.Mapped=wsMapped; + } + + if ( !fullscreen ) fullscreen=gtkLoadFullscreen; + if ( fullscreen ) + { + mplFullScreen(); + btnModify( evFullScreen,btnPressed ); + } +#else + if ( !fullscreen ) fullscreen=gtkLoadFullscreen; + if ( gtkShowVideoWindow ) + { + wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow ); + { + XEvent xev; + do { XNextEvent( wsDisplay,&xev ); } while ( xev.type != MapNotify || xev.xmap.event != appMPlayer.subWindow.WindowID ); + appMPlayer.subWindow.Mapped=wsMapped; + } + + if ( fullscreen ) + { + mplFullScreen(); + btnModify( evFullScreen,btnPressed ); + } + } + else + { + if ( fullscreen ) + { + wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow ); + { + XEvent xev; + do { XNextEvent( wsDisplay,&xev ); } while ( xev.type != MapNotify || xev.xmap.event != appMPlayer.subWindow.WindowID ); + appMPlayer.subWindow.Mapped=wsMapped; + } + wsVisibleWindow( &appMPlayer.subWindow, wsShowWindow ); + + mplFullScreen(); + btnModify( evFullScreen,btnPressed ); + } + } +#endif + mplSubRender=1; +// --- + + if ( filename ) mplSetFileName( NULL,filename,STREAMTYPE_FILE ); + if ( plCurrent && !filename ) mplSetFileName( plCurrent->path,plCurrent->name,STREAMTYPE_FILE ); + if ( subdata ) guiSetFilename( guiIntfStruct.Subtitlename, subdata->filename ); + guiLoadFont(); +} + +void guiDone( void ) +{ + mplMainRender=0; + mp_msg( MSGT_GPLAYER,MSGL_V,"[GUI] done.\n" ); + + if ( gui_save_pos ) + { + gui_main_pos_x=appMPlayer.mainWindow.X; gui_main_pos_y=appMPlayer.mainWindow.Y; + gui_sub_pos_x=appMPlayer.subWindow.X; gui_sub_pos_y=appMPlayer.subWindow.Y; + } + +#ifdef USE_ASS + ass_enabled = gtkASS.enabled; + ass_use_margins = gtkASS.use_margins; + ass_top_margin = gtkASS.top_margin; + ass_bottom_margin = gtkASS.bottom_margin; +#endif + + cfg_write(); + wsXDone(); +} + +int guiCMDArray[] = + { + evLoadPlay, + evLoadSubtitle, + evAbout, + evPlay, + evStop, + evPlayList, + evPreferences, + evFullScreen, + evSkinBrowser + }; + +extern int frame_dropping; +extern int stream_dump_type; +extern int vcd_track; +extern m_obj_settings_t * vf_settings; + +void guiLoadFont( void ) +{ +#ifdef HAVE_FREETYPE + load_font_ft(vo_image_width, vo_image_height); +#else + if ( vo_font ) + { + int i; + if ( vo_font->name ) free( vo_font->name ); + if ( vo_font->fpath ) free( vo_font->fpath ); + for ( i=0;i<16;i++ ) + if ( vo_font->pic_a[i] ) + { + if ( vo_font->pic_a[i]->bmp ) free( vo_font->pic_a[i]->bmp ); + if ( vo_font->pic_a[i]->pal ) free( vo_font->pic_a[i]->pal ); + } + for ( i=0;i<16;i++ ) + if ( vo_font->pic_b[i] ) + { + if ( vo_font->pic_b[i]->bmp ) free( vo_font->pic_b[i]->bmp ); + if ( vo_font->pic_b[i]->pal ) free( vo_font->pic_b[i]->pal ); + } + free( vo_font ); vo_font=NULL; + } + if ( font_name ) + { + vo_font=read_font_desc( font_name,font_factor,0 ); + if ( !vo_font ) mp_msg( MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadFont,font_name ); + } + else + { + font_name=gstrdup( get_path( "font/font.desc" ) ); + vo_font=read_font_desc( font_name,font_factor,0 ); + if ( !vo_font ) + { + gfree( (void **)&font_name ); font_name=gstrdup(MPLAYER_DATADIR "/font/font.desc" ); + vo_font=read_font_desc( font_name,font_factor,0 ); + } + } +#endif +} + +extern mp_osd_obj_t* vo_osd_list; + +extern char **sub_name; + +void guiLoadSubtitle( char * name ) +{ + if ( guiIntfStruct.Playing == 0 ) + { + guiIntfStruct.SubtitleChanged=1; //what is this for? (mw) + return; + } + if ( subdata ) + { + mp_msg( MSGT_GPLAYER,MSGL_INFO,MSGTR_DeletingSubtitles ); + sub_free( subdata ); + subdata=NULL; + vo_sub=NULL; + if ( vo_osd_list ) + { + int len; + mp_osd_obj_t * osd = vo_osd_list; + while ( osd ) + { + if ( osd->type == OSDTYPE_SUBTITLE ) break; + osd=osd->next; + } + if ( osd && osd->flags&OSDFLAG_VISIBLE ) + { + len=osd->stride * ( osd->bbox.y2 - osd->bbox.y1 ); + memset( osd->bitmap_buffer,0,len ); + memset( osd->alpha_buffer,0,len ); + } + } + } + if ( name ) + { + mp_msg( MSGT_GPLAYER,MSGL_INFO,MSGTR_LoadingSubtitles,name ); + subdata=sub_read_file( name, guiIntfStruct.FPS ); + if ( !subdata ) mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_CantLoadSub,name ); + sub_name = (malloc(2 * sizeof(char*))); //when mplayer will be restarted + sub_name[0] = strdup(name); //sub_name[0] will be read + sub_name[1] = NULL; + } + update_set_of_subtitles(); + +} + +static void add_vf( char * str ) +{ + mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_AddingVideoFilter,str ); + if ( vf_settings ) + { + int i = 0; + while ( vf_settings[i].name ) if ( !gstrcmp( vf_settings[i++].name,str ) ) { i=-1; break; } + if ( i != -1 ) + { vf_settings=realloc( vf_settings,( i + 2 ) * sizeof( m_obj_settings_t ) ); vf_settings[i].name=strdup( str );vf_settings[i].attribs = NULL; vf_settings[i+1].name=NULL; } + } else { vf_settings=malloc( 2 * sizeof( m_obj_settings_t ) ); vf_settings[0].name=strdup( str );vf_settings[0].attribs = NULL; vf_settings[1].name=NULL; } +} + +static void remove_vf( char * str ) +{ + int n = 0; + + if ( !vf_settings ) return; + + mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_RemovingVideoFilter,str ); + + while ( vf_settings[n++].name ); n--; + if ( n > -1 ) + { + int i = 0,m = -1; + while ( vf_settings[i].name ) if ( !gstrcmp( vf_settings[i++].name,str ) ) { m=i - 1; break; } + i--; + if ( m > -1 ) + { + if ( n == 1 ) { free( vf_settings[0].name );free( vf_settings[0].attribs ); free( vf_settings ); vf_settings=NULL; } + else { free( vf_settings[i].name );free( vf_settings[i].attribs ); memcpy( &vf_settings[i],&vf_settings[i + 1],( n - i ) * sizeof( m_obj_settings_t ) ); } + } + } +} + +int guiGetEvent( int type,char * arg ) +{ + ao_functions_t *audio_out = NULL; + vo_functions_t *video_out = NULL; + mixer_t *mixer = NULL; + + stream_t * stream = (stream_t *) arg; +#ifdef USE_DVDREAD + dvd_priv_t * dvdp = (dvd_priv_t *) arg; +#endif + + if (guiIntfStruct.mpcontext) { + audio_out = mpctx_get_audio_out(guiIntfStruct.mpcontext); + video_out = mpctx_get_video_out(guiIntfStruct.mpcontext); + mixer = mpctx_get_mixer(guiIntfStruct.mpcontext); + } + + switch ( type ) + { + case guiXEvent: + guiIntfStruct.event_struct=(void *)arg; + wsEvents( wsDisplay,(XEvent *)arg,NULL ); + gtkEventHandling(); + break; + case guiCEvent: + switch ( (int)arg ) + { + case guiSetPlay: + guiIntfStruct.Playing=1; +// if ( !gtkShowVideoWindow ) wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow ); + break; + case guiSetStop: + guiIntfStruct.Playing=0; +// if ( !gtkShowVideoWindow ) wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow ); + break; + case guiSetPause: guiIntfStruct.Playing=2; break; + } + mplState(); + break; + case guiSetState: + mplState(); + break; + case guiSetFileName: + if ( arg ) guiSetFilename( guiIntfStruct.Filename,arg ); + break; + case guiSetAudioOnly: + guiIntfStruct.AudioOnly=(int)arg; + if ( (int)arg ) { guiIntfStruct.NoWindow=True; wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow ); } + else wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow ); + break; + case guiSetContext: + guiIntfStruct.mpcontext=(void *)arg; + case guiSetDemuxer: + guiIntfStruct.demuxer=(void *)arg; + break; + case guiSetAfilter: + guiIntfStruct.afilter=(void *)arg; + break; + case guiSetShVideo: + { + if ( !appMPlayer.subWindow.isFullScreen ) + { + wsResizeWindow( &appMPlayer.subWindow,vo_dwidth,vo_dheight ); + wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y ); + } + guiIntfStruct.MovieWidth=vo_dwidth; + guiIntfStruct.MovieHeight=vo_dheight; + if (guiWinID>=0) + wsMoveWindow( &appMPlayer.mainWindow,0,0, vo_dheight); + } + break; +#ifdef USE_DVDREAD + case guiSetDVD: + guiIntfStruct.DVD.titles=dvdp->vmg_file->tt_srpt->nr_of_srpts; + guiIntfStruct.DVD.chapters=dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts; + guiIntfStruct.DVD.angles=dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_angles; + guiIntfStruct.DVD.nr_of_audio_channels=dvdp->nr_of_channels; + memcpy( guiIntfStruct.DVD.audio_streams,dvdp->audio_streams,sizeof( dvdp->audio_streams ) ); + guiIntfStruct.DVD.nr_of_subtitles=dvdp->nr_of_subtitles; + memcpy( guiIntfStruct.DVD.subtitles,dvdp->subtitles,sizeof( dvdp->subtitles ) ); + guiIntfStruct.DVD.current_title=dvd_title + 1; + guiIntfStruct.DVD.current_chapter=dvd_chapter + 1; + guiIntfStruct.DVD.current_angle=dvd_angle + 1; + guiIntfStruct.Track=dvd_title + 1; + break; +#endif + case guiSetStream: + guiIntfStruct.StreamType=stream->type; + switch( stream->type ) + { +#ifdef USE_DVDREAD + case STREAMTYPE_DVD: + guiGetEvent( guiSetDVD,(char *)stream->priv ); + break; +#endif +#ifdef HAVE_VCD + case STREAMTYPE_VCD: + { + int i; + + if (!stream->priv) + { + guiIntfStruct.VCDTracks=0; + break; + } + for ( i=1;i < 100;i++ ) + if ( vcd_seek_to_track( stream->priv,i ) < 0 ) break; + vcd_seek_to_track( stream->priv,vcd_track ); + guiIntfStruct.VCDTracks=--i; + break; + } +#endif + default: break; + } + break; + case guiIEvent: + mp_msg( MSGT_GPLAYER,MSGL_V,"cmd: %d\n",(int)arg ); + switch( (int)arg ) + { + case MP_CMD_QUIT: + mplEventHandling( evExit,0 ); + break; + case MP_CMD_VO_FULLSCREEN: + mplEventHandling( evFullScreen,0 ); + break; + default: + mplEventHandling( guiCMDArray[ (int)arg - MP_CMD_GUI_EVENTS - 1 ],0 ); + } + break; + case guiReDraw: + mplEventHandling( evRedraw,0 ); + break; + case guiSetVolume: + if ( audio_out ) + { + float l,r; + mixer_getvolume( mixer,&l,&r ); + guiIntfStruct.Volume=(r>l?r:l); + if ( r != l ) guiIntfStruct.Balance=( ( r - l ) + 100 ) * 0.5f; + else guiIntfStruct.Balance=50.0f; + btnModify( evSetVolume,guiIntfStruct.Volume ); + btnModify( evSetBalance,guiIntfStruct.Balance ); + } + break; + case guiSetFileFormat: + guiIntfStruct.FileFormat=(int)arg; + break; + case guiSetValues: +// -- video + guiIntfStruct.sh_video=arg; + if ( arg ) + { + sh_video_t * sh = (sh_video_t *)arg; + guiIntfStruct.FPS=sh->fps; + } + + if ( guiIntfStruct.NoWindow ) wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow ); + + if ( guiIntfStruct.StreamType == STREAMTYPE_STREAM ) btnSet( evSetMoviePosition,btnDisabled ); + else btnSet( evSetMoviePosition,btnReleased ); + +// -- audio + if ( audio_out ) + { + float l,r; + mixer_getvolume( mixer,&l,&r ); + guiIntfStruct.Volume=(r>l?r:l); + if ( r != l ) guiIntfStruct.Balance=( ( r - l ) + 100 ) * 0.5f; + else guiIntfStruct.Balance=50.0f; + btnModify( evSetVolume,guiIntfStruct.Volume ); + btnModify( evSetBalance,guiIntfStruct.Balance ); + } + + if ( gtkEnableAudioEqualizer ) + { + equalizer_t eq; + int i,j; + for ( i=0;i<6;i++ ) + for ( j=0;j<10;j++ ) + { + eq.channel=i; eq.band=j; eq.gain=gtkEquChannels[i][j]; + gtkSet( gtkSetEqualizer,0,&eq ); + } + } +// -- subtitle +#ifdef HAVE_DXR3 + if ( video_driver_list && !gstrcmp( video_driver_list[0],"dxr3" ) && guiIntfStruct.FileFormat != DEMUXER_TYPE_MPEG_PS +#ifdef USE_LIBAVCODEC + && !gtkVfLAVC +#endif + ) + { + gtkMessageBox( GTK_MB_FATAL,MSGTR_NEEDLAVC ); + guiIntfStruct.Playing=0; + return True; + } +#endif + break; + case guiSetDefaults: +// if ( guiIntfStruct.Playing == 1 && guiIntfStruct.FilenameChanged ) + if ( guiIntfStruct.FilenameChanged ) + { + audio_id=-1; + video_id=-1; + dvdsub_id=-1; + vobsub_id=-1; + stream_cache_size=-1; + autosync=0; + vcd_track=0; + dvd_title=0; + force_fps=0; + } + guiIntfStruct.demuxer=NULL; + guiIntfStruct.sh_video=NULL; + wsPostRedisplay( &appMPlayer.subWindow ); + break; + case guiSetParameters: + guiGetEvent( guiSetDefaults,NULL ); + switch ( guiIntfStruct.StreamType ) + { + case STREAMTYPE_PLAYLIST: + break; +#ifdef HAVE_VCD + case STREAMTYPE_VCD: + { + char tmp[512]; + sprintf( tmp,"vcd://%d",guiIntfStruct.Track + 1 ); + guiSetFilename( guiIntfStruct.Filename,tmp ); + } + break; +#endif +#ifdef USE_DVDREAD + case STREAMTYPE_DVD: + { + char tmp[512]; + sprintf( tmp,"dvd://%d",guiIntfStruct.Title ); + guiSetFilename( guiIntfStruct.Filename,tmp ); + } + dvd_chapter=guiIntfStruct.Chapter; + dvd_angle=guiIntfStruct.Angle; + break; +#endif + } + //if ( guiIntfStruct.StreamType != STREAMTYPE_PLAYLIST ) // Does not make problems anymore! + { + if ( guiIntfStruct.Filename ) filename=gstrdup( guiIntfStruct.Filename ); + else if ( filename ) guiSetFilename( guiIntfStruct.Filename,filename ); + } +// --- video opts + + if ( !video_driver_list ) + { + int i = 0; + while ( video_out_drivers[i++] ) + if ( video_out_drivers[i - 1]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE ) + { + gaddlist( &video_driver_list,(char *)video_out_drivers[i - 1]->info->short_name ); + break; + } + } + + if ( !video_driver_list && !video_driver_list[0] ) { gtkMessageBox( GTK_MB_FATAL,MSGTR_IDFGCVD ); exit_player( "gui init" ); } + + { + int i = 0; + guiIntfStruct.NoWindow=False; + while ( video_out_drivers[i++] ) + if ( video_out_drivers[i - 1]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE ) + { + if ( ( video_driver_list && !gstrcmp( video_driver_list[0],(char *)video_out_drivers[i - 1]->info->short_name ) )&&( video_out_drivers[i - 1]->control( VOCTRL_GUI_NOWINDOW,NULL ) == VO_TRUE ) ) + { guiIntfStruct.NoWindow=True; break; } + } + } + +#ifdef HAVE_DXR3 +#ifdef USE_LIBAVCODEC + remove_vf( "lavc" ); +#endif + if ( video_driver_list && !gstrcmp( video_driver_list[0],"dxr3" ) ) + { + if ( ( guiIntfStruct.StreamType != STREAMTYPE_DVD)&&( guiIntfStruct.StreamType != STREAMTYPE_VCD ) ) + { +#ifdef USE_LIBAVCODEC + if ( gtkVfLAVC ) add_vf( "lavc" ); +#endif + } + } +#endif +// --- + if ( gtkVfPP ) add_vf( "pp" ); + else remove_vf( "pp" ); + +// --- audio opts +// if ( ao_plugin_cfg.plugin_list ) { free( ao_plugin_cfg.plugin_list ); ao_plugin_cfg.plugin_list=NULL; } + if (gtkAONorm) + greplace(&af_cfg.list, "volnorm", "volnorm"); + if (gtkEnableAudioEqualizer) + greplace(&af_cfg.list, "equalizer", "equalizer"); + if ( gtkAOExtraStereo ) + { + char *name = malloc(12 + 20 + 1); + snprintf(name, 12 + 20, "extrastereo=%f", gtkAOExtraStereoMul); + name[12 + 20] = 0; + greplace(&af_cfg.list, "extrastereo", name); + free(name); + } +#ifdef USE_OSS_AUDIO + if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"oss",3 ) ) + { + char *tmp; + mixer_device = gtkAOOSSMixer; + mixer_channel = gtkAOOSSMixerChannel; + if (gtkAOOSSDevice) { + tmp = calloc( 1,strlen( gtkAOOSSDevice ) + 7 ); + sprintf( tmp,"oss:%s",gtkAOOSSDevice ); + } else + tmp = strdup("oss"); + gaddlist( &audio_driver_list,tmp ); + free(tmp); + } +#endif +#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) + if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"alsa",4 ) ) + { + char *tmp; + mixer_device = gtkAOALSAMixer; + mixer_channel = gtkAOALSAMixerChannel; + if (gtkAOALSADevice) { + tmp = calloc( 1,strlen( gtkAOALSADevice ) + 14 ); + sprintf( tmp,"alsa:device=%s",gtkAOALSADevice ); + } else + tmp = strdup("alsa"); + gaddlist( &audio_driver_list,tmp ); + free(tmp); + } +#endif +#ifdef HAVE_SDL + if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"sdl",3 ) ) + { + char *tmp; + if (gtkAOSDLDriver) { + tmp = calloc( 1,strlen( gtkAOSDLDriver ) + 10 ); + sprintf( tmp,"sdl:%s",gtkAOSDLDriver ); + } else + tmp = strdup("sdl"); + gaddlist( &audio_driver_list,tmp ); + free(tmp); + } +#endif +#ifdef USE_ESD + if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"esd",3 ) ) + { + char *tmp; + if (gtkAOESDDevice) { + tmp = calloc( 1,strlen( gtkAOESDDevice ) + 10 ); + sprintf( tmp,"esd:%s",gtkAOESDDevice ); + } else + tmp = strdup("esd"); + gaddlist( &audio_driver_list,tmp ); + free(tmp); + } +#endif +// -- subtitle + //subdata->filename=gstrdup( guiIntfStruct.Subtitlename ); + stream_dump_type=0; + if ( gtkSubDumpMPSub ) stream_dump_type=4; + if ( gtkSubDumpSrt ) stream_dump_type=6; + gtkSubDumpMPSub=gtkSubDumpSrt=0; + guiLoadFont(); + +// --- misc + if ( gtkCacheOn ) stream_cache_size=gtkCacheSize; + if ( gtkAutoSyncOn ) autosync=gtkAutoSync; + + if ( guiIntfStruct.AudioFile ) audio_stream=gstrdup( guiIntfStruct.AudioFile ); + else if ( guiIntfStruct.FilenameChanged ) gfree( (void**)&audio_stream ); + //audio_stream=NULL; + + guiIntfStruct.DiskChanged=0; + guiIntfStruct.FilenameChanged=0; + guiIntfStruct.NewPlay=0; + +#ifdef USE_ASS + ass_enabled = gtkASS.enabled; + ass_use_margins = gtkASS.use_margins; + ass_top_margin = gtkASS.top_margin; + ass_bottom_margin = gtkASS.bottom_margin; +#endif + + break; + } + return False; +} + +void guiEventHandling( void ) +{ + if ( !guiIntfStruct.Playing || guiIntfStruct.NoWindow ) wsHandleEvents(); + gtkEventHandling(); +} + +// --- + +float gtkEquChannels[6][10]; + +plItem * plCurrent = NULL; +plItem * plList = NULL; +plItem * plLastPlayed = NULL; + +URLItem *URLList = NULL; + +char *fsHistory[fsPersistant_MaxPos] = { NULL,NULL,NULL,NULL,NULL }; + +#if defined( MP_DEBUG ) && 0 +void list( void ) +{ + plItem * next = plList; + printf( "--- list ---\n" ); + while( next || next->next ) + { + printf( "item: %s/%s\n",next->path,next->name ); + if ( next->next ) next=next->next; else break; + } + printf( "--- end of list ---\n" ); +} +#else +#define list(); +#endif + +void * gtkSet( int cmd,float fparam, void * vparam ) +{ + equalizer_t * eq = (equalizer_t *)vparam; + plItem * item = (plItem *)vparam; + + URLItem * url_item = (URLItem *)vparam; + int is_added = True; + + switch ( cmd ) + { +// --- handle playlist + case gtkAddPlItem: // add item to playlist + if ( plList ) + { + plItem * next = plList; + while ( next->next ) { /*printf( "%s\n",next->name );*/ next=next->next; } + next->next=item; item->prev=next; + } else { item->prev=item->next=NULL; plCurrent=plList=item; } + list(); + return NULL; + case gtkInsertPlItem: // add item into playlist after current + if ( plCurrent ) + { + plItem * curr = plCurrent; + item->next=curr->next; + if (item->next) + item->next->prev=item; + item->prev=curr; + curr->next=item; + plCurrent=plCurrent->next; + return plCurrent; + } + else + return gtkSet(gtkAddPlItem,0,(void*)item); + return NULL; + case gtkGetNextPlItem: // get current item from playlist + if ( plCurrent && plCurrent->next) + { + plCurrent=plCurrent->next; + /*if ( !plCurrent && plList ) + { + plItem * next = plList; + while ( next->next ) { if ( !next->next ) break; next=next->next; } + plCurrent=next; + }*/ + return plCurrent; + } + return NULL; + case gtkGetPrevPlItem: + if ( plCurrent && plCurrent->prev) + { + plCurrent=plCurrent->prev; + //if ( !plCurrent && plList ) plCurrent=plList; + return plCurrent; + } + return NULL; + case gtkSetCurrPlItem: // set current item + plCurrent=item; + return plCurrent; + case gtkGetCurrPlItem: // get current item + return plCurrent; + case gtkDelCurrPlItem: // delete current item + { + plItem * curr = plCurrent; + + if (!curr) + return NULL; + if (curr->prev) + curr->prev->next=curr->next; + if (curr->next) + curr->next->prev=curr->prev; + if (curr==plList) + plList=curr->next; + plCurrent=curr->next; + // Free it + if ( curr->path ) free( curr->path ); + if ( curr->name ) free( curr->name ); + free( curr ); + } + mplCurr(); // Instead of using mplNext && mplPrev + + return plCurrent; + case gtkDelPl: // delete list + { + plItem * curr = plList; + plItem * next; + if ( !plList ) return NULL; + if ( !curr->next ) + { + if ( curr->path ) free( curr->path ); + if ( curr->name ) free( curr->name ); + free( curr ); + } + else + { + while ( curr->next ) + { + next=curr->next; + if ( curr->path ) free( curr->path ); + if ( curr->name ) free( curr->name ); + free( curr ); + curr=next; + } + } + plList=NULL; plCurrent=NULL; + } + return NULL; + // ----- Handle url + case gtkAddURLItem: + if ( URLList ) + { + URLItem * next_url = URLList; + is_added = False; + while ( next_url->next ) + { + if ( !gstrcmp( next_url->url,url_item->url ) ) + { + is_added=True; + break; + } + next_url=next_url->next; + } + if ( ( !is_added )&&( gstrcmp( next_url->url,url_item->url ) ) ) next_url->next=url_item; + } else { url_item->next=NULL; URLList=url_item; } + return NULL; +// --- subtitle +#ifndef HAVE_FREETYPE + case gtkSetFontFactor: + font_factor=fparam; + guiLoadFont(); + return NULL; +#else + case gtkSetFontOutLine: + subtitle_font_thickness=( 8.0f / 100.0f ) * fparam; + guiLoadFont(); + return NULL; + case gtkSetFontBlur: + subtitle_font_radius=( 8.0f / 100.0f ) * fparam; + guiLoadFont(); + return NULL; + case gtkSetFontTextScale: + text_font_scale_factor=fparam; + guiLoadFont(); + return NULL; + case gtkSetFontOSDScale: + osd_font_scale_factor=fparam; + guiLoadFont(); + return NULL; + case gtkSetFontEncoding: + gfree( (void **)&subtitle_font_encoding ); + subtitle_font_encoding=gstrdup( (char *)vparam ); + guiLoadFont(); + return NULL; + case gtkSetFontAutoScale: + subtitle_autoscale=(int)fparam; + guiLoadFont(); + return NULL; +#endif +#ifdef USE_ICONV + case gtkSetSubEncoding: + gfree( (void **)&sub_cp ); + sub_cp=gstrdup( (char *)vparam ); + break; +#endif +// --- misc + case gtkClearStruct: + if ( (unsigned int)vparam & guiFilenames ) + { + gfree( (void **)&guiIntfStruct.Filename ); + gfree( (void **)&guiIntfStruct.Subtitlename ); + gfree( (void **)&guiIntfStruct.AudioFile ); + gtkSet( gtkDelPl,0,NULL ); + } +#ifdef USE_DVDREAD + if ( (unsigned int)vparam & guiDVD ) memset( &guiIntfStruct.DVD,0,sizeof( guiDVDStruct ) ); +#endif +#ifdef HAVE_VCD + if ( (unsigned int)vparam & guiVCD ) guiIntfStruct.VCDTracks=0; +#endif + return NULL; + case gtkSetExtraStereo: + gtkAOExtraStereoMul=fparam; + if (guiIntfStruct.afilter) + af_control_any_rev(guiIntfStruct.afilter, + AF_CONTROL_ES_MUL | AF_CONTROL_SET, >kAOExtraStereoMul); + return NULL; + case gtkSetPanscan: + { + mp_cmd_t * mp_cmd; + mp_cmd=calloc( 1,sizeof( *mp_cmd ) ); + mp_cmd->id=MP_CMD_PANSCAN; mp_cmd->name=strdup( "panscan" ); + mp_cmd->args[0].v.f=fparam; mp_cmd->args[1].v.i=1; + mp_input_queue_cmd( mp_cmd ); + } + return NULL; + case gtkSetAutoq: + auto_quality=(int)fparam; + return NULL; +// --- set equalizers + case gtkSetContrast: + if ( guiIntfStruct.sh_video ) set_video_colors( guiIntfStruct.sh_video,"contrast",(int)fparam ); + return NULL; + case gtkSetBrightness: + if ( guiIntfStruct.sh_video ) set_video_colors( guiIntfStruct.sh_video,"brightness",(int)fparam ); + return NULL; + case gtkSetHue: + if ( guiIntfStruct.sh_video ) set_video_colors( guiIntfStruct.sh_video,"hue",(int)fparam ); + return NULL; + case gtkSetSaturation: + if ( guiIntfStruct.sh_video ) set_video_colors( guiIntfStruct.sh_video,"saturation",(int)fparam ); + return NULL; + case gtkSetEqualizer: + { + af_control_ext_t tmp; + if ( eq ) + { + gtkEquChannels[eq->channel][eq->band]=eq->gain; + tmp.ch = eq->channel; + tmp.arg = gtkEquChannels[eq->channel]; + if (guiIntfStruct.afilter) + af_control_any_rev(guiIntfStruct.afilter, + AF_CONTROL_EQUALIZER_GAIN | AF_CONTROL_SET, &tmp); + } + else + { + int i; + memset( gtkEquChannels,0,sizeof( gtkEquChannels ) ); + if (guiIntfStruct.afilter) + for ( i=0;i<6;i++ ) + { + tmp.ch = i; + tmp.arg = gtkEquChannels[i]; + af_control_any_rev(guiIntfStruct.afilter, + AF_CONTROL_EQUALIZER_GAIN | AF_CONTROL_SET, &tmp); + } + } + return NULL; + } + } + return NULL; +} + +#define mp_basename(s) (strrchr(s,'/')==NULL?(char*)s:(strrchr(s,'/')+1)) + +#include "playtree.h" + +//This function adds/inserts one file into the gui playlist + +int import_file_into_gui(char* temp, int insert) +{ + char *filename, *pathname; + plItem * item; + + filename = strdup(mp_basename(temp)); + pathname = strdup(temp); + if (strlen(pathname)-strlen(filename)>0) + pathname[strlen(pathname)-strlen(filename)-1]='\0'; // We have some path so remove / at end + else + pathname[strlen(pathname)-strlen(filename)]='\0'; + mp_msg(MSGT_PLAYTREE,MSGL_V, "Adding filename %s && pathname %s\n",filename,pathname); //FIXME: Change to MSGL_DBG2 ? + item=calloc( 1,sizeof( plItem ) ); + if (!item) + return 0; + item->name=filename; + item->path=pathname; + if (insert) + gtkSet( gtkInsertPlItem,0,(void*)item ); // Inserts the item after current, and makes current=item + else + gtkSet( gtkAddPlItem,0,(void*)item ); + return 1; +} + + +// This function imports the initial playtree (based on cmd-line files) into the gui playlist +// by either: +// - overwriting gui pl (enqueue=0) +// - appending it to gui pl (enqueue=1) + +int import_initial_playtree_into_gui(play_tree_t* my_playtree, m_config_t* config, int enqueue) +{ + play_tree_iter_t* my_pt_iter=NULL; + int result=0; + + if (!enqueue) // Delete playlist before "appending" + gtkSet(gtkDelPl,0,0); + + if((my_pt_iter=pt_iter_create(&my_playtree,config))) + { + while ((filename=pt_iter_get_next_file(my_pt_iter))!=NULL) + { + if (import_file_into_gui(filename, 0)) // Add it to end of list + result=1; + } + } + + mplCurr(); // Update filename + mplGotoTheNext=1; + + if (!enqueue) + filename=guiIntfStruct.Filename; // Backward compatibility; if file is specified on commandline, + // gmplayer does directly start in Play-Mode. + else + filename=NULL; + + return result; +} + +// This function imports and inserts an playtree, that is created "on the fly", for example by +// parsing some MOV-Reference-File; or by loading an playlist with "File Open" +// +// The file which contained the playlist is thereby replaced with it's contents. + +int import_playtree_playlist_into_gui(play_tree_t* my_playtree, m_config_t* config) +{ + play_tree_iter_t* my_pt_iter=NULL; + int result=0; + plItem * save=(plItem*)gtkSet( gtkGetCurrPlItem, 0, 0); // Save current item + + if((my_pt_iter=pt_iter_create(&my_playtree,config))) + { + while ((filename=pt_iter_get_next_file(my_pt_iter))!=NULL) + { + if (import_file_into_gui(filename, 1)) // insert it into the list and set plCurrent=new item + result=1; + } + pt_iter_destroy(&my_pt_iter); + } + + if (save) + gtkSet(gtkSetCurrPlItem, 0, (void*)save); + else + gtkSet(gtkSetCurrPlItem, 0, (void*)plList); // go to head, if plList was empty before + + if (save && result) + gtkSet(gtkDelCurrPlItem, 0, 0); + + mplCurr(); // Update filename + filename=NULL; + + return result; +} + +// wrapper function for mp_msg to display a message box for errors and warnings. + +void guiMessageBox(int level, char * str) { + switch(level) { + case MSGL_FATAL: + gtkMessageBox(GTK_MB_FATAL|GTK_MB_SIMPLE, str); + break; + case MSGL_ERR: + gtkMessageBox(GTK_MB_ERROR|GTK_MB_SIMPLE, str); + break; +#if 0 +// WARNING! Do NOT enable this! There are too many non-critical messages with +// MSGL_WARN, for example: broken SPU packets, codec's bit error messages, +// etc etc, they should not raise up a new window every time. + case MSGL_WARN: + gtkMessageBox(GTK_MB_WARNING|GTK_MB_SIMPLE, str); + break; +#endif + } +} diff --git a/gui/interface.h b/gui/interface.h new file mode 100644 index 0000000000..2b14ba2362 --- /dev/null +++ b/gui/interface.h @@ -0,0 +1,229 @@ + +#ifndef _INTERFACE_H +#define _INTERFACE_H + +#include "../config.h" +#include "mplayer/play.h" +#include "libvo/font_load.h" +#include "cfg.h" + +#ifdef USE_DVDREAD + #include "stream/stream.h" +#endif + +typedef struct +{ + int x; + int y; + int width; + int height; +} guiResizeStruct; + +typedef struct +{ + int signal; + char module[512]; +} guiUnknownErrorStruct; + +typedef struct +{ + int seek; + int format; + int width; + int height; + char codecdll[128]; +} guiVideoStruct; + +#ifdef USE_DVDREAD +typedef struct +{ + int titles; + int chapters; + int angles; + int current_chapter; + int current_title; + int current_angle; + int nr_of_audio_channels; + stream_language_t audio_streams[32]; + int nr_of_subtitles; + stream_language_t subtitles[32]; +} guiDVDStruct; +#endif + +typedef struct +{ + int message; + guiResizeStruct resize; + guiVideoStruct videodata; + guiUnknownErrorStruct error; + + struct MPContext * mpcontext; + void * sh_video; + void * afilter; + void * demuxer; + void * event_struct; + + int DiskChanged; + int NewPlay; + +#ifdef USE_DVDREAD + guiDVDStruct DVD; + int Title; + int Angle; + int Chapter; +#endif + +#ifdef HAVE_VCD + int VCDTracks; +#endif + + int Playing; + float Position; + + int MovieWidth; + int MovieHeight; + int NoWindow; + + float Volume; + float Balance; + + int Track; + int AudioType; + int StreamType; + int AudioOnly; + int TimeSec; + int LengthInSec; + int FrameDrop; + int FileFormat; + float FPS; + + char * Filename; + int FilenameChanged; + + char * Subtitlename; + int SubtitleChanged; + + char * Othername; + int OtherChanged; + + char * AudioFile; + int AudioFileChanged; + + int SkinChange; +} guiInterface_t; + +extern guiInterface_t guiIntfStruct; + +#define guiXEvent 0 +#define guiCEvent 1 +#define guiIEvent 2 +#define guiSetDVD 3 +#define guiSetFileName 4 +#define guiSetState 5 +#define guiSetAudioOnly 6 +#define guiReDrawSubWindow 7 +#define guiSetShVideo 8 +#define guiSetStream 9 +#define guiReDraw 10 +#define guiSetVolume 11 +#define guiSetDefaults 12 +#define guiSetValues 13 +#define guiSetFileFormat 14 +#define guiSetDemuxer 15 +#define guiSetParameters 16 +#define guiSetAfilter 17 +#define guiSetContext 18 + +#define guiSetStop 0 +#define guiSetPlay 1 +#define guiSetPause 2 + +#define guiDVD 1 +#define guiVCD 2 +#define guiFilenames 4 +#define guiALL 0xffffffff + +extern int use_gui; + +extern char *get_path(const char *filename); + +extern void guiInit( void ); +extern void guiDone( void ); +extern int guiGetEvent( int type,char * arg ); +extern void guiEventHandling( void ); +extern void guiLoadFont( void ); +extern void guiLoadSubtitle( char * name ); +extern void guiMessageBox(int level, char * str); + +typedef struct _plItem +{ + struct _plItem * prev,* next; + int played; + char * path; + char * name; +} plItem; + +typedef struct _urlItem +{ + struct _urlItem *next; + char * url; +} URLItem; + +extern plItem * plList; +extern plItem * plCurrent; +extern plItem * plLastPlayed; + +extern URLItem * URLList; + +#define fsPersistant_MaxPath 512 +#define fsPersistant_MaxPos 5 +extern char * fsHistory[fsPersistant_MaxPos]; + +#define gtkSetContrast 0 +#define gtkSetBrightness 1 +#define gtkSetHue 2 +#define gtkSetSaturation 3 +#define gtkSetEqualizer 4 +#define gtkAddPlItem 5 +#define gtkGetNextPlItem 6 +#define gtkGetPrevPlItem 7 +#define gtkGetCurrPlItem 8 +#define gtkDelPl 9 +#define gtkSetExtraStereo 10 +#define gtkSetPanscan 11 +#define gtkSetFontFactor 12 +#define gtkSetAutoq 13 +#define gtkClearStruct 14 +#define gtkAddURLItem 15 +#define gtkSetFontOutLine 16 +#define gtkSetFontBlur 17 +#define gtkSetFontTextScale 18 +#define gtkSetFontOSDScale 19 +#define gtkSetFontEncoding 20 +#define gtkSetFontAutoScale 21 +#define gtkSetSubEncoding 22 +#define gtkDelCurrPlItem 23 +#define gtkInsertPlItem 24 +#define gtkSetCurrPlItem 25 + +extern float gtkEquChannels[6][10]; + +extern void * gtkSet( int cmd,float param, void * vparam ); + +extern char * gconvert_uri_to_filename( char * str ); +extern char * gstrdup( const char * str ); +extern int gstrcmp( const char * a,const char * b ); +extern void gfree( void ** p ); +extern void gaddlist( char *** list,const char * entry ); +extern char * gstrchr( char * str,int c ); + +#define guiSetFilename( s,n ) { gfree( (void **)&s ); s=gstrdup( n ); } + +#define guiSetDF( s,d,n ) \ + { \ + gfree( (void **)&s ); \ + s=malloc( strlen( d ) + strlen( n ) + 5 ); \ + sprintf( s,"%s/%s",d,n ); \ + } + +#endif diff --git a/gui/mplayer/common.c b/gui/mplayer/common.c new file mode 100644 index 0000000000..899389bff7 --- /dev/null +++ b/gui/mplayer/common.c @@ -0,0 +1,289 @@ + +// main window + +#include <stdlib.h> +#include <stdio.h> +#include <inttypes.h> +#include <sys/stat.h> +#include <unistd.h> + +#include "app.h" +#include "skin/font.h" +#include "skin/skin.h" +#include "wm/ws.h" + +#include "../config.h" +#include "../help_mp.h" +#include "../libvo/x11_common.h" +#include "../libvo/fastmemcpy.h" + +#include "../stream/stream.h" +#include "../mixer.h" +#include "../libvo/sub.h" + +#include "../libmpdemux/demuxer.h" +#include "../libmpdemux/stheader.h" +#include "../codec-cfg.h" + + +#include "play.h" +#include "widgets.h" + +extern unsigned int GetTimerMS( void ); + +inline void TranslateFilename( int c,char * tmp,size_t tmplen ) +{ + int i; + char * p; + + switch ( guiIntfStruct.StreamType ) + { + case STREAMTYPE_STREAM: + strlcpy(tmp, guiIntfStruct.Filename, tmplen); + break; + case STREAMTYPE_FILE: + if ( ( guiIntfStruct.Filename )&&( guiIntfStruct.Filename[0] ) ) + { + if ( (p = strrchr(guiIntfStruct.Filename, '/')) ) + strlcpy(tmp, p + 1, tmplen); + else + strlcpy(tmp, guiIntfStruct.Filename, tmplen); + if ( tmp[strlen( tmp ) - 4] == '.' ) tmp[strlen( tmp ) - 4]=0; + if ( tmp[strlen( tmp ) - 5] == '.' ) tmp[strlen( tmp ) - 5]=0; + } else strlcpy( tmp,MSGTR_NoFileLoaded,tmplen ); + break; +#ifdef USE_DVDREAD + case STREAMTYPE_DVD: + if ( guiIntfStruct.DVD.current_chapter ) snprintf(tmp,tmplen,MSGTR_Chapter,guiIntfStruct.DVD.current_chapter ); + else strlcat( tmp,MSGTR_NoChapter,tmplen ); + break; +#endif +#ifdef HAVE_VCD + case STREAMTYPE_VCD: + snprintf( tmp,tmplen,MSGTR_VCDTrack,guiIntfStruct.Track ); + break; +#endif + default: strlcpy( tmp,MSGTR_NoMediaOpened,tmplen ); + } + if ( c ) + { + for ( i=0;i < (int)strlen( tmp );i++ ) + { + int t=0; + if ( c == 1 ) { if ( ( tmp[i] >= 'A' )&&( tmp[i] <= 'Z' ) ) t=32; } + if ( c == 2 ) { if ( ( tmp[i] >= 'a' )&&( tmp[i] <= 'z' ) ) t=-32; } + tmp[i]=(char)( tmp[i] + t ); + } + } +} + +/* Unsafe! Pass only null-terminated strings as (char *)str. */ +char * Translate( char * str ) +{ + mixer_t *mixer = mpctx_get_mixer(guiIntfStruct.mpcontext); + static char trbuf[512]; + char tmp[512]; + int i,c; + int t; + int strsize = 0; + memset( trbuf,0,512 ); + memset( tmp,0,128 ); + strsize = strlen(str); + for ( c=0,i=0;i < strsize;i++ ) + { + if ( str[i] != '$' ) { trbuf[c++]=str[i]; trbuf[c]=0; } + else + { + switch ( str[++i] ) + { + case 't': snprintf( tmp,sizeof( tmp ),"%02d",guiIntfStruct.Track ); + strlcat( trbuf,tmp,sizeof( trbuf ) ); break; + case 'o': TranslateFilename( 0,tmp,sizeof( tmp ) ); + strlcat( trbuf,tmp,sizeof( trbuf ) ); break; + case 'f': TranslateFilename( 1,tmp,sizeof( tmp ) ); + strlcat( trbuf,tmp,sizeof( trbuf ) ); break; + case 'F': TranslateFilename( 2,tmp,sizeof( tmp ) ); + strlcat( trbuf,tmp,sizeof( trbuf ) ); break; + case '6': t=guiIntfStruct.LengthInSec; goto calclengthhhmmss; + case '1': t=guiIntfStruct.TimeSec; +calclengthhhmmss: + snprintf( tmp,sizeof( tmp ),"%02d:%02d:%02d",t/3600,t/60%60,t%60 ); + strlcat( trbuf,tmp,sizeof( trbuf ) ); + break; + case '7': t=guiIntfStruct.LengthInSec; goto calclengthmmmmss; + case '2': t=guiIntfStruct.TimeSec; +calclengthmmmmss: + snprintf( tmp,sizeof( tmp ),"%04d:%02d",t/60,t%60 ); + strlcat( trbuf,tmp,sizeof( trbuf ) ); + break; + case '3': snprintf( tmp,sizeof( tmp ),"%02d",guiIntfStruct.TimeSec / 3600 ); + strlcat( trbuf,tmp,sizeof( trbuf ) ); break; + case '4': snprintf( tmp,sizeof( tmp ),"%02d",( ( guiIntfStruct.TimeSec / 60 ) % 60 ) ); + strlcat( trbuf,tmp,sizeof( trbuf ) ); break; + case '5': snprintf( tmp,sizeof( tmp ),"%02d",guiIntfStruct.TimeSec % 60 ); + strlcat( trbuf,tmp,sizeof( trbuf ) ); break; + case '8': snprintf( tmp,sizeof( tmp ),"%01d:%02d:%02d",guiIntfStruct.TimeSec / 3600,( guiIntfStruct.TimeSec / 60 ) % 60,guiIntfStruct.TimeSec % 60 ); strlcat( trbuf,tmp,sizeof( trbuf ) ); break; + case 'v': snprintf( tmp,sizeof( tmp ),"%3.2f%%",guiIntfStruct.Volume ); + strlcat( trbuf,tmp,sizeof( trbuf ) ); break; + case 'V': snprintf( tmp,sizeof( tmp ),"%3.1f",guiIntfStruct.Volume ); + strlcat( trbuf,tmp,sizeof( trbuf ) ); break; + case 'b': snprintf( tmp,sizeof( tmp ),"%3.2f%%",guiIntfStruct.Balance ); + strlcat( trbuf,tmp,sizeof( trbuf ) ); break; + case 'B': snprintf( tmp,sizeof( tmp ),"%3.1f",guiIntfStruct.Balance ); + strlcat( trbuf,tmp,sizeof( trbuf ) ); break; + case 'd': snprintf( tmp,sizeof( tmp ),"%d",guiIntfStruct.FrameDrop ); + strlcat( trbuf,tmp,sizeof( trbuf ) ); break; + case 'x': snprintf( tmp,sizeof( tmp ),"%d",guiIntfStruct.MovieWidth ); + strlcat( trbuf,tmp,sizeof( trbuf ) ); break; + case 'y': snprintf( tmp,sizeof( tmp ),"%d",guiIntfStruct.MovieHeight ); + strlcat( trbuf,tmp,sizeof( trbuf ) ); break; + case 'C': snprintf( tmp,sizeof( tmp ),"%s", guiIntfStruct.sh_video? ((sh_video_t *)guiIntfStruct.sh_video)->codec->name : ""); + strlcat( trbuf,tmp,sizeof( trbuf ) ); break; + case 's': if ( guiIntfStruct.Playing == 0 ) strlcat( trbuf,"s",sizeof( trbuf ) ); break; + case 'l': if ( guiIntfStruct.Playing == 1 ) strlcat( trbuf,"p",sizeof( trbuf ) ); break; + case 'e': if ( guiIntfStruct.Playing == 2 ) strlcat( trbuf,"e",sizeof( trbuf ) ); break; + case 'a': + if ( mixer->muted ) { strlcat( trbuf,"n",sizeof( trbuf ) ); break; } + switch ( guiIntfStruct.AudioType ) + { + case 0: strlcat( trbuf,"n",sizeof( trbuf ) ); break; + case 1: strlcat( trbuf,"m",sizeof( trbuf ) ); break; + case 2: strlcat( trbuf,"t",sizeof( trbuf ) ); break; + } + break; + case 'T': + switch ( guiIntfStruct.StreamType ) + { + case STREAMTYPE_FILE: strlcat( trbuf,"f",sizeof( trbuf ) ); break; +#ifdef HAVE_VCD + case STREAMTYPE_VCD: strlcat( trbuf,"v",sizeof( trbuf ) ); break; +#endif + case STREAMTYPE_STREAM: strlcat( trbuf,"u",sizeof( trbuf ) ); break; +#ifdef USE_DVDREAD + case STREAMTYPE_DVD: strlcat( trbuf,"d",sizeof( trbuf ) ); break; +#endif + default: strlcat( trbuf," ",sizeof( trbuf ) ); break; + } + break; + case '$': strlcat( trbuf,"$",sizeof( trbuf ) ); break; + default: continue; + } + c=strlen( trbuf ); + } + } + return trbuf; +} + +static char * image_buffer = NULL; +static int image_width = 0; + +void PutImage( txSample * bf,int x,int y,int max,int ofs ) +{ + int i=0,ix,iy; + uint32_t * buf = NULL; + uint32_t * drw = NULL; + register uint32_t tmp; + register uint32_t yc; + + if ( ( !bf )||( bf->Image == NULL ) ) return; + + i=( bf->Width * ( bf->Height / max ) ) * ofs; + buf=(uint32_t *)image_buffer; + drw=(uint32_t *)bf->Image; + +#if 1 + for ( iy=y;iy < (int)(y+bf->Height / max);iy++ ) + for ( ix=x;ix < (int)(x+bf->Width);ix++ ) + { + tmp=drw[i++]; + if ( tmp != 0x00ff00ff ) buf[iy * image_width + ix]=tmp; + } +#else + yc=y * image_width; + for ( iy=y;iy < (int)(y+bf->Height / max);iy++ ) + { + for ( ix=x;ix < (int)(x+bf->Width);ix++ ) + { + tmp=drw[i++]; + if ( tmp != 0x00ff00ff ) buf[yc + ix]=tmp; + } + yc+=image_width; + } +#endif +} + +void SimplePotmeterPutImage( txSample * bf,int x,int y,float frac ) +{ + int i=0,w,r,ix,iy; + uint32_t * buf = NULL; + uint32_t * drw = NULL; + register uint32_t tmp; + + if ( ( !bf )||( bf->Image == NULL ) ) return; + + buf=(uint32_t *)image_buffer; + drw=(uint32_t *)bf->Image; + w=bf->Width*frac; + r=bf->Width-w; + for ( iy=y;iy < (int)(y+bf->Height);iy++ ) + { + for ( ix=x;ix < (int)(x+w);ix++ ) + { + tmp=drw[i++]; + if ( tmp != 0x00ff00ff ) buf[iy * image_width + ix]=tmp; + } + i+=r; + } +} + +void Render( wsTWindow * window,wItem * Items,int nrItems,char * db,int size ) +{ + wItem * item; + txSample * image = NULL; + int i; + + image_buffer=db; + image_width=window->Width; + + for( i=0;i < nrItems + 1;i++ ) + { + item=&Items[i]; + switch( item->type ) + { + case itButton: + PutImage( &item->Bitmap,item->x,item->y,3,item->pressed ); + break; + case itPotmeter: + if (item->phases == 1)SimplePotmeterPutImage( &item->Bitmap,item->x,item->y, item->value / 100.0f ); + else PutImage( &item->Bitmap,item->x,item->y,item->phases,( item->phases - 1 ) * ( item->value / 100.0f ) ); + break; + case itHPotmeter: + if (item->phases == 1)SimplePotmeterPutImage( &item->Bitmap,item->x,item->y, item->value / 100.0f ); + else PutImage( &item->Bitmap,item->x,item->y,item->phases,( item->phases - 1 ) * ( item->value / 100.0f ) ); + PutImage( &item->Mask,item->x + (int)( ( item->width - item->psx ) * item->value / 100.0f ),item->y,3,item->pressed ); + break; + case itVPotmeter: + PutImage( &item->Bitmap, + item->x,item->y, + item->phases, + item->phases * ( 1. - item->value / 100.0f ) ); + PutImage( &item->Mask, + item->x,item->y + (int)( ( item->height - item->psy ) * ( 1. - item->value / 100.0f ) ), + 3,item->pressed ); + break; + case itSLabel: + image=fntRender( item,0,"%s",item->label ); + if ( image ) PutImage( image,item->x,item->y,1,0 ); + case itDLabel: + { + char * t = Translate( item->label ); + int l = fntTextWidth( item->fontid,t ); + l=(l?l:item->width); + image=fntRender( item,l-(GetTimerMS() / 20)%l,"%s",t ); + } + if ( image ) PutImage( image,item->x,item->y,1,0 ); + break; + } + } + wsConvert( window,db,size ); +} diff --git a/gui/mplayer/common.h b/gui/mplayer/common.h new file mode 100644 index 0000000000..4cc6c7e152 --- /dev/null +++ b/gui/mplayer/common.h @@ -0,0 +1,20 @@ +#ifndef __COMMON_H +#define __COMMON_H + +#include <stdlib.h> +#include <stdio.h> +#include <inttypes.h> +#include <sys/stat.h> +#include <unistd.h> + +#include "app.h" +#include "bitmap.h" +#include "wm/ws.h" + +extern inline void TranslateFilename( int c,char * tmp ); +extern char * Translate( char * str ); +extern void PutImage( txSample * bf,int x,int y,int max,int ofs ); +extern void SimplePotmeterPutImage( txSample * bf,int x,int y,float frac ); +extern void Render( wsTWindow * window,wItem * Items,int nrItems,char * db,int size ); + +#endif diff --git a/gui/mplayer/gmplayer.h b/gui/mplayer/gmplayer.h new file mode 100644 index 0000000000..d7bd01b1ac --- /dev/null +++ b/gui/mplayer/gmplayer.h @@ -0,0 +1,35 @@ + +#ifndef __MYMPLAYERHANDLER +#define __MYMPLAYERHANDLER + +extern int mplSubRender; +extern int mplMainRender; + +extern unsigned char * mplDrawBuffer; +extern unsigned char * mplMenuDrawBuffer; +extern int mainVisible; + +extern int mplMainAutoPlay; +extern int mplMiddleMenu; + +extern void mplInit( void * disp ); +extern void mplEventHandling( int msg,float param ); + +extern void mplMainDraw( void ); +extern void mplEventHandling( int msg,float param ); +extern void mplMainMouseHandle( int Button,int X,int Y,int RX,int RY ); +extern void mplMainKeyHandle( int KeyCode,int Type,int Key ); +extern void mplDandDHandler(int num,char** files); + +extern void mplSubDraw( void ); +extern void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY ); + +extern void mplMenuInit( void ); +extern void mplHideMenu( int mx,int my,int w ); +extern void mplShowMenu( int mx,int my ); +extern void mplMenuMouseHandle( int X,int Y,int RX,int RY ); + +extern void mplPBInit( void ); +extern void mplPBShow( int x, int y ); + +#endif diff --git a/gui/mplayer/gtk/about.c b/gui/mplayer/gtk/about.c new file mode 100644 index 0000000000..a19bb55065 --- /dev/null +++ b/gui/mplayer/gtk/about.c @@ -0,0 +1,329 @@ + +#include "app.h" +#include "config.h" +#include "help_mp.h" + +#include "mplayer/pixmaps/about.xpm" +#include "../widgets.h" +#include "about.h" +#include "common.h" + +GtkWidget * About = NULL; + +void ShowAboutBox( void ) +{ + if ( About ) gtkActive( About ); + else About=create_About(); + gtk_widget_show( About ); +} + +void abWidgetDestroy( GtkWidget * widget,GtkWidget ** widget_pointer ) +{ WidgetDestroy( NULL,&About ); } + +GtkWidget * create_About( void ) +{ + GtkWidget * vbox; + GtkWidget * pixmap1; + GtkWidget * scrolledwindow1; + GtkWidget * AboutText; + GtkWidget * Ok; + +#ifdef HAVE_GTK2_GUI + GtkTextBuffer * AboutTextBuffer; + GtkTextIter iter; +#endif //HAVE_GTK2_GUI + + GtkStyle * pixmapstyle; + GdkPixmap * pixmapwid; + GdkBitmap * mask; + + GtkAccelGroup * accel_group; + + accel_group=gtk_accel_group_new(); + + About=gtk_window_new( GTK_WINDOW_TOPLEVEL ); + gtk_widget_set_name( About,MSGTR_About ); + gtk_object_set_data( GTK_OBJECT( About ),MSGTR_About,About ); + gtk_widget_set_usize( About,340,415 ); + gtk_window_set_title( GTK_WINDOW( About ),MSGTR_About ); + gtk_window_set_position( GTK_WINDOW( About ),GTK_WIN_POS_CENTER ); + gtk_window_set_policy( GTK_WINDOW( About ),TRUE,FALSE,FALSE ); + gtk_window_set_wmclass( GTK_WINDOW( About ),"About","MPlayer" ); + + gtk_widget_realize( About ); + gtkAddIcon( About ); + + vbox=AddVBox( AddDialogFrame( About ),0 ); + + pixmapstyle=gtk_widget_get_style( About ); + pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( About->window,gdk_colormap_get_system(),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],about_xpm ); + pixmap1=gtk_pixmap_new( pixmapwid,mask ); + + gtk_widget_set_name( pixmap1,"pixmap1" ); + gtk_widget_show( pixmap1 ); + gtk_box_pack_start( GTK_BOX( vbox ),pixmap1,FALSE,FALSE,0 ); + gtk_widget_set_usize( pixmap1,-2,174 ); + + AddHSeparator( vbox ); + + scrolledwindow1=gtk_scrolled_window_new( NULL,NULL ); + gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" ); + gtk_widget_show( scrolledwindow1 ); + gtk_box_pack_start( GTK_BOX( vbox ),scrolledwindow1,TRUE,TRUE,0 ); + gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC ); + +#ifdef HAVE_GTK2_GUI + AboutText = gtk_text_view_new(); + gtk_text_view_set_editable(GTK_TEXT_VIEW(AboutText), FALSE); + gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(AboutText), FALSE); + AboutTextBuffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (AboutText)); + gtk_text_buffer_get_iter_at_offset (AboutTextBuffer, &iter, 0); +#else + AboutText=gtk_text_new( NULL,NULL ); + gtk_text_set_editable(GTK_TEXT(AboutText), FALSE); +#endif + gtk_widget_set_name( AboutText,"AboutText" ); + gtk_widget_show( AboutText ); + gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText ); +#ifdef HAVE_GTK2_GUI + gtk_text_buffer_insert (AboutTextBuffer, &iter, +#else + gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL, +#endif + "\n" + MSGTR_ABOUT_UHU + " (http://www.uhulinux.hu/)\n" + "\n" + MSGTR_ABOUT_Contributors + "\n" + " * Ackermann, Andreas\n" + " * adland\n" + " * Anholt, Eric\n" + " * Ashberg, Folke\n" + " * Balatoni, Dénes\n" + " * Barat, Zsolt\n" + " * Barbato, Luca\n" + " * Baryshkov, Dmitry\n" + " * Baudet, Bertrand\n" + " * Bedel, Alban\n" + " * Behrisch, Michael\n" + " * Belev, Luchezar\n" + " * Bérczi, Gábor\n" + " * Berecz, Szabolcs\n" + " * Beregszászi, Alex\n" + " * Bitterberg, Tilmann\n" + " * Biurrun, Diego\n" + " * Blomenkamp, Marcsu\n" + " * Buehler, Andrew\n" + " * Bulgroz, Eviv\n" + " * Bünemann, Felix\n" + " * Bunkus, Moritz\n" + " * Christiansen, Dan Villiom Podlaski\n" + " * Clagg, Jeff\n" + " * Compn\n" + " * Comstedt, Marcus\n" + " * Cook, Kees\n" + " * Davies, Stephen\n" + " * Di Vita, Piero\n" + " * Diedrich, Tobias\n" + " * Dietrich, Florian\n" + " * Dobbelaere, Jeroen\n" + " * Döffinger, Reimar\n" + " * Dolbeau, Romain\n" + " * Dönmez, Ismail\n" + " * Edele, Robert\n" + " * Egger, Christoph\n" + " * Elsinghorst, Paul Wilhelm\n" + " * Ernesti, Bernd\n" + " * Falco, Salvatore\n" + " * Feigl, Johannes\n" + " * Felker, D Richard III\n" + " * Ferguson, Tim\n" + " * Finlayson, Ross\n" + " * Forghieri, Daniele\n" + " * Foth, Kilian A.\n" + " * Franz, Fabian\n" + " * Gansser, Martin\n" + " * Gereöffy, Ãrpád\n" + " * Giani, Matteo\n" + " * Goethel, Sven\n" + " * Gomez Garcia, German\n" + " * Gottwald, Alexander\n" + " * Graffam, Michael\n" + " * Gritsenko, Andriy N.\n" + " * Guyomarch, Rémi\n" + " * Hammelmann, Jürgen\n" + " * Hertel, Christopher R.\n" + " * Hess, Andreas\n" + " * Hickey, Corey\n" + " * Hidvégi, Zoltán\n" + " * Hoffmann, Jens\n" + " * Holm, David\n" + " * Horst, Bohdan\n" + " * Hug, Hampa\n" + " * Hurka, Tomas\n" + " * Isani, Sidik\n" + " * Issaris, Panagiotis\n" + " * Jacobs, Aurelien\n" + " * Jelveh, Reza\n" + " * Jermann, Jonas\n" + " * Johansson, Anders\n" + " * Kain, Nicholas\n" + " * Kalinski, Filip\n" + " * Kalvachev, Ivan\n" + " * Kaniewski, Wojtek\n" + " * Kaplan, Kim Minh\n" + " * Kärkkäinen, Samuli\n" + " * Keil, Jürgen\n" + " * Kesterson, Robert\n" + " * Kinali, Attila\n" + " * Kovriga, Gregory\n" + " * Kühling, David\n" + " * Kuivinen, Fredrik\n" + " * Kurshev, Nick\n" + " * Kuschak, Brian\n" + " * Kushnir, Vladimir\n" + " * Lambley, Dave\n" + " * László, Gyula\n" + " * Le Gaillart, Nicolas\n" + " * Lénárt, Gábor\n" + " * Leroy, Colin\n" + " * Liljeblad, Oskar\n" + " * Lin, Sam\n" + " * Lombard, Pierre\n" + " * Madick, Puk\n" + " * Makovicka, Jindrich\n" + " * Marek, Rudolf\n" + " * Megyer, László\n" + " * Melanson, Mike\n" + " * von Merkatz, Arwed\n" + " * Merritt, Loren\n" + " * Mierzejewski, Dominik\n" + " * Milushev, Mihail\n" + " * Mistry, Nehal\n" + " * Mohari, András\n" + " * Mueller, Steven\n" + " * Neundorf, Alexander\n" + " * Niedermayer, Michael\n" + " * Noring, Fredrik\n" + " * Ohm, Christian\n" + " * Parrish, Joey\n" + " * Pietrzak, Dariusz\n" + " * Plourde, Nicolas\n" + " * Poettering, Lennart\n" + " * Poirier, Guillaume\n" + " * Ponekker, Zoltán\n" + " * van Poorten, Ivo\n" + " * Ran, Lu\n" + " * Reder, Uwe\n" + " * rgselk\n" + " * Rune Petersen\n" + " * Saari, Ville\n" + " * Sabbi, Nico\n" + " * Sandell, Björn\n" + " * Sauerbeck, Tilman\n" + " * Scherthan, Frank\n" + " * Schneider, Florian\n" + " * Schoenbrunner, Oliver\n" + " * Shimon, Oded\n" + " * Simon, Peter\n" + " * Snel, Rik\n" + " * Sommer, Sascha\n" + " * Strasser, Alexander\n" + " * Strzelecki, Kamil\n" + " * Svoboda, Jiri\n" + " * Swain, Robert\n" + " * Syrjälä, Ville\n" + " * Szecsi, Gabor\n" + " * Tackaberry, Jason\n" + " * Tam, Howell\n" + " * Tlalka, Adam\n" + " * Tiesi, Gianluigi\n" + " * Togni, Roberto\n" + " * Tropea, Salvador Eduardo\n" + " * Vajna, Miklós\n" + " * Verdejo Pinochet, Reynaldo H.\n" + " * Wigren, Per\n" + " * Witt, Derek J\n" + " * Young, Alan\n" + " * Zaprzala, Artur\n" + " * Zealey, Mark\n" + " * Ziv-Av, Matan\n" + " * Zoltán, Márk Vicián\n" + "\n" + MSGTR_ABOUT_Codecs_libs_contributions + "\n" + " * Bellard, Fabrice\n" + " * Chappelier, Vivien and Vincent, Damien\n" + " * Hipp, Michael\n" + " * Holtzman, Aaron\n" + " * Janovetz, Jake\n" + " * Kabelac, Zdenek\n" + " * Kuznetsov, Eugene\n" + " * Lespinasse, Michel\n" + " * Podlipec, Mark\n" + "\n" + MSGTR_ABOUT_Translations + "\n" + " * Biernat, Marcin\n" + " * Fargas, Marc\n" + " * Heryan, Jiri\n" + " * Jarycki, Marek\n" + " * Kaplita, Leszek\n" + " * Krämer, Sebastian\n" + " * López, Juan Martin\n" + " * Michniewski, Piotr\n" + " * Misiorny, Jakub\n" + " * Mizda, Gábor\n" + " * Paszta, Maciej\n" + " * Proszek, Åukasz\n" + " * Schiller, WacÅ‚aw\n" + " * Zubimendi, Andoni\n" + "\n" + MSGTR_ABOUT_Skins + "\n" + " * Azrael\n" + " * Bekesi, Viktor\n" + " * Burt.S.\n" + " * Carpenter, Andrew\n" + " * Foucault, Charles\n" + " * Gyimesi, Attila\n" + " * Hertroys, Alban\n" + " * Juan Pablo\n" + " * Kiss, Balint\n" + " * Kuehne, Andre\n" + " * Kuhlmann, Rüdiger\n" + " * Naumov, Dan\n" + " * Northam, Ryan\n" + " * Oyarzun Arroyo\n" + " * Park, DongCheon\n" + " * Pehrson, Jurgen\n" + " * Pizurica, Nikola\n" + " * Ptak, Oliwier\n" + " * Riccio, Pasquale\n" + " * Schultz, Jesper\n" + " * Szumiela, Marcin\n" + " * Tisi, Massimo\n" + " * Tyr, Jiri jun.\n" + " * Vasilev, Ognian\n" + " * Veres, Imre\n" + " * Vesko, Radic\n" + " * Vigvary, Balasz\n" + " * Weber, Andrew\n" + " * Whitmore, Gary Jr.\n" + " * Wilamowski, Franciszek\n" + " * Zeising, Michael\n" + "\n",-1 ); + + AddHSeparator( vbox ); + Ok=AddButton( MSGTR_Ok,AddHButtonBox( vbox ) ); + + gtk_signal_connect( GTK_OBJECT( About ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&About ); + gtk_signal_connect_object( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( abWidgetDestroy ),NULL ); + + gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); + gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); + gtk_window_add_accel_group( GTK_WINDOW( About ),accel_group ); + + return About; +} diff --git a/gui/mplayer/gtk/about.h b/gui/mplayer/gtk/about.h new file mode 100644 index 0000000000..66d5f147ae --- /dev/null +++ b/gui/mplayer/gtk/about.h @@ -0,0 +1,12 @@ + +#ifndef __GUI_ABOUT_H +#define __GUI_ABOUT_H + +#include <gtk/gtk.h> + +extern GtkWidget * About; + +extern GtkWidget * create_About( void ); +extern void ShowAboutBox( void ); + +#endif diff --git a/gui/mplayer/gtk/common.c b/gui/mplayer/gtk/common.c new file mode 100644 index 0000000000..7a21969e2f --- /dev/null +++ b/gui/mplayer/gtk/common.c @@ -0,0 +1,180 @@ + +#include <gdk/gdkkeysyms.h> +#include <gtk/gtk.h> + +#include "common.h" + +void WidgetDestroy( GtkWidget * widget,GtkWidget ** widget_pointer ) +{ + if ( !widget_pointer ) return; + gtk_widget_hide( *widget_pointer ); + gtk_widget_destroy( *widget_pointer ); + *widget_pointer=NULL; +} + +GtkWidget * AddDialogFrame( GtkWidget * parent ) +{ + GtkWidget * frame; + frame=AddFrame( NULL,GTK_SHADOW_IN,parent,1 ); + gtk_container_set_border_width( GTK_CONTAINER( frame ),1 ); + frame=AddFrame( NULL,GTK_SHADOW_NONE,frame,1 ); + frame=AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,frame,1 ); + frame=AddFrame( NULL,GTK_SHADOW_NONE,frame,1 ); + return frame; +} + +GtkWidget * AddFrame( const char * title,int type,GtkWidget * parent,int add ) +{ + GtkWidget * frame = NULL; + frame=gtk_frame_new( title ); + gtk_widget_set_name( frame,"frame" ); + gtk_widget_show( frame ); + gtk_frame_set_shadow_type( GTK_FRAME( frame ),type ); + if ( !parent ) return frame; + if ( add ) gtk_container_add( GTK_CONTAINER( parent ),frame ); + else gtk_box_pack_start( GTK_BOX( parent ),frame,FALSE,FALSE,0 ); + return frame; +} + +GtkWidget * AddLabel( const char * title,GtkWidget * parent ) +{ + GtkWidget * label; + label=gtk_label_new( title ); + gtk_widget_set_name( label,"label" ); + gtk_widget_show( label ); + if ( parent ) gtk_box_pack_start( GTK_BOX( parent ),label,FALSE,FALSE,0 ); + gtk_misc_set_alignment( GTK_MISC( label ),0,0.5 ); + gtk_misc_set_padding( GTK_MISC( label ),4,0 ); + return label; +} + +GtkWidget * AddVBox( GtkWidget * parent,int type ) +{ + GtkWidget * vbox; + vbox=gtk_vbox_new( FALSE,0 ); + gtk_widget_set_name( vbox,"vbox" ); + gtk_widget_show( vbox ); + if ( parent ) + { + if ( type ) gtk_box_pack_start( GTK_BOX( parent ),vbox,FALSE,FALSE,0 ); + else gtk_container_add( GTK_CONTAINER( parent ),vbox ); + } + return vbox; +} + +GtkWidget * AddHBox( GtkWidget * parent,int type ) +{ + GtkWidget * hbox; + hbox=gtk_hbox_new( FALSE,0 ); + gtk_widget_set_name( hbox,"hbox" ); + gtk_widget_show( hbox ); + if ( parent ) + { + if ( type ) gtk_box_pack_start( GTK_BOX( parent ),hbox,FALSE,FALSE,0 ); + else gtk_container_add( GTK_CONTAINER( parent ),hbox ); + } + return hbox; +} + +GtkWidget * AddCheckButton( const char * title, GtkWidget * parent ) +{ + GtkWidget * CB; + CB=gtk_check_button_new_with_label( title ); + gtk_widget_set_name( CB,"CB" ); + gtk_widget_show( CB ); + gtk_box_pack_start( GTK_BOX( parent ),CB,FALSE,FALSE,0 ); + return CB; +} + +GtkWidget * AddRadioButton( const char * title,GSList ** group,GtkWidget * parent ) +{ + GtkWidget * RB; + RB=gtk_radio_button_new_with_label( *group,title ); + *group=gtk_radio_button_group( GTK_RADIO_BUTTON( RB ) ); + gtk_widget_set_name( RB,"RB" ); + gtk_widget_show( RB ); + gtk_box_pack_start( GTK_BOX( parent ),RB,FALSE,FALSE,0 ); + return RB; +} + +GtkWidget * AddSpinButton( const char * title,GtkAdjustment * adj,GtkWidget * parent ) +{ + GtkWidget * SB; + GtkWidget * label; + label=gtk_label_new( title ); + gtk_misc_set_alignment( GTK_MISC( label ),0,0.5 ); + gtk_box_pack_start( GTK_BOX( parent ),label,FALSE,FALSE,0 ); + gtk_widget_show( label ); + SB=gtk_spin_button_new( adj,0,0 ); + gtk_widget_set_name( SB,"SB" ); + gtk_box_pack_start( GTK_BOX( parent ),SB,FALSE,FALSE,0 ); + gtk_widget_show( SB ); + return SB; +} + +GtkWidget * AddButton( const char * title,GtkWidget * parent ) +{ + GtkWidget * B; + B=gtk_button_new_with_label( title ); + gtk_widget_set_name( B,"B" ); + gtk_widget_show( B ); + gtk_container_add( GTK_CONTAINER( parent ),B ); + return B; +} + +GtkWidget * AddHSeparator( GtkWidget * parent ) +{ + GtkWidget * hseparator; + hseparator=gtk_hseparator_new(); + gtk_widget_set_name( hseparator,"hseparator1" ); + gtk_widget_show( hseparator ); + gtk_box_pack_start( GTK_BOX( parent ),hseparator,FALSE,FALSE,0 ); + gtk_widget_set_usize( hseparator,-2,6 ); + return hseparator; +} + +GtkWidget * AddHButtonBox( GtkWidget * parent ) +{ + GtkWidget * hbuttonbox; + hbuttonbox=gtk_hbutton_box_new(); + gtk_widget_set_name( hbuttonbox,"hbuttonbox" ); + gtk_widget_show( hbuttonbox ); + gtk_box_pack_start( GTK_BOX( parent ),hbuttonbox,FALSE,FALSE,0 ); + gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox ),85,20 ); + return hbuttonbox; +} + +GtkWidget * AddHScaler( GtkAdjustment * adj,GtkWidget * parent,int digit ) +{ + GtkWidget * HS; + HS=gtk_hscale_new( adj ); + gtk_widget_set_name( HS,"HS" ); + gtk_widget_show( HS ); + if ( parent ) gtk_box_pack_start( GTK_BOX( parent ),HS,TRUE,TRUE,0 ); + gtk_scale_set_value_pos( GTK_SCALE( HS ),GTK_POS_RIGHT ); + gtk_scale_set_digits( GTK_SCALE( HS ),digit ); + return HS; +} + +GtkWidget * AddVScaler( GtkAdjustment * adj,GtkWidget * parent,int digit ) +{ + GtkWidget * VS; + VS=gtk_vscale_new( adj ); + gtk_widget_set_name( VS,"VS" ); + gtk_widget_show( VS ); + if ( parent ) gtk_box_pack_start( GTK_BOX( parent ),VS,TRUE,TRUE,0 ); +// gtk_scale_set_value_pos( GTK_SCALE( VS ),GTK_POS_RIGHT ); + if ( digit == -1 ) gtk_scale_set_draw_value( GTK_SCALE( VS ),FALSE ); + else gtk_scale_set_digits( GTK_SCALE( VS ),digit ); + return VS; +} + +GtkWidget * AddComboBox( GtkWidget * parent ) +{ + GtkWidget * CB; + CB=gtk_combo_new(); + gtk_widget_set_name( CB,"CB" ); + gtk_widget_show( CB ); + if ( parent ) gtk_box_pack_start( GTK_BOX( parent ),CB,TRUE,TRUE,0 ); + return CB; +} diff --git a/gui/mplayer/gtk/common.h b/gui/mplayer/gtk/common.h new file mode 100644 index 0000000000..d68a977622 --- /dev/null +++ b/gui/mplayer/gtk/common.h @@ -0,0 +1,24 @@ + +#ifndef __COMMON_H +#define __COMMON_H + +#include <gdk/gdkkeysyms.h> +#include <gtk/gtk.h> + +extern GtkWidget * AddDialogFrame( GtkWidget * parent ); +extern GtkWidget * AddFrame( const char * title,int type,GtkWidget * parent,int add ); +extern GtkWidget * AddLabel( const char * title,GtkWidget * parent ); +extern GtkWidget * AddVBox( GtkWidget * parent,int type ); +extern GtkWidget * AddHBox( GtkWidget * parent,int type ); +extern GtkWidget * AddCheckButton( const char * title, GtkWidget * parent ); +extern GtkWidget * AddRadioButton( const char * title,GSList ** group,GtkWidget * parent ); +extern GtkWidget * AddSpinButton( const char * title,GtkAdjustment * adj,GtkWidget * parent ); +extern GtkWidget * AddButton( const char * title,GtkWidget * parent ); +extern GtkWidget * AddHSeparator( GtkWidget * parent ); +extern GtkWidget * AddHButtonBox( GtkWidget * parent ); +extern GtkWidget * AddHScaler( GtkAdjustment * adj,GtkWidget * parent,int digit ); +extern GtkWidget * AddVScaler( GtkAdjustment * adj,GtkWidget * parent,int digit ); +extern GtkWidget * AddComboBox( GtkWidget * parent ); +extern void WidgetDestroy( GtkWidget * widget,GtkWidget ** widget_pointer ); + +#endif diff --git a/gui/mplayer/gtk/eq.c b/gui/mplayer/gtk/eq.c new file mode 100644 index 0000000000..640a7502d5 --- /dev/null +++ b/gui/mplayer/gtk/eq.c @@ -0,0 +1,670 @@ + +#include <stdlib.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +#include <string.h> + +#include <gdk/gdkkeysyms.h> +#include <gtk/gtk.h> + +#include "app.h" +#include "cfg.h" +#include "config.h" +#include "help_mp.h" +#include "libaf/equalizer.h" +#include "libvo/video_out.h" +#include "../widgets.h" + +#include "eq.h" +#include "common.h" + +#define eqRange 15 + +GtkWidget * Equalizer = NULL; +static GtkWidget * EquConfig; + +static GtkWidget * Notebook; +static GtkWidget * ChannelsList; +static GtkWidget * VContrast, * VBrightness, * VHue, * VSaturation; +static GtkAdjustment * VContrastadj, * VBrightnessadj, * VHueadj, * VSaturationadj; +static GtkWidget * Ok, * Clear, * Config; +static GtkWidget * A3125, * A125, * A6250, * A250, * A500, * A1000, * A2000, * A4000, * A8000, * A16000; +static GtkAdjustment * A3125adj, * A125adj, * A6250adj, * A250adj, * A500adj, * A1000adj, * A2000adj, * A4000adj, * A8000adj, * A16000adj; + +static int Channel = -1; + +// --- + +char * gtkEquChannel1 = NULL; +char * gtkEquChannel2 = NULL; +char * gtkEquChannel3 = NULL; +char * gtkEquChannel4 = NULL; +char * gtkEquChannel5 = NULL; +char * gtkEquChannel6 = NULL; + +// --- + +void ShowEquConfig( void ); +void HideEquConfig( void ); + +static void eqSetBands( int channel ) +{ + if ( channel < 0 ) channel=0; + gtk_adjustment_set_value( A3125adj,0.0f - gtkEquChannels[channel][0] ); + gtk_adjustment_set_value( A6250adj,0.0f - gtkEquChannels[channel][1] ); + gtk_adjustment_set_value( A125adj,0.0f - gtkEquChannels[channel][2] ); + gtk_adjustment_set_value( A250adj,0.0f - gtkEquChannels[channel][3] ); + gtk_adjustment_set_value( A500adj,0.0f - gtkEquChannels[channel][4] ); + gtk_adjustment_set_value( A1000adj,0.0f - gtkEquChannels[channel][5] ); + gtk_adjustment_set_value( A2000adj,0.0f - gtkEquChannels[channel][6] ); + gtk_adjustment_set_value( A4000adj,0.0f - gtkEquChannels[channel][7] ); + gtk_adjustment_set_value( A8000adj,0.0f - gtkEquChannels[channel][8] ); + gtk_adjustment_set_value( A16000adj,0.0f - gtkEquChannels[channel][9] ); + + if ( guiIntfStruct.sh_video ) + { + get_video_colors( guiIntfStruct.sh_video,"brightness",&vo_gamma_brightness ); + get_video_colors( guiIntfStruct.sh_video,"contrast",&vo_gamma_contrast ); + get_video_colors( guiIntfStruct.sh_video,"hue",&vo_gamma_hue ); + get_video_colors( guiIntfStruct.sh_video,"saturation",&vo_gamma_saturation ); + } + + gtk_adjustment_set_value( VContrastadj,(float)vo_gamma_contrast ); + gtk_adjustment_set_value( VBrightnessadj,(float)vo_gamma_brightness ); + gtk_adjustment_set_value( VHueadj,(float)vo_gamma_hue ); + gtk_adjustment_set_value( VSaturationadj,(float)vo_gamma_saturation ); +} + +static void eqSetChannelNames( void ) +{ + gchar * str[2]; + gtk_clist_clear( GTK_CLIST( ChannelsList ) ); + str[1]=""; + str[0]=MSGTR_EQU_All; + gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); + if ( guiIntfStruct.AudioType > 1 ) + { + str[0]=gtkEquChannel1; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); + str[0]=gtkEquChannel2; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); + } + if ( guiIntfStruct.AudioType > 2 ) + { + str[0]=gtkEquChannel3; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); + str[0]=gtkEquChannel4; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); + } + if ( guiIntfStruct.AudioType > 4 ) + { + str[0]=gtkEquChannel5; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); + str[0]=gtkEquChannel6; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); + } + gtk_clist_select_row( GTK_CLIST( ChannelsList ),0,0 ); +} + +void ShowEqualizer( void ) +{ + if ( Equalizer ) gtkActive( Equalizer ); + else Equalizer=create_Equalizer(); + + if ( !gtkEquChannel1 ) gtkEquChannel1=strdup( MSGTR_EQU_Front_Right ); + if ( !gtkEquChannel2 ) gtkEquChannel2=strdup( MSGTR_EQU_Front_Left ); + if ( !gtkEquChannel3 ) gtkEquChannel3=strdup( MSGTR_EQU_Back_Right ); + if ( !gtkEquChannel4 ) gtkEquChannel4=strdup( MSGTR_EQU_Back_Left ); + if ( !gtkEquChannel5 ) gtkEquChannel5=strdup( MSGTR_EQU_Center ); + if ( !gtkEquChannel6 ) gtkEquChannel6=strdup( MSGTR_EQU_Bass ); + + eqSetChannelNames(); + + if ( !guiIntfStruct.Playing || !guiIntfStruct.sh_video ) + { + gtk_widget_set_sensitive( VContrast,FALSE ); + gtk_widget_set_sensitive( VBrightness,FALSE ); + gtk_widget_set_sensitive( VHue,FALSE ); + gtk_widget_set_sensitive( VSaturation,FALSE ); + } + Channel=-1; + eqSetBands( 0 ); + if ( !guiIntfStruct.Playing || !gtkEnableAudioEqualizer ) + { + gtk_widget_set_sensitive( ChannelsList,FALSE ); + gtk_widget_set_sensitive( A3125,FALSE ); + gtk_widget_set_sensitive( A125,FALSE ); + gtk_widget_set_sensitive( A6250,FALSE ); + gtk_widget_set_sensitive( A250,FALSE ); + gtk_widget_set_sensitive( A500,FALSE ); + gtk_widget_set_sensitive( A1000,FALSE ); + gtk_widget_set_sensitive( A2000,FALSE ); + gtk_widget_set_sensitive( A4000,FALSE ); + gtk_widget_set_sensitive( A8000,FALSE ); + gtk_widget_set_sensitive( A16000,FALSE ); + } + + if ( gtk_notebook_get_current_page( GTK_NOTEBOOK( Notebook ) ) == 0 ) gtk_widget_show( Config ); + gtk_widget_show( Equalizer ); +} + +void HideEqualizer( void ) +{ + if ( !Equalizer ) return; + gtk_widget_hide( Equalizer ); + gtk_widget_destroy( Equalizer ); + Equalizer=NULL; + if ( EquConfig ) HideEquConfig(); +} + +static gboolean eqHScaleMotion( GtkWidget * widget,GdkEventMotion * event,gpointer user_data ) +{ + equalizer_t eq; + switch ( (int)user_data ) + { + case 0: eq.gain=A3125adj->value; break; + case 1: eq.gain=A6250adj->value; break; + case 2: eq.gain=A125adj->value; break; + case 3: eq.gain=A250adj->value; break; + case 4: eq.gain=A500adj->value; break; + case 5: eq.gain=A1000adj->value; break; + case 6: eq.gain=A2000adj->value; break; + case 7: eq.gain=A4000adj->value; break; + case 8: eq.gain=A8000adj->value; break; + case 9: eq.gain=A16000adj->value; break; + default: return FALSE; + } + eq.gain=0.0f - eq.gain; + eq.band=(int)user_data; + if ( Channel == -1 ) + { + int i; + for ( i=0;i<6;i++ ) + { eq.channel=i; gtkSet( gtkSetEqualizer,0,&eq ); } + } else { eq.channel=Channel; gtkSet( gtkSetEqualizer,0,&eq ); } + + return FALSE; +} + +static gboolean eqVScaleMotion( GtkWidget * widget,GdkEventMotion * event,gpointer user_data ) +{ + + switch( (int)user_data ) + { + case 1: gtkSet( gtkSetContrast,VContrastadj->value,NULL ); break; + case 2: gtkSet( gtkSetBrightness,VBrightnessadj->value,NULL ); break; + case 3: gtkSet( gtkSetHue,VHueadj->value,NULL ); break; + case 4: gtkSet( gtkSetSaturation,VSaturationadj->value,NULL ); break; + } + + return FALSE; +} + +static void eqButtonReleased( GtkButton * button,gpointer user_data ) +{ + switch( (int)user_data ) + { + case 0: HideEqualizer(); break; + case 1: + if ( gtk_notebook_get_current_page( GTK_NOTEBOOK( Notebook ) ) == 0 ) + { + if ( !guiIntfStruct.Playing || !gtkEnableAudioEqualizer ) break; + gtkSet( gtkSetEqualizer,0,NULL ); + eqSetBands( Channel ); + } + else + { + if ( !guiIntfStruct.Playing ) break; + gtkSet( gtkSetContrast,0.0f,NULL ); + gtkSet( gtkSetBrightness,0.0f,NULL ); + gtkSet( gtkSetHue,0.0f,NULL ); + gtkSet( gtkSetSaturation,0.0f,NULL ); + eqSetBands( Channel ); + } + break; + case 2: + ShowEquConfig(); + break; + } +} + +static void eqFocus( GtkWindow * window,GtkWidget * widget,gpointer user_data ) +{ eqSetBands( Channel ); } + +static void eqSelectChannelsListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data ) +{ + Channel=row - 1; + eqSetBands( Channel ); + if ( Channel == -1 ) + { + int i,j; equalizer_t eq; + for ( i=1;i<6;i++ ) + for ( j=0;j<10;j++ ) + { eq.band=j; eq.channel=i; eq.gain=gtkEquChannels[0][j]; gtkSet( gtkSetEqualizer,0,&eq ); } + } +} + +void eqNotebook( GtkNotebook * notebook,GtkNotebookPage * page,gint page_num,gpointer user_data ) +{ + if ( page_num ) gtk_widget_hide( Config ); + else gtk_widget_show( Config ); +} + +GtkWidget * create_Equalizer( void ) +{ + GtkWidget * vbox1; + GtkWidget * hbox1; + GtkWidget * scrolledwindow1; + GtkWidget * table1; + GtkWidget * hbuttonbox1; + GtkAccelGroup * accel_group; + + accel_group=gtk_accel_group_new(); + + Equalizer=gtk_window_new( GTK_WINDOW_TOPLEVEL ); + gtk_widget_set_name( Equalizer,MSGTR_Equalizer ); + gtk_object_set_data( GTK_OBJECT( Equalizer ),MSGTR_Equalizer,Equalizer ); + gtk_widget_set_usize( Equalizer,-1,256 ); + gtk_window_set_title( GTK_WINDOW( Equalizer ),MSGTR_Equalizer ); + gtk_window_set_position( GTK_WINDOW( Equalizer ),GTK_WIN_POS_CENTER ); + gtk_window_set_policy( GTK_WINDOW( Equalizer ),FALSE,FALSE,FALSE ); + gtk_window_set_wmclass( GTK_WINDOW( Equalizer ),"Equalizer","MPlayer" ); + + gtk_widget_realize( Equalizer ); + gtkAddIcon( Equalizer ); + + vbox1=AddVBox( AddDialogFrame( Equalizer ),0 ); + + Notebook=gtk_notebook_new(); + gtk_widget_set_name( Notebook,"Notebook" ); + gtk_widget_show( Notebook ); + gtk_box_pack_start( GTK_BOX( vbox1 ),Notebook,TRUE,TRUE,0 ); + gtk_container_set_border_width( GTK_CONTAINER( Notebook ),1 ); + + hbox1=AddHBox( Notebook,0 ); + + scrolledwindow1=gtk_scrolled_window_new( NULL,NULL ); + gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" ); + gtk_widget_show( scrolledwindow1 ); + gtk_box_pack_start( GTK_BOX( hbox1 ),scrolledwindow1,FALSE,FALSE,0 ); + gtk_widget_set_usize( scrolledwindow1,106,-2 ); + gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC ); + + ChannelsList=gtk_clist_new( 1 ); + gtk_widget_set_name( ChannelsList,"ChannelsList" ); + gtk_widget_show( ChannelsList ); + gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),ChannelsList ); + gtk_clist_set_column_width( GTK_CLIST( ChannelsList ),0,80 ); + gtk_clist_column_titles_hide( GTK_CLIST( ChannelsList ) ); + + table1=gtk_table_new( 2,10,FALSE ); + gtk_widget_set_name( table1,"table1" ); + gtk_widget_show( table1 ); + gtk_box_pack_start( GTK_BOX( hbox1 ),table1,FALSE,FALSE,0 ); + gtk_table_set_row_spacings( GTK_TABLE( table1 ),4 ); + gtk_table_set_col_spacings( GTK_TABLE( table1 ),9 ); + + A3125adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); + A3125=AddVScaler( A3125adj,NULL,-1 ); + gtk_table_attach( GTK_TABLE( table1 ),A3125,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); + + A6250adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); + A6250=AddVScaler( A6250adj,NULL,-1 ); + gtk_table_attach( GTK_TABLE( table1 ),A6250,1,2,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); + + A125adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); + A125=AddVScaler( A125adj,NULL,-1 ); + gtk_table_attach( GTK_TABLE( table1 ),A125,2,3,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); + + A250adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); + A250=AddVScaler( A250adj,NULL,-1 ); + gtk_table_attach( GTK_TABLE( table1 ),A250,3,4,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); + + A500adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); + A500=AddVScaler( A500adj,NULL,-1 ); + gtk_table_attach( GTK_TABLE( table1 ),A500,4,5,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); + + A1000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); + A1000=AddVScaler( A1000adj,NULL,-1 ); + gtk_table_attach( GTK_TABLE( table1 ),A1000,5,6,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); + + A2000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); + A2000=AddVScaler( A2000adj,NULL,-1 ); + gtk_table_attach( GTK_TABLE( table1 ),A2000,6,7,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); + + A4000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); + A4000=AddVScaler( A4000adj,NULL,-1 ); + gtk_table_attach( GTK_TABLE( table1 ),A4000,7,8,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); + + A8000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); + A8000=AddVScaler( A8000adj,NULL,-1 ); + gtk_table_attach( GTK_TABLE( table1 ),A8000,8,9,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); + + A16000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); + A16000=AddVScaler( A16000adj,NULL,-1 ); + gtk_table_attach( GTK_TABLE( table1 ),A16000,9,10,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( "31.25",NULL ), + 0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( "62.50",NULL ), + 1,2,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( "125",NULL ), + 2,3,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( "250",NULL ), + 3,4,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( "500",NULL ), + 4,5,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( "1000",NULL ), + 5,6,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( "2000",NULL ), + 6,7,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( "4000",NULL ), + 7,8,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( "8000",NULL ), + 8,9,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( "16000",NULL ), + 9,10,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_notebook_set_tab_label( GTK_NOTEBOOK( Notebook ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( Notebook ),0 ), + AddLabel( MSGTR_EQU_Audio,NULL ) ); + + table1=gtk_table_new( 4,2,FALSE ); + gtk_widget_set_name( table1,"table1" ); + gtk_widget_show( table1 ); + gtk_container_add( GTK_CONTAINER( Notebook ),table1 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( MSGTR_EQU_Contrast,NULL ), + 0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( MSGTR_EQU_Brightness,NULL ), + 0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( MSGTR_EQU_Hue,NULL ), + 0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( MSGTR_EQU_Saturation,NULL ), + 0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + VContrastadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-100,100,1,0,0 ) ); + VContrast=AddHScaler( VContrastadj,NULL,1 ); + gtk_table_attach( GTK_TABLE( table1 ),VContrast,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + gtk_widget_set_usize( VContrast,-1,45 ); + + VBrightnessadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-100,100,1,0,0 ) ); + VBrightness=AddHScaler( VBrightnessadj,NULL,1 ); + gtk_table_attach( GTK_TABLE( table1 ),VBrightness,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + gtk_widget_set_usize( VBrightness,-1,45 ); + + VHueadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-100,100,1,0,0 ) ); + VHue=AddHScaler( VHueadj,NULL,1 ); + gtk_table_attach( GTK_TABLE( table1 ),VHue,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + gtk_widget_set_usize( VHue,-1,45 ); + + VSaturationadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-100,100,1,0,0 ) ); + VSaturation=AddHScaler( VSaturationadj,NULL,1 ); + gtk_table_attach( GTK_TABLE( table1 ),VSaturation,1,2,3,4,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + gtk_widget_set_usize( VSaturation,-1,45 ); + + gtk_notebook_set_tab_label( GTK_NOTEBOOK( Notebook ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( Notebook ),1 ), + AddLabel( MSGTR_EQU_Video,NULL ) ); + + AddHSeparator( vbox1 ); + + hbuttonbox1=AddHButtonBox( vbox1 ); + gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END ); + gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 ); + + Config=AddButton( MSGTR_Config,hbuttonbox1 ); + Clear=AddButton( MSGTR_Clear,hbuttonbox1 ); + Ok=AddButton( MSGTR_Ok,hbuttonbox1 ); + + gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); + gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); + + gtk_signal_connect( GTK_OBJECT( Equalizer ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&Equalizer ); + gtk_signal_connect( GTK_OBJECT( Equalizer ),"focus_in_event",GTK_SIGNAL_FUNC( eqFocus ),(void *)2 ); + + gtk_signal_connect( GTK_OBJECT( ChannelsList ),"select_row",GTK_SIGNAL_FUNC( eqSelectChannelsListRow ),NULL ); + + gtk_signal_connect( GTK_OBJECT( A3125 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)0 ); + gtk_signal_connect( GTK_OBJECT( A6250 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)1 ); + gtk_signal_connect( GTK_OBJECT( A125 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)2 ); + gtk_signal_connect( GTK_OBJECT( A250 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)3 ); + gtk_signal_connect( GTK_OBJECT( A500 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)4 ); + gtk_signal_connect( GTK_OBJECT( A1000 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)5 ); + gtk_signal_connect( GTK_OBJECT( A2000 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)6 ); + gtk_signal_connect( GTK_OBJECT( A4000 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)7 ); + gtk_signal_connect( GTK_OBJECT( A8000 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)8 ); + gtk_signal_connect( GTK_OBJECT( A16000 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)9 ); + + gtk_signal_connect( GTK_OBJECT( VContrast ),"motion_notify_event",GTK_SIGNAL_FUNC( eqVScaleMotion ),(void*)1 ); + gtk_signal_connect( GTK_OBJECT( VBrightness ),"motion_notify_event",GTK_SIGNAL_FUNC( eqVScaleMotion ),(void*)2 ); + gtk_signal_connect( GTK_OBJECT( VHue ),"motion_notify_event",GTK_SIGNAL_FUNC( eqVScaleMotion ),(void*)3 ); + gtk_signal_connect( GTK_OBJECT( VSaturation ),"motion_notify_event",GTK_SIGNAL_FUNC( eqVScaleMotion ),(void *)4 ); + + gtk_signal_connect( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( eqButtonReleased ),(void *)0 ); + gtk_signal_connect( GTK_OBJECT( Clear ),"clicked",GTK_SIGNAL_FUNC( eqButtonReleased ),(void *)1 ); + gtk_signal_connect( GTK_OBJECT( Config ),"clicked",GTK_SIGNAL_FUNC( eqButtonReleased ),(void *)2 ); + + gtk_signal_connect( GTK_OBJECT( Notebook ),"switch_page",GTK_SIGNAL_FUNC( eqNotebook ),NULL ); + + gtk_window_add_accel_group( GTK_WINDOW( Equalizer ),accel_group ); + + return Equalizer; +} + +// --- equalizer config dialog box + +static GtkWidget * CBChannel1; +static GtkWidget * CEChannel1; +static GtkWidget * CBChannel2; +static GtkWidget * CEChannel2; +static GtkWidget * CBChannel3; +static GtkWidget * CEChannel3; +static GtkWidget * CBChannel4; +static GtkWidget * CEChannel4; +static GtkWidget * CBChannel5; +static GtkWidget * CEChannel5; +static GtkWidget * CBChannel6; +static GtkWidget * CEChannel6; +static GtkWidget * ecOk; +static GtkWidget * ecCancel; + +GtkWidget * create_EquConfig( void ); + +void ShowEquConfig( void ) +{ + GList * Items = NULL; + + if ( EquConfig ) gtkActive( EquConfig ); + else EquConfig=create_EquConfig(); + + Items=g_list_append( Items,(gpointer)MSGTR_EQU_Front_Right ); + Items=g_list_append( Items,(gpointer)MSGTR_EQU_Front_Left ); + Items=g_list_append( Items,(gpointer)MSGTR_EQU_Back_Right ); + Items=g_list_append( Items,(gpointer)MSGTR_EQU_Back_Left ); + Items=g_list_append( Items,(gpointer)MSGTR_EQU_Center ); + Items=g_list_append( Items,(gpointer)MSGTR_EQU_Bass ); + + gtk_combo_set_popdown_strings( GTK_COMBO( CBChannel1 ),Items ); + gtk_combo_set_popdown_strings( GTK_COMBO( CBChannel2 ),Items ); + gtk_combo_set_popdown_strings( GTK_COMBO( CBChannel3 ),Items ); + gtk_combo_set_popdown_strings( GTK_COMBO( CBChannel4 ),Items ); + gtk_combo_set_popdown_strings( GTK_COMBO( CBChannel5 ),Items ); + gtk_combo_set_popdown_strings( GTK_COMBO( CBChannel6 ),Items ); + + g_list_free( Items ); + + gtk_entry_set_text( GTK_ENTRY( CEChannel1 ),gtkEquChannel1 ); gtk_entry_set_editable( GTK_ENTRY( CEChannel1 ),FALSE ); + gtk_entry_set_text( GTK_ENTRY( CEChannel2 ),gtkEquChannel2 ); gtk_entry_set_editable( GTK_ENTRY( CEChannel2 ),FALSE ); + gtk_entry_set_text( GTK_ENTRY( CEChannel3 ),gtkEquChannel3 ); gtk_entry_set_editable( GTK_ENTRY( CEChannel3 ),FALSE ); + gtk_entry_set_text( GTK_ENTRY( CEChannel4 ),gtkEquChannel4 ); gtk_entry_set_editable( GTK_ENTRY( CEChannel4 ),FALSE ); + gtk_entry_set_text( GTK_ENTRY( CEChannel5 ),gtkEquChannel5 ); gtk_entry_set_editable( GTK_ENTRY( CEChannel5 ),FALSE ); + gtk_entry_set_text( GTK_ENTRY( CEChannel6 ),gtkEquChannel6 ); gtk_entry_set_editable( GTK_ENTRY( CEChannel6 ),FALSE ); + + gtk_widget_show( EquConfig ); + gtkSetLayer( EquConfig ); +} + +void HideEquConfig( void ) +{ + if ( !EquConfig ) return; + gtk_widget_hide( EquConfig ); + gtk_widget_destroy( EquConfig ); + EquConfig=NULL; +} + +static void ecButtonReleased( GtkButton * button,gpointer user_data ) +{ + if ( (int)user_data ) + { // if you pressed Ok + gfree( (void **)>kEquChannel1 ); gtkEquChannel1=gstrdup( gtk_entry_get_text( GTK_ENTRY( CEChannel1 ) ) ); + gfree( (void **)>kEquChannel2 ); gtkEquChannel2=gstrdup( gtk_entry_get_text( GTK_ENTRY( CEChannel2 ) ) ); + gfree( (void **)>kEquChannel3 ); gtkEquChannel3=gstrdup( gtk_entry_get_text( GTK_ENTRY( CEChannel3 ) ) ); + gfree( (void **)>kEquChannel4 ); gtkEquChannel4=gstrdup( gtk_entry_get_text( GTK_ENTRY( CEChannel4 ) ) ); + gfree( (void **)>kEquChannel5 ); gtkEquChannel5=gstrdup( gtk_entry_get_text( GTK_ENTRY( CEChannel5 ) ) ); + gfree( (void **)>kEquChannel6 ); gtkEquChannel6=gstrdup( gtk_entry_get_text( GTK_ENTRY( CEChannel6 ) ) ); + eqSetChannelNames(); + } + HideEquConfig(); +} + +GtkWidget * create_EquConfig( void ) +{ + GtkWidget * vbox1; + GtkWidget * table1; + GtkWidget * hbuttonbox1; + GtkAccelGroup * accel_group; + + accel_group=gtk_accel_group_new(); + + EquConfig=gtk_window_new( GTK_WINDOW_TOPLEVEL ); + gtk_widget_set_name( EquConfig,"EquConfig" ); + gtk_object_set_data( GTK_OBJECT( EquConfig ),"EquConfig",EquConfig ); + gtk_widget_set_usize( EquConfig,350,260 ); + GTK_WIDGET_SET_FLAGS( EquConfig,GTK_CAN_DEFAULT ); + gtk_window_set_title( GTK_WINDOW( EquConfig ),MSGTR_ConfigureEqualizer ); + gtk_window_set_position( GTK_WINDOW( EquConfig ),GTK_WIN_POS_CENTER ); +// gtk_window_set_modal( GTK_WINDOW( EquConfig ),TRUE ); + gtk_window_set_policy( GTK_WINDOW( EquConfig ),FALSE,FALSE,FALSE ); + gtk_window_set_wmclass( GTK_WINDOW( EquConfig ),"EquConfig","MPlayer" ); + + gtk_widget_realize( EquConfig ); + gtkAddIcon( EquConfig ); + + vbox1=AddVBox( AddDialogFrame( EquConfig ),0 ); + + table1=gtk_table_new( 6,2,FALSE ); + gtk_widget_set_name( table1,"table1" ); + gtk_widget_show( table1 ); + gtk_box_pack_start( GTK_BOX( vbox1 ),table1,TRUE,TRUE,0 ); + gtk_table_set_row_spacings( GTK_TABLE( table1 ),4 ); + gtk_table_set_col_spacings( GTK_TABLE( table1 ),4 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( MSGTR_EQU_Channel1,NULL ), + 0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( MSGTR_EQU_Channel2,NULL ), + 0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( MSGTR_EQU_Channel3,NULL ), + 0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( MSGTR_EQU_Channel4,NULL ), + 0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( MSGTR_EQU_Channel5,NULL ), + 0,1,4,5,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + gtk_table_attach( GTK_TABLE( table1 ), + AddLabel( MSGTR_EQU_Channel6,NULL ), + 0,1,5,6,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + CBChannel1=AddComboBox( NULL ); + gtk_table_attach( GTK_TABLE( table1 ),CBChannel1,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + CEChannel1=GTK_COMBO( CBChannel1 )->entry; + gtk_widget_set_name( CEChannel1,"CEChannel1" ); + gtk_widget_show( CEChannel1 ); + + CBChannel2=AddComboBox( NULL ); + gtk_table_attach( GTK_TABLE( table1 ),CBChannel2,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + CEChannel2=GTK_COMBO( CBChannel2 )->entry; + gtk_widget_set_name( CEChannel2,"CEChannel2" ); + gtk_widget_show( CEChannel2 ); + + CBChannel3=AddComboBox( NULL ); + gtk_table_attach( GTK_TABLE( table1 ),CBChannel3,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + CEChannel3=GTK_COMBO( CBChannel3 )->entry; + gtk_widget_set_name( CEChannel3,"CEChannel3" ); + gtk_widget_show( CEChannel3 ); + + CBChannel4=AddComboBox( NULL ); + gtk_table_attach( GTK_TABLE( table1 ),CBChannel4,1,2,3,4,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + CEChannel4=GTK_COMBO( CBChannel4 )->entry; + gtk_widget_set_name( CEChannel4,"CEChannel4" ); + gtk_widget_show( CEChannel4 ); + + CBChannel5=AddComboBox( NULL ); + gtk_table_attach( GTK_TABLE( table1 ),CBChannel5,1,2,4,5,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + CEChannel5=GTK_COMBO( CBChannel5 )->entry; + gtk_widget_set_name( CEChannel5,"CEChannel5" ); + gtk_widget_show( CEChannel5 ); + + CBChannel6=AddComboBox( NULL ); + gtk_table_attach( GTK_TABLE( table1 ),CBChannel6,1,2,5,6,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + CEChannel6=GTK_COMBO( CBChannel6 )->entry; + gtk_widget_set_name( CEChannel6,"CEChannel6" ); + gtk_widget_show( CEChannel6 ); + + AddHSeparator( vbox1 ); + + hbuttonbox1=AddHButtonBox( vbox1 ); + gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END ); + gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 ); + + ecOk=AddButton( MSGTR_Ok,hbuttonbox1 ); + ecCancel=AddButton( MSGTR_Cancel,hbuttonbox1 ); + + gtk_widget_add_accelerator( ecOk,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); + gtk_widget_add_accelerator( ecCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); + + gtk_signal_connect( GTK_OBJECT( EquConfig ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&EquConfig ); + + gtk_signal_connect( GTK_OBJECT( ecOk ),"clicked",GTK_SIGNAL_FUNC( ecButtonReleased ),(void *)1 ); + gtk_signal_connect( GTK_OBJECT( ecCancel ),"clicked",GTK_SIGNAL_FUNC( ecButtonReleased ),(void *)0 ); + + gtk_window_add_accel_group( GTK_WINDOW( EquConfig ),accel_group ); + + return EquConfig; +} + diff --git a/gui/mplayer/gtk/eq.h b/gui/mplayer/gtk/eq.h new file mode 100644 index 0000000000..99941a0509 --- /dev/null +++ b/gui/mplayer/gtk/eq.h @@ -0,0 +1,12 @@ + +#ifndef __GUI_EQ_H +#define __GUI_EQ_H + +#include <gtk/gtk.h> + +extern GtkWidget * Equalizer; + +extern GtkWidget * create_Equalizer( void ); +extern void ShowEqualizer( void ); + +#endif diff --git a/gui/mplayer/gtk/fs.c b/gui/mplayer/gtk/fs.c new file mode 100644 index 0000000000..064795ea13 --- /dev/null +++ b/gui/mplayer/gtk/fs.c @@ -0,0 +1,684 @@ + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <sys/stat.h> +#include <glob.h> +#include <unistd.h> + +#include "../gmplayer.h" + +#include "mplayer/pixmaps/up.xpm" +#include "mplayer/pixmaps/dir.xpm" +#include "mplayer/pixmaps/file.xpm" + +#include "app.h" +#include "interface.h" +#include "config.h" +#include "help_mp.h" +#include "stream/stream.h" + +#include "../widgets.h" +#include "fs.h" +#include "opts.h" +#include "common.h" + +#ifndef __linux__ +#define get_current_dir_name() getcwd(NULL, PATH_MAX) +#endif + +#ifndef get_current_dir_name + extern char * get_current_dir_name( void ); +#endif + +gchar * fsSelectedFile = NULL; +gchar * fsSelectedDirectory = NULL; +unsigned char * fsThatDir = "."; +gchar * fsFilter = "*"; + +int fsPressed = 0; +int fsType = 0; + +char * fsVideoFilterNames[][2] = + { { "MPEG files (*.mpg,*.mpeg,*.m1v)", "*.mpg,*.mpeg,*.m1v" }, + { "VCD/SVCD Images (*.bin)", "*.bin" }, + { "VOB files (*.vob)", "*.vob" }, + { "AVI files (*.avi)", "*.avi" }, + { "DiVX files (*.divx)", "*.divx" }, + { "QuickTime files (*.mov,*.qt,*.mp4)", "*.mov,*.qt,*.mp4" }, + { "ASF files (*.asf)", "*.asf" }, + { "VIVO files (*.viv)", "*.viv" }, + { "RealVideo files (*.rm)", "*.rm" }, + { "Windows Media Video (*.wmv)", "*.wmv" }, + { "OGG Media files (*.ogm)", "*.ogm" }, + { "Matroska Media files (*.mkv)", "*.mkv" }, + { "Autodesk animations (*.fli,*.flc)", "*.fli,*.flc" }, + { "NuppelVideo files (*.nuv)", "*.nuv" }, + { "MP3 files (*.mp3,*.mp2)", "*.mp3,*.mp2" }, + { "Wave files (*.wav)", "*.wav" }, + { "WMA files (*.wma)", "*.wma" }, + { "Matroska Audio files (*.mka)", "*.mka" }, + { "Audio files", "*.wav,*.ogg,*.mp2,*.mp3,*.wma,*.mka" }, + { "Video files", "*.asf,*.avi,*.divx,*.fli,*.flc,*.ogm,*.mpg,*.mpeg,*.m1v,*.mov,*.mp4,*.nuv,*.qt,*.rm,*.vob,*.viv,*.wmv,*.mkv,*.bin" }, + { "All files", "*" }, + { NULL,NULL } + }; +int fsLastVideoFilterSelected = -1; + +char * fsSubtitleFilterNames[][2] = + { { "UTF (*.utf)", "*.utf" }, + { "SUB (*.sub)", "*.sub" }, + { "SRT (*.srt)", "*.str" }, + { "SMI (*.smi)", "*.smi" }, + { "RT (*.rt) ", "*.rt" }, + { "TXT (*.txt)", "*.txt" }, + { "ASS (*.ass)", "*.ass" }, + { "SSA (*.ssa)", "*.ssa" }, + { "AQT (*.aqt)", "*.aqt" }, + { "Subtitles", "*.utf,*.sub,*.srt,*.smi,*.rt,*.txt,*.ass,*.ssa,*.aqt" }, + { "All files", "*" }, + { NULL,NULL } + }; +int fsLastSubtitleFilterSelected = -1; + +char * fsOtherFilterNames[][2] = + { + { "All files", "*" }, + { NULL,NULL } + }; + +char * fsAudioFileNames[][2] = + { + { "WAV files (*.wav)", "*.wav" }, + { "MP3 files (*.mp2, *.mp3)", "*.mp2,*.mp3" }, + { "OGG Vorbis files (*.ogg)", "*.ogg" }, + { "WMA files (*.wma)", "*.wma" }, + { "Matroska Audio files (*.mka)", "*.mka" }, + { "Audio files", "*.ogg,*.mp2,*.mp3,*.wav,*.wma,*.mka" }, + { "All files", "*" }, + { NULL, NULL } + }; +int fsLastAudioFilterSelected = -1; + +char * fsFontFileNames[][2] = + { +#ifdef HAVE_FREETYPE + { "True Type fonts (*.ttf)", "*.ttf" }, + { "Type1 fonts (*.pfb)", "*.pfb" }, + { "All fonts", "*.ttf,*.pfb" }, +#else + { "font files (*.desc)", "*.desc" }, +#endif + { "All files", "*" }, + { NULL,NULL } + }; +int fsLastFontFilterSelected = -1; + +GtkWidget * fsFileNamesList; +GtkWidget * fsFNameList; +GtkWidget * fsFileSelect = NULL; +GdkColormap * fsColorMap; +GtkWidget * fsOk; +GtkWidget * fsUp; +GtkWidget * fsCancel; +GtkWidget * fsCombo4; +GtkWidget * fsPathCombo; +GList * fsList_items = NULL; +GList * fsTopList_items = NULL; +GtkWidget * List; +GtkWidget * fsFilterCombo; + +GtkStyle * style; +GdkPixmap * dpixmap; +GdkPixmap * fpixmap; +GdkBitmap * dmask; +GdkBitmap * fmask; + +static char * Filter( char * name ) +{ + static char tmp[32]; + int i,c; + for ( i=0,c=0;i < strlen( name );i++ ) + { + if ( ( name[i] >='a' )&&( name[i] <= 'z' ) ) { tmp[c++]='['; tmp[c++]=name[i]; tmp[c++]=name[i] - 32; tmp[c++]=']'; } + else tmp[c++]=name[i]; + } + tmp[c]=0; + return tmp; +} + +void CheckDir( GtkWidget * list,char * directory ) +{ + struct stat fs; + int i,c=2; + gchar * str[1][2]; + GdkPixmap * pixmap; + GdkBitmap * mask; + glob_t gg; + + if ( !fsFilter[0] ) return; + + gtk_widget_hide( list ); + gtk_clist_clear( GTK_CLIST( list ) ); + str[0][0]=NULL; + + pixmap=dpixmap; mask=dmask; + str[0][0]=NULL; + str[0][1]="."; gtk_clist_append( GTK_CLIST( list ),str[0] ); gtk_clist_set_pixmap( GTK_CLIST( list ),0,0,pixmap,mask ); + str[0][1]=".."; gtk_clist_append( GTK_CLIST( list ),str[0] ); gtk_clist_set_pixmap( GTK_CLIST( list ),1,0,pixmap,mask ); + + glob( "*",0,NULL,&gg ); +// glob( ".*",GLOB_NOSORT | GLOB_APPEND,NULL,&gg ); + for( i=0;(unsigned)i<gg.gl_pathc;i++ ) + { + stat( gg.gl_pathv[i],&fs ); + if( !S_ISDIR( fs.st_mode ) ) continue; + + str[0][1]=gg.gl_pathv[i]; + pixmap=dpixmap; mask=dmask; + gtk_clist_append( GTK_CLIST( list ),str[0] ); + gtk_clist_set_pixmap( GTK_CLIST( list ),c++,0,pixmap,mask ); + } + globfree( &gg ); + + if ( strchr( fsFilter,',' ) ) + { + char tmp[8]; + int i,c,glob_param = 0; +//printf( "sub item detected.\n" ); + for ( i=0,c=0;i<(int)strlen( fsFilter ) + 1;i++,c++ ) + { + tmp[c]=fsFilter[i]; + if ( ( tmp[c] == ',' )||( tmp[c] == '\0' ) ) + { + tmp[c]=0; c=-1; +// printf( "substr: %s\n",tmp ); + glob( Filter( tmp ),glob_param,NULL,&gg ); + glob_param=GLOB_APPEND; + } + } + } else glob( Filter( fsFilter ),0,NULL,&gg ); + +#if 0 + if ( !strcmp( fsFilter,"*" ) ) + { + char * f = strdup( fsFilter ); + int i; + for( i=0;i<strlen( f );i++ ) + if ( ( f[i] >= 'A' )&&( f[i] <= 'Z' ) ) f[i]+=32; + glob( f,GLOB_APPEND,NULL,&gg ); + + for( i=0;i<strlen( f );i++ ) + if ( ( f[i] >= 'a' )&&( f[i] <= 'z' ) ) f[i]-=32; + glob( f,GLOB_APPEND,NULL,&gg ); + free( f ); + } +#endif + +// glob( ".*",GLOB_NOSORT | GLOB_APPEND,NULL,&gg ); + pixmap=fpixmap; mask=fmask; + for( i=0;(unsigned)i<gg.gl_pathc;i++ ) + { + stat( gg.gl_pathv[i],&fs ); + if( S_ISDIR( fs.st_mode ) ) continue; + + str[0][1]=gg.gl_pathv[i]; + gtk_clist_append( GTK_CLIST( list ),str[0] ); + gtk_clist_set_pixmap( GTK_CLIST( list ),c++,0,pixmap,mask ); + } + globfree( &gg ); + + gtk_clist_set_column_width( GTK_CLIST( list ),0,17 ); + gtk_clist_select_row( GTK_CLIST( list ),0,1 ); + gtk_widget_show( list ); +} + +void fs_PersistantHistory( char *subject ); /* forward declaration */ + +void ShowFileSelect( int type,int modal ) +{ + int i, k; + char * tmp = NULL; + + if ( fsFileSelect ) gtkActive( fsFileSelect ); + else fsFileSelect=create_FileSelect(); + + fsType=type; + switch ( type ) + { + case fsVideoSelector: + gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FileSelect ); + fsList_items=NULL; + for( i=0;fsVideoFilterNames[i][0];i++ ) + fsList_items=g_list_append( fsList_items,fsVideoFilterNames[i][0] ); + k = fsLastVideoFilterSelected; + gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items ); + g_list_free( fsList_items ); + gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsVideoFilterNames[k >= 0 ? k : i-2][0] ); + tmp=guiIntfStruct.Filename; + break; + case fsSubtitleSelector: + gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_SubtitleSelect ); + fsList_items=NULL; + for( i=0;fsSubtitleFilterNames[i][0];i++ ) + fsList_items=g_list_append( fsList_items,fsSubtitleFilterNames[i][0] ); + k = fsLastSubtitleFilterSelected; + gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items ); + g_list_free( fsList_items ); + gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsSubtitleFilterNames[k >= 0 ? k : i-2][0] ); + tmp=guiIntfStruct.Subtitlename; + break; + case fsOtherSelector: + gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_OtherSelect ); + fsList_items=NULL; + for( i=0;fsOtherFilterNames[i][0];i++ ) + fsList_items=g_list_append( fsList_items,fsOtherFilterNames[i][0] ); + gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items ); + g_list_free( fsList_items ); + gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsOtherFilterNames[0][0] ); + tmp=guiIntfStruct.Othername; + break; + case fsAudioSelector: + gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_AudioFileSelect ); + fsList_items=NULL; + for( i=0;fsAudioFileNames[i][0];i++ ) + fsList_items=g_list_append( fsList_items,fsAudioFileNames[i][0] ); + k = fsLastAudioFilterSelected; + gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items ); + g_list_free( fsList_items ); + gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsAudioFileNames[k >= 0 ? k : i-2][0] ); + tmp=guiIntfStruct.AudioFile; + break; + case fsFontSelector: + gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FontSelect ); + fsList_items=NULL; + for( i=0;fsFontFileNames[i][0];i++ ) + fsList_items=g_list_append( fsList_items,fsFontFileNames[i][0] ); + k = fsLastFontFilterSelected; + gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items ); + g_list_free( fsList_items ); + gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsFontFileNames[k >= 0 ? k : i-2][0] ); + tmp=font_name; + break; + } + + if ( tmp && tmp[0] ) + { + struct stat f; + char * dir = strdup( tmp ); + + do + { + char * c = strrchr( dir,'/' ); + stat( dir,&f ); + if ( S_ISDIR( f.st_mode ) ) break; + if ( c ) *c=0; + } while ( strrchr( dir,'/' ) ); + + if ( dir[0] ) chdir( dir ); + + free( dir ); + } + + if ( fsTopList_items ) g_list_free( fsTopList_items ); fsTopList_items=NULL; + { + int i, c = 1; + + if ( fsType == fsVideoSelector ) + { + for ( i=0;i < fsPersistant_MaxPos;i++ ) + if ( fsHistory[i] ) { fsTopList_items=g_list_append( fsTopList_items,fsHistory[i] ); c=0; } + } + if ( c ) fsTopList_items=g_list_append( fsTopList_items,(gchar *)get_current_dir_name() ); + } + if ( getenv( "HOME" ) ) fsTopList_items=g_list_append( fsTopList_items,getenv( "HOME" ) ); + fsTopList_items=g_list_append( fsTopList_items,"/home" ); + fsTopList_items=g_list_append( fsTopList_items,"/mnt" ); + fsTopList_items=g_list_append( fsTopList_items,"/" ); + gtk_combo_set_popdown_strings( GTK_COMBO( fsCombo4 ),fsTopList_items ); + + gtk_window_set_modal( GTK_WINDOW( fsFileSelect ),modal ); + + gtk_widget_show( fsFileSelect ); +} + +void HideFileSelect( void ) +{ + if ( !fsFileSelect ) return; + gtk_widget_hide( fsFileSelect ); + gtk_widget_destroy( fsFileSelect ); + fsFileSelect=NULL; +} + +void fs_PersistantHistory( char * subject ) +{ + int i; + + if ( fsType != fsVideoSelector ) return; + + for ( i=0;i < fsPersistant_MaxPos;i++ ) + if ( fsHistory[i] && !strcmp( fsHistory[i],subject ) ) + { + char * tmp = fsHistory[i]; fsHistory[i]=fsHistory[0]; fsHistory[0]=tmp; + return; + } + gfree( (void **)&fsHistory[fsPersistant_MaxPos - 1] ); + for ( i=fsPersistant_MaxPos - 1;i;i-- ) fsHistory[i]=fsHistory[i - 1]; + fsHistory[0]=gstrdup( subject ); +} +//----------------------------------------------- + +void fs_fsFilterCombo_activate( GtkEditable * editable,gpointer user_data ) +{ + fsFilter=gtk_entry_get_text( GTK_ENTRY( user_data ) ); + CheckDir( fsFNameList,get_current_dir_name() ); +} + +void fs_fsFilterCombo_changed( GtkEditable * editable,gpointer user_data ) +{ + char * str; + int i; + + str=gtk_entry_get_text( GTK_ENTRY(user_data ) ); + + switch ( fsType ) + { + case fsVideoSelector: + for( i=0;fsVideoFilterNames[i][0];i++ ) + if( !strcmp( str,fsVideoFilterNames[i][0] ) ) + { fsFilter=fsVideoFilterNames[i][1]; fsLastVideoFilterSelected = i; break; } + break; + case fsSubtitleSelector: + for( i=0;fsSubtitleFilterNames[i][0];i++ ) + if( !strcmp( str,fsSubtitleFilterNames[i][0] ) ) + { fsFilter=fsSubtitleFilterNames[i][1]; fsLastSubtitleFilterSelected = i; break; } + break; + case fsOtherSelector: + for( i=0;fsOtherFilterNames[i][0];i++ ) + if( !strcmp( str,fsOtherFilterNames[i][0] ) ) + { fsFilter=fsOtherFilterNames[i][1]; break; } + break; + case fsAudioSelector: + for( i=0;fsAudioFileNames[i][0];i++ ) + if( !strcmp( str,fsAudioFileNames[i][0] ) ) + { fsFilter=fsAudioFileNames[i][1]; fsLastAudioFilterSelected = i; break; } + break; + case fsFontSelector: + for( i=0;fsFontFileNames[i][0];i++ ) + if( !strcmp( str,fsFontFileNames[i][0] ) ) + { fsFilter=fsFontFileNames[i][1]; fsLastFontFilterSelected = i; break; } + break; + default: return; + } + CheckDir( fsFNameList,get_current_dir_name() ); +} + +void fs_fsPathCombo_activate( GtkEditable * editable,gpointer user_data ) +{ + unsigned char * str; + + str=gtk_entry_get_text( GTK_ENTRY( user_data ) ); + if ( chdir( str ) != -1 ) CheckDir( fsFNameList,get_current_dir_name() ); +} + +void fs_fsPathCombo_changed( GtkEditable * editable,gpointer user_data ) +{ + unsigned char * str; + + str=gtk_entry_get_text( GTK_ENTRY( user_data ) ); + fsPressed=2; + if ( chdir( str ) != -1 ) CheckDir( fsFNameList,get_current_dir_name() ); +} + +void fs_Up_released( GtkButton * button,gpointer user_data ) +{ + chdir( ".." ); + fsSelectedFile=fsThatDir; + CheckDir( fsFNameList,get_current_dir_name() ); + gtk_entry_set_text( GTK_ENTRY( fsPathCombo ),(unsigned char *)get_current_dir_name() ); + return; +} + +int fsFileExist( unsigned char * fname ) +{ + FILE * f = fopen( fname,"r" ); + if ( f == NULL ) return 0; + fclose( f ); + return 1; +} + +void fs_Ok_released( GtkButton * button,gpointer user_data ) +{ + unsigned char * str; + GList * item; + int size,j,i = 1; + struct stat fs; + + stat( fsSelectedFile,&fs ); + if( S_ISDIR(fs.st_mode ) ) + { + chdir( fsSelectedFile ); + fsSelectedFile=fsThatDir; + CheckDir( fsFNameList,get_current_dir_name() ); + gtk_entry_set_text( GTK_ENTRY( fsPathCombo ),(unsigned char *)get_current_dir_name() ); + return; + } + + switch( fsPressed ) + { + case 1: + fsSelectedDirectory=(unsigned char *)get_current_dir_name(); + break; + case 2: + str=gtk_entry_get_text( GTK_ENTRY( fsPathCombo ) ); + fsSelectedFile=str; + if ( !fsFileExist( fsSelectedFile ) ) { HideFileSelect(); return; } + fsSelectedDirectory=fsSelectedFile; + size=strlen( fsSelectedDirectory ); + for ( j=0;j<size;j++ ) + { + if ( fsSelectedDirectory[ size - j ] == '/' ) + { + fsSelectedFile+=size - j + 1; + fsSelectedDirectory[ size - j ]=0; + break; + } + } + break; + } + switch ( fsType ) + { + case fsVideoSelector: + guiSetDF( guiIntfStruct.Filename,fsSelectedDirectory,fsSelectedFile ); + guiIntfStruct.StreamType=STREAMTYPE_FILE; + guiIntfStruct.FilenameChanged=1; sub_fps=0; + gfree( (void **)&guiIntfStruct.AudioFile ); + gfree( (void **)&guiIntfStruct.Subtitlename ); + fs_PersistantHistory( fsSelectedDirectory ); //totem, write into history + break; + case fsSubtitleSelector: + guiSetDF( guiIntfStruct.Subtitlename,fsSelectedDirectory,fsSelectedFile ); + guiLoadSubtitle( guiIntfStruct.Subtitlename ); + break; + case fsOtherSelector: + guiSetDF( guiIntfStruct.Othername,fsSelectedDirectory,fsSelectedFile ); + break; + case fsAudioSelector: + guiSetDF( guiIntfStruct.AudioFile,fsSelectedDirectory,fsSelectedFile ); + break; + case fsFontSelector: + guiSetDF( font_name,fsSelectedDirectory,fsSelectedFile ); + guiLoadFont(); + if ( Preferences ) gtk_entry_set_text( GTK_ENTRY( prEFontName ),font_name ); + break; + } + + HideFileSelect(); + + item=fsTopList_items; + while( item ) + { + if ( !strcmp( item->data,fsSelectedDirectory ) ) i=0; + item=item->next; + } + if ( i ) fsTopList_items=g_list_prepend( fsTopList_items,(gchar *)get_current_dir_name() ); + if ( mplMainAutoPlay ) { mplMainAutoPlay=0; mplEventHandling( evPlay,0 ); } + else guiGetEvent( guiCEvent,guiSetStop ); +} + +void fs_Cancel_released( GtkButton * button,gpointer user_data ) +{ + HideFileSelect(); + fs_PersistantHistory( get_current_dir_name() ); //totem, write into history file +} + +void fs_fsFNameList_select_row( GtkWidget * widget,gint row,gint column,GdkEventButton *bevent,gpointer user_data ) +{ + gtk_clist_get_text( GTK_CLIST(widget ),row,1,&fsSelectedFile ); + fsPressed=1; + if( bevent && bevent->type == GDK_BUTTON_PRESS ) gtk_button_released( GTK_BUTTON( fsOk ) ); +} + +gboolean on_FileSelect_key_release_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data ) +{ + switch ( event->keyval ) + { + case GDK_Escape: + gtk_button_released( GTK_BUTTON( fsCancel ) ); + break; + case GDK_Return: + gtk_button_released( GTK_BUTTON( fsOk ) ); + break; + case GDK_BackSpace: + gtk_button_released( GTK_BUTTON( fsUp ) ); + break; + } + return FALSE; +} + +GtkWidget * create_FileSelect( void ) +{ + GtkWidget * vbox4; + GtkWidget * hbox4; + GtkWidget * vseparator1; + GtkWidget * hbox6; + GtkWidget * fsFNameListWindow; + GtkWidget * hbuttonbox3; + + GtkWidget * uppixmapwid; + GdkPixmap * uppixmap; + GdkBitmap * upmask; + GtkStyle * upstyle; + + + fsFileSelect=gtk_window_new( GTK_WINDOW_TOPLEVEL ); + gtk_widget_set_name( fsFileSelect,"fsFileSelect" ); + gtk_object_set_data( GTK_OBJECT( fsFileSelect ),"fsFileSelect",fsFileSelect ); + gtk_widget_set_usize( fsFileSelect,512,300 ); + GTK_WIDGET_SET_FLAGS( fsFileSelect,GTK_CAN_DEFAULT ); + gtk_widget_set_events( fsFileSelect,GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK ); + gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FileSelect ); + gtk_window_set_position( GTK_WINDOW( fsFileSelect ),GTK_WIN_POS_CENTER ); + gtk_window_set_policy( GTK_WINDOW( fsFileSelect ),TRUE,TRUE,TRUE ); + gtk_window_set_wmclass( GTK_WINDOW( fsFileSelect ),"FileSelect","MPlayer" ); + fsColorMap=gdk_colormap_get_system(); + + gtk_widget_realize( fsFileSelect ); + gtkAddIcon( fsFileSelect ); + + style=gtk_widget_get_style( fsFileSelect ); + dpixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&dmask,&style->bg[GTK_STATE_NORMAL],(gchar **)dir_xpm ); + fpixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&fmask,&style->bg[GTK_STATE_NORMAL],(gchar **)file_xpm ); + + vbox4=AddVBox( AddDialogFrame( fsFileSelect ),0 ); + hbox4=AddHBox( vbox4,1 ); + + fsCombo4=gtk_combo_new(); + gtk_widget_set_name( fsCombo4,"fsCombo4" ); + gtk_widget_show( fsCombo4 ); + gtk_box_pack_start( GTK_BOX( hbox4 ),fsCombo4,TRUE,TRUE,0 ); + gtk_widget_set_usize( fsCombo4,-2,20 ); + + fsPathCombo=GTK_COMBO( fsCombo4 )->entry; + gtk_widget_set_name( fsPathCombo,"fsPathCombo" ); + gtk_widget_show( fsPathCombo ); + gtk_widget_set_usize( fsPathCombo,-2,20 ); + + vseparator1=gtk_vseparator_new(); + gtk_widget_set_name( vseparator1,"vseparator1" ); + gtk_widget_show( vseparator1 ); + gtk_box_pack_start( GTK_BOX( hbox4 ),vseparator1,FALSE,TRUE,0 ); + gtk_widget_set_usize( vseparator1,7,20 ); + + upstyle=gtk_widget_get_style( fsFileSelect ); + uppixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&upmask,&upstyle->bg[GTK_STATE_NORMAL],(gchar **)up_xpm ); + uppixmapwid=gtk_pixmap_new( uppixmap,upmask ); + gtk_widget_show( uppixmapwid ); + + fsUp=gtk_button_new(); + gtk_container_add( GTK_CONTAINER(fsUp ),uppixmapwid ); + gtk_widget_show( fsUp ); + gtk_box_pack_start( GTK_BOX( hbox4 ),fsUp,FALSE,FALSE,0 ); + gtk_widget_set_usize( fsUp,65,15 ); + + AddHSeparator( vbox4 ); + + hbox6=AddHBox( NULL,0 ); + gtk_box_pack_start( GTK_BOX( vbox4 ),hbox6,TRUE,TRUE,0 ); + + fsFNameListWindow=gtk_scrolled_window_new( NULL,NULL ); + gtk_widget_set_name( fsFNameListWindow,"fsFNameListWindow" ); + gtk_widget_show( fsFNameListWindow ); + gtk_box_pack_start( GTK_BOX( hbox6 ),fsFNameListWindow,TRUE,TRUE,0 ); + gtk_widget_set_usize( fsFNameListWindow,-2,145 ); + gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( fsFNameListWindow ),GTK_POLICY_NEVER,GTK_POLICY_AUTOMATIC ); + + fsFNameList=gtk_clist_new( 2 ); + gtk_widget_set_name( fsFNameList,"fsFNameList" ); + gtk_container_add( GTK_CONTAINER( fsFNameListWindow ),fsFNameList ); + gtk_clist_set_column_width( GTK_CLIST( fsFNameList ),0,80 ); + gtk_clist_set_selection_mode( GTK_CLIST( fsFNameList ),GTK_SELECTION_BROWSE ); + gtk_clist_column_titles_hide( GTK_CLIST( fsFNameList ) ); + gtk_clist_set_shadow_type( GTK_CLIST( fsFNameList ),GTK_SHADOW_ETCHED_OUT ); + + AddHSeparator( vbox4 ); + + List=gtk_combo_new(); + gtk_widget_set_name( List,"List" ); + gtk_widget_ref( List ); + gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"List",List,(GtkDestroyNotify)gtk_widget_unref ); + gtk_widget_show( List ); + gtk_box_pack_start( GTK_BOX( vbox4 ),List,FALSE,FALSE,0 ); + gtk_widget_set_usize( List,-2,20 ); + + fsFilterCombo=GTK_COMBO( List )->entry; + gtk_widget_set_name( fsFilterCombo,"fsFilterCombo" ); + gtk_widget_show( fsFilterCombo ); + gtk_entry_set_editable (GTK_ENTRY( fsFilterCombo ),FALSE ); + + AddHSeparator( vbox4 ); + + hbuttonbox3=AddHButtonBox( vbox4 ); + gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox3 ),GTK_BUTTONBOX_END ); + gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox3 ),10 ); + + fsOk=AddButton( MSGTR_Ok,hbuttonbox3 ); + fsCancel=AddButton( MSGTR_Cancel,hbuttonbox3 ); + + gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&fsFileSelect ); + gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"key_release_event",GTK_SIGNAL_FUNC( on_FileSelect_key_release_event ),NULL ); + + gtk_signal_connect( GTK_OBJECT( fsFilterCombo ),"changed",GTK_SIGNAL_FUNC( fs_fsFilterCombo_changed ),fsFilterCombo ); + gtk_signal_connect( GTK_OBJECT( fsFilterCombo ),"activate",GTK_SIGNAL_FUNC( fs_fsFilterCombo_activate ),fsFilterCombo ); + gtk_signal_connect( GTK_OBJECT( fsPathCombo ),"changed",GTK_SIGNAL_FUNC( fs_fsPathCombo_changed ),fsPathCombo ); + gtk_signal_connect( GTK_OBJECT( fsPathCombo ),"activate",GTK_SIGNAL_FUNC( fs_fsPathCombo_activate ),fsPathCombo ); + gtk_signal_connect( GTK_OBJECT( fsUp ),"released",GTK_SIGNAL_FUNC( fs_Up_released ),fsFNameList ); + gtk_signal_connect( GTK_OBJECT( fsOk ),"released",GTK_SIGNAL_FUNC( fs_Ok_released ),fsCombo4 ); + gtk_signal_connect( GTK_OBJECT( fsCancel ),"released",GTK_SIGNAL_FUNC( fs_Cancel_released ),NULL ); + gtk_signal_connect( GTK_OBJECT( fsFNameList ),"select_row",(GtkSignalFunc)fs_fsFNameList_select_row,NULL ); + + gtk_widget_grab_focus( fsFNameList ); + + return fsFileSelect; +} + diff --git a/gui/mplayer/gtk/fs.h b/gui/mplayer/gtk/fs.h new file mode 100644 index 0000000000..94e9ff08e8 --- /dev/null +++ b/gui/mplayer/gtk/fs.h @@ -0,0 +1,21 @@ +#ifndef __GUI_FS_H +#define __GUI_FS_H + +#include <gtk/gtk.h> + +#define fsVideoSelector 0 +#define fsSubtitleSelector 1 +#define fsOtherSelector 2 +#define fsAudioSelector 3 +#define fsFontSelector 4 + +#include <errno.h> + +extern GtkWidget * fsFileSelect; + +extern void HideFileSelect( void ); +extern void ShowFileSelect( int type, int modal ); + +extern GtkWidget * create_FileSelect( void ); + +#endif diff --git a/gui/mplayer/gtk/mb.c b/gui/mplayer/gtk/mb.c new file mode 100644 index 0000000000..5f3873d054 --- /dev/null +++ b/gui/mplayer/gtk/mb.c @@ -0,0 +1,97 @@ + +#include "app.h" +#include "config.h" +#include "help_mp.h" + +#include "../pixmaps/error.xpm" +#include "../pixmaps/warning.xpm" + +#include "../widgets.h" +#include "mb.h" +#include "common.h" + +GtkWidget * gtkMessageBoxText; +GtkWidget * MessageBox = NULL; + +void ShowMessageBox( const char * msg ) +{ + if ( MessageBox ) { gtk_widget_hide( MessageBox ); gtk_widget_destroy( MessageBox ); } + MessageBox=create_MessageBox( 0 ); + if ( strlen( msg ) < 20 ) gtk_widget_set_usize( MessageBox,196,-1 ); +} + +static void on_Ok_released( GtkButton * button,gpointer user_data ) +{ + gtk_widget_hide( MessageBox ); + gtk_widget_destroy( MessageBox ); + MessageBox=NULL; +} + +GtkWidget * create_MessageBox( int type ) +{ + GtkWidget * vbox1; + GtkWidget * hbox1; + GtkWidget * hbuttonbox1; + GtkWidget * Ok; + GtkAccelGroup * accel_group; + GtkStyle * pixmapstyle; + GdkPixmap * pixmapwid; + GdkBitmap * mask; + + accel_group=gtk_accel_group_new(); + + MessageBox=gtk_window_new( GTK_WINDOW_TOPLEVEL ); + gtk_widget_set_name( MessageBox,"MessageBox" ); + gtk_object_set_data( GTK_OBJECT( MessageBox ),"MessageBox",MessageBox ); + gtk_widget_set_events( MessageBox,GDK_EXPOSURE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_VISIBILITY_NOTIFY_MASK ); + gtk_window_set_title( GTK_WINDOW( MessageBox ),"MPlayer ..." ); + gtk_window_set_position( GTK_WINDOW( MessageBox ),GTK_WIN_POS_CENTER ); + gtk_window_set_modal( GTK_WINDOW( MessageBox ),TRUE ); + gtk_window_set_policy( GTK_WINDOW( MessageBox ),TRUE,TRUE,FALSE ); + gtk_window_set_wmclass( GTK_WINDOW( MessageBox ),"Message","MPlayer" ); + + gtk_widget_realize( MessageBox ); + gtkAddIcon( MessageBox ); + + vbox1=AddVBox( AddDialogFrame( MessageBox ),0 ); + hbox1=AddHBox( vbox1,1 ); + + pixmapstyle=gtk_widget_get_style( MessageBox ); + + pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( MessageBox->window,gdk_colormap_get_system(),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],(gchar ** )warning_xpm ); + WarningPixmap=gtk_pixmap_new( pixmapwid,mask ); + pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( MessageBox->window,gdk_colormap_get_system(),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],(gchar ** )error_xpm ); + ErrorPixmap=gtk_pixmap_new( pixmapwid,mask ); + + gtk_widget_set_name( WarningPixmap,"pixmap1" ); + gtk_widget_hide( WarningPixmap ); + gtk_box_pack_start( GTK_BOX( hbox1 ),WarningPixmap,FALSE,FALSE,0 ); + gtk_widget_set_usize( WarningPixmap,55,-2 ); + + gtk_widget_set_name( ErrorPixmap,"pixmap1" ); + gtk_widget_hide( ErrorPixmap ); + gtk_box_pack_start( GTK_BOX( hbox1 ),ErrorPixmap,FALSE,FALSE,0 ); + gtk_widget_set_usize( ErrorPixmap,55,-2 ); + + gtkMessageBoxText=gtk_label_new( "Text jol. Ha ezt megerted,akkor neked nagyon jo a magyar tudasod,te." ); + gtk_widget_set_name( gtkMessageBoxText,"gtkMessageBoxText" ); + gtk_widget_show( gtkMessageBoxText ); + gtk_box_pack_start( GTK_BOX( hbox1 ),gtkMessageBoxText,TRUE,TRUE,0 ); +// gtk_label_set_justify( GTK_LABEL( gtkMessageBoxText ),GTK_JUSTIFY_FILL ); + gtk_label_set_justify( GTK_LABEL( gtkMessageBoxText ),GTK_JUSTIFY_CENTER ); + gtk_label_set_line_wrap( GTK_LABEL( gtkMessageBoxText ),FALSE ); + + AddHSeparator( vbox1 ); + hbuttonbox1=AddHButtonBox( vbox1 ); + Ok=AddButton( MSGTR_Ok,hbuttonbox1 ); + + gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); + gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); + + gtk_signal_connect( GTK_OBJECT( MessageBox ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&MessageBox ); + gtk_signal_connect( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( on_Ok_released ),NULL ); + + gtk_window_add_accel_group( GTK_WINDOW( MessageBox ),accel_group ); + + return MessageBox; +} diff --git a/gui/mplayer/gtk/mb.h b/gui/mplayer/gtk/mb.h new file mode 100644 index 0000000000..9418d26200 --- /dev/null +++ b/gui/mplayer/gtk/mb.h @@ -0,0 +1,13 @@ + +#ifndef __GUI_MESSAGEBOX_H +#define __GUI_MESSAGEBOX_H + +#include <gtk/gtk.h> + +extern GtkWidget * gtkMessageBoxText; +extern GtkWidget * MessageBox; + +extern GtkWidget * create_MessageBox( int type ); +extern void ShowMessageBox( const char * msg ); + +#endif diff --git a/gui/mplayer/gtk/menu.c b/gui/mplayer/gtk/menu.c new file mode 100644 index 0000000000..7cca050700 --- /dev/null +++ b/gui/mplayer/gtk/menu.c @@ -0,0 +1,629 @@ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "config.h" +#include "help_mp.h" +#include "access_mpcontext.h" +#include "mixer.h" + +#include "app.h" + +#include "menu.h" +#include "../widgets.h" +#include "app.h" + +#include "stream/stream.h" +#include "../libmpdemux/demuxer.h" +#include "../libmpdemux/stheader.h" + +#include "../pixmaps/ab.xpm" +#include "../pixmaps/half.xpm" +#include "../pixmaps/normal.xpm" +#include "../pixmaps/double.xpm" +#include "../pixmaps/fs.xpm" +#include "../pixmaps/exit.xpm" +#include "../pixmaps/prefs.xpm" +#include "../pixmaps/eq.xpm" +#include "../pixmaps/pl.xpm" +#include "../pixmaps/skin.xpm" +#include "../pixmaps/sound.xpm" +#include "../pixmaps/open.xpm" +#include "../pixmaps/play.xpm" +#include "../pixmaps/stop2.xpm" +#include "../pixmaps/pause.xpm" +#include "../pixmaps/prev.xpm" +#include "../pixmaps/next.xpm" +#include "../pixmaps/aspect.xpm" +#include "../pixmaps/a11.xpm" +#include "../pixmaps/a169.xpm" +#include "../pixmaps/a235.xpm" +#include "../pixmaps/a43.xpm" +#include "../pixmaps/file2.xpm" +#include "../pixmaps/url.xpm" +#include "../pixmaps/sub.xpm" +#include "../pixmaps/delsub.xpm" +#include "../pixmaps/empty.xpm" +#include "../pixmaps/loadeaf.xpm" +#include "../pixmaps/title.xpm" +#ifdef USE_DVDREAD +#include "../pixmaps/dvd.xpm" +#include "../pixmaps/playdvd.xpm" +#include "../pixmaps/chapter.xpm" +#include "../pixmaps/dolby.xpm" +#include "../pixmaps/tongue.xpm" +#include "../pixmaps/tonguebla.xpm" +#include "../pixmaps/empty1px.xpm" +#endif +#ifdef HAVE_VCD +#include "../pixmaps/vcd.xpm" +#include "../pixmaps/playvcd.xpm" +#endif + +void ActivateMenuItem( int Item ) +{ +// fprintf( stderr,"[menu] item: %d.%d\n",Item&0xffff,Item>>16 ); + gtkPopupMenu=Item & 0x0000ffff; + gtkPopupMenuParam=Item >> 16; + mplEventHandling( Item & 0x0000ffff,Item >> 16 ); +} + +static GtkWidget * AddMenuCheckItem(GtkWidget *window1, const char * immagine_xpm, GtkWidget* Menu,const char* label, gboolean state, int Number) +{ + GtkWidget * Label = NULL; + GtkWidget * Pixmap = NULL; + GtkWidget * hbox = NULL; + GtkWidget * Item = NULL; + + GdkPixmap *PixmapIcon = NULL; + GdkColor transparent; + GdkBitmap *MaskIcon = NULL; + + PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm ); + Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon); + gdk_pixmap_unref (PixmapIcon); + + Item=gtk_check_menu_item_new(); + Label = gtk_label_new (label); + + hbox = gtk_hbox_new (FALSE, 8); + gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0); + gtk_container_add (GTK_CONTAINER (Item), hbox); + + gtk_menu_append( GTK_MENU( Menu ),Item ); + + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(Item),state); + gtk_signal_connect_object( GTK_OBJECT(Item),"activate", + GTK_SIGNAL_FUNC(ActivateMenuItem),(gpointer)Number ); + gtk_menu_item_right_justify (GTK_MENU_ITEM (Item)); + gtk_widget_show_all(Item); + + return Item; +} +GtkWidget * AddMenuItem( GtkWidget *window1, const char * immagine_xpm, GtkWidget * SubMenu,const char * label,int Number ) +{ + GtkWidget * Label = NULL; + GtkWidget * Pixmap = NULL; + GtkWidget * hbox = NULL; + GtkWidget * Item = NULL; + GdkPixmap * PixmapIcon = NULL; + GdkColor transparent; + GdkBitmap * MaskIcon = NULL; + + PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm ); + Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon); + gdk_pixmap_unref (PixmapIcon); + + Item=gtk_menu_item_new(); + Label = gtk_label_new (label); + + hbox = gtk_hbox_new (FALSE, 8); + gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0); + gtk_container_add (GTK_CONTAINER (Item), hbox); + + + gtk_menu_append( GTK_MENU( SubMenu ),Item ); + gtk_signal_connect_object( GTK_OBJECT(Item),"activate", + GTK_SIGNAL_FUNC(ActivateMenuItem),(gpointer)Number ); + + gtk_menu_item_right_justify (GTK_MENU_ITEM (Item)); + gtk_widget_show_all(Item); + return Item; +} + + +GtkWidget * AddSubMenu( GtkWidget *window1, const char * immagine_xpm, GtkWidget * Menu,const char * label ) +{ + GtkWidget * Label = NULL; + GtkWidget * Pixmap = NULL; + GtkWidget * hbox = NULL; + GtkWidget * Item = NULL; + GtkWidget * SubItem = NULL; + GdkPixmap * PixmapIcon = NULL; + GdkColor transparent; + GdkBitmap * MaskIcon = NULL; + + PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm); + Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon); + gdk_pixmap_unref (PixmapIcon); + + SubItem=gtk_menu_item_new(); + Item=gtk_menu_new(); + Label = gtk_label_new (label); + + hbox = gtk_hbox_new (FALSE, 8); + gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0); + gtk_container_add (GTK_CONTAINER (SubItem), hbox); + + gtk_menu_append( GTK_MENU( Menu ),SubItem ); + gtk_menu_item_set_submenu( GTK_MENU_ITEM( SubItem ),Item ); + + gtk_widget_show_all( SubItem ); + return Item; +} + +GtkWidget * AddSeparator( GtkWidget * Menu ) +{ + GtkWidget * Item = NULL; + + Item=gtk_menu_item_new (); + gtk_widget_show( Item ); + gtk_container_add( GTK_CONTAINER( Menu ),Item ); + gtk_widget_set_sensitive( Item,FALSE ); + + return Item; +} + +typedef struct +{ + int id; + const char * name; +} Languages_t; + +#define lng( a,b ) ( (int)(a) * 256 + b ) +static Languages_t Languages[] = + { + { lng( 'a','b' ), "Abkhazian" }, + { lng( 'a','a' ), "Afar" }, + { lng( 'a','f' ), "Afrikaans" }, + { lng( 's','q' ), "Albanian" }, + { lng( 'a','m' ), "Amharic" }, + { lng( 'a','r' ), "Arabic" }, + { lng( 'h','y' ), "Armenian" }, + { lng( 'a','s' ), "Assamese" }, + { lng( 'a','e' ), "Avestan" }, + { lng( 'a','y' ), "Aymara" }, + { lng( 'a','z' ), "Azerbaijani" }, + { lng( 'b','a' ), "Bashkir" }, + { lng( 'e','u' ), "Basque" }, + { lng( 'b','e' ), "Belarusian" }, + { lng( 'b','n' ), "Bengali" }, + { lng( 'b','h' ), "Bihari" }, + { lng( 'b','i' ), "Bislama" }, + { lng( 'b','s' ), "Bosnian" }, + { lng( 'b','r' ), "Breton" }, + { lng( 'b','g' ), "Bulgarian" }, + { lng( 'm','y' ), "Burmese" }, + { lng( 'c','a' ), "Catalan" }, + { lng( 'c','h' ), "Chamorro" }, + { lng( 'c','e' ), "Chechen" }, + { lng( 'n','y' ), "Chichewa;Nyanja" }, + { lng( 'z','h' ), "Chinese" }, + { lng( 'c','u' ), "ChurchSlavic" }, + { lng( 'c','v' ), "Chuvash" }, + { lng( 'k','w' ), "Cornish" }, + { lng( 'c','o' ), "Corsican" }, + { lng( 'h','r' ), "Croatian" }, + { lng( 'c','s' ), "Czech" }, + { lng( 'd','a' ), "Danish" }, + { lng( 'n','l' ), "Dutch" }, + { lng( 'd','z' ), "Dzongkha" }, + { lng( 'e','n' ), "English" }, + { lng( 'e','o' ), "Esperanto" }, + { lng( 'e','t' ), "Estonian" }, + { lng( 'f','o' ), "Faroese" }, + { lng( 'f','j' ), "Fijian" }, + { lng( 'f','i' ), "Finnish" }, + { lng( 'f','r' ), "French" }, + { lng( 'f','y' ), "Frisian" }, + { lng( 'g','d' ), "Gaelic(Scots" }, + { lng( 'g','l' ), "Gallegan" }, + { lng( 'k','a' ), "Georgian" }, + { lng( 'd','e' ), "German" }, + { lng( 'e','l' ), "Greek" }, + { lng( 'g','n' ), "Guarani" }, + { lng( 'g','u' ), "Gujarati" }, + { lng( 'h','a' ), "Hausa" }, + { lng( 'h','e' ), "Hebrew" }, + { lng( 'i','w' ), "Hebrew" }, + { lng( 'h','z' ), "Herero" }, + { lng( 'h','i' ), "Hindi" }, + { lng( 'h','o' ), "HiriMotu" }, + { lng( 'h','u' ), "Hungarian" }, + { lng( 'i','s' ), "Icelandic" }, + { lng( 'i','d' ), "Indonesian" }, + { lng( 'i','n' ), "Indonesian" }, + { lng( 'i','a' ), "Interlingua" }, + { lng( 'i','e' ), "Interlingue" }, + { lng( 'i','u' ), "Inuktitut" }, + { lng( 'i','k' ), "Inupiaq" }, + { lng( 'g','a' ), "Irish" }, + { lng( 'i','t' ), "Italian" }, + { lng( 'j','a' ), "Japanese" }, + { lng( 'j','v' ), "Javanese" }, + { lng( 'j','w' ), "Javanese" }, + { lng( 'k','l' ), "Kalaallisut" }, + { lng( 'k','n' ), "Kannada" }, + { lng( 'k','s' ), "Kashmiri" }, + { lng( 'k','k' ), "Kazakh" }, + { lng( 'k','m' ), "Khmer" }, + { lng( 'k','i' ), "Kikuyu" }, + { lng( 'r','w' ), "Kinyarwanda" }, + { lng( 'k','y' ), "Kirghiz" }, + { lng( 'k','v' ), "Komi" }, + { lng( 'k','o' ), "Korean" }, + { lng( 'k','j' ), "Kuanyama" }, + { lng( 'k','u' ), "Kurdish" }, + { lng( 'l','o' ), "Lao" }, + { lng( 'l','a' ), "Latin" }, + { lng( 'l','v' ), "Latvian" }, + { lng( 'l','b' ), "Letzeburgesch" }, + { lng( 'l','n' ), "Lingala" }, + { lng( 'l','t' ), "Lithuanian" }, + { lng( 'm','k' ), "Macedonian" }, + { lng( 'm','g' ), "Malagasy" }, + { lng( 'm','s' ), "Malay" }, + { lng( 'm','l' ), "Malayalam" }, + { lng( 'm','t' ), "Maltese" }, + { lng( 'g','v' ), "Manx" }, + { lng( 'm','i' ), "Maori" }, + { lng( 'm','r' ), "Marathi" }, + { lng( 'm','h' ), "Marshall" }, + { lng( 'm','o' ), "Moldavian" }, + { lng( 'm','n' ), "Mongolian" }, + { lng( 'n','a' ), "Nauru" }, + { lng( 'n','v' ), "Navajo" }, + { lng( 'n','d' ), "North Ndebele" }, + { lng( 'n','r' ), "South Ndebele" }, + { lng( 'n','g' ), "Ndonga" }, + { lng( 'n','e' ), "Nepali" }, + { lng( 's','e' ), "NorthernSami" }, + { lng( 'n','o' ), "Norwegian" }, + { lng( 'n','b' ), "NorwegianBokmål" }, + { lng( 'n','n' ), "NorwegianNynorsk" }, + { lng( 'n','y' ), "Nyanja;Chichewa" }, + { lng( 'o','c' ), "Occitan(post1500;Provençal" }, + { lng( 'o','r' ), "Oriya" }, + { lng( 'o','m' ), "Oromo" }, + { lng( 'o','s' ), "Ossetian;Ossetic" }, + { lng( 'p','i' ), "Pali" }, + { lng( 'p','a' ), "Panjabi" }, + { lng( 'f','a' ), "Persian" }, + { lng( 'p','l' ), "Polish" }, + { lng( 'p','t' ), "Portuguese" }, + { lng( 'o','c' ), "Provençal;Occitan(post1500" }, + { lng( 'p','s' ), "Pushto" }, + { lng( 'q','u' ), "Quechua" }, + { lng( 'r','m' ), "Raeto-Romance" }, + { lng( 'r','o' ), "Romanian" }, + { lng( 'r','n' ), "Rundi" }, + { lng( 'r','u' ), "Russian" }, + { lng( 's','m' ), "Samoan" }, + { lng( 's','g' ), "Sango" }, + { lng( 's','a' ), "Sanskrit" }, + { lng( 's','c' ), "Sardinian" }, + { lng( 's','r' ), "Serbian" }, + { lng( 's','n' ), "Shona" }, + { lng( 's','d' ), "Sindhi" }, + { lng( 's','i' ), "Sinhalese" }, + { lng( 's','k' ), "Slovak" }, + { lng( 's','l' ), "Slovenian" }, + { lng( 's','o' ), "Somali" }, + { lng( 's','t' ), "Sotho" }, + { lng( 'e','s' ), "Spanish" }, + { lng( 's','u' ), "Sundanese" }, + { lng( 's','w' ), "Swahili" }, + { lng( 's','s' ), "Swati" }, + { lng( 's','v' ), "Swedish" }, + { lng( 't','l' ), "Tagalog" }, + { lng( 't','y' ), "Tahitian" }, + { lng( 't','g' ), "Tajik" }, + { lng( 't','a' ), "Tamil" }, + { lng( 't','t' ), "Tatar" }, + { lng( 't','e' ), "Telugu" }, + { lng( 't','h' ), "Thai" }, + { lng( 'b','o' ), "Tibetan" }, + { lng( 't','i' ), "Tigrinya" }, + { lng( 't','o' ), "Tonga" }, + { lng( 't','s' ), "Tsonga" }, + { lng( 't','n' ), "Tswana" }, + { lng( 't','r' ), "Turkish" }, + { lng( 't','k' ), "Turkmen" }, + { lng( 't','w' ), "Twi" }, + { lng( 'u','g' ), "Uighur" }, + { lng( 'u','k' ), "Ukrainian" }, + { lng( 'u','r' ), "Urdu" }, + { lng( 'u','z' ), "Uzbek" }, + { lng( 'v','i' ), "Vietnamese" }, + { lng( 'v','o' ), "Volapük" }, + { lng( 'c','y' ), "Welsh" }, + { lng( 'w','o' ), "Wolof" }, + { lng( 'x','h' ), "Xhosa" }, + { lng( 'y','i' ), "Yiddish" }, + { lng( 'j','i' ), "Yiddish" }, + { lng( 'y','o' ), "Yoruba" }, + { lng( 'z','a' ), "Zhuang" }, + { lng( 'z','u' ), "Zulu" }, + }; +#undef lng + +#ifdef USE_DVDREAD +static char * ChannelTypes[] = + { "Dolby Digital","","Mpeg1","Mpeg2","PCM","","Digital Theatre System" }; +static char * ChannelNumbers[] = + { "","Stereo","","","","5.1" }; +#endif + +const char * GetLanguage( int language ) +{ + unsigned int i; + for ( i=0;i<sizeof( Languages ) / sizeof( Languages_t );i++ ) + if ( Languages[i].id == language ) return Languages[i].name; + return NULL; +} + + +GtkWidget * DVDSubMenu; +GtkWidget * DVDTitleMenu; +GtkWidget * DVDChapterMenu; +GtkWidget * DVDAudioLanguageMenu; +GtkWidget * DVDSubtitleLanguageMenu; +GtkWidget * AspectMenu; +GtkWidget * VCDSubMenu; +GtkWidget * VCDTitleMenu; + +GtkWidget * create_PopUpMenu( void ) +{ + GtkWidget * window1; + GtkWidget * Menu = NULL; + GtkWidget * SubMenu = NULL; + GtkWidget * MenuItem = NULL; + GtkWidget * H, * N, * D, * F; + mixer_t *mixer = mpctx_get_mixer(guiIntfStruct.mpcontext); + int global_sub_size = mpctx_get_global_sub_size(guiIntfStruct.mpcontext); + + Menu=gtk_menu_new(); + gtk_widget_realize (Menu); + window1 = gtk_widget_get_toplevel(Menu); + + + AddMenuItem( window1, (const char*)ab_xpm, Menu,MSGTR_MENU_AboutMPlayer" ", evAbout ); + AddSeparator( Menu ); + SubMenu=AddSubMenu( window1, (const char*)open_xpm, Menu,MSGTR_MENU_Open ); + AddMenuItem( window1, (const char*)file2_xpm, SubMenu,MSGTR_MENU_PlayFile" ", evLoadPlay ); +#ifdef HAVE_VCD + AddMenuItem( window1, (const char*)playvcd_xpm, SubMenu,MSGTR_MENU_PlayVCD, evPlayVCD ); +#endif +#ifdef USE_DVDREAD + AddMenuItem( window1, (const char*)playdvd_xpm, SubMenu,MSGTR_MENU_PlayDVD, evPlayDVD ); +#endif + AddMenuItem( window1, (const char*)url_xpm, SubMenu,MSGTR_MENU_PlayURL, evSetURL ); + AddMenuItem( window1, (const char*)sub_xpm, SubMenu,MSGTR_MENU_LoadSubtitle" ", evLoadSubtitle ); + AddMenuItem( window1, (const char*)delsub_xpm, SubMenu,MSGTR_MENU_DropSubtitle,evDropSubtitle ); + AddMenuItem( window1, (const char*)loadeaf_xpm, SubMenu,MSGTR_MENU_LoadExternAudioFile, evLoadAudioFile ); + SubMenu=AddSubMenu(window1, (const char*)play_xpm, Menu,MSGTR_MENU_Playing ); + AddMenuItem( window1, (const char*)play_xpm, SubMenu,MSGTR_MENU_Play" ", evPlay ); + AddMenuItem( window1, (const char*)pause_xpm, SubMenu,MSGTR_MENU_Pause, evPause ); + AddMenuItem( window1, (const char*)stop2_xpm, SubMenu,MSGTR_MENU_Stop, evStop ); + AddMenuItem( window1, (const char*)next_xpm, SubMenu,MSGTR_MENU_NextStream, evNext ); + AddMenuItem( window1, (const char*)prev_xpm, SubMenu,MSGTR_MENU_PrevStream, evPrev ); +// AddSeparator( SubMenu ); +// AddMenuItem( SubMenu,"Back 10 sec", evBackward10sec ); +// AddMenuItem( SubMenu,"Fwd 10 sec", evForward10sec ); +// AddMenuItem( SubMenu,"Back 1 min", evBackward1min ); +// AddMenuItem( SubMenu,"Fwd 1 min", evForward1min ); +// SubMenu=AddSubMenu( Menu,MSGTR_MENU_Size ); +// AddMenuItem( SubMenu,MSGTR_MENU_NormalSize" ", evNormalSize ); +// AddMenuItem( SubMenu,MSGTR_MENU_DoubleSize, evDoubleSize ); +// AddMenuItem( SubMenu,MSGTR_MENU_FullScreen, evFullScreen ); +#ifdef HAVE_VCD + VCDSubMenu=AddSubMenu( window1, (const char*)vcd_xpm, Menu,MSGTR_MENU_VCD ); + AddMenuItem( window1, (const char*)playvcd_xpm, VCDSubMenu,MSGTR_MENU_PlayDisc,evPlayVCD ); + AddSeparator( VCDSubMenu ); + VCDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, VCDSubMenu,MSGTR_MENU_Titles ); + if ( guiIntfStruct.VCDTracks ) + { + char tmp[32]; int i; + for ( i=0;i < guiIntfStruct.VCDTracks;i++ ) + { + snprintf( tmp,32,MSGTR_MENU_Title,i+1 ); + //AddMenuItem( VCDTitleMenu,tmp,( (i+1) << 16 ) + evSetVCDTrack ); + AddMenuItem(window1, (const char*)empty_xpm, VCDTitleMenu,tmp,( (i+1) << 16 ) + evSetVCDTrack ); + } + } + else + { + MenuItem=AddMenuItem( window1, (const char*)empty_xpm, VCDTitleMenu,MSGTR_MENU_None,evNone ); + gtk_widget_set_sensitive( MenuItem,FALSE ); + } +#endif +#ifdef USE_DVDREAD + DVDSubMenu=AddSubMenu( window1, (const char*)dvd_xpm, Menu,MSGTR_MENU_DVD ); + AddMenuItem( window1, (const char*)playdvd_xpm, DVDSubMenu,MSGTR_MENU_PlayDisc" ", evPlayDVD ); +// AddMenuItem( DVDSubMenu,MSGTR_MENU_ShowDVDMenu, evNone ); + AddSeparator( DVDSubMenu ); + DVDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, DVDSubMenu,MSGTR_MENU_Titles ); + if ( guiIntfStruct.DVD.titles ) + { + char tmp[32]; int i; + for ( i=1 ; i<= guiIntfStruct.DVD.titles;i++ ) + { + snprintf( tmp,32,MSGTR_MENU_Title,i); + AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDTitleMenu,tmp, + guiIntfStruct.DVD.current_title == i, + (i << 16) + evSetDVDTitle ); + } + } + else + { + MenuItem=AddMenuItem( window1, (const char*)empty_xpm, DVDTitleMenu,MSGTR_MENU_None,evNone ); + gtk_widget_set_sensitive( MenuItem,FALSE ); + } + DVDChapterMenu=AddSubMenu( window1, (const char*)chapter_xpm, DVDSubMenu,MSGTR_MENU_Chapters ); + if ( guiIntfStruct.DVD.chapters ) + { + char tmp[32]; int i; + for ( i=1;i <= guiIntfStruct.DVD.chapters;i++ ) + { + snprintf( tmp,32,MSGTR_MENU_Chapter,i ); + AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDChapterMenu,tmp,guiIntfStruct.DVD.current_chapter == i, + ( i << 16 ) + evSetDVDChapter ); + } + } + else + { + MenuItem=AddMenuItem( window1, (const char*)empty_xpm, DVDChapterMenu,MSGTR_MENU_None,evNone ); + gtk_widget_set_sensitive( MenuItem,FALSE ); + } + DVDAudioLanguageMenu=AddSubMenu( window1, (const char*)tongue_xpm, DVDSubMenu,MSGTR_MENU_AudioLanguages ); + if ( guiIntfStruct.DVD.nr_of_audio_channels ) + { + char tmp[64]; int i, id = guiIntfStruct.demuxer ? ((demuxer_t *)guiIntfStruct.demuxer)->audio->id : audio_id; + for ( i=0;i < guiIntfStruct.DVD.nr_of_audio_channels;i++ ) + { + snprintf( tmp,64,"%s - %s %s",GetLanguage( guiIntfStruct.DVD.audio_streams[i].language ), + ChannelTypes[ guiIntfStruct.DVD.audio_streams[i].type ], + ChannelNumbers[ guiIntfStruct.DVD.audio_streams[i].channels ] ); +// if ( id == -1 ) id=audio_id; //guiIntfStruct.DVD.audio_streams[i].id; + AddMenuCheckItem( window1, (const char*)dolby_xpm, DVDAudioLanguageMenu,tmp, + id == guiIntfStruct.DVD.audio_streams[i].id, + ( guiIntfStruct.DVD.audio_streams[i].id << 16 ) + evSetDVDAudio ); + } + } + else + { + MenuItem=AddMenuItem( window1, (const char*)empty_xpm, DVDAudioLanguageMenu,MSGTR_MENU_None,evNone ); + gtk_widget_set_sensitive( MenuItem,FALSE ); + } + DVDSubtitleLanguageMenu=AddSubMenu( window1, (const char*)tonguebla_xpm, DVDSubMenu,MSGTR_MENU_SubtitleLanguages ); + if ( guiIntfStruct.DVD.nr_of_subtitles ) + { + char tmp[64]; int i; + AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_MENU_None,( (unsigned short)-1 << 16 ) + evSetDVDSubtitle ); + for ( i=0;i < guiIntfStruct.DVD.nr_of_subtitles;i++ ) + { + snprintf( tmp,64,"%s",GetLanguage( guiIntfStruct.DVD.subtitles[i].language ) ); + AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,tmp, + dvdsub_id == guiIntfStruct.DVD.subtitles[i].id, + ( guiIntfStruct.DVD.subtitles[i].id << 16 ) + evSetDVDSubtitle ); + } + } + else + { + MenuItem=AddMenuItem( window1, (const char*)empty_xpm, DVDSubtitleLanguageMenu,MSGTR_MENU_None,evNone ); + gtk_widget_set_sensitive( MenuItem,FALSE ); + } +#endif + +// if ( guiIntfStruct.Playing ) + { + AspectMenu=AddSubMenu( window1, (const char*)aspect_xpm, Menu,MSGTR_MENU_AspectRatio ); + AddMenuItem( window1, (const char*)a11_xpm, AspectMenu,MSGTR_MENU_Original,( 1 << 16 ) + evSetAspect ); + AddMenuItem( window1, (const char*)a169_xpm, AspectMenu,"16:9",( 2 << 16 ) + evSetAspect ); + AddMenuItem( window1, (const char*)a43_xpm, AspectMenu,"4:3",( 3 << 16 ) + evSetAspect ); + AddMenuItem( window1, (const char*)a235_xpm, AspectMenu,"2.35",( 4 << 16 ) + evSetAspect ); + } + + if ( guiIntfStruct.Playing && guiIntfStruct.demuxer && guiIntfStruct.StreamType != STREAMTYPE_DVD ) + { + int i,c = 0; + + for ( i=0;i < MAX_A_STREAMS;i++ ) + if ( ((demuxer_t *)guiIntfStruct.demuxer)->a_streams[i] ) c++; + + if ( c > 1 ) + { + SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu,MSGTR_MENU_AudioTrack ); + for ( i=0;i < MAX_A_STREAMS;i++ ) + if ( ((demuxer_t *)guiIntfStruct.demuxer)->a_streams[i] ) + { + int aid = ((sh_audio_t *)((demuxer_t *)guiIntfStruct.demuxer)->a_streams[i])->aid; + char tmp[32]; + snprintf( tmp,32,MSGTR_MENU_Track,aid ); + AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( aid << 16 ) + evSetAudio ); + } + } + + for ( c=0,i=0;i < MAX_V_STREAMS;i++ ) + if ( ((demuxer_t *)guiIntfStruct.demuxer)->v_streams[i] ) c++; + + if ( c > 1 ) + { + SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu,MSGTR_MENU_VideoTrack ); + for ( i=0;i < MAX_V_STREAMS;i++ ) + if ( ((demuxer_t *)guiIntfStruct.demuxer)->v_streams[i] ) + { + int vid = ((sh_video_t *)((demuxer_t *)guiIntfStruct.demuxer)->v_streams[i])->vid; + char tmp[32]; + snprintf( tmp,32,MSGTR_MENU_Track,vid ); + AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( vid << 16 ) + evSetVideo ); + } + } + } + + /* cheap subtitle switching for non-DVD streams */ + if ( global_sub_size && guiIntfStruct.StreamType != STREAMTYPE_DVD ) + { + int i; + SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu, MSGTR_MENU_Subtitles ); + AddMenuItem( window1, (const char*)empty_xpm, SubMenu, MSGTR_MENU_None, (-1 << 16) + evSetSubtitle ); + for ( i=0;i < global_sub_size;i++ ) + { + char tmp[32]; + snprintf( tmp, 32, MSGTR_MENU_Track, i ); + AddMenuItem( window1,(const char*)empty_xpm,SubMenu,tmp,( i << 16 ) + evSetSubtitle ); + } + } + + AddSeparator( Menu ); + MenuItem=AddMenuCheckItem( window1, (const char*)sound_xpm, Menu,MSGTR_MENU_Mute,mixer->muted,evMute ); + if ( !guiIntfStruct.AudioType ) gtk_widget_set_sensitive( MenuItem,FALSE ); + AddMenuItem( window1, (const char*)pl_xpm, Menu,MSGTR_MENU_PlayList, evPlayList ); + AddMenuItem( window1, (const char*)skin_xpm, Menu,MSGTR_MENU_SkinBrowser, evSkinBrowser ); + AddMenuItem( window1, (const char*)prefs_xpm, Menu,MSGTR_MENU_Preferences, evPreferences ); + AddMenuItem( window1, (const char*)eq_xpm, Menu,MSGTR_Equalizer, evEqualizer ); + + if ( guiIntfStruct.NoWindow == False ) + { + int b1 = 0, b2 = 0, b_half = 0; + AddSeparator( Menu ); + if ( !appMPlayer.subWindow.isFullScreen && guiIntfStruct.Playing ) + { + if ( ( appMPlayer.subWindow.Width == guiIntfStruct.MovieWidth * 2 )&& + ( appMPlayer.subWindow.Height == guiIntfStruct.MovieHeight * 2 ) ) b2=1; + else if ( ( appMPlayer.subWindow.Width == guiIntfStruct.MovieWidth / 2 ) && + ( appMPlayer.subWindow.Height == guiIntfStruct.MovieHeight / 2 ) ) b_half=1; + else b1=1; + } else b1=!appMPlayer.subWindow.isFullScreen; + H=AddMenuCheckItem( window1, (const char*)half_xpm, Menu,MSGTR_MENU_HalfSize,b_half,evHalfSize ); + N=AddMenuCheckItem( window1, (const char*)normal_xpm, Menu,MSGTR_MENU_NormalSize" ",b1,evNormalSize ); + D=AddMenuCheckItem( window1, (const char*)double_xpm, Menu,MSGTR_MENU_DoubleSize,b2,evDoubleSize ); + F=AddMenuCheckItem( window1, (const char*)fs_xpm, Menu,MSGTR_MENU_FullScreen,appMPlayer.subWindow.isFullScreen,evFullScreen ); + if ( !gtkShowVideoWindow && !guiIntfStruct.Playing ) + { + gtk_widget_set_sensitive( H,FALSE ); + gtk_widget_set_sensitive( N,FALSE ); + gtk_widget_set_sensitive( D,FALSE ); + gtk_widget_set_sensitive( F,FALSE ); + } + } + + AddSeparator( Menu ); + AddMenuItem( window1, (const char*)exit_xpm, Menu,MSGTR_MENU_Exit, evExit ); + + return Menu; +} diff --git a/gui/mplayer/gtk/menu.h b/gui/mplayer/gtk/menu.h new file mode 100644 index 0000000000..a8bc5bcc5b --- /dev/null +++ b/gui/mplayer/gtk/menu.h @@ -0,0 +1,13 @@ +#ifndef __GUI_MENU_H +#define __GUI_MENU_H + +#include <gtk/gtk.h> + +extern GtkWidget * DVDSubMenu; + +extern GtkWidget * AddMenuItem( GtkWidget *window1, const char * immagine_xpm, GtkWidget * SubMenu,const char * label,int Number ); +extern GtkWidget * AddSubMenu( GtkWidget *window1, const char * immagine_xpm, GtkWidget * Menu,const char * label ); +extern GtkWidget * AddSeparator( GtkWidget * Menu ); +extern GtkWidget * create_PopUpMenu( void ); + +#endif diff --git a/gui/mplayer/gtk/opts.c b/gui/mplayer/gtk/opts.c new file mode 100644 index 0000000000..60e9a1bde8 --- /dev/null +++ b/gui/mplayer/gtk/opts.c @@ -0,0 +1,1814 @@ + +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +#include <string.h> + +#include <gdk/gdkkeysyms.h> +#include <gtk/gtk.h> + +#include "config.h" +#include "help_mp.h" +#include "mixer.h" +#include "libao2/audio_out.h" +#include "libvo/video_out.h" + +#include "app.h" +#include "cfg.h" +#include "interface.h" +#include "../widgets.h" +#include "opts.h" +#include "fs.h" +#include "common.h" + +typedef struct sh_video_t sh_video_t; +typedef struct sh_audio_t sh_audio_t; + +// for mpcodecs_[av]d_drivers: +#include "libmpcodecs/vd.h" +#include "libmpcodecs/ad.h" + + GtkWidget * Preferences = NULL; +static GtkWidget * AConfig; +static GtkWidget * VConfig; +//static GtkWidget * BLoadSubtitle; +static GtkWidget * BLoadFont; +static GtkWidget * BOk; +static GtkWidget * BCancel; + +static GtkWidget * CLADrivers; +static GtkWidget * CLVDrivers; + +//static GtkWidget * ESubtitleName; + GtkWidget * prEFontName; + GtkWidget * prEDVDDevice; + GtkWidget * prECDRomDevice; +static GtkWidget * EVFM; +static GtkWidget * EAFM; + +static GtkWidget * CBVFM; +static GtkWidget * CBAFM; +static GtkWidget * CBAudioEqualizer; +//static GtkWidget * CBSurround; +static GtkWidget * CBExtraStereo; +static GtkWidget * CBNormalize; +static GtkWidget * CBSoftwareMixer; +static GtkWidget * CBDoubleBuffer; +static GtkWidget * CBDR; +static GtkWidget * CBFramedrop; +static GtkWidget * CBHFramedrop; +//static GtkWidget * CBFullScreen; +static GtkWidget * CBShowVideoWindow; +static GtkWidget * CBNonInterlaved; +static GtkWidget * CBIndex; +static GtkWidget * CBFlip; +static GtkWidget * CBNoAutoSub; +static GtkWidget * CBSubUnicode; +static GtkWidget * CBSubOverlap; +static GtkWidget * CBDumpMPSub; +static GtkWidget * CBDumpSrt; +static GtkWidget * CBUseASS; +static GtkWidget * CBASSUseMargins; +static GtkWidget * SBASSTopMargin; +static GtkWidget * SBASSBottomMargin; +static GtkWidget * CBPostprocess; +static GtkWidget * CBCache; +static GtkWidget * CBLoadFullscreen; +static GtkWidget * CBSaveWinPos; +static GtkWidget * CBStopXScreenSaver; +static GtkWidget * CBPlayBar; + +static GtkWidget * SBCache; +static GtkAdjustment * SBCacheadj; + +static GtkWidget * CBAutoSync; +static GtkWidget * SBAutoSync; +static GtkAdjustment * SBAutoSyncadj; + +static GtkWidget * RBOSDNone; +static GtkWidget * RBOSDTandP; +static GtkWidget * RBOSDIndicator; +static GtkWidget * RBOSDTPTT; + +static GtkWidget * HSAudioDelay; +static GtkWidget * HSExtraStereoMul; +static GtkWidget * HSPanscan; +static GtkWidget * HSSubDelay; +static GtkWidget * HSSubPosition; +static GtkWidget * HSSubFPS; +static GtkWidget * HSPPQuality; +static GtkWidget * HSFPS; + +static GtkAdjustment * HSExtraStereoMuladj, * HSAudioDelayadj, * HSPanscanadj, * HSSubDelayadj; +static GtkAdjustment * HSSubPositionadj, * HSSubFPSadj, * HSPPQualityadj, * HSFPSadj; + +#ifndef HAVE_FREETYPE +static GtkWidget * HSFontFactor; +static GtkAdjustment * HSFontFactoradj; +#else +static GtkWidget * HSFontBlur, * HSFontOutLine, * HSFontTextScale, * HSFontOSDScale; +static GtkAdjustment * HSFontBluradj, * HSFontOutLineadj, * HSFontTextScaleadj, * HSFontOSDScaleadj; +static GtkWidget * CBFontEncoding, * EFontEncoding; +static GtkWidget * RBFontNoAutoScale, * RBFontAutoScaleWidth, * RBFontAutoScaleHeight, * RBFontAutoScaleDiagonal; +//static GtkWidget * AutoScale; +#endif + +#ifdef USE_ICONV +static GtkWidget * CBSubEncoding, * ESubEncoding; +#endif + +#if defined( HAVE_FREETYPE ) || defined( USE_ICONV ) +static struct +{ + char * name; + char * comment; +} lEncoding[] = + { + { "unicode", MSGTR_PREFERENCES_FontEncoding1 }, + { "iso-8859-1", MSGTR_PREFERENCES_FontEncoding2 }, + { "iso-8859-15", MSGTR_PREFERENCES_FontEncoding3 }, + { "iso-8859-2", MSGTR_PREFERENCES_FontEncoding4 }, + { "cp1250", MSGTR_PREFERENCES_FontEncoding22}, + { "iso-8859-3", MSGTR_PREFERENCES_FontEncoding5 }, + { "iso-8859-4", MSGTR_PREFERENCES_FontEncoding6 }, + { "iso-8859-5", MSGTR_PREFERENCES_FontEncoding7 }, + { "cp1251", MSGTR_PREFERENCES_FontEncoding21}, + { "iso-8859-6", MSGTR_PREFERENCES_FontEncoding8 }, + { "iso-8859-7", MSGTR_PREFERENCES_FontEncoding9 }, + { "iso-8859-9", MSGTR_PREFERENCES_FontEncoding10 }, + { "iso-8859-13", MSGTR_PREFERENCES_FontEncoding11 }, + { "iso-8859-14", MSGTR_PREFERENCES_FontEncoding12 }, + { "iso-8859-8", MSGTR_PREFERENCES_FontEncoding13 }, + { "koi8-r", MSGTR_PREFERENCES_FontEncoding14 }, + { "koi8-u/ru", MSGTR_PREFERENCES_FontEncoding15 }, + { "cp936", MSGTR_PREFERENCES_FontEncoding16 }, + { "big5", MSGTR_PREFERENCES_FontEncoding17 }, + { "shift-jis", MSGTR_PREFERENCES_FontEncoding18 }, + { "cp949", MSGTR_PREFERENCES_FontEncoding19 }, + { "cp874", MSGTR_PREFERENCES_FontEncoding20 }, + { NULL,NULL } + }; +char * lCEncoding = NULL; +char * lSEncoding = NULL; +#endif + +static int old_audio_driver = 0; +static char * ao_driver[3]; +static char * vo_driver[3]; +static int old_video_driver = 0; + +#ifdef HAVE_DXR3 + void ShowDXR3Config( void ); + void HideDXR3Config( void ); +#endif + void ShowAudioConfig(); + void HideAudioConfig(); + +static gboolean prHScaler( GtkWidget * widget,GdkEventMotion * event,gpointer user_data ); +static void prToggled( GtkToggleButton * togglebutton,gpointer user_data ); +static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data ); +#if defined( HAVE_FREETYPE ) || defined( USE_ICONV ) +static void prEntry( GtkContainer * container,gpointer user_data ); +#endif + +extern int stop_xscreensaver; + +void ShowPreferences( void ) +{ + if ( Preferences ) gtkActive( Preferences ); + else Preferences=create_Preferences(); + +// -- 1. page + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBAudioEqualizer ),gtkEnableAudioEqualizer ); +#if 0 + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSurround ),gtkAOSurround ); +#endif + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBExtraStereo ),gtkAOExtraStereo ); + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNormalize ),gtkAONorm ); + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSoftwareMixer ),soft_vol ); + gtk_adjustment_set_value( HSExtraStereoMuladj,gtkAOExtraStereoMul ); + { + int i = 0; + char * tmp[3]; tmp[2]=""; + old_audio_driver=-1; + if ( CLADrivers ) gtk_clist_clear( GTK_CLIST( CLADrivers ) ); + while ( audio_out_drivers[i] ) + { + const ao_info_t *info = audio_out_drivers[i++]->info; + if ( !strcmp( info->short_name,"plugin" ) ) continue; + if ( audio_driver_list ) + { + char * name = gstrdup( audio_driver_list[0] ); + char * sep = gstrchr( audio_driver_list[0],':' ); + if ( sep ) *sep=0; + if ( !gstrcmp( name,(char *)info->short_name ) ) old_audio_driver=i - 1; + free( name ); + } + tmp[0]=(char *)info->short_name; tmp[1]=(char *)info->name; gtk_clist_append( GTK_CLIST( CLADrivers ),tmp ); + } + if ( old_audio_driver > -1 ) + { + gtk_clist_select_row( GTK_CLIST( CLADrivers ),old_audio_driver,0 ); + gtk_clist_get_text( GTK_CLIST( CLADrivers ),old_audio_driver,0,(char **)&ao_driver ); + gtk_widget_set_sensitive( AConfig,FALSE ); + if ( !strncmp( ao_driver[0],"oss",3 ) || + !strncmp( ao_driver[0],"alsa",4 ) || + !strncmp( ao_driver[0],"esd",3 ) || + !strncmp( ao_driver[0],"sdl",3 ) ) + gtk_widget_set_sensitive( AConfig,TRUE ); + } + } + +// -- 2. page + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDoubleBuffer ),vo_doublebuffering ); + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDR ),vo_directrendering ); + + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBFramedrop ),FALSE ); + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBHFramedrop ),FALSE ); + switch ( frame_dropping ) + { + case 2: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBHFramedrop ),TRUE ); + case 1: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBFramedrop ),TRUE ); + } + + if (flip != -1) + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBFlip ),flip ); + gtk_adjustment_set_value( HSPanscanadj,vo_panscan ); + + { + int i = 0, c = 0; + char * tmp[3]; tmp[2]=""; + old_video_driver=0; + if ( CLVDrivers ) gtk_clist_clear( GTK_CLIST( CLVDrivers ) ); + while ( video_out_drivers[i] ) + if ( video_out_drivers[i++]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE ) + { + if ( video_driver_list && !gstrcmp( video_driver_list[0],(char *)video_out_drivers[i - 1]->info->short_name ) ) old_video_driver=c; c++; + tmp[0]=(char *)video_out_drivers[i - 1]->info->short_name; tmp[1]=(char *)video_out_drivers[i - 1]->info->name; + gtk_clist_append( GTK_CLIST( CLVDrivers ),tmp ); + } + gtk_clist_select_row( GTK_CLIST( CLVDrivers ),old_video_driver,0 ); + gtk_clist_get_text( GTK_CLIST( CLVDrivers ),old_video_driver,0,(char **)&vo_driver ); + gtk_widget_set_sensitive( VConfig,FALSE ); +#ifdef HAVE_DXR3 + if ( !gstrcmp( vo_driver[0],"dxr3" ) ) gtk_widget_set_sensitive( VConfig,TRUE ); +#endif + } + + gtk_adjustment_set_value( HSFPSadj,force_fps ); + +// -- 3. page + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSubOverlap ),suboverlap_enabled ); + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ),!sub_auto ); + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ),gtkSubDumpMPSub ); + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDumpSrt ),gtkSubDumpSrt ); + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSubUnicode ),sub_unicode ); +#ifdef USE_ASS + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBUseASS ),gtkASS.enabled ); + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBASSUseMargins ),gtkASS.use_margins ); + gtk_spin_button_set_value( (GtkSpinButton *)SBASSTopMargin,(gdouble)gtkASS.top_margin ); + gtk_spin_button_set_value( (GtkSpinButton *)SBASSBottomMargin,(gdouble)gtkASS.bottom_margin ); + + if ( !gtkASS.enabled ) + { + gtk_widget_set_sensitive( CBASSUseMargins,FALSE ); + gtk_widget_set_sensitive( SBASSTopMargin,FALSE ); + gtk_widget_set_sensitive( SBASSBottomMargin,FALSE ); + } +#endif + + gtk_adjustment_set_value( HSSubDelayadj,sub_delay ); + gtk_adjustment_set_value( HSSubFPSadj,sub_fps ); + gtk_adjustment_set_value( HSSubPositionadj,sub_pos ); + switch ( osd_level ) + { + case 0: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBOSDNone ),TRUE ); break; + case 1: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBOSDIndicator ),TRUE ); break; + case 2: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBOSDTandP ),TRUE ); break; + case 3: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBOSDTPTT ),TRUE ); break; + } +#if 0 + if ( guiIntfStruct.Subtitlename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiIntfStruct.Subtitlename ); +#endif + +#ifdef USE_ICONV + if ( sub_cp ) + { + int i; + for ( i=0;lEncoding[i].name;i++ ) + if ( !gstrcmp( sub_cp,lEncoding[i].name ) ) break; + if ( lEncoding[i].name ) lSEncoding=lEncoding[i].comment; + gtk_entry_set_text( GTK_ENTRY( ESubEncoding ),lSEncoding ); + } +#endif + +// --- 4. page + // font ... + if ( font_name ) gtk_entry_set_text( GTK_ENTRY( prEFontName ),font_name ); +#ifndef HAVE_FREETYPE + gtk_adjustment_set_value( HSFontFactoradj,font_factor ); +#else + gtk_adjustment_set_value( HSFontBluradj,( subtitle_font_radius / 8.0f ) * 100.0f ); + gtk_adjustment_set_value( HSFontOutLineadj,( subtitle_font_thickness / 8.0f ) * 100.0f ); + gtk_adjustment_set_value( HSFontTextScaleadj,text_font_scale_factor ); + gtk_adjustment_set_value( HSFontOSDScaleadj,osd_font_scale_factor ); + if ( subtitle_font_encoding ) + { + int i; + for ( i=0;lEncoding[i].name;i++ ) + if ( !gstrcmp( subtitle_font_encoding,lEncoding[i].name ) ) break; + if ( lEncoding[i].name ) lCEncoding=lEncoding[i].comment; + gtk_entry_set_text( GTK_ENTRY( EFontEncoding ),lCEncoding ); + } + switch ( subtitle_autoscale ) + { + case 0: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontNoAutoScale ),TRUE ); break; + case 1: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleHeight ),TRUE ); break; + case 2: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleWidth ),TRUE ); break; + case 3: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleDiagonal ),TRUE ); break; + } +#endif + +// -- 5. page + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ),force_ni ); + if ( index_mode == 1 ) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBIndex ),1 ); + { + int i; + GList * Items = NULL; + char * name = NULL; + + Items=g_list_append( Items,MSGTR_PREFERENCES_None ); + for( i=0;mpcodecs_vd_drivers[i];i++ ) + { + Items=g_list_append( Items,(char *)mpcodecs_vd_drivers[i]->info->name ); + if ( video_fm_list && !gstrcmp( video_fm_list[0],(char *)mpcodecs_vd_drivers[i]->info->short_name ) ) name=(char *)mpcodecs_vd_drivers[i]->info->name; + } + gtk_combo_set_popdown_strings( GTK_COMBO( CBVFM ),Items ); + g_list_free( Items ); + if ( name ) gtk_entry_set_text( GTK_ENTRY( EVFM ),name ); + } + + { + int i; + GList * Items = NULL; + char * name = NULL; + + Items=g_list_append( Items,MSGTR_PREFERENCES_None ); + for( i=0;mpcodecs_ad_drivers[i];i++ ) + { + Items=g_list_append( Items,(char *)mpcodecs_ad_drivers[i]->info->name ); + if ( audio_fm_list && !gstrcmp( audio_fm_list[0],(char *)mpcodecs_ad_drivers[i]->info->short_name ) ) name=(char *)mpcodecs_ad_drivers[i]->info->name; + } + gtk_combo_set_popdown_strings( GTK_COMBO( CBAFM ),Items ); + g_list_free( Items ); + if ( name ) gtk_entry_set_text( GTK_ENTRY( EAFM ),name ); + } + +// --- 6. page + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBPostprocess ),gtkVfPP ); + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ),gtkLoadFullscreen ); + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSaveWinPos ),gui_save_pos ); + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ),gtkShowVideoWindow ); + if ( !gtkShowVideoWindow ) + { + gtk_widget_set_sensitive( CBLoadFullscreen,FALSE ); + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ),0 ); + } + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBStopXScreenSaver ),stop_xscreensaver ); + gtk_adjustment_set_value( HSPPQualityadj,auto_quality ); + + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBPlayBar ),gtkEnablePlayBar ); + if ( !appMPlayer.barIsPresent ) + { + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBPlayBar ),0 ); + gtk_widget_set_sensitive( CBPlayBar,FALSE ); + } + + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBCache ),0 ); + gtk_adjustment_set_value( SBCacheadj,(float)gtkCacheSize ); + if ( !gtkCacheOn ) gtk_widget_set_sensitive( SBCache,FALSE ); + else gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBCache ),TRUE ); + + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBAutoSync ),0 ); + gtk_adjustment_set_value( SBAutoSyncadj,(float)gtkAutoSync ); + if ( !gtkAutoSyncOn ) gtk_widget_set_sensitive( SBAutoSync,FALSE ); + else gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBAutoSync ),TRUE ); + + if ( dvd_device ) gtk_entry_set_text( GTK_ENTRY( prEDVDDevice ),dvd_device ); + else gtk_entry_set_text( GTK_ENTRY( prEDVDDevice ),DEFAULT_DVD_DEVICE ); + if ( cdrom_device ) gtk_entry_set_text( GTK_ENTRY( prECDRomDevice ),cdrom_device ); + else gtk_entry_set_text( GTK_ENTRY( prECDRomDevice ),DEFAULT_CDROM_DEVICE ); + +// -- disables +#ifndef USE_ASS + gtk_widget_set_sensitive( CBUseASS,FALSE ); + gtk_widget_set_sensitive( CBASSUseMargins,FALSE ); + gtk_widget_set_sensitive( SBASSTopMargin,FALSE ); + gtk_widget_set_sensitive( SBASSBottomMargin,FALSE ); +#endif + +// -- signals + gtk_signal_connect( GTK_OBJECT( CBExtraStereo ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)0 ); + gtk_signal_connect( GTK_OBJECT( CBNormalize ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)1 ); + gtk_signal_connect( GTK_OBJECT( CBSoftwareMixer ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)1 ); + gtk_signal_connect( GTK_OBJECT( CBAudioEqualizer ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)2 ); + gtk_signal_connect( GTK_OBJECT( CBShowVideoWindow ),"toggled",GTK_SIGNAL_FUNC( prToggled ), (void*)3 ); +#ifdef HAVE_FREETYPE + gtk_signal_connect( GTK_OBJECT( RBFontNoAutoScale ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)4 ); + gtk_signal_connect( GTK_OBJECT( RBFontAutoScaleHeight ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)5 ); + gtk_signal_connect( GTK_OBJECT( RBFontAutoScaleWidth ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)6 ); + gtk_signal_connect( GTK_OBJECT( RBFontAutoScaleDiagonal ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)7 ); +#endif + gtk_signal_connect( GTK_OBJECT( CBCache ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)8); + gtk_signal_connect( GTK_OBJECT( CBAutoSync ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)9); +#ifdef USE_ASS + gtk_signal_connect( GTK_OBJECT( CBUseASS ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)10); +#endif + + gtk_signal_connect( GTK_OBJECT( HSExtraStereoMul ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)0 ); + gtk_signal_connect( GTK_OBJECT( HSAudioDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)1 ); + gtk_signal_connect( GTK_OBJECT( HSPanscan ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)2 ); + gtk_signal_connect( GTK_OBJECT( HSSubDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)3 ); + gtk_signal_connect( GTK_OBJECT( HSSubPosition ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)4 ); +#ifndef HAVE_FREETYPE + gtk_signal_connect( GTK_OBJECT( HSFontFactor ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)5 ); +#else + gtk_signal_connect( GTK_OBJECT( HSFontBlur ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)6 ); + gtk_signal_connect( GTK_OBJECT( HSFontOutLine ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)7 ); + gtk_signal_connect( GTK_OBJECT( HSFontTextScale ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)8 ); + gtk_signal_connect( GTK_OBJECT( HSFontOSDScale ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)9 ); + gtk_signal_connect( GTK_OBJECT( EFontEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)0 ); +#endif +#ifdef USE_ICONV + gtk_signal_connect( GTK_OBJECT( ESubEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)1 ); +#endif + gtk_signal_connect( GTK_OBJECT( HSPPQuality ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)10 ); + + gtk_signal_connect( GTK_OBJECT( CLADrivers ),"select_row",GTK_SIGNAL_FUNC( prCListRow ),(void*)0 ); + gtk_signal_connect( GTK_OBJECT( CLVDrivers ),"select_row",GTK_SIGNAL_FUNC( prCListRow ),(void*)1 ); + + gtk_widget_show( Preferences ); + gtkSetLayer( Preferences ); + { + static int visible = 1; + if ( visible ) + { + gtkMessageBox( GTK_MB_WARNING,MSGTR_PREFERENCES_Message ); + visible=0; + } + } +} + +void HidePreferences( void ) +{ + if ( !Preferences ) return; + gtk_widget_hide( Preferences ); + gtk_widget_destroy( Preferences ); + Preferences=NULL; + HideAudioConfig(); +#ifdef HAVE_DXR3 + HideDXR3Config(); +#endif +} + +#if defined( HAVE_FREETYPE ) || defined( USE_ICONV ) +static void prEntry( GtkContainer * container,gpointer user_data ) +{ + char * comment; + int i; + + switch( (int)user_data ) + { +#ifdef HAVE_FREETYPE + case 0: // font encoding + comment=gtk_entry_get_text( GTK_ENTRY( EFontEncoding ) ); + for ( i=0;lEncoding[i].name;i++ ) + if ( !gstrcmp( lEncoding[i].comment,comment ) ) break; + if ( lEncoding[i].comment ) gtkSet( gtkSetFontEncoding,0,lEncoding[i].name ); + break; +#endif +#ifdef USE_ICONV + case 1: // sub encoding + comment=gtk_entry_get_text( GTK_ENTRY( ESubEncoding ) ); + for ( i=0;lEncoding[i].name;i++ ) + if ( !gstrcmp( lEncoding[i].comment,comment ) ) break; + if ( lEncoding[i].comment ) gtkSet( gtkSetSubEncoding,0,lEncoding[i].name ); + else gtkSet( gtkSetSubEncoding,0,NULL ); + break; +#endif + } +} +#endif + +#define bAConfig 0 +#define bVconfig 1 +#define bOk 2 +#define bCancel 3 +#define bLSubtitle 4 +#define bLFont 5 + +void prButton( GtkButton * button,gpointer user_data ) +{ + switch ( (int)user_data ) + { + case bOk: + // -- 1. page + gtkEnableAudioEqualizer=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAudioEqualizer ) ); + gtkAOExtraStereo=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBExtraStereo ) ); + gtkAONorm=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNormalize ) ); + soft_vol=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSoftwareMixer ) ); + gtkSet( gtkSetExtraStereo,HSExtraStereoMuladj->value,NULL ); + audio_delay=HSAudioDelayadj->value; + + gaddlist( &audio_driver_list,ao_driver[0] ); + gaddlist( &video_driver_list,vo_driver[0] ); + + // -- 2. page + vo_doublebuffering=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDoubleBuffer ) ); + vo_directrendering=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDR ) ); + + frame_dropping=0; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBFramedrop ) ) == TRUE ) frame_dropping=1; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBHFramedrop ) ) == TRUE ) frame_dropping=2; + + flip=-1; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBFlip ) ) ) flip=1; + + force_fps=HSFPSadj->value; + + // -- 3. page + suboverlap_enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubOverlap ) ); + sub_auto=!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ) ); + gtkSubDumpMPSub=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ) ); + gtkSubDumpSrt=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpSrt ) ); + sub_unicode=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubUnicode ) ); +#ifdef USE_ASS + gtkASS.enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBUseASS ) ); + gtkASS.use_margins=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBASSUseMargins ) ); + gtkASS.top_margin=gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( SBASSTopMargin ) ); + gtkASS.bottom_margin=gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( SBASSBottomMargin ) ); +#endif + sub_delay=HSSubDelayadj->value; + sub_fps=HSSubFPSadj->value; + sub_pos=(int)HSSubPositionadj->value; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDNone ) ) ) osd_level=0; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDIndicator ) ) ) osd_level=1; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDTandP ) ) ) osd_level=2; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDTPTT ) ) ) osd_level=3; + + + // --- 4. page + guiSetFilename( font_name,gtk_entry_get_text( GTK_ENTRY( prEFontName ) ) ); +#ifndef HAVE_FREETYPE + gtkSet( gtkSetFontFactor,HSFontFactoradj->value,NULL ); +#else + gtkSet( gtkSetFontBlur,HSFontBluradj->value,NULL ); + gtkSet( gtkSetFontOutLine,HSFontOutLineadj->value,NULL ); + gtkSet( gtkSetFontTextScale,HSFontTextScaleadj->value,NULL ); + gtkSet( gtkSetFontOSDScale,HSFontOSDScaleadj->value,NULL ); + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontNoAutoScale ) ) ) gtkSet( gtkSetFontAutoScale,0,NULL ); + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleHeight ) ) ) gtkSet( gtkSetFontAutoScale,1,NULL ); + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleWidth ) ) ) gtkSet( gtkSetFontAutoScale,2,NULL ); + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleDiagonal ) ) ) gtkSet( gtkSetFontAutoScale,3,NULL ); +#endif + + // -- 5. page + force_ni=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ) ); + index_mode=-1; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBIndex ) ) ) index_mode=1; + + { + int i; + char * tmp = gtk_entry_get_text( GTK_ENTRY( EVFM ) ); + for( i=0;mpcodecs_vd_drivers[i];i++ ) + if ( !gstrcmp( tmp,(char *)mpcodecs_vd_drivers[i]->info->name ) ) + { gaddlist( &video_fm_list,(char *)mpcodecs_vd_drivers[i]->info->short_name ); break; } + } + + { + int i; + char * tmp = gtk_entry_get_text( GTK_ENTRY( EAFM ) ); + for( i=0;mpcodecs_ad_drivers[i];i++ ) + if ( !gstrcmp( tmp,(char *)mpcodecs_ad_drivers[i]->info->name ) ) + { gaddlist( &audio_fm_list,(char *)mpcodecs_ad_drivers[i]->info->short_name ); break; } + } + + // --- 6. page + gtkVfPP=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPostprocess ) ); + gtkLoadFullscreen=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ) ); + gui_save_pos=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSaveWinPos ) ); + gtkShowVideoWindow=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ); + stop_xscreensaver=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBStopXScreenSaver ) ); + gtkEnablePlayBar=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPlayBar ) ); + gtkSet( gtkSetAutoq,HSPPQualityadj->value,NULL ); + + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) { gtkCacheSize=(int)SBCacheadj->value; gtkCacheOn=1; } + else gtkCacheOn=0; + + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAutoSync ) ) ) { gtkAutoSync=(int)SBAutoSyncadj->value; gtkAutoSyncOn=1; } + else gtkAutoSyncOn=0; + + guiSetFilename( dvd_device,gtk_entry_get_text( GTK_ENTRY( prEDVDDevice ) ) ); + guiSetFilename( cdrom_device,gtk_entry_get_text( GTK_ENTRY( prECDRomDevice ) ) ); + + case bCancel: + HidePreferences(); + break; + case bAConfig: + if ( !ao_driver[0] ) break; + gtk_widget_set_sensitive( AConfig,FALSE ); + if ( !strncmp( ao_driver[0],"oss",3 ) || + !strncmp( ao_driver[0],"alsa",4 ) || + !strncmp( ao_driver[0],"esd",3 ) || + !strncmp( ao_driver[0],"sdl",3 ) ) { + ShowAudioConfig(); + gtk_widget_set_sensitive( AConfig,TRUE ); + } + break; + case bVconfig: + if ( !vo_driver[0] ) break; + gtk_widget_set_sensitive( VConfig,FALSE ); +#ifdef HAVE_DXR3 + if ( !gstrcmp( vo_driver[0],"dxr3" ) ) { ShowDXR3Config(); gtk_widget_set_sensitive( VConfig,TRUE ); } +#endif + break; +#if 0 + case bLSubtitle: + break; +#endif + case bLFont: + ShowFileSelect( fsFontSelector,FALSE ); + gtkSetLayer( fsFileSelect ); + break; + } +} + +static gboolean prHScaler( GtkWidget * widget,GdkEventMotion * event,gpointer user_data ) +{ + switch ( (int)user_data ) + { + case 0: // extra stereo coefficient + if ( !guiIntfStruct.Playing ) break; + gtkSet( gtkSetExtraStereo,HSExtraStereoMuladj->value,NULL ); + break; + case 1: // audio delay + audio_delay=HSAudioDelayadj->value; + break; + case 2: // panscan + gtkSet( gtkSetPanscan,HSPanscanadj->value,NULL ); + break; + case 3: // sub delay + sub_delay=HSSubDelayadj->value; + break; + case 4: // sub position + sub_pos=(int)HSSubPositionadj->value; + break; +#ifndef HAVE_FREETYPE + case 5: // font factor + gtkSet( gtkSetFontFactor,HSFontFactoradj->value,NULL ); + break; +#else + case 6: // font blur + gtkSet( gtkSetFontBlur,HSFontBluradj->value,NULL ); + break; + case 7: // font outline + gtkSet( gtkSetFontOutLine,HSFontOutLineadj->value,NULL ); + break; + case 8: // text scale + gtkSet( gtkSetFontTextScale,HSFontTextScaleadj->value,NULL ); + break; + case 9: // osd scale + gtkSet( gtkSetFontOSDScale,HSFontOSDScaleadj->value,NULL ); + break; +#endif + case 10: // auto quality + gtkSet( gtkSetAutoq,HSPPQualityadj->value,NULL ); + break; + } + return FALSE; +} + +static void prToggled( GtkToggleButton * togglebutton,gpointer user_data ) +{ + int window; + switch ( (int)user_data ) + { + case 0: // extra stereo coefficient + if ( guiIntfStruct.Playing ) + gtk_widget_set_sensitive( HSExtraStereoMul,gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBExtraStereo ) ) ); + break; +// case 1: // normalize +// case 2: // equalizer +// if ( guiIntfStruct.Playing ) gtkMessageBox( GTK_MB_WARNING,"Please remember, this function need restart the playing." ); +// break; + case 3: + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ) ) gtk_widget_set_sensitive( CBLoadFullscreen,TRUE ); + else + { + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ),0 ); + gtk_widget_set_sensitive( CBLoadFullscreen,FALSE ); + } + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ) ) + { + window=wsShowWindow; + gtkActive( Preferences ); + } else window=wsHideWindow; + + if ( !guiIntfStruct.Playing ) wsVisibleWindow( &appMPlayer.subWindow,window ); + break; + case 4: + case 5: + case 6: + case 7: + gtkSet( gtkSetFontAutoScale,(float)((int)user_data - 4 ),NULL ); + break; + case 8: + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) gtk_widget_set_sensitive( SBCache,TRUE ); + else gtk_widget_set_sensitive( SBCache,FALSE ); + break; + case 9: + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAutoSync ) ) ) gtk_widget_set_sensitive( SBAutoSync,TRUE ); + else gtk_widget_set_sensitive( SBAutoSync,FALSE ); + break; +#ifdef USE_ASS + case 10: + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBUseASS ) ) ) + { + gtk_widget_set_sensitive( CBASSUseMargins,TRUE ); + gtk_widget_set_sensitive( SBASSTopMargin,TRUE ); + gtk_widget_set_sensitive( SBASSBottomMargin,TRUE ); + } + else + { + gtk_widget_set_sensitive( CBASSUseMargins,FALSE ); + gtk_widget_set_sensitive( SBASSTopMargin,FALSE ); + gtk_widget_set_sensitive( SBASSBottomMargin,FALSE ); + } + break; +#endif + } +} + +static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data ) +{ + switch ( (int)user_data ) + { + case 0: // audio driver + gtk_clist_get_text( GTK_CLIST( CLADrivers ),row,0,(char **)&ao_driver ); + gtk_widget_set_sensitive( AConfig,FALSE ); + if ( !strncmp( ao_driver[0],"oss",3 ) || + !strncmp( ao_driver[0],"alsa",4 ) || + !strncmp( ao_driver[0],"esd",3 ) || + !strncmp( ao_driver[0],"sdl",3 ) ) + gtk_widget_set_sensitive( AConfig,TRUE ); +#ifndef HAVE_GTK2_GUI + if ( !strncmp( ao_driver[0],"arts",4 ) ) + gtkMessageBox(GTK_MB_WARNING|GTK_MB_SIMPLE, MSGTR_PREFERENCES_ArtsBroken); +#endif + break; + case 1: // video driver + gtk_clist_get_text( GTK_CLIST( CLVDrivers ),row,0,(char **)&vo_driver ); + gtk_widget_set_sensitive( VConfig,FALSE ); +#ifdef HAVE_DXR3 + if ( !gstrcmp( vo_driver[0],"dxr3" ) ) gtk_widget_set_sensitive( VConfig,TRUE ); +#endif + break; + } +} + +GtkWidget * create_Preferences( void ) +{ + GtkWidget * label; + GtkWidget * frame; + + GtkWidget * vbox1; + GtkWidget * notebook1; + GtkWidget * hbox1; + GtkWidget * vbox2; + GtkWidget * scrolledwindow3; + GtkWidget * vbox3; + GtkWidget * hbox8; + GtkWidget * hbox2; + GtkWidget * vbox4; + GtkWidget * scrolledwindow2; + GtkWidget * hbuttonbox3; + GtkWidget * vbox5; + GtkWidget * vbox6; + GtkWidget * vbox600; + GSList * OSD_group = NULL; + GSList * Font_group = NULL; + GList * CBFontEncoding_items = NULL; + GList * CBSubEncoding_items = NULL; + GtkWidget * vbox7; + GtkWidget * vbox8; + GtkWidget * table1; + GtkWidget * vbox9; + GtkWidget * vbox603; + GtkWidget * hbox6; + GtkWidget * hbuttonbox5; +#ifndef HAVE_FREETYPE + GtkWidget * hbox7; +#endif + GtkWidget * vbox601; + GtkWidget * vbox602; + GtkWidget * hbox5; + GtkWidget * hbuttonbox1; + GtkAccelGroup * accel_group; + + GtkWidget * hbox9; + GtkWidget * hbox91; + GtkWidget * hbox92; + + accel_group=gtk_accel_group_new(); + + Preferences=gtk_window_new( GTK_WINDOW_TOPLEVEL ); + gtk_widget_set_name( Preferences,"Preferences" ); + gtk_object_set_data( GTK_OBJECT( Preferences ),"Preferences",Preferences ); + gtk_window_set_title( GTK_WINDOW( Preferences ),MSGTR_Preferences ); + gtk_window_set_position( GTK_WINDOW( Preferences ),GTK_WIN_POS_CENTER ); +// gtk_window_set_policy( GTK_WINDOW( Preferences ),FALSE,FALSE,FALSE ); + gtk_window_set_wmclass( GTK_WINDOW( Preferences ),"Preferences","MPlayer" ); + + gtk_widget_realize( Preferences ); + gtkAddIcon( Preferences ); + + vbox1=AddVBox( AddDialogFrame( Preferences ),0 ); + notebook1=gtk_notebook_new(); + gtk_widget_set_name( notebook1,"notebook1" ); + gtk_widget_show( notebook1 ); + gtk_box_pack_start( GTK_BOX( vbox1 ),notebook1,TRUE,TRUE,0 ); + + hbox1=AddVBox( notebook1,0 ); + + frame=AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,hbox1,1 ); + frame=AddFrame( NULL,GTK_SHADOW_NONE,frame,1 ); + +// --- 1. page + + vbox2=AddVBox( frame,0 ); + + scrolledwindow3=gtk_scrolled_window_new( NULL,NULL ); + gtk_widget_set_name( scrolledwindow3,"scrolledwindow3" ); + gtk_widget_show( scrolledwindow3 ); + gtk_box_pack_start( GTK_BOX( vbox2 ),scrolledwindow3,TRUE,TRUE,0 ); + gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow3 ),GTK_POLICY_NEVER,GTK_POLICY_AUTOMATIC ); + + CLADrivers=gtk_clist_new( 2 ); + gtk_widget_set_name( CLADrivers,"CLADrivers" ); + gtk_widget_show( CLADrivers ); + gtk_container_add( GTK_CONTAINER( scrolledwindow3 ),CLADrivers ); + gtk_clist_set_column_width( GTK_CLIST( CLADrivers ),0,50 ); + gtk_clist_column_titles_show( GTK_CLIST( CLADrivers ) ); + gtk_clist_set_shadow_type( GTK_CLIST( CLADrivers ),GTK_SHADOW_NONE ); + gtk_widget_set_usize( CLADrivers,250,-2 ); + gtk_clist_set_column_widget( GTK_CLIST( CLADrivers ),0, + AddLabel( MSGTR_PREFERENCES_AvailableDrivers,NULL ) ); + + AConfig=AddButton( MSGTR_ConfigDriver, + AddHButtonBox( vbox2 ) ); + + vbox3=AddVBox( + AddFrame( NULL,GTK_SHADOW_NONE, + AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,hbox1,0 ),1 ),0 ); + gtk_widget_set_usize( vbox3,250,-2 ); + + CBNormalize=AddCheckButton( MSGTR_PREFERENCES_NormalizeSound,vbox3 ); + CBAudioEqualizer=AddCheckButton( MSGTR_PREFERENCES_EnableEqualizer,vbox3 ); + CBSoftwareMixer=AddCheckButton( MSGTR_PREFERENCES_SoftwareMixer,vbox3 ); +#if 0 + CBSurround=AddCheckButton( "Enable surround",vbox3 ); +#endif + + AddHSeparator( vbox3 ); + CBExtraStereo=AddCheckButton( MSGTR_PREFERENCES_ExtraStereo,vbox3 ); + hbox8=AddHBox( vbox3,1 ); + label=AddLabel( MSGTR_PREFERENCES_Coefficient,hbox8 ); +// gtk_misc_set_padding( GTK_MISC( label ),20,0 ); + HSExtraStereoMuladj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-10,10,0.1,0,0 ) ); + HSExtraStereoMul=AddHScaler( HSExtraStereoMuladj,hbox8,1 ); + AddHSeparator( vbox3 ); + + hbox8=AddHBox( vbox3,1 ); + AddLabel( MSGTR_PREFERENCES_AudioDelay,hbox8 ); + + HSAudioDelayadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-10,10,0.01,0,0 ) ); + HSAudioDelay=AddHScaler( HSAudioDelayadj,hbox8,2 ); + label=AddLabel( MSGTR_PREFERENCES_Audio,NULL ); + gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),0 ),label ); + +// --- 2. page + + hbox2=AddVBox( notebook1,0 ); + + vbox4=AddVBox( + AddFrame( NULL,GTK_SHADOW_NONE, + AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,hbox2,1 ),1 ),0 ); + + scrolledwindow2=gtk_scrolled_window_new( NULL,NULL ); + gtk_widget_set_name( scrolledwindow2,"scrolledwindow2" ); + gtk_widget_show( scrolledwindow2 ); + gtk_box_pack_start( GTK_BOX( vbox4 ),scrolledwindow2,TRUE,TRUE,0 ); + gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow2 ),GTK_POLICY_NEVER,GTK_POLICY_AUTOMATIC ); + + CLVDrivers=gtk_clist_new( 2 ); + gtk_widget_set_name( CLVDrivers,"CLVDrivers" ); + gtk_widget_show( CLVDrivers ); + gtk_container_add( GTK_CONTAINER( scrolledwindow2 ),CLVDrivers ); + gtk_clist_set_column_width( GTK_CLIST( CLVDrivers ),0,50 ); + gtk_clist_column_titles_show( GTK_CLIST( CLVDrivers ) ); + gtk_clist_set_shadow_type( GTK_CLIST( CLVDrivers ),GTK_SHADOW_NONE ); + gtk_widget_set_usize( CLVDrivers,250,-2 ); + + label=AddLabel( MSGTR_PREFERENCES_AvailableDrivers,NULL ); + gtk_clist_set_column_widget( GTK_CLIST( CLVDrivers ),0,label ); + + hbuttonbox3=AddHButtonBox( vbox4 ); + VConfig=AddButton( MSGTR_ConfigDriver,hbuttonbox3 ); + + vbox5=AddVBox( + AddFrame( NULL,GTK_SHADOW_NONE, + AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,hbox2,0 ),1 ),0 ); + gtk_widget_set_usize( vbox5,250,-2 ); + + CBDoubleBuffer=AddCheckButton( MSGTR_PREFERENCES_DoubleBuffer,vbox5 ); + CBDR=AddCheckButton( MSGTR_PREFERENCES_DirectRender,vbox5 ); + CBFramedrop=AddCheckButton( MSGTR_PREFERENCES_FrameDrop,vbox5 ); + CBHFramedrop=AddCheckButton( MSGTR_PREFERENCES_HFrameDrop,vbox5 ); + CBFlip=AddCheckButton( MSGTR_PREFERENCES_Flip,vbox5 ); + + table1=gtk_table_new( 3,2,FALSE ); + gtk_widget_set_name( table1,"table1" ); + gtk_widget_show( table1 ); + gtk_box_pack_start( GTK_BOX( vbox5 ),table1,FALSE,FALSE,0 ); + + label=AddLabel( MSGTR_PREFERENCES_Panscan,NULL ); + gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + label=AddLabel( MSGTR_PREFERENCES_FPS,NULL ); + gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + HSPanscanadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,1,0.001,0,0 ) ); + HSPanscan=AddHScaler( HSPanscanadj,NULL,1 ); + gtk_table_attach( GTK_TABLE( table1 ),HSPanscan,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + HSFPSadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,1000,0.001,0,0 ) ); + HSFPS=gtk_spin_button_new( GTK_ADJUSTMENT( HSFPSadj ),1,3 ); + gtk_widget_set_name( HSFPS,"HSFPS" ); + gtk_widget_show( HSFPS ); + gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( HSFPS ),TRUE ); + gtk_table_attach( GTK_TABLE( table1 ),HSFPS,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + label=AddLabel( MSGTR_PREFERENCES_Video,NULL ); + gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),1 ),label ); + +// --- 3. page + + vbox6=AddVBox( notebook1,0 ); + + vbox600=AddVBox( + AddFrame( NULL,GTK_SHADOW_NONE, + AddFrame( MSGTR_PREFERENCES_FRAME_OSD_Level,GTK_SHADOW_ETCHED_OUT,vbox6,0 ),1 ),0 ); + + RBOSDNone=AddRadioButton( MSGTR_PREFERENCES_None,&OSD_group,vbox600 ); + RBOSDTandP=AddRadioButton( MSGTR_PREFERENCES_OSDTimer,&OSD_group,vbox600 ); + RBOSDIndicator=AddRadioButton( MSGTR_PREFERENCES_OSDProgress,&OSD_group,vbox600 ); + RBOSDTPTT=AddRadioButton( MSGTR_PREFERENCES_OSDTimerPercentageTotalTime,&OSD_group,vbox600 ); + + vbox7=AddVBox( + AddFrame( NULL,GTK_SHADOW_NONE, + AddFrame( MSGTR_PREFERENCES_FRAME_Subtitle,GTK_SHADOW_ETCHED_OUT,vbox6,0 ),1 ),0 ); + +#if 0 + hbox4=AddHBox( vbox7,1 ); + + AddLabel( MSGTR_PREFERENCES_Subtitle,hbox4 ); + + ESubtitleName=gtk_entry_new(); + gtk_widget_set_name( ESubtitleName,"ESubtitleName" ); + gtk_widget_show( ESubtitleName ); + gtk_box_pack_start( GTK_BOX( hbox4 ),ESubtitleName,TRUE,TRUE,0 ); + + hbuttonbox4=AddHButtonBox( hbuttonbox4 ); + gtk_container_set_border_width( GTK_CONTAINER( hbuttonbox4 ),3 ); + BLoadSubtitle=AddButton( MSGTR_Browse,hbuttonbox4 ); +#endif + + vbox8=AddVBox( vbox7,0 ); + + table1=gtk_table_new( 3,2,FALSE ); + gtk_widget_set_name( table1,"table1" ); + gtk_widget_show( table1 ); + gtk_box_pack_start( GTK_BOX( vbox8 ),table1,FALSE,FALSE,0 ); + + label=AddLabel( MSGTR_PREFERENCES_SUB_Delay,NULL ); + gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + label=AddLabel( MSGTR_PREFERENCES_SUB_POS,NULL ); + gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + label=AddLabel( MSGTR_PREFERENCES_SUB_FPS,NULL ); + gtk_table_attach( GTK_TABLE( table1 ),label,0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + +#ifdef USE_ICONV + label=AddLabel( MSGTR_PREFERENCES_FontEncoding,NULL ); + gtk_table_attach( GTK_TABLE( table1 ),label,0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); +#endif + + HSSubDelayadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-10.0,10,0.01,0,0 ) ); + HSSubDelay=AddHScaler( HSSubDelayadj,NULL,1 ); + gtk_table_attach( GTK_TABLE( table1 ),HSSubDelay,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + HSSubPositionadj=GTK_ADJUSTMENT( gtk_adjustment_new( 100,0,100,1,0,0 ) ); + HSSubPosition=AddHScaler( HSSubPositionadj,NULL,0 ); + gtk_table_attach( GTK_TABLE( table1 ),HSSubPosition,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + HSSubFPSadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.01,0,0 ) ); + HSSubFPS=gtk_spin_button_new( GTK_ADJUSTMENT( HSSubFPSadj ),1,3 ); + gtk_widget_set_name( HSSubFPS,"HSSubFPS" ); + gtk_widget_show( HSSubFPS ); + gtk_widget_set_usize( HSSubFPS,60,-1 ); + gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( HSSubFPS ),TRUE ); + gtk_table_attach( GTK_TABLE( table1 ),HSSubFPS,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + +#ifdef USE_ICONV + CBSubEncoding=gtk_combo_new(); + gtk_widget_set_name( CBSubEncoding,"CBSubEncoding" ); + gtk_widget_show( CBSubEncoding ); + gtk_table_attach( GTK_TABLE( table1 ),CBSubEncoding,1,2,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + CBSubEncoding_items=g_list_append( CBSubEncoding_items,MSGTR_PREFERENCES_None ); + { + int i; + for ( i=0;lEncoding[i].name;i++ ) CBSubEncoding_items=g_list_append( CBSubEncoding_items,lEncoding[i].comment ); + } + gtk_combo_set_popdown_strings( GTK_COMBO( CBSubEncoding ),CBSubEncoding_items ); + g_list_free( CBSubEncoding_items ); + + ESubEncoding=GTK_COMBO( CBSubEncoding )->entry; + gtk_widget_set_name( ESubEncoding,"ESubEncoding" ); + gtk_entry_set_editable( GTK_ENTRY( ESubEncoding ),FALSE ); + gtk_widget_show( ESubEncoding ); +#endif + + vbox9=AddVBox( vbox8,0 ); + + CBSubOverlap=AddCheckButton( MSGTR_PREFERENCES_SUB_Overlap,vbox9 ); + CBNoAutoSub=AddCheckButton( MSGTR_PREFERENCES_SUB_AutoLoad,vbox9 ); + CBSubUnicode=AddCheckButton( MSGTR_PREFERENCES_SUB_Unicode,vbox9 ); + CBDumpMPSub=AddCheckButton( MSGTR_PREFERENCES_SUB_MPSUB,vbox9 ); + CBDumpSrt=AddCheckButton( MSGTR_PREFERENCES_SUB_SRT,vbox9 ); + + AddHSeparator( vbox9 ); + CBUseASS=AddCheckButton( MSGTR_PREFERENCES_SUB_USE_ASS,vbox9 ); + hbox9=AddHBox( vbox9,0 ); + CBASSUseMargins=AddCheckButton( MSGTR_PREFERENCES_SUB_ASS_USE_MARGINS,hbox9 ); + + hbox91=gtk_hbox_new( FALSE,0 ); + gtk_widget_set_name( hbox91,"hbox91" ); + gtk_box_pack_start( GTK_BOX( hbox9 ),hbox91,TRUE,FALSE,0 ); + gtk_widget_show( hbox91 ); + SBASSTopMargin=AddSpinButton( MSGTR_PREFERENCES_SUB_ASS_TOP_MARGIN, + (GtkAdjustment *)gtk_adjustment_new(0,0,512,1,8,0),hbox91 ); + + hbox92=gtk_hbox_new( FALSE,0 ); + gtk_widget_set_name( hbox92,"hbox92" ); + gtk_box_pack_start( GTK_BOX( hbox9 ),hbox92,TRUE,FALSE,0 ); + gtk_widget_show( hbox92 ); + SBASSBottomMargin=AddSpinButton( MSGTR_PREFERENCES_SUB_ASS_BOTTOM_MARGIN, + (GtkAdjustment *)gtk_adjustment_new(0,0,512,1,8,0),hbox92 ); + + label=AddLabel( MSGTR_PREFERENCES_SubtitleOSD,NULL ); + gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),2 ),label ); + vbox601=AddVBox( notebook1,0 ); + +// --- 4. page + + vbox603=AddVBox( + AddFrame( NULL,GTK_SHADOW_NONE, + AddFrame( MSGTR_PREFERENCES_FRAME_Font,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 ); + + hbox6=AddHBox( vbox603,1 ); + AddLabel( MSGTR_PREFERENCES_Font,hbox6 ); + prEFontName=gtk_entry_new(); + gtk_widget_set_name( prEFontName,"prEFontName" ); + gtk_widget_show( prEFontName ); + gtk_box_pack_start( GTK_BOX( hbox6 ),prEFontName,TRUE,TRUE,0 ); + hbuttonbox5=AddHButtonBox( hbox6 ); + gtk_container_set_border_width( GTK_CONTAINER( hbuttonbox5 ),3 ); + BLoadFont=AddButton( MSGTR_Browse,hbuttonbox5 ); + +#ifndef HAVE_FREETYPE + hbox7=AddHBox( vbox603,1 ); + AddLabel( MSGTR_PREFERENCES_FontFactor,hbox7 ); + HSFontFactoradj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,10,0.05,0,0 ) ); + HSFontFactor=AddHScaler( HSFontFactoradj,hbox7,2 ); +#else + + RBFontNoAutoScale=AddRadioButton( MSGTR_PREFERENCES_FontNoAutoScale,&Font_group,vbox603 ); + RBFontAutoScaleHeight=AddRadioButton( MSGTR_PREFERENCES_FontPropHeight,&Font_group,vbox603 ); + RBFontAutoScaleWidth=AddRadioButton( MSGTR_PREFERENCES_FontPropWidth,&Font_group,vbox603 ); + RBFontAutoScaleDiagonal=AddRadioButton( MSGTR_PREFERENCES_FontPropDiagonal,&Font_group,vbox603 ); + + table1=gtk_table_new( 3,2,FALSE ); + gtk_widget_set_name( table1,"table1" ); + gtk_widget_show( table1 ); + gtk_box_pack_start( GTK_BOX( vbox603 ),table1,FALSE,FALSE,0 ); + + label=AddLabel( MSGTR_PREFERENCES_FontEncoding,NULL ); + gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + CBFontEncoding=gtk_combo_new(); + gtk_widget_set_name( CBFontEncoding,"CBFontEncoding" ); + gtk_widget_show( CBFontEncoding ); + gtk_table_attach( GTK_TABLE( table1 ),CBFontEncoding,1,2,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + { + int i; + for ( i=0;lEncoding[i].name;i++ ) CBFontEncoding_items=g_list_append( CBFontEncoding_items,lEncoding[i].comment ); + } + gtk_combo_set_popdown_strings( GTK_COMBO( CBFontEncoding ),CBFontEncoding_items ); + g_list_free( CBFontEncoding_items ); + + EFontEncoding=GTK_COMBO( CBFontEncoding )->entry; + gtk_widget_set_name( EFontEncoding,"EFontEncoding" ); + gtk_entry_set_editable( GTK_ENTRY( EFontEncoding ),FALSE ); + gtk_widget_show( EFontEncoding ); + + label=AddLabel( MSGTR_PREFERENCES_FontBlur,NULL ); + gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + HSFontBluradj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) ); + HSFontBlur=AddHScaler( HSFontBluradj,NULL,2 ); + gtk_table_attach( GTK_TABLE( table1 ),HSFontBlur,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + label=AddLabel( MSGTR_PREFERENCES_FontOutLine,NULL ); + gtk_table_attach( GTK_TABLE( table1 ),label,0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + HSFontOutLineadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) ); + HSFontOutLine=AddHScaler( HSFontOutLineadj,NULL,2 ); + gtk_table_attach( GTK_TABLE( table1 ),HSFontOutLine,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + label=AddLabel( MSGTR_PREFERENCES_FontTextScale,NULL ); + gtk_table_attach( GTK_TABLE( table1 ),label,0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + HSFontTextScaleadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) ); + HSFontTextScale=AddHScaler( HSFontTextScaleadj,NULL,2 ); + gtk_table_attach( GTK_TABLE( table1 ),HSFontTextScale,1,2,3,4,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + label=AddLabel( MSGTR_PREFERENCES_FontOSDScale,NULL ); + gtk_table_attach( GTK_TABLE( table1 ),label,0,1,4,5,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + HSFontOSDScaleadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) ); + HSFontOSDScale=AddHScaler( HSFontOSDScaleadj,NULL,2 ); + gtk_table_attach( GTK_TABLE( table1 ),HSFontOSDScale,1,2,4,5,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); +#endif + + label=AddLabel( MSGTR_PREFERENCES_FRAME_Font,NULL ); + gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),3 ),label ); + +// --- 5. page + + vbox601=AddVBox( notebook1,0 ); + + vbox602=AddVBox( + AddFrame( NULL,GTK_SHADOW_NONE, + AddFrame( MSGTR_PREFERENCES_FRAME_CodecDemuxer,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 ); + + CBNonInterlaved=AddCheckButton( MSGTR_PREFERENCES_NI,vbox602 ); + CBIndex=AddCheckButton( MSGTR_PREFERENCES_IDX,vbox602 ); + + hbox5=AddHBox( vbox602,1 ); + + AddLabel( MSGTR_PREFERENCES_VideoCodecFamily,hbox5 ); + + CBVFM=gtk_combo_new(); + gtk_widget_set_name( CBVFM,"CBVFM" ); + gtk_widget_show( CBVFM ); + gtk_box_pack_start( GTK_BOX( hbox5 ),CBVFM,TRUE,TRUE,0 ); + + EVFM=GTK_COMBO( CBVFM )->entry; + gtk_widget_set_name( EVFM,"CEVFM" ); + gtk_entry_set_editable( GTK_ENTRY( EVFM ),FALSE ); + gtk_widget_show( EVFM ); + + hbox5=AddHBox( vbox602,1 ); + + AddLabel( MSGTR_PREFERENCES_AudioCodecFamily,hbox5 ); + + CBAFM=gtk_combo_new(); + gtk_widget_set_name( CBAFM,"CBAFM" ); + gtk_widget_show( CBAFM ); + gtk_box_pack_start( GTK_BOX( hbox5 ),CBAFM,TRUE,TRUE,0 ); + + EAFM=GTK_COMBO( CBAFM )->entry; + gtk_widget_set_name( EAFM,"EAFM" ); + gtk_entry_set_editable( GTK_ENTRY( EAFM ),FALSE ); + gtk_widget_show( EAFM ); + + label=AddLabel( MSGTR_PREFERENCES_Codecs,NULL ); + gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),4 ),label ); + + vbox601=AddVBox( notebook1,0 ); + +// --- 6. page + + vbox602=AddVBox( + AddFrame( NULL,GTK_SHADOW_NONE, + AddFrame( MSGTR_PREFERENCES_FRAME_PostProcess,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 ); + + CBPostprocess=AddCheckButton( MSGTR_PREFERENCES_PostProcess,vbox602 ); + + hbox5=AddHBox( vbox602,1 ); + + AddLabel( MSGTR_PREFERENCES_AutoQuality,hbox5 ); + + if ( guiIntfStruct.sh_video && guiIntfStruct.Playing ) HSPPQualityadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,get_video_quality_max( guiIntfStruct.sh_video ),0,0,0 ) ); + else HSPPQualityadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0,0,0 ) ); + HSPPQuality=AddHScaler( HSPPQualityadj,hbox5,0 ); + + vbox602=AddVBox( + AddFrame( NULL,GTK_SHADOW_NONE, + AddFrame( MSGTR_PREFERENCES_FRAME_Cache,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 ); + + CBCache=AddCheckButton( MSGTR_PREFERENCES_Cache,vbox602 ); + + hbox5=AddHBox( vbox602,1 ); + + AddLabel( MSGTR_PREFERENCES_CacheSize,hbox5 ); + + SBCacheadj=GTK_ADJUSTMENT( gtk_adjustment_new( 2048,4,65535,1,10,10 ) ); + SBCache=gtk_spin_button_new( GTK_ADJUSTMENT( SBCacheadj ),1,0 ); + gtk_widget_show( SBCache ); + gtk_box_pack_start( GTK_BOX( hbox5 ),SBCache,TRUE,TRUE,0 ); + + vbox602=AddVBox( + AddFrame( NULL,GTK_SHADOW_NONE, + AddFrame( MSGTR_PREFERENCES_FRAME_Misc,GTK_SHADOW_ETCHED_OUT,vbox601,1 ),1 ),0 ); + + CBShowVideoWindow=AddCheckButton( MSGTR_PREFERENCES_ShowVideoWindow,vbox602 ); + CBLoadFullscreen=AddCheckButton( MSGTR_PREFERENCES_LoadFullscreen,vbox602 ); + CBSaveWinPos=AddCheckButton( MSGTR_PREFERENCES_SaveWinPos,vbox602 ); + CBStopXScreenSaver=AddCheckButton( MSGTR_PREFERENCES_XSCREENSAVER,vbox602 ); + CBPlayBar=AddCheckButton( MSGTR_PREFERENCES_PlayBar,vbox602 ); + + AddHSeparator( vbox602 ); + + CBAutoSync=AddCheckButton( MSGTR_PREFERENCES_AutoSync,vbox602 ); + hbox5=AddHBox( vbox602,1 ); + AddLabel( MSGTR_PREFERENCES_AutoSyncValue,hbox5 ); + SBAutoSyncadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,10000,1,10,10 ) ); + SBAutoSync=gtk_spin_button_new( GTK_ADJUSTMENT( SBAutoSyncadj ),1,0 ); + gtk_widget_show( SBAutoSync ); + gtk_box_pack_start( GTK_BOX( hbox5 ),SBAutoSync,TRUE,TRUE,0 ); + + AddHSeparator( vbox602 ); + + table1=gtk_table_new( 2,2,FALSE ); + gtk_widget_set_name( table1,"table1" ); + gtk_widget_show( table1 ); + gtk_box_pack_start( GTK_BOX( vbox602 ),table1,FALSE,FALSE,0 ); + + label=AddLabel( MSGTR_PREFERENCES_DVDDevice,NULL ); + gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + prEDVDDevice=gtk_entry_new(); + gtk_widget_set_name( prEDVDDevice,"prEDVDDevice" ); + gtk_widget_show( prEDVDDevice ); + gtk_table_attach( GTK_TABLE( table1 ),prEDVDDevice,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + label=AddLabel( MSGTR_PREFERENCES_CDROMDevice,NULL ); + gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + prECDRomDevice=gtk_entry_new(); + gtk_widget_set_name( prECDRomDevice,"prECDRomDevice" ); + gtk_widget_show( prECDRomDevice ); + gtk_table_attach( GTK_TABLE( table1 ),prECDRomDevice,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + +// AddHSeparator( vbox602 ); + + label=AddLabel( MSGTR_PREFERENCES_Misc,NULL ); + gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),5 ),label ); + +// --- + + AddHSeparator( vbox1 ); + + hbuttonbox1=AddHButtonBox( vbox1 ); + gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END ); + gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 ); + BOk=AddButton( MSGTR_Ok,hbuttonbox1 ); + BCancel=AddButton( MSGTR_Cancel,hbuttonbox1 ); + + gtk_widget_add_accelerator( BOk,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); + gtk_widget_add_accelerator( BCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); + + gtk_signal_connect( GTK_OBJECT( Preferences ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&Preferences ); + + gtk_signal_connect( GTK_OBJECT( AConfig ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bAConfig ); + gtk_signal_connect( GTK_OBJECT( BOk ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bOk ); + gtk_signal_connect( GTK_OBJECT( BCancel ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bCancel ); + gtk_signal_connect( GTK_OBJECT( VConfig ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bVconfig ); +#if 0 + gtk_signal_connect( GTK_OBJECT( BLoadSubtitle ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bLSubtitle ); +#endif + gtk_signal_connect( GTK_OBJECT( BLoadFont ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bLFont ); + +#if 0 + gtk_signal_connect( GTK_OBJECT( CBNormalize ),"toggled",GTK_SIGNAL_FUNC( on_CBNormalize_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( CBSoftwareMixer ),"toggled",GTK_SIGNAL_FUNC( on_CBSoftwareMixer_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( CBSurround ),"toggled",GTK_SIGNAL_FUNC( on_CBSurround_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( CBExtraStereo ),"toggled",GTK_SIGNAL_FUNC( on_CBExtraStereo_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( CBDoubleBuffer ),"toggled",GTK_SIGNAL_FUNC( on_CBDoubleBuffer_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( CBDR ),"toggled",GTK_SIGNAL_FUNC( on_CBDR_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( CBFramedrop ),"toggled",GTK_SIGNAL_FUNC( on_CBFramedrop_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( CBHFramedrop ),"toggled",GTK_SIGNAL_FUNC( on_CBHFramedrop_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( CBFullScreen ),"toggled",GTK_SIGNAL_FUNC( on_CBFullScreen_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( CBNonInterlaved ),"toggled",GTK_SIGNAL_FUNC( on_CBNonInterlaved_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( CBFlip ),"toggled",GTK_SIGNAL_FUNC( on_CBFlip_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( CBPostprocess ),"toggled",GTK_SIGNAL_FUNC( on_CBPostprocess_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( CBNoAutoSub ),"toggled",GTK_SIGNAL_FUNC( on_CBNoAutoSub_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( CBSubUnicode ),"toggled",GTK_SIGNAL_FUNC( on_CNSubUnicode_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( CBDumpMPSub ),"toggled",GTK_SIGNAL_FUNC( on_CBDumpMPSub_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( CBDumpSrt ),"toggled",GTK_SIGNAL_FUNC( on_CBDumpSrt_toggled ),NULL ); +#endif +#if 0 + gtk_signal_connect( GTK_OBJECT( RBOSDNone ),"toggled",GTK_SIGNAL_FUNC( on_RBOSDNone_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( RBOSDTandP ),"toggled",GTK_SIGNAL_FUNC( on_RBOSDTandP_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( RBOSDIndicator ),"toggled",GTK_SIGNAL_FUNC( on_RBOSDIndicator_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( RBOSDTPTT ),"toggled",GTK_SIGNAL_FUNC( on_RBOSDIndicator_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( CBAudioEqualizer ),"toggled",GTK_SIGNAL_FUNC( on_CBAudioEqualizer_toggled ),NULL ); +#endif +#if 0 + gtk_signal_connect( GTK_OBJECT( HSAudioDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSAudioDelay_motion_notify_event ),NULL ); + gtk_signal_connect( GTK_OBJECT( HSPanscan ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSPanscan_motion_notify_event ),NULL ); + gtk_signal_connect( GTK_OBJECT( label2 ),"motion_notify_event",GTK_SIGNAL_FUNC( on_label2_motion_notify_event ),NULL ); + gtk_signal_connect( GTK_OBJECT( HSSubDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSSubDelay_motion_notify_event ),NULL ); + gtk_signal_connect( GTK_OBJECT( HSSubPosition ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSSubPosition_motion_notify_event ),NULL ); + gtk_signal_connect( GTK_OBJECT( HSSubFPS ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSSubFPS_motion_notify_event ),NULL ); + gtk_signal_connect( GTK_OBJECT( HSFontFactor ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSFontFactor_motion_notify_event ),NULL ); + gtk_signal_connect( GTK_OBJECT( HSPPQuality ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSPPQuality_motion_notify_event ),NULL ); +#endif + + gtk_notebook_set_page( GTK_NOTEBOOK( notebook1 ),2 ); + + gtk_window_add_accel_group( GTK_WINDOW( Preferences ),accel_group ); + + return Preferences; +} + +#ifdef USE_OSS_AUDIO +GList *appendOSSDevices(GList *l) { + // careful! the current implementation allows only string constants! + l = g_list_append(l, (gpointer)"/dev/dsp"); + if (gtkAOOSSDevice && strncmp(gtkAOOSSDevice, "/dev/sound", 10) == 0) { + l = g_list_append(l, (gpointer)"/dev/sound/dsp0"); + l = g_list_append(l, (gpointer)"/dev/sound/dsp1"); + l = g_list_append(l, (gpointer)"/dev/sound/dsp2"); + l = g_list_append(l, (gpointer)"/dev/sound/dsp3"); + } else { + l = g_list_append(l, (gpointer)"/dev/dsp0"); + l = g_list_append(l, (gpointer)"/dev/dsp1"); + l = g_list_append(l, (gpointer)"/dev/dsp2"); + l = g_list_append(l, (gpointer)"/dev/dsp3"); + } +#ifdef HAVE_DXR3 + l = g_list_append(l, (gpointer)"/dev/em8300_ma"); + l = g_list_append(l, (gpointer)"/dev/em8300_ma-0"); + l = g_list_append(l, (gpointer)"/dev/em8300_ma-1"); + l = g_list_append(l, (gpointer)"/dev/em8300_ma-2"); + l = g_list_append(l, (gpointer)"/dev/em8300_ma-3"); +#endif + return l; +} + +GList *appendOSSMixers(GList *l) { + // careful! the current implementation allows only string constants! + l = g_list_append(l, (gpointer)"/dev/mixer"); + if (gtkAOOSSMixer && strncmp(gtkAOOSSMixer, "/dev/sound", 10) == 0) { + l = g_list_append(l, (gpointer)"/dev/sound/mixer0"); + l = g_list_append(l, (gpointer)"/dev/sound/mixer1"); + l = g_list_append(l, (gpointer)"/dev/sound/mixer2"); + l = g_list_append(l, (gpointer)"/dev/sound/mixer3"); + } else { + l = g_list_append(l, (gpointer)"/dev/mixer0"); + l = g_list_append(l, (gpointer)"/dev/mixer1"); + l = g_list_append(l, (gpointer)"/dev/mixer2"); + l = g_list_append(l, (gpointer)"/dev/mixer3"); + } + return l; +} + +GList *appendOSSMixerChannels(GList *l) { + l = g_list_append(l, (gpointer)"vol"); + l = g_list_append(l, (gpointer)"pcm"); + l = g_list_append(l, (gpointer)"line"); + return l; +} +#endif + +#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) +GList *appendALSADevices(GList *l) { + l = g_list_append(l, (gpointer)"default"); + l = g_list_append(l, (gpointer)"hw=0.0"); + l = g_list_append(l, (gpointer)"hw=0.1"); + l = g_list_append(l, (gpointer)"hw=0.2"); + l = g_list_append(l, (gpointer)"surround40"); + l = g_list_append(l, (gpointer)"surround51"); + l = g_list_append(l, (gpointer)"plug=surround40"); + l = g_list_append(l, (gpointer)"plug=surround51"); + return l; +} + +GList *appendALSAMixers(GList *l) { + l = g_list_append(l, (gpointer)"default"); + return l; +} + +GList *appendALSAMixerChannels(GList *l) { + l = g_list_append(l, (gpointer)"Master"); + l = g_list_append(l, (gpointer)"Line"); + l = g_list_append(l, (gpointer)"PCM"); + l = g_list_append(l, (gpointer)"PCM,1"); + return l; +} +#endif + +#ifdef HAVE_SDL +GList *appendSDLDevices(GList *l) { + l = g_list_append(l, (gpointer)"alsa"); + l = g_list_append(l, (gpointer)"arts"); + l = g_list_append(l, (gpointer)"esd"); + l = g_list_append(l, (gpointer)"jack"); + l = g_list_append(l, (gpointer)"oss"); + l = g_list_append(l, (gpointer)"nas"); + return l; +} +#endif + +#ifdef USE_ESD +GList *appendESDDevices(GList *l) { + l = g_list_append(l, (gpointer)"Enter Remote IP"); + l = g_list_append(l, (gpointer)"Use Software Mixer"); + return l; +} +#endif + +// Gets text string from a gtk entry, interpreting +// MSGTR_PREFERENCES_DriverDefault as null string. +char *getGtkEntryText(GtkWidget *from) { + char *tmp = gtk_entry_get_text(GTK_ENTRY(from)); + if (strcmp(tmp, MSGTR_PREFERENCES_DriverDefault) == 0) { + tmp = NULL; + } + return tmp; +} + +// Sets text string of a gtk entry, interpreting +// null string as MSGTR_PREFERENCES_DriverDefault. +void setGtkEntryText(GtkWidget *dest, char *to) { + if (!to) { + to = MSGTR_PREFERENCES_DriverDefault; + } + gtk_entry_set_text(GTK_ENTRY(dest),to); +} + + GtkWidget *AudioConfig; +static GtkWidget *CEAudioDevice; +static GtkWidget *CBAudioDevice; +static GtkWidget *CEAudioMixer; +static GtkWidget *CBAudioMixer; +static GtkWidget *CEAudioMixerChannel; +static GtkWidget *CBAudioMixerChannel; +static GtkWidget *BAudioOk; +static GtkWidget *BAudioCancel; + +void ShowAudioConfig() { + if (AudioConfig) gtkActive(AudioConfig); + else AudioConfig = create_AudioConfig(); + +#ifdef USE_OSS_AUDIO + if (strncmp(ao_driver[0], "oss", 3) == 0) { + setGtkEntryText(CEAudioDevice, gtkAOOSSDevice); + setGtkEntryText(CEAudioMixer, gtkAOOSSMixer); + setGtkEntryText(CEAudioMixerChannel, gtkAOOSSMixerChannel); + } +#endif +#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) + if (strncmp(ao_driver[0], "alsa", 4) == 0) { + setGtkEntryText(CEAudioDevice, gtkAOALSADevice); + setGtkEntryText(CEAudioMixer, gtkAOALSAMixer); + setGtkEntryText(CEAudioMixerChannel, gtkAOALSAMixerChannel); + } +#endif +#ifdef HAVE_SDL + if (strncmp(ao_driver[0], "sdl", 3) == 0) { + setGtkEntryText(CEAudioDevice, gtkAOSDLDriver); + } +#endif +#ifdef USE_ESD + if (strncmp(ao_driver[0], "esd", 3) == 0) { + setGtkEntryText(CEAudioDevice, gtkAOESDDevice); + } +#endif + + gtk_widget_show(AudioConfig); + gtkSetLayer(AudioConfig); +} + +void HideAudioConfig() { + if (!AudioConfig) return; + gtk_widget_hide(AudioConfig); + gtk_widget_destroy(AudioConfig); + AudioConfig=NULL; +} + +static void audioButton(GtkButton *button, gpointer user_data) { + switch( (int)user_data ) { + case 1: +#ifdef USE_OSS_AUDIO + if (strncmp(ao_driver[0], "oss", 3) == 0) { + gfree(>kAOOSSDevice); + gtkAOOSSDevice = gstrdup(getGtkEntryText(CEAudioDevice)); + gfree(>kAOOSSMixer); + gtkAOOSSMixer = gstrdup(getGtkEntryText(CEAudioMixer)); + gfree(>kAOOSSMixerChannel); + gtkAOOSSMixerChannel = gstrdup(getGtkEntryText(CEAudioMixerChannel)); + } +#endif +#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) + if (strncmp(ao_driver[0], "alsa", 4) == 0) { + gfree(>kAOALSADevice); + gtkAOALSADevice = gstrdup(getGtkEntryText(CEAudioDevice)); + gfree(>kAOALSAMixer); + gtkAOALSAMixer = gstrdup(getGtkEntryText(CEAudioMixer)); + gfree(>kAOALSAMixerChannel); + gtkAOALSAMixerChannel = gstrdup(getGtkEntryText(CEAudioMixerChannel)); + } +#endif +#ifdef HAVE_SDL + if (strncmp(ao_driver[0], "sdl", 3) == 0) { + gfree(>kAOSDLDriver); + gtkAOSDLDriver = gstrdup(getGtkEntryText(CEAudioDevice)); + } +#endif +#ifdef USE_ESD + if (strncmp(ao_driver[0], "esd", 3) == 0) { + gfree(>kAOESDDevice); + gtkAOESDDevice = gstrdup(getGtkEntryText(CEAudioDevice)); + } +#endif + case 0: + HideAudioConfig(); + break; + } +} + +GtkWidget *create_AudioConfig() { + GList *items = NULL; + GtkWidget *vbox; + GtkWidget *table; + GtkWidget *label; + GtkWidget *hbuttonbox; + GtkAccelGroup *accel_group; + + AudioConfig = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_widget_set_name(AudioConfig, "AudioConfig"); + gtk_object_set_data(GTK_OBJECT(AudioConfig), "AudioConfig", AudioConfig); + gtk_window_set_title(GTK_WINDOW(AudioConfig), MSGTR_AudioPreferences); + gtk_window_set_position(GTK_WINDOW(AudioConfig), GTK_WIN_POS_CENTER); + gtk_window_set_policy(GTK_WINDOW(AudioConfig), FALSE, FALSE, FALSE); + gtk_window_set_wmclass(GTK_WINDOW(AudioConfig), "Audio Config", "MPlayer"); + + gtk_widget_realize(AudioConfig); + gtkAddIcon(AudioConfig); + + vbox = AddVBox(AddDialogFrame(AudioConfig), 0); + + table = gtk_table_new(2, 3, FALSE); + gtk_widget_set_name(table, "table"); + gtk_widget_show(table); + gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); + + label = AddLabel(MSGTR_PREFERENCES_Audio_Device, NULL); + gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0); + + CBAudioDevice = AddComboBox(NULL); + gtk_table_attach(GTK_TABLE(table), CBAudioDevice, 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0); + items = g_list_append(items,(gpointer)MSGTR_PREFERENCES_DriverDefault); +#ifdef USE_OSS_AUDIO + if (strncmp(ao_driver[0], "oss", 3) == 0) + items = appendOSSDevices(items); +#endif +#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) + if (strncmp(ao_driver[0], "alsa", 4) == 0) + items = appendALSADevices(items); +#endif +#ifdef HAVE_SDL + if (strncmp(ao_driver[0], "sdl", 3) == 0) + items = appendSDLDevices(items); +#endif +#ifdef USE_ESD + if (strncmp(ao_driver[0], "esd", 3) == 0) + items = appendESDDevices(items); +#endif + gtk_combo_set_popdown_strings(GTK_COMBO(CBAudioDevice), items); + g_list_free(items); + items = NULL; + + CEAudioDevice = GTK_COMBO(CBAudioDevice)->entry; + gtk_widget_set_name(CEAudioDevice, "CEAudioDevice"); + gtk_widget_show(CEAudioDevice); + + label = AddLabel(MSGTR_PREFERENCES_Audio_Mixer, NULL); + gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0); + + CBAudioMixer = AddComboBox(NULL); + gtk_table_attach(GTK_TABLE(table), CBAudioMixer, 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0); + items = g_list_append(items, (gpointer)MSGTR_PREFERENCES_DriverDefault); +#ifdef USE_OSS_AUDIO + if (strncmp(ao_driver[0], "oss", 3) == 0) + items = appendOSSMixers(items); +#endif +#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) + if (strncmp(ao_driver[0], "alsa", 4) == 0) + items = appendALSAMixers(items); +#endif + gtk_combo_set_popdown_strings(GTK_COMBO(CBAudioMixer), items); + g_list_free(items); + items = NULL; + + CEAudioMixer = GTK_COMBO(CBAudioMixer)->entry; + gtk_widget_set_name(CEAudioMixer, "CEAudioMixer"); + gtk_widget_show(CEAudioMixer); + + label = AddLabel(MSGTR_PREFERENCES_Audio_MixerChannel, NULL); + gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0); + + CBAudioMixerChannel = AddComboBox(NULL); + gtk_table_attach(GTK_TABLE(table), CBAudioMixerChannel, 1, 2, 2, 3, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0); + items = g_list_append(items, (gpointer)MSGTR_PREFERENCES_DriverDefault); +#ifdef USE_OSS_AUDIO + if (strncmp(ao_driver[0], "oss", 3) == 0) + items = appendOSSMixerChannels(items); +#endif +#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) + if (strncmp(ao_driver[0], "alsa", 4) == 0) + items = appendALSAMixerChannels(items); +#endif + gtk_combo_set_popdown_strings(GTK_COMBO(CBAudioMixerChannel), items); + g_list_free(items); + items = NULL; + + CEAudioMixerChannel = GTK_COMBO(CBAudioMixerChannel)->entry; + gtk_widget_set_name(CEAudioMixerChannel, "CEAudioMixerChannel"); + gtk_widget_show(CEAudioMixerChannel); + + AddHSeparator(vbox); + + hbuttonbox = AddHButtonBox(vbox); + gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox), GTK_BUTTONBOX_END); + gtk_button_box_set_spacing(GTK_BUTTON_BOX(hbuttonbox), 10); + BAudioOk = AddButton(MSGTR_Ok, hbuttonbox); + BAudioCancel = AddButton(MSGTR_Cancel, hbuttonbox); + + gtk_signal_connect(GTK_OBJECT(AudioConfig), "destroy", GTK_SIGNAL_FUNC(WidgetDestroy), &AudioConfig); + gtk_signal_connect(GTK_OBJECT(BAudioOk), "clicked", GTK_SIGNAL_FUNC(audioButton), (void*)1); + gtk_signal_connect(GTK_OBJECT(BAudioCancel), "clicked", GTK_SIGNAL_FUNC(audioButton), (void*)0); + + accel_group = gtk_accel_group_new(); + gtk_widget_add_accelerator(BAudioOk, "clicked", accel_group, GDK_Return, 0, GTK_ACCEL_VISIBLE); + gtk_widget_add_accelerator(BAudioCancel, "clicked", accel_group, GDK_Escape, 0, GTK_ACCEL_VISIBLE); + gtk_window_add_accel_group(GTK_WINDOW(AudioConfig), accel_group); + + return AudioConfig; +} + +#ifdef HAVE_DXR3 +// --- dxr3 config box + +static GtkWidget * DXR3Config; +static GtkWidget * CBDevice; +static GtkWidget * CEDXR3Device; +static GtkWidget * RBVNone; +#ifdef USE_LIBAVCODEC + static GtkWidget * RBVLavc; +#endif +static GtkWidget * dxr3BOk; +static GtkWidget * dxr3BCancel; + +GtkWidget * create_DXR3Config( void ); + +void ShowDXR3Config( void ) +{ + if ( DXR3Config ) gtkActive( DXR3Config ); + else DXR3Config=create_DXR3Config(); + + gtk_entry_set_text( GTK_ENTRY( CEDXR3Device ),gtkDXR3Device ); + + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBVNone ),TRUE ); +#ifdef USE_LIBAVCODEC + if ( gtkVfLAVC ) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBVLavc ),TRUE ); +#endif + + gtk_widget_show( DXR3Config ); + gtkSetLayer( DXR3Config ); +} + +void HideDXR3Config( void ) +{ + if ( !DXR3Config ) return; + gtk_widget_hide( DXR3Config ); + gtk_widget_destroy( DXR3Config ); + DXR3Config=NULL; +} + +static void dxr3Button( GtkButton * button,gpointer user_data ) +{ + switch ( (int)user_data ) + { + case 0: // Ok + gfree( (void **)>kDXR3Device ); gtkDXR3Device=strdup( gtk_entry_get_text( GTK_ENTRY( CEDXR3Device ) ) ); +#ifdef USE_LIBAVCODEC + gtkVfLAVC=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBVLavc ) ); +#endif + case 1: // Cancel + HideDXR3Config(); + break; + } +} + +GtkWidget * create_DXR3Config( void ) +{ + GtkWidget * vbox1; + GtkWidget * vbox2; + GtkWidget * hbox1; + GList * CBDevice_items = NULL; + GtkWidget * vbox3; + GSList * VEncoder_group = NULL; + GtkWidget * hbuttonbox1; + GtkAccelGroup * accel_group; + + accel_group=gtk_accel_group_new(); + + DXR3Config=gtk_window_new( GTK_WINDOW_TOPLEVEL ); + gtk_widget_set_name( DXR3Config,"DXR3Config" ); + gtk_object_set_data( GTK_OBJECT( DXR3Config ),"DXR3Config",DXR3Config ); +// gtk_widget_set_usize( DXR3Config,300,156 ); + GTK_WIDGET_SET_FLAGS( DXR3Config,GTK_CAN_DEFAULT ); + gtk_window_set_title( GTK_WINDOW( DXR3Config ),"DXR3/H+" ); + gtk_window_set_position( GTK_WINDOW( DXR3Config ),GTK_WIN_POS_CENTER ); + gtk_window_set_policy( GTK_WINDOW( DXR3Config ),FALSE,FALSE,FALSE ); + gtk_window_set_wmclass( GTK_WINDOW( DXR3Config ),"DXR3","MPlayer" ); + + gtk_widget_realize( DXR3Config ); + gtkAddIcon( DXR3Config ); + + vbox1=AddVBox( AddDialogFrame( DXR3Config ),0 ); + vbox2=AddVBox( vbox1,0 ); + hbox1=AddHBox( vbox2,1 ); + AddLabel( MSGTR_PREFERENCES_Audio_Device,hbox1 ); + + CBDevice=AddComboBox( hbox1 ); + + CBDevice_items=g_list_append( CBDevice_items,( gpointer ) "/dev/em8300" ); + CBDevice_items=g_list_append( CBDevice_items,( gpointer ) "/dev/em8300-0" ); + CBDevice_items=g_list_append( CBDevice_items,( gpointer ) "/dev/em8300-1" ); + CBDevice_items=g_list_append( CBDevice_items,( gpointer ) "/dev/em8300-2" ); + CBDevice_items=g_list_append( CBDevice_items,( gpointer ) "/dev/em8300-3" ); + gtk_combo_set_popdown_strings( GTK_COMBO( CBDevice ),CBDevice_items ); + g_list_free( CBDevice_items ); + + CEDXR3Device=GTK_COMBO( CBDevice )->entry; + gtk_widget_set_name( CEDXR3Device,"CEDXR3Device" ); + gtk_widget_show( CEDXR3Device ); + gtk_entry_set_text( GTK_ENTRY( CEDXR3Device ),"/dev/em8300" ); + +#if defined( USE_LIBAVCODEC ) + AddHSeparator( vbox2 ); + vbox3=AddVBox( vbox2,0 ); + AddLabel( MSGTR_PREFERENCES_DXR3_VENC,vbox3 ); + RBVNone=AddRadioButton( MSGTR_PREFERENCES_None,&VEncoder_group,vbox3 ); +#ifdef USE_LIBAVCODEC + RBVLavc=AddRadioButton( MSGTR_PREFERENCES_DXR3_LAVC,&VEncoder_group,vbox3 ); +#endif + +#endif + + AddHSeparator( vbox1 ); + + hbuttonbox1=AddHButtonBox( vbox1 ); + gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END ); + gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 ); + dxr3BOk=AddButton( MSGTR_Ok,hbuttonbox1 ); + dxr3BCancel=AddButton( MSGTR_Cancel,hbuttonbox1 ); + + gtk_widget_add_accelerator( dxr3BOk,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); + gtk_widget_add_accelerator( dxr3BCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); + + gtk_signal_connect( GTK_OBJECT( DXR3Config ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&DXR3Config ); + + gtk_signal_connect( GTK_OBJECT( dxr3BOk ),"clicked",GTK_SIGNAL_FUNC( dxr3Button ),(void *)0 ); + gtk_signal_connect( GTK_OBJECT( dxr3BCancel ),"clicked",GTK_SIGNAL_FUNC( dxr3Button ),(void *)1 ); + + gtk_window_add_accel_group( GTK_WINDOW( DXR3Config ),accel_group ); + + return DXR3Config; +} + +#endif diff --git a/gui/mplayer/gtk/opts.h b/gui/mplayer/gtk/opts.h new file mode 100644 index 0000000000..8f3c92e1cc --- /dev/null +++ b/gui/mplayer/gtk/opts.h @@ -0,0 +1,16 @@ + +#ifndef __PREFERENCES_H +#define __PREFERENCES_H + +#include <gtk/gtk.h> + +extern GtkWidget * AudioConfig; +extern GtkWidget * Preferences; +extern GtkWidget * prEFontName; + +extern GtkWidget * create_Preferences( void ); +extern GtkWidget * create_AudioConfig( void ); + +extern void ShowPreferences( void ); + +#endif diff --git a/gui/mplayer/gtk/pl.c b/gui/mplayer/gtk/pl.c new file mode 100644 index 0000000000..8ca2f1e3fa --- /dev/null +++ b/gui/mplayer/gtk/pl.c @@ -0,0 +1,529 @@ + +#include <sys/types.h> +#include <sys/stat.h> +#include <string.h> +#include <dirent.h> +#include <unistd.h> +#include <stdio.h> +#include <stdlib.h> + +#include <gdk/gdkkeysyms.h> +#include <gtk/gtk.h> + +#include "config.h" +#include "help_mp.h" +#include "stream/stream.h" + +#include "interface.h" +#include "../widgets.h" +#include "pl.h" +#include "common.h" + +static char * book_open_xpm[] = { + "16 16 4 1", + " c None s None", + ". c black", + "X c #808080", + "o c white", + " ", + " .. ", + " .Xo. ... ", + " .Xoo. ..oo. ", + " .Xooo.Xooo... ", + " .Xooo.oooo.X. ", + " .Xooo.Xooo.X. ", + " .Xooo.oooo.X. ", + " .Xooo.Xooo.X. ", + " .Xooo.oooo.X. ", + " .Xoo.Xoo..X. ", + " .Xo.o..ooX. ", + " .X..XXXXX. ", + " ..X....... ", + " .. ", + " "}; + +static char * book_closed_xpm[] = { + "16 16 6 1", + " c None s None", + ". c black", + "X c blue", + "o c yellow", + "O c #007FEA", + "# c white", + " ", + " .. ", + " ..XX. ", + " ..XXXXX. ", + " ..XXXXXXXX. ", + ".ooXXXXXXXXX. ", + "..ooXXXXXXXXX. ", + ".X.ooXXXXXXXXX. ", + ".XX.ooXXXXXX.. ", + " .XX.ooXXX..#O ", + " .XX.oo..##OO. ", + " .XX..##OO.. ", + " .X.#OO.. ", + " ..O.. ", + " .. ", + " "}; + + GtkWidget * PlayList = NULL; +static GtkWidget * CTDirTree; +static GtkWidget * CLFiles; +static GtkWidget * CLSelected; +static GtkWidget * Add; +static GtkWidget * Remove; +static GtkWidget * Ok; +static GtkWidget * Cancel; +static GdkPixmap * pxOpenedBook; +static GdkPixmap * pxClosedBook; +static GdkBitmap * msOpenedBook; +static GdkBitmap * msClosedBook; + +static int NrOfEntrys = 0; +static int NrOfSelected = 0; +static int * CLFileSelected = NULL; +static int * CLListSelected = NULL; + +static int sigSel; +static int sigUnsel; + +typedef struct +{ + int scaned; + char * path; +} DirNodeType; + +static GtkCTreeNode * sibling; +static GtkCTreeNode * parent; +static gchar * current_path; +static gchar * old_path = NULL; + +static int compare_func(const void *a, const void *b) +{ + char * tmp; + int i; + if ( !a || !b || !( (DirNodeType *)a )->path ) return -1; + tmp=strdup( (char *)b ); tmp[strlen( tmp )-1]=0; + i=strcmp( ( (DirNodeType *)a )->path,tmp ); + free( tmp ); + return i; +} + +static void scan_dir( char * path ); + +void ShowPlayList( void ) +{ + if ( PlayList ) gtkActive( PlayList ); + else PlayList=create_PlayList(); + + if ( old_path && *old_path ) + { + char * currentdir = strdup( old_path ); + char * tpath,* pos; + GtkCTreeNode * node,* nextnode; + gboolean leaf; + tpath=strdup( "/" ); + pos=strtok( currentdir,"/" ); + node=gtk_ctree_find_by_row_data_custom( GTK_CTREE( CTDirTree ),NULL,"/",compare_func ); + do + { + char * tpathnew = g_strconcat( tpath,pos,"/",NULL ); + free( tpath ); tpath=tpathnew; + nextnode=gtk_ctree_find_by_row_data_custom( GTK_CTREE( CTDirTree ),node,tpath,compare_func ); + if ( !nextnode ) break; + node=nextnode; + pos=strtok( NULL,"/" ); + gtk_ctree_get_node_info( GTK_CTREE( CTDirTree ),node,NULL,NULL,NULL,NULL,NULL,NULL,&leaf,NULL ); + if ( !leaf && pos ) gtk_ctree_expand( GTK_CTREE( CTDirTree ),node ); + else + { + DirNodeType * DirNode; + gtk_ctree_select( GTK_CTREE( CTDirTree ),node ); + DirNode=gtk_ctree_node_get_row_data( GTK_CTREE( CTDirTree ),node ); + current_path=DirNode->path; + scan_dir( DirNode->path ); + if ( CLFileSelected ) free( CLFileSelected ); CLFileSelected=calloc( 1,NrOfEntrys * sizeof( int ) ); + break; + } + } while( pos ); + free( tpath ); + free( currentdir ); + } + else gtk_ctree_select( GTK_CTREE( CTDirTree ),parent ); + + gtk_clist_freeze( GTK_CLIST( CLSelected ) ); + gtk_clist_clear( GTK_CLIST( CLSelected ) ); + if ( plList ) + { + plItem * next = plList; + while ( next || next->next ) + { + char * text[1][3]; text[0][2]=""; + text[0][0]=next->name; + text[0][1]=next->path; + gtk_clist_append( GTK_CLIST( CLSelected ),text[0] ); + NrOfSelected++; + if ( next->next ) next=next->next; else break; + } + CLListSelected=calloc( 1,NrOfSelected * sizeof( int ) ); + } + gtk_clist_thaw( GTK_CLIST( CLSelected ) ); + + gtk_widget_show( PlayList ); +} + +void HidePlayList( void ) +{ + if ( !PlayList ) return; + NrOfSelected=NrOfEntrys=0; + gfree( (void **)&CLListSelected ); gfree( (void **)&CLFileSelected ); + if ( old_path ) free( old_path ); old_path=strdup( current_path ); + gtk_widget_hide( PlayList ); + gtk_widget_destroy( PlayList ); + PlayList=NULL; +} + +static void plRowSelect( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data ) +{ + switch ( (int) user_data ) + { + case 0: CLFileSelected[row]=1; break; + case 1: CLListSelected[row]=1; break; + } +} + +static void plUnRowSelect( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data ) +{ + switch ( (int) user_data ) + { + case 0: CLFileSelected[row]=0; break; + case 1: CLListSelected[row]=0; break; + } +} + +static void plButtonReleased( GtkButton * button,gpointer user_data ) +{ + switch ( (int) user_data ) + { + case 1: // ok + { + int i; + if ( plList ) gtkSet( gtkDelPl,0,NULL ); + for ( i=0;i<NrOfSelected;i++ ) + { + plItem * item; + char * text[3]; + item=calloc( 1,sizeof( plItem ) ); + gtk_clist_get_text( GTK_CLIST( CLSelected ),i,0,&text[0] ); + gtk_clist_get_text( GTK_CLIST( CLSelected ),i,1,&text[1] ); + item->name=strdup( text[0] ); + item->path=strdup( text[1] ); + gtkSet( gtkAddPlItem,0,(void*)item ); + } + if ( plCurrent ) + { + mplSetFileName( plCurrent->path,plCurrent->name,STREAMTYPE_FILE ); +// guiSetDF( guiIntfStruct.Filename,plCurrent->path,plCurrent->name ); +// guiIntfStruct.FilenameChanged=1; +// guiIntfStruct.StreamType=STREAMTYPE_FILE; + } + } + case 0: // cancel + HidePlayList(); + break; + case 2: // remove + { + int i; int j; int c=0; + + gtk_signal_handler_block( GTK_OBJECT( CLSelected ),sigSel ); + gtk_signal_handler_block( GTK_OBJECT( CLSelected ),sigUnsel ); + + gtk_clist_freeze( GTK_CLIST( CLSelected ) ); + for ( i=0;i<NrOfSelected-c;i++ ) + if ( CLListSelected[i] ) + { + gtk_clist_remove( GTK_CLIST( CLSelected ),i - c ); + c++; + for ( j=i;j<NrOfSelected-c;j++ ) + CLListSelected[i] = CLListSelected[i+1]; + } + NrOfSelected-=c; + gtk_clist_thaw( GTK_CLIST( CLSelected ) ); + + gtk_signal_handler_unblock( GTK_OBJECT( CLSelected ),sigSel ); + gtk_signal_handler_unblock( GTK_OBJECT( CLSelected ),sigUnsel ); + + } + break; + case 3: // add + { + int i; + char * itext[1][2]; + char * text[1][3]; text[0][2]=""; + gtk_clist_freeze( GTK_CLIST( CLSelected ) ); + for ( i=0;i<NrOfEntrys;i++ ) + { + if ( CLFileSelected[i] ) + { + gtk_clist_get_text( GTK_CLIST( CLFiles ),i,0,(char **)&itext ); + text[0][0]=itext[0][0]; text[0][1]=current_path; + gtk_clist_append( GTK_CLIST( CLSelected ),text[0] ); + NrOfSelected++; + CLListSelected=realloc( CLListSelected,NrOfSelected * sizeof( int ) ); + CLListSelected[NrOfSelected - 1]=0; + } + } + gtk_clist_thaw( GTK_CLIST( CLSelected ) ); + } + break; + } +} + +static int check_for_subdir( gchar * path ) +{ + DIR * dir; + struct dirent * dirent; + struct stat statbuf; + gchar * npath; + + if ( (dir=opendir( path )) ) + { + while ( (dirent=readdir( dir )) ) + { + if ( dirent->d_name[0] != '.' ) + { + npath=calloc( 1,strlen( path ) + strlen( dirent->d_name ) + 3 ); + sprintf( npath,"%s/%s",path,dirent->d_name ); + if ( stat( npath,&statbuf ) != -1 && S_ISDIR( statbuf.st_mode ) ) + { free( npath ); closedir( dir ); return 1; } + free( npath ); + } + } + closedir( dir ); + } + return 0; +} + +static void plCTree( GtkCTree * ctree,GtkCTreeNode * parent_node,gpointer user_data ) +{ + GtkCTreeNode * node; + DirNodeType * DirNode; + gchar * text; + gchar * dummy = "dummy"; + int subdir = 1; + DIR * dir = NULL; + struct dirent * dirent; + gchar * path; + struct stat statbuf; + + DirNode=gtk_ctree_node_get_row_data( ctree,parent_node ); + if ( !DirNode->scaned ) + { + DirNode->scaned=1; current_path=DirNode->path; + gtk_clist_freeze( GTK_CLIST( ctree ) ); + node=gtk_ctree_find_by_row_data( ctree,parent_node,NULL ); + gtk_ctree_remove_node( ctree,node ); + + if ( (dir=opendir( DirNode->path ) ) ) + { + while( (dirent=readdir( dir )) ) + { + path=calloc( 1,strlen( DirNode->path ) + strlen( dirent->d_name ) + 2 ); + if ( !strcmp( current_path,"/" ) ) sprintf( path,"/%s",dirent->d_name ); + else sprintf( path,"%s/%s",current_path,dirent->d_name ); + text=dirent->d_name; + + if ( stat( path,&statbuf ) != -1 && S_ISDIR( statbuf.st_mode ) && dirent->d_name[0] != '.' ) + { + DirNode=malloc( sizeof( DirNodeType ) ); DirNode->scaned=0; DirNode->path=strdup( path ); + subdir=check_for_subdir( path ); + node=gtk_ctree_insert_node( ctree,parent_node,NULL,&text,4,pxOpenedBook,msOpenedBook,pxClosedBook,msClosedBook,!subdir,FALSE ); + gtk_ctree_node_set_row_data_full( ctree,node,DirNode,NULL ); + if ( subdir ) node=gtk_ctree_insert_node( ctree,node,NULL,&dummy,4,NULL,NULL,NULL,NULL,FALSE,FALSE ); + } + free( path ); path=NULL; + } + closedir( dir ); + } + + gtk_ctree_sort_node( ctree,parent_node ); + gtk_clist_thaw( GTK_CLIST( ctree ) ); + } +} + +static void scan_dir( char * path ) +{ + DIR * dir = NULL; + char * curr; + struct dirent * dirent; + struct stat statbuf; + char * text[1][2]; text[0][1]=""; + + gtk_clist_clear( GTK_CLIST( CLFiles ) ); + if ( (dir=opendir( path )) ) + { + NrOfEntrys=0; + while( (dirent=readdir( dir )) ) + { + curr=calloc( 1,strlen( path ) + strlen( dirent->d_name ) + 3 ); sprintf( curr,"%s/%s",path,dirent->d_name ); + if ( stat( curr,&statbuf ) != -1 && ( S_ISREG( statbuf.st_mode ) || S_ISLNK( statbuf.st_mode ) ) ) + { + text[0][0]=dirent->d_name; + gtk_clist_append( GTK_CLIST( CLFiles ),text[0] ); + NrOfEntrys++; + } + free( curr ); + } + closedir( dir ); + gtk_clist_sort( GTK_CLIST( CLFiles ) ); + } +} + +static void plCTRow(GtkWidget * widget, gint row, gint column, GdkEventButton * bevent, gpointer data) +{ + DirNodeType * DirNode; + GtkCTreeNode * node; + node=gtk_ctree_node_nth( GTK_CTREE( widget ),row ); + DirNode=gtk_ctree_node_get_row_data( GTK_CTREE( widget ),node ); + current_path=DirNode->path; + gtk_ctree_expand( GTK_CTREE( widget ),node ); + scan_dir( DirNode->path ); + if ( CLFileSelected ) free( CLFileSelected ); CLFileSelected=calloc( 1,NrOfEntrys * sizeof( int ) ); +} + +GtkWidget * create_PlayList( void ) +{ + GtkWidget * vbox1; + GtkWidget * hbox1; + GtkWidget * scrolledwindow1; + GtkWidget * vbox2; + GtkWidget * scrolledwindow2; + GtkWidget * scrolledwindow3; + GtkWidget * hbuttonbox1; + GtkAccelGroup * accel_group; + GdkColor transparent = { 0,0,0,0 }; + gchar * root = "/"; + gchar * dummy = "dummy"; + DirNodeType * DirNode; + + accel_group=gtk_accel_group_new(); + + PlayList=gtk_window_new( GTK_WINDOW_TOPLEVEL ); + gtk_object_set_data( GTK_OBJECT( PlayList ),"PlayList",PlayList ); + gtk_widget_set_usize( PlayList,512,384 ); + gtk_window_set_title( GTK_WINDOW( PlayList ),MSGTR_PlayList ); + gtk_window_set_position( GTK_WINDOW( PlayList ),GTK_WIN_POS_CENTER ); +// gtk_window_set_policy( GTK_WINDOW( PlayList ),FALSE,FALSE,FALSE ); + gtk_window_set_wmclass( GTK_WINDOW( PlayList ),"Playlist","MPlayer" ); + + gtk_widget_realize( PlayList ); + gtkAddIcon( PlayList ); + + vbox1=AddVBox( AddDialogFrame( PlayList ),0 ); + hbox1=AddHBox( NULL,1 ); + gtk_box_pack_start( GTK_BOX( vbox1 ),hbox1,TRUE,TRUE,0 ); + + scrolledwindow1=gtk_scrolled_window_new( NULL,NULL ); + gtk_widget_show( scrolledwindow1 ); + gtk_container_add( GTK_CONTAINER( + AddFrame( NULL,0,hbox1,1 ) ),scrolledwindow1 ); + gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC ); + + CTDirTree=gtk_ctree_new( 1,0 ); + gtk_signal_connect( GTK_OBJECT( CTDirTree ),"tree_expand",GTK_SIGNAL_FUNC( plCTree ),(void*)0 ); + gtk_signal_connect( GTK_OBJECT( CTDirTree ),"select_row",GTK_SIGNAL_FUNC( plCTRow ),(void *)0 ); + gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),CTDirTree ); + gtk_clist_set_column_auto_resize( GTK_CLIST( CTDirTree ),0,TRUE ); + gtk_clist_set_column_width( GTK_CLIST( CTDirTree ),0,80 ); + gtk_clist_set_selection_mode( GTK_CLIST( CTDirTree ),GTK_SELECTION_SINGLE ); + gtk_ctree_set_line_style( GTK_CTREE( CTDirTree ),GTK_CTREE_LINES_SOLID ); + gtk_clist_column_titles_show( GTK_CLIST( CTDirTree ) ); + gtk_clist_set_shadow_type( GTK_CLIST( CTDirTree ),GTK_SHADOW_NONE ); + + if ( !pxOpenedBook ) pxOpenedBook=gdk_pixmap_create_from_xpm_d( PlayList->window,&msOpenedBook,&transparent,book_closed_xpm ); + if ( !pxClosedBook ) pxClosedBook=gdk_pixmap_create_from_xpm_d( PlayList->window,&msClosedBook,&transparent,book_open_xpm ); + + parent=gtk_ctree_insert_node( GTK_CTREE( CTDirTree ),NULL,NULL,&root,4,pxOpenedBook,msOpenedBook,pxClosedBook,msClosedBook,FALSE,FALSE ); + DirNode=malloc( sizeof( DirNodeType ) ); + DirNode->scaned=0; DirNode->path=strdup( root ); + gtk_ctree_node_set_row_data_full(GTK_CTREE( CTDirTree ),parent,DirNode,NULL ); + sibling=gtk_ctree_insert_node( GTK_CTREE( CTDirTree ),parent,NULL,&dummy,4,NULL,NULL,NULL,NULL,TRUE,TRUE ); + gtk_ctree_expand( GTK_CTREE( CTDirTree ),parent ); + gtk_widget_show( CTDirTree ); + + + gtk_clist_set_column_widget( GTK_CLIST( CTDirTree ),0, + AddLabel( MSGTR_PLAYLIST_DirectoryTree,NULL ) ); + + vbox2=AddVBox( + AddFrame( NULL,1,hbox1,1 ),0 ); + + scrolledwindow2=gtk_scrolled_window_new( NULL,NULL ); + gtk_widget_show( scrolledwindow2 ); + gtk_box_pack_start( GTK_BOX( vbox2 ),scrolledwindow2,TRUE,TRUE,0 ); + gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow2 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC ); + + CLFiles=gtk_clist_new( 1 ); + gtk_widget_show( CLFiles ); + gtk_container_add( GTK_CONTAINER( scrolledwindow2 ),CLFiles ); + gtk_clist_set_column_width( GTK_CLIST( CLFiles ),0,80 ); + gtk_clist_set_selection_mode( GTK_CLIST( CLFiles ),GTK_SELECTION_EXTENDED ); + gtk_clist_column_titles_show( GTK_CLIST( CLFiles ) ); + gtk_clist_set_shadow_type( GTK_CLIST( CLFiles ),GTK_SHADOW_NONE ); + + gtk_clist_set_column_widget( GTK_CLIST( CLFiles ),0, + AddLabel( MSGTR_PLAYLIST_Files,NULL ) ); + + AddHSeparator( vbox2 ); + + scrolledwindow3=gtk_scrolled_window_new( NULL,NULL ); + gtk_widget_show( scrolledwindow3 ); + gtk_box_pack_start( GTK_BOX( vbox2 ),scrolledwindow3,TRUE,TRUE,0 ); + gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow3 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC ); + + CLSelected=gtk_clist_new( 2 ); + gtk_widget_show( CLSelected ); + gtk_container_add( GTK_CONTAINER( scrolledwindow3 ),CLSelected ); + gtk_clist_set_column_width( GTK_CLIST( CLSelected ),0,295 ); + gtk_clist_set_column_width( GTK_CLIST( CLSelected ),1,295 ); + gtk_clist_set_selection_mode( GTK_CLIST( CLSelected ),GTK_SELECTION_MULTIPLE ); + gtk_clist_column_titles_show( GTK_CLIST( CLSelected ) ); + gtk_clist_set_shadow_type( GTK_CLIST( CLSelected ),GTK_SHADOW_NONE ); + + gtk_clist_set_column_widget( GTK_CLIST( CLSelected ),0, + AddLabel( MSGTR_PLAYLIST_Selected,NULL ) ); + + gtk_clist_set_column_widget( GTK_CLIST( CLSelected ),1, + AddLabel( MSGTR_PLAYLIST_Path,NULL ) ); + + AddHSeparator( vbox1 ); + + hbuttonbox1=AddHButtonBox( vbox1 ); + gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END ); + gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 ); + + Add=AddButton( MSGTR_Add,hbuttonbox1 ); + Remove=AddButton( MSGTR_Remove,hbuttonbox1 ); + Ok=AddButton( MSGTR_Ok,hbuttonbox1 ); + Cancel=AddButton( MSGTR_Cancel,hbuttonbox1 ); + + gtk_widget_add_accelerator( Cancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); + + gtk_signal_connect( GTK_OBJECT( PlayList ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&PlayList ); + + gtk_signal_connect( GTK_OBJECT( CLFiles ),"select_row",GTK_SIGNAL_FUNC( plRowSelect ),(void *)0 ); + gtk_signal_connect( GTK_OBJECT( CLFiles ),"unselect_row",GTK_SIGNAL_FUNC( plUnRowSelect ),(void *)0 ); + sigSel=gtk_signal_connect( GTK_OBJECT( CLSelected ),"select_row",GTK_SIGNAL_FUNC( plRowSelect ),(void*)1 ); + sigUnsel=gtk_signal_connect( GTK_OBJECT( CLSelected ),"unselect_row",GTK_SIGNAL_FUNC( plUnRowSelect ),(void*)1 ); + + gtk_signal_connect( GTK_OBJECT( Add ),"clicked",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)3 ); + gtk_signal_connect( GTK_OBJECT( Remove ),"clicked",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)2 ); + gtk_signal_connect( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)1 ); + gtk_signal_connect( GTK_OBJECT( Cancel ),"clicked",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)0 ); + + gtk_window_add_accel_group( GTK_WINDOW( PlayList ),accel_group ); + + return PlayList; +} + diff --git a/gui/mplayer/gtk/pl.h b/gui/mplayer/gtk/pl.h new file mode 100644 index 0000000000..d5e1ebe8b4 --- /dev/null +++ b/gui/mplayer/gtk/pl.h @@ -0,0 +1,14 @@ + +#ifndef __GUI_PL_H +#define __GUI_PL_H + +#include <gtk/gtk.h> + +extern GtkWidget * PlayList; + +extern void ShowPlayList( void ); +extern void HidePlayList( void ); + +extern GtkWidget * create_PlayList (void); + +#endif diff --git a/gui/mplayer/gtk/sb.c b/gui/mplayer/gtk/sb.c new file mode 100644 index 0000000000..bae48c523f --- /dev/null +++ b/gui/mplayer/gtk/sb.c @@ -0,0 +1,195 @@ + +#include <sys/stat.h> +#include <glob.h> +#include <unistd.h> +#include <string.h> +#include <stdlib.h> +#include <stdio.h> + +#include "sb.h" +#include "common.h" + +#include "app.h" +#include "config.h" +#include "help_mp.h" + +#include "../widgets.h" +#include "app.h" + +GtkWidget * SkinList = NULL; +char * sbSelectedSkin=NULL; +/* FIXME: Eventually remove the obsolete directory names. */ +char * sbMPlayerDirInHome=NULL; +char * sbMPlayerDirInHome_obsolete=NULL; +char * sbMPlayerPrefixDir=NULL; +char * sbMPlayerPrefixDir_obsolete=NULL; + +char * gtkOldSkin=NULL; +static char * prev=NULL; + +GtkWidget * SkinBrowser = NULL; + +void ShowSkinBrowser( void ) +{ + if ( SkinBrowser ) gtkActive( SkinBrowser ); + else SkinBrowser=create_SkinBrowser(); +} + +void HideSkinBrowser( void ) +{ + if ( !SkinBrowser ) return; + gtk_widget_hide( SkinBrowser ); + gtk_widget_destroy( SkinBrowser ); + SkinBrowser=NULL; +} + +int gtkFillSkinList( gchar * mdir ) +{ + gchar * str[2]; + gchar * tmp; + int i; + glob_t gg; + struct stat fs; + + gtkOldSkin=strdup( skinName ); + prev=gtkOldSkin; + + str[0]="default"; + str[1]=""; + if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str ); + + glob( mdir,GLOB_NOSORT,NULL,&gg ); + for( i=0;i<(int)gg.gl_pathc;i++ ) + { + if ( !strcmp( gg.gl_pathv[i],"." ) || !strcmp( gg.gl_pathv[i],".." ) ) continue; + stat( gg.gl_pathv[i],&fs ); + if ( S_ISDIR( fs.st_mode ) ) + { + tmp=strrchr( gg.gl_pathv[i],'/' ); tmp++; + if ( !strcmp( tmp,"default" ) ) continue; + str[0]=tmp; + if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str ); + } + } + globfree( &gg ); + return 1; +} + +static void prButton( GtkObject * object,gpointer user_data ) +{ + if ( sbSelectedSkin ) + { + switch ( (int)user_data ) + { + case 0: // cancel + if ( strcmp( sbSelectedSkin,gtkOldSkin ) ) ChangeSkin( gtkOldSkin ); + break; + case 1: // ok + ChangeSkin( sbSelectedSkin ); + if ( skinName ) free( skinName ); + skinName=strdup( sbSelectedSkin ); + break; + } + } + HideSkinBrowser(); +} + +static void on_SkinList_select_row( GtkCList * clist,gint row,gint column,GdkEvent * bevent,gpointer user_data ) +{ + gtk_clist_get_text( clist,row,0,&sbSelectedSkin ); + if ( strcmp( prev,sbSelectedSkin ) ) + { + prev=sbSelectedSkin; + ChangeSkin( sbSelectedSkin ); + gtkActive( SkinBrowser ); + } + if( !bevent ) return; + if( bevent->type == GDK_2BUTTON_PRESS ) + { + if ( skinName ) free( skinName ); + skinName=strdup( sbSelectedSkin ); + HideSkinBrowser(); + } +} + +GtkWidget * create_SkinBrowser( void ) +{ + GtkWidget * vbox5; + GtkWidget * scrolledwindow1; + GtkWidget * hbuttonbox4; + GtkWidget * Cancel; + GtkWidget * Ok; + GtkAccelGroup * accel_group; + + accel_group = gtk_accel_group_new (); + + SkinBrowser=gtk_window_new( GTK_WINDOW_TOPLEVEL ); + gtk_widget_set_name( SkinBrowser,MSGTR_SkinBrowser ); + gtk_object_set_data( GTK_OBJECT( SkinBrowser ),MSGTR_SkinBrowser,SkinBrowser ); + gtk_widget_set_usize( SkinBrowser,256,320 ); + gtk_container_set_border_width( GTK_CONTAINER( SkinBrowser ),1 ); + GTK_WIDGET_SET_FLAGS( SkinBrowser,GTK_CAN_DEFAULT ); + gtk_widget_set_events( SkinBrowser,GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK ); + gtk_window_set_title( GTK_WINDOW( SkinBrowser ),MSGTR_SkinBrowser ); + gtk_window_set_position( GTK_WINDOW( SkinBrowser ),GTK_WIN_POS_CENTER ); + gtk_window_set_policy( GTK_WINDOW( SkinBrowser ),FALSE,FALSE,TRUE ); + gtk_window_set_wmclass( GTK_WINDOW( SkinBrowser ),"SkinBrowser","MPlayer" ); + + gtk_widget_realize( SkinBrowser ); + gtkAddIcon( SkinBrowser ); + + vbox5=AddVBox( AddDialogFrame( SkinBrowser ),0 ); + AddLabel( MSGTR_SKIN_LABEL,vbox5 ); + AddHSeparator( vbox5 ); + + scrolledwindow1=gtk_scrolled_window_new( NULL,NULL ); + gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" ); + gtk_widget_ref( scrolledwindow1 ); + gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"scrolledwindow1",scrolledwindow1,(GtkDestroyNotify)gtk_widget_unref ); + gtk_widget_show( scrolledwindow1 ); + gtk_box_pack_start( GTK_BOX( vbox5 ),scrolledwindow1,TRUE,TRUE,0 ); + gtk_container_set_border_width( GTK_CONTAINER( scrolledwindow1 ),2 ); + gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_NEVER,GTK_POLICY_AUTOMATIC ); + + SkinList=gtk_clist_new( 1 ); + gtk_widget_set_name( SkinList,"SkinList" ); + gtk_widget_ref( SkinList ); + gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"SkinList",SkinList,(GtkDestroyNotify)gtk_widget_unref ); + gtk_widget_show( SkinList ); + gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),SkinList ); + gtk_clist_set_column_width( GTK_CLIST( SkinList ),0,80 ); + gtk_clist_set_selection_mode( GTK_CLIST( SkinList ),GTK_SELECTION_SINGLE ); + gtk_clist_column_titles_hide( GTK_CLIST( SkinList ) ); + gtk_clist_set_shadow_type( GTK_CLIST( SkinList ),GTK_SHADOW_ETCHED_OUT ); + + AddHSeparator( vbox5 ); + + hbuttonbox4=AddHButtonBox( vbox5 ); + gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox4 ),GTK_BUTTONBOX_SPREAD ); + gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox4 ),10 ); + + Ok=AddButton( MSGTR_Ok,hbuttonbox4 ); + Cancel=AddButton( MSGTR_Cancel,hbuttonbox4 ); + + gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); + gtk_widget_add_accelerator( Cancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); + + gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&SkinBrowser ); + gtk_signal_connect( GTK_OBJECT( SkinList ),"select_row",GTK_SIGNAL_FUNC( on_SkinList_select_row ),NULL ); + gtk_signal_connect( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void *)1 ); + gtk_signal_connect( GTK_OBJECT( Cancel ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void *)0 ); + + if ( ( sbMPlayerDirInHome_obsolete=calloc( 1,strlen( skinDirInHome_obsolete ) + 4 ) ) != NULL ) + { strcpy( sbMPlayerDirInHome_obsolete,skinDirInHome_obsolete ); strcat( sbMPlayerDirInHome_obsolete,"/*" ); } + if ( ( sbMPlayerDirInHome=calloc( 1,strlen( skinDirInHome ) + 4 ) ) != NULL ) + { strcpy( sbMPlayerDirInHome,skinDirInHome ); strcat( sbMPlayerDirInHome,"/*" ); } + if ( ( sbMPlayerPrefixDir_obsolete=calloc( 1,strlen( skinMPlayerDir ) + 4 ) ) != NULL ) + { strcpy( sbMPlayerPrefixDir_obsolete,skinMPlayerDir ); strcat( sbMPlayerPrefixDir_obsolete,"/*" ); } + if ( ( sbMPlayerPrefixDir=calloc( 1,strlen( skinMPlayerDir ) + 4 ) ) != NULL ) + { strcpy( sbMPlayerPrefixDir,skinMPlayerDir ); strcat( sbMPlayerPrefixDir,"/*" ); } + + gtk_window_add_accel_group( GTK_WINDOW( SkinBrowser ),accel_group ); + gtk_widget_grab_focus( SkinList ); + + return SkinBrowser; +} diff --git a/gui/mplayer/gtk/sb.h b/gui/mplayer/gtk/sb.h new file mode 100644 index 0000000000..74a28ab5a8 --- /dev/null +++ b/gui/mplayer/gtk/sb.h @@ -0,0 +1,18 @@ +#ifndef __GUI_SB_H +#define __GUI_SB_H + +#include <gtk/gtk.h> + +extern GtkWidget * SkinList; +extern char * sbSelectedSkin; +extern char * sbMPlayerDirInHome; +extern char * sbMPlayerDirInHome_obsolete; +extern char * sbMPlayerPrefixDir; +extern char * sbMPlayerPrefixDir_obsolete; +extern GtkWidget * SkinBrowser; + +extern void ShowSkinBrowser( void ); +extern int gtkFillSkinList( gchar * mdir ); +extern GtkWidget * create_SkinBrowser( void ); + +#endif diff --git a/gui/mplayer/gtk/url.c b/gui/mplayer/gtk/url.c new file mode 100644 index 0000000000..6ad8b61db2 --- /dev/null +++ b/gui/mplayer/gtk/url.c @@ -0,0 +1,153 @@ + +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + +#include <gdk/gdkkeysyms.h> +#include <gtk/gtk.h> + +#include "url.h" +#include "common.h" +#include "interface.h" +#include "app.h" +#include "../widgets.h" +#include "help_mp.h" + +GtkWidget * URL = NULL; + +static GtkWidget * URLCombo; +static GtkWidget * URLEntry; +static GList * URLComboEntrys = NULL; + +void ShowURLDialogBox( void ) +{ + if ( URL ) gtkActive( URL ); + else URL=create_URL(); + + if ( URLList ) + { + URLItem * item = URLList; + g_list_free( URLComboEntrys ); + URLComboEntrys=NULL; + while( item ) + { + URLComboEntrys=g_list_append( URLComboEntrys,(gchar *)item->url ); + item=item->next; + } + } + + if ( URLComboEntrys ) + { + gtk_entry_set_text( GTK_ENTRY( URLEntry ),URLComboEntrys->data ); + gtk_combo_set_popdown_strings( GTK_COMBO( URLCombo ),URLComboEntrys ); + } + + gtk_widget_show( URL ); +} + +void HideURLDialogBox( void ) +{ + if ( !URL ) return; + gtk_widget_hide( URL ); + gtk_widget_destroy( URL ); + URL=0; +} + +static void on_Button_pressed( GtkButton * button,gpointer user_data ) +{ + URLItem * item; + + if ( (int)user_data ) + { + gchar * str= strdup( gtk_entry_get_text( GTK_ENTRY( URLEntry ) ) ); + + if ( str ) + { + if ( strncmp( str,"http://",7 ) + && strncmp( str,"ftp://",6 ) + && strncmp( str,"mms://",6 ) + && strncmp( str,"pnm://",6 ) + && strncmp( str,"rtsp://",7 ) ) + { + gchar * tmp; + tmp=malloc( strlen( str ) + 8 ); + sprintf( tmp,"http://%s",str ); + free( str ); str=tmp; + } + URLComboEntrys=g_list_prepend( URLComboEntrys,(gchar *)str ); + + item=calloc( 1,sizeof( URLItem ) ); + item->url=gstrdup( str ); + gtkSet( gtkAddURLItem,0,(void *)item ); + + guiSetFilename( guiIntfStruct.Filename,str ); guiIntfStruct.FilenameChanged=1; + mplEventHandling( evPlayNetwork,0 ); + } + } + HideURLDialogBox(); +} + +GtkWidget * create_URL( void ) +{ + GtkWidget * vbox1; + GtkWidget * hbox1; + GtkWidget * hbuttonbox1; + GtkWidget * Ok; + GtkWidget * Cancel; + GtkAccelGroup * accel_group; + + accel_group=gtk_accel_group_new(); + + URL=gtk_window_new( GTK_WINDOW_TOPLEVEL ); + gtk_widget_set_name( URL,"URL" ); + gtk_object_set_data( GTK_OBJECT( URL ),"URL",URL ); + gtk_widget_set_usize( URL,384,70 ); + GTK_WIDGET_SET_FLAGS( URL,GTK_CAN_DEFAULT ); + gtk_window_set_title( GTK_WINDOW( URL ),MSGTR_Network ); + gtk_window_set_position( GTK_WINDOW( URL ),GTK_WIN_POS_CENTER ); + gtk_window_set_policy( GTK_WINDOW( URL ),TRUE,TRUE,FALSE ); + gtk_window_set_wmclass( GTK_WINDOW( URL ),"Network","MPlayer" ); + + gtk_widget_realize( URL ); + gtkAddIcon( URL ); + + vbox1=AddVBox( AddDialogFrame( URL ),0 ); + hbox1=AddHBox( vbox1,1 ); + AddLabel( "URL: ",hbox1 ); + + URLCombo=AddComboBox( hbox1 ); +/* + gtk_combo_new(); + gtk_widget_set_name( URLCombo,"URLCombo" ); + gtk_widget_show( URLCombo ); + gtk_box_pack_start( GTK_BOX( hbox1 ),URLCombo,TRUE,TRUE,0 ); +*/ + URLEntry=GTK_COMBO( URLCombo )->entry; + gtk_widget_set_name( URLEntry,"URLEntry" ); + gtk_widget_show( URLEntry ); + + AddHSeparator( vbox1 ); + + hbuttonbox1=AddHButtonBox( vbox1 ); + gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END ); + gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 ); + + Ok=AddButton( MSGTR_Ok,hbuttonbox1 ); + Cancel=AddButton( MSGTR_Cancel,hbuttonbox1 ); + + gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); + gtk_widget_add_accelerator( Cancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); + + gtk_signal_connect( GTK_OBJECT( URL ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&URL ); + gtk_signal_connect( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( on_Button_pressed ),(void *)1 ); + gtk_signal_connect( GTK_OBJECT( Cancel ),"clicked",GTK_SIGNAL_FUNC( on_Button_pressed ),NULL ); + + gtk_widget_grab_focus( URLEntry ); + gtk_window_add_accel_group( GTK_WINDOW( URL ),accel_group ); + + return URL; +} + diff --git a/gui/mplayer/gtk/url.h b/gui/mplayer/gtk/url.h new file mode 100644 index 0000000000..ed0a656586 --- /dev/null +++ b/gui/mplayer/gtk/url.h @@ -0,0 +1,11 @@ + +#ifndef _URL_H +#define _URL_H + +extern GtkWidget * URL; +extern int gtkVURLDialogBox; + +extern void ShowURLDialogBox( void ); +extern GtkWidget * create_URL( void ); + +#endif diff --git a/gui/mplayer/menu.c b/gui/mplayer/menu.c new file mode 100644 index 0000000000..e8ef5cad97 --- /dev/null +++ b/gui/mplayer/menu.c @@ -0,0 +1,159 @@ + +#include <stdlib.h> +#include <stdio.h> +#include <inttypes.h> + +#include "app.h" +#include "../config.h" +#include "../help_mp.h" +#include "../mp_msg.h" + +#include "widgets.h" + +unsigned char * mplMenuDrawBuffer = NULL; +int mplMenuRender = 1; +int mplMenuItem = -1; +int mplOldMenuItem = -1; +int mplMenuX,mplMenuY; +static int mplMenuIsInitialized = 0; + +void mplHideMenu( int mx,int my,int w ); + +void mplMenuDraw( void ) +{ + uint32_t * buf = NULL; + uint32_t * drw = NULL; + int x,y,tmp; + + if ( !appMPlayer.menuIsPresent || !appMPlayer.menuBase.Bitmap.Image ) return; + if ( !mplMenuRender && !appMPlayer.menuWindow.Visible ) return; + + if ( mplMenuRender || mplMenuItem != mplOldMenuItem ) + { + memcpy( mplMenuDrawBuffer,appMPlayer.menuBase.Bitmap.Image,appMPlayer.menuBase.Bitmap.ImageSize ); +// --- + if ( mplMenuItem != -1 ) + { + buf=(uint32_t *)mplMenuDrawBuffer; + drw=(uint32_t *)appMPlayer.menuSelected.Bitmap.Image; + for ( y=appMPlayer.MenuItems[ mplMenuItem ].y; y < appMPlayer.MenuItems[ mplMenuItem ].y + appMPlayer.MenuItems[ mplMenuItem ].height; y++ ) + for ( x=appMPlayer.MenuItems[ mplMenuItem ].x; x < appMPlayer.MenuItems[ mplMenuItem ].x + appMPlayer.MenuItems[ mplMenuItem ].width; x++ ) + { + tmp=drw[ y * appMPlayer.menuSelected.width + x ]; + if ( tmp != 0x00ff00ff ) buf[ y * appMPlayer.menuBase.width + x ]=tmp; + } + } + mplOldMenuItem=mplMenuItem; +// --- + wsConvert( &appMPlayer.menuWindow,mplMenuDrawBuffer,appMPlayer.menuBase.Bitmap.ImageSize ); + mplMenuRender=0; + } + wsPutImage( &appMPlayer.menuWindow ); +} + +void mplMenuMouseHandle( int X,int Y,int RX,int RY ) +{ + int x,y,i; + + if ( !appMPlayer.menuBase.Bitmap.Image ) return; + + mplMenuItem=-1; + x=RX - appMPlayer.menuWindow.X; + y=RY - appMPlayer.menuWindow.Y; + if ( ( x < 0 ) || ( y < 0 ) || ( x > appMPlayer.menuBase.width ) || ( y > appMPlayer.menuBase.height ) ) + { + wsPostRedisplay( &appMPlayer.menuWindow ); + return; + } + + for( i=0;i<=appMPlayer.NumberOfMenuItems;i++ ) + { + if ( wgIsRect( x,y, + appMPlayer.MenuItems[i].x,appMPlayer.MenuItems[i].y, + appMPlayer.MenuItems[i].x+appMPlayer.MenuItems[i].width,appMPlayer.MenuItems[i].y+appMPlayer.MenuItems[i].height ) ) { mplMenuItem=i; break; } + } + wsPostRedisplay( &appMPlayer.menuWindow ); +} + +void mplShowMenu( int mx,int my ) +{ + int x,y; + + if ( !appMPlayer.menuIsPresent || !appMPlayer.menuBase.Bitmap.Image ) return; + + x=mx; + if ( x + appMPlayer.menuWindow.Width > wsMaxX ) x=wsMaxX - appMPlayer.menuWindow.Width - 1 + wsOrgX; + y=my; + if ( y + appMPlayer.menuWindow.Height > wsMaxY ) y=wsMaxY - appMPlayer.menuWindow.Height - 1 + wsOrgY; + + mplMenuX=x; mplMenuY=y; + + mplMenuItem = 0; + + wsMoveWindow( &appMPlayer.menuWindow,False,x,y ); + wsMoveTopWindow( wsDisplay,appMPlayer.menuWindow.WindowID ); + wsSetLayer( wsDisplay,appMPlayer.menuWindow.WindowID,1 ); + mplMenuRender=1; + wsVisibleWindow( &appMPlayer.menuWindow,wsShowWindow ); + wsPostRedisplay( &appMPlayer.menuWindow ); +} + +void mplHideMenu( int mx,int my,int w ) +{ + int x,y,i=mplMenuItem; + + if ( !appMPlayer.menuIsPresent || !appMPlayer.menuBase.Bitmap.Image ) return; + + x=mx-mplMenuX; + y=my-mplMenuY; +// x=RX - appMPlayer.menuWindow.X; +// y=RY - appMPlayer.menuWindow.Y; + + wsVisibleWindow( &appMPlayer.menuWindow,wsHideWindow ); + + if ( ( x < 0 ) || ( y < 0 ) ) return; + +// printf( "---------> %d %d,%d\n",i,x,y ); +// printf( "--------> mi: %d,%d %dx%d\n",appMPlayer.MenuItems[i].x,appMPlayer.MenuItems[i].y,appMPlayer.MenuItems[i].width,appMPlayer.MenuItems[i].height ); + if ( wgIsRect( x,y, + appMPlayer.MenuItems[i].x,appMPlayer.MenuItems[i].y, + appMPlayer.MenuItems[i].x+appMPlayer.MenuItems[i].width, + appMPlayer.MenuItems[i].y+appMPlayer.MenuItems[i].height ) ) + { + mplEventHandling( appMPlayer.MenuItems[i].msg,(float)w ); + } +} + +void mplMenuInit( void ) +{ + + if ( mplMenuIsInitialized || !appMPlayer.menuIsPresent || !appMPlayer.menuBase.Bitmap.Image ) return; + + appMPlayer.menuBase.x=0; + appMPlayer.menuBase.y=0; + + if ( ( mplMenuDrawBuffer = calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL ) + { +#ifdef DEBUG + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[menu.h] %s",MSGTR_NEMFMR ); +#endif + gtkMessageBox( GTK_MB_FATAL,MSGTR_NEMFMR ); + return; + } + + wsCreateWindow( &appMPlayer.menuWindow, + appMPlayer.menuBase.x,appMPlayer.menuBase.y,appMPlayer.menuBase.width,appMPlayer.menuBase.height, + wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsOverredirect|wsHideFrame|wsMaxSize|wsMinSize|wsHideWindow,"MPlayer menu" ); + + wsSetShape( &appMPlayer.menuWindow,appMPlayer.menuBase.Mask.Image ); + +#ifdef DEBUG + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[menu.h] menu: 0x%x\n",(int)appMPlayer.menuWindow.WindowID ); +#endif + + mplMenuIsInitialized=1; + appMPlayer.menuWindow.ReDraw=mplMenuDraw; +// appMPlayer.menuWindow.MouseHandler=mplMenuMouseHandle; +// appMPlayer.menuWindow.KeyHandler=mplMainKeyHandle; + mplMenuRender=1; wsPostRedisplay( &appMPlayer.menuWindow ); +} diff --git a/gui/mplayer/mw.c b/gui/mplayer/mw.c new file mode 100644 index 0000000000..48d9733cec --- /dev/null +++ b/gui/mplayer/mw.c @@ -0,0 +1,624 @@ + +// main window + +#include <stdlib.h> +#include <stdio.h> +#include <inttypes.h> +#include <sys/stat.h> +#include <unistd.h> + +#include "app.h" +#include "skin/font.h" +#include "skin/skin.h" +#include "wm/ws.h" + +#include "../config.h" +#include "../help_mp.h" +#include "../libvo/x11_common.h" +#include "../libvo/fastmemcpy.h" + +#include "../stream/stream.h" +#include "../mixer.h" +#include "../libvo/sub.h" +#include "../access_mpcontext.h" + +#include "../libmpdemux/demuxer.h" +#include "../libmpdemux/stheader.h" +#include "../codec-cfg.h" +#include "../m_option.h" +#include "../m_property.h" + +#define GUI_REDRAW_WAIT 375 + +#include "play.h" +#include "widgets.h" + +extern unsigned int GetTimerMS( void ); + +unsigned char * mplDrawBuffer = NULL; +int mplMainRender = 1; + +int mplMainAutoPlay = 0; +int mplMiddleMenu = 0; + +int mainVisible = 1; + +int boxMoved = 0; +int sx = 0,sy = 0; +int i,pot = 0; + +#include "common.h" + +void mplMainDraw( void ) +{ + + if ( appMPlayer.mainWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit ); + + if ( appMPlayer.mainWindow.Visible == wsWindowNotVisible || + !mainVisible ) return; +// !appMPlayer.mainWindow.Mapped ) return; + + if ( mplMainRender && appMPlayer.mainWindow.State == wsWindowExpose ) + { + btnModify( evSetMoviePosition,guiIntfStruct.Position ); + btnModify( evSetVolume,guiIntfStruct.Volume ); + + memcpy( mplDrawBuffer,appMPlayer.main.Bitmap.Image,appMPlayer.main.Bitmap.ImageSize ); + Render( &appMPlayer.mainWindow,appMPlayer.Items,appMPlayer.NumberOfItems,mplDrawBuffer,appMPlayer.main.Bitmap.ImageSize ); + mplMainRender=0; + } + wsPutImage( &appMPlayer.mainWindow ); +// XFlush( wsDisplay ); +} + +extern void exit_player(const char* how); +extern int vcd_track; +static unsigned last_redraw_time = 0; + +void mplEventHandling( int msg,float param ) +{ + int iparam = (int)param; + mixer_t *mixer = mpctx_get_mixer(guiIntfStruct.mpcontext); + + switch( msg ) + { +// --- user events + case evExit: + exit_player( "Exit" ); + break; + + case evPlayNetwork: + gfree( (void **)&guiIntfStruct.Subtitlename ); + gfree( (void **)&guiIntfStruct.AudioFile ); + guiIntfStruct.StreamType=STREAMTYPE_STREAM; + goto play; + case evSetURL: + gtkShow( evPlayNetwork,NULL ); + break; + + case evSetAudio: + if ( !guiIntfStruct.demuxer || audio_id == iparam ) break; + audio_id=iparam; + goto play; + + case evSetVideo: + if ( !guiIntfStruct.demuxer || video_id == iparam ) break; + video_id=iparam; + goto play; + + case evSetSubtitle: + mp_property_do("sub",M_PROPERTY_SET,&iparam,guiIntfStruct.mpcontext); + break; + +#ifdef HAVE_VCD + case evSetVCDTrack: + guiIntfStruct.Track=iparam; + case evPlayVCD: + gtkSet( gtkClearStruct,0,(void *)guiALL ); + guiIntfStruct.StreamType=STREAMTYPE_VCD; + goto play; +#endif +#ifdef USE_DVDREAD + case evPlayDVD: + guiIntfStruct.DVD.current_title=1; + guiIntfStruct.DVD.current_chapter=1; + guiIntfStruct.DVD.current_angle=1; +play_dvd_2: + gtkSet( gtkClearStruct,0,(void *)(guiALL - guiDVD) ); + guiIntfStruct.StreamType=STREAMTYPE_DVD; + goto play; +#endif + case evPlay: + case evPlaySwitchToPause: +play: + + if ( ( msg == evPlaySwitchToPause )&&( guiIntfStruct.Playing == 2 ) ) goto NoPause; + + if ( gtkSet( gtkGetCurrPlItem,0,NULL ) &&( guiIntfStruct.StreamType == STREAMTYPE_FILE ) ) + { + plItem * next = gtkSet( gtkGetCurrPlItem,0,NULL ); + plLastPlayed=next; + mplSetFileName( next->path,next->name,STREAMTYPE_FILE ); + } + + switch ( guiIntfStruct.StreamType ) + { + case STREAMTYPE_STREAM: + case STREAMTYPE_FILE: + gtkSet( gtkClearStruct,0,(void *)(guiALL - guiFilenames) ); + break; +#ifdef HAVE_VCD + case STREAMTYPE_VCD: + gtkSet( gtkClearStruct,0,(void *)(guiALL - guiVCD - guiFilenames) ); + if ( !cdrom_device ) cdrom_device=gstrdup( DEFAULT_CDROM_DEVICE ); + mplSetFileName( NULL,cdrom_device,STREAMTYPE_VCD ); + if ( guiIntfStruct.Playing != 2 ) + { + if ( !guiIntfStruct.Track ) + { + if ( guiIntfStruct.VCDTracks > 1 ) guiIntfStruct.Track=2; + else guiIntfStruct.Track=1; + } + guiIntfStruct.DiskChanged=1; + } + break; +#endif +#ifdef USE_DVDREAD + case STREAMTYPE_DVD: + gtkSet( gtkClearStruct,0,(void *)(guiALL - guiDVD - guiFilenames) ); + if ( !dvd_device ) dvd_device=gstrdup( DEFAULT_DVD_DEVICE ); + mplSetFileName( NULL,dvd_device,STREAMTYPE_DVD ); + if ( guiIntfStruct.Playing != 2 ) + { + guiIntfStruct.Title=guiIntfStruct.DVD.current_title; + guiIntfStruct.Chapter=guiIntfStruct.DVD.current_chapter; + guiIntfStruct.Angle=guiIntfStruct.DVD.current_angle; + guiIntfStruct.DiskChanged=1; + } + break; +#endif + } + guiIntfStruct.NewPlay=1; + mplPlay(); + break; +#ifdef USE_DVDREAD + case evSetDVDSubtitle: + dvdsub_id=iparam; + goto play_dvd_2; + break; + case evSetDVDAudio: + audio_id=iparam; + goto play_dvd_2; + break; + case evSetDVDChapter: + guiIntfStruct.DVD.current_chapter=iparam; + goto play_dvd_2; + break; + case evSetDVDTitle: + guiIntfStruct.DVD.current_title=iparam; + guiIntfStruct.DVD.current_chapter=1; + guiIntfStruct.DVD.current_angle=1; + goto play_dvd_2; + break; +#endif + + case evPause: + case evPauseSwitchToPlay: +NoPause: + mplPause(); + break; + + case evStop: + guiIntfStruct.Playing=guiSetStop; + mplState(); + guiIntfStruct.NoWindow=False; + break; + + case evLoadPlay: + mplMainAutoPlay=1; +// guiIntfStruct.StreamType=STREAMTYPE_FILE; + case evLoad: + gtkSet( gtkDelPl,0,NULL ); + gtkShow( evLoad,NULL ); + break; + case evLoadSubtitle: gtkShow( evLoadSubtitle,NULL ); break; + case evDropSubtitle: + gfree( (void **)&guiIntfStruct.Subtitlename ); + guiLoadSubtitle( NULL ); + break; + case evLoadAudioFile: gtkShow( evLoadAudioFile,NULL ); break; + case evPrev: mplPrev(); break; + case evNext: mplNext(); break; + + case evPlayList: gtkShow( evPlayList,NULL ); break; + case evSkinBrowser: gtkShow( evSkinBrowser,skinName ); break; + case evAbout: gtkShow( evAbout,NULL ); break; + case evPreferences: gtkShow( evPreferences,NULL ); break; + case evEqualizer: gtkShow( evEqualizer,NULL ); break; + + case evForward10min: mplRelSeek( 600 ); break; + case evBackward10min: mplRelSeek( -600 );break; + case evForward1min: mplRelSeek( 60 ); break; + case evBackward1min: mplRelSeek( -60 ); break; + case evForward10sec: mplRelSeek( 10 ); break; + case evBackward10sec: mplRelSeek( -10 ); break; + case evSetMoviePosition: mplAbsSeek( param ); break; + + case evIncVolume: vo_x11_putkey( wsGrayMul ); break; + case evDecVolume: vo_x11_putkey( wsGrayDiv ); break; + case evMute: mixer_mute( mixer ); break; + + case evSetVolume: + guiIntfStruct.Volume=param; + goto set_volume; + case evSetBalance: + guiIntfStruct.Balance=param; +set_volume: + { + float l = guiIntfStruct.Volume * ( ( 100.0 - guiIntfStruct.Balance ) / 50.0 ); + float r = guiIntfStruct.Volume * ( ( guiIntfStruct.Balance ) / 50.0 ); + if ( l > guiIntfStruct.Volume ) l=guiIntfStruct.Volume; + if ( r > guiIntfStruct.Volume ) r=guiIntfStruct.Volume; +// printf( "!!! v: %.2f b: %.2f -> %.2f x %.2f\n",guiIntfStruct.Volume,guiIntfStruct.Balance,l,r ); + mixer_setvolume( mixer,l,r ); + } + if ( osd_level ) + { + osd_visible=(GetTimerMS() + 1000) | 1; + vo_osd_progbar_type=OSD_VOLUME; + vo_osd_progbar_value=( ( guiIntfStruct.Volume ) * 256.0 ) / 100.0; + vo_osd_changed( OSDTYPE_PROGBAR ); + } + break; + + + case evIconify: + switch ( iparam ) + { + case 0: wsIconify( appMPlayer.mainWindow ); break; + case 1: wsIconify( appMPlayer.subWindow ); break; + } + break; + case evHalfSize: + btnSet( evFullScreen,btnReleased ); + if ( guiIntfStruct.Playing ) + { + if ( appMPlayer.subWindow.isFullScreen ) + { + mplFullScreen(); + } + wsResizeWindow( &appMPlayer.subWindow, guiIntfStruct.MovieWidth / 2, guiIntfStruct.MovieHeight / 2 ); + wsMoveWindow( &appMPlayer.subWindow, 0, + ( wsMaxX - guiIntfStruct.MovieWidth/2 )/2 + wsOrgX, + ( wsMaxY - guiIntfStruct.MovieHeight/2 )/2 + wsOrgY ); + } + break; + case evDoubleSize: + btnSet( evFullScreen,btnReleased ); + if ( guiIntfStruct.Playing ) + { + if ( appMPlayer.subWindow.isFullScreen ) + { + mplFullScreen(); + } + wsResizeWindow( &appMPlayer.subWindow, guiIntfStruct.MovieWidth * 2, guiIntfStruct.MovieHeight * 2 ); + wsMoveWindow( &appMPlayer.subWindow, 0, + ( wsMaxX - guiIntfStruct.MovieWidth*2 )/2 + wsOrgX, + ( wsMaxY - guiIntfStruct.MovieHeight*2 )/2 + wsOrgY ); + } + break; + case evNormalSize: + btnSet( evFullScreen,btnReleased ); + if ( guiIntfStruct.Playing ) + { + if ( appMPlayer.subWindow.isFullScreen ) + { + mplFullScreen(); + } + wsResizeWindow( &appMPlayer.subWindow, guiIntfStruct.MovieWidth, guiIntfStruct.MovieHeight ); + wsMoveWindow( &appMPlayer.subWindow, 0, + ( wsMaxX - guiIntfStruct.MovieWidth )/2 + wsOrgX, + ( wsMaxY - guiIntfStruct.MovieHeight )/2 + wsOrgY ); + break; + } else if ( !appMPlayer.subWindow.isFullScreen ) break; + case evFullScreen: + if ( !guiIntfStruct.Playing && !gtkShowVideoWindow ) break; + mplFullScreen(); + if ( appMPlayer.subWindow.isFullScreen ) btnSet( evFullScreen,btnPressed ); + else btnSet( evFullScreen,btnReleased ); + break; + + case evSetAspect: + switch ( iparam ) + { + case 2: movie_aspect=16.0f / 9.0f; break; + case 3: movie_aspect=4.0f / 3.0f; break; + case 4: movie_aspect=2.35; break; + case 1: + default: movie_aspect=-1; + } + wsClearWindow( appMPlayer.subWindow ); +#ifdef USE_DVDREAD + if ( guiIntfStruct.StreamType == STREAMTYPE_DVD || guiIntfStruct.StreamType == STREAMTYPE_VCD ) goto play_dvd_2; + else +#endif + guiIntfStruct.NewPlay=1; + break; + +// --- timer events + case evRedraw: + { + unsigned now = GetTimerMS(); + extern int mplPBFade; + if ((now > last_redraw_time) && + (now < last_redraw_time + GUI_REDRAW_WAIT) && + !mplPBFade) + break; + last_redraw_time = now; + } + mplMainRender=1; + wsPostRedisplay( &appMPlayer.mainWindow ); + wsPostRedisplay( &appMPlayer.barWindow ); + break; +// --- system events +#ifdef MP_DEBUG + case evNone: + mp_msg( MSGT_GPLAYER,MSGL_STATUS,"[mw] event none received.\n" ); + break; + default: + mp_msg( MSGT_GPLAYER,MSGL_STATUS,"[mw] unknown event received ( %d,%.2f ).\n",msg,param ); + break; +#endif + } +} + +#define itPLMButton (itNULL - 1) +#define itPRMButton (itNULL - 2) + +void mplMainMouseHandle( int Button,int X,int Y,int RX,int RY ) +{ + static int itemtype = 0; + int i; + wItem * item = NULL; + float value = 0.0f; + + static int SelectedItem = -1; + int currentselected = -1; + + for ( i=0;i < appMPlayer.NumberOfItems + 1;i++ ) + if ( ( appMPlayer.Items[i].pressed != btnDisabled )&& + ( 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 ) ) ) + { currentselected=i; break; } + + switch ( Button ) + { + case wsPMMouseButton: + gtkShow( evHidePopUpMenu,NULL ); + mplShowMenu( RX,RY ); + itemtype=itPRMButton; + break; + case wsRMMouseButton: + mplHideMenu( RX,RY,0 ); + break; + + case wsPLMouseButton: + gtkShow( evHidePopUpMenu,NULL ); + sx=X; sy=Y; boxMoved=1; itemtype=itPLMButton; + SelectedItem=currentselected; + if ( SelectedItem == -1 ) break; + boxMoved=0; + item=&appMPlayer.Items[SelectedItem]; + itemtype=item->type; + item->pressed=btnPressed; + switch( item->type ) + { + case itButton: + if ( ( SelectedItem > -1 ) && + ( ( ( item->msg == evPlaySwitchToPause && item->msg == evPauseSwitchToPlay ) ) || + ( ( item->msg == evPauseSwitchToPlay && item->msg == evPlaySwitchToPause ) ) ) ) + { item->pressed=btnDisabled; } + break; + } + break; + case wsRLMouseButton: + boxMoved=0; + item=&appMPlayer.Items[SelectedItem]; + item->pressed=btnReleased; + SelectedItem=-1; + if ( currentselected == - 1 ) { itemtype=0; break; } + value=0; + switch( itemtype ) + { + case itPotmeter: + case itHPotmeter: + btnModify( item->msg,(float)( X - item->x ) / item->width * 100.0f ); + mplEventHandling( item->msg,item->value ); + value=item->value; + break; + case itVPotmeter: + btnModify( item->msg, ( 1. - (float)( Y - item->y ) / item->height) * 100.0f ); + mplEventHandling( item->msg,item->value ); + value=item->value; + break; + } + mplEventHandling( item->msg,value ); + itemtype=0; + break; + + case wsRRMouseButton: + gtkShow( evShowPopUpMenu,NULL ); + break; + +// --- rolled mouse ... de szar :))) + case wsP5MouseButton: value=-2.5f; goto rollerhandled; + case wsP4MouseButton: value= 2.5f; +rollerhandled: + item=&appMPlayer.Items[currentselected]; + if ( ( item->type == itHPotmeter )||( item->type == itVPotmeter )||( item->type == itPotmeter ) ) + { + item->value+=value; + btnModify( item->msg,item->value ); + mplEventHandling( item->msg,item->value ); + } + break; + +// --- moving + case wsMoveMouse: + item=&appMPlayer.Items[SelectedItem]; + switch ( itemtype ) + { + case itPLMButton: + wsMoveWindow( &appMPlayer.mainWindow,False,RX - abs( sx ),RY - abs( sy ) ); + mplMainRender=0; + break; + case itPRMButton: + mplMenuMouseHandle( X,Y,RX,RY ); + break; + case itPotmeter: + item->value=(float)( X - item->x ) / item->width * 100.0f; + goto potihandled; + case itVPotmeter: + item->value=(1. - (float)( Y - item->y ) / item->height) * 100.0f; + goto potihandled; + case itHPotmeter: + item->value=(float)( X - item->x ) / item->width * 100.0f; +potihandled: + if ( item->value > 100.0f ) item->value=100.0f; + if ( item->value < 0.0f ) item->value=0.0f; + mplEventHandling( item->msg,item->value ); + break; + } + break; + } +} + +int keyPressed = 0; + +void mplMainKeyHandle( int KeyCode,int Type,int Key ) +{ + int msg = evNone; + + if ( Type != wsKeyPressed ) return; + + if ( !Key ) + { + switch ( KeyCode ) + { + case wsXFMMPrev: msg=evPrev; break; + case wsXFMMStop: msg=evStop; break; + case wsXFMMPlay: msg=evPlaySwitchToPause; break; + case wsXFMMNext: msg=evNext; break; + case wsXFMMVolUp: msg=evIncVolume; break; + case wsXFMMVolDown: msg=evDecVolume; break; + case wsXFMMMute: msg=evMute; break; + } + } + else + { + switch ( Key ) + { + case wsEnter: msg=evPlay; break; + case wsXF86LowerVolume: msg=evDecVolume; break; + case wsXF86RaiseVolume: msg=evIncVolume; break; + case wsXF86Mute: msg=evMute; break; + case wsXF86Play: msg=evPlaySwitchToPause; break; + case wsXF86Stop: msg=evStop; break; + case wsXF86Prev: msg=evPrev; break; + case wsXF86Next: msg=evNext; break; + case wsXF86Media: msg=evLoad; break; + case wsEscape: + if ( appMPlayer.subWindow.isFullScreen ) + { + if ( guiIntfStruct.event_struct ) ((XEvent *)guiIntfStruct.event_struct)->type=None; + mplEventHandling( evNormalSize,0 ); + return; + } + default: vo_x11_putkey( Key ); return; + } + } + if ( msg != evNone ) mplEventHandling( msg,0 ); +} + +/* this will be used to handle Drag&Drop files */ +void mplDandDHandler(int num,char** files) +{ + struct stat buf; + int f = 0; + + char* subtitles = NULL; + char* filename = NULL; + + if (num <= 0) + return; + + + /* now fill it with new items */ + for(f=0; f < num; f++){ + char* str = strdup( files[f] ); + plItem* item; + +#ifdef USE_ICONV + if ( strchr( str,'%' ) ) + { + char * tmp=gconvert_uri_to_filename( str ); + free( str ); str=tmp; + } +#endif + + if(stat(str,&buf) == 0 && S_ISDIR(buf.st_mode) == 0) { + /* this is not a directory so try to play it */ + mp_msg( MSGT_GPLAYER,MSGL_V,"Received D&D %s\n",str ); + + /* check if it is a subtitle file */ + { + char* ext = strrchr(str,'.'); + if (ext) { + static char supported[] = "utf/sub/srt/smi/rt//txt/ssa/aqt/"; + char* type; + int len; + if((len=strlen(++ext)) && (type=strstr(supported,ext)) &&\ + (type-supported)%4 == 0 && *(type+len) == '/'){ + /* handle subtitle file */ + gfree((void**)&subtitles); + subtitles = str; + continue; + } + } + } + + /* clear playlist */ + if (filename == NULL) { + filename = files[f]; + gtkSet(gtkDelPl,0,NULL); + } + + item = calloc(1,sizeof(plItem)); + + /* FIXME: decompose file name ? */ + /* yes -- Pontscho */ + if ( strrchr( str,'/' ) ) { + char * s = strrchr( str,'/' ); *s=0; s++; + item->name = gstrdup( s ); + item->path = gstrdup( str ); + } else { + item->name = strdup(str); + item->path = strdup(""); + } + gtkSet(gtkAddPlItem,0,(void*)item); + } else { + mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_NotAFile,str ); + } + free( str ); + } + + if (filename) { + mplSetFileName( NULL,filename,STREAMTYPE_FILE ); + if ( guiIntfStruct.Playing == 1 ) mplEventHandling( evStop,0 ); + mplEventHandling( evPlay,0 ); + } + if (subtitles) { + gfree((void**)&guiIntfStruct.Subtitlename); + guiIntfStruct.Subtitlename = subtitles; + guiLoadSubtitle(guiIntfStruct.Subtitlename); + } +} diff --git a/gui/mplayer/pb.c b/gui/mplayer/pb.c new file mode 100644 index 0000000000..14ea8d97cc --- /dev/null +++ b/gui/mplayer/pb.c @@ -0,0 +1,247 @@ + +// main window + +#include <stdlib.h> +#include <stdio.h> +#include <inttypes.h> +#include <sys/stat.h> +#include <unistd.h> + +#include "app.h" +#include "skin/font.h" +#include "skin/skin.h" +#include "wm/ws.h" + +#include "../config.h" +#include "../help_mp.h" +#include "../libvo/x11_common.h" +#include "../libvo/fastmemcpy.h" + +#include "../stream/stream.h" +#include "../mixer.h" +#include "../libvo/sub.h" + +#include "../libmpdemux/demuxer.h" +#include "../libmpdemux/stheader.h" +#include "../codec-cfg.h" + +#include "gmplayer.h" +#include "play.h" +#include "widgets.h" +#include "common.h" + +extern unsigned int GetTimerMS( void ); +extern unsigned int GetTimer( void ); + +unsigned char * mplPBDrawBuffer = NULL; +int mplPBVisible = 0; +int mplPBLength = 0; +int mplPBFade = 0; + +void mplPBDraw( void ) +{ + int x; + + if ( !appMPlayer.subWindow.isFullScreen ) return; + if ( !mplPBVisible || !appMPlayer.barIsPresent ) return; + +// appMPlayer.bar.x=( appMPlayer.subWindow.Width - appMPlayer.bar.width ) / 2; + switch( appMPlayer.bar.x ) + { + case -1: x=( appMPlayer.subWindow.Width - appMPlayer.bar.width ) / 2; break; + case -2: x=( appMPlayer.subWindow.Width - appMPlayer.bar.width ); break; + default: x=appMPlayer.bar.x; + } + + switch ( mplPBFade ) + { + case 1: // fade in + mplPBLength--; + if ( appMPlayer.subWindow.Height - appMPlayer.bar.height >= mplPBLength ) + { + mplPBLength=appMPlayer.subWindow.Height - appMPlayer.bar.height; + mplPBFade=0; + vo_mouse_autohide=0; + } + wsMoveWindow( &appMPlayer.barWindow,0,x,mplPBLength ); + break; + case 2: // fade out + mplPBLength+=10; + if ( mplPBLength > appMPlayer.subWindow.Height ) + { + mplPBLength=appMPlayer.subWindow.Height; + mplPBFade=mplPBVisible=0; + vo_mouse_autohide=1; + wsVisibleWindow( &appMPlayer.barWindow,wsHideWindow ); + return; + } + wsMoveWindow( &appMPlayer.barWindow,0,x,mplPBLength ); + break; + } + +// --- render + if ( appMPlayer.barWindow.State == wsWindowExpose ) + { + btnModify( evSetMoviePosition,guiIntfStruct.Position ); + btnModify( evSetVolume,guiIntfStruct.Volume ); + + vo_mouse_autohide=0; + + memcpy( mplPBDrawBuffer,appMPlayer.bar.Bitmap.Image,appMPlayer.bar.Bitmap.ImageSize ); + Render( &appMPlayer.barWindow,appMPlayer.barItems,appMPlayer.NumberOfBarItems,mplPBDrawBuffer,appMPlayer.bar.Bitmap.ImageSize ); + wsConvert( &appMPlayer.barWindow,mplPBDrawBuffer,appMPlayer.bar.Bitmap.ImageSize ); + } + wsPutImage( &appMPlayer.barWindow ); +} + +#define itPLMButton (itNULL - 1) +#define itPRMButton (itNULL - 2) + +void mplPBMouseHandle( int Button,int X,int Y,int RX,int RY ) +{ + static int itemtype = 0; + int i; + wItem * item = NULL; + float value = 0.0f; + + static int SelectedItem = -1; + int currentselected = -1; + + for ( i=0;i < appMPlayer.NumberOfBarItems + 1;i++ ) + if ( ( appMPlayer.barItems[i].pressed != btnDisabled )&& + ( 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 ) ) ) + { currentselected=i; break; } + + switch ( Button ) + { + case wsPMMouseButton: + gtkShow( evHidePopUpMenu,NULL ); + mplShowMenu( RX,RY ); + break; + case wsRMMouseButton: + mplHideMenu( RX,RY,0 ); + break; + case wsRRMouseButton: + gtkShow( evShowPopUpMenu,NULL ); + break; +// --- + case wsPLMouseButton: + gtkShow( evHidePopUpMenu,NULL ); + SelectedItem=currentselected; + if ( SelectedItem == -1 ) break; // yeees, i'm move the fucking window + item=&appMPlayer.barItems[SelectedItem]; + itemtype=item->type; + item->pressed=btnPressed; + + switch( item->type ) + { + case itButton: + if ( ( SelectedItem > -1 ) && + ( ( ( item->msg == evPlaySwitchToPause && item->msg == evPauseSwitchToPlay ) ) || + ( ( item->msg == evPauseSwitchToPlay && item->msg == evPlaySwitchToPause ) ) ) ) + { item->pressed=btnDisabled; } + break; + } + + break; + case wsRLMouseButton: + item=&appMPlayer.barItems[SelectedItem]; + item->pressed=btnReleased; + SelectedItem=-1; + if ( currentselected == - 1 ) { itemtype=0; break; } + value=0; + + switch( itemtype ) + { + case itPotmeter: + case itHPotmeter: + btnModify( item->msg,(float)( X - item->x ) / item->width * 100.0f ); + mplEventHandling( item->msg,item->value ); + value=item->value; + break; + case itVPotmeter: + btnModify( item->msg, ( 1. - (float)( Y - item->y ) / item->height) * 100.0f ); + mplEventHandling( item->msg,item->value ); + value=item->value; + break; + } + mplEventHandling( item->msg,value ); + + itemtype=0; + break; +// --- + case wsP5MouseButton: value=-2.5f; goto rollerhandled; + case wsP4MouseButton: value= 2.5f; +rollerhandled: + item=&appMPlayer.barItems[currentselected]; + if ( ( item->type == itHPotmeter )||( item->type == itVPotmeter )||( item->type == itPotmeter ) ) + { + item->value+=value; + btnModify( item->msg,item->value ); + mplEventHandling( item->msg,item->value ); + } + break; +// --- + case wsMoveMouse: + item=&appMPlayer.barItems[SelectedItem]; + switch ( itemtype ) + { + case itPRMButton: + mplMenuMouseHandle( X,Y,RX,RY ); + break; + case itPotmeter: + item->value=(float)( X - item->x ) / item->width * 100.0f; + goto potihandled; + case itVPotmeter: + item->value=(1. - (float)( Y - item->y ) / item->height) * 100.0f; + goto potihandled; + case itHPotmeter: + item->value=(float)( X - item->x ) / item->width * 100.0f; +potihandled: + if ( item->value > 100.0f ) item->value=100.0f; + if ( item->value < 0.0f ) item->value=0.0f; + mplEventHandling( item->msg,item->value ); + break; + } + break; + } +} + +void mplPBShow( int x, int y ) +{ + if ( !appMPlayer.barIsPresent || !gtkEnablePlayBar ) return; + if ( !appMPlayer.subWindow.isFullScreen ) return; + + if ( y > appMPlayer.subWindow.Height - appMPlayer.bar.height ) + { + if ( !mplPBFade ) wsVisibleWindow( &appMPlayer.barWindow,wsShowWindow ); + mplPBFade=1; mplPBVisible=1; wsPostRedisplay( &appMPlayer.barWindow ); + } + else if ( !mplPBFade ) mplPBFade=2; +} + +void mplPBInit( void ) +{ + if ( !appMPlayer.barIsPresent ) return; + + gfree( (void**)&mplPBDrawBuffer ); + + if ( ( mplPBDrawBuffer = malloc( appMPlayer.bar.Bitmap.ImageSize ) ) == NULL ) + { + mp_msg( MSGT_GPLAYER,MSGL_FATAL,MSGTR_NEMDB ); + exit( 0 ); + } + + appMPlayer.barWindow.Parent=appMPlayer.subWindow.WindowID; + wsCreateWindow( &appMPlayer.barWindow, + appMPlayer.bar.x,appMPlayer.bar.y,appMPlayer.bar.width,appMPlayer.bar.height, + wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsHideFrame|wsHideWindow,"PlayBar" ); + + wsSetShape( &appMPlayer.barWindow,appMPlayer.bar.Mask.Image ); + + appMPlayer.barWindow.ReDraw=(void *)mplPBDraw; + appMPlayer.barWindow.MouseHandler=mplPBMouseHandle; + appMPlayer.barWindow.KeyHandler=mplMainKeyHandle; + + mplPBLength=appMPlayer.subWindow.Height; +} diff --git a/gui/mplayer/pixmaps/MPlayer_mini.xpm b/gui/mplayer/pixmaps/MPlayer_mini.xpm new file mode 100644 index 0000000000..c9de6f759f --- /dev/null +++ b/gui/mplayer/pixmaps/MPlayer_mini.xpm @@ -0,0 +1,638 @@ +/* XPM */ +static char * MPlayer_mini_xpm[] = { +"146 121 514 2", +" c None", +". c #2C2256", +"+ c #2C2257", +"@ c #251B4D", +"# c #2E2655", +"$ c #383063", +"% c #382F66", +"& c #382E6A", +"* c #392D6D", +"= c #392C71", +"- c #392C74", +"; c #392B76", +"> c #392C72", +", c #392D6F", +"' c #392E6A", +") c #251B4F", +"! c #2C2159", +"~ c #3A2F6B", +"{ c #3A2D75", +"] c #392B78", +"^ c #392B7A", +"/ c #392A7B", +"( c #382A79", +"_ c #382E6D", +": c #2C2457", +"< c #2B2450", +"[ c #342C5D", +"} c #392F64", +"| c #392A7D", +"1 c #3A2B7E", +"2 c #392A7F", +"3 c #382B7B", +"4 c #382C74", +"5 c #342965", +"6 c #3A2E6C", +"7 c #382B70", +"8 c #38297C", +"9 c #392D6B", +"0 c #251C49", +"a c #2B224F", +"b c #32285A", +"c c #392E68", +"d c #3A2D73", +"e c #3A2E6E", +"f c #2B2257", +"g c #322761", +"h c #2C234E", +"i c #2F2655", +"j c #382D71", +"k c #3B297D", +"l c #382B73", +"m c #382A77", +"n c #3A287C", +"o c #382D72", +"p c #2B2356", +"q c #392F61", +"r c #392E66", +"s c #382B7A", +"t c #382E6B", +"u c #241A4E", +"v c #362B67", +"w c #312958", +"x c #352B5F", +"y c #261C50", +"z c #3A2E70", +"A c #38297E", +"B c #382B7D", +"C c #3A2F69", +"D c #2B2740", +"E c #30294A", +"F c #393156", +"G c #38315A", +"H c #38315D", +"I c #392F63", +"J c #3A2D72", +"K c #383E3E", +"L c #686868", +"M c #878787", +"N c #9F9EA3", +"O c #9B99A4", +"P c #9B98A9", +"Q c #9C97AB", +"R c #9D98AC", +"S c #9B98AD", +"T c #9C97AE", +"U c #9C96B0", +"V c #9B97B0", +"W c #9B97B2", +"X c #9C95B6", +"Y c #9B96B6", +"Z c #9B95B7", +"` c #9C94B9", +" . c #9B95B9", +".. c #9C94BB", +"+. c #9B95BB", +"@. c #716A94", +"#. c #726998", +"$. c #106A8C", +"%. c #23A5D6", +"&. c #1E4D5F", +"*. c #365E6A", +"=. c #6E878C", +"-. c #EDFBFC", +";. c #FBFFFF", +">. c #FFFFFF", +",. c #FFFEFF", +"'. c #FFFDFF", +"). c #FFFCFF", +"!. c #FFFAFF", +"~. c #FFF9FF", +"{. c #C0B9E3", +"]. c #726A9D", +"^. c #379FC2", +"/. c #599DB4", +"(. c #C4ECF8", +"_. c #F2FFFF", +":. c #FCFFFF", +"<. c #FEFFFF", +"[. c #EDE9FF", +"}. c #382C6A", +"|. c #2F245E", +"1. c #30A1CB", +"2. c #1FA6D6", +"3. c #1CA8DB", +"4. c #23A6D4", +"5. c #4AB1D4", +"6. c #CAFFFF", +"7. c #E9FFFF", +"8. c #F8FFFF", +"9. c #FEFEFE", +"0. c #C1B9E2", +"a. c #2AA3CE", +"b. c #20A7D7", +"c. c #18A9DE", +"d. c #13AAE1", +"e. c #6FC2E0", +"f. c #DCFFFF", +"g. c #EDFFFF", +"h. c #F7FFFF", +"i. c #FFFFFD", +"j. c #DFDAF8", +"k. c #382F64", +"l. c #257B9C", +"m. c #11ACE4", +"n. c #0EADE7", +"o. c #12ADE5", +"p. c #47B1D8", +"q. c #F4FFFF", +"r. c #DFD9FD", +"s. c #383258", +"t. c #1B7EA5", +"u. c #22A6D7", +"v. c #15AAE2", +"w. c #0DADE7", +"x. c #0DADE9", +"y. c #19A9DD", +"z. c #3CA7CB", +"A. c #BFFFFF", +"B. c #EBFFFF", +"C. c #FEFFFD", +"D. c #C0BDCE", +"E. c #277C9B", +"F. c #10ACE7", +"G. c #0EAEE8", +"H. c #10ACE5", +"I. c #25A5D4", +"J. c #8FD9F2", +"K. c #E4FFFF", +"L. c #FEFEFF", +"M. c #87868C", +"N. c #015778", +"O. c #26A5D2", +"P. c #0BAEE7", +"Q. c #17AADE", +"R. c #44B1D8", +"S. c #202022", +"T. c #2EA1CD", +"U. c #14ABE2", +"V. c #0BAEE9", +"W. c #22A4D5", +"X. c #83DDFF", +"Y. c #33A0C9", +"Z. c #BCFFFF", +"`. c #EEFFFF", +" + c #CDCDCF", +".+ c #0BADEB", +"++ c #50AED2", +"@+ c #D6FFFF", +"#+ c #1FA7D9", +"$+ c #6EC3E2", +"%+ c #DDFFFF", +"&+ c #FFFDFE", +"*+ c #1EA8D9", +"=+ c #1FA7D7", +"-+ c #72C1E0", +";+ c #E2FFFF", +">+ c #F5FFFF", +",+ c #0CAFEA", +"'+ c #75C2DE", +")+ c #E3FFFF", +"!+ c #002F41", +"~+ c #28A5D3", +"{+ c #22A6D6", +"]+ c #91D9F2", +"^+ c #E7FFFF", +"/+ c #94D7F1", +"(+ c #EAFFFF", +"_+ c #29A4D0", +":+ c #0AAFE9", +"<+ c #2CA3CE", +"[+ c #FEFEFC", +"}+ c #F0FFFF", +"|+ c #12ACE2", +"1+ c #94D8EF", +"2+ c #12ABE4", +"3+ c #E8FFFF", +"4+ c #E6FFFF", +"5+ c #17AAE0", +"6+ c #1BA8DD", +"7+ c #E0FFFF", +"8+ c #1EA7DB", +"9+ c #20A6D9", +"0+ c #2AA3D0", +"a+ c #92D8F1", +"b+ c #FFFBFF", +"c+ c #9B97AE", +"d+ c #9A94B6", +"e+ c #B1ADC6", +"f+ c #B1AEC1", +"g+ c #9B93B8", +"h+ c #CECAE3", +"i+ c #DFDFDF", +"j+ c #BBBBBB", +"k+ c #BCBCBC", +"l+ c #9F9F9F", +"m+ c #15ABE0", +"n+ c #EFE9FF", +"o+ c #39305B", +"p+ c #F3F0FF", +"q+ c #CFC8EA", +"r+ c #716B8F", +"s+ c #382C6E", +"t+ c #9B94BD", +"u+ c #4F4F4F", +"v+ c #000000", +"w+ c #676767", +"x+ c #FEFCFF", +"y+ c #CFC7EC", +"z+ c #3A2C77", +"A+ c #382D6F", +"B+ c #B1ACCC", +"C+ c #716799", +"D+ c #716A96", +"E+ c #3A2C79", +"F+ c #3C3C3C", +"G+ c #94D7F2", +"H+ c #9C93C0", +"I+ c #382B71", +"J+ c #F3EFFF", +"K+ c #382C6C", +"L+ c #CDC9E2", +"M+ c #C1BCDA", +"N+ c #3D3D3D", +"O+ c #29A2CD", +"P+ c #95D7EF", +"Q+ c #F9FFFF", +"R+ c #72689C", +"S+ c #3A2C7B", +"T+ c #EEE8FF", +"U+ c #B1ABCD", +"V+ c #B1ACCA", +"W+ c #CFC6F5", +"X+ c #D0C8ED", +"Y+ c #B2A9D6", +"Z+ c #7267A1", +"`+ c #716A93", +" @ c #0AADE8", +".@ c #24A4D3", +"+@ c #B6F0FF", +"@@ c #7368A2", +"#@ c #38297A", +"$@ c #9C93C2", +"%@ c #38305F", +"&@ c #382A7F", +"*@ c #EEE9FF", +"=@ c #CECED0", +"-@ c #B8EFFF", +";@ c #382D69", +">@ c #3A2B7C", +",@ c #CEC7F0", +"'@ c #FEFDFF", +")@ c #FFF8FF", +"!@ c #9F9FA1", +"~@ c #CFCFCF", +"{@ c #E0E0E0", +"]@ c #EEEEEE", +"^@ c #CECECE", +"/@ c #EEEBFF", +"(@ c #C1BCDC", +"_@ c #72679F", +":@ c #726A99", +"<@ c #202020", +"[@ c #505050", +"}@ c #010100", +"|@ c #CECAE5", +"1@ c #7265AD", +"2@ c #716998", +"3@ c #F3ECFF", +"4@ c #383061", +"5@ c #CEC8EE", +"6@ c #CFCBE6", +"7@ c #B1ABCF", +"8@ c #71699A", +"9@ c #726994", +"0@ c #1F1F1F", +"a@ c #EFEFEF", +"b@ c #D0C5FF", +"c@ c #9C90D2", +"d@ c #CEC5FE", +"e@ c #372D69", +"f@ c #010101", +"g@ c #888888", +"h@ c #27A6D3", +"i@ c #B9F0FF", +"j@ c #7266A6", +"k@ c #FFF7FF", +"l@ c #39305F", +"m@ c #9C91CB", +"n@ c #CEC6F7", +"o@ c #BDBDBD", +"p@ c #68686A", +"q@ c #000002", +"r@ c #868686", +"s@ c #F4EBFF", +"t@ c #B2AAD3", +"u@ c #9C96B8", +"v@ c #372F62", +"w@ c #9C92C4", +"x@ c #F4F0FF", +"y@ c #726A93", +"z@ c #9C91C9", +"A@ c #9C93BE", +"B@ c #CEC6EB", +"C@ c #F4EEFF", +"D@ c #3E3E3E", +"E@ c #B2A9D4", +"F@ c #CEC8EC", +"G@ c #382F68", +"H@ c #D0C8EF", +"I@ c #72689D", +"J@ c #EDEDED", +"K@ c #9B94C0", +"L@ c #F3EDFF", +"M@ c #B2ABD5", +"N@ c #F3EEFF", +"O@ c #9B96B4", +"P@ c #CECBE0", +"Q@ c #EDEFEE", +"R@ c #27A4D0", +"S@ c #716B91", +"T@ c #716B8D", +"U@ c #C0BDD2", +"V@ c #2EA2CB", +"W@ c #26A4D4", +"X@ c #9D96B5", +"Y@ c #9B92BF", +"Z@ c #B2ABCD", +"`@ c #EEEBFE", +" # c #EEECF7", +".# c #9C95B7", +"+# c #CECBDC", +"@# c #9B92C1", +"## c #9D94C3", +"$# c #676769", +"%# c #9E9EA0", +"&# c #EEEEF0", +"*# c #19A9DE", +"=# c #1DA9DE", +"-# c #3D3D3F", +";# c #878789", +"># c #1DA7D8", +",# c #B7EEFF", +"'# c #27A4D2", +")# c #B7F0FF", +"!# c #BBEEFF", +"~# c #31A2CA", +"{# c #379FC4", +"]# c #3E9CBE", +"^# c #459AB9", +"/# c #4D97B2", +"(# c #5395AD", +"_# c #CECAE1", +":# c #DFDCF1", +"<# c #5993A7", +"[# c #F1FFFF", +"}# c #C0B9E2", +"|# c #72689A", +"1# c #382D67", +"2# c #F4EDFF", +"3# c #EEEAFF", +"4# c #3B2A7A", +"5# c #3B2A78", +"6# c #F2EDFF", +"7# c #CEC9E7", +"8# c #C0BADC", +"9# c #C1BADB", +"0# c #C0BBDB", +"a# c #F5EEFF", +"b# c #B2A9D8", +"c# c #9A93BD", +"d# c #716893", +"e# c #09AEE8", +"f# c #3A2A75", +"g# c #DFDEE3", +"h# c #C0BAE0", +"i# c #BAEFFF", +"j# c #382E63", +"k# c #BCBCBE", +"l# c #DFDBF6", +"m# c #B1F2FF", +"n# c #87868B", +"o# c #71C2DF", +"p# c #3E3D43", +"q# c #878785", +"r# c #EEEEEC", +"s# c #B1AAD3", +"t# c #D1FFFF", +"u# c #3EA6CB", +"v# c #FBFDFF", +"w# c #86DCFD", +"x# c #DFDCED", +"y# c #393164", +"z# c #B1AAD6", +"A# c #BCBCBA", +"B# c #342F71", +"C# c #C3CDF1", +"D# c #D0FFFF", +"E# c #37A8D4", +"F# c #383353", +"G# c #B1AAD4", +"H# c #372F60", +"I# c #73699E", +"J# c #322E78", +"K# c #6070A1", +"L# c #84B8DF", +"M# c #379EC9", +"N# c #71689D", +"O# c #322E7A", +"P# c #243772", +"Q# c #5D83B0", +"R# c #29607E", +"S# c #DFDBF4", +"T# c #332C79", +"U# c #293474", +"V# c #000A36", +"W# c #3C2C73", +"X# c #382C78", +"Y# c #342F6F", +"Z# c #FEFBFF", +"`# c #CEC8EA", +" $ c #9C94BD", +".$ c #3B2C71", +"+$ c #71669E", +"@$ c #D0C7F2", +"#$ c #71679C", +"$$ c #EEEDF3", +"%$ c #393067", +"&$ c #DFDFE1", +"*$ c #9D95BC", +"=$ c #3B2B72", +"-$ c #2F2557", +";$ c #342661", +">$ c #BBBDBC", +",$ c #241A4C", +"'$ c #71679B", +")$ c #3B297B", +"!$ c #3A2B80", +"~$ c #352B5D", +"{$ c #2C2350", +"]$ c #010000", +"^$ c #726996", +"/$ c #251B50", +"($ c #FDFFFE", +"_$ c #3B2B74", +":$ c #3B2B76", +"<$ c #2E2753", +"[$ c #322958", +"}$ c #2B244E", +"|$ c #E0D8FD", +"1$ c #32285D", +"2$ c #9D94C1", +"3$ c #2F2653", +"4$ c #393065", +"5$ c #382A75", +"6$ c #EFE7FF", +"7$ c #2D2355", +"8$ c #32275F", +"9$ c #342C5B", +"0$ c #CEC9E9", +"a$ c #EFE8FF", +"b$ c #241C4B", +"c$ c #2F255A", +"d$ c #352A62", +"e$ c #2E2659", +"f$ c #E0D9FB", +"g$ c #3A3065", +"h$ c #342B62", +"i$ c #32285C", +"j$ c #342C5F", +"k$ c #2C2254", +"l$ c #382D65", +"m$ c #372E63", +"n$ c #332B5E", +"o$ c #241C4D", +" . + + @ ", +" # $ % & * = - ; ; > , ' $ ", +" ) ! ~ * , , = = > { ; ; ] ^ ^ / / ( ^ ] - = _ : ", +" < [ } ' , > - ] / | | | | | | | | | | | 1 | | | 2 2 | | 3 4 % ", +" @ ! 5 6 * , 7 = > - - ; ] ^ ^ / | | | | | | | | | | | | | | | 8 | 8 | 1 | ^ ; 9 0 ", +" a b } c 9 , d ; / | | | | | | | 8 | 1 | | | | | | | | 1 | | 8 | | | | | | | | | | | | | | ] e 0 ", +" f g 9 * , = = > - - ; ] ^ ^ / | | | | | | | | | | | | 2 2 | | 2 2 | | | | | | | | / / | | | | | | | | 2 / ] 9 ", +" h i $ % ' * j 4 ^ / k k | | | | | | 2 2 | | 2 2 | | | | | | | | | | 2 2 | | 2 2 | | | | | | | | / / | | | | | | | | 2 2 | - % ", +" @ ! ' 9 * , = > > l ; ; m ^ ^ / | k n | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ^ o p ", +" < q r 9 , , > ; ^ | | | | | | | | | 8 | | 8 | k k | 1 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | / s t ", +" u ! v 9 * , , = > - ; ] ^ ^ ^ / | | 2 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | / = ", +" h w $ r 9 , > ] ^ / | | | | | | | 2 2 8 | | | 2 2 | | | | 1 | 8 | | 1 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - x ", +" y ! g 9 * , z = > > - ; ] m ^ / / | | | | | | | | | | 8 | | | 2 A | | B B | | | | | | | | | | 8 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ; C ", +" D E F G H I r ' 9 , = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 7 = j j = = = = = = = = = = = J = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = > > - ] ^ / | | ] * ", +" K L M N O P Q R S S T U V W X X Y Z ` ` . .` ` . ..... . ..... . .` ` . .` ` . .` ` . .` ` . . . . . ..... .` ` ` ` .` ` ` ` ` ` . .` ` . .` ` . .` ` ` ` ` ` . .` ` . .` ` . .` ` ` ` ` ` . .` ..+.@.#.} t o ^ | / ] = ", +" $.%.&.*.=.-.;.>.>.,.'.'.).).'.'.).).'.'.).).'.'.).).'.'.).).).).).).'.'.).).'.'.).'.'.'.'.).'.'.).).'.'.).).'.'.'.'.'.'.).).'.'.).).'.'.).).).).).).'.'.).).'.'.).).'.'.).).).).).).'.'.).).'.'.).).'.'.).).).).).).'.'.).).).).!.~.{.].9 = ; ] - + ", +" $.%.%.%.^./.(._.:.<.>.>.>.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.'.'.).[.@.}.- ] |. ", +" $.%.1.2.3.4.5.6.7.8.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.).0.c > c ", +" $.a.b.c.d.%.e.f.g.h.:.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.'.j.k.$ ", +" l.4.m.n.o.3.p.f.q.;.<.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.'.r.s. ", +" t.u.v.w.x.y.z.A.B.;.<.>.>.>.>.>.>.>.>.i.>.>.>.>.>.>.>.>.>.>.C.C.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.>.>.>.>.>.>.>.9.,.'.D. ", +" E.u.F.w.G.H.I.J.K.h.>.>.>.>.9.>.>.L.>.>.i.>.>.>.>.>.>.>.>.>.>.C.C.>.>.>.>.>.>.>.>.i.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.,.M. ", +" N.O.v.w.P.H.Q.R.f.h.:.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.>.>.S. ", +" n.T.U.n.V.P.d.W.X.7.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.i.>.M ", +" n.n.n.x.V.V.c.Y.Z.`.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.<.<.>.>.>. + ", +" n.n.n..+V.V.V.3.++@+_.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.<.<.>.>.>.>. ", +" n.n.U.V.V.V.V.#+$+%+q.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.&+,.>.>.*+ ", +" n.n.H.V.V.V.V.=+-+;+>+>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.,.>.>.*+ ", +" n.n.w.V.V.V.V.=+-+;+>+>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.*+ ", +" n.n.,+V.V.V.V.b.'+)+h.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.:.*+ ", +"!+~+V.V.V.V.V.V.{+]+^+8.>.,.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.8.*+ ", +"!+O.V.V.V.V.V.V.{+/+(+8.>.,.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>+*+ ", +" _+,+:+:+V.V.V.{+/+(+8.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.i.>._.*+ ", +" <+n.V.:+V.V.V.{+/+(+8.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.[+i.>.}+*+ ", +" <+|+w.:+V.V.V.{+1+(+8.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.`.n.*+ ", +" <+y.H.:+V.V.V.{+1+(+8.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.B.n.*+ ", +" n.#+2+V.V.V.V.{+/+(+8.>.>.>.>.>.,.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.<.<.>.>.9.3+n.*+ ", +" n.<+U.V.V.V.V.{+/+(+8.>.>.>.>.>.,.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.<.<.>.>.>.4+n.*+ ", +" n.<+5+:+V.V.V.{+/+(+8.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.>.K.n.*+ ", +" <+c.:+V.V.V.{+/+(+8.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.)+n.*+ ", +" <+6+V.V.P.V.{+/+(+8.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.>.>.<.7+n.*+ ", +" <+8+V.V.P.V.{+/+(+8.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.<.7+n.n.*+ ", +" <+9+V.V.V.V.{+/+(+h.<.>.>.>.>.<.<.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.7+n.n.*+ ", +" n.u.V.V.V.V.{+/+(+h.<.>.>.>.>.<.<.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.7+0+n.*+ ", +" n.<+.+V.V.V.{+/+(+8.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.>.7+0+n.*+ ", +" n.<+.+V.V.V.{+a+(+8.i.>.>.>.>.>.>.>.>.>.>.,.,.,.>.>.>.>.>.>.>.>.>.,.,.,.,.>.>.>.>.>.>.,.,.,.,.,.,.,.,.>.>.>.>.>.>.>.>.>.>.>.>.i.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.;+0+n.*+ ", +" <+x.V.V.:+{+a+(+8.>.>.>.>.>.>.>.>.>.,.,.'.'.'.,.,.>.>.>.>.>.,.,.'.'.'.'.,.>.>.>.,.,.).).b+).'.'.'.'.,.>.>.>.>.>.i.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.>.>.>.9.>.9.>.>.>.>.>.>.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.;+0+n.*+ ", +" <+H.w.V.:+{+a+(+8.>.>.>.>.>.>.>.>.,.'.c+Y d+Z e+'.>.>.>.>.,.).V Y Z Z e+,.9.>.,.'.f+X g+` ` . . .Y h+).'.,.>.>.[+i.i+j+k+l+M M l+>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.;+0+n.n.n. ", +" <+m+H.V.V.{+a+(+8.>.>.>.>.>.>.>.>.,.n+o+' = j $ p+,.>.>.>.'.q+I ' , , q '.i.>.,.).r+c = = = = = = = s+c t+b+,.>.>.>.l+u+v+v+v+v+w+>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.;+0+n.n.*+ ", +" <+3.m.V.V.{+/+(+8.>.>.>.>.>.>.>.>.x+y+c z+| B A+B+'.,.>.L.).C+J ] / | 9 p+>.>.,.b+D+> | | / ] ; ^ / | E+t @.).,.>.>.>.>.F+v+v+v+l+>.>.>.>.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.9.>.>.>.>.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.7+0+n.n.*+ ", +" <+I.U.V.V.{+G+(+8.>.>.>.>.>.>.>.>.'.H+s+] | | I+@.).,.>.,.J+' ^ / | | K+L+,.>.,.b+@.> | | ] 9 c , - / / ] ' M+'.,.>.9.>.N+v+v+v+i+>.>.>.>.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.7+0+n.n.*+ ", +" <+O+5+V.V.%.P+g.Q+>.>.>.>.>.>.>.9.).R+- S+/ | ; % T+'.,.'.U+, | | | 1 , V+,.,.,.b+@.> | | > W+X+Y+Z+; | | > `+).,.>.>.>. v+v+ >.>.>.>.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.7+0+w.n.*+ ", +" n.<+c.V. @.@+@_.;.,.>.>.i.i.>.>.>.).@@] #@| | ^ = $@'.,.b+%@> | | | | = .'.,.,.b+@.d | &@A+!.'.'.*@, | 2 - q !.'.,.>.=@v+v+v+u+>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.i.>.>.>.7+0+V.n.*+ ", +" <+6+V.,+O.-@>+:.,.>.>.i.i.>.>.>.).;@/ 1 | >@/ ] c b+).,@& ; | / / | > @.).'@,.b+@.> 8 &@_ ).<.,.b+K+| 2 ; I )@'.,.>.!@v+v+v+M >.>.>.>.>.>.>.~@j+k+>.>.>.>.>.>.>.>.>.>.i+j+{@>.>.9.>.>.>.]@k+k+^@>.>.>.>.>.>.>.>.^@k+j+]@>.>.>.>.>.>.>.>.>.>.>.>.>.i+j+]@>.>.>.i.i.>.>.>.7+0+V.n.n.*+ ", +" <+8+x.V.O.-@>+:.>.>.>.,.,.>.>.>./@9 8 | / ^ ^ / , (@!._@- ^ #@^ ^ #@> :@b+L.<.b+@.> | | _ b+,.'.T+, | 2 - q !.'.,.>.L v+v+v+k+>.>.>.>.>.M <@v+<@N+ M M [@<@k+9.>.k+N+}@v+v+L >.>.>.>.k+v+v+v+[@9.>.>.>.>.i+L <@<@v+v+N+^@>.>.i+L <@v+ w+9.]@[@v+v+ ]@>.>.>.>.>.>.>.7+0+V.n.n.*+ ", +" <+#+x.,+O.-@q.:.>.>.>.,.,.>.>.,.|@* | / ^ 1@- / - 2@3@= / / ] 1@- ^ - 4@b+,.<.b+@.> | | = 5@6@7@8@- | | > 9@b+'.,.>.0@v+v+v+>.>.>.>.]@N+v+v+[@a@>.k+v+v+v+v+]@>.>.w+M v+v+v+k+>.>.>.l+v+v+v+M >.>.>.>.M v+v+[@>.]@ v+v+<@>.>.N+N+ v+v+v+M N+N+v+v+v+M >.>.>.>.>.>.>.7+0+V.V.n.*+ ", +" <+u.V.V.O.-@q.:.>.>.>.>.>.>.,.). .= / ^ - b@' ; ] , c@] / ] > d@e@; - I *@'.,.b+@.o B 2 ^ = * = - ^ >@/ * B+'.,.>.]@v+v+v+N+>.>.>.>.N+v+v+<@]@>.>.>.v+v+v+<@>.>.>.>.>.M v+v+v+k+>.>.>.M v+v+v+k+>.>.>.l+v+f@v+i+>.>.N+v+f@v+>.>.>.>.g@v+v+v+v+l+L v+v+v+M >.>.>.>.>.>.>.7+0+V.x.n.*+ ", +" <+%.V.V.h@i@q.:.>.>.>.>.>.>.,.b+@.> / ] j@k@l@> / ] ] / ^ = m@n@k.- ; r q+'.,.b+@.o B 2 | ^ ^ ^ S+; > * #.).,.>.>.o@v+f@v+M >.>.>.M v+v+v+M >.>.>.k+v+v+v+L >.>.>.>.>.p@q@v+v+k+>.>.>.N+v+v+v+i+>.>.i+v+v+v+[@>.>.>.N+v+v+N+>.>.>.>.r@v+v+v+M 9.N+v+v+v+^@>.>.>.>.>.>.>.7+_+V.x.n.*+ ", +" <+O.V.V.O.-@q.:.>.>.>.>.>.>.,.b+2@> ^ - _@!.U+, 8 / / | ; r s@)@$ - ] 9 t@'.,.b+@.> | | ^ > = = * c l@u@p+,.>.>.>.L v+v+v+k+>.>.>. v+v+v+{@>.>.>.M v+v+v+r@>.>.>.>.>.N+v+v+v+>.>.>.>.<@v+v+v+>.>.>.L v+v+v+M >.>.l+v+v+ ^@>.>.>.>.[@v+v+v+^@>.^@[@N+k+>.>.>.>.>.>.>.>.7+_+:+V.n.*+ ", +" <+w.V.O.i@q.:.>.>.>.>.>.>.'.!.v@{ ^ = w@).x@' ^ / | / = y@~.~.4@- ^ = $@'.,.).@.> | | ; z@$@$@A@B@C@'.,.>.>.>.>.N+v+v+v+]@>.>.k+v+v+v+ >.>.>.>.[@v+v+v+^@>.>.>.>.]@v+v+v+N+>.>.>.>.v+v+v+D@>.>.>.0@v+v+v+M M [@v+ L ]@>.>.>.>.>.<@v+v+ >.>.>.>.>.>.>.>.>.>.>.>.>.>.7+_+:+V.n.n.*+ ", +" <+H.w.O.-@q.:.>.>.>.>.i.>.'.*@$ - ] * E@'.).R+> ^ / ^ 9 |@).b+D+> / ] _@).,.).@.> | | s+!.'.'.'.'.,.,.>.>.>.>.>.v+v+v+N+<.<.>.g@v+v+v+N+>.>.>.>.<@v+v+ >.>.>.9.>.o@v+v+v+L >.>.>.k+v+v+v+L >.>.>.v+v+v+v+N+L M ~@>.9.>.>.9.>.>.i+f@v+v+N+>.>.>.>.>.>.>.>.>.>.>.i.i.i.7+_+V.x.n.n.*+ ", +" <+U.n.O.-@q.:.>.>.>.i.i.>.'.F@G@; ; ' H@'.'.0.9 ] ^ ; I@).,.).`+= | / ' ).,.).@.> | | 9 ).9.>.>.>.>.>.>.>.>.>.k+v+v+v+L <.<.>.M v+v+v+N+>.>.>.i+v+v+v+N+>.>.>.>.>.M v+v+v+k+>.>.>.l+v+v+v+M >.>.>.v+v+v+v+k+>.>.>.>.>.J@>.>.>.>.k+v+v+v+M >.>.>.>.>.>.>.>.>.>.>.i.i.i.7+0+V.V.n.n.*+ ", +" <+3.m.O.-@q.:.>.>.>.>.>.>.'.K@A+] ; r L@'.,.b+4@- ] _ M@'.,.). .= | | 9 ).,.b+@.> | | 9 ).>.>.>.>.>.>.>.>.>.>.M v+v+v+M <.<.>.r@v+v+v+<@>.>.>.k+v+v+v+g@>.>.>.>.>.N+q@q@v+k+>.>.]@N+v+v+v+k+>.>.>.N+v+v+v+L >.>.>.>.>.[@M >.>.>.L v+v+v+k+>.>.>.>.>.>.>.>.>.>.>.>.>.>.7+0+V.V.n.n.*+ ", +" <+{+|+O.-@q.:.>.>.>.>.>.>.'.2@, ; = %@b+,.,.). .e = $ N@'.,.'.O@9 E+^ ' P@'.).`+, ] ^ c ).>.>.>.>.>.>.>.>.>.>.M v+v+v+L <.Q@]@i+v+v+v+v+l+>.k+ v+v+v+[@>.]@]@>.>.N+q@q@v+L k+r@ v+v+v+]@>.>.>.k+v+v+v+ l+>.>.k+N+D@]@>.>.>.N+v+v+f@]@>.>.>.>.>.>.>.>.>.>.>.>.>.>.7+0+V.:+n.n.*+ ", +" <+R@m+O.-@q.:.>.i.i.>.>.,.).9@' K+c S@).,.>.,./@I r T@).,.>.,.P@I , = I U@x+).r+C , = I ).,.>.>.>.>.>.>.>.>.>.i+v+f@v+v+v+ ]@>.M v+v+v+v+v+N+k+ v+v+v+v+ a@>.>.!@v+v+v+v+v+<@=@S.q@q@<@>.>.>.9.>.l+f@v+v+v+v+v+v+L ]@>.>.>.>.v+v+v+N+>.>.>.>.>.>.>.>.>.>.>.>.,.,.>.7+0+V. @n.n.*+ ", +" <+V@5+W@-@q.:.>.i.i.>.>.,.'.X@A@Y@..e+'.,.>.>.'.Z@` `@,.>.>.>. #.#$@$@` +#,.'.e+..@###.#).,.>.>.>.>.>.>.>.>.>.9.=@$#F+[@%#&#>.>.>.k+L N+[@l+>.>.^@L N+[@l+]@>.>.>.>.l+N+N+L l+>.=@q@q@q@L >.>.>.>.>.>.i+M N+N+[@M i+>.>.>.>.>.i+M M M k+>.>.>.>.>.>.>.>.>.>.>.>.,.,.>.7+0+V. @V.n.n.*+ ", +" <+*#W@-@q.:.>.>.>.>.>.>.>.'.).'.'.,.,.>.>.>.,.'.'.,.>.>.>.>.,.'.'.'.'.,.>.,.,.'.'.'.'.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>. +=@>.>.>.>.>.L v+q@q@i+>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.>.>.>.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.7+0+V.V.V.n.n.*+ ", +" <+=#W@-@q.:.>.>.>.>.>.>.>.i.i.i.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.i.>.>.>.>.>.>.i.>.>.>.>.>.>.>.>.>.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.!@q@q@-#]@>.>.]@ v+q@;#>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.7+0+V.V.V.P.n.*+ ", +" <+>#W@,#q.:.>.,.,.i.i.>.>.,.,.>.>.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.9.>.>.>.9.>.>.>.>.N+v+v+v+L >.>.u+q@q@L >.>.>.>.>.>.>.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.7+0+V.V.V.V.n.*+ ", +" <+b.O.,#q.:.>.,.,.i.i.>.>.,.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.k+v+v+v+v+l+N+v+ ;#>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.7+0+V.V.V. @n.*+ ", +" <+%.O.-@q.:.>.>.>.,.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.^@M N+N+N+L l+a@>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.,.>.>.>.>.>.>.>.>.>.>.>.>.i.i.i.i.>.>.>.>.>.7+0+V.V.V.V.n.*+ ", +" <+I.O.-@q.;.>.>.>.,.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.,.>.>.>.>.>.>.>.>.>.>.>.>.i.i.i.i.>.>.>.>.>.7+0+V.V.V.V.n.n.*+ ", +" <+'#O.)#q.;.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.7+0+V.V.V.V.V.V.*+ ", +" <+a._+!#h.:.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.;+0+V.V.V.V.V.V.*+ ", +" <+~#7+:.<.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.;+0+V.V.V.V.V.V.*+ ", +" <+{#4+>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.;+0+V.V.V.V.V.V.*+ ", +" <+]#^+>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.;+0+V.V. @V.V.n.*+ ", +" <+^#(+>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.7+0+V. @V.V.V.w.*+ ", +" <+/#g.>.>.>.>.>.>.>.>.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.i.9.>.>.>.>.>.>.>.>.>.>.>.>.i.>.>.>.>.i.i.>.>.>.>.>.>.>.>.>.>.>.7+0+V.V.V.V.V.V.n.*+", +" <+(#`.>.>.>.>.>.>.>.i.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.>.>.,.,.'.).).)./@_#_#_#:#).).).'.'.,.>.i.>.>.>.>.>.>.>.>.>.>.>.7+0+V.V.V.V.,+V.n.*+", +" <+<#[#>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.'.b+}#|#_@' 9 * * * 9 9 1#R+E@2#b+,.>.>.>.>.>.>.>.,.,.>.>.>.7+0+V.V.V.V.V.:+n.*+", +" <+_.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.'.).3# .4@& > ] / | / / / / | S+- * } y@3#).'.,.>.>.>.>.,.,.>.>.>.7+0+V.V.V.V.V.V.n.*+", +" <+>+>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.'.2#$@' 7 - ; ^ #@| / ] ; ] ^ / / 4#5#{ = 9 |#6#'.,.>.>.>.>.>.>.>.>.7+0+V. @V.V.V.P.n.*+", +" <+8.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.'.7#I , ^ #@] ; I+, * ' _@I@_@' 9 , > - ( ^ ^ = $ 8#).,.L.>.>.>.>.>.>.7+0+V.V.,+V.V.2+n. ", +" <+;.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.).E@' > ^ | ^ , r 9@9#J+).).).).).J+0#@.} = ; ^ ^ - ' A@!.,.>.>.>.<.<.>.7+0+V.V.V.V.V.n.n. ", +" :.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.).y@9 ; ^ ^ - 9 @#a#b+).,.>.>.>.>.L.,.'.).~.b#c = ; / ] 9 9@).,.>.>.<.<.<.7+_+V.V.V.V.V.n.*+ ", +" <.<.>.>.>.>.>.>.[+i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.,.>.>.,.,.>.>.>.>.>.>.>.>.>.>.,.,.>.>.,.,.>.>.>.>.>.>.>.>.>.>.,.,.>.>.,.,.>.>.>.>.>.>.>.>.,.,.>.>.>.>.>.>.<.<.>.>.,.).E@9 ; S+; * D+N@).'.,.,.>.>.>.>.>.>.>.,.,.'.).J+c#G@; / ] * d#!.,.>.>.<.;.%+_+V.e#:+.+V.n. ", +" <.<.>.>.>.>.>.>.i.i.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.,.>.>.,.,.>.>.>.>.>.>.>.>.>.>.,.,.>.>.,.,.>.>.>.>.>.>.>.>.>.>.,.,.>.>.,.,.>.>.>.>.>.>.>.>.,.,.>.>.>.>.>.>.<.<.>.,.'.9#' f#^ ; 9 Y+b+,.g#k+>.>.>.>.>.>.>.>.>.>.>.>.>.,.).h#c - ^ ] 9 E@).>.>.:.>+i#O.V.:+w.V.V.*+ ", +" =@>.>.>.>.>.>.>.9.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.x+2#j#> ^ ; 9 7@).,.>.k#v+-#=@>.>.>.>.>.>.>.>.>.>.>.>.,.).j.4@- / ] c l#,.>.Q+`.m#4.V.V.H.V.*+ ", +" n#>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.).|#= ^ ] 9 E@).,.>.>.k+v+q@q@L {@>.>.>.>.>.>.>.>.>.>.>.,.'.j.' ; / > @.).,.>+;+o#b.w.H.V.V.*+ ", +" p#,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.'.|@9 ^ | > +.).,.>.>.>.k+v+v+v+v+v+q#r#>.>.>.>.>.>.>.>.>.>.,.).s#& ; ] * E@'.}+t#u#6+H.V.V.*+ ", +" O ,.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.).S@= #@^ ' x@,.>.>.>.>.o@v+v+v+v+v+v+ M >.>.>.>.>.>.>.>.>.9.'@b+D+> / ] G@v#4+w#_+V.V.V.*+ ", +" x#'.,.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.'.*@y#- ; _ z#).>.>.>.>.>.A#v+v+q@v+v+v+v+v+<@l+>.>.>.>.>.>.>.>.>.,.|@9 / 3 B#C#D#E#V.V.n.*+ ", +" F#J+).,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.'.G#t ; > H#!.'.>.>.>.>.>.A#v+v+q@v+v+v+v+v+v+v+N+k+>.>.>.>.>.>.>.>.).I#; 3 J#K#L#M#n.n.*+ ", +" I R+J+,.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.<.'@N#4 ^ , U+'.,.>.>.>.>.>.k+v+v+v+v+v+v+v+v+v+v+v+v+N+k+>.>.>.>.>.>.'.E@* ] O#P#Q#R#*+ ", +" ' , D+l#).'.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.9.>.<.x+& s / 9 S#,.>.>.>.>.>.>.k+v+v+v+v+v+v+v+v+v+v+v+v+v+v+L i+>.>.>.>.'.2#r ; T#U#V# ", +" c ; = ' H+~.'.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.i.>.>.>.>.>.>.>._#9 >@^ ' ).>.>.>.>.>.>.>.k+v+v+v+v+v+v+v+v+v+v+v+v+v+f@v+v+L ]@>.>.'@!.#.W#X#Y# ", +" ! ; / ] , I U+J+Z#'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.'.x+x+x+'.'.'.'.).`#, / ] _@Z#>.>.>.9.>.>.>.k+v+v+v+v+v+v+v+v+v+v+v+v+v+v+v+v+v+ M ]@,.b+ $.$5#* ", +" @ = ^ | ] - = 9 +$$@E@y+`#`#q+q+`#`#q+q+`#`#q+q+`#`#q+q+`#`#q+q+`#`#q+q+`#`#q+q+`#`#q+q+`#`#q+q+`#`#q+q+`#`#q+q+`#`#q+q+`#`#q+q+`#`#q+q+`#`#q+q+`#`#q+q+`#`#q+q+`#F@@$#$- ^ - R+).>.>.>.>.>.>.>.k+v+v+v+q@q@v+v+q@q@v+v+v+v+v+v+v+v+v+v+-#$$b+..= E+, ", +" ' ] 2 | 8 2 / ; = 9 c % %$r r % k.r r % % r } % k.r } % k.r } % k.r } % k.r } % k.r } % k.r } % k.r } % k.r } % k.r } % k.r } % k.r } % k.r } % k.} } I $ q l@H %@} }.] ^ > w@).>.>.>.>.>.>.>.k+v+v+v+q@q@v+v+q@q@v+v+v+v+v+v+v+v+v+L &$,.).*$= ] = ", +" [ - | | | | | / ^ ] ; ; ; ; ; ; - ; ; ; ; ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - =$= , 9 r I H H -$;$; ^ > w@).>.>.>.>.>.>.>.k+v+v+v+v+v+v+v+v+v+v+v+v+v+v+v+v+F+>$<.>.,.).` J ] = ", +" , / | | | | 8 | | | 8 | | 8 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | / ^ ^ ] ; - - > = = z * ' g ! ,$ - ^ - '$Z#>.>.9.>.>.>.>.k+v+v+v+v+v+v+v+v+v+v+v+v+v+v+ l+>.<.<.>.,.b+ $= ] , ", +" ' ] )$n / / | | | | | | !$2 | | | | 2 2 | 1 | | | | | | | | / >@| | | 1 | | | | | | | | | | | | | | | | | | | | 2 2 | / ] - = * ' } ~${$ , / ] _@).>.>.>.>.>.<.<.k+v+v+v+]$]$v+v+v+v+v+v+v+v+M ]@>.>.>.>.>.,.b+^$=$5#* ", +" * 5#k / / | | | 1 | | 2 2 | | | | 2 2 | | | | | | | | | | / / 8 | | | | | | | | | | 8 | | | / ^ m ] ; - > > = = , * ' |./$ 6 ^ ^ ;@b+,.>.>.>.>.<.($k+v+v+v+]$]$v+v+v+v+v+v+[@i+>.>.>.>.>.>.>.'.~.I _$:$' ", +" <$> / | | | | | 1 | | | | | | | | | | | | | | 2 2 | 1 | | | 8 | | | | | | | | | | | | &@B / ] > , t G@} [$}$ g ] / , 0#'.,.>.>.>.>.>.k+v+v+v+v+v+v+v+v+v+<@k+>.>.>.>.>.>.>.>.>.'.|$r ; { } ", +" 1$> ^ | | | | | | | | | | | | | | | | | | | 2 2 | | | 8 | | | / ^ ^ ] ; l - > = = A+A+_ v ! u @ > ^ > @.b+,.>.>.>.>.>.k+v+v+v+v+v+v+v+ g@>.>.>.>.>.>.>.>.>.>.>.).2$, ] > 3$ ", +" # = / | 8 | | | | | | | | | | | 1 | | | | | | | 1 | | | | / ] - = * c 4$4@{$ & 5$; c 6$'.>.9.>.>.>.k#q@v+v+v+v+q@p@]@>.>.>.>.>.i.i.>.>.>.>.,.J+c m / , ", +" 7$* > ] >@| | | | | | | | | | | / ^ ^ ] ; - - > = = , * ' 8$. 9$> ^ = |#).,.>.>.>.>.k#q@v+v+v+N+=@>.>.>.>.>.>.>.i.i.>.>.>.,.'. .= / ^ ' ", +" b 9 ; / | | 8 | / / | | | / ] - = * ' } ~${$ , >@^ 9 0$'.,.>.>.>.k+v+v+0@k#>.>.>.>.>.>.>.>.>.>.>.<.<.9.'.a$} - ^ j b$ ", +" c$t * , = = , , , A+K+~ ! ) d$z+/ > %@J+x+>.>.>.k+ g@>.>.>.>.>.>.>.>.>.>.>.>.>.<.<.,.b+|#= ] - k. ", +" ~ ; ^ = R+J+,.,.>.]@]@>.>.>.>.>.>.>.>.>.>.>.>.>.>.C.L.b+#., ] ^ * ", +" 0 , ^ ^ , @.J+'.,.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.,.'.b+#.* ] ^ > e$ ", +" c$> ^ ] , I@f$).,.>.>.>.>.>.>.>.>.>.>.>.i.>.,.'.L@R+, ] / > [ ", +" d$= ] ^ > g$..J+'.'.,.,.,.>.>.>.,.,.,.'.'.b+7@r = ] ^ > h$ ", +" i$, ] ^ - , c $@a$b+).'.,.,.,.'.).!.N@G#c = ; ^ ^ > j$ ", +" k$9 - ^ ^ ] = l$^$` B+h+L+h+V+..^$m$_ m 1 / ; , c$ ", +" n$= m ^ ^ :$> = , * * * , = > - ] / ^ - c ", +" o$e@, d ; ] ^ ^ / >@/ ( ^ ] ; > = t . ", +" w G@K+= > ; ; ; - j _ % w ", +" @ + + ! + ", +" "}; diff --git a/gui/mplayer/pixmaps/a11.xpm b/gui/mplayer/pixmaps/a11.xpm new file mode 100644 index 0000000000..dfc31ab1b5 --- /dev/null +++ b/gui/mplayer/pixmaps/a11.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static const char * a11_xpm[] = { +"18 16 3 1", +" c None", +". c #000000", +"+ c #FFFFFF", +" ", +" ", +" ", +" ................ ", +"..++++++++++++++..", +".+..............+.", +".+...+...+...+..+.", +".+..++......++..+.", +".+...+.......+..+.", +".+...+.......+..+.", +".+...+...+...+..+.", +".+..............+.", +"..++++++++++++++..", +" ................ ", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/a169.xpm b/gui/mplayer/pixmaps/a169.xpm new file mode 100644 index 0000000000..c59ebb4258 --- /dev/null +++ b/gui/mplayer/pixmaps/a169.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static const char * a169_xpm[] = { +"18 16 3 1", +" c None", +". c #000000", +"+ c #FFFFFF", +" ", +" ", +" ", +" ................ ", +"..++++++++++++++..", +".+..............+.", +".+..+.+++.+.+++.+.", +".+.++.+.....+.+.+.", +".+..+.+++...+++.+.", +".+..+.+.+.....+.+.", +".+..+.+++.+.+++.+.", +".+..............+.", +"..++++++++++++++..", +" ................ ", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/a235.xpm b/gui/mplayer/pixmaps/a235.xpm new file mode 100644 index 0000000000..01b8a23094 --- /dev/null +++ b/gui/mplayer/pixmaps/a235.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static const char * a235_xpm[] = { +"18 16 3 1", +" c None", +". c #000000", +"+ c #FFFFFF", +" ", +" ", +" ", +" ................ ", +"..++++++++++++++..", +".+..............+.", +".+..++..+.++.++.+.", +".+.+..+....+.+..+.", +".+...+....++.++.+.", +".+..+......+..+.+.", +".+.++++.+.++.++.+.", +".+..............+.", +"..++++++++++++++..", +" ................ ", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/a43.xpm b/gui/mplayer/pixmaps/a43.xpm new file mode 100644 index 0000000000..f634c4af01 --- /dev/null +++ b/gui/mplayer/pixmaps/a43.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static const char * a43_xpm[] = { +"18 16 3 1", +" c None", +". c #000000", +"+ c #FFFFFF", +" ", +" ", +" ", +" ................ ", +"..++++++++++++++..", +".+..............+.", +".+...++..+.++...+.", +".+..+.+......+..+.", +".+..+.+....+++..+.", +".+..++++.....+..+.", +".+....+..+.+++..+.", +".+..............+.", +"..++++++++++++++..", +" ................ ", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/ab.xpm b/gui/mplayer/pixmaps/ab.xpm new file mode 100644 index 0000000000..4e70ed3257 --- /dev/null +++ b/gui/mplayer/pixmaps/ab.xpm @@ -0,0 +1,34 @@ +/* XPM */ +static const char * ab_xpm[] = { +"16 16 15 1", +" c None", +". c #000000", +"+ c #EEF63E", +"@ c #EAF13D", +"# c #F0F83F", +"$ c #CBD235", +"% c #E9F03D", +"& c #E5EC3C", +"* c #E8F03D", +"= c #ABB02D", +"- c #ECF33E", +"; c #EFF73F", +"> c #CED636", +", c #B4BA2F", +"' c #CDD435", +" ", +" ", +" ", +" ", +" . ", +" .+. ", +" ..@#$.. ", +" .######%. ", +" .####&. ", +" .*###=. ", +" .#-.;>. ", +" .,. .'. ", +" . . ", +" ", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/about.xpm b/gui/mplayer/pixmaps/about.xpm new file mode 100644 index 0000000000..850e879b4d --- /dev/null +++ b/gui/mplayer/pixmaps/about.xpm @@ -0,0 +1,427 @@ +/* XPM */ +static char * about_xpm[] = { +"320 170 254 2", +" c None", +". c #070707", +"+ c #131313", +"@ c #151515", +"# c #0C0C0C", +"$ c #040404", +"% c #010101", +"& c #060606", +"* c #0D0D0D", +"= c #050505", +"- c #1B1B1B", +"; c #0E0E0E", +"> c #1C1C1C", +", c #3B3B3B", +"' c #2B2B2B", +") c #121212", +"! c #323232", +"~ c #5B5B5B", +"{ c #3F3F3F", +"] c #0B0B0B", +"^ c #111111", +"/ c #424242", +"( c #434343", +"_ c #222222", +": c #020202", +"< c #202020", +"[ c #4D4D4D", +"} c #2C2C2C", +"| c #030303", +"1 c #464646", +"2 c #414141", +"3 c #0F0F0F", +"4 c #0A0A0A", +"5 c #101010", +"6 c #161616", +"7 c #3A3A3A", +"8 c #505050", +"9 c #181818", +"0 c #565656", +"a c #3E3E3E", +"b c #313131", +"c c #474747", +"d c #3C3C3C", +"e c #494949", +"f c #333333", +"g c #2D2D2D", +"h c #212121", +"i c #515151", +"j c #555555", +"k c #282828", +"l c #232323", +"m c #343434", +"n c #454545", +"o c #2F2F2F", +"p c #272727", +"q c #1A1A1A", +"r c #4B4B4B", +"s c #000000", +"t c #252525", +"u c #373737", +"v c #242424", +"w c #080808", +"x c #090909", +"y c #141414", +"z c #363636", +"A c #404040", +"B c #393939", +"C c #1E1E1E", +"D c #353535", +"E c #383838", +"F c #1D1D1D", +"G c #292929", +"H c #171717", +"I c #2A2A2A", +"J c #262626", +"K c #525252", +"L c #545454", +"M c #303030", +"N c #484848", +"O c #2E2E2E", +"P c #1F1F1F", +"Q c #3D3D3D", +"R c #4C4C4C", +"S c #535353", +"T c #191919", +"U c #4F4F4F", +"V c #444444", +"W c #616161", +"X c #5C5C5C", +"Y c #4A4A4A", +"Z c #585858", +"` c #5D5D5D", +" . c #646464", +".. c #626262", +"+. c #5A5A5A", +"@. c #606060", +"#. c #595959", +"$. c #6A6A6A", +"%. c #676767", +"&. c #4E4E4E", +"*. c #848484", +"=. c #5E5E5E", +"-. c #5F5F5F", +";. c #636363", +">. c #666666", +",. c #686868", +"'. c #696969", +"). c #6E6E6E", +"!. c #656565", +"~. c #757575", +"{. c #7A7A7A", +"]. c #797979", +"^. c #7E7E7E", +"/. c #707070", +"(. c #6B6B6B", +"_. c #6F6F6F", +":. c #727272", +"<. c #575757", +"[. c #747474", +"}. c #737373", +"|. c #717171", +"1. c #888888", +"2. c #6D6D6D", +"3. c #A6A6A6", +"4. c #A0A0A0", +"5. c #828282", +"6. c #777777", +"7. c #7B7B7B", +"8. c #7C7C7C", +"9. c #858585", +"0. c #939393", +"a. c #7D7D7D", +"b. c #A4A4A4", +"c. c #AEAEAE", +"d. c #989898", +"e. c #818181", +"f. c #808080", +"g. c #787878", +"h. c #838383", +"i. c #6C6C6C", +"j. c #767676", +"k. c #909090", +"l. c #8D8D8D", +"m. c #9E9E9E", +"n. c #A9A9A9", +"o. c #AAAAAA", +"p. c #969696", +"q. c #7F7F7F", +"r. c #898989", +"s. c #8F8F8F", +"t. c #9F9F9F", +"u. c #A3A3A3", +"v. c #A2A2A2", +"w. c #929292", +"x. c #868686", +"y. c #959595", +"z. c #878787", +"A. c #949494", +"B. c #8A8A8A", +"C. c #9A9A9A", +"D. c #979797", +"E. c #919191", +"F. c #8C8C8C", +"G. c #8B8B8B", +"H. c #8E8E8E", +"I. c #A1A1A1", +"J. c #9B9B9B", +"K. c #A5A5A5", +"L. c #999999", +"M. c #A7A7A7", +"N. c #9D9D9D", +"O. c #B0B0B0", +"P. c #CECECE", +"Q. c #D0D0D0", +"R. c #C8C8C8", +"S. c #BDBDBD", +"T. c #ABABAB", +"U. c #ADADAD", +"V. c #B2B2B2", +"W. c #CFCFCF", +"X. c #C1C1C1", +"Y. c #CCCCCC", +"Z. c #E4E4E4", +"`. c #D8D8D8", +" + c #C0C0C0", +".+ c #D4D4D4", +"++ c #E5E5E5", +"@+ c #E7E7E7", +"#+ c #E3E3E3", +"$+ c #E2E2E2", +"%+ c #DFDFDF", +"&+ c #D3D3D3", +"*+ c #CDCDCD", +"=+ c #E9E9E9", +"-+ c #EFEFEF", +";+ c #EEEEEE", +">+ c #EBEBEB", +",+ c #DDDDDD", +"'+ c #9C9C9C", +")+ c #CBCBCB", +"!+ c #E6E6E6", +"~+ c #ECECEC", +"{+ c #F4F4F4", +"]+ c #F6F6F6", +"^+ c #F5F5F5", +"/+ c #F3F3F3", +"(+ c #F2F2F2", +"_+ c #EDEDED", +":+ c #EAEAEA", +"<+ c #C5C5C5", +"[+ c #CACACA", +"}+ c #D6D6D6", +"|+ c #C7C7C7", +"1+ c #B8B8B8", +"2+ c #B9B9B9", +"3+ c #BEBEBE", +"4+ c #B5B5B5", +"5+ c #B6B6B6", +"6+ c #F1F1F1", +"7+ c #D9D9D9", +"8+ c #DADADA", +"9+ c #C3C3C3", +"0+ c #BCBCBC", +"a+ c #AFAFAF", +"b+ c #ACACAC", +"c+ c #D5D5D5", +"d+ c #DBDBDB", +"e+ c #E0E0E0", +"f+ c #E8E8E8", +"g+ c #F0F0F0", +"h+ c #F7F7F7", +"i+ c #E1E1E1", +"j+ c #F8F8F8", +"k+ c #F9F9F9", +"l+ c #DCDCDC", +"m+ c #D1D1D1", +"n+ c #C2C2C2", +"o+ c #B4B4B4", +"p+ c #FAFAFA", +"q+ c #FBFBFB", +"r+ c #D2D2D2", +"s+ c #C9C9C9", +"t+ c #BBBBBB", +"u+ c #B1B1B1", +"v+ c #B7B7B7", +"w+ c #DEDEDE", +"x+ c #BABABA", +"y+ c #D7D7D7", +"z+ c #C4C4C4", +"A+ c #B3B3B3", +"B+ c #A8A8A8", +"C+ c #BFBFBF", +"D+ c #C6C6C6", +"E+ c #FFFFFF", +". + @ # $ % % % & * = # - ; > , ' ) ! ~ { - ] % ^ / ( _ - : < [ } | % % % ; 1 2 % | ; 3 4 5 6 > - 7 8 9 } 0 < < a % & b c # d e 5 f c g b | 9 8 h h i 4 % % % h j k % % % % % : # l m n 4 & o p : p _ % % : & # d a % % % % % % % % % % % % % % % % % % : q r % % % % % % s : t . ; d u v v > & % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % : : = . & = | : % : % % % % % % % % % % % % : | : : % % % % % % % % % : | | $ = w x w $ $ | : : : : | x y _ } f z , A / B g p > ^ w & * C ' D 7 E b } p F 3 $ | : = # 9 v G m E E z E ! z B D f } _ q > H 5 ] | % s % % : & - I f m g p - x : % % 3 H @ + 5 ] . | : | & ) < J ' z , A 1 e } ", +"= 5 5 4 $ % % % % % % % % . 6 9 6 h K , | | % % = @ l 5 : y ! r L A ^ % & J r u $ & M z x x ; ) _ { v H ( v y d h % 6 ( I 9 N < q K f # $ % F n < D O % % % P N l % % % % % : > f ; 7 Q . G m , l N n % | 9 f m R C % % % % % % & 3 ) 3 % : : % % % % % % = y % % % % % : 9 N . s # [ S P f r k % % | h K % % % % % % % % | 5 * & % % % % % % % % % % % % % % % % | = # T C P > + 5 w % % % % % % % % : & 4 # 3 ; 3 # & % % % % % % % = . 4 ] * ^ 6 C > T 9 H 9 @ 4 $ : | = 3 - G M 7 A e r ( ! } < ^ x x + h m , B z M ' J C 3 | | ] q k ! 7 / R 8 K U e c V V 2 A u I _ l F @ 5 ] % % % % % : 3 > p M k v y . : % s . ] # # x & : % : $ ] y P p O 7 V N R r k ", +"| 4 ] = : % % % % % % s % = y H H d W } $ % % : : : : : . n / . ^ r a 4 : * H @ . & , Q * $ . 4 J O . G f | _ 2 C = } n M / l % ' X ' 3 ; % P E t 6 : % % l z 5 w # % % % % > d q P Y T % @ A Q J 2 p : _ { ) - A | % % % % % 5 h h N d % C ( u l < C % y C . % : : : | h Y 6 s s + j M % % g Z ) % : @ O % % % % : : : : 4 / X a $ w 7 i v ] - : % % % : : : : : $ v O t } o M g I - x : : : : : : | ] q P h < q q @ # | % % : $ ] + F v G k t ' O M o g ' I ' p < y 4 = $ x ) C k E V U S r B O C ^ x . ^ l f B E m } I _ q ] = ) v b Q V Y L X ` ...+.i 8 R e n E g G J < q ^ x : % % : % % = * F l < q + & : % % : : : | % % % : | 4 y C t k b d ( N R R J ", +"$ . & : % % % % % % % % : & ] ) g ( Y } . % % % % % % % % M B ; w / } : % % % % % 3 } > % : | % $ = % # ] % + - $ # / R l . % % h N ! H . = d i C | % : o 8 2 b ! q % % % = d d ) e 7 % % O 1 H ' B = H 1 ' % I O % % % % % 6 D - h 1 q P m o O 3 , O 9 2 N H % % % % y / ! % % : I S H % % - X ' % | % : % % % % % % % % % 5 L z s 3 a < . . F T % % % % % % : 3 7 m @.#.e f e +.[ k T = | | | | | 4 > I k k t h F @ . : | . + > I b u u d A 1 N e / / 2 Q , B z D ' < y x . ] 5 C M Q 8 ~ j ( M < 5 & : # _ g ! m } G t > 5 4 - O d e S Z Z +.@. .$.%.W ~ j &.c 2 B O t < > H # x w . . | % % | = ) H 9 H 3 = % % % % % % % % % % = # y P G o M m Q n e e N G ", +"$ ] w | : % % % % % % % % | $ 4 # 4 = | % % % % % % % % % % @ P h ] : % % % % % % 5 = % % % % % % % % % s s s s s b n ) s % % % = ; 3 % * D m A i ! & 6 E / / 1 ' ] : : % 3 ( A o S a # - 1 J - V M = u A # C , q % % % % ] B g ^ 1 f = q M ! + q u ) C 0 Q w % % % | m e 3 % % 5 c 2 : % % k Z l & I u 3 & J D h 6 q = % % x Q n T E 6 % % % P B % % % % % % # u B @ B R c D 0 *.~ b _ y w | | & x T G ' G t l v T * $ = ^ v o E { N U R S 0 ~ @.=.0 8 &.U r r Y e a f t > @ ^ ] ^ k Q i -.#.1 m P # $ | x q t G ' p p C ) ] 6 b ( R #.;.>.,.>.,.'.).'.!.;.X i V A D } J h F H 5 5 ) ^ ; w | : : : & w w ] & % % % % % % % % % % % ] H h p O D z E a / n / A < ", +"= * 4 | : % % % % % % % % % | | : % % % s s % % % % % % % % % % % % % % % % % % % % % % % % % % % % s s s s s s ) r 1 * % : : % % % % % > X P % k X < % : = 4 3 w % % % % w J C y m < % I E 4 ' 2 _ 5 A b 3 1 c O 5 % % % h N g f 8 t % % { g % z } % u [ 9 % % % % @ R M % % % h [ J % % & , R - J L e h k ! z h J Q * % % % ' X a 5 % % % % I c & $ | | : s l Y q x ^ P } z -.~.{ M v y # | | & ; _ k _ l _ l l H . # ! >.{.=.U Z .].^./.(._.:.)...X =.` +.` @.@.<.r u G J C ) 5 F E &.Z +.e } 6 . : % | ) > C _ h > y 4 ) p , Y 0 .).[.}.|.:./.}._.,...Z R A u M I } p h F q q 9 H y * & : % % % % % % % % % % % % % % % % % & @ > J M D Q a { { { Q d E T ", +"| 3 ; | : % % % % % % % % % : : % % % % % % % % % % % % % % % % % % % % s % % % % % % % % % % % % % % % % % % % J o u # % : : : | | | | ] B l ] J B 5 | | $ $ $ | | : : : : % % % % : % & w % ; 6 . ] G z ^ p f ; % % % % h A I u c I & 5 1 > J ' . 9 i 2 q & % % % J r C % : : , / 5 % % h i M | o +.I q _ d f % f 7 = % % | J j ' = w ; 5 5 a L h ^ ) ) 3 - R r 6 ) f G q 7 ,.Z M p C 6 4 | | = ; > - - q q q q # x 9 E /.1.2. ._.*.3.4.5.6.].6.[. .@.=.=.W %._.[.|.;.[ d b p C @ @ J A R U Q v # : : : : . 3 y 6 5 ] . 3 v D V K @.).].7.8.~.~.:.:.).,.X K 1 , m g ' k p p J h v h C 9 5 . : % % % s s % % % % % % % % % s % : w ) P G m a a { a 7 u o g p ) ", +"$ 3 * | % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % : : : : : | | = . w ] 3 6 F J p P ^ @ y 5 3 + 9 6 ) 5 * # * x x 4 & = | % % : $ 3 P t v < C T 4 | % % % % 4 y . @ v w % ] M ! @ = % P N O y & % % % G ( 6 & x H K E $ % _ N 7 ; y L [ C ; h / < * , P % % w } u S e < F t v J X +.} _ l < h f 0 g F Q +.E ] d ~ z h l b #.E : # f S O ) ^ 3 3 ; ] x H g &.9.0.a.6.1.b.c.d.e.^.a.7.:.$...=.` ;.,.6.e.f.{.%.i Q b ' h @ 6 g { a f > $ % : = ] ; + . = $ $ = > M A &.=.(.g.h.5.^.{.g./.).'.=.S e 7 } I t t J G g G G ' G J P y # : % % % % % % % % % % % % % % % % : & * C } z { 2 A Q B M v F y & ", +"$ 3 ] | % : % % % % % % % % % % % : : : : : % s % % % % % % % % % % % % % % % : : % % % : : % % % : % % % : : : $ . ] 5 9 > - H @ q C - T H - q C l h C F > C < v G G t t > 3 3 y q 6 @ ; # # q ' o f D ! } k C 5 : % % % % % % % : % : % : s % % % & 5 4 % % % % : - { H * H Q [ V f ' E M 4 # z !.[ z @ D c H E p & : ; D m 9 8 i.A ! f z e j.<.u z m E E #.` m l L ~ l ] Y , + ^ / ! { z : m o J q w w . . x x 9 G R !.{.k.1.l.m.n.o.p.*.q.7.a.j._.,...W W ,.[.8.f.f.j...S { o p T ] H O o I H $ % : @ &.[ @ : : : | ; p B N +.%.j.e.r.r.h.e.].:.$.=.K ( u J - T q F v G } g ! B D M I _ T x : % % % : : % % % % % % % % % % % % . - k m 7 A { 7 m p - 5 $ % ", +"$ ] & % % : % % % % % % % % % % % % % % % % % % % s s % % % % % % % % % % % % % % % % % % % % % : : % : | = & ] ) > k p v C F - < < q @ y + @ 6 > C h - @ @ 6 > p g } ' G F - C P p J t g ' J _ P l O m 7 E f k - = : % % % % s % % % % % % % % % : : : : % % % % : | 1 6 # 3 + @ 9 C F ; $ ] ^ o &.z - ^ O { ! h & : T n E t I c {.Z A a A $.[.&.V a / n e ].` f ( ).{ ) } U H | g r E _ w % m A y = | | $ $ w y I D !.W j.d.s.t.d.u.v.1.{.j.7.^.w.p.].i.x.j.2.*.q.j.q.h.:.%.0 2 O F ] . H ' m + : % % 5 n M : : | : = q f n S @.2.].h.9.9.h.f.j.(.-.&.2 b > * & $ . + F G g f E { V , m g v 9 & : % % % % % % % % % % % % % % % : & T J ! E a Q u g _ 9 ] : s ", +": $ : % % % % % % % % % % % % % % % % % % % % s % % % % % % % % % % % % % % % s s s % % % % % : : $ . # y ) + q F _ t F 9 F _ t h > - 6 y - P _ h < v < q 9 T < ' g t < > @ ^ @ h t l h h _ < P < t l h _ p I k P * & $ | : : % % % % $ & ; ^ ) y ) 5 5 ^ * & $ % : | ( 5 * ; # # ] 4 | = & ] ) q C - + # * ; ) $ : & v d D M 7 ` ).6.Z e ` e.-.R e c Y Y !.e.i Q ,._.j v 0 &.p % n S ^ : % % @ K h : : | = & # _ ! N '.@.f.v.b.y.z.m.s.:.$.7.{.,.s.h.~.g.A.*.6.p.f.'.{.m.5.q.z.+.B v ^ $ @ c 8 m C w % ' V 9 % % : | 3 k A K -.(.[.].8.8.{.{.j.i.-.i a G ^ $ % % : : # T I D A ` [.` e 2 u O P * : % % % % % % % % % % % % % % % : & H l b z Q d u ' _ H x % s ", +"% % % % % % % % % % % % % % % % % s s s s % % % % % % : | % % % % % % % % % % s % % : | : $ = w * 6 < v F q _ G h H y + y < G v - ) ; ; ; + > J p k ' p l v l v < P < q H y + q _ J v h _ q ^ ) P J v v h P > H > _ > T @ ] . = = x 3 H C p M O o g k _ > q 9 ; & $ $ * @ ; y @ ^ 3 ; & = . ] ^ H q T + x w . | : = * - I f Q ( N [ L 0 ..1.i.K &.Y R e r g.~.j r ).$.1 ' +.e k % 1 [ < J $ g | L T u } w $ w q } B $.!.` B.n.y.].{.C.|.#.!.q.j $.h. .@.'.D.z.].E.2... .F.z.g.5.~ A k ) = 9 #.E { 0 9 : N D . % % y v r e 1 (.g./.*.^.{.[.|.(.!.` &.a p * : % s % % : $ @ I u a (.h...j R 2 m k H = % % % % % % % % % % % % % % % : & 9 v ! 7 ( 2 7 o J q 5 = : ", +": % : % % % % % % % % % % % % % % s s s s % % % % * t l . s % % % % s s % % % : : | $ $ . x ) F l J P H T C t l C 6 y + 9 < _ P F H ) ^ @ > t b } 9 3 ; 5 6 F h l l t _ h P h J ' G C T - C y @ - < C < t I b G h v p J p v F ) 3 F G E a V N V ( { 7 b g t v > ) . = = 4 ; + 6 ) 5 ; x . # 5 ) y @ y # | = | % $ * C G z / 1 [ j j #.(.z.2.Z L K Y X &.0 x.#.K S S 8 2 B E k # : C o < % % O m I | r ! = = @ p z e r.;...G.p._.=.{.H.8 V j.W [ e.$.&.K ^.z.>.x.a.-.#.0 g.5./.$.[ f h ; % l 8 3 O +.+ q S 6 % % M 9 l ..( &.g.A.~.m.0.].j.5.w.8.S [ =.} ' ; % ; 6 w : | 5 p B N ^.j.` -.<.R Q O F 4 % % % % % % % % % % % % % % % % . 6 E <.N n n n , b G P y . ", +"$ = % % % % % % % % % % % % % % % s s s % % % % % 9 S V % % % % % % : % % % : : | = . 4 * y P J h F T > v G ' p > y + H P l k o o p l P _ t t p _ 6 + @ y T l I < H 6 5 ; 5 F k I p h P _ J q F k v v q + @ H @ H F h h P t < 9 9 _ t m c #.X Z j R 1 / d D ! O P + 4 $ | w * * # # # x ] * 4 * 4 * 4 & | | : $ 5 C ' z Q n U K #.X =.2.W #.L 8 Y V 2.=.|.` i i S K r / u p 6 4 % % s % % s s : | s ^ ] % . q l a =./.2.X ~.@.S ~ }.j.r , j. .-.5.i.i S F.W >.l.[.X L L ~.8.>.V B v 5 | % 2 , | r d | d d w s I u $ n i b Y <.E.[.l.x.j.l.r.r.^.;.<.i.8 1 5 y D Z k & : 5 k 7 %.9.[.5.g...K 2 m F ^ : : % % % % % % % % % % % % % : = y D R A 2 N e V a D o G ) ", +"= ^ | % % % % % & G h w C ^ : # & % % H g = % % % > c P % % % % % | | | . . 4 * # x ; H F < C + 5 3 ) - p G P y ; ; 6 < J P _ < @ 3 ; ) _ g O G t k l h v v l t l > ) 3 + 9 v J t _ P T @ H C p k < v t l k t 9 6 > t J J G J h h F T F _ u R X ;.=.L S e c A Q ! p 6 4 $ $ x x ] x ] . w 4 . = : | % % % % & 3 C } u 2 c U <.` @.-.` ` <.U r n A a ( 8 U [ U &.U R ( 7 M h ; : % % % % % % % % % % s s s : ) > } z ( i j 0 K e 1 V n V a =.=.8 |.;.N ..i.e !.6...#.S [ {.[.L B p @ = % # Z > z / 3 . +.G & . Z + P X ' l z N k.6.x.[.8.I.9.h.;.i #.$.m 9 x E c o F @ ] q O / *.r.{.J.e.` U &.{ ( 0 ^ : M u k H F & s * H ] | : % % : x q v M E A c R e 2 a z @ ", +"& y w % % % % w q V 2 k K E q j m $ J i <.8 , ; = 7 V x | : = $ : $ x 3 ^ ^ + + ; * 5 @ P q + ) ) 6 t G < 6 6 T > P p j :.<.< y I Y o - k M G - + # # ) < ' g O ' k _ l } M g I ' v T 4 x ] T _ v t G I g ' J _ p t k G G J v F + ^ H < J k _ J g E c Z +.<.i r c d } 9 4 : : : | | : | = & $ : % % % s % : * P o u { V [ 0 ~ -.` ~ <.&.c { , u ! f ! z 2 r 8 i R r / u } 6 = % % % % % % % % % % % s s s % x 5 - G E N S 8 R n E G G ! 2 [ S j j 0 8 e { Q n e 1 [ R r *.!.f ' q 4 $ % I <.O g ; % > j ! P C ~ I , X p P ! c k.8.6.).l.u.~. .~ [ |.<.@ 4 5 b '.f O I J o a ~ p.f.(.C._.U #.W k &.E * u l 1 ) p A . 3 M i 7 # = $ : : C E p _ ( K V U U d Q D 6 ", +"& @ 4 % % % % : 6 r Q M 8 { D R p > Y (.Y ` _.f k S 7 v l p O , 8 g 3 1 A P z p ^ ^ T _ - T F F > T F G g h P v l J < z $.i G l 2 U O p I _ y # x x * @ J o h C < + @ } V E l > k o p 9 q - _ v v J - q t q ; 3 @ _ g M O G J _ P 9 @ > p l > H C F q < f V ` W ` S 2 o H | % % % % % % % % % % % : : % % = 9 I D a V e K <.Z ~ <.8 r A E o p v l v t } u 1 R i &.e ( , G + | % % % % % % % % % % % s s s % % $ ) v z N e [ e { ! P _ ! 1 i 0 #.~ #.L e m ! u a %.Z <.#.-.d f ' h * $ : 0 ' + % % % ; g 3 % y Q 6 v 1 + 9 O R H.g.,.2.H.I.6.5.#.@.f.f + ; _ k !.S m u z { r g.l.!.(.k.j R j.u b ` 3 @ } ! m : D M 4 ( f { Q C - T + G 2 =.> _ K ..R '.$.2 !. .q ", +"x H 5 : s % s s M c @ m K _ ! B ' ! ,.}.i ~.8.r W !./ a c W r <.W ' b i &.I 0 a @ J 2 $.V > 7 j i 0 , I h 5 ; ^ C O o M ` R T m A ! k P t p F F q > _ p o o < ^ * # 3 ( ).j O ' 8 ).n v } O ' k J t p p } C 5 5 H F t O k I O p C v J k M p C q C F H - - < B Z $.%.S A I ; % % % % % % % % % % s : : : : 3 t b a / r K Z #.#.<.K e 2 m I C y @ T T > J g { e R [ r N A g y | % % % % % % % % % % % s s s s s % * C b 2 c [ e ( f h _ o a N i <.~ #.i 1 M g z ( 2.(.-.+.Y 1 2 7 b C ; ' X 5 % % % % % % % % % % : $ w : 6 G ~ 6.` X %.{.G.h.@.<.$.,.h ^ * f A ` R D , d / L H._.#.q.)./ +...< U e = ] 9 @.^ . 8 * v X l D t o m b o ' .Y # * / j a @.` i .0 q ", +"4 > 5 : : % % . r h 3 [ } ) 8 7 7 R 9.).'.s.[. .G._.L K ^.%.Z ^.~ f g M j p r O 9 S 1 i u p { Z X a - 5 * x x ; P O ' C &.K e m P ' o g , a p t ' } l P } m o } h + y D 2.S M t 2 ! ) 5 H < J p J o } g M F H _ O G g M t q 6 ; * y F k ' I p _ h > + @ q v G } z Y #.&.u 9 : % % % % % % % % % % % : % = T G z / 1 [ j <.<.<.L Y A f t y w $ $ w * ^ q _ m ( e &.i &.V D q $ % % % % % % % % % % % s s s s s % = F o A c R r 1 E I < _ o { 1 e &.&.c d ' k z ( 0 -.0 j Z #.S R a O b c V P % % % % % % % % % % % | 6 7 k A K c &.j @.....@.X j i ( t @ ; < d 1 M m D m A ~ f.W ).!.2 M i &.b c Y p ) f =.3 a ' % Q ~ 6 O z 1 e c ( X 6.g 5 ] 0 D ] @.i - ).! H ", +"] < y $ : % % l z # u c @ f Z i Y _.1.{.0.*.|.x.I.B.|.8.l.!.{.x.<.D 9 < X p o q A #.2 p ^ ; R S ' - 5 ; 5 ) @ F _ l v _ / =.M y T _ ' c Y -.k 6 V %.K v q F h p ' g G b ,.X Q e ' 5 x 4 3 9 F t b 8 , _ y * ) v O G G G ' M O P y T h _ J } I ' v q - C J } l C } a B u 7 J & % % % % % % % s % % % % : * l } B V e 8 0 j i U e Q b J ) $ : % s % = ] ) F I d Y U K r ( z h & % % % % % % % % % % % s s s % % % $ > M A R S L i n z G _ l p O f z 7 m ' l I u V R j ` =...%.,.X [ E k T 3 4 % s s s s s % % % % % | y E D z Q { r L #.X +.~ X #.8 n ! P ^ 5 y F p ' o f Q N R r Y d g P v l ] b u @ T M j ! J * $ m K o R ( K <.Z L *.g.j g B Y % ! [ $ z / v - ", +"x J 6 & = $ : + < < z f p 7 Y d 0 s.p.G.^.].{.E.v.C.1.A.y.*.r.x.K T * h Z E 9 y ` .p F q J ;.f _ p G G v l _ h G u 7 B ).Z I p l T 7 R d Q 9 > +.( z g h - + 6 t } k P Z ,.%.c g C T } [ 0 M g [ .m + ] ] ; > k } o } G O k < J I b I G t T H y 3 ; @ B a ' p L >.M F l l 6 = : % % s % % % s % % % | @ k m { V &.S j S U Y n z J + | % s % % % $ 4 5 9 < O A R U R A z t ; : % % % % % % % % % % % % s % % % | q ! Q R K 0 Z K ( m k < y @ > < v < P l f 2 r L ~ W >.>.).:.2.Z 2 b h 5 % % s s s s s % % % % % % $ 3 _ I f A Y j Z +.Z <.` ~ Z U { b < 9 6 5 + C v I f B B z M k C y * ; y 9 q h v p p h H ] $ ^ t M o c <.W W W x.6.L V @.b y Y T = [ a ! m ", +"4 J T 4 x & * < g f z u z ! ! ( ).4.j.{.^.a.a.1.E.B.x.k.s.~.].Z ) * ) { .M @ 6 Z ` m , T S -.p k ' J t P - H - J k p Q _., h l k I %.K a T + C ).N F 9 6 ) ] ; 9 } G F i '.7 ' l l m %.Y >.E A ^.$./ g T ^ T v M Q A +.d l } p q f d } t } g ' v H 3 p #.Q < l ~ i - ^ 9 F v 3 = : : % % % % s s % % | H G D { ( U i K i [ e / b F x | % % % % % | = ] 5 6 _ f { V a m } < ^ $ % % % % % % % % % % % % % : : | | 3 k m a r K j U ( D I > + 4 4 4 3 ; T l z Y i Z @.W %.$._.}.).~ 1 z t @ | % s s s s s % % % % % % : | y l o B n &.L L i i <.Z Z 8 N a m I _ 5 ] # ^ 9 F _ l _ < C C P F C h v t I O O G l H . : % | @ b e #. .$.(.(.>.X 8 j E b B 3 ) V m o ! ", +"# I > ] ] 3 < ! { N r 1 n A Q 1 e.0.2.[.].a.q.5.*.*.h.9.{.=.g ; ] ^ ^ S b 6 ) H M D t # ) c d J @ ; @ - C _ h t k < v r i.q + 9 I 1 a.#.{ I _ g &...t T 9 * x ] y C k ! ).8 J H 3 ^ #.+.=.{ _ / 6.2 ' G O ! b ! ` E =.;.o D [ d I -.'.u G 7 #.i.{ G } 0 >.B < 7 '.a t C P p ' v ^ & $ % s % % s % % % : 5 h o Q 1 e 8 S S 8 N ( g - & : % % % % : = . q + @ _ } ! z ! p F @ w % % : | | : % s % % s : = ] 4 * ) # & @ ' m Q 2 c ( 7 f I T # x ] x . ; q I Q U Z ` %.2.(.2.:.[.i.-.Y E ' y : % % % % % % % % % % % % % % . 9 l M a Y U i 8 &.S 0 #.j K [ n 7 ! h 9 6 y y q F h v k O ' g G g o b f z , 7 b J 9 4 : % | ^ M e <.,./.:.[./.,. .Z &./ f I k o E 7 P ", +"] v - ^ y F ! / R S L L 8 [ e W i.~.,.'.[.a.e.f.8.^.a.|.[ C ] ! c O , h ; 5 + 6 9 3 # 3 ^ ) H H ; ] * ) 6 _ G P + 5 m [ L A q v } B ).-./ G J Y A '.8 h.e T 3 q < v k B '.b h + 4 H ;.8 Q m ' X =.J H - l O g '.N e *.S m E W 8 d -.r D { '.m S S l m ~.[ g C 8 8 b >.c z ! V ` Y q H b ) > & % % % % % . 9 M d N [ K <.0 K r / ! P w : % % : : w ; @ L g F l v k ' t q 5 = % % : # ; # * | & 4 $ % ] - C P h v h ] . y l O M o I ' G < y x = & = 4 6 h b n 0 -.$.j.~.[.6.7.~.).-.Y E p ^ | % % % % % % % % % % % % % % | ; F J E N Y &.8 8 i j +.~ X #.8 e 2 f o g O ' G G O O M z u u B a Q 2 ( Y Y V 7 M F ; : % | 5 g V +.>.).6.a.^.{.:.,.X K R V { 2 1 c J ", +"4 _ F 6 _ f ( L X W W @.` Z U N 2 { r #.'.:.j.].j.:.,.2 + x ] < z t T 5 ; 5 H - T ) y - _ v > T ) 6 P h v v > ^ x x 4 3 + T t J - T M 7 _ y 9 2 V b A ,.M h _ ' g G Q W 8.S &.! 5 ' /.8 K m l ).0 h ] * 9 O i .k -.).m g 7 :.N u ,.E z (.Z t .8 9 A _.o t o 6.W V ~.B 9 e 0 @.~ E ! ` { r * % % % % ! 1 q 0 >.[ !.$.~ <.#.L c m _ 4 : % % : : & . x k H H - < v _ T ; = % % $ ) H H 6 + E ~ h % : 9 G ' g b b I 6 = | 4 ) y ^ ; + + 3 # . = & * H t b , [ -.(.:.g.{.7.7.6._.,.Z A ! P . : % : % : % % % % % % % % % % % = ^ F O Q / R L S 0 S ~ ;.;.;.#.<.L r c ( 2 2 a u E u d / n ( N &.8 K S 0 K Y { m J ) | % : * I V <.>./.g.^.q.^.6.).>.W ~ S i U j 0 I ", +"x > F < g Q R X ;.;.@.W ` Z U 1 7 f D ( 8 @.$.'.%.X d + 4 # 3 5 5 + @ q - q - _ l F - C - < v v J v h _ l l _ > q 6 6 5 y T 6 ^ ] 4 * H h < h k ' k I M G C @ T h I e ` W ` A O l ! ;...n A Y }.` u H x 3 J =.%.<.2.i.E @ ~ X k ~ Y m M 5.` L r.+.C #.&.t k i 6.( G _.' f ).Y U ' t u @.Q < = % % % - , a 1 $._.$.q.5.+.~ ).|.{.n t @ m f v y C $ . y * * + - F < F 3 = % % | l _ P < q y u V ; % : T M E E Q a D v ^ 4 & $ : : % $ $ : : | w y C G D 2 e j _.~.j.].7.a.].|.$.+.Y z t * % % % % % % % % % % % % % % % % % % $ + t u d N K 0 Z ` .%.$.,.W X +.+.Z L K 8 [ e n 1 R K j j j +.` X ~ ` #.j N Q o - = : % 5 k A L W 2.}.].6.[./.'.!.W @.+.Z ~ ~ ~ O ", +"x 9 - v O a K -.%.,.'. .@.X K e B } G o B r #.X i b y + H - 9 @ @ y + ) 9 - q q < - T F C H T C _ t v h P ' z ! G } I ' G l < 9 3 x w x * 6 G ! t q ) ) - P > - < t o m d M h 9 C < ' 1 ~ ~ &.8 j i f F h f &.&.O +.K T < ;.A D (.2 V f [.G +./.D D ~.<.G - %.` v , 0 h i ~.M t h q 8 8 > > x | : % s ( j > [.7.#.B.2.Z |.B.i /.,.! U ' e 5 } { 5 v &.M ; 6 V >.( 6 w : % = F -.Y A o P - @.} $ % : 6 b { 2 n e n E M G v h H ] = | | $ ] @ P I ! { c i ..a.h.B.].].8.8.[.i.W U A o @ : % s % & | % % % % % s s % % % % s % % . > o E / &.<.X !.,.2.(.'.@.` -.;...-.@.W +.Z Z Z =. .!.W @.;. .>.%.'.%.W 0 1 z < ] % $ 5 J Q K =.2.}.~.|.).i.,. .` Z Z +.` ` ` M ", +"w 5 + _ I , R ~ .'.,.-.` j R { M _ v t g ! , 2 I + ) C < 9 ^ + 6 ) ) ) @ - P q q @ + P ' h y ) ) 9 v v - _ k p k I g I _ k 7 1 2 g 9 ^ T C < H 3 4 w w ] ) > _ g M _ F < C 6 6 T 9 k E , z f f m M B D b B n ( 2 1 D 3 y b } b A } I m { / R J g 7 %.S , / g.a D K > 9 X ~.g ( T ' !.} < v > ] $ : 6 X + k }.&.L e.#.X l.~.[ 9.>.z ( B f % B ! ; V @.G 5 c V [ A & % % % 3 Y /.K 8.j I d ,.4 % % = J { ` V R .#.K U Y n Q z } h q T F v } m d 1 U j ~ E.}./.j._.[.:.).;.#.U A o F & % % # m E x % * 3 | % % | $ | : % % s % % x C } Q n 8 X ;.(.2._.%.W =.W ;.!.%.'.(.>. .>.%.'.(.,.!. .%.,.i./.:.}.(.@.S Q ' 5 : : * J , [ #.,._./.i.,.!.-.X 0 i 8 j #.+.#.' ", +"& 4 ; F J z n L +.-.-.<.i Y 2 f h H 9 > P h k p H ; 6 q T + 3 # ] ] 3 ) + - - 5 * # 5 F P ) # ] ; y C J I k < 6 6 P I F + < ! D g O _ p G p } z B _ ; * * 5 @ _ v > ^ # ] 3 C p F H P k M ' _ 9 y @ _ ' B U +.#.0 &.7 P q < k t H T } o P y h ' b O m ! E 8 .S X { l T 1 ;.[ M } c [ 3 @ G g _ w = z f & S i ! |.).~ ` A.@.Z e.8 p ' >.^ 4 i # x <.Y * v ;.o m $ % % : * q !.!.{ *.i.E =.Y | % $ E @ j $.Q ..A.:.}.d.>...#.[.^.[ n 0 8 r K r K Z @. .5.p.(.i.$.$.'.%.X S e Q o < x : % $ : +.{ . % } { x % & ^ 6 + ; w : : % % % 4 C O 7 V L -.;.$.2.%...-.-.W %.$.2.2.$.,.$.$.(.>.....>.$.2.}.g.8.7.j.'.X 1 M @ | | ; p E e <.@.%.2.%.W ` Z j S &.r r i L j G ", +"$ = = 5 C O 7 V Y i 8 r e Q o > * 4 ] ^ 6 > < ) 3 ; ) y T T 9 5 # 6 o } < + 4 4 * > > 6 3 * 6 J m f G G h + ^ ; 6 J o G _ v < - P } o } t ' E e Y z p v ' o G _ _ t H w = w 5 > h h J O J h k J H ^ + J z Q d , m I k I p p u { u o m b 6 # 9 J ! u b p u A { ! I } p P h J G g O m b + 6 } b J ) ] d 4 + [ } z }.;.#.+.r.<.|.,.! b Y i.v 1 D = } =.t * d +.w : : % % w 9 M ].8 Z B.=.V 6.G : % e _ T (.2 u %.7.F.).K.~.:.d.}.L.'.|.^.h.7.a...!.$./.7.m.y.{.).h.].|.#.i [ 1 f k 5 | % : = ^ X ^ % % ) H : : 3 - < < 9 ^ 4 : % % % % . - p m ( &.+. .,.,.!...W >.,.2.:.:.i.'.>. ...@.-.;.%.'.|.j.7.e.h.a./.-.r m > & = ^ J z V i ` @. .-.#.L i 8 R 1 V 1 N r U I ", +"| % % : ; P G m E a a , 7 o q x | | | & * y 5 3 ; * ^ C l C - H C g k h H 5 + J M J q 5 T b / [ S ( _ ; ] ] * @ P C ' , o k > 5 ^ q f I y H } D M J v f ! } t h o N 2 J + ; @ l I k - ; 4 w x 9 _ _ 9 > k I } f G - q > F ! R L 8 S S V } P G p ' } P k O l @ 6 p ! p h p t - q T 6 F v l t P H q ) 4 $ | ; - g N c e 8 -.!.-.u D E e >.n ! - ^ Q U < F { L 6 M : : | ; C [ |.R [.:.( Z |.5 | G c & c ..o B Y $.y.$.y.~.s.L.1.x./.6.E.G.7.:.)._.:.~.a.v.}.$.e.x.'.G.i r +.j.d #.| % % : | m r % % ; ; % % w 9 P t v < 9 y w | % % : s = 5 P o , N i X ` @.@...>. .$.).).E.p.'.q.9..._.{.$.2.{.g.q.e.F.8.|...&.z > $ $ ) J E A R L #.~ Z S r N c 1 2 a 2 2 e Y v ", +"| | % % : ] + T l G g o b g C ] | | $ w 5 3 ^ 3 5 + H H H 6 @ @ 6 q q @ H P J ' l < l k B e 1 d 7 b h - t u , u ! p I l y * ] ] 5 J z g _ C p G C + @ P M } - C ! Q E g g g J J T H C ; & = & w ; q l h F > h O o < + y > t O b z , m p _ t v p B Q Q Y [ a v + P u M < t e ,.-.( t ) y J g ' _ 6 y H x $ | ; < ' D A c Y n , z u E E B z k h - t l x % P E G % % : 3 H k (.|.=.i./ { >.!.m 3 / 1 D X @.{ { N 2.A.2.[.j.4.p.6.[.~.{.4.a./.}.}.}.}.:.r.0.%.'.0.i.@.r.S ( [ @.V l : % : : = j ' % 6 E Y 4 w , <.h <.(.t _ o / T w C $ % = $ ] - } B n [ i Z ` ;.;.!.i.).(.G.J.;.{.A.Z r.e.i.r.J.h.x.M.v.7.|.@.&.z T = $ ) t z ( e K S S U c V a a Q E z Q 2 / ( C ", +"$ | : % % | . ; q f t _ g -.A # $ | . 3 + ^ y ^ ) + ; ; y y ) ^ y q 9 ) 6 h p G - 6 _ I ! M k h G Q e e S <.c d b > ) F G h 6 C J h q } Q f p > 5 * 3 q g o l C J } J p } g k v C t f J J F 3 + q _ I h + 5 * ^ l v > C l l p f D k C T H J o 7 ` ^.H.D.y.5.W 7 I g } C 9 n a.B.e.>.M q g u b p T ) y ) w $ = ^ < p m Q A d f b M o M ! b g p P @ ; w % s % % % % $ + C 1 j.L R a E 7 U n ; x m m I Z #.A a 1 _.1._.>.j.v.w.a.9.[.w.A.'.i.(.(.,.,.$.s.7.X _.B.&. .a.u q c V : : : | | w l -.4 = l L [ . k M i &.0 %.G 7 Z |.} E Z & . O i % l ` v D B { 1 U Z ` @.>.i._.f.N...|.0.:.[.#.(.l._.:.j.u.F.:.$.Z c b @ | | ^ _ m ( c &.U 8 c A V ..! b M M z d , 7 q ", +"| : % : : % | * A U l q l #.C & x & . ; 6 > 9 ^ ; # 4 ; 6 @ ; * ; H q 9 H + y 9 q H 9 < p k J 6 > ! a n 1 E M O O J p 2 8 V , B ! J < I _ @ q G < 9 _ v v o O v v - 5 ) P p h H T p z u b I ' m O J I p q * . x ; > p ' g v _ k _ C C 6 ) T C } &.2.9.p.N.F.2.N I I M k F k a N R 1 D k J F q < f G y < H & $ & ; T p b D b I p I p o b m b I _ @ ) x $ : : : % : 4 q f 2.>.u m ! M o I P 4 % = . y ' o m 7 r 8.:.Z =.i.l.G.7._./.F.j.~ Z X X ~ +.).F.X 8 !.'.Q '.i 3 < S T : % : w * > [ [ ^ # I +.- s . / +.b '.K m A W !.a ).u & + q K 7 I O 4 q t G b a N &.S X >._.h.4.$.i.y.{.~ !.9._.$.i.8.I./.$.;.S { } 5 : : # - , >.r e r r ( d a ,.' p k g ! m z f 6 ", +": % % % % % % T ` N < 6 c Y T 5 ] w 3 H @ H 9 H ) * + _ H * x x ; y - > + ; 3 @ h _ q 9 6 y H @ 9 U 1 o g ' J > ' z 2 S ..i a m O l 9 y @ _ a r E ! b k J l @ * 3 * ] 5 t b O ' C l } k > 6 q p _ _ } ! O _ ) 5 @ P F 9 H ) 3 y l p p t h - C g u , U $.,.e 2 d f D O I z , I T - > J G l F T y 6 C > F k y $ | $ . H _ l _ F _ t p ' O o O I v F @ 3 4 w $ | | | # p [ $.#.b o O O G l 9 . % % : ; h / Y V Z ;.r U L #.=.W -.~ #.` K Y c Y r [ K /.6.( Q n <.V A ; 4 Q ( % % $ ] @ P z /.K M _ L Y ] $ l 0 t ( (.E , U ~.S .~.I 6 w 4 ( f % $ : | w ; 9 I f 7 A Y L -.].m.]./.D.$.-.f.[.@...%.l.z.8.D.'.R 7 p > q < # h X |.{ ( 1 1 , } _ O C C J k ' o M G 3 ", +"s % % % % % % } L _ q H !.O / @.^ 4 5 A +.v - C T T m r J 3 w 3 z 7 ^ * ] * H h _ q 5 3 5 T l h F e O T 6 h C + v ! { ].[.{ m b v h } E ( 0 0 / M ! E M ' } ' g l + 5 T p g g J _ P P 9 ) ) < D M I o b t < J J G G F _ } } l P 9 9 9 < t v ' g ! b B , ! h G u K ].7.~.~.'.d @ ^ P l < t A Q p 6 ) l M b J w $ : : & ; ; 3 @ > v I } } } G ' t P > H ) # w = & x # 9 ' D , D f b b O h 9 = % % | ; t U Z U &.n N [ U 8 0 j i r ( { / A Q ( r V <.:.[ u f g I F x % 4 h 9 | ] ) _ I b n ).i ! o =.d C @ { ! l >.W &.Y ~.B.i.~./., I l C [ O % % % : : : & 3 F v ' z A &.!.p.6.G.p./.:.}.X -.@.).L.q.8.d.,.R { 2 T V ( 3 E ).#.V 7 a 7 ' b a p F < u , p v J < x ", +"% % % % s % % N z x * b @.z ' ` x . S P !.k 6 > 9 q g U S d G U i.K U { M N 0 Y O # ] ; - C P > 6 6 5 ^ q I P y @ H T !., h g } v g Q Y N n d M g I v l t (.` V D t l k l o D + 3 q < ) # y ' f M } t _ < p g } J J m [ 8.E.^.<.z _ F h _ v J 9 t M p k } _ C k ..O.P.Q.R.S.H./ 6 T C @ k ).4.w.N 3 ; < h P ) = : % % : % = * 9 h v t h l t v _ C 9 ) * * ; 3 + 6 + > h J G } o m b g t H = % % % x T O 7 u B Q / n 1 c Y R 1 2 B B d B B 1 ~ 0 i 1 t h F 6 w : % % : % : * > G D , A n N d M I D > % y b 5 J #.N { U ~.j.(./.$.r Y +.( / L P ' 2 - % s : = 4 # ) q G E ~ k.f.{.l.x.2.L #.+.@.8.s.,./.k.0 U ..o 9 &.q ; a !.O o b o g z i W f C { +. .k T 6 3 | ", +"| : : : % % ^ +.5 : | K r # J n x , U B D ) ^ 9 - > g X C > O ( $.h 8 e.@.L ..c X ) t r !.].6 H m b ; y P m u B _ T O ..^ 6 G h 6 > l p l F k G t < P I E 2.Y ! t f O l > @.W h l z Q J H @ C O I P F < t C 9 _ J h } A =.X N E g ' G G k I ! J - 6 3 T I ' v l 7 -.7.9.r.F.6.V l h p h t R 9.T.F.M 5 F F h 9 4 = : : : % | x + F C > - C < F - q y 5 3 + @ 9 - < h G G G O o g M b g t q . % % % & 5 P } ! D B Q A / V 1 c ( a { a , z g ' ! z _ + ] # . : % % % % % | ] - g E ( 1 Y r ( a D k F 3 : : % & H J b a c K L i X i V #.~ M D Y 9 v 1 H | x # ^ * x & x T } R g.;.=.x.a.~ i L 0 .r.g.;.^.^.S !.+.9 ( { | 9 U c J p J J _ M ;.+.h k j Y } P H ; & % ", +"| : % % s | m X - . - ` C 4 1 t ) =.e w w x ^ 9 q > P ;.O _ v 1 -.I $.q.7 0 S E V b X ^.Q { 9 D (.'., a N g d $.v ^ Y ( 6 C P P p G 7 M J ; F < g J > o D b ! m 2 ` v J < ).i Q U <.V M I h > b _ * ) / ;._ < g O _ Z { ' _ < b m l } { j 7.F.x.}.K g F v D b k ' m D z u f b M M o ' J p f d &.( k P ' I t ) * ; . : : % % $ * - C T T < l _ < h F T > < h t J ' ! E u u E E z m b } v - ] % : : $ ; > g u B d { A 2 1 N r c [ r / 7 o _ - ^ ] . = : % % % : : | & = * > } u V Y [ i U r / , b h 3 % : : x 6 k m Q ( e r Y c ( ( n V 7 ! ' v 6 6 y y C l t P H w | 4 P , R a Z ).-.Z 8 8 S :.*.>.].*.@.=.[.<.7 8 f = M ~ M _ < P < < / ;.7 h t 8 =.p _ 9 * = : ", +"$ : : % s & D V ^ 4 f { 9 - n # > '.e H J x y ) 5 H < ( K T v !.1 O ).D } i./ 7 f c !.8 h ) F -.k.>.N #.=.y ( r @ O 6.c a o y - P d Q 8 g C N A z 0 C O 8 c P o ;. .G ' &.f.e r &.A G J J F t @.} ; 3 N X k _ v b m ~ Q o 9 9 g G 9 ( {.:.g.x.5.a.'.a Y Z c o I } I l h p } M ' C v p k ' J _ I G k g g t q ^ 5 + 5 = : : s % 4 y 6 H > > l h v J p J I I g o ! E a A A / / ( A Q 7 f k - # : % : & 3 q k D B d a 2 1 R K 0 S j U 2 f p > * : s % % s s % $ w ] * ; 5 q p m 2 1 8 i L L i c { f v ; % : % 4 q G D { V r r N c ( / e r 1 A 7 ! I J v k o M o O v @ & $ 5 h ' D n K K S i K j (./.[.^.(.X ` (.&.E n } y { =.a t F < - o ` ..d f O n .d t > ^ ] $ ", +"| : % % s % 4 ; % $ H H P F & x - e 1 P * ; ; x 3 I 1 M Q 3 7 .O ~ z - u (.2 D o O (.g t f i k.a.b M >.f p ..B R g.B.a 7 G @ 3 3 V f c P <.` 2 Q ;.! n >.U ) } ).o P h '.+.V j.r M H ) P o <.7.V ( K 1...B F _ p F < G _ @ q _ l l k ! ;.i / A A z v Z j.r m v _ P H y H - _ o ' ! m z ! F y 6 T _ t T y y 9 > l } ^ | : % : : 3 # ; 6 6 F t t G I M m u B a 2 1 c 1 1 Y Y N e 1 2 u ' C # : : : . H h k ! , Q / n r S 0 #.` #.8 A M l 9 x % : % % % : x y @ 6 + + C J O E 1 r S Z <.0 S N d ! _ x % % : 5 C g B a ( e e n / 2 V n c Y 1 / d z b o O E , , E g P y & x 6 v O Q 1 c r r Y U K ~ ..!. .X K Y m q > # . I D _ F > q T O L R b 7 1 K L , G P T 5 $ ", +": % s % % % % % % % % % : $ . # 9 T 6 3 # ] x ] @ p E t w q j ` m H ^ 6 b +.( f k k ~ O d A Z 9.~ N 2 >.M <.g.&.#.8.W ! g - 3 @ g =.[.c e 2.U C e d 3 B -._ q &.%.> @ I ~.r g ..M t ) y k Q g. .c n #.g.( 2.&.k a ,.j.;.U <.j f _ 1 X ).].2 O b m b G ...C v D %.=.V O > H _ ' 7 .d.U.u._.O 3 * y l _ - y 9 F J M v . ; ) # % = # ; 3 + T h _ J I ! B A ( 1 e U &.&.8 K K U &.R 2 z } l 5 | % : ; F p } f , Q A N [ 8 L #.X <.R A f k - w % % : | x 5 9 < > C C > l } M Q e &.0 0 j L 8 V , o - & % % $ 5 > ' z Q { ( / Q d , { Q / c e N V 7 m b b B a V A f J H w : * P } z 2 V c c r &.0 ` ;.$.%.@.j / ! T = % | * ) 9 - T 6 @ > v I p g 2 r d D b I h ) | ", +"% % % % % % s s s s % : | $ x ; 5 H 9 H @ # 3 g d ) & x < r @.F w x ) h k g J 5 @ < B B - @ ! &.! _ , K D ~ (./ e ].=.1 < h ' c #.:.q.z +.W J O @.H H ~ c C g -.n o } &...> T X F < y @ h , :., o B %.L c X >.@.l.V.c.x.[.{.W r m j.2.K I > @ @ F _ M [...~ a.o.W.X.O.H.@.r X 5.K.Y.Z.Z.`. +s.{ 9 _ O D e ' 3 5 T > @ # u X x s | . 4 . ] @ 9 > h ' m d / Y Y U U i K <.<.S U &.Y A E g l ; : % % # C } O f E a / c r 8 8 i S U n a z k C w % : . 3 T C h l v k t t k } b { N &.i K 8 R r 2 D p 9 = % % & ^ C } m u 7 B u D f m z u 7 d V e V A u O ' f Q / A f J 6 & | w > } z a A V r [ Z ~ ..%.'.,.;.#.r u P & % : ] y q q F T T C h _ J G O f d d u o J H $ ", +"% % % : : : % % s s s : | & x # # + ^ @ y 5 q G @ w x ' ~ >.Y ; w # @ y ^ ] x ] > G t - @ * x * ; @ J J T k O + h c f F - p u / A K .a S R ' 2 } P { (.<.[ Q ,.V P t 0 D ; { K p v H 5 F [ <.q v c _.b l /.|.}.p.K.7.-.+./.! D B <.k C 9 q q q v E -.C.v. +.+++@+#+$+%+&+*+`.=+-+;+>+>+Z.,+Y.J.,.g.'+I.n.1.u 4 x 3 < _ A / : : = 4 4 $ | $ . ; 6 t O 7 ( N [ i L S L j S i &.r c a , o O w % % % ] F J k M m B a V / c c e R c A u g v + : : . 5 9 C v J J p k _ < l G g u a ( n V n / , z I F ^ | % : | 3 > G o b b O I k v v k p ' b 7 a d E ! p C h ' ! f k P ^ = = . T J o ! E A e U Z ` .. .>.!...#.r E q | % % & 3 y - C q q < h h _ p O m d , D o v 9 & ", +"s s s % % % % % % % % : $ = . w # 5 ; 3 ) 6 C T + * + p E A u - F f J * w . . * 6 q - H ; w . w # T h l C 3 ] 4 * 6 h > H _ G J o , a ! M r n ' J g R %.Y B 1 <.b y b K h ! r l - p k - M ;.R < k #.S ^ u _.e +.*.%.D b Q i.R D D ~ B.g.-.U c 0 ~.t.)+,+,+$+!+-+~+~+;+{+]+{+^+/+(+>+_+~+:+++!+&+<+[+}+}+|+1+0.=.< I y 9 ..Q ; ] 5 @ ^ w | % : . @ h ' 7 2 N &.0 <.Z <.!.-.i [ Y V a ` [.B = % : : # C G G ' M m B { 2 A 2 c N 2 , ! k < ; | . H > P v p I k p v F - P v M ! m B B u E D g J h T # : % s | ^ > v I I I k J < q 9 > F < p O z u f o t 6 ^ 9 P v F 6 ] | = ] 9 h } O D 2 e K Z ~ @.W W -.+.S 1 z q | s s = ; y - F > q h _ J l k } f u u D g l 9 . ", +": % : : : $ = | | : : $ & ] # x ] ] ] 3 ^ 6 q @ y 9 - 9 5 * * C M G 6 4 w * T h 6 3 4 w . 4 ) t O _ @ ^ ] w w 4 + h ' _ - H H 6 q p k 9 q ' ! m } k O b o G h T * ; M D ! / } q T q + ; p L E C B ..V 7 Q z G #.g.Z c f 7 +...Q .L.2+X.3+4+5+X.)+`.!+#+$+#+~+6+;+6+(+(+^+(+^+{+{+;+-+_+=+@+#+7+,+,+W.8+&+9+0+a+{.` H v #.o Z -.- O Z #.y $ | $ * H v M Q e 8 j <.#.!.x.#.r r 1 A d 8 !.5 : % % % . @ J k G k G ! f b f B Q 2 Q E O _ - # $ ) l m { G O g t C 9 @ @ 9 _ G I g I p l J < > T T 3 | % % % $ 3 6 _ J l l l C T 5 ] * 3 @ F l k O g k P ^ 4 3 + 9 y w : | & * - J o ! z 2 e [ L Z <.` #.0 i e d g 6 | s : $ # 6 F C T H P < h v k g ! z D m } h 9 . ", +"% : = & # y y 5 # & = & x 5 ; # & & ] 5 3 3 ^ 5 ; ) @ ) ^ ) 6 P > T 5 ] y v t T # . & 4 T G z d k 5 x w x ] + _ _ H > k h C @ 3 + h < ^ 5 T l l v p O p T P - y 9 F T - l g g l H # 4 4 ) h C > M a 2 i o - P / &.M P B U 1 V -.b+c+d+e+!+=+_+~+~+;+_+f+!+:+6+(+g+/+/+/+h+h+]+{+(+6+g+~+f+>+i+%+$+d+}+%+&+|+)+Y.U.z.M u Q 9 ( b } i Y A H 3 | : $ * > } / -.}.e.-.@.a.1.+.e c 2 Q a W / x % % : : % * > v v h l p t v p O f V #.B g v 6 w w < Z ( $.a } I h 9 @ ; # ) - _ _ h C 9 + ^ 4 ] 4 = : % s % : & ; @ > h P > 9 y # & % : | x ; @ C l v P T ^ w $ $ . & % % % | 3 F G o m z Q n 1 &.i L K i r ( Q ! l 5 : s s $ # ) q > H 9 q P F _ J g ! D 7 f I _ @ = ", +"| 4 3 + y > < C 6 ; x w 4 ; * . = $ $ & . 4 ^ ) # ] @ + ) y C _ F > T 6 F _ > T 9 9 > g m k v < ; * ) F k J J k T @ @ 5 4 w x ; F } J F @ @ 6 ) # ^ J o ' m G P k I ' M O J + 4 4 ; 6 - p ! b ' k } g m v ^ 3 ^ @ q F t u a j B.X.,+++~+g+6+6+g+/+^+(+;+>+>+/+g+6+6+{+j+k+j+h+^+6+(+_+f+;+:+i+++@+8+e+$+}+)+Q.Y.4+t.[.8 f m P . I @.+.G P @ ] $ | x P ( W &.].a.0 !.x.2.K r c / Q [ $.v w x k n I % w ^ p } o h q F < _ t 7 !.).u } _ ) # 6 R S G B I J v P H 3 # . * y 9 q H 6 ; = : : % : % % s % % : x 3 H P _ F @ 5 * = : % % % & ; ) + 9 - 9 3 # : : $ $ % % % % % * F } ! m b z , 2 n N r [ N / d B o P 4 % % % % & ; H H 9 @ - - - h I O D u d E } t - . ", +": 3 @ @ H P t v P H 5 x w 5 ) ] & = & & . ] ^ * 4 * H 9 + * 3 y y + 9 > < @ 5 H I I G G > q P C > T > ' O h J ' 9 * x & = $ w 3 6 9 6 - 9 3 ] x x T b b v J C v b G I l F J F ^ + l M g ' G ' k I O M b J C _ I ' o u n Z ~.L.4+Y.$+=+g+/+/+6+g+g+(+6+-+-+g+(+g+/+^+h+^+(+{+(+/+6+g+~+=+@+%+d+Z.$+d+e+l+m+W.m+n+o+c.v.!.2 / * y h 8 %.z _ T # $ | x f ~ 1 j 8.` 8 :.f.j &.N V 2 1 !.~ 9 ; g / f Q : ^ } p c U @ 6 , ~ e v [ [.@.f J P @ 5 o @.u _ J _ C - y * ] = = = x 3 * x ] & % s % % s % % s s % % : # @ - > 9 5 * w $ : | * $ 4 3 3 y H ) ; w : % : | % % % % % % = ^ < p _ t G b z B d A ( A Q 7 ! k - . % % % : | 3 y 6 + @ 9 - P t ' O u d { B o p F . ", +"$ + > 6 T P v t P - 6 # w 3 + ) 3 # x w # T ^ . w # ) + ] 4 ; H + ^ 3 ; 5 3 3 @ < h l h q + ^ q l > T P t _ p F # . & = w y > t _ y 3 x & $ | $ # - J } J - y 9 H @ C > q J o t v ' g o ' h t o ' v ' A S $.[.7.f.x.k.d.u.V.3+)+`.!+_+/+{+{+(+-+;+-+;+g+/+(+(+/+{+]+p+q+p+k+/+~+_+~+:+@+e+l+8+l+,+d+7+.+m+r+s+t+4+5+u+'.S %.c n m e #.n 2 J ; = | # 8 +.{ /.(.r @.7.$.&.c 2 2 { L ).1 < ! Y , } ] * z M P &.m ] } V q J p Z (.B M G > F k U L o v B ` ( l + h m k < 9 w x . ] 4 | % s s % s % % s s s % $ 4 ) T q 9 y # x & | x J + 4 ] 3 3 ^ ; = : % % . 9 F 5 | : : % | = 3 @ @ H C v } M b b D m m f M l 6 $ % % % % | 4 ; 3 y 6 > < k O f m , A A B b t - & ", +"$ H C - F h t v _ F y w & x ; 6 C F 5 ; + 9 x . w 6 ) x . w ^ T - 5 4 # T C H + 6 ) ^ ^ 9 ^ 5 - J l _ _ I _ @ F > 3 * T k I g o F x $ | : : | & ^ ) 6 C 9 ^ * ] * q } v 9 q v f D u f E g G M M k D 8 i.f.k.m.b.O.v+2+X.Y.`.w+$+@+~+g+^+]+^+(+/+/+(+-+6+/+/+6+;+;+/+^+{+q+]+-+;+_+f+=+!+$+l+8+7+}+m+c+c+Q.)+<+3+v+4+T.:.U -.n b V S z m ..D 4 $ : 6 0 X L ~.2.K }.x._.i 2 a / n (.:.a g i [ @ s % f A _ c [ - ^ G U G T D ;.j o ' G P C O e } @ / [ G R c < 2 Z Z c ' * x . x g 1 F } m 5 < p x s $ 5 # & ] 3 H - q + 3 ; ; 5 * h ! . w 4 ] ] 4 | % % % 4 , ` Q w ^ / t s $ 4 x # 3 y - < v t I ' o o ' p C 5 | % % % % : w * ^ T - v G } ! u u { / 2 7 b p T x ", +"| + - T > < v _ F - + w & . # 5 y + ) ) ^ ] . . # + x & = ] T ; w & w ] 9 h F 9 ^ ; 3 @ < F 9 5 3 5 ] # 6 h T > P T < G O g P y 3 4 & = & x ^ F C y # x = = = = . + t p p l P v _ > q l } } ! Q r ..7.0.b.o.O.V.x+9+)+`.w+@+>+_+6+6+{+]+^+^+^+^+(+g+;+-+(+(+/+/+^+]+{+/+]+;+>+6+;+f+++$+l+y+y+}+c+r+r+W.W.[+<+X.1+U.u.6.Q f O l T > > u +.k & % : ; u , d +.i c ).].~ n { / / Y :.).&., <.N k q + r n D .e F q F L V - N -., g I v > T d 2 5 < i m G ;.n C 1 W R M C 6 ; 4 3 2 [ O N r I N n ] | P N N H & ] + q 6 H C h < P > z e | = w . = : % % s | ] Q [ x : v c | | $ x w = & # ^ @ H - P l J p t < y # : % % % % $ # y 9 > h I o D B , Q A n V , m ' F . ", +": 4 @ + 6 F < p m T y x & & w 4 t .9 T + 3 ^ ) y ] . x ) v @ & $ = ] 3 5 ^ # x x x # + T P < ^ ] w & # 6 H ^ 3 ; 5 + @ 6 9 ^ 5 C v 6 y q C C v F ] = | : : $ . 5 q C l g G @ ; ; 3 3 ) C O ( <.(.z.v.u+O.c.2+<+W.}+w+Z.=+f+:+-+g+(+(+6+(+(+{+^+{+(+(+_+_+g+{+^+^+]+]+]+]+(+g+g+_+f+#+w+y+r+&+&+.+r+P.Y.P.|+X.0+1+O.I.[.o q t q ^ @ F } J 3 $ : : x @ h k g 7 c j S ( A 2 / / 1 #.[ ! p / [ < = 5 ( a 7 -.c l { I R Q _ X ,.n ' v C q q &.m : ' [ _ m .., _ +.<.' G p _ > y 5 a R _ ( [ p 2 o % G Q u u 9 = w ) 6 P v I 1 L b < / S y & | % % % % : % & C 0 d $ $ k O : | w # & | | & w 4 # * + q < h F > y ] | % % % : . * y - P v k o z d { / V N Y / , O _ w ", +"| : & & # @ < L / q 6 5 x . & w T { @ y 5 + P J P ) ; F X +.x . w ^ l C ) w = $ = . 5 - _ 5 ; . = & w ) > h q ; # 4 w x ; 6 y 5 y v ' } ' l @ - v ; & = & 4 ^ h } p t I J q ^ 3 + C p Q L ,.~.f.l.t.a+3+[+&+8+w+Z.Z.=+:+f+:+-+6+g+/+{+^+{+^+]+h+]+/+/+(+6+(+(+(+^+^+]+h+/+g+-+g+_+:+!+i+d+`.c+&+r+&+Q.*+P.|+z+0+1+A+u.[.O + l H # + T 9 ) x = : % w ) C v O 7 N R e 2 2 ( e e Y ( B O J - ; | % & > _ t B I - z N u < I S 8 D J P h @ I U - % ' ! > j / h c 2.c b M ! O k _ d j h t [ h k M # 3 &., v 5 : $ x 3 _ G M b c 0 m v 8 8 H $ % % % % % % $ 4 7 X I $ & 4 : 9 7 B t p - | w q P + ] ^ 9 C h _ C - 5 & % s % : w * 9 C J I o D Q n c r Y R [ c 2 m P . ", +"% % : : | ^ , !.m - k I @ y = & 4 3 # * 3 3 ) @ + y T g ~ M ^ 5 - p > H 5 w = . x + M %.n $ : : | & ] 5 3 ^ + * . & & w + l v H ^ + ^ 3 + ) 6 t F ^ y F p k _ J p k v T v } M d i '.a.E.C.C.L.D.'+U.<+`.w+%+$+++@+@+=+>+>+;+6+g+-+6+(+g+/+{+{+{+/+/+{+^+^+(+;+_+(+]+^+(+6+(+g+-+~+f+!+$+l+7+`.y+c+}+m+*+Y.<+n+t+1+a+B+e.b # q + * 5 ^ 3 # $ | % % $ # H l g u Q { E 7 a / Y &.r 1 E ' h @ x | : $ ; 9 q q q 9 - > T T q _ J _ < C 6 3 V f 4 : & O a J q C K Z E m E B u ! k #.a 9 i O $ n b & G ~ v & % : $ ] 6 J G g O I ' t o W 2 # % % % % % % % = 5 K U 9 $ % % k g f O H 1 I | I { j } * ) q h J I J F 6 4 % s % : & ; - l I M B a V Y [ r R [ [ 1 d ! P = ", +"s s % : | + r &.h g n W 2 1 . p { - . 5 Q A > 5 ; 9 h d #.3 5 ) - h ) F t @ ^ + C J g ..> . = & w y q H 3 H ; | : $ . ] + + H q ^ ] x # @ H @ F l g g t < h < T I z h E Z W ).x.m.u+S.X.S.4+O.4+ +)+.+w+$+#+Z.++++=+:+=+~+_+g+_+_+_+_+~+6+/+{+/+(+(+g+{+h+^+/+6+(+^+/+/+]+(+g+g+_+=+!+i+8+&+.+c+7+8+&+r+P.<+ +S.5+T.b.q.B 5 5 ) 5 5 ) ; w | : % % : & ^ C G ! E u f z d ( e 8 S r { M < @ & : % | ; T - - - T P F H 6 9 - P P T 2 _ l c + : % | $ 4 5 H P M m o m Q { / d V 0 ! ! n 6 ; V l = J i g I # : | . 6 < v k 1 / O k R .G * % % % % % % | & p =.m # = % % O l { l @ V T _ e Q / t ) q C p O o ' l q * : s s : x ) - l O u { n [ S S i 8 U R 2 f k ^ | ", +"% % % % : J <.! H M c Z Q l p K K q * f { N G y k z D i a ] 4 ] ^ 9 5 + l g O J T F R ~ ) 5 5 6 _ I _ ; - A H : | & 5 C > ; x & = = = ] y @ ) ^ + H T q q - 6 k r Z W ).h.F.N.O.C+R.r+&+.+r+}+`.}+7+d+%+e+++++++Z.++!+++f+:+>+=+_+g+~+>+-+6+/+{+^+/+(+{+/+(+/+g+/+{+/+;+{+{+/+6+_+>+++$+d+.+c+}+c+&+&+m+Q.[+<+C+S.c.b.5.Q H @ + + ) ^ ] . : % % % $ $ * T v } ! B B d / N &.j <.8 n 7 I H $ % | * H < l _ C F < > 6 + @ > P C H 7 } M ) : : : | & x ] ) q v I b u A n 1 n 2 7 ! ' h T ) H w : # _ I $ % | | & ^ > v ' X j O b >.Y v @ $ : % % % % | = c ` - x : % % = Q D ] u } * Y A ! H * 6 > v } o f O J F * : % % | x y C p f d c U L #.#.Z L K R A b h 5 $ ", +": % s % w 2 K < - g 8 M ) ^ } ` f | ! R ! ' ] C / l @ / l ] x # H v v T ) 5 ) H ) k @.c F P a W c _ H k V K + # q t h 6 4 = | | | | = # H - - P q ^ 3 ; ] # k <.a +.^.r.C.o.1+D+Q.}+8+l+,+w+w+8+`.,+l+w+$+$+%+i+e+#+++Z.f+!+!+=+>+_+~+-+6+6+(+^+^+{+(+g+g+_+;+-+_+6+/+(+k+p+{+-+:+!+Z.#+7+c+&+r+W.W.*+[+s+D+X.0+v+T.v.{.E q C H 6 @ + ; w : % : : % : . y C G f A V 1 r L #.+.` +.S ( f > $ | 3 t k o g J < > _ C y ) 6 > q H + H H 4 % % : | $ = $ & * 6 C t O z Q n V V a E m M J h H # & : % % % % % % % $ * 9 F h 7 ! o ` #.o l H x . | % % : . T U U 6 . % % : w j J - a ^ @ <.u H ) + 6 P k O b M ' v H 4 : % % : w H _ g z { Y K <.~ #.~ Z S r a M P ^ & ", +"% % % % > ~ <.k p N V ^ # H r S q - K a ] = ; A E | O z . x * @ H @ 6 3 * 3 H h @ , j < 6 E r p N n h a ~ n p m 8 .c w $ : | $ & x + v J h < @ 3 # # 3 ^ G W g...~.*.0.3.v+z+P.&+c+d+d+d+d+d+`.`.8+w+!+!+i+w+,+$+$+$+Z.=+>+>+=+=+~+>+~+6+;+6+g+g+~+_+_+>+:+~+;+:+~+;+;+6+/+(+6+~+@+e+l+}+.+Y.[+*+Y.R.s+R.z+z+3+4+o.v.g.B > h t t l h 9 3 w | : % % % | ; C G m ( N R j -.!.,.2.(.;.K Q v 4 3 h l k ' O G P - < q 9 - P C > 6 y 6 ^ . | % % | $ = | $ w 3 9 C G M D , Q a , E m b G l 9 * . $ % % % % % : : = ] @ H T P M j <.b } l T H @ 5 4 4 4 # T l ' 5 = : % % $ , g v 5 % * Y , p F 6 C t ' o b o k F + 4 % % s $ ] - t b 7 / N 8 j j <.~ ~ j r , } - ; . ", +"% % % % P K 2 l B S k & x t Z Y I Q W , J 9 M N < > R z 5 H y 5 ; ] x w x ; 9 T t L 7 3 F e b < @.( ) / 8 _ 6 u 2 > g ; = & w # 5 H l o O _ H _ E &.d T ' .0.0.9.r.l.D.T.0+R.Y.&+}+8+y+7+w+8+y+}+`.l+Z.Z.,+$+$+e+%+$+$+#+f+f+Z.!+:+:+f+f+#+Z.$+l+`.w+#+Z.Z.f+~+~+_+>+;+g+-+;+-+_+++$+,+7+}+*+s+[+[+[+Y.[+<+9+3+1+a+4.a.( ' b z E z b } l @ x | % % : w y F I z / Y i +. ./.j.[.:.'.X Y f + H P l k J G k - @ > T - _ v v h P > F 6 # = : % | = w w . x ; @ q _ I o m m m f ! o I t F y # w $ : % % % % : = . ] ) ) + 9 D V v G I t v l _ P q y 5 # # ] x & $ : % % : | = = s s : T v 4 * 9 h p O f z z g l H x % % % x + C ' z { n Y U i L <.+.<.U 1 z v 6 ; = ", +"% % % % ; t l v } G * = . > Q O ^ _ c &.b 9 a &.p { <.[ J 6 9 < l _ q + ^ 9 @ * E &._ $ J c - O W f > r o . & t r k T 6 5 9 h G p C < _ T y _ R f } W L X y.B+N.4.t.N.b.A+C+R.Y.*+r+r+}+,+$+%+l+`.y+w+++%+,+l+8+8+}+7+,+w+$+i+l+d+y+}+Q.9+x+t+C+z+|+R.[+*+r+`.,+#+>+~+~+>+_+_+;+:+@+i+8+8+.+Y.R.|+)+W.W.D+n+X.C+x+O.v.^.( g u , A A d D ' _ 9 5 | % $ ^ q _ G f Q c 8 ` !.}.].6.|.$.=.8 , h F l p p k ' t C @ C - > t I I G I p t C y * & : $ w ; ^ ^ 3 ; @ H - l J I ' g I G p t < 6 ^ 4 . $ % % % % % $ = = ] 3 ; * # 9 9 C p I ' } M o O ' _ H + 5 ; ; 4 . : % % s % % s % % s s % = ; q t ' m a ( A d b l ) : : $ ^ F p o 7 { c U j K <.0 0 i n Q g C ^ ] | ", +"% % % : 5 < t v l ) . = = w ; 5 * ; y T 6 6 _ ! g f V J 3 - E W e.q.=., k v y . A Y z ; I o 6 8 d ^ a K } = ; + S Q - k O O O g k t ' } J h e +.m %.k.8.H.4+4+5+0+0+3+3+<+)+W.r+r+W.P.c+%+,+,+++w+y+i+#+7+`.7+`.d+%+w+y+}+c+s+C+t+U.v.m.u.U.O.u+A+o+V.A+o+5+0+D+P.}+i+!+=+>+=+!+++Z.e+l+7+r+*+Y.)+P.Y.)+D+z+9+n+3+A+K.*.R m { n N ( { B M ' J 9 . : x 9 _ t G M 7 V [ 0 W ).~.}._.,.` K Q p q C G I ' o I F 6 F q > p O M f ! ! ' v P y 4 = = 5 F F C T 6 T T T P _ v v J t t l F 6 ; 4 4 & : % % % % % | . w ] 5 ; w . # @ C } M b f m E 7 z ' v - + ) ) ; . | % % % % % s s s s s : x + P } ! , n &.Y / E G y $ % # q J O ! u d n K S S L S &.n , b l y $ : : ", +"% % % | ^ < k I J 9 4 & $ $ & . . ] * # 5 ) ) ) 5 5 @ 5 ^ P D Z }.` z J C > - ^ g b # w * D r b ^ & 7 e t = O h U u @ - q + 6 C J v < P ' z |.%.S k.u.d.A+D+<+Y.&+&+&+&+&+y+y+`.}+}+.+8+e+8+d+++,+8+++8+c+}+d+7+r+}+R.v+2+ +3.3.K.9.f.s.u+2+K.K.0+3+2+T.3.b.'+w.y.3.A+S.D+P.}+d+l+`.8+y+&+W.Y.[+Y.Y.*+|+s+R.<+9+3+4+M.x.8 a '.f.#.( 2 a u m I P ; = * T _ _ k O D a 1 &.0 ;.'./.i.!.` U Q _ * ^ G I } o v - F > q v ' g f ! m b ' G h T ; & 4 9 C _ < > F h - F h > - C h h _ P H 5 4 . . $ % % % % % % $ & w # ) 4 w . # y P } M f D E 7 Q 7 f G l T T 6 * x | % s % % % s s s s s : * - J D Q c K <.L r a M - & & 5 C ' ! m E Q n U U [ &.r / 7 b t 6 . : $ w ", +"% % % $ y l k k h @ ; x $ $ : : : : $ . ^ 5 * # # 9 C + ; ) 6 6 H 6 ) * ] 9 g l @ ) q l k J y w $ | y q . w G ( Q q * ] ; ] x . x x * q o f (.-.8.b.t.n.[+*+*+y+l+l+,+8+8+8+7+7+y+y+c+,+,+}+%+e+`.w+#+7+c+8+8+)+m+&+C+v+U.S.c.B+B+0.D.C.D.H.7.8.p.J.k.6.g.8.x._.` -.%././.h.b.C+*+*+W.m+m+r+*+D+D+[+[+R.s+D+9+n+C+4+o.1.S a i.(.N V 2 a , D g t ^ | * 9 P C J ' b u / X }.>.` '.2...0 N u q x # h J J k < F 9 T > _ J O o M O g } p P H * x ] 9 P l < F l _ > F q @ H H 6 y ) 3 x x = . | : % % % % % % : ] # * 5 4 & & ] H C k o M M u d { A f g v F F > @ 3 & % s % % % s s s s s % * F G z A [ Z ~ j r Q g 9 . $ 3 < o m z u 7 / Y Y V { B o k h ^ . : w + ; ", +"% % : $ y h t v J H ^ 3 # . = | : : | $ & . x 9 ! ' T y ^ ] 4 x w w 4 4 # 5 > q q < 6 3 5 @ + & $ = . ] 9 h v _ y 4 . $ | : % : | w 6 h J ! K ~.k.k.m.A+P.s+.+l+w+w+w+d+8+d+8+7+&+c+&+%+7+l+%+`.c+i+d+`.`.$+`.y+%+}+[+z+0+R.0+4+3.t.A+n.v.0.F.C.b+0.g.%.|.].=.N c &.L ..;.` @.7.K.x+0+z+Y.}+m+[+}+Q.D+)+m+<+z+*+n+u+n.r.Z +.{.` N c / Q E ! O v ) = * @ q C l J ' D , !.a.X 0 $.5.(.[ Q I ) # T C _ v v l T ^ 6 T C v k f b g G I J > y 4 . 5 H _ _ P P _ _ < - T ^ # # 4 x & = : = | | $ : % % % s s s % w ] 5 y # # x ] + q _ } g b E 2 / d D g v J P T y 3 w : % % % % % % % % % : * > G z / 8 j j K r a ' T ] = * 9 ' f u u , A 2 7 ! g h q 5 w : | * > p + ", +"% : $ . H p ' G v @ ^ 9 T @ * ^ ] $ $ & . x p X +.J ] 3 ; x . . 4 ; @ ^ 3 ; 3 # # x w w ] H 9 @ @ C _ v I o g - y 4 $ : : | | $ . ) h v O ( Z i.f.A.u.<+Q.Q.d+,+e+i+e+%+w+,+w+d+7+y+l+i+,+d+7+y+8+++$+$+$+@+e+%+i+.+R. +x+)+R.3+v+n+*+0+A+5+S.Q.r+C+T.C.F.u.h...0 ` ..,._.!.W (.z.b.A+t+)+`.W.}+7+*+*+m+.+*+W.7+s+o+u+u.7.8.~.#.U #.(._.Y B 1 E v H + q P l < l k o E i.` Q 1 L W <.n ! P . 4 q l k k G p q 3 H h k I O u m O p l v - 5 x . 5 F J p k J J t C q 6 ^ ] w = $ $ = | | : | . = % s s s s s : & # y T y + ^ ; ) T < p } ! u A 2 Q , D o b t q 6 ) 4 | % % % % % % % % % % w T J D V U S <.<.S V ! P 3 & # C o D 7 a , d B M k < y ] : : ] @ h M f > ", +"% % | 4 - p ' I h ] ; 6 y ) @ - @ ) 3 5 ; q U #., H w . . . w x # 3 ) ) 9 q 3 x w 4 ] # 5 H ' u M m m ' k } T 3 # = | | . 4 4 4 @ J ' J f c <.'.w.c.a+s+[+r+l+,+e+e+w+%+w+l+`.y+8+7+Z.,+d+`.`.y+8+e+%+,+$+Z.,+8+d+Y.|+n+D+y+*+z+9+P.}+s+P.s+&+e+c+s+ +3+U.t+u+s.j./.$.>.).2...!.7.p.u.U.<+R.)+8+m+|+z+Y.c+R.Y.W.X.o+C+K.@.j.=.U 0 8.$.{.8 , .<.8 } y H q < > > P h { @.z G E n ( { f < ] % & 6 < v _ t h H # @ l } ! m B z O _ - 9 3 & : $ 3 T P , B v h C T ^ 3 ] & $ . | | = = | | = . & : % s s s % % w y 9 @ y + @ ) + y - > < k g m d a 7 u u f p F y x | : % % % % % % % % % % | 3 > } B e i j +.j 1 D P w : w q } m 7 B z u b t T * $ % % ] T l O u , < ", +"% : & 4 T k I k F x x 4 ] 3 5 ) + - 9 > 6 l d M q # 4 # * # * * ) y # # 3 3 # 3 y > < < h 9 - P T H - q ) 5 w $ | : | ] H F P F t f } G u V Z $.*.m.u+2+[+c+w+%+%+e+w+,+,+d+l+,+d+$+f+l+y+7+`.`.7+}+y+8+l+`.y+m+*+<+X.n+W.&+D+ +X.D+Y.W.<+9+P.&+s+<+3+X.S. +v+v.0.x.~.)._./.2.i.].G.L.b+s+n+*+`.[+|+z+m+<+C+m+ +4+3+X.p.%.|.U r 8.6.[.#.7 f >.e g w . ) @ H y 9 T 9 i n y C V ;.Q k , S ) J <.p > k 1 7 h p 9 > I f f b ! b I _ y ; . | % | 4 - 0 n h < h C 6 3 ] . = $ $ & & % | $ & w # x & $ % % % $ 3 q < h C - q q y y y y @ T F G m u m f b ! M k P # : % % % s s % % % % : % : | . 5 P b A &.<.~ #.R Q v & % = @ J b u f o o I > 3 $ s | ; F J } m A ( l ", +": : = 4 F k ' } - x = & . ] 4 # 3 ) 6 6 6 _ p y 3 ) H 6 9 > < _ G - * 3 ) 5 ^ y 9 _ G I P y * # x & = = $ | : : : | & 5 > p t G D / B , 1 U ;.}.1.J.n.x+*+`.#+$+$+#+$+#+Z.i+$+$+i+++!+i+d+l+d+7+`.`.`..+y+c+c+m+P.m+z+R.P.[+9+ +2+1+A+A+V.b+b+U.o.T.U.O.V.u+B+b.'+w.x.^.{.g.g.].f.1.E.a+z+R.Y.r+P.R..+m+0+[+)+C+o+|+a+0.G.:.U L r.|.&.a ! , W - : : $ # ^ ^ ^ y 6 _ ;._ . T U W p M D / D M [ T J n |.Q b #.g t V :.z m '.z h 6 4 | : % % % 3 S 1 l q T 9 H 5 * # x & = & y b + $ & ] ; 3 # # x | : % . 9 v k ' p l > q H y 6 @ 6 T q I m o I I ' I I l < ] % % % % s % % % % | | : $ | | & 3 _ u N <.-.X j 1 ' x % = ) _ o o } k v - * $ % % 3 h G f d / r 8 ' ", +"% % : 4 F I O g _ y x = = = = . ] * ] * ] # 3 ; 5 T > P I k l y q P J J T 5 5 6 C h F q T 5 w $ : % % % : : : : | = ] + > P v } 2 n E A L ;.(.g.r.D.n.0+*+`.e+i+Z.i+#+!+++$+%+e+e+w+w+8+d+l+`.d+d+8+}+r+Q.Q.*+[+|+)+z+3+t+x+t+1+a+u.d.E.H.z.h.5.5.9.B.l.w.A.p.y.p.A.H.*.a.{.7.^.5.z.l.u.V.5+<+[+R.Y.`.D+5+s+X.A+o.2+L.B.L._.>.W G.'.X N o ..N = : : : = & & . * 5 7 [ # x T ` M ] * D i 5 A m ; y , j P S , H f f ..Z A / - ^ . : % % % % : f 8 P y + r u h 7 < @ l y . = c 2 # | w * 3 5 3 ; 4 . % : * 6 h J I I t C > H 6 @ H @ 9 > p M g I p p _ _ > @ $ % % % s s $ : % % $ | $ % : : : $ 3 J { i +.+.j Y b 3 % . ^ < p J v _ ) w | % | * < G f d c &.0 #.g ", +"% s : w C I ' ' t q ; . $ : : $ & . . 4 w w + @ y @ ) + 3 ; x x * h m M h - - F q H > I p - # & $ $ | | $ $ = = & x ; 9 _ J } 7 ( d V U @.>.:.9.y.4.V.n+Y.c+%+e+i+!+#+$+$+e+%+w+%+e+,+d+8+d+7+}+`.7+.+W.W.)+<+ +2+t+t+A+u+c.B+L.1.{.i...Z <.<.@. .~ L =.%./.7.z.H.k.s.1.8.8.{.7.h.l.p.t.T.x+X.D+[+)+R.x+5+2+u+n.4.J.k.%.'.j N j ].~.r E E @.v % % : % % % $ | & & Z / O w 1 Z > $ 5 ~ 9 ) i x w ; S ' f ` H 3 l _ [ 8 q 3 w w | % s % | : * ~ p * ] _ W ( u -.d o =.M & t Z f 5 - d ( J ! P ) 5 ] 4 ^ ) 9 _ p k I k > - 9 H 9 - > P _ g o O I t l F T 6 ] % % % % : z S @ : % % : : % % % % % & @ E r S j U V f 6 : . ) > q - 9 * : % % % x > g z A n 8 0 +.` } ", +": % : w T k } G _ @ y ) # 3 x $ | | | = & 4 6 9 6 3 # w = & w x 3 F ' ! o } l C P t D A B } v > C p t q + ] # # # H _ J I G o Q V 1 e <.%.|.^.E.t.T.v+<+W.&+d+e+++++=+$+$+e+i+$+#+i+i+,+,+7+8+d+`..+&+c+Q.)+<+n+0+v+V.U.u.4.E.:.<.&.U j +.=. .}.~.-.8 i U &.0 ;.g.x.x.f.^.{.6.^.9.H.D.t.a+2+z+[+)+|+<+0+5+u+o.4.E.^.'.8 G l ( U U R d ! O g ; | : : : s % : : % % e f - w 8 2 } 4 E V % 1 A I ^ , '.N [ 0 T w > - K c x . | : : | $ 4 4 & b =.] w * 6 ..1 } W ( o ` F & D N . P 7 m 1 > j f + 3 + l <.- M ).' } -./ G / k l z } t t n U b g k h q @ ^ x | s : s s s , z x s % s | | $ : % % % J =.1 2 1 N A d b - | & 5 H 6 y * | % : % . T ' z { N U j =. .!.b ", +": : : w T t G k - ; + q k &.z y x & = = & w w & & . & w @ - ^ 5 + H h I C l P F g c K [ V d z D D , / { ! p h q y q < t k O m { N r j %.6.^.B.C.c.1+ +R.Y.W.`.$+$+Z.$+i+#+$+e+#+#+e+i+,+8+`.d+8+7+.+r+m+r+*+s+ +4+a+T.t.H.{.(.U { , d / / d B u z z 7 / , z E , &.%.[.x.r.6._.[.7.9.w.u.u+t+ +|+)+R.X.x+c.o.v.D.*.|.~ a h h A L N { m M t T ; & | : % % : % % s % * 4 % : _ P $ % D T : { I 4 9 N Z Q ( e _ 3 f d O =.G P $ w ; 5 @ 6 5 ; 1 R ] x # E L @ 7 X l E Q # x <.G & ! < #.J 9 (.p + 5 H # Y 1 B / _ { :.e a ,./ { /.1 J 7 |.W $.` O > o / g = % % % $ $ 5 Z 9 : % s s : | $ : : % % l e J f , A d D G + % : * ^ ; 4 $ % : : $ + l f Q c 8 <.=.%.2._.b ", +": : : & H l t t q ] * ; - g v q H 5 4 ] 3 # . = w 4 ; @ _ _ < t t 2 j } y p z p / ` Z [ c V a B f z d Q 7 , { M G ' o M m , A 1 r 0 ,.8.9.l.y.K.4+x+C+D+Y.P.y+,+w+w+e+%+e+%+%+e+w+8+8+7+7+y+`.l+`.}+c+.+c+c+*+n+o+u.d.B.g.$.;.<.U 1 d E 7 / n a { B q ; 3 H G ' b S ~.h.*.].:./.~.f.0.M.U.4+C+D+Y.|+3+4+b+v.L.1.{.2.L E h G r L Y 2 ! } v 9 3 w $ : % % % % % % % : % % % % % : : % % % : | 4 9 J k q g t . + m 5 | a C $ & @ - > h h - q N n * x x <.h ) @.' ) @.l 5 t @.) 4 ; m 8 6 M j 6 ^ 4 $ % a a 3 H T J i.c b %.N A 2.b l V /.J 8 _._ h e B k . = | 4 G M Q Y & % k g t * _ | % : ] : U M ^ k M D D ' - = s % & & | | % : : % . - p f { Y S Z ;.'.:.|.m ", +"% % % = l n U u ! - x 5 6 + @ y @ 9 q _ - * x * y + T P G ! ' < ^ V ` ( V W ).[ i +.j Y N V 2 Q Z ..2 B D B 1 &.R n d a c [ i X ,.|.7.x.H.w.m.U.1+2+S.z+[+P.r+7+l+,+i+e+%+e+e+w+w+8+y+.+c+}+l+l+l+d+d+}+7+d+y+y+&+<+2+o.'+p.C.L.A.1.j.>.K @.x.d.E.g.v & & 6 f ( B V >.].e.^.[.:.j.5.E.I.U.V.n+s+[+z+t+O.M.'+B.^.~./.i.` a ( <.Z &.a b J F H ; w . & . 4 w . = $ : % % % % s % : : % % % % % # @ - q q 9 # | % % % : % | ] 6 < J p p J t F B c ; 4 F 7 x I Y * J ` < H A ~ } + 5 R 2 - Z v } l ] * 5 1 A 4 3 + a X F A =.o c R _ < 8 #.- j +.+ @ ~ y # + @ H / S # u } : u v { v + Z | % > B G X 3 = 6 t G J h # % % % : % % : : % % : y p M a c U <.X ..'.|._.f ", +"s % s @ , V <.f i b @ } [ J 3 + E @.O ^ D { z < < ' h J g J T 5 J ~.8.).i { { 2 i 0 S R Y N n ( -...N { A V #.h.).8 Y Y ~ $.%._./.}.q.r.w.D.M.V.V.4+t+ +D+)+m+.+y+d+,+l+d+,+w+y+`.`.}+.+r+&+y+8+`.`.y+`.8+d+l+l+,+8+}+W.n+S.x+5+1+5+b+C.z.q.9.*.l.~.m * x P B [ ( [ ).e.B.f.|._.[.*.w.I.U.v+X.R.|+ +A+3.A.5.g.{.f.*.B.a.=.+.@.Z N Q g C 6 3 ] x w ] # 3 + + @ 6 ^ = % % % s % % % % % % % % ] @ H H 6 + . : s % % % | * q l k } g } } J F J i * x & w & 5 @ 4 9 G ; * k D * 4 ^ a ( E k T ( &.+ D O t +.g k H =.g - ` G 9 %.} < v .u v ,.t * x &.Q H > F ! :.o _ 0 y : / + c & T 8 % P 8 = 6 1 % % | * 5 ] 4 | % % % s s s s s s % & h b d N K Z Z X >.$.2.(.g ", +"s % s t J <., > #.t > N ` C x [ v j G h M R &.b d ~ k i E @ - 2 B.5+0.K B ( g m L -.X 8 R c 1 N R U &.K L #.2.^.` S K Z [.'.!./.6.a.H.A.N.3.a+u+O.A+t+X.D+s+W.m+.+8+d+d+w+w+8+.+}+l+y+c+m+W.r+}+8+}+c+7+8+8+l+w+%+w+7+c+Y.D+ +1+5+5+2+4+5+5+K.w.1.6.j I P O 1 L <.-.6.*.h.g.|._.6.h.D.B+5+ +)+)+s+t+U.D.*.8.f.z.B.l.E.q.$.-.W +.e d } T 3 * 4 # # 5 9 h v t t t h 6 w % s s s % % % % % % : . y T T @ ) : % % % % | * > l k M z E z b t > l V 4 = | | $ = 4 4 x ] x . . ] ; # ^ T F P C < V &.* G x = D q # ' ( H M ( 4 p @.g J , .G ` I ^ H J b <.F ' > 0 S v a W T * * Q p % B J ] S v % o t % % % % : % % s % s s s s s s s s : x < f ( [ Z @.-.;.$.2.2...J ", +"s % % : G S C t S + 6 +.f $ b Y , k = f 6 ( < , { X I |.( u ).b+&+t+_.[ ` [., 2 |.F.h.>.8.S r %.).` =.%.q.^.'+z.'.W X a.:.(.[.h.G.p.'+t.B+a+u+V.u+1+0+ +<+*+r+c+`.`.}+y+%+@+Z.8+}+8+w+++i+`.`.l+8+l+e+%+e+%+%+%+i+#+Z.l+.+W.|+t+a+b+V.t+|+P.z+5+a+4.s.}...Z j ;.|.~.1.l.r.8.|.g.5.l.t.O.t+s+&+y+P.0+3.H.*.h.h.x.z.r.H.q.>. ...~ i 2 o C 3 # # # ) T p g o b ! o } P H . : % % % % % % % % % . ^ 6 ) 5 w % % s : : x @ _ k b u Q Q B b v q H @ * $ $ | | | . w & & $ $ = 4 ; ^ 9 C _ t p M m P : : : % % = # + T y 6 H 5 P ! > J 0 <.7 9 3 # q V b ' G 8 p ~ Q f @.+./ H 6 #.^ - Q w ' i | + K 5 % % % % % % % % % % % s s s s s % & ) v z c U ~ .$./././.(.` h ", +"% % % % Q 2 6 [ J ) Y -.C = 8 [ w : : 4 u d 4 L d k t ;.K H.z+.+m+E.<.8 7.]./ 6.].0.}.W l.@.i.0.A././.w.J.'+V.l.^.6.*.h.[.7.J.b.M.I.u.3.o+o+O.o+O.5+0+C+R.Y.m+.+c+}+}+}+&+$+$+w+`.`.d+l+}+.+l+e+,+,+,+d+l+f+!+%+e+e+e+i+d+}+m+R.t+A+o.b.c.5+x+2+o+A+3.'+y.1.8.6.5.D.N.t.d.*.{.h.F.0.b.u+t+R.c+7+*+0+v.r.8.6./.|.[.g.q.}. .X @.Z i ( ! < y * # # H J M o b ! u m ! J C 6 . % % % % % % % % % . ; ; x $ % % % s % | # @ l g f B Q , D I F 6 ; = | % : : : | | | | | : : | = * 9 P k I } g M J y = % % % % % . ] * # ] * ; ^ q h d !._ ^ * ] & w ^ * = p [ > o z C 2 A P T l &.t h 5 & u Q ) , L t f 8 # % % % % % % % % % % % s % : # + h M 2 [ #.!.).[.j.).'.<.F ", +"% % % % O 7 ' p 4 3 <.U Q ) ~ R 9 I & & W I ) ;.O y 0 f.a+c+.+c+C+~.<.>.F.=.S ].f.w.;.!.7.>.s.a+p.h.J.a+m.M.4+L.A.E.4.*.h.J.3.d.5+M.K.U.R.x+X.*+b+1+Q.z+[+P.7+w+}+}+c+}+c+e+$+8+c+y+w+c+&+c+7+8+y+}+8+}+}+Z.w+7+,+w+e+#+%+.+m+)+9+t+U.I.A+x+4+T.b.u.v.v.3.b.t.L.m.5+0+O.K.A.G.A.C.J.n.1+z+*+`.l+m+S.J.{.i.W j i 8 #.>.W #.#.~ j S 1 E t q ; # ^ q I O b m B B B E M G t H & % % % % % % % % . ; * . | % % : % : . 3 9 J } z z E ! I P + # & : % s % : | : | : : % % : | | * > l ' g b z D M k ^ : % % % % = x ; 5 5 ; 5 y T M #.~ h ; & . $ | : % 4 h P : | & x ; ^ y 9 ) 6 ) 4 : & q G 6 q M 3 l { $ s % % % % % % % % % % : % $ * 3 - O a U -.'.:.6.g._.>.i q ", +"s % % : & * ^ $ $ . O O 6 5 B ( l x w 5 8 2 m =.J 1 J.|+$+!+}+`.A+x.@.r.l.:.$.i.d.[.;.9.(.e.3+ +N.N.C+V.a+ +2+B+3.v+m.E.w.o+D.D.3+a+n.A+|+3+z+s+1+t+Q.9+|+`.c+d+.+c+y+c+y+%+i+8+8+++l+}+c+7+l+c+}+.+}+c+e+@+l+d+d+,+l+d+d+l+,+8+.+W.R.C+ +C+C.F.l.H.A.L.t.K.b.O.[+m+[+2+o.3.u+v+B+b+A+C+[+r+y+c+Y.3+m.{.>.K V B b } 2 e 8 j L K K c Q M _ y 3 * - ' f , A ( 2 { Q E D O h H & % % % % % % : . w ] . & | % % s : w ) - J } M M O G > 3 . $ : : % % % % % : : : : % % % : | ; P J k O ! u d , E t . : % % : = 4 ) H 6 y y 9 P D N V G ^ ] = | % % % & w % % % % $ w ] 5 3 # # ; ] = $ $ 4 * * . % % | % % % % % % % % % % % % % % | w ; t { U @.'.~.^.h.8.:.%.S > ", +": : % % % % : : | | $ . # 5 ^ ; x * p k h J J a 8 q.D+_+-+>+`.Q.b.g.).D.k.9.:.;.A.(.~.5.{.5+w+.+)+ +R.A+C+r+0+5+3+c.u.4.u.5+9.v.n+U.o.t+z+A+9+Y.O.0+n+C+<+`.m+W.Q.Q.&+.+.+l+e+8+i+l+y+y+7+%+Z.`.c+`.l+,+!+,+7+7+w+e+i+w+%+w+i+w+y+}+c+r+`.)+U.'+s.z.G.H.k.d.K.0+m+*+z+S.A+n.1+<+v+4+v+n+y+`.Q.W.[+0+w.V y 4 = = . x - M 2 n Y &.Y V a M v @ # 3 - G f Q A n ( / { 7 E o ' l * % % % % % % : $ . & $ % s s s s % . ) P v J k J P y 4 = % % % % % % % | ; 5 ) # & : % % : : ] h G k o m , A / Q b @ % % s : w * H > F T q F > C P C 6 3 x $ % % % % % % % % s % : = $ . x x 3 ; * ] 4 3 5 @ H 3 = % % % % % s % % % % % % % % % % : 4 h a L !.j.e.1.E.w.x.7._.+.C ", +"% % % % % % % % : : : $ . ] ] y H v < * x # y z _.'+7+k+]+~+%+*+o.l.f.z.B.a.}. .].:./.2.J.,+_+!+7+W.*+ +D+P.9+z+C+n.b.I.b.b+l.t+x+B+c.|+u+a+[+x+U.X.A+3+ +P.`.)+Y.P.r+r+m+l+Z.c+y+r+c+c+y+Z.i+y+y+i+8+c+#+7+}+y+$+,+@+%+e+#+i+@+%+l+7+`.Z.`.R.x+b+I.d.d.p.4.o+b+[+z+S.5+5+4+0+z+D+5+t+X.&+)+)+*+s+C+J.c w = = & ] 6 - ' / *.<.8 e 1 7 } v H ^ @ C g u d A / / / / { , f O - $ % % % % % % % : : % % % % : : : : & y < _ < _ > 3 w & : % % s % % % | + C _ p t q 3 | % : : = > G g f B { c Y V z _ = % % & # ) q l P < _ t v t J l F y w | % % % % % % % : : : = w . & * @ 9 9 9 + ^ H q P > y 3 4 : % % s s % % % % % % : : : : : * b [ .{.x.E.N.I.m.p.x.{.!._ ", +": % % % : : = w . | : : $ & 4 q < - 6 3 3 4 # N G.n.&+]+j+g+Z.7+R.2+B+v.t.B./.W X -.;.}.u.`.>+>+#+c+*+D+C+S.1+2+B+M.b.K.I.T.4.a+o.B+4+3+n.0+ +b+5+x+5+2+|+ +8+R.W.Y.)+W.*+}+i+d+*+Q..+&+7+++y+c+,+%+&+8+#+8+`.i+i+$+w+8+e+++l+++#+`.c+,+!+7+r+)+9+1+b+T.O.z+1+3+W.S.v+V.v+S.2+2+*+0+S.X.r+z+D+|+ +x+B+$.> . & & x * H I 2 2.-.i n / m k < 6 ) 6 P I m 7 B d Q A A , B O l x : % % % % % % % % % % % : : : : : : $ ^ > - C C - y 3 $ : % % % % % | * F ' ! m D o t * : % : $ ^ J M m , c K U c , k # : : ; 5 9 F _ P P v J I ' ' ' v T ] | % % % % % & x * w w ] w . x y < _ < h P F h v J v q T ) & : % % % % % % % % : : : : : : @ 7 0 2.h.w.4.n.U.o.I.p.z._.J ", +": : : : $ w # ; ; 4 | | : | & 4 ] * ^ P l # 5 V z.B+t+#+^+/+~+++d+&+|+1+3.x.].[.>. .).q.L. +i+6+-+,+Y.z+0+v+V.u+c.U.c.c.u.p.A.'+u.3.a+c.o.4+U.M.1+A+B+1+R.D+Y.9+c+*+<+R.R.Q.l+P.W.Q.*+m+w+%+.+c+i+}+c+w+,+.+7+Z.w+8+l+8+!+i+%+f+$+y+c+,+e+8+c+W.P.R.0+x+9+|+z+)+m+2+v+5+5+D+4+o+[+9+1+X.R.X.9+|+t+2+u+l.2 n O ; k h w 3 _ u [ N 7 M k P 9 + ^ @ C k O m D u u z m O J q * | : % % % % % % % % % % % x } = % % % = 5 @ F h J _ < T ] | % % % % % $ ^ < b B { , , M - = % | $ w q I ! 2 U #.Z r A g 5 % = ] 5 6 > h l v p G O o b O g C ^ = : : : | w ^ + ) 5 ] 4 4 4 y < p ' I I ' I o b g J < F - 3 = : % : : : : : : | | : : : $ > A X :.r.y.B+o+A+u+n.I.k.].} ", +"% % : | & x 3 ^ 3 4 . & = = & x 5 ; 4 ] ] 3 5 b [.'+u.4+y+-+/+>+++$+}+R.0+n+|+v+D.a.f.k.J.T.Y._+{+Z.Q. +5+U.U.b+T.T.a+T.4.y.w.I.3.B+3.b+o.K.M.T.T.u.u.o+C+S.0+X.W.[+n+<+9+|+*+s+W.W.)+W.%+d+&+.+%+r+}+$+,+8+d+!+l+%+i+w+:+,+Z.:+e+l+l+Z.d+}+.+r+}+P.s+&+s+C+ +W.Q.0+x+v+5+R.v+5+9+P.x+[+z+n+n+9+<+X.4+T.m.f.h.i ~ #.f c ,.i ! N $.I } [ < ; + ' D g } o M g ' ' l H 5 . : % : % % % % % % % % % % % 3 K = % % % = ^ H P G o g } I > w : : : : : $ ^ J D , / / ( u p ; | | & & 3 F b n S @.X j c m 9 & $ x 3 @ 9 > _ l ' b z D z b I l 9 x : : | 4 y - P < 9 ; w 4 @ < ' } ! M ! D m B u b I k l > + 4 $ : : : : : : : | & w & $ $ @ a ~ }.z.d.o.o+1+o+O.n.N.*.f ", +": % | = ; ) y ^ 3 3 * y 9 C q ] 4 4 ] ; 9 ) 5 J Z k.v.y.t. +7+f+~+~+:+!+~+/+6+6+l+0+B+K.U.a+x+e+6+@+&+S.u+A+o.T.c.U.o.B+u.D.C.n.T.U.c.A+c.3.B+U.c.u.b.5+2+x+t+X.<+X.C+C+z+R.s+D+[+)+P.&+.+c+r+&+7+y+W.8+7+}+7+#+$+e+i+l+#+e+@+@+e+Z.f+f+w+`.}+8+`.m+`.Q.R.|+s+8+&+D+C+x+<+s+S.3+n+.+*+m+|+R.|+|+[+9+1+A+O.4.4+*.+.Y c ).{.e u A (.M m ` + 4 k R %.e ' o g , !.k - R F $ % w # ) ] s : % % % % % % % % 9 % % % % w 6 > v o m E D f ' H . : : % % % . T M d / ( <.i O @ ] ; v F . ) O n L .~ 0 e u h * $ & w x 5 9 l p o ! z E z ! g _ H 4 $ | 4 9 < t k ' _ H y ) > G D D z E u E d d B ! } p l > ) 4 w & | : : : = = w ; y ^ 3 x 3 O K i.^.0.3.u+2+1+V.a+M.w., ", +"$ . w 4 ^ y ) ^ ; x * + C t H x . 5 H H P 3 5 h B :.t.t.r.r.J.o+*+7+w+,+#+>+(+k+j+-+%+Y.X.v+z+%+#+w+Y. +5+a+3.c.5+A+c.T.M.y.C.a+c.o.o.o+c.M.B+b+V.B+T.4+2+v+x+C+S.v+x+0+0+S.n+<+R.Y.m+r+Q.m+Q.Y.W.P.[+[+W.r+.+7+d+d+w+d+l+i+w+w+e+++=+f+f+#+i+i+l+d+7+z+n+|+m+,+c+Y.<+[+c+)+ +0+X.r+8+&+W.Q.Y.[+Y.)+n+t+o+U.X.p.}.&.&.7.%.} l J ` P g r : H <.1 R { v J ' e &.K a / T x + h F S g : v U w < &.H % # P 4 % 4 y : ] q _ p M D B B 7 m J @ & : % % % % x P g Q 2 ;.!.! P J K I ;.j ' G @.q.}.~ K n D h # : | | w ^ 6 < J M f f z m b ' l 9 # = $ ^ C k M z f I v _ v ' ! 7 d a A 2 ( / / , o ' _ - 9 3 # ; ] & | : : : . ; @ l l F 9 + C 2 +.:.9.D.u.a+V.c.U.3.A.A ", +": 4 4 x . w ^ y # . & w w ; * w x C } ' C ] * < I 2 r.o.I.l.5.h.A.b.n.2+z+.+i+;+/+^+h+{+_+f+l+&+s+W.&+ +U.K.3.o+1+4+O.c.B+A.J.c.c.n.o.O.U.3.b.o.u+T.O.A+1+v+1+2+1+v+2+x+S.3+X.z+R.Y.W.m+m+W.m+P.W.W.s+s+P.Q.y+7+7+7+l+e+w+,+w+,+%+%+$+++%+l+l+l+7+`.c+s+9+<+Q.c+y+c+}+y+}+m+[+D+|+)+y+m+.+d+`.W.Q.W.Y.)+S.S.2+u.h.&.<.6.1 I C e ' * c 9 $ E W I ! C t v k } 1 !.> < 6 F / H P L ] y p Z > M #.# + m 8 l 4 } X 5 { >._ Z _.B Q 2 a Q B } h # : | % s % w < f a c V M ' ;.u ) t a F k +.l.W <.[ V m h . % % : & * - _ O D u f m z b } t 9 ; & . y J g u E m M O } o m B d / n Y R N V ( B ! G C @ + 5 H 9 + w | | | : w @ t } f ! G _ C G { Z _.h.y.N.u.u.m.N.H.Q ", +"$ ] # 4 $ : = ] x & $ = w 5 3 x x C / D l ^ ^ } I k ` N.t+<+2+N.G.z.E.t.5+9+}+f+f+#+:+/+-+@+r+t+t+W.R.o+b.B+O.1+v+5+o+O.o.L.4.a+u+b+c.A+a+n.B+b+o.b+o+1+t+2+x+2+1+x+x+3+n+9+ +9+|+*+P.*+*+[+P.P.P.Y.s+Q.r+&+&+y+d+8+`.`.7+7+,+,+,+e+e+!+Z.$+$+d+y+Q.Y.)+s+|+9+D+Q.`.7+Q.)+*+P.W.m+Y.m+}+.+8+,+.+W.s+[+r+|+1+o+o.9.<.(._.V B M R ; f [ T @ &.K 9 t I ! o M ! L ..h h l N a ^ Y m | $ p j > M ( % ^ [ i ^ ^ ! i ! V +.[ >.}.( N Y e i i Y >.B w k { z H f t I Y r u z Y 2.v H y ; ) G .8.S K N d b > = % % % . 9 v O E a Q E D D m b p q 3 w 4 + p m 7 d u D E B B B Q ( e r &.U R e A B g v 6 + ; @ < P H 3 & | | | # - o E n 1 a u M J p d S %.].z.s.s.G.r.q.B ", +"| # 5 w | % : : $ 4 $ $ . # y 4 w M K B M k I b C l J !.M.Y.l+.+X.4+U.4+9+<+R.`.Z.}+&+c+Q.s+ +2+0+3+0+3.t.o.V.5+4+V.u+T.b.'+v.a+a+c.c.A+V.c.c.c.3.U.v+2+S.x+2+x+2+2+1+t+3+C+n+X.X.|+R.D+|+s+*+W.*+)+m+c+c+&+r+r+}+}+y+`..+}+y+}+`.7+`.e+Z.++e+8+&+Y.[+s+D+<+<+R.P.W.}+}+Q.r+W.Q.W.*+r+m+.+`.c+m+Q.W.Q.*+9+o+U.A. .d U R h < ! l ] D M 4 5 A e k 7 c #.Q j Y K i.1 E O =.M B X < $ T r l y c 5 % < j I % ] 2 V 6 r S z W <.n r &.X _.[ &.'.G f z g } 3 &.b V >.$.z , >.` M k 1 z ^ k j.~ r R r &.m y $ : % | ^ v ' z Q 2 / , u z m b G H ; 4 ] 6 p m d a A Q d 7 , d { / e ..8 R r V , f G - y 6 H > k t > 6 ; w | | ] > f 2 K 0 L &.1 D J v o 1 +.>.:.[.:.~.(.b ", +"= ; 5 4 : % | = . # 6 > _ # . & < 7 +.Y 1 E 1 f ; t y < '.u.[+d+,+`..+.+Y.<+X.D+}+y+W.n+S.<+[+m+9+v+c.t.4.c.4+5+o+v+A+a+n.t.B+u+A+V.a+o+4+u+O.b+B+o+2+C+X.S.3+ +0+2+x+0+0+3+s+n+S.z+R.s+|+[+W.Q.[+)+.+l+7+.+&+r+c+}+c+}+y+}+y+y+}+7+l+++>+~+f+i+,+.+[+R.|+z+D+Y.Q.m+&+8+8+7+y+}+c+c+y+c+y+`.}+.+Q.c+d+&+[+ +o+b.5.e p _ > ] | | : . . % = H v C v S -.r ` / B #.e v f #.f A S ' @ m / ; 7 e T ^ 2 K F w _ Y 3 P K < D ~ z / Y #.g.i.&.:.0 g Q D [ ] C <.h 1 [.` o A i.z _ Y '.V 5 A /.Q V U ,.$.-.; : : ^ K { O @.+.V +.;.2 R e D u G q y + H h O B A N Y c V { Q d a / n #...r c A u M _ _ 0 +.) l M } k _ > + w = # < 7 U @.,.>. .~ r E l - h D e i <.#.=.~ G ", +". * 4 | % % 4 H @ H B '.o $ O -.e Y '.0 R Q R G 4 k - F k ` d.0+*+c+7+7+m+[+z+D+W.c+Q.s+)+r+e+l+|+a+'+d.t.b+u+o+4+V.a+U.n.v.U.O.u+A+O.V.4+a+b+c.A+0+t+ + + +9+n+S.0+t+S.x+5+S.x+C+X.X.9+<+[+Y.Y.*+W.Q.&+c+c+&+W.r+.+.+c+&+W.r+&+.+`.8+++=+_+=+#+,+c+*+Y.[+|+R.[+Y.Q.&+7+,+8+7+c+Q..+.+&+&+}+}+&+Q.&+8+c+Q.*+n+A+t.2.! q * | : : & 4 * ] . & 4 y ' &.Y I O M M f } < < J 6 > G 5 ) o q ; m k = + 2 Q @ 6 M k 4 d G 3 N 8 A K &.~ e.>.2.a.R ! b i A > 2 A p +.$.f } 8 ` q F R 0 H T r r M ( !.;.&./ $ | ; g ( |.K Z =.S /.5.#.~.j., ,.%.C _ K c ! X U V -.j c Y +.>.7 7 a a [ g.( Q u b v 6 q 8 o @ k b f ! g v y x x y } V 0 2.g.{.[.%.<.Y Q p _ I D ' m B A 1 _ ", +"| & | s s % $ x ] w } +.= | < ..} ` [.,.j U r h ^ } r W T > R q.I.2+D+W.m+m+)+R.z+<+*+Q.*+c+7+Q.2+L.r.k.4.c.V.V.V.U.T.c.K.m.n.u+4+4+O.u+A+T.T.5+t+3+3+C+ +9+X.0+t+S.3+x+4+1+x+x+0+0+t+C+9+*+*+Y.P.)+Y.)+)+)+[+*+W.Y.)+W.Q.*+P.Y.Y.r+.+8+e+++i+,+8+r+Y.s+R.z+<+R.s+[+W.r+W.Y.R.D+9+<+s+)+P.&+c+}+c+`.8+7+}+Q.[+S.b+E.L + $ : | x 6 T q H H H < p B , ! M o o g M v q ) ] & & | % % % % % | | % = ^ ^ : # q . @ k ] y a O k ..j i ~.@.|.j.K D { Z E 7 1 h A ).=.b f j 2 + o @.7 ^ ' S _ C e ,.n ! 5 $ | ] - c [.r 1 R 0 j.a.;.[.:.<.!.j h a S j Z (.W @.8.%./ +.g.~.}.>.u E R ].Q O I t - ^ ' 0 y q k f B z O _ H ] 3 < 1 (.=.:.^.5.a.j.).(.R { i 2.O + + y C k + ", +"% % % % = q h b | $ [ E = $ 1 n } ;.:.,.X +.[ h h } U i # ) ) I <.e.t.O.0+C+0+A+a+u+x+2+1+C+t+a+E._.j.B.N.T.V.V.a+U.b+b+4.4.o.O.x+2+u+O.U.U.o+x+0+X. +C+z+D+ +S.3+ +3+t+x+C+t+x+0+t+0+ +9+z+R.|+)+R.s+|+z+<+D+R.)+[+s+)+Y.|+)+[+|+[+*+.+y+8+8+`.&+*+s+<+z+z+z+9+3+X.3+v+A+V.A+2+S.X.S.3+<+[+Q.7+8+`.l+d+`.&+P.n+V.v.{.l | $ . H h l t k ' O B Q 2 V V 2 7 b M g < H * . $ $ | % s % % % % % % % % % : % : : : % % | # ^ J j n z N 2 [ j a o z R Y g T q d @.Y G a 8 - # 2 S d O ( j g v U ~ O H ) 5 # @ l X j.[ e Y X q.!.0 a...n j u C O @.e / ~.~ =.:.[ 7 ~ i.e +.,.m p n i.z v h F 6 T / 1 z .r z A -.L v g l ) z 2.g.!.j.a.e.a.9.d.*.;.+.!._.} l - y 9 - * ", +"% s % x z 4 ( V $ 9 !.t 3 y %.o a +.,.'. ./.8 t G ! :.c < > 4 w ^ } K }.r.w.A.s.w.y.L.y.D.k.].Z z D ;.*.N.a+4+o+A+V.V.U.v.M.O.4+3+t+o+u+a+5+C+9+z+<+9+z+s+R.9+9+n+9+X.X.C+ +X.C+S.n+ +S. +9+z+D+s+[+R.s+|+D+z+9+<+<+|+<+9+X.<+R.D+|+[+)+*+Q.Q.r+W.*+s+z+X.X.3+x+u+b+v.m.M.v+D+[+P.*+9+0+n+9+s+&+`..+c+`.d+`.`.P.3+n.A.n = x 5 F I } M 7 Q 2 e U i K S &.e E O J C 5 w = $ % : % % % % % % % % % % | : % % % % % % % & + _ v h l p O o f o k h q 6 ^ ^ 6 C t C - e u | ] O Q > 9 A A > T ( j , P f Q I D e ,.6.}.` U |.:.&.'.i.Q U n q F Y U l r W B 8 ~ z 7 -.<.b ~ 8 6 T r =.G F > 9 ^ G <.a ! 0 r { ..[.<.z ` ! q S 7.6.}.g.{.^.5.'+n.H.7.q.s.j.L V D I v _ 5 ", +"% % 4 N q + j 9 5 / ~ F T A @.J u c =.$./.;.b - k R }.N 7.8 = $ = < G n z A j <.K 8 <.+.( o < y ^ h i q.p.B+V.o+4+o+4+T.K.T.u+1+t+1+c.O.A+C+n+z+z+n+n+X.<+|+z+n+z+9+n+n+ +n+X.n+C+ +n+ + +n+n+n+n+9+n+9+9+9+n+n+9+ +3+C+3+S. +9+9+<+9+9+D+|+|+9+9+D+X.S.5+A+b+t.p.y.E.L.U.<+Q.}+y+Q.P.|+D+R.s+m+y+}+&+&+`.}+.+m+[+A+m.$.3 $ 3 P ' ! z { 1 [ S L j L i r N d p 9 3 = % : % % : : | % % % % s % . ] 4 x | % % % % % % : = x * 5 ^ y 9 F - 6 # 4 w $ & x ; @ / l m Q + : $ = # ^ @ - - @ y t m < # f r D / B A '.>.U ~ 2.j j './ m U Q @ p 1 J b U k o [ z t a Z u 7 U t ] h j e H ^ ) * ) V Y 3 ! <.7 z #...{ i &.+ J .:.X ,.j.j.j.5.t.m.x.z.p.'+f.p.q.&.n r (.1 ", +"% w M d = ( ( | F Z D ] > ~ V u f / =._.}.K P < d ;.>._.e.,.5 x D ) b 0 y b N 0 V z _.m 6 M 8 A ; > U 8.A.K.a+V.o+5+o+n.K.T.a+4+2+O.O.v+0+9+n+9+n+ + +z+D+D+|+n+9+X.X.n+<+9+9+ +n+<+D+z+n+z+n+C+C+C+S.C+X.3+0+0+0+S.0+x+x+0+3+X.C+ +C+C+S.S.S.S.1+t+4+u+T.v.y.A.y.k.l.C.A+)+c+d+8+7+}+r+c+r+&+y+c+}+`.y+y+`.&+[+s+S.b+1.} | * F k ! B { &.Z ~ <.S S Y n a D t ; & : : : : | & 4 4 & | s % % w 6 T + 6 3 & s % % % : : : : $ . x ] # x $ % s s % : | . ) 9 2 f M H & $ . # y + 9 T > > h _ C q 6 o G ) T h ! V r Y [ R { Y V I g D 6 w M G ^ d M = ! A C ; 2 V 7 n P 4 4 B i _ ] 4 4 = l &.h 9 N B I 7 ` &.2 +.m ; { _.-.L -.$.i.(.h.N.B.*.H.K.t.z.p.F.%.j.~.|.<.", +"% ^ 1 2 b &.d P 2 ,.m y I @.E g b [ K $.'.n 5 _ i ).~ .z./.V d O ] e b y [ } R J / a.o ! +.E <.5 T c 6.w.v.U.O.A+3+D+3+B+T.v+n+X.A+A+x+z+9+<+9+z+n+ +z+9+z+9+|+D+z+z+z+D+|+D+X.<+D+n+9+9+n+9+X.S.S.S.0+0+x+t+S.[+Y.2+4+v+1+0+S.t+v+1+v+4+v+A+5+o+u+o.K.I.b.u.4.p.8.j.B.n.9+.+7+l+`.r+y+`..+&+y+.+}+c+c+.+c+Y.z+s+|+4+J.U & w 6 < g D A 8 #.<.<.8 Y { 7 D ' @ | % % % : $ w 4 4 w & = : % | H P P P < F # : : : % % % % % : : : % % % s % % % % | w 5 9 q > < ^ ; # . . * + H q > < t G g k C _ 6 = ; 9 l f Q 2 { 7 u f b } P + w = | | | $ ; x : @ H % ) e n C $ % % > R p = $ $ | : M { 9 a ' 3 < S :.L Z i M ; L ).L i Z =.;.%.G.r.:.[.H.u.x.h.L.x.f.E.1.}.z ", +"% 3 D G P / E B #...2 l 7 ` Q M Q Q / ,.i./ x M $.S c [.l.).2.~ 5 m U 3 9 B d a F j !.! ;.[ 2 h ; ) Q ).l.t.b+U.o+z+U.O.M.5+z+S.|+x+4+9+c+[+Y..+z+[+r+<+9+3+s+*+z+ +n+<+z+z+D+Q.[+z+n+9+n+C+ +3+0+t+0+o+o+o+A+4+|+ +U.b+c.a+S.)+v+o.T.3.M.o.B+M.3.4.u.n.u+A+c.M.s. .0 g.s.M.t+D+[+)+s+m+`..+&+y+r+&+.+.+}+}+Y.*+Y.|+0+K.2.+ : . + P ' E 1 S K U e A m O t H & % % $ & 4 5 6 y 5 ] x . | % & F v I ' p _ @ $ $ = | : : % % % % % % % % : : % % | 4 + - > > F C q H ) * 4 * ^ @ > l J } o f O P + x = . ) < O D Q 7 f o ' t > y * $ : % % % % % % % % % % d / ] : % % ) Y G . | $ $ | : > g g ] | = y &.` E [ R J 9 ~ ).j N &.~ -./.A.9.2.i.w.G./.l.k.7.k.t.6.X G ", +"% % = = . H q k ( Y E q b A k u 2 g A $.2.B w i ~.u L '.%.i./.<.I 8 [ 6 F Q ..! d %.N Y $.B @ ) 5 ) f '.F.4.B+U.O. +o+o.V.n+3+v+)+3+o+R..+[+Q.c+s+Q..+n+3+D+Y.r+R.X.n+R.z+z+r+7+c+.+n+X.D+|+3+z+2+x+2+u+O.a+O.o+|+T.3.K.M.M.A+n+K.b.4.4.I.I.m.'+v.n.V.v+1+v+V.c.p.-.a #.|.z.m.b+x+<+|+)+m+&+.+c+r+m+.+}+7+d+d+d+c+s+n+u+h.h : : = ] P b d 1 N ( Q ! k 9 # = : : x ] + T > _ P 9 ^ # 4 $ : 4 _ ' f ! M t 9 & w x w & $ | : % % % % % % % % % : . y P < l J G G J v C y ^ @ 9 P p b f B Q Q D p 6 x = & y - I ! u u f G ' < 9 ; . | : % % % % % % % % % q i A w % % 6 1 C & | | | : : % % : | : | | . T k F l l # ^ Q n B 7 n L <./.r.j.,.{.B.a.~.s.a.~.p.N.8.}.b ", +"% % : % | . x _ u B O > ' M ' M b T B @.` ! ) ..-.I #.1 L '.L 7 P a d J Q ~ 2.R L i { ~ !.n E < y 9 m !.B.I.3.B+o.x+ +a+x+D+v+t+P.3+v+R.Q.D+)+r+|+)+P. +D+Q.)+Y.|+X.9+D+9+<+m+W.s+`.Y.<+Y.&+R.<+o+S.<+ +3+o.c.x+C+O.1+o.t.K.x+b+J.L.C.L.C.d.N.b.O.1+x+x+t+2+1+4+v.(.B z N W g.z.t.X.<+5+5+C+<+y+.+D+9+n+9+[+P.c+m+[+n+v+A.! : % % : * l g g ! M I - * & % % : x H 9 > h l } ' v 9 5 w | : * p o ! b ! I T . 4 ; # ] x = $ : : : : : : % % % w ) > J I } M f o ' G C 6 6 F t g f E B Q 2 { m G - 4 | $ 3 6 l ' ! D M I v > + x $ : : : % % s s s s s % p I f & % % y & : % % % % % % s s % % : : : $ ; @ + 3 4 ] 3 T l M b { Y 8 j =...!._.:.g.e.[.|._.f.l.8.!.I ", +": : : : | | = q 7 D J - g I C Q D # m U <.D - L D x b 7 [ j I * ] + 6 h { Z '.>.L R { R i.S f o J _ D ;.z.C.t.n.b+5+C+n.0+X.V.<+<+5+S.Y.9+X.P.D+z+Y.C+n+r+W.C+S.3+0+C+z+9+[+m+z+s+&+z+n+Y.Y. +4+2+<+1+4+9+b+a+X.0+c.v+U.D.B+5+D.0.D.n.V.n.'+a+n+t+C+z+3+C+3+2+4+o.9.8 m O ! n 8 2.m.m.x.r.d.5+C+c.C.C.D.C.t.B+b+1+3+0+2+t.( $ | | ) 2 r - - T T ) $ % % % % w 6 _ P h J G o f t 9 * . | : ; t O M ! f } T ] ; 5 ) ) 3 * ] w = | | : : % : w @ > p o ! M m ! b } _ 9 @ 9 h G b z E d { ( A D t T # | | # 6 < G O O p h > 6 ; x | : : % % % % % % % % : $ = & . . 4 = % % % % % % % s % % % % % : : x 6 9 H 3 5 * ; 6 l f D 2 [ U 8 j -.>.'.%.(.i.2.2.,.;.W ..X k ", +"% : | | % % | + ! B o v h l G Y ' 4 m U #.D 9 [ g w M z c c I 5 # 4 * t n S @.'.,. .U 2 ( ( 2 { { Q V W e.y.d.3.5+5+b+B+A+0+C+C+4+4+9+9+1+|+s+C+s+P.C+D+c+)+C+X.0+2+0+C+ +*+*+X.P.[+1+X.P.C+o+4+9+<+A+n+n+u+2+ +B+b.4+I.C.b+K.G.k.v.b+T.5+n.n+*+z+[+&+R.*+Q.X.x+v+K.f.<.Q } > p 1 L ,.E B W r.d.q.[.[.[.6.^.1.w.I.b+V.O.'+U J o | + U N 6 - @ + # : % % : & ) _ } G G I O b O v H # 4 = % # v ' o o M I < * @ y + H 6 y + 5 # 4 = | $ = ; T v k ! z D f f o g k P + @ 6 P J o b z , { / a M F @ x $ $ 5 9 h J k l F q @ ) 3 ] . $ : : : % % % % $ & x ^ * 3 5 5 + # & % : s s s s s s % % % : : & ; C - 9 6 6 ; ^ 9 p z { 8 Z -... .$.%.%. . ... .;.@.X X >.q.Q ", +": % : : % % : 4 I m G P P p B U @ 5 , &.<.z T N < 4 _ G 2 / p - H 3 H o 2 K '.g.].}.2.-.i r U &.i L +.'.a.E.N.I.I.v.I.M.T.V.o+u+A+v+t+v+1+n+x+C+|+z+2+9+)+s+C+0+t+1+t+t+9+m+|+)+s+t+0+)+|+4+o+2+|+ +4+<+ +5+X.o+u.u+b+0.N.c.y.1.'+a+5+v+o+t+[+c+)+P.y+W.&+.+s+<+9+C+u+p.|.K B V c z ~ _ ' { ( ` b a #.6.l.9.7.z.0.3.n.v.B.=.<.I x _ Z p @ q H + ; : % : $ 4 6 g z f z z m } < C y ; M &.: * v ' ! f 1 1 g ; y 6 @ q > > - @ 6 + ^ 6 9 < I g b D 7 B m ! ! O p < 6 3 ) y q P k O m u , { u I - ; $ | : w y - l < q 6 ) ; ; w . w | : : : : : | = w ] * + y H T > 9 + 3 . : s s s s s s % % % % | w + < < F C > @ ^ h ! , Y ~ (.:.|.j.j.i.>.@.+.#.<.j L i S X _.2 ", +"% | = = % % : $ F z p @ l H d g x l / / <.( h , - ] H q m o 6 @ q > J E E R _.e.e.q.q.j.!.+.=.-.@.!.,.}.5.y.'+t.I.m.v.b.3.n.M.b+O.A+u+V.V.o+5+1+4+4+2+0+0+t+5+5+5+1+v+x+R.Y.<+2+o+4+C+s+S.O.u+v+9+t+3+n+5+0+ +b+4+V.L.k.M.n.s.k.a+3+A+v+t+9+m+Y.s+.+m+*+m+W.*+*+*+[+|+D+2+N.z.].i 0 %.A m ' [ ( 3 < ..[.g.H.{.j.H.B+T.J.F.6.j C 6 V e 5 l 7 ' F h * : $ . * y J z d d u ! J q + ] w F G : ; 7 e m E ` (.J * ^ @ @ q C P < _ F C > h I M B a { { 2 , z ! M ' h H 5 x ] 3 y - l l ' M m f ' _ @ # $ : : . 5 > P > @ ) * ] 4 = = | | | $ | : : $ x # ; + - P l v l < 9 5 x | s s % % % % % % % % : . + t k p J l C - v D 2 8 ,.6.g.{.{.6./.%.@.Z L 8 Y Y c c r r t ", +"| ; ) 3 $ : % | 6 B > 6 + ^ l 3 x M V u S ( ! z T H 9 ^ } m > # 9 P o d u L 8.G.r.r.G.5.{.).[.[.j.g.{.q.r.0.C.4.N.4.v.v.u.B+M.b+O.O.c.O.a+A+V.4+1+o+v+x+v+o+V.5+A+V.v+C+Q.3+o+A+a+A+x+2+A+V.u+4+x+3+5+u+A+2+3+5+c.b.J.d.U.B+p.m.t+S.t+0+2+s+*+9+*+&+D+m+m+[+m+}+.+}+}+`.m+s+s+5+E.A.J.).f z ..2 - n i.#.i.G.$.-.1.A.p.I.H.'.O & J &.g ^ O #.N g U g 3 ^ + y G [ ` #.( V { I t @ 4 x & | % G !.e M 7 =.0 > * 5 y T P < _ t k G I G o E Q { V V V 1 Q B f G _ q ) ; ; H ^ ^ y H T h k } } I p q 3 = | $ 3 T C v _ H 3 x w . & | | $ = = = & . w # ^ 9 h p k g g G J C 6 # w % s s s s % % % % % : = H J k k G G v C v u e X _.8.7.q.{.7.6./. .=.Z S R ( d a { { C ", +"w C ' k T & | | H u O @ 4 q _ ] 4 G m E &.u ' I ) 5 y @ O f @ ] 6 l f A a >.z.F.H.A.E.k.x.a.z.1.h.1.F.s.w.E.C.K.3.K.b.I.3.b+o.U.u+a+c.u+c.u+V.4+2+o+A+v+4+4+A+V.a+V.x+)+W.S.o+V.a+A+o+u+a+a+O.o+V.a+b+U.a+c.u+c.b+3.t.'+4.k.h.F.I.c.b.b.O.S.x+t+)+|+9+c+.+*+,+,+`.`.d+w+8+8+8+|+V.t+2+z.R U .., O .%.B !.~.j ;.'+4+b+4.1.j P w B e 6 ; @ a N ! 2 ! F C > v 1 S !.Z ( ;.j Q Y ' @ z u # ; 8 './ M Y ;.( k y ] ) 9 > C P l I M m 7 1 1 c 1 c N 1 / Q 7 O P y # . $ l c H 4 # * ; @ F I V 0 { F + & | = @ p D B v T * | | = = | = = = & . x ] # ) > _ I ! z D f M I < q 9 5 = : % s s s % % % % : # H l k J t I l - t Q i >.}.f.h.*.e.f.a.[.2.;.-.+.K N ( , B B > ", +"] g E ! o C 3 5 M 2 < ] 9 h v 4 ) t } ! ( M ; 3 5 w ^ @ p p 3 * ^ < m , 1 2.z.r.s.d.y.w.H.9.B.l.l.E.p.C.D.0.D.I.b.b.v.b.M.o.B+T.c.a+b+T.o.c.A+5+A+u+V.V.u+u+a+T.n.T.S. +9+S.u+c.O.A+V.c.b+O.u+a+U.U.b+o.U.a+U.U.T.B+u.N.s.:.W -.` =.;.).g.5.z.E.4.b.o.2+t+ +Q..+&+l+%+e+#+!+++c+C+ +a+y.[._.X g b x.).[ ~.~.{.p.b+ +b+A.{.O > T [ J $ = : p V D ! k l t G m e W <.[ U /.i i 0 m u ~ c # q S 1 G M -.@./ ;.f . * ^ 6 9 I L S u B +.|.%.S [ 1 1 V ( , m k H x | | : ^ > | $ & & # ) q l Y '.B C 6 w : & t e <.~ './ ; @ M t . | $ = & & . w w * @ P G g b z 7 7 ! ' t h T 3 & : % % % % s % % % | ; > v k p J l > y t d U .j.a.z.z.*.x.e.6./.,...-.0 r 1 2 7 z q ", +"4 O a B 7 f J k d ! ; 6 h P I q > h E f O k 4 ; ) w * @ t g _ T ] > f d e 2.e.l.p.C.y.A.E.G.k.k.k.p.J.J.d.D.L.u.b.v.m.I.v.u.u.3.B+n.M.3.M.B+c.a+O.b+c.c.U.b+b+B+K.B+c.b+U.U.b+o.b+u+U.T.M.b+T.T.o.o.n.n.o.o.n.T.b+n.K.4.q.K d o o ! D d { 1 L X %.[.{.e.s.d.u.V.9+d+>+(+/+>+Z.l+&+)+5+v.G._...{ L L.d.).~ !.8.K.b+V.I.B.%.7 C , K , ) | & g V f > < C k p } R |.&.+.i.` / ;.i I ( X P | u r g k A (.K ! U J = x ; y > 1 n E o Q }.[.j.*.W r <.|.7.S M _ < E 9 s ] * | % % : % = 3 H l j 8 _ P - ) = x Y K G z K , # l j m : | = & w 4 . x 4 3 6 > l k O u B , E O k t H ; w $ % % % : % % % : | ] q t I p l F 9 @ l 7 N W /.^.1.G.9.r.1.5.]._.$.W ~ S [ c / 7 q ", +"# M a d a b ' ! M > q z - > I > < } / 7 l C . ] ^ 3 < v M m _ 3 ] q m 7 r ,.h.y.J.J.C.d.A.k.y.0.p.d.J.'+J.C.N.v.K.I.I.I.b.b.t.v.K.B+3.M.B+M.T.b+o.b+U.c.c.b+o.c.n.T.o.a+o.B+n.o.T.T.b+b+B+n.T.n.M.n.B+T.n.T.b+T.c.c.b+4._.b t h P F P _ h t g B { r +...i.[.a.G.p.4.b+2+<+D+C+n+<+z+|+9+o.*.W $.r.J.5.K 1 .6.D.b.J.s.;.d @ # B A P x = x / R I @ T < p k g X j.Y [.|.Y ~ '.1 d >.e ; # 8 O - _ j @.' k 2 H $ . 4 ^ + 0 { h J 1 [.L ..B.;.<.{.$.}.j M 2 h u C ] m n 6 % : + v ( ! 9 z =.d < P C 9 # k <.a J G O k + M n H $ w . & x 4 x ] ; y y H C v ' b m E E f } v H 5 * x = & & | % s : : | * q k ' I l h C - t B N W ).^.z.H.H.E.w.H.z.^.}.).%.=.Z S r a F ", +"; u / A d } ! B < > , d ; ] ) P O } u O C ) = & w 6 M O E D l 9 y < u Q 8 /.r.y.J.N.'+J.p.A.d.y.p.p.L.C.J.C.J.I.I.v.4.t.v.b.4.I.v.I.4.4.u.b.K.u.b.B+n.o.n.n.n.n.K.B+M.o.b.b.B+B+B+3.3.o.M.3.I.u.K.K.b.b.3.3.M.n.O.U.c.B+6.g < G J p v h C F - - P _ I , c K X !.|.{.f.9.s.k.0.p.D.C.u.c.A+V.b.t.I.p.8./ V ..}.z.H.H./.F % % | H ) | | $ . &.m 4 . * q h _ p e _.(.g.[.+.'.U 2 0 }.n G O #.B < I -., 6 Y ! ] & & . x 4 Q i C q i ..A |.{.8 6.).(.U m a ( ^ x & q j [ 5 % ! q - [ p H U L I < _ _ - H N ~ A u K U g C L a # & ; 6 ; x 4 ] ] * y @ y T P v t I M D f } l > y # w w 4 . $ | : | | | 4 H l J J / D P > _ D / ~ _.q.B.F.k.0.y.0.l.x.].:.(...` <.i N > ", +"* E n A d , A I t , R g w & H z l - B &.n ^ $ + t t q @ u f I > ^ < ! d <.}.x.0.L.J.m.C.w.p.p.y.0.A.d.L.C.J.N.t.m.v.t.m.m.t.m.4.4.N.N.t.t.4.N.N.I.K.M.K.K.M.3.3.b.3.M.K.n.M.B+3.3.M.K.3.3.u.m.m.t.J.m.v.u.b.3.T.u+u+4+v+L.8 I o } o G k G g g I J l h G M m a Y L ..(.[.].8.e.h.x.*.9.r.l.D.I.b.'+y.~.A [ ..[.9.l.q., = : : : 4 ^ Q k < J l = w x 5 @ C < t f c 0 ~ >.-.U N { 8 ` B ) I n P q a R 7 ! N @ 4 x . . ; I p S T ; X d Y /.[ r a..., o h 0 m w | % g 0 F : o z & A 7 + P !.E h l t _ C F Z B m j g.!.z A -.I ^ 5 M 0 n @ # b +.m 6 @ @ T > l o D M b f O J C H ^ # 4 4 . $ : : : | $ 4 y < J t i a C F p M Q !.p.'+G.F.w.D.L.D.E.1.e.j._.(.,...~ 8 P ", +"* z N 7 d u G _ u S e F = 4 u , @ H , 8 Y w = g j P 4 _ 2 ! J > ; 5 G R W }.r.0.C.L.'+d.A.A.y.E.E.E.0.y.D.L.D.J.J.J.t.t.m.'+C.L.N.'+J.C.J.J.L.d.L.'+t.t.u.u.u.b.I.I.4.u.M.3.K.I.v.b.I.v.K.v.t.t.N.'+'+N.m.u.B+T.u+1+0+S.1+l.e b , A B f ! a c U Z 0 L X =.j r n d / U X 2.[.j.{.a.^.^.8.a.8.^.e.q.x.$.A [ ,.7.x.5.0 ; : % % % : @ ! D < 9 $ & # ^ y 3 y F t o E n &.i &.Y V a d b p 6 ] & 4 @ v t G ! - ^ ] ; # w 5 A Q h . t ~ M c u I Q [.8 c f ^ ~ G - @ 5 0 r T # #.H h +.- & E <.F < < l _ - ! i O b ..a.r ! @.S _ 6 ( a / a ) O z ! T ^ 5 ^ y F / R ;.1 ! 7 !.8 j A > 3 * # ^ H ^ x $ $ $ x ; > h P } J F u K 7 7 Z 0.E.*.l.0.A.y.E.s.G.1.q.8.{.}.2.%.Z t ", +"# D m f ( 1 1 M K .e * # F &.O x ^ d X ' . & @ < 4 # M V g _ F ) # M =.W i.*.w.D.J.'+N.U.B+k.s.l.H.C.b.J.w.w.y.p.d.J.C.d.L.d.d.L.0.E.A.A.d.p.D.0.A.y.D.'+N.t.4.m.N.4.t.t.m.t.I.4.m.'+m.I.m.L.C.L.C.J.N.t.4.K.T.u+1+0+ +n+V.*.K #._.>.( d <.).:./.:.6.h.G.k.p.k.:.Z K R r 0 ;.2.].g.~.}.[.j._._.).).~ / ~ 2.7.e.>.< | : : : % s 6 C ) # & & x 4 # + ; 5 6 l } M B ( 1 n A Q , E O < ^ = % = 3 6 H 9 H ) * * y ^ # * ) y * # S Q t # ) @ 6 2 e q ] . d V I q l +.a m v Z g 7 X v . 0 Y D q 9 - C H &.1 O A ^.>.a { ~.m C O >.f m + 4 G 0 6 x 4 ] * ^ 7 @.k i !.( c j./.,.B < H y ^ k Q c k 3 B H - O 9 F D G H _ -.-.m ! !.s.f.z.l.s.w.F.B.F.B.r.x.*.e.{.j.)...l ", +"x l 1 { f i.#.e ).5.L F R j j < } { ~ 0 # $ C C # x H , B b l - T C d c Z i.9.E.D.C.'+N.K.N.s.l.r.l.I.5+D.G.r.l.0.y.A.w.y.A.w.k.A.w.l.s.k.E.k.w.k.E.0.A.A.L.J.'+C.C.'+m.N.m.N.N.C.N.t.'+'+'+d.D.L.d.J.N.m.t.b.B+u+v+S.9+|+ +A+0.h.G.1.;.#.g.r.e.i.!.j.k.K.B+t.m.t.v.b.5.` L #.@.>.(./.}.g.:.(.>. . .i Y 0 i.7.!._ | | : : : % s w _ 3 : $ $ w . # w x 6 - _ t J o m 7 d B E z ! p q # | : = ; + @ T 6 ) * 3 + ^ ) ) ) @ y O ,.t 3 5 3 * 4 w & & $ = + l > 6 h u ! 6 - 7 @ F A 5 % c E P # 3 3 H > ..O M Z 5...S @.[.A _ 1 !.- 5 * * 3 K ! x & w 4 5 #.e l ).!.d V 7.i B g t F y > J b z ) l +.P u u l 7 =.A 9 , '.e f I a.}.G.n.l.H.s.F.G.r.z.1.r.x.h.5.7.j.,.k ", +"& c ` ! K (.i j }.7.' 2 N i R R 2 ' e O & P 0 [ 6 ] d ` !.S b _ O D p a (.f.l.0.p.L.J.J.d.D.0.s.B.s.M.3.H.F.z.1.k.k.k.E.w.A.s.s.F.l.G.B.1.l.F.G.G.l.s.w.E.0.C.J.C.L.t.'+J.J.L.L.C.'+m.N.J.'+C.L.N.J.L.D.J.I.M.T.V.2+S.D+s+|+3+0+O.0.[.` %.z.A.H.2.,.h.b.t+z+u.L.o+z+*+b+0.*.}.>.>.,.$.$.).2.W ..!.-.~ -.-.).).I | : : : : % : : : F 9 : | : = # ] = 4 ^ > < < h k g M D m f b ' > 3 w : % $ 3 T T > q 6 y ) ) ) 3 ) 9 < f X W 7 F q y 5 4 4 = = $ . 5 q 9 - < h < < - + & : | : % # * | & 4 ] 9 , 0 h M 0 /.8 A -. .2 l 2 -.k E 3 p q V D ] 4 4 ] * %.' o [.j a ;.}.{ u b J < @ ^ h 1 x I ' c $ ( h # r !.} - 8 ~ I G 2 ^.6.^.3.1.B.l.l.k.l.1.r.1.z.*.*.*.*.].! ", +"> #.{ V j.=.S U r.j g 8 { Z -.R J > f H $ o W V * u S O @.'.7 t n g q L ^.A.w.I.M.J.u.u+K.L.y.D.'+u.o.d.H.r.z.r.r.G.r.G.G.F.G.r.B.z.*.9.*.*.h.9.*.z.r.F.H.E.A.A.y.d.D.p.p.C.d.p.d.J.J.C.J.L.d.p.L.C.d.L.J.'+K.a+u+2+X.<+[+s+n+3+9+A+5.+.(.1.s.e.(.).G.3.4+S.b.T.R.Z.>+0+t.M.m.r.~.,.,.2.%.+.` 2.).).|.{.7.|.E = : : : : : % % : : @ k & : : $ = = & x # 3 5 T - P p G ' g } ' < ) x $ % % = ^ - > > > @ ) 5 ^ ; ; y > t ' m f ! l P > y * w = = & 4 + q C h J J J J l > ; | : % % s s % : H F - j ' l b u / 2 , B D > q J E m * w h u B ] ] # 3 * 3 K G 0 .d Y 9.-.2 Q z G P ) x f e % A c ] ) Y & + ` V 9 < (.A I } W 7.L ).d.a.9.1.z.F.r.x.x.x.9.h.*.G.r.*.z ", +"m W i (.5.!.e {.B.d 1 N #.` ,.! # , } . | 2 K 9 4 ~ a O (...! N { + G L q.G.z.n.n.K.u+S.T.p.t.3.d.M.u.F.r.E.'+3.k.h.F.0.m.E.h.z.*.h.e.f.9.1.*.5.*.x.x.x.z.G.k.H.s.w.s.w.A.L.d.d.J.C.L.J.C.C.D.D.C.d.4.V.X.v+B+U.V.n+m+Q.|+|+z+S.t+[+z+4.x.}.&.u A ).B.t.v+1+U.t+P.%+_+)+c.3+v+K.4.k.e.[.(.2.1.G.f.1.H.G.].a & : : % : : : % % : % @ m 5 = & $ & = . x x ] * 9 @ T P l t h _ F @ * . : % % x + T F - > T ) ^ + 3 ^ 9 P v J p J v J v _ - ) x . & w 3 - h k ' g I g } I h ^ = | % % s s % | J d O Q 6 G ! D u 7 B M < T > @ 3 x $ : | $ & w 4 * 3 + 9 k A U A n <.).c / a B O P 5 . E { # 8 P : N 5 % o =.! v B |.u k O {.~ Y a.^._.a.f.q.h.5.h.*.*.x.B.r.s.w.F.d ", +"' .<.$.6.X X 6.#.' R ~ i.W <.q p #.z + _ +.A H t =.C M /.R R n t 3 T U F.5.9.a+t.C.4+4+'+m.O.t.F.M.C.G.0.3.D.J.*.h.t.9.k.'+z.q.8.a.7.q.E.B+y.a.L.m.h.C.d.9.F.d.E.k.p.y.A.L.L.L.d.C.J.C.p.y.L.N.t.N.N.a+9+1+n.U.2+W.y+Q.Y.[+)+D+t+1+X.D+V.E.@.o M ,.F.'+B+N.J.x+P.`.$+`.R.Y.X.b+B+3+3+3.w.J.K.A.m.v.J.B.Y . : % % % % % % % % % : @ 2 h x & = 4 = = | $ & ] 4 4 + H P h > q 6 ^ ] = % % % # 9 P F C T ) ] & # 3 5 6 > l l v J v v v h > @ 3 4 w 4 ^ T l } O } g M M G C ^ . $ | : | : : : x T _ y T p O O o I o p q H y 3 w | | | : | = w x ] y q _ J f Q [ &.[ e ( A Q u g v + . 6 o g } 7 p ] % | b e < - 1 '.2 o 8 ).e L F.-.'.[.g.j.j.7.8.q.^.5.F.s.A.d.k.A ", +"5 { Y N L ;.Z m C . Q >./ a 1 k q 1 k 4 } L ! < f U P ~ L d =.a t 5 + W r.a.t.b.y.M.t+I.A.o.B+H.A.u.F.z.3.'+C.^._.F.E._.A.m.f.[.g.}.}.1.E.9.6.5.1.I.h.D.d.z.B.o.C.A.O.K.A.w.'+n.a+J.J.L.w.0.D.d.'+C.4.u+n+5+M.T.C+m+Q.<+D+)+s+<+X.v+U.o+n+0+M.A.g.[.9.1.,.7 K v.C+[+&+*+*+Y.9+ +)+%+.+A+c.C+o+u.u+n.d.>.> | s s % % % % % % : : : ^ n h | & x w x : : | : : : w ] * H y 6 H y * x = : : & 5 q < < F H 3 | | . x ] 3 6 F h h _ _ l t _ F 6 ; x & x 5 @ C p } } o M ' v > + & = $ | | | | : | $ 3 @ - G ' k v t v P - y + 3 x = $ | : : | . x ] - J g E a r S 0 L i N ( Q u O v y 4 & $ $ | | : % % % 4 5 # * ' a ' O R [ X ,...-.,._.[._._.}.j.{.^.5.r.l.y.y.w.Q ", +"3 E A V +.K P w 4 P 7 Q B k 5 & = ; # = H l H P 2 <.N / f Z a m v ; > |.r.z.K.w.0.o+4+T.t.5+y.A.b+I.y.s.O.C.e.6._.D.q.'.p.l.:.,.$.2.i.].C.].2.[.:.N.x.D.G.*.1.T.'+D.c.D.l.d.K.d.N.L.d.D.y.p.D.D.N.t.u+b.2+x+o.C+z+&+Q.D+<+R.s+[+|+n+v+M.3.O.c.o+S.0+m./.B @ T V 8.u.t+9+z+<+[+&+l+$+}+|+R.l+R.2+5+B+'+0 ^ : % % % % % % % % % % : ^ [ ! $ 4 = & ] = $ | | : : $ w ) * ] 6 F H H + ] w * ) H < J J t > ^ | | = w * 3 @ T < < t t k G t C T + 3 4 ] 5 H P G ' ' } } l v P 5 & $ : | $ = = $ = x @ C l } o } t p p ' k l F > @ 3 & $ | = & x ; 6 G z 2 e 8 j ~ ` +.+.i N ( d O v > ^ # x & $ = $ | : : : : w ] H _ p o f f ( 8 Z W >.2._.2.i.).6.6.8.e.z.F.w.0.1.A ", +"3 , #.#.2 y ^ @ q Q Q M M v ] | | $ $ w x 5 t , i E m m D E u ! l ; G ).G.k.H.L.L.T.b+L.L.a+B+0.c.u.E.s.c.m.0.x.~.m.'.6.w.(.@.W W !.i.$.y.1.).).).N.z.B.a.7.w.M.E.N.3.s.l.a+I.0.E.A.p.y.L.N.J.J.t.v.V.b.S.v+2+9+9+}+)+|+Y.m+r+d+&+Y.z+X. +o+u.3+%+}+3+a+3.H.$.V B '.u.V.2+2+)+r+y+&+*+[+C+9+m+R.u+0.[.D = % % % % % % % % : : % % . D V * x $ = w = $ & | $ | | & ] & 5 T q F q T 9 9 > q F J g g O p 9 ] = 4 4 ^ ) @ H - t I G I I l F q H 6 ^ ; y - P v t v p l v t - ] & & = 4 3 ) 3 4 * + J J G f u E M I ! D D o g G v C 6 3 4 x x 4 6 I , 1 K <.+.=... .!.-.Z U c A ! I k - H 3 * x w & . & & & = 4 * H P J } f B N S #.@. .,.i.i.2.}.6.].e.9.1.H.w.H.1.Q ", +"^ 2 c m k t t P O D ' h < H = : = $ x ] w P Q A { D A a Q 7 f b v + , !.6.h.B.y.A.0.d.y.k.0.w.l.p.k.*.h.y.'+9.{./.].].8.@.j S i S L i.).f.{. .>.%.'+F.6./.~.u.H.5.3.s.*.w.4+E.H.l.k.s.y.D.C.C.d.J.U.b.m.3+t+C+4+<+}+s+D+W.}+|+c+`.R.z+Q.9+A+t.T.D+.+w+%+3+c.U.I.3.C.x.f.h.y.9+Y.n+0+x+t+2+y+r+v+d. .i @ % % % % % % % % % % : % % : h &.> | : : : $ = | | $ < 7 @ = . # 6 6 ^ y T > F P @ C J } g g G h y ; ^ ) 9 6 + + H h J J t l h C C H + 3 ; 5 y H > > - F > < T # & & w x ; @ 9 6 ) + h O O M B d E f u n ( d B u f I _ C 6 ) * # ^ < o 2 U <.~ -.....!.%...Z 8 c { E f } l F 6 5 ; ; x ] 4 w w ] # * + @ > G M u 1 &.U 0 +.=.;.!.'.2.:.[.{.f.9.z.r.B.5.z ", +"4 v ! M b k ' p J v 6 @ T ] | : = ^ # x y e { d a 7 A 1 e / d z F T ( ;.|.5.H.A.p.D.t.'+w.F.B.r.l.F.9.9.*.x.h.7.}.i. .` i [ r Y r [ X i._.+.X W }.N.^.,.(.f.C.j.G.I.k.1.w.V.l.v.0.b+y.A.p.L.d.L.t.4+'+t. +9+O.A+[+r+R.|+7+&+s+8+7+|+<+`.Y.9+1+n+1+M.u+Y.l+,+m+|+c.B+v+a.L a.D.b.K.4.T.C+m+#+s+M.>.+.o } A ] : : + T & : | : : % % % 6 1 P | : | : : | | w = F g ^ w . # ) ^ 5 6 9 T P - q P G M M M b ' < > P p t _ < F P h v p l l _ l h F 9 ^ ^ ) ^ ) + ) + H q T ) * ] 4 * + 9 P < F H - p b f m a { { A 1 [ r n 2 { B f } v F T ) ^ 6 J z V U Z -.;. .,.(.(.;.=.0 &.1 A z m ! ' h 9 ^ ^ ; 3 ; ; ; 3 5 3 5 y 9 l v } { 1 U S S j #.` !.>.2.:.}.g.8.q.*.1.a.D ", +". t b g o } H q t y 3 ^ ] w & 4 5 w & 6 A A ! ( d , 1 c [ U V B - _ N ;.^.0.J.N.J.d.L.m.D.H.G.9.x.1.r.9.*.h.e.{.[.).;.` S r c 1 V c Y R i Z Z ` 8.j.'.%.,.j.7.}.h.B.a.8.9.t.t.s.y.u+y.E.y.D.D.'+c.o+N.m.n+V.U.o+r+P.z+R.w+Q.Q.d+P.D+R..+}+Y.[+}+2+M.b.c.s+)+C+9+M.1+9+v.l.b.^.j.1.n.z+m+l+c+3.{.u Z E g X * s l O ~ T % u r 3 B 7 . D -.v % : : : : % % & $ : & & $ x 3 x ) ) + ] ^ y + H > k g M f m o G t ' g O o } ' k G ' t P _ O Q u G F @ @ 6 H 3 # * ] ^ 5 ^ 3 ; * ) H h p k J k _ P k b z d 2 n c 1 U S U N 2 Q B z ! } p - + y > k u / &.~ -.!.i.)._.i.%.@.#.i e / Q , 7 D ' h - @ ^ ) ) 5 ^ 3 # * # # @ T - l ! Q 1 R R 8 S +.@. .%.i._.j.g.7.8.q.j.O ", +"w h m 2 ! ; H p 5 . @ w . ; = & = . H e ( O u D E A 2 A e Y ( ! 9 u <.}.9.'+t.4.N.L.0.w.s.F.l.1.x.f.5.f.q.^.8.g.~.).%...Z &.1 / A A ( n <.{.-.i.'.X @.-...!.>.i.2.|.~.j.{.q.9.z.1.w.E.s.s.E.y.v.b+U.t.N.U.3.u+C+P.)+n+<+y+Y.c+r+ +z+P.s+r+9+*+7+|+1+U.v.L.C.u+c.d.5+v+C.K.v+y.k.H.N.z+}+8+S.h.g E 0 6 > i = y U P r @ q d a Q c { E Y (.' : % : : % % : | h z ) $ 3 ' o * * + ] & 5 ; # ] 6 h t G o f b ' } b D z f m ! g ' k t > < <.6., t C 9 f #.d 3 w & w x # * 3 ) H > h ' b M } k J l k M f 7 d Q ( 1 U S K r ( Q u u f } v H + H h G E / &.` W ,././.i.$.!.-.<.0 U N V ( A d z M k F H y + y y * * x # 5 + q C < o E d { A e R S ~ W ..'.|.}.}.~.].~.(.' ", +"# O m } ) T - x & ] C ] = . | $ w < Y U V K e / e [ L U c A A l O R >.^.F.J.v.B+u.m.J.y.k.w.s.H.1.f.a.a.8.].].j.~.|.(.%.-.0 [ n { Q a { c X #.Y 8 L #.+.-.-.;.%.%.i.|.~.[.].f.1.r.F.w.E.k.0.p.C.N.'+m.t.I.B+O.0+n+D+D+D+Q.r+r+R.z+|+r+W.z+C+Y.y+*+n+2+b+4.D.c.m.d.v+y.E.U.n.D.C.E.G.u+&+r+D.{ $ ~ o : m D % V c v ) s s 1 S % Z 0 3 ~ K f $ : : : : s s J ( X 6 $ A G V 4 # ) = w + ^ . # I 8 B M j z M 7 Q E d , E B z m M G k J k !.#.b J F H I ,.J 3 ; w x * * ; 6 C v ' O b , E z ! g G I M f f m u d n &.L S [ N / Q , b ' P 6 6 P t O u V j W '.).:.}.(.!. .-.=.~ +.j U 1 ( A Q E b G t C - > - y ; 5 y @ T h v G M f D E , / Y K <.-.!.$.2.|.2.)./.|.>.} ", +"& * 4 ] - 9 . $ $ y > $ 4 x . ; ! L #.8 ~ <.N &.8 +.#.&.1 N b t N K 2.*.p.3.b+B+b+n.t.p.0.E.k.k.B.x.^.g.].{.6.}.:.:.i.,...+.K Y n 2 d Q { a ( V N r K 0 <.X W .. .,.2./.[.7.e.x.r.l.k.E.E.y.d.C.'+'+N.N.v.3.c.5+3+D+s+[+W.W.*+W.Y.R.D+D+D+n+n+<+n+X.S.5+c.I.L.o.b.k.r.G.V.D.k.E.l.*.'+R.t+i.@ ' S + x K ] | ~ n % x s - +.4 C X H F V d 2 = % % % s s s ] ~ d $ : 8 F 3 = ] x : # + ; x C c (.m R _.M z Z ).d ,.5.2 7 u { { [ ( } Q 6.n z v > 9 1 j T + 5 5 ; 5 5 @ > J } M b m B U R u g J k ' g g O b Q ( r S j i Y 1 2 B M p > y J h l I u N Z >.i._.:._.,.W +.Z X -.-.` i e n V / a d D b I l J l F 9 9 @ H - l k ' g O ! m u Q V r L +.W ,.(.i.(.,.,.(.;.G ", +"| $ x 4 w ] = | : $ : | w # > N W +.j 0 Z S <.,.(.@.L K S 1 v , &.0 ).f.0.b.a+V.V.c.3.J.0.E.B.z.9.9.f.].~.~.~.:./.2.%. .-.+.L [ c / Q u m D B 7 a 1 N [ S 0 0 <.Z ` ..!._.6.7.e.e.x.G.H.0.p.p.D.L.'+'+'+m.3.b+1+S.D+|+Y.P.W.r+m+Q.Y.D+|+|+D+9+0+0+S.0+2+v+U.4.0.s.l.F.d.B+x.B.*.f.8.A.n.].^ $ ' g G J - % & [ / 9 P : E g | N } $ V ! m 2 & % % s % % : D ~ # : : ! R | = . $ $ * # 4 3 6 A K ' (.A F , 8 ..0 ` _.7 E c 8 B j.[ g #.:.1 i.+.F T ,.7 H y - z f + 6 C t ' } } g M { j.K D O k l v J h k M u a e S <.L [ e / E g C E !.V h v } 7 e 0 ;.,.'.i.(.!.@.Z L #.;.!.=.0 &.e N N 1 n n d ! ' J t _ > H + y 9 l k ' ' G O b o M B A n R <.=.;.;.;.W .. .-.G ", +": & . = w $ % % : : : w H ' c X >.i &.0 K ~ (.[.|.>.X =.&.z u &.U -._.e.w.u.c.4+v+5+O.v.D.s.1.9.e.q.q.7.j._.i.).>.>.....X Z +.S &.c 2 , D ! ! b u 7 Q ( Y U i L K 0 +.=.'.}.6.7.^.e.*.1.k.0.y.d.C.t.N.'+N.I.o.V.A+ +|+s+W.Q..+}+&+&+R.n+X.<+n+ +0+x+x+v+o+A+T.u.3.o+w.K.B.9.h.5.a.^.G.` ; % % % | & w % s : T _ ^ s . D & ^ Q w x 1 l p &.; % % s s s . j N ' ] l * X w : : : $ w = 4 3 6 @.g ( !.> 6 q +.-.! ,.[ f A ).O N i.O ! ).>.7 0 L F z i.q 6 - [ { @.y T _ } g ' ' k ! +.7.8 D g 2 b v P > t } o { R j X 0 +.S V , I y J ;.> > p D / &.<.` .>.%.>...X Z <.#.@.%.;.=.Z X W =.r e 1 Q ! ' p v l C H 9 9 P ' I G k k k ' J _ k b u Q N K +.-.~ +.#.` j p ", +": = $ ) 3 : % : | = ; _ o [ :./.r &.U r Z |.^.e.j.%.X Z / D L j L .}.9.p.n.O.x+C+3+v+O.b.D.l.z.*.^.8.{.g.:.$.'.!.>. .@.=.X #.<.L [ n A d z b b f ! u , 2 c R 8 8 U #...,.2.|.}.7.q.*.B.l.s.p.C.'+m.u.N.N.v.b+c.V.S.R.*+.+r+&+}+d+7+.+Y.z+z+Y.[+|+<+3+x+2+A+U.n.b.b+b.L.H.B.9.e.8.q. .y | % % s % % % s s % % % s s s % % % | % | 3 . - U ) : % % s s x / M # 4 B t u : % % : | | : = # 2 $.N N L J ) m >.t A >.p O ;.#.I $.R p c :., g '.Q < j S H 6 U Y , a @ 9 C I o } ' p G '.<.E b U i Y A @ y F v g d c &.0 +.q.|.<.c g > &.8 _ p m 2 &.<.-.` .. .!. ...=.+.X -. . .%.%...].0.$.<.<.U V u O I k l < F - q l D Q f J t h T H 9 _ k o E A r &.K K L L j i _ ", +"% % = w : : | = w 5 F z @.a.2.8 R [ U ..~.a.8.6.$...-.1 B K +.j Z %.].B.C.n.O.2+S.9+X.x+U.t.k.r.f.8.6.[.}./.(.W ` =.` ~ Z Z j L K [ 1 V a D b M ' O ! ! z a n 1 e [ L ~ @.>.i.).[.7.q.5.z.G.k.p.J.'+'+'+m.I.M.o.u+x+n+m+.+`..+`.d+w+,+y+)+Y.&+.+.+P.D+C+2+V.a+n.3.v.4.'+D.A.E.r.q. .P | : % % % % % % s s s s s s s s % % % % % % s % + i @ : : % % % % | = : $ ) y w % % % : w | : | x E 2 t 7 V h 6 8 / q ~ i { G 8.K c ).2 o -.#.p S K _ k 2.M 9 g ;.b h ; 3 y - v k I t J z _.b p { .T E >.3 + T t M d / N U ,.1.;.8.|.z f [.V E d / ..).f.$. .{.i. .'.W =.+.=.#.X =...!...e.H.W -.-.<.R d ! } G t < f k P ' +.~.o _ - H ^ * 3 > h t I b u d / n e R 8 e _ ", +": % % : : | = . x @ B @.j.~.,.K R i !.e.G.1.8./. .-.+.&.K +.!.~.,.$.].l.4.a+A+x+X.z+<+z+0+c.J.H.*.8.~.|._.2.$.;.X #.<.<.Z #.L j K &.Y V A B f M M O } g f E 7 A ( N r K Z @.!.$.|.6.7.^.9.F.s.0.C.N.J.'+I.t.K.B+U.5+ +)+}+-+:+y+w+i+++#+7+7+l+e+#+8+r+[+n+v+V.u+T.n.u.m.4.t.L.G.~.} | : % % % % % % % s s s s s s s s % % % % % % % % @ S + % % : % % % : : : % % % % % % % $ 4 | | = & 4 4 . 9 l * 9 Q _ > c z F E (./ Q @.A B @.[ a <.l k Y _.1 f Q .o F y ; + 9 F < k I } K ` v v i [ ; K <.* 3 H l M a ( n N '.]./ [.q.2 -.q.V [ j g.,.5.m.}.8.C.l.>.L.,.+.+.~ <.<.X ;. .%.y.7._.2.>...S ( , D o G o ..B v } ~ ..k _ 9 ) # x ] + - F l G } ! B a A ( c N P ", +"H S 5 l c 3 < u < / }.B+'+^...i L >.{.1.s.*.g.i.W -.+.<.~ 2.h.*.%.(.g.H.4.V.4+2+n+D+<+D+D+t+U.C.x.{.~.).i.,.!.W ` <.S i L 0 i 8 U [ e ( A d f ! o ' G G } O g m B Q ( c i X ..!.,.).[.].^.h.B.l.p.D.d.L.N.N.v.K.B+a+1+D+)+&+y+`.l+e+++!+$+w+%+i+f+++w+y+Q.D+x+1+o+a+n.K.4.v.L.h.a = : % % % % % % % % s s s s s s s s % % % % % % % % @ e ] s % % % % % % % % % % % % % % % : : : : $ $ : % : ] 5 ] * 6 * 4 H C q k } p k E M ' A n 7 l l t A j M l f Z { l @ ; 3 ) 6 - _ v O $.<.g C [ k q L b x x c './.].8.i V [.-.c f.(.j.B+t.H.*.H.T.m.2+A+u.b+T.0+z.x.!.&.[ F.E+`.#.` W ~.J.].E.'+%...=.]. ./ M f i [.7 k a g.&.O _ 9 ^ ] ] x * y 9 F C h p } M f E d A F ", +"p K u ( ` g Q ;.t R H.V.J.m.$.0 '.y.b.G.^.~.[.2. .0 Z -.j K 1.].>.(.8.H.4.c.A+0+X.9+<+D+[+D+x+B+H.a.~._.(.>...=.+.L R Y Y [ [ R [ e n 2 a , E ! } I p v p t v k O b D , 2 &.<.#.X !.i.:.6.8.*.1.l.w.p.p.d.J.N.b.b.o.c.v+C+<+[+m+&+`.%+#+$+w+,+d+Z.@+++i+w+}+P.R.X.2+5+O.o.3.d.$.+ : % % % % % % % % % s s s s s s s s % % % % % % % % + , & % % : % % % % % % : : % % % % % % : : : : : : : | ] . | 4 ; $ ] q F < C < P v p G k G I J v v k ' } t h C G J + ; # * + + @ H - G <.B y 5 g } o z : : $ 1 d.E+E+E+{.L 6.U ,.}.U )+E+E+x+L.b.K.E+E+E+e+4.%+E+;+m+8 /.X.E+E+G.0 X >.s.A.a.*.d.,./.x.0 ~ (.I m '.Z Q E -.^.Y [.i C 6 ^ ] 4 # ^ @ 9 9 q C p I ! f E 7 > ", +"k !.p A =.p A e H p ` |.S s.*.:.L.K.T.'+g.].l.].1.6.~ j 8 ;.H.,.).{.z.L.v.c.4+t+X.<+R.[+)+Y.<+v+I.x.{.a.(. .W X Z L U Y 1 n 1 c 1 / / a n ,.8.,.b k p t _ l _ _ l G } b , n U &.U ~ @.%./.6.j.q.z.H.E.y.d.L.J.N.4.M.T.u+4+S.|+)+P.&+d+$+Z.#+i+,+e+w+%+#+#+$+`.c+Q.s+z+t+u+o.p.U = % % % % % % % s s s s s s % % % % % % % % % % % % % 6 , & % % % : % % % % % % % s % % % % % % % % % % : : : & & = w & | ; T > - q h > h t o o } M ! o b u u ! k t < F 6 ) 5 # 3 ^ ) ^ @ @ 6 - + x . 5 l T $ | | = 5 o E+E+E+8.%.:.Z W e m.E+E+|+q.k.v.s.:+E+e+_.'.~.E+E+E+N a '.E+:+[.j #.|.L.^.j.p.z.>.f.q.U :._.p , 2.B ! ( 6.|...;.i h > @ ) * 3 ) @ T T T > _ ' f B , a - ", +"S ! w #.a 3 R 9 x 5 ;.a f ].%.8.5+b.I.F.e.p.N.(.p.f.X S U }.1. .[.9.k.d.b.c.1+C+m+c+[+`.y+m+7+Q.o+m.d.m.{./.;.~ 0 S L r / a A a a , Q a ,.e =.j.&.g J _ v l h < < _ v G b 7 c e 1 S +.~ !.,.:.f.1.x.B.k.k.0.y.d.C.t.M.M.o.u+t+D+[+*+&+8+$+!+$+%+l+w+w+e+$+%+d+.+.+m+)+z+C+b+p.U = : % % % % % % s s s s s s % % % % % % % % s s % % % 9 2 & % % % % % % % % % % % s s s s s s % % % % % : | % | & x $ : : # y T ) 6 T ) - p } p g M b m B 7 7 u } } p h T + ) # # ^ 5 3 5 + ^ ) # . $ $ $ w * w . & ] ..E+E+E+p.,.r B z L y+E+E+v.{.F.y.r.E+E+b._.,.7.E+E+E+2 , 3+E+ +N 8 ` e.F.).r.s.,._.x.:.<.7.` I S Z } f K 9.+.Y >.A v h q T y H 9 H H H - P J o E B a Q q ", +"S q Q <.@ t i + * G ` @ 7 ` v W J.G.H.F.9.A.y.[.0.@.+.0 L k.g.'.~.9.A.v.B+u+2+<+m+c+`.d+`.7+,+8+9+o+4+I.A.'+2.W -.{.B.i V A K r 1 A u D z ! ( ~.<.k l _ < l h F P P C P l J O o z / e R S -.).t.s.7.5.z.1.r.G.k.H.y.'+t.u.M.O.1+C+9+*+}+w+%+w+l+8+8+l+e+w+,+7+c+.+Y.[+|+C+O.D.&.= : % % % % % % s s s s s % % % % % % % % % % % % % % - a & % % % % % % % % % % % s s s s s % : : % % % % : : : & & : : | 4 @ y * @ ) 5 - p l < I o o f z , { Q B f b k v > y * 3 5 3 ) ) + 3 5 # = = . . 5 9 ^ ] 4 ; Y.C.E+E+K.L - < G &+E+E+,+q.[.6.7.5+E+$+x.[.[.0+E+E+a+V (.=+E+$.( r #.{.q.~.e.$.;.i.a.;.2.}.m , >.i D 2 _._.e W |.f } J t t _ v h - - > < p O u Q { { 7 > ", +"_ t +.n J R 8 h T N N G R # @ ~ ~.U e.1.H.t.'+e.!.+.#.#._.w.'.).8.r.D.3.A+o+5+0+.+7+Y.i+,+&+#+c+W.<+<+D.h.m.}.@.H.!.H.+.Y $.%.[ 2.c b } g } S }.} h F P P C h G t } F T C > F _ I z 7 B 2 r ..0.$._.[.8.8.q.5.*.z.1.E.y.L.4.B+c.o+2+3+[+i+l+i+e+%+d+8+w+,+%+7+c+m+Y.Y.[+n+v+u.L & : % % % % % % % % % % % % % % % % % % % % % % % % : < ( & : : : : : % % % % % % % % % % % s % % % % % % % % : w | % % | x y 3 * # w * H C F C k ' } D u B a 2 Q 7 E m O v - y 3 5 ^ + ^ ) 3 5 ; x x 4 3 9 q T + @ l E+(.E+E+K.Y q ^ 4+t+X.E+Y./.[.6.6.r+E+y+*.{.l.e+E+~+~.r *.E+E+a Q A *.8+,+l+E+^.#.#.U.e+E+E+x+(.h.}+E+>+c.=.` L.7+E+m+}.' g G k m.E+C.E+E+v.M z Q a { d 9 ", +"= ) ! O G u u v f ..7 P = & * Q ` R n 0 5.c.v.a.;.@.X =.e.0.>.~.F.4.J.M.2+0+x+9+c+D+&+w+Q.}+l+&+.+c+&+u.m.L.(.e.z.~.%.i K G.-.<.a., b I G d 2.! q - - q - > E M Q .J 9 1 j H &.;.k } o e 1 ).}.L ` !.2.}.j.j.{.6.{.h.x.E.A.J.4.3.b+u+2+Q.Y.r+7+l+,+7+7+%+$+y+&+w+w+c+}+&+|+a+i.* w - : % % % % % % % % % % % % % % % % % % % % % % : p c & : : : : : % % % % % % % % % % % % % % % % : % % % % : : : | | $ ; ^ ; & $ ] @ 6 H - l l k b f D d Q a , 7 u b p P 9 + 3 + ; ; ; # 3 3 x & = 3 q > q > F 1.P.(.E+E+m.t ; ` A+B.=+E+*.2.[.{.p.-+E+|+b+O.%+E+R.{.&.R }+E+T.Q 7 S.E+T.` `.E+<+8 i &.b+E+r+J J } *+m.i.U 8.[+:+A.3.E+E+! f ` I.E+!+x.2+x+l.z a a d d 7 H ", +": $ ) > < < l M -.X ; x = = & * _ o O r 6.z.D.'+e.W -.|.r.r.6.6.0.u+b.n.A+3+<+Q.D+n+y+m+*+l+d+}+y+%+.+ +o+z.(.p.e.j 8 i <.7.>.$.-., m } d W O H H @ + @ H m [ F R K ) u B e { n #.q l ( i A i./ Q Y 8 Z ` !.).].^.1._.j.G.k.k.y.t.I.3.c.5+S.s+W.c+w+%+$+=+,+r+*+.+7+z+<+m+r+5+9.- + +.: % % : | : : : : ' f h = s 4 ; = s s s s % % : ' e $ % % $ | % % s s s s s s s s s s s % % % % % % % % % % : = x | | 4 x = | $ 3 3 4 ^ T C v v G b f E ( { / { B b I v < H y ) 3 3 ^ 3 ) * 4 4 x ) < J p p I x+2+{ P.E+V.+ x c.'.6.E+E+@.(.:.6.K.E+E+L.d.A.w.k.<.<.i U E+E+*.2 a r+&+K 1 E+E+9+r N ( ^.E+E+v < [ Y.a o 7 B+E+3+7 m E+E+..Q , 0+E+x+b ! z , d A 2 V A E H ", +"% % $ x 3 9 P / i.U > 9 + 4 . x 3 - p S 8.&.K 9.D.2.....!.2._.8.d.u+B+U.A+t+|+&+D+[+&+Y.P.d+7+.+d+++7+r+S.0.8.N.5.'.).#.,.B.$.X [ V { U .p q I 5 3 ; 3 P 0 G O @.G + @ c K > U D ^ D ~ J l ` - l ! d A N <.g.` 9.e.W {.F.D.G.y.b.A.u.1+u+a+S.<+P.c+e+=+l+m+P.W.l+m+9+3+9+l+<+0.o & l % % : : | : : | : - X e & s B Z b 4 k w s % % : g n = % 3 9 J = % s s s ] s s s s s s s % % % % % % % : : % % = w : $ ] & & $ # ^ . x 5 + _ v < t I I 7 d Q V / , f I G v - 6 6 6 T - H 6 ; 4 4 w y J k G O }.E+! [.E+E+e.* E+=._ E+E+B.#. .(.|.E+E+d.Z L Z L L S L K z+E+E+Y 1 2 z r {.E+E+E+V V { E {.E+E+h < E+P J O ~.E+E+7.g.m+E+E+2 n 5.E+E+{.E , A ( V n ( / / B ) ", +"% % % : = 3 h u { , } p v < y ^ @ q P E Z i Y W i.#. .'.(.).}.h.d.m.v.b+v+3+X.|+[+)+)+Y.Y.W.m+}+%+i+l+&+[+U.H.l.z.2.@...^.y.z./.#.S ..{.!.#.U m ^ ^ ; ^ z =.G 8 ` 6 ^ O ~ T I &.# 6 S B ^ f V + H - < G d /.R K 5.0 +.}.2.5.'.w.D.w.U.t+B+v.c.2+ +[+8+y+Y.*+[+c+8+|+C+3+X.}+D+N.c 6 = s = & $ | : | : % % 2 R s @ u y s s # g s % % | a / : ; n - 8 i d s y [ Q s s s s % % % % % % % % % % : : % % $ = % $ & w . & w x 3 6 9 + h P - < t _ g f E { A 7 z m g p F 9 C < l F - y 3 ] w w y _ v J G 4.Q.M =.@+E+Y.+.b+1 0 E+:+[.Z @.>.l.E+E+e.S &.r [ &.K K K 7+E+7+8 r ).n.t+x+f+E+m+D D z f ` @+E+i.N.J.h l v m.E+r+6.[.j.{.f.( c L.E+=+i.1 &.U U U [ e A A E 6 ", +": s % % : | ^ - 6 T P p O I G J < F - < ! A 1 d u 7 1 =.$._.}.q.k.'+b.O.v+0+X.9+|+Y.m+P.Y.Q.r+}+%+c+.+`..+n+v.a.$.!.).B.x._.5.F.[.` $.!.X #.V @ 5 * # ^ z r g e 8 > < c E H &.{ _ O L 6 I 8 f ) ; 5 ) C e 8 g .@.g m &.>.&.<.5.).{.3.3.G.w.J.3.O.X.W.X.9+z+[+r+&+3+3+S.z+c+ +u.2.[ P # u i c G a + $ % : < ~ v u ^ s s s 4 L s s : $ 1 a $ d Q % ^ F F % w X k % s s s s s s % % % % % % % % % % % ] y y x : | $ . w x 5 q H * F > + > P F _ ' f u f D E , z M t l G ' t - T @ ; ] . w ^ q P _ v E+}.o 2 P.E+E+E+w @ 1+E+n+&.#.W .*+E+E+j r N V e e e &.j E+E+H.S }.:+E+ .o E+E+i.J O b } ( W.E+W.E+t _ l _ E+E+~.} } D a ( V N n+E+ +1 [ j Z S i K R V ( m ^ ", +"% % % % % % | ; q T q C J b f D O p l t t h p ' o o o d i .[.q.G.C.u.U.o+C+X.X.R.R.Q.&+c+Q.y+d+w+y+&+c+}+Q.t+y.g.'.'.s.G.!._.w.e.X L R Q b J - 5 ] x 4 @ - + _ p 4 > B @ q ( h 4 I Y > O L b P ] ] ] F &.Y / ` R > y / #.h 8 (.[ j.d.q.7.9.H.J.n. +C+c.4+1+S.*+D+0+t+3+R.W.1+4.{.K h m U j j A 2.u - ] | 3 +.e 4 s s s s 5 <.) s % $ , p > <.< % $ : % | t <.% % s s s s s s % % % % % % % % % % : y V X , % $ # u +.Q P > x ; q ^ + C - h < J I G o m d a 7 u ! o b o G F 9 ^ # ] 4 & 4 ^ T > m !+~ f ! 2+E+++V x o Q.E+a+j =. .,.,+E+8+U N A 2 2 V N U g.E+~+7.U a+E+c+d W E+!+S v I O } G v+E+@+~ I J _ v E+E+E+I ! !.e.Z ( #.c+E+D.c &.j j S i i U Y / ! ; ", +"% % % % : : | = ; H q - - t ' b b g ' G J F P l J p o M f 2 j 6.s.N.u.c.5+t+X.z+z+R.)+Q.r+c+&+Q.}+c+m+m+.+.+)+x+k._. .2.{.}.[.6.,.+.<.i e 2 f < + 5 w w . . w w w w w = = = w . = ; q ^ 3 t y . x x x T 7 O k e f * y d 2 t d p { [.5._./.:.a.r.C.o+T.'+b.T.2+D+4+4+2+ +W.z+b+p.}.O ) B 0 :.R =.8.a E I y g Y / s s s s s H j + s : . N p Q &.T @ z u $ ] A 7 : : . J < s % & 4 = % % % % % % : : : . A ~ m : $ _ W <.T l # . ^ ] ] ^ T C H > J v P G b u u 7 B B , Q D } _ 9 + ; # x = = * * 3 y.)+/ z u F.E+m.@ ] a.E+E+'+<. .,.r.E+E+V.e { A d 7 d / ` y+E+`.;.&.}+E+&+A.f+E+W.(.l p } ' ' z.E+~ O M } t P P.E+E+2+t+=+n.#./ o.E+E+(.n R r 8 U &.&.Y N ( o ) ", +"= ) + 4 & | : : | # > - y ) H F P l t _ t l F - C > _ J k ' D S ].w.N.n.a+4+1+0+ +9+|+R.R.[+m+W.W.W.&+r+Q.Q.r+<+c.z.'.!.@.!.>.@.X #.<.i R n , ' - * w & = $ $ $ $ $ | $ $ $ $ $ $ | | | | $ = = = = = = w w ] + ; . 4 > ' T w ] < e [ a R j @._.*.v.L.G.0.I.v+x+T.T.t+<+S.n.4.w.=.- # g .;.X 6._.i &.r &.O b K q % % % = o [ ] % : 5 i.E / I : f j 1 % q K 9 % ; m d L $ ] ! r a s s s s s % % % $ H ( L o % * V &.{ > @ & 3 # . w # > - P _ C F J t I p g E a A V 1 V d ' > y # w # t G F b+b+E+E+W.! u H.Q.{ ^.U.Z.E+E+:+7.B+)+;+E+E+E+2.d , u D m w.c+E+E+E+z.c e.E+E+g.m+E+W.i.J G O ' } z.t.} b M o t F E Q.E+E+M.a.( ,.3+E+E+E+C+( N c 1 V n ( / a B b ; ", +". 9 P q T + & | | $ # - F + 3 ) + @ @ 6 F < 6 + ^ 3 ; ; + H P g ( S #.-.>.2.2.6.9.E.I.c.A+ +[+P.Q.m+&+c+}+y+.+P. +K.{.W X X X ~ <.<.K U R V a D k q ^ x $ $ $ | | : : | | | | | | : : : : : : | | | | | $ $ = = & $ $ | $ $ = . x ] 3 y l u n K '.F.l.f.l.I.U.o+4+1+u+T.M.L.s.:./ < - A i. .}.7.-...:.6.L p < K ! % % % y c z % % : 3 0 , 1 ^ % o S - = 7 ( % ] m n g D | C / ] + s s s s s % % % + f t A ' 4 G o i B T . 5 y F ' > 6 < C v p < P l v ' l g z E ( 2 e [ n 7 g h y 4 5 d ~ + : $ & ^ G f m M O p 9 x @ _ m n 8 ~ -.;.-.K c A , u m b ! u d a A ( a a 7 E B D O p t v p k ' } [.E+I g ! g J l _ k ! , a a { Q d B B u u 7 Q { { { { Q { Q 7 7 M 3 ", +"4 F h 9 > P q * $ | | * > F y ^ ; ] * # * 3 ^ * x w & = w w 4 y h p p I I O o o b E Q e Z (.h.'+o+z+W.r+y+y+c+.+Y.t+p.2.+.j K K S i 8 &.Y A , m } v > ; . $ | | : : : : : : : : : : : : : : % % % % % % | | : | = | : | : : | = = . w x # + < ! V 7.a.}.a.z.F.0.p.C.N.d.d.*.K k H . y d ..|._.!.$.a.E.e.<.2 m e / ; % % } 1 @ % % : 3 $.<.d % q i 7 % - V v % h 8 f ^ & % T c < s s s s s s % % : l ' 5 1 O C G _ 8 < * # h < E =.f l r #.h &.-.o k &.2 k Y u M d , N c i .[ G C ) @ A / | : : $ ) v o f ! } v + x 3 F M A e K <.Z S N a E D D ! O M ! f u 7 z A f b M o b I k J J p I I B.I.}.O g o I v _ k f , 2 2 / ( a B z f b ! b D E E z u B f z z f O + ", +"w - t C P h P > 3 = $ $ ] > P > ^ * x ] w w x w . $ | : | | $ = w ) P t J t t J l J I I g b M a R !.1.v.x+[+}+c+c+R.u+x.X U [ R Y e r c ( a 7 b } l > 5 4 & = $ | | : : : | $ ] ; . | % % % s s s s s s % % % : : : : $ | | : : | | | | = . w ; - U ~ +.'./.].8.q.N.}+|+|./ 3 : : & ) } 2 j ..,.$.|.j.|.x.<+ +S.W > % < c h % o.o.o.; |.~ h : O 8 Q H D K E 3 M X t # w w 2 +7.: s s s s s % % ^ G + T ~.z+5+O.C+X.a+b+' b 6 D.7+U p r +.f <.L J f @.<., ..n M z m Q e _.1.j.,.( _ M #.G & $ $ ] 6 _ g f o ' h.g.R.E+- o B ( R [ r n d z b O O } G G I I g ).W.D+1+1+<.G ' ' G k I 1+4.k @++.g g I G k t t o 7 / N N 1 / , z M g p J _ h I } g o o o ' O G p 5 ", +"= 6 _ P < P P C > ^ & : | & 5 C - y ^ ] x ; . & = $ | : : : % % : | w + C < _ t < h l v k O O ' G } ! d K 2.E.V.n+[+X.v.2.R V n V n V A a d E b } v 9 ; 4 . . & & = $ $ | & * T q 5 . % % % % % % % % % % % : $ . x 4 x 4 x w . & = | | $ $ = & w 6 o , R j a.+./.v+E+r.} * | : | 4 T M e Z >.(.i.).)._.i.(.}+E+;.| T c v : B E+D+% ^ q.c # : P f 6 % k 7 @ % p r O T w l D r+A ! 1 + s s s % % b I % < L i R.E+@.! Q E+E+q #.7+E+@ F R Y D 8 ( > G 2 Z Y R A M } } b c {./.~ ^.@.o 0 ~ P ) ) T I 8 Z ! Y !.{.E+8.) ..h 7 ( { 2 n 2 7 u M } G J t _ h < > > z /.m+E+B v t } f ! ! ` E+E+E+0 t p p p J l v I m A 1 U S [ V B g l C F q + ) y 9 P < P v < P C F ) ", +". @ > - F t t l _ h 6 & | : $ x @ > > f , G w & + . : : : % s % % % : $ 4 5 - _ _ _ _ J k O G p k k p k p g m c >.9.I.3.9.U d Q / 2 A a , E z o I _ T 5 ] 4 w w . = $ $ = ] y q F 6 x % % % % % % % % % % % % | * @ > P p } ! D B , m } J P h l P C < t O r+^.Y 8 <+E+J 5 & . | & ; > ! R =.,./.:.[.|.}.'.A.V.E+/.F a q : % E+E+o P ! 7.J % % % % % % % $ : % x @ y | % 9 g P : O b x s s % x > c ' : v B ..E+}.<.< % E+E+J U E+o+^ 2 &.- Q V h F t B =.Y 7 g I v ' O N :.#.+.^.#.r 2.r k t / z _ S Y 7 j 2.z+E+<.C - d ..,.1 V _.!.+.0 o d <.V v C q 9 H C Y F.E+%.C v } ! u B 7 d 7 E f o p _ h _ h C h I D a N L W ].;.u G - T H ) 3 4 x w # * ; ) 6 H q F @ ", +"& H - < q l l v p v l @ x $ | | = 3 C 1 $.k ^ 3 L C | | % % s s % % % : : | & x ; 6 y q F < h h < h C F q T F h v I a [ 0 c f m z D B u m f ! g J _ 6 3 ] 4 w x & = $ | & 5 y H F @ w : % % % % % % % % s % % : x 5 q h I b , N R 8 &.Y / A n 8 ~ X ..~ 8+,+{.!.e.>+b.q 4 . . : . 6 - f [ X ).~.j.j.j.}.,.p.'.E+u.t . : : $+E+D+> v z X @ : % s s s s s % % % % % s % % % % % % % % % % % % = y C q $ 5 = l.E+R ( ' }.E+o.h D.E+[ < i k J 8 r t 9 l c =.e J l p t p G W >.n ).).n !.i.( D K 0 o e L m D D *.~+O.R l / L 0 L [ &.!.).~ B 7 &.L A _ h - 9 T B Z o.E+%.G p D / Y S Y V r r V Q m } l P - 9 q ' z { r j -.'.S D I H y + ; ] . = = & & x # ) 6 T < ) ", +"p K =.&.> < 7 o l m ' v P ^ & | | $ * n +.> 9 q m * & y M w % % s % % % : : : : | | $ $ $ $ . x # # ; * 4 # * ] # ; q h _ p ' } O } M o g O I t > 9 3 ; 4 x x 4 4 . w & ] ) + 9 F T # : : % % % % % % % % % : : | # 9 < p g E A e N 1 ( a d A 1 i +.-.p.E+,+[.@.H.E+/.++E+R.& : = 8.!+E+<+'.:.].}.].~./.%.E.j E+r+G > ^ T.: E+o.| 4 > *.P.H.D+D+E s E D+E+0 % F l.D+E s E D+j % % :.$+E+o.% % % % % % % % T.E+% | = $+E+M & u+E+5 t ` [+_.T.I.) - U d+E+^.F B '+P.S z s.`.E+l+}.r {.).y+X. +E+T.'.2 l o 1 x+E+U.r ! >.K p.f+6.E+W.Y } I .+s+3.E+C.- T 9 9 U ;.S.E+Z G O S j -.8...D+W.q.|.h._+z.f+E+`.{ C J.E+Q R '.8+z+( ..Q.E+V 5 w.R.a & . w x ] ; + T C P ^ ", +"B v W n l Y ,./ D $.B p k } D , , $ y S g H C k P T 9 / N | : : : % % % % % % % % % : % : : : : % | | $ $ $ = = = = = . ; 9 < J } G l h h _ t > @ ; # 4 . . & w & w & w ] 5 H P C q * : % s % % % % % % : : : | | $ ] @ q t M z , d a 7 B m z d V r 8 F.E++.j 8 9+f+S + Z.E+= % T.)+p ,.E+'.:.~.}.g.j.'.y.E.U E+B+B b S V c.E+. $ % d.[+p s l.E+0 % % $+l.% % % o.s s |.$+o.s % o.D+% B E+% % % % % s s j E+l.0 0 E+D+Q x | E+Z * -.E+* ^ u+u+y q F ~+B+C < J 4+T v G.;+q.2 =+8.Y E.l+E+N.0.s+{.(.c b } g Y.)+a p e x.}+j.b d -+E+A ;.m+E+M.:.A+r H 6 q } W x.E+w.r G 0 >.U :.E.d+E+j.f.o.;+g+6.R ~+E+` } E+x+d &.J.E+L.V i [+E+' 8.^.- t ) 4 * ^ ^ y F < < v H ", +"3 I L P J K X b j [ F t a n O +.E & o 8 x * } i / P { -.Q 6 v A ] P l % % s s % % % % % % % % % % % % % : : : : : : : : | $ x 5 H P _ F ] 4 # ] w & & & $ $ | | | | | = . 4 5 t J h * : % s % % % % % % % % : : : : $ w ) - h I o ! f b } k G } z Q 2 b+:+Y V K &+4.F ) [+s+= 7 E+c h K E+B+(.i.i.j.:.!.w.g.1 .+&+u @.1.< Y.++< y ..!+S ' : 0 E+l.% % o.E+% % :.% % % F D+l.% B E+B % F E+:.% % % % % % :.$+B % % % : $ = d E+d * ; j.x @.)+A+Q D E x+E+q P h.6 9 d %+a+t g r+m+, e U.=+1 +.1 7 U g h k i %+o+D k X C+A+0 / X y+E+_.n u+:+` K _ + y H T Y @.G.f+5.B 2 |.j ..9.=.5+-+5.^.7.i+ +<.j.%+,+Y / E+s.Q Z v+(+x.8 ` X E+y+z+7 1 S _ 3 T ' , =.r } } / ! ", +"q =.( ] _ [ n ( Z ' q d Z } R ~ _ G U z | + ( X M 3 1 +.q p c r t o n s s % % : : : : : * m I - % $ H 9 4 # : % % % % % % % % | | w 5 @ * & = = = $ $ | : % s % % % % % % % w V .I ) : % % % % % % % % % % % s % % | . 3 6 C l p G I k v C H 6 _ g ' E+0+u m [.E+i.- 9 E+;.4 T.E+O.5+3+D+W '.'.$.2.'.;.l.[ A f+E+o 1+t _ E+5+} t E+t+N t | 0 E+0 : % :.E+B F :.% % % 0 E+0 % o.E+o.o.o.o.% % % % % % % o.o.% % : : : : $ b+E+= * # <.#+s+E+7.Q < < ^.E+S D 8.y v *.E+&+4+x+2++.E z E+3+a 2 B M J t _ G G.E+7.o g 7.E+0.V [ ;.Q.E+R R E+Y.,.A v T H C J $.[ 0+)+&.! +.g.%.{.*.,.E+)+L.j.4.E+N.(.l.E+z.d ~.E+A n U }+.+S a <.i.@+E+-.! K A T H e D Q '.V M j W b ", +"2 ~ , > { #.V X j p ' N B B >.N p N -.} 3 - &.d $ - Y E F p z 8 a } Q = $ | : : : % % @ 7 v p A # H 2 K E E % % : % % % % % w h l # % @ z h : : : : : % % % % % % % % % s s x d W I y | % % % % % % % % % % % % % % | x ] + 6 T C P < C T F 4 = & 5 %.E+J _ _ 5+4+_ h 5+E+T ; E+X H _ , K X >. ...%.@.H.z.N , f+E+2+p v 4+E+G o j.E+7 n a y T.o.% % % :.E+E o.% : % % o.o.% % E+0 % % % s s s s s s % 0 E+0 % % % % % s $ E+<.w J E+}.= E+V.y ^ 3 9 8.E+U u+3 6 G 9+D+V h I p ' O j.E+E , V ( d a .n 8 9+0+u z m 3+X.r 8 #.Z E+H.S B.E+i [ z G h P h z <.x.E+F./ 2 =.[.@.].h.I.E+].J.7.d+c+'.7.d+E+W V E+X.Y U u.E+L.Y V |.3+!+E+2 l U J 9 [ U b >.-., d j.=.b ", +"A S o O S j M N [ G , K V r @.[ z =.>.Q J e @.I $ b c @ . 5 J +.[ o ! H ; . & $ : : % f / ^ z e + q A Y o ^ % : : % s s % $ l / u 6 w a Z Y &.l % & v E > % | 5 6 4 % % s s q R 2 I + % % % % % % % : % % | % % % % % | w # ; ^ ) ) ) M L } $ | % # N.@+@ * o Y.C.v k P.*+q y E+E+y h e /.Z -.=.X =.j 1.i.7 M 2+E+L < P Y.Y.> l [.E+Q ( A S u+A : : : : E+$+% % % % F D+l.% % E+E+% % F E s s s s s s |.$+B % % % % % % B E+7 & s.#+$ _ E+A.. 4 3 > @ E+++y y q H o+E+'.v t i.' } v.f+f Q , Q , 7 i U Y r+B+Q a A +X.R L +.A.d+~ #.A+>+&.N a b I I G ! E p.:+_.c N [ Z j.W $.x+;+6.s.J.$+9+_.6.++i+@.=.E+'+S #.3+(+D.U +.^.4+Y E+A+c N t ' }./ i ^.&.2 V !.W n ", +"L { G g D M t b J 3 J ( ' ! N k k Z L u D X @.1 g c K p w : y &.i } p l h F H ; . & 5 Y o ; r Q | h r _ | | | : | | : % % $ E u = % ) c f q L f % g d / ! % > 7 &.o % $ _ m { c l C * % s s : | | ] } I | $ % % % % s : | $ & & & = | ' 8 ) % : : - 7+c+:.| 6.E+h.I +.E+'+C H #+E+E+E+@+/ 8 L 0 j S @.b+j E b G.W.v t S E+C.F C 0 E+&+Q 8.t++.' F ] = | $+% % % s % :.E+:.% % $+E+E+E+$+s s s s s s F D+D+F % % % % % s D+E+C % |+E+#.s+E+k._ & 3 C + ++P H y q F m.E+E+E+E+S } n E+m+E E f u Q { A A k.E+y.2 ( / n.E+J.'.p.,+,.W _.E+7+&.c { 7 D f f u j c+}+=.r r U G.7+Z |.E+w+~.g.4+E+o+:.k.E+S.+.L 7+7+w.3.g+g+K.n x.r+G =.r+*+Z 1 ' a [.Z ,.h.` 8 e e...g ", +"i b g G p p I p v 9 ) 3 y > > + 3 J g J o / 1 g } [ a y | : t j D + 6 h t I G v > + P / H ! R > 3 r 2 5 . & . & = | $ | : s o V 5 % h n q t 8 > J V d O ; 9 2 7 D l % z M w m } $ & $ s s s | $ 4 M K U &.o : 9 ' C C 5 : # 5 . | : 3 { z % s % % C _.h.: }.U.V.x.B.1+v+5+> 9 ; c.u+C o 7 n c n n D. +C+w.z ! B.' } 1+5+5+o+e.H C #.t+S.d B a ( A O T w 7 : : : % :.o.o.:.% % % o.o.% % % % % % % :.o.o.o.:.% % % % % o.o.o.B % 7 T.= V c.Q ] 4 + @ / R > 3 y T C J 9.4+8 T _ ` v+x+3+u z D B A / 2 0.3+ +D.( 2 d 7 p.z+I. .2.2.r.Y.)+R.i Y A B z f f w. +X.n+n+<+<+<+D+0 f.)+*+W.~.o+r+&+A+A+m+W.P.W #.f.[+n.1.o.W Z X.0+2+O S.0+x+A.m t m #.1 L i.U c ..h.x.R ", +"Y , g G G p G k I G t H * # ) T 9 + ) 9 l J J v t p J v T ] Q g # | = 4 + F G v _ P F A 7 u t x t L t & = & x . & & = $ & ) < e > % a 7 ) ( f * ( / H = % { ( } y % ! 2 5 y g + % % % % % % % % . d { C V Q F ! Y N B H ; ! V m 5 % v 2 M 7 O . : 7 2 . | = 3 6 C G J h _ T y x 4 * > t M z B z D u B 7 u ! ! M o f I k l C @ + H _ ' ! m f , K <.[ / m ^ : : % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % : = . = # . ] + 2 ].+ * ] F q 9 q < v - T k I G D , D E D z u B , B A 2 A 2 a , 7 n &.+.>.i.|./.i.%. .S 1 7 m ! o ! , { n N [ U K #.Z L X W ,.i.|.6.~.6.~.[.:./.,.;.#.~ !.'.,.>.@.j n E O ! , A Q u M o o m d { a n $.x.i =.~ ", +"3 k } g I ' g p k I G k C H ; * 3 > C @ 6 h t l v F Q j / R m @ & | | | $ x 5 T v k k ' O ' > ^ H _ 3 . . . ] ] w w . . x f f g # 5 8 I 2 o = ^ i 7 h ) y U d ) | 5 [ J s , O w % % % : % % s s 4 N k @ i o : m r } 3 # ( g ) [ I % , Z _ 2 / w 6 e J % $ v j U O ! #.n o r l ; v - > v O b o o b f u D z z D z [ j , k l C H @ T < ' O I D a #.$.,.!.~ Q q = % % % ] H @ 3 . % % % % % % : : : : : % % % % % % % % % % % % s % s % | : : . x ; x E.^ 5 5 + - y y H l h > J k t G u f D 7 E u E 7 2 { n V / a A Q { N i =...$.2.).(.,.W j c , D D f E A V N R &.S +.@.-.=.@. .>.%.(.:.:.j.:.|.|.|.'.;.+.X ,.2._.(.!.<.R Q u 7 V r [ e Q u z 7 a { 2 / @.r.[ r <.", +"] t M g o o I p k O g I G g p > ^ # + H > T - - < _ I d m _ C _ F ) # $ | | $ w * H P k I I l F 9 6 6 3 ] 3 ; ; * ; # # 4 - C w : z N u 3 % % & B V C 4 * 1 { J + G c H k W a P w = % : % % % % G 1 5 b / ^ : e b | s h r + J +.q > <.O 4 e ! % D 2 ^ % } a 2 N E , @.Z e -.d G =.E F B +.:.1 k p O f f D z u / $.` O h q H + y 6 F p J < } m &.(.{.q.|.~ V C $ % 3 O D o { G : % % % % % % % % % % % % % % % % % % % % % s s s s s s % : $ w.~.}.p 5 5 # q 6 ] ; 9 v P l p p p I ' b f M M z B u d a / 2 A V { , A e L =.` -.W !.!.-.0 8 R n B d a a V c Y R K j X ..W W ;.%.!. .%.$.i.i.'.,.,.%.>.-.#.+.>.i._.2.%.` 8 / { 2 r <.` Z [ ( ( V V n c / c -.-.Z d ", +"w J O k g ' k p G G k p p p J t v F @ ; 3 5 H q F P > H y * ; 5 6 T < q ^ . $ | | $ . # ) > h _ < l _ l < T 9 6 @ @ ^ + H ; ; x 3 ` p | : % % % & # = % : q k ] % + m t P Y J ^ | = % : | : : : N ! B ( ^ % M S @ s s f B x 7 e 4 Q / . O { ^ . 8 k % ^ S 7 z > 6 M !.n { ~ z z R k C #.n , f l _ k o O M f ! <.'.[ I h ( K D 9 @ T , 2 t G I Q X 6.f.^.2.~ A > | _ Y F % < > % % % % % % % % % % % % % % % % m X A 3 & ' > s s s s s s % : = = & . # & 4 5 ^ 5 ) P h q h l p M G ' O M D ! b m m ! d ( / / 1 Q , Q n i 0 0 ~ Z ` +.<.i r 1 1 d 2 V N &.8 i j #.=.X ;.;.W ;.>.!.!.>.;.,.>...>.;.W @.` 0 #.!.%.'.'...~ &.V 2 N 8 #.@.=.j [ c N Y N N V n N r e v ", +"x v I k I G G I G G k k k J p G G J v P y ; * ; y - > H H 5 w w x ] 5 6 y 6 y * w | | | | = ] ; ) > h _ t t h _ h > > > q 9 q T A -.} 3 & $ : : % % % % % % % % % % % | # + 5 * | = : = & $ : H L / q $ % % Q f . s s l J - R y | K < P ( @ % p 0 l : O @.l 3 ; ) [ r T e R y d G q > R +.o t P P G I I I O o .8 t C 0 7 G ~ ' + { Y c N f } M c ;.6.j.[.(.j 7 H _ S 7 . w . % % % % % % % % % % % % % % % % ! 8 P % P { > % % % % s s % % | = | . w w ; # + 9 - > H > v t g } k g M ! ! b D M g b u A A / ( Q { , V r R i S j <.<.L [ c n { Q ( e U j j #.~ =.@.@.-. ...W !.>.>.>.;.!.!... .@.X X Z j 0 =...W ;.W <.[ 1 n r K -.!.!.+.U e Y R r Y c 1 ( V ( h ", +"* t O ' I ' } g ' } ' ' p k G p ' k G G t < T ^ # * 5 @ > q ^ ] 4 x . w w # 3 y > ) ] = : % : | | & 4 ; 9 - F h h h C - q P < p a d B H ) * & | % % % % % % % % % % % : % $ ; # $ $ & ] = : = 1 A | : % | : # x : s s % _ } . s & B z - # s s O n } 4 ! X t u # ^ K + 9 &.H y r - ) < I 2.B P T q h J k J k d $.f q m @._ d '.J t -.o z %.7 O J u [ ..;.%.>.#.( t > n X J % % % = u / _ & % % % % % % % % % : c 7 4 % D I = % % % % % % % % : $ : | . # 3 y ) 9 F q 6 - c ,.1 t t G g m } g b g k b u Q a V ( , a 7 / V r &.8 S S i R e n / { ( 1 i j ~ =.@...,.>.;.!. .!...W ..%.>.%.,.'.%.%.!.;...` #.=.@.-.-.=.~ S e n N R #.!.(.$.` L 8 &.R e e N c c N c h ", +"* ' f } I } G ' } I } ' G I k p ' G p } k v J _ F 6 * ] 3 y 6 q H ^ x . = = = . 4 # 5 ^ 3 ; w | | : | : | $ & ] 5 6 6 6 T C F > - 6 q 9 T H 6 # | % % % % % % % % % % % : % | = $ = 4 w | = p X Q | : % & : % % % s s s s s s s s s | : s s s 3 9 = : y M ! | : k k % ! M % p 2 > ] c < .G 9 y y F P l _ t 0 ..g H c 8 F R -.- { #.P &.,.P p v J z 1 [ S j &.V b h - [ K ^ % & e l q 8 + % % % % % % % % % F <._ : % F 4 4 > > ] * & % % % % : % $ w ^ q 6 y 6 T 6 q h Y L M l I k I g g M ' G ! m i ,.R 1 { Q 2 <.` r e Y r r R 1 / / / 2 n N r 0 ~ @.%.>.2.(.2.$.>.!. . ...;.%.,.,.$.i._./._._.(.!.-. .>.W -.` #.U V { 1 U X ,._.i.=.#.0 K 8 [ r e r Y R R J ", +"* ! , } } g J I ' ' I g } G p p I G G I k t v J k v l P 6 5 * 3 y 9 H 6 3 ] w = $ = = = . 4 ^ ; ] x $ $ : % % : | | | & w 4 ] * 3 3 + T 6 6 > > 6 + ] $ : : | : | : : % s s % % : = w & & ] Q D d . % : % % % s % % s s s s s % % % % % % % % % % % s s s s % % : | % * x % y > % | D V m T ^ 3 @ 9 - < h _ W =.( q c z J '.I @ &.A _ >.Y - o O t p o D Q a a , / P = h X l % v K x M X 3 % % % % % % % % % m R ; % % | 3 G f / @ a v : . M Z q % : $ ; C * * @ > 9 F v W { l v G p g O O o O I b 7 1 i c A d A ( 8.~.S N V ( V { E , 7 R '.Z N R j ` !.(.$._.:./.).$.,.!.>. .!... .(.i._.[.g.8.{.7.~.2._./.'.W X 0 &.2 Q 2 Y j ;.>.-.+.Z Z L K i i U 8 U S L } "}; diff --git a/gui/mplayer/pixmaps/aspect.xpm b/gui/mplayer/pixmaps/aspect.xpm new file mode 100644 index 0000000000..ad07d86e33 --- /dev/null +++ b/gui/mplayer/pixmaps/aspect.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static const char * aspect_xpm[] = { +"16 16 3 1", +" c None", +". c #000000", +"+ c #FFFFFF", +" ", +" ", +" ............. ", +" .+++++++++++++.", +" .+....+...+..+.", +" .++++++...+..+.", +" .+........+..+.", +" .+........+..+.", +" .+........+..+.", +" .++++++++++..+.", +" .+...........+.", +" .+...........+.", +" .+++++++++++++.", +" ............. ", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/cancel.xpm b/gui/mplayer/pixmaps/cancel.xpm new file mode 100644 index 0000000000..1dd78b19b1 --- /dev/null +++ b/gui/mplayer/pixmaps/cancel.xpm @@ -0,0 +1,139 @@ +/* XPM */ +static const char * cancel_xpm[] = { +"55 16 120 2", +" c None", +". c #786663", +"+ c #71615F", +"@ c #808080", +"# c #8F8381", +"$ c #A76C5F", +"% c #A6503F", +"& c #5D433E", +"* c #736967", +"= c #8E564B", +"- c #874032", +"; c #6D6B6A", +"> c #897976", +", c #B65846", +"' c #C7523D", +") c #9E3D2B", +"! c #5B3B35", +"~ c #80716E", +"{ c #9E5042", +"] c #BF4933", +"^ c #862C1D", +"/ c #57514F", +"( c #894335", +"_ c #BE4028", +": c #BF3E26", +"< c #A43C29", +"[ c #724841", +"} c #877976", +"| c #91483A", +"1 c #B4432F", +"2 c #7C2516", +"3 c #5C3832", +"4 c #909090", +"5 c #000000", +"6 c #786D6B", +"7 c #823526", +"8 c #BF4028", +"9 c #BE3F26", +"0 c #9A3623", +"a c #60413B", +"b c #746F6E", +"c c #83463A", +"d c #B24733", +"e c #6F2418", +"f c #523834", +"g c #858484", +"h c #6F615E", +"i c #823324", +"j c #B83A21", +"k c #932F1D", +"l c #834437", +"m c #BA4D39", +"n c #782618", +"o c #4A3531", +"p c #848282", +"q c #67524F", +"r c #8A3425", +"s c #BC3F27", +"t c #B93922", +"u c #C24D37", +"v c #94301E", +"w c #3E231D", +"x c #6C6B6A", +"y c #593A34", +"z c #A34939", +"A c #BF432C", +"B c #BA3A23", +"C c #B53821", +"D c #7D2B1B", +"E c #5B4A46", +"F c #7F6A66", +"G c #964E40", +"H c #B94B37", +"I c #8C3322", +"J c #93311E", +"K c #BC3E26", +"L c #B93A22", +"M c #7A2A1B", +"N c #665551", +"O c #7C6B67", +"P c #8A473B", +"Q c #B64A36", +"R c #79291B", +"S c #4E403F", +"T c #503833", +"U c #953826", +"V c #B93921", +"W c #6B605F", +"X c #745854", +"Y c #995245", +"Z c #B64632", +"` c #7A2718", +" . c #533C38", +".. c #61423C", +"+. c #973725", +"@. c #BF3F26", +"#. c #BC3A22", +"$. c #763226", +"%. c #857A78", +"&. c #9D584B", +"*. c #BB4631", +"=. c #7F2919", +"-. c #4C3430", +";. c #5A3831", +">. c #A13C29", +",. c #C23D25", +"'. c #9D3420", +"). c #574C4B", +"!. c #837F7E", +"~. c #7C3427", +"{. c #7E2B1C", +"]. c #3B2F2C", +"^. c #5A3B36", +"/. c #A2402E", +"(. c #8B3121", +"_. c #574B49", +":. c #7B6B69", +"<. c #554947", +"[. c #5F514E", +"}. c #4A3B38", +" ", +" . + @ ", +"# $ % & * = - ; ", +"> , ' ) ! ~ { ] ^ / ", +" ( _ : < [ } | 1 2 3 4 5 5 5 5 5 5 5 ", +" 6 7 8 9 0 a b c d e f g 5 5 5 5 5 5 5 ", +" h i _ j k l m n o p 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ", +" q r s t u v w x 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ", +" y z A B C D E 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ", +" F G H I J K L M N 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ", +" O P Q R S T U 9 V D W 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ", +" X Y Z ` . ..+.@.#.$. 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ", +"%.&.*.=.-. ;.>.,.'.). ", +"!.~.{.]. ^./.(._. ", +" :.<. [.}. ", +" "}; diff --git a/gui/mplayer/pixmaps/chapter.xpm b/gui/mplayer/pixmaps/chapter.xpm new file mode 100644 index 0000000000..b64294fe8a --- /dev/null +++ b/gui/mplayer/pixmaps/chapter.xpm @@ -0,0 +1,23 @@ +/* XPM */ +static const char * chapter_xpm[] = { +"16 16 4 1", +" c None", +". c #000000", +"+ c #FFFFFF", +"@ c #CD0909", +" .. ", +" .++. ", +".++++. ", +".++++. . . ", +" .++. .@. .@. ", +" .. .@@@..@@@.", +" .@. .@. ", +" . . ", +" .. ", +" .++. ", +".++++. ", +".++++. . . ", +" .++. .@. .@. ", +" .. .@@@..@@@.", +" .@. .@. ", +" . . "}; diff --git a/gui/mplayer/pixmaps/delsub.xpm b/gui/mplayer/pixmaps/delsub.xpm new file mode 100644 index 0000000000..dd29baa406 --- /dev/null +++ b/gui/mplayer/pixmaps/delsub.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static const char * delsub_xpm[] = { +"16 16 3 1", +" c None", +". c #CD0909", +"+ c #000000", +" ", +" ", +". .", +" .. .. ", +" ++. + + +.+ ", +"+ .. + . + ", +"+ +. ..+ + ", +" ++ + ..+ +++ ", +" + + . . + + ", +" + .. +.. + ", +"+++ . +++ +.+ ", +" . .. ", +" .. .", +". ", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/dir.xpm b/gui/mplayer/pixmaps/dir.xpm new file mode 100644 index 0000000000..56791df7d1 --- /dev/null +++ b/gui/mplayer/pixmaps/dir.xpm @@ -0,0 +1,148 @@ +/* XPM */ +static char * dir_xpm[] = { +"16 16 129 2", +" c None", +". c #B5C7C7", +"+ c #B5C6C7", +"@ c #B5C6C8", +"# c #BDC9D3", +"$ c #D6DFE3", +"% c #CBD8DA", +"& c #B2C3CA", +"* c #94AFBC", +"= c #739AB4", +"- c #7FA4B9", +"; c #82A3BD", +"> c #4380B1", +", c #437FAE", +"' c #4381AE", +") c #7FA3BA", +"! c #2D7088", +"~ c #265E70", +"{ c #255264", +"] c #1D4C60", +"^ c #A8D7F2", +"/ c #C5E4FF", +"( c #CAE7FC", +"_ c #B1D9F2", +": c #B1DCF0", +"< c #71B6E4", +"[ c #8EAEC8", +"} c #DEECF3", +"| c #DAEAF4", +"1 c #D5ECF0", +"2 c #E9F3F6", +"3 c #FCFDFF", +"4 c #FFFEFF", +"5 c #FFFFFF", +"6 c #FAFCFF", +"7 c #D0E6F2", +"8 c #C8E3F2", +"9 c #75B3E4", +"0 c #7BA5BD", +"a c #FAFEFA", +"b c #FDFDFD", +"c c #FBFDFB", +"d c #F8FCF8", +"e c #FBFCFB", +"f c #F9FBFE", +"g c #BDDFF4", +"h c #BADDF0", +"i c #63ABDC", +"j c #7CA2BE", +"k c #F8FFF8", +"l c #F9FEFF", +"m c #FDFCFD", +"n c #F7FBFE", +"o c #F7FBF7", +"p c #F3F7F7", +"q c #F7F7FA", +"r c #F2F7F7", +"s c #AED7F0", +"t c #AED6EF", +"u c #559DDB", +"v c #80A4C2", +"w c #F7FBFB", +"x c #F7F9FA", +"y c #F2F9FA", +"z c #EFF4F3", +"A c #EBF3F3", +"B c #EFF4F7", +"C c #E5F2F6", +"D c #A1CDE7", +"E c #9DCBE8", +"F c #4694D4", +"G c #84A2BE", +"H c #EDF3F6", +"I c #E8F2F0", +"J c #E6EFF1", +"K c #E1EEEF", +"L c #DEECEC", +"M c #DEEBEB", +"N c #DEECEF", +"O c #D8E8EC", +"P c #89BBDD", +"Q c #89BAE4", +"R c #3488CC", +"S c #7BA3BD", +"T c #D1E2E6", +"U c #CCE4E1", +"V c #D1E4E3", +"W c #D1E3E5", +"X c #D1E3E4", +"Y c #CFE3E3", +"Z c #D3E4E3", +"` c #C8DDE6", +" . c #72ADD5", +".. c #6FAED2", +"+. c #287AC3", +"@. c #82A3C4", +"#. c #B4D6D4", +"$. c #BBD9D7", +"%. c #BDD7DC", +"&. c #BBD9D8", +"*. c #BCD8D9", +"=. c #C0DADD", +"-. c #C5DCDE", +";. c #B9D3DB", +">. c #61A1CB", +",. c #61A1C7", +"'. c #1C70B9", +"). c #82A2C4", +"!. c #9EC8C7", +"~. c #A5C9CD", +"{. c #A7CCCE", +"]. c #A9CCCE", +"^. c #AECFCF", +"/. c #B2D3D3", +"(. c #B9D6D7", +"_. c #AACBD6", +":. c #5399C0", +"<. c #539ABF", +"[. c #176DAE", +"}. c #004577", +"|. c #00447A", +"1. c #00437C", +"2. c #00447B", +"3. c #004380", +"4. c #00447F", +"5. c #00407F", +"6. c #003B80", +"7. c #003B82", +"8. c #003C80", +" ", +" ", +" . + @ ", +" # $ % & * = - ; > , ' ", +" ) ! ~ { ] ^ / / ( _ : < ", +" [ } | 1 2 3 4 5 6 7 8 9 ", +" 0 a 4 b c d e c f g h i ", +" j k l m n o p q r s t u ", +" v o w x y z A B C D E F ", +" G H I J K L M N O P Q R ", +" S T U V W X Y Z ` ...+. ", +" @.#.$.%.&.*.=.-.;.>.,.'. ", +" ).!.~.{.].^./.(._.:.<.[. ", +" }.|.1.2.3.4.4.5.6.7.8. ", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/dolby.xpm b/gui/mplayer/pixmaps/dolby.xpm new file mode 100644 index 0000000000..baef72e5e3 --- /dev/null +++ b/gui/mplayer/pixmaps/dolby.xpm @@ -0,0 +1,23 @@ +/* XPM */ +static const char * dolby_xpm[] = { +"16 11 9 1", +" c None", +". c #000000", +"+ c #C3C828", +"@ c #BCBF27", +"# c #DBE82C", +"$ c #B5B626", +"% c #CAD229", +"& c #CDD62A", +"* c #C6CD29", +"................", +".+@@###..###@@+.", +".$...%#..#%...$.", +".$....#..#....$.", +".$....&..&....$.", +".$....&..&....$.", +".$....&..&....$.", +".$....#..#....$.", +".$...%#..#%...$.", +".+@@*##..##*@@+.", +"................"}; diff --git a/gui/mplayer/pixmaps/double.xpm b/gui/mplayer/pixmaps/double.xpm new file mode 100644 index 0000000000..bb3664de99 --- /dev/null +++ b/gui/mplayer/pixmaps/double.xpm @@ -0,0 +1,151 @@ +/* XPM */ +static const char * double_xpm[] = { +"16 16 132 2", +" c None", +". c #000000", +"+ c #92A0AC", +"@ c #808F9B", +"# c #86949F", +"$ c #8C99A4", +"% c #929EA8", +"& c #98A3AC", +"* c #9EA7B0", +"= c #A4ACB4", +"- c #AAB1B8", +"; c #B0B6BC", +"> c #B6BBC0", +", c #BBC0C5", +"' c #909192", +") c #B7C4CD", +"! c #91A3B3", +"~ c #98A9B8", +"{ c #9FAFBD", +"] c #A6B5C1", +"^ c #ADBAC6", +"/ c #B4C0CB", +"( c #BAC6D0", +"_ c #C1CCD4", +": c #C8D1D9", +"< c #CFD7DE", +"[ c #D7DEE3", +"} c #BCC1C5", +"| c #8B9EAF", +"1 c #92A4B3", +"2 c #A6B5C2", +"3 c #ADBBC6", +"4 c #BBC6D0", +"5 c #C2CCD5", +"6 c #C9D2D9", +"7 c #D1D8DF", +"8 c #B7BCC2", +"9 c #AFBDC8", +"0 c #8499AA", +"a c #92A4B4", +"b c #99AAB9", +"c c #A0B0BD", +"d c #A7B5C2", +"e c #AEBBC7", +"f c #B5C1CC", +"g c #BBC7D0", +"h c #CAD3DA", +"i c #B1B8BD", +"j c #ACB9C5", +"k c #7E93A6", +"l c #8599AB", +"m c #8C9FAF", +"n c #93A5B4", +"o c #A0B0BE", +"p c #BCC7D1", +"q c #C4CED6", +"r c #ACB3BA", +"s c #A8B6C3", +"t c #778EA1", +"u c #7E94A6", +"v c #8C9FB0", +"w c #9AABB9", +"x c #707A84", +"y c #B6C2CC", +"z c #BDC8D2", +"A c #A6AFB6", +"B c #A4B3C0", +"C c #71899D", +"D c #788EA2", +"E c #7F94A7", +"F c #869AAB", +"G c #8DA0B0", +"H c #7A8996", +"I c #79858F", +"J c #AFBCC8", +"K c #B7C3CD", +"L c #A1ABB2", +"M c #5E7990", +"N c #657E95", +"O c #6C8499", +"P c #728A9E", +"Q c #627584", +"R c #7A8C9B", +"S c #8EA1B1", +"T c #95A7B6", +"U c #9CACBB", +"V c #B1BEC9", +"W c #9BA5AF", +"X c #6A7D8E", +"Y c #8196A8", +"Z c #889BAD", +"` c #8FA1B1", +" . c #AAB8C4", +".. c #96A1AB", +"+. c #B2C1D2", +"@. c #90A6BE", +"#. c #95AAC1", +"$. c #9AAEC3", +"%. c #8493A4", +"&. c #738B9F", +"*. c #7A90A3", +"=. c #889CAD", +"-. c #8FA2B2", +";. c #919DA7", +">. c #BBC8D7", +",. c #8AA1BA", +"'. c #8FA5BD", +"). c #78899B", +"!. c #8696A8", +"~. c #A6B4C1", +"{. c #AEBCC7", +"]. c #B3BFCA", +"^. c #B7C2CD", +"/. c #C3CDD6", +"(. c #A7AFB7", +"_. c #B7C5D5", +":. c #859DB7", +"<. c #8AA0BA", +"[. c #7D8EA3", +"}. c #98ACC2", +"|. c #B2C1D1", +"1. c #7F98B4", +"2. c #849CB7", +"3. c #89A0B9", +"4. c #8EA4BC", +"5. c #93A8BF", +"6. c #D9E0E7", +"7. c #B1C0D1", +"8. c #B4C3D3", +"9. c #B7C5D4", +"0. c #BCC9D7", +"a. c #B3C2D2", +" . . . . . . . . . . . . . . . ", +" . + @ # $ % & * = - ; > , ' . ", +" . ) ! ~ { ] ^ / ( _ : < [ } . ", +" . / | 1 ~ { 2 3 / 4 5 6 7 8 . ", +" . 9 0 | a b c d e f g 5 h i . ", +" . j k l m n b o . . . p q r . ", +" . s t u l v n w x . . y z A . ", +" . B C D E F G H . I . J K L . ", +" . ~ M N O P Q . R S T U V W . ", +". . . . . . . . X Y Z ` T .... ", +". +.@.#.$.%.. . &.*.Y =.-.B ;.. ", +". >.,.'.).. !.. ~. .{.].^./.(.. ", +". _.:.<.. [.}.. . . . . . . . . ", +". |.1.2.3.4.5.. ", +". 6.7.8.9.0.a.. ", +". . . . . . . . "}; diff --git a/gui/mplayer/pixmaps/dvd.xpm b/gui/mplayer/pixmaps/dvd.xpm new file mode 100644 index 0000000000..c95631ac9e --- /dev/null +++ b/gui/mplayer/pixmaps/dvd.xpm @@ -0,0 +1,129 @@ +/* XPM */ +static const char * dvd_xpm[] = { +"16 16 110 2", +" c None", +". c #CACCD2", +"+ c #D3D4D6", +"@ c #D2D2D3", +"# c #D1D1D2", +"$ c #D1D1D3", +"% c #B5B8BD", +"& c #EDEDEC", +"* c #FAFAFA", +"= c #FBFBFB", +"- c #FCFCFC", +"; c #FFFFFF", +"> c #D9D9D9", +", c #AFB1B5", +"' c #C6C6C7", +") c #FDFDFD", +"! c #F7F7F7", +"~ c #F9F9F9", +"{ c #F6F6F6", +"] c #F8F8F8", +"^ c #B8B9BD", +"/ c #B2B4BA", +"( c #EAE9E9", +"_ c #DCDCDC", +": c #F3F3F3", +"< c #F4F4F4", +"[ c #A8AAAF", +"} c #CBCBCA", +"| c #CCCCCC", +"1 c #D7D7D7", +"2 c #E1E1E1", +"3 c #F5F5F5", +"4 c #EFEFEF", +"5 c #CCCDCE", +"6 c #D2D2D2", +"7 c #CDCDCD", +"8 c #D6D6D6", +"9 c #E0E0E0", +"0 c #E7E7E7", +"a c #E6E6E6", +"b c #E5E5E5", +"c c #EBEBEB", +"d c #E3E3E3", +"e c #ECECEC", +"f c #9C9DA5", +"g c #C4C5C9", +"h c #C1C1C1", +"i c #CECECE", +"j c #E2E2E2", +"k c #E8E8E8", +"l c #D8D8D8", +"m c #E4E4E3", +"n c #DBDBDB", +"o c #F2F2F2", +"p c #DDDDDD", +"q c #D4D4D4", +"r c #A2A4AA", +"s c #C9CACC", +"t c #C4C4C4", +"u c #CFCFCF", +"v c #E4E4E4", +"w c #DBDAD9", +"x c #727789", +"y c #DFDEDD", +"z c #C8C8C8", +"A c #BCBCBC", +"B c #BFBFBF", +"C c #9E9FA4", +"D c #C6C7C9", +"E c #E2E2E1", +"F c #999CA6", +"G c #C5C5C4", +"H c #D3D3D3", +"I c #C7C7C7", +"J c #BBBBBB", +"K c #BABABA", +"L c #C4C4C3", +"M c #95969A", +"N c #C4C5C6", +"O c #D8D8D7", +"P c #CACACA", +"Q c #C6C6C6", +"R c #B9B9B9", +"S c #CCCCCB", +"T c #939395", +"U c #A0A2A7", +"V c #E5E5E4", +"W c #FEFEFE", +"X c #C5C5C5", +"Y c #C2C2C2", +"Z c #B8B8B8", +"` c #BCBBBA", +" . c #A3A6AD", +".. c #9B9C9F", +"+. c #F0F0F0", +"@. c #C0C0C0", +"#. c #7C7E84", +"$. c #EAEAEA", +"%. c #979798", +"&. c #989BA2", +"*. c #E9E9E9", +"=. c #959596", +"-. c #A6A8AD", +";. c #B7B7B5", +">. c #B4B4B3", +",. c #8B8D92", +"'. c #9B9DA0", +"). c #B6B6B7", +"!. c #B0B0B1", +"~. c #929396", +" . + @ # $ ", +" % & * = = = - ; > , ", +" ' ) ! ~ ~ ~ { ] * = ) ^ ", +" / ( _ : ! ] ! < ! ] ) ) = [ ", +" } | 1 2 { ] ! : 3 - - 3 4 5 ", +" 6 7 8 9 0 ] a b ) = : c d e f ", +"g h i 1 j k 6 l m n o 0 p q 2 r ", +"s t u n v _ w x y p 8 z A B C ", +"D 8 l 2 k d E F ^ G H I J K L M ", +"N v j k e = _ O 6 P Q A R K S T ", +"U V k c ; W 3 > ! 6 X Y R Z ` .", +" ..+.; : : > : : : X X h @.#. ", +" 1 = : > : : : : $.X I %. ", +" &.Q a > : : +.v *.< =. ", +" -.;.P j k p >.,. ", +" '.).!.~. "}; diff --git a/gui/mplayer/pixmaps/empty.xpm b/gui/mplayer/pixmaps/empty.xpm new file mode 100644 index 0000000000..9cff92d2f4 --- /dev/null +++ b/gui/mplayer/pixmaps/empty.xpm @@ -0,0 +1,20 @@ +/* XPM */ +static const char * empty_xpm[] = { +"16 16 1 1", +" c None", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/empty1px.xpm b/gui/mplayer/pixmaps/empty1px.xpm new file mode 100644 index 0000000000..2132efb1f2 --- /dev/null +++ b/gui/mplayer/pixmaps/empty1px.xpm @@ -0,0 +1,5 @@ +/* XPM */ +static const char * empty1px_xpm[] = { +"1 1 1 1", +" c None", +" "}; diff --git a/gui/mplayer/pixmaps/eq.xpm b/gui/mplayer/pixmaps/eq.xpm new file mode 100644 index 0000000000..7c712a9c76 --- /dev/null +++ b/gui/mplayer/pixmaps/eq.xpm @@ -0,0 +1,35 @@ +/* XPM */ +static const char * eq_xpm[] = { +"16 16 16 1", +" c None", +". c #000000", +"+ c #FE3700", +"@ c #FE8200", +"# c #FEB900", +"$ c #FFBA00", +"% c #FEF100", +"& c #FFF100", +"* c #E8FE00", +"= c #E9FF00", +"- c #95FE00", +"; c #96FF00", +"> c #48FE00", +", c #49FF00", +"' c #23FF00", +") c #24FF00", +" .............. ", +"................", +".....++.........", +".....@@.@@@.....", +".....@@.@@@.....", +".##$.##.###.....", +".###.##.###.....", +".%%&.%%.%%%.....", +".**=.**.***.**=.", +".***.**.***.***.", +".--;.--.---.--;.", +".---.--.---.---.", +".>>,.>>.>>>.>>,.", +".'').''.'''.'').", +".'''.''.'''.'''.", +"................"}; diff --git a/gui/mplayer/pixmaps/error.xpm b/gui/mplayer/pixmaps/error.xpm new file mode 100644 index 0000000000..b892c323ae --- /dev/null +++ b/gui/mplayer/pixmaps/error.xpm @@ -0,0 +1,544 @@ +/* XPM */ +static char * error_xpm[] = { +"48 47 494 2", +" c None", +". c #A56152", +"+ c #8B5447", +"@ c #7D4C41", +"# c #77493F", +"$ c #74473E", +"% c #73443A", +"& c #714238", +"* c #704137", +"= c #723F35", +"- c #753D32", +"; c #793D31", +"> c #8D5A4D", +", c #734E45", +"' c #724C43", +") c #915E52", +"! c #AF6B5B", +"~ c #C97765", +"{ c #DD826F", +"] c #E37E6A", +"^ c #DE7A66", +"/ c #D07361", +"( c #B76353", +"_ c #995244", +": c #794035", +"< c #64332A", +"[ c #643026", +"} c #8F5D51", +"| c #6E4D45", +"1 c #865C51", +"2 c #C07D6C", +"3 c #E98A75", +"4 c #E57259", +"5 c #E05C3F", +"6 c #DD4D2E", +"7 c #D94123", +"8 c #D73B1B", +"9 c #D5391A", +"0 c #D4391A", +"a c #D43C1F", +"b c #D44227", +"c c #D54B31", +"d c #C74D38", +"e c #914031", +"f c #672B21", +"g c #592219", +"h c #A7695A", +"i c #6F5048", +"j c #7E564C", +"k c #C5806F", +"l c #EA866E", +"m c #E25D3E", +"n c #DC411F", +"o c #DB3E1C", +"p c #D93D1B", +"q c #D83B1B", +"r c #D73A1A", +"s c #D43719", +"t c #D23618", +"u c #D13518", +"v c #D03317", +"w c #CE3217", +"x c #CD3116", +"y c #CB3015", +"z c #C3361F", +"A c #8A2A1C", +"B c #581C12", +"C c #551911", +"D c #9B6559", +"E c #6B4D46", +"F c #A67367", +"G c #E98A74", +"H c #E35D3D", +"I c #DD411D", +"J c #DC3F1C", +"K c #D63A1A", +"L c #D53919", +"M c #CE3216", +"N c #CB2F15", +"O c #CA2E15", +"P c #C92D14", +"Q c #C72B13", +"R c #B22914", +"S c #65190D", +"T c #4E130A", +"U c #98655A", +"V c #6B4E47", +"W c #BD8375", +"X c #E7765B", +"Y c #DF441F", +"Z c #DD401D", +"` c #D93C1B", +" . c #CF3317", +".. c #C82D14", +"+. c #C62A13", +"@. c #C42912", +"#. c #B82411", +"$. c #70160A", +"%. c #480E07", +"&. c #9B685C", +"*. c #6B4F47", +"=. c #C48A7C", +"-. c #E56547", +";. c #DF421D", +">. c #DA3E1C", +",. c #D53819", +"'. c #D33719", +"). c #D13418", +"!. c #CC3116", +"~. c #C32712", +"{. c #C12611", +"]. c #B6230F", +"^. c #731509", +"/. c #460C05", +"(. c #A86E60", +"_. c #6C504A", +":. c #BE8578", +"<. c #CC3016", +"[. c #C82C14", +"}. c #C52A13", +"|. c #C02510", +"1. c #BE2310", +"2. c #B2200E", +"3. c #6A1208", +"4. c #440B05", +"5. c #725952", +"6. c #A87B70", +"7. c #E66C50", +"8. c #DE411D", +"9. c #DA3D1C", +"0. c #D73B1A", +"a. c #D6391A", +"b. c #D03417", +"c. c #C92E14", +"d. c #C42812", +"e. c #C22711", +"f. c #C02410", +"g. c #BD220F", +"h. c #BC210E", +"i. c #A81C0C", +"j. c #570E06", +"k. c #93695F", +"l. c #806059", +"m. c #E77F67", +"n. c #DB3F1C", +"o. c #D43819", +"p. c #D23518", +"q. c #CE3116", +"r. c #BB200E", +"s. c #BA1F0E", +"t. c #B91E0D", +"u. c #94160A", +"v. c #430904", +"w. c #6F5853", +"x. c #C78677", +"y. c #DE4320", +"z. c #C62B13", +"A. c #C52913", +"B. c #BF2410", +"C. c #B81E0D", +"D. c #B71C0D", +"E. c #AE190B", +"F. c #6A0F06", +"G. c #896A63", +"H. c #E4684B", +"I. c #DA3D1B", +"J. c #D83C1B", +"K. c #CA2F15", +"L. c #C12511", +"M. c #BD210F", +"N. c #B61B0C", +"O. c #B41A0B", +"P. c #961409", +"Q. c #440803", +"R. c #765F59", +"S. c #C18173", +"T. c #DC401D", +"U. c #D33618", +"V. c #CF3217", +"W. c #CC3015", +"X. c #C52912", +"Y. c #C32812", +"Z. c #BE230F", +"`. c #BC210F", +" + c #B81D0D", +".+ c #B71C0C", +"++ c #B51B0C", +"@+ c #B4190B", +"#+ c #B3180B", +"$+ c #A71509", +"%+ c #620C05", +"&+ c #AC7063", +"*+ c #755D58", +"=+ c #E26B51", +"-+ c #C72C14", +";+ c #C02511", +">+ c #B91F0E", +",+ c #B1170A", +"'+ c #B01509", +")+ c #850F06", +"!+ c #360602", +"~+ c #91665C", +"{+ c #94716A", +"]+ c #DB4120", +"^+ c #CB3618", +"/+ c #B93015", +"(+ c #BF3115", +"_+ c #BE3015", +":+ c #BE2F15", +"<+ c #BC2D15", +"[+ c #BB2C14", +"}+ c #BA2B13", +"|+ c #B82A13", +"1+ c #B72912", +"2+ c #B52812", +"3+ c #B42611", +"4+ c #B42510", +"5+ c #B22410", +"6+ c #B1220F", +"7+ c #AF210F", +"8+ c #AE200E", +"9+ c #AD1F0D", +"0+ c #AB1E0D", +"a+ c #AA1D0C", +"b+ c #A91B0C", +"c+ c #A81A0B", +"d+ c #A7190A", +"e+ c #A92013", +"f+ c #AF180A", +"g+ c #B2180B", +"h+ c #AE1409", +"i+ c #930F06", +"j+ c #430602", +"k+ c #83615A", +"l+ c #AF6E5F", +"m+ c #C13216", +"n+ c #C1C1C1", +"o+ c #E7E7E7", +"p+ c #E6E6E6", +"q+ c #E5E5E5", +"r+ c #E4E4E4", +"s+ c #E3E3E3", +"t+ c #E2E2E2", +"u+ c #E1E1E1", +"v+ c #E0E0E0", +"w+ c #DFDFDF", +"x+ c #DEDEDE", +"y+ c #DDDDDD", +"z+ c #DCDCDC", +"A+ c #DBDBDB", +"B+ c #B12318", +"C+ c #B1160A", +"D+ c #AF1509", +"E+ c #AD1308", +"F+ c #9C0E06", +"G+ c #540703", +"H+ c #7B5E57", +"I+ c #C4634E", +"J+ c #CB3417", +"K+ c #FBFBFB", +"L+ c #FAFAFA", +"M+ c #F9F9F9", +"N+ c #F8F8F8", +"O+ c #F7F7F7", +"P+ c #F6F6F6", +"Q+ c #F5F5F5", +"R+ c #F4F4F4", +"S+ c #F3F3F3", +"T+ c #F2F2F2", +"U+ c #F1F1F1", +"V+ c #F0F0F0", +"W+ c #EFEFEF", +"X+ c #C34E45", +"Y+ c #AD1208", +"Z+ c #AB1108", +"`+ c #A20E05", +" @ c #630703", +".@ c #775A54", +"+@ c #D2533A", +"@@ c #CA3317", +"#@ c #DADADA", +"$@ c #EEEEEE", +"%@ c #EDEDED", +"&@ c #C65A52", +"*@ c #AC1208", +"=@ c #AB1107", +"-@ c #AA1007", +";@ c #A20D05", +">@ c #6E0803", +",@ c #785C56", +"'@ c #D64628", +")@ c #C83116", +"!@ c #D8D8D8", +"~@ c #ECECEC", +"{@ c #EBEBEB", +"]@ c #C65B54", +"^@ c #A80E06", +"/@ c #9F0C05", +"(@ c #720802", +"_@ c #765851", +":@ c #CF391C", +"<@ c #C73015", +"[@ c #EAEAEA", +"}@ c #C45851", +"|@ c #A90F07", +"1@ c #A50C05", +"2@ c #970B04", +"3@ c #6A0602", +"4@ c #74514A", +"5@ c #C52E15", +"6@ c #D6D6D6", +"7@ c #E9E9E9", +"8@ c #C3574F", +"9@ c #A70D06", +"0@ c #A00A04", +"a@ c #8F0702", +"b@ c #5A0401", +"c@ c #764F47", +"d@ c #AA2D15", +"e@ c #C83921", +"f@ c #BA403A", +"g@ c #A60D05", +"h@ c #A50B05", +"i@ c #9A0903", +"j@ c #830602", +"k@ c #480200", +"l@ c #7A4A41", +"m@ c #8F2A18", +"n@ c #CB351D", +"o@ c #D0523F", +"p@ c #D66857", +"q@ c #DB7A6C", +"r@ c #D9786A", +"s@ c #D87769", +"t@ c #D87669", +"u@ c #D67569", +"v@ c #D6766A", +"w@ c #D47165", +"x@ c #D16B5F", +"y@ c #D16A5F", +"z@ c #CF695E", +"A@ c #CF685E", +"B@ c #CE675D", +"C@ c #CD675D", +"D@ c #CC655D", +"E@ c #CB645B", +"F@ c #C85E55", +"G@ c #C75B54", +"H@ c #C55A52", +"I@ c #C3554E", +"J@ c #C1514B", +"K@ c #B73831", +"L@ c #A80F07", +"M@ c #A60C05", +"N@ c #A30A04", +"O@ c #900803", +"P@ c #790401", +"Q@ c #360100", +"R@ c #7E473D", +"S@ c #73281B", +"T@ c #B0160A", +"U@ c #AF1409", +"V@ c #A10703", +"W@ c #850502", +"X@ c #6C0300", +"Y@ c #230000", +"Z@ c #60281E", +"`@ c #BE2C13", +" # c #A90F06", +".# c #A70E06", +"+# c #A20804", +"@# c #940602", +"## c #800300", +"$# c #560100", +"%# c #643128", +"&# c #881F0E", +"*# c #C22611", +"=# c #A20803", +"-# c #A00703", +";# c #870501", +"># c #740200", +",# c #300000", +"'# c #60160A", +")# c #BE2A13", +"!# c #BE220F", +"~# c #B91E0E", +"{# c #B51A0C", +"]# c #A40B05", +"^# c #A30904", +"/# c #940401", +"(# c #800200", +"_# c #610100", +":# c #160000", +"<# c #571F16", +"[# c #841C0C", +"}# c #B61C0C", +"|# c #A80F06", +"1# c #A10803", +"2# c #9E0401", +"3# c #840301", +"4# c #760100", +"5# c #2F0000", +"6# c #541107", +"7# c #AF2310", +"8# c #BF2310", +"9# c #BA200E", +"0# c #B3190B", +"a# c #B2180A", +"b# c #A40A04", +"c# c #9F0502", +"d# c #8B0301", +"e# c #7E0100", +"f# c #540000", +"g# c #551B13", +"h# c #631308", +"i# c #B5220F", +"j# c #A00603", +"k# c #9E0502", +"l# c #900300", +"m# c #7E0000", +"n# c #630000", +"o# c #1D0000", +"p# c #4A0E06", +"q# c #6F1409", +"r# c #B4200E", +"s# c #B71D0D", +"t# c #B2170A", +"u# c #AE1309", +"v# c #A91007", +"w# c #7D0000", +"x# c #670000", +"y# c #260000", +"z# c #470C05", +"A# c #711308", +"B# c #AF1D0D", +"C# c #A20904", +"D# c #8D0300", +"E# c #7B0000", +"F# c #650000", +"G# c #290000", +"H# c #450B05", +"I# c #691107", +"J# c #A5190B", +"K# c #9F0602", +"L# c #9C0401", +"M# c #860200", +"N# c #770000", +"O# c #5D0000", +"P# c #250000", +"Q# c #410904", +"R# c #560C05", +"S# c #921508", +"T# c #AB170A", +"U# c #AB1007", +"V# c #8F0401", +"W# c #7C0100", +"X# c #6B0000", +"Y# c #4D0000", +"Z# c #1C0000", +"`# c #400803", +" $ c #680D05", +".$ c #931208", +"+$ c #A61208", +"@$ c #8F0501", +"#$ c #7D0300", +"$$ c #6A0100", +"%$ c #580000", +"&$ c #2C0000", +"*$ c #0D0000", +"=$ c #3E0602", +"-$ c #5A0903", +";$ c #7E0D05", +">$ c #8E0C05", +",$ c #990C05", +"'$ c #A40B04", +")$ c #980903", +"!$ c #8D0602", +"~$ c #7E0401", +"{$ c #6A0300", +"]$ c #620200", +"^$ c #4F0000", +"/$ c #2D0000", +"($ c #150000", +"_$ c #310401", +":$ c #3A0401", +"<$ c #430502", +"[$ c #4E0401", +"}$ c #570402", +"|$ c #5A0502", +"1$ c #560300", +"2$ c #4D0200", +"3$ c #400200", +"4$ c #1F0000", +"5$ c #030000", +" ", +" ", +" ", +" ", +" . + @ # $ % & * = - ; ", +" > , ' ) ! ~ { ] ^ / ( _ : < [ ", +" } | 1 2 3 4 5 6 7 8 9 0 a b c d e f g ", +" h i j k l m n o p q r 9 s t u v w x y z A B C ", +" D E F G H I J o p q K L s t u v M x N O P Q R S T ", +" U V W X Y Z J o ` q K L s t u .M x N O ..Q +.@.#.$.%. ", +" &.*.=.-.;.Z J >.` q K ,.'.t ). .M !.N O ..Q +.@.~.{.].^./. ", +" (._.:.-.;.Z J >.` q K ,.'.t ). .M <.N O [.Q }.@.~.{.|.1.2.3.4. ", +" 5.6.7.8.Z J 9.` 0.a.,.'.t b. .M <.N c.[.Q }.d.e.{.f.1.g.h.i.j. ", +" k.l.m.8.Z n.9.` 0.a.o.'.p.b. .q.<.N c.[.Q }.d.e.{.f.1.g.r.s.t.u.v. ", +" w.x.y.Z n.9.` 0.a.o.'.p.b. .x <.N P [.z.A.d.e.{.B.1.g.r.s.C.D.E.F. ", +" k.G.H.Z o I.J.r a.o.'.u b. .x <.K.P [.z.A.d.e.L.B.1.M.r.s.C.D.N.O.P.Q. ", +" R.S.T.o I.J.r a.o.U.u b.V.x W.K.P [.z.X.Y.e.L.B.Z.`.r.s. +.+++@+#+$+%+ ", +" &+*+=+o I.J.r 9 o.U.u b.w x W.O P -++.X.Y.e.;+B.Z.`.r.>+ +.+++@+#+,+'+)+!+ ", +" ~+{+]+p q r ^+/+(+_+:+<+[+}+|+1+2+3+4+5+6+7+8+9+0+a+b+c+d+e+f+g+,+'+h+i+j+ ", +" k+l+p q r L m+n+o+p+q+q+r+r+s+t+t+u+u+v+w+w+x+x+x+y+y+z+A+r+B+C+D+h+E+F+G+ ", +" H+I+q K L s J+z+K+L+L+M+M+N+O+O+P+Q+Q+R+R+S+T+T+U+U+V+W+W+Q+X+D+h+Y+Z+`+ @ ", +" .@+@K ,.s t @@#@M+M+N+O+O+P+P+Q+R+R+S+S+T+U+U+V+W+W+$@$@%@R+&@h+*@=@-@;@>@ ", +" ,@'@,.'.t ).)@!@N+O+P+P+Q+Q+R+S+S+T+U+U+V+V+W+$@$@%@%@~@{@S+]@*@=@-@^@/@(@ ", +" _@:@'.t b. .<@!@P+Q+Q+R+S+S+T+T+U+V+V+W+W+$@%@%@~@{@{@[@[@S+}@=@|@^@1@2@3@ ", +" 4@m+p.b. .M 5@6@R+R+S+T+T+U+U+V+W+W+$@%@%@~@~@{@[@[@7@7@7@S+8@|@^@9@0@a@b@ ", +" c@d@b. .x <.e@t+R+R+R+R+R+R+R+Q+Q+R+S+S+T+T+U+U+U+U+T+T+U+U+f@^@g@h@i@j@k@ ", +" l@m@ .x <.N n@o@p@q@r@s@t@u@v@w@x@y@z@A@B@C@D@E@F@G@H@I@J@K@L@M@h@N@O@P@Q@ ", +" R@S@x W.K.P [.z.A.Y.e.L.B.1.`.r.s. +D.++O.#+,+T@U@E+*@-@|@^@M@h@N@V@W@X@Y@ ", +" Z@`@O P [.z.X.Y.e.L.B.Z.`.r.s. +.+++@+#+,+'+h+E+*@-@ #.#M@h@N@+#@###$# ", +" %#&#P -++.X.Y.*#;+B.Z.`.r.>+ +.+++@+g+,+'+h+E+Z+-@ #9@M@h@N@=#-#;#>#,# ", +" '#)#+.@.Y.*#;+B.!#`.r.~# +.+{#@+g+,+'+h+E+Z+-@ #9@M@]#^#=#-#/#(#_#:# ", +" <#[#@.Y.*#;+B.g.`.r.~# +}#{#@+g+C+D+h+Y+Z+-@|#9@M@]#^#1#-#2#3#4#5# ", +" 6#7#{.|.8#g.`.9#t. +}#{#0#a#C+D+h+Y+=@-@^@9@M@b#^#1#-#c#d#e#f# ", +" g#h#i#8#g.`.s.t. +N.{#0#a#C+D+h+*@=@-@^@9@1@b#^#1#j#k#l#m#n#o# ", +" p#q#r#`.s.t.s#N.{#0#t#T@D+u#*@=@v#^@9@1@b#^#1#j#k#l#w#x#y# ", +" z#A#B#t.s#N.{#0#t#T@D+u#*@=@|@^@9@h@b#C#1#j#k#D#E#F#G# ", +" H#I#J#N.O.#+t#T@D+E+*@=@|@^@g@h@b#C#V@K#L#M#N#O#P# ", +" Q#R#S#T#,+T@U@E+*@U#|@^@g@h@b#C#V@K#V#W#X#Y#Z# ", +" `# $.$+$E+*@-@|@^@M@h@N@+#K#@$#$$$%$&$*$ ", +" =$-$;$>$,$;@'$0@)$!$~${$]$^$/$($ ", +" _$:$<$[$}$|$1$2$3$,#4$5$ ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/exit.xpm b/gui/mplayer/pixmaps/exit.xpm new file mode 100644 index 0000000000..30d8236717 --- /dev/null +++ b/gui/mplayer/pixmaps/exit.xpm @@ -0,0 +1,82 @@ +/* XPM */ +static const char * exit_xpm[] = { +"16 16 63 1", +" c None", +". c #000000", +"+ c #E2E2E0", +"@ c #D3D3D0", +"# c #C0C0BD", +"$ c #ADADAB", +"% c #929291", +"& c #B7B7B5", +"* c #9A9A98", +"= c #E46245", +"- c #DEDEDC", +"; c #C1C1BE", +"> c #B9B9B7", +", c #9C9C9B", +"' c #060806", +") c #070907", +"! c #E7755B", +"~ c #B3533E", +"{ c #D0D0CD", +"] c #0E110C", +"^ c #0F120D", +"/ c #DF421E", +"( c #B14D36", +"_ c #BDBDBB", +": c #A4A4A2", +"< c #161C14", +"[ c #191F16", +"} c #B0160A", +"| c #B11B10", +"1 c #993929", +"2 c #797977", +"3 c #5B5B5A", +"4 c #1D251B", +"5 c #20281D", +"6 c #990000", +"7 c #880000", +"8 c #AA3F2C", +"9 c #6C6C6A", +"0 c #273124", +"a c #2A3526", +"b c #C83E2B", +"c c #A1100B", +"d c #A3140E", +"e c #2B3727", +"f c #313D2C", +"g c #D4D4D1", +"h c #354331", +"i c #B4B4B2", +"j c #8D8D8B", +"k c #2D3A29", +"l c #3B4A35", +"m c #E0E0DE", +"n c #C9C9C7", +"o c #939491", +"p c #51544F", +"q c #34412F", +"r c #42543D", +"s c #495D43", +"t c #5C6059", +"u c #495C42", +"v c #4F6448", +"w c #53684B", +"x c #546A4D", +" ", +" .......... ", +" .+@#$%.... ", +" ...+@#&*.... ", +" .=.-@;>,.'). ", +"....!~.{;>,.]^. ", +".====/(._:,.<[. ", +".=}}}}|1.23.45. ", +".=666678.9,.0a. ", +".bcd778.;>,.ef. ", +"....78.g;>,.ah. ", +" .8.+g;ij.kl. ", +" ...mnop.qrs. ", +" .&t.luvwx. ", +" .......... ", +" "}; diff --git a/gui/mplayer/pixmaps/file.xpm b/gui/mplayer/pixmaps/file.xpm new file mode 100644 index 0000000000..0ed2fb2b67 --- /dev/null +++ b/gui/mplayer/pixmaps/file.xpm @@ -0,0 +1,26 @@ +/* XPM */ +static char * file_xpm[] = { +"16 16 7 1", +" c None", +". c #9A9A9A", +"+ c #000000", +"@ c #FFFFFF", +"# c #010101", +"$ c #FEFEFE", +"% c #9B9B9B", +" ", +"................", +"++++++++++++++++", +"@++@++@++@++@++@", +"++++#+++++++++++", +"@@@+@@@$@@@@+@@@", +"@@@+@@@@@@@@+@@@", +"@@@+@@@@@@@@+@@@", +"@@@+@@@@@@@@+@@@", +"@@@+@$@@@@@@+@@@", +"@@@+@@@$@@@@+@@@", +"+++++++++++++++#", +"@++@++@++@#+@++@", +"+++++++##++++++#", +"..........%.....", +" "}; diff --git a/gui/mplayer/pixmaps/file2.xpm b/gui/mplayer/pixmaps/file2.xpm new file mode 100644 index 0000000000..8d2e83c733 --- /dev/null +++ b/gui/mplayer/pixmaps/file2.xpm @@ -0,0 +1,27 @@ +/* XPM */ +static const char * file2_xpm[] = { +"16 16 8 1", +" c None", +". c #000000", +"+ c #FFFFFF", +"@ c #D5D5D5", +"# c #ABABAB", +"$ c #808080", +"% c #555555", +"& c #2B2B2B", +" ", +" ", +" ... ... ", +" .............. ", +" . .++++++++. . ", +" . .+++++++@. . ", +" ...+++++++@... ", +" . .++++++@#. . ", +" ...+++++@#$... ", +" . .++++@#$%. . ", +" . .++++@#$%. . ", +" ...+++@#$%&... ", +" . .+++@#$%&. . ", +" .............. ", +" ... ... ", +" "}; diff --git a/gui/mplayer/pixmaps/fs.xpm b/gui/mplayer/pixmaps/fs.xpm new file mode 100644 index 0000000000..e0034f95ef --- /dev/null +++ b/gui/mplayer/pixmaps/fs.xpm @@ -0,0 +1,109 @@ +/* XPM */ +static const char * fs_xpm[] = { +"16 16 90 1", +" c None", +". c #000000", +"+ c #3D3B3B", +"@ c #808F9B", +"# c #86949F", +"$ c #8C99A4", +"% c #929EA8", +"& c #98A3AC", +"* c #9EA7B0", +"= c #A4ACB4", +"- c #AAB1B8", +"; c #B0B6BC", +"> c #B6BBC0", +", c #BBC0C5", +"' c #B7C4CD", +") c #A7B7C9", +"! c #ACBCCC", +"~ c #B2C0CF", +"{ c #B6C5D2", +"] c #BCC9D5", +"^ c #C1CDD8", +"/ c #C6D2DA", +"( c #CDD6DD", +"_ c #BCC1C5", +": c #B4C0CB", +"< c #9DB0C4", +"[ c #CED6DE", +"} c #D2DAE1", +"| c #B7BCC2", +"1 c #AFBDC8", +"2 c #99ACC1", +"3 c #B2C1D2", +"4 c #90A6BE", +"5 c #95AAC1", +"6 c #9AAEC3", +"7 c #8493A4", +"8 c #8696A8", +"9 c #C9D3DC", +"0 c #CFD7DF", +"a c #B1B8BD", +"b c #ACB9C5", +"c c #94A9C0", +"d c #BBC8D7", +"e c #8AA1BA", +"f c #8FA5BD", +"g c #C5D0D9", +"h c #CAD4DC", +"i c #ACB3BA", +"j c #90A6BD", +"k c #B7C5D5", +"l c #859DB7", +"m c #8AA0BA", +"n c #98ACC2", +"o c #C0CCD7", +"p c #C6D0DA", +"q c #A6AFB6", +"r c #8CA3BB", +"s c #B2C1D1", +"t c #7F98B4", +"u c #849CB7", +"v c #93A8BF", +"w c #C2CDD8", +"x c #A1ABB2", +"y c #889FB9", +"z c #D9E0E7", +"A c #B1C0D1", +"B c #B4C3D3", +"C c #B7C5D4", +"D c #BCC9D7", +"E c #B3C2D2", +"F c #B8C6D2", +"G c #BDCAD5", +"H c #9BA5AF", +"I c #839BB6", +"J c #B3C2D0", +"K c #B9C6D2", +"L c #96A1AB", +"M c #8AA1B9", +"N c #8FA5BC", +"O c #94AABF", +"P c #9AADC2", +"Q c #9FB1C5", +"R c #A4B5C9", +"S c #A9BACB", +"T c #919DA7", +"U c #AAB8C4", +"V c #AEBCC7", +"W c #B3BFCA", +"X c #B7C2CD", +"Y c #C3CDD6", +" ", +"................", +".+@@#$%&*=-;>,+.", +".'++)!~{]^/(++_.", +".:<<........[}|.", +".122.345678.90a.", +".bcc.defef8.ghi.", +".bjj.klmlmn.opq.", +".3rr.stutuv.]wx.", +".dyy.zABCDE.FGH.", +".kII........JKL.", +".s++uMNOPQRS++T.", +".+AABCDEUUVWXY+.", +"................", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/half.xpm b/gui/mplayer/pixmaps/half.xpm new file mode 100644 index 0000000000..65f32310d8 --- /dev/null +++ b/gui/mplayer/pixmaps/half.xpm @@ -0,0 +1,144 @@ +/* XPM */ +static const char * half_xpm[] = { +"16 16 125 2", +" c None", +". c #000000", +"+ c #92A0AC", +"@ c #808F9B", +"# c #86949F", +"$ c #8C99A4", +"% c #929EA8", +"& c #98A3AC", +"* c #9EA7B0", +"= c #A4ACB4", +"- c #AAB1B8", +"; c #B0B6BC", +"> c #B6BBC0", +", c #BBC0C5", +"' c #909192", +") c #B7C4CD", +"! c #91A3B3", +"~ c #98A9B8", +"{ c #9FAFBD", +"] c #A6B5C1", +"^ c #ADBAC6", +"/ c #B4C0CB", +"( c #BAC6D0", +"_ c #C1CCD4", +": c #C8D1D9", +"< c #CFD7DE", +"[ c #D7DEE3", +"} c #BCC1C5", +"| c #8B9EAF", +"1 c #92A4B3", +"2 c #A6B5C2", +"3 c #ADBBC6", +"4 c #BBC6D0", +"5 c #C2CCD5", +"6 c #C9D2D9", +"7 c #D1D8DF", +"8 c #B7BCC2", +"9 c #AFBDC8", +"0 c #8499AA", +"a c #92A4B4", +"b c #99AAB9", +"c c #A0B0BD", +"d c #A7B5C2", +"e c #AEBBC7", +"f c #B5C1CC", +"g c #BBC7D0", +"h c #CAD3DA", +"i c #B1B8BD", +"j c #ACB9C5", +"k c #7E93A6", +"l c #8599AB", +"m c #8C9FAF", +"n c #93A5B4", +"o c #A0B0BE", +"p c #9AAEC3", +"q c #8493A4", +"r c #BCC7D1", +"s c #C4CED6", +"t c #ACB3BA", +"u c #A8B6C3", +"v c #778EA1", +"w c #7E94A6", +"x c #8C9FB0", +"y c #9AABB9", +"z c #78899B", +"A c #8696A8", +"B c #B6C2CC", +"C c #BDC8D2", +"D c #A6AFB6", +"E c #A4B3C0", +"F c #71899D", +"G c #788EA2", +"H c #7F94A7", +"I c #869AAB", +"J c #8DA0B0", +"K c #7A8996", +"L c #7D8EA3", +"M c #98ACC2", +"N c #AFBCC8", +"O c #B7C3CD", +"P c #A1ABB2", +"Q c #5E7990", +"R c #657E95", +"S c #6C8499", +"T c #728A9E", +"U c #627584", +"V c #7A8C9B", +"W c #8EA1B1", +"X c #95A7B6", +"Y c #9CACBB", +"Z c #B1BEC9", +"` c #9BA5AF", +" . c #6A7D8E", +".. c #8196A8", +"+. c #889BAD", +"@. c #8FA1B1", +"#. c #AAB8C4", +"$. c #96A1AB", +"%. c #B2C1D2", +"&. c #90A6BE", +"*. c #95AAC1", +"=. c #738B9F", +"-. c #7A90A3", +";. c #889CAD", +">. c #8FA2B2", +",. c #919DA7", +"'. c #BBC8D7", +"). c #8AA1BA", +"!. c #A6B4C1", +"~. c #AEBCC7", +"{. c #B3BFCA", +"]. c #B7C2CD", +"^. c #C3CDD6", +"/. c #A7AFB7", +"(. c #B7C5D5", +"_. c #859DB7", +":. c #B2C1D1", +"<. c #7F98B4", +"[. c #93A8BF", +"}. c #D9E0E7", +"|. c #B1C0D1", +"1. c #B4C3D3", +"2. c #B7C5D4", +"3. c #BCC9D7", +"4. c #B3C2D2", +" . . . . . . . . . . . . . . . ", +" . + @ # $ % & * = - ; > , ' . ", +" . ) ! ~ { ] ^ / ( _ : < [ } . ", +" . / | 1 ~ { 2 3 / 4 5 6 7 8 . ", +" . 9 0 | a b c d e f g 5 h i . ", +" . j k l m n b o p q . r s t . ", +" . u v w l x n y z . A B C D . ", +" . E F G H I J K . L M N O P . ", +" . ~ Q R S T U . V W X Y Z ` . ", +". . . . . . . . ...+.@.X #.$.. ", +". %.&.*.p q . . =.-...;.>.E ,.. ", +". '.).. z . A . !.#.~.{.].^./.. ", +". (._.. . L M . . . . . . . . . ", +". :.<.. . . [.. ", +". }.|.1.2.3.4.. ", +". . . . . . . . "}; diff --git a/gui/mplayer/pixmaps/icon.xpm b/gui/mplayer/pixmaps/icon.xpm new file mode 100644 index 0000000000..afec9dced4 --- /dev/null +++ b/gui/mplayer/pixmaps/icon.xpm @@ -0,0 +1,323 @@ +/* XPM */ +static const char * icon_xpm[] = { +"64 64 256 2", +" c None", +". c #060606", +"+ c #5A829E", +"@ c #33485B", +"# c #D18B61", +"$ c #C08860", +"% c #466680", +"& c #B08460", +"* c #968956", +"= c #1A262E", +"- c #726A4E", +"; c #222E32", +"> c #4A6A86", +", c #86824A", +"' c #3A5267", +") c #DCB37D", +"! c #7E868A", +"~ c #6E6A4E", +"{ c #393626", +"] c #5C5743", +"^ c #527691", +"/ c #DAD250", +"( c #AAAA56", +"_ c #3AA66E", +": c #BEB646", +"< c #76828A", +"[ c #4E5244", +"} c #D3D1C1", +"| c #95AD55", +"1 c #696E6F", +"2 c #626A5E", +"3 c #B7BAB2", +"4 c #A2AEAE", +"5 c #96ABB3", +"6 c #729E6E", +"7 c #C5D764", +"8 c #C66A46", +"9 c #8AB25A", +"0 c #7E3A23", +"a c #868C5E", +"b c #323E46", +"c c #46627A", +"d c #894933", +"e c #ABD070", +"f c #668BA8", +"g c #965232", +"h c #76322E", +"i c #D4D07F", +"j c #4A667F", +"k c #BAD06C", +"l c #98957B", +"m c #7ECA96", +"n c #A2663E", +"o c #567A96", +"p c #566266", +"q c #6486A0", +"r c #E1E2B7", +"s c #6A3032", +"t c #F8E082", +"u c #C1B892", +"v c #8A8A72", +"w c #1F1A16", +"x c #A8AFA1", +"y c #7A9AAE", +"z c #94DA9E", +"A c #46463F", +"B c #D2B2A2", +"C c #D6E29A", +"D c #4A2A28", +"E c #7896AD", +"F c #92603C", +"G c #3F5A72", +"H c #AEC061", +"I c #7EAC78", +"J c #A69062", +"K c #899AA1", +"L c #66665A", +"M c #82865A", +"N c #9A6A3E", +"O c #364246", +"P c #62382E", +"Q c #4E6E8B", +"R c #A5A593", +"S c #60829D", +"T c #BBC25D", +"U c #BE966E", +"V c #72A6BD", +"W c #766656", +"X c #DBA879", +"Y c #CEBE42", +"Z c #D1CEAE", +"` c #8A6042", +" . c #93978F", +".. c #567E9C", +"+. c #96C37F", +"@. c #172026", +"#. c #3C261E", +"$. c #AFB190", +"%. c #9AB25A", +"&. c #F3F2DD", +"*. c #A79D57", +"=. c #D6C85C", +"-. c #2E322A", +";. c #B1C192", +">. c #F1C27A", +",. c #52D28A", +"'. c #D4DB83", +"). c #C2DB98", +"!. c #6E6E62", +"~. c #7E8E96", +"{. c #584E38", +"]. c #C5D2BA", +"^. c #8A9E56", +"/. c #4E5644", +"(. c #6A767C", +"_. c #B99D63", +":. c #9DC55E", +"<. c #F0E1B2", +"[. c #7792A7", +"}. c #D4C07A", +"|. c #7C523C", +"1. c #321E17", +"2. c #90A25A", +"3. c #84D08A", +"4. c #C8C793", +"5. c #5A82A6", +"6. c #8FA6B4", +"7. c #C8BE7B", +"8. c #86AE86", +"9. c #D2DECA", +"0. c #7094AA", +"a. c #0E1215", +"b. c #A69C5E", +"c. c #626A62", +"d. c #DDD895", +"e. c #F3EB89", +"f. c #A2C5B6", +"g. c #797567", +"h. c #2E281A", +"i. c #6FA2BA", +"j. c #293948", +"k. c #5A7EA2", +"l. c #AAC486", +"m. c #F0EEDA", +"n. c #426278", +"o. c #4E728E", +"p. c #464232", +"q. c #C0A88C", +"r. c #6E7A7E", +"s. c #92BA9A", +"t. c #D6CA87", +"u. c #B6B66E", +"v. c #BCD183", +"w. c #5C7E96", +"x. c #88A2AF", +"y. c #22221E", +"z. c #B6C1C1", +"A. c #52A672", +"B. c #5E82A2", +"C. c #989F99", +"D. c #7A7642", +"E. c #BDA868", +"F. c #E7C99B", +"G. c #3A4E66", +"H. c #5E86A6", +"I. c #536A7E", +"J. c #E0C180", +"K. c #AEAA7C", +"L. c #CED472", +"M. c #E8D8C0", +"N. c #ADC866", +"O. c #5E86AA", +"P. c #757E84", +"Q. c #675C44", +"R. c #D2D672", +"S. c #C2D87A", +"T. c #B2D68B", +"U. c #36322E", +"V. c #323A3E", +"W. c #D1C4AF", +"X. c #2A281C", +"Y. c #171A1B", +"Z. c #DFCF8C", +"`. c #E0DECB", +" + c #8EBA5E", +".+ c #627282", +"++ c #A79C78", +"@+ c #C7C65B", +"#+ c #8A6E42", +"$+ c #C0B45E", +"%+ c #6E8DA5", +"&+ c #463E2A", +"*+ c #897C4F", +"=+ c #565E56", +"-+ c #E7E591", +";+ c #7F7E70", +">+ c #947A70", +",+ c #D7D9C5", +"'+ c #EED2A6", +")+ c #ADA475", +"!+ c #B7755D", +"~+ c #868A76", +"{+ c #C2C6B3", +"]+ c #5E82A6", +"^+ c #2E4254", +"/+ c #90B6B6", +"(+ c #364E62", +"_+ c #424E4A", +":+ c #ABB8B8", +"<+ c #86AC57", +"[+ c #D1C48E", +"}+ c #C8D06D", +"|+ c #C5B775", +"1+ c #D29870", +"2+ c #D4D098", +"3+ c #DBD8AB", +"4+ c #537697", +"5+ c #E5E4CA", +"6+ c #425E75", +"7+ c #7E9AAA", +"8+ c #B9CA69", +"9+ c #9D7D56", +"0+ c #567A9B", +"a+ c #C5BF8F", +"b+ c #E1E6A6", +"c+ c #E2D456", +"d+ c #AFDA6E", +"e+ c #E7DB95", +"f+ c #72C68A", +"g+ c #C4C977", +"h+ c #5A666E", +"i+ c #B6AC82", +"j+ c #99BB5E", +"k+ c #5E625E", +"l+ c #F0DD96", +"m+ c #ADBF6F", +"n+ c #3D566C", +"o+ c #7E8A92", +"p+ c #9EADAD", +"q+ c #60B86E", +"r+ c #94A6A4", +"s+ c #E8E8DE", +"t+ c #8AB28A", +"u+ c #ACB45B", +"v+ c #CB764B", +"w+ c #26323A", +"x+ c #5A82A2", +"y+ c #4E4E46", +"z+ c #868E8F", +"A+ c #E2EEBE", +"B+ c #6E9EB6", +"C+ c #DFD36F", +"D+ c #72828A", +"E+ c #5A7E9D", +"F+ c #A75F4D", +"G+ c #527290", +"n.n+6+Q Q > 6+n+' n+G 6+% j n.% o.Q Q j c % c o.o.> > > > > G+Q > > Q c n+6+c 6+c 4+^ G+k.x+0+k.....0+4+4+0+4+o.Q 4+4+Q Q o.4+> ", +"E+6+% n.G G ' ' G c n.c c n.G c Q o.> % % j % G+4+4+^ Q > j o.^ o Q > 6+6+> o.> Q o.G+Q o.^ o + 0+Q Q o.^ ^ G+4+0+H.B...G+]+H.^ ", +"0+(+@ 6+G G n+' G n+n+G G n+n+c Q > % 6+c > Q 0+o G+> c % > 4+4+^ o.> 6+6+c > > > o.^ 4+4+k.x+k.E+4+4+0+4+^ ^ ..]+H.]+0+4+5.O.4+", +"^ j.j.x+B.x+x+H.5.H.x+]+H.x+E+]+]+H.5.5.H.H.x+B.x+5.+ x+x+5.H.x+5.x+x+o.0+B.H.x+o E+x+H.x+x+x+x+x++ H.x+E+x+]+x+H.5.x+....B.]+^ ", +"o.j.j.5.O.5.x+H.5.5.5.k.]+5.5.H.5.]+B.5.5.5.x+]+x+k.k.]+H.5.O.O.5.5.k.o.4+5.O.O.0+..5.]+H.5.x+x+5.]+H.5.k.5.O.x+]+..x+x+x+x+5.G+", +"> j.j.x+x+H.x+E+]+x+x+B.x+x+x+5.H.H.x+E+H.H.k.x+B.x++ 5.]+H.B.B.+ x++ ^ 4+E+E+5.5.o ^ ..5.H.]+x+B.+ x+B.H.H.x+]+x+E+B.x+x+E+G+> ", +"> ^+j.5.5.]+5...]+]+O.5.5.]+]+]+5.O.O.x+5.5.5.O.H.5.x+H.5.O.H.]+O.5.k...x+0+^ ..5.]+0+0+]+H.]+5.5.k.5.x+5.H.5.O.....]+5...k.o o.", +"% b j.x+x+x+E+..5.H.x++ E+H.x+x+]+x+x+x+B.x+x+x+5.5.B.x+H.H.5.H.x+E+o x+H.+ 0+4+E+x+o o x+x+..E+E+..E+5.H.]+H.5.0+x+H.]+]+..o.Q ", +"> ^+^+]+]+H.x++ k.O.]+x+..H.H.H.O.O.]+O.x+B.5.H.H.H.5.5.5.O.O.]+5.5.k.5.5.]+x+0+5.x+0+k.0+O.O.5.4+0+H.]+H.5.H.5.0+0+x+x+x+E+4+o.", +"> @ ^+x+x+..k...x+x+H.x+x+E+x+x+x+x+H.x+B.x+H.x+]+5.]+B.H.H.H.H.E+o x+B.x+..E+0+H.5.....0+x+x+..Q o 5.H.5.H.5.H.B.x+..x+x+4+^ Q ", +"o.@ @ x+k.]+]+x+]+5.O.]+x+..5.]+5.5.O.O.5.x+]+5.H.H.O.5.5.5.O.5.k.4+5.]+O.O.x+0+H.]+5.x+0+0+....Q ..O.]+5.H.]+O.O.5.5.]+k.4+k.Q ", +"G+@ @ ....H.H.x+x+B.]+H.x+k.x+x+B.H.x+x+x+x++ + E+x+x+H.x+x+5.H...^ H.x+E+..E+E+5.H.B.x+H.x+^ Q o ]++ H.B.k.x+H.x+x+H.H...o.+ Q ", +"..@ (+x+x+5.]+5.x+x+5.5.5.]+5.5.k.5.5.B.k.5.5.5.5.5.5.]+E+x+5.O.k.0+5.5.H.H...x+5.H.O.]+]+k.> Q x+5.5.O.H.O.5.k.x+5.5.O.5.G+..Q ", +"0+@ n+E+k.x+5.H.k.x+H.H.H.5.+ x+x+H.H.H.B.]+H.5.x+B.H.H.x+E++ x+....E+x+x+5.k.B.+ x+E+5.x+^ > 0+x+H.H.x+H.x+x++ 0+E+x++ H.^ 0+^ ", +"x+n+6+H.5.]+5.H.5.]+5.H.H.]+x+]+x+]+5.O.H.5.H.H.5.k.5.]+5.]+5.]+x+5.O.]+5.5.5.]+]+5.E+x+0+^ ^ k.5.5.O.5...]+5.H.x+]+5.....4+0+0+", +"o n+n+x++ H.B.x+H.5.H.]+H.x+x+H.x+x+H.x+x+B.5.B.H.+ B.x+x+H.B.x+]+H.x+x+B.x+x+H.H.x+..o ^ 4+0+x+B.x+H.O.E+H.]+k.....E+]+E+^ o 0+", +"^ n+(+]+x+x+]+]+H.5.H.5.O.x+..5.O.5.5.5.5.H.O.5.5.5.5.H.5.]+H.5.5.]+5...H.5.5.5.H.k.5.4+o.0+0+..]+5.]+5.k.H.H.]+]+5...4+k.0+0+o ", +"o.' ' 5.x+x+x+H.x+]+5.H.x+k.k.B.x+H.x+E+x+5.H.f O.f q H.f H.O.H.]+x+k.B.5.B.B.x+4++ x+..4+..E+4+x+x+H.E+x+H.5.H.+ B.]+0+o o.Q 4+", +"0+n+G ]+O.O.5.H.H.H.5.x+]+H.k.O.O.H.H.H.f %+i.0.V V E B+E i.f S S + H.H.O.O.5.o.> ..]+H.k...B...0+5.O.5.5.H.5.O.x+H.H...0+% > 0+", +"x+G c O.o x+x+k.E+x+B.k.+ + 5.5.f f f i.[.[.[.x.6.5 6.6.6.6.x.y B+B+0.f O.5.o Q o.k.5.x+....x+0+o.E+x+H.x+]+H.5...0+x+H...> > + ", +"x+n+n.]+]+]+H.O.5.x+x+5.k.H.x+O.f i.E 7+5 p+r+r+x :+z.:+:+s.r+r+x.x.y y S 4+> Q x+H.]+H.k.k.5.0+Q 0+5.]+H.5.H.]+O.5.5.]+..> Q k.", +"..' G O.5.O.0+5.0+5.o + x+x+q f 0.E x.:+4 3 4.g+i C+=.=.Z.W.,+Z {+;.5 0.S o G+G+G+0+o 5.o O.o Q % 5.o H.5.H.5.H.H.5.x++ ....Q ..", +"0+(+n+O.5.x+]+H.]+]+k.]+5.O.f 0.x.5 4 ;.7.}.7.u 3 4.3+2+c+E.3+,+e+Y r+7+D+5.x+5.]+5.5.]+x+O.O.^ % ^ 4+E+5.]+5.5.]+x+4+G+4+0+4+0+", +"4+(+n++ 5.0+..]+O.5.5.O.]+f q [.7+5 u.K.Z 5+2+4.9.`.`.<.3+: Z.c+7.u+ .7+i.B.k.x+H.]+5.O...E+x+k.0+4+4+0++ H.H.x+H.]+j c o ^ ^ o ", +"Q (+n+^ ^ Q 0+o ^ E+o ..x+x+E+%+r+@+$.{+,+r Z.*.Z } r &.<.c+=.( Z.g+4 K %+q q f O.f 5.E+o 0+0+4+E++ E+^ x+x+H.o o o c 6+Q > Q > ", +"a.Y.. = @.= w+= b ; ; ; Y.-.-.{ L M * )+J.e+@+|+[+t.l+e+C+/ $+d.i ,+,+{+ .5 p+6.r+%+D+h+G _+[ O O O -.b -.b b X.^+@.Y.@.. Y.a.a.", +"a.; @.O b /.L ] (.g.~ !.A ] ] ] g.*+)+|+Z.i ( t.}.F.r d.'.@+: i d.Z } Z .z+R r+p+l .< ~+a ~.a a a !., g., ;+W g.] A [ w h.1.Y.", +"w ] A h+;+a+a+)+u.K.)+l * *+U U X ) '+e+-+}+L.t e+'.}+T 7 u.C Z s+&.s+5+u R i+{+9.4.$.R {+9.&.m.s+r a+U >.F.F.) E.1+1+# 8 h 0 1.", +"y.o+L a ++[+4.u 4.4.7.a+u U X X ) >.'+l+L.u+g+@+@+7.i 5+S.g+m+m.s+&.m.C L.5+].Z {+u+K.)+$+7.,+m.C S.T =.t e+R.u+J.X 1+v+8 0 d #.", +"1.E !.l u }+H L.H T T '+'.T ) ) ) >.t -+u+|+|+}.J.t.l+-+7 %.Z.m.&.A+H m+N.k u b+H ( Z.l+S.7 N.k i }+u+e+d.T S.%.|+F.X # v+n F 1.", +"w /.;+Z 8+g+j+| r 7 k k k :.$+) |+X |+7 ( |+J *+* u [+C j+4.<.b+S.%.3+s+k %.d.S.<+|+e+8+H d+k +H R.l+S.%.l+S.( }.) E.# # n F U.", +"w /.Q.W.M.v.<+5+<.v.j+u+e+e T H : E.T <+$+U 9+#+] ++u 7 m+A+b+d+ +3+r e ).H d+:.m+8+:.R.e.d+:.%.C+l+).%.2+b+%.t.}.g+E.# !+d g 1.", +"Y.O Q.q.3 <+$.M.t.e 2.$+4.:.<+b.b.b.e ^.J 9+F ` p.J z.).e '.%.T.:.).:.s+9. +m+m+<+u+e.e.C :.:.R.7 :.H l+e+S.k v.j+_.# v+n d h 1.", +"w p.{.~ a M q.B ++++)+++* *+D.D.*+*+^.D.& N |.P #.~+i./+8.t+,+].<+;.s+s+} } Z.t.Z.Z.l+t d+N.'.:.H 7.$+X J.[+ +^.i+J & !+F+s s 1.", +"a.X.U.y+[ ] 9+>+Q.c.g.~ ~ Q.Q.] Q.Q.Q.Q.] {.{.{.{.l 7+R C.p+:+;.z.:+:+p+C.R ++|+7.t.t C +j+7 :.T |+* * J J U J J 9+#+|.D D D w ", +"a.Y.a.-.-.U.V.y.b U.X._+X.O { &+y+{.k+] ] =+;+(.P.R < 3 z+ .x C.R ~+;+(.L 1 ;+* )+}.T.3.%.J.q.++*+!.y+{.p.[ ] p.y+U.X.w+. Y.. a.", +"; Y.= -.j.V.V.-.b j.; b b O O O A A /.=+=+=+=+1 .+< ~.< o+P.P.! .+(.L /.p k+;+++|++.T.q+7.u.l ;+c.] _+A ^+O A O A b j.V.; = @.= ", +"6+b @ c c G 6+c 6+n+G.6+6+c n.6+n.> c 6+6+6+' n+c 6+6+6+c c 6+I.c c c j I.! C.3 +.).z 8.{+p+o+D+4+.+j j c c c j % 6+6+6+6+^+@ n+", +"..G c E+E+H.S x+w.4+^ ^ + + H.+ w.+ O.O.k.k.o.4+0+k.O.S ]+]+k.]+O.x+B.w.%+6.z.T.s.).q+z.z.5 0.%+f O.B.o B.B.E++ ]+O.O.]+E+j 6+..", +"5.c c + + x+H.H.E+o o 4+S B.E+x+H.O.5.O.k.4+Q 0+]+]+O.]+O.]+H.H.H.H.q ^ %+5 z.f+Z f+I Z p+x.q q B.B.x+G+5.H.4+4+O.]+O.]+]+> n+k.", +"k.6+% 5.5.x+x++ + B.H...+ x+..0+E+H.5.O.4+G+0+k.5.]+O.]+5.5.O.B.x+H.H.w.[.r+f.m z A.:+:+7+7+x+H.x++ 5.G+5.]+0+4+5.]+O.5.]+% ' k.", +"..6+Q B.B.]+k.x+B.x+B.+ x++ x+E+H.5.x+k.4+0+5.O.k.5.]+H.O.5.x+5.E+o G+G+0.5 f.,._ :+f.5 y f O.x+E+k.o o.0+5.5.0+..5.5.O.5.G ' ..", +"5.j 4+H.x++ E+x++ x+B.x+k.x+....4+k.+ x+0+4+5.5.4+..5.5.H.]++ ....w.B.q E 7+5 /+6 :+6.E %+f H.5.E+]+x+x+5...5.5.5.5.k.O.O.6+' x+", +"k.> o x+5.]+5.5.5.5.O.B.x+]+k.k...x+5.]+0+0+]+H.G+E+x+x+x+H.]+H.]+O.E+B.%+E 0.6.E E E %+E+H.B.E+x+H.E+B.x+]+]+]+x+B...+ ]+n+' E+", +"0+> > H.x+x+H.B.E+E+5.5.x+x+H.B.]+x+..x+o ..5.O.o.k.k.5.5.5.5.H.H.x+]+..q 0.%+[.E %+q q w.5.H.x+..5.5.O.5...O.O.O.O.k.H.+ ' n+..", +"^ % 6+5.H.H.H.5.0+0+x+H.k.5.5.O.H.]+O...Q x+E+H.Q ..x+E+B.H.]+5.5.5.5.....]+f f f S w.5.x+]+x+H.E+..B.H.H.E+x+B.x+x+x+k...' % 4+", +"o.> G x+5.]+H.x+..G+k.x++ H.x+5.H.k.k...Q 5.k.O.> E+O.5.x+H.H.H.x+5.k.k.5.k.O...5.0+E+k.x+]+5.]+k.0+x+5.O.x+..]+]+....5.5.' 6+k.", +"G+^ % 5.O.O.5.x+O.4+^ B.5.5.O.x+5.x+5.x+4+x+x+B.Q 0+E+E+k.x+5.5.O.H.5.O.O.5.5.O...o.4+..x+5.H.5.x+o.0++ x+]+B.5.x+0+x+]+x+n+G ..", +"k.E+Q + H.H.x++ x+5...4+o + O.x+H.H.k.x+....5.5.o.4+0+o ^ E+B.x+B.]+5.5.5.5...]+0+> > E+H.5.H.5.O.x+]+5.x+..H.O.H.x+0+x+5.@ ' O.", +"H.0+0+]+5.5.x+5.....O.B.4+k.H.]+O.H.x+..E+0++ + 0+o ..4+Q 4+0+]+5.H.]+]+5.k.5.O.^ % 4+5.E+]+x+H.x+5.x+E+0+> E+x+5.x+x+H.E+@ (+x+", +"H.o ..H.H.B.x+O.]+B.k.B.o.k.H.+ H.]+5...5...O.H.5...H.H.o o.^ + 5.H.H.o ^ 0+5.]+o.j o 5.H.H.5.H.H.]+0+x+k.o.E+H.]+x+k.H...@ G.O.", +"O.4+..H.]+5.k.H.H.O.x+5.G+x+5.k.5.+ B.]+B.0+E+x+o 4+0+0+....o.k.E+5.k.4+4+E+H.H.Q ^ 5.x+5.5.B.B.x++ B.5.o 4+0+5.H.]+x+x+E+@ (+H.", +"H.4+k.H.H.H.x+5.H.H.H.o o.B.5.E+5.x+....]+5.k...0+^ 0+..0+x+..x+E+x+x+..x+5.5.x+Q ..5...E+..0+..5.H.E+4+k.H.0+k.H.H.5...0+@ (+O.", +"O.G+x+5.5.k.x+H.5.O.5...G+5.5.5.]+5.5.k.+ H...4+^ 5.x+5.]+]+x+E+5.H.H.k.k.+ B.k.Q E+E+E+0+^ 4+G+5.E+4+..H.x+o + 5.5.H.E+0+(+(++ ", +"..> ^ E+x+0+5.H.x+H.H.0+o H.+ H.H.]+5.5.5.x+x+% G+x+B.5.]+x+5.+ x+k.H.H.5.5.x+5.Q 5.5.5.k.x+..G+4+^ E+5...5.G+B.H.5.5.....@ n+..", +"..Q j x+H.E+B.O.O.5.......5.5.x+x++ H.]+x+]+B.> 4+E+0+x+..O.H.k.]+x+0+..E+H...+ Q + ]+x+H.5.k.o o.Q x+B.x+G+o.5.5.H.H.H.x+(+G.0+", +"x+0+> 4+x+x+o 5.o 5.k.E+]+o ]+5.5.5.x+5...O.5.Q 0+^ E+H.k.5.x++ x+H.x+5...]+]+..4++ 5.5.H.x+5.5.o.> o ]+5.Q 0+k.k.x+]+O.k.@ ' 0+", +"5.0+> o.]+5.k.]+O.]+5.]+5.O.O.o H.w.O.]+]+5.B.4+0+> 0+5.+ H.x+5.O.k.k.H.]+x+H.O.....B.E+..o.E+E+0+> % x+x+0+x+H.x+B.5.x+H.(+(+0+", +"E+..4+o.k.H...k.O.]+O.H.5.5.]+5.5.5.O.5.]+x+H.x+..c > 4+k.]+x+x+H...k.5.5...0+k.E+0+..k.x+..H.k.5.Q > 0+x+0+x+x+..O.5.k.x+(+(+0+", +"..4+B.4+o 5.5.x+5.H.O.]+x+E+H.O.]+5.x+B.x+x+H...k.> > > o x+]+O.5.k...E+H.k...+ ..o.^ k.k...k.^ 5.Q > E+E+o x+x+0+..B.H.x+' ^+E+", +"o ^ x+5.o.0+5.k...x+H.]+5.0+k.O.x+x+O.H.o ..]+x+..^ k.> > ..x+H.H...H.]++ Q Q > ..k.5.]+O.5.O.k.5.> o.5.G+Q k.x+0+....]+H.' @ 0+", +"5...x+H.Q 4+B.x+k.x+O.x+x+....x+k.E+x+..0+G+> n.c 6+% > Q ..x+E+0+^ o.Q 6+G n.j > j 6+% j > c 6+' @ G c 6+G n.6+6+n.6+G G n+' H.", +"H.]+..E+o o.x+E+0+x+x+]+]+k.0+E+x+x+5.k.0+Q c % > > % n.> 4+....0+0+0+4+6+j o.Q > Q n.% n.6+n+(+(+(+G G n+G c c 6+6+G G 6+% > O.", +"> % ^ 4+Q G n+n+6+c % % % % n.% Q Q > > % > o.0+0+G+4+Q Q > > Q Q G n.' n+n.j j Q Q > Q k.5.^ O.5.G+> Q o.o.% % Q o.o.> Q ^ o Q "}; diff --git a/gui/mplayer/pixmaps/loadeaf.xpm b/gui/mplayer/pixmaps/loadeaf.xpm new file mode 100644 index 0000000000..c4a5ca3b79 --- /dev/null +++ b/gui/mplayer/pixmaps/loadeaf.xpm @@ -0,0 +1,151 @@ +/* XPM */ +static const char * loadeaf_xpm[] = { +"16 16 132 2", +" c None", +". c #5C5C5C", +"+ c #656565", +"@ c #6A6A6A", +"# c #6A6A69", +"$ c #6D6D6D", +"% c #848484", +"& c #818181", +"* c #F9F9F9", +"= c #FEFEFE", +"- c #FFFFFF", +"; c #FBFBFB", +"> c #F4F4F4", +", c #D2D2D1", +"' c #E2E2E2", +") c #B3B3B3", +"! c #888888", +"~ c #F8F8F8", +"{ c #DCDCDC", +"] c #F5F5F5", +"^ c #FDFDFD", +"/ c #FCFCFC", +"( c #FBFBFA", +"_ c #F4F4F3", +": c #AFAFAE", +"< c #707070", +"[ c #5E5E5E", +"} c #898989", +"| c #E7E7E7", +"1 c #B1B1B1", +"2 c #ECECEC", +"3 c #F5F5F4", +"4 c #EFEFEE", +"5 c #EEEEED", +"6 c #EBEBEB", +"7 c #CDCCCC", +"8 c #9E9C9B", +"9 c #7D7B7A", +"0 c #484745", +"a c #FCFCFB", +"b c #D3D3D2", +"c c #ECECEB", +"d c #DADAD9", +"e c #BCBCBB", +"f c #BCBBBA", +"g c #BAB9B8", +"h c #C6C5C3", +"i c #B8B6B3", +"j c #504E4A", +"k c #FAFAF9", +"l c #EDEDEC", +"m c #F3F2F1", +"n c #E9E9E8", +"o c #DFDFDE", +"p c #E0DFDE", +"q c #DFDFDD", +"r c #DFDEDD", +"s c #EBEBE9", +"t c #E9E8E6", +"u c #CDCAC6", +"v c #595651", +"w c #F7F7F6", +"x c #F4F4F2", +"y c #F4F3F2", +"z c #F1F1EF", +"A c #F0EFED", +"B c #F0F0EE", +"C c #EAEAE7", +"D c #D4D1CC", +"E c #625F5A", +"F c #F1F0EF", +"G c #E1E1DF", +"H c #EFEEEC", +"I c #EEEDEB", +"J c #EAE9E6", +"K c #BEBDBB", +"L c #B9B9B6", +"M c #CCCAC5", +"N c #625F59", +"O c #B3B2B0", +"P c #E4E3E1", +"Q c #DBDAD8", +"R c #DAD9D7", +"S c #D9D8D6", +"T c #DEDDDA", +"U c #171717", +"V c #A6A49F", +"W c #615F59", +"X c #878787", +"Y c #DDDDDC", +"Z c #9F9E9D", +"` c #000000", +" . c #C5C4C2", +".. c #C4C3C0", +"+. c #D1D0CD", +"@. c #8A8A88", +"#. c #B7B5B0", +"$. c #605D57", +"%. c #E3E3E0", +"&. c #C1BFBC", +"*. c #CDCAC5", +"=. c #615D57", +"-. c #808080", +";. c #E2E1DD", +">. c #DFDEDA", +",. c #DEDDD9", +"'. c #D5D4D1", +"). c #C5C3BF", +"!. c #CBC8C2", +"~. c #5F5C56", +"{. c #CFCCC6", +"]. c #CECCC5", +"^. c #CECCC6", +"/. c #CECBC5", +"(. c #CCC9C3", +"_. c #ADABA6", +":. c #8F8D88", +"<. c #A6A49E", +"[. c #C4C0BA", +"}. c #B9B6AE", +"|. c #55534C", +"1. c #4F4E4D", +"2. c #4D4B47", +"3. c #4E4C47", +"4. c #4E4C46", +"5. c #4D4B46", +"6. c #4D4A46", +"7. c #4D4A45", +"8. c #4C4A45", +"9. c #4B4944", +"0. c #45433E", +"a. c #3C3B38", +" . + @ @ @ @ @ # $ @ % ", +" & * = - = = = ; > , ' ) ", +" ! ~ { ] ^ / / ( _ : < [ ", +" } | 1 2 3 4 4 5 6 7 8 9 0 ", +" } a b c d e e f g e h i j ", +" ! k l m n o p q r s t u v ", +" ! w x y z z z A B z C D E ", +" ! F r G H H H I J K L M N ", +" ! p : O P Q R S T U U V W ", +" X Y Z ` Z . ...+.U @.#.$.", +" X Z ` Z B B %.U U U &.*.=.", +" -.` Z ;.>.,.'.U U U ).!.~.", +"` ` Z {.].^./.(._.:.<.[.}.|.", +"` ` ` 1.2.3.4.4.2.5.6.7.8.9.0.a.", +"` ` ` ", +"` ` ` ` "}; diff --git a/gui/mplayer/pixmaps/logo.xpm b/gui/mplayer/pixmaps/logo.xpm new file mode 100644 index 0000000000..3483145fe1 --- /dev/null +++ b/gui/mplayer/pixmaps/logo.xpm @@ -0,0 +1,1227 @@ +/* XPM */ +static const char * logo_xpm[] = { +"101 83 1141 2", +" c None", +". c #9094BB", +"+ c #8488B5", +"@ c #7A7FAF", +"# c #7276AA", +"$ c #6E72A7", +"% c #7479A7", +"& c #8E90AE", +"* c #B7B8C1", +"= c #CFCECE", +"- c #D8D8D8", +"; c #9094BA", +"> c #8A8FB9", +", c #8A8FB8", +"' c #8186B4", +") c #787EB0", +"! c #747AAE", +"~ c #7479AE", +"{ c #7277AD", +"] c #6E74AB", +"^ c #696EA7", +"/ c #5F64A1", +"( c #515798", +"_ c #42498F", +": c #3D4485", +"< c #3A417C", +"[ c #555980", +"} c #8F9098", +"| c #BBBBBB", +"1 c #D3D3D3", +"2 c #9195BC", +"3 c #8E92BB", +"4 c #898EB8", +"5 c #8286B5", +"6 c #7B80B2", +"7 c #757AAE", +"8 c #7579AE", +"9 c #7379AD", +"0 c #7378AD", +"a c #7176AC", +"b c #6E73AA", +"c c #686DA6", +"d c #6066A1", +"e c #545A9A", +"f c #454D92", +"g c #3E4588", +"h c #393F7D", +"i c #343971", +"j c #323767", +"k c #585A6B", +"l c #929292", +"m c #C2C3C2", +"n c #969ABF", +"o c #8F94BB", +"p c #8A8EB9", +"q c #8388B6", +"r c #7C81B1", +"s c #757AAD", +"t c #7278AC", +"u c #7177AC", +"v c #7075AB", +"w c #6F74AB", +"x c #6D73AA", +"y c #6C71A8", +"z c #666BA5", +"A c #6167A2", +"B c #5B619E", +"C c #53589A", +"D c #474E94", +"E c #3F468C", +"F c #3C4181", +"G c #353A74", +"H c #2F3466", +"I c #2A2F5B", +"J c #404255", +"K c #797978", +"L c #B7B7B7", +"M c #8C91BA", +"N c #8A90B9", +"O c #878BB8", +"P c #7B81B2", +"Q c #767CAF", +"R c #737AAD", +"S c #7076AC", +"T c #6C72A9", +"U c #6A70A8", +"V c #686EA6", +"W c #666CA5", +"X c #6469A3", +"Y c #5E64A0", +"Z c #585E9C", +"` c #4D5496", +" . c #4A5094", +".. c #454C91", +"+. c #40478E", +"@. c #3D4486", +"#. c #383D79", +"$. c #303569", +"%. c #292E5A", +"&. c #25294F", +"*. c #3A3B45", +"=. c #727272", +"-. c #B9B9B9", +";. c #8D92B9", +">. c #888CB8", +",. c #878CB7", +"'. c #7E83B2", +"). c #767BAF", +"!. c #747AAD", +"~. c #7278AD", +"{. c #6F75AA", +"]. c #6D72A9", +"^. c #6B70A8", +"/. c #696EA6", +"(. c #676CA5", +"_. c #646AA4", +":. c #5F64A0", +"<. c #5B629F", +"[. c #585E9D", +"}. c #555B9B", +"|. c #525899", +"1. c #4F5597", +"2. c #4C5295", +"3. c #495094", +"4. c #474E93", +"5. c #454C92", +"6. c #444B91", +"7. c #434A91", +"8. c #424991", +"9. c #41488E", +"0. c #3F468A", +"a. c #3B4180", +"b. c #33386F", +"c. c #2A2F5C", +"d. c #24274E", +"e. c #232645", +"f. c #403F40", +"g. c #7E7E7E", +"h. c #C8C8C8", +"i. c #8E92BA", +"j. c #8287B5", +"k. c #7277AC", +"l. c #676CA6", +"m. c #656AA4", +"n. c #6168A2", +"o. c #5F65A1", +"p. c #5C629F", +"q. c #595F9E", +"r. c #565C9C", +"s. c #4F5698", +"t. c #4C5396", +"u. c #4A5095", +"v. c #464D93", +"w. c #444B92", +"x. c #434A92", +"y. c #424990", +"z. c #40478D", +"A. c #3E4486", +"B. c #363C77", +"C. c #2C3161", +"D. c #24284E", +"E. c #212549", +"F. c #282A37", +"G. c #4F4F4F", +"H. c #9C9C9C", +"I. c #8F93BC", +"J. c #8A8EB8", +"K. c #868BB7", +"L. c #8489B6", +"M. c #797EB0", +"N. c #6D72AA", +"O. c #696FA7", +"P. c #676DA6", +"Q. c #656AA5", +"R. c #6268A3", +"S. c #5D62A0", +"T. c #5A5F9E", +"U. c #53599A", +"V. c #505698", +"W. c #4A5195", +"X. c #484F93", +"Y. c #464D92", +"Z. c #444C92", +"`. c #434A90", +" + c #41488F", +".+ c #3A407E", +"++ c #303467", +"@+ c #252A51", +"#+ c #222540", +"$+ c #353535", +"%+ c #C7C7C7", +"&+ c #9095BB", +"*+ c #898EB9", +"=+ c #858AB7", +"-+ c #7075AC", +";+ c #6F74AA", +">+ c #6C71A9", +",+ c #6A6FA8", +"'+ c #656BA4", +")+ c #6368A3", +"!+ c #5C639F", +"~+ c #59609E", +"{+ c #565D9C", +"]+ c #535A9A", +"^+ c #505798", +"/+ c #4D5497", +"(+ c #3C4384", +"_+ c #32376D", +":+ c #272B55", +"<+ c #222549", +"[+ c #212547", +"}+ c #2A2A2C", +"|+ c #555555", +"1+ c #ACACAC", +"2+ c #9C9FBD", +"3+ c #9296B9", +"4+ c #868AB3", +"5+ c #7D82B0", +"6+ c #7B81AE", +"7+ c #7C81AE", +"8+ c #7C80AF", +"9+ c #7B80AE", +"0+ c #7A7FAE", +"a+ c #797FAE", +"b+ c #787EAD", +"c+ c #787DAC", +"d+ c #777CAB", +"e+ c #757AAB", +"f+ c #7479A9", +"g+ c #7277A8", +"h+ c #7175A7", +"i+ c #6E73A5", +"j+ c #6C71A4", +"k+ c #6A6EA3", +"l+ c #666BA1", +"m+ c #63699F", +"n+ c #60669D", +"o+ c #5D639B", +"p+ c #595E95", +"q+ c #575B92", +"r+ c #535990", +"s+ c #51578F", +"t+ c #4F558E", +"u+ c #4E548D", +"v+ c #4D538D", +"w+ c #4C528C", +"x+ c #4B518C", +"y+ c #4B508C", +"z+ c #4B518D", +"A+ c #464D8D", +"B+ c #505796", +"C+ c #42488B", +"D+ c #343A72", +"E+ c #292D59", +"F+ c #22264A", +"G+ c #212548", +"H+ c #25262D", +"I+ c #434443", +"J+ c #959595", +"K+ c #D6D6D6", +"L+ c #6BCCE6", +"M+ c #79D0E7", +"N+ c #8F91AA", +"O+ c #3A3E66", +"P+ c #22264B", +"Q+ c #242531", +"R+ c #393A39", +"S+ c #828282", +"T+ c #D0D0D0", +"U+ c #86D6ED", +"V+ c #6FD1EC", +"W+ c #5ECDEA", +"X+ c #69D0EB", +"Y+ c #A7A7A9", +"Z+ c #4E5167", +"`+ c #232536", +" @ c #333333", +".@ c #747474", +"+@ c #CACACA", +"@@ c #A1E1F0", +"#@ c #8CDBEF", +"$@ c #7CD6EE", +"%@ c #6CD1EC", +"&@ c #7AD5ED", +"*@ c #DBDBDB", +"=@ c #B5B5B5", +"-@ c #8D8D8E", +";@ c #575968", +">@ c #22253B", +",@ c #2E2E2E", +"'@ c #676767", +")@ c #C2C2C2", +"!@ c #A9E2F2", +"~@ c #9BE0F1", +"{@ c #8DDBF0", +"]@ c #79D5EE", +"^@ c #75D4ED", +"/@ c #C0C0C0", +"(@ c #818181", +"_@ c #4B4C5A", +":@ c #2A2A2A", +"<@ c #5A5A5A", +"[@ c #B6E7F4", +"}@ c #A7E4F3", +"|@ c #9BDFF2", +"1@ c #84D8EF", +"2@ c #CCCCCC", +"3@ c #9F9F9F", +"4@ c #838383", +"5@ c #7C7B7C", +"6@ c #303031", +"7@ c #4D4D4D", +"8@ c #A4A4A4", +"9@ c #B1E6F4", +"0@ c #A6E3F4", +"a@ c #90DDF1", +"b@ c #61CDEB", +"c@ c #AAAAAA", +"d@ c #888888", +"e@ c #808080", +"f@ c #535353", +"g@ c #3E3E3E", +"h@ c #898989", +"i@ c #D2D2D2", +"j@ c #BBE8F5", +"k@ c #AEE6F4", +"l@ c #9DE0F3", +"m@ c #7AD6EE", +"n@ c #49C6E9", +"o@ c #8D8D8D", +"p@ c #6F6F6F", +"q@ c #313131", +"r@ c #696969", +"s@ c #C1C1C1", +"t@ c #B3E7F5", +"u@ c #A8E4F3", +"v@ c #8EDCF0", +"w@ c #2BBDE4", +"x@ c #BEBEBE", +"y@ c #7D7D7D", +"z@ c #2D2D2D", +"A@ c #515151", +"B@ c #A8A8A8", +"C@ c #B9E8F4", +"D@ c #AEE5F4", +"E@ c #9EE0F3", +"F@ c #46C5E8", +"G@ c #24BBE3", +"H@ c #C5C5C5", +"I@ c #979797", +"J@ c #2F2F2F", +"K@ c #444444", +"L@ c #B3E6F4", +"M@ c #93DDF1", +"N@ c #6DD2ED", +"O@ c #34C0E5", +"P@ c #1DB9E3", +"Q@ c #CBCBCB", +"R@ c #9B9B9B", +"S@ c #AAE4F4", +"T@ c #9EE1F3", +"U@ c #8ADAF0", +"V@ c #63CEEB", +"W@ c #19B7E2", +"X@ c #A1A1A1", +"Y@ c #80807F", +"Z@ c #2F3537", +"`@ c #3B3B3B", +" # c #878787", +".# c #A1E1F2", +"+# c #97DFF2", +"@# c #83D8EF", +"## c #5ECDEB", +"$# c #26BCE2", +"%# c #18B7E1", +"&# c #D5D5D5", +"*# c #A7A7A7", +"=# c #868686", +"-# c #2A3E43", +";# c #363636", +"># c #7C7C7C", +",# c #CFCFCF", +"'# c #A0E0F0", +")# c #92DDF2", +"!# c #7FD7EF", +"~# c #5CCCEB", +"{# c #27BCE3", +"]# c #21BAE3", +"^# c #AEAEAE", +"/# c #24464F", +"(# c #6E6E6E", +"_# c #9EDFF0", +":# c #8EDCF1", +"<# c #7ED6EE", +"[# c #5DCCEB", +"}# c #2BBEE4", +"|# c #23BBE3", +"1# c #DCDCDC", +"2# c #B6B6B6", +"3# c #1E4D5A", +"4# c #2C2C2D", +"5# c #606060", +"6# c #BCBCBC", +"7# c #A1DFF1", +"8# c #8DDCF1", +"9# c #7FD7EE", +"0# c #61CEEB", +"a# c #32C0E5", +"b# c #26BBE4", +"c# c #185667", +"d# c #282929", +"e# c #ADADAD", +"f# c #80D7EE", +"g# c #66CFEC", +"h# c #39C2E6", +"i# c #21BAE2", +"j# c #C6C6C6", +"k# c #989898", +"l# c #165B6E", +"m# c #242A2C", +"n# c #494949", +"o# c #9E9E9E", +"p# c #82D9EF", +"q# c #6AD1EC", +"r# c #40C4E6", +"s# c #13B6E1", +"t# c #CECECE", +"u# c #155B6E", +"v# c #1E3137", +"w# c #404040", +"x# c #8F8F8F", +"y# c #D4D4D4", +"z# c #93DCF1", +"A# c #85D9EF", +"B# c #6FD2ED", +"C# c #48C6E8", +"D# c #1AB8E3", +"E# c #A6A6A6", +"F# c #858585", +"G# c #155C6F", +"H# c #173943", +"I# c #383838", +"J# c #7F7F7F", +"K# c #96DDF0", +"L# c #87D9F0", +"M# c #73D3ED", +"N# c #4FC8E9", +"O# c #D7D7D7", +"P# c #145E72", +"Q# c #11414E", +"R# c #707070", +"S# c #C9C9C9", +"T# c #99DEF0", +"U# c #89DAF0", +"V# c #77D5EE", +"W# c #56CBE9", +"X# c #31BFE4", +"Y# c #8C8C8D", +"Z# c #0B495A", +"`# c #626262", +" $ c #8ADBF0", +".$ c #7BD6EE", +"+$ c #5CCCEA", +"@$ c #3BC2E6", +"#$ c #BDBDBD", +"$$ c #919291", +"%$ c #145E73", +"&$ c #055265", +"*$ c #2A292A", +"=$ c #565656", +"-$ c #B0B0B0", +";$ c #8BDBF0", +">$ c #7ED7EF", +",$ c #62CEEB", +"'$ c #42C4E7", +")$ c #146074", +"!$ c #00586F", +"~$ c #252A2B", +"{$ c #4B4B4B", +"]$ c #81D7EF", +"^$ c #67D0EB", +"/$ c #4BC7E8", +"($ c #4E5498", +"_$ c #565B9A", +":$ c #515799", +"<$ c #515899", +"[$ c #434890", +"}$ c #4A5196", +"|$ c #4F4D4E", +"1$ c #424041", +"2$ c #3B393A", +"3$ c #383637", +"4$ c #9E9D9D", +"5$ c #156175", +"6$ c #005870", +"7$ c #1F2F35", +"8$ c #414141", +"9$ c #919191", +"0$ c #8FDCF1", +"a$ c #5ACCEA", +"b$ c #484F94", +"c$ c #474F93", +"d$ c #424890", +"e$ c #464445", +"f$ c #373536", +"g$ c #413F40", +"h$ c #A5A5A4", +"i$ c #166276", +"j$ c #18373F", +"k$ c #39393A", +"l$ c #93DDF0", +"m$ c #71D2ED", +"n$ c #60CEEA", +"o$ c #555A9A", +"p$ c #474D92", +"q$ c #5B609E", +"r$ c #474646", +"s$ c #16647A", +"t$ c #123F4C", +"u$ c #737373", +"v$ c #98DDF0", +"w$ c #87DAF0", +"x$ c #75D4EE", +"y$ c #525898", +"z$ c #555B9C", +"A$ c #5A619F", +"B$ c #DADADA", +"C$ c #B3B3B3", +"D$ c #17677D", +"E$ c #0C4758", +"F$ c #656565", +"G$ c #70D3ED", +"H$ c #5A609E", +"I$ c #575D9D", +"J$ c #4D4B4C", +"K$ c #363435", +"L$ c #454344", +"M$ c #504E4F", +"N$ c #4C4B4C", +"O$ c #474546", +"P$ c #504F50", +"Q$ c #4B4A4B", +"R$ c #434142", +"S$ c #555454", +"T$ c #4F4E4E", +"U$ c #4E4C4D", +"V$ c #565455", +"W$ c #444243", +"X$ c #555354", +"Y$ c #545253", +"Z$ c #4A4949", +"`$ c #444343", +" % c #186B82", +".% c #005970", +"+% c #065065", +"@% c #2B2A2B", +"#% c #585858", +"$% c #9DDEEF", +"%% c #7AD5EE", +"&% c #585D9D", +"*% c #5D62A1", +"=% c #595F9D", +"-% c #575D9C", +";% c #484647", +">% c #3E3C3D", +",% c #484748", +"'% c #363535", +")% c #4B494A", +"!% c #403E3F", +"~% c #3A3839", +"{% c #4F4E4F", +"]% c #454445", +"^% c #525152", +"/% c #C3C3C3", +"(% c #196F86", +"_% c #005971", +":% c #02576D", +"<% c #26292A", +"[% c #8CDBF0", +"}% c #474D93", +"|% c #494F93", +"1% c #434990", +"2% c #485094", +"3% c #464546", +"4% c #434243", +"5% c #3C3A3B", +"6% c #525051", +"7% c #514F50", +"8% c #1A748C", +"9% c #015A72", +"0% c #015870", +"a% c #202E32", +"b% c #424242", +"c% c #949494", +"d% c #8DDCF0", +"e% c #82D8EF", +"f% c #454C93", +"g% c #5E63A0", +"h% c #505799", +"i% c #4B5095", +"j% c #3D3B3C", +"k% c #474647", +"l% c #494748", +"m% c #414040", +"n% c #D1D1D1", +"o% c #1C7993", +"p% c #005B74", +"q% c #19363E", +"r% c #3B3A3A", +"s% c #848484", +"t% c #91DCF0", +"u% c #84D9EF", +"v% c #77D5ED", +"w% c #494F94", +"x% c #363536", +"y% c #515050", +"z% c #4C4A4B", +"A% c #4C4B4B", +"B% c #3F3D3E", +"C% c #454444", +"D% c #D6D6D5", +"E% c #1D7F99", +"F% c #005D76", +"G% c #133E4A", +"H% c #343434", +"I% c #767676", +"J% c #94DDEF", +"K% c #86D9F0", +"L% c #76D5EE", +"M% c #4D5396", +"N% c #575C9B", +"O% c #4E5499", +"P% c #393738", +"Q% c #424142", +"R% c #535252", +"S% c #DBDADB", +"T% c #1E849F", +"U% c #005F79", +"V% c #0D4656", +"W% c #88DAEF", +"X% c #7AD6EF", +"Y% c #4F5697", +"Z% c #DEDEDE", +"`% c #1F8AA6", +" & c #00637D", +".& c #074E62", +"+& c #2B2B2A", +"@& c #98DDEF", +"#& c #4E5497", +"$& c #43488F", +"%& c #414990", +"&& c #4D4C4D", +"*& c #5C5B5B", +"=& c #383536", +"-& c #5E5D5D", +";& c #605E5F", +">& c #535152", +",& c #2090AD", +"'& c #006782", +")& c #03566C", +"!& c #27292A", +"~& c #8BDBF1", +"{& c #88DAF0", +"]& c #2295B4", +"^& c #006B87", +"/& c #02576F", +"(& c #212D30", +"_& c #D9D9D9", +":& c #8DDBF1", +"<& c #3D3C3D", +"[& c #1F99BB", +"}& c #00708D", +"|& c #005B73", +"1& c #1A343C", +"2& c #3C3C3C", +"3& c #8EDBF0", +"4& c #403F3F", +"5& c #595858", +"6& c #159BBF", +"7& c #007594", +"8& c #143D49", +"9& c #787878", +"0& c #CDCDCD", +"a& c #92DDF0", +"b& c #92DDF1", +"c& c #14A0C5", +"d& c #007A9A", +"e& c #0E4554", +"f& c #C4C4C4", +"g& c #98DEF2", +"h& c #0CA1C9", +"i& c #007FA1", +"j& c #00627D", +"k& c #084D60", +"l& c #2B2B2B", +"m& c #5C5C5C", +"n& c #B8B8B8", +"o& c #9ADEF0", +"p& c #99DFF2", +"q& c #0BA5CF", +"r& c #0084A8", +"s& c #006681", +"t& c #03556B", +"u& c #505050", +"v& c #A9A9A9", +"w& c #9DDEF0", +"x& c #9ADFF1", +"y& c #0CA9D4", +"z& c #0089AE", +"A& c #006985", +"B& c #222C2F", +"C& c #464646", +"D& c #9A9A9A", +"E& c #A0E2F3", +"F& c #0BABD7", +"G& c #008EB4", +"H& c #006C8A", +"I& c #005A72", +"J& c #1C3339", +"K& c #3D3D3D", +"L& c #8A8A8A", +"M& c #A2E2F2", +"N& c #0CADD8", +"O& c #0090B7", +"P& c #006F8C", +"Q& c #005A73", +"R& c #01586F", +"S& c #153B45", +"T& c #7B7B7B", +"U& c #A4E2F3", +"V& c #0CAED9", +"W& c #0091B8", +"X& c #12404D", +"Y& c #A6E2F0", +"Z& c #5D639F", +"`& c #515698", +" * c #0BADD8", +".* c #008FB5", +"+* c #006C89", +"@* c #11414D", +"#* c #565C9B", +"$* c #484E94", +"%* c #5A609D", +"&* c #0BA9D4", +"** c #0189AE", +"=* c #153B46", +"-* c #666666", +";* c #464C92", +">* c #4D5495", +",* c #535999", +"'* c #4D5498", +")* c #4B5196", +"!* c #4E5496", +"~* c #0BA2CA", +"{* c #017FA1", +"]* c #00607A", +"^* c #1C3137", +"/* c #303030", +"(* c #5C61A0", +"_* c #545A9B", +":* c #1398BC", +"<* c #00708E", +"[* c #03546A", +"}* c #242728", +"|* c #393939", +"1* c #5A5F9D", +"2* c #1284A2", +"3* c #00617B", +"4* c #11404D", +"5* c #282828", +"6* c #4A4A4A", +"7* c #9D9D9D", +"8* c #474D94", +"9* c #6065A2", +"0* c #5B619F", +"a* c #4C5294", +"b* c #AFB9BB", +"c* c #056883", +"d* c #005972", +"e* c #04546A", +"f* c #22292B", +"g* c #323232", +"h* c #6A6A6A", +"i* c #BFBFBF", +"j* c #5C619D", +"k* c #7A7EA7", +"l* c #6C8991", +"m* c #015A73", +"n* c #02576E", +"o* c #19353C", +"p* c #2A2B2A", +"q* c #4A4849", +"r* c #474E8F", +"s* c #3B4283", +"t* c #3A3F78", +"u* c #A1A2A8", +"v* c #939393", +"w* c #2A6777", +"x* c #163943", +"y* c #2A2929", +"z* c #434991", +"A* c #767AA7", +"B* c #373D79", +"C* c #2E3467", +"D* c #57596F", +"E* c #62777C", +"F* c #035870", +"G* c #045369", +"H* c #1B353C", +"I* c #2C2C2C", +"J* c #797979", +"K* c #A9ABCB", +"L* c #444A90", +"M* c #D7D7DB", +"N* c #3A3F72", +"O* c #282C57", +"P* c #2B3150", +"Q* c #155668", +"R* c #133F4C", +"S* c #272E30", +"T* c #383837", +"U* c #545454", +"V* c #A9ACCC", +"W* c #A5A8C9", +"X* c #E0E0E0", +"Y* c #DFDFDF", +"Z* c #E1E1E1", +"`* c #E3E3E3", +" = c #DADAD9", +".= c #5B5E7E", +"+= c #242528", +"@= c #474747", +"#= c #AAACCB", +"$= c #9EA2C6", +"%= c #9699C0", +"&= c #9396BF", +"*= c #545A98", +"== c #707386", +"-= c #24252C", +";= c #A8ABCC", +">= c #999DC3", +",= c #9195BD", +"'= c #7E83B3", +")= c #5C619E", +"!= c #8386A4", +"~= c #9698B0", +"{= c #A0A1B5", +"]= c #A6A6B8", +"^= c #AAABB9", +"/= c #A6A7B5", +"(= c #A2A3B1", +"_= c #9E9FAC", +":= c #9A9BA8", +"<= c #9697A3", +"[= c #92929D", +"}= c #8E8E99", +"|= c #8A8B94", +"1= c #868790", +"2= c #83848D", +"3= c #868791", +"4= c #8F8F9A", +"5= c #9C9DA8", +"6= c #ACADBA", +"7= c #545A95", +"8= c #4B5396", +"9= c #6C6B6B", +"0= c #797B88", +"a= c #242530", +"b= c #9195BE", +"c= c #8A8EBA", +"d= c #7D82B3", +"e= c #3F478C", +"f= c #3F468B", +"g= c #3E4689", +"h= c #3E4487", +"i= c #3D4385", +"j= c #3C4282", +"k= c #3A417F", +"l= c #373E7A", +"m= c #353B74", +"n= c #32386E", +"o= c #31366B", +"p= c #303568", +"q= c #2E3263", +"r= c #2C3160", +"s= c #2B305D", +"t= c #282C56", +"u= c #272B54", +"v= c #262952", +"w= c #252950", +"x= c #24284F", +"y= c #262A53", +"z= c #2B2F5D", +"A= c #31356A", +"B= c #383D75", +"C= c #434987", +"D= c #585F9D", +"E= c #777985", +"F= c #353636", +"G= c #8C90BB", +"H= c #8084B3", +"I= c #777BAF", +"J= c #555C9B", +"K= c #3F4589", +"L= c #3E4587", +"M= c #3D4386", +"N= c #3C4283", +"O= c #3A3F7E", +"P= c #383E7B", +"Q= c #373D77", +"R= c #363B75", +"S= c #333870", +"T= c #31376C", +"U= c #30356A", +"V= c #2F3467", +"W= c #2E3364", +"X= c #2D3162", +"Y= c #2C305F", +"Z= c #2B2F5C", +"`= c #2A2D5A", +" - c #282C58", +".- c #272B56", +"+- c #252951", +"@- c #23274D", +"#- c #23274C", +"$- c #222649", +"%- c #232745", +"&- c #262941", +"*- c #292B3E", +"=- c #30313F", +"-- c #373841", +";- c #3E3E42", +">- c #454647", +",- c #555777", +"'- c #6B71A8", +")- c #7378AC", +"!- c #4D4C4C", +"~- c #6E6F7D", +"{- c #23252F", +"]- c #999DC1", +"^- c #6B70A7", +"/- c #6067A2", +"(- c #495095", +"_- c #41488D", +":- c #40478C", +"<- c #3F478B", +"[- c #3C4383", +"}- c #3B4181", +"|- c #3A407F", +"1- c #393F7C", +"2- c #363C76", +"3- c #333970", +"4- c #2F3468", +"5- c #2E3365", +"6- c #2D3262", +"7- c #2C3060", +"8- c #2A2E5B", +"9- c #292D58", +"0- c #272C55", +"a- c #262A54", +"b- c #252952", +"c- c #24294F", +"d- c #232649", +"e- c #232646", +"f- c #252842", +"g- c #282A3F", +"h- c #2D2F3E", +"i- c #32343D", +"j- c #3A3A3F", +"k- c #424344", +"l- c #4C4C4C", +"m- c #575757", +"n- c #8B8B8B", +"o- c #999A99", +"p- c #9496A9", +"q- c #7E82B3", +"r- c #595B6D", +"s- c #24252B", +"t- c #373637", +"u- c #3E4589", +"v- c #3C4385", +"w- c #3B417F", +"x- c #383E7A", +"y- c #373C77", +"z- c #343972", +"A- c #31366C", +"B- c #2B305E", +"C- c #23264B", +"D- c #232647", +"E- c #252743", +"F- c #272A40", +"G- c #2B2D3C", +"H- c #31323D", +"I- c #37383D", +"J- c #404041", +"K- c #494948", +"L- c #5E5E5E", +"M- c #6B6B6B", +"N- c #A3A3A3", +"O- c #B1B1B1", +"P- c #C5C6D5", +"Q- c #888CB9", +"R- c #ABABAB", +"S- c #3A3D5A", +"T- c #212448", +"U- c #212546", +"V- c #252527", +"W- c #6A6FA4", +"X- c #3B4282", +"Y- c #363B76", +"Z- c #30366A", +"`- c #2D3161", +" ; c #24284D", +".; c #222648", +"+; c #262841", +"@; c #2A2C3E", +"#; c #2F303D", +"$; c #35353C", +"%; c #3C3D3F", +"&; c #4F504F", +"*; c #5A5B5B", +"=; c #676667", +"-; c #909090", +";; c #BABABA", +">; c #979AC1", +",; c #8D90BC", +"'; c #8A8B91", +"); c #22253D", +"!; c #272726", +"~; c #7579A5", +"{; c #3E4485", +"]; c #3B407E", +"^; c #373D78", +"/; c #31376D", +"(; c #242950", +"_; c #252841", +":; c #292B3F", +"<; c #2D2E3D", +"[; c #3A3B3F", +"}; c #434343", +"|; c #9FA1C6", +"1; c #898DBA", +"2; c #8488B7", +"3; c #4E4D4D", +"4; c #DDDDDD", +"5; c #B4B4B4", +"6; c #4C4F66", +"7; c #24252F", +"8; c #A8AAB9", +"9; c #595D87", +"0; c #353A71", +"a; c #262940", +"b; c #2B2D3E", +"c; c #38383D", +"d; c #3F4042", +"e; c #484949", +"f; c #868AB7", +"g; c #7D81B2", +"h; c #787DAF", +"i; c #E2E2E2", +"j; c #7E7F88", +"k; c #222749", +"l; c #222542", +"m; c #262626", +"n; c #9FA0A5", +"o; c #6B6C7D", +"p; c #4C4E64", +"q; c #3C3E56", +"r; c #36384C", +"s; c #353643", +"t; c #37373F", +"u; c #3D3E40", +"v; c #464647", +"w; c #9E9E9F", +"x; c #9094BC", +"y; c #6F74A9", +"z; c #95959A", +"A; c #2D3151", +"B; c #24252E", +"C; c #B2B2B2", +"D; c #808081", +"E; c #828283", +"F; c #8C8C8C", +"G; c #6166A2", +"H; c #5B619D", +"I; c #919199", +"J; c #313455", +"K; c #232539", +"L; c #272727", +"M; c #686DA4", +"N; c #4E5597", +"O; c #4A5093", +"P; c #E1E2E2", +"Q; c #B5B5B6", +"R; c #6D6F80", +"S; c #282C4F", +"T; c #23253D", +"U; c #6369A0", +"V; c #595E94", +"W; c #9C9EB9", +"X; c #CACBD3", +"Y; c #D9DADB", +"Z; c #D6D6D7", +"`; c #C3C3C4", +" > c #A1A2AB", +".> c #6E7085", +"+> c #34385B", +"@> c #21264A", +"#> c #272728", +"$> c #8185A8", +"%> c #3F4684", +"&> c #39407E", +"*> c #343A73", +"=> c #3B4173", +"-> c #444876", +";> c #40446F", +">> c #313561", +",> c #242634", +"'> c #B0B1BC", +")> c #60648A", +"!> c #393E74", +"~> c #2E3264", +"{> c #222545", +"]> c #242639", +"^> c #292A2D", +"/> c #A8A9AC", +"(> c #707183", +"_> c #4D506A", +":> c #3A3D5E", +"<> c #303354", +"[> c #2B2E4C", +"}> c #292C46", +"|> c #2C2E40", +"1> c #2F303A", +"2> c #373739", +"3> c #B7B7B8", +"4> c #9B9B9A", +"5> c #757575", +"6> c #6D6D6D", +"7> c #6C6C6C", +"8> c #717171", +" . + @ # $ % & * = - ", +" ; > , ' ) ! ~ { ] ^ / ( _ : < [ } | 1 ", +" 2 3 4 5 6 ! ! 7 8 7 ! ! 9 0 a b c d e f g h i j k l m ", +" n o p q r s ! ! ! ! ! ! ! 9 0 t u v w x y ^ z A B C D E F G H I J K L ", +" M N O P Q ! ! ! ! ! ! R 9 0 t u S w b T U V W X A Y B Z e ( ` ...+.@.#.$.%.&.*.=.-. ", +" ;.>.,.'.).! ! ! ! !.! ! 9 9 ~.u a {.b ].^./.(._.A :.<.[.}.|.1.2.3.4.5.6.7.7.8._ 9.0.a.b.c.d.e.f.g.h. ", +" i.M >.j.).!.! 7 !.7 ! ! 9 9 ~.k.a v b ].^.^ l.m.n.o.p.q.r.C s.t.u.4.v.w.x.7.8.8.8.8.y.8.8.8.y._ z.A.B.C.D.E.F.G.H.- ", +" I.J.K.L.M.! 7 ! ! ! ! ! ! 9 ~.k.a v w N.^.O.P.Q.R.o.S.T.r.U.V.t.W.X.Y.Z.6.`.y.y._ 8.8.8.8.8.8.8.8.8.8.8.8.8._ +E .+++@+E.#+$+=.%+ ", +" &+> *+=+P ! ! ! ! ! ! ! 9 9 ~.k.a -+;+].>+,+c '+)+d !+~+{+]+^+/+W.X.v.5.7.`.`.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.y.9.(+_+:+<+[+}+|+1+ ", +" 2+3+4+5+6+6+7+6+6+7+8+9+9+0+a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+w+x+y+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+x+z+A+B+C+D+E+F+G+H+I+J+K+ ", +" L+M+ N+O+P+G+Q+R+S+T+ ", +" U+V+W+X+ - Y+Z+G+`+ @.@+@ ", +" @@#@$@%@&@ *@=@-@;@>@,@'@)@ ", +" !@~@{@]@^@ /@J+(@_@:@<@=@ ", +" [@}@|@1@%@ 2@3@4@5@6@7@8@ ", +" 9@0@a@%@b@ K+c@d@e@f@g@h@i@ ", +" j@k@l@m@n@ *@=@o@e@p@q@r@s@ ", +" t@u@v@W+w@ x@l e@y@z@A@B@ ", +"C@D@E@$@F@G@ H@I@(@e@J@K@I@ ", +"L@0@M@N@O@P@ Q@R@S+e@,@g@o@K+ ", +"S@T@U@V@w@W@ T+X@4@Y@Z@`@ #1 ", +".#+#@###$#%# &#*#=#e@-#;#>#,# ", +"'#)#!#~#{#]# - ^#h@e@/#6@(#h. ", +"_#:#<#[#}#|# 1#2#o@e@3#4#5#6# ", +"7#8#9#0#a#b# x@l e@c#d#f@e# ", +" {@f#g#h#i# j#k#(@l#m#n#o# ", +" :#p#q#r#s# t#3@4@u#v#w#x#y# ", +" z#A#B#C#D# 1 E#F#G#H#I#J#T+ ", +" K#L#M#N#]# O#e#d@P#Q#q@R#S# ", +" T#U#V#W#X# *@=@Y#P#Z#z@`#x@ ", +" _# $.$+$@$ #$$$%$&$*$=$-$ ", +" ;$>$,$'$ H@I@)$!$~${$X@ ", +" {@]$^$/$ ($8.8._$ :$8.8.<$ [$y.8.8.8.y.}$C |$1$2$3$ 2@4$5$6$7$8$9$O# ", +" 0$@#%@a$ b$8.8.c$ 6.8.8.1. d$8.8.8.8.8.8.8.X. e$f$g$ i@h$i$6$j$k$S+T+ ", +" l$A#m$n$ y.8.8.y. o$y.8.8.`. d$8.y.p$y.<$7.8.8.q$ 2$f$r$ K+1+s$6$t$ @u$+@ ", +" v$w$x$^$ y.8.8.8.y$ }$8.8.8.y. d$8.8.($ z$8.8.A$ f$f$ B$C$D$6$E$,@F$/@ ", +" v$U#]@G$ H$y.8.8.8.y. 8.8.8.8.8. d$8.y.($ I$8.8.B J$f$K$ L$M$N$O$P$Q$ O$R$|$ |$|$S$ T$U$V$R$|$ L$W$X$ Y$Z$`$ | %.%+%@%#%C$ ", +" $% $$@%% U.y.8.&%y.8.*%^+8.8.=%8.8.-% d$8.8./+}.r.6.8.8.=% ;%f$>% ,%f$f. >%f$>% Z$f$'% f$K$)% !%2$ ~%f${% ]%f$f$^%J$f$K$ /%(%_%:%<%7@8@ ", +" [%!#>$ V.8.y. }%8.|%1%8./+ 8.8.:$ d$8.8.8.8.8.8.y.2% g$f$3% f$f$ 4%f$e$ J$f$K$ f$f$ 1$K$U$ 5%f$6% 7%f$f$ 1$f$~% Q@8%9%0%a%b%c%- ", +" d%e%e% f%8.w. |.8.8.8.y.g% y.8.h% d$8.8.y.y.y.Y.i% f$f$|$ R$f$1$ f$f$J$ )%f$j% U$f$f$ f$f$ )%'%k% l%f$m% j% n%o%p%6$q%r%s%i@ ", +" t%u%v% y.8.w% y.8.8.Y. y.8.p$ d$8.y.]+ K$f$ x%f$O$ f$f$ j%f$O$ 4%f$!% U$f$f$y%z%A% B%f$C% D%E%F%6$G%H%I%+@ ", +" J%K%L% 8.y.1. M%8.y.N% ..8.7. d$8.y.O% N$f$P% f$f$1$ J$f$5% f$f$l% Q%f$l% M$f$f$ f$f$R% S%T%U%6$V%,@'@)@ ", +" v$W%X% e y.8.|. N%_ 7. Y%8.y. d$8.y.($ )%f$O$ ~%f$!% >%f$~% f$f$U$ J$f$f$U$ f$f$A% W$ f$f$ Z%`% &6$.&+&<@=@ ", +" @& $9# s._ y.q. 5.1. #&y.y. $&y.%&#& &&f$K$W$*& M$f$f$2$U$7%=&f$1$-& 5%f$f$e$;&f$K$ >&P%f$!%!%1$ ;%f$5% ,&'&_%)&!&G.E# ", +" ~&{& z%f$R$ ]&^&9%/&(&K@I@_& ", +" :& $ <&2$ 5%3$ [&}&|&0%1&2& #1 ", +" 3&{@ 5%f$4& e$5%5& 6&7&F%0%8&$+9&0& ", +" a&b& J$5%g$z% c&d&U%6$e&J@r@f& ", +" @&g& h&i&j&6$k&l&m&n& ", +" o&p& q&r&s&_%t&d#u&v& ", +" w&x& y&z&A&_%0%B&C&D& ", +" E& F&G&H&I&0%J&K&L&y#", +" M& N&O&P&Q&R&S&;#T&t#", +" U& V&W&P&Q&!$X&q@(#h.", +" Y& Z&`&3.y.y.y.y.` }. *.*+*I&0%@*,@'@/%", +" #*5.y.8.8.8.8.8.8.8.8.8.$*%* &***'&_%0%=*,@-*/%", +" 2%y.8.8.;*>*,*'*)*o$V.7.8.8.y.!* ~*{*]*6$6$^*/*(#S#", +" 5.y.8.u.(* _*5.y.y.b$ :*<*|&6$[*}*|*(@n%", +" 6.8.y.1* V.y.y.v. *@2*3*6$6$4*5*6*7* ", +" 8*8.8.9* 0*8._ a* _&b*c*d*6$e*f*g*h*i* ", +" V.y.8.j* x%K$;% V.9.0.k*y#L l*m*6$n*o*p*7@k#K+ ", +" y.8.1. x%f$f$3$q* r*s*t*u*v*w*R&/&x*y*b%e@j# ", +" 1.y.z* x%f$f$f$f$~%A% A*B*C*D*E*F*G*H*I*K@J*#$ ", +" K* L*y.Y% x%f$f$f$f$f$f$>%q* M*N*O*P*Q*R*S*T*U*=#/@ ", +" V*W* X*Y*Z*`* 9._ -% x%f$f$f$f$f$f$f$f$!% =.=D.[++=I*@=u$8@2@ ", +" #=$=%=&= Z%*@_&y#,#+@j#j#2@K+`**=`.$* x%f$f$f$f$f$f$f$f$f$f$g$ 1 ==F+G+-=$+p@n&1# ", +" ;=>=,='=(.)=%* !=~={=]=^=/=(=_=:=<=[=}=|=1=2=3=4=5=6=7=8=,* x%f$f$f$f$f$f$f$f$f$f$f$x%9=0&0=E.G+a=I#g.t# ", +" b=c=d=W s.5.y.y.8.8.8.8.8.y.y.y.y.y.%&%&%&%& + ++.e=f=g=h=i=j=k=h l=B.m=i n=o=p=H q=r=s=I E+t=u=v=w=x=y=z=A=B=C=D=A x%f$f$f$f$f$f$f$f$f$f$!% S#E=E.G+a=F=T&t# ", +" G=H=I=c J=b$6._ 8.8.8.8.8.8._ 9.9.9.z.f=K=L=M=N=a.O=P=Q=R=D+S=T=U=V=W=X=Y=Z=`= -.-y=+-x=@-#-P+$-%-&-*-=---;->-,-'-)- x%f$f$f$f$f$f$f$f$2$!- /%~-G+G+{-$+J*t# ", +" ]-t ^-/-e (-6._ +9._-:-<-0.g @.[-}-|-1-B*2-G 3-_+o=4-5-6-7-z=8-9-0-a-b-c-D.@-P+d-e-f-g-h-i-j-k-l-m-`#p@>#n-o-p-q-5 x%f$f$f$f$f$f$f$,% Z*-.r-G+G+s-t-y@t# ", +" H=!+U.X._ E u-@.v-j=w-h x-y-m=z-n=A-$.H q=C.B-c.E+O*:+y=w=x=@-C-F+D-E-F-G-H-I-J-K-f@L-M-9&=#J+N-O-i*h.0&&# =P-Q-c=,= x%f$f$f$f$f$L$ *@R-S-T-U-V-2&d@1 ", +" W-;*:-@.X-.+#.Y-z-n=Z-V=W=`-Y=Z=%.O*:+y=+-D. ;#-P+.;e.+;@;#;$;%;C&&;*;=;.@S+-;3@e#;;H@2@1 _& >;G=,; x%f$f$f$2$6% 0&';F+[+);!;@=R@ ", +" ~;{;];^;D+/;++X=z=%.t=a-+-(;d.#-P+$-e-_;:;<;i-[;};l-=$`#p@y@n-D&v&2#)@+@,#K+ |;1;2; x%f$t-3; 4;5;6;G+G+7;I*m&5; ", +" 8;9;0;$.6-8-:+w=@-P+D-E-a;b;H-c;d;e;f@L-M-9&=#J+N-O-x@h.0&&# f;g;h; x%l% i;H@j;k;G+l;m;I#T&+@ ", +" t#n;o;p;q;r;s;t;u;v;G.<@'@.@S+-;w;e#;;f&Q@i@_& x;k.y y; i;+@z;A;G+G+B;l&f@8@ ", +" Q@C;D&h@D;E;F;D&B@2#/%S#,#K+ r G;q$H; 1#H@I;J;G+G+K;L;g@g.S# ", +" &#,#,#y# M;N;4.O; P;*@0&Q;R;S;G+G+T;L;;#r@=@ ", +" U;z.u-i=V;W;X;Y;Z;,#`; >.>+>@>G+G+>@#>$+`#B@O# ", +" $>%>&>x-2-*>=>->;>>>:+@-E.G+U-,>:@2&'@*#&# ", +" '>)>!>_+p=~>B-O*w=P+G+{>]>^>$+G.T&C$O# ", +" n%/>(>_>:><>[>}>|>1>2>b%|+.@o#j# ", +" 0&3>4>s%5>6>7>8>y@l 1+h.- ", +" B$n%+@S#h.S#,#K+ "}; diff --git a/gui/mplayer/pixmaps/mplayer-desktop.xpm b/gui/mplayer/pixmaps/mplayer-desktop.xpm new file mode 100644 index 0000000000..64b06e56ec --- /dev/null +++ b/gui/mplayer/pixmaps/mplayer-desktop.xpm @@ -0,0 +1,149 @@ +/* XPM */ +static const char * mplayer_desktop_xpm[] = { +"47 39 107 2", +" c None", +". c #6D619F", +"+ c #6F64A0", +"@ c #7C72A8", +"# c #3D2D7F", +"$ c #39297C", +"% c #3A2A7D", +"& c #948BB8", +"* c #413282", +"= c #38277B", +"- c #4E408A", +"; c #36267A", +"> c #594C91", +", c #342479", +"' c #D7F1FB", +") c #12B0E8", +"! c #FEFEFE", +"~ c #FFFFFF", +"{ c #54468E", +"] c #A5E1F6", +"^ c #0AADE7", +"/ c #48C2ED", +"( c #B0E5F7", +"_ c #9DDEF5", +": c #FAFDFE", +"< c #45C1ED", +"[ c #03ABE7", +"} c #09ADE7", +"| c #0BAEE7", +"1 c #17B1E9", +"2 c #F7F7FA", +"3 c #CECADF", +"4 c #000000", +"5 c #95DBF4", +"6 c #6C619E", +"7 c #F8F8F8", +"8 c #5C4F93", +"9 c #37277B", +"0 c #332378", +"a c #1A1A1A", +"b c #020202", +"c c #2E2E2E", +"d c #E0E0E0", +"e c #C9C9C9", +"f c #F7F7F7", +"g c #202020", +"h c #38287B", +"i c #352479", +"j c #929292", +"k c #4E4E4E", +"l c #FAFAFA", +"m c #EDEDED", +"n c #9C9C9C", +"o c #6ECEF1", +"p c #E1E0EC", +"q c #55488F", +"r c #E3E3E3", +"s c #515151", +"t c #666666", +"u c #5E5E5E", +"v c #676767", +"w c #0DAEE8", +"x c #2C1B73", +"y c #35257A", +"z c #C1BCD6", +"A c #322177", +"B c #F7F6FA", +"C c #CFCFCF", +"D c #555555", +"E c #05ACE7", +"F c #DEDEDE", +"G c #33BBEB", +"H c #9FDFF6", +"I c #645799", +"J c #3C2D7E", +"K c #5A4D92", +"L c #13B0E8", +"M c #332278", +"N c #BAE8F8", +"O c #4C3D88", +"P c #D4D1E3", +"Q c #3E2E7F", +"R c #888888", +"S c #9389B7", +"T c #35BCEB", +"U c #978EBA", +"V c #E1E1E1", +"W c #2E1D75", +"X c #3ABDEC", +"Y c #403080", +"Z c #FCFCFC", +"` c #DEDCEA", +" . c #3E2F80", +".. c #D8D5E4", +"+. c #EBEAF2", +"@. c #F8F8FA", +"#. c #2F1E75", +"$. c #695D9C", +"%. c #FAF9FB", +"&. c #EFEFEF", +"*. c #453684", +"=. c #36257A", +"-. c #575757", +";. c #2F1F76", +">. c #584B91", +",. c #F9F8FB", +"'. c #3B2B7E", +" . + ", +" @ # $ $ $ $ $ $ $ $ % ", +" & * = $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ ", +" @ - ; $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ ", +" @ > , $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ ", +" ' ) ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ~ { $ ", +" ] ^ / ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ~ ", +"( ^ ^ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ~ ", +"^ ^ _ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ", +"^ ^ : ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ", +"^ ^ ~ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ", +"^ ^ ~ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ", +"^ ^ ~ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ", +"^ ^ ~ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! < ", +"^ ^ ~ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! [ ", +"} ^ ~ ! ! ! ~ ~ ! ! ~ ~ ! ~ ~ ~ ~ ! ! ~ ~ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! | ", +"1 ^ ~ ! ! ! $ $ ~ ! $ $ ! 2 $ $ $ 3 ! ~ 4 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ^ ", +"5 ^ ~ ! ! ! $ $ 6 ~ $ $ ! 2 $ 3 ! $ ! 7 4 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ^ ", +" ^ ~ ! ! ! $ 8 $ 9 0 $ ~ 2 $ 3 ! $ ! a 4 ! b c d 4 ! e 4 ! 4 4 ! 4 4 4 f g g 4 4 ! ! ! ^ ", +" ^ ~ ! ! ~ $ ~ $ $ ~ $ 3 2 $ h i 3 ! 4 j ~ 4 ! k 4 ! d 4 ! 4 l m 4 ~ 4 ! ~ 4 ! n ! ! ! ^ o ", +" ^ ~ ! ! p $ ! = $ ! $ q 2 $ 3 ! ! ! 4 ~ r 4 ! 4 s ! d b ! 4 ~ t 4 u ! ! v 4 ! ! ! ! ! ^ w ", +" ^ ~ ! ! x y ! ~ z ! y A B y 3 ! ! ! 4 ! ! 4 4 C 4 ~ D D 4 4 ! ! 4 4 u ! 4 g ! ! ! ! ! ^ ^ ", +" E ~ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! 4 ~ 4 F ! ! ! ! ! ! ! ! ! ! ! ! ! ^ ^ ", +" G ~ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ~ 4 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ^ ^ ", +" ' ~ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ^ ^ ", +" ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ^ ^ H ", +" ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ~ I J K ~ ! ! ! ! ! ^ ^ L ", +" ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ~ % $ % M % $ $ ~ ! ! ! ^ ^ N ", +" ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ~ $ A ! ! ! ! ! O $ P ! ! ^ ^ ", +" ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! $ Q ! a R ! ! ! ! S $ ~ ~ ^ T ", +" ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! U $ ! ! a 4 4 V ! ! ! $ W [ X ", +" , ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! $ Y ! ! a 4 4 4 4 Z ! ` $ ", +" $ $ ...+.+.+.+.+.+.+.~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ $ @.! ! a 4 4 4 4 4 4 ~ $ ", +" #.$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ ; $. $ %.! ! a 4 4 4 4 &.! ~ $ ", +" $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ = *.@ $ =.! ! a 4 4 -.! ! ! U $ ", +" $ $ $ $ $ $ $ $ ;.@ $ ! ! a 4 ! ! ! ! ! % >. ", +" $ % ! ~ ! ! ! ! ! $ $ ", +" % $ ,.! ! ! ~ $ $ ", +" '.$ $ $ $ $ 9 "}; diff --git a/gui/mplayer/pixmaps/next.xpm b/gui/mplayer/pixmaps/next.xpm new file mode 100644 index 0000000000..48c7229790 --- /dev/null +++ b/gui/mplayer/pixmaps/next.xpm @@ -0,0 +1,79 @@ +/* XPM */ +static const char * next_xpm[] = { +"16 16 60 1", +" c None", +". c #000000", +"+ c #FFFFFF", +"@ c #737372", +"# c #888887", +"$ c #727170", +"% c #7E7E7D", +"& c #A4A4A3", +"* c #7B7B7A", +"= c #6C6B6A", +"- c #8E8E8D", +"; c #B5B4B3", +"> c #7F7E7D", +", c #999996", +"' c #7D7C7B", +") c #949392", +"! c #C0BFBE", +"~ c #828180", +"{ c #9D9C9A", +"] c #B0AFAC", +"^ c #908F8D", +"/ c #A4A3A2", +"( c #CACAC8", +"_ c #868583", +": c #A1A09E", +"< c #B4B3B1", +"[ c #B6B4B2", +"} c #A5A4A1", +"| c #A1A09F", +"1 c #D0CECD", +"2 c #898886", +"3 c #B9B7B4", +"4 c #BAB9B6", +"5 c #BCBAB7", +"6 c #C3C2BF", +"7 c #C2C2C2", +"8 c #8C8B89", +"9 c #A9A8A5", +"0 c #BDBCB9", +"a c #C5C3C0", +"b c #D0CECC", +"c c #8F8E8C", +"d c #B5B3B1", +"e c #C7C6C3", +"f c #D2D1CE", +"g c #AFAEAB", +"h c #D2D1CF", +"i c #B9B6B4", +"j c #D8D7D5", +"k c #B8B8B5", +"l c #D4D3D2", +"m c #A19F9D", +"n c #C7C6C4", +"o c #BBBAB7", +"p c #D7D5D3", +"q c #A7A6A3", +"r c #BBB9B7", +"s c #D9D8D6", +"t c #B9B8B5", +"u c #DEDDDB", +" . ....+ ", +" .. .@#.+ ", +" .$. .%&.+ ", +" .*=. .-;.+ ", +" .>,'. .)!.+ ", +" .~{]^. ./(.+ ", +" ._:<[}. .|1.+ ", +" .2}3456.7./(.+ ", +" .890ab.+ .|1.+ ", +" .cdef.+ .gh.+ ", +" .{ij.+ .kl.+ ", +" .mn.+ .op.+ ", +" .q.+ .rs.+ ", +" ..+ .tu.+ ", +" .+ ....+ ", +" + ++++ "}; diff --git a/gui/mplayer/pixmaps/normal.xpm b/gui/mplayer/pixmaps/normal.xpm new file mode 100644 index 0000000000..af904c0003 --- /dev/null +++ b/gui/mplayer/pixmaps/normal.xpm @@ -0,0 +1,130 @@ +/* XPM */ +static const char * normal_xpm[] = { +"16 16 111 2", +" c None", +". c #000000", +"+ c #030304", +"@ c #020303", +"# c #030303", +"$ c #030404", +"% c #040404", +"& c #A1B0BD", +"* c #8898A5", +"= c #909FAB", +"- c #97A4B0", +"; c #9EAAB4", +"> c #A4AFB9", +", c #ABB4BD", +"' c #B2BAC2", +") c #B8BFC6", +"! c #BFC5CA", +"~ c #C8CDD3", +"{ c #A4A6A7", +"] c #020203", +"^ c #BFCDD7", +"/ c #A2B5C8", +"( c #A9B9CC", +"_ c #AFBFCF", +": c #B4C3D2", +"< c #BAC8D5", +"[ c #C0CCD8", +"} c #C5D1DB", +"| c #CCD6DD", +"1 c #D2DAE1", +"2 c #D9E0E6", +"3 c #C8CDD2", +"4 c #B8C6D2", +"5 c #9BAEC3", +"6 c #A2B4C7", +"7 c #ADBCCD", +"8 c #B3C2D0", +"9 c #B9C7D3", +"0 c #BFCAD6", +"a c #C5CFD9", +"b c #CBD4DC", +"c c #BEC4CB", +"d c #B3C2CE", +"e c #96AAC0", +"f c #A9B9CA", +"g c #AEBECD", +"h c #BAC7D3", +"i c #C0CCD7", +"j c #CED7DF", +"k c #B8C0C6", +"l c #B0BECC", +"m c #91A7BE", +"n c #98ACC2", +"o c #A4B5C8", +"p c #AABACA", +"q c #B0BECE", +"r c #B6C3D1", +"s c #BBC8D4", +"t c #C1CDD7", +"u c #C9D3DC", +"v c #B3C3D3", +"w c #8CA3BB", +"x c #94A8BF", +"y c #9FB2C6", +"z c #A5B6C8", +"A c #ABBBCB", +"B c #B1BFCE", +"C c #B6C4D1", +"D c #BCC9D5", +"E c #C5CFDA", +"F c #ACB6BE", +"G c #BDCBDD", +"H c #879EB8", +"I c #8FA5BC", +"J c #A1B3C6", +"K c #ACBCCC", +"L c #B2C0CF", +"M c #B8C5D2", +"N c #A6B0BA", +"O c #BCCBDC", +"P c #819AB5", +"Q c #8BA2BA", +"R c #9BAFC3", +"S c #A8B8CA", +"T c #ADBDCD", +"U c #A0ABB6", +"V c #B4C4D6", +"W c #7993B0", +"X c #839BB6", +"Y c #89A0B8", +"Z c #8EA5BB", +"` c #95AAC0", +" . c #9CAFC4", +".. c #A2B3C7", +"+. c #A7B8CA", +"@. c #ADBDCC", +"#. c #B5C4D2", +"$. c #98A5B0", +"%. c #E6EFF8", +"&. c #B3C4D7", +"*. c #B9C9DB", +"=. c #BDCCDC", +"-. c #BECDDE", +";. c #B4C4D4", +">. c #B0BFCC", +",. c #B3C2CF", +"'. c #B9C6D2", +"). c #BDC9D5", +"!. c #CBD6E0", +"~. c #B6BFC8", +"{. c #050505", +" ", +" ", +" . + @ # # # # + + $ % % # # . ", +" # & * = - ; > , ' ) ! ~ ~ { ] ", +" + ^ / ( _ : < [ } | 1 2 2 3 # ", +" # 4 5 6 + 7 8 9 0 a b + 1 c # ", +" # d e + + f g + h i + + j k # ", +" # l m n + o p q r s t + u ' # ", +" # v w x + y z A B C D + E F # ", +" + G H I + 5 J + K L M + [ N # ", +" + O P Q + e R 6 S T 8 + s U @ ", +" + V W X Y Z ` ...+.@.#.#.$.@ ", +" % %.&.*.=.-.;.>.,.'.).!.!.~.# ", +" . {.% % % % % $ $ % % % % % . ", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/ok.xpm b/gui/mplayer/pixmaps/ok.xpm new file mode 100644 index 0000000000..2ec7a0efdf --- /dev/null +++ b/gui/mplayer/pixmaps/ok.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static const char * ok_xpm[] = { +"37 16 5 1", +" c None", +". c #3539EC", +"+ c #6E71EA", +"@ c #000000", +"# c #1C1E7C", +" ", +" ", +" ", +" ... ", +" .++. @@@@@ @@ ", +" .........++. @@@ @@@ @@ ", +" .+++++++...+. @@ @@@ @@ @@ ", +" ............+. @@ @@ @@ @@ ", +" ............... @@ @@ @@@@ ", +" .............# @@ @@@ @@@@@ ", +" ............# @@@ @@@ @@ @@ ", +" #######....# @@@@@ @@ @@ ", +" ...# ", +" ### ", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/open.xpm b/gui/mplayer/pixmaps/open.xpm new file mode 100644 index 0000000000..51af00ed88 --- /dev/null +++ b/gui/mplayer/pixmaps/open.xpm @@ -0,0 +1,83 @@ +/* XPM */ +static const char * open_xpm[] = { +"16 16 64 1", +" c None", +". c #000000", +"+ c #E4E5DF", +"@ c #D5D6CB", +"# c #D6D7CA", +"$ c #A3A39D", +"% c #F5F6F0", +"& c #8D907B", +"* c #92957E", +"= c #90937D", +"- c #979B84", +"; c #6D705F", +"> c #EAECDB", +", c #8A8C7D", +"' c #8E917B", +") c #91947F", +"! c #8B8E7A", +"~ c #999B87", +"{ c #919480", +"] c #989B86", +"^ c #B1B4A2", +"/ c #A2A394", +"( c #F7F7F7", +"_ c #878A75", +": c #666858", +"< c #4B4D3F", +"[ c #4D4F40", +"} c #404135", +"| c #424337", +"1 c #434437", +"2 c #404236", +"3 c #3C3D32", +"4 c #48493C", +"5 c #1A1A16", +"6 c #C6C6BE", +"7 c #848672", +"8 c #25261F", +"9 c #F1F2E9", +"0 c #DDE0C7", +"a c #D6DABB", +"b c #CDD2AC", +"c c #C7CCA7", +"d c #989C80", +"e c #C6C7BE", +"f c #5F6152", +"g c #888980", +"h c #A7AB8C", +"i c #878A70", +"j c #9FA19A", +"k c #EFF0E5", +"l c #9EA284", +"m c #80817B", +"n c #96968D", +"o c #E3E5D1", +"p c #83866D", +"q c #97998D", +"r c #EDEFE2", +"s c #A2A688", +"t c #767671", +"u c #E7E9DA", +"v c #D1D3BD", +"w c #BBBF9D", +"x c #989B80", +"y c #6E715C", +" ", +" ", +" .... ", +" .+@#$. ", +" .%&*=-;..... ", +" .>,')!~{]{^/. ", +" .(_:<[}||12345 ", +" .67890abbbbbcd.", +" .efg0bbbbbbbhi.", +" .j8kabbbbbbbl. ", +" .mnobbbbbbbbp. ", +" .qrbbbbbbbbs. ", +" .tuvwwwwwwxy. ", +" ........... ", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/pause.xpm b/gui/mplayer/pixmaps/pause.xpm new file mode 100644 index 0000000000..37d6560191 --- /dev/null +++ b/gui/mplayer/pixmaps/pause.xpm @@ -0,0 +1,48 @@ +/* XPM */ +static const char * pause_xpm[] = { +"16 16 29 1", +" c None", +". c #000000", +"+ c #FFFFFF", +"@ c #737372", +"# c #848483", +"$ c #888887", +"% c #7E7E7D", +"& c #A8A7A6", +"* c #A4A4A3", +"= c #A6A5A4", +"- c #B5B4B3", +"; c #858483", +"> c #AAA9A7", +", c #C0BFBE", +"' c #91908E", +") c #AFAEAC", +"! c #CACAC8", +"~ c #A6A5A2", +"{ c #BBBAB7", +"] c #D4D3D2", +"^ c #AEADA9", +"/ c #BFBDBA", +"( c #D7D5D3", +"_ c #B2B0AD", +": c #C3C1BE", +"< c #D9D8D6", +"[ c #B5B3B0", +"} c #D1CFCC", +"| c #DEDDDB", +" ", +" .....+.....+ ", +" .@#$.+.@#$.+ ", +" .%&*.+.%&*.+ ", +" .%=-.+.%=-.+ ", +" .;>,.+.;>,.+ ", +" .')!.+.')!.+ ", +" .')!.+.')!.+ ", +" .')!.+.')!.+ ", +" .~{].+.~{].+ ", +" .~{].+.~{].+ ", +" .^/(.+.^/(.+ ", +" ._:<.+._:<.+ ", +" .[}|.+.[}|.+ ", +" .....+.....+ ", +" +++++ +++++ "}; diff --git a/gui/mplayer/pixmaps/pl.xpm b/gui/mplayer/pixmaps/pl.xpm new file mode 100644 index 0000000000..25cdb4d0fd --- /dev/null +++ b/gui/mplayer/pixmaps/pl.xpm @@ -0,0 +1,26 @@ +/* XPM */ +static const char * pl_xpm[] = { +"16 16 7 1", +" c None", +". c #000000", +"+ c #FEFEFE", +"@ c #C1C1C1", +"# c #C2C2C2", +"$ c #A0A0A0", +"% c #BBBBBB", +" .. ", +" .+@. .. ... .. ", +" .#$. ", +" .. ", +" ", +" ", +" .. ", +" .+@. ", +" .#$. ..... ... ", +" .. ", +" ", +" ", +" .. ", +" .+%. ..... ... ", +" .#$. ", +" .. "}; diff --git a/gui/mplayer/pixmaps/play.xpm b/gui/mplayer/pixmaps/play.xpm new file mode 100644 index 0000000000..aafc0a554e --- /dev/null +++ b/gui/mplayer/pixmaps/play.xpm @@ -0,0 +1,56 @@ +/* XPM */ +static const char * play_xpm[] = { +"16 16 37 1", +" c None", +". c #000000", +"+ c #727170", +"@ c #7B7B7A", +"# c #6C6B6A", +"$ c #7F7E7D", +"% c #999996", +"& c #7D7C7B", +"* c #828180", +"= c #9D9C9A", +"- c #B0AFAC", +"; c #908F8D", +"> c #868583", +", c #A1A09E", +"' c #B4B3B1", +") c #B6B4B2", +"! c #A5A4A1", +"~ c #898886", +"{ c #B9B7B4", +"] c #BAB9B6", +"^ c #BCBAB7", +"/ c #C3C2BF", +"( c #FFFFFF", +"_ c #8C8B89", +": c #A9A8A5", +"< c #BDBCB9", +"[ c #C5C3C0", +"} c #D0CECC", +"| c #8F8E8C", +"1 c #B5B3B1", +"2 c #C7C6C3", +"3 c #D2D1CE", +"4 c #B9B6B4", +"5 c #D8D7D5", +"6 c #A19F9D", +"7 c #C7C6C4", +"8 c #A7A6A3", +" . ", +" .. ", +" .+. ", +" .@#. ", +" .$%&. ", +" .*=-;. ", +" .>,')!. ", +" .~!{]^/.( ", +" ._:<[}.( ", +" .|123.( ", +" .=45.( ", +" .67.( ", +" .8.( ", +" ..( ", +" .( ", +" ( "}; diff --git a/gui/mplayer/pixmaps/playdvd.xpm b/gui/mplayer/pixmaps/playdvd.xpm new file mode 100644 index 0000000000..0d18933d0d --- /dev/null +++ b/gui/mplayer/pixmaps/playdvd.xpm @@ -0,0 +1,137 @@ +/* XPM */ +static const char * playdvd_xpm[] = { +"16 16 118 2", +" c None", +". c #CACCD2", +"+ c #D3D4D6", +"@ c #D2D2D3", +"# c #D1D1D2", +"$ c #D1D1D3", +"% c #B5B8BD", +"& c #EDEDEC", +"* c #FAFAFA", +"= c #FBFBFB", +"- c #FCFCFC", +"; c #FFFFFF", +"> c #D9D9D9", +", c #AFB1B5", +"' c #C6C6C7", +") c #FDFDFD", +"! c #F7F7F7", +"~ c #F9F9F9", +"{ c #F6F6F6", +"] c #F8F8F8", +"^ c #B8B9BD", +"/ c #B2B4BA", +"( c #EAE9E9", +"_ c #DCDCDC", +": c #F3F3F3", +"< c #F4F4F4", +"[ c #A8AAAF", +"} c #CBCBCA", +"| c #CCCCCC", +"1 c #D7D7D7", +"2 c #E1E1E1", +"3 c #F5F5F5", +"4 c #EFEFEF", +"5 c #CCCDCE", +"6 c #D2D2D2", +"7 c #CDCDCD", +"8 c #D6D6D6", +"9 c #E0E0E0", +"0 c #E7E7E7", +"a c #E6E6E6", +"b c #E5E5E5", +"c c #EBEBEB", +"d c #E3E3E3", +"e c #ECECEC", +"f c #9C9DA5", +"g c #C4C5C9", +"h c #C1C1C1", +"i c #CECECE", +"j c #E2E2E2", +"k c #E8E8E8", +"l c #D8D8D8", +"m c #E4E4E3", +"n c #DBDBDB", +"o c #F2F2F2", +"p c #404040", +"q c #DDDDDD", +"r c #D4D4D4", +"s c #A2A4AA", +"t c #C9CACC", +"u c #C4C4C4", +"v c #CFCFCF", +"w c #E4E4E4", +"x c #DBDAD9", +"y c #727789", +"z c #DFDEDD", +"A c #292828", +"B c #373737", +"C c #BCBCBC", +"D c #BFBFBF", +"E c #9E9FA4", +"F c #C6C7C9", +"G c #E2E2E1", +"H c #999CA6", +"I c #C5C5C4", +"J c #D3D3D3", +"K c #313131", +"L c #747472", +"M c #5C5C5C", +"N c #C4C4C3", +"O c #95969A", +"P c #C4C5C6", +"Q c #D8D8D7", +"R c #CACACA", +"S c #C6C6C6", +"T c #343333", +"U c #A1A09E", +"V c #939290", +"W c #939395", +"X c #A0A2A7", +"Y c #E5E5E4", +"Z c #FEFEFE", +"` c #C5C5C5", +" . c #363635", +".. c #A7A6A3", +"+. c #B8B7B4", +"@. c #91908E", +"#. c #9B9C9F", +"$. c #F0F0F0", +"%. c #383737", +"&. c #B0AFAC", +"*. c #C8C7C4", +"=. c #5A5A59", +"-. c #EAEAEA", +";. c #3E3D3D", +">. c #BEBCB9", +",. c #151414", +"'. c #989BA2", +"). c #E9E9E9", +"!. c #41403F", +"~. c #696867", +"{. c #A6A8AD", +"]. c #B7B7B5", +"^. c #B4B4B3", +"/. c #0A0A0A", +"(. c #9B9DA0", +"_. c #B6B6B7", +":. c #B0B0B1", +"<. c #929396", +" . + @ # $ ", +" % & * = = = - ; > , ", +" ' ) ! ~ ~ ~ { ] * = ) ^ ", +" / ( _ : ! ] ! < ! ] ) ) = [ ", +" } | 1 2 { ] ! : 3 - - 3 4 5 ", +" 6 7 8 9 0 ] a b ) = : c d e f ", +"g h i 1 j k 6 l m n o p q r 2 s ", +"t u v n w _ x y z q A B C D E ", +"F 8 l 2 k d G H ^ I J K L M N O ", +"P w j k e = _ Q 6 R S T U V M W ", +"X Y k c ; Z 3 > ! 6 ` ...+.@.M ", +" #.$.; : : > : : : ` %.&.*.=. ", +" 1 = : > : : : : -.;.>.,. ", +" '.S a > : : $.w ).!.~.Z ", +" {.].R j k q ^./.; ", +" (._.:.<. D "}; diff --git a/gui/mplayer/pixmaps/playvcd.xpm b/gui/mplayer/pixmaps/playvcd.xpm new file mode 100644 index 0000000000..63a993ee4b --- /dev/null +++ b/gui/mplayer/pixmaps/playvcd.xpm @@ -0,0 +1,201 @@ +/* XPM */ +static const char * playvcd_xpm[] = { +"16 16 182 2", +" c None", +". c #CC9665", +"+ c #E1C0A3", +"@ c #EAD1BD", +"# c #E9D2BB", +"$ c #D7B597", +"% c #9D7C5C", +"& c #CE9E71", +"* c #F6E9DE", +"= c #FEF5EE", +"- c #FFFAF6", +"; c #FFFBF7", +"> c #FDF9F5", +", c #F2EBDD", +"' c #FBF5E4", +") c #F3E6D5", +"! c #B19D8A", +"~ c #D9AE89", +"{ c #FFEFE3", +"] c #FFF7F0", +"^ c #FFF6EE", +"/ c #FFF7EF", +"( c #FFF6EB", +"_ c #FFF1DD", +": c #FFF6E3", +"< c #FFFCE9", +"[ c #FFFFF9", +"} c #FFFFFA", +"| c #BEA98F", +"1 c #C08F68", +"2 c #FFD5B2", +"3 c #FFCAA8", +"4 c #FFE2CC", +"5 c #FFF3E9", +"6 c #FFF4E9", +"7 c #FFF3E1", +"8 c #FFF0D0", +"9 c #FFF9D9", +"0 c #FFFEE7", +"a c #FFFFF8", +"b c #FFF8DA", +"c c #B8A685", +"d c #F2B788", +"e c #FFB886", +"f c #FFBD8B", +"g c #FFCA9B", +"h c #FFE7CF", +"i c #FFF6EA", +"j c #FFF4DB", +"k c #FFF7CA", +"l c #FFFFE1", +"m c #FFFFF6", +"n c #FFFBEE", +"o c #FFF3D4", +"p c #FFF3BB", +"q c #DDC18E", +"r c #805A34", +"s c #FDB070", +"t c #FFAD6E", +"u c #FFBA7D", +"v c #FFC78B", +"w c #FFDAA3", +"x c #FFEAC8", +"y c #FFF6C9", +"z c #FFF8C4", +"A c #FFF8E8", +"B c #FFFAEB", +"C c #FFF0C7", +"D c #FFE8A8", +"E c #FFE188", +"F c #FFDC86", +"G c #B57841", +"H c #FFA656", +"I c #FFAC5F", +"J c #FFBC73", +"K c #FFCE89", +"L c #FFDA91", +"M c #FFE194", +"N c #B2A177", +"O c #C0B095", +"P c #FFE6BB", +"Q c #FFE9B3", +"R c #473E28", +"S c #FFD76C", +"T c #FFCC3D", +"U c #ECBB2F", +"V c #966F30", +"W c #BC7D42", +"X c #FFAA52", +"Y c #FFAF57", +"Z c #FFC673", +"` c #FFDE8E", +" . c #FFE58D", +".. c #FCE5A0", +"+. c #FFDA8B", +"@. c #FFD673", +"#. c #292828", +"$. c #5C5C5C", +"%. c #FFBA00", +"&. c #FEC417", +"*. c #A77D2E", +"=. c #A7713B", +"-. c #FFBF69", +";. c #FFC570", +">. c #FFDB87", +",. c #FFF3A1", +"'. c #FFF9BF", +"). c #FFE4BA", +"!. c #DFC19C", +"~. c #ECC48A", +"{. c #FFCA5D", +"]. c #FFCC45", +"^. c #313131", +"/. c #747472", +"(. c #FEC21C", +"_. c #A57927", +":. c #FFCF7C", +"<. c #FFDE8B", +"[. c #FFFFCB", +"}. c #FFFFF4", +"|. c #FFECC6", +"1. c #FFE4AA", +"2. c #FFE8BA", +"3. c #FFC21D", +"4. c #343333", +"5. c #A1A09E", +"6. c #939290", +"7. c #E5BC73", +"8. c #FFFAA9", +"9. c #FFFFCD", +"0. c #FFFEF1", +"a. c #FFF3D3", +"b. c #FFE69F", +"c. c #FFE9AB", +"d. c #FFF0C5", +"e. c #FFEBB4", +"f. c #FFD465", +"g. c #363635", +"h. c #A7A6A3", +"i. c #B8B7B4", +"j. c #91908E", +"k. c #A98E59", +"l. c #FFF1B6", +"m. c #FFE59F", +"n. c #FFD86C", +"o. c #FFE08B", +"p. c #FFEAB1", +"q. c #FFE5A3", +"r. c #FFE7AB", +"s. c #383737", +"t. c #B0AFAC", +"u. c #C8C7C4", +"v. c #5A5A59", +"w. c #CCB396", +"x. c #FFE5B4", +"y. c #FFECA5", +"z. c #FFDB70", +"A. c #FFCB3B", +"B. c #FFD871", +"C. c #FFE8AB", +"D. c #FFE6A4", +"E. c #FFE9AA", +"F. c #3E3D3D", +"G. c #BEBCB9", +"H. c #C1A46F", +"I. c #EABC6D", +"J. c #FFC924", +"K. c #FFDC6A", +"L. c #FFEFAD", +"M. c #FFEAA1", +"N. c #FFDA8E", +"O. c #41403F", +"P. c #696867", +"Q. c #FEFEFE", +"R. c #A97B28", +"S. c #C08D27", +"T. c #C99C47", +"U. c #CEA762", +"V. c #C09A5A", +"W. c #855F2F", +"X. c #FFFFFF", +"Y. c #BFBFBF", +" . + @ # $ % ", +" & * = - ; > , ' ) ! ", +" ~ { ] ^ / ( _ : < [ } | ", +" 1 2 3 4 5 6 7 8 9 0 a } b c ", +" d e f g h i j k l m n o p q ", +"r s t u v w x y z A B C D E F ", +"G H I J K L M N O P Q R S T U V ", +"W X Y Z ` ... +.@.#.$.%.&.*.", +"=.-.;.>.,.'.).!.~.{.].^./.$.(._.", +" :.<.,.[.}.|.1.2.<.3.4.5.6.$. ", +" 7.8.9.0.a.b.c.d.e.f.g.h.i.j.$.", +" k.l.[ a.m.n.o.p.q.r.s.t.u.v. ", +" w.x.y.z.A.B.C.D.E.F.G.v. ", +" H.I.].J.K.L.M.N.O.P.Q. ", +" R.S.T.U.V.W.O.X. ", +" Y. "}; diff --git a/gui/mplayer/pixmaps/prefs.xpm b/gui/mplayer/pixmaps/prefs.xpm new file mode 100644 index 0000000000..09813c8904 --- /dev/null +++ b/gui/mplayer/pixmaps/prefs.xpm @@ -0,0 +1,69 @@ +/* XPM */ +static const char * prefs_xpm[] = { +"16 16 50 1", +" c None", +". c #000000", +"+ c #CAC8C1", +"@ c #B7B7B7", +"# c #EBEBE8", +"$ c #D8D8D8", +"% c #F9F8F8", +"& c #D3D1CD", +"* c #F7F7F7", +"= c #DEDBD6", +"- c #D4D3D0", +"; c #E3E2E1", +"> c #DFDEDC", +", c #DBDAD7", +"' c #A4A19C", +") c #686868", +"! c #292929", +"~ c #1F1F1F", +"{ c #D2D1D0", +"] c #50504F", +"^ c #121212", +"/ c #414141", +"( c #494746", +"_ c #363636", +": c #C8C7C6", +"< c #6C6967", +"[ c #708295", +"} c #CFD6DD", +"| c #7C91A7", +"1 c #D6D5D5", +"2 c #8A8784", +"3 c #7D8C9C", +"4 c #788DA4", +"5 c #7F99B3", +"6 c #1F272F", +"7 c #ECEBEA", +"8 c #72706D", +"9 c #8D99A5", +"0 c #748AA2", +"a c #849EB9", +"b c #4D5F73", +"c c #D5D4D3", +"d c #6B6A69", +"e c #7D91A7", +"f c #849EBA", +"g c #525252", +"h c #7E7E7E", +"i c #515151", +"j c #66798F", +"k c #7C7C7C", +" ", +" . . ", +" .+. .@.", +" .#. .$. ", +" . .%. .. ", +" .&..*=. . ", +" .-;>,'.)! ", +" .~..{].) ", +" ^/(. ", +" ..._.:<. ", +" .[}|. .12. ", +" .3}456 .78. ", +" .9}0ab. .cd. ", +" .}efb. .{gh", +" iejb. ..k", +" i.. "}; diff --git a/gui/mplayer/pixmaps/prev.xpm b/gui/mplayer/pixmaps/prev.xpm new file mode 100644 index 0000000000..f46a833448 --- /dev/null +++ b/gui/mplayer/pixmaps/prev.xpm @@ -0,0 +1,77 @@ +/* XPM */ +static const char * prev_xpm[] = { +"16 16 58 1", +" c None", +". c #000000", +"+ c #FFFFFF", +"@ c #D9D9D9", +"# c #737372", +"$ c #888887", +"% c #7E7E7D", +"& c #A4A4A3", +"* c #696867", +"= c #8E8E8D", +"- c #B5B4B3", +"; c #5B5A59", +"> c #9C9C9A", +", c #949392", +"' c #C0BFBE", +") c #636261", +"! c #908F8D", +"~ c #C5C4C3", +"{ c #A4A3A2", +"] c #CACAC8", +"^ c #6F6E6C", +"/ c #959491", +"( c #C0BFBD", +"_ c #D3D3D1", +": c #A1A09F", +"< c #D0CECD", +"[ c #636260", +"} c #8D8C8B", +"| c #B4B3B1", +"1 c #757574", +"2 c #868481", +"3 c #BAB9B6", +"4 c #B9B7B4", +"5 c #C5C4C2", +"6 c #D4D3D1", +"7 c #A2A09F", +"8 c #A6A4A2", +"9 c #BDBCB9", +"0 c #C6C5C3", +"a c #D4D3D2", +"b c #AFAEAB", +"c c #D2D1CF", +"d c #A3A2A0", +"e c #B7B6B3", +"f c #D0CFCD", +"g c #D4D4D3", +"h c #B8B8B5", +"i c #A8A7A5", +"j c #D5D5D3", +"k c #DFDFDD", +"l c #BBBAB7", +"m c #D7D5D3", +"n c #C4C4C2", +"o c #DFDFDE", +"p c #BBB9B7", +"q c #D9D8D6", +"r c #B9B8B5", +"s c #DEDDDB", +" ....+ .@", +" .#$.+ ..+", +" .%&.+ .*.+", +" .=-.+ .;>.+", +" .,'.+ .)!~.+", +" .{].+ .^/(_.+", +" .:<.+ .[}|(_.+", +" .{].+.123456.+", +" .:<.+ .7890a.+", +" .bc.+ .defg.+", +" .ha.+ .ijk.+", +" .lm.+ .no.+", +" .pq.+ .6.+", +" .rs.+ ..+", +" ....+ .+", +" ++++ "}; diff --git a/gui/mplayer/pixmaps/question.xpm b/gui/mplayer/pixmaps/question.xpm new file mode 100644 index 0000000000..089deb37a1 --- /dev/null +++ b/gui/mplayer/pixmaps/question.xpm @@ -0,0 +1,335 @@ +/* XPM */ +static const char * question_xpm[] = { +"48 48 284 2", +" c None", +". c #9B4C3A", +"+ c #9F4E3C", +"@ c #9E4E3B", +"# c #A7523E", +"$ c #AA5440", +"% c #9C4D3A", +"& c #9D4E3B", +"* c #A4513D", +"= c #A5513E", +"- c #9D4D3B", +"; c #A9533F", +"> c #A6523E", +", c #A04F3C", +"' c #984B39", +") c #924836", +"! c #914736", +"~ c #934837", +"{ c #944937", +"] c #A7523F", +"^ c #A8533F", +"/ c #974A38", +"( c #AB6F61", +"_ c #B27F73", +": c #C09D95", +"< c #C9AFA9", +"[ c #CDB3AC", +"} c #D6CECC", +"| c #DADADA", +"1 c #D9D9D9", +"2 c #CCB1AB", +"3 c #D2B7B1", +"4 c #DDC0BA", +"5 c #C48B7D", +"6 c #8E4635", +"7 c #A86D5F", +"8 c #B4948C", +"9 c #C2B2AE", +"0 c #D7D7D7", +"a c #E1E1E1", +"b c #EEEEEE", +"c c #F3F3F3", +"d c #F9F9F9", +"e c #FAFAFA", +"f c #F8F8F8", +"g c #F7F7F7", +"h c #EEE4E2", +"i c #C38A7D", +"j c #A14F3C", +"k c #98594A", +"l c #B1897F", +"m c #C9C1BF", +"n c #EBEBEB", +"o c #F6F6F6", +"p c #DCC0B9", +"q c #BA7767", +"r c #904736", +"s c #8D4535", +"t c #B3948D", +"u c #BDBDBD", +"v c #F4F4F4", +"w c #F5F5F5", +"x c #E3D0CB", +"y c #73382A", +"z c #A2503C", +"A c #B6A7A4", +"B c #D4D4D4", +"C c #B26553", +"D c #A2503D", +"E c #823F30", +"F c #A86D60", +"G c #C1C1C1", +"H c #EDEDED", +"I c #AAAAAA", +"J c #535353", +"K c #232323", +"L c #1B1B1B", +"M c #1A1A1A", +"N c #181818", +"O c #2D2D2D", +"P c #DFDFDF", +"Q c #F2F2F2", +"R c #C99A8E", +"S c #7B3C2D", +"T c #B48B81", +"U c #DCDCDC", +"V c #808080", +"W c #1F1F1F", +"X c #191919", +"Y c #252525", +"Z c #363636", +"` c #2B2B2B", +" . c #AFAFAF", +".. c #F1F1F1", +"+. c #D9BCB6", +"@. c #A3503D", +"#. c #7E3E2F", +"$. c #C9B0A9", +"%. c #E0E0E0", +"&. c #A5A5A5", +"*. c #373737", +"=. c #303030", +"-. c #5C5C5C", +";. c #757575", +">. c #646464", +",. c #3D3D3D", +"'. c #2A2A2A", +"). c #E3E3E3", +"!. c #DBC0BA", +"~. c #793B2D", +"{. c #964A38", +"]. c #C3A199", +"^. c #1C1C1C", +"/. c #656565", +"(. c #D2D2D2", +"_. c #3F3F3F", +":. c #1E1E1E", +"<. c #F0F0F0", +"[. c #CC9F95", +"}. c #72382B", +"|. c #B07F74", +"1. c #606060", +"2. c #1D1D1D", +"3. c #767676", +"4. c #616161", +"5. c #EFEFEF", +"6. c #C28A7D", +"7. c #994B39", +"8. c #73392B", +"9. c #99594A", +"0. c #5D5D5D", +"a. c #383838", +"b. c #171717", +"c. c #737373", +"d. c #623025", +"e. c #CDC5C3", +"f. c #4E4E4E", +"g. c #565656", +"h. c #CFCFCF", +"i. c #505050", +"j. c #818181", +"k. c #DCC3BE", +"l. c #894333", +"m. c #552920", +"n. c #BD9C94", +"o. c #E7E7E7", +"p. c #A3A3A3", +"q. c #797979", +"r. c #DBDBDB", +"s. c #484848", +"t. c #C5C5C5", +"u. c #ECECEC", +"v. c #C18A7D", +"w. c #7C3D2E", +"x. c #AA6E5F", +"y. c #9A9A9A", +"z. c #4F4F4F", +"A. c #717171", +"B. c #6B3428", +"C. c #954A38", +"D. c #C8C0BE", +"E. c #D5D5D5", +"F. c #585858", +"G. c #525252", +"H. c #EAEAEA", +"I. c #DBC4BF", +"J. c #874232", +"K. c #4F271E", +"L. c #B78D84", +"M. c #323232", +"N. c #D6D6D6", +"O. c #BB7B6C", +"P. c #6E3629", +"Q. c #965748", +"R. c #CACACA", +"S. c #E9E9E9", +"T. c #464646", +"U. c #B0B0B0", +"V. c #E5D7D4", +"W. c #643126", +"X. c #8B4434", +"Y. c #C19F97", +"Z. c #777777", +"`. c #2C2C2C", +" + c #515151", +".+ c #BBBBBB", +"++ c #E8E8E8", +"@+ c #BB7C6D", +"#+ c #70372A", +"$+ c #411F18", +"%+ c #9A594A", +"&+ c #CBCBCB", +"*+ c #DEDEDE", +"=+ c #7F7F7F", +"-+ c #202020", +";+ c #B8B8B8", +">+ c #E5D9D6", +",+ c #924837", +"'+ c #BD9D95", +")+ c #313131", +"!+ c #C9C9C9", +"~+ c #BA7B6C", +"{+ c #7F3E2F", +"]+ c #401F17", +"^+ c #9A5949", +"/+ c #A0A0A0", +"(+ c #A9A9A9", +"_+ c #E6E6E6", +":+ c #E3D5D2", +"<+ c #9F4E3B", +"[+ c #B38B82", +"}+ c #DDDDDD", +"|+ c #E5E5E5", +"1+ c #B26755", +"2+ c #884333", +"3+ c #3D1E16", +"4+ c #C4BCBB", +"5+ c #4D4D4D", +"6+ c #2F2F2F", +"7+ c #CBA198", +"8+ c #663226", +"9+ c #A0685B", +"0+ c #9F9F9F", +"a+ c #161616", +"b+ c #292929", +"c+ c #686868", +"d+ c #E4E4E4", +"e+ c #E0D2CE", +"f+ c #71382A", +"g+ c #A4513E", +"h+ c #B4948D", +"i+ c #D1D1D1", +"j+ c #9E9E9E", +"k+ c #E6E0DE", +"l+ c #B16654", +"m+ c #552A20", +"n+ c #B59F99", +"o+ c #404040", +"p+ c #919191", +"q+ c #E2E2E2", +"r+ c #BF887C", +"s+ c #8C4534", +"t+ c #9D5A4A", +"u+ c #BEB6B5", +"v+ c #BCBCBC", +"w+ c #C69A90", +"x+ c #6C3528", +"y+ c #9B5949", +"z+ c #BFB7B6", +"A+ c #D2B9B3", +"B+ c #7A3C2D", +"C+ c #50261D", +"D+ c #9C594A", +"E+ c #BBACA8", +"F+ c #BD8578", +"G+ c #7D3D2F", +"H+ c #572A20", +"I+ c #B18E85", +"J+ c #CECECE", +"K+ c #DDD4D3", +"L+ c #B57262", +"M+ c #7A3C2E", +"N+ c #9A4C39", +"O+ c #97584A", +"P+ c #B99A94", +"Q+ c #D3D3D3", +"R+ c #E1DAD8", +"S+ c #C29388", +"T+ c #693327", +"U+ c #AA604E", +"V+ c #BF9287", +"W+ c #D4BCB7", +"X+ c #D2B8B3", +"Y+ c #773A2C", +"Z+ c #643125", +"`+ c #4C251C", +" @ c #864232", +".@ c #401F18", +"+@ c #592C21", +"@@ c #71372A", +"#@ c #813F30", +"$@ c #834031", +"%@ c #6D3528", +"&@ c #4E261D", +" ", +" ", +" ", +" ", +" . + @ # $ $ $ $ $ $ $ $ $ % & @ ", +" % * $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ = - ", +" # $ $ $ $ $ $ $ $ $ ; ; ; ; ; ; $ $ $ ; > $ $ $ $ $ $ $ $ $ . ", +" @ $ $ $ $ $ $ ; , ' ) ! ! ~ { { { { { { ' . . = $ $ $ $ $ $ $ $ $ $ $ , ", +" ] $ $ $ $ ^ % / ! ~ % ( _ : < [ } | | | 1 | 2 3 4 5 5 $ $ $ $ $ $ $ $ $ $ $ ", +" ] $ $ $ ; - 6 { 7 8 9 0 a b c d e e d d d d d f f f f f g h 4 i $ $ $ $ $ $ $ j ", +" = $ $ $ * ) k l m n f e e e e d d d d d f f f f f g g g g g o o o o p q $ $ $ $ > r ", +" $ $ $ , s t u v e e d d d d d f f f f f g g g g g g o o o o o w w w w w x q $ $ $ ' y ", +" $ $ z s A B d d d d d f f f f f g g g g g o o o o o w w w w w v v v v v c c C $ $ D E ", +" , $ $ ) F G d f f f f f g g g g g H I J K L M N O P w w v v v v v c c c c c Q R $ $ , S ", +" + $ $ { T U f f g g g g g o o o v V W N X Y Z ` N L .v c c c c c Q Q Q Q Q ..+.$ $ @.#. ", +" @ $ $ ~ $.%.g g g o o o o o w w &.*.N =.-.;.>.,.*.L '.).c Q Q Q Q Q ..........!.$ $ * ~. ", +" @ $ $ {.].P o o o w w w w w v v >.^.^./.c c c (._.L :./.Q ..........<.<.<.<.v [.$ $ @ }. ", +" @ $ $ , |.P w w w w v v v v v c 1.2.N 3.Q Q Q Q 4.L 2.-...<.<.<.<.<.5.5.5.5.v 6.$ $ 7.8. ", +" ' $ $ > 9.U v v v v c c c c c Q 0.a.b.0.........c.L ^.>.<.<.5.5.5.5.5.b b <.Q $ $ $ r d. ", +" $ $ $ ! e.Q c c c c Q Q Q Q Q u f.M g.<.<.<.h.i.N W j.5.5.5.b b b b b H ..k.$ $ $ l.m. ", +" $ $ $ ' n.o.Q Q Q Q ..........<.p.q.r.<.5.5.;.'.N s.t.b b b H H H H H u.Q v.$ $ ^ w. ", +" = $ $ % x.1 ........<.<.<.<.<.5.5.5.5.5.5.y.z.N :.A.H H H H H u.u.u.u.b ..$ $ $ % B. ", +" C.$ $ * r D.b <.<.<.<.5.5.5.5.5.b b b b E.F.^.N G.n u.u.u.u.u.n n H.n <.I.$ $ $ J.K. ", +" $ $ $ ~ L.U 5.5.5.5.5.b b b b b H H ).>.M.b.Z N.u.u.n n n n n H.H.H...O.$ $ ^ P. ", +" = $ $ D Q.R.S.b b b b H H H H H u.u.I T.N M U.n n n H.H.H.H.H.S.S.H V.$ $ $ r W. ", +" X.$ $ $ {.Y.h.H H H H H u.u.u.u.u.n Z.`.b. +.+H.H.H.S.S.S.S.S.++++5.@+$ ; > #+$+ ", +" $ $ $ = %+&+*+u.u.u.u.n n n n n H.=+-+X b.;+S.S.S.S.++++++++++H.>+$ $ $ ,+B. ", +" ~ $ $ $ ' '+R.n n n n n H.H.H.H.S.*+;.'.)+!+++++++++o.o.o.o.o.5.~+$ $ ; {+]+ ", +" $ $ $ ; ^+!+U H.H.H.H.S.S.S.S.S.++t./+(+++o.o.o.o.o._+_+_+u.:+$ $ $ <+B. ", +" ,+$ $ $ @ [+!+S.S.S.S.++++++++++o.o.!+}+o.o._+_+_+_+_+|+++b 1+$ $ $ 2+3+ ", +" $ $ $ $ ) 4+}+++++++++o.o.o.o.o.5+6+5+G _+|+|+|+|+|+_+u.7+$ $ $ . 8+ ", +" 2+$ $ $ * 9+R.|+o.o.o.o._+_+_+0+b.a+b+c+|+|+d+d+d+_+n e+$ $ $ ^ f+ ", +" g+$ $ $ % h+i+_+_+_+_+|+|+|+j+a+a+M >.d+d+).).).H.k+l+$ $ ; #.m+ ", +" $ $ $ $ / n+U |+|+|+|+d+d+d+-.Y o+p+).).).q+S.u.r+$ $ ; s+8+ ", +" r $ $ $ $ t+u+r.d+d+d+).).).).t.v+q+q+q+q+++H.w+$ $ $ 7.x+ ", +" / $ $ $ $ y+z+| ).).).q+q+q+q+q+a a ).n u.A+$ $ ^ , B+C+ ", +" * $ $ $ ; D+E+E.a *+r.r.P %.a q+o.H S.F+$ $ ; D G+H+ ", +" * $ $ $ $ { I+J+d+|+).q+).|+S.H.K+L+$ $ $ = M+8+ ", +" @.$ $ $ ^ N+O+P+Q+).++++++R+S+$ $ $ $ > w.T+ ", +" @.$ $ $ $ , ' U+V+W+X+F+$ $ $ $ $ > Y+Z+ ", +" % $ $ $ $ $ $ $ $ $ $ $ $ $ $ % }.`+ ", +" {+$ $ $ $ $ $ $ $ $ $ $ * @8+.@ ", +" 2+$ $ $ $ $ $ ^ % s #++@ ", +" @@#@{ { $@%@Z+&@ ", +" ", +" ", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/skin.xpm b/gui/mplayer/pixmaps/skin.xpm new file mode 100644 index 0000000000..e71f1cae02 --- /dev/null +++ b/gui/mplayer/pixmaps/skin.xpm @@ -0,0 +1,181 @@ +/* XPM */ +static const char * skin_xpm[] = { +"16 16 162 2", +" c None", +". c #DBA97F", +"+ c #C7A89B", +"@ c #E1DFDD", +"# c #BE9D76", +"$ c #A35019", +"% c #A8978C", +"& c #D3D2D0", +"* c #DAD8D7", +"= c #D9D6D4", +"- c #BEBCB9", +"; c #BCAA95", +"> c #D78236", +", c #844A36", +"' c #DADFE4", +") c #E0E8E8", +"! c #C8D2D3", +"~ c #B5B7B7", +"{ c #DCDAD7", +"] c #BBB7B0", +"^ c #CCCACB", +"/ c #D2D0D3", +"( c #EDAF6C", +"_ c #953600", +": c #28257E", +"< c #A1B4F3", +"[ c #F5B7AC", +"} c #F4A296", +"| c #E5E7EB", +"1 c #ABB1B6", +"2 c #C8C4C0", +"3 c #CECBC5", +"4 c #F7F7F9", +"5 c #53548A", +"6 c #967265", +"7 c #DE741B", +"8 c #6F3937", +"9 c #4155C2", +"0 c #A8BAEB", +"a c #E65138", +"b c #DD0C00", +"c c #F1D2D5", +"d c #BECFD8", +"e c #B5BABE", +"f c #C2BEB9", +"g c #E9E7E5", +"h c #FFFFFF", +"i c #F9FBFF", +"j c #71667C", +"k c #E49146", +"l c #9D3501", +"m c #BFB7BD", +"n c #E5F6FE", +"o c #DCF0FF", +"p c #D7B2BD", +"q c #D18F98", +"r c #D0DCF6", +"s c #D8E5F1", +"t c #9DA4A7", +"u c #CECBC6", +"v c #EAE8E6", +"w c #9F9EA3", +"x c #444349", +"y c #C3C4C7", +"z c #E7BD90", +"A c #CD5A0B", +"B c #946454", +"C c #E7F9FF", +"D c #DFF1FF", +"E c #D8EAFF", +"F c #AFE5E5", +"G c #3ACB52", +"H c #6BCE85", +"I c #DBE7FB", +"J c #9DA2A9", +"K c #B9B4AF", +"L c #636167", +"M c #000004", +"N c #8B7E74", +"O c #EF9853", +"P c #913710", +"Q c #CDD6DF", +"R c #E1F5FF", +"S c #D2E9FF", +"T c #CFE6FF", +"U c #97D6CA", +"V c #03B200", +"W c #44C54A", +"X c #CCDAEF", +"Y c #9DA5AF", +"Z c #BBB6B1", +"` c #E7E7E8", +" . c #BBC1CC", +".. c #D3B59C", +"+. c #AF4E1E", +"@. c #B1A3A5", +"#. c #E4FBFF", +"$. c #D4ECFF", +"%. c #CAE5FF", +"&. c #C5E1F2", +"*. c #B7DAE7", +"=. c #86CCC7", +"-. c #B3E3E5", +";. c #A7B6C5", +">. c #BAC1C8", +",. c #BFBBB6", +"'. c #E6E5E3", +"). c #F5E9CC", +"!. c #BC9877", +"~. c #987977", +"{. c #B3BDC4", +"]. c #A8AEB3", +"^. c #B0C0D0", +"/. c #BCDAF3", +"(. c #DCD443", +"_. c #E5D620", +":. c #BFDCF1", +"<. c #C1D6F7", +"[. c #A7B0B9", +"}. c #C7C6C3", +"|. c #ABA194", +"1. c #CDA447", +"2. c #8E4B00", +"3. c #958685", +"4. c #D9DADA", +"5. c #E1E0E0", +"6. c #A4A5A7", +"7. c #8FA6BC", +"8. c #D1CD44", +"9. c #F3E538", +"0. c #C6D9DB", +"a. c #9DABBC", +"b. c #B0A08A", +"c. c #9C7A32", +"d. c #6A380E", +"e. c #989DA6", +"f. c #8E9296", +"g. c #8D9196", +"h. c #92A7B9", +"i. c #AFD5FC", +"j. c #BFDFF2", +"k. c #B0C3CA", +"l. c #A1ADB7", +"m. c #C9C1B8", +"n. c #8D6841", +"o. c #6C4C2C", +"p. c #7E7267", +"q. c #A1ACB7", +"r. c #BFD5EA", +"s. c #BEDBF5", +"t. c #BEDDFA", +"u. c #AFC6DA", +"v. c #97A5B3", +"w. c #BDC4C9", +"x. c #D8D5D0", +"y. c #BDB7AF", +"z. c #DDDBD8", +"A. c #BDC2C7", +"B. c #A0A7AD", +"C. c #9DA6AD", +"D. c #A0A9B1", +"E. c #C2C6CB", +" ", +" . + ", +" @ # $ % & * ", +" = - ; > , ' ) ! ~ ", +" { ] ^ / ( _ : < [ } | 1 ", +" 2 3 4 5 6 7 8 9 0 a b c d e ", +" f g h i j k l m n o p q r s t ", +"u v w x y z A B C D E F G H I J ", +"K h L M N O P Q R S T U V W X Y ", +"Z h ` ...+.@.#.$.%.&.*.=.-.;.>.", +",.'.h ).!.~.{.].^./.(._.:.<.[. ", +" }.|.1.2.3.4.5.6.7.8.9.0.a. ", +" b.c.d.e.f.g.h.i.j.k.l. ", +" m.n.o.p.q.r.s.t.u.v.w. ", +" x.y.z. A.B.C.D.E. ", +" "}; diff --git a/gui/mplayer/pixmaps/sound.xpm b/gui/mplayer/pixmaps/sound.xpm new file mode 100644 index 0000000000..78cfb3367e --- /dev/null +++ b/gui/mplayer/pixmaps/sound.xpm @@ -0,0 +1,140 @@ +/* XPM */ +static const char * sound_xpm[] = { +"16 16 121 2", +" c None", +". c #939CA9", +"+ c #89919F", +"@ c #A6AEBA", +"# c #99A0AC", +"$ c #5B6576", +"% c #1A202C", +"& c #1E283A", +"* c #141F32", +"= c #9CA3AF", +"- c #626C7C", +"; c #505866", +"> c #1A2029", +", c #1D232B", +"' c #1F2838", +") c #263248", +"! c #182233", +"~ c #B9BFC8", +"{ c #6D7585", +"] c #181E26", +"^ c #1D222B", +"/ c #1D232C", +"( c #26334B", +"_ c #253149", +": c #A0AAB8", +"< c #888F9B", +"[ c #131823", +"} c #1C212A", +"| c #1F242B", +"1 c #1F242A", +"2 c #233047", +"3 c #293854", +"4 c #4F5E77", +"5 c #525C6A", +"6 c #282F3B", +"7 c #1A212A", +"8 c #1E232B", +"9 c #1F232A", +"0 c #273040", +"a c #4A5B77", +"b c #293650", +"c c #2F3F5E", +"d c #53637E", +"e c #151C28", +"f c #1C2129", +"g c #20242C", +"h c #232830", +"i c #7485A0", +"j c #697C9B", +"k c #43536E", +"l c #314260", +"m c #6F84A1", +"n c #676E79", +"o c #222B3B", +"p c #222935", +"q c #20252D", +"r c #4B5B74", +"s c #879AB3", +"t c #596E92", +"u c #354259", +"v c #394A69", +"w c #687EA2", +"x c #4A5872", +"y c #364153", +"z c #303B51", +"A c #344054", +"B c #7F8DA4", +"C c #5C7296", +"D c #3E506F", +"E c #4D5A6E", +"F c #63799A", +"G c #323A46", +"H c #445573", +"I c #36445C", +"J c #36445B", +"K c #37455D", +"L c #425169", +"M c #45526A", +"N c #27354D", +"O c #1D2433", +"P c #A6B6CA", +"Q c #5C6F8F", +"R c #242B38", +"S c #323F56", +"T c #3F4F68", +"U c #44536C", +"V c #53617A", +"W c #6C7A92", +"X c #B0BBCC", +"Y c #9EA7B8", +"Z c #C5CDDA", +"` c #6E809B", +" . c #212935", +".. c #151A23", +"+. c #293344", +"@. c #44526A", +"#. c #617087", +"$. c #8C98A9", +"%. c #B0B8C4", +"&. c #C9CED7", +"*. c #C5CCD8", +"=. c #79879E", +"-. c #2B3648", +";. c #121824", +">. c #1F232C", +",. c #626F87", +"'. c #4D5B74", +"). c #C0C6D1", +"!. c #C7CBD0", +"~. c #BAC3D0", +"{. c #8592A6", +"]. c #222830", +"^. c #7B8495", +"/. c #778195", +"(. c #B2B8C2", +"_. c #B3B8BF", +":. c #49535F", +"<. c #1D2229", +"[. c #252B30", +"}. c #1F252C", +"|. c #1A1C20", +" ", +" . + @ # ", +" $ % & * = - ", +" ; > , ' ) ! ~ ", +" { ] ^ , / ( _ : ", +" < [ } | 1 ' 2 3 4 5 ", +" 6 7 8 9 0 a b c d ", +" 6 e f g h i j k l m ", +" n o p q r s t u v w x ", +" y z A A B C D E F G H ", +" I J K L M N O P Q R S ", +" T U V W X Y Z ` ...+. ", +" @.#.$.%.&.*.=.-.;.>. ", +" ,.'.).!.~.{.]. ", +" ^./.(._.:.<. ", +" [.}.|. "}; diff --git a/gui/mplayer/pixmaps/stop.xpm b/gui/mplayer/pixmaps/stop.xpm new file mode 100644 index 0000000000..da0dfb459f --- /dev/null +++ b/gui/mplayer/pixmaps/stop.xpm @@ -0,0 +1,254 @@ +/* XPM */ +static const char * stop_xpm[] = { +"48 48 203 2", +" c None", +". c #5A5A5A", +"+ c #575757", +"@ c #545454", +"# c #535353", +"$ c #565656", +"% c #898989", +"& c #6B6B6B", +"* c #D5D5D5", +"= c #FFFFFF", +"- c #FEFEFE", +"; c #FDFDFD", +"> c #E4E4E4", +", c #5B5B5B", +"' c #7A7A7A", +") c #666666", +"! c #E6E6E6", +"~ c #FCFCFC", +"{ c #E3E3E3", +"] c #5E5E5E", +"^ c #7B7B7B", +"/ c #6C6C6C", +"( c #F8F8F8", +"_ c #F7F7F7", +": c #F6F6F6", +"< c #FBFBFB", +"[ c #EDEDED", +"} c #D8D8D8", +"| c #D3D3D3", +"1 c #DADADA", +"2 c #DEDEDE", +"3 c #E0E0E0", +"4 c #EAEAEA", +"5 c #FAFAFA", +"6 c #585858", +"7 c #787878", +"8 c #F5F5F5", +"9 c #BC9999", +"0 c #B40000", +"a c #D47E7E", +"b c #5C5C5C", +"c c #838383", +"d c #F4F4F4", +"e c #AF8181", +"f c #B30000", +"g c #D47F7F", +"h c #4F4F4F", +"i c #686868", +"j c #DFDFDF", +"k c #AD7D7D", +"l c #B10000", +"m c #B20000", +"n c #D28080", +"o c #808080", +"p c #6A6A6A", +"q c #B18383", +"r c #B00000", +"s c #D17777", +"t c #4E4E4E", +"u c #878787", +"v c #6F6F6F", +"w c #B38585", +"x c #AE0000", +"y c #AF0000", +"z c #D07C7C", +"A c #515151", +"B c #6E6E6E", +"C c #AF7F7F", +"D c #AC0000", +"E c #AD0000", +"F c #CE7B7B", +"G c #555555", +"H c #717171", +"I c #AA0000", +"J c #AB0000", +"K c #CD7171", +"L c #E1E1E1", +"M c #D7D7D7", +"N c #A80000", +"O c #A90000", +"P c #CD7878", +"Q c #F9F9F9", +"R c #353535", +"S c #D0D0D0", +"T c #B58282", +"U c #A70000", +"V c #CB7676", +"W c #DCDCDC", +"X c #3A3A3A", +"Y c #A50000", +"Z c #A60000", +"` c #CB7575", +" . c #F2F2F2", +".. c #454545", +"+. c #D4D4D4", +"@. c #B48080", +"#. c #A40000", +"$. c #CA7B7B", +"%. c #A10000", +"&. c #A20000", +"*. c #A30000", +"=. c #A00000", +"-. c #CC7777", +";. c #DFAAAA", +">. c #EDD0D0", +",. c #C46060", +"'. c #F1F1F1", +"). c #9E0000", +"!. c #9F0000", +"~. c #D59191", +"{. c #9D0000", +"]. c #9B0000", +"^. c #9C0000", +"/. c #990000", +"(. c #BB5757", +"_. c #9A0000", +":. c #C97777", +"<. c #ECD0D0", +"[. c #980000", +"}. c #BF6161", +"|. c #960000", +"1. c #970000", +"2. c #F0F0F0", +"3. c #940000", +"4. c #950000", +"5. c #920000", +"6. c #930000", +"7. c #C57777", +"8. c #910000", +"9. c #DAAAAA", +"0. c #C47777", +"a. c #B65757", +"b. c #B75757", +"c. c #D9D9D9", +"d. c #8F0000", +"e. c #900000", +"f. c #E9E9E9", +"g. c #AA4747", +"h. c #8D0000", +"i. c #8E0000", +"j. c #C16C6C", +"k. c #E2E2E2", +"l. c #A64444", +"m. c #8C0000", +"n. c #BC6363", +"o. c #EFEFEF", +"p. c #525252", +"q. c #DDDDDD", +"r. c #A54343", +"s. c #8A0000", +"t. c #8B0000", +"u. c #B14B4B", +"v. c #474747", +"w. c #444444", +"x. c #A84242", +"y. c #890000", +"z. c #B95E5E", +"A. c #4C4C4C", +"B. c #A34040", +"C. c #870000", +"D. c #880000", +"E. c #AF4B4B", +"F. c #343434", +"G. c #505050", +"H. c #A23E3E", +"I. c #850000", +"J. c #860000", +"K. c #AE4C4C", +"L. c #9F3D3D", +"M. c #840000", +"N. c #AD4A4A", +"O. c #323232", +"P. c #4D4D4D", +"Q. c #A23D3D", +"R. c #820000", +"S. c #830000", +"T. c #AC4949", +"U. c #9F3B3B", +"V. c #800000", +"W. c #810000", +"X. c #D2D2D2", +"Y. c #393939", +"Z. c #CACACA", +"`. c #A13B3B", +" + c #7F0000", +".+ c #A94545", +"++ c #A43B3B", +"@+ c #7D0000", +"#+ c #A53C3C", +"$+ c #BCBCBC", +"%+ c #333333", +"&+ c #BBBBBB", +"*+ c #C2C2C2", +"=+ c #303030", +"-+ c #A3A3A3", +";+ c #A8A8A8", +">+ c #A7A7A7", +",+ c #AFAFAF", +"'+ c #363636", +")+ c #464646", +"!+ c #272727", +"~+ c #2E2E2E", +"{+ c #2C2C2C", +" ", +" ", +" . + @ @ # # # # # # # # # # # # # # $ % ", +" & * = = - - - - - - - - ; ; ; ; ; ; ; > , ' ", +" ) ! = = - - - - - - - - ; ; ; ; ; ; ; ; ~ { ] ^ ", +" / ! = - - - ( _ _ _ _ : : : < < ; ; ; ; ~ ~ ~ ~ $ ^ ", +" ) = = - - ( [ } | | | 1 2 2 2 2 3 4 4 [ ~ 5 ~ ~ ~ { 6 7 ", +" ) = - - - 8 2 9 0 0 0 0 0 0 0 0 0 0 0 0 0 a ~ ~ ~ ~ ~ < b c ", +" / = - - - d 3 e f f f f 0 0 0 0 0 0 0 0 0 0 0 g ~ ~ ~ < < < h c ", +" i = - - - 8 j k l l l l l m m m m m m m m m m m m n < < < < < < 6 o ", +" p - - - - 8 * q r r r r r r r r r r r r r r r r r r l s < < < < < < t u ", +" v - - - - d 1 w x x x x x x x x x x x y y y y y y y y y y z < < < < 5 5 A o ", +" B - - - - 8 1 C D D D D D D D D E E E E E E E E E E E E E E E F < 5 5 5 5 5 G u ", +" H - - - - 8 * C I J J J J J J J J J J J J J J J J D D D D D D D D K 5 5 5 5 5 L t u ", +" B - - - - d M w N O O O O O O O O O O O O O O O O O O O O O I I I I I P 5 5 5 5 5 Q h o ", +" R - - - - 8 S T U U U U U U N N N N N N N N N N N N N N N N N N N N N N N V 5 5 Q Q Q W X ", +" # - - - ( M T Y Y Y Y Y Y Y Y Y Y Y Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z U U U U ` Q Q Q Q ... ", +" # - - 5 +.@.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.Y Y Y Y Y Y Y Y Y $.Q Q Q ... ", +" # - - : } %.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.#.#.- Q Q ... ", +" # - ; : } =.=.=.=.=.=.-.= = ;.=.= = = = = %.-.= = = -.%.%.= = = >.,.%.%.%.%.&.&.- Q Q '... ", +" # ; ; : } ).).).).).!.= !.!.~.!.!.!.= !.!.!.= !.!.!.= =.=.= =.=.-.>.=.=.=.=.=.=.- Q ( '... ", +" # ; ; : } {.{.{.{.{.{.= {.{.{.{.{.{.= {.{.{.= {.{.).= ).).= ).).).= ).).).).).).- ( ( '... ", +" # ; ; : } ].].].].].].= ].^.^.^.^.^.= ^.^.^.= ^.^.^.= ^.^.= ^.^.^.= ^.^.^.{.{.{.- ( ( '... ", +" # ; ; : } /./././././.(.= = (././._.= _._._.= _._._.= _._.= ].].:.<.].].].].].].- ( ( '... ", +" # ; ; 8 M [.[.[.[.[.[.[.[.[.= [.[.[.= [.[./.= /././.= /./.= = = <.}././././././.- ( ( '... ", +" # ; ~ 8 M |.|.|.|.|.|.|.|.|.= |.|.|.= |.|.1.= 1.1.1.= 1.1.= 1.1.1.[.[.[.[.[.[.[.- ( ( 2... ", +" # ~ ~ 8 M 3.3.3.3.3.3.3.3.4.= 4.4.4.= 4.4.4.= 4.4.4.= 4.4.= 4.4.4.4.4.4.4.|.|.|.- ( _ 2... ", +" # ~ ~ 8 M 5.5.5.6.6.6.7.6.6.= 6.6.6.= 6.6.6.= 6.6.3.= 3.3.= 3.3.3.3.3.3.3.3.3.3.- _ _ 2... ", +" # ~ ~ : M 8.8.8.8.8.8.9.= = 0.8.8.8.= 8.8.8.a.= = = b.5.5.= 5.5.5.5.5.5.5.5.5.5.- _ _ 2... ", +" # ~ ~ ~ c.d.d.d.d.d.d.d.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.8.8.8.8.8.8.8.8.- _ _ 2... ", +" # ~ ~ < f.g.h.h.h.h.h.h.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.i.d.d.d.d.d.d.d.d.d.d.d.j.- _ _ 2... ", +" # ~ < < Q k.l.m.m.m.m.m.m.m.m.m.m.m.m.m.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.n.~ _ _ _ o... ", +" p.< < < < < q.r.s.s.s.s.s.s.s.s.t.t.t.t.t.t.t.t.t.t.t.t.t.t.t.t.m.m.m.m.m.u.; ; _ _ : o.v. ", +" w.< < < < < < q.x.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.z.- ; _ : : : 2... ", +" A.< < < < 5 ( W B.C.C.C.C.C.C.C.C.C.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.E.- ; _ : : : | F. ", +" G.< 5 5 5 5 5 W H.I.I.I.I.I.I.I.I.I.I.I.I.J.J.J.J.J.J.J.J.J.J.J.K.- ; : : : : 4 X ", +" t L 5 5 5 5 5 2 L.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.I.I.N.- ~ : : : : 4 O. ", +" P.5 5 5 5 5 Q W Q.R.R.R.R.R.R.R.R.R.R.R.R.R.R.S.S.S.S.S.T.- - : : : : | O. ", +" A.L 5 5 Q Q Q 1 U.V.V.V.V.V.W.W.W.W.W.W.W.W.W.W.W.W.g.- - : : : : X.Y. ", +" A.Z.Q Q Q Q Q q.`. + + + + + + + + + + + + + + +.+- - : : : : X.O. ", +" P.3 Q Q Q Q Q 4 ++@+@+@+@+@+@+@+@+@+@+@+@+@+#+- - : : : : $+%+ ", +" h &+Q Q Q ( ( ( ; ; ; ; ; ; ; ; ; ; ; ; ; ; ~ : : : : *+=+ ", +" t &+( ( ( ( ( ( ( ( _ _ _ _ _ _ _ _ _ : : : : : : *+F. ", +" G -+( ( ( ( ( ( _ _ _ _ _ _ _ _ : : : : : : : ;+%+ ", +" . >+'.'.'.'.2.2.2.2.2.2.2.2.o.o.o.o.o.o.2.,+'+ ", +" )+=+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+~+{+ ", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/stop2.xpm b/gui/mplayer/pixmaps/stop2.xpm new file mode 100644 index 0000000000..c41476012b --- /dev/null +++ b/gui/mplayer/pixmaps/stop2.xpm @@ -0,0 +1,48 @@ +/* XPM */ +static const char * stop2_xpm[] = { +"16 16 29 1", +" c None", +". c #000000", +"+ c #FFFFFF", +"@ c #737372", +"# c #848483", +"$ c #888887", +"% c #7E7E7D", +"& c #A8A7A6", +"* c #A4A4A3", +"= c #A6A5A4", +"- c #B5B4B3", +"; c #858483", +"> c #AAA9A7", +", c #C0BFBE", +"' c #91908E", +") c #AFAEAC", +"! c #CACAC8", +"~ c #A6A5A2", +"{ c #BBBAB7", +"] c #D4D3D2", +"^ c #AEADA9", +"/ c #BFBDBA", +"( c #D7D5D3", +"_ c #B2B0AD", +": c #C3C1BE", +"< c #D9D8D6", +"[ c #B5B3B0", +"} c #D1CFCC", +"| c #DEDDDB", +" ", +" ", +" .............+ ", +" .@#$$$$$$$$$.+ ", +" .%&*********.+ ", +" .%=---------.+ ", +" .;>,,,,,,,,,.+ ", +" .')!!!!!!!!!.+ ", +" .')!!!!!!!!!.+ ", +" .~{]]]]]]]]].+ ", +" .~{]]]]]]]]].+ ", +" .^/(((((((((.+ ", +" ._:<<<<<<<<<.+ ", +" .[}|||||||||.+ ", +" .............+ ", +" +++++++++++++ "}; diff --git a/gui/mplayer/pixmaps/sub.xpm b/gui/mplayer/pixmaps/sub.xpm new file mode 100644 index 0000000000..dedcbe5f79 --- /dev/null +++ b/gui/mplayer/pixmaps/sub.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static const char * sub_xpm[] = { +"16 16 2 1", +" c None", +". c #000000", +" ", +" ", +" ", +" ", +" ... . . ... ", +". . . . . ", +". . . . . ", +" .. . . ... ", +" . . . . . ", +" . . . . . ", +"... ... ... ", +" ", +" ", +" ", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/title.xpm b/gui/mplayer/pixmaps/title.xpm new file mode 100644 index 0000000000..1923389d59 --- /dev/null +++ b/gui/mplayer/pixmaps/title.xpm @@ -0,0 +1,23 @@ +/* XPM */ +static const char * title_xpm[] = { +"16 16 4 1", +" c None", +". c #000000", +"+ c #CD0909", +"@ c #FFFFFF", +" .. ", +" .++. ", +".++++. ", +".++++. . . ", +" .++. .@. .@. ", +" .. .@@@..@@@.", +" .@. .@. ", +" . . ", +" .. ", +" .++. ", +".++++. ", +".++++. . . ", +" .++. .@. .@. ", +" .. .@@@..@@@.", +" .@. .@. ", +" . . "}; diff --git a/gui/mplayer/pixmaps/tongue.xpm b/gui/mplayer/pixmaps/tongue.xpm new file mode 100644 index 0000000000..1597855527 --- /dev/null +++ b/gui/mplayer/pixmaps/tongue.xpm @@ -0,0 +1,169 @@ +/* XPM */ +static const char * tongue_xpm[] = { +"16 16 150 2", +" c None", +". c #FC151B", +"+ c #F31C35", +"@ c #FD4344", +"# c #FA8C99", +"$ c #E9080F", +"% c #DDAFA4", +"& c #FDD8E0", +"* c #F33A41", +"= c #F00807", +"- c #E6DFE0", +"; c #ECF6F4", +"> c #E0081D", +", c #F10705", +"' c #E4080E", +") c #EE0512", +"! c #F80C0B", +"~ c #F70D0A", +"{ c #EF1510", +"] c #E60F0D", +"^ c #DC4248", +"/ c #E9383B", +"( c #E91E18", +"_ c #F48D94", +": c #F3E2DA", +"< c #E92B32", +"[ c #EE0B15", +"} c #F1726F", +"| c #FC7680", +"1 c #EE0409", +"2 c #F10306", +"3 c #DE5154", +"4 c #7F0401", +"5 c #170009", +"6 c #535455", +"7 c #DCD4D3", +"8 c #F4F9F7", +"9 c #EBEBEA", +"0 c #EFFEFF", +"a c #FEF1FA", +"b c #F5CBCB", +"c c #F4090A", +"d c #E91F21", +"e c #FEA7AB", +"f c #EA0314", +"g c #0A0203", +"h c #430002", +"i c #CC090F", +"j c #F30407", +"k c #390414", +"l c #110501", +"m c #4D3F3F", +"n c #D60D16", +"o c #E74746", +"p c #850702", +"q c #E60304", +"r c #DC090B", +"s c #E91B29", +"t c #BD070E", +"u c #FA0202", +"v c #F76364", +"w c #B90601", +"x c #DA0307", +"y c #FE060E", +"z c #F30F09", +"A c #F12F34", +"B c #F80409", +"C c #A90405", +"D c #FD020B", +"E c #FABDB8", +"F c #E90700", +"G c #F6A9A6", +"H c #C71C09", +"I c #CA0819", +"J c #F80C06", +"K c #EF0A13", +"L c #FA8786", +"M c #E62B35", +"N c #C20502", +"O c #FA0C12", +"P c #E50100", +"Q c #E8323C", +"R c #F4B3A8", +"S c #7F0C03", +"T c #EF0908", +"U c #F50111", +"V c #F7192A", +"W c #F8AAA5", +"X c #DB0F11", +"Y c #F71514", +"Z c #DA6D61", +"` c #EF887F", +" . c #EE0704", +".. c #EDFCF3", +"+. c #F60212", +"@. c #EB0307", +"#. c #E9070B", +"$. c #E70E0B", +"%. c #F9DDD9", +"&. c #F6060E", +"*. c #B10A0E", +"=. c #F00A09", +"-. c #DE0600", +";. c #F31113", +">. c #FDDFE2", +",. c #DC0909", +"'. c #F10B12", +"). c #F90306", +"!. c #F9181F", +"~. c #FCD0D1", +"{. c #A9040F", +"]. c #EA4754", +"^. c #FA0908", +"/. c #F41821", +"(. c #FA757B", +"_. c #F10905", +":. c #EE090F", +"<. c #ED0D06", +"[. c #F7B7B3", +"}. c #F76869", +"|. c #850405", +"1. c #F80A07", +"2. c #EC0000", +"3. c #F6090B", +"4. c #F10208", +"5. c #EE080A", +"6. c #E90A0B", +"7. c #E82322", +"8. c #FBFAF8", +"9. c #E10B0B", +"0. c #D80507", +"a. c #E58874", +"b. c #E94149", +"c. c #ED0A04", +"d. c #EC0609", +"e. c #F8070B", +"f. c #F50A0E", +"g. c #DD423D", +"h. c #F47671", +"i. c #7C302B", +"j. c #E41D24", +"k. c #F80C08", +"l. c #EE0A0E", +"m. c #ED070A", +"n. c #FA050E", +"o. c #A52B2E", +"p. c #E96D74", +"q. c #FB0015", +"r. c #F40517", +"s. c #B6787D", +" . + @ # ", +" $ % & * = - ; ", +" > , ' ) ! ~ { ] ^ ", +" / ( _ : < [ } | 1 2 ", +" 3 4 5 6 7 8 9 0 a b c d ", +" e f g h i j k l m n o p q r ", +" s t u v w x y z A B C D ", +" E F G H I J K L M N O ", +" P Q R S T U V W X Y Z ", +" ` ...+.@.#.$.%.&.*.=. ", +" -.;.>.,.'.).!.~.{.&.]. ", +" ^./.(._.:.<.[.}.|.1. ", +" 2.3.4.5.6.7.8.9.0.a. ", +" b.c.d.e.f.g.h.i. ", +" j.k.l.m.n.o. ", +" p.q.r.s. "}; diff --git a/gui/mplayer/pixmaps/tonguebla.xpm b/gui/mplayer/pixmaps/tonguebla.xpm new file mode 100644 index 0000000000..f70db0b78b --- /dev/null +++ b/gui/mplayer/pixmaps/tonguebla.xpm @@ -0,0 +1,156 @@ +/* XPM */ +static const char * tonguebla_xpm[] = { +"16 16 137 2", +" c None", +". c #FC151B", +"+ c #F31C35", +"@ c #FD4344", +"# c #FA8C99", +"$ c #E9080F", +"% c #DDAFA4", +"& c #FDD8E0", +"* c #F33A41", +"= c #F00807", +"- c #E6DFE0", +"; c #ECF6F4", +"> c #E0081D", +", c #F10705", +"' c #E4080E", +") c #EE0512", +"! c #F80C0B", +"~ c #F70D0A", +"{ c #EF1510", +"] c #E60F0D", +"^ c #DC4248", +"/ c #E9383B", +"( c #E91E18", +"_ c #F48D94", +": c #F3E2DA", +"< c #E92B32", +"[ c #EE0B15", +"} c #F1726F", +"| c #FC7680", +"1 c #EE0409", +"2 c #F10306", +"3 c #DE5154", +"4 c #7F0401", +"5 c #170009", +"6 c #535455", +"7 c #DCD4D3", +"8 c #F4F9F7", +"9 c #EBEBEA", +"0 c #EFFEFF", +"a c #FEF1FA", +"b c #F5CBCB", +"c c #F4090A", +"d c #E91F21", +"e c #FEA7AB", +"f c #EA0314", +"g c #0A0203", +"h c #430002", +"i c #CC090F", +"j c #F30407", +"k c #390414", +"l c #110501", +"m c #4D3F3F", +"n c #D60D16", +"o c #E74746", +"p c #850702", +"q c #E60304", +"r c #DC090B", +"s c #E91B29", +"t c #BD070E", +"u c #FA0202", +"v c #F76364", +"w c #B90601", +"x c #DA0307", +"y c #FE060E", +"z c #F30F09", +"A c #F12F34", +"B c #F80409", +"C c #A90405", +"D c #FD020B", +"E c #FABDB8", +"F c #E90700", +"G c #F6A9A6", +"H c #C71C09", +"I c #CA0819", +"J c #F80C06", +"K c #EF0A13", +"L c #FA8786", +"M c #E62B35", +"N c #C20502", +"O c #FA0C12", +"P c #E50100", +"Q c #E8323C", +"R c #F4B3A8", +"S c #7F0C03", +"T c #EF0908", +"U c #F50111", +"V c #F7192A", +"W c #F8AAA5", +"X c #DB0F11", +"Y c #F71514", +"Z c #DA6D61", +"` c #EF887F", +" . c #EE0704", +".. c #EDFCF3", +"+. c #F60212", +"@. c #EB0307", +"#. c #E9070B", +"$. c #E70E0B", +"%. c #F9DDD9", +"&. c #F6060E", +"*. c #B10A0E", +"=. c #F00A09", +"-. c #DE0600", +";. c #F31113", +">. c #FDDFE2", +",. c #DC0909", +"'. c #F10B12", +"). c #F90306", +"!. c #F9181F", +"~. c #FCD0D1", +"{. c #A9040F", +"]. c #EA4754", +"^. c #FA0908", +"/. c #F41821", +"(. c #000000", +"_. c #EE090F", +":. c #ED0D06", +"<. c #F76869", +"[. c #850405", +"}. c #F80A07", +"|. c #EC0000", +"1. c #F6090B", +"2. c #EE080A", +"3. c #E82322", +"4. c #E10B0B", +"5. c #D80507", +"6. c #E58874", +"7. c #E94149", +"8. c #ED0A04", +"9. c #F50A0E", +"0. c #DD423D", +"a. c #7C302B", +"b. c #E41D24", +"c. c #EE0A0E", +"d. c #FA050E", +"e. c #F40517", +"f. c #B6787D", +" . + @ # ", +" $ % & * = - ; ", +" > , ' ) ! ~ { ] ^ ", +" / ( _ : < [ } | 1 2 ", +" 3 4 5 6 7 8 9 0 a b c d ", +" e f g h i j k l m n o p q r ", +" s t u v w x y z A B C D ", +" E F G H I J K L M N O ", +" P Q R S T U V W X Y Z ", +" ` ...+.@.#.$.%.&.*.=. ", +" -.;.>.,.'.).!.~.{.&.]. ", +" ^./.(.(._.:.(.<.[.}. (. ", +" |.1.(.2.(.3.(.4.5.6.(. (. ", +" 7.8.(.(.9.0.(.a. (. (. ", +" b.(.c.(.d.(. (.(.(. ", +" (.(.e.f.(.(.(. (. (. "}; diff --git a/gui/mplayer/pixmaps/up.xpm b/gui/mplayer/pixmaps/up.xpm new file mode 100644 index 0000000000..d9b85b823b --- /dev/null +++ b/gui/mplayer/pixmaps/up.xpm @@ -0,0 +1,112 @@ +/* XPM */ +static char * up_xpm[] = { +"16 16 93 2", +" c None", +". c #000000", +"+ c #BDCCCD", +"@ c #B6C6C8", +"# c #8F9DA8", +"$ c #9FB6C5", +"% c #90AEB9", +"& c #83A0A9", +"* c #6E8E9D", +"= c #83ABC2", +"- c #99BBD4", +"; c #8EB5D3", +"> c #75A6CC", +", c #6FA5C9", +"' c #86A9BE", +") c #87ACBB", +"! c #82A4B0", +"~ c #89A6B2", +"{ c #BFD7E5", +"] c #DDEDFB", +"^ c #DEEEFC", +"/ c #CCE5F5", +"( c #B4D9ED", +"_ c #84BEE6", +": c #9DBBCD", +"< c #E6F0F3", +"[ c #EEF5F9", +"} c #F1F7F8", +"| c #F8FAF9", +"1 c #FBFBFB", +"2 c #FAFBFC", +"3 c #DDEDF7", +"4 c #B8DAEF", +"5 c #7DB8E2", +"6 c #9AB9CB", +"7 c #EEF6F5", +"8 c #FAFCFD", +"9 c #F8FBFB", +"0 c #F5F9F7", +"a c #F4F7F7", +"b c #F3F7F8", +"c c #D0E6F3", +"d c #A7D1EC", +"e c #6BACDE", +"f c #9CB8CC", +"g c #EBF2F2", +"h c #F3F7F7", +"i c #EFF5F6", +"j c #ECF3F2", +"k c #E9F1F2", +"l c #E7F1F4", +"m c #BFDCEC", +"n c #94C4E5", +"o c #599ED6", +"p c #98B4CA", +"q c #D9E6E9", +"r c #DEEBEB", +"s c #DCEAEB", +"t c #DAE8E9", +"u c #D8E8E8", +"v c #D7E6EA", +"w c #A9CDE2", +"x c #7AB2D9", +"y c #448ECC", +"z c #8EB0C6", +"A c #BCD7DA", +"B c #C4DDDC", +"C c #C5DDDE", +"D c #C5DDDD", +"E c #C7DEDF", +"F c #C6DCE0", +"G c #94BFD7", +"H c #62A3CB", +"I c #3381C0", +"J c #8AABC4", +"K c #99BFC6", +"L c #A0C4CA", +"M c #A2C5CB", +"N c #A4C7CC", +"O c #A9CAD0", +"P c #A9C8D1", +"Q c #7AACC7", +"R c #4D91BC", +"S c #2573B1", +"T c #2B688D", +"U c #29648E", +"V c #2A6590", +"W c #2B6592", +"X c #2C6893", +"Y c #2D6594", +"Z c #205A91", +"` c #145190", +" . c #084A8D", +" . ", +" . . ", +" . . . . . . ", +" . . . ", +" . . ", +" + @ # # ", +" $ % & * = - ; > , ", +" ' ) ! ~ { ] ^ / ( _ ", +" : < [ } | 1 2 3 4 5 ", +" 6 7 8 9 0 a b c d e ", +" f g h i j k l m n o ", +" p q r s t u v w x y ", +" z A B C D E F G H I ", +" J K L M N O P Q R S ", +" T U V W X Y Z ` . ", +" "}; diff --git a/gui/mplayer/pixmaps/url.xpm b/gui/mplayer/pixmaps/url.xpm new file mode 100644 index 0000000000..fe47d25692 --- /dev/null +++ b/gui/mplayer/pixmaps/url.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static const char * url_xpm[] = { +"16 16 2 1", +" c None", +". c #000000", +" ", +" ", +" ", +" ", +" .. .. .. ", +" .. .. .. ", +" .. .. ", +" .. .. ", +" .. .. ", +" .. .. ", +" .. .. .. ", +" .. .. .. ", +" ", +" ", +" ", +" "}; diff --git a/gui/mplayer/pixmaps/vcd.xpm b/gui/mplayer/pixmaps/vcd.xpm new file mode 100644 index 0000000000..c547e5a736 --- /dev/null +++ b/gui/mplayer/pixmaps/vcd.xpm @@ -0,0 +1,179 @@ +/* XPM */ +static const char * vcd_xpm[] = { +"16 16 160 2", +" c None", +". c #CC9665", +"+ c #E1C0A3", +"@ c #EAD1BD", +"# c #E9D2BB", +"$ c #D7B597", +"% c #9D7C5C", +"& c #CE9E71", +"* c #F6E9DE", +"= c #FEF5EE", +"- c #FFFAF6", +"; c #FFFBF7", +"> c #FDF9F5", +", c #F2EBDD", +"' c #FBF5E4", +") c #F3E6D5", +"! c #B19D8A", +"~ c #D9AE89", +"{ c #FFEFE3", +"] c #FFF7F0", +"^ c #FFF6EE", +"/ c #FFF7EF", +"( c #FFF6EB", +"_ c #FFF1DD", +": c #FFF6E3", +"< c #FFFCE9", +"[ c #FFFFF9", +"} c #FFFFFA", +"| c #BEA98F", +"1 c #C08F68", +"2 c #FFD5B2", +"3 c #FFCAA8", +"4 c #FFE2CC", +"5 c #FFF3E9", +"6 c #FFF4E9", +"7 c #FFF3E1", +"8 c #FFF0D0", +"9 c #FFF9D9", +"0 c #FFFEE7", +"a c #FFFFF8", +"b c #FFF8DA", +"c c #B8A685", +"d c #F2B788", +"e c #FFB886", +"f c #FFBD8B", +"g c #FFCA9B", +"h c #FFE7CF", +"i c #FFF6EA", +"j c #FFF4DB", +"k c #FFF7CA", +"l c #FFFFE1", +"m c #FFFFF6", +"n c #FFFBEE", +"o c #FFF3D4", +"p c #FFF3BB", +"q c #DDC18E", +"r c #805A34", +"s c #FDB070", +"t c #FFAD6E", +"u c #FFBA7D", +"v c #FFC78B", +"w c #FFDAA3", +"x c #FFEAC8", +"y c #FFF6C9", +"z c #FFF8C4", +"A c #FFF8E8", +"B c #FFFAEB", +"C c #FFF0C7", +"D c #FFE8A8", +"E c #FFE188", +"F c #FFDC86", +"G c #B57841", +"H c #FFA656", +"I c #FFAC5F", +"J c #FFBC73", +"K c #FFCE89", +"L c #FFDA91", +"M c #FFE194", +"N c #B2A177", +"O c #C0B095", +"P c #FFE6BB", +"Q c #FFE9B3", +"R c #FFD76C", +"S c #FFCC3D", +"T c #ECBB2F", +"U c #966F30", +"V c #BC7D42", +"W c #FFAA52", +"X c #FFAF57", +"Y c #FFC673", +"Z c #FFDE8E", +"` c #FFE58D", +" . c #FCE5A0", +".. c #FFDA8B", +"+. c #FFD673", +"@. c #FFBA00", +"#. c #FEC417", +"$. c #A77D2E", +"%. c #A7713B", +"&. c #FFBF69", +"*. c #FFC570", +"=. c #FFDB87", +"-. c #FFF3A1", +";. c #FFF9BF", +">. c #FFE4BA", +",. c #DFC19C", +"'. c #ECC48A", +"). c #FFCA5D", +"!. c #FFCC45", +"~. c #FEC21C", +"{. c #A57927", +"]. c #FFCF7C", +"^. c #FFDE8B", +"/. c #FFFFCB", +"(. c #FFFFF4", +"_. c #FFECC6", +":. c #FFE4AA", +"<. c #FFE8BA", +"[. c #FFC21D", +"}. c #B58726", +"|. c #E5BC73", +"1. c #FFFAA9", +"2. c #FFFFCD", +"3. c #FFFEF1", +"4. c #FFF3D3", +"5. c #FFE69F", +"6. c #FFE9AB", +"7. c #FFF0C5", +"8. c #FFEBB4", +"9. c #FFD465", +"0. c #A98E59", +"a. c #FFF1B6", +"b. c #FFE59F", +"c. c #FFD86C", +"d. c #FFE08B", +"e. c #FFEAB1", +"f. c #FFE5A3", +"g. c #FFE7AB", +"h. c #CCB396", +"i. c #FFE5B4", +"j. c #FFECA5", +"k. c #FFDB70", +"l. c #FFCB3B", +"m. c #FFD871", +"n. c #FFE8AB", +"o. c #FFE6A4", +"p. c #FFE9AA", +"q. c #C1A46F", +"r. c #EABC6D", +"s. c #FFC924", +"t. c #FFDC6A", +"u. c #FFEFAD", +"v. c #FFEAA1", +"w. c #FFDA8E", +"x. c #A97B28", +"y. c #C08D27", +"z. c #C99C47", +"A. c #CEA762", +"B. c #C09A5A", +"C. c #855F2F", +" . + @ # $ % ", +" & * = - ; > , ' ) ! ", +" ~ { ] ^ / ( _ : < [ } | ", +" 1 2 3 4 5 6 7 8 9 0 a } b c ", +" d e f g h i j k l m n o p q ", +"r s t u v w x y z A B C D E F ", +"G H I J K L M N O P Q D R S T U ", +"V W X Y Z ` . ..+.R @.@.#.$.", +"%.&.*.=.-.;.>.,.'.).!.!.R ~.~.{.", +" ].^.-./.(._.:.<.^.[.!.!.R }. ", +" |.1.2.3.4.5.6.7.8.9.).!.!.R ", +" 0.a.[ 4.b.c.d.e.f.g.9.).!. ", +" h.i.j.k.l.m.n.o.p.p.9. ", +" q.r.!.s.t.u.v.w.p.p. ", +" x.y.z.A.B.C. ", +" "}; diff --git a/gui/mplayer/pixmaps/warning.xpm b/gui/mplayer/pixmaps/warning.xpm new file mode 100644 index 0000000000..4598541c48 --- /dev/null +++ b/gui/mplayer/pixmaps/warning.xpm @@ -0,0 +1,314 @@ +/* XPM */ +static char * warning_xpm[] = { +"48 48 263 2", +" c None", +". c #6D0000", +"+ c #700000", +"@ c #6F0000", +"# c #6C0000", +"$ c #610000", +"% c #4F0000", +"& c #660000", +"* c #5C0000", +"= c #6E0000", +"- c #6B0000", +"; c #650000", +"> c #6A0000", +", c #5D0000", +"' c #680000", +") c #5E0000", +"! c #681414", +"~ c #834F4F", +"{ c #987979", +"] c #A28181", +"^ c #934949", +"/ c #710202", +"( c #690000", +"_ c #600000", +": c #640000", +"< c #611212", +"[ c #8D6464", +"} c #C1C1C1", +"| c #D3D3D3", +"1 c #DFDFDF", +"2 c #E0E0E0", +"3 c #D3C6C6", +"4 c #A76E6E", +"5 c #811F1F", +"6 c #750909", +"7 c #7B4B4B", +"8 c #D9D9D9", +"9 c #E1E1E1", +"0 c #D7CBCB", +"a c #994F4F", +"b c #7E1919", +"c c #5F0000", +"d c #9C8888", +"e c #CDCDCD", +"f c #E2E2E2", +"g c #A26060", +"h c #812020", +"i c #720505", +"j c #530000", +"k c #641313", +"l c #ACA3A3", +"m c #DBDBDB", +"n c #E3E3E3", +"o c #C3A2A2", +"p c #7F1B1B", +"q c #661414", +"r c #ABA1A1", +"s c #D4D4D4", +"t c #E4E4E4", +"u c #AE7878", +"v c #791111", +"w c #620000", +"x c #927575", +"y c #E5E5E5", +"z c #A76868", +"A c #740808", +"B c #8C6565", +"C c #CCCCCC", +"D c #E6E6E6", +"E c #7E7E7E", +"F c #4C4C4C", +"G c #464646", +"H c #797979", +"I c #E7E7E7", +"J c #DBD0D0", +"K c #903B3B", +"L c #510000", +"M c #670000", +"N c #722929", +"O c #C0C0C0", +"P c #757575", +"Q c #686868", +"R c #505050", +"S c #282828", +"T c #090909", +"U c #676767", +"V c #E8E8E8", +"W c #D1BBBB", +"X c #801E1E", +"Y c #700101", +"Z c #B3A8A8", +"` c #D5D5D5", +" . c #4D4D4D", +".. c #545454", +"+. c #101010", +"@. c #000000", +"#. c #E9E9E9", +"$. c #B07A7A", +"%. c #7A1313", +"&. c #875454", +"*. c #5E5E5E", +"=. c #323232", +"-. c #EAEAEA", +";. c #EBEBEB", +">. c #8F3939", +",. c #720404", +"'. c #691515", +"). c #C8C8C8", +"!. c #5F5F5F", +"~. c #2A2A2A", +"{. c #D1D1D1", +"]. c #D3BDBD", +"^. c #5B0000", +"/. c #976C6C", +"(. c #D2D2D2", +"_. c #EDEDED", +":. c #565656", +"<. c #202020", +"[. c #ECECEC", +"}. c #994C4C", +"|. c #7B1414", +"1. c #C7C7C7", +"2. c #5C5C5C", +"3. c #D3BBBB", +"4. c #5A0000", +"5. c #926969", +"6. c #EEEEEE", +"7. c #858585", +"8. c #2C2C2C", +"9. c #353535", +"0. c #9C5252", +"a. c #730707", +"b. c #681515", +"c. c #C4C4C4", +"d. c #EFEFEF", +"e. c #989898", +"f. c #4E4E4E", +"g. c #010101", +"h. c #6A6A6A", +"i. c #D6BFBF", +"j. c #540000", +"k. c #630000", +"l. c #895656", +"m. c #F0F0F0", +"n. c #C5C5C5", +"o. c #585858", +"p. c #191919", +"q. c #BBBBBB", +"r. c #9D5353", +"s. c #B8ADAD", +"t. c #F1F1F1", +"u. c #F2F2F2", +"v. c #1B1B1B", +"w. c #CAA8A8", +"x. c #801D1D", +"y. c #3D0000", +"z. c #7A2D2D", +"A. c #CECECE", +"B. c #292929", +"C. c #060606", +"D. c #868686", +"E. c #842525", +"F. c #760B0B", +"G. c #996F6F", +"H. c #D6D6D6", +"I. c #F3F3F3", +"J. c #575757", +"K. c #535353", +"L. c #A45F5F", +"M. c #C3B8B8", +"N. c #F4F4F4", +"O. c #F5F5F5", +"P. c #C8A3A3", +"Q. c #3C0000", +"R. c #6A1515", +"S. c #F6F6F6", +"T. c #410000", +"U. c #7F4242", +"V. c #CFCFCF", +"W. c #707070", +"X. c #434343", +"Y. c #515151", +"Z. c #F7F7F7", +"`. c #A56161", +" + c #7C1717", +".+ c #4E0000", +"++ c #946C6C", +"@+ c #1A1A1A", +"#+ c #0C0C0C", +"$+ c #3B3B3B", +"%+ c #F8F8F8", +"&+ c #B17676", +"*+ c #4C0000", +"=+ c #A58787", +"-+ c #2D2D2D", +";+ c #F9F9F9", +">+ c #CCA9A9", +",+ c #580000", +"'+ c #8A5858", +")+ c #494949", +"!+ c #131313", +"~+ c #FAFAFA", +"{+ c #CDA9A9", +"]+ c #832222", +"^+ c #6C2929", +"/+ c #3C3C3C", +"(+ c #FBFBFB", +"_+ c #822121", +":+ c #560000", +"<+ c #B5A0A0", +"[+ c #FCFCFC", +"}+ c #903A3A", +"|+ c #4A0000", +"1+ c #AA7D7D", +"2+ c #FDFDFD", +"3+ c #DEC7C7", +"4+ c #9F5555", +"5+ c #7D1818", +"6+ c #3E0000", +"7+ c #AE7070", +"8+ c #ECE0E0", +"9+ c #FEFEFE", +"0+ c #CEA9A9", +"a+ c #994949", +"b+ c #862828", +"c+ c #770D0D", +"d+ c #170000", +"e+ c #8F3737", +"f+ c #BE8D8D", +"g+ c #DFC8C8", +"h+ c #FFFFFF", +"i+ c #EEE2E2", +"j+ c #D1AEAE", +"k+ c #A66363", +"l+ c #852626", +"m+ c #310000", +"n+ c #710303", +"o+ c #7C1616", +"p+ c #832323", +"q+ c #9E5353", +"r+ c #AC6D6D", +"s+ c #C59999", +"t+ c #D3B2B2", +"u+ c #D2B1B1", +"v+ c #EFE4E4", +"w+ c #A76464", +"x+ c #A86666", +"y+ c #320000", +"z+ c #520000", +"A+ c #730606", +"B+ c #780F0F", +"C+ c #7B1515", +"D+ c #7A1212", +"E+ c #250000", +"F+ c #450000", +"G+ c #260000", +"H+ c #290000", +"I+ c #340000", +"J+ c #280000", +"K+ c #370000", +"L+ c #590000", +"M+ c #4D0000", +"N+ c #360000", +" ", +" ", +" ", +" . + + + @ # ", +" # + + + + + + + + + $ % ", +" + + + + + + + + + + + @ & * ", +" = + + + + - ; & # + + + + + + > , ", +" @ + + + + ' ) ! ~ { ] ^ + / + + + ( ) _ ", +" @ + + + @ : < [ } | 1 2 2 3 4 5 6 + + ' ) _ ", +" @ + + + > * 7 } 8 9 9 9 9 9 9 9 0 a b / + ' ) c ", +" @ + + + > < d e 2 f f f f f f f f f f g h i + ' c j ", +" # + + + > k l m n n n n n n n n n n n n n o p + + ' _ ", +" - + + + # q r s t t t t t t t t t t t t t t t u v + + w c ", +" + + + @ _ x | y y y y y y y y y y y y y y y y y z A + . c w ", +" @ + + + w B C D D D D D D D E F G H D D D D D D I J K i + > ) L ", +" + + + M N O 2 I I I I I I P Q R S T U I I I V V V V W X Y + & w ", +" + + + . , Z ` V V V V V V V ...+.@.@.@.V #.#.#.#.#.#.#.$.%.+ + _ c ", +" ( + + + _ &.e #.#.#.#.#.#.#.#.*.=.@.@.@.@.-.-.-.-.-.-.-.-.;.>.,.+ M $ ", +" + + + ( '.).n -.-.-.-.-.-.-.s !.~.@.@.@.@.{.;.;.;.;.;.;.;.;.].h Y @ _ ^. ", +" ( + + + $ /.(.;.;.;.;.;.;.;.;._.:.<.@.@.@.@.[.[.[.[.[.[.[.[.[.[.}.|.+ > c ", +" + + + # ! 1.y [.[.[.[.[.[.[.[._.2.<.@.@.@.@._._._._._._._._._._.3.5 + + w 4. ", +" + + + ; 5.` _._._._._._._._.6.6.7.8.@.@.@.9.6.6.6.6.6.6.6.6.6.6.6.0.a.+ - ) ", +" = + + # b.c.#.6.6.6.6.6.6.d.d.d.d.e.f.g.@.@.h.d.d.d.d.d.d.d.d.d.d.d.i.p + + $ j. ", +" + + + k.l.{.d.d.d.d.d.m.m.m.m.m.m.n.o.p.@.@.q.m.m.m.m.m.m.m.m.m.m.m.m.r.a.+ - c ", +" ' + + . ) s.t m.m.m.t.t.t.t.t.t.t.t.u. .<.@.v.t.t.t.t.t.t.t.t.t.t.t.t.t.w.x.+ + $ y. ", +" = + + ' z.A.t.t.t.u.u.u.u.u.u.u.u.u.u.e.B.C.D.u.u.u.u.u.u.u.u.u.u.u.u.u.u.E.F.+ ; j ", +" + + + $ G.H.u.I.I.I.I.I.I.I.I.I.I.I.I.I.J.K.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.L.5 + - _ ", +" + + . c M.#.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.O.O.P.E./ + _ Q. ", +" & + + ( R.(.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.S.S.S.S.S.x.%.+ & T. ", +" ( + + ; U.1 S.S.S.S.S.S.S.S.S.S.S.S.S.V.W.X.Y.C S.S.S.S.S.S.S.S.Z.Z.Z.Z.Z.Z.Z.`. ++ > .+ ", +" ' + + ; ++6.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.U .@+#+$+Z.Z.Z.Z.Z.Z.%+%+%+%+%+%+%+%+%+&+b + # *+ ", +" M + + $ =+Z.%+%+%+%+%+%+%+%+%+%+%+%+%+-+p.@.@.@.%+%+%+%+%+;+;+;+;+;+;+;+;+;+;+>+5 + @ ,+ ", +" & + + $ '+;+;+;+;+;+;+;+;+;+;+;+;+;+;+)+!+@.@.$+;+;+;+~+~+~+~+~+~+~+~+~+~+~+~+{+]++ + $ ", +" & + + ; ^+O.~+~+~+~+~+~+~+~+~+~+~+~+~+V./+@.$+V.~+(+(+(+(+(+(+(+(+(+(+(+(+(+(+&+_++ + j ", +" * + + = :+<+~+(+(+(+(+(+(+(+(+(+(+(+(+(+(+(+(+[+[+[+[+[+[+[+[+[+[+[+[+[+[+[+[+}+%.+ > |+ ", +" + + + ' j 1+[+[+[+[+[+[+[+[+[+[+[+[+[+[+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+3+4+5++ + w 6+ ", +" M + + + = = p 7+8+2+2+2+2+2+2+2+2+2+9+9+9+9+9+9+9+9+9+9+9+9+9+9+9+9+0+a+b+c++ + # ) d+ ", +" > + + + + + + + e+f+g+9+9+9+9+h+h+h+h+h+h+h+h+h+h+h+h+h+h+i+j+k+X l+X 6 + + ' , m+ ", +" > + + + + + + + n+o+p+q+r+s+t+u+v+h+h+h+h+h+u+u+u+w+x+]+p+_+ +|./ + @ # _ c y+ ", +" z++ + + + + + + + + + A+B+5+C+C+C+C+C+C+C+C+C+C+ +D+A Y + + + # ; c $ j.E+ ", +" F+( + + + + + + + + + + + + + + + + + + + + + + @ # ' ; _ $ k.z+G+@. ", +" H+% _ + + + + + + + + + + + + + = # > & ; ; c _ k.c z+I+@. ", +" J+K+.+% |+L+$ $ $ $ $ $ c $ $ M+M+% y+N+@.@. ", +" @.@.@.@.@.@.@.@.@. ", +" ", +" ", +" ", +" "}; diff --git a/gui/mplayer/play.c b/gui/mplayer/play.c new file mode 100644 index 0000000000..dbec9d0e38 --- /dev/null +++ b/gui/mplayer/play.c @@ -0,0 +1,372 @@ + +#include <inttypes.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + +#include <unistd.h> +#include <signal.h> + +#include "wm/ws.h" +#include "wm/wsxdnd.h" +#include "../config.h" +#include "../help_mp.h" +#include "../libvo/x11_common.h" +#include "../libvo/video_out.h" +#include "../input/input.h" + +#include "app.h" + +#include "wm/wskeys.h" +#include "interface.h" + +#include "widgets.h" +#include "gmplayer.h" +#include "play.h" + +#include "skin/skin.h" +#include "skin/font.h" + +#include "stream/stream.h" + +extern float rel_seek_secs; +extern int abs_seek_pos; + +int mplGotoTheNext = 1; + +void mplFullScreen( void ) +{ + if ( guiIntfStruct.NoWindow && guiIntfStruct.Playing ) return; + + if ( ( guiIntfStruct.Playing )&&( appMPlayer.subWindow.isFullScreen ) ) + { + appMPlayer.subWindow.OldWidth=guiIntfStruct.MovieWidth; appMPlayer.subWindow.OldHeight=guiIntfStruct.MovieHeight; + switch ( appMPlayer.sub.x ) + { + case -1: appMPlayer.subWindow.OldX=( wsMaxX / 2 ) - ( appMPlayer.subWindow.OldWidth / 2 ) + wsOrgX; break; + case -2: appMPlayer.subWindow.OldX=wsMaxX - appMPlayer.subWindow.OldWidth + wsOrgX; break; + default: appMPlayer.subWindow.OldX=appMPlayer.sub.x; break; + } + switch ( appMPlayer.sub.y ) + { + case -1: appMPlayer.subWindow.OldY=( wsMaxY / 2 ) - ( appMPlayer.subWindow.OldHeight / 2 ) + wsOrgY; break; + case -2: appMPlayer.subWindow.OldY=wsMaxY - appMPlayer.subWindow.OldHeight + wsOrgY; break; + default: appMPlayer.subWindow.OldY=appMPlayer.sub.y; break; + } + } + if ( guiIntfStruct.Playing || gtkShowVideoWindow ) wsFullScreen( &appMPlayer.subWindow ); + fullscreen=vo_fs=appMPlayer.subWindow.isFullScreen; + wsSetLayer( wsDisplay,appMPlayer.mainWindow.WindowID,appMPlayer.subWindow.isFullScreen ); + if ( appMPlayer.menuIsPresent ) wsSetLayer( wsDisplay,appMPlayer.menuWindow.WindowID,appMPlayer.subWindow.isFullScreen ); + + if ( guiIntfStruct.Playing ) wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 ); + else wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.sub.R,appMPlayer.sub.G,appMPlayer.sub.B ); +} + +extern int mplSubRender; + +void mplEnd( void ) +{ + plItem * next; + + if ( !mplGotoTheNext && guiIntfStruct.Playing) { mplGotoTheNext=1; return; } + + if ( guiIntfStruct.Playing && (next=gtkSet( gtkGetNextPlItem,0,NULL )) && plLastPlayed != next ) + { + plLastPlayed=next; + guiSetDF( guiIntfStruct.Filename,next->path,next->name ); + guiIntfStruct.StreamType=STREAMTYPE_FILE; + guiIntfStruct.FilenameChanged=guiIntfStruct.NewPlay=1; + gfree( (void **)&guiIntfStruct.AudioFile ); + gfree( (void **)&guiIntfStruct.Subtitlename ); + } + else + { + if ( guiIntfStruct.FilenameChanged || guiIntfStruct.NewPlay ) return; + + guiIntfStruct.TimeSec=0; + guiIntfStruct.Position=0; + guiIntfStruct.AudioType=0; + guiIntfStruct.NoWindow=False; + +#ifdef USE_DVDREAD + guiIntfStruct.DVD.current_title=1; + guiIntfStruct.DVD.current_chapter=1; + guiIntfStruct.DVD.current_angle=1; +#endif + + if ( !appMPlayer.subWindow.isFullScreen && gtkShowVideoWindow) + { + wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height ); + wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y ); + } + else wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow ); + guiGetEvent( guiCEvent,guiSetStop ); + mplSubRender=1; + wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.sub.R,appMPlayer.sub.G,appMPlayer.sub.B ); + wsClearWindow( appMPlayer.subWindow ); + wsPostRedisplay( &appMPlayer.subWindow ); + } +} + +void mplPlay( void ) +{ + if ( ( !guiIntfStruct.Filename )|| + ( guiIntfStruct.Filename[0] == 0 )|| + ( guiIntfStruct.Playing == 1 ) ) return; + if ( guiIntfStruct.Playing == 2 ) { mplPause(); return; } + guiGetEvent( guiCEvent,(void *)guiSetPlay ); + mplSubRender=0; + wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 ); + wsClearWindow( appMPlayer.subWindow ); +} + +void mplPause( void ) +{ + if ( !guiIntfStruct.Playing ) return; + if ( guiIntfStruct.Playing == 1 ) + { + mp_cmd_t * cmd = calloc( 1,sizeof( *cmd ) ); + cmd->id=MP_CMD_PAUSE; + cmd->name=strdup("pause"); + mp_input_queue_cmd(cmd); + } else guiIntfStruct.Playing=1; +} + +void mplState( void ) +{ + if ( ( guiIntfStruct.Playing == 0 )||( guiIntfStruct.Playing == 2 ) ) + { + btnModify( evPlaySwitchToPause,btnReleased ); + btnModify( evPauseSwitchToPlay,btnDisabled ); + } + else + { + btnModify( evPlaySwitchToPause,btnDisabled ); + btnModify( evPauseSwitchToPlay,btnReleased ); + } +} + +float mplGetPosition( void ) +{ // return 0.0 ... 100.0 + return guiIntfStruct.Position; +} + +void mplRelSeek( float s ) +{ // -+s + rel_seek_secs=s; abs_seek_pos=0; +} + +void mplAbsSeek( float s ) +{ // 0.0 ... 100.0 + if ( guiIntfStruct.StreamType == STREAMTYPE_STREAM ) return; + rel_seek_secs=0.01*s; abs_seek_pos=3; +} + +listItems tmpList; + +void ChangeSkin( char * name ) +{ + int ret; + int prev = appMPlayer.menuIsPresent; + int bprev = appMPlayer.barIsPresent; + + mainVisible=0; + + appInitStruct( &tmpList ); + skinAppMPlayer=&tmpList; + fntFreeFont(); + ret=skinRead( name ); + + appInitStruct( &tmpList ); + skinAppMPlayer=&appMPlayer; + appInitStruct( &appMPlayer ); + if ( ret ) name=skinName; + if ( skinRead( name ) ) + { + mainVisible=1; + return; + } + +// --- reload menu window + + if ( prev && appMPlayer.menuIsPresent ) + { + if ( mplMenuDrawBuffer ) free( mplMenuDrawBuffer ); + if ( ( mplMenuDrawBuffer = calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL ) + { mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_NEMDB ); return; } + wsResizeWindow( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height ); + wsResizeImage( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height ); + wsSetShape( &appMPlayer.menuWindow,appMPlayer.menuBase.Mask.Image ); + wsVisibleWindow( &appMPlayer.menuWindow,wsHideWindow ); + } else { mplMenuInit(); } + +// --- reload sub window + if ( appMPlayer.sub.Bitmap.Image ) wsResizeImage( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Width,appMPlayer.sub.Bitmap.Height ); + if ( ( !appMPlayer.subWindow.isFullScreen )&&( !guiIntfStruct.Playing ) ) + { + wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height ); + wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y ); + } + if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize ); + if ( !guiIntfStruct.Playing ) + { + mplSubRender=1; + wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.sub.R,appMPlayer.sub.G,appMPlayer.sub.B ); + wsClearWindow( appMPlayer.subWindow ); + wsPostRedisplay( &appMPlayer.subWindow ); + } + +// --- reload play bar + if ( bprev ) wsDestroyWindow( &appMPlayer.barWindow ); + mplPBInit(); + +// --- reload main window + if ( mplDrawBuffer ) free( mplDrawBuffer ); + if ( ( mplDrawBuffer = calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL ) + { mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_NEMDB ); return; } + + wsDestroyWindow( &appMPlayer.mainWindow ); + + wsCreateWindow( &appMPlayer.mainWindow, + appMPlayer.main.x,appMPlayer.main.y,appMPlayer.main.width,appMPlayer.main.height, + wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsShowFrame|wsMaxSize|wsHideWindow,"MPlayer" ); + wsCreateImage( &appMPlayer.mainWindow,appMPlayer.main.Bitmap.Width,appMPlayer.main.Bitmap.Height ); + wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image ); + wsSetIcon( wsDisplay,appMPlayer.mainWindow.WindowID,guiIcon,guiIconMask ); + + appMPlayer.mainWindow.ReDraw=(void *)mplMainDraw; + appMPlayer.mainWindow.MouseHandler=mplMainMouseHandle; + appMPlayer.mainWindow.KeyHandler=mplMainKeyHandle; + appMPlayer.mainWindow.DandDHandler=mplDandDHandler; + + wsXDNDMakeAwareness( &appMPlayer.mainWindow ); + if ( !appMPlayer.mainDecoration ) wsWindowDecoration( &appMPlayer.mainWindow,0 ); + wsVisibleWindow( &appMPlayer.mainWindow,wsShowWindow ); + mainVisible=1; +// --- + + btnModify( evSetVolume,guiIntfStruct.Volume ); + btnModify( evSetBalance,guiIntfStruct.Balance ); + btnModify( evSetMoviePosition,guiIntfStruct.Position ); + btnModify( evFullScreen,!appMPlayer.subWindow.isFullScreen ); + + wsSetLayer( wsDisplay,appMPlayer.mainWindow.WindowID,appMPlayer.subWindow.isFullScreen ); + wsSetLayer( wsDisplay,appMPlayer.menuWindow.WindowID,appMPlayer.subWindow.isFullScreen ); + +} + +void mplSetFileName( char * dir,char * name,int type ) +{ + if ( !name ) return; + + if ( !dir ) guiSetFilename( guiIntfStruct.Filename,name ) + else guiSetDF( guiIntfStruct.Filename,dir,name ); + +// filename=guiIntfStruct.Filename; + guiIntfStruct.StreamType=type; + gfree( (void **)&guiIntfStruct.AudioFile ); + gfree( (void **)&guiIntfStruct.Subtitlename ); +} + +void mplCurr( void ) +{ + plItem * curr; + int stop = 0; + + if ( guiIntfStruct.Playing == 2 ) return; + switch ( guiIntfStruct.StreamType ) + { +#ifdef USE_DVDREAD + case STREAMTYPE_DVD: + break; +#endif +#ifdef HAVE_VCD + case STREAMTYPE_VCD: + break; +#endif + default: + if ( (curr=gtkSet( gtkGetCurrPlItem,0,NULL)) ) + { + mplSetFileName( curr->path,curr->name,STREAMTYPE_FILE ); + mplGotoTheNext=0; + break; + } + return; + } + if ( stop ) mplEventHandling( evStop,0 ); + if ( guiIntfStruct.Playing == 1 ) mplEventHandling( evPlay,0 ); +} + + +void mplPrev( void ) +{ + plItem * prev; + int stop = 0; + + if ( guiIntfStruct.Playing == 2 ) return; + switch ( guiIntfStruct.StreamType ) + { +#ifdef USE_DVDREAD + case STREAMTYPE_DVD: + if ( --guiIntfStruct.DVD.current_chapter == 0 ) + { + guiIntfStruct.DVD.current_chapter=1; + if ( --guiIntfStruct.DVD.current_title <= 0 ) { guiIntfStruct.DVD.current_title=1; stop=1; } + } + guiIntfStruct.Track=guiIntfStruct.DVD.current_title; + break; +#endif +#ifdef HAVE_VCD + case STREAMTYPE_VCD: + if ( --guiIntfStruct.Track == 0 ) { guiIntfStruct.Track=1; stop=1; } + break; +#endif + default: + if ( (prev=gtkSet( gtkGetPrevPlItem,0,NULL)) ) + { + mplSetFileName( prev->path,prev->name,STREAMTYPE_FILE ); + mplGotoTheNext=0; + break; + } + return; + } + if ( stop ) mplEventHandling( evStop,0 ); + if ( guiIntfStruct.Playing == 1 ) mplEventHandling( evPlay,0 ); +} + +void mplNext( void ) +{ + int stop = 0; + plItem * next; + + if ( guiIntfStruct.Playing == 2 ) return; + switch ( guiIntfStruct.StreamType ) + { +#ifdef USE_DVDREAD + case STREAMTYPE_DVD: + if ( guiIntfStruct.DVD.current_chapter++ == guiIntfStruct.DVD.chapters ) + { + guiIntfStruct.DVD.current_chapter=1; + if ( ++guiIntfStruct.DVD.current_title > guiIntfStruct.DVD.titles ) { guiIntfStruct.DVD.current_title=guiIntfStruct.DVD.titles; stop=1; } + } + guiIntfStruct.Track=guiIntfStruct.DVD.current_title; + break; +#endif +#ifdef HAVE_VCD + case STREAMTYPE_VCD: + if ( ++guiIntfStruct.Track > guiIntfStruct.VCDTracks ) { guiIntfStruct.Track=guiIntfStruct.VCDTracks; stop=1; } + break; +#endif + default: + if ( (next=gtkSet( gtkGetNextPlItem,0,NULL)) ) + { + mplSetFileName( next->path,next->name,STREAMTYPE_FILE ); + mplGotoTheNext=0; + break; + } + return; + } + if ( stop ) mplEventHandling( evStop,0 ); + if ( guiIntfStruct.Playing == 1 ) mplEventHandling( evPlay,0 ); +} diff --git a/gui/mplayer/play.h b/gui/mplayer/play.h new file mode 100644 index 0000000000..15615dd8a2 --- /dev/null +++ b/gui/mplayer/play.h @@ -0,0 +1,34 @@ + +#ifndef __GUI_PLAY_H +#define __GUI_PLAY_H + +#include "../config.h" + +extern int mplGotoTheNext; + +extern void mplEnd( void ); +extern void mplFullScreen( void ); +extern void mplPlay( void ); +extern void mplPause( void ); +extern void mplState( void ); +extern void mplPrev( void ); +extern void mplNext( void ); +extern void mplCurr( void ); + +extern void mplIncAudioBufDelay( void ); +extern void mplDecAudioBufDelay( void ); + +extern void mplRelSeek( float s ); +extern void mplAbsSeek( float s ); +extern float mplGetPosition( void ); + +extern void mplPlayFork( void ); +extern void mplSigHandler( int s ); +extern void mplPlayerThread( void ); + +extern void ChangeSkin( char * name ); +extern void EventHandling( void ); + +extern void mplSetFileName( char * dir,char * name,int type ); + +#endif diff --git a/gui/mplayer/sw.c b/gui/mplayer/sw.c new file mode 100644 index 0000000000..20b6807cac --- /dev/null +++ b/gui/mplayer/sw.c @@ -0,0 +1,92 @@ + +// sub window + +#include <inttypes.h> + +#include "../config.h" +#include "../libvo/x11_common.h" +#include "../libvo/fastmemcpy.h" + +#include "app.h" +#include "interface.h" +#include "../help_mp.h" +#include "widgets.h" + +int mplSubRender = 0; +int SubVisible = 0; + +extern int boxMoved; +extern int sx,sy; +extern int i,pot; + +void mplSubDraw( void ) +{ + if ( appMPlayer.subWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit ); + + if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++; + if ( appMPlayer.subWindow.State == wsWindowFocusOut && metacity_hack != 3 ) SubVisible--; + + if ( !appMPlayer.subWindow.Mapped || + appMPlayer.subWindow.Visible == wsWindowNotVisible ) return; + + if ( guiIntfStruct.Playing ) mplSubRender=0; + + if ( mplSubRender && appMPlayer.subWindow.State == wsWindowExpose ) + { + if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow ); + } + appMPlayer.subWindow.State=0; +} + +void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY ) +{ + static int mplSubMoved = 0; + static int msButton = 0; + + mplPBShow( X,Y ); + + switch( Button ) + { + case wsRRMouseButton: + gtkShow( evShowPopUpMenu,NULL ); + break; + case wsPMMouseButton: + gtkShow( evHidePopUpMenu,NULL ); + mplShowMenu( RX,RY ); + msButton=wsPMMouseButton; + break; + case wsRMMouseButton: + mplHideMenu( RX,RY,1 ); + msButton=0; + break; +// --- + case wsPLMouseButton: + gtkShow( evHidePopUpMenu,NULL ); + sx=X; sy=Y; + msButton=wsPLMouseButton; + mplSubMoved=0; + break; + case wsMoveMouse: + switch ( msButton ) + { + case wsPLMouseButton: + mplSubMoved=1; + if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy ); + break; + case wsPMMouseButton: + mplMenuMouseHandle( X,Y,RX,RY ); + break; + default: mplPBShow( X,Y ); break; + } + break; + case wsRLMouseButton: + if ( ( !mplSubMoved )&&( appMPlayer.subWindow.isFullScreen ) ) + { + if( SubVisible++%2 ) wsMoveTopWindow( wsDisplay,appMPlayer.mainWindow.WindowID ); + else wsMoveTopWindow( wsDisplay,appMPlayer.subWindow.WindowID ); + } + msButton=0; + mplSubMoved=0; + break; + } +} diff --git a/gui/mplayer/widgets.c b/gui/mplayer/widgets.c new file mode 100644 index 0000000000..1d4ee6123c --- /dev/null +++ b/gui/mplayer/widgets.c @@ -0,0 +1,238 @@ + +#include <stdlib.h> +#include <stdio.h> + +#include <sys/types.h> +#include <sys/stat.h> +#include <sys/wait.h> +#include <unistd.h> +#include <string.h> +#include <signal.h> + +#include <gdk/gdkprivate.h> +#include <gdk/gdkkeysyms.h> +#include <gdk/gdkx.h> +#include <gdk/gdk.h> +#include <gtk/gtk.h> + +#include "widgets.h" +#include "app.h" +#include "wm/ws.h" + + +#include "gtk/menu.h" +#include "play.h" +#include "gtk/fs.h" + +#include "../config.h" +#include "../help_mp.h" +#include "../mp_msg.h" + +GtkWidget * PopUpMenu = NULL; + +GtkWidget * WarningPixmap; +GtkWidget * ErrorPixmap; + +int gtkPopupMenu = 0; +int gtkPopupMenuParam = 0; +int gtkInited = 0; + +#include "gtk/sb.h" +#include "gtk/pl.h" +#include "gtk/fs.h" +#include "gtk/mb.h" +#include "gtk/about.h" +#include "gtk/opts.h" +#include "gtk/menu.h" +#include "gtk/url.h" +#include "gtk/eq.h" + +#include "pixmaps/MPlayer_mini.xpm" + +// --- init & close gtk + +GdkPixmap * gtkIcon = NULL; +GdkBitmap * gtkIconMask = NULL; +Pixmap guiIcon; +Pixmap guiIconMask; + +void gtkInit( void ) +{ + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] init GTK ...\n" ); +#ifdef HAVE_GTK2_GUI + gtk_disable_setlocale(); +#endif + gtk_init( 0,NULL ); +// gdk_set_use_xshm( TRUE ); + + { + GtkWidget * win; + win=gtk_window_new( GTK_WINDOW_TOPLEVEL ); + + if ( !gtkIcon ) + gtkIcon=gdk_pixmap_colormap_create_from_xpm_d( win->window,gdk_colormap_get_system(),>kIconMask,&win->style->bg[GTK_STATE_NORMAL],MPlayer_mini_xpm ); + + guiIcon=GDK_WINDOW_XWINDOW( gtkIcon ); + guiIconMask=GDK_WINDOW_XWINDOW( gtkIconMask ); + + gtk_widget_destroy( win ); + } + + gtkInited=1; +} + +void gtkAddIcon( GtkWidget * window ) +{ wsSetIcon( gdk_display,GDK_WINDOW_XWINDOW( window->window ),guiIcon,guiIconMask ); } + +void gtkClearList( GtkWidget * list ) +{ gtk_clist_clear( GTK_CLIST( list ) ); } + +int gtkFindCList( GtkWidget * list,char * item ) +{ + gint j,t; + gchar * tmpstr; + for( t=0,j=0;j<GTK_CLIST( list )->rows;j++ ) + { + gtk_clist_get_text( GTK_CLIST( list ),j,0,&tmpstr ); + if ( !strcmp( tmpstr,item ) ) return j; + } + return -1; +} + +void gtkSetDefaultToCList( GtkWidget * list,char * item ) +{ + gint i; + if ( ( i=gtkFindCList( list,item ) ) > -1 ) gtk_clist_select_row( GTK_CLIST( list ),i,0 ); +} + +void gtkEventHandling( void ) +{ + int i; + for( i=0;i < 25;i++ ) gtk_main_iteration_do( 0 ); +} + +// --- funcs + +void gtkMessageBox( int type,const gchar * str ) +{ + if ( !gtkInited ) return; + ShowMessageBox( str ); + gtk_label_set_text( GTK_LABEL( gtkMessageBoxText ),str ); + /* enable linewrapping by alex */ +// GTK_LABEL(gtkMessageBoxText)->max_width = 80; + if (strlen(str) > 80) + gtk_label_set_line_wrap(GTK_LABEL(gtkMessageBoxText), TRUE); + else + gtk_label_set_line_wrap(GTK_LABEL(gtkMessageBoxText), FALSE); + switch( type) + { + case GTK_MB_FATAL: + gtk_window_set_title( GTK_WINDOW( MessageBox ),MSGTR_MSGBOX_LABEL_FatalError ); + gtk_widget_hide( WarningPixmap ); + gtk_widget_show( ErrorPixmap ); + break; + case GTK_MB_ERROR: + gtk_window_set_title( GTK_WINDOW( MessageBox ),MSGTR_MSGBOX_LABEL_Error ); + gtk_widget_hide( WarningPixmap ); + gtk_widget_show( ErrorPixmap ); + break; + case GTK_MB_WARNING: + gtk_window_set_title( GTK_WINDOW( MessageBox ),MSGTR_MSGBOX_LABEL_Warning ); + gtk_widget_show( WarningPixmap ); + gtk_widget_hide( ErrorPixmap ); + break; + } + gtk_widget_show( MessageBox ); + gtkSetLayer( MessageBox ); + if ( type == GTK_MB_FATAL ) + while ( MessageBox ) gtk_main_iteration_do( 0 ); +} + +void gtkSetLayer( GtkWidget * wdg ) +{ + wsSetLayer( gdk_display,GDK_WINDOW_XWINDOW( wdg->window ),appMPlayer.subWindow.isFullScreen ); + gtkActive( wdg ); +} + +void gtkActive( GtkWidget * wdg ) +{ wsMoveTopWindow( gdk_display,GDK_WINDOW_XWINDOW( wdg->window )); } + +void gtkShow( int type,char * param ) +{ + switch( type ) + { + case evEqualizer: + ShowEqualizer(); + gtkSetLayer( Equalizer ); + break; + case evSkinBrowser: + ShowSkinBrowser(); +// gtkClearList( SkinList ); + if ( gtkFillSkinList( sbMPlayerPrefixDir ) && + gtkFillSkinList( sbMPlayerPrefixDir_obsolete ) && + gtkFillSkinList( sbMPlayerDirInHome ) && + gtkFillSkinList( sbMPlayerDirInHome_obsolete ) ) + { + gtkSetDefaultToCList( SkinList,param ); + gtk_clist_sort( GTK_CLIST( SkinList ) ); + gtk_widget_show( SkinBrowser ); + gtkSetLayer( SkinBrowser ); + } + else + { + gtk_widget_destroy( SkinBrowser ); + gtkMessageBox( GTK_MB_ERROR,"Skin dirs not found ... Please install skins." ); + } + break; + case evPreferences: + ShowPreferences(); + break; + case evPlayList: + ShowPlayList(); + gtkSetLayer( PlayList ); + break; + case evLoad: + ShowFileSelect( fsVideoSelector,0 ); + gtkSetLayer( fsFileSelect ); + break; + case evFirstLoad: + ShowFileSelect( fsVideoSelector,0 ); + gtkSetLayer( fsFileSelect ); + break; + case evLoadSubtitle: + ShowFileSelect( fsSubtitleSelector,0 ); + gtkSetLayer( fsFileSelect ); + break; + case evLoadAudioFile: + ShowFileSelect( fsAudioSelector,0 ); + gtkSetLayer( fsFileSelect ); + break; + case evAbout: + ShowAboutBox(); + gtkSetLayer( About ); + break; + case evShowPopUpMenu: + gtkPopupMenu=evNone; + gtkPopupMenuParam=0; + if ( PopUpMenu ) + { + gtk_widget_hide( PopUpMenu ); + gtk_widget_destroy( PopUpMenu ); + } + PopUpMenu=create_PopUpMenu(); + gtk_menu_popup( GTK_MENU( PopUpMenu ),NULL,NULL,NULL,NULL,0,0 ); + break; + case evHidePopUpMenu: + if ( PopUpMenu ) + { + gtk_widget_hide( PopUpMenu ); + gtk_widget_destroy( PopUpMenu ); + PopUpMenu=NULL; + } + break; + case evPlayNetwork: + ShowURLDialogBox(); + gtkSetLayer( URL ); + break; + } +} diff --git a/gui/mplayer/widgets.h b/gui/mplayer/widgets.h new file mode 100644 index 0000000000..3821a82b9c --- /dev/null +++ b/gui/mplayer/widgets.h @@ -0,0 +1,61 @@ + +#ifndef __MY_WIDGET +#define __MY_WIDGET + +#include <stdio.h> +#include <stdlib.h> +#include <gdk/gdkkeysyms.h> +#include <gtk/gtk.h> + +#include "../config.h" +#include "../osdep/shmem.h" +#include "play.h" +#include "mplayer.h" +#include "interface.h" +#include "wm/ws.h" + +#define GTK_MB_SIMPLE 0 +#define GTK_MB_MODAL 1 +#define GTK_MB_FATAL 2 +#define GTK_MB_ERROR 4 +#define GTK_MB_WARNING 8 + +extern GtkWidget * PlayList; +extern GtkWidget * Options; +extern GtkWidget * PopUpMenu; + +extern GtkWidget * WarningPixmap; +extern GtkWidget * ErrorPixmap; + +extern GtkWidget * SkinList; +extern GtkWidget * gtkMessageBoxText; + +extern int gtkPopupMenu; +extern int gtkPopupMenuParam; + +extern char * sbMPlayerDirInHome; +extern char * sbMPlayerPrefixDir; + +extern GdkPixmap * gtkIcon; +extern GdkBitmap * gtkIconMask; +extern Pixmap guiIcon; +extern Pixmap guiIconMask; + +extern void widgetsCreate( void ); + +extern void gtkInit( void ); +extern void gtkAddIcon( GtkWidget * window ); + +extern int gtkFillSkinList( gchar * dir ); +extern void gtkClearList( GtkWidget * list ); +extern void gtkSetDefaultToCList( GtkWidget * list,char * item ); +extern int gtkFindCList( GtkWidget * list,char * item ); + +extern void gtkEventHandling( void ); + +extern void gtkShow( int type,char * param ); +extern void gtkMessageBox( int type,const gchar * str ); +extern void gtkSetLayer( GtkWidget * wdg ); +extern void gtkActive( GtkWidget * wdg ); + +#endif diff --git a/gui/skin/cut.c b/gui/skin/cut.c new file mode 100644 index 0000000000..cdb56c3d3d --- /dev/null +++ b/gui/skin/cut.c @@ -0,0 +1,36 @@ + +#include <string.h> +#include <stdlib.h> + +void cutItem( char * in,char * out,char sep,int num ) +{ + int i,n,c; + for ( c=0,n=0,i=0;i<strlen( in );i++ ) + { + if ( in[i] == sep ) n++; + if ( n >= num && in[i] != sep ) out[c++]=in[i]; + if ( n >= num && in[i+1] == sep ) { out[c]=0; return; } + } + out[c]=0; +} + +int cutItemToInt( char * in,char sep,int num ) +{ + char tmp[512]; + cutItem( in,tmp,sep,num ); + return atoi( tmp ); +} + +float cutItemToFloat( char * in,char sep,int num ) +{ + char tmp[512]; + cutItem( in,tmp,sep,num ); + return atof( tmp ); +} + +void cutChunk( char * in,char * s1 ) +{ + cutItem( in,s1,'=',0 ); + memmove( in,strchr( in,'=' )+1,strlen( in ) - strlen( s1 ) ); +} + diff --git a/gui/skin/cut.h b/gui/skin/cut.h new file mode 100644 index 0000000000..71862e91f9 --- /dev/null +++ b/gui/skin/cut.h @@ -0,0 +1,10 @@ + +#ifndef _CUT_H +#define _CUT_H + +extern void cutItem( char * in,char * out,char sep,int num ); +extern int cutItemToInt( char * in,char sep,int num ); +extern float cutItemToFloat( char * in,char sep,int num ); +extern void cutChunk( char * in,char * s1 ); + +#endif diff --git a/gui/skin/font.c b/gui/skin/font.c new file mode 100644 index 0000000000..3860079a98 --- /dev/null +++ b/gui/skin/font.c @@ -0,0 +1,251 @@ + +#include <stdlib.h> +#include <stdio.h> +#include <stdarg.h> +#include <string.h> +#include <inttypes.h> + +#include "app.h" +#include "skin.h" +#include "font.h" +#include "cut.h" +#include "../mp_msg.h" + +int items; + +bmpFont * Fonts[26] = { NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL }; + +int fntAddNewFont( char * name ) +{ + int id; + int i; + + for( id=0;id<26;id++ ) + if ( !Fonts[id] ) break; + + if ( id == 25 ) return -2; + + if ( ( Fonts[id]=calloc( 1,sizeof( bmpFont ) ) ) == NULL ) return -1; + + strlcpy( Fonts[id]->name,name,128 ); // FIXME: as defined in font.h + for ( i=0;i<256;i++ ) + Fonts[id]->Fnt[i].x=Fonts[id]->Fnt[i].y=Fonts[id]->Fnt[i].sx=Fonts[id]->Fnt[i].sy=-1; + + return id; +} + +void fntFreeFont( void ) +{ + int i; + for( i=0;i < 25;i++ ) + { + if ( Fonts[i] ) + { + if ( Fonts[i]->Bitmap.Image ) free( Fonts[i]->Bitmap.Image ); + free( Fonts[i] ); + Fonts[i]=NULL; + } + } +} + +int fntRead( char * path,char * fname ) +{ + FILE * f; + unsigned char tmp[512]; + unsigned char * ptmp; + unsigned char command[32]; + unsigned char param[256]; + int c,linenumber = 0; + int id = fntAddNewFont( fname ); + + if ( id < 0 ) return id; + + strlcpy( tmp,path,sizeof( tmp ) ); + strlcat( tmp,fname,sizeof( tmp ) ); strlcat( tmp,".fnt",sizeof( tmp ) ); + if ( ( f=fopen( tmp,"rt" ) ) == NULL ) + { free( Fonts[id] ); return -3; } + + while ( !feof( f ) ) + { + fgets( tmp,255,f ); linenumber++; + + c=tmp[ strlen( tmp ) - 1 ]; if ( ( c == '\n' )||( c == '\r' ) ) tmp[ strlen( tmp ) - 1 ]=0; + c=tmp[ strlen( tmp ) - 1 ]; if ( ( c == '\n' )||( c == '\r' ) ) tmp[ strlen( tmp ) - 1 ]=0; + for ( c=0;c < (int)strlen( tmp );c++ ) + if ( tmp[c] == ';' ) { tmp[c]=0; break; } + if ( !tmp[0] ) continue; + ptmp=trimleft( tmp ); + if ( !tmp[0] ) continue; + ptmp=strswap( ptmp,'\t',' ' ); + ptmp=trim( ptmp ); + cutItem( ptmp,command,'=',0 ); cutItem( ptmp,param,'=',1 ); + if ( command[0] == '"' ) + { + int i; + cutItem( command,command,'"',1 ); + i=(int)command[0]; + cutItem( param,tmp,',',0 ); Fonts[id]->Fnt[i].x=atoi( tmp ); + cutItem( param,tmp,',',1 ); Fonts[id]->Fnt[i].y=atoi( tmp ); + cutItem( param,tmp,',',2 ); Fonts[id]->Fnt[i].sx=atoi( tmp ); + cutItem( param,tmp,',',3 ); Fonts[id]->Fnt[i].sy=atoi( tmp ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[font] char: '%s' params: %d,%d %dx%d\n",command,Fonts[id]->Fnt[i].x,Fonts[id]->Fnt[i].y,Fonts[id]->Fnt[i].sx,Fonts[id]->Fnt[i].sy ); + } + else + { + if ( !strcmp( command,"image" ) ) + { + strlcpy( tmp,path,sizeof( tmp ) ); strlcat( tmp,param,sizeof( tmp ) ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[font] font imagefile: %s\n",tmp ); + if ( skinBPRead( tmp,&Fonts[id]->Bitmap ) ) return -4; + } + } + } + + return 0; +} + +int fntFindID( char * name ) +{ + int i; + for ( i=0;i < 25;i++ ) + if ( Fonts[i] ) + if ( !strcmp( name,Fonts[i]->name ) ) return i; + return -1; +} + +int fntTextWidth( int id,char * str ) +{ + int size = 0; + int i; + + if ( ( !Fonts[id] )||( !str[0] ) ) return 0; + + for ( i=0;i < (int)strlen( str );i++ ) + { + unsigned char c = (unsigned char)str[i]; + if ( Fonts[id]->Fnt[c].sx == -1 ) c = ' '; + size+= Fonts[id]->Fnt[ c ].sx; + } + return size; +} + +int fntTextHeight( int id,char * str ) +{ + int max = 0,i; + + if ( ( !Fonts[id] )||( !str[0] ) ) return 0; + + for ( i=0;i < (int)strlen( str );i++ ) + { + int h; + unsigned char c = (unsigned char)str[i]; + if ( Fonts[id]->Fnt[c].sx == -1 ) c = ' '; + h = Fonts[id]->Fnt[c].sy; + if ( h > max ) max=h; + } + return max; +} + +txSample * fntRender( wItem * item,int px,const char * fmt,... ) +{ + va_list ap; + unsigned char p[512]; + unsigned int c; + int i, dx = 0, tw, fbw, iw, id, ofs; + int x,y,fh,fw,fyc,yc; + uint32_t * ibuf; + uint32_t * obuf; + + va_start( ap,fmt ); + vsnprintf( p,512,fmt,ap ); + va_end( ap ); + + iw=item->width; + id=item->fontid; + + if ( ( !item )|| + ( !Fonts[id] )|| + ( !p[0] )|| + ( !fntTextWidth( id,p ) ) ) return NULL; + + tw=fntTextWidth( id,p ); + fbw=Fonts[id]->Bitmap.Width; + + if ( item->Bitmap.Image == NULL ) + { + item->Bitmap.Height=item->height=fntTextHeight( id,p ); + item->Bitmap.Width=item->width=iw; + item->Bitmap.ImageSize=item->height * iw * 4; + if ( !item->Bitmap.ImageSize ) return NULL; + item->Bitmap.BPP=32; + item->Bitmap.Image=malloc( item->Bitmap.ImageSize ); + } + + obuf=(uint32_t *)item->Bitmap.Image; + ibuf=(uint32_t *)Fonts[id]->Bitmap.Image; + + for ( i=0;i < item->Bitmap.ImageSize / 4;i++ ) obuf[i]=0xff00ff; + + if ( tw <= iw ) + { + switch ( item->align ) + { + default: + case fntAlignLeft: dx=0; break; + case fntAlignCenter: dx=( iw - fntTextWidth( id,p ) ) / 2; break; + case fntAlignRight: dx=iw - fntTextWidth( id,p ); break; + } + + } else dx+=px; + + ofs=dx; + + for ( i=0;i < (int)strlen( p );i++ ) + { + c=(unsigned int)p[i]; + fw=Fonts[id]->Fnt[c].sx; + + if ( fw == -1 ) { c=32; fw=Fonts[id]->Fnt[c].sx; } + + fh=Fonts[id]->Fnt[c].sy; + fyc=Fonts[id]->Fnt[c].y * fbw + Fonts[id]->Fnt[c].x; + yc=dx; + + if ( dx >= 0 ) + for ( y=0;y < fh;y++ ) + { + for ( x=0; x < fw;x++ ) + if ( dx + x >= 0 && dx + x < iw ) obuf[yc + x]=ibuf[ fyc + x ]; + fyc+=fbw; + yc+=iw; + } + dx+=fw; + } + + if ( ofs > 0 && tw > item->width ) + { + dx=ofs; + for ( i=(int)strlen( p );i > 0;i-- ) + { + c=(unsigned int)p[i]; + fw=Fonts[id]->Fnt[c].sx; + + if ( fw == -1 ) { c=32; fw=Fonts[id]->Fnt[c].sx; } + + fh=Fonts[id]->Fnt[c].sy; + fyc=Fonts[id]->Fnt[c].y * fbw + Fonts[id]->Fnt[c].x; + + dx-=fw; yc=dx; + if ( dx >= 0 ) + for ( y=0;y < fh;y++ ) + { + for ( x=fw - 1;x >= 0;x-- ) + if ( dx + x >= 0 && dx + x < iw ) obuf[yc + x]=ibuf[fyc + x]; + fyc+=fbw; + yc+=iw; + } + } + } + + return &item->Bitmap; +} diff --git a/gui/skin/font.h b/gui/skin/font.h new file mode 100644 index 0000000000..94289ded6c --- /dev/null +++ b/gui/skin/font.h @@ -0,0 +1,38 @@ + +#ifndef _FONT_H +#define _FONT_H + +#include "bitmap.h" +#include "app.h" + +#define fntAlignLeft 0 +#define fntAlignCenter 1 +#define fntAlignRight 2 + +typedef struct +{ + int x,y; // location + int sx,sy; // size +} fntChar; + +typedef struct +{ + fntChar Fnt[256]; + txSample Bitmap; + char name[128]; +} bmpFont; + +extern txSample Bitmap; +extern bmpFont * Fonts[26]; + +extern int fntAddNewFont( char * name ); +extern void fntFreeFont( void ); +extern int fntFindID( char * name ); +extern int fntTextHeight( int id,char * str ); +extern int fntTextWidth( int id,char * str ); + +extern int fntRead( char * path,char * fname ); +extern txSample * fntRender( wItem * item,int px,const char * fmt,... ); + +#endif + diff --git a/gui/skin/skin.c b/gui/skin/skin.c new file mode 100644 index 0000000000..b83c0360e4 --- /dev/null +++ b/gui/skin/skin.c @@ -0,0 +1,727 @@ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "cut.h" +#include "font.h" +#include "app.h" + +#include "../config.h" +#include "../mp_msg.h" +#include "../help_mp.h" +#include "mplayer/widgets.h" + +//#define MSGL_DBG2 MSGL_STATUS + +listItems * skinAppMPlayer = &appMPlayer; + +// --- + +static int linenumber; + +static unsigned char path[512],fn[512]; + +static listItems * defList = NULL; +static unsigned char window_name[32] = ""; + +static wItem * currSection = NULL; +static int * currSubItem = NULL; +static wItem * currSubItems = NULL; + +#include <stdarg.h> + +void ERRORMESSAGE( const char * format, ... ) +{ + char p[512]; + char tmp[512]; + va_list ap; + va_start( ap,format ); + vsnprintf( p,512,format,ap ); + va_end( ap ); + mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_SKIN_ERRORMESSAGE,linenumber,p ); + snprintf( tmp,512,MSGTR_SKIN_ERRORMESSAGE,linenumber,p ); + gtkMessageBox( GTK_MB_FATAL,tmp ); +} + +#define CHECKDEFLIST( str ) \ +{ \ + if ( defList == NULL ) \ + { \ + mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_SKIN_WARNING1,linenumber,str ); \ + return 1; \ + } \ +} + +#define CHECKWINLIST( str ) \ +{ \ + if ( !window_name[0] ) \ + { \ + mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_SKIN_WARNING2,linenumber,str ); \ + return 1; \ + } \ +} + +#define CHECK( name ) \ +{ \ + if ( !strcmp( window_name,name ) ) \ + { \ + mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_SKIN_WARNING3,linenumber,name ); \ + return 1; \ + } \ +} + +static char * strlower( char * in ) +{ + int i; + for( i=0;i<(int)strlen( in );i++ ) in[i]=( in[i] >= 'A' ? ( in[i] <= 'Z' ? in[i]+='A' : in[i] ) : in[i] ); + return in; +} + +int skinBPRead( char * fname, txSample * bf ) +{ + int i=bpRead( fname,bf ); + switch ( i ) + { + case -1: ERRORMESSAGE( MSGTR_SKIN_BITMAP_16bit,fname ); break; + case -2: ERRORMESSAGE( MSGTR_SKIN_BITMAP_FileNotFound,fname ); break; + case -3: ERRORMESSAGE( MSGTR_SKIN_BITMAP_BMPReadError,fname ); break; + case -4: ERRORMESSAGE( MSGTR_SKIN_BITMAP_TGAReadError,fname ); break; + case -5: ERRORMESSAGE( MSGTR_SKIN_BITMAP_PNGReadError,fname ); break; + case -6: ERRORMESSAGE( MSGTR_SKIN_BITMAP_RLENotSupported,fname ); break; + case -7: ERRORMESSAGE( MSGTR_SKIN_BITMAP_UnknownFileType,fname ); break; + case -8: ERRORMESSAGE( MSGTR_SKIN_BITMAP_ConversionError,fname ); break; + } + return i; +} + +int cmd_section( char * in ) +{ + strlower( in ); + defList=NULL; + if ( !strcmp( in,"movieplayer" ) ) defList=skinAppMPlayer; + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] sectionname: %s\n",in ); + return 0; +} + +int cmd_end( char * in ) +{ + if ( strlen( window_name ) ) { window_name[0]=0; currSection=NULL; currSubItem=NULL; currSubItems=NULL; } + else defList=NULL; + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] end section\n" ); + return 0; +} + +int cmd_window( char * in ) +{ + CHECKDEFLIST( "window" ); + + strlcpy( window_name,strlower( in ),sizeof( window_name ) ); + if ( !strncmp( in,"main",4 ) ) { currSection=&skinAppMPlayer->main; currSubItem=&skinAppMPlayer->NumberOfItems; currSubItems=skinAppMPlayer->Items; } + else if ( !strncmp( in,"sub",3 ) ) currSection=&skinAppMPlayer->sub; + else if ( !strncmp( in,"playbar",7 ) ) { currSection=&skinAppMPlayer->bar; currSubItem=&skinAppMPlayer->NumberOfBarItems; currSubItems=skinAppMPlayer->barItems; } + else if ( !strncmp( in,"menu",4 ) ) { currSection=&skinAppMPlayer->menuBase; currSubItem=&skinAppMPlayer->NumberOfMenuItems; currSubItems=skinAppMPlayer->MenuItems; } + else ERRORMESSAGE( MSGTR_UNKNOWNWINDOWTYPE ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] window: %s\n",window_name ); + return 0; +} + +int cmd_base( char * in ) +{ + unsigned char fname[512]; + unsigned char tmp[512]; + int x,y; + int sx=0,sy=0; + + CHECKDEFLIST( "base" ); + CHECKWINLIST( "base" ); + + cutItem( in,fname,',',0 ); + x=cutItemToInt( in,',',1 ); + y=cutItemToInt( in,',',2 ); + sx=cutItemToInt( in,',',3 ); + sy=cutItemToInt( in,',',4 ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] base: %s x: %d y: %d ( %dx%d )\n",fname,x,y,sx,sy ); + if ( !strcmp( window_name,"main" ) ) + { + defList->main.x=x; + defList->main.y=y; + defList->main.type=itBase; + strlcpy(tmp, path, sizeof( tmp )); strlcat(tmp, fname, sizeof( tmp )); + if ( skinBPRead( tmp,&defList->main.Bitmap ) ) return 1; + defList->main.width=defList->main.Bitmap.Width; + defList->main.height=defList->main.Bitmap.Height; +#ifdef HAVE_XSHAPE + Convert32to1( &defList->main.Bitmap,&defList->main.Mask,0x00ff00ff ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] mask: %dx%d\n",defList->main.Mask.Width,defList->main.Mask.Height ); +#else + defList->main.Mask.Image=NULL; +#endif + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] width: %d height: %d\n",defList->main.width,defList->main.height ); + } + if ( !strcmp( window_name,"sub" ) ) + { + defList->sub.type=itBase; + strlcpy(tmp, path, sizeof( tmp )); strlcat(tmp, fname, sizeof( tmp )); + if ( skinBPRead( tmp,&defList->sub.Bitmap ) ) return 1; + defList->sub.x=x; + defList->sub.y=y; + defList->sub.width=defList->sub.Bitmap.Width; + defList->sub.height=defList->sub.Bitmap.Height; + if ( sx && sy ) + { + defList->sub.width=sx; + defList->sub.height=sy; + } + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] %d,%d %dx%d\n",defList->sub.x,defList->sub.y,defList->sub.width,defList->sub.height ); + } + if ( !strcmp( window_name,"menu" ) ) + { + defList->menuIsPresent=1; + defList->menuBase.type=itBase; + strlcpy(tmp, path, sizeof( tmp )); strlcat(tmp, fname, sizeof( tmp )); + if ( skinBPRead( tmp,&defList->menuBase.Bitmap ) ) return 1; + defList->menuBase.width=defList->menuBase.Bitmap.Width; + defList->menuBase.height=defList->menuBase.Bitmap.Height; +#ifdef HAVE_XSHAPE + Convert32to1( &defList->menuBase.Bitmap,&defList->menuBase.Mask,0x00ff00ff ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] mask: %dx%d\n",defList->menuBase.Mask.Width,defList->menuBase.Mask.Height ); +#else + defList->menuBase.Mask.Image=NULL; +#endif + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] width: %d height: %d\n",defList->menuBase.width,defList->menuBase.height ); + } + if ( !strcmp( window_name,"playbar" ) ) + { + defList->barIsPresent=1; + defList->bar.x=x; + defList->bar.y=y; + defList->bar.type=itBase; + strlcpy(tmp, path, sizeof( tmp )); strlcat(tmp, fname, sizeof( tmp )); + if ( skinBPRead( tmp,&defList->bar.Bitmap ) ) return 1; + defList->bar.width=defList->bar.Bitmap.Width; + defList->bar.height=defList->bar.Bitmap.Height; +#ifdef HAVE_XSHAPE + Convert32to1( &defList->bar.Bitmap,&defList->bar.Mask,0x00ff00ff ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] mask: %dx%d\n",defList->bar.Mask.Width,defList->bar.Mask.Height ); +#else + defList->bar.Mask.Image=NULL; +#endif + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] width: %d height: %d\n",defList->bar.width,defList->bar.height ); + } + return 0; +} + +int cmd_background( char * in ) +{ + CHECKDEFLIST( "background" ); + CHECKWINLIST( "background" ); + + CHECK( "menu" ); + CHECK( "main" ); + + currSection->R=cutItemToInt( in,',',0 ); + currSection->G=cutItemToInt( in,',',1 ); + currSection->B=cutItemToInt( in,',',2 ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] background color is #%x%x%x.\n",currSection->R,currSection->G,currSection->B ); + + return 0; +} + +int cmd_button( char * in ) +{ + unsigned char fname[512]; + unsigned char tmp[512]; + int x,y,sx,sy; + char msg[32]; + + CHECKDEFLIST( "button" ); + CHECKWINLIST( "button" ); + + CHECK( "sub" ); + CHECK( "menu" ); + + cutItem( in,fname,',',0 ); + x=cutItemToInt( in,',',1 ); + y=cutItemToInt( in,',',2 ); + sx=cutItemToInt( in,',',3 ); + sy=cutItemToInt( in,',',4 ); + cutItem( in,msg,',',5 ); + + (*currSubItem)++; + currSubItems[ *currSubItem ].type=itButton; + currSubItems[ *currSubItem ].x=x; + currSubItems[ *currSubItem ].y=y; + currSubItems[ *currSubItem ].width=sx; + currSubItems[ *currSubItem ].height=sy; + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] button: fname: %s\n",fname ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] x: %d y: %d sx: %d sy: %d\n",x,y,sx,sy ); + + if ( ( currSubItems[ *currSubItem ].msg=appFindMessage( msg ) ) == -1 ) + { ERRORMESSAGE( MSGTR_SKIN_BITMAP_UnknownMessage,msg ); return 0; } + currSubItems[ *currSubItem ].pressed=btnReleased; + if ( currSubItems[ *currSubItem ].msg == evPauseSwitchToPlay ) currSubItems[ *currSubItem ].pressed=btnDisabled; + currSubItems[ *currSubItem ].tmp=1; + + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] message: %d\n",currSubItems[ *currSubItem ].msg ); + + currSubItems[ *currSubItem ].Bitmap.Image=NULL; + if ( strcmp( fname,"NULL" ) ) + { + strlcpy(tmp, path, sizeof( tmp )); strlcat(tmp, fname, sizeof( tmp )); + if ( skinBPRead( tmp,&currSubItems[ *currSubItem ].Bitmap ) ) return 1; + } + + return 0; +} + +int cmd_selected( char * in ) +{ + unsigned char fname[512]; + unsigned char tmp[512]; + + CHECKDEFLIST( "selected" ); + CHECKWINLIST( "selected" ); + + CHECK( "main" ); + CHECK( "sub" ); + CHECK( "playbar" ); + + cutItem( in,fname,',',0 ); + defList->menuSelected.type=itBase; + strlcpy(tmp, path, sizeof( tmp )); strlcat(tmp, fname, sizeof( tmp )); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] selected: %s\n",fname ); + if ( skinBPRead( tmp,&defList->menuSelected.Bitmap ) ) return 1; + defList->menuSelected.width=defList->menuSelected.Bitmap.Width; + defList->menuSelected.height=defList->menuSelected.Bitmap.Height; + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] width: %d height: %d\n",defList->menuSelected.width,defList->menuSelected.height ); + return 0; +} + +int cmd_menu( char * in ) +{ // menu = number,x,y,sx,sy,msg + int x,y,sx,sy,msg; + unsigned char tmp[64]; + + CHECKDEFLIST( "menu" ); + CHECKWINLIST( "menu" ); + + CHECK( "main" ); + CHECK( "sub" ); + CHECK( "playbar" ); + + x=cutItemToInt( in,',',0 ); + y=cutItemToInt( in,',',1 ); + sx=cutItemToInt( in,',',2 ); + sy=cutItemToInt( in,',',3 ); + cutItem( in,tmp,',',4 ); msg=appFindMessage( tmp ); + + defList->NumberOfMenuItems++; + defList->MenuItems[ defList->NumberOfMenuItems ].x=x; + defList->MenuItems[ defList->NumberOfMenuItems ].y=y; + defList->MenuItems[ defList->NumberOfMenuItems ].width=sx; + defList->MenuItems[ defList->NumberOfMenuItems ].height=sy; + + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] menuitem: %d\n",defList->NumberOfMenuItems ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] x: %d y: %d sx: %d sy: %d\n",x,y,sx,sy ); + + if ( ( defList->MenuItems[ defList->NumberOfMenuItems ].msg=msg ) == -1 ) + ERRORMESSAGE( MSGTR_SKIN_BITMAP_UnknownMessage,tmp ); + + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] message: %d\n",defList->Items[ defList->NumberOfItems ].msg ); + + defList->MenuItems[ defList->NumberOfMenuItems ].Bitmap.Image=NULL; + return 0; +} + +int cmd_hpotmeter( char * in ) +{ // hpotmeter=buttonbitmaps,sx,sy,phasebitmaps,phases,default value,x,y,sx,sy,msg + int x,y,psx,psy,ph,sx,sy,msg,d; + unsigned char tmp[512]; + unsigned char pfname[512]; + unsigned char phfname[512]; + wItem * item; + + CHECKDEFLIST( "hpotmeter" ); + CHECKWINLIST( "hpotmeter" ); + + CHECK( "sub" ); + CHECK( "menu" ); + + cutItem( in,pfname,',',0 ); + psx=cutItemToInt( in,',',1 ); + psy=cutItemToInt( in,',',2 ); + cutItem( in,phfname,',',3 ); + ph=cutItemToInt( in,',',4 ); + d=cutItemToInt( in,',',5 ); + x=cutItemToInt( in,',',6 ); + y=cutItemToInt( in,',',7 ); + sx=cutItemToInt( in,',',8 ); + sy=cutItemToInt( in,',',9 ); + cutItem( in,tmp,',',10 ); msg=appFindMessage( tmp ); + + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] h/v potmeter: pointer filename: '%s'\n",pfname ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] pointer size is %dx%d\n",psx,psy ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] phasebitmaps filename: '%s'\n",phfname ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] position: %d,%d %dx%d\n",x,y,sx,sy ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] default value: %d\n",d ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] message: %d\n",msg ); + + (*currSubItem)++; + item=&currSubItems[ *currSubItem ]; + + item->type=itHPotmeter; + item->x=x; item->y=y; item->width=sx; item->height=sy; + item->phases=ph; + item->psx=psx; item->psy=psy; + item->msg=msg; + item->value=(float)d; + item->pressed=btnReleased; + + item->Bitmap.Image=NULL; + if ( strcmp( phfname,"NULL" ) ) + { + strlcpy(tmp, path, sizeof( tmp )); strlcat(tmp, phfname, sizeof( tmp )); + if ( skinBPRead( tmp,&item->Bitmap ) ) return 1; + } + + item->Mask.Image=NULL; + if ( strcmp( pfname,"NULL" ) ) + { + strlcpy(tmp, path, sizeof( tmp )); strlcat(tmp, pfname, sizeof( tmp )); + if ( skinBPRead( tmp,&item->Mask ) ) return 1; + } + return 0; +} + +int cmd_vpotmeter( char * in ) +{ + int r = cmd_hpotmeter( in ); + wItem * item; + + item=&currSubItems[ *currSubItem ]; + item->type=itVPotmeter; + return r; +} + +int cmd_potmeter( char * in ) +{ // potmeter=phasebitmaps,phases,default value,x,y,sx,sy,msg + int x,y,ph,sx,sy,msg,d; + unsigned char tmp[512]; + unsigned char phfname[512]; + wItem * item; + + CHECKDEFLIST( "potmeter" ); + CHECKWINLIST( "potmeter" ); + + CHECK( "sub" ); + CHECK( "menu" ); + + cutItem( in,phfname,',',0 ); + ph=cutItemToInt( in,',',1 ); + d=cutItemToInt( in,',',2 ); + x=cutItemToInt( in,',',3 ); + y=cutItemToInt( in,',',4 ); + sx=cutItemToInt( in,',',5 ); + sy=cutItemToInt( in,',',6 ); + cutItem( in,tmp,',',7 ); msg=appFindMessage( tmp ); + + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] potmeter: phases filename: '%s'\n",phfname ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] position: %d,%d %dx%d\n",x,y,sx,sy ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] phases: %d\n",ph ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] default value: %d\n",d ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] message: %d\n",msg ); + + (*currSubItem)++; + item=&currSubItems[ *currSubItem ]; + + item->type=itPotmeter; + item->x=x; item->y=y; + item->width=sx; item->height=sy; + item->phases=ph; + item->msg=msg; + item->value=(float)d; + + item->Bitmap.Image=NULL; + if ( strcmp( phfname,"NULL" ) ) + { + strlcpy(tmp, path, sizeof( tmp )); strlcat(tmp, phfname, sizeof( tmp )); + if ( skinBPRead( tmp,&item->Bitmap ) ) return 1; + } + return 0; +} + +int cmd_font( char * in ) +{ // font=fontname,fontid + char name[512]; + char id[512]; + wItem * item; + + CHECKDEFLIST( "font" ); + CHECKWINLIST( "font" ); + + CHECK( "sub" ); + CHECK( "menu" ); + + cutItem( in,name,',',0 ); + cutItem( in,id,',',1 ); + + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] font\n" ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] name: %s\n",name ); + + (*currSubItem)++; + item=&currSubItems[ *currSubItem ]; + + item->type=itFont; + item->fontid=fntRead( path,name ); + switch ( item->fontid ) + { + case -1: ERRORMESSAGE( MSGTR_SKIN_FONT_NotEnoughtMemory ); return 1; + case -2: ERRORMESSAGE( MSGTR_SKIN_FONT_TooManyFontsDeclared ); return 1; + case -3: ERRORMESSAGE( MSGTR_SKIN_FONT_FontFileNotFound ); return 1; + case -4: ERRORMESSAGE( MSGTR_SKIN_FONT_FontImageNotFound ); return 1; + } + return 0; +} + +int cmd_slabel( char * in ) +{ + char tmp[512]; + char sid[63]; + int x,y,id; + wItem * item; + + CHECKDEFLIST( "slabel" ); + CHECKWINLIST( "slabel" ); + + CHECK( "sub" ); + CHECK( "menu" ); + + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] slabel\n" ); + + x=cutItemToInt( in,',',0 ); + y=cutItemToInt( in,',',1 ); + cutItem( in,sid,',',2 ); id=fntFindID( sid ); + if ( id < 0 ) { ERRORMESSAGE( MSGTR_SKIN_FONT_NonExistentFontID,sid ); return 1; } + cutItem( in,tmp,',',3 ); cutItem( tmp,tmp,'"',1 ); + + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] pos: %d,%d\n",x,y ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] id: %s ( %d )\n",sid,id ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] str: '%s'\n",tmp ); + + (*currSubItem)++; + item=&currSubItems[ *currSubItem ]; + + item->type=itSLabel; + item->fontid=id; + item->x=x; item->y=y; + item->width=-1; item->height=-1; + if ( ( item->label=malloc( strlen( tmp ) + 1 ) ) == NULL ) { ERRORMESSAGE( MSGTR_SKIN_FONT_NotEnoughtMemory ); return 1; } + strcpy( item->label,tmp ); + + return 0; +} + +int cmd_dlabel( char * in ) +{ // dlabel=x,y,sx,align,fontid,string ... + char tmp[512]; + char sid[63]; + int x,y,sx,id,a; + wItem * item; + + CHECKDEFLIST( "dlabel" ); + CHECKWINLIST( "dlabel" ); + + CHECK( "sub" ); + CHECK( "menu" ); + + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] dlabel\n" ); + + x=cutItemToInt( in,',',0 ); + y=cutItemToInt( in,',',1 ); + sx=cutItemToInt( in,',',2 ); + a=cutItemToInt( in,',',3 ); + cutItem( in,sid,',',4 ); id=fntFindID( sid ); + if ( id < 0 ) { ERRORMESSAGE( MSGTR_SKIN_FONT_NonExistentFontID,sid ); return 1; } + cutItem( in,tmp,',',5 ); cutItem( tmp,tmp,'"',1 ); + + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] pos: %d,%d width: %d align: %d\n",x,y,sx,a ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] id: %s ( %d )\n",sid,id ); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] str: '%s'\n",tmp ); + + (*currSubItem)++; + item=&currSubItems[ *currSubItem ]; + + item->type=itDLabel; + item->fontid=id; item->align=a; + item->x=x; item->y=y; + item->width=sx; item->height=-1; + if ( ( item->label=malloc( strlen( tmp ) + 1 ) ) == NULL ) { ERRORMESSAGE( MSGTR_SKIN_FONT_NotEnoughtMemory ); return 1; } + strcpy( item->label,tmp ); + + return 0; +} + +int cmd_decoration( char * in ) +{ + char tmp[512]; + + CHECKDEFLIST( "decoration" ); + CHECKWINLIST( "decoration" ); + + CHECK( "sub" ); + CHECK( "menu" ); + CHECK( "playbar" ); + + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] window decoration is %s\n",in ); + strlower( in ); + cutItem( in,tmp,',',0 ); + if ( strcmp( tmp,"enable" )&&strcmp( tmp,"disable" ) ) { ERRORMESSAGE( MSGTR_SKIN_UnknownParameter,tmp ); return 1; } + if ( strcmp( tmp,"enable" ) ) defList->mainDecoration=0; + else defList->mainDecoration=1; + + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] window decoration is %s\n",(defList->mainDecoration?"enabled":"disabled") ); + return 0; +} + +typedef struct +{ + const char * name; + int (*func)( char * in ); +} _item; + +_item skinItem[] = + { + { "section", cmd_section }, + { "end", cmd_end }, + { "window", cmd_window }, + { "base", cmd_base }, + { "button", cmd_button }, + { "selected", cmd_selected }, + { "background", cmd_background }, + { "vpotmeter", cmd_vpotmeter }, + { "hpotmeter", cmd_hpotmeter }, + { "potmeter", cmd_potmeter }, + { "font", cmd_font }, + { "slabel", cmd_slabel }, + { "dlabel", cmd_dlabel }, + { "decoration", cmd_decoration }, + { "menu", cmd_menu } + }; + +#define ITEMS (int)( sizeof( skinItem )/sizeof( _item ) ) + +char * trimleft( char * in ) +{ + int c = 0; + char * out; + if ( strlen( in ) == 0 ) return NULL; + while ( in[c] == ' ' ) c++; + if ( c != 0 ) + { + out=malloc( strlen( in ) - c + 1 ); + memcpy( out,&in[c],strlen( in ) - c + 1 ); + } + else out=in; + return out; +} + +char * strswap( char * in,char what,char whereof ) +{ + int i; + if ( strlen( in ) == 0 ) return NULL; + for ( i=0;i<(int)strlen( in );i++ ) + if ( in[i] == what ) in[i]=whereof; + return in; +} + +char * trim( char * in ) +{ + int c = 0,i = 0,id = 0; + if ( strlen( in ) == 0 ) return NULL; + while ( c != (int)strlen( in ) ) + { + if ( in[c] == '"' ) id=!id; + if ( ( in[c] == ' ' )&&( !id ) ) + { + for ( i=0;i<(int)strlen( in ) - c; i++ ) in[c+i]=in[c+i+1]; + continue; + } + c++; + } + return in; +} + +FILE * skinFile; + +void setname( char * item1, char * item2 ) +{ + strlcpy(fn, item1, sizeof( fn )); + strlcat(fn, "/", sizeof( fn )); strlcat(fn, item2, sizeof( fn )); + strlcpy(path, fn, sizeof( path )); strlcat(path, "/", sizeof( path )); + strlcat(fn, "/skin", sizeof( fn )); +} + +int skinRead( char * dname ) +{ + unsigned char tmp[255]; + unsigned char * ptmp; + unsigned char command[32]; + unsigned char param[256]; + int c,i; + + setname( skinDirInHome,dname ); + if ( ( skinFile = fopen( fn,"rt" ) ) == NULL ) + { + setname( skinMPlayerDir,dname ); + if ( ( skinFile = fopen( fn,"rt" ) ) == NULL ) + { + setname( skinDirInHome_obsolete,dname ); + if ( ( skinFile = fopen( fn,"rt" ) ) == NULL ) + { + setname( skinMPlayerDir_obsolete,dname ); + if ( ( skinFile = fopen( fn,"rt" ) ) == NULL ) + { + setname( skinMPlayerDir,dname ); + mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_SKIN_SkinFileNotFound,fn ); + return -1; + } + } + } + } + + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] file: %s\n",fn ); + + appInitStruct( skinAppMPlayer ); + + linenumber=0; + while (fgets(tmp, 255, skinFile)) + { + linenumber++; + + c=tmp[ strlen( tmp ) - 1 ]; if ( c == '\n' || c == '\r' ) tmp[ strlen( tmp ) - 1 ]=0; + c=tmp[ strlen( tmp ) - 1 ]; if ( c == '\n' || c == '\r' ) tmp[ strlen( tmp ) - 1 ]=0; + for ( c=0;c<(int)strlen( tmp );c++ ) + if ( tmp[c] == ';' ) + { + tmp[c]=0; + break; + } + if ( strlen( tmp ) == 0 ) continue; + ptmp=trimleft( tmp ); + if ( strlen( ptmp ) == 0 ) continue; + ptmp=strswap( ptmp,'\t',' ' ); + ptmp=trim( ptmp ); + + cutItem( ptmp,command,'=',0 ); cutItem( ptmp,param,'=',1 ); + strlower( command ); + for( i=0;i<ITEMS;i++ ) + if ( !strcmp( command,skinItem[i].name ) ) + if ( skinItem[i].func( param ) ) return -2; + } + if (linenumber == 0) { + mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_SKIN_SkinFileNotReadable, fn); + return -1; + } + return 0; +} diff --git a/gui/skin/skin.h b/gui/skin/skin.h new file mode 100644 index 0000000000..ce9d47b1eb --- /dev/null +++ b/gui/skin/skin.h @@ -0,0 +1,18 @@ + +#ifndef __MY_SKIN +#define __MY_SKIN + +#include "app.h" + +extern listItems * skinAppMPlayer; + +extern int skinRead( char * dname ); +extern int skinBPRead( char * fname, txSample * bf ); + +// --- + +extern char * trimleft( char * in ); +extern char * strswap( char * in,char what,char whereof ); +extern char * trim( char * in ); + +#endif diff --git a/gui/win32/Changelog b/gui/win32/Changelog new file mode 100644 index 0000000000..1e831ee65a --- /dev/null +++ b/gui/win32/Changelog @@ -0,0 +1,317 @@ +HISTORY +2006/06/30 - Erik Augustson <erik_27can@yahoo.com> +- Fixed display of wrong aspect ratios. + +2006/06/13 - Erik Augustson <erik_27can@yahoo.com> +- Minor bugfixes. +- Updated to current SVN + +2006/04/14 - Erik Augustson <erik_27can@yahoo.com> +- Fixed a crash bug. +- Fixed a major fullscreen bug (WinID wasn't getting + reset when FS switching). + +2006/04/13 - Erik Augustson <erik_27can@yahoo.com> +- More minor fixups + +2006/04/07 - Erik Augustson <erik_27can@yahoo.com> +- Minor fixups to openurl and openfile from dialogs.c + +2006/04/06 - Erik Augustson <erik_27can@yahoo.com> +- Fixed IPC and drag&drop appending files to the + playlist instead of opening them right away. +- Updated dvdnav patch. + +2006/04/03 - Erik Augustson <erik_27can@yahoo.com> +- Fixed a long pathnames issue with WM_COPYDATA. +- Fixed a minor crash happening when rendering the + codec name. +- Some code cleanup. + +2006/04/01 - Erik Augustson <erik_27can@yahoo.com> +- Added ability to enable/disable videos displaying + in the sub window in preferences. +- Small fix in update_subwindow() for coming out + of fullscreen when the sub window was minimized. + +2006/03/27 - Erik Augustson <erik_27can@yahoo.com> +- Updated to current CVS. +- Debug console now shows the extensions mplayer + was compiled with. + +2006/03/23 - Erik Augustson <erik_27can@yahoo.com> +- Fixed using -playlist and -shuffle. + +2006/03/22 - Erik Augustson <erik_27can@yahoo.com> +- Fixed a small bug with input events for dialogs. + +2006/03/16 - Erik Augustson <erik_27can@yahoo.com> +- Fixed left button mouse event in dvdnav patch. +- More aspect fixes. +- Fixed double-click in the playlist. +- Fixed some drag&drop functionality. + +2006/03/14 - Erik Augustson <erik_27can@yahoo.com> +- Simplified title/chapter selection dialog. +- Code cleanup. + +2006/03/14 - Erik Augustson <erik_27can@yahoo.com> + +- Fixed resetting aspect on file ending in mplEnd() + +2006/03/13 - Erik Augustson <erik_27can@yahoo.com> +- Fixed double click events, forgot to add CS_DBLCLKS + to sub window's window style. +- Fixed window focusing with drag&drop files. +- Re-arranged some menu items, and added support for + runtime aspect switching. This adds 3 lines to + mplayer.c but is well worth it IMO. + +2006/03/12 - Erik Augustson <erik_27can@yahoo.com> +- Fixed window positioning for both windows. +- Added more mouse button events. + +2006/03/10 - Erik Augustson <erik_27can@yahoo.com> +- Fixed mouse and sub window vanishing after coming + out of fullscreen by end of file. +- Fixed sub window popping up when switching to + fullscreen and *not* using directx. +- Added codec name to widgets to properly render + in some skins. +- Middle and scroll wheel mouse event should work + now on the sub window. +- #ifdef'd USE_DVDREAD to allow for compilation + when disabling mpdvdkit. +- Updated license information. + +2006/03/08 - Erik Augustson <erik_27can@yahoo.com> +- Removed unnecessary playerinfo struct +- Fixed movies playing at wrong aspects +- Minor bugfixes all around + +2006/03/07 - Erik Augustson <erik_27can@yahoo.com> +- Fixed some skin labels not displaying properly + +2006/03/06 - Gianluigi Tiesi <sherpya@netfarm.it> +- Temporaly fix crash if no vo_driver is specified + (interface.c:877) + +2006/02/28 - Erik Augustson <erik_27can@yahoo.com> +- Added sub window. The sub window is the WinID + (-wid) when using the directx vo. The sub window + hides when the file is audio only, and as well + when the vo is not directx, and automatically + adjusts and maintains video aspect ratios +- Minor fixups +- TODO: Get WinID working when using gl2, and add + fix for both windows if going out of bounds on + right and bottom of screen. + +2006/01/30 - Erik Augustson <erik_27can@yahoo.com> +- Fixed playing movies from network drives. + +2006/01/27 - Erik Augustson <erik_27can@yahoo.com> +- Fixed a small annoyance when playing a network file + with file associations when mplayer wasn't running, + using GetLongPathNameA() + +2006/01/15 - Erik Augustson <erik_27can@yahoo.com> +- Added some CD functionality if using libcdio. + +2005/12/02 - Erik Augustson <erik_27can@yahoo.com> +- Fix to disable gui if running in slave mode. + +2005/11/14 - Erik Augustson <erik_27can@yahoo.com> +- Implemented IPC with WM_COPYDATA to open new + files/playlists in the current running mplayer, + rather than having a new mplayer process spawn. + +2005/11/12 - Erik Augustson <erik_27can@yahoo.com> +- Modified evMute to mute/unmute +- Mute button should show as pressed when muted +- Added evDecVolume and evIncVolume + +2005/11/09 - Erik Augustson <erik_27can@yahoo.com> +- Fixed screensaver issues + +2005/11/06 - Erik Augustson <erik_27can@yahoo.com> +- Display fixes + +2005/09/18 - Erik Augustson <erik_27can@yahoo.com> +- Playlist additions +- Minor playlist bugfixes + +2005/09/16 - Gianluigi Tiesi <sherpya@netfarm.it> +- Code cleanup + +2005/09/05 - Erik Augustson <erik_27can@yahoo.com> +- Updated to apply to current CVS + +2005/07/27 - Erik Augustson <erik_27can@yahoo.com> +- Added initial evEqualizer for brightness, contrast, + hue and saturation of videos. + +2005/07/26 - Erik Augustson <erik_27can@yahoo.com> +- Fixed double click on playlist +- Added support for screenshot video filter, vf_screenshot patch + is also needed + +2005/06/19 - Gianluigi Tiesi <sherpya@netfarm.it> +- Removed -console switch, moved console stuff out of mplayer main, + console option is handled in wincfg, it's switchable at runtime + from the gui and the state is saved + +2005/06/15 - Erik Augustson <erik_27can@yahoo.com> +- Fixed bugs with DVD chapter skipping +- Title/chapter switching dialog works again :) +- Fixed a bug with url's not working after playing a DVD +- Removed fullscreen handling from mplayer.c. It's now + handled in interface.c +- Disabled loading/saving playlists, and adding files/urls + while playing a DVD + +2005/06/12 - Gianluigi Tiesi <sherpya@netfarm.it> +- Added -console cmd line option to bring up a dos console + that displays mplayer messages + +2005/06/10 - Erik Augustson <erik_27can@yahoo.com> +- Fixed a bug with the audio filters not loading +- Fixed bugs with the audio delay and stereo sliders +- Added a few safety checks + +2005/06/08 - Erik Augustson <erik_27can@yahoo.com> +- Added initial evPreferences +- Fixed a bug with the load subtitle dialog +- Some code cleanup and minor fixes here and there + +2005/06/02 - Erik Augustson <erik_27can@yahoo.com> +- Fixed a bug with pathnames in the open url dialog + +2005/05/26 - Erik Augustson <erik_27can@yahoo.com> +- Added "Add file" and "Add url" menu to the playlist +- Fixed file skipping when double-clicking playlist entries + +2005/05/19 - Erik Augustson <erik_27can@yahoo.com> +- added simple url history + +2005/05/12 - Erik Augustson <erik_27can@yahoo.com> +- added load and save playlists options +- fixed opening remote m3u and pls files in open url +- no problems so far with evprev and evnext :) + +2005/05/10 - Erik Augustson <erik_27can@yahoo.com> +- more evNext and evPrev fixes + +2005/05/06 - Erik Augustson <erik_27can@yahoo.com> +- implemented mplEnd() for proper looping fix +- fixed bugs in evNext and evPrev +- re-organized the menus + +2005/03/02 - Gianluigi Tiesi <sherpya@netfarm.it> +- adapted subtitle patch from Raul <zomps@mail.astar.ee> +- readapted endless loop fix to not touch mp_msg.c +Erik Augustson <erik_27can@yahoo.com> +- small fixes, orginal endless loop fix + +2005/02/25 - Gianluigi Tiesi <sherpya@netfarm.it> +- Fixed exit stuff (I hope ;P) +- Fixes to Erik's title/chapter selector +Erik Augustson <erik_27can@yahoo.com> +- Added additional gui events +- Added evPrev and evNext dvd chapter switching + +2005/02/23 - Erik Augustson <erik_27can@yahoo.com> +- added dvd title/chapter switching + +2005/02/20 - Gianluigi Tiesi <sherpya@netfarm.it> +- fixed dvd stop and play +Erik Augustson <erik_27can@yahoo.com> +- imported some stuff from unix gui +- fixed file play after dvd + +2005/02/18 - Erik Augustson <erik_27can@yahoo.com> +- addons for dvd playing + +2005/02/16 - Gianluigi Tiesi <sherpya@netfarm.it> +- renamed README to README.txt +- retain window position even when switching the skin +- converted all opendir calls to native win32 calls +- adding filename as title without directory for all calls +- more cleanups in skinloader/unloader +- removed a lot of warnings +- removed unused includes +Erik Augustson <erik_27can@yahoo.com> +- added online help menu + +2005/02/15 - Gianluigi Tiesi <sherpya@netfarm.it> +- Disabled access to gui when gui->mainwindow doesn't match hwnd passed to windproc +- Fixed save position for main window gui +- Cleanups in skinloader/unloader +Erik Augustson erik_27can@yahoo.com +- Added saving main window position to gui config +- Fixes on playlist for vcd + +2005/02/13 - Gianluigi Tiesi <sherpya@netfarm.it> +- Fixed multithreaded (I hope ;P) +- Skinbrowser window is closed when a skin is changed, this prevents crashes if multiple clicks +- Playlist window is updated if files are added while playlist is visible +- Removed patch on mplayer.rc, take icon using the included routine +- SkinBrowser and Playlist dialogs can be opened/closed by clicking multiple times gui buttons +- Added support for DVD, stop dvd + play is broken ;( +- ifdef-ed a lot of debug stuff +- Fixed systray icon removing +- Added Erik and me to about dialog ;) +Erik Augustson <erik_27can@yahoo.com> +- Added key handling for the gui window +- Small fixes on tray icon stuff + +2005/02/11 - Gianluigi Tiesi <sherpya@netfarm.it> +- fixed sliders, balance is not 100% working, anyway dsound output driver doesn't support balanced audio +- remade threaded +- removed demuxer/avi patches, really needed ?? +- added a fake vo_init if opengl is not enabled +Erik Augustson <erik_27can@yahoo.com> +- fixes on traymenu play +- added a base configuration reader/writer - only support for skin selection for now + +2005/02/10 - Gianluigi Tiesi <sherpya@netfarm.it> +- fixed (workarounded) the NULL filename bug +- moved add directory directly into gui.c +- it starts to be usable :) +Erik Augustson <erik_27can@yahoo.com> +- Added systray support +- Added skin browser option to menu (some skins don't show a skin browser button) + +2005/02/09 - Gianluigi Tiesi <sherpya@netfarm.it> +- Fixed window disappearing bug +- Made a patch compatible with current tree +- Fixed icons in minor dialogs +- Major cleanup and code reorganization + +2005/02/08 - Erik Augustson <erik_27can@yahoo.com> +- Removed multi-threading, mplayer now runs in a single thread +- Play directory now works as intended +- Added a Skin browser, double-click skin names to switch skins +- Still more things todo + +pre4 +- URL open +- use windows native menus +- Gui runs in a separate thread now because some controls interrupt playback :( + +pre 3 +- some of the previous features broken again +- full font loading/display support +- better integration into mplayer +- seek bar, balance, volume control work + +pre 2 +- playlist +- Drag 'N Drop support +- fixed segfault when no skinfile found + +pre 1 +- initial revision +- play/pause works +- loads "blue" skin +- still lot of things todo diff --git a/gui/win32/README b/gui/win32/README new file mode 100644 index 0000000000..7463258d2f --- /dev/null +++ b/gui/win32/README @@ -0,0 +1,20 @@ +MPlayer Windows GUI (c) +2003 Sascha Sommer - <saschasommer@freenet.de> +2006 Erik Augustson - <erik_27can@yahoo.com> +2006 Gianluigi Tiesi - <sherpya@netfarm.it> + +This beta gui for win32 was originally written by Sascha Sommer and +has since been heavily modified by myself (Erik Augustson) and Gianluigi +Tiesi. It follows the same concept for the linux gui, and should be +able to load all(most) of the current skins available for the linux gui. + +To compile, quite simply pass --enable-gui to configure, and it is highly +recommended to also pass --enable-static="-mwindows" to link mplayer as +a windows binary. NOTE: this will also link mencoder with -mwindows +and thus link mencoder as a windows binary as well. + +To enable use of the gui, mplayer.exe must be renamed to/copied as +gmplayer.exe. + +Please send all bug reports/comments/requests/gripes to: +<erik_27can@yahoo.com> diff --git a/gui/win32/dialogs.c b/gui/win32/dialogs.c new file mode 100644 index 0000000000..6b38f8635f --- /dev/null +++ b/gui/win32/dialogs.c @@ -0,0 +1,1133 @@ +/* + MPlayer Gui for win32 + Copyright (c) 2003 Sascha Sommer <saschasommer@freenet.de> + Copyright (c) 2006 Erik Augustson <erik_27can@yahoo.com> + Copyright (c) 2006 Gianluigi Tiesi <sherpya@netfarm.it> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA +*/ + +#include <windows.h> +#include <commctrl.h> +#include <interface.h> +#include <mp_msg.h> +#include <help_mp.h> +#include <stream/stream.h> +#include <libmpdemux/demuxer.h> +#include <libmpdemux/stheader.h> +#include "gui.h" +#include "wincfg.h" +#include "dialogs.h" +#include "libvo/sub.h" + +WNDPROC OldUrlWndProc; +LRESULT CALLBACK SubUrlWndProc(HWND, UINT, WPARAM, LPARAM); +extern int vo_gamma_brightness; +extern int vo_gamma_saturation; +extern int vo_gamma_contrast; +extern int vo_gamma_hue; +extern int set_video_colors(sh_video_t *sh_video, char *item, int value); +extern int get_video_colors(sh_video_t *sh_video, char *item, int *value); + +guiInterface_t guiIntfStruct; +int addurl = 0; + +extern mp_osd_obj_t* vo_osd_list; +extern char **sub_name; + +void guiLoadSubtitle(char *name) +{ + if (!guiIntfStruct.Playing) + { + guiIntfStruct.SubtitleChanged = 1; + return; + } + if (subdata) + { + mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_DeletingSubtitles); + sub_free(subdata); + subdata = NULL; + vo_sub = NULL; + if (vo_osd_list) + { + int len; + mp_osd_obj_t *osd = vo_osd_list; + while (osd) + { + if (osd->type == OSDTYPE_SUBTITLE) break; + osd = osd->next; + } + if (osd && osd->flags & OSDFLAG_VISIBLE) + { + len = osd->stride * (osd->bbox.y2 - osd->bbox.y1); + memset(osd->bitmap_buffer, 0, len); + memset(osd->alpha_buffer, 0, len); + } + } + } + + if (name) + { + mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_LoadingSubtitles, name); + subdata = sub_read_file(strdup(name), guiIntfStruct.FPS); + if (!subdata) mp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_CantLoadSub,name); + sub_name = (malloc(2 * sizeof(char*))); /* when mplayer will be restarted */ + sub_name[0] = strdup(name); /* sub_name[0] will be read */ + sub_name[1] = NULL; + } + update_set_of_subtitles(); +} + +int display_openfilewindow(gui_t *gui, int add) +{ + OPENFILENAME fileopen; + int result = 0; + char filelist[MAXFILE]; + char filename[MAX_PATH]; + char directory[MAX_PATH]; + char *filespec = NULL; + char *filepart = NULL; + + memset(&fileopen, 0, sizeof(OPENFILENAME)); + memset(filelist, 0, sizeof(filelist)); + + fileopen.lStructSize = sizeof(OPENFILENAME); + fileopen.hwndOwner = gui->mainwindow; + fileopen.hInstance = GetModuleHandle(NULL); + fileopen.lpstrFilter = "All Files (*.*)\0*.*\0" + "Media Files (*.avi;*.asf;*.wmv;*.mpg;*.mpeg;*.m2v;*.mov;\ + *.rmvb;*.rm;*.ogm;*.mp3;*.wav;*.wma;*.ra;*.ogg)\0\ + *.avi;*.asf;*.wmv;*.mpg;*.mpeg;*.m2v;*.mov;\ + *.rmvb;*.rm;*.ogm;*.mp3;*.wav;*.wma;*.ra;*.ogg\0" + "Video Files (*.avi;*.mpg;*.mpeg;*.mov)\0*.avi;*.mpg;*.mpeg;*.mov\0" + "Avisynth Scripts (*.avs)\0*.avs\0" + "Audio Files (*.mp3;*.wav;*.ra)\0*.mp3;*.wav;*.ra\000"; + fileopen.nFilterIndex = 0; + fileopen.lpstrTitle = "Add file(s)..."; + fileopen.Flags = OFN_ALLOWMULTISELECT | OFN_FILEMUSTEXIST| OFN_LONGNAMES | OFN_EXPLORER| OFN_READONLY | OFN_HIDEREADONLY; + fileopen.lpstrFile = filelist; + fileopen.lpstrCustomFilter = NULL; + fileopen.nMaxFile = MAXFILE; + + if(GetOpenFileName(&fileopen)) + { + /* clear playlist */ + if(!add) gui->playlist->clear_playlist(gui->playlist); + + memcpy(directory, fileopen.lpstrFile, fileopen.nFileOffset - 1); + directory[fileopen.nFileOffset - 1] = 0; + + do + { + filespec = &fileopen.lpstrFile[fileopen.nFileOffset]; + filename[0] = 0; + strcat(filename, directory); + strcat(filename, "\\"); + strcat(filename, filespec); + + if (GetFileAttributes(filename) & FILE_ATTRIBUTE_DIRECTORY) + mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] %s is a directory, skipping...\n", filename); + else + { + if (GetFullPathName(filename, MAX_PATH, filename, &filepart)) + { + mplSetFileName(NULL, filename, STREAMTYPE_FILE); + if(!parse_filename(filename, playtree, mconfig, 0)) + gui->playlist->add_track(gui->playlist, filename, NULL, filepart, 0); + mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] Adding file: %s - path %s\n", filespec, filename); + result++; + } + } + fileopen.nFileOffset += strlen(filespec) + 1; + } while (*filespec); + } + return result; +} + +void display_opensubtitlewindow(gui_t *gui) +{ + OPENFILENAME subtitleopen; + char subtitlefile[MAX_PATH]; + + /* Safety check */ + if (guiIntfStruct.Playing == 0 || !guiIntfStruct.sh_video) return; + + memset(&subtitleopen, 0, sizeof(OPENFILENAME)); + memset(subtitlefile, 0, sizeof(subtitlefile)); + + subtitleopen.lStructSize = sizeof(OPENFILENAME); + subtitleopen.hwndOwner = gui->mainwindow; + subtitleopen.hInstance = GetModuleHandle(NULL); + subtitleopen.lpstrFilter = "All Files (*.*)\0*.*\0" + "Subtitle Files (*.srt;*.txt;*.vob)\0*.srt;*.txt;*.vob\0"; + subtitleopen.nFilterIndex = 0; + subtitleopen.lpstrTitle = "Add Subtitle..."; + subtitleopen.Flags = OFN_FILEMUSTEXIST | OFN_LONGNAMES | OFN_EXPLORER | OFN_READONLY | OFN_HIDEREADONLY; + subtitleopen.lpstrFile = subtitlefile; + subtitleopen.lpstrCustomFilter = NULL; + subtitleopen.nMaxFile = MAXFILE; + + if(GetOpenFileName(&subtitleopen)) + guiLoadSubtitle(subtitlefile); +} + +void display_loadplaylistwindow(gui_t *gui) +{ + OPENFILENAME playlistopen; + char playlistfile[MAX_PATH]; + + memset(&playlistopen, 0, sizeof(OPENFILENAME)); + memset(playlistfile, 0, sizeof(playlistfile)); + + playlistopen.lStructSize = sizeof(OPENFILENAME); + playlistopen.hwndOwner = gui->mainwindow; + playlistopen.hInstance = GetModuleHandle(NULL); + playlistopen.lpstrFilter = "All Files (*.*)\0*.*\0" + "Playlist Files (*.m3u;*.pls;*.txt)\0*.m3u;*.pls;*.txt\0"; + playlistopen.nFilterIndex = 0; + playlistopen.lpstrTitle = "Load Playlist..."; + playlistopen.Flags = OFN_FILEMUSTEXIST | OFN_LONGNAMES | OFN_EXPLORER | OFN_READONLY | OFN_HIDEREADONLY; + playlistopen.lpstrFile = playlistfile; + playlistopen.lpstrCustomFilter = NULL; + playlistopen.nMaxFile = MAXFILE; + + if(GetOpenFileName(&playlistopen)) + { + if(parse_filename(playlistfile, playtree, mconfig, 1)) + gui->startplay(gui); + } +} + +void display_saveplaylistwindow(gui_t* gui) +{ + OPENFILENAME playlistsave; + static FILE *playlist_file = NULL; + char playlistname[MAX_PATH]; + + memset(&playlistsave, 0, sizeof(OPENFILENAME)); + memset(playlistname, 0, sizeof(playlistname)); + + playlistsave.lStructSize = sizeof(OPENFILENAME); + playlistsave.hwndOwner = gui->mainwindow; + playlistsave.hInstance = GetModuleHandle(NULL); + playlistsave.lpstrFilter = "Playlist Files (*.pls)\0*.pls\0"; + playlistsave.nFilterIndex = 0; + playlistsave.lpstrTitle = "Save Playlist..."; + playlistsave.Flags = OFN_LONGNAMES | OFN_EXPLORER | OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY; + playlistsave.lpstrFile = playlistname; + playlistsave.lpstrCustomFilter = NULL; + playlistsave.nMaxFile = MAXFILE; + + if(GetSaveFileName(&playlistsave)) + { + int i=0; + HANDLE my_playlist; + + if(!strstr(playlistname, ".pls")) strcat(playlistname, ".pls"); + + my_playlist = CreateFile(playlistname, + GENERIC_WRITE, + 0, + NULL, + CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, + NULL); + + if(my_playlist != INVALID_HANDLE_VALUE) + { + CloseHandle(my_playlist); /* close the file first so we can write to it */ + playlist_file = fopen(playlistsave.lpstrFile, "w"); + fprintf(playlist_file, "[playlist]\n"); + fprintf(playlist_file, "numberofentries=%d\n", gui->playlist->trackcount); + + for(i=0; i<(gui->playlist->trackcount); i++) + { + fprintf(playlist_file, "File%i=%s\n", i + 1, gui->playlist->tracks[i]->filename); + fprintf(playlist_file, "Length%i=-1\n", i + 1); + } + fclose(playlist_file); + } + } +} + +static LRESULT CALLBACK OpenUrlWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) +{ + static HWND url; + HWND wdg; + FILE *f; + char *history = get_path("gui.url"); + gui_t *gui = (gui_t *) GetWindowLongPtr(hwnd, GWLP_USERDATA); + switch (iMsg) + { + case WM_CREATE: + wdg = CreateWindow("button", "Ok", + WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, + 4, 43, 80, 25, hwnd, + (HMENU) ID_OK, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + wdg = CreateWindow("button", "Cancel", + WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, + 90, 43, 80, 25, hwnd, + (HMENU) ID_CANCEL, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + url = wdg = CreateWindowEx(WS_EX_CLIENTEDGE, + "edit", NULL, + WS_CHILD | WS_VISIBLE | ES_LEFT | ES_AUTOHSCROLL, + 4, 10, 300, 25, hwnd, + (HMENU) ID_URL, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + SendMessage(wdg, EM_SETLIMITTEXT, MAX_PATH, 0); + + /*subclass the edit box to capture the VK_RETURN key*/ + OldUrlWndProc = (WNDPROC)SetWindowLongPtr(url, GWLP_WNDPROC, (LONG_PTR)SubUrlWndProc); + + if((f = fopen(history, "r"))) + { + char lasturl[MAX_PATH]; + fgets(lasturl, MAX_PATH, f); + SendMessage(url, WM_SETTEXT, 0, (LPARAM) lasturl); + SendMessage(url, EM_SETSEL, 0, -1); + fclose(f); + } + break; + case WM_KEYDOWN: + switch (LOWORD(wParam)) + { + case VK_RETURN: + SendMessage(hwnd, WM_COMMAND, (WPARAM) ID_OK, 0); + break; + } + case WM_COMMAND: + { + switch (LOWORD(wParam)) + { + case ID_CANCEL: + DestroyWindow(hwnd); + return 0; + case ID_OK: + { + char file[MAX_PATH]; + SendMessage(url, WM_GETTEXT, MAX_PATH, (LPARAM) file); + mplSetFileName(NULL, file, STREAMTYPE_STREAM); + if((f = fopen(history, "wt+"))) + { + fprintf(f, file); + fclose(f); + } + if(!parse_filename(file, playtree, mconfig, addurl? 0 : 1)) + gui->playlist->add_track(gui->playlist, file, NULL, NULL, 0); + if(!addurl) + gui->startplay(gui); + else update_playlistwindow(); + DestroyWindow(hwnd); + } + break; + } + } + return 0; + case WM_DESTROY: + { + PostQuitMessage (0); + addurl = 0; + return 0; + } + } + return DefWindowProc(hwnd, iMsg, wParam, lParam); +} + +LRESULT CALLBACK SubUrlWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) +{ + switch(iMsg) + { + case WM_KEYDOWN: + switch (LOWORD(wParam)) + { + case VK_RETURN: + SendMessage(FindWindow(NULL, "MPlayer - Open URL..."), WM_COMMAND, (WPARAM) ID_OK, 0); + break; + } + } + return CallWindowProc(OldUrlWndProc, hwnd, iMsg, wParam, lParam); +} + +void display_openurlwindow(gui_t *gui, int add) +{ + HWND hWnd; + HINSTANCE hInstance = GetModuleHandle(NULL); + WNDCLASS wc; + int x, y; + + if(add) addurl = 1; + if(FindWindow(NULL, "MPlayer - Open URL...")) return; + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.lpfnWndProc = OpenUrlWndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = hInstance; + wc.hCursor = LoadCursor(NULL,IDC_ARROW); + wc.hIcon = gui->icon; + wc.hbrBackground = SOLID_GREY2; + wc.lpszClassName = "MPlayer - URL"; + wc.lpszMenuName = NULL; + RegisterClass(&wc); + x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (320 / 2); + y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (100 / 2); + hWnd = CreateWindow("MPlayer - URL", + "MPlayer - Open URL...", + WS_POPUPWINDOW | WS_CAPTION, + x, + y, + 320, + 100, + NULL, + NULL, + hInstance, + NULL); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui); + ShowWindow(hWnd, SW_SHOW); + UpdateWindow(hWnd); +} + +static void create_playlistmenu(gui_t *gui) +{ + gui->playlistmenu = CreatePopupMenu(); + AppendMenu(gui->playlistmenu, MF_STRING, ID_ADDFILE, "Add File..."); + AppendMenu(gui->playlistmenu, MF_STRING, ID_ADDURL, "Add Url..."); + AppendMenu(gui->playlistmenu, MF_SEPARATOR, 0, 0); + AppendMenu(gui->playlistmenu, MF_STRING, ID_REMOVE, "Remove Selected"); + AppendMenu(gui->playlistmenu, MF_STRING, ID_CLEAR, "Clear Playlist"); + AppendMenu(gui->playlistmenu, MF_SEPARATOR, 0, 0); + AppendMenu(gui->playlistmenu, MF_STRING, ID_CLOSE, "Close"); +} + +static void updatetracklist(HWND hwnd) +{ + int i=0; + gui_t *gui = (gui_t *) GetWindowLongPtr(hwnd, GWLP_USERDATA); + /* clear listbox */ + SendDlgItemMessage(hwnd, ID_TRACKLIST, LB_RESETCONTENT, 0, 0); + for (i=0; i < gui->playlist->trackcount; i++) + if (gui->playlist->tracks[i]->title) + SendDlgItemMessage(hwnd, ID_TRACKLIST, LB_ADDSTRING, 0, (LPARAM)gui->playlist->tracks[i]->title); + else + SendDlgItemMessage(hwnd, ID_TRACKLIST, LB_ADDSTRING, 0, (LPARAM)gui->playlist->tracks[i]->filename); +} + +static LRESULT CALLBACK PlayListWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) +{ + HWND wdg; + POINT cursor; + gui_t *gui = (gui_t *) GetWindowLongPtr(hwnd, GWLP_USERDATA); + playlist_t *pl = gui ? gui->playlist : NULL; + switch (iMsg) + { + case WM_CREATE: + { + wdg = CreateWindow("button", "Play", + WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, + 4, 10, 80, 25, hwnd, + (HMENU) ID_PLAY, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + wdg = CreateWindow ("button", "Up", + WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, + 4, 37, 80, 25, hwnd, + (HMENU) ID_UP, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(wdg, WM_SETFONT,(WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + wdg = CreateWindow ("button", "Down", + WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, + 4, 64, 80, 25, hwnd, + (HMENU) ID_DOWN, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT),0); + + wdg = CreateWindow ("button", "Remove", + WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, + 4, 91, 80, 25, hwnd, + (HMENU) ID_REMOVE, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT),0); + + wdg = CreateWindow ("button", "Load", + WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, + 4, 118, 80, 25, hwnd, + (HMENU) ID_PLAYLISTLOAD, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT),0); + + wdg = CreateWindow ("button", "Save", + WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, + 4, 145, 80, 25, hwnd, + (HMENU) ID_PLAYLISTSAVE, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT),0); + + wdg = CreateWindow ("button", "Close", + WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, + 4, 193, 80, 25, hwnd, + (HMENU) ID_CLOSE, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT),0); + + wdg = CreateWindow ("listbox", "tracklist", WS_CHILD | WS_VISIBLE | LBS_NOTIFY | WS_VSCROLL | + WS_HSCROLL | LBS_DISABLENOSCROLL, 92, 10, 300, 208, hwnd, (HMENU) ID_TRACKLIST, + ((LPCREATESTRUCT) lParam) -> hInstance, NULL); + SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + SendMessage(wdg, LB_SETHORIZONTALEXTENT, MAX_PATH*4, 0); + break; + } + case WM_CONTEXTMENU: + { + GetCursorPos(&cursor); + SetForegroundWindow(hwnd); + TrackPopupMenu(gui->playlistmenu, 0, cursor.x, cursor.y, 0, hwnd, NULL); + break; + } + case WM_COMMAND: + { + int selected = 0; + int i; + for (i=0; i<pl->trackcount; i++) + if(0 < SendDlgItemMessage(hwnd, ID_TRACKLIST, LB_GETSEL, i, 0)) selected = i + 1; + switch (LOWORD(wParam)) + { + case ID_CLOSE: + DestroyWindow(hwnd); + return 0; + case ID_TRACKLIST: + if(HIWORD(wParam) == LBN_DBLCLK) + { + case ID_PLAY: + if(selected) pl->current = selected - 1; + mplSetFileName(NULL, pl->tracks[pl->current]->filename, STREAMTYPE_STREAM); + gui->startplay(gui); + } + return 0; + case ID_UP: + { + if(selected) pl->moveup_track(pl, selected); + selected--; + break; + } + case ID_DOWN: + { + if(selected) pl->movedown_track(pl, selected); + selected++; + break; + } + case ID_REMOVE: + if(selected) pl->remove_track(pl, selected); + break; + case ID_ADDFILE: + { + if(guiIntfStruct.StreamType == STREAMTYPE_DVD || + guiIntfStruct.StreamType == STREAMTYPE_DVDNAV) return 0; + display_openfilewindow(gui, 1); + break; + } + case ID_ADDURL: + { + if(guiIntfStruct.StreamType == STREAMTYPE_DVD || + guiIntfStruct.StreamType == STREAMTYPE_DVDNAV) return 0; + display_openurlwindow(gui, 1); + break; + } + case ID_CLEAR: + { + if(!gui->playlist->trackcount) return 0; + gui->playlist->clear_playlist(gui->playlist); + break; + } + case ID_PLAYLISTLOAD: + { + if(guiIntfStruct.StreamType == STREAMTYPE_DVD || + guiIntfStruct.StreamType == STREAMTYPE_DVDNAV) return 0; + display_loadplaylistwindow(gui); + break; + } + case ID_PLAYLISTSAVE: + { + /* no point saving an empty playlist */ + if(!gui->playlist->trackcount || + guiIntfStruct.StreamType == STREAMTYPE_DVD || + guiIntfStruct.StreamType == STREAMTYPE_DVDNAV) + return 0; + display_saveplaylistwindow(gui); + break; + } + } + updatetracklist(hwnd); + if(selected < 1) selected = 1; + else if(selected>pl->trackcount) selected = pl->trackcount; + SendDlgItemMessage(hwnd, ID_TRACKLIST, LB_SETCURSEL, selected - 1, 0); + return 0; + } + case WM_DROPFILES: + { + char file[MAX_PATH]; + int filecount = DragQueryFile((HDROP) wParam, -1, file, MAX_PATH); + int i; + for (i=0; i<filecount; i++) + { + DragQueryFile((HDROP) wParam, i, file, MAX_PATH); + if(!parse_filename(file, playtree, mconfig, 0)) + pl->add_track(pl, file, NULL, NULL, 0); + } + DragFinish((HDROP) wParam); + updatetracklist(hwnd); + } + break; + case WM_DESTROY: + PostQuitMessage(0); + return 0; + } + return DefWindowProc(hwnd, iMsg, wParam, lParam); +} + +void update_playlistwindow(void) +{ + HWND hWnd = FindWindow(NULL, "MPlayer Playlist"); + if (hWnd) updatetracklist(hWnd); +} + +void display_playlistwindow(gui_t *gui) +{ + HWND hWnd = FindWindow(NULL, "MPlayer Playlist"); + HINSTANCE hInstance = GetModuleHandle(NULL); + WNDCLASS wc; + int x, y; + + if (hWnd) + { + SendMessage(hWnd, WM_CLOSE, 0, 0); + return; + } + + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.lpfnWndProc = PlayListWndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = hInstance; + wc.hCursor = LoadCursor(NULL,IDC_ARROW); + wc.hIcon = gui->icon; + wc.hbrBackground = SOLID_GREY2; + wc.lpszClassName = "MPlayer - Playlist"; + wc.lpszMenuName = NULL; + RegisterClass(&wc); + create_playlistmenu(gui); + x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (400 / 2); /* Erik: center popup window on screen */ + y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (254 / 2); + hWnd = CreateWindow("MPlayer - Playlist", + "MPlayer Playlist", + WS_POPUPWINDOW | WS_CAPTION | WS_MINIMIZEBOX, + x, + y, + 400, + 254, + NULL, + NULL, + hInstance, + NULL); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD)gui); + updatetracklist(hWnd); + DragAcceptFiles(hWnd,TRUE); + ShowWindow(hWnd, SW_SHOW); + UpdateWindow(hWnd); +} + +static LRESULT CALLBACK SkinBrowserWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) +{ + static HWND listbox; + static char skinspath[MAX_PATH]; + gui_t* gui = (gui_t*) GetWindowLongPtr(hwnd, GWLP_USERDATA); + switch (iMsg) + { + case WM_CREATE: + { + HANDLE skinHandle = INVALID_HANDLE_VALUE; + WIN32_FIND_DATA finddata; + + listbox = CreateWindow("listbox", NULL, + WS_CHILD | WS_VISIBLE | LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | + LBS_DISABLENOSCROLL | WS_VSCROLL | WS_TABSTOP, + 4, 5, 166, 60, hwnd, + (HMENU) ID_DIR, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(listbox, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + /* This opens the skins directory, lists the directory names, and adds them to the listbox */ + sprintf(skinspath, "%s/*.", get_path("skins")); + + skinHandle = FindFirstFile(skinspath, &finddata); + if (skinHandle != INVALID_HANDLE_VALUE) + { + do + { + if (finddata.cFileName[0] == '.') continue; + /* populate the listbox */ + capitalize(finddata.cFileName); + SendDlgItemMessage(hwnd, ID_DIR, LB_ADDSTRING, 0, (LPARAM) finddata.cFileName); + } while (FindNextFile(skinHandle, &finddata)); + FindClose(skinHandle); + } + else + mp_msg(MSGT_GPLAYER, MSGL_FATAL, "Error opening %s\n", get_path("skins")); + break; + } + case WM_COMMAND: + { + if ((HWND) lParam == listbox) + { + if(HIWORD(wParam) == LBN_DBLCLK) + { + int index = SendMessage(listbox, LB_GETCURSEL, 0, 0); + int len = SendMessage(listbox, LB_GETTEXTLEN, index, 0); + if (len) + { + if (guiIntfStruct.Playing) guiGetEvent(guiCEvent, (void *) guiSetStop); + if (skinName) free(skinName); + skinName = (char *) malloc(len+1); + SendMessage(listbox, LB_GETTEXT, (WPARAM) index, (LPARAM) skinName); + /* fill out the full pathname to the skin */ + strcpy(skinspath, get_path("skins")); + strcat(skinspath, "\\"); + strcat(skinspath, skinName); + ShowWindow(hwnd, SW_HIDE); + Shell_NotifyIcon(NIM_DELETE, &nid); + destroy_window(gui); + create_window(gui, skinspath); + create_subwindow(gui, skinspath); + SendMessage(hwnd, WM_CLOSE, 0, 0); /* Avoid crashing when switching skin */ + } + } + } + } + return 0; + case WM_DESTROY: + PostQuitMessage(0); + return 0; + } + return DefWindowProc(hwnd, iMsg, wParam, lParam); +} + +void display_skinbrowser(gui_t* gui) +{ + HWND hWnd = FindWindow(NULL, "Skin Browser"); + HINSTANCE hInstance = GetModuleHandle(NULL); + WNDCLASS wc; + int x, y; + + if (hWnd) + { + SendMessage(hWnd, WM_CLOSE, 0, 0); + return; + } + + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.lpfnWndProc = SkinBrowserWndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = hInstance; + wc.hCursor = LoadCursor(NULL, IDC_ARROW); + wc.hIcon = gui->icon; + wc.hbrBackground = SOLID_GREY2; + wc.lpszClassName = "Skin Browser"; + wc.lpszMenuName = NULL; + RegisterClass(&wc); + x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (180 / 2); + y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (102 / 2); + hWnd = CreateWindow("Skin Browser", + "Skin Browser", + WS_POPUPWINDOW |WS_CAPTION, + x, + y, + 180, + 102, + NULL, + NULL, + hInstance, + NULL); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui); + ShowWindow(hWnd, SW_SHOW); + UpdateWindow(hWnd); +} + +#ifdef USE_DVDREAD +static LRESULT CALLBACK TitleChapterWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) +{ + static HWND title; + static HWND chapter; + HWND wdg; + int i=0, j=0; + char titles[MAX_PATH] = ""; + char chapters[MAX_PATH] = ""; + gui_t *gui = (gui_t *) GetWindowLongPtr(hwnd, GWLP_USERDATA); + switch (iMsg) + { + case WM_CREATE: + wdg = CreateWindow("button", "Ok", + WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, + 4, 43, 80, 25, hwnd, + (HMENU) ID_OK, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + wdg = CreateWindow("button", "Cancel", + WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, + 90, 43, 80, 25, hwnd, + (HMENU) ID_CANCEL, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + title = CreateWindow("combobox", NULL, + CBS_DROPDOWNLIST | CB_SHOWDROPDOWN | CBS_NOINTEGRALHEIGHT | CBS_HASSTRINGS | + WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, + 4, 10, 80, 160, hwnd, + (HMENU) ID_TITLESEL, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + + SendMessage(title, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + chapter = CreateWindow("combobox", NULL, + CBS_DROPDOWNLIST | CB_SHOWDROPDOWN | CBS_NOINTEGRALHEIGHT | CBS_HASSTRINGS | + WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, + 90, 10, 80, 160, hwnd, + (HMENU) ID_CHAPTERSEL, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(chapter, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + for (i=0; i<guiIntfStruct.DVD.titles; i++) + { + /* we have to reverse the order here because of the way CB_INSERTSTRING adds items */ + sprintf(&titles[i], "%d", guiIntfStruct.DVD.titles - i); + SendDlgItemMessage(hwnd, ID_TITLESEL, CB_INSERTSTRING, 0, (LPARAM) &titles[i]); + } + SendDlgItemMessage(hwnd, ID_TITLESEL, CB_SETCURSEL, dvd_title, 0); + + for (j=0; j<guiIntfStruct.DVD.chapters; j++) + { + sprintf(&chapters[j], "%d", guiIntfStruct.DVD.chapters - j); + SendDlgItemMessage(hwnd, ID_CHAPTERSEL, CB_INSERTSTRING, 0, (LPARAM) &chapters[j]); + } + SendDlgItemMessage(hwnd, ID_CHAPTERSEL, CB_SETCURSEL, dvd_chapter, 0); + + break; + case WM_COMMAND: + { + switch (LOWORD(wParam)) + { + case ID_CANCEL: + DestroyWindow(hwnd); + return 0; + case ID_OK: + { + guiIntfStruct.DVD.current_title = SendMessage(title, CB_GETCURSEL, 0, 0) + 1; + guiIntfStruct.DVD.current_chapter = SendMessage(chapter, CB_GETCURSEL, 0, 0) + 1; + + if((guiIntfStruct.DVD.current_title != 0 || guiIntfStruct.DVD.current_chapter != 0)) + { + gui->startplay(gui); + DestroyWindow(hwnd); + } + } + break; + } + } + return 0; + case WM_DESTROY: + PostQuitMessage (0); + return 0; + } + return DefWindowProc(hwnd, iMsg, wParam, lParam); +} + +void display_chapterselwindow(gui_t *gui) +{ + HWND hWnd; + HINSTANCE hInstance = GetModuleHandle(NULL); + WNDCLASS wc; + int x, y; + + if (guiIntfStruct.StreamType != STREAMTYPE_DVD) return; + if (FindWindow(NULL, "Select Title/Chapter...")) return; + + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.lpfnWndProc = TitleChapterWndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = hInstance; + wc.hCursor = LoadCursor(NULL,IDC_ARROW); + wc.hIcon = gui->icon; + wc.hbrBackground = SOLID_GREY2; + wc.lpszClassName = "Select Title/Chapter..."; + wc.lpszMenuName = NULL; + RegisterClass(&wc); + x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (180 / 2); + y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (100 / 2); + hWnd = CreateWindow("Select Title/Chapter...", + "Select Title/Chapter...", + WS_POPUPWINDOW | WS_CAPTION, + x, + y, + 180, + 100, + NULL, + NULL, + hInstance, + NULL); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui); + ShowWindow(hWnd, SW_SHOW); + UpdateWindow(hWnd); +} +#endif + +static LRESULT CALLBACK EqWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) +{ + HWND btn, label, eq0, eq1, eq2, eq3; + + switch (iMsg) + { + case WM_CREATE: + { + btn = CreateWindow("button", "Reset", + WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, + 157, 143, 80, 25, hwnd, + (HMENU) ID_DEFAULTS, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + btn = CreateWindow("button", "Close", + WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, + 243, 143, 80, 25, hwnd, + (HMENU) ID_CLOSE, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + label = CreateWindow("static", "Brightness", + WS_CHILD | WS_VISIBLE, + 12, 122, 70, 15, hwnd, + NULL, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + label = CreateWindow("static", "Contrast", + WS_CHILD | WS_VISIBLE, + 99, 122, 70, 15, hwnd, + NULL, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + label = CreateWindow("static", "Hue", + WS_CHILD | WS_VISIBLE, + 191, 122, 70, 15, hwnd, + NULL, + ((LPCREATESTRUCT) lParam) -> hInstance, NULL); + SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + label = CreateWindow("static", "Saturation", + WS_CHILD | WS_VISIBLE, + 260, 122, 70, 15, hwnd, + NULL, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + eq0 = CreateWindow(TRACKBAR_CLASS, "brightness", + WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED | + TBS_VERT | TBS_NOTICKS, + 30, 0, 20, 120, hwnd, + (HMENU) ID_EQ0, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendDlgItemMessage(hwnd, ID_EQ0, TBM_SETRANGE, 1, MAKELONG(0, 200)); + + eq1 = CreateWindow(TRACKBAR_CLASS, "contrast", + WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED | + TBS_VERT | TBS_NOTICKS, + 112, 0, 20, 120, hwnd, + (HMENU) ID_EQ1, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendDlgItemMessage(hwnd, ID_EQ1, TBM_SETRANGE, 1, MAKELONG(0, 200)); + + eq2 = CreateWindow(TRACKBAR_CLASS, "hue", + WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED | + TBS_VERT | TBS_NOTICKS, + 194, 0, 20, 120, hwnd, + (HMENU) ID_EQ2, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendDlgItemMessage(hwnd, ID_EQ2, TBM_SETRANGE, 1, MAKELONG(0, 200)); + + eq3 = CreateWindow(TRACKBAR_CLASS, "saturation", + WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED | + TBS_VERT | TBS_NOTICKS, + 276, 0, 20, 120, hwnd, + (HMENU) ID_EQ3, + ((LPCREATESTRUCT) lParam) -> hInstance, NULL); + SendDlgItemMessage(hwnd, ID_EQ3, TBM_SETRANGE, 1, MAKELONG(0, 200)); + + if(guiIntfStruct.sh_video && guiIntfStruct.Playing) + { + EnableWindow(eq0, 1); EnableWindow(eq1, 1); EnableWindow(eq2, 1); EnableWindow(eq3, 1); + get_video_colors(guiIntfStruct.sh_video, "brightness", &vo_gamma_brightness); + get_video_colors(guiIntfStruct.sh_video, "contrast", &vo_gamma_contrast); + get_video_colors(guiIntfStruct.sh_video, "hue", &vo_gamma_hue); + get_video_colors(guiIntfStruct.sh_video, "saturation", &vo_gamma_saturation); + } + SendDlgItemMessage(hwnd, ID_EQ0, TBM_SETPOS, 1, (LPARAM)100 - vo_gamma_brightness); + SendDlgItemMessage(hwnd, ID_EQ1, TBM_SETPOS, 1, (LPARAM)100 - vo_gamma_contrast); + SendDlgItemMessage(hwnd, ID_EQ2, TBM_SETPOS, 1, (LPARAM)100 - vo_gamma_hue); + SendDlgItemMessage(hwnd, ID_EQ3, TBM_SETPOS, 1, (LPARAM)100 - vo_gamma_saturation); + break; + } + case WM_VSCROLL: + { + switch (LOWORD(wParam)) + { + case TB_THUMBTRACK: + if(guiIntfStruct.sh_video && guiIntfStruct.Playing) + { + vo_gamma_brightness = 100 - SendDlgItemMessage(hwnd, ID_EQ0, TBM_GETPOS, 0, 0); + set_video_colors(guiIntfStruct.sh_video, "brightness", vo_gamma_brightness); + + vo_gamma_contrast = 100 - SendDlgItemMessage(hwnd, ID_EQ1, TBM_GETPOS, 0, 0); + set_video_colors(guiIntfStruct.sh_video, "contrast", vo_gamma_contrast); + + vo_gamma_hue = 100 - SendDlgItemMessage(hwnd, ID_EQ2, TBM_GETPOS, 0, 0); + set_video_colors(guiIntfStruct.sh_video, "hue", vo_gamma_hue); + + vo_gamma_saturation = 100 - SendDlgItemMessage(hwnd, ID_EQ3, TBM_GETPOS, 0, 0); + set_video_colors(guiIntfStruct.sh_video, "saturation", vo_gamma_saturation); + } + else + { + EnableWindow(GetDlgItem(hwnd, ID_EQ0), 0); + EnableWindow(GetDlgItem(hwnd, ID_EQ1), 0); + EnableWindow(GetDlgItem(hwnd, ID_EQ2), 0); + EnableWindow(GetDlgItem(hwnd, ID_EQ3), 0); + } + break; + } + } + case WM_CTLCOLORDLG: + case WM_CTLCOLORSTATIC: + { + HDC hdc = (HDC)wParam; + SetBkMode(hdc, TRANSPARENT); + return (INT_PTR)SOLID_GREY2; + } + break; + case WM_COMMAND: + { + switch (LOWORD(wParam)) + { + case ID_CLOSE: + DestroyWindow(hwnd); + return 0; + case ID_DEFAULTS: + if(guiIntfStruct.sh_video && guiIntfStruct.Playing) + { + vo_gamma_brightness=0; + SendDlgItemMessage(hwnd, ID_EQ0, TBM_SETPOS, 1, (LPARAM)100); + set_video_colors(guiIntfStruct.sh_video, "brightness", vo_gamma_brightness); + + vo_gamma_contrast=0; + SendDlgItemMessage(hwnd, ID_EQ1, TBM_SETPOS, 1, (LPARAM)100); + set_video_colors(guiIntfStruct.sh_video, "contrast", vo_gamma_contrast); + + vo_gamma_hue=0; + SendDlgItemMessage(hwnd, ID_EQ2, TBM_SETPOS, 1, (LPARAM)100); + set_video_colors(guiIntfStruct.sh_video, "hue", vo_gamma_hue); + + vo_gamma_saturation=0; + SendDlgItemMessage(hwnd, ID_EQ3, TBM_SETPOS, 1, (LPARAM)100); + set_video_colors(guiIntfStruct.sh_video, "saturation", vo_gamma_saturation); + } + break; + } + } + return 0; + case WM_DESTROY: + PostQuitMessage (0); + return 0; + } + return DefWindowProc(hwnd, iMsg, wParam, lParam); +} + +void display_eqwindow(gui_t *gui) +{ + HWND hWnd; + HINSTANCE hInstance = GetModuleHandle(NULL); + WNDCLASS wc; + int x, y; + + if(!guiIntfStruct.sh_video) return; + if(FindWindow(NULL, "MPlayer - Equalizer")) return; + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.lpfnWndProc = EqWndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = hInstance; + wc.hCursor = LoadCursor(NULL,IDC_ARROW); + wc.hIcon = gui->icon; + wc.hbrBackground = SOLID_GREY2; + wc.lpszClassName = "MPlayer - Equalizer"; + wc.lpszMenuName = NULL; + RegisterClass(&wc); + x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (332 / 2); + y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (200 / 2); + hWnd = CreateWindow("MPlayer - Equalizer", + "MPlayer - Equalizer", + WS_POPUPWINDOW | WS_CAPTION, + x, + y, + 332, + 200, + NULL, + NULL, + hInstance, + NULL); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui); + ShowWindow(hWnd, SW_SHOW); + UpdateWindow(hWnd); +} diff --git a/gui/win32/dialogs.h b/gui/win32/dialogs.h new file mode 100644 index 0000000000..b7b47ae7a6 --- /dev/null +++ b/gui/win32/dialogs.h @@ -0,0 +1,132 @@ +/* + MPlayer Gui for win32 + Copyright (c) 2003 Sascha Sommer <saschasommer@freenet.de> + Copyright (c) 2006 Erik Augustson <erik_27can@yahoo.com> + Copyright (c) 2006 Gianluigi Tiesi <sherpya@netfarm.it> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA +*/ + +#ifndef _DIALOGS_H +#define _DIALOGS_H + +#define TBS_TOOLTIPS 0x0100 +#define WM_SYSTRAY (WM_USER+1) +#define UDM_SETRANGE32 (WM_USER+111) +#define UDM_GETRANGE32 (WM_USER+112) +#define UDM_SETPOS32 (WM_USER+113) +#define UDM_GETPOS32 (WM_USER+114) + +#define SOLID_GREY (HBRUSH) CreateSolidBrush(RGB(232, 232, 232)) +#define SOLID_GREY2 (HBRUSH) CreateSolidBrush(RGB(175, 175, 175)) + +#define gfree free + +#define MAXFILE 1024 + +#define COPYRIGHT " MPlayer GUI for Windows\n\n" \ + " Copyright (c) 2003 Sascha Sommer\n" \ + " Copyright (c) 2006 Erik Augustson\n" \ + " Copyright (c) 2006 Gianluigi Tiesi" + +#define ONLINE_HELP_URL "http://www.mplayerhq.hu/DOCS/HTML/en/index.html" + +#define ID_OK 12 +#define ID_APPLY 13 +#define ID_CANCEL 14 +#define ID_CLOSE 15 +#define ID_DEFAULTS 16 +#define ID_VO_DRIVER 17 +#define ID_AO_DRIVER 18 +#define ID_DOUBLE 19 +#define ID_DIRECT 20 +#define ID_FRAMEDROP 21 +#define ID_NORMALIZE 22 +#define ID_SOFTMIX 23 +#define ID_EXTRASTEREO 24 +#define ID_TRACKBAR1 25 +#define ID_TRACKBAR2 26 +#define ID_UPDOWN1 27 +#define ID_UPDOWN2 28 +#define ID_EDIT1 29 +#define ID_EDIT2 30 +#define ID_CACHE 31 +#define ID_AUTOSYNC 32 +#define ID_NONE 33 +#define ID_OSD1 34 +#define ID_OSD2 35 +#define ID_OSD3 36 +#define ID_DVDDEVICE 37 +#define ID_CDDEVICE 38 +#define ID_PRIO 39 +#define ID_URL 40 +#define ID_TITLESEL 41 +#define ID_UP 42 +#define ID_DOWN 43 +#define ID_REMOVE 44 +#define ID_ADDFILE 45 +#define ID_TRACKLIST 46 +#define ID_SUBTITLE 47 +#define ID_PLAYLISTLOAD 48 +#define ID_PLAYLISTSAVE 49 +#define ID_ADDURL 50 +#define ID_DIR 51 +#define ID_PLAY 52 +#define ID_STOP 53 +#define ID_SEEKF 54 +#define ID_SEEKB 55 +#define ID_NTRACK 56 +#define ID_PTRACK 57 +#define ID_PLAYLIST 58 +#define ID_CLEAR 59 +#define ID_SHOWHIDE 60 +#define ID_SKINBROWSER 61 +#define ID_KEYHELP 62 +#define ID_ONLINEHELP 63 +#define ID_CHAPTERSEL 64 +#define ID_PREFS 65 +#define TRAYMENU 66 +#define IDFILE_OPEN 67 +#define IDEXIT 68 +#define IDURL_OPEN 69 +#define IDDIR_OPEN 70 +#define IDFILE_NEW 71 +#define IDFILE_SAVE 72 +#define IDHELP_ABOUT 73 +#define IDSUBTITLE_OPEN 74 +#define IDPLAYDISK 75 +#define ID_CONSOLE 76 +#define ID_EQ0 77 +#define ID_EQ1 78 +#define ID_EQ2 79 +#define ID_EQ3 80 +#define IDSUB_TOGGLE 81 +#define IDSUB_CYCLE 82 +#define ID_ASPECT1 83 +#define ID_ASPECT2 84 +#define ID_ASPECT3 85 +#define ID_ASPECT4 86 +#define ID_SUBWINDOW 87 +#define ID_TIMER 88 +#define ID_MUTE 89 +#define ID_FULLSCREEN 90 + +/* gtk emulation */ +#define GTK_MB_FATAL 0x1 +#define GTK_MB_ERROR 0x2 +#define GTK_MB_WARNING 0x4 +#define GTK_MB_SIMPLE 0x8 + +#endif diff --git a/gui/win32/gui.c b/gui/win32/gui.c new file mode 100644 index 0000000000..d079c82c5e --- /dev/null +++ b/gui/win32/gui.c @@ -0,0 +1,1551 @@ +/* + MPlayer Gui for win32 + Copyright (c) 2003 Sascha Sommer <saschasommer@freenet.de> + Copyright (c) 2006 Erik Augustson <erik_27can@yahoo.com> + Copyright (c) 2006 Gianluigi Tiesi <sherpya@netfarm.it> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <ctype.h> +#include <fcntl.h> +#include <windows.h> +#include <windowsx.h> +#include <shlobj.h> +#include <version.h> +#include <mplayer.h> +#include <mp_fifo.h> +#include <mp_msg.h> +#include <help_mp.h> +#include <input/input.h> +#include <input/mouse.h> +#include <osdep/keycodes.h> +#include <stream/stream.h> +#include <libvo/video_out.h> +#include <interface.h> +#include "gui.h" +#include "wincfg.h" +#include "dialogs.h" + +// HACK around bug in old mingw +#undef INVALID_FILE_ATTRIBUTES +#define INVALID_FILE_ATTRIBUTES ((DWORD)-1) + +#ifndef WM_XBUTTONDOWN +# define WM_XBUTTONDOWN 0x020B +# define WM_XBUTTONUP 0x020C +# define WM_XBUTTONDBLCLK 0x020D +#endif + +/* Globals / Externs */ +extern void renderinfobox(skin_t *skin, window_priv_t *priv); +extern void renderwidget(skin_t *skin, image *dest, widget *item, int state); +extern void mplayer_put_key(int code); +extern void print_version(void); +extern int WinID; +float sub_aspect; + +DWORD oldtime; +NOTIFYICONDATA nid; +int console_state = 0; +play_tree_t *playtree = NULL; + +static HBRUSH colorbrush = NULL; //Handle to colorkey brush +static COLORREF windowcolor = RGB(255,0,255); //Windowcolor == colorkey + +void console_toggle(void) +{ + if (console_state) + { + FreeConsole(); + console = 0; + console_state = 0; + } + else + { + /* This code comes from: http://dslweb.nwnexus.com/~ast/dload/guicon.htm */ + CONSOLE_SCREEN_BUFFER_INFO coninfo; + FILE *fp; + HWND hwnd = NULL; + console = 1; + AllocConsole(); + SetConsoleTitle(MP_TITLE); + + /* disable the close button for now */ + while (!hwnd) + { + hwnd = FindWindow(NULL, MP_TITLE); + Sleep(100); + } + DeleteMenu(GetSystemMenu(hwnd, 0), SC_CLOSE, MF_BYCOMMAND); + + GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &coninfo); + coninfo.dwSize.Y = 1000; + SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coninfo.dwSize); + fp = freopen("con", "w", stdout); + *stdout = *fp; + setvbuf(stdout, NULL, _IONBF, 0); + fp = freopen("con", "r", stdin); + *stdin = *fp; + setvbuf(stdin, NULL, _IONBF, 0); + fp = freopen("con", "w", stdout); + *stderr = *fp; + setvbuf(stderr, NULL, _IONBF, 0); + print_version(); + console_state = 1; + } +} + +void capitalize(char *filename) +{ + unsigned int i; + BOOL cap = TRUE; + for (i=0; i < strlen(filename); i++) + { + if (cap) + { + cap = FALSE; + filename[i] = toupper(filename[i]); + } + else if (filename[i] == ' ') + cap = TRUE; + else + filename[i] = tolower(filename[i]); + } +} + +static image *get_drawground(HWND hwnd) +{ + gui_t * gui = (gui_t *) GetWindowLongPtr(hwnd, GWLP_USERDATA); + unsigned int i; + if(!gui) return NULL; + for(i=0; i<gui->window_priv_count; i++) + if(gui->window_priv[i]->hwnd==hwnd) + return &gui->window_priv[i]->img; + return NULL; +} + +static HBITMAP get_bitmap(HWND hwnd) +{ + gui_t *gui = (gui_t *) GetWindowLongPtr(hwnd, GWLP_USERDATA); + unsigned int i; + if(!gui) return NULL; + for(i=0; i<gui->window_priv_count; i++) + if(gui->window_priv[i]->hwnd == hwnd) + return gui->window_priv[i]->bitmap; + return NULL; +} + +static int get_windowtype(HWND hwnd) +{ + gui_t *gui = (gui_t *) GetWindowLongPtr(hwnd, GWLP_USERDATA); + unsigned int i; + if(!gui) return -1; + for(i=0; i<gui->window_priv_count; i++) + if(gui->window_priv[i]->hwnd == hwnd) + return gui->window_priv[i]->type; + return -1; +} + +static void uninit(gui_t *gui) +{ + if(gui->skin) destroy_window(gui); + if(gui->playlist) gui->playlist->free_playlist(gui->playlist); + gui->playlist = NULL; +} + +/* + the gui message handler + tries to handle the incoming messages + and passes them to the player's message handler if it can't handle them +*/ +static void handlemsg(HWND hWnd, int msg) +{ + gui_t *gui = (gui_t *) GetWindowLongPtr(hWnd, GWLP_USERDATA); + if(msg == evNone) return; + + switch(msg) + { + case evLoadPlay: + case evLoad: + if(display_openfilewindow(gui, 0) && (msg == evLoadPlay)) + handlemsg(hWnd, evDropFile); + return; + case evLoadSubtitle: + display_opensubtitlewindow(gui); + break; + case evPreferences: + display_prefswindow(gui); + return; + case evPlayList: + display_playlistwindow(gui); + return; + case evSkinBrowser: + display_skinbrowser(gui); + break; + case evEqualizer: + display_eqwindow(gui); + break; + case evAbout: + MessageBox(hWnd, COPYRIGHT, "About", MB_OK); + break; + case evIconify: + ShowWindow(hWnd, SW_MINIMIZE); + break; + case evIncVolume: + mplayer_put_key(KEY_VOLUME_UP); + break; + case evDecVolume: + mplayer_put_key(KEY_VOLUME_DOWN); + break; + default: + mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] received msg %s (%i)\n", gui->skin->geteventname(msg), msg); + break; + } + gui->playercontrol(msg); +} + +static widget *clickedinsidewidget(gui_t *gui, int window, int x, int y) +{ + unsigned int i; + widget *item; + for(i=0; i<gui->skin->widgetcount; i++) + { + item = gui->skin->widgets[i]; + if((item->window == window) && (item->x <= x) && (item->x + item->width >= x) && + (item->y <= y) && (item->y + item->height >= y)) + return item; + } + return NULL; +} + +/* updates sliders and the display */ +static void updatedisplay(gui_t *gui, HWND hwnd) +{ + unsigned int i; + window_priv_t *priv = NULL; + DWORD time = timeGetTime(); + + if(!hwnd) return; + + /* load all potmeters hpotmeters */ + for(i=0; i<gui->skin->widgetcount; i++) + { + if(gui->skin->widgets[i]->type == tyHpotmeter || gui->skin->widgets[i]->type == tyPotmeter) + { + if(gui->skin->widgets[i]->msg == evSetVolume) + gui->skin->widgets[i]->value = guiIntfStruct.Volume; + else if(gui->skin->widgets[i]->msg == evSetMoviePosition) + gui->skin->widgets[i]->value = guiIntfStruct.Position; + else if(gui->skin->widgets[i]->msg == evSetBalance) + gui->skin->widgets[i]->value = guiIntfStruct.Balance; + if(gui->skin->widgets[i]->window == get_windowtype(hwnd)) + renderwidget(gui->skin, get_drawground(hwnd), gui->skin->widgets[i], + gui->skin->widgets[i]->pressed ? 0 : 1); + } + /* update some buttons */ + if(gui->skin->widgets[i]->type == tyButton && gui->skin->widgets[i]->window == get_windowtype(hwnd)) + { + if(gui->skin->widgets[i]->msg == evPlaySwitchToPause) + { + gui->skin->widgets[i]->value = guiIntfStruct.Playing; + renderwidget(gui->skin, get_drawground(hwnd), gui->skin->widgets[i], + guiIntfStruct.Playing == 1 ? 0 : 1); + } + if(gui->skin->widgets[i]->msg == evMute) + { + gui->skin->widgets[i]->value = guiIntfStruct.Volume; + renderwidget(gui->skin, get_drawground(hwnd), gui->skin->widgets[i], + guiIntfStruct.Volume == 0.0f ? 0 : 1); + } + } + } + + /* updating the display once a 100.second is enough imo */ + if((time - oldtime) < 100) return; + oldtime=time; + + /* suppress directx's fullscreen window when using the sub window */ + if(sub_window && &video_driver_list[0] && strstr("directx", video_driver_list[0])) + { + HWND hWndFS = NULL; //handle to directx's fullscreen window + if(hWndFS == NULL) + { + hWndFS = FindWindow(NULL, "MPlayer Fullscreen"); + if(hWndFS != NULL) DestroyWindow(hWndFS); //sub window handles fullscreen + } + } + + for (i=0; i<gui->window_priv_count; i++) + { + if(gui->window_priv[i]->hwnd == hwnd) + priv=gui->window_priv[i]; + }// Sherpya + /* display the status msgs */ + renderinfobox(gui->skin, priv); + RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE); +} + +static LRESULT CALLBACK SubProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + gui_t *gui = (gui_t *) GetWindowLongPtr(hWnd, GWLP_USERDATA); + if (gui && (gui->subwindow != hWnd)) return FALSE; + + switch (message) + { + case WM_CLOSE: + handlemsg(hWnd, evExit); + return 0; + case WM_DESTROY: + PostQuitMessage(0); + return 0; + case WM_KEYDOWN: + { + switch(wParam) + { + case VK_LEFT: + mplayer_put_key(KEY_LEFT); + break; + case VK_UP: + mplayer_put_key(KEY_UP); + break; + case VK_RIGHT: + mplayer_put_key(KEY_RIGHT); + break; + case VK_DOWN: + mplayer_put_key(KEY_DOWN); + break; + case VK_TAB: + mplayer_put_key(KEY_TAB); + break; + case VK_BACK: + mplayer_put_key(KEY_BS); + break; + case VK_DELETE: + mplayer_put_key(KEY_DELETE); + break; + case VK_INSERT: + mplayer_put_key(KEY_INSERT); + break; + case VK_HOME: + mplayer_put_key(KEY_HOME); + break; + case VK_END: + mplayer_put_key(KEY_END); + break; + case VK_PRIOR: + mplayer_put_key(KEY_PAGE_UP); + break; + case VK_NEXT: + mplayer_put_key(KEY_PAGE_DOWN); + break; + case VK_ESCAPE: + mplayer_put_key(KEY_ESC); + break; + } + break; + } + case WM_COMMAND: + { + switch(LOWORD(wParam)) + { + case IDEXIT: + PostQuitMessage(0); + handlemsg(hWnd, evExit); + break; + case IDFILE_OPEN: + handlemsg(hWnd, evLoadPlay); + break; + case IDURL_OPEN: + display_openurlwindow(gui, 0); + break; + case IDDIR_OPEN: + { + static char path[MAX_PATH]; + BROWSEINFO bi; + LPITEMIDLIST pidl; + memset(&bi, 0, sizeof(BROWSEINFO)); + bi.lpszTitle = "Choose a Directory..."; + pidl = SHBrowseForFolder(&bi); + if (SHGetPathFromIDList(pidl, path)) + { + gui->playlist->clear_playlist(gui->playlist); + adddirtoplaylist(gui->playlist, path, TRUE); + gui->startplay(gui); + } + break; + } + case ID_PTRACK: + handlemsg(hWnd, evPrev); + break; + case ID_SEEKB: + handlemsg(hWnd, evBackward10sec); + break; + case ID_PLAY: + handlemsg(hWnd, evPlaySwitchToPause); + break; + case ID_STOP: + handlemsg(hWnd, evStop); + break; + case ID_SEEKF: + handlemsg(hWnd, evForward10sec); + break; + case ID_NTRACK: + handlemsg(hWnd, evNext); + break; +#ifdef USE_DVDREAD + case ID_CHAPTERSEL: + display_chapterselwindow(gui); + break; +#endif + case ID_FULLSCREEN: + mp_input_queue_cmd(mp_input_parse_cmd("vo_fullscreen")); + break; + case ID_MUTE: + mp_input_queue_cmd(mp_input_parse_cmd("mute")); + break; + case ID_ASPECT1: + mp_input_queue_cmd(mp_input_parse_cmd("switch_ratio 1.777777")); + break; + case ID_ASPECT2: + mp_input_queue_cmd(mp_input_parse_cmd("switch_ratio 1.333333")); + break; + case ID_ASPECT3: + mp_input_queue_cmd(mp_input_parse_cmd("switch_ratio 2.35")); + break; + case ID_ASPECT4: + mp_input_queue_cmd(mp_input_parse_cmd("switch_ratio 0")); + break; + case IDSUB_TOGGLE: + mp_input_queue_cmd(mp_input_parse_cmd("sub_visibility")); + break; + case IDSUB_CYCLE: + mp_input_queue_cmd(mp_input_parse_cmd("sub_select")); + break; + } + return 0; + } + case WM_CHAR: + mplayer_put_key(wParam); + break; + case WM_DROPFILES: + { + if(!lParam) + { + char file[MAX_PATH]; + int filecount = DragQueryFile((HDROP) wParam, -1, file, MAX_PATH); + int i; + for(i=0; i<filecount; i++) + { + DragQueryFile((HDROP) wParam, i, file, MAX_PATH); + mplSetFileName(NULL, file, STREAMTYPE_FILE); + if(!parse_filename(file, playtree, mconfig, 1)) + gui->playlist->add_track(gui->playlist, file, NULL, NULL, 0); + } + DragFinish((HDROP) wParam); + handlemsg(hWnd, evDropFile); + } + else + { + gui->playlist->clear_playlist(gui->playlist); + gui->playlist->add_track(gui->playlist, (const char *) wParam, NULL, NULL, 0); + handlemsg(hWnd, evDropFile); + } + SetForegroundWindow(gui->subwindow); + return 0; + } + case WM_LBUTTONDOWN: + { + if(!vo_nomouse_input) + mplayer_put_key(MOUSE_BTN0); + break; + } + case WM_MBUTTONDOWN: + { + if(!vo_nomouse_input) + mplayer_put_key(MOUSE_BTN1); + break; + } + case WM_RBUTTONDOWN: + { + POINT point; + point.x = GET_X_LPARAM(lParam); + point.y = GET_Y_LPARAM(lParam); + ClientToScreen(hWnd, &point); + if(guiIntfStruct.StreamType == STREAMTYPE_DVD) + EnableMenuItem(gui->dvdmenu, ID_CHAPTERSEL, MF_BYCOMMAND | MF_ENABLED); + TrackPopupMenu(gui->submenu, 0, point.x, point.y, 0, hWnd, NULL); + return 0; + } + case WM_LBUTTONDBLCLK: + { + if(!vo_nomouse_input) + mplayer_put_key(MOUSE_BTN0_DBL); + break; + } + case WM_MBUTTONDBLCLK: + { + if(!vo_nomouse_input) + mplayer_put_key(MOUSE_BTN1_DBL); + break; + } + case WM_RBUTTONDBLCLK: + { + if(!vo_nomouse_input) + mplayer_put_key(MOUSE_BTN2_DBL); + break; + } + case WM_MOUSEWHEEL: + { + int x = GET_WHEEL_DELTA_WPARAM(wParam); + if(vo_nomouse_input) + break; + if (x > 0) + mplayer_put_key(MOUSE_BTN3); + else + mplayer_put_key(MOUSE_BTN4); + break; + } + case WM_XBUTTONDOWN: + { + if(vo_nomouse_input) + break; + if(HIWORD(wParam) == 1) + mplayer_put_key(MOUSE_BTN5); + else + mplayer_put_key(MOUSE_BTN6); + break; + } + case WM_XBUTTONDBLCLK: + { + if(vo_nomouse_input) + break; + if(HIWORD(wParam) == 1) + mplayer_put_key(MOUSE_BTN5_DBL); + else + mplayer_put_key(MOUSE_BTN6_DBL); + break; + } + case WM_TIMER: + { + if(fullscreen) while(ShowCursor(FALSE) >= 0){} + KillTimer(hWnd, ID_TIMER); + return 0; + } + case WM_MOUSEMOVE: + { + ShowCursor(TRUE); + SetTimer(hWnd, ID_TIMER, 3000, (TIMERPROC) NULL); + break; + } + case WM_WINDOWPOSCHANGED: + { + int tmpheight=0; + static uint32_t rect_width; + static uint32_t rect_height; + RECT rd; + POINT pt; + pt.x = 0; + pt.y = 0; + GetClientRect(hWnd, &rd); + ClientToScreen(hWnd, &pt); + + rect_width = rd.right - rd.left; + rect_height = rd.bottom - rd.top; + + /* maintain our aspect ratio */ + tmpheight = ((float)rect_width/sub_aspect); + tmpheight += tmpheight % 2; + if(tmpheight > rect_height) + { + rect_width = ((float)rect_height*sub_aspect); + rect_width += rect_width % 2; + } + else rect_height = tmpheight; + + rd.right = rd.left + rect_width; + rd.bottom = rd.top + rect_height; + + AdjustWindowRect(&rd, WS_OVERLAPPEDWINDOW | WS_SIZEBOX, 0); + SetWindowPos(hWnd, 0, fullscreen?0:pt.x+rd.left, fullscreen?0:pt.y+rd.top, + fullscreen?vo_screenwidth:rd.right-rd.left, fullscreen?vo_screenheight:rd.bottom-rd.top, SWP_NOOWNERZORDER); + SetForegroundWindow(hWnd); + return 0; + } + case WM_SYSCOMMAND: + { + switch(wParam) + { + case SC_SCREENSAVE: + case SC_MONITORPOWER: + mp_msg(MSGT_VO, MSGL_V ,"<vo_directx><INFO>killing screensaver\n" ); + return 0; + } + break; + } + case WM_PAINT: + { + PAINTSTRUCT ps; + RECT rect; + HDC hdc = BeginPaint(hWnd, &ps); + HDC hMemDC = CreateCompatibleDC(hdc); + HBRUSH blackbrush = (HBRUSH)GetStockObject(BLACK_BRUSH); + int width, height; + GetClientRect(hWnd, &rect); + width = rect.right - rect.left; + height = rect.bottom - rect.top; + if(guiIntfStruct.Playing == 0) + { + int i; + window *desc = NULL; + + for (i=0; i<gui->skin->windowcount; i++) + if(gui->skin->windows[i]->type == wiSub) + desc = gui->skin->windows[i]; + + SelectObject(hMemDC, get_bitmap(hWnd)); + StretchBlt(hdc, 0, 0, width, height, hMemDC, 0, 0, desc->base->bitmap[0]->width, + desc->base->bitmap[0]->height, SRCCOPY); + } else { + FillRect(GetDC(hWnd), &rect, fullscreen?blackbrush:colorbrush); + } + DeleteDC(hMemDC); + EndPaint(hWnd, &ps); + return 0; + } + } + return DefWindowProc(hWnd, message, wParam, lParam); +} + +/* Window Proc for the gui Window */ +static LRESULT CALLBACK EventProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + gui_t *gui = (gui_t *) GetWindowLongPtr(hWnd, GWLP_USERDATA); + + /* Avoid processing when then window doesn't match gui mainwindow */ + if (gui && (gui->mainwindow != hWnd)) return FALSE; + + switch (message) + { + case WM_CLOSE: + handlemsg(hWnd, evExit); + return 0; + case WM_DESTROY: + PostQuitMessage(0); + return 0; + case WM_SYSTRAY: + { + switch(lParam) + { + POINT cursor; + case WM_RBUTTONDOWN: + { + GetCursorPos(&cursor); + SetForegroundWindow(hWnd); + TrackPopupMenu(gui->traymenu, 0, cursor.x, cursor.y, 0, hWnd, NULL); + break; + } + case WM_MBUTTONDBLCLK: + case WM_LBUTTONDBLCLK: + { + if(IsWindowVisible(hWnd)) ShowWindow(hWnd, SW_HIDE); + else { ShowWindow(hWnd, SW_SHOW); SetForegroundWindow(hWnd); } + break; + } + } + break; + } + case WM_KEYDOWN: + { + switch(wParam) + { + case VK_LEFT: + mplayer_put_key(KEY_LEFT); + break; + case VK_UP: + mplayer_put_key(KEY_UP); + break; + case VK_RIGHT: + mplayer_put_key(KEY_RIGHT); + break; + case VK_DOWN: + mplayer_put_key(KEY_DOWN); + break; + case VK_TAB: + mplayer_put_key(KEY_TAB); + break; + case VK_BACK: + mplayer_put_key(KEY_BS); + break; + case VK_DELETE: + mplayer_put_key(KEY_DELETE); + break; + case VK_INSERT: + mplayer_put_key(KEY_INSERT); + break; + case VK_HOME: + mplayer_put_key(KEY_HOME); + break; + case VK_END: + mplayer_put_key(KEY_END); + break; + case VK_PRIOR: + mplayer_put_key(KEY_PAGE_UP); + break; + case VK_NEXT: + mplayer_put_key(KEY_PAGE_DOWN); + break; + case VK_ESCAPE: + mplayer_put_key(KEY_ESC); + break; + } + break; + } + case WM_CHAR: + mplayer_put_key(wParam); + break; + case WM_COPYDATA: + { + if(lParam) + { + PCOPYDATASTRUCT cdData; + cdData = (PCOPYDATASTRUCT) lParam; + mplSetFileName(NULL, cdData->lpData, STREAMTYPE_FILE); + if(!parse_filename(cdData->lpData, playtree, mconfig, 1)) + gui->playlist->add_track(gui->playlist, cdData->lpData, NULL, NULL, 0); + gui->startplay(gui); + } + break; + } + case WM_DROPFILES: + { + if(!lParam) + { + char file[MAX_PATH]; + int filecount = DragQueryFile((HDROP) wParam, -1, file, MAX_PATH); + int i; + for(i=0; i<filecount; i++) + { + DragQueryFile((HDROP) wParam, i, file, MAX_PATH); + mplSetFileName(NULL, file, STREAMTYPE_FILE); + if(!parse_filename(file, playtree, mconfig, 1)) + gui->playlist->add_track(gui->playlist, file, NULL, NULL, 0); + } + DragFinish((HDROP) wParam); + handlemsg(hWnd, evDropFile); + } + else + { + gui->playlist->clear_playlist(gui->playlist); + gui->playlist->add_track(gui->playlist, (const char *) wParam, NULL, NULL, 0); + handlemsg(hWnd, evDropFile); + } + SetForegroundWindow(gui->mainwindow); + return 0; + } + case WM_LBUTTONDOWN: + { + SetCapture(hWnd); + gui->mousex = GET_X_LPARAM(lParam); + gui->mousey = GET_Y_LPARAM(lParam); + /* inside a widget */ + gui->activewidget = clickedinsidewidget(gui, get_windowtype(hWnd), gui->mousex, gui->mousey); + if(gui->activewidget) + { + gui->activewidget->pressed = 1; + gui->mousewx = gui->mousex - gui->activewidget->x; + gui->mousewy = gui->mousey - gui->activewidget->y; + renderwidget(gui->skin, get_drawground(hWnd), gui->activewidget, 0); + RedrawWindow(hWnd, NULL, NULL, RDW_INVALIDATE); + handlemsg(hWnd, gui->activewidget->msg); + } + break; + } + case WM_CAPTURECHANGED: + { + if(gui->activewidget) + { + gui->activewidget->pressed = 0; + renderwidget(gui->skin, get_drawground(hWnd), gui->activewidget, 1); + RedrawWindow(hWnd, NULL, NULL, RDW_INVALIDATE); + gui->activewidget = NULL; + } + break; + } + case WM_LBUTTONUP: + { + ReleaseCapture(); + if(gui->activewidget) + { + gui->activewidget->pressed = 0; + renderwidget(gui->skin, get_drawground(hWnd), gui->activewidget, 1); + RedrawWindow(hWnd, NULL, NULL, RDW_INVALIDATE); + gui->activewidget = NULL; + } + break; + } + case WM_RBUTTONDOWN: + { + POINT point; + char device[MAX_PATH]; + char searchpath[MAX_PATH]; + char searchpath2[MAX_PATH]; +#ifdef HAVE_LIBCDIO + char searchpath3[MAX_PATH]; +#endif + int len, pos = 0, cdromdrive = 0; + UINT errmode; + point.x = GET_X_LPARAM(lParam); + point.y = GET_Y_LPARAM(lParam); + ClientToScreen(hWnd, &point); + errmode = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); + while (GetMenuItemCount(gui->diskmenu) > 0) + DeleteMenu(gui->diskmenu, 0, MF_BYPOSITION); + len = GetLogicalDriveStrings(MAX_PATH, device); + while(pos < len) + { + if(GetDriveType(device + pos) == DRIVE_CDROM) + { + char volname[MAX_PATH]; + char menuitem[MAX_PATH]; + int flags = MF_STRING; + mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] checking %s for CD/VCD/SVCD/DVDs\n", device + pos); + sprintf(searchpath, "%sVIDEO_TS", device + pos); + sprintf(searchpath2, "%sMpegav", device + pos); +#ifdef HAVE_LIBCDIO + sprintf(searchpath3, "%sTrack01.cda", device + pos); +#endif + if(GetFileAttributes(searchpath) != INVALID_FILE_ATTRIBUTES) + flags |= MF_ENABLED; + else if(GetFileAttributes(searchpath2) != INVALID_FILE_ATTRIBUTES) + flags |= MF_ENABLED; +#ifdef HAVE_LIBCDIO + else if(GetFileAttributes(searchpath3) != INVALID_FILE_ATTRIBUTES) + flags |= MF_ENABLED; +#endif + else + flags |= MF_GRAYED; + volname[0] = 0; + strcpy(menuitem, device + pos); + menuitem[strlen(menuitem) - 1]=0; + GetVolumeInformation(device + pos, volname, MAX_PATH, NULL, NULL, NULL, NULL, 0); + if (strlen(volname)) + { + capitalize(volname); + strcat(menuitem, " - "); + strcat(menuitem, volname); + } + AppendMenu(gui->diskmenu, flags, IDPLAYDISK + cdromdrive, menuitem); + cdromdrive++; + } + pos += strlen(device + pos) + 1; + } + SetErrorMode(errmode); + TrackPopupMenu(gui->menu, 0, point.x, point.y, 0, hWnd, NULL); + return 0; + } + case WM_MOUSEMOVE: + { + if(wParam & MK_LBUTTON) + { + POINT point; + RECT rect; + if(gui->activewidget) + { + widget *item = gui->activewidget; + + if(item->type == tyHpotmeter) + { + item->x = GET_X_LPARAM(lParam) - gui->mousewx; + item->value = (float)((float)((item->x - item->wx) * 100.0f) / (float)(item->wwidth - item->width)); + } + if(item->type == tyPotmeter) + { + gui->mousewx = GET_X_LPARAM(lParam) - gui->activewidget->x; + item->value = (float) (gui->mousewx * 100.0f) / (float) item->wwidth; + } + + if((item->type == tyPotmeter) || (item->type == tyHpotmeter) || (item->type == tyVpotmeter)) + { + /* Bound checks */ + if(item->value > 100.0f) + item->value = 100.0f; + else if(item->value < 0.0f) + item->value = 0.0f; + + if(item->msg == evSetVolume) + guiIntfStruct.Volume = (float) item->value; + else if(item->msg == evSetMoviePosition) + guiIntfStruct.Position = (float) item->value; + else if(item->msg == evSetBalance) + { + /* make the range for 50% a bit bigger, because the sliders for balance usually suck */ + if((item->value - 50.0f < 1.5f) && (item->value - 50.0f > -1.5f)) + item->value = 50.0f; + guiIntfStruct.Balance = (float) item->value; + } + updatedisplay(gui, hWnd); + handlemsg(hWnd, item->msg); + } + break; + } + point.x = GET_X_LPARAM(lParam); + point.y = GET_Y_LPARAM(lParam); + ClientToScreen(hWnd, &point); + GetWindowRect(hWnd, &rect); + MoveWindow(hWnd, point.x - gui->mousex, point.y - gui->mousey, + rect.right-rect.left,rect.bottom-rect.top,TRUE); + break; + } + break; + } + case WM_COMMAND: + { + switch(LOWORD(wParam)) + { + case IDEXIT: + PostQuitMessage(0); + handlemsg(hWnd, evExit); + break; + case IDFILE_OPEN: + handlemsg(hWnd, evLoadPlay); + break; + case IDDIR_OPEN: + { + static char path[MAX_PATH]; + BROWSEINFO bi; + LPITEMIDLIST pidl; + memset(&bi, 0, sizeof(BROWSEINFO)); + bi.lpszTitle = "Choose a Directory..."; + pidl = SHBrowseForFolder(&bi); + if (SHGetPathFromIDList(pidl, path)) + { + gui->playlist->clear_playlist(gui->playlist); + adddirtoplaylist(gui->playlist, path, TRUE); + gui->startplay(gui); + } + break; + } + case ID_SKINBROWSER: + handlemsg(hWnd, evSkinBrowser); + break; + case IDURL_OPEN: + display_openurlwindow(gui, 0); + break; + case ID_MUTE: + mp_input_queue_cmd(mp_input_parse_cmd("mute")); + break; + case IDSUBTITLE_OPEN: + display_opensubtitlewindow(gui); + break; + case ID_PTRACK: + handlemsg(hWnd, evPrev); + break; + case ID_SEEKB: + handlemsg(hWnd, evBackward10sec); + break; + case ID_PLAY: + handlemsg(hWnd, evPlaySwitchToPause); + break; + case ID_STOP: + handlemsg(hWnd, evStop); + break; + case ID_SEEKF: + handlemsg(hWnd, evForward10sec); + break; + case ID_NTRACK: + handlemsg(hWnd, evNext); + break; + case ID_SHOWHIDE: + { + if(IsWindowVisible(hWnd)) ShowWindow(hWnd, SW_HIDE); + else ShowWindow(hWnd, SW_SHOW); + break; + } + case ID_PLAYLIST: + handlemsg(hWnd, evPlayList); + break; + case ID_PREFS: + handlemsg(hWnd, evPreferences); + break; + case ID_CONSOLE: + console_toggle(); + break; + case ID_ONLINEHELP: + ShellExecute(NULL, "open", ONLINE_HELP_URL, NULL, NULL, SW_SHOWNORMAL); + break; + } + if((IDPLAYDISK <= LOWORD(wParam)) && (LOWORD(wParam) < (IDPLAYDISK + 100))) + { + char device[MAX_PATH]; + char searchpath[MAX_PATH]; + char filename[MAX_PATH]; + int len, pos = 0, cdromdrive = 0; + len = GetLogicalDriveStrings(MAX_PATH, device); + while(pos < len) + { + if(GetDriveType(device + pos)==DRIVE_CDROM) + { + if(LOWORD(wParam) - IDPLAYDISK == cdromdrive) + { +#ifdef USE_DVDREAD + sprintf(searchpath, "%sVIDEO_TS", device + pos); + if(GetFileAttributes(searchpath) != INVALID_FILE_ATTRIBUTES) + { + if (dvd_device) free(dvd_device); + dvd_device = strdup(device + pos); + dvd_title = dvd_chapter = dvd_angle = 1; + handlemsg(hWnd, evPlayDVD); + } +#endif +#ifdef HAVE_LIBCDIO + sprintf(searchpath, "%sTrack01.cda", device + pos); + if(GetFileAttributes(searchpath) != INVALID_FILE_ATTRIBUTES) + { + if (cdrom_device) free(cdrom_device); + cdrom_device = strdup(device + pos); + /* mplayer doesn't seem to like the trailing \ after the device name */ + cdrom_device[2]=0; + handlemsg(hWnd, evPlayCD); + } +#endif + else + { + HANDLE searchhndl; + WIN32_FIND_DATA finddata; + sprintf(searchpath, "%smpegav\\*.dat", device + pos); + if((searchhndl=FindFirstFile(searchpath, &finddata)) != INVALID_HANDLE_VALUE) + { + mp_msg(MSGT_GPLAYER,MSGL_V, "Opening VCD/SVCD\n"); + gui->playlist->clear_playlist(gui->playlist); + do + { + sprintf(filename, "%smpegav\\%s", device + pos, finddata.cFileName); + gui->playlist->add_track(gui->playlist, filename, NULL, NULL, 0); + } + while(FindNextFile(searchhndl, &finddata)); + FindClose(searchhndl); + } + gui->startplay(gui); + } + } + cdromdrive++; + } + pos += strlen(device + pos) + 1; + } + } + break; + } + case WM_PAINT: + { + PAINTSTRUCT ps; + RECT rd; + HDC hdc = BeginPaint(hWnd, &ps); + HDC hMemDC = CreateCompatibleDC(hdc); + int width, height; + GetClientRect(hWnd, &rd); + width = rd.right - rd.left; + height = rd.bottom - rd.top; + SelectObject(hMemDC, get_bitmap(hWnd)); + BitBlt(hdc, 0, 0, width, height, hMemDC, 0, 0, SRCCOPY); + DeleteDC(hMemDC); + EndPaint(hWnd, &ps); + return 0; + } + return 0; + } + return DefWindowProc(hWnd, message, wParam, lParam); +} + +inline void startplay(gui_t *gui) +{ + handlemsg(gui->mainwindow, evDropFile); +} + +/* returns the bits per pixel of the desktop */ +/* the format is always in BGR byte order */ +static int GetDesktopBitsPerPixel(void) +{ + HWND desktop=GetDesktopWindow(); + HDC dc=GetDC(desktop); + int bpp=GetDeviceCaps(dc, BITSPIXEL); + ReleaseDC(desktop, dc); + return bpp; +} + +/* unloads a skin and destroys its windows */ +extern int destroy_window(gui_t *gui) +{ + RECT rd; + unsigned int i; + + /* Save position: MSDN says don't pass workspace coordinates + * to CreateWindow() or SetWindowPos(), as both of which expect + * screen coordinates; resulting in the window appearing in the + * wrong location. + * -Erik + */ + + /* main window position */ + if(IsIconic(gui->mainwindow)) + ShowWindow(gui->mainwindow, SW_SHOWNORMAL); + GetWindowRect(gui->mainwindow, &rd); + gui_main_pos_x = rd.left; + gui_main_pos_y = rd.top; + + /* sub window position */ + if(IsIconic(gui->subwindow)) + ShowWindow(gui->subwindow, SW_SHOWNORMAL); + GetWindowRect(gui->subwindow, &rd); + gui_sub_pos_x = rd.left; + gui_sub_pos_y = rd.top; + + for(i=0; i<gui->window_priv_count; i++) + { + if(gui->window_priv[i]->bitmap) + DeleteObject(gui->window_priv[i]->bitmap); + free(gui->window_priv[i]); + } + free(gui->window_priv); + gui->window_priv = NULL; + gui->window_priv_count = 0; + + /* destroy the main window */ + if(gui->mainwindow) + DestroyWindow(gui->mainwindow); + gui->mainwindow = NULL; + + /* destroy the sub window */ + if(gui->subwindow) + DestroyWindow(gui->subwindow); + gui->subwindow = NULL; + + UnregisterClass(gui->classname, 0); + DestroyIcon(gui->icon); + + gui->skin->freeskin(gui->skin); + gui->skin = NULL; + return 0; +} + +static void create_menu(gui_t *gui) +{ + gui->diskmenu = CreatePopupMenu(); + gui->menu=CreatePopupMenu(); + gui->trayplaymenu = CreatePopupMenu(); + AppendMenu(gui->menu, MF_STRING | MF_POPUP, (UINT) gui->trayplaymenu, "Open..."); + AppendMenu(gui->trayplaymenu, MF_STRING, IDFILE_OPEN, "File..."); + AppendMenu(gui->trayplaymenu, MF_STRING, IDURL_OPEN, "Url..."); + AppendMenu(gui->trayplaymenu, MF_STRING, IDDIR_OPEN, "Directory..."); + AppendMenu(gui->menu, MF_SEPARATOR, 0, 0); + AppendMenu(gui->menu, MF_STRING | MF_POPUP, (UINT) gui->diskmenu, "Play &CD/DVD/VCD/SVCD"); + AppendMenu(gui->menu, MF_SEPARATOR, 0, 0); + AppendMenu(gui->menu, MF_STRING, IDSUBTITLE_OPEN, "Open Subtitle"); + AppendMenu(gui->menu, MF_STRING, ID_SKINBROWSER, "Skin Browser"); + AppendMenu(gui->menu, MF_SEPARATOR, 0, 0); + AppendMenu(gui->menu, MF_STRING, ID_PREFS, "Preferences"); + AppendMenu(gui->menu, MF_STRING, ID_CONSOLE, "Debug Console"); + AppendMenu(gui->menu, MF_STRING, ID_ONLINEHELP, "Online Help"); + AppendMenu(gui->menu, MF_SEPARATOR, 0, 0); + AppendMenu(gui->menu, MF_STRING, IDEXIT, "&Exit"); +} + +static void create_traymenu(gui_t *gui) +{ + gui->traymenu = CreatePopupMenu(); + gui->trayplaybackmenu = CreatePopupMenu(); + AppendMenu(gui->traymenu, MF_STRING | MF_POPUP, (UINT) gui->trayplaymenu, "Open..."); + AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0); + AppendMenu(gui->traymenu, MF_STRING | MF_POPUP, (UINT) gui->trayplaybackmenu, "Playback"); + AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_SEEKB, "Seek Backwards"); + AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_PTRACK, "Previous Track"); + AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_PLAY, "Play/Pause"); + AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_STOP, "Stop"); + AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_NTRACK, "Next Track"); + AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_SEEKF, "Seek Forwards"); + AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0); + AppendMenu(gui->traymenu, MF_STRING, ID_MUTE, "Toggle Mute"); + AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0); + AppendMenu(gui->traymenu, MF_STRING, IDSUBTITLE_OPEN, "Open Subtitle"); + AppendMenu(gui->traymenu, MF_STRING, ID_PLAYLIST, "Playlist"); + AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0); + AppendMenu(gui->traymenu, MF_STRING, ID_SHOWHIDE, "Show/Hide"); + AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0); + AppendMenu(gui->traymenu, MF_STRING, ID_PREFS, "Preferences"); + AppendMenu(gui->traymenu, MF_STRING, ID_CONSOLE, "Debug Console"); + AppendMenu(gui->traymenu, MF_STRING, ID_ONLINEHELP, "Online Help"); + AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0); + AppendMenu(gui->traymenu, MF_STRING, IDEXIT, "&Exit"); +} + +static void create_submenu(gui_t *gui) +{ + gui->submenu = CreatePopupMenu(); + gui->dvdmenu = CreatePopupMenu(); + gui->aspectmenu = CreatePopupMenu(); + gui->subtitlemenu = CreatePopupMenu(); + AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT) gui->trayplaymenu, "Open..."); + AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0); + AppendMenu(gui->submenu, MF_STRING, ID_SEEKB, "Seek Backwards"); + AppendMenu(gui->submenu, MF_STRING, ID_PTRACK, "Previous Track"); + AppendMenu(gui->submenu, MF_STRING, ID_PLAY, "Play/Pause"); + AppendMenu(gui->submenu, MF_STRING, ID_STOP, "Stop"); + AppendMenu(gui->submenu, MF_STRING, ID_NTRACK, "Next Track"); + AppendMenu(gui->submenu, MF_STRING, ID_SEEKF, "Seek Forwards"); + AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0); + AppendMenu(gui->submenu, MF_STRING, ID_FULLSCREEN, "Toggle Fullscreen"); + AppendMenu(gui->submenu, MF_STRING, ID_MUTE, "Toggle Mute"); + AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0); + AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT) gui->aspectmenu, "Aspect Ratio"); + AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT) gui->subtitlemenu, "Subtitle Options"); + AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT) gui->dvdmenu, "DVD Options"); +#ifdef USE_DVDREAD + AppendMenu(gui->dvdmenu, MF_STRING | MF_GRAYED, ID_CHAPTERSEL, "Select Title/Chapter..."); +#endif + AppendMenu(gui->subtitlemenu, MF_STRING, IDSUB_TOGGLE, "Subtitle Visibility On/Off"); + AppendMenu(gui->subtitlemenu, MF_STRING, IDSUB_CYCLE, "Cycle Subtitle Languages"); + AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT1, "Set 16:9"); + AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT2, "Set 4:3"); + AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT3, "Set 2.35"); + AppendMenu(gui->aspectmenu, MF_SEPARATOR, 0, 0); + AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT4, "Original Aspect"); + AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0); + AppendMenu(gui->submenu, MF_STRING, IDEXIT, "&Exit"); +} + +static void maketransparent(HWND hwnd, COLORREF crTransparent) +{ + HDC mdc = GetDC(hwnd); + RECT rd; + HRGN crRgnres, crRgn, crRgnTmp; + int iX = 0, iY = 0, iLeftX = 0; + int width, height; + GetWindowRect(hwnd, &rd); + width = rd.right - rd.left; + height = rd.bottom - rd.top; + + /* create an empty region */ + crRgn = CreateRectRgn(0, 0, 0, 0); + + /* Create a region from a bitmap with transparency colour of Purple */ + for (iY = -1; iY < height; iY++) + { + do + { + /* skip over transparent pixels at start of lines */ + while (iX <= width && GetPixel(mdc,iX, iY) == crTransparent) iX++; + + /* remember this pixel */ + iLeftX = iX; + + /* now find first non transparent pixel */ + while (iX <= width && GetPixel(mdc,iX, iY) != crTransparent) ++iX; + + /* create a temp region on this info */ + crRgnTmp = CreateRectRgn(iLeftX, iY, iX, iY+1); + + /* combine into main region */ + crRgnres = crRgn; + CombineRgn(crRgnres, crRgn, crRgnTmp, RGN_OR); + crRgn = crRgnres; + + /* delete the temp region for next pass (otherwise you'll get an ASSERT) */ + DeleteObject(crRgnTmp); + } while (iX < width); + iX = 0; + } + SetWindowRgn(hwnd, crRgn, TRUE); + DeleteObject(crRgn); + ReleaseDC(hwnd,mdc); +} + +static int window_render(gui_t *gui, HWND hWnd, HDC hdc, window_priv_t *priv, window *desc, BITMAPINFO binfo) +{ + int i; + SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui); + (gui->window_priv_count)++; + gui->window_priv = realloc(gui->window_priv, sizeof(window_priv_t *) * gui->window_priv_count); + priv = gui->window_priv[gui->window_priv_count - 1] = calloc(1, sizeof(window_priv_t)); + priv->hwnd = hWnd; + priv->type = desc->type; + priv->background = desc->base->bitmap[0]; + memcpy(&priv->img, desc->base->bitmap[0], sizeof(image)); + hdc = GetDC(hWnd); + binfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + binfo.bmiHeader.biWidth = priv->img.width; + binfo.bmiHeader.biHeight = -priv->img.height; + binfo.bmiHeader.biPlanes = 1; + binfo.bmiHeader.biSizeImage = priv->img.width * priv->img.height * (gui->screenbpp / 8); + binfo.bmiHeader.biXPelsPerMeter = 0; + binfo.bmiHeader.biYPelsPerMeter = 0; + binfo.bmiHeader.biClrUsed = 0; + binfo.bmiHeader.biClrImportant = 0; + binfo.bmiHeader.biBitCount = gui->screenbpp; + binfo.bmiHeader.biCompression = BI_RGB; + priv->bitmap = CreateDIBSection(hdc, &binfo, DIB_RGB_COLORS, (void **) &priv->img.data, NULL, 0); + if(!priv->bitmap) + { + mp_msg(MSGT_GPLAYER, MSGL_FATAL, "[GUI] unable to create bitmap for skinned window\n"); + return 0; + } + memcpy(priv->img.data, desc->base->bitmap[0]->data, binfo.bmiHeader.biSizeImage); + ReleaseDC(hWnd,hdc); + + for (i=0; i<gui->skin->widgetcount; i++) + if(gui->skin->widgets[i]->window == desc->type) + renderwidget(gui->skin, &priv->img, gui->skin->widgets[i], 1); + + return 0; +} + +/* creates the sub (AKA video) window,*/ +extern int create_subwindow(gui_t *gui, char *skindir) +{ + HINSTANCE instance = GetModuleHandle(NULL); + WNDCLASS wc; + RECT rect; + HWND hWnd; + DWORD style = 0; + HDC hdc = NULL; + BITMAPINFO binfo; + window_priv_t *priv = NULL; + window *desc = NULL; + int i, x = -1, y = -1; + vo_colorkey = 0xff00ff; + + for (i=0; i<gui->skin->windowcount; i++) + if(gui->skin->windows[i]->type == wiSub) + desc = gui->skin->windows[i]; + + if(!desc) + { + mp_msg(MSGT_GPLAYER, MSGL_FATAL, "[GUI] Invalid skin description\n"); + return 1; + } + + windowcolor = vo_colorkey; + colorbrush = CreateSolidBrush(windowcolor); + wc.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS; + wc.lpfnWndProc = SubProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = instance; + wc.hCursor = LoadCursor(NULL, IDC_ARROW); + wc.hIcon = gui->icon; + wc.hbrBackground = NULL; //WM_PAINT will handle background color switching; + wc.lpszClassName = "MPlayer Sub for Windows"; + wc.lpszMenuName = NULL; + RegisterClass(&wc); + + /* create the sub window menu */ + create_submenu(gui); + + rect.top = rect.left = 100; + rect.bottom = rect.top+desc->base->bitmap[0]->height; + rect.right = rect.left+desc->base->bitmap[0]->width; + + /* our window aspect */ + sub_aspect = (float)(rect.right-rect.left)/(rect.bottom-rect.top); + + style = fullscreen?WS_VISIBLE | WS_POPUP:WS_OVERLAPPEDWINDOW | WS_SYSMENU | WS_MINIMIZEBOX; + AdjustWindowRect(&rect, style, 0); + + if (gui_sub_pos_x >= 0) + x = gui_sub_pos_x; + if (gui_sub_pos_y >= 0) + y = gui_sub_pos_y; + + /* out of bounds check */ + if (x <= -1 || (x+(rect.right-rect.left) > GetSystemMetrics(SM_CXSCREEN))) + x = CW_USEDEFAULT; + if (y <= -1 || (y+(rect.bottom-rect.top) > GetSystemMetrics(SM_CYSCREEN))) + y = x; + + hWnd = CreateWindowEx(0, "MPlayer Sub for Windows", "MPlayer for Windows", style, + x, y, rect.right-rect.left, rect.bottom-rect.top, + gui->subwindow, NULL, instance, NULL); + + /* load all the window images */ + window_render(gui, hWnd, hdc, priv, desc, binfo); + + /* enable drag and drop support */ + DragAcceptFiles(hWnd, TRUE); + + gui->subwindow = hWnd; + if(sub_window) + WinID = gui->subwindow; + ShowWindow(gui->subwindow, SW_SHOW); + UpdateWindow(gui->subwindow); + return 0; +} + +/* loads/updates a skin and creates windows for it */ +extern int create_window(gui_t *gui, char *skindir) +{ + HINSTANCE instance = GetModuleHandle(NULL); + WNDCLASS wc; + RECT rect; + DWORD style = 0; + HWND hwnd; + HDC hdc = NULL; + BITMAPINFO binfo; + window_priv_t *priv = NULL; + window *desc = NULL; + char dir[MAX_PATH]; + unsigned int i; + int x = -1, y = -1; + + /* destroy the current main window */ + if(gui->skin) destroy_window(gui); + + /* get screenproperties */ + gui->screenbpp = GetDesktopBitsPerPixel(); + gui->screenw = GetSystemMetrics(SM_CXSCREEN); + gui->screenh = GetSystemMetrics(SM_CYSCREEN); + + /* load the new skin */ + gui->skin = loadskin(skindir, gui->screenbpp); + if(!gui->skin) + { + mp_msg(MSGT_GPLAYER, MSGL_FATAL, "[GUI] fatal error during skinload\n"); + /* Set default Skin */ + if (skinName) free(skinName); + skinName = strdup("Blue"); + /* then force write conf */ + cfg_write(); + return 1; + } + + /* find the description of the mainwindow */ + for (i=0; i<gui->skin->windowcount; i++) + if(gui->skin->windows[i]->type == wiMain) + desc = gui->skin->windows[i]; + + if(!desc) + { + mp_msg(MSGT_GPLAYER, MSGL_FATAL, "[GUI] Invalid skin description\n"); + return 1; + } + + /* load the icon from the executable */ + GetModuleFileName(NULL, dir, MAX_PATH); + gui->icon = ExtractIcon(instance, dir, 0); + + /* create the window class */ + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.lpfnWndProc = EventProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = instance; + wc.hCursor = LoadCursor(NULL, IDC_ARROW); + wc.hIcon = gui->icon; + wc.hbrBackground = CreateSolidBrush(RGB(0, 0, 0)); + wc.lpszClassName = gui->classname = "MPlayer GUI for Windows"; + wc.lpszMenuName = NULL; + RegisterClass(&wc); + + /* create a context menu */ + create_menu(gui); + /* create the systray menu */ + create_traymenu(gui); + + /* create the mainwindow */ + /* TODO implement aligning as described in skin.html */ + rect.top = rect.left = 100; + rect.bottom = rect.top+desc->base->bitmap[0]->height; + rect.right = rect.left+desc->base->bitmap[0]->width; + if(desc->decoration) style = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX; + else style = WS_POPUP | WS_SYSMENU; + + AdjustWindowRect(&rect, style, 0); + + /* Check if out of screen */ + if (gui_main_pos_x >= 0) + x = gui_main_pos_x; + if (gui_main_pos_y >= 0) + y = gui_main_pos_y; + + if (x <= -1 || (x+(rect.right-rect.left) > GetSystemMetrics(SM_CXFULLSCREEN))) + { + x = (GetSystemMetrics(SM_CXSCREEN) / 2) - ((rect.right-rect.left) / 2); + gui_main_pos_x = x; + } + if (y <= -1 || (y+(rect.bottom-rect.top) > GetSystemMetrics(SM_CYFULLSCREEN))) + { + y = ((GetSystemMetrics(SM_CYSCREEN)-40) - (rect.bottom-rect.top)); + gui_main_pos_y = y; + } + + hwnd = CreateWindowEx(0, gui->classname, "MPlayer for Windows", style, + x, y, rect.right-rect.left, rect.bottom-rect.top, + gui->mainwindow, NULL, instance, NULL); + + /* set the systray icon properties */ + nid.cbSize = sizeof(NOTIFYICONDATA); + nid.hWnd = hwnd; + nid.uID = 1; + nid.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP; + nid.uCallbackMessage = WM_SYSTRAY; + nid.hIcon = gui->icon; + strcpy(nid.szTip, "MPlayer for Windows"); + + /* register the systray icon */ + Shell_NotifyIcon(NIM_ADD, &nid); + + /* load all the window images */ + window_render(gui, hwnd, hdc, priv, desc, binfo); + + /* enable drag and drop support */ + DragAcceptFiles(hwnd, TRUE); + + updatedisplay(gui, hwnd); + gui->mainwindow = hwnd; + + /* display */ + ShowWindow(gui->mainwindow, SW_SHOW); + UpdateWindow(gui->mainwindow); + maketransparent(gui->mainwindow, RGB(255, 0, 255)); + return 0; +} + +gui_t *create_gui(char *skindir, char *skinName, void (*playercontrol)(int event)) +{ + gui_t *gui = calloc(1, sizeof(gui_t)); + char temp[MAX_PATH]; + HWND runningmplayer = FindWindow("MPlayer GUI for Windows", "MPlayer for Windows"); + + if(runningmplayer) + { + free(gui); + return NULL; + } + + gui->startplay = startplay; + gui->playercontrol = playercontrol; + gui->uninit = uninit; + gui->updatedisplay = updatedisplay; + + /* create playlist */ + gui->playlist = create_playlist(); + + if(!skinName) skinName = strdup("Blue"); + sprintf(temp, "%s\\%s", skindir, skinName); + if(create_window(gui, temp)) return NULL; + if(create_subwindow(gui, temp)) return NULL; + if(console) console_toggle(); + return gui; +} diff --git a/gui/win32/gui.h b/gui/win32/gui.h new file mode 100644 index 0000000000..2594d4ae01 --- /dev/null +++ b/gui/win32/gui.h @@ -0,0 +1,116 @@ +/* + MPlayer Gui for win32 + Copyright (c) 2003 Sascha Sommer <saschasommer@freenet.de> + Copyright (c) 2006 Erik Augustson <erik_27can@yahoo.com> + Copyright (c) 2006 Gianluigi Tiesi <sherpya@netfarm.it> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA +*/ + +#ifndef _GUI_H +#define _GUI_H +#include <config.h> +#include <playtree.h> +#include <m_config.h> +#include "skinload.h" +#include "playlist.h" + +extern char *skinName; +extern float sub_aspect; +extern play_tree_t* playtree; +extern m_config_t* mconfig; + +extern NOTIFYICONDATA nid; + +typedef struct window_priv_t window_priv_t; +struct window_priv_t +{ + HWND hwnd; + image img; + image *background; + HBITMAP bitmap; + int type; +}; + +typedef struct gui_t gui_t; +struct gui_t +{ + /* screenproperties */ + int screenw, screenh, screenbpp; + /* window related stuff */ + char *classname; + HICON icon; + unsigned int window_priv_count; + window_priv_t **window_priv; + + HWND mainwindow; + HWND subwindow; + + /* for event handling */ + widget *activewidget; + + int mousewx, mousewy; /* mousepos inside widget */ + int mousex, mousey; + + HMENU menu; + HMENU diskmenu; + HMENU traymenu; + HMENU trayplaymenu; + HMENU trayplaybackmenu; + HMENU submenu; + HMENU subtitlemenu; + HMENU aspectmenu; + HMENU dvdmenu; + HMENU playlistmenu; + + int skinbrowserwindow; + int playlistwindow; + int aboutwindow; + + skin_t *skin; + playlist_t *playlist; + + void (*startplay)(gui_t *gui); + void (*updatedisplay)(gui_t *gui, HWND hwnd); + void (*playercontrol)(int event); /* userdefine call back function */ + void (*uninit)(gui_t *gui); +}; + +#define wsShowWindow 8 +#define wsHideWindow 16 +#define wsShowFrame 1 +#define wsMovable 2 +#define wsSizeable 4 + +extern gui_t *create_gui(char *skindir, char *skinName, void (*playercontrol)(int event)); +extern int destroy_window(gui_t *gui); +extern int create_window(gui_t *gui, char *skindir); +extern int create_subwindow(gui_t *gui, char *skindir); +extern int parse_filename(char *file, play_tree_t *playtree, m_config_t *mconfig, int clear); +extern void capitalize(char *filename); +extern int import_playtree_playlist_into_gui(play_tree_t *my_playtree, m_config_t *config); + +/* Dialogs */ +extern void display_playlistwindow(gui_t *gui); +extern void update_playlistwindow(void); +extern int display_openfilewindow(gui_t *gui, int add); +extern void display_openurlwindow(gui_t *gui, int add); +extern void display_skinbrowser(gui_t *gui); +extern void display_chapterselwindow(gui_t *gui); +extern void display_eqwindow(gui_t *gui); +extern void display_prefswindow(gui_t *gui); +extern void display_opensubtitlewindow(gui_t *gui); + +#endif diff --git a/gui/win32/interface.c b/gui/win32/interface.c new file mode 100644 index 0000000000..4c165f037e --- /dev/null +++ b/gui/win32/interface.c @@ -0,0 +1,952 @@ +/* + MPlayer Gui for win32 + Copyright (c) 2003 Sascha Sommer <saschasommer@freenet.de> + Copyright (c) 2006 Erik Augustson <erik_27can@yahoo.com> + Copyright (c) 2006 Gianluigi Tiesi <sherpya@netfarm.it> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA +*/ + +#include <windows.h> +#include <interface.h> +#include <m_option.h> +#include <mixer.h> +#include <mp_msg.h> +#include <help_mp.h> +#include <codec-cfg.h> +#include <stream/stream.h> +#include <libmpdemux/demuxer.h> +#include <libmpdemux/stheader.h> +#ifdef USE_DVDREAD +#include <stream/stream_dvd.h> +#endif +#include <input/input.h> +#include <libvo/video_out.h> +#include <libao2/audio_out.h> +#include <access_mpcontext.h> +#include "gui.h" +#include "dialogs.h" +#include "wincfg.h" +#ifdef HAVE_LIBCDIO +#include <cdio/cdio.h> +#endif + +extern m_obj_settings_t *vf_settings; +extern void exit_player(const char *how); +extern char *filename; +extern int abs_seek_pos; +extern float rel_seek_secs; +extern int audio_id; +extern int video_id; +extern int dvdsub_id; +extern int vobsub_id; +extern int stream_cache_size; +extern int autosync; +extern int vcd_track; +extern int dvd_title; +extern float force_fps; +extern af_cfg_t af_cfg; +int guiWinID = 0; + +char *skinName = NULL; +char *codecname = NULL; +int mplGotoTheNext = 1; +static gui_t *mygui = NULL; +static int update_subwindow(void); +static RECT old_rect; +static DWORD style; +ao_functions_t *audio_out = NULL; +vo_functions_t *video_out = NULL; +mixer_t *mixer = NULL; + +/* test for playlist files, no need to specify -playlist on the commandline. + * add any conceivable playlist extensions here. + * - Erik + */ +int parse_filename(char *file, play_tree_t *playtree, m_config_t *mconfig, int clear) +{ + if(clear) + mygui->playlist->clear_playlist(mygui->playlist); + + if(strstr(file, ".m3u") || strstr(file, ".pls")) + { + playtree = parse_playlist_file(file); + import_playtree_playlist_into_gui(playtree, mconfig); + return 1; + } + return 0; +} + +/** + * \brief this actually creates a new list containing only one element... + */ +void gaddlist( char ***list, const char *entry) +{ + int i; + + if (*list) + { + for (i=0; (*list)[i]; i++) free((*list)[i]); + free(*list); + } + + *list = malloc(2 * sizeof(char **)); + (*list)[0] = gstrdup(entry); + (*list)[1] = NULL; +} + +char *gstrdup(const char *str) +{ + if (!str) return NULL; + return strdup(str); +} + +/** + * \brief this replaces a string starting with search by replace. + * If not found, replace is appended. + */ +void greplace(char ***list, char *search, char *replace) +{ + int i = 0; + int len = (search) ? strlen(search) : 0; + + if (*list) + { + for (i = 0; (*list)[i]; i++) + { + if (search && (!strncmp((*list)[i], search, len))) + { + free((*list)[i]); + (*list)[i] = gstrdup(replace); + return; + } + } + *list = realloc(*list, (i + 2) * sizeof(char *)); + } + else + *list = malloc(2 * sizeof(char *)); + + (*list)[i] = gstrdup(replace); + (*list)[i + 1] = NULL; +} + +/* this function gets called by the gui to update mplayer */ +static void guiSetEvent(int event) +{ + if(guiIntfStruct.mpcontext) + mixer = mpctx_get_mixer(guiIntfStruct.mpcontext); + + switch(event) + { + case evPlay: + case evPlaySwitchToPause: + mplPlay(); + break; + case evPause: + mplPause(); + break; +#ifdef USE_DVDREAD + case evPlayDVD: + { + static char dvdname[MAX_PATH]; + guiIntfStruct.DVD.current_title = dvd_title; + guiIntfStruct.DVD.current_chapter = dvd_chapter; + guiIntfStruct.DVD.current_angle = dvd_angle; + guiIntfStruct.DiskChanged = 1; + + mplSetFileName(NULL, dvd_device, STREAMTYPE_DVD); + dvdname[0] = 0; + strcat(dvdname, "DVD Movie"); + GetVolumeInformation(dvd_device, dvdname, MAX_PATH, NULL, NULL, NULL, NULL, 0); + capitalize(dvdname); + mp_msg(MSGT_GPLAYER, MSGL_V, "Opening DVD %s -> %s\n", dvd_device, dvdname); + guiGetEvent(guiSetParameters, (char *) STREAMTYPE_DVD); + mygui->playlist->clear_playlist(mygui->playlist); + mygui->playlist->add_track(mygui->playlist, filename, NULL, dvdname, 0); + mygui->startplay(mygui); + break; + } +#endif +#ifdef HAVE_LIBCDIO + case evPlayCD: + { + int i; + char track[10]; + char trackname[10]; + CdIo_t *p_cdio = cdio_open(NULL, DRIVER_UNKNOWN); + track_t i_tracks; + + if(p_cdio == NULL) printf("Couldn't find a driver.\n"); + i_tracks = cdio_get_num_tracks(p_cdio); + + mygui->playlist->clear_playlist(mygui->playlist); + for(i=0;i<i_tracks;i++) + { + sprintf(track, "cdda://%d", i+1); + sprintf(trackname, "Track %d", i+1); + mygui->playlist->add_track(mygui->playlist, track, NULL, trackname, 0); + } + cdio_destroy(p_cdio); + mygui->startplay(mygui); + break; + } +#endif + case evFullScreen: + mp_input_queue_cmd(mp_input_parse_cmd("vo_fullscreen")); + break; + case evExit: + { + /* We are asking mplayer to exit, later it will ask us after uninit is made + this should be the only safe way to quit */ + mygui->activewidget = NULL; + mp_input_queue_cmd(mp_input_parse_cmd("quit")); + break; + } + case evStop: + if(guiIntfStruct.Playing) + guiGetEvent(guiCEvent, (void *) guiSetStop); + break; + case evSetMoviePosition: + { + rel_seek_secs = guiIntfStruct.Position / 100.0f; + abs_seek_pos = 3; + break; + } + case evForward10sec: + { + rel_seek_secs = 10.0f; + abs_seek_pos = 0; + break; + } + case evBackward10sec: + { + rel_seek_secs = -10.0f; + abs_seek_pos = 0; + break; + } + case evSetBalance: + case evSetVolume: + { + float l,r; + + if (guiIntfStruct.Playing == 0) + break; + + if (guiIntfStruct.Balance == 50.0f) + mixer_setvolume(mixer, guiIntfStruct.Volume, guiIntfStruct.Volume); + + l = guiIntfStruct.Volume * ((100.0f - guiIntfStruct.Balance) / 50.0f); + r = guiIntfStruct.Volume * ((guiIntfStruct.Balance) / 50.0f); + + if (l > guiIntfStruct.Volume) l=guiIntfStruct.Volume; + if (r > guiIntfStruct.Volume) r=guiIntfStruct.Volume; + mixer_setvolume(mixer, l, r); + /* Check for balance support on mixer - there is a better way ?? */ + if (r != l) + { + mixer_getvolume(mixer, &l, &r); + if (r == l) + { + mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] Mixer doesn't support balanced audio\n"); + mixer_setvolume(mixer, guiIntfStruct.Volume, guiIntfStruct.Volume); + guiIntfStruct.Balance = 50.0f; + } + } + break; + } + case evMute: + { + mp_cmd_t * cmd = calloc(1, sizeof(*cmd)); + cmd->id=MP_CMD_MUTE; + cmd->name=strdup("mute"); + mp_input_queue_cmd(cmd); + break; + } + case evDropFile: + case evLoadPlay: + { + switch(guiIntfStruct.StreamType) + { + case STREAMTYPE_DVD: + { + guiIntfStruct.Title = guiIntfStruct.DVD.current_title; + guiIntfStruct.Chapter = guiIntfStruct.DVD.current_chapter; + guiIntfStruct.Angle = guiIntfStruct.DVD.current_angle; + guiIntfStruct.DiskChanged = 1; + guiGetEvent(guiCEvent, (void *) guiSetPlay); + break; + } + default: + { + guiIntfStruct.FilenameChanged = guiIntfStruct.NewPlay = 1; + update_playlistwindow(); + mplGotoTheNext = guiIntfStruct.Playing? 0 : 1; + guiGetEvent(guiCEvent, (void *) guiSetStop); + guiGetEvent(guiCEvent, (void *) guiSetPlay); + break; + } + } + break; + } + case evNext: + mplNext(); + break; + case evPrev: + mplPrev(); + break; + } +} + +void mplPlay( void ) +{ + if((!guiIntfStruct.Filename ) || (guiIntfStruct.Filename[0] == 0)) + return; + + if(guiIntfStruct.Playing > 0) + { + mplPause(); + return; + } + guiIntfStruct.NewPlay = 1; + guiGetEvent(guiCEvent, (void *) guiSetPlay); +} + +void mplPause( void ) +{ + if(!guiIntfStruct.Playing) return; + + if(guiIntfStruct.Playing == 1) + { + mp_cmd_t * cmd = calloc(1, sizeof(*cmd)); + cmd->id=MP_CMD_PAUSE; + cmd->name=strdup("pause"); + mp_input_queue_cmd(cmd); + } else guiIntfStruct.Playing = 1; +} + +void mplNext(void) +{ + if(guiIntfStruct.Playing == 2) return; + switch(guiIntfStruct.StreamType) + { +#ifdef USE_DVDREAD + case STREAMTYPE_DVD: + if(guiIntfStruct.DVD.current_chapter == (guiIntfStruct.DVD.chapters - 1)) + return; + guiIntfStruct.DVD.current_chapter++; + break; +#endif + default: + if(mygui->playlist->current == (mygui->playlist->trackcount - 1)) + return; + mplSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)++]->filename, + STREAMTYPE_STREAM); + break; + } + mygui->startplay(mygui); +} + +void mplPrev(void) +{ + if(guiIntfStruct.Playing == 2) return; + switch(guiIntfStruct.StreamType) + { +#ifdef USE_DVDREAD + case STREAMTYPE_DVD: + if(guiIntfStruct.DVD.current_chapter == 1) + return; + guiIntfStruct.DVD.current_chapter--; + break; +#endif + default: + if(mygui->playlist->current == 0) + return; + mplSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)--]->filename, + STREAMTYPE_STREAM); + break; + } + mygui->startplay(mygui); +} + +void mplEnd( void ) +{ + if(!mplGotoTheNext && guiIntfStruct.Playing) + { + mplGotoTheNext = 1; + return; + } + + if(mplGotoTheNext && guiIntfStruct.Playing && + (mygui->playlist->current < (mygui->playlist->trackcount - 1)) && + guiIntfStruct.StreamType != STREAMTYPE_DVD && + guiIntfStruct.StreamType != STREAMTYPE_DVDNAV) + { + /* we've finished this file, reset the aspect */ + if(movie_aspect >= 0) + movie_aspect = -1; + + mplGotoTheNext = guiIntfStruct.FilenameChanged = guiIntfStruct.NewPlay = 1; + mplSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)++]->filename, STREAMTYPE_STREAM); + //sprintf(guiIntfStruct.Filename, mygui->playlist->tracks[(mygui->playlist->current)++]->filename); + } + + if(guiIntfStruct.FilenameChanged && guiIntfStruct.NewPlay) + return; + + guiIntfStruct.TimeSec = 0; + guiIntfStruct.Position = 0; + guiIntfStruct.AudioType = 0; + +#ifdef USE_DVDREAD + guiIntfStruct.DVD.current_title = 1; + guiIntfStruct.DVD.current_chapter = 1; + guiIntfStruct.DVD.current_angle = 1; +#endif + + if (mygui->playlist->current == (mygui->playlist->trackcount - 1)) + mygui->playlist->current = 0; + + fullscreen = 0; + if(style == WS_VISIBLE | WS_POPUP) + { + style = WS_OVERLAPPEDWINDOW | WS_SIZEBOX; + SetWindowLong(mygui->subwindow, GWL_STYLE, style); + } + guiGetEvent(guiCEvent, (void *) guiSetStop); +} + +void mplSetFileName(char *dir, char *name, int type) +{ + if(!name) return; + if(!dir) + guiSetFilename(guiIntfStruct.Filename, name) + else + guiSetDF(guiIntfStruct.Filename, dir, name); + + guiIntfStruct.StreamType = type; + free((void **) &guiIntfStruct.AudioFile); + free((void **) &guiIntfStruct.Subtitlename); +} + +void mplFullScreen( void ) +{ + if(!guiIntfStruct.sh_video) return; + + if(sub_window) + { + if(!fullscreen && IsWindowVisible(mygui->subwindow) && !IsIconic(mygui->subwindow)) + GetWindowRect(mygui->subwindow, &old_rect); + + if(fullscreen) + { + fullscreen = 0; + style = WS_OVERLAPPEDWINDOW | WS_SIZEBOX; + } else { + fullscreen = 1; + style = WS_VISIBLE | WS_POPUP; + } + SetWindowLong(mygui->subwindow, GWL_STYLE, style); + update_subwindow(); + } + video_out->control(VOCTRL_FULLSCREEN, 0); + if(sub_window) ShowWindow(mygui->subwindow, SW_SHOW); +} + +static DWORD WINAPI GuiThread(void) +{ + MSG msg; + + if(!skinName) skinName = strdup("Blue"); + if(!mygui) mygui = create_gui(get_path("skins"), skinName, guiSetEvent); + if(!mygui) exit_player("Unable to load gui"); + + if(autosync && autosync != gtkAutoSync) + { + gtkAutoSyncOn = 1; + gtkAutoSync = autosync; + } + + while(mygui) + { + GetMessage(&msg, NULL, 0, 0); + TranslateMessage(&msg); + DispatchMessage(&msg); + } + fprintf(stderr, "[GUI] Gui Thread Terminated\n"); + fflush(stderr); + return 0; +} + +void guiInit(void) +{ + DWORD threadId; + memset(&guiIntfStruct, 0, sizeof(guiIntfStruct)); + /* Create The gui thread */ + if (!mygui) + { + CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) GuiThread, NULL, 0, &threadId); + mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] Creating GUI Thread 0x%04x\n", threadId); + } + + /* Wait until the gui is created */ + while(!mygui) Sleep(100); + mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] Gui Thread started\n"); +} + +void guiDone(void) +{ + if(mygui) + { + fprintf(stderr, "[GUI] Closed by main mplayer window\n"); + fflush(stderr); + mygui->uninit(mygui); + free(mygui); + TerminateThread(GuiThread, 0); + mygui = NULL; + } + /* Remove tray icon */ + Shell_NotifyIcon(NIM_DELETE, &nid); + cfg_write(); +} + +/* this function gets called by mplayer to update the gui */ +int guiGetEvent(int type, char *arg) +{ + stream_t *stream = (stream_t *) arg; +#ifdef USE_DVDREAD + dvd_priv_t *dvdp = (dvd_priv_t *) arg; +#endif + if(!mygui || !mygui->skin) return 0; + + if(guiIntfStruct.mpcontext) + { + audio_out = mpctx_get_audio_out(guiIntfStruct.mpcontext); + video_out = mpctx_get_video_out(guiIntfStruct.mpcontext); + mixer = mpctx_get_mixer(guiIntfStruct.mpcontext); + playtree = mpctx_get_playtree_iter(guiIntfStruct.mpcontext); + } + + switch (type) + { + case guiSetFileFormat: + guiIntfStruct.FileFormat = (int) arg; + break; + case guiSetParameters: + { + guiGetEvent(guiSetDefaults, NULL); + guiIntfStruct.DiskChanged = 0; + guiIntfStruct.FilenameChanged = 0; + guiIntfStruct.NewPlay = 0; + switch(guiIntfStruct.StreamType) + { + case STREAMTYPE_PLAYLIST: + break; +#ifdef USE_DVDREAD + case STREAMTYPE_DVD: + { + char tmp[512]; + dvd_title = guiIntfStruct.DVD.current_title; + dvd_chapter = guiIntfStruct.DVD.current_chapter; + dvd_angle = guiIntfStruct.DVD.current_angle; + sprintf(tmp,"dvd://%d", guiIntfStruct.Title); + guiSetFilename(guiIntfStruct.Filename, tmp); + break; + } +#endif + } + if(guiIntfStruct.Filename) + filename = strdup(guiIntfStruct.Filename); + else if(filename) + strcpy(guiIntfStruct.Filename, filename); + break; + } + case guiSetAudioOnly: + { + guiIntfStruct.AudioOnly = (int) arg; + if(IsWindowVisible(mygui->subwindow)) + ShowWindow(mygui->subwindow, SW_HIDE); + break; + } + case guiSetContext: + guiIntfStruct.mpcontext = (void *) arg; + break; + case guiSetDemuxer: + guiIntfStruct.demuxer = (void *) arg; + break; + case guiSetValues: + { + guiIntfStruct.sh_video = arg; + if (arg) + { + sh_video_t *sh = (sh_video_t *)arg; + codecname = sh->codec->name; + guiIntfStruct.FPS = sh->fps; + + /* we have video, show the subwindow */ + if(!IsWindowVisible(mygui->subwindow) || IsIconic(mygui->subwindow)) + ShowWindow(mygui->subwindow, SW_SHOWNORMAL); + if(WinID == -1) + update_subwindow(); + + } + break; + } + case guiSetShVideo: + { + guiIntfStruct.MovieWidth = vo_dwidth; + guiIntfStruct.MovieHeight = vo_dheight; + + sub_aspect = (float)guiIntfStruct.MovieWidth/guiIntfStruct.MovieHeight; + if(WinID != -1) + update_subwindow(); + break; + } + case guiSetStream: + { + guiIntfStruct.StreamType = stream->type; + switch(stream->type) + { +#ifdef USE_DVDREAD + case STREAMTYPE_DVD: + guiGetEvent(guiSetDVD, (char *) stream->priv); + break; +#endif + } + break; + } +#ifdef USE_DVDREAD + case guiSetDVD: + { + guiIntfStruct.DVD.titles = dvdp->vmg_file->tt_srpt->nr_of_srpts; + guiIntfStruct.DVD.chapters = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts; + guiIntfStruct.DVD.angles = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_angles; + guiIntfStruct.DVD.nr_of_audio_channels = dvdp->nr_of_channels; + memcpy(guiIntfStruct.DVD.audio_streams, dvdp->audio_streams, sizeof(dvdp->audio_streams)); + guiIntfStruct.DVD.nr_of_subtitles = dvdp->nr_of_subtitles; + memcpy(guiIntfStruct.DVD.subtitles, dvdp->subtitles, sizeof(dvdp->subtitles)); + guiIntfStruct.DVD.current_title = dvd_title + 1; + guiIntfStruct.DVD.current_chapter = dvd_chapter + 1; + guiIntfStruct.DVD.current_angle = dvd_angle + 1; + guiIntfStruct.Track = dvd_title + 1; + break; + } +#endif + case guiReDraw: + mygui->updatedisplay(mygui, mygui->mainwindow); + break; + case guiSetAfilter: + guiIntfStruct.afilter = (void *) arg; + break; + case guiCEvent: + { + guiIntfStruct.Playing = (int) arg; + switch (guiIntfStruct.Playing) + { + case guiSetPlay: + { + guiIntfStruct.Playing = 1; + break; + } + case guiSetStop: + { + guiIntfStruct.Playing = 0; + if(movie_aspect >= 0) + movie_aspect = -1; + update_subwindow(); + break; + } + case guiSetPause: + guiIntfStruct.Playing = 2; + break; + } + break; + } + case guiIEvent: + { + mp_msg(MSGT_GPLAYER,MSGL_V, "cmd: %d\n", (int) arg); + /* MPlayer asks us to quit */ + switch((int) arg) + { + case MP_CMD_GUI_FULLSCREEN: + mplFullScreen(); + break; + case MP_CMD_QUIT: + { + mygui->uninit(mygui); + free(mygui); + mygui = NULL; + exit_player("Done"); + return 0; + } + case MP_CMD_GUI_STOP: + guiGetEvent(guiCEvent, (void *) guiSetStop); + break; + case MP_CMD_GUI_PLAY: + guiGetEvent(guiCEvent, (void *) guiSetPlay); + break; + case MP_CMD_GUI_SKINBROWSER: + if(fullscreen) guiSetEvent(evFullScreen); + PostMessage(mygui->mainwindow, WM_COMMAND, (WPARAM) ID_SKINBROWSER, 0); + break; + case MP_CMD_GUI_PLAYLIST: + if(fullscreen) guiSetEvent(evFullScreen); + PostMessage(mygui->mainwindow, WM_COMMAND, (WPARAM) ID_PLAYLIST, 0); + break; + case MP_CMD_GUI_PREFERENCES: + if(fullscreen) guiSetEvent(evFullScreen); + PostMessage(mygui->mainwindow, WM_COMMAND, (WPARAM) ID_PREFS, 0); + break; + case MP_CMD_GUI_LOADFILE: + if(fullscreen) guiSetEvent(evFullScreen); + PostMessage(mygui->mainwindow, WM_COMMAND, (WPARAM) IDFILE_OPEN, 0); + break; + case MP_CMD_GUI_LOADSUBTITLE: + if(fullscreen) guiSetEvent(evFullScreen); + PostMessage(mygui->mainwindow, WM_COMMAND, (WPARAM) IDSUBTITLE_OPEN, 0); + break; + default: + break; + } + break; + } + case guiSetFileName: + if (arg) guiIntfStruct.Filename = (char *) arg; + break; + case guiSetDefaults: + { + audio_id = -1; + video_id = -1; + dvdsub_id = -1; + vobsub_id = -1; + stream_cache_size = -1; + autosync = 0; + vcd_track = 0; + dvd_title = 0; + force_fps = 0; + if(!mygui->playlist->tracks) return 0; + filename = guiIntfStruct.Filename = mygui->playlist->tracks[mygui->playlist->current]->filename; + guiIntfStruct.Track = mygui->playlist->current + 1; + if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm"); + if(gtkAOExtraStereo) + { + char *name = malloc(12 + 20 + 1); + snprintf(name, 12 + 20, "extrastereo=%f", gtkAOExtraStereoMul); + name[12 + 20] = 0; + greplace(&af_cfg.list, "extrastereo", name); + free(name); + } + if(gtkCacheOn) stream_cache_size = gtkCacheSize; + if(gtkAutoSyncOn) autosync = gtkAutoSync; + break; + } + case guiSetVolume: + { + if(audio_out) + { + /* Some audio_out drivers do not support balance e.g. dsound */ + /* FIXME this algo is not correct */ + float l, r; + mixer_getvolume(mixer, &l, &r); + guiIntfStruct.Volume = (r > l ? r : l); /* max(r,l) */ + if (r != l) + guiIntfStruct.Balance = ((r-l) + 100.0f) * 0.5f; + else + guiIntfStruct.Balance = 50.0f; + } + break; + } + default: + mp_msg(MSGT_GPLAYER, MSGL_ERR, "[GUI] GOT UNHANDLED EVENT %i\n", type); + } + return 0; +} + +/* This function adds/inserts one file into the gui playlist */ +int import_file_into_gui(char *pathname, int insert) +{ + char filename[MAX_PATH]; + char *filepart = filename; + + if (strstr(pathname, "://")) + { + mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] Adding special %s\n", pathname); + mygui->playlist->add_track(mygui->playlist, pathname, NULL, NULL, 0); + return 1; + } + if (GetFullPathName(pathname, MAX_PATH, filename, &filepart)) + { + if (!(GetFileAttributes(filename) & FILE_ATTRIBUTE_DIRECTORY)) + { + mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] Adding filename: %s - fullpath: %s\n", filepart, filename); + mygui->playlist->add_track(mygui->playlist, filename, NULL, filepart, 0); + return 1; + } + else + mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] Cannot add %s\n", filename); + } + + return 0; +} + +/* This function imports the initial playtree (based on cmd-line files) into the gui playlist + by either: + - overwriting gui pl (enqueue=0) */ + +int import_initial_playtree_into_gui(play_tree_t *my_playtree, m_config_t *config, int enqueue) +{ + play_tree_iter_t *my_pt_iter = NULL; + int result = 0; + + if(!mygui) guiInit(); + + if((my_pt_iter = pt_iter_create(&my_playtree, config))) + { + while ((filename = pt_iter_get_next_file(my_pt_iter)) != NULL) + { + if (parse_filename(filename, my_playtree, config, 0)) + result = 1; + else if (import_file_into_gui(filename, 0)) /* Add it to end of list */ + result = 1; + } + } + mplGotoTheNext = 1; + + if (result) + { + mygui->playlist->current = 0; + filename = mygui->playlist->tracks[0]->filename; + } + return result; +} + +/* This function imports and inserts an playtree, that is created "on the fly", for example by + parsing some MOV-Reference-File; or by loading an playlist with "File Open" + The file which contained the playlist is thereby replaced with it's contents. */ + +int import_playtree_playlist_into_gui(play_tree_t *my_playtree, m_config_t *config) +{ + play_tree_iter_t *my_pt_iter = NULL; + int result = 0; + + if((my_pt_iter = pt_iter_create(&my_playtree, config))) + { + while ((filename = pt_iter_get_next_file(my_pt_iter)) != NULL) + if (import_file_into_gui(filename, 1)) /* insert it into the list and set plCurrent = new item */ + result = 1; + pt_iter_destroy(&my_pt_iter); + } + filename = NULL; + return result; +} + +inline void gtkMessageBox(int type, const char *str) +{ + if (type & GTK_MB_FATAL) + MessageBox(NULL, str, "MPlayer GUI for Windows Error", MB_OK | MB_ICONERROR); + + fprintf(stderr, "[GUI] MessageBox: %s\n", str); + fflush(stderr); +} + +void guiMessageBox(int level, char *str) +{ + switch(level) + { + case MSGL_FATAL: + gtkMessageBox(GTK_MB_FATAL | GTK_MB_SIMPLE, str); + break; + case MSGL_ERR: + gtkMessageBox(GTK_MB_ERROR | GTK_MB_SIMPLE, str); + break; + } +} + +static int update_subwindow(void) +{ + int x,y; + RECT rd; + WINDOWPOS wp; + + if(!sub_window) + { + WinID = -1; // so far only directx supports WinID in windows + + if(IsWindowVisible(mygui->subwindow) && guiIntfStruct.sh_video && guiIntfStruct.Playing) + { + ShowWindow(mygui->subwindow, SW_HIDE); + return 0; + } + else if(guiIntfStruct.AudioOnly) + return 0; + else ShowWindow(mygui->subwindow, SW_SHOW); + } + + /* we've come out of fullscreen at the end of file */ + if((!IsWindowVisible(mygui->subwindow) || IsIconic(mygui->subwindow)) && !guiIntfStruct.AudioOnly) + ShowWindow(mygui->subwindow, SW_SHOWNORMAL); + + /* get our current window coordinates */ + GetWindowRect(mygui->subwindow, &rd); + + x = rd.left; + y = rd.top; + + /* restore sub window position when coming out of fullscreen */ + if(x <= 0) x = old_rect.left; + if(y <= 0) y = old_rect.top; + + if(!guiIntfStruct.Playing) + { + window *desc = NULL; + int i; + + for (i=0; i<mygui->skin->windowcount; i++) + if(mygui->skin->windows[i]->type == wiSub) + desc = mygui->skin->windows[i]; + + rd.right = rd.left+desc->base->bitmap[0]->width; + rd.bottom = rd.top+desc->base->bitmap[0]->height; + sub_aspect = (float)(rd.right-rd.left)/(rd.bottom-rd.top); + } + else + { + rd.right = rd.left+guiIntfStruct.MovieWidth; + rd.bottom = rd.top+guiIntfStruct.MovieHeight; + + if (movie_aspect > 0.0) // forced aspect from the cmdline + sub_aspect = movie_aspect; + } + + + AdjustWindowRect(&rd, WS_OVERLAPPEDWINDOW | WS_SIZEBOX, 0); + SetWindowPos(mygui->subwindow, 0, x, y, rd.right-rd.left, rd.bottom-rd.top, SWP_NOOWNERZORDER); + + wp.hwnd = mygui->subwindow; + wp.x = rd.left; + wp.y = rd.top; + wp.cx = rd.right-rd.left; + wp.cy = rd.bottom-rd.top; + wp.flags = SWP_NOOWNERZORDER | SWP_SHOWWINDOW; + + /* erase the bitmap image if there's video */ + if(guiIntfStruct.Playing != 0 && guiIntfStruct.sh_video) + SendMessage(mygui->subwindow, WM_ERASEBKGND, (WPARAM)GetDC(mygui->subwindow), 0); + + /* reset the window aspect */ + SendMessage(mygui->subwindow, WM_WINDOWPOSCHANGED, 0, (LPARAM)&wp); + return 0; +} + +void guiEventHandling(void) {} diff --git a/gui/win32/playlist.c b/gui/win32/playlist.c new file mode 100644 index 0000000000..65556e9dee --- /dev/null +++ b/gui/win32/playlist.c @@ -0,0 +1,154 @@ +/* + MPlayer Gui for win32 + Copyright (c) 2003 Sascha Sommer <saschasommer@freenet.de> + Copyright (c) 2006 Erik Augustson <erik_27can@yahoo.com> + Copyright (c) 2006 Gianluigi Tiesi <sherpya@netfarm.it> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA +*/ + +#include <windows.h> +#include <mp_msg.h> +#include "playlist.h" + +/* TODO: implement sort_playlist */ + +BOOL adddirtoplaylist(playlist_t *playlist, const char *path, BOOL recursive) +{ + HANDLE findHandle = INVALID_HANDLE_VALUE; + WIN32_FIND_DATA finddata; + char findpath[MAX_PATH], filename[MAX_PATH]; + char *filepart; + + sprintf(findpath, "%s\\*.*", path); + + findHandle = FindFirstFile(findpath, &finddata); + + if (findHandle == INVALID_HANDLE_VALUE) return FALSE; + do + { + if (finddata.cFileName[0] == '.' || strstr(finddata.cFileName, "Thumbs.db")) continue; + sprintf(findpath, "%s\\%s", path, finddata.cFileName); + + if (GetFileAttributes(findpath) & FILE_ATTRIBUTE_DIRECTORY) + { + if(recursive) + adddirtoplaylist(playlist, findpath, recursive); + } + else + { + if (GetFullPathName(findpath, MAX_PATH, filename, &filepart)) + playlist->add_track(playlist, filename, NULL, filepart, 0); + } + } while (FindNextFile(findHandle, &finddata)); + FindClose(findHandle); + return TRUE; +} + +static void add_track(playlist_t *playlist, const char *filename, const char *artist, const char *title, int duration) +{ + (playlist->trackcount)++; + playlist->tracks = realloc(playlist->tracks, playlist->trackcount * sizeof(pl_track_t *)); + playlist->tracks[playlist->trackcount - 1] = calloc(1, sizeof(pl_track_t)); + if(filename) playlist->tracks[playlist->trackcount - 1]->filename = strdup(filename); + if(artist) playlist->tracks[playlist->trackcount - 1]->artist = strdup(artist); + if(title) playlist->tracks[playlist->trackcount - 1]->title = strdup(title); + if(duration) playlist->tracks[playlist->trackcount - 1]->duration = duration; +} + +static void remove_track(playlist_t *playlist, int number) +{ + pl_track_t **tmp = calloc(1, playlist->trackcount * sizeof(pl_track_t *)); + int i, p = 0; + memcpy(tmp, playlist->tracks, playlist->trackcount * sizeof(pl_track_t *)); + (playlist->trackcount)--; + playlist->tracks = realloc(playlist->tracks, playlist->trackcount * sizeof(pl_track_t *)); + for(i=0; i<playlist->trackcount + 1; i++) + { + if(i != (number - 1)) + { + playlist->tracks[p] = tmp[i]; + p++; + } + else + { + if(tmp[i]->filename) free(tmp[i]->filename); + if(tmp[i]->artist) free(tmp[i]->artist); + if(tmp[i]->title) free(tmp[i]->title); + free(tmp[i]); + } + } + free(tmp); +} + +static void moveup_track(playlist_t *playlist, int number) +{ + pl_track_t *tmp; + if(number == 1) return; /* already first */ + tmp = playlist->tracks[number - 2]; + playlist->tracks[number - 2] = playlist->tracks[number - 1]; + playlist->tracks[number - 1] = tmp; +} + +static void movedown_track(playlist_t *playlist, int number) +{ + pl_track_t *tmp; + if(number == playlist->trackcount) return; /* already latest */ + tmp = playlist->tracks[number]; + playlist->tracks[number] = playlist->tracks[number - 1]; + playlist->tracks[number - 1] = tmp; +} + +static void sort_playlist(playlist_t *playlist, int opt) {} + +static void clear_playlist(playlist_t *playlist) +{ + while(playlist->trackcount) playlist->remove_track(playlist, 1); + playlist->tracks = NULL; + playlist->current = 0; +} + +static void free_playlist(playlist_t *playlist) +{ + if(playlist->tracks) playlist->clear_playlist(playlist); + free(playlist); +} + +static void dump_playlist(playlist_t *playlist) +{ + int i; + for (i=0; i<playlist->trackcount; i++) + { + mp_msg(MSGT_GPLAYER, MSGL_V, "track %i %s ", i + 1, playlist->tracks[i]->filename); + if(playlist->tracks[i]->artist) mp_msg(MSGT_GPLAYER, MSGL_V, "%s ", playlist->tracks[i]->artist); + if(playlist->tracks[i]->title) mp_msg(MSGT_GPLAYER, MSGL_V, "- %s ", playlist->tracks[i]->title); + if(playlist->tracks[i]->duration) mp_msg(MSGT_GPLAYER, MSGL_V, "%i ", playlist->tracks[i]->duration); + mp_msg(MSGT_GPLAYER, MSGL_V, "\n"); + } +} + +playlist_t *create_playlist(void) +{ + playlist_t *playlist = calloc(1, sizeof(playlist_t)); + playlist->add_track = add_track; + playlist->remove_track = remove_track; + playlist->moveup_track = moveup_track; + playlist->movedown_track = movedown_track; + playlist->dump_playlist = dump_playlist; + playlist->sort_playlist = sort_playlist; + playlist->clear_playlist = clear_playlist; + playlist->free_playlist = free_playlist; + return playlist; +} diff --git a/gui/win32/playlist.h b/gui/win32/playlist.h new file mode 100644 index 0000000000..41766d169d --- /dev/null +++ b/gui/win32/playlist.h @@ -0,0 +1,57 @@ +/* + MPlayer Gui for win32 + Copyright (c) 2003 Sascha Sommer <saschasommer@freenet.de> + Copyright (c) 2006 Erik Augustson <erik_27can@yahoo.com> + Copyright (c) 2006 Gianluigi Tiesi <sherpya@netfarm.it> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA +*/ + +#ifndef _PLAYLIST_H +#define _PLAYLIST_H + +typedef struct +{ + char *filename; + char *artist; + char *title; + int duration; +} pl_track_t; + +typedef struct playlist_t playlist_t; +struct playlist_t +{ + int current; /* currently used track */ + int trackcount; /* number of tracknumber */ + pl_track_t **tracks; /* tracklist */ + void (*add_track)(playlist_t* playlist, const char *filename, const char *artist, const char *title, int duration); + void (*remove_track)(playlist_t* playlist, int number); + void (*moveup_track)(playlist_t* playlist, int number); + void (*movedown_track)(playlist_t* playlist, int number); + void (*dump_playlist)(playlist_t* playlist); + void (*sort_playlist)(playlist_t* playlist, int opt); + void (*clear_playlist)(playlist_t* playlist); + void (*free_playlist)(playlist_t* playlist); +}; + +#define SORT_BYFILENAME 1 +#define SORT_BYARTIST 2 +#define SORT_BYTITLE 3 +#define SORT_BYDURATION 4 + +extern playlist_t *create_playlist(void); +extern BOOL adddirtoplaylist(playlist_t *playlist, const char* path, BOOL recursive); + +#endif diff --git a/gui/win32/preferences.c b/gui/win32/preferences.c new file mode 100644 index 0000000000..0063a6ac13 --- /dev/null +++ b/gui/win32/preferences.c @@ -0,0 +1,722 @@ +/* + MPlayer Gui for win32 + Copyright (c) 2003 Sascha Sommer <saschasommer@freenet.de> + Copyright (c) 2006 Erik Augustson <erik_27can@yahoo.com> + Copyright (c) 2006 Gianluigi Tiesi <sherpya@netfarm.it> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA +*/ + +#include <windows.h> +#include <commctrl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <libvo/video_out.h> +#include <libao2/audio_out.h> +#include <mixer.h> +#include "interface.h" +#include "gui.h" +#include "mp_msg.h" +#include "help_mp.h" +#include "dialogs.h" +#include "wincfg.h" + +extern int vo_doublebuffering; +extern int vo_directrendering; +extern int frame_dropping; +extern int soft_vol; +extern float audio_delay; +extern int osd_level; +extern char *dvd_device, *cdrom_device; +extern char *proc_priority; + +static void set_defaults(void); + +static LRESULT CALLBACK PrefsWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) +{ + HWND btn, label, edit1, edit2, edit3, updown1, updown2, track1, track2; + static HWND vo_driver, ao_driver, prio; + int i = 0, j = 0; + char dvddevice[MAX_PATH]; + char cdromdevice[MAX_PATH]; + char procprio[11]; + float x = 10.0, y = 100.0, stereopos, delaypos; + stereopos = gtkAOExtraStereoMul * x; + delaypos = audio_delay * y; + + switch (iMsg) + { + case WM_CREATE: + { + /* video and audio drivers */ + label = CreateWindow("static", "Video Driver:", + WS_CHILD | WS_VISIBLE, + 10, 13, 70, 15, hwnd, + NULL, ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + label = CreateWindow("static", "Audio Driver:", + WS_CHILD | WS_VISIBLE, + 190, 13, 70, 15, hwnd, + NULL, ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + label = CreateWindow("static", "Extra stereo coefficient:", + WS_CHILD | WS_VISIBLE, + 10, 126, 115, 15, hwnd, + NULL, ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + label = CreateWindow("static", "Audio delay:", + WS_CHILD | WS_VISIBLE, + 36, 165, 115, 15, hwnd, + NULL, ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + label = CreateWindow("static", "OSD level:", + WS_CHILD | WS_VISIBLE, + 10, 264, 115, 15, hwnd, + NULL, ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + label = CreateWindow("static", "DVD device:", + WS_CHILD | WS_VISIBLE, + 80, 363, 115, 15, hwnd, + NULL, ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + label = CreateWindow("static", "CD device:", + WS_CHILD | WS_VISIBLE, + 202, 363, 115, 15, hwnd, + NULL, ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + label = CreateWindow("static", "Priority:", + WS_CHILD | WS_VISIBLE, + 217, 264, 115, 15, hwnd, + NULL, ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + vo_driver = CreateWindow("combobox", NULL, + CBS_DROPDOWNLIST | CB_SHOWDROPDOWN | + CBS_NOINTEGRALHEIGHT | CBS_HASSTRINGS | + WS_CHILD | WS_VISIBLE | + WS_VSCROLL | WS_TABSTOP, + 80, 10, 100, 160, hwnd, + (HMENU) ID_VO_DRIVER, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + + ao_driver = CreateWindow("combobox", NULL, + CBS_DROPDOWNLIST | CB_SHOWDROPDOWN | + CBS_NOINTEGRALHEIGHT | CBS_HASSTRINGS | + WS_CHILD | WS_VISIBLE | + WS_VSCROLL | WS_TABSTOP, + 260, 10, 100, 160, hwnd, + (HMENU) ID_AO_DRIVER, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + + prio = CreateWindow("combobox", NULL, + CBS_DROPDOWNLIST | CB_SHOWDROPDOWN | + CBS_NOINTEGRALHEIGHT | CBS_HASSTRINGS | + WS_CHILD | WS_VISIBLE | + WS_VSCROLL | WS_TABSTOP, + 260, 260, 100, 160, hwnd, + (HMENU) ID_PRIO, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + + /* checkboxes */ + btn = CreateWindow("button", "Enable double buffering", + WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, + 25, 35, 150, 25, + hwnd, (HMENU) ID_DOUBLE, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + btn = CreateWindow("button", "Enable direct rendering", + WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, + 25, 57, 150, 25, + hwnd, (HMENU) ID_DIRECT, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + btn = CreateWindow("button", "Enable framedropping", + WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, + 25, 79, 150, 25, + hwnd, (HMENU) ID_FRAMEDROP, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + btn = CreateWindow("button", "Normalize sound", + WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, + 205, 35, 150, 25, + hwnd, (HMENU) ID_NORMALIZE, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + btn = CreateWindow("button", "Enable software mixer", + WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, + 205, 57, 150, 25, + hwnd, (HMENU) ID_SOFTMIX, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + btn = CreateWindow("button", "Enable extra stereo", + WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, + 205, 79, 150, 25, + hwnd, (HMENU) ID_EXTRASTEREO, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + btn = CreateWindow("button", "Enable cache", + WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, + 10, 200, 90, 25, + hwnd, (HMENU) ID_CACHE, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + btn = CreateWindow("button", "Enable autosync", + WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, + 192, 200, 100, 25, hwnd, + (HMENU) ID_AUTOSYNC, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + btn = CreateWindow("button", "Display videos in the sub window", + WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, + 85, 227, 250, 25, + hwnd, (HMENU) ID_SUBWINDOW, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + /* osd level */ + btn = CreateWindow("button", "None", + WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON, + 95, 260, 100, 25, hwnd, + (HMENU) ID_NONE, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + btn = CreateWindow("button", "Timer and indicators", + WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON, + 95, 280, 180, 25, hwnd, + (HMENU) ID_OSD1, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + btn = CreateWindow("button", "Progress bar only", + WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON, + 95, 300, 180, 25, hwnd, + (HMENU) ID_OSD2, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + btn = CreateWindow("button", "Timer, percentage, and total time", + WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON, + 95, 320, 180, 25, hwnd, + (HMENU) ID_OSD3, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + btn = CreateWindow("button", "Apply", + WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, + 199, 395, 80, 25, hwnd, + (HMENU) ID_APPLY, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + btn = CreateWindow("button", "Cancel", + WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, + 285, 395, 80, 25, hwnd, + (HMENU) ID_CANCEL, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + btn = CreateWindow("button", "Defaults", + WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, + 4, 395, 80, 25, hwnd, + (HMENU) ID_DEFAULTS, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + /* extra stereo coefficient trackbar */ + track1 = CreateWindow(TRACKBAR_CLASS, "Coefficient", + WS_CHILD | WS_VISIBLE | WS_TABSTOP | + WS_DISABLED | TBS_HORZ | + TBS_BOTTOM | TBS_NOTICKS, + 120, 120, 245, 35, hwnd, + (HMENU) ID_TRACKBAR1, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendDlgItemMessage(hwnd, ID_TRACKBAR1, TBM_SETRANGE, 1, MAKELONG(-100, 100)); + + /* audio delay */ + track2 = CreateWindow(TRACKBAR_CLASS, "Audio delay", + WS_CHILD | WS_VISIBLE | WS_TABSTOP | + WS_DISABLED | TBS_HORZ | + TBS_BOTTOM | TBS_NOTICKS, + 120, 160, 245, 35, hwnd, + (HMENU) ID_TRACKBAR2, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendDlgItemMessage(hwnd, ID_TRACKBAR2, TBM_SETRANGE, 1, MAKELONG(-1000, 1000)); + + /* cache */ + edit1 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", "cache", + WS_CHILD | WS_VISIBLE | WS_DISABLED | + ES_LEFT | ES_AUTOHSCROLL, + 105, 203, 40, 20, hwnd, + (HMENU) ID_EDIT1, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(edit1, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + updown1 = CreateUpDownControl(WS_CHILD | WS_VISIBLE | + WS_DISABLED | UDS_SETBUDDYINT | + UDS_ARROWKEYS | UDS_NOTHOUSANDS, + 145, 203, 20, 20, hwnd, + ID_UPDOWN1, + ((LPCREATESTRUCT) lParam) -> hInstance, + (HWND)edit1, 0, 0, 0); + SendDlgItemMessage(hwnd, ID_UPDOWN1, UDM_SETRANGE32, (WPARAM)0, (LPARAM)65535); + + /* autosync */ + edit2 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", "autosync", + WS_CHILD | WS_VISIBLE | WS_DISABLED | + ES_LEFT | ES_AUTOHSCROLL, + 300, 203, 40, 20, hwnd, + (HMENU) ID_EDIT2, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(edit2, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + updown2 = CreateUpDownControl(WS_CHILD | WS_VISIBLE | + WS_DISABLED | UDS_SETBUDDYINT | + UDS_ARROWKEYS | UDS_NOTHOUSANDS, + 340, 203, 20, 20, hwnd, + ID_UPDOWN2, + ((LPCREATESTRUCT) lParam) -> hInstance, + (HWND)edit2, 0, 0, 0); + SendDlgItemMessage(hwnd, ID_UPDOWN2, UDM_SETRANGE32, (WPARAM)0, (LPARAM)10000); + + /* dvd and cd devices */ + edit3 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", NULL, + WS_CHILD | WS_VISIBLE | + ES_LEFT | ES_AUTOHSCROLL, + 145, 360, 20, 20, hwnd, + (HMENU) ID_DVDDEVICE, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(edit3, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + edit3 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", NULL, + WS_CHILD | WS_VISIBLE | + ES_LEFT| ES_AUTOHSCROLL, + 260, 360, 20, 20, hwnd, + (HMENU) ID_CDDEVICE, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(edit3, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + while(video_out_drivers[i]) + { + const vo_info_t *info = video_out_drivers[i++]->info; + if(!video_driver_list) gaddlist(&video_driver_list, (char *)info->short_name); + SendDlgItemMessage(hwnd, ID_VO_DRIVER, CB_ADDSTRING, 0, (LPARAM) info->short_name); + } + /* Special case for directx:noaccel */ + SendDlgItemMessage(hwnd, ID_VO_DRIVER, CB_ADDSTRING, 0, (LPARAM) "directx:noaccel"); + SendMessage(vo_driver, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + while(audio_out_drivers[j]) + { + const ao_info_t *info = audio_out_drivers[j++]->info; + if(!audio_driver_list) + { + // FIXME: default priority (i.e. order in audio_out_drivers) should be fixed instead + // if win32 as default is really desirable + gaddlist(&audio_driver_list, "win32"/*(char *)info->short_name*/); + } + SendDlgItemMessage(hwnd, ID_AO_DRIVER, CB_ADDSTRING, 0, (LPARAM) info->short_name); + } + SendMessage(ao_driver, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + /* priority list, i'm leaving out realtime for safety's sake */ + SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "low"); + SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "belownormal"); + SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "normal"); + SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "abovenormal"); + SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "high"); + SendMessage(prio, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + /* set our preferences on what we already have */ + if(video_driver_list) + SendDlgItemMessage(hwnd, ID_VO_DRIVER, CB_SETCURSEL, + (WPARAM)SendMessage(vo_driver, CB_FINDSTRING, -1, + (LPARAM)video_driver_list[0]), 0); + + if(audio_driver_list) + SendDlgItemMessage(hwnd, ID_AO_DRIVER, CB_SETCURSEL, + (WPARAM)SendMessage(ao_driver, CB_FINDSTRING, -1, + (LPARAM)audio_driver_list[0]), 0); + + if(vo_doublebuffering) + SendDlgItemMessage(hwnd, ID_DOUBLE, BM_SETCHECK, 1, 0); + if(vo_directrendering) + SendDlgItemMessage(hwnd, ID_DIRECT, BM_SETCHECK, 1, 0); + if(frame_dropping) + SendDlgItemMessage(hwnd, ID_FRAMEDROP, BM_SETCHECK, 1, 0); + if(gtkAONorm) + SendDlgItemMessage(hwnd, ID_NORMALIZE, BM_SETCHECK, 1, 0); + if(soft_vol) + SendDlgItemMessage(hwnd, ID_SOFTMIX, BM_SETCHECK, 1, 0); + if(gtkAOExtraStereo) + { + SendDlgItemMessage(hwnd, ID_EXTRASTEREO, BM_SETCHECK, 1, 0); + if(!guiIntfStruct.Playing) + { + EnableWindow(track1, 1); + EnableWindow(track2, 1); + } + } + else gtkAOExtraStereoMul = 1.0; + SendDlgItemMessage(hwnd, ID_TRACKBAR1, TBM_SETPOS, 1, (LPARAM)stereopos); + + if(audio_delay) + SendDlgItemMessage(hwnd, ID_TRACKBAR2, TBM_SETPOS, 1, (LPARAM)delaypos); + + if(gtkCacheOn) { + SendDlgItemMessage(hwnd, ID_CACHE, BM_SETCHECK, 1, 0); + EnableWindow(edit1, 1); + EnableWindow(updown1, 1); + } + else gtkCacheSize = 2048; + SendDlgItemMessage(hwnd, ID_UPDOWN1, UDM_SETPOS32, 0, (LPARAM)gtkCacheSize); + + if(gtkAutoSyncOn) { + SendDlgItemMessage(hwnd, ID_AUTOSYNC, BM_SETCHECK, 1, 0); + EnableWindow(edit2, 1); + EnableWindow(updown2, 1); + } + else gtkAutoSync = 0; + SendDlgItemMessage(hwnd, ID_UPDOWN2, UDM_SETPOS32, 0, (LPARAM)gtkAutoSync); + + if(sub_window) + SendDlgItemMessage(hwnd, ID_SUBWINDOW, BM_SETCHECK, 1, 0); + + if(!osd_level) + SendDlgItemMessage(hwnd, ID_NONE, BM_SETCHECK, 1, 0); + else if(osd_level == 1) + SendDlgItemMessage(hwnd, ID_OSD1, BM_SETCHECK, 1, 0); + else if(osd_level == 2) + SendDlgItemMessage(hwnd, ID_OSD2, BM_SETCHECK, 1, 0); + else if(osd_level == 3) + SendDlgItemMessage(hwnd, ID_OSD3, BM_SETCHECK, 1, 0); + + if(dvd_device) + SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_SETTEXT, 0, (LPARAM)dvd_device); + else SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:"); + + if(cdrom_device) + SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_SETTEXT, 0, (LPARAM)cdrom_device); + else SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:"); + + if(proc_priority) + SendDlgItemMessage(hwnd, ID_PRIO, CB_SETCURSEL, + (WPARAM)SendMessage(prio, CB_FINDSTRING, -1, + (LPARAM)proc_priority), 0); + + else SendDlgItemMessage(hwnd, ID_PRIO, CB_SETCURSEL, 2, 0); + + break; + } + case WM_CTLCOLORDLG: + case WM_CTLCOLOREDIT: + case WM_CTLCOLORBTN: + case WM_CTLCOLORSTATIC: + { + HDC hdc = (HDC)wParam; + SetBkMode(hdc, TRANSPARENT); + return (INT_PTR)SOLID_GREY; + } + break; + case WM_COMMAND: + { + switch (LOWORD(wParam)) + { + case ID_EXTRASTEREO: + { + if(SendDlgItemMessage(hwnd, ID_EXTRASTEREO, BM_GETCHECK, 0, 0) == BST_CHECKED) + { + EnableWindow(GetDlgItem(hwnd, ID_TRACKBAR1), 1); + EnableWindow(GetDlgItem(hwnd, ID_TRACKBAR2), 1); + } else { + EnableWindow(GetDlgItem(hwnd, ID_TRACKBAR1), 0); + EnableWindow(GetDlgItem(hwnd, ID_TRACKBAR2), 0); + SendDlgItemMessage(hwnd, ID_TRACKBAR1, TBM_SETPOS, 1, (LPARAM)10.0); + SendDlgItemMessage(hwnd, ID_TRACKBAR2, TBM_SETPOS, 1, (LPARAM)0); + } + break; + } + case ID_CACHE: + { + if(SendDlgItemMessage(hwnd, ID_CACHE, BM_GETCHECK, 0, 0) == BST_CHECKED) + { + EnableWindow(GetDlgItem(hwnd, ID_EDIT1), 1); + EnableWindow(GetDlgItem(hwnd, ID_UPDOWN1), 1); + } else { + EnableWindow(GetDlgItem(hwnd, ID_EDIT1), 0); + EnableWindow(GetDlgItem(hwnd, ID_UPDOWN1), 0); + SendDlgItemMessage(hwnd, ID_UPDOWN1, UDM_SETPOS32, 1, (LPARAM)2048); + } + break; + } + case ID_AUTOSYNC: + { + if(SendDlgItemMessage(hwnd, ID_AUTOSYNC, BM_GETCHECK, 0, 0) == BST_CHECKED) + { + EnableWindow(GetDlgItem(hwnd, ID_EDIT2), 1); + EnableWindow(GetDlgItem(hwnd, ID_UPDOWN2), 1); + } else { + EnableWindow(GetDlgItem(hwnd, ID_EDIT2), 0); + EnableWindow(GetDlgItem(hwnd, ID_UPDOWN2), 0); + SendDlgItemMessage(hwnd, ID_UPDOWN2, UDM_SETPOS32, 1, (LPARAM)0); + } + break; + } + case ID_DEFAULTS: + { + set_defaults(); + SendDlgItemMessage(hwnd, ID_VO_DRIVER, CB_SETCURSEL, + (WPARAM)SendMessage(vo_driver, CB_FINDSTRING, -1, (LPARAM)"directx"), 0); + + SendDlgItemMessage(hwnd, ID_AO_DRIVER, CB_SETCURSEL, + (WPARAM)SendMessage(ao_driver, CB_FINDSTRING, -1, (LPARAM)"dsound"), 0); + + SendDlgItemMessage(hwnd, ID_PRIO, CB_SETCURSEL, + (WPARAM)SendMessage(prio, CB_FINDSTRING, -1, (LPARAM)proc_priority), 0); + + SendDlgItemMessage(hwnd, ID_TRACKBAR1, TBM_SETPOS, 1, (LPARAM)10.0); + SendDlgItemMessage(hwnd, ID_TRACKBAR2, TBM_SETPOS, 1, (LPARAM)0.0); + SendDlgItemMessage(hwnd, ID_UPDOWN1, UDM_SETPOS32, 0, (LPARAM)gtkCacheSize); + SendDlgItemMessage(hwnd, ID_UPDOWN2, UDM_SETPOS32, 0, (LPARAM)gtkAutoSync); + SendDlgItemMessage(hwnd, ID_DOUBLE, BM_SETCHECK, 0, 0); + SendDlgItemMessage(hwnd, ID_DIRECT, BM_SETCHECK, 0, 0); + SendDlgItemMessage(hwnd, ID_FRAMEDROP, BM_SETCHECK, 0, 0); + SendDlgItemMessage(hwnd, ID_NORMALIZE, BM_SETCHECK, 0, 0); + SendDlgItemMessage(hwnd, ID_SOFTMIX, BM_SETCHECK, 0, 0); + SendDlgItemMessage(hwnd, ID_EXTRASTEREO, BM_SETCHECK, 0, 0); + SendDlgItemMessage(hwnd, ID_CACHE, BM_SETCHECK, 0, 0); + SendDlgItemMessage(hwnd, ID_AUTOSYNC, BM_SETCHECK, 0, 0); + SendDlgItemMessage(hwnd, ID_SUBWINDOW, BM_SETCHECK, 1, 0); + SendDlgItemMessage(hwnd, ID_NONE, BM_SETCHECK, 0, 0); + SendDlgItemMessage(hwnd, ID_OSD1, BM_SETCHECK, 1, 0); + SendDlgItemMessage(hwnd, ID_OSD2, BM_SETCHECK, 0, 0); + SendDlgItemMessage(hwnd, ID_OSD3, BM_SETCHECK, 0, 0); + SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:"); + SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:"); + SendMessage(hwnd, WM_COMMAND, (WPARAM)ID_APPLY, 0); + break; + } + case ID_CANCEL: + DestroyWindow(hwnd); + return 0; + case ID_APPLY: + { + int strl; + if(guiIntfStruct.Playing) guiGetEvent(guiCEvent, (void *)guiSetStop); + + /* Set the video driver */ + gfree(video_driver_list[0]); + strl = SendMessage(vo_driver, CB_GETCURSEL, 0, 0); + video_driver_list[0] = malloc(strl); + SendMessage(vo_driver, CB_GETLBTEXT, (WPARAM)strl, + (LPARAM)video_driver_list[0]); + + /* Set the audio driver */ + gfree(audio_driver_list[0]); + strl = SendMessage(ao_driver, CB_GETCURSEL, 0, 0); + audio_driver_list[0] = malloc(strl); + SendMessage(ao_driver, CB_GETLBTEXT, (WPARAM)strl, + (LPARAM)audio_driver_list[0]); + + /* Set the priority level */ + SendMessage(prio, CB_GETLBTEXT, (WPARAM)SendMessage(prio, CB_GETCURSEL, 0, 0), (LPARAM)procprio); + proc_priority = strdup(procprio); + + /* double buffering */ + if(SendDlgItemMessage(hwnd, ID_DOUBLE, BM_GETCHECK, 0, 0) == BST_CHECKED) + vo_doublebuffering = 1; + else vo_doublebuffering = 0; + + /* direct rendering */ + if(SendDlgItemMessage(hwnd, ID_DIRECT, BM_GETCHECK, 0, 0) == BST_CHECKED) + vo_directrendering = 1; + else vo_directrendering = 0; + + /* frame dropping */ + if(SendDlgItemMessage(hwnd, ID_FRAMEDROP, BM_GETCHECK, 0, 0) == BST_CHECKED) + frame_dropping = 1; + else frame_dropping = 0; + + /* normalize */ + if(SendDlgItemMessage(hwnd, ID_NORMALIZE, BM_GETCHECK, 0, 0) == BST_CHECKED) + gtkAONorm = 1; + else gtkAONorm = 0; + + /* software mixer */ + if(SendDlgItemMessage(hwnd, ID_SOFTMIX, BM_GETCHECK, 0, 0) == BST_CHECKED) + soft_vol = 1; + else soft_vol = 0; + + /* extra stereo */ + if(SendDlgItemMessage(hwnd, ID_EXTRASTEREO, BM_GETCHECK, 0, 0) == BST_CHECKED) + gtkAOExtraStereo = 1; + else { + gtkAOExtraStereo = 0; + gtkAOExtraStereoMul = 10.0; + } + gtkAOExtraStereoMul = SendDlgItemMessage(hwnd, ID_TRACKBAR1, TBM_GETPOS, 0, 0) / 10.0; + + /* audio delay */ + audio_delay = SendDlgItemMessage(hwnd, ID_TRACKBAR2, TBM_GETPOS, 0, 0) / 100.0; + + /* cache */ + if(SendDlgItemMessage(hwnd, ID_CACHE, BM_GETCHECK, 0, 0) == BST_CHECKED) + gtkCacheOn = 1; + else gtkCacheOn = 0; + gtkCacheSize = SendDlgItemMessage(hwnd, ID_UPDOWN1, UDM_GETPOS32, 0, 0); + + /* autosync */ + if(SendDlgItemMessage(hwnd, ID_AUTOSYNC, BM_GETCHECK, 0, 0) == BST_CHECKED) + gtkAutoSyncOn = 1; + else gtkAutoSyncOn = 0; + gtkAutoSync = SendDlgItemMessage(hwnd, ID_UPDOWN2, UDM_GETPOS32, 0, 0); + + /* sub window */ + if(SendDlgItemMessage(hwnd, ID_SUBWINDOW, BM_GETCHECK, 0, 0) == BST_CHECKED) + sub_window = 1; + else sub_window = 0; + + /* osd level */ + if(SendDlgItemMessage(hwnd, ID_NONE, BM_GETCHECK, 0, 0) == BST_CHECKED) + osd_level = 0; + else if(SendDlgItemMessage(hwnd, ID_OSD1, BM_GETCHECK, 0, 0) == BST_CHECKED) + osd_level = 1; + else if(SendDlgItemMessage(hwnd, ID_OSD2, BM_GETCHECK, 0, 0) == BST_CHECKED) + osd_level = 2; + else if(SendDlgItemMessage(hwnd, ID_OSD3, BM_GETCHECK, 0, 0) == BST_CHECKED) + osd_level = 3; + + /* dvd and cd devices */ + SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_GETTEXT, MAX_PATH, (LPARAM)dvddevice); + dvd_device = strdup(dvddevice); + SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_GETTEXT, MAX_PATH, (LPARAM)cdromdevice); + cdrom_device = strdup(cdromdevice); + + MessageBox(hwnd, "You must restart MPlayer for the changes to take effect.", "MPlayer - Info:", MB_OK); + DestroyWindow(hwnd); + break; + } + } + return 0; + } + case WM_DESTROY: + PostQuitMessage (0); + return 0; + } + return DefWindowProc(hwnd, iMsg, wParam, lParam); +} + +void display_prefswindow(gui_t *gui) +{ + HWND hWnd; + HINSTANCE hInstance = GetModuleHandle(NULL); + WNDCLASS wc; + int x, y; + if(FindWindow(NULL, "MPlayer - Preferences")) return; + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.lpfnWndProc = PrefsWndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = hInstance; + wc.hCursor = LoadCursor(NULL,IDC_ARROW); + wc.hIcon = gui->icon; + wc.hbrBackground = SOLID_GREY; + wc.lpszClassName = "MPlayer - Preferences"; + wc.lpszMenuName = NULL; + RegisterClass(&wc); + x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (375 / 2); + y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (452 / 2); + hWnd = CreateWindow("MPlayer - Preferences", + "MPlayer - Preferences", + WS_POPUPWINDOW | WS_CAPTION, + x, + y, + 375, + 452, + NULL, + NULL, + hInstance, + NULL); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui); + ShowWindow(hWnd, SW_SHOW); + UpdateWindow(hWnd); +} + +static void set_defaults(void) +{ + proc_priority = "normal"; + vo_doublebuffering = 1; + vo_directrendering = 0; + frame_dropping = 0; + soft_vol = 0; + gtkAONorm = 0; + gtkAOExtraStereo = 0; + gtkAOExtraStereoMul = 1.0; + audio_delay = 0.0; + sub_window = 1; + gtkCacheOn = 0; + gtkCacheSize = 2048; + gtkAutoSyncOn = 0; + gtkAutoSync = 0; +} diff --git a/gui/win32/skinload.c b/gui/win32/skinload.c new file mode 100644 index 0000000000..9c56e93348 --- /dev/null +++ b/gui/win32/skinload.c @@ -0,0 +1,809 @@ +/* + MPlayer Gui for win32 + Copyright (c) 2003 Sascha Sommer <saschasommer@freenet.de> + Copyright (c) 2006 Erik Augustson <erik_27can@yahoo.com> + Copyright (c) 2006 Gianluigi Tiesi <sherpya@netfarm.it> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA +*/ + +#include <stdlib.h> +#include <inttypes.h> +#include <windows.h> +#include <png.h> + +#include <mp_msg.h> +#include <cpudetect.h> +#include <libswscale/rgb2rgb.h> +#include <libswscale/swscale.h> + +#include "gui.h" + +#define MAX_LINESIZE 256 + +typedef struct +{ + int msg; + char *name; +} evName; + +static const evName evNames[] = +{ + { evNone, "evNone" }, + { evPlay, "evPlay" }, + { evDropFile, "evDropFile" }, + { evStop, "evStop" }, + { evPause, "evPause" }, + { evPrev, "evPrev" }, + { evNext, "evNext" }, + { evLoad, "evLoad" }, + { evEqualizer, "evEqualizer" }, + { evEqualizer, "evEqualeaser" }, + { evPlayList, "evPlaylist" }, + { evExit, "evExit" }, + { evIconify, "evIconify" }, + { evIncBalance, "evIncBalance" }, + { evDecBalance, "evDecBalance" }, + { evFullScreen, "evFullScreen" }, + { evFName, "evFName" }, + { evMovieTime, "evMovieTime" }, + { evAbout, "evAbout" }, + { evLoadPlay, "evLoadPlay" }, + { evPreferences, "evPreferences" }, + { evSkinBrowser, "evSkinBrowser" }, + { evBackward10sec, "evBackward10sec" }, + { evForward10sec, "evForward10sec" }, + { evBackward1min, "evBackward1min" }, + { evForward1min, "evForward1min" }, + { evBackward10min, "evBackward10min" }, + { evForward10min, "evForward10min" }, + { evIncVolume, "evIncVolume" }, + { evDecVolume, "evDecVolume" }, + { evMute, "evMute" }, + { evIncAudioBufDelay, "evIncAudioBufDelay" }, + { evDecAudioBufDelay, "evDecAudioBufDelay" }, + { evPlaySwitchToPause, "evPlaySwitchToPause" }, + { evPauseSwitchToPlay, "evPauseSwitchToPlay" }, + { evNormalSize, "evNormalSize" }, + { evDoubleSize, "evDoubleSize" }, + { evSetMoviePosition, "evSetMoviePosition" }, + { evSetVolume, "evSetVolume" }, + { evSetBalance, "evSetBalance" }, + { evHelp, "evHelp" }, + { evLoadSubtitle, "evLoadSubtitle" }, + { evPlayDVD, "evPlayDVD" }, + { evPlayVCD, "evPlayVCD" }, + { evSetURL, "evSetURL" }, + { evLoadAudioFile, "evLoadAudioFile" }, + { evDropSubtitle, "evDropSubtitle" }, + { evSetAspect, "evSetAspect" } +}; + +static const int evBoxs = sizeof(evNames) / sizeof(evName); + +static char *geteventname(int event) +{ + int i; + for(i=0; i<evBoxs; i++) + if(evNames[i].msg == event) + return evNames[i].name; + return NULL; +} + +static inline int get_sws_cpuflags(void) +{ + return (gCpuCaps.hasMMX ? SWS_CPU_CAPS_MMX : 0) | + (gCpuCaps.hasMMX2 ? SWS_CPU_CAPS_MMX2 : 0) | + (gCpuCaps.has3DNow ? SWS_CPU_CAPS_3DNOW : 0); +} + +/* reads a complete image as is into image buffer */ +static image *pngRead(skin_t *skin, unsigned char *fname) +{ + unsigned char header[8]; + png_structp png; + png_infop info; + png_infop endinfo; + png_bytep *row_p; + int color, h; + png_uint_32 i; + int BPP; + char *img; + unsigned int imgsize; + image *bf; + char *filename; + FILE *fp; + + if(!stricmp(fname, "NULL")) return 0; + + /* find filename in order file file.png */ + if(!(fp = fopen(fname, "rb"))) + { + filename = calloc(1, strlen(skin->skindir) + strlen(fname) + 6); + sprintf(filename, "%s\\%s.png", skin->skindir, fname); + if(!(fp = fopen(filename, "rb"))) + { + mp_msg(MSGT_GPLAYER, MSGL_ERR, "[png] cannot find image %s\n", filename); + free(filename); + return 0; + } + free(filename); + } + + for (i=0; i < skin->imagecount; i++) + if(!strcmp(fname, skin->images[i]->name)) + { +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[png] skinfile %s already exists\n", fname); +#endif + return skin->images[i]; + } + (skin->imagecount)++; + skin->images = realloc(skin->images, sizeof(image *) * skin->imagecount); + bf = skin->images[(skin->imagecount) - 1] = calloc(1, sizeof(image)); + bf->name = strdup(fname); + fread(header,1,8,fp); + if (!png_check_sig(header, 8)) return 0; + png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + info = png_create_info_struct(png); + endinfo = png_create_info_struct(png); + + png_init_io(png, fp); + png_set_sig_bytes(png, 8); + png_read_info(png, info); + png_get_IHDR(png, info, (png_uint_32*) &bf->width, (png_uint_32*) &bf->height, &BPP, &color, NULL, NULL, NULL); + + if(color & PNG_COLOR_MASK_ALPHA) + { + if(color & PNG_COLOR_MASK_PALETTE || color == PNG_COLOR_TYPE_GRAY_ALPHA ) BPP *= 2; + else BPP *= 4; + } + else + { + if(color & PNG_COLOR_MASK_PALETTE || color == PNG_COLOR_TYPE_GRAY ) BPP *= 1; + else BPP *= 3; + } + row_p = (png_bytep *) malloc (sizeof(png_bytep) * bf->height); + img = (png_bytep) calloc(png_get_rowbytes(png, info), bf->height); + for (h=0; h < bf->height; h++) + row_p[h] = &img[png_get_rowbytes(png, info) * h]; + png_read_image(png, row_p); + free(row_p); + + png_read_end(png, endinfo); + png_destroy_read_struct(&png, &info, &endinfo); + fclose(fp); + imgsize=bf->width * bf->height * (BPP / 8); + +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[png] loaded image %s\n", fname); + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[png] size: %dx%d bits: %d\n", bf->width, bf->height, BPP); + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[png] imagesize: %u\n", imgsize); +#endif + + bf->size = bf->width * bf->height * skin->desktopbpp / 8; + bf->data = malloc(bf->size); + if(skin->desktopbpp == 16 && BPP == 24) rgb24tobgr15(img, bf->data, imgsize); + else if(skin->desktopbpp == 16 && BPP == 32) rgb32tobgr15(img, bf->data, imgsize); + else if(skin->desktopbpp == 24 && BPP == 24) rgb24tobgr24(img, bf->data, imgsize); + else if(skin->desktopbpp == 24 && BPP == 32) rgb32tobgr24(img, bf->data, imgsize); + else if(skin->desktopbpp == 32 && BPP == 24) rgb24tobgr32(img, bf->data, imgsize); + else if(skin->desktopbpp == 32 && BPP == 32) rgb32tobgr32(img, bf->data, imgsize); + free(img); + return bf; +} + +/* frees all skin images */ +static void freeimages(skin_t *skin) +{ + unsigned int i; + for (i=0; i<skin->imagecount; i++) + { + if(skin->images && skin->images[i]) + { + if(skin->images[i]->data) free(skin->images[i]->data); + if(skin->images[i]->name) free(skin->images[i]->name); + free(skin->images[i]); + } + } + free(skin->images); +} + +#ifdef DEBUG +void dumpwidgets(skin_t *skin) +{ + unsigned int i; + for (i=0; i<skin->widgetcount; i++) + mp_msg(MSGT_GPLAYER, MSGL_V, "widget %p id %i\n", skin->widgets[i], skin->widgets[i]->id); +} +#endif + +static int counttonextchar(const char *s1, char c) +{ + unsigned int i; + for (i=0; i<strlen(s1); i++) + if(s1[i] == c) return i; + return 0; +} + +static char *findnextstring(char *temp, const char *desc, int *base) +{ + int len = counttonextchar(*base + desc, ','); + memset(temp, 0, strlen(desc) + 1); + if(!len) len = strlen(desc); + memcpy(temp, *base + desc, len); + *base += (len+1); + return temp; +} + +static void freeskin(skin_t *skin) +{ + unsigned int i; + if(skin->skindir) + { + free(skin->skindir); + skin->skindir = NULL; + } + + for (i=1; i<=skin->lastusedid; i++) + skin->removewidget(skin, i); + + if(skin->widgets) + { + free(skin->widgets); + skin->widgets = NULL; + } + + freeimages(skin); + for(i=0; i<skin->windowcount; i++) + { + if(skin->windows[i]->name) + { + free(skin->windows[i]->name); + skin->windows[i]->name = NULL; + } + free(skin->windows[i]); + } + + free(skin->windows); + skin->windows = NULL; + + for (i=0; i<skin->fontcount; i++) + { + unsigned int x; + if(skin->fonts[i]->name) + { + free(skin->fonts[i]->name); + skin->fonts[i]->name = NULL; + } + + if(skin->fonts[i]->id) + { + free(skin->fonts[i]->id); + skin->fonts[i]->id = NULL; + } + + for (x=0; x<skin->fonts[i]->charcount; x++) + { + free(skin->fonts[i]->chars[x]); + skin->fonts[i]->chars[x] = NULL; + } + + if(skin->fonts[i]->chars) + { + free(skin->fonts[i]->chars); + skin->fonts[i]->chars = NULL; + } + + free(skin->fonts[i]); + skin->fonts[i] = NULL; + } + free(skin->fonts); + skin->fonts = NULL; +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN FREE] skin freed\n"); +#endif + free(skin); + skin = NULL; +} + +static void removewidget(skin_t *skin, int id) +{ + unsigned int i; + unsigned int pos=0; + widget **temp = calloc(skin->widgetcount - 1, sizeof(widget *)); + + for (i=0; i<skin->widgetcount; i++) + { + if(skin->widgets[i]->id == id) + { + if(skin->widgets[i]->label) + free(skin->widgets[i]->label); + free(skin->widgets[i]); + skin->widgets[i] = NULL; + } + else + { + temp[pos] = skin->widgets[i]; + pos++; + } + } + if (pos != i) + { + (skin->widgetcount)--; + free(skin->widgets); + skin->widgets = temp; +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "removed widget %i\n", id); +#endif + return; + } + free(temp); + mp_msg(MSGT_GPLAYER, MSGL_ERR, "widget %i not found\n", id); +} + +static void addwidget(skin_t *skin, window *win, const char *desc) +{ + widget *mywidget; + char *temp = calloc(1, strlen(desc) + 1); + (skin->widgetcount)++; + (skin->lastusedid)++; + skin->widgets = realloc(skin->widgets, sizeof(widget *) * skin->widgetcount); + mywidget = skin->widgets[(skin->widgetcount) - 1] = calloc(1, sizeof(widget)); + mywidget->id = skin->lastusedid; + mywidget->window = win->type; + /* parse and fill widget specific info */ + if(!strncmp(desc, "base", 4)) + { + int base = counttonextchar(desc, '=') + 1; + mywidget->type = tyBase; + mywidget->bitmap[0] = pngRead(skin, findnextstring(temp, desc, &base)); + mywidget->wx = mywidget->x = atoi(findnextstring(temp, desc, &base)); + mywidget->wy = mywidget->y = atoi(findnextstring(temp, desc, &base)); + mywidget->wwidth = mywidget->width = atoi(findnextstring(temp, desc, &base)); + mywidget->wheight = mywidget->height = atoi(findnextstring(temp, desc, &base)); + win->base = mywidget; +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [ITEM] [BASE] %s %i %i %i %i\n", + (mywidget->bitmap[0]) ? mywidget->bitmap[0]->name : NULL, + mywidget->x, mywidget->y, mywidget->width, mywidget->height); +#endif + } + else if(!strncmp(desc, "button", 6)) + { + int base = counttonextchar(desc, '=') + 1; + int i; + mywidget->type = tyButton; + mywidget->bitmap[0] = pngRead(skin, findnextstring(temp, desc, &base)); + mywidget->wx = mywidget->x = atoi(findnextstring(temp, desc, &base)); + mywidget->wy = mywidget->y = atoi(findnextstring(temp, desc, &base)); + mywidget->wwidth = mywidget->width = atoi(findnextstring(temp, desc, &base)); + mywidget->wheight = mywidget->height = atoi(findnextstring(temp, desc, &base)); + findnextstring(temp, desc, &base); + + /* Assign corresponding event to the widget */ + mywidget->msg = evNone; + for (i=0; i<evBoxs; i++) + { + if(!strcmp(temp, evNames[i].name)) + { + mywidget->msg = evNames[i].msg; + break; + } + } + +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [ITEM] [BUTTON] %s %i %i %i %i msg %i\n", + (mywidget->bitmap[0]) ? mywidget->bitmap[0]->name : NULL, + mywidget->x, mywidget->y, mywidget->width, mywidget->height, mywidget->msg); +#endif + } + else if(!strncmp(desc, "hpotmeter", 9) || !strncmp(desc, "vpotmeter", 9)) + { + int base = counttonextchar(desc, '=') + 1; + int i; + /* hpotmeter = button, bwidth, bheight, phases, numphases, default, X, Y, width, height, message */ + if(!strncmp(desc, "hpotmeter", 9)) mywidget->type = tyHpotmeter; + else mywidget->type = tyVpotmeter; + mywidget->bitmap[0] = pngRead(skin, findnextstring(temp, desc, &base)); + mywidget->width = atoi(findnextstring(temp, desc, &base)); + mywidget->height = atoi(findnextstring(temp, desc, &base)); + mywidget->bitmap[1] = pngRead(skin, findnextstring(temp, desc, &base)); + mywidget->phases = atoi(findnextstring(temp, desc, &base)); + mywidget->value = atof(findnextstring(temp, desc, &base)); + mywidget->x = mywidget->wx = atoi(findnextstring(temp, desc, &base)); + mywidget->y = mywidget->wy = atoi(findnextstring(temp, desc, &base)); + mywidget->wwidth = atoi(findnextstring(temp, desc, &base)); + mywidget->wheight = atoi(findnextstring(temp, desc, &base)); + findnextstring(temp, desc, &base); + mywidget->msg = evNone; + for (i=0; i<evBoxs; i++) + { + if(!strcmp(temp, evNames[i].name)) + { + mywidget->msg = evNames[i].msg; + break; + } + } +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [ITEM] %s %s %i %i %s %i %f %i %i %i %i msg %i\n", + (mywidget->type == tyHpotmeter) ? "[HPOTMETER]" : "[VPOTMETER]", + (mywidget->bitmap[0]) ? mywidget->bitmap[0]->name : NULL, + mywidget->width, mywidget->height, + (mywidget->bitmap[1]) ? mywidget->bitmap[1]->name : NULL, + mywidget->phases, mywidget->value, + mywidget->wx, mywidget->wy, mywidget->wwidth, mywidget->wwidth, + mywidget->msg); +#endif + } + else if(!strncmp(desc, "potmeter", 8)) + { + int base = counttonextchar(desc, '=') + 1; + int i; + /* potmeter = phases, numphases, default, X, Y, width, height, message */ + mywidget->type = tyPotmeter; + mywidget->bitmap[0] = pngRead(skin, findnextstring(temp, desc, &base)); + mywidget->phases = atoi(findnextstring(temp, desc, &base)); + mywidget->value = atof(findnextstring(temp, desc, &base)); + mywidget->wx = mywidget->x = atoi(findnextstring(temp, desc, &base)); + mywidget->wy = mywidget->y = atoi(findnextstring(temp, desc, &base)); + mywidget->wwidth = mywidget->width = atoi(findnextstring(temp, desc, &base)); + mywidget->wheight = mywidget->height = atoi(findnextstring(temp, desc, &base)); + findnextstring(temp, desc, &base); + mywidget->msg = evNone; + for (i=0; i<evBoxs; i++) + { + if(!strcmp(temp, evNames[i].name)) + { + mywidget->msg=evNames[i].msg; + break; + } + } +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [ITEM] [POTMETER] %s %i %i %i %f %i %i msg %i\n", + (mywidget->bitmap[0]) ? mywidget->bitmap[0]->name : NULL, + mywidget->width, mywidget->height, + mywidget->phases, mywidget->value, + mywidget->x, mywidget->y, + mywidget->msg); +#endif + } + else if(!strncmp(desc, "menu", 4)) + { + int base = counttonextchar(desc, '=') + 1; + int i; + mywidget->type = tyMenu; + mywidget->wx=atoi(findnextstring(temp, desc, &base)); + mywidget->x=0; + mywidget->wy=mywidget->y=atoi(findnextstring(temp, desc, &base)); + mywidget->wwidth=mywidget->width=atoi(findnextstring(temp, desc, &base)); + mywidget->wheight=mywidget->height=atoi(findnextstring(temp, desc, &base)); + findnextstring(temp, desc, &base); + mywidget->msg = evNone; + for (i=0; i<evBoxs; i++) + { + if(!strcmp(temp, evNames[i].name)) + { + mywidget->msg = evNames[i].msg; + break; + } + } +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [ITEM] [MENU] %i %i %i %i msg %i\n", + mywidget->x, mywidget->y, mywidget->width, mywidget->height, mywidget->msg); +#endif + } + else if(!strncmp(desc, "selected", 8)) + { + win->base->bitmap[1] = pngRead(skin, (char *) desc + 9); +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [ITEM] [BASE] added image %s\n", win->base->bitmap[1]->name); +#endif + } + else if(!strncmp(desc, "slabel",6)) + { + int base = counttonextchar(desc, '=') + 1; + unsigned int i; + mywidget->type = tySlabel; + mywidget->wx = mywidget->x = atoi(findnextstring(temp, desc, &base)); + mywidget->wy = mywidget->y = atoi(findnextstring(temp, desc, &base)); + findnextstring(temp, desc, &base); + mywidget->font = NULL; + for (i=0; i<skin->fontcount; i++) + { + if(!strcmp(temp, skin->fonts[i]->name)) + { + mywidget->font = skin->fonts[i]; + break; + } + } + mywidget->label = strdup(findnextstring(temp, desc, &base)); +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [ITEM] [SLABEL] %i %i %s %s\n", + mywidget->x, mywidget->y, mywidget->font->name, mywidget->label); +#endif + } + else if(!strncmp(desc, "dlabel", 6)) + { + int base = counttonextchar(desc, '=') + 1; + unsigned int i; + mywidget->type = tyDlabel; + mywidget->wx = mywidget->x = atoi(findnextstring(temp, desc, &base)); + mywidget->wy = mywidget->y = atoi(findnextstring(temp, desc, &base)); + mywidget->length = atoi(findnextstring(temp, desc, &base)); + mywidget->align = atoi(findnextstring(temp, desc, &base)); + findnextstring(temp, desc, &base); + mywidget->font = NULL; + for (i=0; i<skin->fontcount; i++) + { + if(!strcmp(temp, skin->fonts[i]->name)) + { + mywidget->font=skin->fonts[i]; + break; + } + } + mywidget->label=strdup(findnextstring(temp, desc, &base)); +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [ITEM] [DLABEL] %i %i %i %i %s \"%s\"\n", + mywidget->x, mywidget->y, mywidget->length, mywidget->align, mywidget->font->name, mywidget->label); +#endif + } + free(temp); +} + +static void loadfonts(skin_t* skin) +{ + unsigned int x; + for (x=0; x<skin->fontcount; x++) + { + FILE *fp; + int linenumber=0; + char *filename; + char *tmp = calloc(1, MAX_LINESIZE); + char *desc = calloc(1, MAX_LINESIZE); + filename = calloc(1, strlen(skin->skindir) + strlen(skin->fonts[x]->name) + 6); + sprintf(filename, "%s\\%s.fnt", skin->skindir, skin->fonts[x]->name); + if(!(fp = fopen(filename,"rb"))) + { + mp_msg(MSGT_GPLAYER, MSGL_ERR, "[FONT LOAD] Font not found \"%s\"\n", skin->fonts[x]->name); + return; + } + while(!feof(fp)) + { + int pos = 0; + unsigned int i; + fgets(tmp, MAX_LINESIZE, fp); + linenumber++; + memset(desc, 0, MAX_LINESIZE); + for (i=0; i<strlen(tmp); i++) + { + /* remove spaces and linebreaks */ + if((tmp[i] == ' ') || (tmp[i] == '\n') || (tmp[i] == '\r')) continue; + /* remove comments */ + if((tmp[i] == ';') && ((i < 1) || (tmp[i-1] != '\"'))) + { +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[FONT LOAD] Comment: %s", tmp + i + 1); +#endif + break; + } + desc[pos] = tmp[i]; + pos++; + } + if(!strlen(desc)) continue; + /* now we have "readable" output -> parse it */ + if(!strncmp(desc, "image", 5)) + { + skin->fonts[x]->image = pngRead(skin, desc + 6); +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[FONT] [IMAGE] \"%s\"\n", desc + 6); +#endif + } + else + { + int base = 4; + if(*desc != '"') break; + if(*(desc + 1) == 0) break; + (skin->fonts[x]->charcount)++; + skin->fonts[x]->chars = realloc(skin->fonts[x]->chars, sizeof(char_t *) *skin->fonts[x]->charcount); + skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]=calloc(1, sizeof(char_t)); + skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->c = ((*(desc + 1) == '"') && (*(desc + 2) != '"')) ? ' ': *(desc + 1); + if((*(desc + 1) == '"') && (*(desc + 2) != '"')) base = 3; + skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->x = atoi(findnextstring(tmp, desc, &base)); + skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->y = atoi(findnextstring(tmp, desc, &base)); + skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->width = atoi(findnextstring(tmp, desc, &base)); + skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->height = atoi(findnextstring(tmp, desc, &base)); +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[FONT] [CHAR] %c %i %i %i %i\n", + skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->c, + skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->x, + skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->y, + skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->width, + skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->height); +#endif + } + } + free(desc); + free(filename); + free(tmp); + fclose(fp); + } +} + +skin_t* loadskin(char* skindir, int desktopbpp) +{ + FILE *fp; + int reachedendofwindow = 0; + int linenumber = 0; + skin_t *skin = calloc(1, sizeof(skin_t)); + char *filename; + char *tmp = calloc(1, MAX_LINESIZE); + char *desc = calloc(1, MAX_LINESIZE); + window* mywindow = NULL; + + /* init swscaler */ + sws_rgb2rgb_init(get_sws_cpuflags()); + /* setup funcs */ + skin->freeskin = freeskin; + skin->pngRead = pngRead; + skin->addwidget = addwidget; + skin->removewidget = removewidget; + skin->geteventname = geteventname; + skin->desktopbpp = desktopbpp; + skin->skindir = strdup(skindir); + + filename = calloc(1, strlen(skin->skindir) + strlen("skin") + 2); + sprintf(filename, "%s\\skin", skin->skindir); + if(!(fp = fopen(filename, "rb"))) + { + mp_msg(MSGT_GPLAYER, MSGL_FATAL, "[SKIN LOAD] Skin \"%s\" not found\n", skindir); + skin->freeskin(skin); + return NULL; + } + + while(!feof(fp)) + { + int pos = 0; + unsigned int i; + int insidequote = 0; + fgets(tmp, MAX_LINESIZE, fp); + linenumber++; + memset(desc, 0, MAX_LINESIZE); + for (i=0; i<strlen(tmp); i++) + { + if((tmp[i] == '"') && !insidequote) { insidequote=1; continue; } + else if((tmp[i] == '"') && insidequote) { insidequote=0 ; continue; } + /* remove spaces and linebreaks */ + if((!insidequote && (tmp[i] == ' ')) || (tmp[i] == '\n') || (tmp[i] == '\r')) continue; + /* remove comments */ + else if(tmp[i] == ';') + { +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN LOAD] Comment: %s", tmp + i + 1); +#endif + break; + } + desc[pos] = tmp[i]; + pos++; + } + + if(!strlen(desc)) continue; + /* now we have "readable" output -> parse it */ + /* parse window specific info */ + if(!strncmp(desc, "section", 7)) + { +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [SECTION] \"%s\"\n", desc + 8); +#endif + } + else if(!strncmp(desc, "window", 6)) + { +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [WINDOW] \"%s\"\n", desc + 7); +#endif + reachedendofwindow = 0; + (skin->windowcount)++; + skin->windows = realloc(skin->windows, sizeof(window *) * skin->windowcount); + mywindow = skin->windows[(skin->windowcount) - 1] = calloc(1, sizeof(window)); + mywindow->name = strdup(desc + 7); + if(!strncmp(desc + 7, "main", 4)) mywindow->type = wiMain; + else if(!strncmp(desc+7, "sub", 3)) + { + mywindow->type = wiSub; + mywindow->decoration = 1; + } + else if(!strncmp(desc + 7, "menu", 4)) mywindow->type = wiMenu; + else if(!strncmp(desc + 7, "playbar", 7)) mywindow->type = wiPlaybar; + else mp_msg(MSGT_GPLAYER, MSGL_V, "[SKIN] warning found unknown windowtype"); + } + else if(!strncmp(desc, "decoration", 10) && !strncmp(desc + 11, "enable", 6)) + { + mywindow->decoration = 1; +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [DECORATION] enabled decoration for window \"%s\"\n", mywindow->name); +#endif + } + else if(!strncmp(desc, "background", 10)) + { + int base = counttonextchar(desc, '=') + 1; + char temp[MAX_LINESIZE]; + mywindow->backgroundcolor[0] = atoi(findnextstring(temp, desc, &base)); + mywindow->backgroundcolor[1] = atoi(findnextstring(temp, desc, &base)); + mywindow->backgroundcolor[2] = atoi(findnextstring(temp, desc, &base)); +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [BACKGROUND] window \"%s\" has backgroundcolor (%i,%i,%i)\n", mywindow->name, + mywindow->backgroundcolor[0], + mywindow->backgroundcolor[1], + mywindow->backgroundcolor[2]); +#endif + } + else if(!strncmp(desc, "end", 3)) + { + if(reachedendofwindow) + { +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [END] of section\n"); +#endif + } + else + { + reachedendofwindow = 1; +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [END] of window \"%s\"\n", mywindow->name); +#endif + } + } + else if(!strncmp(desc, "font", 4)) + { + unsigned int i; + int id = 0; + char temp[MAX_LINESIZE]; + int base = counttonextchar(desc, '=')+1; + findnextstring(temp, desc, &base); + findnextstring(temp, desc, &base); + for (i=0; i<skin->fontcount; i++) + if(!strcmp(skin->fonts[i]->id, temp)) + { + id = i; + break; + } + if(!id) + { + int base = counttonextchar(desc, '=') + 1; + findnextstring(temp, desc, &base); + id = skin->fontcount; + (skin->fontcount)++; + skin->fonts = realloc(skin->fonts, sizeof(font_t *) * skin->fontcount); + skin->fonts[id]=calloc(1, sizeof(font_t)); + skin->fonts[id]->name = strdup(temp); + skin->fonts[id]->id = strdup(findnextstring(temp, desc, &base)); + } +#ifdef DEBUG + mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [FONT] id \"%s\" name \"%s\"\n", skin->fonts[id]->name, skin->fonts[id]->id); +#endif + } + else + skin->addwidget(skin, mywindow, desc); + } + + free(desc); + free(filename); + free(tmp); + fclose(fp); + loadfonts(skin); + mp_msg(MSGT_GPLAYER, MSGL_V, "[SKIN LOAD] loaded skin \"%s\"\n", skin->skindir); + /* dumpwidgets(skin); */ + return skin; +} diff --git a/gui/win32/skinload.h b/gui/win32/skinload.h new file mode 100644 index 0000000000..3103539dc3 --- /dev/null +++ b/gui/win32/skinload.h @@ -0,0 +1,213 @@ +/* + MPlayer Gui for win32 + Copyright (c) 2003 Sascha Sommer <saschasommer@freenet.de> + Copyright (c) 2006 Erik Augustson <erik_27can@yahoo.com> + Copyright (c) 2006 Gianluigi Tiesi <sherpya@netfarm.it> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA +*/ + +#ifndef _SKINLOAD_H +#define _SKINLOAD_H + +typedef struct +{ + char *name; /* image name */ + int size; /* image data size in bytes */ + int width; /* image width */ + int height; /* image height */ + char *data; /* pointer to image data */ +} image; + +typedef struct +{ + char c; + int x; + int y; + int width; + int height; +} char_t; + +typedef struct +{ + char *name; + char *id; + image *image; + unsigned int charcount; + char_t **chars; +} font_t; + +typedef struct +{ + int id; /* widget id */ + int type; /* widget type */ + int window; /* the window it belongs to */ + // --- + int x, y; /* x and y position the button */ + int wx, wy; /* x and y postion of the widget */ + int width, height; /* width and height of the button */ + int wwidth, wheight; /* width and height of the widget */ + // --- + // --- + int msg, msg2; + int pressed, tmp; + int key, key2; + int phases; + float value; + image *bitmap[2]; /* Associated image(s) in imagepool */ + // --- + font_t *font; + int length; + int align; + char *label; + // --- + int event; +} widget; + +typedef struct +{ + char *name; + int decoration; + int type; + widget *base; + int backgroundcolor[3]; + void *priv; +} window; + +typedef struct skin_t skin_t; +struct skin_t +{ + char *skindir; + unsigned int widgetcount; /* number of widgets */ + unsigned int lastusedid; /* which widget id was used last */ + widget **widgets; /* widget handle */ + unsigned int imagecount; /* number of images */ + image **images; /* image handle */ + int desktopbpp; /* image format of those images */ + unsigned int fontcount; + font_t **fonts; + + unsigned int windowcount; /* number of windows */ + window **windows; + void (*freeskin)(skin_t* skin); + void (*addwidget)(skin_t *skin, window *win, const char *desc); + void (*removewidget)(skin_t *skin, int id); + char *(*geteventname)(int event); + image *(*pngRead)(skin_t *skin, unsigned char *fname); +}; + +extern skin_t *loadskin(char *skindir, int desktopbpp); + +// --- Widget types --- + +#define tyBase 1 +#define tyButton 2 +#define tyHpotmeter 3 +#define tyVpotmeter 4 +#define tyPotmeter 5 +#define tyMenu 6 +#define tySlabel 7 +#define tyDlabel 8 + +// --- Window types --- + +#define wiMain 1 +#define wiSub 2 +#define wiMenu 3 +#define wiPlaybar 4 + +// --- User events ------ + +#define evNone 0 +#define evPlay 1 +#define evStop 2 +#define evPause 3 +#define evPrev 6 +#define evNext 7 +#define evLoad 8 +#define evEqualizer 9 +#define evPlayList 10 +#define evIconify 11 +#define evAbout 12 +#define evLoadPlay 13 +#define evPreferences 14 +#define evSkinBrowser 15 +#define evPlaySwitchToPause 16 +#define evPauseSwitchToPlay 17 + +#define evBackward10sec 18 +#define evForward10sec 19 +#define evBackward1min 20 +#define evForward1min 21 +#define evBackward10min 22 +#define evForward10min 23 + +#define evNormalSize 24 +#define evDoubleSize 25 +#define evFullScreen 26 + +#define evSetMoviePosition 27 +#define evSetVolume 28 +#define evSetBalance 29 +#define evMute 30 + +#define evIncVolume 31 +#define evDecVolume 32 +#define evIncAudioBufDelay 33 +#define evDecAudioBufDelay 34 +#define evIncBalance 35 +#define evDecBalance 36 + +#define evHelp 37 + +#define evLoadSubtitle 38 +#define evDropSubtitle 43 +#define evPlayDVD 39 +#define evPlayVCD 40 +#define evPlayNetwork 41 +#define evLoadAudioFile 42 +#define evSetAspect 44 +#define evSetAudio 45 +#define evSetVideo 46 +#define evDropFile 47 +#define evPlayCD 48 + +#define evExit 1000 + +// --- General events --- + +#define evFileLoaded 5000 +#define evHideMouseCursor 5001 +#define evMessageBox 5002 +#define evGeneralTimer 5003 +#define evGtkIsOk 5004 +#define evShowPopUpMenu 5005 +#define evHidePopUpMenu 5006 +#define evSetDVDAudio 5007 +#define evSetDVDSubtitle 5008 +#define evSetDVDTitle 5009 +#define evSetDVDChapter 5010 +#define evSubtitleLoaded 5011 +#define evSetVCDTrack 5012 +#define evSetURL 5013 + +#define evFName 7000 +#define evMovieTime 7001 +#define evRedraw 7002 +#define evHideWindow 7003 +#define evShowWindow 7004 +#define evFirstLoad 7005 + +#endif diff --git a/gui/win32/widgetrender.c b/gui/win32/widgetrender.c new file mode 100644 index 0000000000..ae4f69b54e --- /dev/null +++ b/gui/win32/widgetrender.c @@ -0,0 +1,351 @@ +/* + MPlayer Gui for win32 + Copyright (c) 2003 Sascha Sommer <saschasommer@freenet.de> + Copyright (c) 2006 Erik Augustson <erik_27can@yahoo.com> + Copyright (c) 2006 Gianluigi Tiesi <sherpya@netfarm.it> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA +*/ + +#include <stdio.h> +#include <ctype.h> +#include <windows.h> +#include <interface.h> +#include "gui.h" + +extern char *codecname; +#define MAX_LABELSIZE 250 + +static void render(int bitsperpixel, image *dst, image *src, int x, int y, int sx, int sy, int sw, int sh, int transparent) +{ + int i; + int bpp = bitsperpixel / 8; + int offset = (dst->width * bpp * y) + (x * bpp); + int soffset = (src->width * bpp * sy) + (sx * bpp); + + for(i=0; i<sh; i++) + { + int c; + for(c=0; c < (sw * bpp); c += bpp) + { + if(bpp == 2) + { + if(!transparent || (((src->data + soffset + (i * src->width * bpp) + c)[0] != 0x1f) + && ((src->data + soffset + (i * src->width * bpp) + c)[1] != 0x7c))) + memcpy(dst->data + offset + c, src->data + soffset + (i * src->width * bpp) + c, bpp); + } + else if(bpp > 2) + { + if(!transparent || *((unsigned int *) (src->data + soffset + (i * src->width * bpp) + c)) != 0x00ff00ff) + memcpy(dst->data + offset + c, src->data + soffset + (i * src->width * bpp) + c, bpp); + } + } + offset += (dst->width * bpp); + } +} + +static image *find_background(skin_t *skin, widget *item) +{ + unsigned int i; + for (i=0; i < skin->windowcount; i++) + if(skin->windows[i]->type == item->window) + return skin->windows[i]->base->bitmap[0]; + return NULL; +} + +/******************************************************************/ +/* FONT related functions */ +/******************************************************************/ + +/* returns the pos of s2 inside s1 or -1 if s1 doesn't contain s2 */ +static int strpos(char *s1, const char* s2) +{ + unsigned int i, x; + for (i=0; i < strlen(s1); i++) + { + if(s1[i] == s2[0]) + { + if(strlen(s1 + i) >= strlen(s2)) + { + for (x=0; x <strlen(s2); x++) + if(s1[i + x] != s2[x]) break; + if(x == strlen(s2)) return i; + } + } + } + return -1; +} + +/* replaces all occurences of what in dest with format */ +static void stringreplace(char *dest, const char *what, const char *format, ... ) +{ + char tmp[MAX_LABELSIZE]; + int offset=0; + va_list va; + va_start(va, format); + vsnprintf(tmp, MAX_LABELSIZE, format, va); + va_end(va); + /* no search string == replace the entire string */ + if(!what) + { + memcpy(dest, tmp, strlen(tmp)); + dest[strlen(tmp)] = 0; + return; + } + while((offset = strpos(dest, what)) != -1) + { + memmove(dest + offset + strlen(tmp), dest + offset + strlen(what), strlen(dest + offset + strlen(what)) + 1); + memcpy(dest + offset, tmp, strlen(tmp)); + } +} + +/* replaces the chars with special meaning with the associated data from the player info struct */ +static char *generatetextfromlabel(widget *item) +{ + char *text = malloc(MAX_LABELSIZE); + char tmp[MAX_LABELSIZE]; + unsigned int i; + if(!item) + { + free(text); + return NULL; + } + strcpy(text, item->label); + if(item->type == tySlabel) return text; + stringreplace(text, "$1", "%.2i:%.2i:%.2i", guiIntfStruct.TimeSec / 3600, + (guiIntfStruct.TimeSec / 60) % 60, guiIntfStruct.TimeSec % 60); + stringreplace(text, "$2", "%.4i:%.2i", guiIntfStruct.TimeSec / 60, guiIntfStruct.TimeSec % 60); + stringreplace(text, "$3", "%.2i", guiIntfStruct.TimeSec / 3600); + stringreplace(text, "$4", "%.2i", (guiIntfStruct.TimeSec / 60) % 60); + stringreplace(text, "$5", "%.2i", guiIntfStruct.TimeSec % 60); + stringreplace(text, "$6", "%.2i:%.2i:%.2i", guiIntfStruct.LengthInSec / 3600, + (guiIntfStruct.LengthInSec / 60) % 60, guiIntfStruct.LengthInSec % 60); + stringreplace(text, "$7", "%.4i:%.2i", guiIntfStruct.LengthInSec / 60, guiIntfStruct.LengthInSec % 60); + stringreplace(text, "$8", "%i:%.2i:%.2i", guiIntfStruct.TimeSec / 3600, + (guiIntfStruct.TimeSec / 60) % 60, guiIntfStruct.TimeSec % 60); + stringreplace(text, "$v", "%3.2f", guiIntfStruct.Volume); + stringreplace(text, "$V", "%3.1f", guiIntfStruct.Volume); + stringreplace(text, "$b", "%3.2f", guiIntfStruct.Balance); + stringreplace(text, "$B", "%3.1f", guiIntfStruct.Balance); + stringreplace(text, "$t", "%.2i", guiIntfStruct.Track); + stringreplace(text, "$o", "%s", guiIntfStruct.Filename); + stringreplace(text, "$x", "%i", guiIntfStruct.MovieWidth); + stringreplace(text, "$y", "%i", guiIntfStruct.MovieHeight); + stringreplace(text, "$C", "%s", guiIntfStruct.sh_video ? codecname : ""); + stringreplace(text, "$$", "$"); + + if(!strcmp(text, "$p") || !strcmp(text, "$s") || !strcmp(text, "$e")) + { + if(guiIntfStruct.Playing == 0) stringreplace(text, NULL, "s"); + else if(guiIntfStruct.Playing == 1) stringreplace(text, NULL, "p"); + else if(guiIntfStruct.Playing == 2) stringreplace(text, NULL, "e"); + } + + if(guiIntfStruct.AudioType == 0) stringreplace(text, "$a", "n"); + else if(guiIntfStruct.AudioType == 1) stringreplace(text, "$a", "m"); + else stringreplace(text, "$a", "t"); + + if(guiIntfStruct.StreamType == 0) + stringreplace(text, "$T", "f"); +#ifdef USE_DVDREAD + else if(guiIntfStruct.StreamType == STREAMTYPE_DVD || guiIntfStruct.StreamType == STREAMTYPE_DVDNAV) + stringreplace(text, "$T", "d"); +#endif + else stringreplace(text, "$T", "u"); + + if(guiIntfStruct.Filename) + { + for (i=0; i<strlen(guiIntfStruct.Filename); i++) + tmp[i] = tolower(guiIntfStruct.Filename[i]); + stringreplace(text, "$f", tmp); + + for (i=0; i<strlen(guiIntfStruct.Filename); i++) + tmp[i] = toupper(guiIntfStruct.Filename[i]); + stringreplace(text, "$F", tmp); + } + + return text; +} + +/* cuts text to buflen scrolling from right to left */ +static void scrolltext(char *text, unsigned int buflen, float *value) +{ + char *buffer = (char *) malloc(buflen + 1); + unsigned int x,i; + if(*value < buflen) x = 0; + else x = *value - buflen; + memset(buffer, ' ', buflen); + for (i = (*value>=buflen) ? 0 : buflen - *value; i<buflen; i++) + { + if(x < strlen(text)) + buffer[i] = text[x]; + x++; + } + buffer[buflen] = 0; + *value += 1.0f; + if(*value >= strlen(text) + buflen) *value = 0.0f; + strcpy(text, buffer); + free(buffer); +} + +/* updates all dlabels and slabels */ +void renderinfobox(skin_t *skin, window_priv_t *priv) +{ + unsigned int i; + if (!priv) return; + + /* repaint the area behind the text*/ + /* we have to do this for all labels here, because they may overlap in buggy skins ;( */ + + for (i=0; i<skin->widgetcount; i++) + if((skin->widgets[i]->type == tyDlabel) || (skin->widgets[i]->type == tySlabel)) + { + if(skin->widgets[i]->window == priv->type) + render(skin->desktopbpp, + &priv->img, + find_background(skin, skin->widgets[i]), + skin->widgets[i]->x, + skin->widgets[i]->y, + skin->widgets[i]->x, + skin->widgets[i]->y, + skin->widgets[i]->length, + skin->widgets[i]->font->chars[0]->height, + 1); + } + + /* load all slabels and dlabels */ + for (i=0; i<skin->widgetcount; i++) + { + widget *item = skin->widgets[i]; + if(item->window != priv->type) continue; + if((i == skin->widgetcount) || (item->type == tyDlabel) || (item->type == tySlabel)) + { + char *text = generatetextfromlabel(item); + unsigned int current, c; + int offset = 0; + unsigned int textlen; + if(!text) continue; + textlen = strlen(text); + + /* render(win, win->background, gui->skin->widgets[i]->x, gui->skin->widgets[i]->y, + gui->skin->widgets[i]->x, gui->skin->widgets[i]->y, + gui->skin->widgets[i]->length, gui->skin->widgets[i]->font->chars[0]->height,1); */ + + /* calculate text size */ + for (current=0; current<textlen; current++) + { + for (c=0; c<item->font->charcount; c++) + if(item->font->chars[c]->c == text[current]) + { + offset += item->font->chars[c]->width; + break; + } + } + + /* labels can be scrolled if they are to big */ + if((item->type == tyDlabel) && (item->length < offset)) + { + int tomuch = (offset - item->length) / (offset /textlen); + scrolltext(text, textlen - tomuch - 1, &skin->widgets[i]->value); + textlen = strlen(text); + } + + /* align the text */ + if(item->align == 1) + offset = (item->length-offset) / 2; + else if(item->align == 2) + offset = item->length-offset; + else + offset = 0; + + if(offset < 0) offset = 0; + + /* render the text */ + for (current=0; current<textlen; current++) + { + for (c=0; c<item->font->charcount; c++) + { + char_t *cchar = item->font->chars[c]; + if(cchar->c == *(text + current)) + { + render(skin->desktopbpp, + &priv->img, + item->font->image, + item->x + offset, + item->y, + cchar->x, + cchar->y, + (cchar->width + offset > item->length) ? item->length - offset : cchar->width, + cchar->height, + 1); + offset += cchar->width; + break; + } + } + } + free(text); + } + } +} + +/******************************************************************/ +/* WIDGET related functions */ +/******************************************************************/ + +void renderwidget(skin_t *skin, image *dest, widget *item, int state) +{ + image *img = NULL; + int height; + int y; + + if(!dest) return; + if((item->type == tyButton) || (item->type == tyHpotmeter) || (item->type == tyPotmeter)) + img = item->bitmap[0]; + + if(!img) return; + + y = item->y; + if(item->type == tyPotmeter) + { + height = img->height / item->phases; + y = height * (int)(item->value * item->phases / 100); + if(y > img->height-height) + y = img->height - height; + } + else + { + height = img->height / 3; + y = state * height; + } + + /* redraw background */ + if(item->type == tyButton) + render(skin->desktopbpp, dest, find_background(skin,item), item->x, item->y, item->x, item->y, img->width, height, 1); + + if((item->type == tyHpotmeter) || (item->type == tyPotmeter)) + { + /* repaint the area behind the slider */ + render(skin->desktopbpp, dest, find_background(skin, item), item->wx, item->wy, item->wx, item->wy, item->wwidth, item->height, 1); + item->x = item->value * (item->wwidth-item->width) / 100 + item->wx; + if((item->x + item->width) > (item->wx + item->wwidth)) + item->x = item->wx + item->wwidth - item->width; + if(item->x < item->wx) + item->x = item->wx; + /* workaround for blue */ + if(item->type == tyHpotmeter) + height = (item->height < img->height / 3) ? item->height : img->height / 3; + } + render(skin->desktopbpp, dest, img, item->x, item->y, 0, y, img->width, height, 1); +} diff --git a/gui/win32/wincfg.c b/gui/win32/wincfg.c new file mode 100644 index 0000000000..605867900c --- /dev/null +++ b/gui/win32/wincfg.c @@ -0,0 +1,143 @@ +/* + MPlayer Gui for win32 + Copyright (c) 2003 Sascha Sommer <saschasommer@freenet.de> + Copyright (c) 2006 Erik Augustson <erik_27can@yahoo.com> + Copyright (c) 2006 Gianluigi Tiesi <sherpya@netfarm.it> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA +*/ + +#include <stdlib.h> +#include <string.h> + +#include <mp_msg.h> +#include <help_mp.h> + +#include <m_config.h> +#include <m_option.h> +#include <libvo/video_out.h> +#include <mixer.h> +#include "wincfg.h" +#include "interface.h" + +/* params */ +int gtkAONorm = 0; +int gtkAOExtraStereo = 0; +float gtkAOExtraStereoMul = 1.0; +int gtkCacheOn = 0; +int gtkCacheSize = 2048; +int gtkAutoSyncOn = 0; +int gtkAutoSync = 0; + +int sub_window = 0; +int console = 0; + +int gui_save_pos = 1; +int gui_main_pos_x = -2; +int gui_main_pos_y = -2; +int gui_sub_pos_x = -1; +int gui_sub_pos_y = -1; + +/* External functions */ +extern int frame_dropping; +extern char *proc_priority; +extern int m_config_parse_config_file(m_config_t *config, char *conffile); + +static m_config_t *gui_conf; +static m_option_t gui_opts[] = +{ + { "priority", &proc_priority, CONF_TYPE_STRING, 0, 0, 0, NULL}, + { "vo_driver", &video_driver_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL }, + { "v_framedrop", &frame_dropping, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL }, + { "vo_doublebuffering", &vo_doublebuffering, CONF_TYPE_FLAG, 0, 0, 1, NULL }, + { "vo_direct_render", &vo_directrendering, CONF_TYPE_FLAG, 0, 0, 1, NULL }, + { "ao_driver", &audio_driver_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL }, + { "ao_volnorm", >kAONorm, CONF_TYPE_FLAG, 0, 0, 1, NULL }, + { "softvol", &soft_vol, CONF_TYPE_FLAG, 0, 0, 1, NULL }, + { "ao_extra_stereo", >kAOExtraStereo, CONF_TYPE_FLAG, 0, 0, 1, NULL }, + { "ao_extra_stereo_coefficient", >kAOExtraStereoMul, CONF_TYPE_FLOAT, CONF_RANGE, -10, 10, NULL }, + { "delay", &audio_delay, CONF_TYPE_FLOAT, CONF_RANGE, -100.0, 100.0, NULL}, + { "dvd_device", &dvd_device, CONF_TYPE_STRING, 0, 0, 0, NULL }, + { "cdrom_device", &cdrom_device, CONF_TYPE_STRING, 0, 0, 0, NULL }, + { "osd_level", &osd_level, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL }, + { "cache", >kCacheOn, CONF_TYPE_FLAG, 0, 0, 1, NULL }, + { "cache_size", >kCacheSize, CONF_TYPE_INT, CONF_RANGE, -1, 65535, NULL }, + { "autosync", >kAutoSyncOn, CONF_TYPE_FLAG, 0, 0, 1, NULL }, + { "autosync_size", >kAutoSync, CONF_TYPE_INT, CONF_RANGE, 0, 10000, NULL }, + { "gui_skin", &skinName, CONF_TYPE_STRING, 0, 0, 0, NULL }, + { "gui_main_pos_x", &gui_main_pos_x, CONF_TYPE_INT, 0, 0, 0, NULL }, + { "gui_main_pos_y", &gui_main_pos_y, CONF_TYPE_INT, 0, 0, 0, NULL }, + { "gui_sub_pos_x", &gui_sub_pos_x, CONF_TYPE_INT, 0, 0, 0, NULL }, + { "gui_sub_pos_y", &gui_sub_pos_y, CONF_TYPE_INT, 0, 0, 0, NULL }, + { "sub_window", &sub_window, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + { "console", &console, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + { NULL, NULL, 0, 0, 0, 0, NULL } +}; + +char *gfgets(char *str, int size, FILE *f) +{ + char *s = fgets(str, size, f); + char c; + if(s) + { + c = s[strlen(s) - 1]; + if ((c == '\n') || (c == '\r')) + s[strlen(s) - 1]=0; + c = s[strlen(s) - 1]; + if ((c == '\n') || (c == '\r')) + s[strlen(s) - 1]=0; + } + return s; +} + +int cfg_read(void) +{ + char *cfg = get_path("gui.conf"); + + /* read configuration */ + mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] [cfg] reading config file: %s\n", cfg); + gui_conf = m_config_new(); + m_config_register_options(gui_conf, gui_opts); + if (m_config_parse_config_file(gui_conf, cfg) < 0) + mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_ConfigFileError); + free(cfg); + return 0; +} + +int cfg_write(void) +{ + char *cfg = get_path("gui.conf"); + FILE *f; + int i; + + /* save configuration */ + if ((f = fopen(cfg, "wt+"))) + { + for (i=0; gui_opts[i].name; i++) + { + char *v = m_option_print(&gui_opts[i], gui_opts[i].p); + if(v) + { + fprintf(f, "%s = \"%s\"\n", gui_opts[i].name, v); + free(v); + } + else if((int) v == -1) + mp_msg(MSGT_GPLAYER, MSGL_WARN, MSGTR_UnableToSaveOption, gui_opts[i].name); + } + fclose(f); + } + free(cfg); + return 0; +} diff --git a/gui/win32/wincfg.h b/gui/win32/wincfg.h new file mode 100644 index 0000000000..9a5543c3a9 --- /dev/null +++ b/gui/win32/wincfg.h @@ -0,0 +1,38 @@ +/* + MPlayer Gui for win32 + Copyright (c) 2003 Sascha Sommer <saschasommer@freenet.de> + Copyright (c) 2006 Erik Augustson <erik_27can@yahoo.com> + Copyright (c) 2006 Gianluigi Tiesi <sherpya@netfarm.it> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA +*/ + +#ifndef _WINCFG_H +#define _WINCFG_H + +extern char *skinName; +extern int sub_window; +extern int console; + +extern int gui_save_pos; +extern int gui_main_pos_x; +extern int gui_main_pos_y; +extern int gui_sub_pos_x; +extern int gui_sub_pos_y; + +extern int cfg_read(void); +extern int cfg_write(void); + +#endif diff --git a/gui/wm/ws.c b/gui/wm/ws.c new file mode 100644 index 0000000000..5e2e010bf3 --- /dev/null +++ b/gui/wm/ws.c @@ -0,0 +1,1272 @@ + +// -------------------------------------------------------------------------- +// AutoSpace Window System for Linux/Win32 v0.85 +// Writed by pontscho/fresh!mindworkz +// -------------------------------------------------------------------------- + +#include <X11/Xlib.h> +#include <X11/Xproto.h> +#include <X11/Xutil.h> +#include <X11/keysym.h> +#include <X11/Xatom.h> + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <errno.h> + +#include <inttypes.h> + +#include "../config.h" +#include "../libvo/x11_common.h" +#include "../libvo/video_out.h" +#include "ws.h" +#include "wsxdnd.h" +#include "../cpudetect.h" +#include "../libswscale/swscale.h" +#include "../libswscale/rgb2rgb.h" +#include "../libmpcodecs/vf_scale.h" +#include "../mp_msg.h" +#include "../help_mp.h" +#include "../mplayer.h" + +#include <X11/extensions/XShm.h> +#ifdef HAVE_XSHAPE +#include <X11/extensions/shape.h> +#endif + +#ifdef HAVE_XINERAMA +#include <X11/extensions/Xinerama.h> +#endif + +#ifdef HAVE_XF86VM +#include <X11/extensions/xf86vmode.h> +#endif + +#include <sys/ipc.h> +#include <sys/shm.h> + +#undef ENABLE_DPMS + +#ifdef HAVE_XINERAMA +extern int xinerama_screen; +#endif + +typedef struct +{ + unsigned long flags; + unsigned long functions; + unsigned long decorations; + long input_mode; + unsigned long status; +} MotifWmHints; + +Atom wsMotifHints; + +int wsMaxX = 0; // Screen width. +int wsMaxY = 0; // Screen height. +int wsOrgX = 0; // Screen origin x. +int wsOrgY = 0; // Screen origin y. + +Display * wsDisplay; +int wsScreen; +Window wsRootWin; +XEvent wsEvent; +int wsWindowDepth; +GC wsHGC; +MotifWmHints wsMotifWmHints; +Atom wsTextProperlyAtom = None; +int wsLayer = 0; + +int wsDepthOnScreen = 0; +int wsRedMask = 0; +int wsGreenMask = 0; +int wsBlueMask = 0; +int wsOutMask = 0; + +int wsTrue = True; + +#define wsWLCount 5 +wsTWindow * wsWindowList[wsWLCount] = { NULL,NULL,NULL,NULL,NULL }; + +unsigned long wsKeyTable[512]; + +int wsUseXShm = 1; +int wsUseXShape = 1; + +int XShmGetEventBase( Display* ); +inline int wsSearch( Window win ); + +// --- + +#define PACK_RGB16(r,g,b,pixel) pixel=(b>>3);\ + pixel<<=6;\ + pixel|=(g>>2);\ + pixel<<=5;\ + pixel|=(r>>3) + +#define PACK_RGB15(r,g,b,pixel) pixel=(b>>3);\ + pixel<<=5;\ + pixel|=(g>>3);\ + pixel<<=5;\ + pixel|=(r>>3) + +typedef void(*wsTConvFunc)( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels ); +wsTConvFunc wsConvFunc = NULL; + +void rgb32torgb32( const unsigned char * src, unsigned char * dst,unsigned int src_size ) +{ memcpy( dst,src,src_size ); } + +// --- + +#define MWM_HINTS_FUNCTIONS (1L << 0) +#define MWM_HINTS_DECORATIONS (1L << 1) +#define MWM_HINTS_INPUT_MODE (1L << 2) +#define MWM_HINTS_STATUS (1L << 3) + +#define MWM_FUNC_ALL (1L << 0) +#define MWM_FUNC_RESIZE (1L << 1) +#define MWM_FUNC_MOVE (1L << 2) +#define MWM_FUNC_MINIMIZE (1L << 3) +#define MWM_FUNC_MAXIMIZE (1L << 4) +#define MWM_FUNC_CLOSE (1L << 5) + +#define MWM_DECOR_ALL (1L << 0) +#define MWM_DECOR_BORDER (1L << 1) +#define MWM_DECOR_RESIZEH (1L << 2) +#define MWM_DECOR_TITLE (1L << 3) +#define MWM_DECOR_MENU (1L << 4) +#define MWM_DECOR_MINIMIZE (1L << 5) +#define MWM_DECOR_MAXIMIZE (1L << 6) + +#define MWM_INPUT_MODELESS 0 +#define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1 +#define MWM_INPUT_SYSTEM_MODAL 2 +#define MWM_INPUT_FULL_APPLICATION_MODAL 3 +#define MWM_INPUT_APPLICATION_MODAL MWM_INPUT_PRIMARY_APPLICATION_MODAL + +#define MWM_TEAROFF_WINDOW (1L<<0) + +void wsWindowDecoration( wsTWindow * win,long d ) +{ + wsMotifHints=XInternAtom( wsDisplay,"_MOTIF_WM_HINTS",0 ); + if ( wsMotifHints == None ) return; + + memset( &wsMotifWmHints,0,sizeof( MotifWmHints ) ); + wsMotifWmHints.flags=MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; + if ( d ) + { + wsMotifWmHints.functions=MWM_FUNC_MOVE | MWM_FUNC_CLOSE | MWM_FUNC_MINIMIZE | MWM_FUNC_MAXIMIZE | MWM_FUNC_RESIZE; + wsMotifWmHints.decorations=MWM_DECOR_ALL; + } + XChangeProperty( wsDisplay,win->WindowID,wsMotifHints,wsMotifHints,32, + PropModeReplace,(unsigned char *)&wsMotifWmHints,5 ); +} + +// ---------------------------------------------------------------------------------------------- +// Init X Window System. +// ---------------------------------------------------------------------------------------------- + +int wsIOErrorHandler( Display * dpy ) +{ + fprintf( stderr,"[ws] IO error in display.\n" ); + exit( 0 ); +} + +int wsErrorHandler( Display * dpy,XErrorEvent * Event ) +{ + char type[128]; + XGetErrorText( wsDisplay,Event->error_code,type,128 ); + fprintf(stderr,"[ws] Error in display.\n"); + fprintf(stderr,"[ws] Error code: %d ( %s )\n",Event->error_code,type ); + fprintf(stderr,"[ws] Request code: %d\n",Event->request_code ); + fprintf(stderr,"[ws] Minor code: %d\n",Event->minor_code ); + fprintf(stderr,"[ws] Modules: %s\n",current_module?current_module:"(NULL)" ); + exit( 0 ); +} + +void wsXInit( void* mDisplay ) +{ + int eventbase; + int errorbase; + +if(mDisplay){ + wsDisplay=mDisplay; +} else { + char * DisplayName = ":0.0"; + if ( getenv( "DISPLAY" ) ) DisplayName=getenv( "DISPLAY" ); + wsDisplay=XOpenDisplay( DisplayName ); + if ( !wsDisplay ) + { + mp_msg( MSGT_GPLAYER,MSGL_FATAL,MSGTR_WS_CouldNotOpenDisplay ); + exit( 0 ); + } +} + +/* enable DND atoms */ +wsXDNDInitialize(); + +{ /* on remote display XShm will be disabled - LGB */ + char *dispname=DisplayString(wsDisplay); + int localdisp=1; + if (dispname&&*dispname!=':') { + localdisp=0; + wsUseXShm=0; + } + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[ws] display name: %s => %s display.\n",dispname,localdisp?"local":"REMOTE"); + if (!localdisp) mp_msg( MSGT_GPLAYER,MSGL_V,MSGTR_WS_RemoteDisplay ); +} + + if ( !XShmQueryExtension( wsDisplay ) ) + { + mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_WS_NoXshm ); + wsUseXShm=0; + } +#ifdef HAVE_XSHAPE + if ( !XShapeQueryExtension( wsDisplay,&eventbase,&errorbase ) ) + { + mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_WS_NoXshape ); + wsUseXShape=0; + } +#else + wsUseXShape=0; +#endif + + XSynchronize( wsDisplay,True ); + + wsScreen=DefaultScreen( wsDisplay ); + wsRootWin=RootWindow( wsDisplay,wsScreen ); +#ifdef HAVE_XF86VM + { + int clock; + XF86VidModeModeLine modeline; + + XF86VidModeGetModeLine( wsDisplay,wsScreen,&clock ,&modeline ); + wsMaxX=modeline.hdisplay; + wsMaxY=modeline.vdisplay; + } +#endif + { + wsOrgX = wsOrgY = 0; + if ( !wsMaxX ) + wsMaxX=DisplayWidth( wsDisplay,wsScreen ); + if ( !wsMaxY ) + wsMaxY=DisplayHeight( wsDisplay,wsScreen ); + } + vo_screenwidth = wsMaxX; vo_screenheight = wsMaxY; + xinerama_x = wsOrgX; xinerama_y = wsOrgY; + update_xinerama_info(); + wsMaxX = vo_screenwidth; wsMaxY = vo_screenheight; + wsOrgX = xinerama_x; wsOrgY = xinerama_y; + + wsGetDepthOnScreen(); +#ifdef DEBUG + { + int minor,major,shp; + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[ws] Screen depth: %d\n",wsDepthOnScreen ); + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[ws] size: %dx%d\n",wsMaxX,wsMaxY ); +#ifdef HAVE_XINERAMA + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[ws] origin: +%d+%d\n",wsOrgX,wsOrgY ); +#endif + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[ws] red mask: 0x%x\n",wsRedMask ); + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[ws] green mask: 0x%x\n",wsGreenMask ); + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[ws] blue mask: 0x%x\n",wsBlueMask ); + if ( wsUseXShm ) + { + XShmQueryVersion( wsDisplay,&major,&minor,&shp ); + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[ws] XShm version is %d.%d\n",major,minor ); + } + #ifdef HAVE_XSHAPE + if ( wsUseXShape ) + { + XShapeQueryVersion( wsDisplay,&major,&minor ); + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[ws] XShape version is %d.%d\n",major,minor ); + } + #endif + } +#endif + wsOutMask=wsGetOutMask(); + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[ws] Initialized converter: " ); + sws_rgb2rgb_init(get_sws_cpuflags()); + switch ( wsOutMask ) + { + case wsRGB32: + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"rgb32 to rgb32\n" ); + wsConvFunc=rgb32torgb32; + break; + case wsBGR32: + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"rgb32 to bgr32\n" ); + wsConvFunc=rgb32tobgr32; + break; + case wsRGB24: + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"rgb32 to rgb24\n" ); + wsConvFunc=rgb32to24; + break; + case wsBGR24: + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"rgb32 to bgr24\n" ); + wsConvFunc=rgb32tobgr24; + break; + case wsRGB16: + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"rgb32 to rgb16\n" ); + wsConvFunc=rgb32to16; + break; + case wsBGR16: + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"rgb32 to bgr16\n" ); + wsConvFunc=rgb32tobgr16; + break; + case wsRGB15: + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"rgb32 to rgb15\n" ); + wsConvFunc=rgb32to15; + break; + case wsBGR15: + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"rgb32 to bgr15\n" ); + wsConvFunc=rgb32tobgr15; + break; + } + XSetErrorHandler( wsErrorHandler ); +} + +// ---------------------------------------------------------------------------------------------- +// Create window. +// X,Y : window position +// wX,wY : size of window +// bW : border width +// cV : visible mouse cursor on window +// D : visible frame, title, etc. +// sR : screen ratio +// ---------------------------------------------------------------------------------------------- + +XClassHint wsClassHint; +XTextProperty wsTextProperty; +Window LeaderWindow; + +void wsCreateWindow( wsTWindow * win,int X,int Y,int wX,int hY,int bW,int cV,unsigned char D,char * label ) +{ + int depth; + + win->Property=D; + if ( D & wsShowFrame ) win->Decorations=1; + wsHGC=DefaultGC( wsDisplay,wsScreen ); +// The window position and size. + switch ( X ) + { + case -1: win->X=( wsMaxX / 2 ) - ( wX / 2 ) + wsOrgX; break; + case -2: win->X=wsMaxX - wX - 1 + wsOrgX; break; + default: win->X=X; break; + } + switch ( Y ) + { + case -1: win->Y=( wsMaxY / 2 ) - ( hY / 2 ) + wsOrgY; break; + case -2: win->Y=wsMaxY - hY - 1 + wsOrgY; break; + default: win->Y=Y; break; + } + win->Width=wX; + win->Height=hY; + win->OldX=win->X; + win->OldY=win->Y; + win->OldWidth=win->Width; + win->OldHeight=win->Height; + +// Border size for window. + win->BorderWidth=bW; +// Hide Mouse Cursor + win->wsCursor=None; + win->wsMouseEventType=cV; + win->wsCursorData[0]=0; + win->wsCursorPixmap=XCreateBitmapFromData( wsDisplay,wsRootWin,win->wsCursorData,1,1 ); + if ( !(cV & wsShowMouseCursor) ) win->wsCursor=XCreatePixmapCursor( wsDisplay,win->wsCursorPixmap,win->wsCursorPixmap,&win->wsColor,&win->wsColor,0,0 ); + + depth = vo_find_depth_from_visuals( wsDisplay,wsScreen,NULL ); + if ( depth < 15 ) + { + mp_msg( MSGT_GPLAYER,MSGL_FATAL,MSGTR_WS_ColorDepthTooLow ); + exit( 0 ); + } + XMatchVisualInfo( wsDisplay,wsScreen,depth,TrueColor,&win->VisualInfo ); + +// --- + win->AtomLeaderClient=XInternAtom( wsDisplay,"WM_CLIENT_LEADER",False ); + win->AtomDeleteWindow=XInternAtom( wsDisplay,"WM_DELETE_WINDOW",False ); + win->AtomTakeFocus=XInternAtom( wsDisplay,"WM_TAKE_FOCUS",False ); + win->AtomRolle=XInternAtom( wsDisplay,"WM_WINDOW_ROLE",False ); + win->AtomWMSizeHint=XInternAtom( wsDisplay,"WM_SIZE_HINT",False ); + win->AtomWMNormalHint=XInternAtom( wsDisplay,"WM_NORMAL_HINT",False ); + win->AtomProtocols=XInternAtom( wsDisplay,"WM_PROTOCOLS",False ); + win->AtomsProtocols[0]=win->AtomDeleteWindow; + win->AtomsProtocols[1]=win->AtomTakeFocus; + win->AtomsProtocols[2]=win->AtomRolle; +// --- + + win->WindowAttrib.background_pixel=BlackPixel( wsDisplay,wsScreen ); + win->WindowAttrib.border_pixel=WhitePixel( wsDisplay,wsScreen ); + win->WindowAttrib.colormap=XCreateColormap( wsDisplay,wsRootWin,win->VisualInfo.visual,AllocNone ); + win->WindowAttrib.event_mask=StructureNotifyMask | FocusChangeMask | + ExposureMask | PropertyChangeMask | + EnterWindowMask | LeaveWindowMask | + VisibilityChangeMask | + KeyPressMask | KeyReleaseMask; + if ( ( cV & wsHandleMouseButton ) ) win->WindowAttrib.event_mask|=ButtonPressMask | ButtonReleaseMask; + if ( ( cV & wsHandleMouseMove ) ) win->WindowAttrib.event_mask|=PointerMotionMask; + win->WindowAttrib.cursor=win->wsCursor; + win->WindowAttrib.override_redirect=False; + if ( D & wsOverredirect ) win->WindowAttrib.override_redirect=True; + + win->WindowMask=CWBackPixel | CWBorderPixel | + CWColormap | CWEventMask | CWCursor | + CWOverrideRedirect; + + win->WindowID=XCreateWindow( wsDisplay, + (win->Parent != 0?win->Parent:wsRootWin), + win->X,win->Y,win->Width,win->Height,win->BorderWidth, + win->VisualInfo.depth, + InputOutput, + win->VisualInfo.visual, + win->WindowMask,&win->WindowAttrib ); + + wsClassHint.res_name="MPlayer"; + + wsClassHint.res_class="MPlayer"; + XSetClassHint( wsDisplay,win->WindowID,&wsClassHint ); + + win->SizeHint.flags=PPosition | PSize | PResizeInc | PWinGravity;// | PBaseSize; + win->SizeHint.x=win->X; + win->SizeHint.y=win->Y; + win->SizeHint.width=win->Width; + win->SizeHint.height=win->Height; + + if ( D & wsMinSize ) + { + win->SizeHint.flags|=PMinSize; + win->SizeHint.min_width=win->Width; + win->SizeHint.min_height=win->Height; + } + if ( D & wsMaxSize ) + { + win->SizeHint.flags|=PMaxSize; + win->SizeHint.max_width=win->Width; + win->SizeHint.max_height=win->Height; + } + + win->SizeHint.height_inc=1; + win->SizeHint.width_inc=1; + win->SizeHint.base_width=win->Width; + win->SizeHint.base_height=win->Height; + win->SizeHint.win_gravity=StaticGravity; + XSetWMNormalHints( wsDisplay,win->WindowID,&win->SizeHint ); + + win->WMHints.flags=InputHint | StateHint; + win->WMHints.input=True; + win->WMHints.initial_state=NormalState; + XSetWMHints( wsDisplay,win->WindowID,&win->WMHints ); + + wsWindowDecoration( win,win->Decorations ); + XStoreName( wsDisplay,win->WindowID,label ); + XmbSetWMProperties( wsDisplay,win->WindowID,label,label,NULL,0,NULL,NULL,NULL ); + + XSetWMProtocols( wsDisplay,win->WindowID,win->AtomsProtocols,3 ); + XChangeProperty( wsDisplay,win->WindowID, + win->AtomLeaderClient, + XA_WINDOW,32,PropModeReplace, + (unsigned char *)&LeaderWindow,1 ); + + wsTextProperty.value=label; + wsTextProperty.encoding=XA_STRING; + wsTextProperty.format=8; + wsTextProperty.nitems=strlen( label ); + XSetWMIconName( wsDisplay,win->WindowID,&wsTextProperty ); + + win->wGC=XCreateGC( wsDisplay,win->WindowID, + GCForeground | GCBackground, + &win->wGCV ); + + win->Visible=0; + win->Focused=0; + win->Mapped=0; + win->Rolled=0; + if ( D & wsShowWindow ) XMapWindow( wsDisplay,win->WindowID ); + + wsCreateImage( win,win->Width,win->Height ); +// --- End of creating -------------------------------------------------------------------------- + + { + int i; + for ( i=0;i < wsWLCount;i++ ) + if ( wsWindowList[i] == NULL ) break; + if ( i == wsWLCount ) + { mp_msg( MSGT_GPLAYER,MSGL_FATAL,MSGTR_WS_TooManyOpenWindows ); exit( 0 ); } + wsWindowList[i]=win; + } + + XFlush( wsDisplay ); + XSync( wsDisplay,False ); + + win->ReDraw=NULL; + win->ReSize=NULL; + win->Idle=NULL; + win->MouseHandler=NULL; + win->KeyHandler=NULL; + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[ws] window is created. ( %s ).\n",label ); +} + +void wsDestroyWindow( wsTWindow * win ) +{ + int l; + l=wsSearch( win->WindowID ); + wsWindowList[l]=NULL; + if ( win->wsCursor != None ) + { + XFreeCursor( wsDisplay,win->wsCursor ); + win->wsCursor=None; + } + XFreeGC( wsDisplay,win->wGC ); + XUnmapWindow( wsDisplay,win->WindowID ); + wsDestroyImage( win ); + XDestroyWindow( wsDisplay,win->WindowID ); +#if 0 + win->ReDraw=NULL; + win->ReSize=NULL; + win->Idle=NULL; + win->MouseHandler=NULL; + win->KeyHandler=NULL; + win->Visible=0; + win->Focused=0; + win->Mapped=0; + win->Rolled=0; +#endif +} + +// ---------------------------------------------------------------------------------------------- +// Handle events. +// ---------------------------------------------------------------------------------------------- + +inline int wsSearch( Window win ) +{ + int i; + for ( i=0;i<wsWLCount;i++ ) if ( wsWindowList[i] && wsWindowList[i]->WindowID == win ) return i; + return -1; +} + +Bool wsEvents( Display * display,XEvent * Event,XPointer arg ) +{ + unsigned long i = 0; + int l; + int x,y; + Window child_window = 0; + + l=wsSearch( Event->xany.window ); + if ( l == -1 ) return !wsTrue; + wsWindowList[l]->State=0; + switch( Event->type ) + { + case ClientMessage: + if ( Event->xclient.message_type == wsWindowList[l]->AtomProtocols ) + { + if ( (Atom)Event->xclient.data.l[0] == wsWindowList[l]->AtomDeleteWindow ) + { i=wsWindowClosed; goto expose; } + if ( (Atom)Event->xclient.data.l[0] == wsWindowList[l]->AtomTakeFocus ) + { i=wsWindowFocusIn; wsWindowList[l]->Focused=wsFocused; goto expose; } + if ( (Atom)Event->xclient.data.l[0] == wsWindowList[l]->AtomRolle ) + { mp_msg( MSGT_GPLAYER,MSGL_V,"[ws] role set.\n" ); } + } else { + /* try to process DND events */ + wsXDNDProcessClientMessage(wsWindowList[l],&Event->xclient); + } + break; + + case MapNotify: i=wsWindowMapped; wsWindowList[l]->Mapped=wsMapped; goto expose; + case UnmapNotify: i=wsWindowUnmapped; wsWindowList[l]->Mapped=wsNone; goto expose; + case FocusIn: + if ( wsWindowList[l]->Focused == wsFocused ) break; + i=wsWindowFocusIn; + wsWindowList[l]->Focused=wsFocused; + goto expose; + case FocusOut: + if ( wsWindowList[l]->Focused == wsNone ) break; + i=wsWindowFocusOut; + wsWindowList[l]->Focused=wsNone; + goto expose; + case VisibilityNotify: + switch( Event->xvisibility.state ) + { + case VisibilityUnobscured: i=wsWindowVisible; wsWindowList[l]->Visible=wsVisible; goto expose; + case VisibilityFullyObscured: i=wsWindowNotVisible; wsWindowList[l]->Visible=wsNotVisible; goto expose; + case VisibilityPartiallyObscured: i=wsWindowPartialVisible; wsWindowList[l]->Visible=wsPVisible; goto expose; + } +expose: + wsWindowList[l]->State=i; + if ( wsWindowList[l]->ReDraw ) wsWindowList[l]->ReDraw(); + break; + + case Expose: + wsWindowList[l]->State=wsWindowExpose; + if ( ( wsWindowList[l]->ReDraw )&&( !Event->xexpose.count ) ) wsWindowList[l]->ReDraw(); + break; + + case ConfigureNotify: + XTranslateCoordinates( wsDisplay,wsWindowList[l]->WindowID,wsRootWin,0,0,&x,&y,&child_window ); + if ( ( wsWindowList[l]->X != x )||( wsWindowList[l]->Y != y )||( wsWindowList[l]->Width != Event->xconfigure.width )||( wsWindowList[l]->Height != Event->xconfigure.height ) ) + { + wsWindowList[l]->X=x; wsWindowList[l]->Y=y; + wsWindowList[l]->Width=Event->xconfigure.width; wsWindowList[l]->Height=Event->xconfigure.height; + if ( wsWindowList[l]->ReSize ) wsWindowList[l]->ReSize( wsWindowList[l]->X,wsWindowList[l]->Y,wsWindowList[l]->Width,wsWindowList[l]->Height ); + } + + wsWindowList[l]->Rolled=wsNone; + if ( Event->xconfigure.y < 0 ) + { i=wsWindowRolled; wsWindowList[l]->Rolled=wsRolled; goto expose; } + + break; + + case KeyPress: i=wsKeyPressed; goto keypressed; + case KeyRelease: i=wsKeyReleased; +keypressed: + wsWindowList[l]->Alt=0; + wsWindowList[l]->Shift=0; + wsWindowList[l]->NumLock=0; + wsWindowList[l]->Control=0; + wsWindowList[l]->CapsLock=0; + if ( Event->xkey.state & Mod1Mask ) wsWindowList[l]->Alt=1; + if ( Event->xkey.state & Mod2Mask ) wsWindowList[l]->NumLock=1; + if ( Event->xkey.state & ControlMask ) wsWindowList[l]->Control=1; + if ( Event->xkey.state & ShiftMask ) wsWindowList[l]->Shift=1; + if ( Event->xkey.state & LockMask ) wsWindowList[l]->CapsLock=1; +#if 0 + { + KeySym keySym; + keySym=XKeycodeToKeysym( wsDisplay,Event->xkey.keycode,0 ); + if ( keySym != NoSymbol ) + { + keySym=( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) ); + wsKeyTable[ keySym ]=i; + if ( wsWindowList[l]->KeyHandler ) + wsWindowList[l]->KeyHandler( Event->xkey.state,i,keySym ); + } + } +#else + { + int key; + char buf[100]; + KeySym keySym; + static XComposeStatus stat; + + XLookupString( &Event->xkey,buf,sizeof(buf),&keySym,&stat ); + key=( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) ); + wsKeyTable[ key ]=i; + if ( wsWindowList[l]->KeyHandler ) wsWindowList[l]->KeyHandler( Event->xkey.keycode,i,key ); + } +#endif + break; + + case MotionNotify: + i=wsMoveMouse; + { + /* pump all motion events from the display queue: + this way it works faster when moving the window */ + static XEvent e; + if ( Event->xmotion.state ) + { + while(XCheckTypedWindowEvent(display,Event->xany.window,MotionNotify,&e)){ + /* FIXME: need to make sure we didn't release/press the button in between...*/ + /* FIXME: do we need some timeout here to make sure we don't spend too much time + removing events from the queue? */ + Event = &e; + } + } + } + goto buttonreleased; + case ButtonRelease: i=Event->xbutton.button + 128; goto buttonreleased; + case ButtonPress: i=Event->xbutton.button; goto buttonreleased; + case EnterNotify: i=wsEnterWindow; goto buttonreleased; + case LeaveNotify: i=wsLeaveWindow; +buttonreleased: + if ( wsWindowList[l]->MouseHandler ) + wsWindowList[l]->MouseHandler( i,Event->xbutton.x,Event->xbutton.y,Event->xmotion.x_root,Event->xmotion.y_root ); + break; + + case SelectionNotify: + /* Handle DandD */ + wsXDNDProcessSelection(wsWindowList[l],Event); + break; + } + XFlush( wsDisplay ); + XSync( wsDisplay,False ); + return !wsTrue; +} + +Bool wsDummyEvents( Display * display,XEvent * Event,XPointer arg ) +{ return True; } + +void wsHandleEvents( void ){ + // handle pending events + while ( XPending(wsDisplay) ){ + XNextEvent( wsDisplay,&wsEvent ); +// printf("### X event: %d [%d]\n",wsEvent.type,delay); + wsEvents( wsDisplay,&wsEvent,NULL ); + } +} + +void wsMainLoop( void ) +{ + int delay=20; + mp_msg( MSGT_GPLAYER,MSGL_V,"[ws] init threads: %d\n",XInitThreads() ); + XSynchronize( wsDisplay,False ); + XLockDisplay( wsDisplay ); +// XIfEvent( wsDisplay,&wsEvent,wsEvents,NULL ); + +#if 1 + +while(wsTrue){ + // handle pending events + while ( XPending(wsDisplay) ){ + XNextEvent( wsDisplay,&wsEvent ); + wsEvents( wsDisplay,&wsEvent,NULL ); + delay=0; + } + usleep(delay*1000); // FIXME! + if(delay<10*20) delay+=20; // pump up delay up to 0.2 sec (low activity) +} + +#else + + while( wsTrue ) + { + XIfEvent( wsDisplay,&wsEvent,wsDummyEvents,NULL ); + wsEvents( wsDisplay,&wsEvent,NULL ); + } +#endif + + XUnlockDisplay( wsDisplay ); +} + +// ---------------------------------------------------------------------------------------------- +// Move window to selected layer +// ---------------------------------------------------------------------------------------------- + +#define WIN_LAYER_ONBOTTOM 2 +#define WIN_LAYER_NORMAL 4 +#define WIN_LAYER_ONTOP 10 + +void wsSetLayer( Display * wsDisplay, Window win, int layer ) +{ vo_x11_setlayer( wsDisplay,win,layer ); } + +// ---------------------------------------------------------------------------------------------- +// Switch to fullscreen. +// ---------------------------------------------------------------------------------------------- +void wsFullScreen( wsTWindow * win ) +{ + int decoration = 0; + + if ( win->isFullScreen ) + { + vo_x11_ewmh_fullscreen( _NET_WM_STATE_REMOVE ); // removes fullscreen state if wm supports EWMH + if ( ! (vo_fs_type & vo_wm_FULLSCREEN) ) // shouldn't be needed with EWMH fs + { + win->X=win->OldX; + win->Y=win->OldY; + win->Width=win->OldWidth; + win->Height=win->OldHeight; + decoration=win->Decorations; + } + +#ifdef ENABLE_DPMS + wsScreenSaverOn( wsDisplay ); +#endif + + win->isFullScreen=False; + } + else + { + if ( ! (vo_fs_type & vo_wm_FULLSCREEN) ) // shouldn't be needed with EWMH fs + { + win->OldX=win->X; win->OldY=win->Y; + win->OldWidth=win->Width; win->OldHeight=win->Height; + vo_dx = win->X; vo_dy = win->Y; + vo_dwidth = win->Width; vo_dheight = win->Height; + vo_screenwidth = wsMaxX; vo_screenheight = wsMaxY; + xinerama_x = wsOrgX; xinerama_y = wsOrgY; + update_xinerama_info(); + wsMaxX = vo_screenwidth; wsMaxY = vo_screenheight; + wsOrgX = xinerama_x; wsOrgY = xinerama_y; + win->X=wsOrgX; win->Y=wsOrgY; + win->Width=wsMaxX; win->Height=wsMaxY; + } + + win->isFullScreen=True; +#ifdef ENABLE_DPMS + wsScreenSaverOff( wsDisplay ); +#endif + + vo_x11_ewmh_fullscreen( _NET_WM_STATE_ADD ); // adds fullscreen state if wm supports EWMH + } + + if ( ! (vo_fs_type & vo_wm_FULLSCREEN) ) // shouldn't be needed with EWMH fs + { + vo_x11_decoration( wsDisplay,win->WindowID,decoration ); + vo_x11_sizehint( win->X,win->Y,win->Width,win->Height,0 ); + vo_x11_setlayer( wsDisplay,win->WindowID,win->isFullScreen ); + + if ((!(win->isFullScreen)) & vo_ontop) vo_x11_setlayer(wsDisplay, win->WindowID,1); + + XMoveResizeWindow( wsDisplay,win->WindowID,win->X,win->Y,win->Width,win->Height ); + } + + if ( vo_wm_type == 0 && !(vo_fsmode&16) ) + { + XWithdrawWindow( wsDisplay,win->WindowID,wsScreen ); + } + + + XMapRaised( wsDisplay,win->WindowID ); + XRaiseWindow( wsDisplay,win->WindowID ); + XFlush( wsDisplay ); +} + +// ---------------------------------------------------------------------------------------------- +// Redraw screen. +// ---------------------------------------------------------------------------------------------- +void wsPostRedisplay( wsTWindow * win ) +{ + if ( win->ReDraw ) + { + win->State=wsWindowExpose; + win->ReDraw(); + XFlush( wsDisplay ); + } +} + +// ---------------------------------------------------------------------------------------------- +// Do Exit. +// ---------------------------------------------------------------------------------------------- +void wsDoExit( void ) +{ wsTrue=False; wsResizeWindow( wsWindowList[0],32,32 ); } + +// ---------------------------------------------------------------------------------------------- +// Put 'Image' to window. +// ---------------------------------------------------------------------------------------------- +void wsConvert( wsTWindow * win,unsigned char * Image,unsigned int Size ) +{ if ( wsConvFunc ) wsConvFunc( Image,win->ImageData,win->xImage->width * win->xImage->height * 4 ); } + +void wsPutImage( wsTWindow * win ) +{ + if ( wsUseXShm ) + { + XShmPutImage( wsDisplay,win->WindowID,win->wGC,win->xImage, + 0,0, + ( win->Width - win->xImage->width ) / 2,( win->Height - win->xImage->height ) / 2, + win->xImage->width,win->xImage->height,0 ); + } + else + { + XPutImage( wsDisplay,win->WindowID,win->wGC,win->xImage, + 0,0, + ( win->Width - win->xImage->width ) / 2,( win->Height - win->xImage->height ) / 2, + win->xImage->width,win->xImage->height ); + } +} + +// ---------------------------------------------------------------------------------------------- +// Move window to x, y. +// ---------------------------------------------------------------------------------------------- +void wsMoveWindow( wsTWindow * win,int b,int x, int y ) +{ + if ( b ) + { + switch ( x ) + { + case -1: win->X=( wsMaxX / 2 ) - ( win->Width / 2 ) + wsOrgX; break; + case -2: win->X=wsMaxX - win->Width + wsOrgX; break; + default: win->X=x; break; + } + switch ( y ) + { + case -1: win->Y=( wsMaxY / 2 ) - ( win->Height / 2 ) + wsOrgY; break; + case -2: win->Y=wsMaxY - win->Height + wsOrgY; break; + default: win->Y=y; break; + } + } + else { win->X=x; win->Y=y; } + + win->SizeHint.flags=PPosition | PWinGravity; + win->SizeHint.x=win->X; + win->SizeHint.y=win->Y; + win->SizeHint.win_gravity=StaticGravity; + XSetWMNormalHints( wsDisplay,win->WindowID,&win->SizeHint ); + + XMoveWindow( wsDisplay,win->WindowID,win->X,win->Y ); + if ( win->ReSize ) win->ReSize( win->X,win->Y,win->Width,win->Height ); +} + +// ---------------------------------------------------------------------------------------------- +// Resize window to sx, sy. +// ---------------------------------------------------------------------------------------------- +void wsResizeWindow( wsTWindow * win,int sx, int sy ) +{ + win->Width=sx; + win->Height=sy; + + win->SizeHint.flags=PPosition | PSize | PWinGravity;// | PBaseSize; + win->SizeHint.x=win->X; + win->SizeHint.y=win->Y; + win->SizeHint.width=win->Width; + win->SizeHint.height=win->Height; + + if ( win->Property & wsMinSize ) + { + win->SizeHint.flags|=PMinSize; + win->SizeHint.min_width=win->Width; + win->SizeHint.min_height=win->Height; + } + if ( win->Property & wsMaxSize ) + { + win->SizeHint.flags|=PMaxSize; + win->SizeHint.max_width=win->Width; + win->SizeHint.max_height=win->Height; + } + + win->SizeHint.win_gravity=StaticGravity; + win->SizeHint.base_width=sx; win->SizeHint.base_height=sy; + + if ( vo_wm_type == 0 ) XUnmapWindow( wsDisplay,win->WindowID ); + + XSetWMNormalHints( wsDisplay,win->WindowID,&win->SizeHint ); + XResizeWindow( wsDisplay,win->WindowID,sx,sy ); + XMapRaised( wsDisplay,win->WindowID ); + if ( win->ReSize ) win->ReSize( win->X,win->Y,win->Width,win->Height ); +} + +// ---------------------------------------------------------------------------------------------- +// Iconify window. +// ---------------------------------------------------------------------------------------------- +void wsIconify( wsTWindow win ) +{ XIconifyWindow( wsDisplay,win.WindowID,0 ); } + +// ---------------------------------------------------------------------------------------------- +// Move top the window. +// ---------------------------------------------------------------------------------------------- +void wsMoveTopWindow( Display * wsDisplay,Window win ) +{ +// XUnmapWindow( wsDisplay,win ); +// XMapWindow( wsDisplay,win ); + XMapRaised( wsDisplay,win ); + XRaiseWindow( wsDisplay,win ); +} + +// ---------------------------------------------------------------------------------------------- +// Set window background to 'color'. +// ---------------------------------------------------------------------------------------------- +void wsSetBackground( wsTWindow * win,int color ) +{ XSetWindowBackground( wsDisplay,win->WindowID,color ); } + +void wsSetBackgroundRGB( wsTWindow * win,int r,int g,int b ) +{ + int color = 0; + switch ( wsOutMask ) + { + case wsRGB32: + case wsRGB24: color=( r << 16 ) + ( g << 8 ) + b; break; + case wsBGR32: + case wsBGR24: color=( b << 16 ) + ( g << 8 ) + r; break; + case wsRGB16: PACK_RGB16( b,g,r,color ); break; + case wsBGR16: PACK_RGB16( r,g,b,color ); break; + case wsRGB15: PACK_RGB15( b,g,r,color ); break; + case wsBGR15: PACK_RGB15( r,g,b,color ); break; + } + XSetWindowBackground( wsDisplay,win->WindowID,color ); +} + +void wsSetForegroundRGB( wsTWindow * win,int r,int g,int b ) +{ + int color = 0; + switch ( wsOutMask ) + { + case wsRGB32: + case wsRGB24: color=( r << 16 ) + ( g << 8 ) + b; break; + case wsBGR32: + case wsBGR24: color=( b << 16 ) + ( g << 8 ) + r; break; + case wsRGB16: PACK_RGB16( b,g,r,color ); break; + case wsBGR16: PACK_RGB16( r,g,b,color ); break; + case wsRGB15: PACK_RGB15( b,g,r,color ); break; + case wsBGR15: PACK_RGB15( r,g,b,color ); break; + } + XSetForeground( wsDisplay,win->wGC,color ); +} + +// ---------------------------------------------------------------------------------------------- +// Draw string at x,y with fc ( foreground color ) and bc ( background color ). +// ---------------------------------------------------------------------------------------------- +void wsDrawString( wsTWindow win,int x,int y,char * str,int fc,int bc ) +{ + XSetForeground( wsDisplay,win.wGC,bc ); + XFillRectangle( wsDisplay,win.WindowID,win.wGC,x,y, + XTextWidth( win.Font,str,strlen( str ) ) + 20, + win.FontHeight + 2 ); + XSetForeground( wsDisplay,win.wGC,fc ); + XDrawString( wsDisplay,win.WindowID,win.wGC,x + 10,y + 13,str,strlen( str ) ); +} + +// ---------------------------------------------------------------------------------------------- +// Calculation string width. +// ---------------------------------------------------------------------------------------------- +int wsTextWidth( wsTWindow win,char * str ) +{ return XTextWidth( win.Font,str,strlen( str ) ) + 20; } + +// ---------------------------------------------------------------------------------------------- +// Show / hide mouse cursor. +// ---------------------------------------------------------------------------------------------- +void wsVisibleMouse( wsTWindow * win,int m ) +{ + switch ( m ) + { + case wsShowMouseCursor: + if ( win->wsCursor != None ) + { + XFreeCursor( wsDisplay,win->wsCursor ); + win->wsCursor=None; + } + XDefineCursor( wsDisplay,win->WindowID,0 ); + break; + case wsHideMouseCursor: + win->wsCursor=XCreatePixmapCursor( wsDisplay,win->wsCursorPixmap,win->wsCursorPixmap,&win->wsColor,&win->wsColor,0,0 ); + XDefineCursor( wsDisplay,win->WindowID,win->wsCursor ); + break; + } + XFlush( wsDisplay ); +} + +int wsGetDepthOnScreen( void ) +{ + int depth; + XImage * mXImage; + Visual * visual; + + if( (depth = vo_find_depth_from_visuals( wsDisplay,wsScreen,&visual )) > 0 ) + { + mXImage = XCreateImage( wsDisplay,visual,depth,ZPixmap,0,NULL, + 1,1,32,0 ); + wsDepthOnScreen = mXImage->bits_per_pixel; + wsRedMask=mXImage->red_mask; + wsGreenMask=mXImage->green_mask; + wsBlueMask=mXImage->blue_mask; + XDestroyImage( mXImage ); + } + else + { + int bpp,ibpp; + XWindowAttributes attribs; + + mXImage=XGetImage( wsDisplay,wsRootWin,0,0,1,1,AllPlanes,ZPixmap ); + bpp=mXImage->bits_per_pixel; + + XGetWindowAttributes( wsDisplay,wsRootWin,&attribs ); + ibpp=attribs.depth; + mXImage=XGetImage( wsDisplay,wsRootWin,0,0,1,1,AllPlanes,ZPixmap ); + bpp=mXImage->bits_per_pixel; + if ( ( ibpp + 7 ) / 8 != ( bpp + 7 ) / 8 ) ibpp=bpp; + wsDepthOnScreen=ibpp; + wsRedMask=mXImage->red_mask; + wsGreenMask=mXImage->green_mask; + wsBlueMask=mXImage->blue_mask; + XDestroyImage( mXImage ); + } + return wsDepthOnScreen; +} + +void wsXDone( void ) +{ + XCloseDisplay( wsDisplay ); +} + +void wsVisibleWindow( wsTWindow * win,int show ) +{ + switch( show ) + { + case wsShowWindow: XMapRaised( wsDisplay,win->WindowID ); break; + case wsHideWindow: XUnmapWindow( wsDisplay,win->WindowID ); break; + } + XFlush( wsDisplay ); +} + +void wsDestroyImage( wsTWindow * win ) +{ + if ( win->xImage ) + { + XDestroyImage( win->xImage ); + if ( wsUseXShm ) + { + XShmDetach( wsDisplay,&win->Shminfo ); + shmdt( win->Shminfo.shmaddr ); + } + } + win->xImage=NULL; +} + +void wsCreateImage( wsTWindow * win,int Width,int Height ) +{ + int CompletionType = -1; + if ( wsUseXShm ) + { + CompletionType=XShmGetEventBase( wsDisplay ) + ShmCompletion; + win->xImage=XShmCreateImage( wsDisplay,win->VisualInfo.visual, + win->VisualInfo.depth,ZPixmap,NULL,&win->Shminfo,Width,Height ); + if ( win->xImage == NULL ) + { + mp_msg( MSGT_GPLAYER,MSGL_FATAL,MSGTR_WS_ShmError ); + exit( 0 ); + } + win->Shminfo.shmid=shmget( IPC_PRIVATE,win->xImage->bytes_per_line * win->xImage->height,IPC_CREAT|0777 ); + if ( win->Shminfo.shmid < 0 ) + { + XDestroyImage( win->xImage ); + mp_msg( MSGT_GPLAYER,MSGL_FATAL,MSGTR_WS_ShmError ); + exit( 0 ); + } + win->Shminfo.shmaddr=(char *)shmat( win->Shminfo.shmid,0,0 ); + + if ( win->Shminfo.shmaddr == ((char *) -1) ) + { + XDestroyImage( win->xImage ); + if ( win->Shminfo.shmaddr != ((char *) -1) ) shmdt( win->Shminfo.shmaddr ); + mp_msg( MSGT_GPLAYER,MSGL_FATAL,MSGTR_WS_ShmError ); + exit( 0 ); + } + win->xImage->data=win->Shminfo.shmaddr; + win->Shminfo.readOnly=0; + XShmAttach( wsDisplay,&win->Shminfo ); + shmctl( win->Shminfo.shmid,IPC_RMID,0 ); + } + else + { + win->xImage=XCreateImage( wsDisplay,win->VisualInfo.visual,win->VisualInfo.depth, + ZPixmap,0,0,Width,Height, + (wsDepthOnScreen == 3) ? 32 : wsDepthOnScreen, + 0 ); + if ( ( win->xImage->data=malloc( win->xImage->bytes_per_line * win->xImage->height ) ) == NULL ) + { + mp_msg( MSGT_GPLAYER,MSGL_FATAL,MSGTR_WS_NotEnoughMemoryDrawBuffer ); + exit( 0 ); + } + } + win->ImageData=(unsigned char *)win->xImage->data; + win->ImageDataw=(unsigned short int *)win->xImage->data; + win->ImageDatadw=(unsigned int *)win->xImage->data; +} + +void wsResizeImage( wsTWindow * win,int Width,int Height ) +{ wsDestroyImage( win ); wsCreateImage( win,Width,Height ); } + +int wsGetOutMask( void ) +{ + if ( ( wsDepthOnScreen == 32 )&&( wsRedMask == 0xff0000 )&&( wsGreenMask == 0x00ff00 )&&( wsBlueMask == 0x0000ff ) ) return wsRGB32; + if ( ( wsDepthOnScreen == 32 )&&( wsRedMask == 0x0000ff )&&( wsGreenMask == 0x00ff00 )&&( wsBlueMask == 0xff0000 ) ) return wsBGR32; + if ( ( wsDepthOnScreen == 24 )&&( wsRedMask == 0xff0000 )&&( wsGreenMask == 0x00ff00 )&&( wsBlueMask == 0x0000ff ) ) return wsRGB24; + if ( ( wsDepthOnScreen == 24 )&&( wsRedMask == 0x0000ff )&&( wsGreenMask == 0x00ff00 )&&( wsBlueMask == 0xff0000 ) ) return wsBGR24; + if ( ( wsDepthOnScreen == 16 )&&( wsRedMask == 0xf800 )&&( wsGreenMask == 0x7e0 )&&( wsBlueMask == 0x1f ) ) return wsRGB16; + if ( ( wsDepthOnScreen == 16 )&&( wsRedMask == 0x1f )&&( wsGreenMask == 0x7e0 )&&( wsBlueMask == 0xf800 ) ) return wsBGR16; + if ( ( wsDepthOnScreen == 15 )&&( wsRedMask == 0x7c00 )&&( wsGreenMask == 0x3e0 )&&( wsBlueMask == 0x1f ) ) return wsRGB15; + if ( ( wsDepthOnScreen == 15 )&&( wsRedMask == 0x1f )&&( wsGreenMask == 0x3e0 )&&( wsBlueMask == 0x7c00 ) ) return wsBGR15; + return 0; +} + +void wsSetTitle( wsTWindow * win,char * name ) +{ XStoreName( wsDisplay,win->WindowID,name ); } + +void wsSetMousePosition( wsTWindow * win,int x, int y ) +{ XWarpPointer( wsDisplay,wsRootWin,win->WindowID,0,0,0,0,x,y ); } + +#ifdef ENABLE_DPMS +static int dpms_disabled=0; +static int timeout_save=0; + +void wsScreenSaverOn( Display *mDisplay ) +{ + int nothing; +#ifdef HAVE_XDPMS + if ( dpms_disabled ) + { + if ( DPMSQueryExtension( mDisplay,¬hing,¬hing ) ) + { + if ( !DPMSEnable( mDisplay ) ) mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_WS_DpmsUnavailable ); // restoring power saving settings + else + { + // DPMS does not seem to be enabled unless we call DPMSInfo + BOOL onoff; + CARD16 state; + DPMSInfo( mDisplay,&state,&onoff ); + if ( onoff ) mp_msg( MSGT_GPLAYER,MSGL_V,"Successfully enabled DPMS.\n" ); + else mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_WS_DpmsNotEnabled ); + } + } + } +#endif + if ( timeout_save ) + { + int dummy, interval, prefer_blank, allow_exp; + XGetScreenSaver( mDisplay,&dummy,&interval,&prefer_blank,&allow_exp ); + XSetScreenSaver( mDisplay,timeout_save,interval,prefer_blank,allow_exp ); + XGetScreenSaver( mDisplay,&timeout_save,&interval,&prefer_blank,&allow_exp ); + } +} + +void wsScreenSaverOff( Display * mDisplay ) +{ + int interval,prefer_blank,allow_exp,nothing; +#ifdef HAVE_XDPMS + if ( DPMSQueryExtension( mDisplay,¬hing,¬hing ) ) + { + BOOL onoff; + CARD16 state; + DPMSInfo( mDisplay,&state,&onoff ); + if ( onoff ) + { + Status stat; + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"Disabling DPMS.\n" ); + dpms_disabled=1; + stat=DPMSDisable( mDisplay ); // monitor powersave off + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"stat: %d.\n",stat ); + } + } +#endif + XGetScreenSaver( mDisplay,&timeout_save,&interval,&prefer_blank,&allow_exp ); + if ( timeout_save ) XSetScreenSaver( mDisplay,0,interval,prefer_blank,allow_exp ); // turning off screensaver +} +#endif + +void wsSetShape( wsTWindow * win,char * data ) +{ +#ifdef HAVE_XSHAPE + if ( !wsUseXShape ) return; + if ( data ) + { + win->Mask=XCreateBitmapFromData( wsDisplay,win->WindowID,data,win->Width,win->Height ); + XShapeCombineMask( wsDisplay,win->WindowID,ShapeBounding,0,0,win->Mask,ShapeSet ); + XFreePixmap( wsDisplay,win->Mask ); + } + else XShapeCombineMask( wsDisplay,win->WindowID,ShapeBounding,0,0,None,ShapeSet ); +#endif +} + +void wsSetIcon( Display * dsp,Window win,Pixmap icon,Pixmap mask ) +{ + XWMHints * wm; + long data[2]; + Atom iconatom; + + wm=XGetWMHints( dsp,win ); + if ( !wm ) wm=XAllocWMHints(); + + wm->icon_pixmap=icon; + wm->icon_mask=mask; + wm->flags|=IconPixmapHint | IconMaskHint; + + XSetWMHints( dsp,win,wm ); + + data[0]=icon; + data[1]=mask; + iconatom=XInternAtom( dsp,"KWM_WIN_ICON",0 ); + XChangeProperty( dsp,win,iconatom,iconatom,32,PropModeReplace,(unsigned char *)data,2 ); + + XFree( wm ); +} + +#include "wsmkeys.h" diff --git a/gui/wm/ws.h b/gui/wm/ws.h new file mode 100644 index 0000000000..17ad5a512a --- /dev/null +++ b/gui/wm/ws.h @@ -0,0 +1,262 @@ + +// ---------------------------------------------------------------------------------------------- +// AutoSpace Window System for Linux/Win32 v0.61 +// Writed by pontscho / fresh!mindworkz +// ---------------------------------------------------------------------------------------------- + +#ifndef __MY_WS +#define __MY_WS + +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#include <X11/keysym.h> +#include <X11/Xatom.h> +#include <X11/extensions/XShm.h> +#ifdef HAVE_XDPMS +#include <X11/extensions/dpms.h> +#endif + +#define wsKeyReleased 0 +#define wsKeyPressed 1 + +#define wsShift (1L<<0) +#define wsLock (1L<<1) +#define wsCtrl (1L<<2) +#define wsAlt (1L<<3) + +#define wsPLMouseButton 1 +#define wsPMMouseButton 2 +#define wsPRMouseButton 3 +#define wsP4MouseButton 4 +#define wsP5MouseButton 5 +#define wsRLMouseButton (1 + 128) +#define wsRMMouseButton (2 + 128) +#define wsRRMouseButton (3 + 128) +#define wsR4MouseButton (4 + 128) +#define wsR5MouseButton (5 + 128) +#define wsEnterWindow 253 +#define wsLeaveWindow 254 +#define wsMoveMouse 255 + +#define wsShowMouseCursor 1 +#define wsMouse 1 +#define wsHideMouseCursor 0 +#define wsNoMouse 0 +#define wsHandleMouseButton 2 +#define wsHandleMouseMove 4 + +#define wsHideFrame 0 +#define wsNoFrame 0 +#define wsShowFrame 1 +#define wsFrame 1 +#define wsMaxSize 2 +#define wsMinSize 4 +#define wsShowWindow 8 +#define wsHideWindow 16 +#define wsOverredirect 32 + +#define wsNoBorder 0 + +#define wsSysName "AutoSpace Window System LiTe" + +#define wsRGB32 1 +#define wsBGR32 2 +#define wsRGB24 3 +#define wsBGR24 4 +#define wsRGB16 5 +#define wsBGR16 6 +#define wsRGB15 7 +#define wsBGR15 8 + +#define wsWindowVisible 1 +#define wsWindowPartialVisible 2 +#define wsWindowNotVisible 4 +#define wsWindowMapped 8 +#define wsWindowUnmapped 16 +#define wsWindowFocusIn 32 +#define wsWindowFocusOut 64 +#define wsWindowExpose 128 +#define wsWindowRolled 256 +#define wsWindowClosed 512 + +#define wsNone 0 +#define wsMapped 1 +#define wsFocused 2 +#define wsVisible 3 +#define wsNotVisible 4 +#define wsPVisible 5 +#define wsRolled 6 + +#define wsWMUnknown 0 +#define wsWMNetWM 1 +#define wsWMKDE 2 +#define wsWMIceWM 3 +#define wsWMWMaker 4 + +typedef void (*wsTReDraw)( void ); +typedef void (*wsTReSize)( unsigned int X,unsigned int Y,unsigned int width,unsigned int height ); +typedef void (*wsTIdle)( void ); +typedef void (*wsTKeyHandler)( int KeyCode,int Type,int Key ); +typedef void (*wsTMouseHandler)( int Button,int X,int Y,int RX,int RY ); +typedef void (*wsTDNDHandler)( int num,char ** str ); + +typedef struct +{ + Window WindowID; + Window Parent; + int X,Y,Width,Height; + int OldX,OldY,OldWidth,OldHeight; + int MaxX,MaxY; + int isFullScreen; + int BorderWidth; + int Property; + unsigned char * bImage; + XImage * xImage; + Pixmap Mask; + int Decorations; + + int State; + int Visible; + int Mapped; + int Focused; + int Rolled; + + wsTReDraw ReDraw; + wsTReSize ReSize; + wsTIdle Idle; + wsTKeyHandler KeyHandler; + wsTMouseHandler MouseHandler; + wsTDNDHandler DandDHandler; + + int Alt; + int Shift; + int Control; + int NumLock; + int CapsLock; +// --- Misc ------------------------------------------------------------------------------------- + + Atom AtomDeleteWindow; + Atom AtomTakeFocus; + Atom AtomRolle; + Atom AtomProtocols; + Atom AtomsProtocols[3]; + Atom AtomLeaderClient; + Atom AtomRemote; + Atom AtomWMSizeHint; + Atom AtomWMNormalHint; + + XShmSegmentInfo Shminfo; + unsigned char * ImageData; + unsigned short int * ImageDataw; + unsigned int * ImageDatadw; + GC wGC; + XGCValues wGCV; + unsigned long WindowMask; + XVisualInfo VisualInfo; + XSetWindowAttributes WindowAttrib; + XSizeHints SizeHint; + XWMHints WMHints; + + XFontStruct * Font; + int FontHeight; + + Cursor wsCursor; + char wsCursorData[1]; + Pixmap wsCursorPixmap; + int wsMouseEventType; + XColor wsColor; +} wsTWindow; + +extern int wsMaxX; +extern int wsMaxY; +extern int wsOrgX; +extern int wsOrgY; + +extern Display * wsDisplay; +extern int wsScreen; +extern Window wsRootWin; +extern int wsLayer; + +extern unsigned char * wsImageData; + +extern XEvent wsEvent; + +extern int wsDepthOnScreen; +extern int wsRedMask; +extern int wsGreenMask; +extern int wsBlueMask; + +extern int wsUseXShm; +extern int wsUseDGA; + +// ---------------------------------------------------------------------------------------------- +// wsKeyTable +// ---------------------------------------------------------------------------------------------- +extern unsigned long wsKeyTable[512]; + +extern void wsXDone( void ); +extern void wsXInit( void* disp ); + +extern int wsGetDepthOnScreen( void ); + +extern void wsDoExit( void ); +extern void wsMainLoop( void ); +extern Bool wsEvents( Display * display,XEvent * Event,XPointer arg ); +extern void wsHandleEvents( void ); + +// ---------------------------------------------------------------------------------------------- +// wsCrateWindow: create a new window on the screen. +// X,Y : window position +// wX,hY : window size +// bW : window frame size +// cV : mouse cursor visible +// D : "decoration", visible titlebar, etc ... +// ---------------------------------------------------------------------------------------------- +extern void wsCreateWindow( wsTWindow * win,int X,int Y,int wX,int hY,int bW,int cV,unsigned char D,char * label ); +extern void wsDestroyWindow( wsTWindow * win ); +extern void wsMoveWindow( wsTWindow * win,int b,int x, int y ); +extern void wsResizeWindow( wsTWindow * win,int sx, int sy ); +extern void wsIconify( wsTWindow win ); +extern void wsMoveTopWindow( Display * wsDisplay,Window win ); +extern void wsSetBackground( wsTWindow * win,int color ); +extern void wsSetForegroundRGB( wsTWindow * win,int r,int g,int b ); +extern void wsSetBackgroundRGB( wsTWindow * win,int r,int g,int b ); +#define wsClearWindow( win ) XClearWindow( wsDisplay,win.WindowID ) +extern void wsSetTitle( wsTWindow * win,char * name ); +extern void wsVisibleWindow( wsTWindow * win,int show ); +extern void wsWindowDecoration( wsTWindow * win,long d ); +extern void wsSetLayer( Display * wsDisplay,Window win, int layer ); +extern void wsFullScreen( wsTWindow * win ); +extern void wsPostRedisplay( wsTWindow * win ); +extern void wsSetShape( wsTWindow * win,char * data ); +extern void wsSetIcon( Display * dsp,Window win,Pixmap icon,Pixmap mask ); + +// ---------------------------------------------------------------------------------------------- +// Draw string at x,y with fc ( foreground color ) and bc ( background color ). +// ---------------------------------------------------------------------------------------------- +extern void wsDrawString( wsTWindow win,int x,int y,char * str,int fc,int bc ); +extern int wsTextWidth( wsTWindow win,char * str ); + +// ---------------------------------------------------------------------------------------------- +// Show / hide mouse cursor. +// ---------------------------------------------------------------------------------------------- +extern void wsVisibleMouse( wsTWindow * win,int m ); +extern void wsSetMousePosition( wsTWindow * win,int x, int y ); + +// ---------------------------------------------------------------------------------------------- +// Image handling +// ---------------------------------------------------------------------------------------------- +extern void wsCreateImage( wsTWindow * win,int Width,int Height ); +extern void wsConvert( wsTWindow * win,unsigned char * Image,unsigned int Size ); +extern void wsPutImage( wsTWindow * win ); +extern void wsResizeImage( wsTWindow * win,int Width,int Height ); +extern void wsDestroyImage( wsTWindow * win ); +extern int wsGetOutMask( void ); + +extern void wsScreenSaverOn( Display *mDisplay ); +extern void wsScreenSaverOff( Display * mDisplay ); + +#define wgIsRect( X,Y,tX,tY,bX,bY ) ( ( (X) > (tX) )&&( (Y) > (tY) )&&( (X) < (bX) )&&( (Y) < (bY) ) ) + +#endif + diff --git a/gui/wm/wskeys.h b/gui/wm/wskeys.h new file mode 100644 index 0000000000..830aecbc39 --- /dev/null +++ b/gui/wm/wskeys.h @@ -0,0 +1,165 @@ + +#ifndef _MY_WSKEY +#define _MY_WSKEY + +#define wsKeyNone -1 + +#define wsosbrackets '[' +#define wscsbrackets ']' + +#define wsq 'q' +#define wsa 'a' +#define wsz 'z' +#define wsw 'w' +#define wss 's' +#define wsx 'x' +#define wse 'e' +#define wsd 'd' +#define wsr 'r' +#define wsf 'f' +#define wsv 'v' +#define wst 't' +#define wsg 'g' +#define wsb 'b' +#define wsy 'y' +#define wsh 'h' +#define wsn 'n' +#define wsu 'u' +#define wsj 'j' +#define wsm 'm' +#define wsi 'i' +#define wsk 'k' +#define wso 'o' +#define wsl 'l' +#define wsp 'p' +#define wsc 'c' + +#define wsQ 'Q' +#define wsA 'A' +#define wsZ 'Z' +#define wsW 'W' +#define wsS 'S' +#define wsX 'X' +#define wsE 'E' +#define wsD 'D' +#define wsR 'R' +#define wsF 'F' +#define wsV 'V' +#define wsT 'T' +#define wsG 'G' +#define wsB 'B' +#define wsY 'Y' +#define wsH 'H' +#define wsN 'N' +#define wsU 'U' +#define wsJ 'J' +#define wsM 'M' +#define wsI 'I' +#define wsK 'K' +#define wsO 'O' +#define wsL 'L' +#define wsP 'P' +#define wsC 'C' + +#define ws0 '0' +#define ws1 '1' +#define ws2 '2' +#define ws3 '3' +#define ws4 '4' +#define ws5 '5' +#define ws6 '6' +#define ws7 '7' +#define ws8 '8' +#define ws9 '9' + +#define wsSpace ' ' +#define wsMinus '-' +#define wsPlus '+' +#define wsMul '*' +#define wsDiv '/' +#define wsLess '<' +#define wsMore '>' + +#define wsUp 0x52 + 256 +#define wsDown 0x54 + 256 +#define wsLeft 0x51 + 256 +#define wsRight 0x53 + 256 +#define wsLeftCtrl 0xe3 + 256 +#define wsRightCtrl 0xe4 + 256 +#define wsLeftAlt 0xe9 + 256 +#define wsRightAlt 0x7e + 256 +#define wsLeftShift 0xe1 + 256 +#define wsRightShift 0xe2 + 256 +#define wsEnter 0x0d + 256 +#define wsBackSpace 0x08 + 256 +#define wsCapsLock 0xe5 + 256 +#define wsTab 0x09 + 256 +#define wsF1 0xbe + 256 +#define wsF2 0xbf + 256 +#define wsF3 0xc0 + 256 +#define wsF4 0xc1 + 256 +#define wsF5 0xc2 + 256 +#define wsF6 0xc3 + 256 +#define wsF7 0xc4 + 256 +#define wsF8 0xc5 + 256 +#define wsF9 0xc6 + 256 +#define wsF10 0xc7 + 256 +#define wsF11 0xc8 + 256 +#define wsF12 0xc9 + 256 +#define wsInsert 0x63 + 256 +#define wsDelete 0xff + 256 +#define wsHome 0x50 + 256 +#define wsEnd 0x57 + 256 +#define wsPageUp 0x55 + 256 +#define wsPageDown 0x56 + 256 +#define wsNumLock 0x7f + 256 +#define wsEscape 0x1b + 256 +#define wsGrayEnter 0x8d + 256 +#define wsGrayPlus 0xab + 256 +#define wsGrayMinus 0xad + 256 +#define wsGrayMul 0xaa + 256 +#define wsGrayDiv 0xaf + 256 + +#define wsGrayInsert 0xb0 + 256 +#define wsGrayDelete 0xae + 256 +#define wsGrayEnd 0xb1 + 256 +#define wsGrayDown 0xb2 + 256 +#define wsGrayPageDown 0xb3 + 256 +#define wsGrayLeft 0xb4 + 256 +#define wsGray5 0xb5 + 256 +#define wsGrayRight 0xb6 + 256 +#define wsGrayHome 0xb7 + 256 +#define wsGrayUp 0xb8 + 256 +#define wsGrayPageUp 0xb9 + 256 + +//Keys for multimedia keyboard + +#define wsXF86LowerVolume 0x11 + 256 +#define wsXF86RaiseVolume 0x13 + 256 +#define wsXF86Mute 0x12 + 256 +#define wsXF86Play 0x14 + 256 +#define wsXF86Stop 0x15 + 256 +#define wsXF86Prev 0x16 + 256 +#define wsXF86Next 0x17 + 256 +#define wsXF86Media 0x32 + 256 + +#define wsXFMMPrev 0x98 +#define wsXFMMStop 0xb1 +#define wsXFMMPlay 0x95 +#define wsXFMMNext 0x93 +#define wsXFMMVolUp 0xad +#define wsXFMMVolDown 0xa6 +#define wsXFMMMute 0x99 + +#define wsKeyNumber 130 + +typedef struct +{ + int code; + const char * name; +} TwsKeyNames; + +extern TwsKeyNames wsKeyNames[ wsKeyNumber ]; + +#endif + diff --git a/gui/wm/wsmkeys.h b/gui/wm/wsmkeys.h new file mode 100644 index 0000000000..6fadb18428 --- /dev/null +++ b/gui/wm/wsmkeys.h @@ -0,0 +1,64 @@ + +#include "wskeys.h" + +TwsKeyNames wsKeyNames[ wsKeyNumber ] = + { + { wsq, "q" }, { wsa, "a" }, { wsz, "z" }, { wsw, "w" }, { wss, "s" }, { wsx, "x" }, + { wse, "e" }, { wsd, "d" }, { wsr, "r" }, { wsf, "f" }, { wsv, "v" }, { wst, "t" }, + { wsg, "g" }, { wsb, "b" }, { wsy, "y" }, { wsh, "h" }, { wsn, "n" }, { wsu, "u" }, + { wsj, "j" }, { wsm, "m" }, { wsi, "i" }, { wsk, "k" }, { wso, "o" }, { wsl, "l" }, + { wsp, "p" }, { wsc, "c" }, + + { wsQ, "Q" }, { wsA, "A" }, { wsZ, "Z" }, { wsW, "W" }, { wsS, "S" }, { wsX, "X" }, + { wsE, "E" }, { wsD, "D" }, { wsR, "R" }, { wsF, "F" }, { wsV, "V" }, { wsT, "T" }, + { wsG, "G" }, { wsB, "B" }, { wsY, "Y" }, { wsH, "H" }, { wsN, "N" }, { wsU, "U" }, + { wsJ, "J" }, { wsM, "M" }, { wsI, "I" }, { wsK, "K" }, { wsO, "O" }, { wsL, "L" }, + { wsP, "P" }, { wsC, "C" }, + + { wsUp, "Up" }, { wsDown, "Down" }, { wsLeft, "Left" }, + { wsRight, "Right" }, { wsPageUp, "PageUp" }, { wsPageDown, "PageDown" }, + + { wsLeftCtrl, "LeftCtrl" }, { wsRightCtrl, "RightCtrl" }, { wsLeftAlt, "LeftAlt" }, + { wsRightAlt, "RightAlt" }, { wsLeftShift, "LeftShift" }, { wsRightShift, "RightShift" }, + + + { wsBackSpace, "BackSpace" }, + { wsCapsLock, "CapsLock" }, + { wsNumLock, "NumLock" }, + + { wsF1, "F1" }, { wsF2, "F2" }, { wsF3, "F3" }, { wsF4, "F4" }, { wsF5, "F5" }, + { wsF6, "F6" }, { wsF7, "F7" }, { wsF8, "F8" }, { wsF9, "F9" }, { wsF10, "F10" }, + { wsF11, "F11" }, { wsF12, "F12" }, + + { wsEnter, "Enter" }, { wsTab, "Tab" }, { wsSpace, "Space" }, + { wsInsert, "Insert" }, { wsDelete, "Delete" }, { wsHome, "Home" }, + { wsEnd, "End" }, { wsEscape, "Escape" }, + + { wsosbrackets, "[" }, { wscsbrackets, "]" }, + { wsMore, "<" }, { wsLess, ">" }, + { wsMinus, "-" }, { wsPlus, "+" }, + { wsMul, "*" }, { wsDiv, "/" }, + + { ws0, "0" }, { ws1, "1" }, { ws2, "2" }, { ws3, "3" }, { ws4, "4" }, + { ws5, "5" }, { ws6, "6" }, { ws7, "7" }, { ws8, "8" }, { ws9, "9" }, + + { wsGrayEnter, "GrayEnter" }, { wsGrayPlus, "GrayPlus" }, + { wsGrayMinus, "GrayMinus" }, { wsGrayMul, "GrayMul" }, + { wsGrayDiv, "GrayDiv" }, { wsGrayInsert, "GrayInsert" }, + { wsGrayDelete, "GrayDelete" }, { wsGrayEnd, "GrayEnd" }, + { wsGrayDown, "GrayDown" }, { wsGrayPageDown, "GrayPageDown" }, + { wsGrayLeft, "GrayLeft" }, { wsGray5, "Gray5" }, + { wsGrayRight, "GrayRight" }, { wsGrayHome, "GrayHome" }, + { wsGrayUp, "GrayUp" }, { wsGrayPageUp, "GrayPageUp" }, + + { wsXF86LowerVolume, "XF86LowerVolume" }, + { wsXF86RaiseVolume, "XF86RaiseVolume" }, + { wsXF86Mute, "XF86Mute" }, + { wsXF86Play, "XF86Play" }, + { wsXF86Stop, "XF86Stop" }, + { wsXF86Prev, "XF86Prev" }, + { wsXF86Next, "XF86Next" }, + { wsXF86Media, "XF86Media" }, + + { wsKeyNone, "None" } + }; diff --git a/gui/wm/wsxdnd.c b/gui/wm/wsxdnd.c new file mode 100644 index 0000000000..5fa1c91744 --- /dev/null +++ b/gui/wm/wsxdnd.c @@ -0,0 +1,242 @@ +/* Took WindowMaker implementation and adopted for MPlayer */ + + +#include <X11/Xlib.h> +#include "ws.h" +#include "wsxdnd.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include <X11/Xatom.h> + +#include "../mp_msg.h" +#include "../help_mp.h" + +#define XDND_VERSION 3L + +Atom _XA_XdndAware; +Atom _XA_XdndEnter; +Atom _XA_XdndLeave; +Atom _XA_XdndDrop; +Atom _XA_XdndPosition; +Atom _XA_XdndStatus; +Atom _XA_XdndActionCopy; +Atom _XA_XdndSelection; +Atom _XA_XdndFinished; +Atom _XA_XdndTypeList; + +Atom atom_support; + +void wsXDNDInitialize(void) +{ + + _XA_XdndAware = XInternAtom(wsDisplay, "XdndAware", False); + _XA_XdndEnter = XInternAtom(wsDisplay, "XdndEnter", False); + _XA_XdndLeave = XInternAtom(wsDisplay, "XdndLeave", False); + _XA_XdndDrop = XInternAtom(wsDisplay, "XdndDrop", False); + _XA_XdndPosition = XInternAtom(wsDisplay, "XdndPosition", False); + _XA_XdndStatus = XInternAtom(wsDisplay, "XdndStatus", False); + _XA_XdndActionCopy = XInternAtom(wsDisplay, "XdndActionCopy", False); + _XA_XdndSelection = XInternAtom(wsDisplay, "XdndSelection", False); + _XA_XdndFinished = XInternAtom(wsDisplay, "XdndFinished", False); + _XA_XdndTypeList = XInternAtom(wsDisplay, "XdndTypeList", False); +} + +void wsXDNDMakeAwareness(wsTWindow* window) { + long int xdnd_version = XDND_VERSION; + XChangeProperty (wsDisplay, window->WindowID, _XA_XdndAware, XA_ATOM, + 32, PropModeAppend, (char *)&xdnd_version, 1); +} + +void wsXDNDClearAwareness(wsTWindow* window) { + XDeleteProperty (wsDisplay, window->WindowID, _XA_XdndAware); +} + +#define MAX_DND_FILES 64 +Bool +wsXDNDProcessSelection(wsTWindow* wnd, XEvent *event) +{ + Atom ret_type; + int ret_format; + unsigned long ret_items; + unsigned long remain_byte; + char * delme; + XEvent xevent; + + Window selowner = XGetSelectionOwner(wsDisplay,_XA_XdndSelection); + + XGetWindowProperty(wsDisplay, event->xselection.requestor, + event->xselection.property, + 0, 65536, True, atom_support, &ret_type, &ret_format, + &ret_items, &remain_byte, (unsigned char **)&delme); + + /*send finished*/ + memset (&xevent, 0, sizeof(xevent)); + xevent.xany.type = ClientMessage; + xevent.xany.display = wsDisplay; + xevent.xclient.window = selowner; + xevent.xclient.message_type = _XA_XdndFinished; + xevent.xclient.format = 32; + XDND_FINISHED_TARGET_WIN(&xevent) = wnd->WindowID; + XSendEvent(wsDisplay, selowner, 0, 0, &xevent); + + if (!delme){ + mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_WS_DDNothing ); + return False; + } + + { + /* Handle dropped files */ + char * retain = delme; + char * files[MAX_DND_FILES]; + int num = 0; + + while(retain < delme + ret_items) { + if (!strncmp(retain,"file:",5)) { + /* add more 2 chars while removing 5 is harmless */ + retain+=5; + } + + /* add the "retain" to the list */ + files[num++]=retain; + + + /* now check for special characters */ + { + int newone = 0; + while(retain < (delme + ret_items)){ + if(*retain == '\r' || *retain == '\n'){ + *retain=0; + newone = 1; + } else { + if (newone) + break; + } + retain++; + } + } + + if (num >= MAX_DND_FILES) + break; + } + + /* Handle the files */ + if(wnd->DandDHandler){ + wnd->DandDHandler(num,files); + } + } + + free(delme); + return True; +} + +Bool +wsXDNDProcessClientMessage(wsTWindow* wnd, XClientMessageEvent *event) +{ + /* test */ + /*{ + char * name = XGetAtomName(wsDisplay, event->message_type); + printf("Got %s\n",name); + XFree(name); + }*/ + + if (event->message_type == _XA_XdndEnter) { + Atom ok = XInternAtom(wsDisplay, "text/uri-list", False); + atom_support = None; + if ((event->data.l[1] & 1) == 0){ + int index; + for(index = 0; index <= 2 ; index++){ + if (event->data.l[2+index] == ok) { + atom_support = ok; + } + } + if (atom_support == None) { + mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_WS_NotAFile ); + } + } else { + /* need to check the whole list here */ + unsigned long ret_left = 1; + int offset = 0; + Atom* ret_buff; + Atom ret_type; + int ret_format; + unsigned long ret_items; + + /* while there is data left...*/ + while(ret_left && atom_support == None){ + XGetWindowProperty(wsDisplay,event->data.l[0],_XA_XdndTypeList, + offset,256,False,XA_ATOM,&ret_type, + &ret_format,&ret_items,&ret_left, + (unsigned char**)&ret_buff); + + /* sanity checks...*/ + if(ret_buff == NULL || ret_type != XA_ATOM || ret_format != 8*sizeof(Atom)){ + XFree(ret_buff); + break; + } + /* now chek what we've got */ + { + int i; + for(i=0; i<ret_items; i++){ + if(ret_buff[i] == ok){ + atom_support = ok; + break; + } + } + } + /* maybe next time ... */ + XFree(ret_buff); + offset += 256; + } + } + return True; + } + + if (event->message_type == _XA_XdndLeave) { + return True; + } + + if (event->message_type == _XA_XdndDrop) { + if (event->data.l[0] != XGetSelectionOwner(wsDisplay, _XA_XdndSelection)){ + puts("Wierd selection owner... QT?"); + } + if (atom_support != None) { + XConvertSelection(wsDisplay, _XA_XdndSelection, atom_support, + _XA_XdndSelection, event->window, + CurrentTime); + } + return True; + } + + if (event->message_type == _XA_XdndPosition) { + Window srcwin = event->data.l[0]; + if (atom_support == None){ + return True; + } + + /* send response */ + { + XEvent xevent; + memset (&xevent, 0, sizeof(xevent)); + xevent.xany.type = ClientMessage; + xevent.xany.display = wsDisplay; + xevent.xclient.window = srcwin; + xevent.xclient.message_type = _XA_XdndStatus; + xevent.xclient.format = 32; + + XDND_STATUS_TARGET_WIN (&xevent) = event->window; + XDND_STATUS_WILL_ACCEPT_SET (&xevent, True); + XDND_STATUS_WANT_POSITION_SET(&xevent, True); + /* actually need smth real here */ + XDND_STATUS_RECT_SET(&xevent, 0, 0, 1024,768); + XDND_STATUS_ACTION(&xevent) = _XA_XdndActionCopy; + + XSendEvent(wsDisplay, srcwin, 0, 0, &xevent); + } + return True; + } + + return False; +} diff --git a/gui/wm/wsxdnd.h b/gui/wm/wsxdnd.h new file mode 100644 index 0000000000..7fe3c3fd77 --- /dev/null +++ b/gui/wm/wsxdnd.h @@ -0,0 +1,53 @@ + +#ifndef _XDND_H_ +#define _XDND_H_ + + +void wsXDNDInitialize(void); +Bool wsXDNDProcessSelection(wsTWindow* wnd,XEvent *event); +Bool wsXDNDProcessClientMessage(wsTWindow* wnd, XClientMessageEvent *event); +void wsXDNDMakeAwareness(wsTWindow* window); +void wsXDNDClearAwareness(wsTWindow* window); + +/* header was ripped from xdnd's example on its page */ + +#define XDND_THREE 3 +#define XDND_ENTER_SOURCE_WIN(e) ((e)->xclient.data.l[0]) +#define XDND_ENTER_THREE_TYPES(e) (((e)->xclient.data.l[1] & 0x1UL) == 0) +#define XDND_ENTER_THREE_TYPES_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x1UL) | (((b) == 0) ? 0 : 0x1UL) +#define XDND_ENTER_VERSION(e) ((e)->xclient.data.l[1] >> 24) +#define XDND_ENTER_VERSION_SET(e,v) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~(0xFF << 24)) | ((v) << 24) +#define XDND_ENTER_TYPE(e,i) ((e)->xclient.data.l[2 + (i)]) /* i => (0, 1, 2) */ + +/* XdndPosition */ +#define XDND_POSITION_SOURCE_WIN(e) ((e)->xclient.data.l[0]) +#define XDND_POSITION_ROOT_X(e) ((e)->xclient.data.l[2] >> 16) +#define XDND_POSITION_ROOT_Y(e) ((e)->xclient.data.l[2] & 0xFFFFUL) +#define XDND_POSITION_ROOT_SET(e,x,y) (e)->xclient.data.l[2] = ((x) << 16) | ((y) & 0xFFFFUL) +#define XDND_POSITION_TIME(e) ((e)->xclient.data.l[3]) +#define XDND_POSITION_ACTION(e) ((e)->xclient.data.l[4]) + +/* XdndStatus */ +#define XDND_STATUS_TARGET_WIN(e) ((e)->xclient.data.l[0]) +#define XDND_STATUS_WILL_ACCEPT(e) ((e)->xclient.data.l[1] & 0x1L) +#define XDND_STATUS_WILL_ACCEPT_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x1UL) | (((b) == 0) ? 0 : 0x1UL) +#define XDND_STATUS_WANT_POSITION(e) ((e)->xclient.data.l[1] & 0x2UL) +#define XDND_STATUS_WANT_POSITION_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x2UL) | (((b) == 0) ? 0 : 0x2UL) +#define XDND_STATUS_RECT_X(e) ((e)->xclient.data.l[2] >> 16) +#define XDND_STATUS_RECT_Y(e) ((e)->xclient.data.l[2] & 0xFFFFL) +#define XDND_STATUS_RECT_WIDTH(e) ((e)->xclient.data.l[3] >> 16) +#define XDND_STATUS_RECT_HEIGHT(e) ((e)->xclient.data.l[3] & 0xFFFFL) +#define XDND_STATUS_RECT_SET(e,x,y,w,h) {(e)->xclient.data.l[2] = ((x) << 16) | ((y) & 0xFFFFUL); (e)->xclient.data.l[3] = ((w) << 16) | ((h) & 0xFFFFUL); } +#define XDND_STATUS_ACTION(e) ((e)->xclient.data.l[4]) + +/* XdndLeave */ +#define XDND_LEAVE_SOURCE_WIN(e) ((e)->xclient.data.l[0]) + +/* XdndDrop */ +#define XDND_DROP_SOURCE_WIN(e) ((e)->xclient.data.l[0]) +#define XDND_DROP_TIME(e) ((e)->xclient.data.l[2]) + +/* XdndFinished */ +#define XDND_FINISHED_TARGET_WIN(e) ((e)->xclient.data.l[0]) + +#endif |