diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-15 07:29:15 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-15 07:29:15 (GMT) |
commit | f04bc88816f8493150db95a893ce05a5a53bd9b9 (patch) | |
tree | 2f7de1e2c7b27e9be17c0b352c57daae546dad1c /win | |
parent | 54343577e9d09179ecf58eb62c0fcdad5f5c4f1a (diff) | |
download | tk-f04bc88816f8493150db95a893ce05a5a53bd9b9.zip tk-f04bc88816f8493150db95a893ce05a5a53bd9b9.tar.gz tk-f04bc88816f8493150db95a893ce05a5a53bd9b9.tar.bz2 |
More Xlib.h macro usage
Diffstat (limited to 'win')
-rw-r--r-- | win/stubs.c | 6 | ||||
-rw-r--r-- | win/tkWinDraw.c | 12 | ||||
-rw-r--r-- | win/tkWinFont.c | 4 | ||||
-rw-r--r-- | win/tkWinImage.c | 2 | ||||
-rw-r--r-- | win/tkWinMenu.c | 2 | ||||
-rw-r--r-- | win/tkWinPixmap.c | 6 | ||||
-rw-r--r-- | win/tkWinPointer.c | 6 | ||||
-rw-r--r-- | win/tkWinWindow.c | 30 | ||||
-rw-r--r-- | win/tkWinWm.c | 2 | ||||
-rw-r--r-- | win/tkWinX.c | 20 |
10 files changed, 45 insertions, 45 deletions
diff --git a/win/stubs.c b/win/stubs.c index faeac08..93a086e 100644 --- a/win/stubs.c +++ b/win/stubs.c @@ -579,7 +579,7 @@ int XNoOp( Display *display) { - display->request++; + LastKnownRequestProcessed(display)++; return 0; } @@ -590,7 +590,7 @@ XSynchronize( { (void)onoff; - display->request++; + LastKnownRequestProcessed(display)++; return NULL; } @@ -601,7 +601,7 @@ XSync( { (void)discard; - display->request++; + LastKnownRequestProcessed(display)++; return 0; } diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c index 730af71..c2e2c25 100644 --- a/win/tkWinDraw.c +++ b/win/tkWinDraw.c @@ -369,7 +369,7 @@ XCopyPlane( HBRUSH bgBrush, fgBrush, oldBrush; TkpClipMask *clipPtr = (TkpClipMask*)gc->clip_mask; - display->request++; + LastKnownRequestProcessed(display)++; if (plane != 1) { Tcl_Panic("Unexpected plane specified for XCopyPlane"); @@ -520,7 +520,7 @@ TkPutImage( HBITMAP bitmap; char *data; - display->request++; + LastKnownRequestProcessed(display)++; dc = TkWinGetDrawableDC(display, d, &state); SetROP2(dc, tkpWinRopModes[gc->function]); @@ -1096,7 +1096,7 @@ XDrawArc( unsigned int width, unsigned int height, int start, int extent) { - display->request++; + LastKnownRequestProcessed(display)++; return DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 0); } @@ -1111,7 +1111,7 @@ XDrawArcs( { int ret = Success; - display->request++; + LastKnownRequestProcessed(display)++; while (narcs-- > 0) { ret = DrawOrFillArc(display, d, gc, arcs[0].x, arcs[0].y, @@ -1150,7 +1150,7 @@ XFillArc( unsigned int width, unsigned int height, int start, int extent) { - display->request++; + LastKnownRequestProcessed(display)++; return DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 1); } @@ -1165,7 +1165,7 @@ XFillArcs( { int ret = Success; - display->request++; + LastKnownRequestProcessed(display)++; while (narcs-- > 0) { ret = DrawOrFillArc(display, d, gc, arcs[0].x, arcs[0].y, diff --git a/win/tkWinFont.c b/win/tkWinFont.c index 1862989..5968146 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -1082,7 +1082,7 @@ Tk_DrawChars( TkWinDCState state; fontPtr = (WinFont *) gc->font; - display->request++; + LastKnownRequestProcessed(display)++; if (drawable == None) { return; @@ -1231,7 +1231,7 @@ TkDrawAngledChars( TkWinDCState state; fontPtr = (WinFont *) gc->font; - display->request++; + LastKnownRequestProcessed(display)++; if (drawable == None) { return; diff --git a/win/tkWinImage.c b/win/tkWinImage.c index fc48b95..e3054c6 100644 --- a/win/tkWinImage.c +++ b/win/tkWinImage.c @@ -589,7 +589,7 @@ XGetImage( XImage *imagePtr; HDC dc; - display->request++; + LastKnownRequestProcessed(display)++; if (twdPtr == NULL) { /* diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index bee43b7..fadd8ef 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -3188,7 +3188,7 @@ MenuSelectEvent( memset(&event, 0, sizeof(event)); event.virt.type = VirtualEvent; - event.virt.serial = menuPtr->display->request; + event.virt.serial = LastKnownRequestProcessed(menuPtr->display); event.virt.send_event = 0; event.virt.display = menuPtr->display; Tk_MakeWindowExist(menuPtr->tkwin); diff --git a/win/tkWinPixmap.c b/win/tkWinPixmap.c index d87fb34..0bba4c3 100644 --- a/win/tkWinPixmap.c +++ b/win/tkWinPixmap.c @@ -40,7 +40,7 @@ Tk_GetPixmap( int planes; Screen *screen; - display->request++; + LastKnownRequestProcessed(display)++; newTwdPtr = (TkWinDrawable *)ckalloc(sizeof(TkWinDrawable)); newTwdPtr->type = TWD_BITMAP; @@ -56,7 +56,7 @@ Tk_GetPixmap( } else { newTwdPtr->bitmap.colormap = twdPtr->bitmap.colormap; } - screen = &display->screens[0]; + screen = ScreenOfDisplay(display, 0); planes = 1; if (depth == screen->root_depth) { planes = PTR2INT(screen->ext_data); @@ -144,7 +144,7 @@ Tk_FreePixmap( { TkWinDrawable *twdPtr = (TkWinDrawable *) pixmap; - display->request++; + LastKnownRequestProcessed(display)++; if (twdPtr != NULL) { DeleteObject(twdPtr->bitmap.handle); ckfree(twdPtr); diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c index bbffa44..200a868 100644 --- a/win/tkWinPointer.c +++ b/win/tkWinPointer.c @@ -339,7 +339,7 @@ XQueryPointer( (void)win_x_return; (void)win_y_return; - display->request++; + LastKnownRequestProcessed(display)++; TkGetPointerCoords(NULL, root_x_return, root_y_return); *mask_return = TkWinGetModifierState(); return True; @@ -476,7 +476,7 @@ XGetInputFocus( *focus_return = tkwin ? Tk_WindowId(tkwin) : 0; *revert_to_return = RevertToParent; - display->request++; + LastKnownRequestProcessed(display)++; return Success; } @@ -507,7 +507,7 @@ XSetInputFocus( (void)revert_to; (void)time; - display->request++; + LastKnownRequestProcessed(display)++; if (focus != None) { SetFocus(Tk_GetHWND(focus)); } diff --git a/win/tkWinWindow.c b/win/tkWinWindow.c index 54af4a4..8390ec0 100644 --- a/win/tkWinWindow.c +++ b/win/tkWinWindow.c @@ -306,7 +306,7 @@ XDestroyWindow( ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - display->request++; + LastKnownRequestProcessed(display)++; /* * Remove references to the window in the pointer module then release the @@ -358,7 +358,7 @@ XMapWindow( TkWindow *parentPtr; TkWindow *winPtr = TkWinGetWinPtr(w); - display->request++; + LastKnownRequestProcessed(display)++; ShowWindow(Tk_GetHWND(w), SW_SHOWNORMAL); winPtr->flags |= TK_MAPPED; @@ -381,7 +381,7 @@ XMapWindow( } } else { event.type = MapNotify; - event.xmap.serial = display->request; + event.xmap.serial = LastKnownRequestProcessed(display); event.xmap.send_event = False; event.xmap.display = display; event.xmap.event = winPtr->window; @@ -396,7 +396,7 @@ XMapWindow( */ event.type = VisibilityNotify; - event.xvisibility.serial = display->request; + event.xvisibility.serial = LastKnownRequestProcessed(display); event.xvisibility.send_event = False; event.xvisibility.display = display; event.xvisibility.window = winPtr->window; @@ -466,7 +466,7 @@ XUnmapWindow( XEvent event; TkWindow *winPtr = TkWinGetWinPtr(w); - display->request++; + LastKnownRequestProcessed(display)++; /* * Bug fix: Don't short circuit this routine based on TK_MAPPED because it @@ -478,7 +478,7 @@ XUnmapWindow( if (winPtr->flags & TK_WIN_MANAGED) { event.type = UnmapNotify; - event.xunmap.serial = display->request; + event.xunmap.serial = LastKnownRequestProcessed(display); event.xunmap.send_event = False; event.xunmap.display = display; event.xunmap.event = winPtr->window; @@ -512,7 +512,7 @@ XMoveResizeWindow( int x, int y, /* Position relative to parent. */ unsigned int width, unsigned int height) { - display->request++; + LastKnownRequestProcessed(display)++; MoveWindow(Tk_GetHWND(w), x, y, (int) width, (int) height, TRUE); return Success; } @@ -541,7 +541,7 @@ XMoveWindow( { TkWindow *winPtr = TkWinGetWinPtr(w); - display->request++; + LastKnownRequestProcessed(display)++; MoveWindow(Tk_GetHWND(w), x, y, winPtr->changes.width, winPtr->changes.height, TRUE); @@ -572,7 +572,7 @@ XResizeWindow( { TkWindow *winPtr = TkWinGetWinPtr(w); - display->request++; + LastKnownRequestProcessed(display)++; MoveWindow(Tk_GetHWND(w), winPtr->changes.x, winPtr->changes.y, (int)width, (int)height, TRUE); @@ -602,7 +602,7 @@ XRaiseWindow( { HWND window = Tk_GetHWND(w); - display->request++; + LastKnownRequestProcessed(display)++; SetWindowPos(window, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); return Success; } @@ -614,7 +614,7 @@ XLowerWindow( { HWND window = Tk_GetHWND(w); - display->request++; + LastKnownRequestProcessed(display)++; SetWindowPos(window, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); return Success; } @@ -648,7 +648,7 @@ XConfigureWindow( TkWindow *winPtr = TkWinGetWinPtr(w); HWND hwnd = Tk_GetHWND(w); - display->request++; + LastKnownRequestProcessed(display)++; /* * Change the shape and/or position of the window. @@ -704,10 +704,10 @@ XClearWindow( HWND hwnd = Tk_GetHWND(w); HDC dc = GetDC(hwnd); - palette = TkWinGetPalette(display->screens[0].cmap); + palette = TkWinGetPalette(ScreenOfDisplay(display, 0)->cmap); oldPalette = SelectPalette(dc, palette, FALSE); - display->request++; + LastKnownRequestProcessed(display)++; winPtr = TkWinGetWinPtr(w); brush = CreateSolidBrush(winPtr->atts.background_pixel); @@ -832,7 +832,7 @@ TkpShowBusyWindow( window = Tk_WindowId(busyPtr->tkBusy); display = Tk_Display(busyPtr->tkBusy); hWnd = Tk_GetHWND(window); - display->request++; + LastKnownRequestProcessed(display)++; SetWindowPos(hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); } diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 46f332a..f772d1c 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -7257,7 +7257,7 @@ GenerateConfigureNotify( */ event.type = ConfigureNotify; - event.xconfigure.serial = winPtr->display->request; + event.xconfigure.serial = LastKnownRequestProcessed(winPtr->display); event.xconfigure.send_event = False; event.xconfigure.display = winPtr->display; event.xconfigure.event = winPtr->window; diff --git a/win/tkWinX.c b/win/tkWinX.c index db62d3e..0f6f48a 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -422,10 +422,10 @@ TkWinDisplayChanged( HDC dc; Screen *screen; - if (display == NULL || display->screens == NULL) { + if (display == NULL || (((_XPrivDisplay)(display))->screens) == NULL) { return; } - screen = display->screens; + screen = (((_XPrivDisplay)(display))->screens); dc = GetDC(NULL); screen->width = GetDeviceCaps(dc, HORZRES); @@ -559,7 +559,7 @@ XkbOpenDisplay( int *minor_rtrn, int *reason) { - Display *display = (Display *)ckalloc(sizeof(Display)); + _XPrivDisplay display = (_XPrivDisplay)ckalloc(sizeof(Display)); Screen *screen = (Screen *)ckalloc(sizeof(Screen)); TkWinDrawable *twdPtr = (TkWinDrawable *)ckalloc(sizeof(TkWinDrawable)); @@ -621,7 +621,7 @@ void TkpCloseDisplay( TkDisplay *dispPtr) { - Display *display = dispPtr->display; + _XPrivDisplay display = (_XPrivDisplay)dispPtr->display; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); @@ -636,14 +636,14 @@ TkpCloseDisplay( ckfree(display->display_name); } if (display->screens != NULL) { - if (display->screens->root_visual != NULL) { - ckfree(display->screens->root_visual); + if (ScreenOfDisplay(display, 0)->root_visual != NULL) { + ckfree(ScreenOfDisplay(display, 0)->root_visual); } - if (display->screens->root != None) { - ckfree((char *)display->screens->root); + if (ScreenOfDisplay(display, 0)->root != None) { + ckfree((char *)ScreenOfDisplay(display, 0)->root); } - if (display->screens->cmap != None) { - XFreeColormap(display, display->screens->cmap); + if (ScreenOfDisplay(display, 0)->cmap != None) { + XFreeColormap(display, ScreenOfDisplay(display, 0)->cmap); } ckfree(display->screens); } |