diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/Makefile.in | 28 | ||||
-rw-r--r-- | win/stubs.c | 146 | ||||
-rw-r--r-- | win/tkWinClipboard.c | 3 | ||||
-rw-r--r-- | win/tkWinColor.c | 6 | ||||
-rw-r--r-- | win/tkWinDraw.c | 46 | ||||
-rw-r--r-- | win/tkWinKey.c | 3 | ||||
-rw-r--r-- | win/tkWinPointer.c | 12 | ||||
-rw-r--r-- | win/tkWinPort.h | 38 | ||||
-rw-r--r-- | win/tkWinRegion.c | 7 | ||||
-rw-r--r-- | win/tkWinWindow.c | 32 | ||||
-rw-r--r-- | win/tkWinWm.c | 10 | ||||
-rw-r--r-- | win/tkWinX.c | 3 | ||||
-rw-r--r-- | win/winMain.c | 2 |
13 files changed, 217 insertions, 119 deletions
diff --git a/win/Makefile.in b/win/Makefile.in index 431b5cc..89f57bc 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -94,6 +94,10 @@ TCL_BIN_DIR = @TCL_BIN_DIR@ # been replaced by the configure script): TCL_GENERIC_DIR = @TCL_SRC_DIR@/generic +# The directory containing the platform specific Tcl sources and headers +# appropriate for this version of Tk: +TCL_PLATFORM_DIR = @TCL_SRC_DIR@/win + TCL_TOOL_DIR = @TCL_SRC_DIR@/tools # Converts a POSIX path to a Windows native path. @@ -120,6 +124,7 @@ BITMAP_DIR_NATIVE = $(ROOT_DIR_NATIVE)/bitmaps XLIB_DIR_NATIVE = $(ROOT_DIR_NATIVE)/xlib RC_DIR_NATIVE = $(WIN_DIR_NATIVE)/rc TCL_GENERIC_NATIVE = $(shell $(CYGPATH) '$(TCL_GENERIC_DIR)' | sed 's!\\!/!g') +TCL_PLATFORM_NATIVE = $(shell $(CYGPATH) '$(TCL_PLATFORM_DIR)' | sed 's!\\!/!g') TCL_SRC_DIR_NATIVE = $(shell $(CYGPATH) '$(TCL_SRC_DIR)' | sed 's!\\!/!g') DLLSUFFIX = @DLLSUFFIX@ @@ -208,7 +213,7 @@ TCL_EXE = @TCLSH_PROG@ CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ -I"${GENERIC_DIR_NATIVE}" -I"${WIN_DIR_NATIVE}" \ -I"${XLIB_DIR_NATIVE}" -I"${BITMAP_DIR_NATIVE}" \ --I"${TCL_GENERIC_NATIVE}" ${AC_FLAGS} -DUSE_TCL_STUBS +-I"${TCL_GENERIC_NATIVE}" -I"${TCL_PLATFORM_NATIVE}" ${AC_FLAGS} -DUSE_TCL_STUBS CC_OBJNAME = @CC_OBJNAME@ CC_EXENAME = @CC_EXENAME@ @@ -440,7 +445,7 @@ runtest: binaries $(TKTEST) $(TEST_DLL_FILE) shell: binaries $(SHELL_ENV) ./$(WISH) $(SCRIPT) -demo: +demo: $(WISH) $(SHELL_ENV) ./$(WISH) $(ROOT_DIR)/library/demos/widget # This target can be used to run wish inside either gdb or insight @@ -473,10 +478,13 @@ install-binaries: binaries @echo "Creating package index $(PKG_INDEX)"; @$(RM) $(PKG_INDEX); @(\ - echo "if {[catch {package present Tcl\ - $(TCLVERSION)$(TCLPATCHL)}]} { return }";\ - echo "package ifneeded Tk $(VERSION)$(PATCH_LEVEL)\ - [list load [file join \$$dir .. .. bin $(TK_DLL_FILE)] Tk]";\ + echo "if {[catch {package present Tcl $(TCLVERSION)$(TCLPATCHL)}]} { return }";\ + echo "if {(\$$::tcl_platform(platform) eq \"unix\")";\ + echo " && ([info exists ::env(DISPLAY)] || [lsearch -exact \$$::argv -display] > -1)} {";\ + echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file join \$$dir .. .. bin libtk$(VERSION).dll] Tk]";\ + echo "} else {";\ + echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [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); \ do \ @@ -673,7 +681,7 @@ tkWindow.$(OBJEXT): configure Makefile .SUFFIXES: .$(RES) .SUFFIXES: .rc -# Implicit rule for all object files that will end up in the Tcl library +# Implicit rule for all object files that will end up in the Tk library %.$(OBJEXT): %.c $(CC) -c $(CC_SWITCHES) -DBUILD_tk -DBUILD_ttk @DEPARG@ $(CC_OBJNAME) @@ -709,10 +717,10 @@ $(GENERIC_DIR)/tkStubInit.c: $(GENERIC_DIR)/tk.decls \ @echo "This warning can be safely ignored, do not report as a bug!" genstubs: - $(TCL_EXE) "$(TCL_TOOL_DIR)\genStubs.tcl" \ + $(TCL_EXE) "$(TCL_TOOL_DIR)/genStubs.tcl" \ "$(GENERIC_DIR_NATIVE)" \ - "$(GENERIC_DIR_NATIVE)\tk.decls" \ - "$(GENERIC_DIR_NATIVE)\tkInt.decls" + "$(GENERIC_DIR_NATIVE)/tk.decls" \ + "$(GENERIC_DIR_NATIVE)/tkInt.decls" $(TCL_EXE) "$(TTK_DIR)/ttkGenStubs.tcl" \ "$(TTK_DIR)" \ "$(TTK_DIR)/ttk.decls" diff --git a/win/stubs.c b/win/stubs.c index 7e26d4b..0940752 100644 --- a/win/stubs.c +++ b/win/stubs.c @@ -8,7 +8,7 @@ int _XInitImageFuncPtrs( XImage *image) { - return 0; + return Success; } /* @@ -36,7 +36,7 @@ XStringListToTextProperty( * From Xlib.h */ -void +int XChangeProperty( Display *display, Window w, @@ -47,6 +47,7 @@ XChangeProperty( _Xconst unsigned char *data, int nelements) { + return Success; } Cursor @@ -56,14 +57,14 @@ 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; } XIC -XCreateIC(void) +XCreateIC(XIM xim, ...) { return NULL; } @@ -81,12 +82,13 @@ XCreatePixmapCursor( return (Cursor) NULL; } -void +int XDeleteProperty( Display *display, Window w, Atom property) { + return Success; } void @@ -103,18 +105,20 @@ XFilterEvent( return 0; } -void +int XForceScreenSaver( Display *display, int mode) { + return Success; } -void +int XFreeCursor( Display *display, Cursor cursor) { + return Success; } GContext @@ -138,7 +142,7 @@ XGetWindowAttributes( Window w, XWindowAttributes *window_attributes_return) { - return 0; + return Success; } Status @@ -157,7 +161,7 @@ XIconifyWindow( Window w, int screen_number) { - return 0; + return Success; } XHostAddress * @@ -177,30 +181,33 @@ XLookupColor( XColor *exact_def_return, XColor *screen_def_return) { - return 0; + return Success; } -void +int XNextEvent( Display *display, XEvent *event_return) { + return Success; } -void +int XPutBackEvent( Display *display, XEvent *event) { + return Success; } -void +int XQueryColors( Display *display, Colormap colormap, XColor *defs_in_out, int ncolors) { + return Success; } int @@ -212,13 +219,14 @@ XQueryTree( Window **children_return, unsigned int *nchildren_return) { - return 0; + return Success; } -void +int XRefreshKeyboardMapping( XMappingEvent *event_map) { + return Success; } Window @@ -229,12 +237,13 @@ XRootWindow( return (Window) NULL; } -void +int XSelectInput( Display *display, Window w, long event_mask) { + return Success; } int @@ -245,16 +254,17 @@ XSendEvent( long event_mask, XEvent *event_send) { - return 0; + return Success; } -void +int XSetCommand( Display *display, Window w, - const char **argv, + char **argv, int argc) { + return Success; } XErrorHandler @@ -264,60 +274,67 @@ XSetErrorHandler( return NULL; } -void +int XSetIconName( Display *display, Window w, _Xconst char *icon_name) { + return Success; } -void +int XSetWindowBackground( Display *display, Window w, unsigned long background_pixel) { + return Success; } -void +int XSetWindowBackgroundPixmap( Display *display, Window w, Pixmap background_pixmap) { + return Success; } -void +int XSetWindowBorder( Display *display, Window w, unsigned long border_pixel) { + return Success; } -void +int XSetWindowBorderPixmap( Display *display, Window w, Pixmap border_pixmap) { + return Success; } -void +int XSetWindowBorderWidth( Display *display, Window w, unsigned int width) { + return Success; } -void +int XSetWindowColormap( Display *display, Window w, Colormap colormap) { + return Success; } Bool @@ -334,13 +351,14 @@ XTranslateCoordinates( return 0; } -void +int XWindowEvent( Display *display, Window w, long event_mask, XEvent *event_return) { + return Success; } int @@ -349,7 +367,7 @@ XWithdrawWindow( Window w, int screen_number) { - return 0; + return Success; } int @@ -361,7 +379,7 @@ XmbLookupString( KeySym *keysym_return, Status *status_return) { - return 0; + return Success; } int @@ -386,3 +404,71 @@ XGetWindowProperty( *prop_return = NULL; return BadValue; } + +/* + * The following functions were implemented as macros under Windows. + */ + +int +XFlush( + Display *display) +{ + return 0; +} + +int +XGrabServer( + Display *display) +{ + return 0; +} + +int +XUngrabServer( + Display *display) +{ + return 0; +} + +int +XFree( + void *data) +{ + if ((data) != NULL) { + ckfree(data); + } + return 0; +} + +int +XNoOp( + Display *display) +{ + display->request++; + return 0; +} + +int +XSynchronize( + Display *display, + Bool bool) +{ + display->request++; + return 0; +} + +int +XSync( + Display *display, + Bool bool) +{ + display->request++; + return 0; +} + +VisualID +XVisualIDFromVisual( + Visual *visual) +{ + return visual->visualid; +} diff --git a/win/tkWinClipboard.c b/win/tkWinClipboard.c index cffb0ee..dcbce6c 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 d93143d..fee3ee2 100644 --- a/win/tkWinColor.c +++ b/win/tkWinColor.c @@ -406,7 +406,7 @@ XAllocColor( *---------------------------------------------------------------------- */ -void +int XFreeColors( Display *display, Colormap colormap, @@ -458,6 +458,7 @@ XFreeColors( } } ReleaseDC(NULL, dc); + return Success; } /* @@ -539,7 +540,7 @@ XCreateColormap( *---------------------------------------------------------------------- */ -void +int XFreeColormap( Display *display, Colormap colormap) @@ -551,6 +552,7 @@ XFreeColormap( } Tcl_DeleteHashTable(&cmap->refCounts); ckfree(cmap); + return Success; } /* diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c index dd482bd..ba4176c 100644 --- a/win/tkWinDraw.c +++ b/win/tkWinDraw.c @@ -115,7 +115,7 @@ static Tcl_ThreadDataKey dataKey; static POINT * ConvertPoints(XPoint *points, int npoints, int mode, RECT *bbox); -static void DrawOrFillArc(Display *display, Drawable d, GC gc, +static int DrawOrFillArc(Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height, int start, int extent, int fill); @@ -296,7 +296,7 @@ ConvertPoints( *---------------------------------------------------------------------- */ -void +int XCopyArea( Display *display, Drawable src, @@ -332,6 +332,7 @@ XCopyArea( TkWinReleaseDrawableDC(dest, destDC, &destState); } TkWinReleaseDrawableDC(src, srcDC, &srcState); + return Success; } /* @@ -352,7 +353,7 @@ XCopyArea( *---------------------------------------------------------------------- */ -void +int XCopyPlane( Display *display, Drawable src, @@ -479,6 +480,7 @@ XCopyPlane( TkWinReleaseDrawableDC(dest, destDC, &destState); } TkWinReleaseDrawableDC(src, srcDC, &srcState); + return Success; } /* @@ -498,7 +500,7 @@ XCopyPlane( *---------------------------------------------------------------------- */ -void +int TkPutImage( unsigned long *colors, /* Array of pixel values used by this image. * May be NULL. */ @@ -587,7 +589,7 @@ TkPutImage( Tcl_Panic("Fail to allocate bitmap"); 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, @@ -595,6 +597,7 @@ TkPutImage( DeleteObject(SelectObject(dcMem, bitmap)); DeleteDC(dcMem); TkWinReleaseDrawableDC(d, dc, &state); + return Success; } /* @@ -613,7 +616,7 @@ TkPutImage( *---------------------------------------------------------------------- */ -void +int XFillRectangles( Display *display, Drawable d, @@ -628,7 +631,7 @@ XFillRectangles( HBRUSH brush, oldBrush; if (d == None) { - return; + return BadDrawable; } dc = TkWinGetDrawableDC(display, d, &state); @@ -715,6 +718,7 @@ XFillRectangles( } DeleteObject(brush); TkWinReleaseDrawableDC(d, dc, &state); + return Success; } /* @@ -862,7 +866,7 @@ RenderObject( *---------------------------------------------------------------------- */ -void +int XDrawLines( Display *display, Drawable d, @@ -876,7 +880,7 @@ XDrawLines( HDC dc; if (d == None) { - return; + return BadDrawable; } dc = TkWinGetDrawableDC(display, d, &state); @@ -887,6 +891,7 @@ XDrawLines( DeleteObject(pen); TkWinReleaseDrawableDC(d, dc, &state); + return Success; } /* @@ -905,7 +910,7 @@ XDrawLines( *---------------------------------------------------------------------- */ -void +int XFillPolygon( Display *display, Drawable d, @@ -920,7 +925,7 @@ XFillPolygon( HDC dc; if (d == None) { - return; + return BadDrawable; } dc = TkWinGetDrawableDC(display, d, &state); @@ -929,6 +934,7 @@ XFillPolygon( RenderObject(dc, gc, points, npoints, mode, pen, Polygon); TkWinReleaseDrawableDC(d, dc, &state); + return Success; } /* @@ -947,7 +953,7 @@ XFillPolygon( *---------------------------------------------------------------------- */ -void +int XDrawRectangle( Display *display, Drawable d, @@ -961,7 +967,7 @@ XDrawRectangle( HDC dc; if (d == None) { - return; + return BadDrawable; } dc = TkWinGetDrawableDC(display, d, &state); @@ -977,6 +983,7 @@ XDrawRectangle( DeleteObject(SelectObject(dc, oldPen)); SelectObject(dc, oldBrush); TkWinReleaseDrawableDC(d, dc, &state); + return Success; } /* @@ -995,7 +1002,7 @@ XDrawRectangle( *---------------------------------------------------------------------- */ -void +int XDrawArc( Display *display, Drawable d, @@ -1006,7 +1013,7 @@ XDrawArc( { display->request++; - DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 0); + return DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 0); } /* @@ -1025,7 +1032,7 @@ XDrawArc( *---------------------------------------------------------------------- */ -void +int XFillArc( Display *display, Drawable d, @@ -1036,7 +1043,7 @@ XFillArc( { display->request++; - DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 1); + return DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 1); } /* @@ -1056,7 +1063,7 @@ XFillArc( *---------------------------------------------------------------------- */ -static void +static int DrawOrFillArc( Display *display, Drawable d, @@ -1076,7 +1083,7 @@ DrawOrFillArc( double radian_start, radian_end, xr, yr; if (d == None) { - return; + return BadDrawable; } dc = TkWinGetDrawableDC(display, d, &state); @@ -1149,6 +1156,7 @@ DrawOrFillArc( } DeleteObject(SelectObject(dc, oldPen)); TkWinReleaseDrawableDC(d, dc, &state); + return Success; } /* diff --git a/win/tkWinKey.c b/win/tkWinKey.c index 8e66171..ed546f7 100644 --- a/win/tkWinKey.c +++ b/win/tkWinKey.c @@ -689,12 +689,13 @@ XGetModifierMapping( *---------------------------------------------------------------------- */ -void +int XFreeModifiermap( XModifierKeymap *modmap) { ckfree(modmap->modifiermap); ckfree(modmap); + return Success; } /* diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c index c3b3d3c..6f1f840 100644 --- a/win/tkWinPointer.c +++ b/win/tkWinPointer.c @@ -193,12 +193,13 @@ XGrabKeyboard( *---------------------------------------------------------------------- */ -void +int XUngrabKeyboard( Display *display, Time time) { keyboardWinPtr = NULL; + return Success; } /* @@ -343,7 +344,7 @@ XQueryPointer( *---------------------------------------------------------------------- */ -void +int XWarpPointer( Display *display, Window src_w, @@ -359,6 +360,7 @@ XWarpPointer( GetWindowRect(Tk_GetHWND(dest_w), &r); SetCursorPos(r.left+dest_x, r.top+dest_y); + return Success; } void @@ -391,7 +393,7 @@ TkpWarpPointer( *---------------------------------------------------------------------- */ -void +int XGetInputFocus( Display *display, Window *focus_return, @@ -402,6 +404,7 @@ XGetInputFocus( *focus_return = tkwin ? Tk_WindowId(tkwin) : None; *revert_to_return = RevertToParent; display->request++; + return Success; } /* @@ -421,7 +424,7 @@ XGetInputFocus( *---------------------------------------------------------------------- */ -void +int XSetInputFocus( Display *display, Window focus, @@ -432,6 +435,7 @@ XSetInputFocus( if (focus != None) { SetFocus(Tk_GetHWND(focus)); } + return Success; } /* diff --git a/win/tkWinPort.h b/win/tkWinPort.h index e5ed7de..fe31609 100644 --- a/win/tkWinPort.h +++ b/win/tkWinPort.h @@ -69,20 +69,9 @@ #include <X11/Xatom.h> #include <X11/Xutil.h> -#ifdef __CYGWIN__ -# ifndef _vsnprintf -# define _vsnprintf vsnprintf -# endif -# ifndef _wcsicmp -# define _wcsicmp wcscasecmp -# endif -#else -# ifndef strncasecmp -# define strncasecmp strnicmp -# endif -# ifndef strcasecmp -# define strcasecmp stricmp -# endif +#ifndef __GNUC__ +# define strncasecmp strnicmp +# define strcasecmp stricmp #endif #define NBBY 8 @@ -109,27 +98,6 @@ #endif /* _MSC_VER */ /* - * The following stubs implement various calls that don't do anything - * under Windows. - */ - -#define TkpCmapStressed(tkwin,colormap) (0) -#define XFlush(display) -#define XGrabServer(display) -#define XUngrabServer(display) -#define TkpSync(display) - -/* - * The following functions are implemented as macros under Windows. - */ - -#define XFree(data) {if ((data) != NULL) ckfree((char *) (data));} -#define XNoOp(display) {display->request++;} -#define XSynchronize(display, bool) {display->request++;} -#define XSync(display, bool) {display->request++;} -#define XVisualIDFromVisual(visual) (visual->visualid) - -/* * The following Tk functions are implemented as macros under Windows. */ 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/tkWinWindow.c b/win/tkWinWindow.c index ca966fd..ade15bc 100644 --- a/win/tkWinWindow.c +++ b/win/tkWinWindow.c @@ -302,7 +302,7 @@ TkpMakeWindow( *---------------------------------------------------------------------- */ -void +int XDestroyWindow( Display *display, Window w) @@ -338,6 +338,7 @@ XDestroyWindow( if (hwnd != NULL && !(winPtr->flags & TK_DONT_DESTROY_WINDOW)) { DestroyWindow(hwnd); } + return Success; } /* @@ -356,7 +357,7 @@ XDestroyWindow( *---------------------------------------------------------------------- */ -void +int XMapWindow( Display *display, Window w) @@ -380,7 +381,7 @@ XMapWindow( for (parentPtr = winPtr->parentPtr; ; parentPtr = parentPtr->parentPtr) { if ((parentPtr == NULL) || !(parentPtr->flags & TK_MAPPED)) { - return; + return Success; } if (parentPtr->flags & TK_TOP_HIERARCHY) { break; @@ -409,6 +410,7 @@ XMapWindow( event.xvisibility.window = winPtr->window; event.xvisibility.state = VisibilityUnobscured; NotifyVisibility(&event, winPtr); + return Success; } /* @@ -464,7 +466,7 @@ NotifyVisibility( *---------------------------------------------------------------------- */ -void +int XUnmapWindow( Display *display, Window w) @@ -492,6 +494,7 @@ XUnmapWindow( event.xunmap.from_configure = False; Tk_HandleEvent(&event); } + return Success; } /* @@ -510,7 +513,7 @@ XUnmapWindow( *---------------------------------------------------------------------- */ -void +int XMoveResizeWindow( Display *display, Window w, @@ -519,6 +522,7 @@ XMoveResizeWindow( { display->request++; MoveWindow(Tk_GetHWND(w), x, y, (int) width, (int) height, TRUE); + return Success; } /* @@ -537,7 +541,7 @@ XMoveResizeWindow( *---------------------------------------------------------------------- */ -void +int XMoveWindow( Display *display, Window w, @@ -549,6 +553,7 @@ XMoveWindow( MoveWindow(Tk_GetHWND(w), x, y, winPtr->changes.width, winPtr->changes.height, TRUE); + return Success; } /* @@ -567,7 +572,7 @@ XMoveWindow( *---------------------------------------------------------------------- */ -void +int XResizeWindow( Display *display, Window w, @@ -579,6 +584,7 @@ XResizeWindow( MoveWindow(Tk_GetHWND(w), winPtr->changes.x, winPtr->changes.y, (int)width, (int)height, TRUE); + return Success; } /* @@ -597,7 +603,7 @@ XResizeWindow( *---------------------------------------------------------------------- */ -void +int XRaiseWindow( Display *display, Window w) @@ -606,6 +612,7 @@ XRaiseWindow( display->request++; SetWindowPos(window, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); + return Success; } /* @@ -627,7 +634,7 @@ XRaiseWindow( *---------------------------------------------------------------------- */ -void +int XConfigureWindow( Display *display, Window w, @@ -662,6 +669,7 @@ XConfigureWindow( } TkWinSetWindowPos(hwnd, sibling, values->stack_mode); } + return Success; } /* @@ -680,7 +688,7 @@ XConfigureWindow( *---------------------------------------------------------------------- */ -void +int XClearWindow( Display *display, Window w) @@ -708,6 +716,7 @@ XClearWindow( DeleteObject(brush); SelectPalette(dc, oldPalette, TRUE); ReleaseDC(hwnd, dc); + return Success; } /* @@ -728,7 +737,7 @@ XClearWindow( *---------------------------------------------------------------------- */ -void +int XChangeWindowAttributes( Display *display, Window w, @@ -738,6 +747,7 @@ XChangeWindowAttributes( if (valueMask & CWCursor) { XDefineCursor(display, w, attributes->cursor); } + return Success; } /* diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 2aa251c..45ccbe2 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -2436,7 +2436,7 @@ TkWmUnmapWindow( *---------------------------------------------------------------------- */ -void +int TkpWmSetState( TkWindow *winPtr, /* Toplevel window to operate on. */ int state) /* One of IconicState, ZoomState, NormalState, @@ -2447,7 +2447,7 @@ TkpWmSetState( if (wmPtr->flags & WM_NEVER_MAPPED) { wmPtr->hints.initial_state = state; - return; + goto setStateEnd; } wmPtr->flags |= WM_SYNC_PENDING; @@ -2460,11 +2460,13 @@ TkpWmSetState( } else if (state == ZoomState) { cmd = SW_SHOWMAXIMIZED; } else { - return; + goto setStateEnd; } ShowWindow(wmPtr->wrapper, cmd); wmPtr->flags &= ~WM_SYNC_PENDING; +setStateEnd: + return 1; } /* @@ -3501,7 +3503,7 @@ WmCommandCmd( wmPtr->cmdArgc = cmdArgc; wmPtr->cmdArgv = cmdArgv; if (!(wmPtr->flags & WM_NEVER_MAPPED)) { - XSetCommand(winPtr->display, winPtr->window, cmdArgv, cmdArgc); + XSetCommand(winPtr->display, winPtr->window, (char **) cmdArgv, cmdArgc); } return TCL_OK; } diff --git a/win/tkWinX.c b/win/tkWinX.c index 3a02d05..e85b7e7 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -716,12 +716,13 @@ TkClipCleanup( *---------------------------------------------------------------------- */ -void +int XBell( Display *display, int percent) { MessageBeep(MB_OK); + return Success; } /* diff --git a/win/winMain.c b/win/winMain.c index a182e3c..353c2b8 100644 --- a/win/winMain.c +++ b/win/winMain.c @@ -228,7 +228,7 @@ Tcl_AppInit( return TCL_OK; } -#if defined(__CYGWIN__) || defined(TK_TEST) +#if defined(TK_TEST) /* *---------------------------------------------------------------------- * |