diff options
author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-05-29 15:08:30 (GMT) |
---|---|---|
committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-05-29 15:08:30 (GMT) |
commit | 6936dd4b22d7a07ccf86b62109d18fd643cf927c (patch) | |
tree | 7a8248e3b761a09cb1aa6973d874475fbc44bac4 /win | |
parent | 4b0887a92a4c3713e274b024df8b62f0d504927d (diff) | |
download | tk-6936dd4b22d7a07ccf86b62109d18fd643cf927c.zip tk-6936dd4b22d7a07ccf86b62109d18fd643cf927c.tar.gz tk-6936dd4b22d7a07ccf86b62109d18fd643cf927c.tar.bz2 |
Change XFillRectangle(s)/XDrawLines(s) signature to match Xorg, needed for Cygwin.
Generate same pkgIndex.tcl file for win32 and cygwin, one that is equally useable for both.
Diffstat (limited to 'win')
-rw-r--r-- | win/Makefile.in | 12 | ||||
-rwxr-xr-x | win/tkWinDraw.c | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/win/Makefile.in b/win/Makefile.in index 6612230..714b0e9 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -427,14 +427,12 @@ install-binaries: binaries @echo "Creating package index $(PKG_INDEX)"; @$(RM) $(PKG_INDEX); @(\ - echo "if {[package vcompare [package provide Tcl]\ - $(TCLVERSION)] != 0} { return }";\ - echo "if {([info exists ::env(DISPLAY)] || [lsearch -exact \$$::argv -display] > -1)} {";\ - echo " package ifneeded Tk $(VERSION)\ - [list load [file join \$$dir .. .. bin libtk$(VERSION).dll] Tk]";\ + echo "if {[package vcompare [package provide Tcl] $(TCLVERSION)] != 0} { return }";\ + echo "if {(\$$::tcl_platform(platform) eq \"unix\")";\ + echo " && ([info exists ::env(DISPLAY)] || [lsearch -exact \$$::argv -display] > -1)} {";\ + echo " package ifneeded Tk $(VERSION) [list load [file join \$$dir .. .. bin libtk$(VERSION).dll] Tk]";\ echo "} else {";\ - echo " package ifneeded Tk $(VERSION)\ - [list load [file join \$$dir .. .. bin $(TK_DLL_FILE)] Tk]";\ + echo " package ifneeded Tk $(VERSION) [list load [file join \$$dir .. .. bin $(TK_DLL_FILE)] Tk]";\ echo "}";\ ) > $(PKG_INDEX); @for i in tkConfig.sh $(TK_LIB_FILE) $(TK_STUB_LIB_FILE); \ diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c index 805dde3..fea17d3 100755 --- a/win/tkWinDraw.c +++ b/win/tkWinDraw.c @@ -620,7 +620,7 @@ TkPutImage(colors, ncolors, display, d, gc, image, src_x, src_y, dest_x, *---------------------------------------------------------------------- */ -void +int XFillRectangles(display, d, gc, rectangles, nrectangles) Display* display; Drawable d; @@ -635,7 +635,7 @@ XFillRectangles(display, d, gc, rectangles, nrectangles) HBRUSH brush, oldBrush; if (d == None) { - return; + return 0; } dc = TkWinGetDrawableDC(display, d, &state); @@ -722,6 +722,7 @@ XFillRectangles(display, d, gc, rectangles, nrectangles) } DeleteObject(brush); TkWinReleaseDrawableDC(d, dc, &state); + return 1; } /* @@ -871,7 +872,7 @@ RenderObject(dc, gc, points, npoints, mode, pen, func) *---------------------------------------------------------------------- */ -void +int XDrawLines(display, d, gc, points, npoints, mode) Display* display; Drawable d; @@ -885,7 +886,7 @@ XDrawLines(display, d, gc, points, npoints, mode) HDC dc; if (d == None) { - return; + return 0; } dc = TkWinGetDrawableDC(display, d, &state); @@ -896,6 +897,7 @@ XDrawLines(display, d, gc, points, npoints, mode) DeleteObject(pen); TkWinReleaseDrawableDC(d, dc, &state); + return 1; } /* |