[Mplayer-cvslog] CVS: main/Gui Makefile,1.21,1.22 app.c,1.19,1.20 app.h,1.16,1.17 cfg.c,1.30,1.31 cfg.h,1.12,1.13 interface.c,1.72,1.73

Zoltan Ponekker pontscho at mplayerhq.hu
Fri Jan 17 23:40:11 CET 2003


Update of /cvsroot/mplayer/main/Gui
In directory mail:/var/tmp.root/cvs-serv29898/Gui

Modified Files:
	Makefile app.c app.h cfg.c cfg.h interface.c 
Log Message:


 - add playbar
 - add vpotmeter
 - fix gtk menu's pixel bug
 - fix some critical (10l) bug


Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/Makefile,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- Makefile	25 Nov 2002 02:19:26 -0000	1.21
+++ Makefile	17 Jan 2003 22:39:38 -0000	1.22
@@ -16,7 +16,7 @@
 
 SRCS = wm/ws.c wm/wsxdnd.c app.c interface.c cfg.c bitmap.c \
 	skin/skin.c skin/font.c skin/cut.c \
-	mplayer/widgets.c mplayer/play.c mplayer/mw.c mplayer/sw.c mplayer/menu.c \
+	mplayer/widgets.c mplayer/play.c mplayer/mw.c mplayer/sw.c mplayer/menu.c mplayer/pb.c mplayer/common.c \
 	mplayer/gtk/menu.c mplayer/gtk/mb.c mplayer/gtk/about.c mplayer/gtk/pl.c mplayer/gtk/sb.c mplayer/gtk/fs.c mplayer/gtk/opts.c mplayer/gtk/url.c mplayer/gtk/eq.c mplayer/gtk/common.c
 OBJS = $(SRCS:.c=.o)
 

Index: app.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/app.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- app.c	13 Jan 2003 23:38:34 -0000	1.19
+++ app.c	17 Jan 2003 22:39:38 -0000	1.20
@@ -109,7 +109,6 @@
 
  memcpy( &dest->main,&source->main,sizeof( wItem ) );
  memcpy( &dest->sub,&source->sub,sizeof( wItem ) );
- memcpy( &dest->eq,&source->eq,sizeof( wItem ) );
  memcpy( &dest->menuBase,&source->menuBase,sizeof( wItem ) );
  memcpy( &dest->menuSelected,&source->menuSelected,sizeof( wItem ) );
 }
@@ -135,9 +134,9 @@
  item->sub.x=-1; item->sub.y=-1;
  appClearItem( &item->menuBase );
  appClearItem( &item->menuSelected );
- item->subR=0;
- item->subG=0;
- item->subB=0;
+ item->sub.R=item->sub.G=item->sub.B=0;
+ item->bar.R=item->bar.G=item->bar.B=0;
+ item->main.R=item->main.G=item->main.B=0;
  item->barIsPresent=0;
  item->menuIsPresent=0;
 }
@@ -161,7 +160,7 @@
 void btnModify( int event,float state )
 {
  int j;
- for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
+ for ( j=0;j < appMPlayer.NumberOfItems + 1;j++ )
   if ( appMPlayer.Items[j].msg == event )
    {
     switch ( appMPlayer.Items[j].type )
@@ -171,10 +170,30 @@
             appMPlayer.Items[j].tmp=(int)state;
             break;
       case itPotmeter:
+      case itVPotmeter:
       case itHPotmeter:
     	    if ( state < 0.0f ) state=0.0f;
 	    if ( state > 100.f ) state=100.0f;
 	    appMPlayer.Items[j].value=state;
+	    break;
+     }
+   }
+
+ for ( j=0;j < appMPlayer.NumberOfBarItems + 1;j++ )
+  if ( appMPlayer.barItems[j].msg == event )
+   {
+    switch ( appMPlayer.barItems[j].type )
+     {
+      case itButton:
+            appMPlayer.barItems[j].pressed=(int)state;
+            appMPlayer.barItems[j].tmp=(int)state;
+            break;
+      case itPotmeter:
+      case itVPotmeter:
+      case itHPotmeter:
+    	    if ( state < 0.0f ) state=0.0f;
+	    if ( state > 100.f ) state=100.0f;
+	    appMPlayer.barItems[j].value=state;
 	    break;
      }
    }

Index: app.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/app.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- app.h	13 Jan 2003 23:38:34 -0000	1.16
+++ app.h	17 Jan 2003 22:39:38 -0000	1.17
@@ -134,6 +134,8 @@
  char     * label;
 // ---
  int        event;
+// --- 
+ int        R,G,B;
 } wItem;
 
 typedef struct
@@ -144,16 +146,11 @@
 
  wItem           sub;
  wsTWindow       subWindow;
- int             subR,subG,subB;
 
  wItem           bar;
  wsTWindow       barWindow;
- int             barR,barG,barB;
  int             barIsPresent;
-
- wItem           eq;
- wsTWindow       eqWindow;
-
+  
  wItem           menuBase;
  wItem           menuSelected;
  wsTWindow       menuWindow;
@@ -164,7 +161,10 @@
  wItem           Items[256];
 // ---
  int             NumberOfMenuItems;
- wItem           MenuItems[32];
+ wItem           MenuItems[64];
+// ---
+ int		 NumberOfBarItems;
+ wItem		 barItems[32];
 } listItems;
 
 extern listItems   appMPlayer;

Index: cfg.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/cfg.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- cfg.c	12 Jan 2003 23:38:52 -0000	1.30
+++ cfg.c	17 Jan 2003 22:39:38 -0000	1.31
@@ -57,6 +57,7 @@
 int    gtkSubDumpSrt = 0;
 
 int    gtkLoadFullscreen = 0;
+int    gtkEnablePlayBar = 0;
 
 // ---
 
@@ -128,7 +129,8 @@
 
  { "cache",&gtkCacheOn,CONF_TYPE_FLAG,0,0,1,NULL },
  { "cache_size",&gtkCacheSize,CONF_TYPE_INT,CONF_RANGE,-1,65535,NULL },
- 
+
+ { "playbar",&gtkEnablePlayBar,CONF_TYPE_FLAG,0,0,1,NULL }, 
  { "load_fullscreen",&gtkLoadFullscreen,CONF_TYPE_FLAG,0,0,1,NULL },
  { "stopxscreensaver",&stop_xscreensaver,CONF_TYPE_FLAG,0,0,1,NULL },
 

Index: cfg.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/cfg.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- cfg.h	12 Jan 2003 18:35:46 -0000	1.12
+++ cfg.h	17 Jan 2003 22:39:38 -0000	1.13
@@ -39,6 +39,7 @@
 extern char * gtkEquChannel5;
 extern char * gtkEquChannel6;
 extern int    gtkLoadFullscreen;
+extern int    gtkEnablePlayBar;
 
 extern int cfg_read( void );
 extern int cfg_write( void );

Index: interface.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- interface.c	13 Jan 2003 23:38:34 -0000	1.72
+++ interface.c	17 Jan 2003 22:39:38 -0000	1.73
@@ -203,6 +203,9 @@
  wsCreateImage( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Width,appMPlayer.sub.Bitmap.Height );
  wsXDNDMakeAwareness(&appMPlayer.subWindow);
 
+ mplMenuInit();
+ mplPBInit();
+
  vo_setwindow( appMPlayer.subWindow.WindowID, appMPlayer.subWindow.wGC );
 
 // i=wsHideFrame|wsMaxSize|wsHideWindow;
@@ -215,8 +218,6 @@
  wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image );
  wsXDNDMakeAwareness(&appMPlayer.mainWindow);
 
- mplMenuInit();
-
  #ifdef DEBUG
   mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[main] Depth on screen: %d\n",wsDepthOnScreen );
   mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[main] parent: 0x%x\n",(int)appMPlayer.mainWindow.WindowID );
@@ -233,7 +234,7 @@
  appMPlayer.subWindow.KeyHandler=mplMainKeyHandle;
  appMPlayer.subWindow.DandDHandler=mplDandDHandler;
 
- wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
+ wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.sub.R,appMPlayer.sub.G,appMPlayer.sub.B );
  wsClearWindow( appMPlayer.subWindow );
  if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
 
@@ -433,7 +434,7 @@
  switch ( type )
   {
    case guiXEvent:
-	guiIntfStruct.event_struct=(void *)arg;
+        guiIntfStruct.event_struct=(void *)arg;
         wsEvents( wsDisplay,(XEvent *)arg,NULL );
         gtkEventHandling();
         break;



More information about the MPlayer-cvslog mailing list