changeset 35665:c31b82bd6092

Remove unused code and declarations.
author ib
date Thu, 17 Jan 2013 14:56:27 +0000
parents 9162585304d0
children 01ac3cd2f101
files gui/wm/ws.c gui/wm/ws.h
diffstat 2 files changed, 0 insertions(+), 143 deletions(-) [+]
line wrap: on
line diff
--- a/gui/wm/ws.c	Wed Jan 16 19:43:56 2013 +0000
+++ b/gui/wm/ws.c	Thu Jan 17 14:56:27 2013 +0000
@@ -87,11 +87,7 @@
 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 @@
 
 #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 @@
 #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 @@
     if (p & wsShowFrame)
         win->Decorations = True;
 
-    wsHGC = DefaultGC(wsDisplay, wsScreen);
-
     wsWindowPosition(win, x, y, w, h);
 
     win->Width     = w;
@@ -1011,40 +988,10 @@
     }
 }
 
-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 @@
 }
 
 // ----------------------------------------------------------------------------------------------
-//    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 @@
 // ----------------------------------------------------------------------------------------------
 //    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 @@
     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 @@
     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
--- a/gui/wm/ws.h	Wed Jan 16 19:43:56 2013 +0000
+++ b/gui/wm/ws.h	Thu Jan 17 14:56:27 2013 +0000
@@ -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 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 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 @@
 //    Show / hide mouse cursor.
 // ----------------------------------------------------------------------------------------------
 void wsVisibleMouse(wsWindow *win, int m);
-void wsSetMousePosition(wsWindow *win, int x, int y);
 
 // ----------------------------------------------------------------------------------------------
 // Image handling