aboutsummaryrefslogtreecommitdiffhomepage
path: root/Gui/mplayer
diff options
context:
space:
mode:
authorGravatar arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-25 21:04:29 +0000
committerGravatar arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-25 21:04:29 +0000
commit9f6529b3d3a1ec681a84735d57a9f2d8656809af (patch)
tree4943e4a95c68932a956ce7a693c58f5b2ed79b37 /Gui/mplayer
parent05f7ab93841eef7bf50c31b64bf723c100e0c123 (diff)
GUI version n-1
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1694 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/mplayer')
-rw-r--r--Gui/mplayer/Makefile45
-rw-r--r--Gui/mplayer/gtk/about.h146
-rw-r--r--Gui/mplayer/gtk/fs.h659
-rw-r--r--Gui/mplayer/gtk/mb.h160
-rw-r--r--Gui/mplayer/gtk/opts.h785
-rw-r--r--Gui/mplayer/gtk/pl.h305
-rw-r--r--Gui/mplayer/gtk/sb.h313
-rw-r--r--Gui/mplayer/menu.h139
-rw-r--r--Gui/mplayer/mixer.c39
-rw-r--r--Gui/mplayer/mixer.h12
-rw-r--r--Gui/mplayer/mplayer.c112
-rw-r--r--Gui/mplayer/mplayer.h19
-rw-r--r--Gui/mplayer/mw.h526
-rw-r--r--Gui/mplayer/pixmaps/cancel.xpm26
-rw-r--r--Gui/mplayer/pixmaps/dir.xpm43
-rw-r--r--Gui/mplayer/pixmaps/file.xpm23
-rw-r--r--Gui/mplayer/pixmaps/logo.xpm215
-rw-r--r--Gui/mplayer/pixmaps/ok.xpm26
-rw-r--r--Gui/mplayer/pixmaps/up.xpm52
-rw-r--r--Gui/mplayer/play.c138
-rw-r--r--Gui/mplayer/play.h80
-rw-r--r--Gui/mplayer/psignal.c292
-rw-r--r--Gui/mplayer/psignal.h61
-rw-r--r--Gui/mplayer/sw.h69
-rw-r--r--Gui/mplayer/widgets.c139
-rw-r--r--Gui/mplayer/widgets.h85
26 files changed, 4509 insertions, 0 deletions
diff --git a/Gui/mplayer/Makefile b/Gui/mplayer/Makefile
new file mode 100644
index 0000000000..e586a5cc26
--- /dev/null
+++ b/Gui/mplayer/Makefile
@@ -0,0 +1,45 @@
+
+include ../../config.mak
+include ../config.mak
+
+include ../bitmap/bitmap.mak
+include ../gui.mak
+
+LIB = mplayer
+
+INCDIR = -I. -I../event -I../wm -I../skin $(GTKINC)
+
+OPTIMIZE = $(OPTFLAGS) -fomit-frame-pointer \
+ -fexpensive-optimizations -malign-double -fschedule-insns2 -mwide-multiply -Wall
+
+CFLAGS = $(OPTIMIZE) $(INCDIR) $(DEBUG)
+
+.SUFFIXES: .c .o
+
+.c.o:
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+### TARGETS ###
+
+default: .depend $(MPLAYEROBJS)
+
+all: default
+
+clean:
+ rm -rf $(MPLAYEROBJS) *.o *~ *.bak .depend
+
+distclean: clean
+
+dep: depend
+
+depend: .depend
+
+.depend: Makefile ../config.mak ../config.h ../gui.mak ../bitmap/bitmap.mak
+ $(CC) -MM $(CFLAGS) $(MPLAYERSRCS) 1>.depend
+
+#
+# include dependency files if they exist
+#
+ifneq ($(wildcard .depend),)
+include .depend
+endif
diff --git a/Gui/mplayer/gtk/about.h b/Gui/mplayer/gtk/about.h
new file mode 100644
index 0000000000..f6b676e027
--- /dev/null
+++ b/Gui/mplayer/gtk/about.h
@@ -0,0 +1,146 @@
+
+#ifndef __WIDGET_ABOUT
+#define __WIDGET_ABOUT
+
+#include "../../language.h"
+
+GtkWidget * About;
+GdkColormap * abColorMap;
+
+void ab_Ok_released( GtkButton * button,gpointer user_data)
+{
+ gtk_widget_hide( AboutBox );
+ gtkVisibleAboutBox=0;
+}
+
+GtkWidget * create_About( void )
+{
+ GtkWidget * frame17;
+ GtkWidget * frame18;
+ GtkWidget * frame19;
+ GtkWidget * frame20;
+ GtkWidget * hbox7;
+ GtkWidget * pixmap1;
+ GtkWidget * vbox8;
+ GtkWidget * label4;
+ GtkWidget * hbuttonbox6;
+ GtkWidget * Ok;
+ GtkAccelGroup * accel_group;
+
+ GtkStyle * pixmapstyle;
+ GtkPixmap * pixmapwid;
+ GdkBitmap * mask;
+
+ accel_group=gtk_accel_group_new();
+
+ About=gtk_window_new( GTK_WINDOW_DIALOG );
+ gtk_widget_set_name( About,langAbout );
+ gtk_object_set_data( GTK_OBJECT( About ),langAbout,About );
+ gtk_widget_set_usize( About,290,105 );
+ GTK_WIDGET_SET_FLAGS( About,GTK_CAN_FOCUS );
+ GTK_WIDGET_SET_FLAGS( About,GTK_CAN_DEFAULT );
+ gtk_window_set_title( GTK_WINDOW( About ),langAbout );
+ gtk_window_set_position( GTK_WINDOW( About ),GTK_WIN_POS_CENTER );
+ gtk_window_set_modal( GTK_WINDOW( About ),TRUE );
+ gtk_window_set_policy( GTK_WINDOW( About ),FALSE,FALSE,FALSE );
+
+ frame17=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame17,"frame17" );
+ gtk_widget_ref( frame17 );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"frame17",frame17,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame17 );
+ gtk_container_add( GTK_CONTAINER( About ),frame17 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame17 ),GTK_SHADOW_IN );
+
+ frame18=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame18,"frame18" );
+ gtk_widget_ref( frame18 );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"frame18",frame18,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame18 );
+ gtk_container_add( GTK_CONTAINER( frame17 ),frame18 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame18 ),GTK_SHADOW_NONE );
+
+ frame19=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame19,"frame19" );
+ gtk_widget_ref( frame19 );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"frame19",frame19,( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame19 );
+ gtk_container_add( GTK_CONTAINER( frame18 ),frame19 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame19 ),GTK_SHADOW_ETCHED_OUT );
+
+ frame20=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame20,"frame20" );
+ gtk_widget_ref( frame20 );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"frame20",frame20,( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame20 );
+ gtk_container_add( GTK_CONTAINER( frame19 ),frame20 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame20 ),GTK_SHADOW_NONE );
+
+ hbox7=gtk_hbox_new( FALSE,0 );
+ gtk_widget_set_name( hbox7,"hbox7" );
+ gtk_widget_ref( hbox7 );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"hbox7",hbox7,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hbox7 );
+ gtk_container_add( GTK_CONTAINER( frame20 ),hbox7 );
+
+ 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],(gchar **)logo_xpm );pixmap1=gtk_pixmap_new( pixmapwid,mask );
+
+ gtk_widget_set_name( pixmap1,"pixmap1" );
+ gtk_widget_ref( pixmap1 );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"pixmap1",pixmap1,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( pixmap1 );
+ gtk_box_pack_start( GTK_BOX( hbox7 ),pixmap1,TRUE,TRUE,0 );
+
+ vbox8=gtk_vbox_new( FALSE,0 );
+ gtk_widget_set_name( vbox8,"vbox8" );
+ gtk_widget_ref( vbox8 );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"vbox8",vbox8,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( vbox8 );
+ gtk_box_pack_start( GTK_BOX( hbox7 ),vbox8,TRUE,TRUE,0 );
+
+ label4=gtk_label_new( "The Movie Player for Linux" );
+ gtk_widget_set_name( label4,"label4" );
+ gtk_widget_ref( label4 );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"label4",label4,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( label4 );
+ gtk_box_pack_start( GTK_BOX( vbox8 ),label4,FALSE,FALSE,0 );
+ gtk_widget_set_usize( label4,-2,50 );
+ gtk_label_set_line_wrap( GTK_LABEL( label4 ),TRUE );
+
+ hbuttonbox6=gtk_hbutton_box_new();
+ gtk_widget_set_name( hbuttonbox6,"hbuttonbox6" );
+ gtk_widget_ref( hbuttonbox6 );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"hbuttonbox6",hbuttonbox6,( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hbuttonbox6 );
+ gtk_box_pack_start( GTK_BOX( vbox8 ),hbuttonbox6,FALSE,FALSE,0 );
+ gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox6 ),0 );
+ gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox6 ),115,33 );
+
+ Ok=gtk_button_new_with_label( langOk );
+ gtk_widget_set_name( Ok,langOk );
+ gtk_widget_ref( Ok );
+ gtk_object_set_data_full( GTK_OBJECT( About ),langOk,Ok,( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( Ok );
+ gtk_container_add( GTK_CONTAINER( hbuttonbox6 ),Ok );
+ gtk_widget_set_usize( Ok,49,32 );
+ GTK_WIDGET_SET_FLAGS( Ok,GTK_CAN_DEFAULT );
+ gtk_widget_add_accelerator (Ok, "released",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE);
+
+// gtk_signal_connect( GTK_OBJECT( About ),"destroy",GTK_SIGNAL_FUNC( on_About_destroy ),NULL );
+ gtk_signal_connect( GTK_OBJECT( About ),"destroy",GTK_SIGNAL_FUNC( ab_Ok_released ),NULL );
+ gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( ab_Ok_released ),NULL);
+
+ gtk_window_add_accel_group( GTK_WINDOW( About ),accel_group );
+
+ gtk_widget_grab_focus( Ok );
+ return About;
+}
+
+#endif \ No newline at end of file
diff --git a/Gui/mplayer/gtk/fs.h b/Gui/mplayer/gtk/fs.h
new file mode 100644
index 0000000000..52bdd0beb5
--- /dev/null
+++ b/Gui/mplayer/gtk/fs.h
@@ -0,0 +1,659 @@
+
+#ifndef __MY_fsFileSelector
+#define __MY_fsFileSelector
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <glob.h>
+#include <unistd.h>
+
+#include "../../language.h"
+
+#ifndef get_current_dir_name
+ extern char * get_current_dir_name( void );
+#endif
+
+gchar * fsSelectedFile = NULL;
+gchar * fsSelectedDirectory = NULL;
+unsigned char * fsThatDir = ".";
+gchar * fsFilter = NULL;
+
+int fsPressed = 0;
+int fsLastFilterNames = 2;
+unsigned char * fsFilterNames[3][2] = { { "MPEG files( *.mpg )", "*.mpg" },
+ { "AVI files( *.avi )", "*.avi" },
+ { "All files( *)", "*" } };
+
+GtkWidget * fsFileNamesList;
+GtkWidget * fsFNameList;
+GtkWidget * fsFileSelect;
+GdkColormap * fsColorMap;
+GtkWidget * fsOk;
+GtkWidget * fsUp;
+GtkWidget * fsCancel;
+GtkWidget * fsCombo4;
+GtkWidget * fsComboEntry2;
+GList * fsList_items = NULL;
+GList * fsTopList_items = NULL;
+
+GtkWidget * fsItemList[6];
+int fsItemListCounter = 0;
+
+void CheckDir( GtkWidget * list,unsigned char * directory )
+{
+ struct stat fs;
+ int i,c=2;
+ gchar * str[1][2];
+ GdkPixmap * dpixmap,*fpixmap,*pixmap;
+ GdkBitmap * dmask,*fmask,*mask;
+ GtkStyle * style;
+ glob_t gg;
+
+ gtk_widget_hide( list );
+ str[0][0]=NULL;
+ 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 );
+ pixmap=dpixmap; mask=dmask;
+ str[0][0]=NULL; str[0][1]=(gchar *)malloc( 3 );
+ strcpy( str[0][1],"." );
+ gtk_clist_append( GTK_CLIST( list ),str[0] ); gtk_clist_set_pixmap( GTK_CLIST( list ),0,0,pixmap,mask );
+ strcpy( str[0][1],".." );
+ gtk_clist_append( GTK_CLIST( list ),str[0] ); gtk_clist_set_pixmap( GTK_CLIST( list ),1,0,pixmap,mask );
+ free( str[0][0] );
+
+ glob( "*",GLOB_NOSORT,NULL,&gg );
+// glob( ".*",GLOB_NOSORT | GLOB_APPEND,NULL,&gg );
+ for( i=0;i<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 ) )
+ {
+ str[0][1]=(gchar *)malloc( strlen( gg.gl_pathv[i] ) + 2 );
+ strcpy( str[0][1],"" );
+ strcat( 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 );
+ free( str[0][1] );
+ c++;
+ }
+ }
+ globfree( &gg );
+ glob( fsFilter,GLOB_NOSORT,NULL,&gg );
+// glob( ".*",GLOB_NOSORT | GLOB_APPEND,NULL,&gg );
+ pixmap=fpixmap; mask=fmask;
+ for( i=0;i<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 ) ) continue;
+ str[0][1]=(gchar *)malloc( strlen( gg.gl_pathv[i] ) + 2 );
+ strcpy( str[0][1],"" ); strcat( 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 );
+ free( str[0][1] );
+ c++;
+ }
+ globfree( &gg );
+
+ gtk_clist_set_sort_type( GTK_CLIST( list ),GTK_SORT_ASCENDING );
+ gtk_clist_set_compare_func( GTK_CLIST( list ),NULL );
+ gtk_clist_set_sort_column( GTK_CLIST( list ),1 );
+ gtk_clist_sort( GTK_CLIST( list ) );
+ gtk_clist_set_column_width( GTK_CLIST( list ),0,17 );
+ gtk_clist_select_row( GTK_CLIST( list ),0,1 );
+ gtk_widget_show( list );
+}
+
+void HideFileSelect( void )
+{
+ gtk_widget_hide( fsFileSelect );
+ gtkVisibleFileSelect=0;
+ gtkShMem->vs.window=evLoad;
+ gtkSendMessage( evHideWindow );
+}
+
+void fs_fsFileSelect_destroy( GtkObject * object,gpointer user_data )
+{ HideFileSelect(); }
+
+void fs_combo_entry1_activate( GtkEditable * editable,gpointer user_data )
+{
+ unsigned char * str;
+
+ str=gtk_entry_get_text( GTK_ENTRY(user_data ) );
+ gtk_clist_clear( GTK_CLIST( fsFNameList ) );
+ if( fsFilter ) free( fsFilter );
+ if( ( fsFilter=(unsigned char *)malloc( strlen( str ) + 1 ) ) == NULL )
+ {
+ dbprintf( 0,"[gtk] not enough memory.\n" );
+ exit( 0 );
+ }
+ strcpy( fsFilter,str );
+ CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
+}
+
+void fs_combo_entry1_changed( GtkEditable * editable,gpointer user_data )
+{
+ unsigned char * str;
+ int i;
+
+ str=gtk_entry_get_text( GTK_ENTRY(user_data ) );
+
+ for( i=0;i<fsLastFilterNames+1;i++ )
+ {
+ if( !strcmp( str,fsFilterNames[i][0] ) )
+ {
+ if( fsFilter ) free( fsFilter );
+ if( ( fsFilter=(unsigned char *)malloc( 6 ) ) == NULL )
+ {
+ dbprintf( 0,"[gtk] not enough memory.\n" );
+ exit( 0 );
+ }
+ strcpy( fsFilter,fsFilterNames[i][1] );
+ }
+ }
+ gtk_clist_clear( GTK_CLIST( fsFNameList ) );
+ CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
+}
+
+void fs_fsComboEntry2_activate( GtkEditable * editable,gpointer user_data )
+{
+ unsigned char * str;
+
+ str=gtk_entry_get_text( GTK_ENTRY( user_data ) );
+ if ( chdir( str ) != -1 )
+ {
+ gtk_clist_clear( GTK_CLIST( fsFNameList ) );
+ CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
+ }
+}
+
+void fs_fsComboEntry2_changed( GtkEditable * editable,gpointer user_data )
+{
+ unsigned char * str;
+
+ str=gtk_entry_get_text( GTK_ENTRY( user_data ) );
+ fsPressed=2;
+// if (
+// tmp=(unsigned char *)malloc( strlen( fsSelectedDirectory ) + 5 );
+// strcpy( tmp,fsSelectedDirectory ); strcat( tmp,"/*" );
+// fprintf( stderr,"str: %s\n",tmp );
+// free( tmp );
+ if ( chdir( str ) != -1 )
+ {
+ gtk_clist_clear( GTK_CLIST( fsFNameList ) );
+ CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
+ }
+}
+
+void fs_Up_released( GtkButton * button,gpointer user_data )
+{
+ chdir( ".." );
+ fsSelectedFile=fsThatDir;
+ gtk_clist_clear( GTK_CLIST( user_data ) );
+ CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
+ gtk_entry_set_text( GTK_ENTRY( fsComboEntry2 ),(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;
+ if( fsFNameList != NULL ) gtk_clist_clear( GTK_CLIST( fsFNameList ) );
+ CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
+ gtk_entry_set_text( GTK_ENTRY( fsComboEntry2 ),(unsigned char *)get_current_dir_name() );
+ return;
+ }
+
+ HideFileSelect();
+
+ switch( fsPressed )
+ {
+ case 1:
+ fsSelectedDirectory=(unsigned char *)get_current_dir_name();
+ #ifdef DEBUG
+ dbprintf( 1,"[gtk-fs] fsSelectedFile: %s\n",fsSelectedFile );
+ #endif
+ break;
+ case 2:
+ str=gtk_entry_get_text( GTK_ENTRY( fsComboEntry2 ) );
+ fsSelectedFile=str;
+ #ifdef DEBUG
+ dbprintf( 1,"[gtk-fs] fsSelectedFile: %s\n",fsSelectedFile );
+ #endif
+ if ( !fsFileExist( fsSelectedFile ) ) 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;
+ }
+ strcpy( gtkShMem->fs.dir,fsSelectedDirectory );
+ strcpy( gtkShMem->fs.filename,fsSelectedFile );
+ 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() );
+ gtk_combo_set_popdown_strings( GTK_COMBO( user_data ),fsTopList_items );
+ }
+ gtkSendMessage( evFileLoaded );
+}
+
+void fs_Cancel_released( GtkButton * button,gpointer user_data )
+{ HideFileSelect(); }
+
+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 ); fsSelectedFile++;
+ fsPressed=1;
+ if( !bevent ) return;
+ if( bevent->type == GDK_2BUTTON_PRESS ) gtk_button_released( GTK_BUTTON( fsOk ) );
+}
+
+int fsShift = False;
+
+gboolean on_FileSelect_key_release_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
+{
+ switch ( event->keyval )
+ {
+ case GDK_Escape:
+ if ( !fsShift ) gtk_button_released( GTK_BUTTON( fsCancel ) );
+ break;
+ case GDK_Return:
+ if ( !fsShift ) gtk_button_released( GTK_BUTTON( fsOk ) );
+ break;
+ case GDK_BackSpace:
+ if ( !fsShift ) gtk_button_released( GTK_BUTTON( fsUp ) );
+ break;
+ case GDK_Tab:
+ if ( fsShift )
+ {
+ fsItemListCounter--;
+ if ( fsItemListCounter < 0 ) fsItemListCounter=5;
+ }
+ else
+ {
+ fsItemListCounter++;
+ if ( fsItemListCounter > 5 ) fsItemListCounter=0;
+ }
+ gtk_widget_grab_focus( fsItemList[fsItemListCounter] );
+ break;
+ case GDK_Shift_L:
+ case GDK_Shift_R:
+ fsShift=False;
+ break;
+ }
+ return FALSE;
+}
+
+gboolean on_FileSelect_key_press_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
+{
+ switch ( event->keyval )
+ {
+ case GDK_Shift_L:
+ case GDK_Shift_R:
+ fsShift=True;
+ break;
+ }
+ return FALSE;
+}
+
+GtkWidget * create_FileSelect( void )
+{
+ GtkWidget * FSFrame;
+ GtkWidget * frame2;
+ GtkWidget * frame3;
+ GtkWidget * frame4;
+ GtkWidget * vbox4;
+ GtkWidget * hbox4;
+ GtkWidget * vseparator1;
+ GtkWidget * hseparator1;
+ GtkWidget * hbox6;
+ GtkWidget * fsFNameListWindow;
+ GtkWidget * label1;
+ GtkWidget * hseparator2;
+ GtkWidget * List;
+ GtkWidget * combo_entry1;
+ GtkWidget * hseparator3;
+ GtkWidget * hbuttonbox3;
+ int i;
+
+// GtkWidget * okpixmapwid,*uppixmapwid,*cancelpixmapwid;
+// GdkPixmap * okpixmap,*uppixmap,*cancelpixmap;
+// GdkBitmap * okmask,*upmask,*cancelmask;
+// GtkStyle * okstyle,*upstyle,*cancelstyle;
+
+ GtkWidget * uppixmapwid;
+ GdkPixmap * uppixmap;
+ GdkBitmap * upmask;
+ GtkStyle * upstyle;
+
+ if( ( fsFilter=(unsigned char *)malloc( 3 ) ) == NULL )
+ {
+ dbprintf( 0,"[gtk] not enough memory.\n" );
+ exit( 0 );
+ }
+ strcpy( fsFilter,"*" );
+
+ fsFileSelect=gtk_window_new( GTK_WINDOW_DIALOG );
+ gtk_widget_set_name( fsFileSelect,"fsFileSelect" );
+ gtk_object_set_data( GTK_OBJECT( fsFileSelect ),"fsFileSelect",fsFileSelect );
+ gtk_widget_set_usize( fsFileSelect,416,256 );
+ GTK_WIDGET_SET_FLAGS( fsFileSelect,GTK_CAN_FOCUS );
+ 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 ),langFileSelect );
+ gtk_window_set_position( GTK_WINDOW( fsFileSelect ),GTK_WIN_POS_CENTER );
+ gtk_window_set_policy( GTK_WINDOW( fsFileSelect ),FALSE,FALSE,TRUE );
+ fsColorMap=gdk_colormap_get_system();
+
+ FSFrame=gtk_frame_new( NULL );
+ gtk_widget_set_name( FSFrame,"FSFrame" );
+ gtk_widget_ref( FSFrame );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"FSFrame",FSFrame,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( FSFrame );
+ gtk_container_add( GTK_CONTAINER( fsFileSelect ),FSFrame );
+ gtk_container_set_border_width( GTK_CONTAINER( FSFrame ),1 );
+ gtk_frame_set_shadow_type( GTK_FRAME( FSFrame ),GTK_SHADOW_IN );
+
+ frame2=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame2,"frame2" );
+ gtk_widget_ref( frame2 );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"frame2",frame2,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame2 );
+ gtk_container_add( GTK_CONTAINER( FSFrame ),frame2 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame2 ),GTK_SHADOW_NONE );
+
+ frame3=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame3,"frame3" );
+ gtk_widget_ref( frame3 );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"frame3",frame3,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame3 );
+ gtk_container_add( GTK_CONTAINER( frame2 ),frame3 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame3 ),GTK_SHADOW_ETCHED_OUT );
+
+ frame4=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame4,"frame4" );
+ gtk_widget_ref( frame4 );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"frame4",frame4,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame4 );
+ gtk_container_add( GTK_CONTAINER( frame3 ),frame4 );
+ gtk_container_set_border_width( GTK_CONTAINER( frame4 ),1 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame4 ),GTK_SHADOW_NONE );
+
+ vbox4=gtk_vbox_new( FALSE,0 );
+ gtk_widget_set_name( vbox4,"vbox4" );
+ gtk_widget_ref( vbox4 );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"vbox4",vbox4,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( vbox4 );
+ gtk_container_add( GTK_CONTAINER( frame4 ),vbox4 );
+
+ hbox4=gtk_hbox_new( FALSE,0 );
+ gtk_widget_set_name( hbox4,"hbox4" );
+ gtk_widget_ref( hbox4 );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hbox4",hbox4,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hbox4 );
+ gtk_box_pack_start( GTK_BOX( vbox4 ),hbox4,TRUE,TRUE,0 );
+
+ fsCombo4=gtk_combo_new();
+ gtk_widget_set_name( fsCombo4,"fsCombo4" );
+ gtk_widget_ref( fsCombo4 );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsCombo4",fsCombo4,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( fsCombo4 );
+ gtk_box_pack_start( GTK_BOX( hbox4 ),fsCombo4,TRUE,TRUE,0 );
+ gtk_widget_set_usize( fsCombo4,-2,20 );
+
+ 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 );
+
+ fsComboEntry2=GTK_COMBO( fsCombo4 )->entry;
+ gtk_widget_set_name( fsComboEntry2,"fsComboEntry2" );
+ gtk_widget_ref( fsComboEntry2 );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsComboEntry2",fsComboEntry2,( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( fsComboEntry2 );
+ gtk_widget_set_usize( fsComboEntry2,-2,20 );
+
+ vseparator1=gtk_vseparator_new();
+ gtk_widget_set_name( vseparator1,"vseparator1" );
+ gtk_widget_ref( vseparator1 );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"vseparator1",vseparator1,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ 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 );
+
+ hseparator1=gtk_hseparator_new();
+ gtk_widget_set_name( hseparator1,"hseparator1" );
+ gtk_widget_ref( hseparator1 );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hseparator1",hseparator1,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hseparator1 );
+ gtk_box_pack_start( GTK_BOX( vbox4 ),hseparator1,FALSE,TRUE,0 );
+ gtk_widget_set_usize( hseparator1,-2,8 );
+
+ hbox6=gtk_hbox_new( FALSE,0 );
+ gtk_widget_set_name( hbox6,"hbox6" );
+ gtk_widget_ref( hbox6 );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hbox6",hbox6,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hbox6 );
+ 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_ref( fsFNameListWindow );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsFNameListWindow",fsFNameListWindow,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ 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_widget_ref( fsFNameList );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsFNameList",fsFNameList,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ 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 );
+ CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
+
+ label1=gtk_label_new( "label1" );
+ gtk_widget_set_name( label1,"label1" );
+ gtk_widget_ref( label1 );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"label1",label1,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( label1 );
+ gtk_clist_set_column_widget( GTK_CLIST( fsFNameList ),0,label1 );
+
+ hseparator2=gtk_hseparator_new();
+ gtk_widget_set_name( hseparator2,"hseparator2" );
+ gtk_widget_ref( hseparator2 );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hseparator2",hseparator2,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hseparator2 );
+ gtk_box_pack_start( GTK_BOX( vbox4 ),hseparator2,FALSE,TRUE,0 );
+ gtk_widget_set_usize( hseparator2,-2,9 );
+
+ 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 );
+ fsList_items=NULL;
+ for( i=0;i<fsLastFilterNames + 1;i++ )
+ fsList_items=g_list_append( fsList_items,fsFilterNames[i][0] );
+ gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items );
+ g_list_free( fsList_items );
+
+ combo_entry1=GTK_COMBO( List )->entry;
+ gtk_widget_set_name( combo_entry1,"combo_entry1" );
+ gtk_widget_ref( combo_entry1 );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"combo_entry1",combo_entry1,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( combo_entry1 );
+ gtk_entry_set_text( GTK_ENTRY( combo_entry1 ),fsFilterNames[fsLastFilterNames][0] );
+
+ hseparator3=gtk_hseparator_new();
+ gtk_widget_set_name( hseparator3,"hseparator3" );
+ gtk_widget_ref( hseparator3 );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hseparator3",hseparator3,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hseparator3 );
+ gtk_box_pack_start( GTK_BOX( vbox4 ),hseparator3,FALSE,TRUE,0 );
+ gtk_widget_set_usize( hseparator3,-2,7 );
+
+ hbuttonbox3=gtk_hbutton_box_new();
+ gtk_widget_set_name( hbuttonbox3,"hbuttonbox3" );
+ gtk_widget_ref( hbuttonbox3 );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hbuttonbox3",hbuttonbox3,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hbuttonbox3 );
+ gtk_box_pack_start( GTK_BOX( vbox4 ),hbuttonbox3,FALSE,TRUE,0 );
+ gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox3 ),GTK_BUTTONBOX_END );
+ gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox3 ),10 );
+ gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox3 ),85,20 );
+ gtk_button_box_set_child_ipadding( GTK_BUTTON_BOX( hbuttonbox3 ),0,0 );
+
+// okstyle=gtk_widget_get_style( fsFileSelect );
+// okpixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&okmask,&okstyle->bg[GTK_STATE_NORMAL],(gchar **)ok_xpm );
+// okpixmapwid=gtk_pixmap_new( okpixmap,okmask );
+// gtk_widget_show( okpixmapwid );
+// fsOk=gtk_button_new();
+// gtk_container_add( GTK_CONTAINER(fsOk ),okpixmapwid );
+// gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),fsOk );
+// gtk_widget_show( fsOk );
+
+ fsOk=gtk_button_new_with_label( langOk );
+ gtk_widget_set_name( fsOk,langOk );
+ gtk_widget_ref( fsOk );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),langOk,fsOk,( GtkDestroyNotify )gtk_widget_unref );
+ gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),fsOk );
+ gtk_widget_show( fsOk );
+
+// cancelstyle=gtk_widget_get_style( fsFileSelect );
+// cancelpixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&cancelmask,&cancelstyle->bg[GTK_STATE_NORMAL],(gchar **)cancel_xpm );
+// cancelpixmapwid=gtk_pixmap_new( cancelpixmap,cancelmask );
+// gtk_widget_show( cancelpixmapwid );
+// fsCancel=gtk_button_new();
+// gtk_widget_show( fsCancel );
+// gtk_container_add( GTK_CONTAINER( fsCancel ),cancelpixmapwid );
+// gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),fsCancel );
+// gtk_widget_show( fsCancel );
+
+ fsCancel=gtk_button_new_with_label( langCancel );
+ gtk_widget_set_name( fsCancel,langCancel );
+ gtk_widget_ref( fsCancel );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),langCancel,fsCancel,( GtkDestroyNotify )gtk_widget_unref );
+ gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),fsCancel );
+ gtk_widget_show( fsCancel );
+
+ gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"destroy",
+ GTK_SIGNAL_FUNC( fs_fsFileSelect_destroy ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"key_release_event",
+ GTK_SIGNAL_FUNC( on_FileSelect_key_release_event ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"key_press_event",
+ GTK_SIGNAL_FUNC( on_FileSelect_key_press_event ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( combo_entry1 ),"changed",
+ GTK_SIGNAL_FUNC( fs_combo_entry1_changed ),
+ combo_entry1 );
+ gtk_signal_connect( GTK_OBJECT( combo_entry1 ),"activate",
+ GTK_SIGNAL_FUNC( fs_combo_entry1_activate ),
+ combo_entry1 );
+ gtk_signal_connect( GTK_OBJECT( fsComboEntry2 ),"changed",
+ GTK_SIGNAL_FUNC( fs_fsComboEntry2_changed ),
+ fsComboEntry2 );
+ gtk_signal_connect( GTK_OBJECT( fsComboEntry2 ),"activate",
+ GTK_SIGNAL_FUNC( fs_fsComboEntry2_activate ),
+ fsComboEntry2 );
+ 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 );
+
+ fsItemList[0]=fsFNameList;
+ fsItemList[1]=combo_entry1;
+ fsItemList[2]=fsOk;
+ fsItemList[3]=fsCancel;
+ fsItemList[4]=fsUp;
+ fsItemList[5]=fsComboEntry2;
+
+ return fsFileSelect;
+}
+
+#endif \ No newline at end of file
diff --git a/Gui/mplayer/gtk/mb.h b/Gui/mplayer/gtk/mb.h
new file mode 100644
index 0000000000..baebdf2ed7
--- /dev/null
+++ b/Gui/mplayer/gtk/mb.h
@@ -0,0 +1,160 @@
+
+#ifndef __MY_MESSAGEBOX
+#define __MY_MESSAGEBOX
+
+#include "../../language.h"
+
+GtkWidget * gtkMessageBoxText;
+
+void on_MessageBox_destroy( GtkObject * object,gpointer user_data )
+{
+ gtk_widget_hide( MessageBox );
+ gtkVisibleMessageBox=0;
+}
+
+void on_Ok_released( GtkButton * button,gpointer user_data )
+{
+ gtk_widget_hide( MessageBox );
+ gtkVisibleMessageBox=0;
+ gtkSendMessage( evMessageBox );
+}
+
+GtkWidget * create_MessageBox( void )
+{
+ GtkWidget *MessageBox;
+ GtkWidget *frame1;
+ GtkWidget *frame2;
+ GtkWidget *frame3;
+ GtkWidget *frame4;
+ GtkWidget *vbox1;
+ GtkWidget *vbox2;
+ GtkWidget *hseparator1;
+ GtkWidget *hbuttonbox1;
+ GtkWidget *Ok;
+ GtkAccelGroup *accel_group;
+
+ accel_group=gtk_accel_group_new();
+
+ MessageBox=gtk_window_new( GTK_WINDOW_DIALOG );
+ gtk_widget_set_name( MessageBox,langMessageBox );
+ gtk_object_set_data( GTK_OBJECT( MessageBox ),langMessageBox,MessageBox );
+ gtk_widget_set_usize( MessageBox,420,128 );
+ GTK_WIDGET_SET_FLAGS( MessageBox,GTK_CAN_FOCUS );
+ GTK_WIDGET_SET_FLAGS( MessageBox,GTK_CAN_DEFAULT );
+ gtk_widget_set_events( MessageBox,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 );
+ gtk_window_set_title( GTK_WINDOW( MessageBox ),langMessageBox );
+ 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 ),FALSE,FALSE,FALSE );
+ gtk_window_set_wmclass( GTK_WINDOW( MessageBox ),langMessageBox,langMessageBox );
+
+ frame1=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame1,"frame1" );
+ gtk_widget_ref( frame1 );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame1",frame1,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame1 );
+ gtk_container_add( GTK_CONTAINER( MessageBox ),frame1 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame1 ),GTK_SHADOW_IN );
+
+ frame2=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame2,"frame2" );
+ gtk_widget_ref( frame2 );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame2",frame2,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame2 );
+ gtk_container_add( GTK_CONTAINER( frame1 ),frame2 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame2 ),GTK_SHADOW_NONE );
+
+ frame3=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame3,"frame3" );
+ gtk_widget_ref( frame3 );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame3",frame3,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame3 );
+ gtk_container_add( GTK_CONTAINER( frame2 ),frame3 );
+
+ frame4=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame4,"frame4" );
+ gtk_widget_ref( frame4 );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame4",frame4,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame4 );
+ gtk_container_add( GTK_CONTAINER( frame3 ),frame4 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame4 ),GTK_SHADOW_NONE );
+
+ vbox1=gtk_vbox_new( FALSE,0 );
+ gtk_widget_set_name( vbox1,"vbox1" );
+ gtk_widget_ref( vbox1 );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"vbox1",vbox1,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( vbox1 );
+ gtk_container_add( GTK_CONTAINER( frame4 ),vbox1 );
+
+ vbox2=gtk_vbox_new( FALSE,0 );
+ gtk_widget_set_name( vbox2,"vbox2" );
+ gtk_widget_ref( vbox2 );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"vbox2",vbox2,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( vbox2 );
+ gtk_box_pack_start( GTK_BOX( vbox1 ),vbox2,TRUE,FALSE,0 );
+
+ gtkMessageBoxText=gtk_label_new( "Ez." );
+ gtk_widget_set_name( gtkMessageBoxText,"gtkMessageBoxText" );
+ gtk_widget_ref( gtkMessageBoxText );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"gtkMessageBoxText",gtkMessageBoxText,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( gtkMessageBoxText );
+ gtk_box_pack_start( GTK_BOX( vbox2 ),gtkMessageBoxText,FALSE,FALSE,0 );
+// gtk_widget_set_usize( gtkMessageBoxText,-2,77 );
+ gtk_widget_set_usize( gtkMessageBoxText,384,77 );
+ gtk_label_set_justify( GTK_LABEL( gtkMessageBoxText ),GTK_JUSTIFY_FILL );
+ gtk_label_set_line_wrap( GTK_LABEL( gtkMessageBoxText ),TRUE );
+
+ hseparator1=gtk_hseparator_new();
+ gtk_widget_set_name( hseparator1,"hseparator1" );
+ gtk_widget_ref( hseparator1 );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"hseparator1",hseparator1,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hseparator1 );
+ gtk_box_pack_start( GTK_BOX( vbox2 ),hseparator1,TRUE,TRUE,0 );
+
+ hbuttonbox1=gtk_hbutton_box_new();
+ gtk_widget_set_name( hbuttonbox1,"hbuttonbox1" );
+ gtk_widget_ref( hbuttonbox1 );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"hbuttonbox1",hbuttonbox1,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hbuttonbox1 );
+ gtk_box_pack_start( GTK_BOX( vbox1 ),hbuttonbox1,FALSE,FALSE,0 );
+ GTK_WIDGET_SET_FLAGS( hbuttonbox1,GTK_CAN_FOCUS );
+ GTK_WIDGET_SET_FLAGS( hbuttonbox1,GTK_CAN_DEFAULT );
+ gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),0 );
+ gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox1 ),60,0 );
+ gtk_button_box_set_child_ipadding( GTK_BUTTON_BOX( hbuttonbox1 ),10,0 );
+
+ Ok=gtk_button_new_with_label( langOk );
+ gtk_widget_set_name( Ok,langOk );
+ gtk_widget_ref( Ok );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),langOk,Ok,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( Ok );
+ gtk_container_add( GTK_CONTAINER( hbuttonbox1 ),Ok );
+ gtk_widget_set_usize( Ok,100,-2 );
+ GTK_WIDGET_SET_FLAGS( Ok,GTK_CAN_DEFAULT );
+ gtk_widget_add_accelerator( Ok,"released",accel_group,
+ GDK_Return,0,
+ GTK_ACCEL_VISIBLE );
+
+ gtk_signal_connect( GTK_OBJECT( MessageBox ),"destroy",
+ GTK_SIGNAL_FUNC( on_MessageBox_destroy ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( Ok ),"released",
+ GTK_SIGNAL_FUNC( on_Ok_released ),
+ NULL );
+
+ gtk_window_add_accel_group( GTK_WINDOW( MessageBox ),accel_group );
+
+ return MessageBox;
+}
+
+#endif \ No newline at end of file
diff --git a/Gui/mplayer/gtk/opts.h b/Gui/mplayer/gtk/opts.h
new file mode 100644
index 0000000000..b80f248d95
--- /dev/null
+++ b/Gui/mplayer/gtk/opts.h
@@ -0,0 +1,785 @@
+
+GtkWidget * opAudioFrameLabel;
+GtkWidget * opAudioLabel;
+GtkWidget * opAudioDriverMenu;
+GtkWidget * opDelayLabel;
+GtkWidget * opAudioDelaySkinButton;
+GtkWidget * opAudioConfigureButton;
+GtkWidget * OpVideoFrameLabel;
+GtkWidget * opVideoLabel;
+GtkWidget * opVideoMenu;
+GtkWidget * opOsdCheckButton;
+GtkWidget * opVideoConfButton;
+GtkWidget * opOSDLabel;
+GtkWidget * opOSDLevelSpinButton;
+GtkWidget * opAutoFullscreenCheckBox;
+GtkWidget * opOk;
+GtkWidget * opCancel;
+
+int opShift = False;
+
+void HideOptions( void )
+{
+ gtk_widget_hide( Options );
+ gtkVisibleOptions=0;
+ gtkShMem->vs.window=evPreferences;
+ gtkSendMessage( evHideWindow );
+}
+
+gboolean on_window2_key_press_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
+{
+ switch ( event->keyval )
+ {
+ case GDK_Shift_L:
+ case GDK_Shift_R:
+ opShift=True;
+ break;
+ }
+ return FALSE;
+}
+
+gboolean on_window2_key_release_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
+{
+ switch ( event->keyval )
+ {
+ case GDK_Escape:
+ case GDK_Return:
+ if ( !opShift ) HideOptions();
+ break;
+ case GDK_Tab:
+// if ( sbShift )
+// { if ( (--sbItemsListCounter) < 0 ) sbItemsListCounter=2; }
+// else
+// { if ( (++sbItemsListCounter) > 2 ) sbItemsListCounter=0; }
+// gtk_widget_grab_focus( sbItemsList[sbItemsListCounter] );
+ break;
+ case GDK_Shift_L:
+ case GDK_Shift_R:
+ opShift=False;
+ break;
+ }
+ return FALSE;
+}
+
+gboolean on_window2_destroy_event( GtkWidget * widget,GdkEvent * event,gpointer user_data)
+{
+ HideOptions();
+ return FALSE;
+}
+
+void on_opAudioDriverMenu_released( GtkButton * button,gpointer user_data )
+{
+}
+
+void on_opAudioDelaySkinButton_changed( GtkEditable * editable,gpointer user_data )
+{
+}
+
+void on_opAudioDelaySkinButton_move_to_column( GtkEditable * editable,gint column,gpointer user_data )
+{
+}
+
+void on_opAudioDelaySkinButton_move_to_row( GtkEditable * editable,gint row,gpointer user_data )
+{
+}
+
+void on_opAudioConfigureButton_released( GtkButton * button,gpointer user_data )
+{
+}
+
+void on_opVideoMenu_released( GtkButton * button,gpointer user_data )
+{
+ fprintf( stderr,"[opts] data: %s\n",(char *)user_data );
+}
+
+void on_opVideoMenu_pressed( GtkButton * button,gpointer user_data )
+{
+ fprintf( stderr,"[opts] data: %s\n",(char *)user_data );
+}
+
+void on_opVideoMenu_clicked( GtkButton * button,gpointer user_data)
+{
+ fprintf( stderr,"[opts] data(2): %s\n",(char *)user_data );
+}
+
+gboolean on_opVideoMenu_button_release_event( GtkWidget * widget,GdkEventButton * event,gpointer user_data )
+{
+ fprintf( stderr,"[opts] video menu.\n" );
+ return FALSE;
+}
+
+void on_opOsdCheckButton_toggled( GtkToggleButton * togglebutton,gpointer user_data )
+{
+}
+
+void on_opVideoConfButton_released( GtkButton * button,gpointer user_data )
+{
+}
+
+void on_opOSDLevelSpinButton_changed( GtkEditable * editable,gpointer user_data )
+{
+}
+
+void on_opOSDLevelSpinButton_move_to_column( GtkEditable * editable,gint column,gpointer user_data )
+{
+}
+
+void on_opOSDLevelSpinButton_move_to_row( GtkEditable * editable,gint row,gpointer user_data )
+{
+}
+
+void on_opOk_released( GtkButton * button,gpointer user_data )
+{ HideOptions(); }
+
+void on_opCancel_released( GtkButton * button,gpointer user_data )
+{ HideOptions(); }
+
+gboolean on_confOSS_destroy_event ( GtkWidget * widget,GdkEvent * event,gpointer user_data)
+{
+ return FALSE;
+}
+
+gboolean on_confOSS_key_press_event ( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
+{
+ return FALSE;
+}
+
+gboolean on_confOSS_key_release_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
+{
+ return FALSE;
+}
+
+void on_opOSSDSPCombo_set_focus_child( GtkContainer * container,GtkWidget * widget,gpointer user_data )
+{
+}
+
+void on_opOSSDSPComboEntry_changed( GtkEditable * editable,gpointer user_data )
+{
+}
+
+void on_opOSSMixerCombo_set_focus_child( GtkContainer * container,GtkWidget * widget,gpointer user_data )
+{
+}
+
+void on_opOSSMixerComboEntry_changed( GtkEditable * editable,gpointer user_data )
+{
+}
+
+void on_opOSSOk_released( GtkButton * button,gpointer user_data )
+{
+}
+
+void on_opOSSCancel_released( GtkButton * button,gpointer user_data )
+{
+}
+
+void on_opAutoFullscreenCheckBox_toggled( GtkToggleButton *togglebutton,gpointer user_data )
+{
+}
+
+GtkWidget * create_Options( void )
+{
+ GtkWidget *frame1;
+ GtkWidget *frame2;
+ GtkWidget *frame3;
+ GtkWidget *frame4;
+ GtkWidget *vbox1;
+ GtkWidget *notebook1;
+ GtkWidget *frame5;
+ GtkWidget *frame6;
+ GtkWidget *hbox1;
+ GtkWidget *table1;
+ GtkWidget *opAudioDriverMenu_menu;
+ GtkWidget *glade_menuitem;
+ GtkObject *opAudioDelaySkinButton_adj;
+ GtkWidget *hbuttonbox2;
+ GtkWidget *frame16;
+ GtkWidget *table2;
+ GtkWidget *opVideoMenu_menu;
+ GtkWidget *hbuttonbox3;
+ GtkWidget *label5;
+ GtkObject *opOSDLevelSpinButton_adj;
+ GtkWidget *frame17;
+ GtkWidget *opAudio;
+ GtkWidget *frame11;
+ GtkWidget *frame12;
+ GtkWidget *hbox2;
+ GtkWidget *frame13;
+ GtkWidget *table4;
+ GtkWidget *vseparator1;
+ GtkWidget *frame14;
+ GtkWidget *opMisc;
+ GtkWidget *hseparator1;
+ GtkWidget *hbuttonbox1;
+ GtkTooltips *tooltips;
+
+ tooltips = gtk_tooltips_new ();
+
+ Options = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_set_name (Options, "Options");
+ gtk_object_set_data (GTK_OBJECT (Options), "Options", Options);
+ gtk_widget_set_usize (Options, 448, 260);
+ gtk_widget_set_events (Options, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK | GDK_VISIBILITY_NOTIFY_MASK);
+ gtk_window_set_title (GTK_WINDOW (Options),"Options");
+ gtk_window_set_policy (GTK_WINDOW (Options), FALSE, FALSE, FALSE);
+ gtk_window_set_wmclass (GTK_WINDOW (Options), "Options", "Options");
+
+ frame1 = gtk_frame_new (NULL);
+ gtk_widget_set_name (frame1, "frame1");
+ gtk_widget_ref (frame1);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "frame1", frame1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame1);
+ gtk_container_add (GTK_CONTAINER (Options), frame1);
+ gtk_container_set_border_width (GTK_CONTAINER (frame1), 1);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN);
+
+ frame2 = gtk_frame_new (NULL);
+ gtk_widget_set_name (frame2, "frame2");
+ gtk_widget_ref (frame2);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "frame2", frame2,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame2);
+ gtk_container_add (GTK_CONTAINER (frame1), frame2);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_NONE);
+
+ frame3 = gtk_frame_new (NULL);
+ gtk_widget_set_name (frame3, "frame3");
+ gtk_widget_ref (frame3);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "frame3", frame3,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame3);
+ gtk_container_add (GTK_CONTAINER (frame2), frame3);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame3), GTK_SHADOW_ETCHED_OUT);
+
+ frame4 = gtk_frame_new (NULL);
+ gtk_widget_set_name (frame4, "frame4");
+ gtk_widget_ref (frame4);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "frame4", frame4,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame4);
+ gtk_container_add (GTK_CONTAINER (frame3), frame4);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame4), GTK_SHADOW_NONE);
+
+ vbox1 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox1, "vbox1");
+ gtk_widget_ref (vbox1);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "vbox1", vbox1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vbox1);
+ gtk_container_add (GTK_CONTAINER (frame4), vbox1);
+
+ notebook1 = gtk_notebook_new ();
+ gtk_widget_set_name (notebook1, "notebook1");
+ gtk_widget_ref (notebook1);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "notebook1", notebook1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (notebook1);
+ gtk_box_pack_start (GTK_BOX (vbox1), notebook1, TRUE, TRUE, 0);
+
+ frame5 = gtk_frame_new (NULL);
+ gtk_widget_set_name (frame5, "frame5");
+ gtk_widget_ref (frame5);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "frame5", frame5,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame5);
+ gtk_container_add (GTK_CONTAINER (notebook1), frame5);
+
+ frame6 = gtk_frame_new (NULL);
+ gtk_widget_set_name (frame6, "frame6");
+ gtk_widget_ref (frame6);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "frame6", frame6,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame6);
+ gtk_container_add (GTK_CONTAINER (frame5), frame6);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame6), GTK_SHADOW_NONE);
+
+ hbox1 = gtk_hbox_new (TRUE, 0);
+ gtk_widget_set_name (hbox1, "hbox1");
+ gtk_widget_ref (hbox1);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "hbox1", hbox1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (hbox1);
+ gtk_container_add (GTK_CONTAINER (frame6), hbox1);
+
+ opAudioFrameLabel = gtk_frame_new ("Audio");
+ gtk_widget_set_name (opAudioFrameLabel, "opAudioFrameLabel");
+ gtk_widget_ref (opAudioFrameLabel);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "opAudioFrameLabel", opAudioFrameLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (opAudioFrameLabel);
+ gtk_box_pack_start (GTK_BOX (hbox1), opAudioFrameLabel, FALSE, FALSE, 0);
+ gtk_widget_set_usize (opAudioFrameLabel, 212, -2);
+ gtk_container_set_border_width (GTK_CONTAINER (opAudioFrameLabel), 3);
+ gtk_frame_set_shadow_type (GTK_FRAME (opAudioFrameLabel), GTK_SHADOW_ETCHED_OUT);
+
+ table1 = gtk_table_new (4, 2, FALSE);
+ gtk_widget_set_name (table1, "table1");
+ gtk_widget_ref (table1);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "table1", table1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (table1);
+ gtk_container_add (GTK_CONTAINER (opAudioFrameLabel), table1);
+
+ opAudioLabel = gtk_label_new ("Driver: ");
+ gtk_widget_set_name (opAudioLabel, "opAudioLabel");
+ gtk_widget_ref (opAudioLabel);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "opAudioLabel", opAudioLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (opAudioLabel);
+ gtk_table_attach (GTK_TABLE (table1), opAudioLabel, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_widget_set_usize (opAudioLabel, 40, -2);
+ gtk_misc_set_alignment (GTK_MISC (opAudioLabel), 0, 0.5);
+
+ opAudioDriverMenu = gtk_option_menu_new ();
+ gtk_widget_set_name (opAudioDriverMenu, "opAudioDriverMenu");
+ gtk_widget_ref (opAudioDriverMenu);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "opAudioDriverMenu", opAudioDriverMenu,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (opAudioDriverMenu);
+ gtk_table_attach (GTK_TABLE (table1), opAudioDriverMenu, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_widget_set_usize (opAudioDriverMenu, 159, 25);
+ gtk_tooltips_set_tip (tooltips, opAudioDriverMenu, "Select audio output driver.", NULL);
+ opAudioDriverMenu_menu = gtk_menu_new ();
+ glade_menuitem = gtk_menu_item_new_with_label ("null");
+ gtk_widget_show (glade_menuitem);
+ gtk_menu_append (GTK_MENU (opAudioDriverMenu_menu), glade_menuitem);
+
+ #ifdef USE_OSS_AUDIO
+ glade_menuitem = gtk_menu_item_new_with_label ("OSS");
+ gtk_widget_show (glade_menuitem);
+ gtk_menu_append (GTK_MENU (opAudioDriverMenu_menu), glade_menuitem);
+ #endif
+ #ifdef HAVE_ALSA5
+ glade_menuitem = gtk_menu_item_new_with_label ("ALSA 0.5.x");
+ gtk_widget_show (glade_menuitem);
+ gtk_menu_append (GTK_MENU (opAudioDriverMenu_menu), glade_menuitem);
+ #endif
+ #ifdef HAVE_ALSA9
+ glade_menuitem = gtk_menu_item_new_with_label ("ALSA 0.9.x");
+ gtk_widget_show (glade_menuitem);
+ gtk_menu_append (GTK_MENU (opAudioDriverMenu_menu), glade_menuitem);
+ #endif
+ #ifdef HAVE_ESD
+ glade_menuitem = gtk_menu_item_new_with_label ("ESD");
+ gtk_widget_show (glade_menuitem);
+ gtk_menu_append (GTK_MENU (opAudioDriverMenu_menu), glade_menuitem);
+ #endif
+
+ gtk_option_menu_set_menu (GTK_OPTION_MENU (opAudioDriverMenu), opAudioDriverMenu_menu);
+
+ opDelayLabel = gtk_label_new ("Delay:");
+ gtk_widget_set_name (opDelayLabel, "opDelayLabel");
+ gtk_widget_ref (opDelayLabel);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "opDelayLabel", opDelayLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (opDelayLabel);
+ gtk_table_attach (GTK_TABLE (table1), opDelayLabel, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_widget_set_usize (opDelayLabel, 35, -2);
+ gtk_misc_set_alignment (GTK_MISC (opDelayLabel), 0, 0.5);
+
+ opAudioDelaySkinButton_adj = gtk_adjustment_new (0, -500, 500, 0.01, 10, 10);
+ opAudioDelaySkinButton = gtk_spin_button_new (GTK_ADJUSTMENT (opAudioDelaySkinButton_adj), 1, 2);
+ gtk_widget_set_name (opAudioDelaySkinButton, "opAudioDelaySkinButton");
+ gtk_widget_ref (opAudioDelaySkinButton);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "opAudioDelaySkinButton", opAudioDelaySkinButton,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (opAudioDelaySkinButton);
+ gtk_table_attach (GTK_TABLE (table1), opAudioDelaySkinButton, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_FILL), //GTK_EXPAND |
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_widget_set_usize (opAudioDelaySkinButton, 160, 25);
+ gtk_tooltips_set_tip (tooltips, opAudioDelaySkinButton, "Set audio delay.", NULL);
+ gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (opAudioDelaySkinButton), TRUE);
+
+ hbuttonbox2 = gtk_hbutton_box_new ();
+ gtk_widget_set_name (hbuttonbox2, "hbuttonbox2");
+ gtk_widget_ref (hbuttonbox2);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "hbuttonbox2", hbuttonbox2,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (hbuttonbox2);
+ gtk_table_attach (GTK_TABLE (table1), hbuttonbox2, 1, 2, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 0, 0);
+ gtk_widget_set_usize (hbuttonbox2, -2, 31);
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox2), GTK_BUTTONBOX_END);
+
+ opAudioConfigureButton = gtk_button_new_with_label ("Configure");
+ gtk_widget_set_name (opAudioConfigureButton, "opAudioConfigureButton");
+ gtk_widget_ref (opAudioConfigureButton);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "opAudioConfigureButton", opAudioConfigureButton,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (opAudioConfigureButton);
+ gtk_container_add (GTK_CONTAINER (hbuttonbox2), opAudioConfigureButton);
+ gtk_widget_set_usize (opAudioConfigureButton, -2, 31);
+ GTK_WIDGET_SET_FLAGS (opAudioConfigureButton, GTK_CAN_DEFAULT);
+ gtk_tooltips_set_tip (tooltips, opAudioConfigureButton, "Configure selected audio driver.", NULL);
+
+ frame16 = gtk_frame_new (NULL);
+ gtk_widget_set_name (frame16, "frame16");
+ gtk_widget_ref (frame16);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "frame16", frame16,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame16);
+ gtk_table_attach (GTK_TABLE (table1), frame16, 1, 2, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame16), GTK_SHADOW_NONE);
+
+ OpVideoFrameLabel = gtk_frame_new ("Video");
+ gtk_widget_set_name (OpVideoFrameLabel, "OpVideoFrameLabel");
+ gtk_widget_ref (OpVideoFrameLabel);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "OpVideoFrameLabel", OpVideoFrameLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (OpVideoFrameLabel);
+ gtk_box_pack_start (GTK_BOX (hbox1), OpVideoFrameLabel, FALSE, FALSE, 0);
+ gtk_widget_set_usize (OpVideoFrameLabel, 212, -2);
+ gtk_container_set_border_width (GTK_CONTAINER (OpVideoFrameLabel), 3);
+ gtk_frame_set_shadow_type (GTK_FRAME (OpVideoFrameLabel), GTK_SHADOW_ETCHED_OUT);
+
+ table2 = gtk_table_new (5, 2, FALSE);
+ gtk_widget_set_name (table2, "table2");
+ gtk_widget_ref (table2);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "table2", table2,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (table2);
+ gtk_container_add (GTK_CONTAINER (OpVideoFrameLabel), table2);
+
+ opVideoLabel = gtk_label_new ("Driver:");
+ gtk_widget_set_name (opVideoLabel, "opVideoLabel");
+ gtk_widget_ref (opVideoLabel);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "opVideoLabel", opVideoLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (opVideoLabel);
+ gtk_table_attach (GTK_TABLE (table2), opVideoLabel, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_widget_set_usize (opVideoLabel, 35, -2);
+ gtk_misc_set_alignment (GTK_MISC (opVideoLabel), 0, 0.5);
+
+ opVideoMenu = gtk_option_menu_new ();
+ gtk_widget_set_name (opVideoMenu, "opVideoMenu");
+ gtk_widget_ref (opVideoMenu);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "opVideoMenu", opVideoMenu,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (opVideoMenu);
+ gtk_table_attach (GTK_TABLE (table2), opVideoMenu, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_widget_set_usize (opVideoMenu, 137, 25);
+ gtk_tooltips_set_tip (tooltips, opVideoMenu, "Select video output driver.", NULL);
+ opVideoMenu_menu = gtk_menu_new ();
+ #if defined( HAVE_X11 ) && defined( HAVE_MGA )
+ glade_menuitem = gtk_menu_item_new_with_label ("xmga");
+ gtk_widget_show (glade_menuitem);
+ gtk_menu_append (GTK_MENU (opVideoMenu_menu), glade_menuitem);
+ #endif
+ #ifdef HAVE_XV
+ glade_menuitem = gtk_menu_item_new_with_label ("xv");
+ gtk_widget_show (glade_menuitem);
+ gtk_menu_append (GTK_MENU (opVideoMenu_menu), glade_menuitem);
+ #endif
+ #ifdef HAVE_X11
+ glade_menuitem = gtk_menu_item_new_with_label ("x11");
+ gtk_widget_show (glade_menuitem);
+ gtk_menu_append (GTK_MENU (opVideoMenu_menu), glade_menuitem);
+ #endif
+ #ifdef HAVE_PNG
+ glade_menuitem = gtk_menu_item_new_with_label ("png");
+ gtk_widget_show (glade_menuitem);
+ gtk_menu_append (GTK_MENU (opVideoMenu_menu), glade_menuitem);
+ #endif
+ glade_menuitem = gtk_menu_item_new_with_label ("null");
+ gtk_widget_show (glade_menuitem);
+ gtk_menu_append (GTK_MENU (opVideoMenu_menu), glade_menuitem);
+ gtk_option_menu_set_menu (GTK_OPTION_MENU (opVideoMenu), opVideoMenu_menu);
+
+ opOsdCheckButton = gtk_check_button_new_with_label ("");
+ gtk_widget_set_name (opOsdCheckButton, "opOsdCheckButton");
+ gtk_widget_ref (opOsdCheckButton);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "opOsdCheckButton", opOsdCheckButton,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (opOsdCheckButton);
+ gtk_table_attach (GTK_TABLE (table2), opOsdCheckButton, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_widget_set_usize (opOsdCheckButton, -2, 24);
+ gtk_tooltips_set_tip (tooltips, opOsdCheckButton, "On/off OSD.", NULL);
+
+ hbuttonbox3 = gtk_hbutton_box_new ();
+ gtk_widget_set_name (hbuttonbox3, "hbuttonbox3");
+ gtk_widget_ref (hbuttonbox3);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "hbuttonbox3", hbuttonbox3,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (hbuttonbox3);
+ gtk_table_attach (GTK_TABLE (table2), hbuttonbox3, 1, 2, 4, 5,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
+ gtk_widget_set_usize (hbuttonbox3, -2, 31);
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox3), GTK_BUTTONBOX_END);
+
+ opVideoConfButton = gtk_button_new_with_label ("Configure");
+ gtk_widget_set_name (opVideoConfButton, "opVideoConfButton");
+ gtk_widget_ref (opVideoConfButton);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "opVideoConfButton", opVideoConfButton,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (opVideoConfButton);
+ gtk_container_add (GTK_CONTAINER (hbuttonbox3), opVideoConfButton);
+ gtk_widget_set_usize (opVideoConfButton, -2, 31);
+ GTK_WIDGET_SET_FLAGS (opVideoConfButton, GTK_CAN_DEFAULT);
+ gtk_tooltips_set_tip (tooltips, opVideoConfButton, "Configure selected video driver.", NULL);
+
+ opOSDLabel = gtk_label_new ("OSD:");
+ gtk_widget_set_name (opOSDLabel, "opOSDLabel");
+ gtk_widget_ref (opOSDLabel);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "opOSDLabel", opOSDLabel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (opOSDLabel);
+ gtk_table_attach (GTK_TABLE (table2), opOSDLabel, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_widget_set_usize (opOSDLabel, 35, -2);
+ gtk_misc_set_alignment (GTK_MISC (opOSDLabel), 0, 0.5);
+
+ label5 = gtk_label_new ("OSD level:");
+ gtk_widget_set_name (label5, "label5");
+ gtk_widget_ref (label5);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "label5", label5,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label5);
+ gtk_table_attach (GTK_TABLE (table2), label5, 0, 1, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_widget_set_usize (label5, 63, -2);
+ gtk_misc_set_alignment (GTK_MISC (label5), 0, 0.5);
+
+ opOSDLevelSpinButton_adj = gtk_adjustment_new (0, 0, 2, 1, 10, 10);
+ opOSDLevelSpinButton = gtk_spin_button_new (GTK_ADJUSTMENT (opOSDLevelSpinButton_adj), 1, 0);
+ gtk_widget_set_name (opOSDLevelSpinButton, "opOSDLevelSpinButton");
+ gtk_widget_ref (opOSDLevelSpinButton);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "opOSDLevelSpinButton", opOSDLevelSpinButton,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (opOSDLevelSpinButton);
+ gtk_table_attach (GTK_TABLE (table2), opOSDLevelSpinButton, 1, 2, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_widget_set_usize (opOSDLevelSpinButton, 136, 25);
+ gtk_tooltips_set_tip (tooltips, opOSDLevelSpinButton, "Set OSD level.", NULL);
+ gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (opOSDLevelSpinButton), TRUE);
+
+ frame17 = gtk_frame_new (NULL);
+ gtk_widget_set_name (frame17, "frame17");
+ gtk_widget_ref (frame17);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "frame17", frame17,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame17);
+ gtk_table_attach (GTK_TABLE (table2), frame17, 1, 2, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 0, 0);
+ gtk_widget_set_usize (frame17, -2, 40);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame17), GTK_SHADOW_NONE);
+
+ opAudio = gtk_label_new ("Audio & Video");
+ gtk_widget_set_name (opAudio, "opAudio");
+ gtk_widget_ref (opAudio);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "opAudio", opAudio,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (opAudio);
+ gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), opAudio);
+ gtk_widget_set_usize (opAudio, 80, -2);
+
+ frame11 = gtk_frame_new (NULL);
+ gtk_widget_set_name (frame11, "frame11");
+ gtk_widget_ref (frame11);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "frame11", frame11,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame11);
+ gtk_container_add (GTK_CONTAINER (notebook1), frame11);
+
+ frame12 = gtk_frame_new (NULL);
+ gtk_widget_set_name (frame12, "frame12");
+ gtk_widget_ref (frame12);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "frame12", frame12,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame12);
+ gtk_container_add (GTK_CONTAINER (frame11), frame12);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame12), GTK_SHADOW_NONE);
+
+ hbox2 = gtk_hbox_new (FALSE, 0);
+ gtk_widget_set_name (hbox2, "hbox2");
+ gtk_widget_ref (hbox2);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "hbox2", hbox2,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (hbox2);
+ gtk_container_add (GTK_CONTAINER (frame12), hbox2);
+
+ frame13 = gtk_frame_new (NULL);
+ gtk_widget_set_name (frame13, "frame13");
+ gtk_widget_ref (frame13);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "frame13", frame13,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame13);
+ gtk_box_pack_start (GTK_BOX (hbox2), frame13, TRUE, TRUE, 0);
+ gtk_widget_set_usize (frame13, 212, -2);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame13), GTK_SHADOW_NONE);
+
+ table4 = gtk_table_new (2, 1, FALSE);
+ gtk_widget_set_name (table4, "table4");
+ gtk_widget_ref (table4);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "table4", table4,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (table4);
+ gtk_container_add (GTK_CONTAINER (frame13), table4);
+
+ opAutoFullscreenCheckBox = gtk_check_button_new_with_label ("Always switch fullscreen on play");
+ gtk_widget_set_name (opAutoFullscreenCheckBox, "opAutoFullscreenCheckBox");
+ gtk_widget_ref (opAutoFullscreenCheckBox);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "opAutoFullscreenCheckBox", opAutoFullscreenCheckBox,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (opAutoFullscreenCheckBox);
+ gtk_table_attach (GTK_TABLE (table4), opAutoFullscreenCheckBox, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_widget_set_usize (opAutoFullscreenCheckBox, -2, 25);
+ gtk_tooltips_set_tip (tooltips, opAutoFullscreenCheckBox, "Switch player window to fullscreen on all play.", NULL);
+
+ vseparator1 = gtk_vseparator_new ();
+ gtk_widget_set_name (vseparator1, "vseparator1");
+ gtk_widget_ref (vseparator1);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "vseparator1", vseparator1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vseparator1);
+ gtk_box_pack_start (GTK_BOX (hbox2), vseparator1, FALSE, FALSE, 0);
+ gtk_widget_set_usize (vseparator1, 3, -2);
+
+ frame14 = gtk_frame_new (NULL);
+ gtk_widget_set_name (frame14, "frame14");
+ gtk_widget_ref (frame14);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "frame14", frame14,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame14);
+ gtk_box_pack_start (GTK_BOX (hbox2), frame14, TRUE, TRUE, 0);
+ gtk_widget_set_usize (frame14, 212, -2);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame14), GTK_SHADOW_NONE);
+
+ opMisc = gtk_label_new ("Misc");
+ gtk_widget_set_name (opMisc, "opMisc");
+ gtk_widget_ref (opMisc);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "opMisc", opMisc,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (opMisc);
+ gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), opMisc);
+ gtk_widget_set_usize (opMisc, 75, -2);
+
+ hseparator1 = gtk_hseparator_new ();
+ gtk_widget_set_name (hseparator1, "hseparator1");
+ gtk_widget_ref (hseparator1);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "hseparator1", hseparator1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (hseparator1);
+ gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, FALSE, FALSE, 0);
+ gtk_widget_set_usize (hseparator1, -2, 5);
+
+ hbuttonbox1 = gtk_hbutton_box_new ();
+ gtk_widget_set_name (hbuttonbox1, "hbuttonbox1");
+ gtk_widget_ref (hbuttonbox1);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "hbuttonbox1", hbuttonbox1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (hbuttonbox1);
+ gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, TRUE, TRUE, 0);
+ gtk_widget_set_usize (hbuttonbox1, -2, 27);
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_END);
+ gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox1), 0);
+ gtk_button_box_set_child_size (GTK_BUTTON_BOX (hbuttonbox1), 90, 30);
+
+ opOk = gtk_button_new_with_label ("Ok");
+ gtk_widget_set_name (opOk, "opOk");
+ gtk_widget_ref (opOk);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "opOk", opOk,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (opOk);
+ gtk_container_add (GTK_CONTAINER (hbuttonbox1), opOk);
+ GTK_WIDGET_SET_FLAGS (opOk, GTK_CAN_DEFAULT);
+
+ opCancel = gtk_button_new_with_label ("Cancel");
+ gtk_widget_set_name (opCancel, "opCancel");
+ gtk_widget_ref (opCancel);
+ gtk_object_set_data_full (GTK_OBJECT (Options), "opCancel", opCancel,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (opCancel);
+ gtk_container_add (GTK_CONTAINER (hbuttonbox1), opCancel);
+ GTK_WIDGET_SET_FLAGS (opCancel, GTK_CAN_DEFAULT);
+
+ gtk_signal_connect (GTK_OBJECT (Options), "key_press_event",
+ GTK_SIGNAL_FUNC (on_window2_key_press_event),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (Options), "key_release_event",
+ GTK_SIGNAL_FUNC (on_window2_key_release_event),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (Options), "destroy_event",
+ GTK_SIGNAL_FUNC (on_window2_destroy_event),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (opAudioDriverMenu), "released",
+ GTK_SIGNAL_FUNC (on_opAudioDriverMenu_released),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (opAudioDelaySkinButton), "changed",
+ GTK_SIGNAL_FUNC (on_opAudioDelaySkinButton_changed),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (opAudioDelaySkinButton), "move_to_column",
+ GTK_SIGNAL_FUNC (on_opAudioDelaySkinButton_move_to_column),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (opAudioDelaySkinButton), "move_to_row",
+ GTK_SIGNAL_FUNC (on_opAudioDelaySkinButton_move_to_row),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (opAudioConfigureButton), "released",
+ GTK_SIGNAL_FUNC (on_opAudioConfigureButton_released),
+ NULL);
+
+ gtk_signal_connect (GTK_OBJECT (opVideoMenu), "released",
+ GTK_SIGNAL_FUNC (on_opVideoMenu_released),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (opVideoMenu), "clicked",
+ GTK_SIGNAL_FUNC (on_opVideoMenu_clicked),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (opVideoMenu), "button_release_event",
+ GTK_SIGNAL_FUNC (on_opVideoMenu_button_release_event),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (opVideoMenu), "pressed",
+ GTK_SIGNAL_FUNC (on_opVideoMenu_pressed),
+ NULL);
+
+ gtk_signal_connect (GTK_OBJECT (opOsdCheckButton), "toggled",
+ GTK_SIGNAL_FUNC (on_opOsdCheckButton_toggled),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (opVideoConfButton), "released",
+ GTK_SIGNAL_FUNC (on_opVideoConfButton_released),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (opOSDLevelSpinButton), "changed",
+ GTK_SIGNAL_FUNC (on_opOSDLevelSpinButton_changed),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (opOSDLevelSpinButton), "move_to_column",
+ GTK_SIGNAL_FUNC (on_opOSDLevelSpinButton_move_to_column),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (opOSDLevelSpinButton), "move_to_row",
+ GTK_SIGNAL_FUNC (on_opOSDLevelSpinButton_move_to_row),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (opAutoFullscreenCheckBox), "toggled",
+ GTK_SIGNAL_FUNC (on_opAutoFullscreenCheckBox_toggled),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (opOk), "released",
+ GTK_SIGNAL_FUNC (on_opOk_released),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (opCancel), "released",
+ GTK_SIGNAL_FUNC (on_opCancel_released),
+ NULL);
+
+ gtk_object_set_data (GTK_OBJECT (Options), "tooltips", tooltips);
+
+ return Options;
+}
diff --git a/Gui/mplayer/gtk/pl.h b/Gui/mplayer/gtk/pl.h
new file mode 100644
index 0000000000..1b509fe693
--- /dev/null
+++ b/Gui/mplayer/gtk/pl.h
@@ -0,0 +1,305 @@
+
+// play list
+
+#ifndef __MY_PLAYLIST
+#define __MY_PLAYLIST
+
+#include "../../language.h"
+
+void HidePlayList( void )
+{
+ gtk_widget_hide( PlayList );
+ gtkVisiblePlayList=0;
+ gtkShMem->vs.window=evPlayList;
+ gtkSendMessage( evHideWindow );
+}
+
+void pl_PlayList_destroy( GtkObject * object,gpointer user_data )
+{ HidePlayList(); }
+
+void pl_Add_released( GtkButton * button,gpointer user_data )
+{
+}
+
+void pl_Remove_released( GtkButton * button,gpointer user_data )
+{
+}
+
+void pl_Ok_released( GtkButton * button,gpointer user_data )
+{ HidePlayList(); }
+
+void pl_Cancel_released( GtkButton * button,gpointer user_data )
+{ HidePlayList(); }
+
+void pl_DirTree_select_child( GtkTree * tree,GtkWidget * widget,gpointer user_data )
+{
+}
+
+void pl_DirTree_selection_changed( GtkTree * tree,gpointer user_data )
+{
+}
+
+void pl_DirTree_unselect_child( GtkTree * tree,GtkWidget * widget,gpointer user_data )
+{
+}
+
+void pl_FNameList_select_child( GtkList * list,GtkWidget * widget,gpointer user_data )
+{
+}
+
+void pl_FNameList_selection_changed( GtkList * list,gpointer user_data )
+{
+}
+
+void pl_FNameList_unselect_child( GtkList * list,GtkWidget * widget,gpointer user_data )
+{
+}
+
+void pl_SelectedList_select_child( GtkList * list,GtkWidget * widget,gpointer user_data )
+{
+}
+
+void pl_SelectedList_selection_changed( GtkList * list,gpointer user_data )
+{
+}
+
+void pl_SelectedList_unselect_child( GtkList * list,GtkWidget * widget,gpointer user_data )
+{
+}
+
+GtkWidget* create_PlayList( void )
+{
+ GtkWidget *PlayList;
+ GtkWidget *frame9;
+ GtkWidget *frame10;
+ GtkWidget *frame11;
+ GtkWidget *frame12;
+ GtkWidget *hbox5;
+ GtkWidget *frame13;
+ GtkWidget *frame14;
+ GtkWidget *DirTree;
+ GtkWidget *vbox6;
+ GtkWidget *frame15;
+ GtkWidget *FNameList;
+ GtkWidget *frame16;
+ GtkWidget *SelectedList;
+ GtkWidget *hseparator6;
+ GtkWidget *hbuttonbox5;
+ GtkWidget *Add;
+ GtkWidget *Remove;
+ GtkWidget *Ok;
+ GtkWidget *Cancel;
+
+ PlayList = gtk_window_new( GTK_WINDOW_DIALOG );
+ gtk_object_set_data( GTK_OBJECT( PlayList ),langPlayList,PlayList );
+ gtk_widget_set_usize( PlayList,512,256 );
+ GTK_WIDGET_SET_FLAGS( PlayList,GTK_CAN_FOCUS );
+ GTK_WIDGET_SET_FLAGS( PlayList,GTK_CAN_DEFAULT );
+ gtk_widget_set_events( PlayList,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( PlayList ),langPlayList );
+ gtk_window_set_position( GTK_WINDOW( PlayList ),GTK_WIN_POS_CENTER );
+ gtk_window_set_policy( GTK_WINDOW( PlayList ),FALSE,FALSE,TRUE );
+
+ frame9 = gtk_frame_new( NULL );
+ gtk_widget_ref( frame9 );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),"frame9",frame9,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame9 );
+ gtk_container_add( GTK_CONTAINER( PlayList ),frame9 );
+ gtk_container_set_border_width( GTK_CONTAINER( frame9 ),1 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame9 ),GTK_SHADOW_IN );
+
+ frame10 = gtk_frame_new( NULL );
+ gtk_widget_ref( frame10 );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),"frame10",frame10,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame10 );
+ gtk_container_add( GTK_CONTAINER( frame9 ),frame10 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame10 ),GTK_SHADOW_NONE );
+
+ frame11 = gtk_frame_new( NULL );
+ gtk_widget_ref( frame11 );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),"frame11",frame11,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame11 );
+ gtk_container_add( GTK_CONTAINER( frame10 ),frame11 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame11 ),GTK_SHADOW_ETCHED_OUT );
+
+ frame12 = gtk_frame_new( NULL );
+ gtk_widget_ref( frame12 );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),"frame12",frame12,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame12 );
+ gtk_container_add( GTK_CONTAINER( frame11 ),frame12 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame12 ),GTK_SHADOW_NONE );
+
+ hbox5 = gtk_hbox_new( FALSE,0 );
+ gtk_widget_ref( hbox5 );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),"hbox5",hbox5,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hbox5 );
+ gtk_container_add( GTK_CONTAINER( frame12 ),hbox5 );
+
+ frame13 = gtk_frame_new( NULL );
+ gtk_widget_ref( frame13 );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),"frame13",frame13,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame13 );
+ gtk_box_pack_start( GTK_BOX( hbox5 ),frame13,TRUE,TRUE,0 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame13 ),GTK_SHADOW_ETCHED_OUT );
+
+ frame14 = gtk_frame_new( NULL );
+ gtk_widget_ref( frame14 );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),"frame14",frame14,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame14 );
+ gtk_container_add( GTK_CONTAINER( frame13 ),frame14 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame14 ),GTK_SHADOW_NONE );
+
+ DirTree = gtk_tree_new();
+ gtk_widget_ref( DirTree );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),"DirTree",DirTree,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( DirTree );
+ gtk_container_add( GTK_CONTAINER( frame14 ),DirTree );
+ gtk_widget_set_usize( DirTree,217,-2 );
+
+ vbox6 = gtk_vbox_new( FALSE,0 );
+ gtk_widget_ref( vbox6 );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),"vbox6",vbox6,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( vbox6 );
+ gtk_box_pack_start( GTK_BOX( hbox5 ),vbox6,TRUE,TRUE,0 );
+
+ frame15 = gtk_frame_new( NULL );
+ gtk_widget_ref( frame15 );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),"frame15",frame15,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame15 );
+ gtk_box_pack_start( GTK_BOX( vbox6 ),frame15,TRUE,TRUE,0 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame15 ),GTK_SHADOW_ETCHED_OUT );
+
+ FNameList = gtk_list_new();
+ gtk_widget_ref( FNameList );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),"FNameList",FNameList,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( FNameList );
+ gtk_container_add( GTK_CONTAINER( frame15 ),FNameList );
+
+ frame16 = gtk_frame_new( NULL );
+ gtk_widget_ref( frame16 );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),"frame16",frame16,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame16 );
+ gtk_box_pack_start( GTK_BOX( vbox6 ),frame16,TRUE,TRUE,0 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame16 ),GTK_SHADOW_ETCHED_OUT );
+
+ SelectedList = gtk_list_new();
+ gtk_widget_ref( SelectedList );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),"SelectedList",SelectedList,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( SelectedList );
+ gtk_container_add( GTK_CONTAINER( frame16 ),SelectedList );
+
+ hseparator6 = gtk_hseparator_new();
+ gtk_widget_ref( hseparator6 );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),"hseparator6",hseparator6,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hseparator6 );
+ gtk_box_pack_start( GTK_BOX( vbox6 ),hseparator6,FALSE,TRUE,0 );
+ gtk_widget_set_usize( hseparator6,-2,11 );
+
+ hbuttonbox5 = gtk_hbutton_box_new();
+ gtk_widget_ref( hbuttonbox5 );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),"hbuttonbox5",hbuttonbox5,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hbuttonbox5 );
+ gtk_box_pack_start( GTK_BOX( vbox6 ),hbuttonbox5,FALSE,FALSE,0 );
+ gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox5 ),GTK_BUTTONBOX_END );
+ gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox5 ),0 );
+ gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox5 ),65,27 );
+ gtk_button_box_set_child_ipadding( GTK_BUTTON_BOX( hbuttonbox5 ),2,0 );
+
+ Add = gtk_button_new_with_label( langAdd );
+ gtk_widget_ref( Add );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),langAdd,Add,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( Add );
+ gtk_container_add( GTK_CONTAINER( hbuttonbox5 ),Add );
+ gtk_widget_set_usize( Add,45,-2 );
+ GTK_WIDGET_SET_FLAGS( Add,GTK_CAN_DEFAULT );
+
+ Remove = gtk_button_new_with_label( langRemove );
+ gtk_widget_ref( Remove );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),langRemove,Remove,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( Remove );
+ gtk_container_add( GTK_CONTAINER( hbuttonbox5 ),Remove );
+ gtk_widget_set_usize( Remove,45,-2 );
+ GTK_WIDGET_SET_FLAGS( Remove,GTK_CAN_DEFAULT );
+
+ Ok = gtk_button_new_with_label( langOk );
+ gtk_widget_ref( Ok );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),langOk,Ok,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( Ok );
+ gtk_container_add( GTK_CONTAINER( hbuttonbox5 ),Ok );
+ gtk_widget_set_usize( Ok,45,-2 );
+ GTK_WIDGET_SET_FLAGS( Ok,GTK_CAN_DEFAULT );
+
+ Cancel = gtk_button_new_with_label( langCancel );
+ gtk_widget_ref( Cancel );
+ gtk_object_set_data_full( GTK_OBJECT( PlayList ),langCancel,Cancel,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( Cancel );
+ gtk_container_add( GTK_CONTAINER( hbuttonbox5 ),Cancel );
+ gtk_widget_set_usize( Cancel,45,-2 );
+ GTK_WIDGET_SET_FLAGS( Cancel,GTK_CAN_DEFAULT );
+
+ gtk_signal_connect( GTK_OBJECT( PlayList ),"destroy",
+ GTK_SIGNAL_FUNC( pl_PlayList_destroy ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( DirTree ),"select_child",
+ GTK_SIGNAL_FUNC( pl_DirTree_select_child ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( DirTree ),"selection_changed",
+ GTK_SIGNAL_FUNC( pl_DirTree_selection_changed ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( DirTree ),"unselect_child",
+ GTK_SIGNAL_FUNC( pl_DirTree_unselect_child ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( FNameList ),"select_child",
+ GTK_SIGNAL_FUNC( pl_FNameList_select_child ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( FNameList ),"selection_changed",
+ GTK_SIGNAL_FUNC( pl_FNameList_selection_changed ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( FNameList ),"unselect_child",
+ GTK_SIGNAL_FUNC( pl_FNameList_unselect_child ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( SelectedList ),"select_child",
+ GTK_SIGNAL_FUNC( pl_SelectedList_select_child ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( SelectedList ),"selection_changed",
+ GTK_SIGNAL_FUNC( pl_SelectedList_selection_changed ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( SelectedList ),"unselect_child",
+ GTK_SIGNAL_FUNC( pl_SelectedList_unselect_child ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( Add ),"released",
+ GTK_SIGNAL_FUNC( pl_Add_released ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( Remove ),"released",
+ GTK_SIGNAL_FUNC( pl_Remove_released ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( Ok ),"released",
+ GTK_SIGNAL_FUNC( pl_Ok_released ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( Cancel ),"released",
+ GTK_SIGNAL_FUNC( pl_Cancel_released ),
+ NULL );
+
+ return PlayList;
+}
+
+#endif \ No newline at end of file
diff --git a/Gui/mplayer/gtk/sb.h b/Gui/mplayer/gtk/sb.h
new file mode 100644
index 0000000000..fdd6fca2cf
--- /dev/null
+++ b/Gui/mplayer/gtk/sb.h
@@ -0,0 +1,313 @@
+
+// skin browser
+
+#ifndef __MYSKINBROWSER
+#define __MYSKINBROWSER
+
+#include <sys/stat.h>
+#include <glob.h>
+#include <unistd.h>
+
+#include "../app.h"
+#include "../../language.h"
+
+GtkWidget * SkinList;
+GtkWidget * sbOk;
+char * sbSelectedSkin=NULL;
+char * sbNotEnoughMemory="SkinBrowser: not enough memory.";
+char * sbMPlayerDirInHome=NULL;
+char * sbMPlayerPrefixDir=NULL;
+
+GtkWidget * sbItemsList[3];
+int sbItemsListCounter = 0;
+
+void HideSkinBrowser( void )
+{
+ gtk_widget_hide( SkinBrowser );
+ gtkVisibleSkinBrowser=0;
+ gtkShMem->vs.window=evSkinBrowser;
+ gtkSendMessage( evHideWindow );
+}
+
+int gtkFillSkinList( gchar * mdir )
+{
+ gchar * str[2];
+ gchar * tmp;
+ int i;
+ glob_t gg;
+ struct stat fs;
+
+ if ( ( str[0]=(char *)calloc( 1,7 ) ) == NULL )
+ {
+ gtkMessageBox( sbNotEnoughMemory );
+ return 0;
+ }
+ str[1]="";
+ strcpy( str[0],"default" );
+ if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );
+ free( str[0] );
+
+ glob( mdir,GLOB_NOSORT,NULL,&gg );
+ for( i=0;i<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;
+ if ( ( str[0]=(char *)malloc( strlen( tmp ) + 1 ) ) == NULL ) { gtkMessageBox( sbNotEnoughMemory ); return 0; }
+ strcpy( str[0],tmp );
+ if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );
+ free( str[0] );
+ }
+ }
+ globfree( &gg );
+ return 1;
+}
+
+void on_SkinBrowser_destroy( GtkObject * object,gpointer user_data )
+{ HideSkinBrowser(); }
+
+void on_SkinList_select_row( GtkCList * clist,gint row,gint column,GdkEvent * bevent,gpointer user_data )
+{
+ gtk_clist_get_text( clist,row,0,&sbSelectedSkin );
+ strcpy( gtkShMem->sb.name,sbSelectedSkin );
+ gtkSendMessage( evSkinBrowser );
+ if( !bevent ) return;
+ if( bevent->type == GDK_2BUTTON_PRESS ) HideSkinBrowser();
+}
+
+int sbShift = False;
+
+gboolean on_SkinBrowser_key_release_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
+{
+ switch ( event->keyval )
+ {
+ case GDK_Escape:
+ case GDK_Return:
+ if ( !sbShift ) HideSkinBrowser();
+ break;
+ case GDK_Tab:
+ if ( sbShift )
+ { if ( (--sbItemsListCounter) < 0 ) sbItemsListCounter=2; }
+ else
+ { if ( (++sbItemsListCounter) > 2 ) sbItemsListCounter=0; }
+ gtk_widget_grab_focus( sbItemsList[sbItemsListCounter] );
+ break;
+ case GDK_Shift_L:
+ case GDK_Shift_R:
+ sbShift=False;
+ break;
+ }
+// if ( ( event->keyval == GDK_Escape )|| ( event->keyval == GDK_Return ) ) HideSkinBrowser();
+ return FALSE;
+}
+
+gboolean on_SkinBrowser_key_press_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
+{
+ switch ( event->keyval )
+ {
+ case GDK_Shift_L:
+ case GDK_Shift_R:
+ sbShift=True;
+ break;
+ }
+ return FALSE;
+}
+
+GtkWidget * create_SkinBrowser( void )
+{
+ GtkWidget * SkinBrowser;
+ GtkWidget * frame5;
+ GtkWidget * frame6;
+ GtkWidget * frame7;
+ GtkWidget * frame8;
+ GtkWidget * vbox5;
+ GtkWidget * label;
+ GtkWidget * hseparator4;
+ GtkWidget * scrolledwindow1;
+ GtkWidget * label2;
+ GtkWidget * hseparator5;
+ GtkWidget * hbuttonbox4;
+ GtkWidget * Cancel;
+
+ SkinBrowser=gtk_window_new( GTK_WINDOW_DIALOG );
+ gtk_widget_set_name( SkinBrowser,langSkinBrowser );
+ gtk_object_set_data( GTK_OBJECT( SkinBrowser ),langSkinBrowser,SkinBrowser );
+ gtk_widget_set_usize( SkinBrowser,256,320 );
+ gtk_container_set_border_width( GTK_CONTAINER( SkinBrowser ),1 );
+ GTK_WIDGET_SET_FLAGS( SkinBrowser,GTK_CAN_FOCUS );
+ 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 ),langSkinBrowser );
+ gtk_window_set_position( GTK_WINDOW( SkinBrowser ),GTK_WIN_POS_CENTER );
+ gtk_window_set_policy( GTK_WINDOW( SkinBrowser ),FALSE,FALSE,TRUE );
+
+ frame5=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame5,"frame5" );
+ gtk_widget_ref( frame5 );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame5",frame5,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame5 );
+ gtk_container_add( GTK_CONTAINER( SkinBrowser ),frame5 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame5 ),GTK_SHADOW_IN );
+
+ frame6=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame6,"frame6" );
+ gtk_widget_ref( frame6 );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame6",frame6,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame6 );
+ gtk_container_add( GTK_CONTAINER( frame5 ),frame6 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame6 ),GTK_SHADOW_NONE );
+
+ frame7=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame7,"frame7" );
+ gtk_widget_ref( frame7 );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame7",frame7,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame7 );
+ gtk_container_add( GTK_CONTAINER( frame6 ),frame7 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame7 ),GTK_SHADOW_ETCHED_OUT );
+
+ frame8=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame8,"frame8" );
+ gtk_widget_ref( frame8 );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame8",frame8,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame8 );
+ gtk_container_add( GTK_CONTAINER( frame7 ),frame8 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame8 ),GTK_SHADOW_NONE );
+
+ vbox5=gtk_vbox_new( FALSE,0 );
+ gtk_widget_set_name( vbox5,"vbox5" );
+ gtk_widget_ref( vbox5 );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"vbox5",vbox5,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( vbox5 );
+ gtk_container_add( GTK_CONTAINER( frame8 ),vbox5 );
+
+ label=gtk_label_new( "Skins:" );
+ gtk_widget_set_name( label,"label" );
+ gtk_widget_ref( label );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"label",label,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( label );
+ gtk_box_pack_start( GTK_BOX( vbox5 ),label,FALSE,FALSE,0 );
+ gtk_label_set_justify( GTK_LABEL( label ),GTK_JUSTIFY_RIGHT );
+ gtk_misc_set_alignment( GTK_MISC( label ),7.45058e-09,7.45058e-09 );
+
+ hseparator4=gtk_hseparator_new();
+ gtk_widget_set_name( hseparator4,"hseparator4" );
+ gtk_widget_ref( hseparator4 );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"hseparator4",hseparator4,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hseparator4 );
+ gtk_box_pack_start( GTK_BOX( vbox5 ),hseparator4,FALSE,TRUE,0 );
+ gtk_widget_set_usize( hseparator4,-2,5 );
+
+ 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 );
+
+ label2=gtk_label_new( "label2" );
+ gtk_widget_set_name( label2,"label2" );
+ gtk_widget_ref( label2 );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"label2",label2,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( label2 );
+ gtk_clist_set_column_widget( GTK_CLIST( SkinList ),0,label2 );
+
+ hseparator5=gtk_hseparator_new();
+ gtk_widget_set_name( hseparator5,"hseparator5" );
+ gtk_widget_ref( hseparator5 );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"hseparator5",hseparator5,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hseparator5 );
+ gtk_box_pack_start( GTK_BOX( vbox5 ),hseparator5,FALSE,TRUE,0 );
+ gtk_widget_set_usize( hseparator5,-2,9 );
+
+ hbuttonbox4=gtk_hbutton_box_new();
+ gtk_widget_set_name( hbuttonbox4,"hbuttonbox4" );
+ gtk_widget_ref( hbuttonbox4 );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"hbuttonbox4",hbuttonbox4,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hbuttonbox4 );
+ gtk_box_pack_start( GTK_BOX( vbox5 ),hbuttonbox4,FALSE,TRUE,0 );
+ gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox4 ),GTK_BUTTONBOX_END );
+ gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox4 ),0 );
+ gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox4 ),80,0 );
+
+ sbOk=gtk_button_new_with_label( langOk );
+ gtk_widget_set_name( sbOk,langOk );
+ gtk_widget_ref( sbOk );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),langOk,sbOk,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( sbOk );
+ gtk_container_add( GTK_CONTAINER( hbuttonbox4 ),sbOk );
+ gtk_widget_set_usize( sbOk,-2,33 );
+ GTK_WIDGET_SET_FLAGS( sbOk,GTK_CAN_DEFAULT );
+
+ Cancel=gtk_button_new_with_label( langCancel );
+ gtk_widget_set_name( Cancel,langCancel );
+ gtk_widget_ref( Cancel );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),langCancel,Cancel,
+ ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( Cancel );
+ gtk_container_add( GTK_CONTAINER( hbuttonbox4 ),Cancel );
+ gtk_widget_set_usize( Cancel,-2,33 );
+ GTK_WIDGET_SET_FLAGS( Cancel,GTK_CAN_DEFAULT );
+
+ gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"destroy",
+ GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"key_release_event",
+ GTK_SIGNAL_FUNC( on_SkinBrowser_key_release_event ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"key_press_event",
+ GTK_SIGNAL_FUNC( on_SkinBrowser_key_press_event ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( SkinList ),"select_row",
+ GTK_SIGNAL_FUNC( on_SkinList_select_row ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( sbOk ),"released",
+ GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),
+ NULL );
+ gtk_signal_connect( GTK_OBJECT( Cancel ),"released",
+ GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),
+ NULL );
+
+ if ( ( sbMPlayerDirInHome=(char *)calloc( 1,strlen( skinDirInHome ) + 2 ) ) != NULL )
+ { strcpy( sbMPlayerDirInHome,skinDirInHome ); strcat( sbMPlayerDirInHome,"/*" ); }
+ if ( ( sbMPlayerPrefixDir=(char *)calloc( 1,strlen( skinMPlayerDir ) + 2 ) ) != NULL )
+ { strcpy( sbMPlayerPrefixDir,skinMPlayerDir ); strcat( sbMPlayerPrefixDir,"/*" ); }
+
+ gtk_widget_grab_focus( SkinList );
+
+ sbItemsList[0]=SkinList;
+ sbItemsList[1]=sbOk;
+ sbItemsList[2]=Cancel;
+
+ return SkinBrowser;
+}
+
+#endif \ No newline at end of file
diff --git a/Gui/mplayer/menu.h b/Gui/mplayer/menu.h
new file mode 100644
index 0000000000..81d776db6b
--- /dev/null
+++ b/Gui/mplayer/menu.h
@@ -0,0 +1,139 @@
+
+unsigned char * mplMenuDrawBuffer = NULL;
+int mplMenuRender = 1;
+int mplMenuItem = -1;
+int mplOldMenuItem = -1;
+int mplMenuX,mplMenuY;
+
+void mplHideMenu( int mx,int my );
+
+void mplMenuDraw( wsParamDisplay )
+{
+ unsigned long * buf = NULL;
+ unsigned long * drw = NULL;
+ unsigned long x,y,tmp;
+
+ if ( !appMPlayer.menuBase.Bitmap.Image ) return;
+ if ( !appMPlayer.menuWindow.Visible ) return;
+
+ if ( mplMenuRender || mplMenuItem != mplOldMenuItem )
+ {
+ memcpy( mplMenuDrawBuffer,appMPlayer.menuBase.Bitmap.Image,appMPlayer.menuBase.Bitmap.ImageSize );
+// ---
+ if ( mplMenuItem != -1 )
+ {
+ buf=(unsigned long *)mplMenuDrawBuffer;
+ drw=(unsigned long *)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 );
+// wsConvert( &appMPlayer.menuWindow,mplMenuDrawBuffer,appMPlayer.menuBase.Bitmap.Height * appMPlayer.menuBase.Bitmap.Width );
+ 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+1;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;
+ }
+ wsPostRedisplay( &appMPlayer.menuWindow );
+}
+
+void mplShowMenu( int mx,int my )
+{
+ int x,y;
+
+ if ( !appMPlayer.menuBase.Bitmap.Image ) return;
+
+ x=mx;
+ if ( x + appMPlayer.menuWindow.Width > wsMaxX ) x=wsMaxX - appMPlayer.menuWindow.Width - 1;
+ y=my;
+ if ( y + appMPlayer.menuWindow.Height > wsMaxY ) y=wsMaxY - appMPlayer.menuWindow.Height - 1;
+
+ mplMenuX=x; mplMenuY=y;
+
+ mplMenuItem = 0;
+
+ wsMoveWindow( &appMPlayer.menuWindow,x,y );
+ wsVisibleWindow( &appMPlayer.menuWindow,wsShowWindow );
+ wsMoveTopWindow( &appMPlayer.menuWindow );
+}
+
+void mplHideMenu( int mx,int my )
+{
+ int x,y,i=mplMenuItem;
+
+ if ( !appMPlayer.menuBase.Bitmap.Image ) return;
+
+ x=mx-mplMenuX;
+ y=my-mplMenuY;
+
+ wsVisibleWindow( &appMPlayer.menuWindow,wsHideWindow );
+
+ if ( ( x < 0 ) || ( y < 0 ) ) return;
+
+ 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 ) )
+ {
+ mplMsgHandle( appMPlayer.MenuItems[i].msg,0 );
+ }
+}
+
+void mplMenuInit( void )
+{
+
+ if ( !appMPlayer.menuBase.Bitmap.Image ) return;
+
+ appMPlayer.menuBase.x=0;
+ appMPlayer.menuBase.y=0;
+
+ if ( ( mplMenuDrawBuffer = calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL )
+ {
+ #ifdef DEBUG
+ dbprintf( 1,langNEMFMR );
+ #endif
+ gtkMessageBox( langNEMFMR );
+ return;
+ }
+
+ wsCreateWindow( &appMPlayer.menuWindow,
+ appMPlayer.menuBase.x,appMPlayer.menuBase.y,appMPlayer.menuBase.width,appMPlayer.menuBase.height,
+ wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsHideFrame|wsMaxSize|wsMinSize|wsHideWindow,"MPlayer menu" );
+
+ #ifdef DEBUG
+ dbprintf( 1,"[menu.h] menu: 0x%x\n",(int)appMPlayer.menuWindow.WindowID );
+ #endif
+
+ appMPlayer.menuWindow.ReDraw=mplMenuDraw;
+// appMPlayer.menuWindow.MouseHandler=mplMenuMouseHandle;
+// appMPlayer.menuWindow.KeyHandler=mplMainKeyHandle;
+
+ wsPostRedisplay( &appMPlayer.menuWindow );
+}
diff --git a/Gui/mplayer/mixer.c b/Gui/mplayer/mixer.c
new file mode 100644
index 0000000000..0178f3dd29
--- /dev/null
+++ b/Gui/mplayer/mixer.c
@@ -0,0 +1,39 @@
+
+#include "play.h"
+
+float mixerGetVolume( void )
+{
+// ---
+// ---
+ return mplShMem->Volume;
+}
+
+void mixerSetVolume( float v )
+{ // 0.0 ... 100.0
+// ---
+printf("%%%%%% mixerSetVolume(%5.3f) \n",v);
+// ---
+ mplShMem->Volume=v;
+}
+
+void mixerIncVolume( void )
+{
+ mixerSetVolume( mixerGetVolume() + 1.0f );
+}
+
+void mixerDecVolume( void )
+{
+ mixerSetVolume( mixerGetVolume() - 1.0f );
+}
+
+void mixerMute( void )
+{
+}
+
+void mixerSetBalance( float b )
+{
+// ---
+// ---
+printf("%%%%%% mixerSetBalance(%5.3f) \n",b);
+ mplShMem->Balance=b;
+}
diff --git a/Gui/mplayer/mixer.h b/Gui/mplayer/mixer.h
new file mode 100644
index 0000000000..990113a214
--- /dev/null
+++ b/Gui/mplayer/mixer.h
@@ -0,0 +1,12 @@
+
+#ifndef _MIXER_H
+#define _MIXER_H
+
+extern float mixerGetVolume( void );
+extern void mixerSetVolume( float v );
+extern void mixerIncVolume( void );
+extern void mixerDecVolume( void );
+extern void mixerMute( void );
+extern void mixerSetBalance( float b );
+
+#endif
diff --git a/Gui/mplayer/mplayer.c b/Gui/mplayer/mplayer.c
new file mode 100644
index 0000000000..6e8cc979ef
--- /dev/null
+++ b/Gui/mplayer/mplayer.c
@@ -0,0 +1,112 @@
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "./mplayer.h"
+#include "../events.h"
+#include "../app.h"
+#include "../skin/skin.h"
+#include "../skin/font.h"
+#include "../wm/ws.h"
+#include "../wm/wskeys.h"
+#include "../wm/widget.h"
+#include "../bitmap/bitmap.h"
+#include "../timer.h"
+#include "../language.h"
+#include "../error.h"
+
+#include "../../config.h"
+
+#define mplMouseTimerConst 100
+#define mplRedrawTimerConst 50
+
+int mplMouseTimer = mplMouseTimerConst;
+int mplRedrawTimer = mplRedrawTimerConst;
+int mplGeneralTimer = -1;
+int mplTimer = 0;
+
+int mplSkinChanged = 0;
+
+void mplMsgHandle( int msg,float param );
+
+#include "widgets.h"
+#include "play.h"
+#include "menu.h"
+#include "mw.h"
+#include "sw.h"
+#include "widget.h"
+
+void mplTimerHandler( int signum )
+{
+ mplTimer++;
+ mplMouseTimer--;
+ mplRedrawTimer--;
+ mplGeneralTimer--;
+ if ( mplMouseTimer == 0 ) mplMsgHandle( evHideMouseCursor,0 );
+ if ( mplRedrawTimer == 0 ) mplMsgHandle( evRedraw,0 );
+ if ( mplGeneralTimer == 0 ) mplMsgHandle( evGeneralTimer,0 );
+}
+
+void mplInit( int argc,char* argv[], char *envp[] )
+{
+// parse_cfgfiles( argc,argv,envp );
+ gtkInit( argc,argv,envp );
+ mplMPlayerInit( argc,argv,envp );
+
+ message=mplErrorHandler;
+
+ wsXInit();
+
+ if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL )
+ {
+ fprintf( stderr,langNEMDB );
+ exit( 0 );
+ }
+
+ wsCreateWindow( &appMPlayer.subWindow,
+ appMPlayer.sub.x,appMPlayer.sub.y,appMPlayer.sub.width,appMPlayer.sub.height,
+ wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsShowFrame|wsShowWindow,"ViDEO" );
+
+ wsCreateWindow( &appMPlayer.mainWindow,
+ appMPlayer.main.x,appMPlayer.main.y,appMPlayer.main.width,appMPlayer.main.height,
+ wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsHideFrame|wsMaxSize|wsMinSize|wsShowWindow,"MPlayer" );
+
+ wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image );
+
+ mplMenuInit();
+
+ #ifdef DEBUG
+ dbprintf( 1,"[main] Depth on screen: %d\n",wsDepthOnScreen );
+ dbprintf( 1,"[main] parent: 0x%x\n",(int)appMPlayer.mainWindow.WindowID );
+ dbprintf( 1,"[main] sub: 0x%x\n",(int)appMPlayer.subWindow.WindowID );
+ #endif
+
+ appMPlayer.mainWindow.ReDraw=mplMainDraw;
+ appMPlayer.mainWindow.MouseHandler=mplMainMouseHandle;
+ appMPlayer.mainWindow.KeyHandler=mplMainKeyHandle;
+
+ appMPlayer.subWindow.ReDraw=mplSubDraw;
+ appMPlayer.subWindow.MouseHandler=mplSubMouseHandle;
+ appMPlayer.subWindow.KeyHandler=mplMainKeyHandle;
+ appMPlayer.subWindow.ReSize=mplResize;
+
+ wsPostRedisplay( &appMPlayer.mainWindow );
+ wsPostRedisplay( &appMPlayer.subWindow );
+
+ btnModify( evSetVolume,mplShMem->Volume );
+ btnModify( evSetBalance,mplShMem->Balance );
+ btnModify( evSetMoviePosition,mplShMem->Position );
+
+ timerSetHandler( mplTimerHandler );
+ timerInit();
+
+ wsMainLoop();
+
+ dbprintf( 1,"[mplayer] exit.\n" );
+
+ mplStop();
+ timerDone();
+ gtkDone();
+ wsXDone();
+}
diff --git a/Gui/mplayer/mplayer.h b/Gui/mplayer/mplayer.h
new file mode 100644
index 0000000000..dc751d1f6c
--- /dev/null
+++ b/Gui/mplayer/mplayer.h
@@ -0,0 +1,19 @@
+
+#ifndef __MYMPLAYERHANDLER
+#define __MYMPLAYERHANDLER
+
+extern int mplSubRender;
+extern int mplMainRender;
+extern int mplGeneralTimer;
+extern int mplSkinChanged;
+
+extern unsigned char * mplDrawBuffer;
+extern unsigned char * mplMenuDrawBuffer;
+extern int mainVisible;
+
+extern int mplMainAutoPlay;
+
+extern void mplInit( int argc,char* argv[], char *envp[] );
+extern void mplMsgHandle( int msg,float param );
+
+#endif
diff --git a/Gui/mplayer/mw.h b/Gui/mplayer/mw.h
new file mode 100644
index 0000000000..b1436a043d
--- /dev/null
+++ b/Gui/mplayer/mw.h
@@ -0,0 +1,526 @@
+
+// main window
+
+#include "mixer.h"
+
+unsigned char * mplDrawBuffer = NULL;
+int mplMainRender = 1;
+int mplMainAutoPlay = 0;
+
+int mainVisible = 1;
+
+int boxMoved = 0;
+int msButton = 0;
+int sx = 0,sy = 0;
+int i,pot = 0;
+
+char * Translate( char * str )
+{
+ static char trbuf[512];
+ char tmp[128];
+ int i,c;
+ int t,h,m,s;
+ memset( trbuf,0,512 );
+ memset( tmp,0,128 );
+ for ( c=0,i=0;i < strlen( str );i++ )
+ {
+ if ( str[i] != '$' ) { trbuf[c++]=str[i]; trbuf[c]=0; }
+ else
+ {
+ switch ( str[++i] )
+ {
+ case 't':
+ if ( mplShMem->Track < 10 ) strcat( trbuf,"0" );
+ sprintf( tmp,"%d",mplShMem->Track ); strcat( trbuf,tmp );
+ break;
+ case 'f':
+ if ( strlen( gtkShMem->fs.filename ) )
+ {
+ int i;
+ strcpy( tmp,gtkShMem->fs.filename );
+ for ( i=0;i < strlen( tmp );i++ )
+ {
+ t=0;
+ if ( ( tmp[i] >= 'A' )&&( tmp[i] <= 'Z' ) ) t=32;
+ tmp[i]=(char)( tmp[i] + t );
+ }
+ if ( tmp[strlen( tmp ) - 4] == '.' ) tmp[strlen( tmp ) - 4]=0;
+ if ( tmp[strlen( tmp ) - 5] == '.' ) tmp[strlen( tmp ) - 5]=0;
+ } else strcpy( tmp,"no file loaded" );
+ strcat( trbuf,tmp );
+ break;
+ case 'F':
+ if ( strlen( gtkShMem->fs.filename ) )
+ {
+ int i;
+ strcpy( tmp,gtkShMem->fs.filename );
+ for ( i=0;i < strlen( tmp );i++ )
+ {
+ char t = 0;
+ if ( ( tmp[i] >= 'a' )&&( tmp[i] <= 'z' ) ) t=32;
+ tmp[i]=tmp[i] - t;
+ }
+ if ( tmp[strlen( tmp ) - 4] == '.' ) tmp[strlen( tmp ) - 4]=0;
+ if ( tmp[strlen( tmp ) - 5] == '.' ) tmp[strlen( tmp ) - 5]=0;
+ } else strcpy( tmp,"NO FILE LOADED" );
+ strcat( trbuf,tmp );
+ break;
+ case 'o':
+ if ( strlen( gtkShMem->fs.filename ) )
+ {
+ strcat( trbuf,gtkShMem->fs.filename );
+ if ( trbuf[strlen( trbuf ) - 4] == '.' ) trbuf[strlen( trbuf ) - 4]=0;
+ if ( trbuf[strlen( trbuf ) - 5] == '.' ) trbuf[strlen( trbuf ) - 5]=0;
+ } else strcat( trbuf,"no file loaded" );
+ break;
+ case '6': t=mplShMem->LengthInSec; goto calclengthhhmmss;
+ case '1': t=mplShMem->TimeSec;
+calclengthhhmmss:
+ s=t%60; t=( t - s ) / 60; m=t%60; h=t/60;
+ sprintf( tmp,"%02d:%02d:%02d",h,m,s ); strcat( trbuf,tmp );
+ break;
+ case '7': t=mplShMem->LengthInSec; goto calclengthmmmmss;
+ case '2': t=mplShMem->TimeSec;
+calclengthmmmmss:
+ s=t%60; m=( ( t - s ) / 60 ) % 60;
+ sprintf( tmp,"%04d:%02d",m,s ); strcat( trbuf,tmp );
+ break;
+ case '3':
+ sprintf( tmp,"%02d",( mplShMem->TimeSec - ( mplShMem->TimeSec % 60 ) ) / 3600 ); strcat( trbuf,tmp );
+ break;
+ case '4':
+ sprintf( tmp,"%02d",( ( mplShMem->TimeSec - ( mplShMem->TimeSec % 60 ) ) / 60 ) % 60 ); strcat( trbuf,tmp );
+ break;
+ case '5':
+ sprintf( tmp,"%02d",mplShMem->TimeSec % 60 ); strcat( trbuf,tmp );
+ break;
+ case 'v':
+ sprintf( tmp,"%3.2f%%",mplShMem->Volume ); strcat( trbuf,tmp );
+ break;
+ case 'V':
+ sprintf( tmp,"%3.1f",mplShMem->Volume ); strcat( trbuf,tmp );
+ break;
+ case 'b':
+ sprintf( tmp,"%3.2f%%",mplShMem->Balance ); strcat( trbuf,tmp );
+ break;
+ case 'B':
+ sprintf( tmp,"%3.1f",mplShMem->Balance ); strcat( trbuf,tmp );
+ break;
+ case 's':
+ if ( mplShMem->Playing == 0 ) strcat( trbuf,"s" );
+ break;
+ case 'l':
+ if ( mplShMem->Playing == 1 ) strcat( trbuf,"p" );
+ break;
+ case 'e':
+ if ( mplShMem->Playing == 2 ) strcat( trbuf,"e" );
+ break;
+ case '$':
+ strcat( trbuf,"$" );
+ break;
+ default: continue;
+ }
+ c=strlen( trbuf );
+ }
+ }
+ return trbuf;
+}
+
+void PutImage( txSample * bf,int x,int y,int max,int ofs )
+{
+ int i=0,ix,iy;
+ unsigned long * buf = NULL;
+ unsigned long * drw = NULL;
+ unsigned long tmp;
+
+ if ( ( !bf )||( bf->Image == NULL ) ) return;
+
+ i=( bf->Width * ( bf->Height / max ) ) * ofs;
+ buf=(unsigned long *)mplDrawBuffer;
+ drw=(unsigned long *)bf->Image;
+
+ for ( iy=y;iy < y+bf->Height / max;iy++ )
+ for ( ix=x;ix < x+bf->Width;ix++ )
+ {
+ tmp=drw[i++];
+ if ( tmp != 0x00ff00ff )
+ buf[ iy*appMPlayer.main.Bitmap.Width+ix ]=tmp;
+ }
+}
+
+void mplMainDraw( wsParamDisplay )
+{
+ wItem * item;
+ txSample * image = NULL;
+ int i;
+ char * tmp;
+
+ if ( appMPlayer.mainWindow.Visible == wsWindowNotVisible ||
+ !mainVisible ||
+ !appMPlayer.mainWindow.Mapped ) return;
+
+ if ( mplMainRender )
+ {
+ memcpy( mplDrawBuffer,appMPlayer.main.Bitmap.Image,appMPlayer.main.Bitmap.ImageSize );
+ for( i=0;i < appMPlayer.NumberOfItems + 1;i++ )
+ {
+ item=&appMPlayer.Items[i];
+ switch( item->type )
+ {
+ case itButton:
+ PutImage( &item->Bitmap,item->x,item->y,3,item->pressed );
+ break;
+ case itHPotmeter:
+ PutImage( &item->Bitmap,item->x,item->y,item->phases,item->phases * ( 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 itPotmeter:
+ PutImage( &item->Bitmap,item->x,item->y,item->phases,
+ item->phases * ( item->value / 100.0f ) );
+ break;
+ case itSLabel:
+ image=fntRender( item->fontid,0,item->width,"%s",item->label );
+ goto drawrenderedtext;
+ case itDLabel:
+ image=fntRender( item->fontid,( mplTimer / 10 )%item->width,item->width,"%s",Translate( item->label ) );
+drawrenderedtext:
+ PutImage( image,item->x,item->y,1,0 );
+ if ( image )
+ {
+ if ( image->Image ) free( image->Image );
+ free( image );
+ }
+ break;
+ }
+ }
+ wsConvert( &appMPlayer.mainWindow,mplDrawBuffer,appMPlayer.main.Bitmap.ImageSize );
+ mplMainRender=0;
+ }
+ wsPutImage( &appMPlayer.mainWindow );
+}
+
+void mplMsgHandle( int msg,float param )
+{
+ int j;
+
+ switch( msg )
+ {
+// --- user events
+ case evExit:
+ wsDoExit();
+ break;
+ case evIconify:
+ wsIconify( appMPlayer.mainWindow );
+ break;
+ case evFullScreen:
+ for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
+ {
+ if ( appMPlayer.Items[j].msg == evFullScreen )
+ {
+ appMPlayer.Items[j].tmp=!appMPlayer.Items[j].tmp;
+ appMPlayer.Items[j].pressed=appMPlayer.Items[j].tmp;
+ }
+ }
+ mplMainRender=1;
+ mplFullScreen();
+ break;
+
+ case evPlaySwitchToPause:
+ if ( Filename )
+ {
+ btnModify( evPlaySwitchToPause,btnDisabled );
+ btnModify( evPauseSwitchToPlay,btnReleased );
+ }
+ if ( mplShMem->Playing == 1 ) goto NoPause;
+ case evPlay:
+ mplMainRender=1;
+ mplPlay();
+ break;
+
+ case evPauseSwitchToPlay:
+ btnModify( evPlaySwitchToPause,btnReleased );
+ btnModify( evPauseSwitchToPlay,btnDisabled );
+ case evPause:
+NoPause:
+ mplMainRender=1;
+ mplPause();
+ break;
+
+ case evStop:
+ btnModify( evPlaySwitchToPause,btnReleased );
+ btnModify( evPauseSwitchToPlay,btnDisabled );
+ mplMainRender=1;
+ mplStop();
+ break;
+
+ case evLoadPlay:
+ mplMainAutoPlay=1;
+ case evLoad:
+ mplMainRender=1;
+ gtkSendMessage( evLoad );
+ break;
+ case evPrev:
+ mplMainRender=1;
+ #ifdef DEBUG
+ dbprintf( 1,"[mw.h] previous stream ...\n" );
+ #endif
+ break;
+ case evNext:
+ mplMainRender=1;
+ #ifdef DEBUG
+ dbprintf( 1,"[mw.h] next stream ...\n" );
+ #endif
+ break;
+
+ case evPlayList:
+ mplMainRender=1;
+ if ( gtkVisiblePlayList )
+ {
+ btnModify( evPlayList,btnReleased );
+ gtkShMem->vs.window=evPlayList;
+ gtkSendMessage( evHideWindow );
+ gtkVisiblePlayList=0;
+ }
+ else
+ {
+ gtkSendMessage( evPlayList );
+ btnModify( evPlayList,btnPressed );
+ gtkVisiblePlayList=1;
+ }
+ break;
+
+ case evSkinBrowser: gtkSendMessage( evSkinBrowser ); break;
+ case evAbout: gtkSendMessage( evAbout ); break;
+ case evPreferences: gtkSendMessage( evPreferences ); 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: mixerIncVolume(); break;
+ case evDecVolume: mixerDecVolume(); break;
+ case evSetVolume: mixerSetVolume( param ); break;
+ case evSetBalance: mixerSetBalance( param ); break;
+ case evMute: mixerMute(); break;
+
+ case evIncAudioBufDelay: mplIncAudioBufDelay(); break;
+ case evDecAudioBufDelay: mplDecAudioBufDelay(); break;
+
+ case evNormalSize: if ( mplShMem->Playing ) wsResizeWindow( &appMPlayer.subWindow,mplwidth,mplheight ); break;
+ case evDoubleSize: if ( mplShMem->Playing ) wsResizeWindow( &appMPlayer.subWindow,mplwidth * 2,mplheight * 2 ); break;
+
+// --- timer events
+ case evHideMouseCursor:
+ wsVisibleMouse( &appMPlayer.subWindow,wsHideMouseCursor );
+ break;
+ case evRedraw:
+ mplMainRender=1;
+ wsPostRedisplay( &appMPlayer.mainWindow );
+ if ( !mplShMem->Playing ) wsPostRedisplay( &appMPlayer.subWindow );
+ XFlush( wsDisplay );
+ mplRedrawTimer=mplRedrawTimerConst;
+ break;
+ case evGeneralTimer:
+ if ( mplMainAutoPlay )
+ {
+ mplMainRender=1;
+ mplMainAutoPlay=0;
+ mplPlay();
+ }
+ break;
+// --- system events
+ case evNone:
+ dbprintf( 1,"[mw] event none received.\n" );
+ break;
+ default:
+ dbprintf( 1,"[mw] unknown event received ( %d,%.2f ).\n",msg,param );
+ break;
+ }
+}
+
+void mplMainMouseHandle( int Button,int X,int Y,int RX,int RY )
+{
+ static int itemtype = 0;
+ static int SelectedButton = -1;
+ wItem * item = NULL;
+ float value = 0.0f;
+ wsVisibleMouse( &appMPlayer.subWindow,wsShowMouseCursor );
+ switch ( Button )
+ {
+ case wsPRMouseButton:
+ mplShowMenu( RX,RY );
+ msButton=wsPRMouseButton;
+ break;
+ case wsRRMouseButton:
+ mplHideMenu( RX,RY );
+ msButton=0;
+ break;
+ case wsPLMouseButton:
+ sx=X; sy=Y;
+ boxMoved=1;
+ msButton=wsPLMouseButton;
+ for ( i=0;i < appMPlayer.NumberOfItems + 1;i++ )
+ {
+ item=&appMPlayer.Items[i];
+ if ( item->pressed != btnDisabled )
+ {
+ switch( item->type )
+ {
+ case itButton:
+ if ( wgIsRect( X,Y,
+ item->x,item->y,
+ item->x+item->width,item->y+item->height ) )
+ {
+ item->pressed=btnPressed;
+ mplMainRender=1;
+ SelectedButton=i;
+ msButton=0;
+ boxMoved=0;
+ }
+ if ( ( SelectedButton > -1 ) &&
+ ( ( ( appMPlayer.Items[SelectedButton].msg == evPlaySwitchToPause && item->msg == evPauseSwitchToPlay ) ) ||
+ ( ( appMPlayer.Items[SelectedButton].msg == evPauseSwitchToPlay && item->msg == evPlaySwitchToPause ) ) ) )
+ {
+ appMPlayer.Items[SelectedButton].pressed=btnDisabled;
+ SelectedButton=i;
+ appMPlayer.Items[SelectedButton].pressed=btnPressed;
+ }
+ itemtype=itButton;
+ break;
+ case itPotmeter:
+ if ( wgIsRect( X,Y,
+ item->x,item->y,
+ item->x+item->width,item->y+item->height ) )
+ {
+ item->pressed=btnPressed;
+ mplMainRender=1;
+ SelectedButton=i;
+ boxMoved=0;
+ msButton=itPotmeter;
+ itemtype=itPotmeter;
+ }
+ break;
+ case itHPotmeter:
+ if ( wgIsRect( X,Y,
+ item->x,item->y,
+ item->x+item->width,item->y+item->height ) )
+ {
+ item->pressed=btnPressed;
+ mplMainRender=1;
+ SelectedButton=i;
+ boxMoved=0;
+ msButton=itHPotmeter;
+ itemtype=itHPotmeter;
+ }
+ break;
+ }
+ }
+ }
+ break;
+ case wsMoveMouse:
+ item=&appMPlayer.Items[SelectedButton];
+ switch ( msButton )
+ {
+ case wsPLMouseButton:
+ wsMoveWindow( &appMPlayer.mainWindow,RX - abs( sx ),RY - abs( sy ) );
+ mplMainRender=0;
+ break;
+ case wsPRMouseButton:
+ mplMenuMouseHandle( X,Y,RX,RY );
+ break;
+ case itPotmeter:
+ value=(float)( X - item->x ) / item->width * 100.0f;
+ goto potihandled;
+ case itHPotmeter:
+ value=(float)( X - item->x ) / item->width * 100.0f;
+potihandled:
+ btnModify( item->msg,value );
+ if ( ( item->msg == evSetVolume )||( item->msg == evSetBalance ) ) mplMsgHandle( item->msg,item->value );
+ mplMainRender=1; wsPostRedisplay( &appMPlayer.mainWindow );
+ break;
+ }
+ break;
+ case wsRLMouseButton:
+ msButton=0;
+ boxMoved=0;
+ item=&appMPlayer.Items[SelectedButton];
+ item->pressed=btnReleased;
+ switch( itemtype )
+ {
+ case itButton:
+ if ( wgIsRect( X,Y,
+ item->x,item->y,
+ item->x+item->width,item->y+item->height ) ) value=0;
+ break;
+ case itPotmeter:
+ case itHPotmeter:
+ btnModify( item->msg,(float)( X - item->x ) / item->width * 100.0f );
+ value=item->value;
+ break;
+ }
+ if ( SelectedButton != -1 ) mplMsgHandle( item->msg,value );
+ SelectedButton=-1;
+ mplMainRender=1;
+ itemtype=0;
+ break;
+ case wsPMMouseButton: break;
+ case wsRMMouseButton: break;
+ }
+ if ( Button != wsMoveMouse ) wsPostRedisplay( &appMPlayer.mainWindow );
+}
+
+int keyPressed = 0;
+
+void mplMainKeyHandle( int State,int Type,int Key )
+{
+ int msg = evNone;
+ switch ( Key )
+ {
+ case '.':
+ case '>': msg=evNext; break;
+ case ',':
+ case '<': msg=evPrev; break;
+
+ case wsx:
+ case wsX:
+ case wsEscape: msg=evExit; break;
+
+ case wsUp: msg=evForward1min; break;
+ case wsDown: msg=evBackward1min; break;
+ case wsRight: msg=evForward10sec; break;
+ case wsLeft: msg=evBackward10sec; break;
+
+ case wsGrayMul: msg=evIncVolume; break;
+ case wsGrayDiv: msg=evDecVolume; break;
+
+ case wsGrayPlus: msg=evIncAudioBufDelay; break;
+ case wsGrayMinus: msg=evDecAudioBufDelay; break;
+
+ case wsEnter: msg=evPlay; break;
+ case wsSpace: msg=evPause; break;
+ case wsa:
+ case wsA: msg=evAbout; break;
+ case wsb:
+ case wsB: msg=evSkinBrowser; break;
+ case wse:
+ case wsE: msg=evEqualeaser; break;
+ case wsf:
+ case wsF: msg=evFullScreen; break;
+ case wsl:
+ case wsL: msg=evLoad; break;
+ case wsm:
+ case wsM: msg=evMute; break;
+ case wss:
+ case wsS: msg=evStop; break;
+ case wsp:
+ case wsP: msg=evPlayList; break;
+ }
+ if ( ( msg != evNone )&&( Type == wsKeyPressed ) )
+ {
+ mplMsgHandle( msg,0 );
+ mplMainRender=1;
+ wsPostRedisplay( &appMPlayer.mainWindow );
+ }
+}
diff --git a/Gui/mplayer/pixmaps/cancel.xpm b/Gui/mplayer/pixmaps/cancel.xpm
new file mode 100644
index 0000000000..c8f0e00b42
--- /dev/null
+++ b/Gui/mplayer/pixmaps/cancel.xpm
@@ -0,0 +1,26 @@
+/* XPM */
+static char * cancel_xpm[] = {
+"55 16 7 1",
+" c None",
+". c #FF0000",
+"+ c #000000",
+"@ c #FF0016",
+"# c #FF0008",
+"$ c #ED0000",
+"% c #F30000",
+" ",
+" .. . ",
+" ... .. ++ ",
+" ... .. ++ ",
+" @.. .. ++ ",
+" ..... ++++ ++++ +++++ ++++ ++++ ++ ",
+" #... ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ",
+" $$. ++ ++++ ++ ++ ++ ++++++ ++ ",
+" .%%. ++ ++ ++ ++ ++ ++ ++ ++ ",
+" ....$ ++ ++ ++ ++ ++ ++ ++ ++ ",
+" .. .. ++ ++ ++ ++ ++ ++ ++ ++ ++ + ++ ",
+" .. .. ++++ +++++ ++ ++ ++++ ++++ ++ ",
+" .. .. ",
+" .. ",
+" ",
+" "};
diff --git a/Gui/mplayer/pixmaps/dir.xpm b/Gui/mplayer/pixmaps/dir.xpm
new file mode 100644
index 0000000000..11c072928a
--- /dev/null
+++ b/Gui/mplayer/pixmaps/dir.xpm
@@ -0,0 +1,43 @@
+/* XPM */
+static char * dir_xpm[] = {
+"16 16 24 1",
+" c None",
+". c #4B4B4B",
+"+ c #A86A14",
+"@ c #A36209",
+"# c #9A6213",
+"$ c #925808",
+"% c #955A08",
+"& c #8C5408",
+"* c #A46714",
+"= c #9D5E09",
+"- c #9E5F09",
+"; c #9B5D09",
+"> c #A5650D",
+", c #A4630A",
+"' c #A9A9A9",
+") c #A4640D",
+"! c #ABABAB",
+"~ c #A76813",
+"{ c #ACACAC",
+"] c #ADADAD",
+"^ c #A8A8A8",
+"/ c #A7A7A7",
+"( c #AAAAAA",
+"_ c #AEAEAE",
+" ",
+" ",
+" ",
+" .... ",
+" .+@@. ",
+" .#$%&..... ",
+" .*=-;>,@,.' ",
+" .)@@@@@@@.! ",
+" .~@@@@@@@.{ ",
+" .,@@@@@@@.' ",
+" .@@@@@@@@.] ",
+" ..........^ ",
+" //^(_^!_// ",
+" ",
+" ",
+" "};
diff --git a/Gui/mplayer/pixmaps/file.xpm b/Gui/mplayer/pixmaps/file.xpm
new file mode 100644
index 0000000000..d861f3ba2c
--- /dev/null
+++ b/Gui/mplayer/pixmaps/file.xpm
@@ -0,0 +1,23 @@
+/* XPM */
+static char * file_xpm[] = {
+"16 16 4 1",
+" c None",
+". c #3D3D3D",
+"+ c #FDC689",
+"@ c #9A9A9A",
+" ",
+" ",
+" .............. ",
+" .++++++++++++.@",
+" .++++++++++++.@",
+" .++..++++..++.@",
+" .+....++....+.@",
+" .+....++....+.@",
+" .++..++++..++.@",
+" .++++++++++++.@",
+" .++++++++++++.@",
+" .++++++++++++.@",
+" ..............@",
+" ..............@",
+" @@@@@@@@@@@@@@",
+" "};
diff --git a/Gui/mplayer/pixmaps/logo.xpm b/Gui/mplayer/pixmaps/logo.xpm
new file mode 100644
index 0000000000..1a733de56a
--- /dev/null
+++ b/Gui/mplayer/pixmaps/logo.xpm
@@ -0,0 +1,215 @@
+/* XPM */
+static char * logo_xpm[] = {
+"100 83 128 2",
+"`` c None",
+"`. c #040b9a",
+"`# c #040ca9",
+"`a c #0611e7",
+"`b c #040db8",
+"`c c #050fd7",
+"`d c #050ec8",
+"`e c #6e719b",
+"`f c #4c51b4",
+"`g c #4349ba",
+"`h c #6669a1",
+"`i c #23299a",
+"`j c #171fbb",
+"`k c #dddddd",
+"`l c #ffffff",
+"`m c #8a8ed5",
+"`n c #3a41c1",
+"`o c #0914db",
+"`p c #1e9fa0",
+"`q c #24bfc0",
+"`r c #2deff1",
+"`s c #31e5e7",
+"`t c #80e6e7",
+"`u c #f1feff",
+"`v c #eff0fe",
+"`w c #7377cc",
+"`x c #0f18d1",
+"`y c #27cfd0",
+"`z c #53e1e2",
+"`A c #4b51c2",
+"`B c #8ff7f8",
+"`C c #c0c2ed",
+"`D c #0c16cf",
+"`E c #abf9fa",
+"`F c #1a22cd",
+"`G c #2adfe0",
+"`H c #dfe0ee",
+"`I c #0f18c3",
+"`J c #65f4f5",
+"`K c #0911ad",
+"`L c #e3fdfe",
+"`M c #555abd",
+"`N c #3aeef0",
+"`O c #bbbbbb",
+"`P c #81f6f7",
+"`Q c #d5fcfd",
+"`R c #aaaaaa",
+"`S c #73f5f6",
+"`T c #9df8f9",
+"`U c #c7fbfc",
+"`V c #21afb0",
+"`W c #389fa0",
+"`X c #35b6b7",
+"`Y c #34c1c2",
+"`Z c #4951ee",
+"`0 c #1721e9",
+"`1 c #3841ec",
+"`2 c #2831eb",
+"`3 c #7b81f3",
+"`4 c #bdc0f9",
+"`5 c #777777",
+"`6 c #666666",
+"`7 c #444444",
+"`8 c #555555",
+".` c #9ca0f6",
+".. c #000000",
+".# c #ced0fb",
+".a c #cccccc",
+".b c #333333",
+".c c #888888",
+".d c #dee0fc",
+".e c #8b90f4",
+".f c #6a71f1",
+".g c #acb0f7",
+".h c #3ae1e3",
+".i c #eeeeee",
+".j c #46d3d5",
+".k c #222222",
+".l c #111111",
+".m c #999999",
+".n c #5961ef",
+".o c #58bec0",
+".p c #64b1b2",
+".q c #7c9596",
+".r c #83cfd0",
+".s c #4bbfc0",
+".t c #2ce1e3",
+".u c #8ccccd",
+".v c #32ccce",
+".w c #b2b5df",
+".x c #78c5c6",
+".y c #161fc9",
+".z c #e2eeee",
+".A c #2bd3d5",
+".B c #4148c7",
+".C c #3bbbbd",
+".D c #484fce",
+".E c #1533dd",
+".F c #4f55d5",
+".G c #2029d4",
+".H c #0c16dd",
+".I c #797ee1",
+".J c #1821da",
+".K c #9296ec",
+".L c #0d17de",
+".M c #1d26d0",
+".N c #2931cd",
+".O c #5359ca",
+".P c #5b61d2",
+".Q c #8b8ec6",
+".R c #2a33de",
+".S c #b7ffbf",
+".T c #ea113c",
+".U c #40d89c",
+".V c #444060",
+".W c #884440",
+".X c #608844",
+".Y c #40ea11",
+".Z c #3c40d8",
+".0 c #9c4440",
+".1 c #608844",
+".2 c #406088",
+".3 c #44409d",
+".4 c #352440",
+".5 c #884c27",
+".6 c #406888",
+".7 c #444088",
+".8 c #b7ffbf",
+"```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````.`a`a`a`a`#``````````````````````````````",
+"```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````c`a`a`a`a`a`a`a`a`a`a`a`a`a``````````````````````````",
+"`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````b`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a``````````````````````",
+"```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````#`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a````````````````````",
+"`````````````````````````````````````````````````````````````````````````````````````````````````````````#`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a``````````````````",
+"```````````````````````````````````````````````````````````````````````````````````````````#`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a``````````````````",
+"`````````````````````````````````````````````````````````````````````````````.`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a````````````````",
+"`````````````````````````````````````````````````````````````````c`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a````````````````",
+"```````````````````````````````````````````````````b`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`c``````````````",
+"`````````````````````````````````````#`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a``````````````",
+"```````````````````````````l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`n`a`a`a`a``````````````",
+"`````````````````r`r`z`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`A`a`a``````````````",
+"`````````````r`r`r`E`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`v`a``````````````",
+"`````````G`r`r`r`B`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`H``````````````",
+"```````r`r`r`r`r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`M````````````",
+"`````y`r`r`r`r`u`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l````````````",
+"`````r`r`r`r`r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l````````````",
+"```r`r`r`r`r`S`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l``````````",
+"```r`r`r`r`r`T`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l``````````",
+"```r`r`r`r`r`U`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l``````````",
+"```r`r`r`r`r`U`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l``````````",
+"`V`r`r`r`r`r`U`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l``````````",
+"```r`r`r`r`r`U`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l``````````",
+"```r`r`r`r`r`U`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l``````````",
+"```r`r`r`r`r`U`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`V````````",
+"```r`r`r`r`r`U`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r````````",
+"```r`r`r`r`r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r````````",
+"```r`r`r`r`r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r````````",
+"```y`r`r`r`r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r````````",
+"`````r`r`r`r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r````````",
+"`````r`r`r`r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r`p``````",
+"`````r`r`r`r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r`r``````",
+"`````r`r`r`r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r`r``````",
+"`````r`r`r`r`l`l`l`l`l`l`l`l`l`a`a`a.``l`l`l`l`a`a`a`a`l`l`l`Z`a`a`a`a`a`a`a`4`l`l`l........`8`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r`r``````",
+"`````r`r`r`r`l`l`l`l`l`l`l`l`4`a`a`a`a`l`l`l.d`a`a`a`a`l`l`l`Z`a`a`a`a`a`a`a`a`4`l`l`l`5....`O`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r`r``````",
+"`````V`r`r`r`l`l`l`l`l`l`l`l`3`a`a`a`a`l`l`l`0`a`a`a`a`l`l`l`Z`a`a`a`3`Z`a`a`a`a`l`l`l`7....`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r`r``````",
+"```````r`r`r`l`l`l`l`l`l`l`l`0`a`a`a`a.f`l`l`a`a`a`a`a`l`l`l`Z`a`a`a`l`l`3`a`a`a`l`l`l......`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r`r``````",
+"```````r`r`r`l`l`l`l`l`l`l`l`a`a`a`a`a`a`l.f`a`a`a`a`a`4`l`l`Z`a`a`a`l`l`3`a`a`a`l`l`l.....k`l`l`l`l`6.....l`k`5.k`l`l.m.....m`l`l`l.l....`l`l`l`l`O.l.....k.i`l.i`8...k`l`l.l..`O`l`l`l`l`l`l`r`r`G````",
+"```````r`r`r`l`l`l`l`l`l`l`l`a`a`a`a`a`a.#`a`a`a`Z`a`a`3`l`l`Z`a`a`a`3`3`a`a`a`a`l`l`k.....m`l`l`l....`7`l.a......`l`O`R.l....`l`l`l.....b`l`l`l.l..`O`l......`l`5.c.....b.l......`l`l`l`l`l`l`r`r`r````",
+"```````r`r`r`l`l`l`l`l`l`l`l`a`a`a`4`a`a`0`a`a`a`3`a`a`Z`l`l`Z`a`a`a`a`a`a`a`a.``l`l`5....`l`l`l......`l`l`l....`5`l`l`l`7....`l`l`k.....m`l`l.l....`l`l......`l`l`l.....l`l.....l`l`l`l`l`l`l`r`r`r````",
+"```````r`r`r`l`l`l`l`l`l`l`4`a`a`a`l`a`a`a`a`a`4`4`a`a`a`l`l`Z`a`a`a`a`a`a`a`3`l`l`l......`l`l.a....`5`l`l.c.....i`l`l`l......`l`l`5....`l`l`l....`7`l.i....`k`l`l`k....`R`l`6`7`l`l`l`l`l`l`l`r`r`r````",
+"```````r`r`r`l`l`l`l`l`l`l.f`a`a`Z`l.f`a`a`a`a`l`l`a`a`a`l`l`Z`a`a`a`l`l`l`l`l`l`l`l......`l`l`7....`O`l`l.k....`l`l`l`l.....k`l`l......`l`l.m...........c`l`l`l`l`5....`l`l`l`l`l`l`l`l`l`l`l`r`r`r````",
+"```````V`r`r`l`l`l`l`l`l`l`a`a`a`3`l`l`a`a`a.f`l`l`a`a`a`l`l`Z`a`a`a`l`l`l`l`l`l`l`l....`5`l`l......`l`l`l......`l`l`l.a....`R`l`l......`l`l`5....`5`l`l`l`l`l`l`l......`l`l`l`l`l`l`l`l`l`l`l`r`r`r````",
+"`````````r`r`l`l`l`l`l`l`l`a`a`a`4`l`l`a`a`a`l`l`l`a`a`a`l`l`Z`a`a`a`l`l`l`l`l`l`l`O....`O`l`l`7....`R`l.i....`7`l`l`l`5.....i`l`5....`8`l`l.i.....l`l`l`l`6`8`l`l......`l`l`l`l`l`l`l`l`l`l`l`r`r`r`y``",
+"`````````r`r`l`l`l`l`l`l`l`a`a`a`l`l`l`4`a`2`l`l`l`a`a`a.g`l`Z`a`a`a`l`l`l`l`l`l`l`k......`7`k`l.......l.b.........c`l.m.........m.....a`l`l`l.b.......k..`8`l`l`l....`5`l`l`l`l`l`l`l`l`l`l`l`r`r`r`r``",
+"`````````r`r`l`l`l`l`l`l`l`4`4`4`l`l`l`l`4`v`l`l`l`4`4`4.d`l.#`4`4`4`l`l`l`l`l`l`l`l`O`7`6.i`l`l`l`5`8`k`l`l`5`5`l`l`l`l.m`8.m`l.b....`l`l`l`l`l`k`8`7`5`l`l`l`l.i`O`O.i`l`l`l`l`l`l`l`l`l`l`l`r`r`r`r``",
+"`````````r`r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l...l`l`l`l....`5`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r`r`r`r``",
+"`````````r`r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l.....k`l.b...b`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r`r`r`r``",
+"`````````y`r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`8........`R`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r`r`r`r``",
+"```````````r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r`r`r`r`V",
+"```````````r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r`r`r`r`r",
+"```````````r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r`r`r`r`r",
+"```````````r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r`r`r`r`r",
+"```````````r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r`r`r`r`r",
+"```````````r`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`r`r`r`r`r",
+"```````````V`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l.``Z`Z`1`Z`3.d`l`l`l`l`l`l`l`l`l`l`l`l`r`r`r`r`r",
+"`````````````l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`3`a`a`a`a`a`a`a`a`a`a`2`l`l`l`l`l`l`l`l`l`l`r`r`r`r`r",
+"`````````````l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`4`a`a`a`a`a`a`a`a`a`a`a`a`a`a`1`l`l`l`l`l`l`l`l`r`r`r`r`r",
+"`````````````l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`Z`a`a`a`a`a`3`v`l`l`l`4`1`a`a`a`a`a`v`l`l`l`l`l`l`r`r`r`r`r",
+"`````````````l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`0`a`a`a`0`l`l`l`l`l`l`l`l`l`l`3`a`a`a`a`v`l`l`l`l`l`r`r`r`r`G",
+"`````````````l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`Z`a`a`a.``l`l`l`l`l`l`l`l`l`l`l`l`l`a`a`a`a`l`l`l`l`l`r`r`r`r``",
+"`````````````l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`4`a`a`a.#`l`l`O...i`l`l`l`l`l`l`l`l`l`l`0`a`a`a`l`l`l.r`r`r`r`q``",
+"```````````````l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`a`a`a.``l`l`l`O.....k`l`l`l`l`l`l`l`l`l`l`a`a`a.``l`l.t`r`r`r````",
+"```````````````l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l.``a`a`0`l`l`l`l`O........`7`l`l`l`l`l`l`l`l.d`a`a`a`l`l`r`r`r``````",
+"``````````````.y`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`a`a`a`v`l`l`l`l`O............`6`l`l`l`l`l`l`l`0`a`a.d.A`r`V````````",
+"```````````````a.D`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`a`a`a`l`l`l`l`l`O.................m`l`l`l`l`l.#`a`a.E`p````````````",
+"`````````````````a.G`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l.g`a`a`3`l`l`l`l`l`O....................`O`l`l`l`l`a`a`a``````````````",
+"`````````````````a`a`a.K`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l`l.n`a`a.d`l`l`l`l`l`O.........................i`l`l`a`a`a``````````````",
+"`````````````````a`a`a`a`a`a.N.O.P.P.P.P.P.P.P.P.P.P.P.P.P.P.P.P.P.P.P.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.R`a`a`l`l`l`l`l`l`O...........................m`l`a`a`a``````````````",
+"`````````````````a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`l`l`l`l`l`l`O......................`7`l`l`l`a`a`a``````````````",
+"```````````````````a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`#```````````#`a`a`l`l`l`l`l`l`O...................l`l`l`l`l`l`a`a`a``````````````",
+"```````````````````a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`d```````````````````````````a`a.g`l`l`l`l`l`O................`O`l`l`l`l`l`l`a`a`a``````````````",
+"`````````````````````a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`#```````````````````````````````````````a`a`2`l`l`l`l`l`O............`5`l`l`l`l`l`l`l`l`a`a`a``````````````",
+"```````````````````````a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`#`````````````````````````````````````````````````````a`a`a`l`l`l`l`l`O.........b`l`l`l`l`l`l`l`l`l.f`a`a````````````````",
+"`````````````````````````a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`d```````````````````````````````````````````````````````````````````b`a`a`3`l`l`l`l`O.......i`l`l`l`l`l`l`l`l`l`l`a`a`a````````````````",
+"`````````````````````````````a`a`a`a`a`a`a`a`a`a`a`a`#`````````````````````````````````````````````````````````````````````````````````a`a`a`l`l`l`l`O..`R`l`l`l`l`l`l`l`l`l`l`l`1`a`a`#````````````````",
+"```````````````````````````````````#`#`#```````````````````````````````````````````````````````````````````````````````````````````````#`a`a`a`l`l`l`k`l`l`l`l`l`l`l`l`l`l`l`l.``a`a`a``````````````````",
+"`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````a`a`a`a`l`l`l`l`l`l`l`l`l`l`l`l`l`l.``a`a`a````````````````````",
+"```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````a`a`a`a.#`l`l`l`l`l`l`l`l`l`l`l`1`a`a`a``````````````````````",
+"`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````a`a`a`a`a.g`l`l`l`l`l`l`l.n`a`a`a`a````````````````````````",
+"```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````c`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a``````````````````````````",
+"```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````a`a`a`a`a`a`a`a`a`a`a`a`#````````````````````````````",
+"```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````.`a`a`a`a`a`a`c``````````````````````````````````"
+};
diff --git a/Gui/mplayer/pixmaps/ok.xpm b/Gui/mplayer/pixmaps/ok.xpm
new file mode 100644
index 0000000000..392c44b04f
--- /dev/null
+++ b/Gui/mplayer/pixmaps/ok.xpm
@@ -0,0 +1,26 @@
+/* XPM */
+static char *ok_xpm[] = {
+"28 16 6 1",
+" c None",
+". c #000000",
+"# c #4b4b4b",
+"a c #8e8e8e",
+"b c #c69c6d",
+"c c #e6e6e6",
+" ",
+" ##c ",
+" #b#c .. ",
+" #bb#c .. ",
+" #bbb#c .. ",
+" #bbbb#c .... .. .. ",
+" #bbbbb#c .. .. .. .. ",
+" #bbbbb#a .. .. .... ",
+" #bbbb#aa .. .. ... ",
+" #bbb#aa .. .. .... ",
+" #bb#aa .. .. .. .. ",
+" #b#aa .... .. .. ",
+" ##aa ",
+" aaa ",
+" ",
+" "
+};
diff --git a/Gui/mplayer/pixmaps/up.xpm b/Gui/mplayer/pixmaps/up.xpm
new file mode 100644
index 0000000000..f09925c40b
--- /dev/null
+++ b/Gui/mplayer/pixmaps/up.xpm
@@ -0,0 +1,52 @@
+/* XPM */
+static char * up_xpm[] = {
+"16 16 33 1",
+" c None",
+". c #121212",
+"+ c #222222",
+"@ c #131313",
+"# c #181818",
+"$ c #1B1B1B",
+"% c #070707",
+"& c #232323",
+"* c #191919",
+"= c #A7A7A7",
+"- c #161616",
+"; c #4B4B4B",
+"> c #A86A14",
+", c #A36209",
+"' c #9A6213",
+") c #925808",
+"! c #955A08",
+"~ c #8C5408",
+"{ c #A46714",
+"] c #9D5E09",
+"^ c #9E5F09",
+"/ c #9B5D09",
+"( c #A5650D",
+"_ c #A4630A",
+": c #A9A9A9",
+"< c #A4640D",
+"[ c #ABABAB",
+"} c #A76813",
+"| c #ACACAC",
+"1 c #ADADAD",
+"2 c #A8A8A8",
+"3 c #AAAAAA",
+"4 c #AEAEAE",
+" . ",
+" +@ ",
+" @##$%$& ",
+" *===.#= ",
+" *= -= ",
+" *= = ",
+" ;;;; *= ",
+" ;>,,; = ",
+" ;')!~;;;;; ",
+" ;{]^/(_,_;: ",
+" ;<,,,,,,,;[ ",
+" ;},,,,,,,;| ",
+" ;_,,,,,,,;: ",
+" ;,,,,,,,,;1 ",
+" ;;;;;;;;;;2 ",
+" ==2342[4== "};
diff --git a/Gui/mplayer/play.c b/Gui/mplayer/play.c
new file mode 100644
index 0000000000..340bda2fbd
--- /dev/null
+++ b/Gui/mplayer/play.c
@@ -0,0 +1,138 @@
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <unistd.h>
+#include <signal.h>
+
+int mplParent = 1;
+
+int mplx,mply,mplwidth,mplheight;
+
+#include "../app.h"
+
+#include "../wm/ws.h"
+#include "../wm/wskeys.h"
+#include "../wm/widget.h"
+
+#include "../../config.h"
+
+#include "widgets.h"
+#include "./mplayer.h"
+#include "psignal.h"
+#include "play.h"
+
+mplCommStruct * mplShMem;
+char * Filename = NULL;
+
+void mplPlayerThread( void )
+{
+// mplayer( 0,NULL,NULL );
+}
+
+void mplFullScreen( void )
+{
+ if ( appMPlayer.subWindow.isFullScreen )
+ {
+ if ( mplShMem->Playing )
+ {
+ appMPlayer.subWindow.OldX=mplx;
+ appMPlayer.subWindow.OldY=mply;
+ appMPlayer.subWindow.OldWidth=mplwidth;
+ appMPlayer.subWindow.OldHeight=mplheight;
+ }
+ else
+ {
+ appMPlayer.subWindow.OldWidth=appMPlayer.sub.width;
+ appMPlayer.subWindow.OldHeight=appMPlayer.sub.height;
+ appMPlayer.subWindow.OldX=( wsMaxX - appMPlayer.sub.width ) / 2;
+ appMPlayer.subWindow.OldY=( wsMaxY - appMPlayer.sub.height ) / 2;
+ }
+ }
+ wsFullScreen( &appMPlayer.subWindow );
+ wsMoveTopWindow( &appMPlayer.subWindow );
+}
+
+extern int mplSubRender;
+
+void mplStop()
+{
+ if ( !mplShMem->Playing ) return;
+// ---
+printf("%%%%%% STOP \n");
+// ---
+ mplShMem->Playing=0;
+}
+
+void mplPlay( void )
+{
+ if ( !Filename ) return;
+ if ( mplShMem->Playing ) mplStop();
+// ---
+printf("%%%%%% PLAY \n");
+// ---
+ mplShMem->Playing=1;
+}
+
+void mplPause( void )
+{
+ if ( mplShMem->Playing != 1 ) return;
+// ---
+printf("%%%%%% PAUSE \n");
+// ---
+ mplShMem->Playing=2;
+}
+
+void mplResize( unsigned int X,unsigned int Y,unsigned int width,unsigned int height )
+{
+}
+
+void mplMPlayerInit( int argc,char* argv[], char *envp[] )
+{
+ mplShMem=shmem_alloc( ShMemSize );
+ signal( SIGTYPE,mplMainSigHandler );
+ signal( SIGCHLD,SIG_IGN );
+
+ mplShMem->Playing=0;
+ mplShMem->Volume=0.0f;
+ mplShMem->Position=0.0f;
+ mplShMem->Balance=50.0f;
+ mplShMem->Track=0;
+ mplShMem->AudioType=0;
+ mplShMem->StreamType=0;
+ mplShMem->TimeSec=0;
+ mplShMem->LengthInSec=0;
+
+// ---
+// ---
+}
+
+float mplGetPosition( void )
+{ // return 0.0 ... 100.0
+ return mplShMem->Position;
+}
+
+void mplRelSeek( float s )
+{ // -+s
+// ---
+printf("%%%%%% RelSEEK=%5.3f \n",s);
+// ---
+ mplShMem->Position=mplGetPosition() + s;
+}
+
+void mplAbsSeek( float s )
+{ // 0.0 ... 100.0
+// ---
+printf("%%%%%% AbsSEEK=%5.3f \n",s);
+// ---
+ mplShMem->Position=s;
+ mplShMem->TimeSec=s;
+}
+
+void mplIncAudioBufDelay( void )
+{
+}
+
+void mplDecAudioBufDelay( void )
+{
+}
diff --git a/Gui/mplayer/play.h b/Gui/mplayer/play.h
new file mode 100644
index 0000000000..887a51d049
--- /dev/null
+++ b/Gui/mplayer/play.h
@@ -0,0 +1,80 @@
+
+#ifndef __GUI_PLAY_H
+#define __GUI_PLAY_H
+
+#include "./psignal.h"
+
+typedef struct
+{
+ int x;
+ int y;
+ int width;
+ int height;
+} mplResizeStruct;
+
+typedef struct
+{
+ int signal;
+ char module[512];
+} mplUnknowErrorStruct;
+
+typedef struct
+{
+ int seek;
+ int format;
+ int width;
+ int height;
+ char codecdll[128];
+} mplVideoStruct;
+
+typedef struct
+{
+ int message;
+ mplResizeStruct resize;
+ mplVideoStruct videodata;
+ mplUnknowErrorStruct error;
+
+ int Playing;
+ float Volume;
+ float Position;
+ float Balance;
+ int Track;
+ int AudioType;
+ int StreamType;
+ int TimeSec;
+ int LengthInSec;
+} mplCommStruct;
+
+extern mplCommStruct * mplShMem;
+extern char * Filename;
+
+extern int mplParent;
+
+extern int mplx;
+extern int mply;
+extern int mplwidth;
+extern int mplheight;
+
+extern mplCommStruct * mplShMem;
+
+extern void mplMPlayerInit( int argc,char* argv[], char *envp[] );
+
+extern void mplStop();
+extern void mplFullScreen( void );
+extern void mplPlay( void );
+extern void mplPause( void );
+extern void mplResize( unsigned int X,unsigned int Y,unsigned int width,unsigned int height );
+
+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 mplSendMessage( int msg );
+extern void mplPlayerThread( void );
+
+#endif \ No newline at end of file
diff --git a/Gui/mplayer/psignal.c b/Gui/mplayer/psignal.c
new file mode 100644
index 0000000000..4b93e96926
--- /dev/null
+++ b/Gui/mplayer/psignal.c
@@ -0,0 +1,292 @@
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <signal.h>
+#include <unistd.h>
+
+#include "widgets.h"
+#include "play.h"
+
+#include "../app.h"
+
+#include "../skin/skin.h"
+#include "../wm/ws.h"
+#include "../config.h"
+#include "../error.h"
+#include "../language.h"
+
+#include "../../config.h"
+
+#include "./mplayer.h"
+
+#define gtkShow( w ) gtkShMem->vs.window=w; gtkSendMessage( evShowWindow );
+
+pid_t mplMPlayerPID = 0;
+pid_t mplParentPID = 0;
+
+pid_t gtkChildPID = 0;
+pid_t gtkParentPID = 0;
+
+int mplCriticalError = 0;
+int gtkIsOk = 0;
+
+void mplErrorHandler( int critical,const char * format, ... )
+{
+ char * p;
+ va_list ap;
+ int n;
+
+ if ( (p=(char *)malloc( 512 ) ) == NULL ) return;
+ va_start( ap,format );
+ n=vsnprintf( p,512,format,ap );
+ va_end( ap );
+ mplCriticalError=critical;
+ gtkMessageBox( p );
+// message( False,p );
+}
+
+void mplPlayerSigHandler( int s )
+{
+ #ifdef DEBUG
+ dbprintf( 5,"[psignal] mpl sig handler msg: %d\n",mplShMem->message );
+ #endif
+ if ( s != SIGTYPE ) return;
+ switch ( mplShMem->message )
+ {
+ case mplQuit:
+// exit_player( "Quit" );
+ break;
+ case mplPauseEvent:
+// if ( osd_function != OSD_PAUSE ) osd_function=OSD_PAUSE;
+// else osd_function=OSD_PLAY;
+ break;
+ case mplResizeEvent:
+// vo_resize=1;
+// vo_expose=1;
+// dbprintf( 2,"[psignal] resize.\n" );
+// if (video_out != NULL ) video_out->check_events();
+ break;
+ case mplExposeEvent:
+// vo_expose=1;
+// if (video_out != NULL ) video_out->check_events();
+ break;
+ case mplSeekEvent:
+// rel_seek_secs+=mplShMem->videodata.seek;
+// if ( rel_seek_secs > 0 ) osd_function=OSD_FFW;
+// else osd_function=OSD_REW;
+ break;
+ case mplIncAudioBufferDelay:
+// audio_delay+=0.1; // increase audio buffer delay
+// a_frame-=0.1;
+ break;
+ case mplDecAudioBufferDelay:
+// audio_delay-=0.1; // increase audio buffer delay
+// a_frame+=0.1;
+ break;
+ }
+ mplShMem->message=0;
+}
+
+void gtkSigHandler( int s )
+{
+ if ( s != SIGTYPE ) return;
+ #ifdef DEBUG
+ dbprintf( 5,"[psignal] gtk sig handler msg: %d\n",gtkShMem->message );
+ #endif
+ switch ( gtkShMem->message )
+ {
+ case evHideWindow:
+ switch ( gtkShMem->vs.window )
+ {
+ case evPlayList: gtk_widget_hide( PlayList ); gtkVisiblePlayList=0; break;
+ case evSkinBrowser: gtk_widget_hide( SkinBrowser ); gtkVisibleSkinBrowser=0; break;
+ case evLoad: gtk_widget_hide( FileSelect ); gtkVisibleFileSelect=0; break;
+ }
+ break;
+ case evSkinBrowser:
+ if ( gtkVisibleSkinBrowser ) gtk_widget_hide( SkinBrowser );
+ gtkClearList( SkinList );
+ if ( !gtkFillSkinList( sbMPlayerPrefixDir ) ) break;
+ if ( gtkFillSkinList( sbMPlayerDirInHome ) )
+ {
+ gtkSetDefaultToCList( SkinList,cfgSkin );
+ gtk_widget_show( SkinBrowser );
+ gtkVisibleSkinBrowser=1;
+ gtkShow( evSkinBrowser );
+ }
+ break;
+ case evPreferences:
+ if ( gtkVisibleOptions ) gtk_widget_hide( Options );
+ gtk_widget_show( Options );
+ gtkVisibleOptions=1;
+ break;
+ case evPlayList:
+ if ( gtkVisiblePlayList ) gtk_widget_hide( PlayList );
+ gtk_widget_show( PlayList );
+ gtkVisiblePlayList=1;
+ gtkShow( evPlayList );
+ break;
+ case evLoad:
+ if ( gtkVisibleFileSelect ) gtk_widget_hide( FileSelect );
+ gtk_widget_show( FileSelect );
+ gtkVisibleFileSelect=1;
+ gtkShow( evPlay );
+ break;
+ case evMessageBox:
+ gtk_label_set_text( gtkMessageBoxText,(char *)gtkShMem->mb.str );
+ gtk_widget_set_usize( MessageBox,gtkShMem->mb.sx,gtkShMem->mb.sy );
+ gtk_widget_set_usize( gtkMessageBoxText,gtkShMem->mb.tsx,gtkShMem->mb.tsy );
+ if ( gtkVisibleMessageBox ) gtk_widget_hide( MessageBox );
+ gtk_widget_show( MessageBox );
+ gtkVisibleMessageBox=1;
+ break;
+ case evAbout:
+ if ( gtkVisibleAboutBox ) gtk_widget_hide( AboutBox );
+ gtk_widget_show( AboutBox );
+ gtkVisibleAboutBox=1;
+ break;
+ case evExit:
+ gtkExit();
+ break;
+ }
+ gtkShMem->message=0;
+}
+
+listItems tmpList;
+
+void mplMainSigHandler( int s )
+{
+ #ifdef DEBUG
+ if ( gtkShMem->message ) dbprintf( 5,"[psignal] main sig handler gtk msg: %d\n",gtkShMem->message );
+ if ( mplShMem->message ) dbprintf( 5,"[psignal] main sig handler mpl msg: %d\n",mplShMem->message );
+ #endif
+
+ if ( s != SIGTYPE ) return;
+
+ switch ( gtkShMem->message )
+ {
+ case evGtkIsOk:
+ #ifdef DEBUG
+ dbprintf( 1,"[psignal] gtk is ok.\n" );
+ #endif
+ gtkIsOk=True;
+ break;
+ case evShowWindow:
+ switch ( gtkShMem->vs.window )
+ {
+ case evPlayList: gtkVisiblePlayList=1; break;
+ case evLoad: gtkVisibleFileSelect=1; break;
+ case evSkinBrowser: gtkVisibleSkinBrowser=1; break;
+ }
+ break;
+ case evHideWindow:
+ switch ( gtkShMem->vs.window )
+ {
+ case evPlayList:
+ btnModify( evPlayList,btnReleased ); gtkVisiblePlayList=0;
+ mplMainRender=1; wsPostRedisplay( &appMPlayer.mainWindow );
+ break;
+ case evSkinBrowser: gtkVisibleSkinBrowser=0; break;
+ case evLoad: gtkVisibleFileSelect=0; break;
+ }
+ break;
+ case evSkinBrowser:
+ if ( strcmp( cfgSkin,gtkShMem->sb.name ) )
+ {
+ int ret;
+ #ifdef DEBUG
+ dbprintf( 1,"[psignal] skin: %s\n",gtkShMem->sb.name );
+ #endif
+
+ mainVisible=0;
+
+ appInitStruct( &tmpList );
+ skinAppMPlayer=&tmpList;
+ ret=skinRead( gtkShMem->sb.name );
+
+ appInitStruct( &tmpList );
+ skinAppMPlayer=&appMPlayer;
+ appInitStruct( &appMPlayer );
+ if ( !ret ) strcpy( cfgSkin,gtkShMem->sb.name );
+ skinRead( cfgSkin );
+
+ if ( ret )
+ {
+ mainVisible=1;
+ break;
+ }
+
+// appCopy( &appMPlayer,&tmpList );
+// appInitStruct( &tmpList );
+// skinAppMPlayer=&appMPlayer;
+// strcpy( cfgSkin,gtkShMem->sb.name );
+
+ if ( mplDrawBuffer ) free( mplDrawBuffer );
+ if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL )
+ { message( False,langNEMDB ); break; }
+ wsResizeWindow( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
+ wsMoveWindow( &appMPlayer.mainWindow,appMPlayer.main.x,appMPlayer.main.y );
+ wsResizeImage( &appMPlayer.mainWindow );
+ wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image );
+ mainVisible=1; mplMainRender=1; wsPostRedisplay( &appMPlayer.mainWindow );
+ btnModify( evSetVolume,mplShMem->Volume );
+ btnModify( evSetBalance,mplShMem->Balance );
+ btnModify( evSetMoviePosition,mplShMem->Position );
+
+ if ( appMPlayer.menuBase.Bitmap.Image )
+ {
+ if ( mplMenuDrawBuffer ) free( mplMenuDrawBuffer );
+ if ( ( mplMenuDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL )
+ { message( False,langNEMDB ); break; }
+ wsResizeWindow( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height );
+ wsResizeImage( &appMPlayer.menuWindow );
+ }
+
+ mplSkinChanged=1;
+ if ( !mplShMem->Playing )
+ {
+ mplSkinChanged=0;
+ if ( appMPlayer.subWindow.isFullScreen ) wsFullScreen( &appMPlayer.subWindow );
+ wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height );
+ wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
+ if ( appMPlayer.sub.Bitmap.Image ) wsResizeImage( &appMPlayer.subWindow );
+ mplSubRender=1; wsPostRedisplay( &appMPlayer.subWindow );
+ }
+ }
+ break;
+ case evFileLoaded:
+ if ( Filename ) free( Filename );
+ Filename=(char *)malloc( strlen( gtkShMem->fs.dir ) + strlen( gtkShMem->fs.filename ) + 2 );
+ strcpy( Filename,gtkShMem->fs.dir ); strcat( Filename,"/" ); strcat( Filename,gtkShMem->fs.filename );
+ if ( mplMainAutoPlay ) mplGeneralTimer=1;
+ break;
+ case evMessageBox:
+ if ( mplCriticalError )
+ { gtkSendMessage( evExit ); exit( 1 ); }
+ mplCriticalError=0;
+ break;
+ }
+
+// switch( mplShMem->message )
+// {
+// }
+ gtkShMem->message=0;
+ mplShMem->message=0;
+}
+
+void mplSendMessage( int msg )
+{
+ if ( !mplShMem->Playing ) return;
+ mplShMem->message=msg;
+ kill( mplMPlayerPID,SIGTYPE ); usleep( 10 );
+ kill( mplMPlayerPID,SIGTYPE ); usleep( 10 );
+ kill( mplMPlayerPID,SIGTYPE );
+}
+
+void gtkSendMessage( int msg )
+{
+ if ( !gtkIsOk ) return;
+ gtkShMem->message=msg;
+ kill( gtkChildPID,SIGTYPE );
+}
diff --git a/Gui/mplayer/psignal.h b/Gui/mplayer/psignal.h
new file mode 100644
index 0000000000..66461ea719
--- /dev/null
+++ b/Gui/mplayer/psignal.h
@@ -0,0 +1,61 @@
+
+#ifndef __GUI_SIGNAL
+#define __GUI_SIGNAL
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <signal.h>
+
+#define mplNoneEvent 0
+#define mplResizeEvent 1
+#define mplQuit 2
+#define mplPauseEvent 3
+#define mplEndOfFile 4
+#define mplExposeEvent 5
+#define mplSetVideoData 6
+#define mplAudioError 7
+#define mplUnknowError 8
+#define mplSeekEvent 9
+#define mplUnknowFileType 10
+#define mplCodecConfNotFound 11
+#define mplErrorDVDKeyProcess 12
+#define mplErrorDVDAuth 13
+#define mplErrorAVINI 14
+#define mplAVIErrorMissingVideoStream 15
+#define mplASFErrorMissingVideoStream 16
+#define mplMPEGErrorSeqHeaderSearch 17
+#define mplErrorShMemAlloc 18
+#define mplMPEGErrorCannotReadSeqHeader 19
+#define mplMPEGErrorBadSeqHeader 20
+#define mplMPEGErrorCannotReadSeqHeaderExt 21
+#define mplMPEGErrorBadSeqHeaderExt 22
+#define mplCantFindCodecForVideoFormat 23
+#define mplIncompatibleVideoOutDevice 24
+#define mplCompileWithoutDSSupport 25
+#define mplDSCodecNotFound 26
+#define mplCantInitVideoDriver 27
+#define mplIncAudioBufferDelay 28
+#define mplDecAudioBufferDelay 29
+
+#define SIGTYPE _NSIG - 1
+
+extern int gtkIsOk;
+
+extern pid_t mplMPlayerPID;
+extern pid_t mplParentPID;
+
+extern pid_t gtkChildPID;
+extern pid_t gtkParentPID;
+
+extern void gtkSigHandler( int s );
+extern void mplPlayerSigHandler( int s );
+extern void mplMainSigHandler( int s );
+
+extern void mplSendMessage( int msg );
+extern void gtkSendMessage( int msg );
+
+extern void mplErrorHandler( int critical,const char * format, ... );
+
+#endif \ No newline at end of file
diff --git a/Gui/mplayer/sw.h b/Gui/mplayer/sw.h
new file mode 100644
index 0000000000..8d77c4625f
--- /dev/null
+++ b/Gui/mplayer/sw.h
@@ -0,0 +1,69 @@
+
+// sub window
+
+int mplSubRender = 1;
+int mplSubMoved = 0;
+
+void mplSubDraw( wsParamDisplay )
+{
+ if ( !appMPlayer.subWindow.Visible || mplShMem->Playing )
+ {
+ mplSendMessage( mplExposeEvent );
+ return;
+ }
+
+ if ( mplSubRender )
+ {
+ wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
+ wsClearWindow( appMPlayer.subWindow );
+ if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
+ mplSubRender=0;
+ }
+ if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow );
+ XFlush( wsDisplay );
+ XSync( wsDisplay,False );
+}
+
+void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY )
+{
+ mplMouseTimer=mplMouseTimerConst;
+ wsVisibleMouse( &appMPlayer.subWindow,wsShowMouseCursor );
+
+ switch( Button )
+ {
+ case wsPRMouseButton:
+ mplShowMenu( RX,RY );
+ msButton=wsPRMouseButton;
+ break;
+ case wsRRMouseButton:
+ mplHideMenu( RX,RY );
+ msButton=0;
+ break;
+ case wsPLMouseButton:
+ sx=X; sy=Y;
+ msButton=wsPLMouseButton;
+ mplSubMoved=0;
+ break;
+ case wsMoveMouse:
+ switch ( msButton )
+ {
+ case wsPLMouseButton:
+ mplSubMoved=1;
+ wsMoveWindow( &appMPlayer.subWindow,RX - sx,RY - sy );
+ break;
+ case wsPRMouseButton:
+ mplMenuMouseHandle( X,Y,RX,RY );
+ mplMouseTimer=mplMouseTimerConst;
+ break;
+ }
+ break;
+ case wsRLMouseButton:
+ if ( !mplSubMoved ) wsMoveTopWindow( &appMPlayer.mainWindow );
+ msButton=0;
+ mplSubMoved=0;
+ break;
+ }
+}
+
+//void mplSubResizeHandle( unsigned int X,unsigned int Y,unsigned int width,unsigned int height )
+//{ mplResize( X,Y,width,height ); } \ No newline at end of file
diff --git a/Gui/mplayer/widgets.c b/Gui/mplayer/widgets.c
new file mode 100644
index 0000000000..f877ec183c
--- /dev/null
+++ b/Gui/mplayer/widgets.c
@@ -0,0 +1,139 @@
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <signal.h>
+
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+
+#include "widgets.h"
+
+#include "./mplayer.h"
+#include "psignal.h"
+#include "../events.h"
+
+#include "../../config.h"
+#include "../error.h"
+
+#include "pixmaps/up.xpm"
+#include "pixmaps/dir.xpm"
+#include "pixmaps/file.xpm"
+#include "pixmaps/logo.xpm"
+
+GtkWidget * SkinBrowser;
+GtkWidget * PlayList;
+GtkWidget * FileSelect;
+GtkWidget * MessageBox;
+GtkWidget * AboutBox;
+GtkWidget * Options;
+
+int gtkVisibleSkinBrowser = 0;
+int gtkVisiblePlayList = 0;
+int gtkVisibleFileSelect = 0;
+int gtkVisibleMessageBox = 0;
+int gtkVisibleAboutBox = 0;
+int gtkVisibleOptions = 0;
+
+gtkCommStruct * gtkShMem;
+
+#include "gtk/sb.h"
+#include "gtk/pl.h"
+#include "gtk/fs.h"
+#include "gtk/mb.h"
+#include "gtk/about.h"
+#include "gtk/opts.h"
+
+void widgetsCreate( void )
+{
+ AboutBox=create_About();
+ SkinBrowser=create_SkinBrowser();
+ PlayList=create_PlayList();
+ FileSelect=create_FileSelect();
+ MessageBox=create_MessageBox();
+ Options=create_Options();
+}
+
+int gtkParent = 1;
+
+// --- forked function
+
+static void gtkThreadProc( int argc,char * argv[] )
+{
+ gtk_set_locale();
+ gtk_init( &argc,&argv );
+ gdk_set_use_xshm( TRUE );
+
+ widgetsCreate();
+
+ gtkParentPID=getpid();
+ gtkChildPID=getppid();
+ gtkParent=0;
+
+ signal( SIGTYPE,gtkSigHandler );
+
+ gtkIsOk=True;
+ gtkSendMessage( evGtkIsOk );
+
+ gtk_main();
+ dbprintf( 6,"[gtk] exit.\n" );
+ exit( 0 );
+}
+
+// --- init & close gtk
+
+void gtkInit( int argc,char* argv[], char *envp[] )
+{
+ gtkParentPID=getpid();
+ gtkShMem=shmem_alloc( ShMemSize );
+ if ( ( gtkChildPID = fork() ) == 0 ) gtkThreadProc( argc,argv );
+}
+
+void gtkDone( void )
+{
+ kill( gtkChildPID,SIGKILL );
+ usleep( 1000 );
+}
+
+void gtkMessageBox( gchar * str )
+{
+ gtkShMem->mb.sx=420; gtkShMem->mb.sy=128;
+ gtkShMem->mb.tsx=384; gtkShMem->mb.tsy=77;
+ if ( strlen( str ) > 200 )
+ {
+ gtkShMem->mb.sx=512;
+ gtkShMem->mb.sy=128;
+ gtkShMem->mb.tsx=476;
+ gtkShMem->mb.tsy=77;
+ }
+ strcpy( gtkShMem->mb.str,str );
+ gtkSendMessage( evMessageBox );
+}
+
+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 gtkExit( void )
+{ gtk_main_quit(); }
diff --git a/Gui/mplayer/widgets.h b/Gui/mplayer/widgets.h
new file mode 100644
index 0000000000..717272f8d8
--- /dev/null
+++ b/Gui/mplayer/widgets.h
@@ -0,0 +1,85 @@
+
+#ifndef __MY_WIDGET
+#define __MY_WIDGET
+
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+
+#include "../shmem.h"
+
+typedef struct
+{
+ char dir[ 1024 ];
+ char filename[ 1024 ];
+} gtkFileSelectorStruct;
+
+typedef struct
+{
+ int sx;
+ int sy;
+ int tsx;
+ int tsy;
+ char str[512];
+} gtkMessageBoxStruct;
+
+typedef struct
+{
+ char name[128];
+} gtkSkinStruct;
+
+typedef struct
+{
+ int window;
+} gtkVisibleStruct;
+
+typedef struct
+{
+ int i;
+} gtkOptionsStruct;
+
+typedef struct
+{
+ int message;
+ gtkFileSelectorStruct fs;
+ gtkMessageBoxStruct mb;
+ gtkSkinStruct sb;
+ gtkVisibleStruct vs;
+ gtkOptionsStruct op;
+} gtkCommStruct;
+
+#define ShMemSize sizeof( gtkCommStruct )
+
+extern gtkCommStruct * gtkShMem;
+
+extern GtkWidget * SkinBrowser;
+extern GtkWidget * PlayList;
+extern GtkWidget * FileSelect;
+extern GtkWidget * MessageBox;
+extern GtkWidget * AboutBox;
+extern GtkWidget * Options;
+
+extern GtkWidget * SkinList;
+extern GtkWidget * gtkMessageBoxText;
+
+extern int gtkVisibleSkinBrowser;
+extern int gtkVisiblePlayList;
+extern int gtkVisibleFileSelect;
+extern int gtkVisibleMessageBox;
+extern int gtkVisibleAboutBox;
+extern int gtkVisibleOptions;
+
+extern char * sbMPlayerDirInHome;
+extern char * sbMPlayerPrefixDir;
+
+extern void widgetsCreate( void );
+
+extern void gtkInit( int argc,char* argv[], char *envp[] );
+extern void gtkDone( void );
+extern void gtkMessageBox( gchar * str );
+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 gtkExit( void );
+
+#endif \ No newline at end of file