Mercurial > mplayer.hg
changeset 35631:d0231540cdbd
Cosmetic: Harmonize parameter names.
Use 'display' for Display pointers, 'Win' for Window
and 'win' for wsTWindow pointers.
author | ib |
---|---|
date | Thu, 10 Jan 2013 11:55:27 +0000 |
parents | 099fb0aced44 |
children | 07ecd8abd362 |
files | gui/wm/ws.c gui/wm/ws.h gui/wm/wsxdnd.c gui/wm/wsxdnd.h |
diffstat | 4 files changed, 33 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/wm/ws.c Thu Jan 10 11:24:36 2013 +0000 +++ b/gui/wm/ws.c Thu Jan 10 11:55:27 2013 +0000 @@ -240,15 +240,14 @@ } } -void wsXInit(Display *mDisplay) +void wsXInit(Display *display) { int eventbase; int errorbase; mp_msg(MSGT_GPLAYER, MSGL_V, "X init.\n"); - // NOTE TO MYSELF: Use global mDisplay, get rid of wsDisplay. - wsDisplay = mDisplay; + wsDisplay = display; XSetErrorHandler(wsErrorHandler); @@ -969,9 +968,9 @@ #define WIN_LAYER_NORMAL 4 #define WIN_LAYER_ONTOP 10 -void wsSetLayer(Display *wsDisplay, Window win, int layer) +void wsSetLayer(Display *display, Window Win, int layer) { - vo_x11_setlayer(wsDisplay, win, layer); + vo_x11_setlayer(display, Win, layer); } /** @@ -1230,13 +1229,13 @@ /** * @brief Map a window and raise it to the top. * - * @param dpy display - * @param win window + * @param display display + * @param Win window */ -void wsRaiseWindowTop(Display *dpy, Window win) +void wsRaiseWindowTop(Display *display, Window Win) { - XMapRaised(dpy, win); - XRaiseWindow(dpy, win); + XMapRaised(display, Win); + XRaiseWindow(display, Win); } // ---------------------------------------------------------------------------------------------- @@ -1551,18 +1550,18 @@ * This function sets the X icon hint as well as * the properties KWM_WIN_ICON and _NET_WM_ICON. * - * @param dpy display - * @param win window + * @param display display + * @param Win window * @param icon pointer to the icons */ -void wsSetIcon(Display *dpy, Window win, guiIcon_t *icon) +void wsSetIcon(Display *display, Window Win, guiIcon_t *icon) { XWMHints *wm; Atom iconatom; long data[2]; if (icon->normal) { - wm = XGetWMHints(dpy, win); + wm = XGetWMHints(display, Win); if (!wm) wm = XAllocWMHints(); @@ -1571,20 +1570,20 @@ wm->icon_mask = icon->normal_mask; wm->flags |= IconPixmapHint | IconMaskHint; - XSetWMHints(dpy, win, wm); + XSetWMHints(display, Win, wm); XFree(wm); } if (icon->small || icon->normal) { - iconatom = XInternAtom(dpy, "KWM_WIN_ICON", False); + iconatom = XInternAtom(display, "KWM_WIN_ICON", False); data[0] = (icon->small ? icon->small : icon->normal); data[1] = (icon->small ? icon->small_mask : icon->normal_mask); - XChangeProperty(dpy, win, iconatom, iconatom, 32, PropModeReplace, (unsigned char *)data, 2); + XChangeProperty(display, Win, iconatom, iconatom, 32, PropModeReplace, (unsigned char *)data, 2); } if (icon->collection) { - iconatom = XInternAtom(dpy, "_NET_WM_ICON", False); - XChangeProperty(dpy, win, iconatom, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)icon->collection, icon->collection_size); + iconatom = XInternAtom(display, "_NET_WM_ICON", False); + XChangeProperty(display, Win, iconatom, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)icon->collection, icon->collection_size); } }
--- a/gui/wm/ws.h Thu Jan 10 11:24:36 2013 +0000 +++ b/gui/wm/ws.h Thu Jan 10 11:55:27 2013 +0000 @@ -213,7 +213,7 @@ extern unsigned long wsKeyTable[512]; void wsXDone(void); -void wsXInit(Display *disp); +void wsXInit(Display *display); int wsGetDepthOnScreen(void); @@ -237,7 +237,7 @@ void wsMoveWindowWithin(wsTWindow *win, Bool abs, int x, int y); void wsResizeWindow(wsTWindow *win, int sx, int sy); void wsIconify(wsTWindow *win); -void wsRaiseWindowTop(Display *dpy, Window win); +void wsRaiseWindowTop(Display *display, Window Win); void wsSetBackground(wsTWindow *win, int color); void wsSetForegroundRGB(wsTWindow *win, int r, int g, int b); void wsSetBackgroundRGB(wsTWindow *win, int r, int g, int b); @@ -245,11 +245,11 @@ void wsSetTitle(wsTWindow *win, char *name); void wsVisibleWindow(wsTWindow *win, int show); void wsWindowDecoration(wsTWindow *win, Bool decor); -void wsSetLayer(Display *wsDisplay, Window win, int layer); +void wsSetLayer(Display *display, Window Win, int layer); void wsFullScreen(wsTWindow *win); void wsPostRedisplay(wsTWindow *win); void wsSetShape(wsTWindow *win, char *data); -void wsSetIcon(Display *dpy, Window win, guiIcon_t *icon); +void wsSetIcon(Display *display, Window Win, guiIcon_t *icon); // ---------------------------------------------------------------------------------------------- // Show / hide mouse cursor.
--- a/gui/wm/wsxdnd.c Thu Jan 10 11:24:36 2013 +0000 +++ b/gui/wm/wsxdnd.c Thu Jan 10 11:55:27 2013 +0000 @@ -61,19 +61,19 @@ XA_XdndTypeList = XInternAtom(wsDisplay, "XdndTypeList", False); } -void wsXDNDMakeAwareness(wsTWindow* window) { +void wsXDNDMakeAwareness(wsTWindow* win) { long int xdnd_version = XDND_VERSION; - XChangeProperty (wsDisplay, window->WindowID, XA_XdndAware, XA_ATOM, + XChangeProperty (wsDisplay, win->WindowID, XA_XdndAware, XA_ATOM, 32, PropModeAppend, (char *)&xdnd_version, 1); } -void wsXDNDClearAwareness(wsTWindow* window) { - XDeleteProperty (wsDisplay, window->WindowID, XA_XdndAware); +void wsXDNDClearAwareness(wsTWindow* win) { + XDeleteProperty (wsDisplay, win->WindowID, XA_XdndAware); } #define MAX_DND_FILES 64 Bool -wsXDNDProcessSelection(wsTWindow* wnd, XEvent *event) +wsXDNDProcessSelection(wsTWindow* win, XEvent *event) { Atom ret_type; int ret_format; @@ -96,7 +96,7 @@ xevent.xclient.window = selowner; xevent.xclient.message_type = XA_XdndFinished; xevent.xclient.format = 32; - XDND_FINISHED_TARGET_WIN(&xevent) = wnd->WindowID; + XDND_FINISHED_TARGET_WIN(&xevent) = win->WindowID; XSendEvent(wsDisplay, selowner, 0, 0, &xevent); if (!delme){ @@ -140,8 +140,8 @@ } /* Handle the files */ - if(wnd->DandDHandler){ - wnd->DandDHandler(num,files); + if(win->DandDHandler){ + win->DandDHandler(num,files); } }
--- a/gui/wm/wsxdnd.h Thu Jan 10 11:24:36 2013 +0000 +++ b/gui/wm/wsxdnd.h Thu Jan 10 11:55:27 2013 +0000 @@ -22,10 +22,10 @@ #include "ws.h" void wsXDNDInitialize(void); -Bool wsXDNDProcessSelection(wsTWindow* wnd,XEvent *event); +Bool wsXDNDProcessSelection(wsTWindow* win,XEvent *event); Bool wsXDNDProcessClientMessage(XClientMessageEvent *event); -void wsXDNDMakeAwareness(wsTWindow* window); -void wsXDNDClearAwareness(wsTWindow* window); +void wsXDNDMakeAwareness(wsTWindow* win); +void wsXDNDClearAwareness(wsTWindow* win); /* header was ripped from xdnd's example on its page */