diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/makefile.vc | 49 | ||||
-rw-r--r-- | win/tkWin.h | 15 | ||||
-rw-r--r-- | win/tkWinDraw.c | 4 | ||||
-rw-r--r-- | win/tkWinInt.h | 50 | ||||
-rw-r--r-- | win/tkWinPort.h | 14 | ||||
-rw-r--r-- | win/winMain.c | 15 |
6 files changed, 68 insertions, 79 deletions
diff --git a/win/makefile.vc b/win/makefile.vc index aff185c..ec8c110 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -4,7 +4,7 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # Copyright (c) 1995-1996 Sun Microsystems, Inc. -# RCS: @(#) $Id: makefile.vc,v 1.19 1999/02/12 00:51:12 stanton Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.20 1999/03/10 07:04:46 stanton Exp $ # Does not depend on the presence of any environment variables in # order to compile tcl; all needed information is derived from @@ -46,6 +46,8 @@ NODEBUG = 1 TCLNAMEPREFIX = tcl TKNAMEPREFIX = tk +TCLSTUBPREFIX = $(TCLNAMEPREFIX)stub +TKSTUBPREFIX = $(TKNAMEPREFIX)stub WISHNAMEPREFIX = wish VERSION = 80 DOTVERSION = 8.0 @@ -64,9 +66,12 @@ OUTDIR = $(TMPDIR) TCLLIB = $(TCLNAMEPREFIX)$(VERSION)$(DBGX).lib TCLPLUGINLIB = $(TCLNAMEPREFIX)$(VERSION)p.lib +TCLSTUBLIB = $(TCLSTUBPREFIX)$(VERSION)$(DBGX).lib TKDLLNAME = $(TKNAMEPREFIX)$(VERSION)$(DBGX).dll TKDLL = $(OUTDIR)\$(TKDLLNAME) -TKLIB = $(OUTDIR)\$(TKNAMEPREFIX)$(VERSION)$(DBGX).lib +TKLIB = $(OUTDIR)\$(TKNAMEPREFIX)$(VERSION)$(DBGX).lib +TKSTUBLIBNAME = $(TKSTUBPREFIX)$(VERSION)$(DBGX).lib +TKSTUBLIB = $(OUTDIR)\$(TKSTUBLIBNAME) TKPLUGINDLLNAME = $(TKNAMEPREFIX)$(VERSION)p$(DBG).dll TKPLUGINDLL = $(OUTDIR)\$(TKPLUGINDLLNAME) TKPLUGINLIB = $(OUTDIR)\$(TKNAMEPREFIX)$(VERSION)p$(DBGX).lib @@ -189,10 +194,19 @@ TKOBJS = \ $(TMPDIR)\tkTrig.obj \ $(TMPDIR)\tkUtil.obj \ $(TMPDIR)\tkVisual.obj \ + $(TMPDIR)\tkStubInit.obj \ $(TMPDIR)\tkWindow.obj +TKSTUBOBJS = \ + $(TMPDIR)\tkStubLib.obj \ + $(TMPDIR)\tkStubs.obj \ + $(TMPDIR)\tkPlatStubs.obj \ + $(TMPDIR)\tkIntStubs.obj \ + $(TMPDIR)\tkIntPlatStubs.obj + cc32 = "$(TOOLS32)\bin\cl.exe" link32 = "$(TOOLS32)\bin\link.exe" +lib32 = "$(TOOLS32)\bin\lib.exe" rc32 = "$(TOOLS32_rc)\bin\rc.exe" include32 = -I"$(TOOLS32)\include" @@ -208,7 +222,10 @@ TK_INCLUDES = -I$(WINDIR) -I$(GENERICDIR) -I$(BITMAPDIR) -I$(XLIBDIR) \ TK_DEFINES = $(DEBUGDEFINES) TK_CFLAGS = $(cdebug) $(cflags) $(cvarsdll) $(include32) \ - $(TK_INCLUDES) $(TK_DEFINES) + $(TK_INCLUDES) $(TK_DEFINES) + +WISH_CFLAGS = $(cdebug) $(cflags) $(cvarsdll) $(include32) \ + $(TK_INCLUDES) $(TK_DEFINES) ###################################################################### # Link flags @@ -317,6 +334,15 @@ install-binaries: @mkd "$(LIB_INSTALL_DIR)" copy $(TKLIB) "$(LIB_INSTALL_DIR)" +# +# Regenerate the stubs files. +# + +stubs: + $(TCLDIR)\win\$(TMPDIRNAME)\tclsh$(VERSION)$(DBGX) \ + $(TCLDIR)\tools\genStubs.tcl $(GENERICDIR) \ + $(GENERICDIR)\tk.decls $(GENERICDIR)\tkInt.decls + install-libraries: @mkd "$(INCLUDE_INSTALL_DIR)" @mkd "$(INCLUDE_INSTALL_DIR)\X11" @@ -341,6 +367,9 @@ $(TKDLL): $(TKOBJS) $(TMPDIR)\tk.res $(TMPDIR)\tk.def $(TKOBJS) << +$(TKSTUBLIB): $(TKSTUBOBJS) + $(lib32) /out:$@ $(TKSTUBOBJS) + $(TKPLUGINLIB): $(TKPLUGINDLL) $(TKPLUGINDLL): $(TKOBJS) $(TMPDIR)\tk.res $(TMPDIR)\plugin.def @@ -351,7 +380,7 @@ $(TKPLUGINDLL): $(TKOBJS) $(TMPDIR)\tk.res $(TMPDIR)\plugin.def $(TKOBJS) << -$(WISH): $(WISHOBJS) $(TKLIB) $(TMPDIR)\wish.res +$(WISH): $(WISHOBJS) $(TKSTUBLIB) $(TKLIB) $(TMPDIR)\wish.res set LIB=$(TOOLS32)\lib $(link32) $(ldebug) $(guilflags) $(TMPDIR)\wish.res -stack:2300000 \ -out:$@ \ @@ -364,7 +393,7 @@ $(WISHP): $(WISHOBJS) $(TKPLUGINLIB) $(TMPDIR)\wish.res $(guilibsdll) $(TCLLIBDIR)\$(TCLPLUGINLIB) \ $(TKPLUGINLIB) $(WISHOBJS) -$(TKTEST): $(TKTESTOBJS) $(TKLIB) $(TMPDIR)\wish.res +$(TKTEST): $(TKTESTOBJS) $(TKSTUBLIB) $(TMPDIR)\wish.res set LIB=$(TOOLS32)\lib $(link32) $(ldebug) $(guilflags) $(TMPDIR)\wish.res -stack:2300000 \ -out:$@ \ @@ -387,6 +416,14 @@ $(DUMPEXTS): $(TCLDIR)\win\winDumpExts.c $(TMPDIR)\winDumpExts.obj # +# Regenerate the stubs files. +# + +genstubs: + tclsh$(VERSION) $(TCLDIR)\tools\genStubs.tcl $(GENERICDIR) \ + $(GENERICDIR)\tk.decls $(GENERICDIR)\tkInt.decls + +# # Special case object file targets # @@ -400,7 +437,7 @@ $(TMPDIR)\tkSquare.obj: $(ROOT)\generic\tkSquare.c $(cc32) $(TK_CFLAGS) -Fo$@ $? $(TMPDIR)\winMain.obj: $(ROOT)\win\winMain.c - $(cc32) $(TK_CFLAGS) -Fo$@ $? + $(cc32) $(WISH_CFLAGS) -Fo$@ $? # # Implicit rules diff --git a/win/tkWin.h b/win/tkWin.h index fe0d6b3..191ceea 100644 --- a/win/tkWin.h +++ b/win/tkWin.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWin.h,v 1.4 1998/09/14 18:23:59 stanton Exp $ + * RCS: @(#) $Id: tkWin.h,v 1.5 1999/03/10 07:04:46 stanton Exp $ */ #ifndef _TKWIN @@ -28,6 +28,7 @@ # define TCL_STORAGE_CLASS DLLEXPORT #endif + /* * The following messages are use to communicate between a Tk toplevel * and its container window. @@ -46,17 +47,7 @@ * *-------------------------------------------------------------- */ - -EXTERN Window Tk_AttachHWND _ANSI_ARGS_((Tk_Window tkwin, - HWND hwnd)); -EXTERN HINSTANCE Tk_GetHINSTANCE _ANSI_ARGS_((void)); -EXTERN HWND Tk_GetHWND _ANSI_ARGS_((Window window)); -EXTERN Tk_Window Tk_HWNDToWindow _ANSI_ARGS_((HWND hwnd)); -EXTERN void Tk_PointerEvent _ANSI_ARGS_((HWND hwnd, - int x, int y)); -EXTERN int Tk_TranslateWinEvent _ANSI_ARGS_((HWND hwnd, - UINT message, WPARAM wParam, LPARAM lParam, - LRESULT *result)); +#include "tkPlatDecls.h" # undef TCL_STORAGE_CLASS # define TCL_STORAGE_CLASS DLLIMPORT diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c index c3842c6..c68fb04 100644 --- a/win/tkWinDraw.c +++ b/win/tkWinDraw.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinDraw.c,v 1.2 1998/09/14 18:24:00 stanton Exp $ + * RCS: @(#) $Id: tkWinDraw.c,v 1.3 1999/03/10 07:04:46 stanton Exp $ */ #include "tkWinInt.h" @@ -926,6 +926,8 @@ XDrawLines(display, d, gc, points, npoints, mode) /* *---------------------------------------------------------------------- * +#if 0 + * XFillPolygon -- * * Draws a filled polygon. diff --git a/win/tkWinInt.h b/win/tkWinInt.h index 40ed5e4..b1ab878 100644 --- a/win/tkWinInt.h +++ b/win/tkWinInt.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinInt.h,v 1.3 1999/02/04 21:01:35 stanton Exp $ + * RCS: @(#) $Id: tkWinInt.h,v 1.4 1999/03/10 07:04:46 stanton Exp $ */ #ifndef _TKWININT @@ -146,50 +146,10 @@ extern int tkpWinRopModes[]; * Internal procedures used by more than one source file. */ -extern void TkWinCancelMouseTimer _ANSI_ARGS_((void)); -extern LRESULT CALLBACK TkWinChildProc _ANSI_ARGS_((HWND hwnd, UINT message, - WPARAM wParam, LPARAM lParam)); -extern void TkWinClipboardRender _ANSI_ARGS_((TkDisplay *dispPtr, - UINT format)); -extern LRESULT TkWinEmbeddedEventProc _ANSI_ARGS_((HWND hwnd, - UINT message, WPARAM wParam, LPARAM lParam)); -extern void TkWinFillRect _ANSI_ARGS_((HDC dc, int x, int y, - int width, int height, int pixel)); -extern COLORREF TkWinGetBorderPixels _ANSI_ARGS_((Tk_Window tkwin, - Tk_3DBorder border, int which)); -extern HDC TkWinGetDrawableDC _ANSI_ARGS_((Display *display, - Drawable d, TkWinDCState* state)); -extern int TkWinGetModifierState _ANSI_ARGS_((void)); -extern HPALETTE TkWinGetSystemPalette _ANSI_ARGS_((void)); -extern HWND TkWinGetWrapperWindow _ANSI_ARGS_((Tk_Window tkwin)); -extern int TkWinHandleMenuEvent _ANSI_ARGS_((HWND *phwnd, - UINT *pMessage, WPARAM *pwParam, LPARAM *plParam, - LRESULT *plResult)); -extern int TkWinIndexOfColor _ANSI_ARGS_((XColor *colorPtr)); -extern void TkWinPointerDeadWindow _ANSI_ARGS_((TkWindow *winPtr)); -extern void TkWinPointerEvent _ANSI_ARGS_((HWND hwnd, int x, - int y)); -extern void TkWinPointerInit _ANSI_ARGS_((void)); -extern LRESULT TkWinReflectMessage _ANSI_ARGS_((HWND hwnd, - UINT message, WPARAM wParam, LPARAM lParam)); -extern void TkWinReleaseDrawableDC _ANSI_ARGS_((Drawable d, - HDC hdc, TkWinDCState* state)); -extern LRESULT TkWinResendEvent _ANSI_ARGS_((WNDPROC wndproc, - HWND hwnd, XEvent *eventPtr)); -extern HPALETTE TkWinSelectPalette _ANSI_ARGS_((HDC dc, - Colormap colormap)); -extern void TkWinSetMenu _ANSI_ARGS_((Tk_Window tkwin, - HMENU hMenu)); -extern void TkWinSetWindowPos _ANSI_ARGS_((HWND hwnd, - HWND siblingHwnd, int pos)); -extern void TkWinUpdateCursor _ANSI_ARGS_((TkWindow *winPtr)); -extern void TkWinWmCleanup _ANSI_ARGS_((HINSTANCE hInstance)); -extern HWND TkWinWmFindEmbedAssociation _ANSI_ARGS_(( - TkWindow *winPtr)); -extern void TkWinWmStoreEmbedAssociation _ANSI_ARGS_(( - TkWindow *winPtr, HWND hwnd)); -extern void TkWinXCleanup _ANSI_ARGS_((HINSTANCE hInstance)); -extern void TkWinXInit _ANSI_ARGS_((HINSTANCE hInstance)); +#include "tkIntPlatDecls.h" + +extern LRESULT CALLBACK TkWinChildProc (HWND hwnd, UINT message, + WPARAM wParam, LPARAM lParam); #endif /* _TKWININT */ diff --git a/win/tkWinPort.h b/win/tkWinPort.h index 55a0300..d673d46 100644 --- a/win/tkWinPort.h +++ b/win/tkWinPort.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinPort.h,v 1.3 1998/09/30 19:01:22 rjohnson Exp $ + * RCS: @(#) $Id: tkWinPort.h,v 1.4 1999/03/10 07:04:46 stanton Exp $ */ #ifndef _WINPORT @@ -22,7 +22,6 @@ #include <X11/keysym.h> #include <X11/Xatom.h> #include <X11/Xutil.h> - #include <malloc.h> #include <errno.h> #include <ctype.h> @@ -112,6 +111,15 @@ struct timezone { }; extern int gettimeofday(struct timeval *, struct timezone *); -EXTERN void panic _ANSI_ARGS_(TCL_VARARGS(char *,format)); + +/* + * tclInt.h is included to get declarations of the following functions. + * void panic _ANSI_ARGS_(TCL_VARARGS(char *,format)); + * void TclpGetTime _ANSI_ARGS_((Tcl_Time *time)); + */ + +#ifndef _TCLINT +# include <tclInt.h> +#endif #endif /* _WINPORT */ diff --git a/win/winMain.c b/win/winMain.c index 12c9d34..9cf081d 100644 --- a/win/winMain.c +++ b/win/winMain.c @@ -8,10 +8,11 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: winMain.c,v 1.4 1999/02/04 20:57:18 stanton Exp $ + * RCS: @(#) $Id: winMain.c,v 1.5 1999/03/10 07:04:46 stanton Exp $ */ #include <tk.h> +#include "tkInt.h" #define WIN32_LEAN_AND_MEAN #include <windows.h> #undef WIN32_LEAN_AND_MEAN @@ -23,9 +24,6 @@ * interfaces are available for use, but are not supported. */ -EXTERN void TkConsoleCreate(void); -EXTERN int TkConsoleInit(Tcl_Interp *interp); - /* * Forward declarations for procedures defined later in this file: */ @@ -85,14 +83,6 @@ WinMain(hInstance, hPrevInstance, lpszCmdLine, nCmdShow) */ SetMessageQueue(64); - /* - * Create the console channels and install them as the standard - * channels. All I/O will be discarded until TkConsoleInit is - * called to attach the console to a text widget. - */ - - TkConsoleCreate(); - setargv(&argc, &argv); /* @@ -142,6 +132,7 @@ Tcl_AppInit(interp) if (Tk_Init(interp) == TCL_ERROR) { goto error; } + Tcl_StaticPackage(interp, "Tk", Tk_Init, Tk_SafeInit); /* |