diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-05 04:46:39 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-05 04:46:39 (GMT) |
commit | bffdf13f31774677807ea594324f7a8964a1ee10 (patch) | |
tree | 4b1b6848a2a8f1b3f66d319e784c6d08ddc042ab /win | |
parent | 91ae12c773a03fe4533d19a6d115deb6a4c95351 (diff) | |
parent | e35d614587b25a1a03ededdf2d04bcbfca86be70 (diff) | |
download | tk-bffdf13f31774677807ea594324f7a8964a1ee10.zip tk-bffdf13f31774677807ea594324f7a8964a1ee10.tar.gz tk-bffdf13f31774677807ea594324f7a8964a1ee10.tar.bz2 |
Change XSetDashes signature and many others to match Xorg, needed for Cygwin
Diffstat (limited to 'win')
-rw-r--r-- | win/stubs.c | 23 | ||||
-rw-r--r-- | win/tkWinClipboard.c | 3 | ||||
-rw-r--r-- | win/tkWinColor.c | 6 | ||||
-rw-r--r-- | win/tkWinDraw.c | 15 | ||||
-rw-r--r-- | win/tkWinKey.c | 3 | ||||
-rw-r--r-- | win/tkWinPointer.c | 2 | ||||
-rw-r--r-- | win/tkWinRegion.c | 7 | ||||
-rw-r--r-- | win/tkWinX.c | 3 |
8 files changed, 39 insertions, 23 deletions
diff --git a/win/stubs.c b/win/stubs.c index 00030d1..8381145 100644 --- a/win/stubs.c +++ b/win/stubs.c @@ -8,7 +8,7 @@ int _XInitImageFuncPtrs( XImage *image) { - return 0; + return Success; } /* @@ -56,8 +56,8 @@ XCreateGlyphCursor( Font mask_font, unsigned int source_char, unsigned int mask_char, - XColor *foreground_color, - XColor *background_color) + XColor _Xconst *foreground_color, + XColor _Xconst *background_color) { return 1; } @@ -138,7 +138,7 @@ XGetWindowAttributes( Window w, XWindowAttributes *window_attributes_return) { - return 0; + return Success; } Status @@ -157,7 +157,7 @@ XIconifyWindow( Window w, int screen_number) { - return 0; + return Success; } XHostAddress * @@ -177,7 +177,7 @@ XLookupColor( XColor *exact_def_return, XColor *screen_def_return) { - return 0; + return Success; } void @@ -212,7 +212,7 @@ XQueryTree( Window **children_return, unsigned int *nchildren_return) { - return 0; + return Success; } void @@ -245,16 +245,17 @@ XSendEvent( long event_mask, XEvent *event_send) { - return 0; + return Success; } -void +int XSetCommand( Display *display, Window w, char **argv, int argc) { + return Success; } XErrorHandler @@ -349,7 +350,7 @@ XWithdrawWindow( Window w, int screen_number) { - return 0; + return Success; } int @@ -361,7 +362,7 @@ XmbLookupString( KeySym *keysym_return, Status *status_return) { - return 0; + return Success; } int diff --git a/win/tkWinClipboard.c b/win/tkWinClipboard.c index 6007e56..76711b5 100644 --- a/win/tkWinClipboard.c +++ b/win/tkWinClipboard.c @@ -185,7 +185,7 @@ TkSelGetSelection( *---------------------------------------------------------------------- */ -void +int XSetSelectionOwner( Display *display, Atom selection, @@ -212,6 +212,7 @@ XSetSelectionOwner( UpdateClipboard(hwnd); } } + return Success; } /* diff --git a/win/tkWinColor.c b/win/tkWinColor.c index f52f6ed..20ab2e0 100644 --- a/win/tkWinColor.c +++ b/win/tkWinColor.c @@ -426,7 +426,7 @@ XAllocColor( *---------------------------------------------------------------------- */ -void +int XFreeColors( Display *display, Colormap colormap, @@ -479,6 +479,7 @@ XFreeColors( } } ReleaseDC(NULL, dc); + return Success; } /* @@ -560,7 +561,7 @@ XCreateColormap( *---------------------------------------------------------------------- */ -void +int XFreeColormap( Display *display, Colormap colormap) @@ -572,6 +573,7 @@ XFreeColormap( } Tcl_DeleteHashTable(&cmap->refCounts); ckfree((char *) cmap); + return Success; } /* diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c index 64f2c72..388fd14 100644 --- a/win/tkWinDraw.c +++ b/win/tkWinDraw.c @@ -499,7 +499,7 @@ XCopyPlane( *---------------------------------------------------------------------- */ -void +int TkPutImage( unsigned long *colors, /* Array of pixel values used by this image. * May be NULL. */ @@ -588,7 +588,7 @@ TkPutImage( Tcl_Panic("Fail to allocate bitmap\n"); DeleteDC(dcMem); TkWinReleaseDrawableDC(d, dc, &state); - return; + return BadValue; } bitmap = SelectObject(dcMem, bitmap); BitBlt(dc, dest_x, dest_y, (int) width, (int) height, dcMem, src_x, src_y, @@ -596,6 +596,7 @@ TkPutImage( DeleteObject(SelectObject(dcMem, bitmap)); DeleteDC(dcMem); TkWinReleaseDrawableDC(d, dc, &state); + return Success; } /* @@ -614,7 +615,7 @@ TkPutImage( *---------------------------------------------------------------------- */ -void +int XFillRectangles( Display *display, Drawable d, @@ -629,7 +630,7 @@ XFillRectangles( HBRUSH brush, oldBrush; if (d == None) { - return; + return BadDrawable; } dc = TkWinGetDrawableDC(display, d, &state); @@ -716,6 +717,7 @@ XFillRectangles( } DeleteObject(brush); TkWinReleaseDrawableDC(d, dc, &state); + return Success; } /* @@ -865,7 +867,7 @@ RenderObject( *---------------------------------------------------------------------- */ -void +int XDrawLines( Display *display, Drawable d, @@ -879,7 +881,7 @@ XDrawLines( HDC dc; if (d == None) { - return; + return BadDrawable; } dc = TkWinGetDrawableDC(display, d, &state); @@ -890,6 +892,7 @@ XDrawLines( DeleteObject(pen); TkWinReleaseDrawableDC(d, dc, &state); + return Success; } /* diff --git a/win/tkWinKey.c b/win/tkWinKey.c index 522bfba..daf2ecc 100644 --- a/win/tkWinKey.c +++ b/win/tkWinKey.c @@ -692,12 +692,13 @@ XGetModifierMapping( *---------------------------------------------------------------------- */ -void +int XFreeModifiermap( XModifierKeymap *modmap) { ckfree((char *) modmap->modifiermap); ckfree((char *) modmap); + return Success; } /* diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c index d29e952..0136d36 100644 --- a/win/tkWinPointer.c +++ b/win/tkWinPointer.c @@ -343,7 +343,7 @@ XQueryPointer( *---------------------------------------------------------------------- */ -void +int XWarpPointer( Display *display, Window src_w, diff --git a/win/tkWinRegion.c b/win/tkWinRegion.c index a996ca5..d097047 100644 --- a/win/tkWinRegion.c +++ b/win/tkWinRegion.c @@ -11,6 +11,13 @@ #include "tkWinInt.h" +#undef TkCreateRegion +#undef TkDestroyRegion +#undef TkClipBox +#undef TkIntersectRegion +#undef TkUnionRectWithRegion +#undef TkRectInRegion +#undef TkSubtractRegion /* *---------------------------------------------------------------------- diff --git a/win/tkWinX.c b/win/tkWinX.c index 2d5f5f5..1e218ec 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -767,12 +767,13 @@ TkClipCleanup( *---------------------------------------------------------------------- */ -void +int XBell( Display *display, int percent) { MessageBeep(MB_OK); + return Success; } /* |