[MPlayer-cvslog] r35759 - in trunk/gui/wm: ws.c ws.h
ib
subversion at mplayerhq.hu
Thu Jan 17 15:56:27 CET 2013
Author: ib
Date: Thu Jan 17 15:56:27 2013
New Revision: 35759
Log:
Remove unused code and declarations.
Modified:
trunk/gui/wm/ws.c
trunk/gui/wm/ws.h
Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c Wed Jan 16 20:43:56 2013 (r35758)
+++ trunk/gui/wm/ws.c Thu Jan 17 15:56:27 2013 (r35759)
@@ -87,11 +87,7 @@ Display *wsDisplay;
int wsScreen;
Window wsRootWin;
XEvent wsEvent;
-int wsWindowDepth;
-GC wsHGC;
MotifWmHints wsMotifWmHints;
-Atom wsTextProperlyAtom = None;
-int wsLayer = 0;
int wsDepthOnScreen = 0;
int wsRedMask = 0;
@@ -131,10 +127,7 @@ enum PixelFormat out_pix_fmt = PIX_FMT_N
#define MWM_HINTS_FUNCTIONS (1L << 0)
#define MWM_HINTS_DECORATIONS (1L << 1)
-#define MWM_HINTS_INPUT_MODE (1L << 2)
-#define MWM_HINTS_STATUS (1L << 3)
-#define MWM_FUNC_ALL (1L << 0)
#define MWM_FUNC_RESIZE (1L << 1)
#define MWM_FUNC_MOVE (1L << 2)
#define MWM_FUNC_MINIMIZE (1L << 3)
@@ -142,20 +135,6 @@ enum PixelFormat out_pix_fmt = PIX_FMT_N
#define MWM_FUNC_CLOSE (1L << 5)
#define MWM_DECOR_ALL (1L << 0)
-#define MWM_DECOR_BORDER (1L << 1)
-#define MWM_DECOR_RESIZEH (1L << 2)
-#define MWM_DECOR_TITLE (1L << 3)
-#define MWM_DECOR_MENU (1L << 4)
-#define MWM_DECOR_MINIMIZE (1L << 5)
-#define MWM_DECOR_MAXIMIZE (1L << 6)
-
-#define MWM_INPUT_MODELESS 0
-#define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1
-#define MWM_INPUT_SYSTEM_MODAL 2
-#define MWM_INPUT_FULL_APPLICATION_MODAL 3
-#define MWM_INPUT_APPLICATION_MODAL MWM_INPUT_PRIMARY_APPLICATION_MODAL
-
-#define MWM_TEAROFF_WINDOW (1L << 0)
// ----------------------------------------------------------------------------------------------
// Init X Window System.
@@ -510,8 +489,6 @@ void wsCreateWindow(wsWindow *win, int x
if (p & wsShowFrame)
win->Decorations = True;
- wsHGC = DefaultGC(wsDisplay, wsScreen);
-
wsWindowPosition(win, x, y, w, h);
win->Width = w;
@@ -1011,40 +988,10 @@ void wsHandleEvents(void)
}
}
-void wsMainLoop(void)
-{
- int delay = 20;
-
- mp_msg(MSGT_GPLAYER, MSGL_V, "[ws] init threads: %d\n", XInitThreads());
- XSynchronize(wsDisplay, False);
- XLockDisplay(wsDisplay);
-// XIfEvent( wsDisplay,&wsEvent,wsEvents );
-
- while (wsTrue) {
- /* handle pending events */
- while (XPending(wsDisplay)) {
- XNextEvent(wsDisplay, &wsEvent);
- wsEvents(&wsEvent);
- delay = 0;
- }
-
- usleep(delay * 1000); // FIXME!
-
- if (delay < 10 * 20)
- delay += 20; // pump up delay up to 0.2 sec (low activity)
- }
-
- XUnlockDisplay(wsDisplay);
-}
-
// ----------------------------------------------------------------------------------------------
// Move window to selected layer
// ----------------------------------------------------------------------------------------------
-#define WIN_LAYER_ONBOTTOM 2
-#define WIN_LAYER_NORMAL 4
-#define WIN_LAYER_ONTOP 10
-
/**
* @brief Set the layer for a window.
*
@@ -1129,15 +1076,6 @@ void wsPostRedisplay(wsWindow *win)
}
// ----------------------------------------------------------------------------------------------
-// Do Exit.
-// ----------------------------------------------------------------------------------------------
-void wsDoExit(void)
-{
- wsTrue = False;
- wsResizeWindow(wsWindowList[0], 32, 32);
-}
-
-// ----------------------------------------------------------------------------------------------
// Put 'Image' to window.
// ----------------------------------------------------------------------------------------------
void wsConvert(wsWindow *win, unsigned char *Image)
@@ -1298,11 +1236,6 @@ void wsRaiseWindowTop(Display *display,
// ----------------------------------------------------------------------------------------------
// Set window background to 'color'.
// ----------------------------------------------------------------------------------------------
-void wsSetBackground(wsWindow *win, int color)
-{
- XSetWindowBackground(wsDisplay, win->WindowID, color);
-}
-
void wsSetBackgroundRGB(wsWindow *win, int r, int g, int b)
{
int color = 0;
@@ -1338,41 +1271,6 @@ void wsSetBackgroundRGB(wsWindow *win, i
XSetWindowBackground(wsDisplay, win->WindowID, color);
}
-void wsSetForegroundRGB(wsWindow *win, int r, int g, int b)
-{
- int color = 0;
-
- switch (wsOutMask) {
- case wsRGB32:
- case wsRGB24:
- color = (r << 16) + (g << 8) + b;
- break;
-
- case wsBGR32:
- case wsBGR24:
- color = (b << 16) + (g << 8) + r;
- break;
-
- case wsRGB16:
- PACK_RGB16(b, g, r, color);
- break;
-
- case wsBGR16:
- PACK_RGB16(r, g, b, color);
- break;
-
- case wsRGB15:
- PACK_RGB15(b, g, r, color);
- break;
-
- case wsBGR15:
- PACK_RGB15(r, g, b, color);
- break;
- }
-
- XSetForeground(wsDisplay, win->wGC, color);
-}
-
// ----------------------------------------------------------------------------------------------
// Show / hide mouse cursor.
// ----------------------------------------------------------------------------------------------
@@ -1592,11 +1490,6 @@ void wsSetTitle(wsWindow *win, char *nam
XStoreName(wsDisplay, win->WindowID, name);
}
-void wsSetMousePosition(wsWindow *win, int x, int y)
-{
- XWarpPointer(wsDisplay, wsRootWin, win->WindowID, 0, 0, 0, 0, x, y);
-}
-
void wsSetShape(wsWindow *win, char *data)
{
#ifdef CONFIG_XSHAPE
Modified: trunk/gui/wm/ws.h
==============================================================================
--- trunk/gui/wm/ws.h Wed Jan 16 20:43:56 2013 (r35758)
+++ trunk/gui/wm/ws.h Thu Jan 17 15:56:27 2013 (r35759)
@@ -36,11 +36,6 @@
#define wsKeyReleased 0
#define wsKeyPressed 1
-#define wsShift (1L << 0)
-#define wsLock (1L << 1)
-#define wsCtrl (1L << 2)
-#define wsAlt (1L << 3)
-
#define wsPLMouseButton 1
#define wsPMMouseButton 2
#define wsPRMouseButton 3
@@ -56,16 +51,12 @@
#define wsMoveMouse 255
#define wsShowMouseCursor 1
-#define wsMouse 1
#define wsHideMouseCursor 0
-#define wsNoMouse 0
#define wsHandleMouseButton 2
#define wsHandleMouseMove 4
#define wsHideFrame 0
-#define wsNoFrame 0
#define wsShowFrame 1
-#define wsFrame 1
#define wsMaxSize 2
#define wsMinSize 4
#define wsShowWindow 8
@@ -74,8 +65,6 @@
#define wsWaitMap 64
#define wsAspect 128
-#define wsSysName "AutoSpace Window System LiTe"
-
#define wsRGB32 1
#define wsBGR32 2
#define wsRGB24 3
@@ -105,12 +94,6 @@
#define wsPVisible 5
#define wsRolled 6
-#define wsWMUnknown 0
-#define wsWMNetWM 1
-#define wsWMKDE 2
-#define wsWMIceWM 3
-#define wsWMWMaker 4
-
typedef void (*wsTReDraw)(void);
typedef void (*wsTReSize)(unsigned int X, unsigned int Y, unsigned int width, unsigned int height);
typedef void (*wsTIdle)(void);
@@ -191,34 +174,18 @@ extern int wsOrgX;
extern int wsOrgY;
extern Display *wsDisplay;
-extern int wsScreen;
-extern Window wsRootWin;
-extern int wsLayer;
-
-extern unsigned char *wsImageData;
-
-extern XEvent wsEvent;
extern int wsDepthOnScreen;
-extern int wsRedMask;
-extern int wsGreenMask;
-extern int wsBlueMask;
-
-extern int wsUseXShm;
// ----------------------------------------------------------------------------------------------
// wsKeyTable
// ----------------------------------------------------------------------------------------------
-extern unsigned long wsKeyTable[512];
-
void wsXDone(void);
void wsXInit(Display *display);
void wsSetErrorHandler(void);
int wsGetDepthOnScreen(void);
-void wsDoExit(void);
-void wsMainLoop(void);
void wsAutohideCursor(void);
Bool wsEvents(XEvent *event);
void wsHandleEvents(void);
@@ -230,8 +197,6 @@ void wsMoveWindowWithin(wsWindow *win, B
void wsResizeWindow(wsWindow *win, int sx, int sy);
void wsIconify(wsWindow *win);
void wsRaiseWindowTop(Display *display, Window Win);
-void wsSetBackground(wsWindow *win, int color);
-void wsSetForegroundRGB(wsWindow *win, int r, int g, int b);
void wsSetBackgroundRGB(wsWindow *win, int r, int g, int b);
void wsClearWindow(wsWindow *win);
void wsSetTitle(wsWindow *win, char *name);
@@ -247,7 +212,6 @@ void wsSetIcon(Display *display, Window
// Show / hide mouse cursor.
// ----------------------------------------------------------------------------------------------
void wsVisibleMouse(wsWindow *win, int m);
-void wsSetMousePosition(wsWindow *win, int x, int y);
// ----------------------------------------------------------------------------------------------
// Image handling
More information about the MPlayer-cvslog
mailing list