[MPlayer-cvslog] r33171 - in trunk/gui: app.c app.h mplayer/menu.c mplayer/play.c skin/skin.c
ib
subversion at mplayerhq.hu
Thu Mar 31 14:25:32 CEST 2011
Author: ib
Date: Thu Mar 31 14:25:32 2011
New Revision: 33171
Log:
Cosmetic: Rename menuBase menu.
The new name corresponds better to the names of the other wItems and
statements using it are more intelligible.
Modified:
trunk/gui/app.c
trunk/gui/app.h
trunk/gui/mplayer/menu.c
trunk/gui/mplayer/play.c
trunk/gui/skin/skin.c
Modified: trunk/gui/app.c
==============================================================================
--- trunk/gui/app.c Thu Mar 31 14:03:54 2011 (r33170)
+++ trunk/gui/app.c Thu Mar 31 14:25:32 2011 (r33171)
@@ -106,7 +106,7 @@ void appFreeStruct(void)
appClearItem(&appMPlayer.bar);
appMPlayer.barIsPresent = 0;
- appClearItem(&appMPlayer.menuBase);
+ appClearItem(&appMPlayer.menu);
appClearItem(&appMPlayer.menuSelected);
appMPlayer.menuIsPresent = 0;
Modified: trunk/gui/app.h
==============================================================================
--- trunk/gui/app.h Thu Mar 31 14:03:54 2011 (r33170)
+++ trunk/gui/app.h Thu Mar 31 14:25:32 2011 (r33171)
@@ -175,7 +175,7 @@ typedef struct {
wsTWindow barWindow;
int barIsPresent;
- wItem menuBase;
+ wItem menu;
wItem menuSelected;
wsTWindow menuWindow;
int menuIsPresent;
Modified: trunk/gui/mplayer/menu.c
==============================================================================
--- trunk/gui/mplayer/menu.c Thu Mar 31 14:03:54 2011 (r33170)
+++ trunk/gui/mplayer/menu.c Thu Mar 31 14:25:32 2011 (r33171)
@@ -41,12 +41,12 @@ static void mplMenuDraw( void )
uint32_t * drw = NULL;
int x,y,tmp;
- if ( !appMPlayer.menuIsPresent || !appMPlayer.menuBase.Bitmap.Image ) return;
+ if ( !appMPlayer.menuIsPresent || !appMPlayer.menu.Bitmap.Image ) return;
if ( !mplMenuRender && !appMPlayer.menuWindow.Visible ) return;
if ( mplMenuRender || mplMenuItem != mplOldMenuItem )
{
- memcpy( mplMenuDrawBuffer,appMPlayer.menuBase.Bitmap.Image,appMPlayer.menuBase.Bitmap.ImageSize );
+ memcpy( mplMenuDrawBuffer,appMPlayer.menu.Bitmap.Image,appMPlayer.menu.Bitmap.ImageSize );
// ---
if ( mplMenuItem != -1 )
{
@@ -56,12 +56,12 @@ static void mplMenuDraw( void )
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;
+ if ( tmp != 0x00ff00ff ) buf[ y * appMPlayer.menu.width + x ]=tmp;
}
}
mplOldMenuItem=mplMenuItem;
// ---
- wsConvert( &appMPlayer.menuWindow,mplMenuDrawBuffer,appMPlayer.menuBase.Bitmap.ImageSize );
+ wsConvert( &appMPlayer.menuWindow,mplMenuDrawBuffer,appMPlayer.menu.Bitmap.ImageSize );
mplMenuRender=0;
}
wsPutImage( &appMPlayer.menuWindow );
@@ -71,12 +71,12 @@ void mplMenuMouseHandle( int X,int Y,int
{
int x,y,i;
- if ( !appMPlayer.menuBase.Bitmap.Image ) return;
+ if ( !appMPlayer.menu.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 ) )
+ if ( ( x < 0 ) || ( y < 0 ) || ( x > appMPlayer.menu.width ) || ( y > appMPlayer.menu.height ) )
{
wsPostRedisplay( &appMPlayer.menuWindow );
return;
@@ -95,7 +95,7 @@ void mplShowMenu( int mx,int my )
{
int x,y;
- if ( !appMPlayer.menuIsPresent || !appMPlayer.menuBase.Bitmap.Image ) return;
+ if ( !appMPlayer.menuIsPresent || !appMPlayer.menu.Bitmap.Image ) return;
x=mx;
if ( x + appMPlayer.menuWindow.Width > wsMaxX ) x=wsMaxX - appMPlayer.menuWindow.Width - 1 + wsOrgX;
@@ -118,7 +118,7 @@ void mplHideMenu( int mx,int my,int w )
{
int x,y,i=mplMenuItem;
- if ( !appMPlayer.menuIsPresent || !appMPlayer.menuBase.Bitmap.Image ) return;
+ if ( !appMPlayer.menuIsPresent || !appMPlayer.menu.Bitmap.Image ) return;
x=mx-mplMenuX;
y=my-mplMenuY;
@@ -143,12 +143,12 @@ void mplHideMenu( int mx,int my,int w )
void mplMenuInit( void )
{
- if ( mplMenuIsInitialized || !appMPlayer.menuIsPresent || !appMPlayer.menuBase.Bitmap.Image ) return;
+ if ( mplMenuIsInitialized || !appMPlayer.menuIsPresent || !appMPlayer.menu.Bitmap.Image ) return;
- appMPlayer.menuBase.x=0;
- appMPlayer.menuBase.y=0;
+ appMPlayer.menu.x=0;
+ appMPlayer.menu.y=0;
- if ( ( mplMenuDrawBuffer = calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL )
+ if ( ( mplMenuDrawBuffer = calloc( 1,appMPlayer.menu.Bitmap.ImageSize ) ) == NULL )
{
#ifdef DEBUG
mp_msg( MSGT_GPLAYER,MSGL_DBG2,MSGTR_NEMFMR );
@@ -158,10 +158,10 @@ void mplMenuInit( void )
}
wsCreateWindow( &appMPlayer.menuWindow,
- appMPlayer.menuBase.x,appMPlayer.menuBase.y,appMPlayer.menuBase.width,appMPlayer.menuBase.height,
+ appMPlayer.menu.x,appMPlayer.menu.y,appMPlayer.menu.width,appMPlayer.menu.height,
wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsOverredirect|wsHideFrame|wsMaxSize|wsMinSize|wsHideWindow,"MPlayer menu" );
- wsSetShape( &appMPlayer.menuWindow,appMPlayer.menuBase.Mask.Image );
+ wsSetShape( &appMPlayer.menuWindow,appMPlayer.menu.Mask.Image );
#ifdef DEBUG
mp_msg( MSGT_GPLAYER,MSGL_DBG2,"menu: 0x%x\n",(int)appMPlayer.menuWindow.WindowID );
Modified: trunk/gui/mplayer/play.c
==============================================================================
--- trunk/gui/mplayer/play.c Thu Mar 31 14:03:54 2011 (r33170)
+++ trunk/gui/mplayer/play.c Thu Mar 31 14:25:32 2011 (r33171)
@@ -214,16 +214,16 @@ void ChangeSkin(char *name)
if (prev && appMPlayer.menuIsPresent) {
free(mplMenuDrawBuffer);
- mplMenuDrawBuffer = calloc(1, appMPlayer.menuBase.Bitmap.ImageSize);
+ mplMenuDrawBuffer = calloc(1, appMPlayer.menu.Bitmap.ImageSize);
if (!mplMenuDrawBuffer) {
mp_msg(MSGT_GPLAYER, MSGL_STATUS, MSGTR_NEMDB);
return;
}
- wsResizeWindow(&appMPlayer.menuWindow, appMPlayer.menuBase.width, appMPlayer.menuBase.height);
- wsResizeImage(&appMPlayer.menuWindow, appMPlayer.menuBase.width, appMPlayer.menuBase.height);
- wsSetShape(&appMPlayer.menuWindow, appMPlayer.menuBase.Mask.Image);
+ wsResizeWindow(&appMPlayer.menuWindow, appMPlayer.menu.width, appMPlayer.menu.height);
+ wsResizeImage(&appMPlayer.menuWindow, appMPlayer.menu.width, appMPlayer.menu.height);
+ wsSetShape(&appMPlayer.menuWindow, appMPlayer.menu.Mask.Image);
wsVisibleWindow(&appMPlayer.menuWindow, wsHideWindow);
} else
mplMenuInit();
Modified: trunk/gui/skin/skin.c
==============================================================================
--- trunk/gui/skin/skin.c Thu Mar 31 14:03:54 2011 (r33170)
+++ trunk/gui/skin/skin.c Thu Mar 31 14:25:32 2011 (r33171)
@@ -194,7 +194,7 @@ static int cmd_window(char *in)
currWinItemIdx = &appMPlayer.IndexOfBarItems;
currWinItems = appMPlayer.barItems;
} else if (strcmp(in, "menu") == 0) {
- currWin = &appMPlayer.menuBase;
+ currWin = &appMPlayer.menu;
currWinItemIdx = &appMPlayer.IndexOfMenuItems;
currWinItems = appMPlayer.menuItems;
} else {
@@ -280,24 +280,24 @@ static int cmd_base(char *in)
mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] image: %s\n", fname);
skin->menuIsPresent = 1;
- skin->menuBase.type = itBase;
+ skin->menu.type = itBase;
av_strlcpy(tmp, path, sizeof(tmp));
av_strlcat(tmp, fname, sizeof(tmp));
- if (skinBPRead(tmp, &skin->menuBase.Bitmap) != 0)
+ if (skinBPRead(tmp, &skin->menu.Bitmap) != 0)
return 1;
- skin->menuBase.width = skin->menuBase.Bitmap.Width;
- skin->menuBase.height = skin->menuBase.Bitmap.Height;
+ skin->menu.width = skin->menu.Bitmap.Width;
+ skin->menu.height = skin->menu.Bitmap.Height;
- mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] bitmap: %dx%d\n", skin->menuBase.width, skin->menuBase.height);
+ mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] bitmap: %dx%d\n", skin->menu.width, skin->menu.height);
#ifdef CONFIG_XSHAPE
- Convert32to1(&skin->menuBase.Bitmap, &skin->menuBase.Mask, 0x00ff00ff);
- mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] mask: %lux%lu\n", skin->menuBase.Mask.Width, skin->menuBase.Mask.Height);
+ Convert32to1(&skin->menu.Bitmap, &skin->menu.Mask, 0x00ff00ff);
+ mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] mask: %lux%lu\n", skin->menu.Mask.Width, skin->menu.Mask.Height);
#else
- skin->menuBase.Mask.Image = NULL;
+ skin->menu.Mask.Image = NULL;
#endif
}
More information about the MPlayer-cvslog
mailing list