[MPlayer-cvslog] r35775 - in trunk/gui: dialog/dialog.c dialog/preferences.c interface.c ui/actions.c ui/main.c ui/menu.c ui/playbar.c ui/render.c ui/video.c wm/ws.c wm/ws.h
ib
subversion at mplayerhq.hu
Fri Jan 18 01:35:38 CET 2013
Author: ib
Date: Fri Jan 18 01:35:38 2013
New Revision: 35775
Log:
Cosmetic: Rename ws functions for the sake of consistency.
wsXInit -> wsInit
wsXDone -> wsDone
wsEvents -> wsEvent
wsHandleEvents -> wsEvents
wsSetBackgroundRGB -> wsWindowBackground
wsClearWindow -> wsWindowClear
wsCreateWindow -> wsWindowCreate
wsDestroyWindow -> wsWindowDestroy
wsFullScreen -> wsWindowFullscreen
wsSetIcon -> wsWindowIcon
wsIconify -> wsWindowIconify
wsSetLayer -> wsWindowLayer
wsSearch -> wsWindowListSearch
wsMoveWindow -> wsWindowMove
wsMoveWindowWithin -> wsWindowMoveWithin
wsRaiseWindowTop -> wsWindowRaiseTop
wsPostRedisplay -> wsWindowRedraw
wsResizeWindow -> wsWindowResize
wsSetShape -> wsWindowShape
wsWindowPosition -> wsWindowUpdatePosition
wsUpdateXineramaInfo -> wsWindowUpdateXinerama
wsVisibleWindow -> wsWindowVisibility
wsConvert -> wsImageConvert
wsCreateImage -> wsImageCreate
wsDestroyImage -> wsImageDestroy
wsPutImage -> wsImageDraw
wsResizeImage -> wsImageResize
wsAutohideCursor -> wsMouseAutohide
wsVisibleMouse -> wsMouseVisibility
Modified:
trunk/gui/dialog/dialog.c
trunk/gui/dialog/preferences.c
trunk/gui/interface.c
trunk/gui/ui/actions.c
trunk/gui/ui/main.c
trunk/gui/ui/menu.c
trunk/gui/ui/playbar.c
trunk/gui/ui/render.c
trunk/gui/ui/video.c
trunk/gui/wm/ws.c
trunk/gui/wm/ws.h
Modified: trunk/gui/dialog/dialog.c
==============================================================================
--- trunk/gui/dialog/dialog.c Fri Jan 18 00:35:53 2013 (r35774)
+++ trunk/gui/dialog/dialog.c Fri Jan 18 01:35:38 2013 (r35775)
@@ -178,7 +178,7 @@ void gtkInit(char *display_name)
*/
void gtkAddIcon(GtkWidget *window)
{
- wsSetIcon(gdk_display, GDK_WINDOW_XWINDOW(window->window), &guiIcon);
+ wsWindowIcon(gdk_display, GDK_WINDOW_XWINDOW(window->window), &guiIcon);
}
void gtkClearList(GtkWidget *list)
@@ -269,7 +269,7 @@ void gtkMessageBox(int type, const gchar
*/
void gtkSetLayer(GtkWidget *window)
{
- wsSetLayer(gdk_display, GDK_WINDOW_XWINDOW(window->window), guiApp.videoWindow.isFullScreen);
+ wsWindowLayer(gdk_display, GDK_WINDOW_XWINDOW(window->window), guiApp.videoWindow.isFullScreen);
gtkActive(window);
}
@@ -280,7 +280,7 @@ void gtkSetLayer(GtkWidget *window)
*/
void gtkActive(GtkWidget *window)
{
- wsRaiseWindowTop(gdk_display, GDK_WINDOW_XWINDOW(window->window));
+ wsWindowRaiseTop(gdk_display, GDK_WINDOW_XWINDOW(window->window));
}
void gtkShow(int type, char *param)
Modified: trunk/gui/dialog/preferences.c
==============================================================================
--- trunk/gui/dialog/preferences.c Fri Jan 18 00:35:53 2013 (r35774)
+++ trunk/gui/dialog/preferences.c Fri Jan 18 01:35:38 2013 (r35775)
@@ -727,7 +727,7 @@ static void prToggled( GtkToggleButton *
gtkActive( Preferences );
} else window=wsHideWindow;
// NOTE TO MYSELF: doesn't work with a fullscreen window
- if ( !guiInfo.Playing ) wsVisibleWindow( &guiApp.videoWindow,window );
+ if ( !guiInfo.Playing ) wsWindowVisibility( &guiApp.videoWindow,window );
break;
case 4:
case 5:
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Fri Jan 18 00:35:53 2013 (r35774)
+++ trunk/gui/interface.c Fri Jan 18 01:35:38 2013 (r35775)
@@ -110,7 +110,7 @@ void guiInit(void)
/* initialize graphical user interfaces */
- wsXInit(mDisplay);
+ wsInit(mDisplay);
gtkInit(mDisplayName);
/* load skin */
@@ -172,9 +172,9 @@ void guiInit(void)
if (guiWinID >= 0)
guiApp.mainWindow.Parent = guiWinID;
- wsCreateWindow(&guiApp.videoWindow, guiApp.video.x, guiApp.video.y, guiApp.video.width, guiApp.video.height, 0, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, wsShowFrame | wsHideWindow | wsWaitMap | wsAspect, "MPlayer - Video");
- wsDestroyImage(&guiApp.videoWindow);
- wsCreateImage(&guiApp.videoWindow, guiApp.video.Bitmap.Width, guiApp.video.Bitmap.Height);
+ wsWindowCreate(&guiApp.videoWindow, guiApp.video.x, guiApp.video.y, guiApp.video.width, guiApp.video.height, 0, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, wsShowFrame | wsHideWindow | wsWaitMap | wsAspect, "MPlayer - Video");
+ wsImageDestroy(&guiApp.videoWindow);
+ wsImageCreate(&guiApp.videoWindow, guiApp.video.Bitmap.Width, guiApp.video.Bitmap.Height);
wsXDNDMakeAwareness(&guiApp.videoWindow);
WinID = guiApp.videoWindow.WindowID;
@@ -185,8 +185,8 @@ void guiInit(void)
// i=wsHideFrame|wsMaxSize|wsHideWindow;
// if ( guiApp.mainDecoration ) i=wsShowFrame|wsMaxSize|wsHideWindow;
i = wsShowFrame | wsMinSize | wsMaxSize | wsHideWindow;
- wsCreateWindow(&guiApp.mainWindow, guiApp.main.x, guiApp.main.y, guiApp.main.width, guiApp.main.height, 0, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, i, "MPlayer");
- wsSetShape(&guiApp.mainWindow, guiApp.main.Mask.Image);
+ wsWindowCreate(&guiApp.mainWindow, guiApp.main.x, guiApp.main.y, guiApp.main.width, guiApp.main.height, 0, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, i, "MPlayer");
+ wsWindowShape(&guiApp.mainWindow, guiApp.main.Mask.Image);
wsXDNDMakeAwareness(&guiApp.mainWindow);
mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] mainWindow ID: 0x%x\n", (int)guiApp.mainWindow.WindowID);
@@ -202,33 +202,33 @@ void guiInit(void)
guiApp.videoWindow.KeyHandler = uiMainKeyHandle;
guiApp.videoWindow.DandDHandler = uiDandDHandler;
- wsSetBackgroundRGB(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
- wsClearWindow(&guiApp.videoWindow);
+ wsWindowBackground(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
+ wsWindowClear(&guiApp.videoWindow);
if (guiApp.video.Bitmap.Image)
- wsConvert(&guiApp.videoWindow, guiApp.video.Bitmap.Image);
+ wsImageConvert(&guiApp.videoWindow, guiApp.video.Bitmap.Image);
btnModify(evSetVolume, guiInfo.Volume);
btnModify(evSetBalance, guiInfo.Balance);
btnModify(evSetMoviePosition, guiInfo.Position);
- wsSetIcon(wsDisplay, guiApp.mainWindow.WindowID, &guiIcon);
- wsSetIcon(wsDisplay, guiApp.videoWindow.WindowID, &guiIcon);
+ wsWindowIcon(wsDisplay, guiApp.mainWindow.WindowID, &guiIcon);
+ wsWindowIcon(wsDisplay, guiApp.videoWindow.WindowID, &guiIcon);
if (!guiApp.mainDecoration)
wsWindowDecoration(&guiApp.mainWindow, False);
- wsVisibleWindow(&guiApp.mainWindow, wsShowWindow);
+ wsWindowVisibility(&guiApp.mainWindow, wsShowWindow);
if (gtkShowVideoWindow) {
- wsVisibleWindow(&guiApp.videoWindow, wsShowWindow);
+ wsWindowVisibility(&guiApp.videoWindow, wsShowWindow);
guiInfo.VideoWindow = True;
if (gtkLoadFullscreen)
uiFullScreen();
} else
- wsSetBackgroundRGB(&guiApp.videoWindow, 0, 0, 0);
+ wsWindowBackground(&guiApp.videoWindow, 0, 0, 0);
if (gtkLoadFullscreen)
btnSet(evFullScreen, btnPressed);
@@ -275,7 +275,7 @@ void guiDone(void)
ass_bottom_margin = gtkASS.bottom_margin;
cfg_write();
- wsXDone();
+ wsDone();
}
uiUnsetFile();
@@ -358,7 +358,7 @@ int gui(int what, void *data)
switch ((int)data) {
case GUI_STOP:
case GUI_PLAY:
-// if ( !gtkShowVideoWindow ) wsVisibleWindow( &guiApp.videoWindow,wsHideWindow );
+// if ( !gtkShowVideoWindow ) wsWindowVisibility( &guiApp.videoWindow,wsHideWindow );
case GUI_PAUSE:
guiInfo.Playing = (int)data;
break;
@@ -370,9 +370,9 @@ int gui(int what, void *data)
case GUI_HANDLE_EVENTS:
if (!guiInfo.Playing || !guiInfo.VideoWindow)
- wsHandleEvents();
+ wsEvents();
- wsAutohideCursor();
+ wsMouseAutohide();
gtkEventHandling();
break;
@@ -417,7 +417,7 @@ int gui(int what, void *data)
case GUI_PREPARE:
- wsVisibleMouse(&guiApp.videoWindow, wsHideMouseCursor);
+ wsMouseVisibility(&guiApp.videoWindow, wsHideMouseCursor);
if (guiInfo.NewPlay == GUI_FILE_NEW) {
audio_id = -1;
@@ -728,7 +728,7 @@ int gui(int what, void *data)
// ...without video there will be no call to GUI_SETUP_VIDEO_WINDOW
if (!guiInfo.VideoWindow) {
- wsVisibleWindow(&guiApp.videoWindow, wsHideWindow);
+ wsWindowVisibility(&guiApp.videoWindow, wsHideWindow);
btnSet(evFullScreen, (gtkLoadFullscreen ? btnPressed : btnReleased));
}
@@ -778,22 +778,22 @@ int gui(int what, void *data)
if (!guiApp.videoWindow.isFullScreen || !guiApp.videoWindow.Mapped) {
if (!guiApp.videoWindow.isFullScreen)
- wsResizeWindow(&guiApp.videoWindow, guiInfo.VideoWidth, guiInfo.VideoHeight);
+ wsWindowResize(&guiApp.videoWindow, guiInfo.VideoWidth, guiInfo.VideoHeight);
if (!guiApp.videoWindow.Mapped)
- wsVisibleWindow(&guiApp.videoWindow, wsShowWindow);
+ wsWindowVisibility(&guiApp.videoWindow, wsShowWindow);
}
if (gtkLoadFullscreen ^ guiApp.videoWindow.isFullScreen)
uiEventHandling(evFullScreen, True);
if (guiWinID >= 0)
- wsMoveWindow(&guiApp.mainWindow, True, 0, guiInfo.VideoHeight);
+ wsWindowMove(&guiApp.mainWindow, True, 0, guiInfo.VideoHeight);
break;
case GUI_HANDLE_X_EVENT:
- wsEvents(data);
+ wsEvent(data);
gtkEventHandling();
break;
@@ -858,27 +858,27 @@ int gui(int what, void *data)
guiInfo.VideoWindow = True;
if (!guiApp.videoWindow.isFullScreen)
- wsResizeWindow(&guiApp.videoWindow, guiApp.video.width, guiApp.video.height);
+ wsWindowResize(&guiApp.videoWindow, guiApp.video.width, guiApp.video.height);
if (!guiApp.videoWindow.Mapped)
- wsVisibleWindow(&guiApp.videoWindow, wsShowWindow);
+ wsWindowVisibility(&guiApp.videoWindow, wsShowWindow);
if (gtkLoadFullscreen ^ guiApp.videoWindow.isFullScreen)
uiEventHandling(evFullScreen, False);
} else {
- wsVisibleWindow(&guiApp.videoWindow, wsHideWindow);
+ wsWindowVisibility(&guiApp.videoWindow, wsHideWindow);
guiInfo.VideoWindow = False;
btnSet(evFullScreen, (gtkLoadFullscreen ? btnPressed : btnReleased));
}
gui(GUI_SET_STATE, (void *)GUI_STOP);
- wsHandleEvents();
+ wsEvents();
uiVideoRender = True;
- wsSetBackgroundRGB(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
- wsClearWindow(&guiApp.videoWindow);
- wsPostRedisplay(&guiApp.videoWindow);
- wsVisibleMouse(&guiApp.videoWindow, wsShowMouseCursor);
+ wsWindowBackground(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
+ wsWindowClear(&guiApp.videoWindow);
+ wsWindowRedraw(&guiApp.videoWindow);
+ wsMouseVisibility(&guiApp.videoWindow, wsShowMouseCursor);
}
break;
Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c Fri Jan 18 00:35:53 2013 (r35774)
+++ trunk/gui/ui/actions.c Fri Jan 18 01:35:38 2013 (r35775)
@@ -54,19 +54,19 @@ void uiFullScreen(void)
if (!guiInfo.VideoWindow)
return;
- wsFullScreen(&guiApp.videoWindow);
+ wsWindowFullscreen(&guiApp.videoWindow);
vo_fs = guiApp.videoWindow.isFullScreen;
- wsSetLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.videoWindow.isFullScreen);
+ wsWindowLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.videoWindow.isFullScreen);
if (guiApp.menuIsPresent)
- wsSetLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.videoWindow.isFullScreen);
+ wsWindowLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.videoWindow.isFullScreen);
if (guiInfo.Playing)
- wsSetBackgroundRGB(&guiApp.videoWindow, 0, 0, 0);
+ wsWindowBackground(&guiApp.videoWindow, 0, 0, 0);
else
- wsSetBackgroundRGB(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
+ wsWindowBackground(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
}
/**
@@ -90,8 +90,8 @@ void uiPlay(void)
gui(GUI_SET_STATE, (void *)GUI_PLAY);
uiVideoRender = False;
- wsSetBackgroundRGB(&guiApp.videoWindow, 0, 0, 0);
- wsClearWindow(&guiApp.videoWindow);
+ wsWindowBackground(&guiApp.videoWindow, 0, 0, 0);
+ wsWindowClear(&guiApp.videoWindow);
}
/**
@@ -186,37 +186,37 @@ void uiChangeSkin(char *name)
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
}
- wsResizeWindow(&guiApp.menuWindow, guiApp.menu.width, guiApp.menu.height);
- wsResizeImage(&guiApp.menuWindow, guiApp.menu.width, guiApp.menu.height);
- wsSetShape(&guiApp.menuWindow, guiApp.menu.Mask.Image);
- wsVisibleWindow(&guiApp.menuWindow, wsHideWindow);
+ wsWindowResize(&guiApp.menuWindow, guiApp.menu.width, guiApp.menu.height);
+ wsImageResize(&guiApp.menuWindow, guiApp.menu.width, guiApp.menu.height);
+ wsWindowShape(&guiApp.menuWindow, guiApp.menu.Mask.Image);
+ wsWindowVisibility(&guiApp.menuWindow, wsHideWindow);
} else
uiMenuInit();
/* reload video window */
if (guiApp.video.Bitmap.Image)
- wsResizeImage(&guiApp.videoWindow, guiApp.video.Bitmap.Width, guiApp.video.Bitmap.Height);
+ wsImageResize(&guiApp.videoWindow, guiApp.video.Bitmap.Width, guiApp.video.Bitmap.Height);
if (!guiApp.videoWindow.isFullScreen && !guiInfo.Playing) {
- wsResizeWindow(&guiApp.videoWindow, guiApp.video.width, guiApp.video.height);
- wsMoveWindow(&guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y);
+ wsWindowResize(&guiApp.videoWindow, guiApp.video.width, guiApp.video.height);
+ wsWindowMove(&guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y);
}
if (guiApp.video.Bitmap.Image)
- wsConvert(&guiApp.videoWindow, guiApp.video.Bitmap.Image);
+ wsImageConvert(&guiApp.videoWindow, guiApp.video.Bitmap.Image);
if (!guiInfo.Playing) {
uiVideoRender = True;
- wsSetBackgroundRGB(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
- wsClearWindow(&guiApp.videoWindow);
- wsPostRedisplay(&guiApp.videoWindow);
+ wsWindowBackground(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
+ wsWindowClear(&guiApp.videoWindow);
+ wsWindowRedraw(&guiApp.videoWindow);
}
/* reload playbar */
if (bprev)
- wsDestroyWindow(&guiApp.playbarWindow);
+ wsWindowDestroy(&guiApp.playbarWindow);
uiPlaybarInit();
@@ -230,12 +230,12 @@ void uiChangeSkin(char *name)
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
}
- wsDestroyWindow(&guiApp.mainWindow);
+ wsWindowDestroy(&guiApp.mainWindow);
- wsCreateWindow(&guiApp.mainWindow, guiApp.main.x, guiApp.main.y, guiApp.main.width, guiApp.main.height, 0, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, wsShowFrame | wsMinSize | wsMaxSize | wsHideWindow, "MPlayer");
- wsCreateImage(&guiApp.mainWindow, guiApp.main.Bitmap.Width, guiApp.main.Bitmap.Height);
- wsSetShape(&guiApp.mainWindow, guiApp.main.Mask.Image);
- wsSetIcon(wsDisplay, guiApp.mainWindow.WindowID, &guiIcon);
+ wsWindowCreate(&guiApp.mainWindow, guiApp.main.x, guiApp.main.y, guiApp.main.width, guiApp.main.height, 0, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, wsShowFrame | wsMinSize | wsMaxSize | wsHideWindow, "MPlayer");
+ wsImageCreate(&guiApp.mainWindow, guiApp.main.Bitmap.Width, guiApp.main.Bitmap.Height);
+ wsWindowShape(&guiApp.mainWindow, guiApp.main.Mask.Image);
+ wsWindowIcon(wsDisplay, guiApp.mainWindow.WindowID, &guiIcon);
guiApp.mainWindow.ReDraw = (void *)uiMainDraw;
guiApp.mainWindow.MouseHandler = uiMainMouseHandle;
@@ -247,7 +247,7 @@ void uiChangeSkin(char *name)
if (!guiApp.mainDecoration)
wsWindowDecoration(&guiApp.mainWindow, False);
- wsVisibleWindow(&guiApp.mainWindow, wsShowWindow);
+ wsWindowVisibility(&guiApp.mainWindow, wsShowWindow);
mainVisible = True;
btnModify(evSetVolume, guiInfo.Volume);
@@ -255,8 +255,8 @@ void uiChangeSkin(char *name)
btnModify(evSetMoviePosition, guiInfo.Position);
btnSet(evFullScreen, (guiApp.videoWindow.isFullScreen ? btnPressed : btnReleased));
- wsSetLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.videoWindow.isFullScreen);
- wsSetLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.videoWindow.isFullScreen);
+ wsWindowLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.videoWindow.isFullScreen);
+ wsWindowLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.videoWindow.isFullScreen);
}
/**
Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c Fri Jan 18 00:35:53 2013 (r35774)
+++ trunk/gui/ui/main.c Fri Jan 18 01:35:38 2013 (r35775)
@@ -96,7 +96,7 @@ void uiMainDraw( void )
RenderAll( &guiApp.mainWindow,guiApp.mainItems,guiApp.IndexOfMainItems,mainDrawBuffer );
uiMainRender=False;
}
- wsPutImage( &guiApp.mainWindow );
+ wsImageDraw( &guiApp.mainWindow );
// XFlush( wsDisplay );
}
@@ -330,8 +330,8 @@ NoPause:
case evIconify:
switch ( iparam )
{
- case 0: wsIconify( &guiApp.mainWindow ); break;
- case 1: wsIconify( &guiApp.videoWindow ); break;
+ case 0: wsWindowIconify( &guiApp.mainWindow ); break;
+ case 1: wsWindowIconify( &guiApp.videoWindow ); break;
}
break;
case evHalfSize:
@@ -341,7 +341,7 @@ NoPause:
{
uiFullScreen();
}
- wsResizeWindow( &guiApp.videoWindow, guiInfo.VideoWidth / 2, guiInfo.VideoHeight / 2 );
+ wsWindowResize( &guiApp.videoWindow, guiInfo.VideoWidth / 2, guiInfo.VideoHeight / 2 );
btnSet( evFullScreen,btnReleased );
}
break;
@@ -352,8 +352,8 @@ NoPause:
{
uiFullScreen();
}
- wsResizeWindow( &guiApp.videoWindow, guiInfo.VideoWidth * 2, guiInfo.VideoHeight * 2 );
- wsMoveWindowWithin( &guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y );
+ wsWindowResize( &guiApp.videoWindow, guiInfo.VideoWidth * 2, guiInfo.VideoHeight * 2 );
+ wsWindowMoveWithin( &guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y );
btnSet( evFullScreen,btnReleased );
}
break;
@@ -364,7 +364,7 @@ NoPause:
{
uiFullScreen();
}
- wsResizeWindow( &guiApp.videoWindow, guiInfo.VideoWidth, guiInfo.VideoHeight );
+ wsWindowResize( &guiApp.videoWindow, guiInfo.VideoWidth, guiInfo.VideoHeight );
btnSet( evFullScreen,btnReleased );
break;
} else if ( !guiApp.videoWindow.isFullScreen ) break;
@@ -373,7 +373,7 @@ NoPause:
{
uiFullScreen();
if ( !guiApp.videoWindow.isFullScreen )
- wsResizeWindow( &guiApp.videoWindow, iparam ? guiInfo.VideoWidth : guiApp.video.width, iparam ? guiInfo.VideoHeight : guiApp.video.height );
+ wsWindowResize( &guiApp.videoWindow, iparam ? guiInfo.VideoWidth : guiApp.video.width, iparam ? guiInfo.VideoHeight : guiApp.video.height );
}
if ( guiApp.videoWindow.isFullScreen ) btnSet( evFullScreen,btnPressed );
else btnSet( evFullScreen,btnReleased );
@@ -388,7 +388,7 @@ NoPause:
case 1:
default: movie_aspect=-1;
}
- wsClearWindow( &guiApp.videoWindow );
+ wsWindowClear( &guiApp.videoWindow );
if ( guiInfo.StreamType == STREAMTYPE_VCD ) uiEventHandling( evPlayVCD, 0 );
else if ( guiInfo.StreamType == STREAMTYPE_DVD ) uiEventHandling( ivPlayDVD, 0 );
else
@@ -406,8 +406,8 @@ NoPause:
last_redraw_time = now;
}
uiMainRender=True;
- wsPostRedisplay( &guiApp.mainWindow );
- wsPostRedisplay( &guiApp.playbarWindow );
+ wsWindowRedraw( &guiApp.mainWindow );
+ wsWindowRedraw( &guiApp.playbarWindow );
break;
/* system events */
case evNone:
@@ -518,7 +518,7 @@ rollerhandled:
switch ( itemtype )
{
case itPLMButton:
- wsMoveWindow( &guiApp.mainWindow,True,RX - abs( sx ),RY - abs( sy ) );
+ wsWindowMove( &guiApp.mainWindow,True,RX - abs( sx ),RY - abs( sy ) );
uiMainRender=False;
break;
case itPRMButton:
Modified: trunk/gui/ui/menu.c
==============================================================================
--- trunk/gui/ui/menu.c Fri Jan 18 00:35:53 2013 (r35774)
+++ trunk/gui/ui/menu.c Fri Jan 18 01:35:38 2013 (r35775)
@@ -64,10 +64,10 @@ static void uiMenuDraw( void )
}
oldMenuItem=menuItem;
/* --- */
- wsConvert( &guiApp.menuWindow,menuDrawBuffer );
+ wsImageConvert( &guiApp.menuWindow,menuDrawBuffer );
menuRender=False;
}
- wsPutImage( &guiApp.menuWindow );
+ wsImageDraw( &guiApp.menuWindow );
}
void uiMenuMouseHandle( int RX,int RY )
@@ -81,7 +81,7 @@ void uiMenuMouseHandle( int RX,int RY )
y=RY - guiApp.menuWindow.Y;
if ( ( x < 0 ) || ( y < 0 ) || ( x > guiApp.menu.width ) || ( y > guiApp.menu.height ) )
{
- wsPostRedisplay( &guiApp.menuWindow );
+ wsWindowRedraw( &guiApp.menuWindow );
return;
}
@@ -91,7 +91,7 @@ void uiMenuMouseHandle( int RX,int RY )
guiApp.menuItems[i].x,guiApp.menuItems[i].y,
guiApp.menuItems[i].x+guiApp.menuItems[i].width,guiApp.menuItems[i].y+guiApp.menuItems[i].height ) ) { menuItem=i; break; }
}
- wsPostRedisplay( &guiApp.menuWindow );
+ wsWindowRedraw( &guiApp.menuWindow );
}
void uiShowMenu( int mx,int my )
@@ -109,12 +109,12 @@ void uiShowMenu( int mx,int my )
menuItem = 0;
- wsMoveWindow( &guiApp.menuWindow,True,x,y );
- wsRaiseWindowTop( wsDisplay,guiApp.menuWindow.WindowID );
- wsSetLayer( wsDisplay,guiApp.menuWindow.WindowID,1 );
+ wsWindowMove( &guiApp.menuWindow,True,x,y );
+ wsWindowRaiseTop( wsDisplay,guiApp.menuWindow.WindowID );
+ wsWindowLayer( wsDisplay,guiApp.menuWindow.WindowID,1 );
menuRender=True;
- wsVisibleWindow( &guiApp.menuWindow,wsShowWindow );
- wsPostRedisplay( &guiApp.menuWindow );
+ wsWindowVisibility( &guiApp.menuWindow,wsShowWindow );
+ wsWindowRedraw( &guiApp.menuWindow );
}
void uiHideMenu( int mx,int my,int w )
@@ -128,7 +128,7 @@ void uiHideMenu( int mx,int my,int w )
// x=RX - guiApp.menuWindow.X;
// y=RY - guiApp.menuWindow.Y;
- wsVisibleWindow( &guiApp.menuWindow,wsHideWindow );
+ wsWindowVisibility( &guiApp.menuWindow,wsHideWindow );
if ( ( x < 0 ) || ( y < 0 ) ) return;
@@ -158,11 +158,11 @@ void uiMenuInit( void )
return;
}
- wsCreateWindow( &guiApp.menuWindow,
+ wsWindowCreate( &guiApp.menuWindow,
guiApp.menu.x,guiApp.menu.y,guiApp.menu.width,guiApp.menu.height,
0,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsOverredirect|wsHideFrame|wsMaxSize|wsMinSize|wsHideWindow,"MPlayer menu" );
- wsSetShape( &guiApp.menuWindow,guiApp.menu.Mask.Image );
+ wsWindowShape( &guiApp.menuWindow,guiApp.menu.Mask.Image );
mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[menu] menuWindow ID: 0x%x\n",(int)guiApp.menuWindow.WindowID );
@@ -170,5 +170,5 @@ void uiMenuInit( void )
guiApp.menuWindow.ReDraw=uiMenuDraw;
// guiApp.menuWindow.MouseHandler=uiMenuMouseHandle;
// guiApp.menuWindow.KeyHandler=uiMainKeyHandle;
- menuRender=True; wsPostRedisplay( &guiApp.menuWindow );
+ menuRender=True; wsWindowRedraw( &guiApp.menuWindow );
}
Modified: trunk/gui/ui/playbar.c
==============================================================================
--- trunk/gui/ui/playbar.c Fri Jan 18 00:35:53 2013 (r35774)
+++ trunk/gui/ui/playbar.c Fri Jan 18 01:35:38 2013 (r35775)
@@ -83,7 +83,7 @@ static void uiPlaybarDraw( void )
uiPlaybarFade=0;
vo_mouse_autohide=False;
}
- wsMoveWindow( &guiApp.playbarWindow,True,x,playbarLength );
+ wsWindowMove( &guiApp.playbarWindow,True,x,playbarLength );
break;
case 2: // fade out
playbarLength+=10;
@@ -93,10 +93,10 @@ static void uiPlaybarDraw( void )
uiPlaybarFade=0;
playbarVisible=False;
vo_mouse_autohide=True;
- wsVisibleWindow( &guiApp.playbarWindow,wsHideWindow );
+ wsWindowVisibility( &guiApp.playbarWindow,wsHideWindow );
return;
}
- wsMoveWindow( &guiApp.playbarWindow,True,x,playbarLength );
+ wsWindowMove( &guiApp.playbarWindow,True,x,playbarLength );
break;
}
@@ -110,9 +110,9 @@ static void uiPlaybarDraw( void )
fast_memcpy( playbarDrawBuffer,guiApp.playbar.Bitmap.Image,guiApp.playbar.Bitmap.ImageSize );
RenderAll( &guiApp.playbarWindow,guiApp.playbarItems,guiApp.IndexOfPlaybarItems,playbarDrawBuffer );
- wsConvert( &guiApp.playbarWindow,playbarDrawBuffer );
+ wsImageConvert( &guiApp.playbarWindow,playbarDrawBuffer );
}
- wsPutImage( &guiApp.playbarWindow );
+ wsImageDraw( &guiApp.playbarWindow );
}
static void uiPlaybarMouseHandle( int Button, int X, int Y, int RX, int RY )
@@ -238,8 +238,8 @@ void uiPlaybarShow( int y )
if ( y > guiApp.videoWindow.Height - guiApp.playbar.height )
{
- if ( !uiPlaybarFade ) wsVisibleWindow( &guiApp.playbarWindow,wsShowWindow );
- uiPlaybarFade=1; playbarVisible=True; wsPostRedisplay( &guiApp.playbarWindow );
+ if ( !uiPlaybarFade ) wsWindowVisibility( &guiApp.playbarWindow,wsShowWindow );
+ uiPlaybarFade=1; playbarVisible=True; wsWindowRedraw( &guiApp.playbarWindow );
}
else if ( !uiPlaybarFade ) uiPlaybarFade=2;
}
@@ -257,11 +257,11 @@ void uiPlaybarInit( void )
}
guiApp.playbarWindow.Parent=guiApp.videoWindow.WindowID;
- wsCreateWindow( &guiApp.playbarWindow,
+ wsWindowCreate( &guiApp.playbarWindow,
guiApp.playbar.x,guiApp.playbar.y,guiApp.playbar.width,guiApp.playbar.height,
0,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsHideFrame|wsHideWindow,"PlayBar" );
- wsSetShape( &guiApp.playbarWindow,guiApp.playbar.Mask.Image );
+ wsWindowShape( &guiApp.playbarWindow,guiApp.playbar.Mask.Image );
guiApp.playbarWindow.ReDraw=(void *)uiPlaybarDraw;
guiApp.playbarWindow.MouseHandler=uiPlaybarMouseHandle;
Modified: trunk/gui/ui/render.c
==============================================================================
--- trunk/gui/ui/render.c Fri Jan 18 00:35:53 2013 (r35774)
+++ trunk/gui/ui/render.c Fri Jan 18 01:35:38 2013 (r35775)
@@ -416,5 +416,5 @@ void RenderAll(wsWindow *window, wItem *
}
}
- wsConvert(window, db);
+ wsImageConvert(window, db);
}
Modified: trunk/gui/ui/video.c
==============================================================================
--- trunk/gui/ui/video.c Fri Jan 18 00:35:53 2013 (r35774)
+++ trunk/gui/ui/video.c Fri Jan 18 01:35:38 2013 (r35775)
@@ -47,7 +47,7 @@ void uiVideoDraw( void )
if ( uiVideoRender && guiApp.videoWindow.State == wsWindowExpose )
{
- if ( guiApp.video.Bitmap.Image ) wsPutImage( &guiApp.videoWindow );
+ if ( guiApp.video.Bitmap.Image ) wsImageDraw( &guiApp.videoWindow );
}
guiApp.videoWindow.State=0;
}
@@ -87,7 +87,7 @@ void uiVideoMouseHandle( int Button,int
mplVideoMoved=1;
if ( !guiApp.videoWindow.isFullScreen )
{
- wsMoveWindow( &guiApp.videoWindow,True,RX - sx,RY - sy );
+ wsWindowMove( &guiApp.videoWindow,True,RX - sx,RY - sy );
}
break;
case wsPMMouseButton:
@@ -99,9 +99,9 @@ void uiVideoMouseHandle( int Button,int
case wsRLMouseButton:
if ( ( !mplVideoMoved )&&( guiApp.videoWindow.isFullScreen ) )
{
- // NOTE TO MYSELF: this doesn't work, fix later with wsSetLayer()?
- if( videoVisible++%2 ) wsRaiseWindowTop( wsDisplay,guiApp.mainWindow.WindowID );
- else wsRaiseWindowTop( wsDisplay,guiApp.videoWindow.WindowID );
+ // NOTE TO MYSELF: this doesn't work, fix later with wsWindowLayer()?
+ if( videoVisible++%2 ) wsWindowRaiseTop( wsDisplay,guiApp.mainWindow.WindowID );
+ else wsWindowRaiseTop( wsDisplay,guiApp.videoWindow.WindowID );
}
msButton=0;
mplVideoMoved=0;
Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c Fri Jan 18 00:35:53 2013 (r35774)
+++ trunk/gui/wm/ws.c Fri Jan 18 01:35:38 2013 (r35775)
@@ -138,7 +138,7 @@ static enum PixelFormat out_pix_fmt = PI
*
* @param win pointer to a ws window structure or NULL
*/
-static void wsUpdateXineramaInfo(wsWindow *win)
+static void wsWindowUpdateXinerama(wsWindow *win)
{
if (win) {
vo_dx = win->X;
@@ -238,7 +238,7 @@ static int wsGetOutMask(void)
return 0;
}
-void wsXInit(Display *display)
+void wsInit(Display *display)
{
int eventbase;
int errorbase;
@@ -307,7 +307,7 @@ void wsXInit(Display *display)
wsMaxY = DisplayHeight(wsDisplay, wsScreen);
}
- wsUpdateXineramaInfo(NULL);
+ wsWindowUpdateXinerama(NULL);
wsGetScreenDepth();
@@ -377,7 +377,7 @@ void wsXInit(Display *display)
}
}
-void wsXDone(void)
+void wsDone(void)
{
//XCloseDisplay(wsDisplay);
}
@@ -416,7 +416,7 @@ void wsSetErrorHandler(void)
// Handle events.
// ----------------------------------------------------------------------------------------------
-static int wsSearch(Window win)
+static int wsWindowListSearch(Window win)
{
int i;
@@ -427,14 +427,14 @@ static int wsSearch(Window win)
return -1;
}
-void wsEvents(XEvent *event)
+void wsEvent(XEvent *event)
{
unsigned long i = 0;
int l;
int x, y;
Window child_window = 0;
- l = wsSearch(event->xany.window);
+ l = wsWindowListSearch(event->xany.window);
if (l == -1)
return;
@@ -630,7 +630,7 @@ keypressed:
}
if (wsWindowList[l]->wsCursor != None) {
- wsVisibleMouse(wsWindowList[l], wsShowMouseCursor);
+ wsMouseVisibility(wsWindowList[l], wsShowMouseCursor);
mouse_win = wsWindowList[l];
mouse_time = GetTimerMS();
}
@@ -642,7 +642,7 @@ keypressed:
i = event->xbutton.button + 128;
if (wsWindowList[l]->wsCursor != None) {
- wsVisibleMouse(wsWindowList[l], wsShowMouseCursor);
+ wsMouseVisibility(wsWindowList[l], wsShowMouseCursor);
mouse_win = wsWindowList[l];
mouse_time = GetTimerMS();
}
@@ -654,7 +654,7 @@ keypressed:
i = event->xbutton.button;
if (wsWindowList[l]->wsCursor != None) {
- wsVisibleMouse(wsWindowList[l], wsShowMouseCursor);
+ wsMouseVisibility(wsWindowList[l], wsShowMouseCursor);
mouse_win = wsWindowList[l];
mouse_time = GetTimerMS();
}
@@ -687,14 +687,14 @@ buttonreleased:
XSync(wsDisplay, False);
}
-void wsHandleEvents(void)
+void wsEvents(void)
{
- XEvent wsEvent;
+ XEvent xev;
/* handle pending events */
while (XPending(wsDisplay)) {
- XNextEvent(wsDisplay, &wsEvent);
-// printf("### X event: %d [%d]\n",wsEvent.type,delay);
- wsEvents(&wsEvent);
+ XNextEvent(wsDisplay, &xev);
+// printf("### X event: %d [%d]\n",xev.type,delay);
+ wsEvent(&xev);
}
}
@@ -707,7 +707,7 @@ void wsHandleEvents(void)
* @param width width of the area to place the window in
* @param height height of the area to place the window in
*/
-static void wsWindowPosition(wsWindow *win, int x, int y, int width, int height)
+static void wsWindowUpdatePosition(wsWindow *win, int x, int y, int width, int height)
{
switch (x) {
case -1:
@@ -826,14 +826,14 @@ XTextProperty wsTextProperty;
Window LeaderWindow;
// ----------------------------------------------------------------------------------------------
-// wsCreateWindow: create a new window on the screen.
+// wsWindowCreate: create a new window on the screen.
// x,y : window position
// w,h : window size
// b : window border size
// c : mouse cursor visible
// p : properties - "decoration", visible titlebar, etc ...
// ----------------------------------------------------------------------------------------------
-void wsCreateWindow(wsWindow *win, int x, int y, int w, int h, int b, int c, unsigned char p, char *label)
+void wsWindowCreate(wsWindow *win, int x, int y, int w, int h, int b, int c, unsigned char p, char *label)
{
int depth;
@@ -842,7 +842,7 @@ void wsCreateWindow(wsWindow *win, int x
if (p & wsShowFrame)
win->Decorations = True;
- wsWindowPosition(win, x, y, w, h);
+ wsWindowUpdatePosition(win, x, y, w, h);
win->Width = w;
win->Height = h;
@@ -959,7 +959,7 @@ void wsCreateWindow(wsWindow *win, int x
wsMapWait(win);
}
- wsCreateImage(win, win->Width, win->Height);
+ wsImageCreate(win, win->Width, win->Height);
/* End of creating -------------------------------------------------------------------------- */
{
@@ -986,11 +986,11 @@ void wsCreateWindow(wsWindow *win, int x
mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] window is created. ( %s ).\n", label);
}
-void wsDestroyWindow(wsWindow *win)
+void wsWindowDestroy(wsWindow *win)
{
int l;
- l = wsSearch(win->WindowID);
+ l = wsWindowListSearch(win->WindowID);
if (l != -1)
wsWindowList[l] = NULL;
@@ -1002,7 +1002,7 @@ void wsDestroyWindow(wsWindow *win)
XFreeGC(wsDisplay, win->wGC);
XUnmapWindow(wsDisplay, win->WindowID);
- wsDestroyImage(win);
+ wsImageDestroy(win);
XDestroyWindow(wsDisplay, win->WindowID);
#if 0
win->ReDraw = NULL;
@@ -1036,7 +1036,7 @@ void wsWindowDecoration(wsWindow *win, B
PropModeReplace, (unsigned char *)&wsMotifWmHints, 5);
}
-void wsSetShape(wsWindow *win, char *data)
+void wsWindowShape(wsWindow *win, char *data)
{
#ifdef CONFIG_XSHAPE
if (!wsUseXShape)
@@ -1061,7 +1061,7 @@ void wsSetShape(wsWindow *win, char *dat
* @param Win window
* @param icon pointer to the icons
*/
-void wsSetIcon(Display *display, Window Win, guiIcon_t *icon)
+void wsWindowIcon(Display *display, Window Win, guiIcon_t *icon)
{
XWMHints *wm;
Atom iconatom;
@@ -1098,7 +1098,7 @@ void wsSetIcon(Display *display, Window
// ----------------------------------------------------------------------------------------------
// Set window background to 'color'.
// ----------------------------------------------------------------------------------------------
-void wsSetBackgroundRGB(wsWindow *win, int r, int g, int b)
+void wsWindowBackground(wsWindow *win, int r, int g, int b)
{
int color = 0;
@@ -1138,7 +1138,7 @@ void wsSetBackgroundRGB(wsWindow *win, i
*
* @param win pointer to a ws window structure
*/
-void wsClearWindow(wsWindow *win)
+void wsWindowClear(wsWindow *win)
{
XClearWindow(wsDisplay, win->WindowID);
}
@@ -1146,13 +1146,13 @@ void wsClearWindow(wsWindow *win)
// ----------------------------------------------------------------------------------------------
// Move window to x, y.
// ----------------------------------------------------------------------------------------------
-void wsMoveWindow(wsWindow *win, Bool abs, int x, int y)
+void wsWindowMove(wsWindow *win, Bool abs, int x, int y)
{
if (abs) {
win->X = x;
win->Y = y;
} else
- wsWindowPosition(win, x, y, win->Width, win->Height);
+ wsWindowUpdatePosition(win, x, y, win->Width, win->Height);
wsSizeHint(win);
XMoveWindow(wsDisplay, win->WindowID, win->X, win->Y);
@@ -1167,11 +1167,11 @@ void wsMoveWindow(wsWindow *win, Bool ab
* @param x x position of the window (real/absolute or mock)
* @param y y position of the window (real/absolute or mock)
*/
-void wsMoveWindowWithin(wsWindow *win, Bool abs, int x, int y)
+void wsWindowMoveWithin(wsWindow *win, Bool abs, int x, int y)
{
Bool fitting = True;
- wsMoveWindow(win, abs, x, y);
+ wsWindowMove(win, abs, x, y);
if (win->X + win->Width + 1 > wsMaxX) {
fitting = False;
@@ -1190,13 +1190,13 @@ void wsMoveWindowWithin(wsWindow *win, B
}
if (!fitting)
- wsMoveWindow(win, True, win->X, win->Y);
+ wsWindowMove(win, True, win->X, win->Y);
}
// ----------------------------------------------------------------------------------------------
// Resize window to sx, sy.
// ----------------------------------------------------------------------------------------------
-void wsResizeWindow(wsWindow *win, int sx, int sy)
+void wsWindowResize(wsWindow *win, int sx, int sy)
{
win->Width = sx;
win->Height = sy;
@@ -1218,7 +1218,7 @@ void wsResizeWindow(wsWindow *win, int s
*
* @param win pointer to a ws window structure
*/
-void wsFullScreen(wsWindow *win)
+void wsWindowFullscreen(wsWindow *win)
{
if (win->isFullScreen) {
if (vo_fs_type & vo_wm_FULLSCREEN)
@@ -1245,7 +1245,7 @@ void wsFullScreen(wsWindow *win)
win->isFullScreen = True;
- wsUpdateXineramaInfo(win);
+ wsWindowUpdateXinerama(win);
}
/* unknown window manager and obsolete option -fsmode used */
@@ -1258,15 +1258,15 @@ void wsFullScreen(wsWindow *win)
if (!(vo_fs_type & vo_wm_FULLSCREEN)) {
wsSizeHint(win);
wsWindowDecoration(win, win->Decorations && !win->isFullScreen);
- wsSetLayer(wsDisplay, win->WindowID, win->isFullScreen);
+ wsWindowLayer(wsDisplay, win->WindowID, win->isFullScreen);
XMoveResizeWindow(wsDisplay, win->WindowID, win->X, win->Y, win->Width, win->Height);
}
/* some window managers lose ontop after fullscreen */
if (!win->isFullScreen & vo_ontop)
- wsSetLayer(wsDisplay, win->WindowID, vo_ontop);
+ wsWindowLayer(wsDisplay, win->WindowID, vo_ontop);
- wsRaiseWindowTop(wsDisplay, win->WindowID);
+ wsWindowRaiseTop(wsDisplay, win->WindowID);
XFlush(wsDisplay);
}
@@ -1275,12 +1275,12 @@ void wsFullScreen(wsWindow *win)
*
* @param win pointer to a ws window structure
*/
-void wsIconify(wsWindow *win)
+void wsWindowIconify(wsWindow *win)
{
XIconifyWindow(wsDisplay, win->WindowID, 0);
}
-void wsVisibleWindow(wsWindow *win, int show)
+void wsWindowVisibility(wsWindow *win, int show)
{
switch (show) {
case wsShowWindow:
@@ -1308,7 +1308,7 @@ void wsVisibleWindow(wsWindow *win, int
* @param display display
* @param Win window
*/
-void wsRaiseWindowTop(Display *display, Window Win)
+void wsWindowRaiseTop(Display *display, Window Win)
{
XMapRaised(display, Win); // NOTE TO MYSELF: is that really enough?
XRaiseWindow(display, Win); // NOTE TO MYSELF: is that really enough?
@@ -1325,7 +1325,7 @@ void wsRaiseWindowTop(Display *display,
* @param Win window
* @param fullscreen whether to set fullscreen or normal layer
*/
-void wsSetLayer(Display *display, Window Win, Bool fullscreen)
+void wsWindowLayer(Display *display, Window Win, Bool fullscreen)
{
vo_x11_setlayer(display, Win, fullscreen);
}
@@ -1333,7 +1333,7 @@ void wsSetLayer(Display *display, Window
// ----------------------------------------------------------------------------------------------
// Redraw screen.
// ----------------------------------------------------------------------------------------------
-void wsPostRedisplay(wsWindow *win)
+void wsWindowRedraw(wsWindow *win)
{
if (win->ReDraw) {
win->State = wsWindowExpose;
@@ -1345,7 +1345,7 @@ void wsPostRedisplay(wsWindow *win)
// ----------------------------------------------------------------------------------------------
// Put 'Image' to window.
// ----------------------------------------------------------------------------------------------
-void wsCreateImage(wsWindow *win, int Width, int Height)
+void wsImageCreate(wsWindow *win, int Width, int Height)
{
#ifdef HAVE_SHM
if (wsUseXShm) {
@@ -1401,7 +1401,7 @@ void wsCreateImage(wsWindow *win, int Wi
win->ImageDatadw = (unsigned int *)win->xImage->data;
}
-void wsDestroyImage(wsWindow *win)
+void wsImageDestroy(wsWindow *win)
{
if (win->xImage) {
XDestroyImage(win->xImage);
@@ -1417,7 +1417,7 @@ void wsDestroyImage(wsWindow *win)
win->xImage = NULL;
}
-void wsConvert(wsWindow *win, unsigned char *Image)
+void wsImageConvert(wsWindow *win, unsigned char *Image)
{
static struct SwsContext *sws_ctx;
const uint8_t *src[4] = { Image, NULL, NULL, NULL };
@@ -1459,7 +1459,7 @@ void wsConvert(wsWindow *win, unsigned c
}
}
-void wsPutImage(wsWindow *win)
+void wsImageDraw(wsWindow *win)
{
#ifdef HAVE_SHM
if (wsUseXShm) {
@@ -1477,16 +1477,16 @@ void wsPutImage(wsWindow *win)
}
}
-void wsResizeImage(wsWindow *win, int Width, int Height)
+void wsImageResize(wsWindow *win, int Width, int Height)
{
- wsDestroyImage(win);
- wsCreateImage(win, Width, Height);
+ wsImageDestroy(win);
+ wsImageCreate(win, Width, Height);
}
// ----------------------------------------------------------------------------------------------
// Show / hide mouse cursor.
// ----------------------------------------------------------------------------------------------
-void wsVisibleMouse(wsWindow *win, int m)
+void wsMouseVisibility(wsWindow *win, int m)
{
switch (m) {
case wsShowMouseCursor:
@@ -1512,10 +1512,10 @@ void wsVisibleMouse(wsWindow *win, int m
/**
* @brief Handle automatic hiding of the cursor.
*/
-void wsAutohideCursor(void)
+void wsMouseAutohide(void)
{
if (mouse_win && (GetTimerMS() - mouse_time >= MOUSEHIDE_DELAY)) {
- wsVisibleMouse(mouse_win, wsHideMouseCursor);
+ wsMouseVisibility(mouse_win, wsHideMouseCursor);
mouse_win = NULL;
}
}
Modified: trunk/gui/wm/ws.h
==============================================================================
--- trunk/gui/wm/ws.h Fri Jan 18 00:35:53 2013 (r35774)
+++ trunk/gui/wm/ws.h Fri Jan 18 01:35:38 2013 (r35775)
@@ -171,43 +171,43 @@ extern int wsOrgY;
extern Display *wsDisplay;
// ----------------------------------------------------------------------------------------------
-void wsXDone(void);
-void wsXInit(Display *display);
+void wsDone(void);
+void wsInit(Display *display);
void wsSetErrorHandler(void);
-void wsAutohideCursor(void);
-void wsEvents(XEvent *event);
-void wsHandleEvents(void);
+void wsMouseAutohide(void);
+void wsEvent(XEvent *event);
+void wsEvents(void);
-void wsCreateWindow(wsWindow *win, int x, int y, int w, int h, int b, int c, unsigned char p, char *label);
-void wsDestroyWindow(wsWindow *win);
-void wsMoveWindow(wsWindow *win, Bool abs, int x, int y);
-void wsMoveWindowWithin(wsWindow *win, Bool abs, int x, int y);
-void wsResizeWindow(wsWindow *win, int sx, int sy);
-void wsIconify(wsWindow *win);
-void wsRaiseWindowTop(Display *display, Window Win);
-void wsSetBackgroundRGB(wsWindow *win, int r, int g, int b);
-void wsClearWindow(wsWindow *win);
-void wsVisibleWindow(wsWindow *win, int show);
+void wsWindowCreate(wsWindow *win, int x, int y, int w, int h, int b, int c, unsigned char p, char *label);
+void wsWindowDestroy(wsWindow *win);
+void wsWindowMove(wsWindow *win, Bool abs, int x, int y);
+void wsWindowMoveWithin(wsWindow *win, Bool abs, int x, int y);
+void wsWindowResize(wsWindow *win, int sx, int sy);
+void wsWindowIconify(wsWindow *win);
+void wsWindowRaiseTop(Display *display, Window Win);
+void wsWindowBackground(wsWindow *win, int r, int g, int b);
+void wsWindowClear(wsWindow *win);
+void wsWindowVisibility(wsWindow *win, int show);
void wsWindowDecoration(wsWindow *win, Bool decor);
-void wsSetLayer(Display *display, Window Win, Bool fullscreen);
-void wsFullScreen(wsWindow *win);
-void wsPostRedisplay(wsWindow *win);
-void wsSetShape(wsWindow *win, char *data);
-void wsSetIcon(Display *display, Window Win, guiIcon_t *icon);
+void wsWindowLayer(Display *display, Window Win, Bool fullscreen);
+void wsWindowFullscreen(wsWindow *win);
+void wsWindowRedraw(wsWindow *win);
+void wsWindowShape(wsWindow *win, char *data);
+void wsWindowIcon(Display *display, Window Win, guiIcon_t *icon);
// ----------------------------------------------------------------------------------------------
// Show / hide mouse cursor.
// ----------------------------------------------------------------------------------------------
-void wsVisibleMouse(wsWindow *win, int m);
+void wsMouseVisibility(wsWindow *win, int m);
// ----------------------------------------------------------------------------------------------
// Image handling
// ----------------------------------------------------------------------------------------------
-void wsCreateImage(wsWindow *win, int Width, int Height);
-void wsConvert(wsWindow *win, unsigned char *Image);
-void wsPutImage(wsWindow *win);
-void wsResizeImage(wsWindow *win, int Width, int Height);
-void wsDestroyImage(wsWindow *win);
+void wsImageCreate(wsWindow *win, int Width, int Height);
+void wsImageConvert(wsWindow *win, unsigned char *Image);
+void wsImageDraw(wsWindow *win);
+void wsImageResize(wsWindow *win, int Width, int Height);
+void wsImageDestroy(wsWindow *win);
#endif /* MPLAYER_GUI_WS_H */
More information about the MPlayer-cvslog
mailing list