summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordas <das>2005-11-27 02:36:13 (GMT)
committerdas <das>2005-11-27 02:36:13 (GMT)
commitb419f6a93487e396a1e83f8befb2da1d6305bb58 (patch)
tree98dfe1d79c84fe0819c1b167cb9764496c2c9a72 /generic
parent8ace4b5368e1242d0b1f81ff0fd68a16c03c1b3d (diff)
downloadtk-b419f6a93487e396a1e83f8befb2da1d6305bb58.zip
tk-b419f6a93487e396a1e83f8befb2da1d6305bb58.tar.gz
tk-b419f6a93487e396a1e83f8befb2da1d6305bb58.tar.bz2
* unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),
add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to configure (flag can't be present twice, so can't be in both CFLAGS and LDFLAGS during configure), don't use -prebind when deploying on 10.4, define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542). (SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete autoconf macros. Sync with tcl/unix/tcl.m4. * unix/configure.in: fix obsolete autoconf macros, sync gratuitous formatting/ordering differences with tcl/unix/configure.in. * unix/Makefile.in: add CFLAGS to wish/tktest link to make executable linking the same as during configure (needed to avoid loosing any linker relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS). Avoid concurrent linking of wish and compiling of tkTestInit.o during parallel make, fix dependencies and flags for building tkMacOSXInit.o (checkstubs, checkexports): dependency and Darwin fixes (dist): add new macosx files. * macosx/tkMacOSXEvent.c (TkMacOSXProcessEvent): * macosx/tkMacOSXEvent.h: * macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent): * macosx/tkMacOSXCarbonEvents.c: install standard application event handler, add & call functions to start and stop carbon even timer that runs the tcl event loop periodically during a nested carbon event loop in the toolbox (e.g. during menutracking) to ensure tcl timers etc continue to fire, register app event handler for menu tracking and HI command carbon events, move menu event handling to new handlers for those carbon events, no longer register for/handle appleevent carbon event (now dealt with by standard application event handler), event debugging code dynamically acquires carbon event debugging functions to allow use on Tiger where they are no longer exported from HIToolbox. * macosx/tkMacOSXFont.c (TkMacOSXUseAntialiasedText): * macosx/tkMacOSXKeyEvent.c (GetKeyboardLayout): * macosx/tkMacOSXCarbonEvents.c (TkMacOSXInitCarbonEvents): * macosx/tkMacOSXInit.c: * macosx/tkMacOSXInt.h: abstract common code to dynamically acquire address of a named symbol (from a loaded dynamic library) into new function TkMacOSXGetNamedSymbol() and macro TkMacOSXInitNamedSymbol. * macosx/tkMacOSXMenu.c (TkpNewMenu): * macosx/tkMacOSXMenubutton.c (MenuButtonInitControl): * macosx/tkMacOSXMenus.c (TkMacOSXHandleMenuSelect): switch to modern utf8 aware menu manager API, remove obsolete code, add error handling. * macosx/tkMacOSXMouseEvent.c: define OSX 10.3 or later only constants if necessary to allow compilation on OSX 10.2 * macosx/tkMacOSXWm.c (UpdateSizeHints): remove code that is never executed. * xlib/xgc.c (XCreateGC): sync with core-8-4-branch change. * generic/tk.h: add/correct location of version numbers in macosx files. * generic/tkInt.h: clarify fat compile comment. * macosx/Wish.pbproj/default.pbxuser (new file): * macosx/Wish.pbproj/jingham.pbxuser: * macosx/Wish.pbproj/project.pbxproj: * macosx/Wish.xcode/default.pbxuser: * macosx/Wish.xcode/project.pbxproj: * macosx/Wish.xcodeproj/default.pbxuser (new file): * macosx/Wish.xcodeproj/project.pbxproj (new file): new/updated projects for Xcode 2.2 on 10.4, Xcode 1.5 on 10.3 & ProjectBuilder on 10.2, with native tktest targets and support for universal (fat) compiles. * macosx/Tk-Info.plist (removed): * macosx/Wish-Info.plist (removed): * macosx/buildTkConfig.tcl (removed): remove obsolete build files. * macosx/README: clarification/cleanup, document new Xcode projects and universal (fat) builds via CFLAGS (i.e. ppc and i386 at the same time). * unix/Makefile.in: * unix/aclocal.m4: * unix/configure.in: * macosx/configure.ac (new file): add support for inclusion of unix/configure.in by macosx/configure.ac, allows generation of a config headers enabled configure script in macosx (required by Xcode projects). * macosx/GNUmakefile: rename from Makefile to avoid overwriting by configure run in tk/macosx, add support for reusing configure cache, build target fixes. * generic/tk3d.h: * generic/tkButton.h: * generic/tkCanvas.c: * generic/tkCanvas.h: * generic/tkColor.h: * generic/tkEntry.h: * generic/tkFileFilter.h: * generic/tkFont.c: * generic/tkFont.h: * generic/tkImage.c: * generic/tkImgPhoto.c: * generic/tkInt.h: * generic/tkMenu.c: * generic/tkMenu.h: * generic/tkMenubutton.h: * generic/tkScale.h: * generic/tkScrollbar.h: * generic/tkSelect.h: * generic/tkStubInit.c: * generic/tkStubLib.c: * generic/tkText.h: * generic/tkUndo.h: * macosx/tkMacOSXButton.c: * macosx/tkMacOSXDebug.c: * macosx/tkMacOSXDebug.h: * macosx/tkMacOSXDialog.c: * macosx/tkMacOSXDraw.c: * macosx/tkMacOSXEntry.c: * macosx/tkMacOSXFont.c: * macosx/tkMacOSXInt.h: * macosx/tkMacOSXMenu.c: * macosx/tkMacOSXMenubutton.c: * macosx/tkMacOSXMouseEvent.c: * macosx/tkMacOSXSend.c: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXXStubs.c: * unix/tkUnixButton.c: * unix/tkUnixMenu.c: * xlib/xgc.c: ensure externally visible symbols not contained in stubs table are declared as MODULE_SCOPE (or as static if not used outside of own source file), #ifdef out a few Xlib and aqua functions that are never called. These changes allow 'make checkstubs' to complete without error on Darwin with gcc 4. * macosx/tkMacOSXTest.c: * macosx/tkMacOSXPort.h: * win/tkWinTest.c: * generic/tkInt.decls: add functions needed by tktest to internal stubs table, correct signature of TkMacOSXHandleMenuSelect, add XSync to aqua Xlib stubs. * unix/tkUnixSend.c: * generic/tkText.c: * generic/tkTest.c: #ifdef unix only declarations. (TestmetricsCmd): unify win and mac implementation. (TestsendCmd): move to tkUnixSend.c to avoid access to global var. (TesttextCmd): move to tkText.c to avoid having to put all the internal text functions it uses into the stubs table. * generic/tkTextDisp.c: * macosx/tkMacOSXInit.c: * macosx/tkMacOSXKeyEvent.c: * macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXXStubs.c: fix gcc 4 warnings. * macosx/tkMacOSXNotify.c: * macosx/tkMacOSXScrlbr.c: sync with core-8-4-branch. * generic/tkIntDecls.h: * generic/tkIntPlatDecls.h: * generic/tkIntXlibDecls.h: * generic/tkStubInit.c: * unix/configure: * unix/tkConfig.h.in: regen.
Diffstat (limited to 'generic')
-rw-r--r--generic/tk.h10
-rw-r--r--generic/tk3d.h8
-rw-r--r--generic/tkButton.h18
-rw-r--r--generic/tkCanvas.c10
-rw-r--r--generic/tkCanvas.h13
-rw-r--r--generic/tkColor.h8
-rw-r--r--generic/tkEntry.h4
-rw-r--r--generic/tkFileFilter.h8
-rw-r--r--generic/tkFont.c4
-rw-r--r--generic/tkFont.h26
-rw-r--r--generic/tkImage.c7
-rw-r--r--generic/tkImgPhoto.c4
-rw-r--r--generic/tkInt.decls30
-rw-r--r--generic/tkInt.h197
-rw-r--r--generic/tkIntDecls.h29
-rw-r--r--generic/tkIntPlatDecls.h40
-rw-r--r--generic/tkIntXlibDecls.h12
-rw-r--r--generic/tkMenu.c16
-rw-r--r--generic/tkMenu.h82
-rw-r--r--generic/tkMenubutton.h14
-rw-r--r--generic/tkScale.h24
-rw-r--r--generic/tkScrollbar.h22
-rw-r--r--generic/tkSelect.h14
-rw-r--r--generic/tkStubInit.c15
-rw-r--r--generic/tkStubLib.c12
-rw-r--r--generic/tkTest.c258
-rw-r--r--generic/tkText.c86
-rw-r--r--generic/tkText.h192
-rw-r--r--generic/tkTextDisp.c4
-rw-r--r--generic/tkUndo.h34
30 files changed, 596 insertions, 605 deletions
diff --git a/generic/tk.h b/generic/tk.h
index beef98b..831c905 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tk.h,v 1.84 2005/06/07 14:20:17 dkf Exp $
+ * RCS: @(#) $Id: tk.h,v 1.85 2005/11/27 02:36:13 das Exp $
*/
#ifndef _TK
@@ -34,12 +34,10 @@ extern "C" {
* unix/configure.in (2 LOC Major, 2 LOC minor, 1 LOC patch)
* win/configure.in (as above)
* README (sections 0 and 1)
- * macosx/Wish.pbproj/project.pbxproj
- * (12 LOC Major/Minor, 4 LOC patch)
* macosx/Wish.xcode/project.pbxproj
- * (5 LOC Major/Minor, not patchlevel)
- * macosx/Wish-Info.plist (3 LOC Major/Minor, 2 LOC patch)
- * macosx/Tk-Info.plist (4 LOC Major/Minor, 2 LOC patch)
+ * (1 LOC Major/Minor, not patchlevel)
+ * macosx/Wish.xcodeproj/project.pbxproj
+ * (4 LOC Major/Minor, not patchlevel)
* win/README (not patchlevel)
* unix/README (not patchlevel)
* unix/tk.spec (3 LOC Major/Minor, 2 LOC patch)
diff --git a/generic/tk3d.h b/generic/tk3d.h
index 100908b..c3fac00 100644
--- a/generic/tk3d.h
+++ b/generic/tk3d.h
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tk3d.h,v 1.6 2005/11/04 15:23:05 dkf Exp $
+ * RCS: @(#) $Id: tk3d.h,v 1.7 2005/11/27 02:36:13 das Exp $
*/
#ifndef _TK3D
@@ -86,9 +86,9 @@ typedef struct TkBorder {
* Declarations for platform specific interfaces used by this module.
*/
-EXTERN TkBorder * TkpGetBorder(void);
-EXTERN void TkpGetShadows(TkBorder *borderPtr, Tk_Window tkwin);
-EXTERN void TkpFreeBorder(TkBorder *borderPtr);
+MODULE_SCOPE TkBorder *TkpGetBorder(void);
+MODULE_SCOPE void TkpGetShadows(TkBorder *borderPtr, Tk_Window tkwin);
+MODULE_SCOPE void TkpFreeBorder(TkBorder *borderPtr);
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tkButton.h b/generic/tkButton.h
index 01a30e8..def38c2 100644
--- a/generic/tkButton.h
+++ b/generic/tkButton.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: tkButton.h,v 1.12 2005/11/04 15:23:05 dkf Exp $
+ * RCS: @(#) $Id: tkButton.h,v 1.13 2005/11/27 02:36:13 das Exp $
*/
#ifndef _TKBUTTON
@@ -297,25 +297,25 @@ typedef struct {
* Declaration of variables shared between the files in the button module.
*/
-extern Tk_ClassProcs tkpButtonProcs;
+MODULE_SCOPE Tk_ClassProcs tkpButtonProcs;
/*
* Declaration of functions used in the implementation of the button widget.
*/
#ifndef TkpButtonSetDefaults
-EXTERN void TkpButtonSetDefaults(Tk_OptionSpec *specPtr);
+MODULE_SCOPE void TkpButtonSetDefaults(Tk_OptionSpec *specPtr);
#endif
-EXTERN void TkButtonWorldChanged(ClientData instanceData);
-EXTERN void TkpComputeButtonGeometry(TkButton *butPtr);
-EXTERN TkButton * TkpCreateButton(Tk_Window tkwin);
+MODULE_SCOPE void TkButtonWorldChanged(ClientData instanceData);
+MODULE_SCOPE void TkpComputeButtonGeometry(TkButton *butPtr);
+MODULE_SCOPE TkButton *TkpCreateButton(Tk_Window tkwin);
#ifndef TkpDestroyButton
-EXTERN void TkpDestroyButton(TkButton *butPtr);
+MODULE_SCOPE void TkpDestroyButton(TkButton *butPtr);
#endif
#ifndef TkpDisplayButton
-EXTERN void TkpDisplayButton(ClientData clientData);
+MODULE_SCOPE void TkpDisplayButton(ClientData clientData);
#endif
-EXTERN int TkInvokeButton(TkButton *butPtr);
+MODULE_SCOPE int TkInvokeButton(TkButton *butPtr);
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index c183830..ac1b4f0 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvas.c,v 1.39 2005/11/17 10:57:35 dkf Exp $
+ * RCS: @(#) $Id: tkCanvas.c,v 1.40 2005/11/27 02:36:13 das Exp $
*/
/* #define USE_OLD_TAG_SEARCH 1 */
@@ -239,14 +239,6 @@ static SearchUids * GetStaticUids(void);
#endif /* USE_OLD_TAG_SEARCH */
/*
- * Standard item types provided by Tk:
- */
-
-extern Tk_ItemType tkArcType, tkBitmapType, tkImageType, tkLineType;
-extern Tk_ItemType tkOvalType, tkPolygonType;
-extern Tk_ItemType tkRectangleType, tkTextType, tkWindowType;
-
-/*
* Prototypes for functions defined later in this file:
*/
diff --git a/generic/tkCanvas.h b/generic/tkCanvas.h
index 5e27558..de1aaf2 100644
--- a/generic/tkCanvas.h
+++ b/generic/tkCanvas.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: tkCanvas.h,v 1.8 2005/11/04 15:30:59 dkf Exp $
+ * RCS: @(#) $Id: tkCanvas.h,v 1.9 2005/11/27 02:36:13 das Exp $
*/
#ifndef _TKCANVAS
@@ -290,10 +290,17 @@ typedef struct TkCanvas {
* to the outside world:
*/
-extern int TkCanvPostscriptCmd(TkCanvas *canvasPtr,
+MODULE_SCOPE int TkCanvPostscriptCmd(TkCanvas *canvasPtr,
Tcl_Interp *interp, int argc, CONST char **argv);
-extern int TkCanvTranslatePath(TkCanvas *canvPtr,
+MODULE_SCOPE int TkCanvTranslatePath(TkCanvas *canvPtr,
int numVertex, double *coordPtr, int closed,
XPoint *outPtr);
+/*
+ * Standard item types provided by Tk:
+ */
+
+MODULE_SCOPE Tk_ItemType tkArcType, tkBitmapType, tkImageType, tkLineType;
+MODULE_SCOPE Tk_ItemType tkOvalType, tkPolygonType;
+MODULE_SCOPE Tk_ItemType tkRectangleType, tkTextType, tkWindowType;
#endif /* _TKCANVAS */
diff --git a/generic/tkColor.h b/generic/tkColor.h
index f662ebe..71e02ee 100644
--- a/generic/tkColor.h
+++ b/generic/tkColor.h
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkColor.h,v 1.7 2005/11/11 23:51:27 dkf Exp $
+ * RCS: @(#) $Id: tkColor.h,v 1.8 2005/11/27 02:36:13 das Exp $
*/
#ifndef _TKCOLOR
@@ -74,10 +74,10 @@ typedef struct TkColor {
*/
#ifndef TkpFreeColor
-EXTERN void TkpFreeColor(TkColor *tkColPtr);
+MODULE_SCOPE void TkpFreeColor(TkColor *tkColPtr);
#endif
-EXTERN TkColor * TkpGetColor(Tk_Window tkwin, Tk_Uid name);
-EXTERN TkColor * TkpGetColorByValue(Tk_Window tkwin, XColor *colorPtr);
+MODULE_SCOPE TkColor * TkpGetColor(Tk_Window tkwin, Tk_Uid name);
+MODULE_SCOPE TkColor * TkpGetColorByValue(Tk_Window tkwin, XColor *colorPtr);
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tkEntry.h b/generic/tkEntry.h
index 636aefc..7f8aa1f 100644
--- a/generic/tkEntry.h
+++ b/generic/tkEntry.h
@@ -296,9 +296,9 @@ enum selelement {
* the Entry widget.
*/
-int TkpDrawEntryBorderAndFocus(Entry *entryPtr,
+MODULE_SCOPE int TkpDrawEntryBorderAndFocus(Entry *entryPtr,
Drawable d, int isSpinbox);
-int TkpDrawSpinboxButtons(Spinbox *sbPtr, Drawable d);
+MODULE_SCOPE int TkpDrawSpinboxButtons(Spinbox *sbPtr, Drawable d);
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tkFileFilter.h b/generic/tkFileFilter.h
index dad9772..c6680df 100644
--- a/generic/tkFileFilter.h
+++ b/generic/tkFileFilter.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: tkFileFilter.h,v 1.7 2005/11/15 15:18:21 dkf Exp $
+ * RCS: @(#) $Id: tkFileFilter.h,v 1.8 2005/11/27 02:36:13 das Exp $
*
*/
@@ -77,9 +77,9 @@ typedef struct FileFilterList {
int numFilters; /* number of filters in the list */
} FileFilterList;
-EXTERN void TkFreeFileFilters(FileFilterList *flistPtr);
-EXTERN void TkInitFileFilters(FileFilterList *flistPtr);
-EXTERN int TkGetFileFilters(Tcl_Interp *interp,
+MODULE_SCOPE void TkFreeFileFilters(FileFilterList *flistPtr);
+MODULE_SCOPE void TkInitFileFilters(FileFilterList *flistPtr);
+MODULE_SCOPE int TkGetFileFilters(Tcl_Interp *interp,
FileFilterList *flistPtr, Tcl_Obj *valuePtr,
int isWindows);
diff --git a/generic/tkFont.c b/generic/tkFont.c
index cff54b0..5166e04 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.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: tkFont.c,v 1.26 2005/11/22 11:59:04 dkf Exp $
+ * RCS: @(#) $Id: tkFont.c,v 1.27 2005/11/27 02:36:13 das Exp $
*/
#include "tkPort.h"
@@ -343,6 +343,8 @@ static int SetFontFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr);
static void TheWorldHasChanged(ClientData clientData);
static void UpdateDependentFonts(TkFontInfo *fiPtr,
Tk_Window tkwin, Tcl_HashEntry *namedHashPtr);
+MODULE_SCOPE int TkFontGetFirstTextLayout(Tk_TextLayout layout,
+ Tk_Font *font, char *dst);
/*
* The following structure defines the implementation of the "font" Tcl
diff --git a/generic/tkFont.h b/generic/tkFont.h
index c573750..3b6489a 100644
--- a/generic/tkFont.h
+++ b/generic/tkFont.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: tkFont.h,v 1.6 2005/11/07 15:43:51 dkf Exp $
+ * RCS: @(#) $Id: tkFont.h,v 1.7 2005/11/27 02:36:13 das Exp $
*/
#ifndef _TKFONT
@@ -195,26 +195,26 @@ typedef struct TkXLFDAttributes {
#define TkInitFontAttributes(fa) memset((fa), 0, sizeof(TkFontAttributes));
#define TkInitXLFDAttributes(xa) memset((xa), 0, sizeof(TkXLFDAttributes));
-EXTERN int TkFontParseXLFD(CONST char *string,
+MODULE_SCOPE int TkFontParseXLFD(CONST char *string,
TkFontAttributes *faPtr, TkXLFDAttributes *xaPtr);
-EXTERN char ** TkFontGetAliasList(CONST char *faceName);
-EXTERN char *** TkFontGetFallbacks(void);
-EXTERN int TkFontGetPixels(Tk_Window tkwin, int size);
-EXTERN int TkFontGetPoints(Tk_Window tkwin, int size);
-EXTERN char ** TkFontGetGlobalClass(void);
-EXTERN char ** TkFontGetSymbolClass(void);
+MODULE_SCOPE char ** TkFontGetAliasList(CONST char *faceName);
+MODULE_SCOPE char *** TkFontGetFallbacks(void);
+MODULE_SCOPE int TkFontGetPixels(Tk_Window tkwin, int size);
+MODULE_SCOPE int TkFontGetPoints(Tk_Window tkwin, int size);
+MODULE_SCOPE char ** TkFontGetGlobalClass(void);
+MODULE_SCOPE char ** TkFontGetSymbolClass(void);
/*
* Low-level API exported by platform-specific code to generic code.
*/
-EXTERN void TkpDeleteFont(TkFont *tkFontPtr);
-EXTERN void TkpFontPkgInit(TkMainInfo *mainPtr);
-EXTERN TkFont * TkpGetFontFromAttributes(TkFont *tkFontPtr,
+MODULE_SCOPE void TkpDeleteFont(TkFont *tkFontPtr);
+MODULE_SCOPE void TkpFontPkgInit(TkMainInfo *mainPtr);
+MODULE_SCOPE TkFont * TkpGetFontFromAttributes(TkFont *tkFontPtr,
Tk_Window tkwin, CONST TkFontAttributes *faPtr);
-EXTERN void TkpGetFontFamilies(Tcl_Interp *interp,
+MODULE_SCOPE void TkpGetFontFamilies(Tcl_Interp *interp,
Tk_Window tkwin);
-EXTERN TkFont * TkpGetNativeFont(Tk_Window tkwin, CONST char *name);
+MODULE_SCOPE TkFont * TkpGetNativeFont(Tk_Window tkwin, CONST char *name);
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tkImage.c b/generic/tkImage.c
index 0ae7046..4580f0c 100644
--- a/generic/tkImage.c
+++ b/generic/tkImage.c
@@ -10,12 +10,17 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkImage.c,v 1.27 2005/11/17 16:21:55 dkf Exp $
+ * RCS: @(#) $Id: tkImage.c,v 1.28 2005/11/27 02:36:13 das Exp $
*/
#include "tkInt.h"
#include "tkPort.h"
+#ifndef USE_OLD_IMAGE
+MODULE_SCOPE void Tk_CreateOldImageType(Tk_ImageType *typePtr);
+MODULE_SCOPE void Tk_CreateOldPhotoImageFormat(Tk_PhotoImageFormat *formatPtr);
+#endif
+
/*
* Each call to Tk_GetImage returns a pointer to one of the following
* structures, which is used as a token by clients (widgets) that
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index 2e41606..2e890d0 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -17,7 +17,7 @@
* Department of Computer Science,
* Australian National University.
*
- * RCS: @(#) $Id: tkImgPhoto.c,v 1.59 2005/11/17 16:21:55 dkf Exp $
+ * RCS: @(#) $Id: tkImgPhoto.c,v 1.60 2005/11/27 02:36:13 das Exp $
*/
#include "tkInt.h"
@@ -5929,7 +5929,7 @@ PhotoOptionCleanupProc(
*--------------------------------------------------------------
*/
-void
+MODULE_SCOPE void
Tk_CreatePhotoOption(
Tcl_Interp *interp, /* Interpreter */
CONST char *name, /* Option name */
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index e80bb61..b360c0c 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -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: tkInt.decls,v 1.40 2005/09/21 10:54:40 dkf Exp $
+# RCS: @(#) $Id: tkInt.decls,v 1.41 2005/11/27 02:36:13 das Exp $
library tk
@@ -510,6 +510,16 @@ declare 154 generic {
void TkDeleteThreadExitHandler(Tcl_ExitProc *proc, ClientData clientData)
}
+# entries needed only by tktest:
+declare 156 generic {
+ int TkpTestembedCmd(ClientData clientData, Tcl_Interp *interp, int argc,
+ CONST char **argv)
+}
+declare 157 generic {
+ int TkpTesttextCmd(ClientData dummy, Tcl_Interp *interp, int argc,
+ CONST char **argv)
+}
+
##############################################################################
# Define the platform specific internal Tcl interface. These functions are
@@ -559,6 +569,11 @@ declare 11 x11 {
declare 12 x11 {
int TkpWmSetState(TkWindow *winPtr, int state)
}
+# only needed by tktest:
+declare 13 x11 {
+ int TkpTestsendCmd(ClientData clientData, Tcl_Interp *interp, int argc,
+ CONST char **argv)
+}
############################
# Windows specific functions
@@ -678,6 +693,10 @@ declare 34 win {
declare 35 win {
int TkWinGetPlatformTheme(void)
}
+# only needed by tktest:
+declare 36 win {
+ int TkplatformtestInit(Tcl_Interp *interp)
+}
########################
# Mac OS X specific functions
@@ -747,7 +766,7 @@ declare 17 aqua {
int TkMacOSXGrowToplevel(WindowRef whichWindow, Point start)
}
declare 18 aqua {
- void TkMacOSXHandleMenuSelect(long mResult, int optionKeyPressed)
+ void TkMacOSXHandleMenuSelect(MenuID theMenu, MenuItemIndex theItem, int optionKeyPressed)
}
# removed duplicates from tkPlat table(tk.decls)
@@ -860,6 +879,10 @@ declare 51 aqua {
declare 53 aqua {
unsigned long TkpGetMS(void)
}
+# only needed by tktest:
+declare 54 aqua {
+ int TkplatformtestInit(Tcl_Interp *interp)
+}
##############################################################################
@@ -1561,3 +1584,6 @@ declare 90 {aqua} {
Status XQueryTree(Display *d, Window w1, Window *w2, Window *w3,
Window **w4, unsigned int *ui)
}
+declare 91 {aqua} {
+ int XSync(Display *display, Bool flag)
+}
diff --git a/generic/tkInt.h b/generic/tkInt.h
index cafe4a3..a468c4b 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.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: tkInt.h,v 1.68 2005/10/10 20:29:49 hobbs Exp $
+ * RCS: $Id: tkInt.h,v 1.69 2005/11/27 02:36:14 das Exp $
*/
#ifndef _TKINT
@@ -24,13 +24,13 @@
#include "tcl.h"
#endif
#ifndef _TKPORT
-#include <tkPort.h>
+#include "tkPort.h"
#endif
/*
* Ensure WORDS_BIGENDIAN is defined correcly:
* Needs to happen here in addition to configure to work with fat compiles on
- * Darwin (i.e. ppc and i386 at the same time).
+ * Darwin (where configure runs only once for multiple architectures).
*/
#ifdef HAVE_SYS_TYPES_H
@@ -911,29 +911,28 @@ extern TkDisplay *tkDisplayList;
* be properly registered with Tcl:
*/
-extern Tcl_ObjType tkBorderObjType;
-extern Tcl_ObjType tkBitmapObjType;
-extern Tcl_ObjType tkColorObjType;
-extern Tcl_ObjType tkCursorObjType;
-extern Tcl_ObjType tkFontObjType;
-extern Tcl_ObjType tkOptionObjType;
-extern Tcl_ObjType tkStateKeyObjType;
-extern Tcl_ObjType tkTextIndexType;
+MODULE_SCOPE Tcl_ObjType tkBorderObjType;
+MODULE_SCOPE Tcl_ObjType tkBitmapObjType;
+MODULE_SCOPE Tcl_ObjType tkColorObjType;
+MODULE_SCOPE Tcl_ObjType tkCursorObjType;
+MODULE_SCOPE Tcl_ObjType tkFontObjType;
+MODULE_SCOPE Tcl_ObjType tkOptionObjType;
+MODULE_SCOPE Tcl_ObjType tkStateKeyObjType;
+MODULE_SCOPE Tcl_ObjType tkTextIndexType;
/*
* Miscellaneous variables shared among Tk modules but not exported to the
* outside world:
*/
-extern Tk_SmoothMethod tkBezierSmoothMethod;
-extern Tk_ImageType tkBitmapImageType;
-extern Tk_PhotoImageFormat tkImgFmtGIF;
-extern void (*tkHandleEventProc) (XEvent* eventPtr);
-extern Tk_PhotoImageFormat tkImgFmtPPM;
-extern TkMainInfo *tkMainWindowList;
-extern Tk_ImageType tkPhotoImageType;
-extern Tcl_HashTable tkPredefBitmapTable;
-extern int tkSendSerial;
+MODULE_SCOPE Tk_SmoothMethod tkBezierSmoothMethod;
+MODULE_SCOPE Tk_ImageType tkBitmapImageType;
+MODULE_SCOPE Tk_PhotoImageFormat tkImgFmtGIF;
+MODULE_SCOPE void (*tkHandleEventProc) (XEvent* eventPtr);
+MODULE_SCOPE Tk_PhotoImageFormat tkImgFmtPPM;
+MODULE_SCOPE TkMainInfo *tkMainWindowList;
+MODULE_SCOPE Tk_ImageType tkPhotoImageType;
+MODULE_SCOPE Tcl_HashTable tkPredefBitmapTable;
#include "tkIntDecls.h"
@@ -947,218 +946,216 @@ extern int tkSendSerial;
* world:
*/
-EXTERN int Tk_BellObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_BellObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_BindObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_BindObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_BindtagsObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_BindtagsObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_ButtonObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_ButtonObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_CanvasObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_CanvasObjCmd(ClientData clientData,
Tcl_Interp *interp, int argc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_CheckbuttonObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_CheckbuttonObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_ClipboardObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_ClipboardObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_ChooseColorObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_ChooseColorObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_ChooseDirectoryObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_ChooseDirectoryObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_ChooseFontObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_ChooseFontObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_DestroyObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_DestroyObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_EntryObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_EntryObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_EventObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_EventObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_FrameObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_FrameObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_FocusObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_FocusObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_FontObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_FontObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_GetOpenFileObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_GetOpenFileObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_GetSaveFileObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_GetSaveFileObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_GrabObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_GrabObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_GridObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_GridObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_ImageObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_ImageObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_LabelObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_LabelObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_LabelframeObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_LabelframeObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_ListboxObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_ListboxObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_LowerObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_LowerObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_MenubuttonObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_MenubuttonObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_MessageBoxObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_MessageBoxObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_MessageObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_MessageObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_PanedWindowObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_PanedWindowObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_OptionObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_OptionObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_PackObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_PackObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_PlaceObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_PlaceObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_RadiobuttonObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_RadiobuttonObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_RaiseObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_RaiseObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_ScaleObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_ScaleObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_ScrollbarCmd(ClientData clientData,
+MODULE_SCOPE int Tk_ScrollbarCmd(ClientData clientData,
Tcl_Interp *interp, int argc, CONST char **argv);
-EXTERN int Tk_SelectionObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_SelectionObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_SendCmd(ClientData clientData,
+MODULE_SCOPE int Tk_SendCmd(ClientData clientData,
Tcl_Interp *interp, int argc, CONST char **argv);
-EXTERN int Tk_SendObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_SendObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_SpinboxObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_SpinboxObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_TextObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_TextObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_TkObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_TkObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_TkwaitObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_TkwaitObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_ToplevelObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_ToplevelObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_UpdateObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_UpdateObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_WinfoObjCmd(ClientData clientData,
+MODULE_SCOPE int Tk_WinfoObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
-EXTERN int Tk_WmObjCmd(ClientData clientData, Tcl_Interp *interp,
+MODULE_SCOPE int Tk_WmObjCmd(ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[]);
-EXTERN void TkConsolePrint(Tcl_Interp *interp,
+MODULE_SCOPE void TkConsolePrint(Tcl_Interp *interp,
int devId, CONST char *buffer, long size);
-EXTERN void TkEventInit(void);
-EXTERN void TkRegisterObjTypes(void);
-EXTERN int TkCreateMenuCmd(Tcl_Interp *interp);
-EXTERN int TkDeadAppCmd(ClientData clientData,
+MODULE_SCOPE void TkEventInit(void);
+MODULE_SCOPE void TkRegisterObjTypes(void);
+MODULE_SCOPE int TkCreateMenuCmd(Tcl_Interp *interp);
+MODULE_SCOPE int TkDeadAppCmd(ClientData clientData,
Tcl_Interp *interp, int argc, CONST char **argv);
-EXTERN int TkpTestembedCmd(ClientData clientData,
- Tcl_Interp *interp, int argc, CONST char **argv);
-EXTERN int TkCanvasGetCoordObj(Tcl_Interp *interp,
+MODULE_SCOPE int TkCanvasGetCoordObj(Tcl_Interp *interp,
Tk_Canvas canvas, Tcl_Obj *obj,
double *doublePtr);
-EXTERN int TkCanvasDashParseProc(ClientData clientData,
+MODULE_SCOPE int TkCanvasDashParseProc(ClientData clientData,
Tcl_Interp *interp, Tk_Window tkwin,
CONST char *value, char *widgRec, int offset);
-EXTERN char * TkCanvasDashPrintProc(ClientData clientData,
+MODULE_SCOPE char * TkCanvasDashPrintProc(ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset,
Tcl_FreeProc **freeProcPtr);
-EXTERN int TkGetDoublePixels(Tcl_Interp *interp, Tk_Window tkwin,
+MODULE_SCOPE int TkGetDoublePixels(Tcl_Interp *interp, Tk_Window tkwin,
CONST char *string, double *doublePtr);
-EXTERN int TkOffsetParseProc(ClientData clientData,
+MODULE_SCOPE int TkOffsetParseProc(ClientData clientData,
Tcl_Interp *interp, Tk_Window tkwin,
CONST char *value, char *widgRec, int offset);
-EXTERN char * TkOffsetPrintProc(ClientData clientData,
+MODULE_SCOPE char * TkOffsetPrintProc(ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset,
Tcl_FreeProc **freeProcPtr);
-EXTERN int TkOrientParseProc(ClientData clientData,
+MODULE_SCOPE int TkOrientParseProc(ClientData clientData,
Tcl_Interp *interp, Tk_Window tkwin,
CONST char *value, char *widgRec, int offset);
-EXTERN char * TkOrientPrintProc(ClientData clientData,
+MODULE_SCOPE char * TkOrientPrintProc(ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset,
Tcl_FreeProc **freeProcPtr);
-EXTERN int TkPixelParseProc(ClientData clientData,
+MODULE_SCOPE int TkPixelParseProc(ClientData clientData,
Tcl_Interp *interp, Tk_Window tkwin,
CONST char *value, char *widgRec, int offset);
-EXTERN char * TkPixelPrintProc(ClientData clientData,
+MODULE_SCOPE char * TkPixelPrintProc(ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset,
Tcl_FreeProc **freeProcPtr);
-EXTERN int TkPostscriptImage(Tcl_Interp *interp, Tk_Window tkwin,
+MODULE_SCOPE int TkPostscriptImage(Tcl_Interp *interp, Tk_Window tkwin,
Tk_PostscriptInfo psInfo, XImage *ximage,
int x, int y, int width, int height);
-EXTERN int TkSmoothParseProc(ClientData clientData,
+MODULE_SCOPE int TkSmoothParseProc(ClientData clientData,
Tcl_Interp *interp, Tk_Window tkwin,
CONST char *value, char *recordPtr, int offset);
-EXTERN char * TkSmoothPrintProc(ClientData clientData,
+MODULE_SCOPE char * TkSmoothPrintProc(ClientData clientData,
Tk_Window tkwin, char *recordPtr, int offset,
Tcl_FreeProc **freeProcPtr);
-EXTERN int TkStateParseProc(ClientData clientData,
+MODULE_SCOPE int TkStateParseProc(ClientData clientData,
Tcl_Interp *interp, Tk_Window tkwin,
CONST char *value, char *widgRec, int offset);
-EXTERN char * TkStatePrintProc(ClientData clientData,
+MODULE_SCOPE char * TkStatePrintProc(ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset,
Tcl_FreeProc **freeProcPtr);
-EXTERN int TkTileParseProc(ClientData clientData,
+MODULE_SCOPE int TkTileParseProc(ClientData clientData,
Tcl_Interp *interp, Tk_Window tkwin,
CONST char *value, char *widgRec, int offset);
-EXTERN char * TkTilePrintProc(ClientData clientData, Tk_Window tkwin,
+MODULE_SCOPE char * TkTilePrintProc(ClientData clientData, Tk_Window tkwin,
char *widgRec, int offset,
Tcl_FreeProc **freeProcPtr);
-EXTERN XEvent * TkpGetBindingXEvent(Tcl_Interp *interp);
-EXTERN void TkCreateExitHandler(Tcl_ExitProc *proc,
+MODULE_SCOPE XEvent * TkpGetBindingXEvent(Tcl_Interp *interp);
+MODULE_SCOPE void TkCreateExitHandler(Tcl_ExitProc *proc,
ClientData clientData);
-EXTERN void TkDeleteExitHandler(Tcl_ExitProc *proc,
+MODULE_SCOPE void TkDeleteExitHandler(Tcl_ExitProc *proc,
ClientData clientData);
-EXTERN Tcl_ExitProc TkFinalize;
-EXTERN Tcl_ExitProc TkFinalizeThread;
-EXTERN void TkpBuildRegionFromAlphaData(TkRegion region,
+MODULE_SCOPE Tcl_ExitProc TkFinalize;
+MODULE_SCOPE Tcl_ExitProc TkFinalizeThread;
+MODULE_SCOPE void TkpBuildRegionFromAlphaData(TkRegion region,
unsigned x, unsigned y, unsigned width,
unsigned height, unsigned char *dataPtr,
unsigned pixelStride, unsigned lineStride);
-EXTERN void TkPrintPadAmount(Tcl_Interp *interp,
+MODULE_SCOPE void TkPrintPadAmount(Tcl_Interp *interp,
char *buffer, int pad1, int pad2);
-EXTERN int TkParsePadAmount(Tcl_Interp *interp,
+MODULE_SCOPE int TkParsePadAmount(Tcl_Interp *interp,
Tk_Window tkwin, Tcl_Obj *objPtr,
int *pad1Ptr, int *pad2Ptr);
@@ -1166,7 +1163,7 @@ EXTERN int TkParsePadAmount(Tcl_Interp *interp,
* Unsupported commands.
*/
-EXTERN int TkUnsupported1ObjCmd(ClientData clientData,
+MODULE_SCOPE int TkUnsupported1ObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj * CONST objv[]);
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h
index 428fbee..6fd696d 100644
--- a/generic/tkIntDecls.h
+++ b/generic/tkIntDecls.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: tkIntDecls.h,v 1.27 2005/09/21 10:56:32 dkf Exp $
+ * RCS: @(#) $Id: tkIntDecls.h,v 1.28 2005/11/27 02:36:14 das Exp $
*/
#ifndef _TKINTDECLS
@@ -978,6 +978,21 @@ EXTERN void TkCreateThreadExitHandler _ANSI_ARGS_((
EXTERN void TkDeleteThreadExitHandler _ANSI_ARGS_((
Tcl_ExitProc * proc, ClientData clientData));
#endif
+/* Slot 155 is reserved */
+#ifndef TkpTestembedCmd_TCL_DECLARED
+#define TkpTestembedCmd_TCL_DECLARED
+/* 156 */
+EXTERN int TkpTestembedCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp * interp, int argc,
+ CONST char ** argv));
+#endif
+#ifndef TkpTesttextCmd_TCL_DECLARED
+#define TkpTesttextCmd_TCL_DECLARED
+/* 157 */
+EXTERN int TkpTesttextCmd _ANSI_ARGS_((ClientData dummy,
+ Tcl_Interp * interp, int argc,
+ CONST char ** argv));
+#endif
typedef struct TkIntStubs {
int magic;
@@ -1226,6 +1241,9 @@ typedef struct TkIntStubs {
void (*tkpDrawFrame) _ANSI_ARGS_((Tk_Window tkwin, Tk_3DBorder border, int highlightWidth, int borderWidth, int relief)); /* 152 */
void (*tkCreateThreadExitHandler) _ANSI_ARGS_((Tcl_ExitProc * proc, ClientData clientData)); /* 153 */
void (*tkDeleteThreadExitHandler) _ANSI_ARGS_((Tcl_ExitProc * proc, ClientData clientData)); /* 154 */
+ void *reserved155;
+ int (*tkpTestembedCmd) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int argc, CONST char ** argv)); /* 156 */
+ int (*tkpTesttextCmd) _ANSI_ARGS_((ClientData dummy, Tcl_Interp * interp, int argc, CONST char ** argv)); /* 157 */
} TkIntStubs;
#ifdef __cplusplus
@@ -1893,6 +1911,15 @@ extern TkIntStubs *tkIntStubsPtr;
#define TkDeleteThreadExitHandler \
(tkIntStubsPtr->tkDeleteThreadExitHandler) /* 154 */
#endif
+/* Slot 155 is reserved */
+#ifndef TkpTestembedCmd
+#define TkpTestembedCmd \
+ (tkIntStubsPtr->tkpTestembedCmd) /* 156 */
+#endif
+#ifndef TkpTesttextCmd
+#define TkpTesttextCmd \
+ (tkIntStubsPtr->tkpTesttextCmd) /* 157 */
+#endif
#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */
diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h
index 1cffb59..2a04ad1 100644
--- a/generic/tkIntPlatDecls.h
+++ b/generic/tkIntPlatDecls.h
@@ -9,7 +9,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tkIntPlatDecls.h,v 1.24 2005/09/21 10:56:32 dkf Exp $
+ * RCS: @(#) $Id: tkIntPlatDecls.h,v 1.25 2005/11/27 02:36:14 das Exp $
*/
#ifndef _TKINTPLATDECLS
@@ -230,6 +230,11 @@ EXTERN void TkWinSetHINSTANCE _ANSI_ARGS_((HINSTANCE hInstance));
/* 35 */
EXTERN int TkWinGetPlatformTheme _ANSI_ARGS_((void));
#endif
+#ifndef TkplatformtestInit_TCL_DECLARED
+#define TkplatformtestInit_TCL_DECLARED
+/* 36 */
+EXTERN int TkplatformtestInit _ANSI_ARGS_((Tcl_Interp * interp));
+#endif
#endif /* __WIN32__ */
#ifdef MAC_OSX_TK
#ifndef TkGenerateActivateEvents_TCL_DECLARED
@@ -315,8 +320,8 @@ EXTERN int TkMacOSXGrowToplevel _ANSI_ARGS_((
#ifndef TkMacOSXHandleMenuSelect_TCL_DECLARED
#define TkMacOSXHandleMenuSelect_TCL_DECLARED
/* 18 */
-EXTERN void TkMacOSXHandleMenuSelect _ANSI_ARGS_((long mResult,
- int optionKeyPressed));
+EXTERN void TkMacOSXHandleMenuSelect _ANSI_ARGS_((MenuID theMenu,
+ MenuItemIndex theItem, int optionKeyPressed));
#endif
/* Slot 19 is reserved */
/* Slot 20 is reserved */
@@ -495,6 +500,11 @@ EXTERN void TkGenWMDestroyEvent _ANSI_ARGS_((Tk_Window tkwin));
/* 53 */
EXTERN unsigned long TkpGetMS _ANSI_ARGS_((void));
#endif
+#ifndef TkplatformtestInit_TCL_DECLARED
+#define TkplatformtestInit_TCL_DECLARED
+/* 54 */
+EXTERN int TkplatformtestInit _ANSI_ARGS_((Tcl_Interp * interp));
+#endif
#endif /* MAC_OSX_TK */
#if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */
#ifndef TkCreateXEventSource_TCL_DECLARED
@@ -567,6 +577,13 @@ EXTERN void TkFreeXId _ANSI_ARGS_((TkDisplay * dispPtr));
EXTERN int TkpWmSetState _ANSI_ARGS_((TkWindow * winPtr,
int state));
#endif
+#ifndef TkpTestsendCmd_TCL_DECLARED
+#define TkpTestsendCmd_TCL_DECLARED
+/* 13 */
+EXTERN int TkpTestsendCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp * interp, int argc,
+ CONST char ** argv));
+#endif
#endif /* X11 */
typedef struct TkIntPlatStubs {
@@ -610,6 +627,7 @@ typedef struct TkIntPlatStubs {
int (*tkWinGetPlatformId) _ANSI_ARGS_((void)); /* 33 */
void (*tkWinSetHINSTANCE) _ANSI_ARGS_((HINSTANCE hInstance)); /* 34 */
int (*tkWinGetPlatformTheme) _ANSI_ARGS_((void)); /* 35 */
+ int (*tkplatformtestInit) _ANSI_ARGS_((Tcl_Interp * interp)); /* 36 */
#endif /* __WIN32__ */
#ifdef MAC_OSX_TK
void (*tkGenerateActivateEvents) _ANSI_ARGS_((TkWindow * winPtr, int active)); /* 0 */
@@ -630,7 +648,7 @@ typedef struct TkIntPlatStubs {
void *reserved15;
Window (*tkMacOSXGetXWindow) _ANSI_ARGS_((WindowRef macWinPtr)); /* 16 */
int (*tkMacOSXGrowToplevel) _ANSI_ARGS_((WindowRef whichWindow, Point start)); /* 17 */
- void (*tkMacOSXHandleMenuSelect) _ANSI_ARGS_((long mResult, int optionKeyPressed)); /* 18 */
+ void (*tkMacOSXHandleMenuSelect) _ANSI_ARGS_((MenuID theMenu, MenuItemIndex theItem, int optionKeyPressed)); /* 18 */
void *reserved19;
void *reserved20;
void (*tkMacOSXInvalidateWindow) _ANSI_ARGS_((MacDrawable * macWin, int flag)); /* 21 */
@@ -666,6 +684,7 @@ typedef struct TkIntPlatStubs {
void (*tkGenWMDestroyEvent) _ANSI_ARGS_((Tk_Window tkwin)); /* 51 */
void *reserved52;
unsigned long (*tkpGetMS) _ANSI_ARGS_((void)); /* 53 */
+ int (*tkplatformtestInit) _ANSI_ARGS_((Tcl_Interp * interp)); /* 54 */
#endif /* MAC_OSX_TK */
#if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */
void (*tkCreateXEventSource) _ANSI_ARGS_((void)); /* 0 */
@@ -681,6 +700,7 @@ typedef struct TkIntPlatStubs {
void (*tkSendCleanup) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 10 */
void (*tkFreeXId) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 11 */
int (*tkpWmSetState) _ANSI_ARGS_((TkWindow * winPtr, int state)); /* 12 */
+ int (*tkpTestsendCmd) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int argc, CONST char ** argv)); /* 13 */
#endif /* X11 */
} TkIntPlatStubs;
@@ -840,6 +860,10 @@ extern TkIntPlatStubs *tkIntPlatStubsPtr;
#define TkWinGetPlatformTheme \
(tkIntPlatStubsPtr->tkWinGetPlatformTheme) /* 35 */
#endif
+#ifndef TkplatformtestInit
+#define TkplatformtestInit \
+ (tkIntPlatStubsPtr->tkplatformtestInit) /* 36 */
+#endif
#endif /* __WIN32__ */
#ifdef MAC_OSX_TK
#ifndef TkGenerateActivateEvents
@@ -1034,6 +1058,10 @@ extern TkIntPlatStubs *tkIntPlatStubsPtr;
#define TkpGetMS \
(tkIntPlatStubsPtr->tkpGetMS) /* 53 */
#endif
+#ifndef TkplatformtestInit
+#define TkplatformtestInit \
+ (tkIntPlatStubsPtr->tkplatformtestInit) /* 54 */
+#endif
#endif /* MAC_OSX_TK */
#if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */
#ifndef TkCreateXEventSource
@@ -1088,6 +1116,10 @@ extern TkIntPlatStubs *tkIntPlatStubsPtr;
#define TkpWmSetState \
(tkIntPlatStubsPtr->tkpWmSetState) /* 12 */
#endif
+#ifndef TkpTestsendCmd
+#define TkpTestsendCmd \
+ (tkIntPlatStubsPtr->tkpTestsendCmd) /* 13 */
+#endif
#endif /* X11 */
#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */
diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h
index a024f0b..8ce02c6 100644
--- a/generic/tkIntXlibDecls.h
+++ b/generic/tkIntXlibDecls.h
@@ -9,7 +9,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tkIntXlibDecls.h,v 1.19 2005/09/21 10:56:33 dkf Exp $
+ * RCS: @(#) $Id: tkIntXlibDecls.h,v 1.20 2005/11/27 02:36:14 das Exp $
*/
#ifndef _TKINTXLIBDECLS
@@ -1250,6 +1250,11 @@ EXTERN Status XQueryTree _ANSI_ARGS_((Display * d, Window w1,
Window * w2, Window * w3, Window ** w4,
unsigned int * ui));
#endif
+#ifndef XSync_TCL_DECLARED
+#define XSync_TCL_DECLARED
+/* 91 */
+EXTERN int XSync _ANSI_ARGS_((Display * display, Bool flag));
+#endif
#endif /* MAC_OSX_TK */
typedef struct TkIntXlibStubs {
@@ -1457,6 +1462,7 @@ typedef struct TkIntXlibStubs {
void (*xQueryColor) _ANSI_ARGS_((Display * display, Colormap colormap, XColor * def_in_out)); /* 88 */
void (*xQueryColors) _ANSI_ARGS_((Display * display, Colormap colormap, XColor * defs_in_out, int ncolors)); /* 89 */
Status (*xQueryTree) _ANSI_ARGS_((Display * d, Window w1, Window * w2, Window * w3, Window ** w4, unsigned int * ui)); /* 90 */
+ int (*xSync) _ANSI_ARGS_((Display * display, Bool flag)); /* 91 */
#endif /* MAC_OSX_TK */
} TkIntXlibStubs;
@@ -2266,6 +2272,10 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr;
#define XQueryTree \
(tkIntXlibStubsPtr->xQueryTree) /* 90 */
#endif
+#ifndef XSync
+#define XSync \
+ (tkIntXlibStubsPtr->xSync) /* 91 */
+#endif
#endif /* MAC_OSX_TK */
#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index 998d5cc..8f55f45 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMenu.c,v 1.33 2005/11/17 16:21:55 dkf Exp $
+ * RCS: @(#) $Id: tkMenu.c,v 1.34 2005/11/27 02:36:14 das Exp $
*/
/*
@@ -114,7 +114,7 @@ static char *compoundStrings[] = {
"bottom", "center", "left", "none", "right", "top", NULL
};
-Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = {
+static Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", NULL, NULL,
DEF_MENU_ENTRY_ACTIVE_BG, Tk_Offset(TkMenuEntry, activeBorderPtr), -1,
TK_OPTION_NULL_OK},
@@ -163,14 +163,14 @@ Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = {
{TK_OPTION_END}
};
-Tk_OptionSpec tkSeparatorEntryConfigSpecs[] = {
+static Tk_OptionSpec tkSeparatorEntryConfigSpecs[] = {
{TK_OPTION_BORDER, "-background", NULL, NULL,
DEF_MENU_ENTRY_BG,
Tk_Offset(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK},
{TK_OPTION_END}
};
-Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = {
+static Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = {
{TK_OPTION_BOOLEAN, "-indicatoron", NULL, NULL,
DEF_MENU_ENTRY_INDICATOR,
-1, Tk_Offset(TkMenuEntry, indicatorOn)},
@@ -193,7 +193,7 @@ Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = {
NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs}
};
-Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = {
+static Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = {
{TK_OPTION_BOOLEAN, "-indicatoron", NULL, NULL,
DEF_MENU_ENTRY_INDICATOR,
-1, Tk_Offset(TkMenuEntry, indicatorOn)},
@@ -213,7 +213,7 @@ Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = {
NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs}
};
-Tk_OptionSpec tkCascadeEntryConfigSpecs[] = {
+static Tk_OptionSpec tkCascadeEntryConfigSpecs[] = {
{TK_OPTION_STRING, "-menu", NULL, NULL,
DEF_MENU_ENTRY_MENU,
Tk_Offset(TkMenuEntry, namePtr), -1, TK_OPTION_NULL_OK},
@@ -221,7 +221,7 @@ Tk_OptionSpec tkCascadeEntryConfigSpecs[] = {
NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs}
};
-Tk_OptionSpec tkTearoffEntryConfigSpecs[] = {
+static Tk_OptionSpec tkTearoffEntryConfigSpecs[] = {
{TK_OPTION_BORDER, "-background", NULL, NULL,
DEF_MENU_ENTRY_BG,
Tk_Offset(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK},
@@ -245,7 +245,7 @@ static CONST char *menuTypeStrings[] = {
"normal", "tearoff", "menubar", NULL
};
-Tk_OptionSpec tkMenuConfigSpecs[] = {
+static Tk_OptionSpec tkMenuConfigSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground",
"Foreground", DEF_MENU_ACTIVE_BG_COLOR,
Tk_Offset(TkMenu, activeBorderPtr), -1, 0,
diff --git a/generic/tkMenu.h b/generic/tkMenu.h
index 630e748..1863c9d 100644
--- a/generic/tkMenu.h
+++ b/generic/tkMenu.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: tkMenu.h,v 1.10 2005/11/14 22:44:11 dkf Exp $
+ * RCS: @(#) $Id: tkMenu.h,v 1.11 2005/11/27 02:36:14 das Exp $
*/
#ifndef _TKMENU
@@ -241,7 +241,7 @@ typedef struct TkMenuEntry {
* Menu states
*/
-EXTERN char *tkMenuStateStrings[];
+MODULE_SCOPE char *tkMenuStateStrings[];
#define ENTRY_ACTIVE 0
#define ENTRY_NORMAL 1
@@ -491,70 +491,70 @@ typedef struct TkMenuOptionTables {
* the outside world:
*/
-EXTERN int TkActivateMenuEntry(TkMenu *menuPtr, int index);
-EXTERN void TkBindMenu(Tk_Window tkwin, TkMenu *menuPtr);
-EXTERN TkMenuReferences*TkCreateMenuReferences(Tcl_Interp *interp,
+MODULE_SCOPE int TkActivateMenuEntry(TkMenu *menuPtr, int index);
+MODULE_SCOPE void TkBindMenu(Tk_Window tkwin, TkMenu *menuPtr);
+MODULE_SCOPE TkMenuReferences*TkCreateMenuReferences(Tcl_Interp *interp,
char *name);
-EXTERN void TkDestroyMenu(TkMenu *menuPtr);
-EXTERN void TkEventuallyRecomputeMenu(TkMenu *menuPtr);
-EXTERN void TkEventuallyRedrawMenu(TkMenu *menuPtr,
+MODULE_SCOPE void TkDestroyMenu(TkMenu *menuPtr);
+MODULE_SCOPE void TkEventuallyRecomputeMenu(TkMenu *menuPtr);
+MODULE_SCOPE void TkEventuallyRedrawMenu(TkMenu *menuPtr,
TkMenuEntry *mePtr);
-EXTERN TkMenuReferences*TkFindMenuReferences(Tcl_Interp *interp, char *name);
-EXTERN TkMenuReferences*TkFindMenuReferencesObj(Tcl_Interp *interp,
+MODULE_SCOPE TkMenuReferences*TkFindMenuReferences(Tcl_Interp *interp, char *name);
+MODULE_SCOPE TkMenuReferences*TkFindMenuReferencesObj(Tcl_Interp *interp,
Tcl_Obj *namePtr);
-EXTERN int TkFreeMenuReferences(TkMenuReferences *menuRefPtr);
-EXTERN Tcl_HashTable * TkGetMenuHashTable(Tcl_Interp *interp);
-EXTERN int TkGetMenuIndex(Tcl_Interp *interp, TkMenu *menuPtr,
+MODULE_SCOPE int TkFreeMenuReferences(TkMenuReferences *menuRefPtr);
+MODULE_SCOPE Tcl_HashTable *TkGetMenuHashTable(Tcl_Interp *interp);
+MODULE_SCOPE int TkGetMenuIndex(Tcl_Interp *interp, TkMenu *menuPtr,
Tcl_Obj *objPtr, int lastOK, int *indexPtr);
-EXTERN void TkMenuInitializeDrawingFields(TkMenu *menuPtr);
-EXTERN void TkMenuInitializeEntryDrawingFields(TkMenuEntry *mePtr);
-EXTERN int TkInvokeMenu(Tcl_Interp *interp, TkMenu *menuPtr,
+MODULE_SCOPE void TkMenuInitializeDrawingFields(TkMenu *menuPtr);
+MODULE_SCOPE void TkMenuInitializeEntryDrawingFields(TkMenuEntry *mePtr);
+MODULE_SCOPE int TkInvokeMenu(Tcl_Interp *interp, TkMenu *menuPtr,
int index);
-EXTERN void TkMenuConfigureDrawOptions(TkMenu *menuPtr);
-EXTERN int TkMenuConfigureEntryDrawOptions(
+MODULE_SCOPE void TkMenuConfigureDrawOptions(TkMenu *menuPtr);
+MODULE_SCOPE int TkMenuConfigureEntryDrawOptions(
TkMenuEntry *mePtr, int index);
-EXTERN void TkMenuFreeDrawOptions(TkMenu *menuPtr);
-EXTERN void TkMenuEntryFreeDrawOptions(TkMenuEntry *mePtr);
-EXTERN void TkMenuEventProc(ClientData clientData,
+MODULE_SCOPE void TkMenuFreeDrawOptions(TkMenu *menuPtr);
+MODULE_SCOPE void TkMenuEntryFreeDrawOptions(TkMenuEntry *mePtr);
+MODULE_SCOPE void TkMenuEventProc(ClientData clientData,
XEvent *eventPtr);
-EXTERN void TkMenuImageProc(ClientData clientData, int x, int y,
+MODULE_SCOPE void TkMenuImageProc(ClientData clientData, int x, int y,
int width, int height, int imgWidth,
int imgHeight);
-EXTERN void TkMenuInit(void);
-EXTERN void TkMenuSelectImageProc(ClientData clientData, int x,
+MODULE_SCOPE void TkMenuInit(void);
+MODULE_SCOPE void TkMenuSelectImageProc(ClientData clientData, int x,
int y, int width, int height, int imgWidth,
int imgHeight);
-EXTERN Tcl_Obj * TkNewMenuName(Tcl_Interp *interp,
+MODULE_SCOPE Tcl_Obj * TkNewMenuName(Tcl_Interp *interp,
Tcl_Obj *parentNamePtr, TkMenu *menuPtr);
-EXTERN int TkPostCommand(TkMenu *menuPtr);
-EXTERN int TkPostSubmenu(Tcl_Interp *interp, TkMenu *menuPtr,
+MODULE_SCOPE int TkPostCommand(TkMenu *menuPtr);
+MODULE_SCOPE int TkPostSubmenu(Tcl_Interp *interp, TkMenu *menuPtr,
TkMenuEntry *mePtr);
-EXTERN int TkPostTearoffMenu(Tcl_Interp *interp, TkMenu *menuPtr,
+MODULE_SCOPE int TkPostTearoffMenu(Tcl_Interp *interp, TkMenu *menuPtr,
int x, int y);
-EXTERN int TkPreprocessMenu(TkMenu *menuPtr);
-EXTERN void TkRecomputeMenu(TkMenu *menuPtr);
+MODULE_SCOPE int TkPreprocessMenu(TkMenu *menuPtr);
+MODULE_SCOPE void TkRecomputeMenu(TkMenu *menuPtr);
/*
* These routines are the platform-dependent routines called by the common
* code.
*/
-EXTERN void TkpComputeMenubarGeometry(TkMenu *menuPtr);
-EXTERN void TkpComputeStandardMenuGeometry(TkMenu *menuPtr);
-EXTERN int TkpConfigureMenuEntry(TkMenuEntry *mePtr);
-EXTERN void TkpDestroyMenu(TkMenu *menuPtr);
-EXTERN void TkpDestroyMenuEntry(TkMenuEntry *mEntryPtr);
-EXTERN void TkpDrawMenuEntry(TkMenuEntry *mePtr,
+MODULE_SCOPE void TkpComputeMenubarGeometry(TkMenu *menuPtr);
+MODULE_SCOPE void TkpComputeStandardMenuGeometry(TkMenu *menuPtr);
+MODULE_SCOPE int TkpConfigureMenuEntry(TkMenuEntry *mePtr);
+MODULE_SCOPE void TkpDestroyMenu(TkMenu *menuPtr);
+MODULE_SCOPE void TkpDestroyMenuEntry(TkMenuEntry *mEntryPtr);
+MODULE_SCOPE void TkpDrawMenuEntry(TkMenuEntry *mePtr,
Drawable d, Tk_Font tkfont,
CONST Tk_FontMetrics *menuMetricsPtr, int x,
int y, int width, int height, int strictMotif,
int drawArrow);
-EXTERN void TkpMenuInit(void);
-EXTERN int TkpMenuNewEntry(TkMenuEntry *mePtr);
-EXTERN int TkpNewMenu(TkMenu *menuPtr);
-EXTERN int TkpPostMenu(Tcl_Interp *interp, TkMenu *menuPtr,
+MODULE_SCOPE void TkpMenuInit(void);
+MODULE_SCOPE int TkpMenuNewEntry(TkMenuEntry *mePtr);
+MODULE_SCOPE int TkpNewMenu(TkMenu *menuPtr);
+MODULE_SCOPE int TkpPostMenu(Tcl_Interp *interp, TkMenu *menuPtr,
int x, int y);
-EXTERN void TkpSetWindowMenuBar(Tk_Window tkwin, TkMenu *menuPtr);
+MODULE_SCOPE void TkpSetWindowMenuBar(Tk_Window tkwin, TkMenu *menuPtr);
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tkMenubutton.h b/generic/tkMenubutton.h
index 4a7d340..087db07 100644
--- a/generic/tkMenubutton.h
+++ b/generic/tkMenubutton.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: tkMenubutton.h,v 1.10 2005/11/15 15:18:22 dkf Exp $
+ * RCS: @(#) $Id: tkMenubutton.h,v 1.11 2005/11/27 02:36:14 das Exp $
*/
#ifndef _TKMENUBUTTON
@@ -209,17 +209,17 @@ typedef struct {
* Declaration of variables shared between the files in the button module.
*/
-extern Tk_ClassProcs tkpMenubuttonClass;
+MODULE_SCOPE Tk_ClassProcs tkpMenubuttonClass;
/*
* Declaration of procedures used in the implementation of the button widget.
*/
-EXTERN void TkpComputeMenuButtonGeometry(TkMenuButton *mbPtr);
-EXTERN TkMenuButton * TkpCreateMenuButton(Tk_Window tkwin);
-EXTERN void TkpDisplayMenuButton(ClientData clientData);
-EXTERN void TkpDestroyMenuButton(TkMenuButton *mbPtr);
-EXTERN void TkMenuButtonWorldChanged(ClientData instanceData);
+MODULE_SCOPE void TkpComputeMenuButtonGeometry(TkMenuButton *mbPtr);
+MODULE_SCOPE TkMenuButton *TkpCreateMenuButton(Tk_Window tkwin);
+MODULE_SCOPE void TkpDisplayMenuButton(ClientData clientData);
+MODULE_SCOPE void TkpDestroyMenuButton(TkMenuButton *mbPtr);
+MODULE_SCOPE void TkMenuButtonWorldChanged(ClientData instanceData);
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tkScale.h b/generic/tkScale.h
index 200ac08..d73d378 100644
--- a/generic/tkScale.h
+++ b/generic/tkScale.h
@@ -10,14 +10,14 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkScale.h,v 1.9 2005/11/15 15:18:22 dkf Exp $
+ * RCS: @(#) $Id: tkScale.h,v 1.10 2005/11/27 02:36:14 das Exp $
*/
#ifndef _TKSCALE
#define _TKSCALE
-#ifndef _TK
-#include "tk.h"
+#ifndef _TKINT
+#include "tkInt.h"
#endif
#ifdef BUILD_tk
@@ -231,16 +231,16 @@ typedef struct TkScale {
* Declaration of procedures used in the implementation of the scale widget.
*/
-EXTERN void TkEventuallyRedrawScale(TkScale *scalePtr, int what);
-EXTERN double TkRoundToResolution(TkScale *scalePtr, double value);
-EXTERN TkScale * TkpCreateScale(Tk_Window tkwin);
-EXTERN void TkpDestroyScale(TkScale *scalePtr);
-EXTERN void TkpDisplayScale(ClientData clientData);
-EXTERN int TkpScaleElement(TkScale *scalePtr, int x, int y);
-EXTERN void TkScaleSetValue(TkScale *scalePtr, double value,
+MODULE_SCOPE void TkEventuallyRedrawScale(TkScale *scalePtr, int what);
+MODULE_SCOPE double TkRoundToResolution(TkScale *scalePtr, double value);
+MODULE_SCOPE TkScale * TkpCreateScale(Tk_Window tkwin);
+MODULE_SCOPE void TkpDestroyScale(TkScale *scalePtr);
+MODULE_SCOPE void TkpDisplayScale(ClientData clientData);
+MODULE_SCOPE int TkpScaleElement(TkScale *scalePtr, int x, int y);
+MODULE_SCOPE void TkScaleSetValue(TkScale *scalePtr, double value,
int setVar, int invokeCommand);
-EXTERN double TkScalePixelToValue(TkScale *scalePtr, int x, int y);
-EXTERN int TkScaleValueToPixel(TkScale *scalePtr, double value);
+MODULE_SCOPE double TkScalePixelToValue(TkScale *scalePtr, int x, int y);
+MODULE_SCOPE int TkScaleValueToPixel(TkScale *scalePtr, double value);
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tkScrollbar.h b/generic/tkScrollbar.h
index 7c07c7e..70acab2 100644
--- a/generic/tkScrollbar.h
+++ b/generic/tkScrollbar.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: tkScrollbar.h,v 1.7 2005/11/13 00:45:47 dkf Exp $
+ * RCS: @(#) $Id: tkScrollbar.h,v 1.8 2005/11/27 02:36:14 das Exp $
*/
#ifndef _TKSCROLLBAR
@@ -167,28 +167,28 @@ typedef struct TkScrollbar {
* Declaration of scrollbar class functions structure.
*/
-extern Tk_ClassProcs tkpScrollbarProcs;
+MODULE_SCOPE Tk_ClassProcs tkpScrollbarProcs;
/*
* Declaration of scrollbar configuration options.
*/
-extern Tk_ConfigSpec tkpScrollbarConfigSpecs[];
+MODULE_SCOPE Tk_ConfigSpec tkpScrollbarConfigSpecs[];
/*
* Declaration of functions used in the implementation of the scrollbar
* widget.
*/
-EXTERN void TkScrollbarEventProc(ClientData clientData,
+MODULE_SCOPE void TkScrollbarEventProc(ClientData clientData,
XEvent *eventPtr);
-EXTERN void TkScrollbarEventuallyRedraw(TkScrollbar *scrollPtr);
-EXTERN void TkpComputeScrollbarGeometry(TkScrollbar *scrollPtr);
-EXTERN TkScrollbar * TkpCreateScrollbar(Tk_Window tkwin);
-EXTERN void TkpDestroyScrollbar(TkScrollbar *scrollPtr);
-EXTERN void TkpDisplayScrollbar(ClientData clientData);
-EXTERN void TkpConfigureScrollbar(TkScrollbar *scrollPtr);
-EXTERN int TkpScrollbarPosition(TkScrollbar *scrollPtr,
+MODULE_SCOPE void TkScrollbarEventuallyRedraw(TkScrollbar *scrollPtr);
+MODULE_SCOPE void TkpComputeScrollbarGeometry(TkScrollbar *scrollPtr);
+MODULE_SCOPE TkScrollbar *TkpCreateScrollbar(Tk_Window tkwin);
+MODULE_SCOPE void TkpDestroyScrollbar(TkScrollbar *scrollPtr);
+MODULE_SCOPE void TkpDisplayScrollbar(ClientData clientData);
+MODULE_SCOPE void TkpConfigureScrollbar(TkScrollbar *scrollPtr);
+MODULE_SCOPE int TkpScrollbarPosition(TkScrollbar *scrollPtr,
int x, int y);
# undef TCL_STORAGE_CLASS
diff --git a/generic/tkSelect.h b/generic/tkSelect.h
index c2ab33f..784dedf 100644
--- a/generic/tkSelect.h
+++ b/generic/tkSelect.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: tkSelect.h,v 1.5 2005/11/15 15:18:22 dkf Exp $
+ * RCS: @(#) $Id: tkSelect.h,v 1.6 2005/11/27 02:36:14 das Exp $
*/
#ifndef _TKSELECT
@@ -156,17 +156,17 @@ typedef struct TkSelInProgress {
* but shouldn't be used anywhere else in Tk (or by Tk clients):
*/
-extern TkSelInProgress *TkSelGetInProgress(void);
-extern void TkSelSetInProgress(TkSelInProgress *pendingPtr);
-extern void TkSelClearSelection(Tk_Window tkwin, XEvent *eventPtr);
-extern int TkSelDefaultSelection(TkSelectionInfo *infoPtr,
+MODULE_SCOPE TkSelInProgress *TkSelGetInProgress(void);
+MODULE_SCOPE void TkSelSetInProgress(TkSelInProgress *pendingPtr);
+MODULE_SCOPE void TkSelClearSelection(Tk_Window tkwin, XEvent *eventPtr);
+MODULE_SCOPE int TkSelDefaultSelection(TkSelectionInfo *infoPtr,
Atom target, char *buffer, int maxBytes,
Atom *typePtr);
-extern int TkSelGetSelection(Tcl_Interp *interp, Tk_Window tkwin,
+MODULE_SCOPE int TkSelGetSelection(Tcl_Interp *interp, Tk_Window tkwin,
Atom selection, Atom target, Tk_GetSelProc *proc,
ClientData clientData);
#ifndef TkSelUpdateClipboard
-extern void TkSelUpdateClipboard(TkWindow *winPtr,
+MODULE_SCOPE void TkSelUpdateClipboard(TkWindow *winPtr,
TkClipboardTarget *targetPtr);
#endif
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index 2cfa16c..fb75f6a 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkStubInit.c,v 1.53 2005/11/17 16:21:56 dkf Exp $
+ * RCS: @(#) $Id: tkStubInit.c,v 1.54 2005/11/27 02:36:14 das Exp $
*/
#include "tkInt.h"
@@ -43,6 +43,12 @@
#define Tk_GetCanvasVisitor \
((VOID * (*)(Tcl_Interp * interp, CONST char * name)) NULL)
+MODULE_SCOPE TkIntStubs tkIntStubs;
+MODULE_SCOPE TkIntPlatStubs tkIntPlatStubs;
+MODULE_SCOPE TkIntXlibStubs tkIntXlibStubs;
+MODULE_SCOPE TkPlatStubs tkPlatStubs;
+MODULE_SCOPE TkStubs tkStubs;
+
/*
* WARNING: The contents of this file is automatically generated by the
* tools/genStubs.tcl script. Any modifications to the function declarations
@@ -297,6 +303,9 @@ TkIntStubs tkIntStubs = {
TkpDrawFrame, /* 152 */
TkCreateThreadExitHandler, /* 153 */
TkDeleteThreadExitHandler, /* 154 */
+ NULL, /* 155 */
+ TkpTestembedCmd, /* 156 */
+ TkpTesttextCmd, /* 157 */
};
TkIntPlatStubs tkIntPlatStubs = {
@@ -339,6 +348,7 @@ TkIntPlatStubs tkIntPlatStubs = {
TkWinGetPlatformId, /* 33 */
TkWinSetHINSTANCE, /* 34 */
TkWinGetPlatformTheme, /* 35 */
+ TkplatformtestInit, /* 36 */
#endif /* __WIN32__ */
#ifdef MAC_OSX_TK
TkGenerateActivateEvents, /* 0 */
@@ -395,6 +405,7 @@ TkIntPlatStubs tkIntPlatStubs = {
TkGenWMDestroyEvent, /* 51 */
NULL, /* 52 */
TkpGetMS, /* 53 */
+ TkplatformtestInit, /* 54 */
#endif /* MAC_OSX_TK */
#if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */
TkCreateXEventSource, /* 0 */
@@ -410,6 +421,7 @@ TkIntPlatStubs tkIntPlatStubs = {
TkSendCleanup, /* 10 */
TkFreeXId, /* 11 */
TkpWmSetState, /* 12 */
+ TkpTestsendCmd, /* 13 */
#endif /* X11 */
};
@@ -617,6 +629,7 @@ TkIntXlibStubs tkIntXlibStubs = {
XQueryColor, /* 88 */
XQueryColors, /* 89 */
XQueryTree, /* 90 */
+ XSync, /* 91 */
#endif /* MAC_OSX_TK */
};
diff --git a/generic/tkStubLib.c b/generic/tkStubLib.c
index 0fa5d11..ddfe8cf 100644
--- a/generic/tkStubLib.c
+++ b/generic/tkStubLib.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: tkStubLib.c,v 1.9 2004/03/17 18:15:44 das Exp $
+ * RCS: @(#) $Id: tkStubLib.c,v 1.10 2005/11/27 02:36:14 das Exp $
*/
@@ -50,12 +50,18 @@
/*
* Ensure that Tk_InitStubs is built as an exported symbol. The other stub
- * functions should be built as non-exported symbols.
+ * symbols should be built as non-exported symbols.
*/
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLEXPORT
+MODULE_SCOPE TkStubs *tkStubsPtr;
+MODULE_SCOPE TkPlatStubs *tkPlatStubsPtr;
+MODULE_SCOPE TkIntStubs *tkIntStubsPtr;
+MODULE_SCOPE TkIntPlatStubs *tkIntPlatStubsPtr;
+MODULE_SCOPE TkIntXlibStubs *tkIntXlibStubsPtr;
+
TkStubs *tkStubsPtr;
TkPlatStubs *tkPlatStubsPtr;
TkIntStubs *tkIntStubsPtr;
@@ -85,7 +91,7 @@ TkIntXlibStubs *tkIntXlibStubsPtr;
#undef Tk_InitStubs
#endif
-CONST char *
+MODULE_SCOPE CONST char *
Tk_InitStubs(interp, version, exact)
Tcl_Interp *interp;
char *version;
diff --git a/generic/tkTest.c b/generic/tkTest.c
index f2b6700..1999117 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTest.c,v 1.28 2005/11/18 10:18:27 dkf Exp $
+ * RCS: @(#) $Id: tkTest.c,v 1.29 2005/11/27 02:36:14 das Exp $
*/
#include "tkInt.h"
@@ -25,6 +25,7 @@
#endif
#if defined(MAC_OSX_TK)
+#include "tkMacOSXInt.h"
#include "tkScrollbar.h"
#endif
@@ -173,8 +174,10 @@ static int TestfontObjCmd(ClientData dummy,
Tcl_Obj *CONST objv[]);
static int TestmakeexistCmd(ClientData dummy,
Tcl_Interp *interp, int argc, CONST char **argv);
+#if !(defined(__WIN32__) || defined(MAC_OSX_TK))
static int TestmenubarCmd(ClientData dummy,
Tcl_Interp *interp, int argc, CONST char **argv);
+#endif
#if defined(__WIN32__) || defined(MAC_OSX_TK)
static int TestmetricsCmd(ClientData dummy,
Tcl_Interp *interp, int argc, CONST char **argv);
@@ -197,10 +200,6 @@ static void CustomOptionFree(ClientData clientData,
Tk_Window tkwin, char *internalPtr);
static int TestpropCmd(ClientData dummy,
Tcl_Interp *interp, int argc, CONST char **argv);
-static int TestsendCmd(ClientData dummy,
- Tcl_Interp *interp, int argc, CONST char **argv);
-static int TesttextCmd(ClientData dummy,
- Tcl_Interp *interp, int argc, CONST char **argv);
#if !(defined(__WIN32__) || defined(MAC_OSX_TK))
static int TestwrapperCmd(ClientData dummy,
Tcl_Interp *interp, int argc, CONST char **argv);
@@ -216,8 +215,6 @@ static void TrivialEventProc(ClientData clientData,
* External (platform specific) initialization routine:
*/
-extern int TkplatformtestInit(Tcl_Interp *interp);
-
#if !(defined(__WIN32__) || defined(MAC_OSX_TK))
#define TkplatformtestInit(x) TCL_OK
#endif
@@ -277,7 +274,7 @@ Tktest_Init(
(ClientData) Tk_MainWindow(interp), NULL);
Tcl_CreateCommand(interp, "testprop", TestpropCmd,
(ClientData) Tk_MainWindow(interp), NULL);
- Tcl_CreateCommand(interp, "testtext", TesttextCmd,
+ Tcl_CreateCommand(interp, "testtext", TkpTesttextCmd,
(ClientData) Tk_MainWindow(interp), NULL);
#if defined(__WIN32__) || defined(MAC_OSX_TK)
@@ -286,7 +283,7 @@ Tktest_Init(
#else
Tcl_CreateCommand(interp, "testmenubar", TestmenubarCmd,
(ClientData) Tk_MainWindow(interp), NULL);
- Tcl_CreateCommand(interp, "testsend", TestsendCmd,
+ Tcl_CreateCommand(interp, "testsend", TkpTestsendCmd,
(ClientData) Tk_MainWindow(interp), NULL);
Tcl_CreateCommand(interp, "testwrapper", TestwrapperCmd,
(ClientData) Tk_MainWindow(interp), NULL);
@@ -1835,6 +1832,7 @@ TestmakeexistCmd(
*/
/* ARGSUSED */
+#if !(defined(__WIN32__) || defined(MAC_OSX_TK))
static int
TestmenubarCmd(
ClientData clientData, /* Main window for application. */
@@ -1884,6 +1882,7 @@ TestmenubarCmd(
return TCL_ERROR;
#endif
}
+#endif
/*
*----------------------------------------------------------------------
@@ -1902,7 +1901,7 @@ TestmenubarCmd(
*----------------------------------------------------------------------
*/
-#ifdef __WIN32__
+#if defined(__WIN32__) || defined(MAC_OSX_TK)
static int
TestmetricsCmd(
ClientData clientData, /* Main window for application. */
@@ -1911,38 +1910,17 @@ TestmetricsCmd(
CONST char **argv) /* Argument strings. */
{
char buf[TCL_INTEGER_SPACE];
+ int val;
+#ifdef __WIN32__
if (argc < 2) {
Tcl_AppendResult(interp, "wrong # args; must be \"", argv[0],
" option ?arg ...?\"", NULL);
return TCL_ERROR;
}
-
- if (strcmp(argv[1], "cyvscroll") == 0) {
- sprintf(buf, "%d", GetSystemMetrics(SM_CYVSCROLL));
- Tcl_AppendResult(interp, buf, NULL);
- } else if (strcmp(argv[1], "cxhscroll") == 0) {
- sprintf(buf, "%d", GetSystemMetrics(SM_CXHSCROLL));
- Tcl_AppendResult(interp, buf, NULL);
- } else {
- Tcl_AppendResult(interp, "bad option \"", argv[1],
- "\": must be cxhscroll or cyvscroll", NULL);
- return TCL_ERROR;
- }
- return TCL_OK;
-}
-#endif
-#if defined(MAC_OSX_TK)
-static int
-TestmetricsCmd(
- ClientData clientData, /* Main window for application. */
- Tcl_Interp *interp, /* Current interpreter. */
- int argc, /* Number of arguments. */
- CONST char **argv) /* Argument strings. */
-{
+#else
Tk_Window tkwin = (Tk_Window) clientData;
TkWindow *winPtr;
- char buf[TCL_INTEGER_SPACE];
if (argc != 3) {
Tcl_AppendResult(interp, "wrong # args; must be \"", argv[0],
@@ -1954,18 +1932,27 @@ TestmetricsCmd(
if (winPtr == NULL) {
return TCL_ERROR;
}
+#endif
if (strcmp(argv[1], "cyvscroll") == 0) {
- sprintf(buf, "%d", ((TkScrollbar *) winPtr->instanceData)->width);
- Tcl_AppendResult(interp, buf, NULL);
+#ifdef __WIN32__
+ val = GetSystemMetrics(SM_CYVSCROLL);
+#else
+ val = ((TkScrollbar *) winPtr->instanceData)->width;
+#endif
} else if (strcmp(argv[1], "cxhscroll") == 0) {
- sprintf(buf, "%d", ((TkScrollbar *) winPtr->instanceData)->width);
- Tcl_AppendResult(interp, buf, NULL);
+#ifdef __WIN32__
+ val = GetSystemMetrics(SM_CXHSCROLL);
+#else
+ val = ((TkScrollbar *) winPtr->instanceData)->width;
+#endif
} else {
Tcl_AppendResult(interp, "bad option \"", argv[1],
"\": must be cxhscroll or cyvscroll", NULL);
return TCL_ERROR;
}
+ sprintf(buf, "%d", val);
+ Tcl_AppendResult(interp, buf, NULL);
return TCL_OK;
}
#endif
@@ -2047,201 +2034,6 @@ TestpropCmd(
return TCL_OK;
}
-/*
- *----------------------------------------------------------------------
- *
- * TestsendCmd --
- *
- * This function implements the "testsend" command. It provides a set of
- * functions for testing the "send" command and support function in
- * tkSend.c.
- *
- * Results:
- * A standard Tcl result.
- *
- * Side effects:
- * Depends on option; see below.
- *
- *----------------------------------------------------------------------
- */
-
- /* ARGSUSED */
-#if !(defined(__WIN32__) || defined(MAC_OSX_TK))
-static int
-TestsendCmd(
- ClientData clientData, /* Main window for application. */
- Tcl_Interp *interp, /* Current interpreter. */
- int argc, /* Number of arguments. */
- CONST char **argv) /* Argument strings. */
-{
- TkWindow *winPtr = (TkWindow *) clientData;
-
- if (argc < 2) {
- Tcl_AppendResult(interp, "wrong # args; must be \"", argv[0],
- " option ?arg ...?\"", NULL);
- return TCL_ERROR;
- }
-
- if (strcmp(argv[1], "bogus") == 0) {
- XChangeProperty(winPtr->dispPtr->display,
- RootWindow(winPtr->dispPtr->display, 0),
- winPtr->dispPtr->registryProperty, XA_INTEGER, 32,
- PropModeReplace,
- (unsigned char *) "This is bogus information", 6);
- } else if (strcmp(argv[1], "prop") == 0) {
- int result, actualFormat;
- unsigned long length, bytesAfter;
- Atom actualType, propName;
- char *property, *p, *end;
- Window w;
-
- if ((argc != 4) && (argc != 5)) {
- Tcl_AppendResult(interp, "wrong # args; must be \"", argv[0],
- " prop window name ?value ?\"", NULL);
- return TCL_ERROR;
- }
- if (strcmp(argv[2], "root") == 0) {
- w = RootWindow(winPtr->dispPtr->display, 0);
- } else if (strcmp(argv[2], "comm") == 0) {
- w = Tk_WindowId(winPtr->dispPtr->commTkwin);
- } else {
- w = strtoul(argv[2], &end, 0);
- }
- propName = Tk_InternAtom((Tk_Window) winPtr, argv[3]);
- if (argc == 4) {
- property = NULL;
- result = XGetWindowProperty(winPtr->dispPtr->display,
- w, propName, 0, 100000, False, XA_STRING,
- &actualType, &actualFormat, &length,
- &bytesAfter, (unsigned char **) &property);
- if ((result == Success) && (actualType != None)
- && (actualFormat == 8) && (actualType == XA_STRING)) {
- for (p = property; (p-property) < length; p++) {
- if (*p == 0) {
- *p = '\n';
- }
- }
- Tcl_SetResult(interp, property, TCL_VOLATILE);
- }
- if (property != NULL) {
- XFree(property);
- }
- } else if (argv[4][0] == 0) {
- XDeleteProperty(winPtr->dispPtr->display, w, propName);
- } else {
- Tcl_DString tmp;
-
- Tcl_DStringInit(&tmp);
- for (p = Tcl_DStringAppend(&tmp, argv[4],
- (int) strlen(argv[4])); *p != 0; p++) {
- if (*p == '\n') {
- *p = 0;
- }
- }
-
- XChangeProperty(winPtr->dispPtr->display, w, propName, XA_STRING,
- 8, PropModeReplace, (unsigned char*)Tcl_DStringValue(&tmp),
- p-Tcl_DStringValue(&tmp));
- Tcl_DStringFree(&tmp);
- }
- } else if (strcmp(argv[1], "serial") == 0) {
- char buf[TCL_INTEGER_SPACE];
-
- sprintf(buf, "%d", tkSendSerial+1);
- Tcl_SetResult(interp, buf, TCL_VOLATILE);
- } else {
- Tcl_AppendResult(interp, "bad option \"", argv[1],
- "\": must be bogus, prop, or serial", NULL);
- return TCL_ERROR;
- }
- return TCL_OK;
-}
-#endif
-
-/*
- *----------------------------------------------------------------------
- *
- * TesttextCmd --
- *
- * This function implements the "testtext" command. It provides a set of
- * functions for testing text widgets and the associated functions in
- * tkText*.c.
- *
- * Results:
- * A standard Tcl result.
- *
- * Side effects:
- * Depends on option; see below.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-TesttextCmd(
- ClientData clientData, /* Main window for application. */
- Tcl_Interp *interp, /* Current interpreter. */
- int argc, /* Number of arguments. */
- CONST char **argv) /* Argument strings. */
-{
- TkText *textPtr;
- size_t len;
- int lineIndex, byteIndex, byteOffset;
- TkTextIndex index;
- char buf[64];
- Tcl_CmdInfo info;
-
- if (argc < 3) {
- return TCL_ERROR;
- }
-
- if (Tcl_GetCommandInfo(interp, argv[1], &info) == 0) {
- return TCL_ERROR;
- }
- if (info.isNativeObjectProc) {
- textPtr = (TkText *) info.objClientData;
- } else {
- textPtr = (TkText *) info.clientData;
- }
- len = strlen(argv[2]);
- if (strncmp(argv[2], "byteindex", len) == 0) {
- if (argc != 5) {
- return TCL_ERROR;
- }
- lineIndex = atoi(argv[3]) - 1;
- byteIndex = atoi(argv[4]);
-
- TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, lineIndex,
- byteIndex, &index);
- } else if (strncmp(argv[2], "forwbytes", len) == 0) {
- if (argc != 5) {
- return TCL_ERROR;
- }
- if (TkTextGetIndex(interp, textPtr, argv[3], &index) != TCL_OK) {
- return TCL_ERROR;
- }
- byteOffset = atoi(argv[4]);
- TkTextIndexForwBytes(textPtr, &index, byteOffset, &index);
- } else if (strncmp(argv[2], "backbytes", len) == 0) {
- if (argc != 5) {
- return TCL_ERROR;
- }
- if (TkTextGetIndex(interp, textPtr, argv[3], &index) != TCL_OK) {
- return TCL_ERROR;
- }
- byteOffset = atoi(argv[4]);
- TkTextIndexBackBytes(textPtr, &index, byteOffset, &index);
- } else {
- return TCL_ERROR;
- }
-
- TkTextSetMark(textPtr, "insert", &index);
- TkTextPrintIndex(textPtr, &index, buf);
- sprintf(buf + strlen(buf), " %d", index.byteIndex);
- Tcl_AppendResult(interp, buf, NULL);
-
- return TCL_OK;
-}
-
#if !(defined(__WIN32__) || defined(MAC_OSX_TK))
/*
*----------------------------------------------------------------------
diff --git a/generic/tkText.c b/generic/tkText.c
index 870555e..f99ce02 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkText.c,v 1.63 2005/11/17 16:21:56 dkf Exp $
+ * RCS: @(#) $Id: tkText.c,v 1.64 2005/11/27 02:36:14 das Exp $
*/
#include "default.h"
@@ -6346,3 +6346,87 @@ ObjectIsEmpty(objPtr)
Tcl_GetStringFromObj(objPtr, &length);
return (length == 0);
}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TkpTesttextCmd --
+ *
+ * This function implements the "testtext" command. It provides a set of
+ * functions for testing text widgets and the associated functions in
+ * tkText*.c.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * Depends on option; see below.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TkpTesttextCmd(
+ ClientData clientData, /* Main window for application. */
+ Tcl_Interp *interp, /* Current interpreter. */
+ int argc, /* Number of arguments. */
+ CONST char **argv) /* Argument strings. */
+{
+ TkText *textPtr;
+ size_t len;
+ int lineIndex, byteIndex, byteOffset;
+ TkTextIndex index;
+ char buf[64];
+ Tcl_CmdInfo info;
+
+ if (argc < 3) {
+ return TCL_ERROR;
+ }
+
+ if (Tcl_GetCommandInfo(interp, argv[1], &info) == 0) {
+ return TCL_ERROR;
+ }
+ if (info.isNativeObjectProc) {
+ textPtr = (TkText *) info.objClientData;
+ } else {
+ textPtr = (TkText *) info.clientData;
+ }
+ len = strlen(argv[2]);
+ if (strncmp(argv[2], "byteindex", len) == 0) {
+ if (argc != 5) {
+ return TCL_ERROR;
+ }
+ lineIndex = atoi(argv[3]) - 1;
+ byteIndex = atoi(argv[4]);
+
+ TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, lineIndex,
+ byteIndex, &index);
+ } else if (strncmp(argv[2], "forwbytes", len) == 0) {
+ if (argc != 5) {
+ return TCL_ERROR;
+ }
+ if (TkTextGetIndex(interp, textPtr, argv[3], &index) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ byteOffset = atoi(argv[4]);
+ TkTextIndexForwBytes(textPtr, &index, byteOffset, &index);
+ } else if (strncmp(argv[2], "backbytes", len) == 0) {
+ if (argc != 5) {
+ return TCL_ERROR;
+ }
+ if (TkTextGetIndex(interp, textPtr, argv[3], &index) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ byteOffset = atoi(argv[4]);
+ TkTextIndexBackBytes(textPtr, &index, byteOffset, &index);
+ } else {
+ return TCL_ERROR;
+ }
+
+ TkTextSetMark(textPtr, "insert", &index);
+ TkTextPrintIndex(textPtr, &index, buf);
+ sprintf(buf + strlen(buf), " %d", index.byteIndex);
+ Tcl_AppendResult(interp, buf, NULL);
+
+ return TCL_OK;
+}
diff --git a/generic/tkText.h b/generic/tkText.h
index 3fd92ab..1357055 100644
--- a/generic/tkText.h
+++ b/generic/tkText.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: tkText.h,v 1.28 2005/11/17 16:21:56 dkf Exp $
+ * RCS: @(#) $Id: tkText.h,v 1.29 2005/11/27 02:36:14 das Exp $
*/
#ifndef _TKTEXT
@@ -940,13 +940,13 @@ typedef struct TkTextElideInfo {
* Declarations for variables shared among the text-related files:
*/
-EXTERN int tkBTreeDebug;
-EXTERN int tkTextDebug;
-EXTERN Tk_SegType tkTextCharType;
-EXTERN Tk_SegType tkTextLeftMarkType;
-EXTERN Tk_SegType tkTextRightMarkType;
-EXTERN Tk_SegType tkTextToggleOnType;
-EXTERN Tk_SegType tkTextToggleOffType;
+MODULE_SCOPE int tkBTreeDebug;
+MODULE_SCOPE int tkTextDebug;
+MODULE_SCOPE Tk_SegType tkTextCharType;
+MODULE_SCOPE Tk_SegType tkTextLeftMarkType;
+MODULE_SCOPE Tk_SegType tkTextRightMarkType;
+MODULE_SCOPE Tk_SegType tkTextToggleOnType;
+MODULE_SCOPE Tk_SegType tkTextToggleOffType;
/*
* Convenience macros for use by B-tree clients which want to access pixel
@@ -963,194 +963,194 @@ EXTERN Tk_SegType tkTextToggleOffType;
* shouldn't be used anywhere else in Tk (or by Tk clients):
*/
-EXTERN int TkBTreeAdjustPixelHeight(CONST TkText *textPtr,
+MODULE_SCOPE int TkBTreeAdjustPixelHeight(CONST TkText *textPtr,
TkTextLine *linePtr, int newPixelHeight,
int mergedLogicalLines);
-EXTERN int TkBTreeCharTagged(CONST TkTextIndex *indexPtr,
+MODULE_SCOPE int TkBTreeCharTagged(CONST TkTextIndex *indexPtr,
TkTextTag *tagPtr);
-EXTERN void TkBTreeCheck(TkTextBTree tree);
-EXTERN TkTextBTree TkBTreeCreate(TkSharedText *sharedTextPtr);
-EXTERN void TkBTreeAddClient(TkTextBTree tree, TkText *textPtr,
+MODULE_SCOPE void TkBTreeCheck(TkTextBTree tree);
+MODULE_SCOPE TkTextBTree TkBTreeCreate(TkSharedText *sharedTextPtr);
+MODULE_SCOPE void TkBTreeAddClient(TkTextBTree tree, TkText *textPtr,
int defaultHeight);
-EXTERN void TkBTreeClientRangeChanged(TkText *textPtr,
+MODULE_SCOPE void TkBTreeClientRangeChanged(TkText *textPtr,
int defaultHeight);
-EXTERN void TkBTreeRemoveClient(TkTextBTree tree,
+MODULE_SCOPE void TkBTreeRemoveClient(TkTextBTree tree,
TkText *textPtr);
-EXTERN void TkBTreeDestroy(TkTextBTree tree);
-EXTERN void TkBTreeDeleteIndexRange(TkTextBTree tree,
+MODULE_SCOPE void TkBTreeDestroy(TkTextBTree tree);
+MODULE_SCOPE void TkBTreeDeleteIndexRange(TkTextBTree tree,
TkTextIndex *index1Ptr, TkTextIndex *index2Ptr);
-EXTERN TkTextLine * TkBTreeFindLine(TkTextBTree tree,
+MODULE_SCOPE TkTextLine *TkBTreeFindLine(TkTextBTree tree,
CONST TkText *textPtr, int line);
-EXTERN TkTextLine * TkBTreeFindPixelLine(TkTextBTree tree,
+MODULE_SCOPE TkTextLine *TkBTreeFindPixelLine(TkTextBTree tree,
CONST TkText *textPtr, int pixels,
int *pixelOffset);
-EXTERN TkTextTag ** TkBTreeGetTags(CONST TkTextIndex *indexPtr,
+MODULE_SCOPE TkTextTag **TkBTreeGetTags(CONST TkTextIndex *indexPtr,
CONST TkText *textPtr, int *numTagsPtr);
-EXTERN void TkBTreeInsertChars(TkTextBTree tree,
+MODULE_SCOPE void TkBTreeInsertChars(TkTextBTree tree,
TkTextIndex *indexPtr, CONST char *string);
-EXTERN int TkBTreeLinesTo(CONST TkText *textPtr,
+MODULE_SCOPE int TkBTreeLinesTo(CONST TkText *textPtr,
TkTextLine *linePtr);
-EXTERN int TkBTreePixelsTo(CONST TkText *textPtr,
+MODULE_SCOPE int TkBTreePixelsTo(CONST TkText *textPtr,
TkTextLine *linePtr);
-EXTERN void TkBTreeLinkSegment(TkTextSegment *segPtr,
+MODULE_SCOPE void TkBTreeLinkSegment(TkTextSegment *segPtr,
TkTextIndex *indexPtr);
-EXTERN TkTextLine * TkBTreeNextLine(CONST TkText *textPtr,
+MODULE_SCOPE TkTextLine *TkBTreeNextLine(CONST TkText *textPtr,
TkTextLine *linePtr);
-EXTERN int TkBTreeNextTag(TkTextSearch *searchPtr);
-EXTERN int TkBTreeNumLines(TkTextBTree tree,
+MODULE_SCOPE int TkBTreeNextTag(TkTextSearch *searchPtr);
+MODULE_SCOPE int TkBTreeNumLines(TkTextBTree tree,
CONST TkText *textPtr);
-EXTERN int TkBTreeNumPixels(TkTextBTree tree,
+MODULE_SCOPE int TkBTreeNumPixels(TkTextBTree tree,
CONST TkText *textPtr);
-EXTERN TkTextLine * TkBTreePreviousLine(TkText *textPtr,
+MODULE_SCOPE TkTextLine *TkBTreePreviousLine(TkText *textPtr,
TkTextLine *linePtr);
-EXTERN int TkBTreePrevTag(TkTextSearch *searchPtr);
-EXTERN void TkBTreeStartSearch(TkTextIndex *index1Ptr,
+MODULE_SCOPE int TkBTreePrevTag(TkTextSearch *searchPtr);
+MODULE_SCOPE void TkBTreeStartSearch(TkTextIndex *index1Ptr,
TkTextIndex *index2Ptr, TkTextTag *tagPtr,
TkTextSearch *searchPtr);
-EXTERN void TkBTreeStartSearchBack(TkTextIndex *index1Ptr,
+MODULE_SCOPE void TkBTreeStartSearchBack(TkTextIndex *index1Ptr,
TkTextIndex *index2Ptr, TkTextTag *tagPtr,
TkTextSearch *searchPtr);
-EXTERN int TkBTreeTag(TkTextIndex *index1Ptr,
+MODULE_SCOPE int TkBTreeTag(TkTextIndex *index1Ptr,
TkTextIndex *index2Ptr, TkTextTag *tagPtr,
int add);
-EXTERN void TkBTreeUnlinkSegment(TkTextSegment *segPtr,
+MODULE_SCOPE void TkBTreeUnlinkSegment(TkTextSegment *segPtr,
TkTextLine *linePtr);
-EXTERN void TkTextBindProc(ClientData clientData,
+MODULE_SCOPE void TkTextBindProc(ClientData clientData,
XEvent *eventPtr);
-EXTERN void TkTextSelectionEvent(TkText *textPtr);
-EXTERN void TkTextChanged(TkSharedText *sharedTextPtr,
+MODULE_SCOPE void TkTextSelectionEvent(TkText *textPtr);
+MODULE_SCOPE void TkTextChanged(TkSharedText *sharedTextPtr,
TkText *textPtr, CONST TkTextIndex *index1Ptr,
CONST TkTextIndex *index2Ptr);
-EXTERN int TkTextIndexBbox(TkText *textPtr,
+MODULE_SCOPE int TkTextIndexBbox(TkText *textPtr,
CONST TkTextIndex *indexPtr, int *xPtr, int *yPtr,
int *widthPtr, int *heightPtr, int *charWidthPtr);
-EXTERN int TkTextCharLayoutProc(TkText *textPtr,
+MODULE_SCOPE int TkTextCharLayoutProc(TkText *textPtr,
TkTextIndex *indexPtr, TkTextSegment *segPtr,
int offset, int maxX, int maxChars, int noBreakYet,
TkWrapMode wrapMode, TkTextDispChunk *chunkPtr);
-EXTERN void TkTextCreateDInfo(TkText *textPtr);
-EXTERN int TkTextDLineInfo(TkText *textPtr,
+MODULE_SCOPE void TkTextCreateDInfo(TkText *textPtr);
+MODULE_SCOPE int TkTextDLineInfo(TkText *textPtr,
CONST TkTextIndex *indexPtr, int *xPtr, int *yPtr,
int *widthPtr, int *heightPtr, int *basePtr);
-EXTERN void TkTextEmbWinDisplayProc(TkText *textPtr,
+MODULE_SCOPE void TkTextEmbWinDisplayProc(TkText *textPtr,
TkTextDispChunk *chunkPtr, int x, int y,
int lineHeight, int baseline, Display *display,
Drawable dst, int screenY);
-EXTERN TkTextTag * TkTextCreateTag(TkText *textPtr,
+MODULE_SCOPE TkTextTag *TkTextCreateTag(TkText *textPtr,
CONST char *tagName, int *newTag);
-EXTERN void TkTextFreeDInfo(TkText *textPtr);
-EXTERN void TkTextDeleteTag(TkText *textPtr, TkTextTag *tagPtr);
-EXTERN void TkTextFreeTag(TkText *textPtr, TkTextTag *tagPtr);
-EXTERN int TkTextGetIndex(Tcl_Interp *interp, TkText *textPtr,
+MODULE_SCOPE void TkTextFreeDInfo(TkText *textPtr);
+MODULE_SCOPE void TkTextDeleteTag(TkText *textPtr, TkTextTag *tagPtr);
+MODULE_SCOPE void TkTextFreeTag(TkText *textPtr, TkTextTag *tagPtr);
+MODULE_SCOPE int TkTextGetIndex(Tcl_Interp *interp, TkText *textPtr,
CONST char *string, TkTextIndex *indexPtr);
-EXTERN int TkTextGetObjIndex(Tcl_Interp *interp, TkText *textPtr,
+MODULE_SCOPE int TkTextGetObjIndex(Tcl_Interp *interp, TkText *textPtr,
Tcl_Obj *idxPtr, TkTextIndex *indexPtr);
-EXTERN int TkTextSharedGetObjIndex(Tcl_Interp *interp,
+MODULE_SCOPE int TkTextSharedGetObjIndex(Tcl_Interp *interp,
TkSharedText *sharedTextPtr, Tcl_Obj *idxPtr,
TkTextIndex *indexPtr);
-EXTERN CONST TkTextIndex* TkTextGetIndexFromObj(Tcl_Interp *interp,
+MODULE_SCOPE CONST TkTextIndex *TkTextGetIndexFromObj(Tcl_Interp *interp,
TkText *textPtr, Tcl_Obj *objPtr);
-EXTERN TkTextTabArray * TkTextGetTabs(Tcl_Interp *interp,
+MODULE_SCOPE TkTextTabArray *TkTextGetTabs(Tcl_Interp *interp,
TkText *textPtr, Tcl_Obj *stringPtr);
-EXTERN void TkTextFindDisplayLineEnd(TkText *textPtr,
+MODULE_SCOPE void TkTextFindDisplayLineEnd(TkText *textPtr,
TkTextIndex *indexPtr, int end, int *xOffset);
-EXTERN int TkTextIndexBackBytes(CONST TkText *textPtr,
+MODULE_SCOPE int TkTextIndexBackBytes(CONST TkText *textPtr,
CONST TkTextIndex *srcPtr, int count,
TkTextIndex *dstPtr);
-EXTERN void TkTextIndexBackChars(CONST TkText *textPtr,
+MODULE_SCOPE void TkTextIndexBackChars(CONST TkText *textPtr,
CONST TkTextIndex *srcPtr, int count,
TkTextIndex *dstPtr, TkTextCountType type);
-EXTERN int TkTextIndexCmp(CONST TkTextIndex *index1Ptr,
+MODULE_SCOPE int TkTextIndexCmp(CONST TkTextIndex *index1Ptr,
CONST TkTextIndex *index2Ptr);
-EXTERN int TkTextIndexCount(CONST TkText *textPtr,
+MODULE_SCOPE int TkTextIndexCount(CONST TkText *textPtr,
CONST TkTextIndex *index1Ptr,
CONST TkTextIndex *index2Ptr,
TkTextCountType type);
-EXTERN int TkTextIndexForwBytes(CONST TkText *textPtr,
+MODULE_SCOPE int TkTextIndexForwBytes(CONST TkText *textPtr,
CONST TkTextIndex *srcPtr, int count,
TkTextIndex *dstPtr);
-EXTERN void TkTextIndexForwChars(CONST TkText *textPtr,
+MODULE_SCOPE void TkTextIndexForwChars(CONST TkText *textPtr,
CONST TkTextIndex *srcPtr, int count,
TkTextIndex *dstPtr, TkTextCountType type);
-EXTERN void TkTextIndexOfX(TkText *textPtr, int x,
+MODULE_SCOPE void TkTextIndexOfX(TkText *textPtr, int x,
TkTextIndex *indexPtr);
-EXTERN int TkTextIndexYPixels(TkText *textPtr,
+MODULE_SCOPE int TkTextIndexYPixels(TkText *textPtr,
CONST TkTextIndex *indexPtr);
-EXTERN TkTextSegment * TkTextIndexToSeg(CONST TkTextIndex *indexPtr,
+MODULE_SCOPE TkTextSegment *TkTextIndexToSeg(CONST TkTextIndex *indexPtr,
int *offsetPtr);
-EXTERN void TkTextInsertDisplayProc(TkText *textPtr,
+MODULE_SCOPE void TkTextInsertDisplayProc(TkText *textPtr,
TkTextDispChunk *chunkPtr, int x, int y,
int height, int baseline, Display *display,
Drawable dst, int screenY);
-EXTERN void TkTextLostSelection(ClientData clientData);
-EXTERN TkTextIndex * TkTextMakeCharIndex(TkTextBTree tree, TkText *textPtr,
+MODULE_SCOPE void TkTextLostSelection(ClientData clientData);
+MODULE_SCOPE TkTextIndex *TkTextMakeCharIndex(TkTextBTree tree, TkText *textPtr,
int lineIndex, int charIndex,
TkTextIndex *indexPtr);
-EXTERN int TkTextMeasureDown(TkText *textPtr,
+MODULE_SCOPE int TkTextMeasureDown(TkText *textPtr,
TkTextIndex *srcPtr, int distance);
-EXTERN void TkTextFreeElideInfo(TkTextElideInfo *infoPtr);
-EXTERN int TkTextIsElided(CONST TkText *textPtr,
+MODULE_SCOPE void TkTextFreeElideInfo(TkTextElideInfo *infoPtr);
+MODULE_SCOPE int TkTextIsElided(CONST TkText *textPtr,
CONST TkTextIndex *indexPtr,
TkTextElideInfo *infoPtr);
-EXTERN TkTextIndex * TkTextMakeByteIndex(TkTextBTree tree,
+MODULE_SCOPE TkTextIndex *TkTextMakeByteIndex(TkTextBTree tree,
CONST TkText *textPtr, int lineIndex,
int byteIndex, TkTextIndex *indexPtr);
-EXTERN int TkTextMakePixelIndex(TkText *textPtr,
+MODULE_SCOPE int TkTextMakePixelIndex(TkText *textPtr,
int pixelIndex, TkTextIndex *indexPtr);
-EXTERN void TkTextInvalidateLineMetrics(
+MODULE_SCOPE void TkTextInvalidateLineMetrics(
TkSharedText *sharedTextPtr, TkText *textPtr,
TkTextLine *linePtr, int lineCount, int action);
-EXTERN int TkTextUpdateLineMetrics(TkText *textPtr, int lineNum,
+MODULE_SCOPE int TkTextUpdateLineMetrics(TkText *textPtr, int lineNum,
int endLine, int doThisMuch);
-EXTERN int TkTextUpdateOneLine(TkText *textPtr,
+MODULE_SCOPE int TkTextUpdateOneLine(TkText *textPtr,
TkTextLine *linePtr, int pixelHeight,
TkTextIndex *indexPtr, int partialCalc);
-EXTERN int TkTextMarkCmd(TkText *textPtr, Tcl_Interp *interp,
+MODULE_SCOPE int TkTextMarkCmd(TkText *textPtr, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[]);
-EXTERN int TkTextMarkNameToIndex(TkText *textPtr,
+MODULE_SCOPE int TkTextMarkNameToIndex(TkText *textPtr,
CONST char *name, TkTextIndex *indexPtr);
-EXTERN void TkTextMarkSegToIndex(TkText *textPtr,
+MODULE_SCOPE void TkTextMarkSegToIndex(TkText *textPtr,
TkTextSegment *markPtr, TkTextIndex *indexPtr);
-EXTERN void TkTextEventuallyRepick(TkText *textPtr);
-EXTERN void TkTextPickCurrent(TkText *textPtr, XEvent *eventPtr);
-EXTERN void TkTextPixelIndex(TkText *textPtr, int x, int y,
+MODULE_SCOPE void TkTextEventuallyRepick(TkText *textPtr);
+MODULE_SCOPE void TkTextPickCurrent(TkText *textPtr, XEvent *eventPtr);
+MODULE_SCOPE void TkTextPixelIndex(TkText *textPtr, int x, int y,
TkTextIndex *indexPtr, int *nearest);
-EXTERN int TkTextPrintIndex(CONST TkText *textPtr,
+MODULE_SCOPE int TkTextPrintIndex(CONST TkText *textPtr,
CONST TkTextIndex *indexPtr, char *string);
-EXTERN Tcl_Obj* TkTextNewIndexObj(TkText *textPtr,
+MODULE_SCOPE Tcl_Obj* TkTextNewIndexObj(TkText *textPtr,
CONST TkTextIndex *indexPtr);
-EXTERN void TkTextRedrawRegion(TkText *textPtr, int x, int y,
+MODULE_SCOPE void TkTextRedrawRegion(TkText *textPtr, int x, int y,
int width, int height);
-EXTERN void TkTextRedrawTag(TkSharedText *sharedTextPtr,
+MODULE_SCOPE void TkTextRedrawTag(TkSharedText *sharedTextPtr,
TkText *textPtr, TkTextIndex *index1Ptr,
TkTextIndex *index2Ptr, TkTextTag *tagPtr,
int withTag);
-EXTERN void TkTextRelayoutWindow(TkText *textPtr, int mask);
-EXTERN int TkTextScanCmd(TkText *textPtr, Tcl_Interp *interp,
+MODULE_SCOPE void TkTextRelayoutWindow(TkText *textPtr, int mask);
+MODULE_SCOPE int TkTextScanCmd(TkText *textPtr, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[]);
-EXTERN int TkTextSeeCmd(TkText *textPtr, Tcl_Interp *interp,
+MODULE_SCOPE int TkTextSeeCmd(TkText *textPtr, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[]);
-EXTERN int TkTextSegToOffset(CONST TkTextSegment *segPtr,
+MODULE_SCOPE int TkTextSegToOffset(CONST TkTextSegment *segPtr,
CONST TkTextLine *linePtr);
-EXTERN TkTextSegment * TkTextSetMark(TkText *textPtr,
+MODULE_SCOPE TkTextSegment *TkTextSetMark(TkText *textPtr,
CONST char *name, TkTextIndex *indexPtr);
-EXTERN void TkTextSetYView(TkText *textPtr,
+MODULE_SCOPE void TkTextSetYView(TkText *textPtr,
TkTextIndex *indexPtr, int pickPlace);
-EXTERN int TkTextTagCmd(TkText *textPtr, Tcl_Interp *interp,
+MODULE_SCOPE int TkTextTagCmd(TkText *textPtr, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[]);
-EXTERN int TkTextImageCmd(TkText *textPtr, Tcl_Interp *interp,
+MODULE_SCOPE int TkTextImageCmd(TkText *textPtr, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[]);
-EXTERN int TkTextImageIndex(TkText *textPtr,
+MODULE_SCOPE int TkTextImageIndex(TkText *textPtr,
CONST char *name, TkTextIndex *indexPtr);
-EXTERN int TkTextWindowCmd(TkText *textPtr, Tcl_Interp *interp,
+MODULE_SCOPE int TkTextWindowCmd(TkText *textPtr, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[]);
-EXTERN int TkTextWindowIndex(TkText *textPtr, CONST char *name,
+MODULE_SCOPE int TkTextWindowIndex(TkText *textPtr, CONST char *name,
TkTextIndex *indexPtr);
-EXTERN int TkTextXviewCmd(TkText *textPtr, Tcl_Interp *interp,
+MODULE_SCOPE int TkTextXviewCmd(TkText *textPtr, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[]);
-EXTERN int TkTextYviewCmd(TkText *textPtr, Tcl_Interp *interp,
+MODULE_SCOPE int TkTextYviewCmd(TkText *textPtr, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[]);
-EXTERN void TkTextWinFreeClient(Tcl_HashEntry *hPtr,
+MODULE_SCOPE void TkTextWinFreeClient(Tcl_HashEntry *hPtr,
TkTextEmbWindowClient *client);
# undef TCL_STORAGE_CLASS
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index df0230f..13c6b24 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTextDisp.c,v 1.54 2005/11/17 10:57:35 dkf Exp $
+ * RCS: @(#) $Id: tkTextDisp.c,v 1.55 2005/11/27 02:36:14 das Exp $
*/
#include "tkPort.h"
@@ -5590,7 +5590,7 @@ TkTextYviewCmd(
TextDInfo *dInfoPtr = textPtr->dInfoPtr;
int pickPlace, type;
int pixels, count;
- size_t switchLength;
+ int switchLength;
double fraction;
TkTextIndex index;
diff --git a/generic/tkUndo.h b/generic/tkUndo.h
index a8b053e..5d50edd 100644
--- a/generic/tkUndo.h
+++ b/generic/tkUndo.h
@@ -8,14 +8,14 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUndo.h,v 1.4 2005/11/15 15:18:22 dkf Exp $
+ * RCS: @(#) $Id: tkUndo.h,v 1.5 2005/11/27 02:36:14 das Exp $
*/
#ifndef _TKUNDO
#define _TKUNDO
-#ifndef _TK
-#include "tk.h"
+#ifndef _TKINT
+#include "tkInt.h"
#endif
#ifdef BUILD_tk
@@ -92,29 +92,29 @@ typedef struct TkUndoRedoStack {
* Basic functions.
*/
-EXTERN void TkUndoPushStack(TkUndoAtom **stack, TkUndoAtom *elem);
-EXTERN TkUndoAtom * TkUndoPopStack(TkUndoAtom **stack);
-EXTERN int TkUndoInsertSeparator(TkUndoAtom **stack);
-EXTERN void TkUndoClearStack(TkUndoAtom **stack);
+MODULE_SCOPE void TkUndoPushStack(TkUndoAtom **stack, TkUndoAtom *elem);
+MODULE_SCOPE TkUndoAtom *TkUndoPopStack(TkUndoAtom **stack);
+MODULE_SCOPE int TkUndoInsertSeparator(TkUndoAtom **stack);
+MODULE_SCOPE void TkUndoClearStack(TkUndoAtom **stack);
/*
* Functions for working on an undo/redo stack.
*/
-EXTERN TkUndoRedoStack *TkUndoInitStack(Tcl_Interp *interp, int maxdepth);
-EXTERN void TkUndoSetDepth(TkUndoRedoStack *stack, int maxdepth);
-EXTERN void TkUndoClearStacks(TkUndoRedoStack *stack);
-EXTERN void TkUndoFreeStack(TkUndoRedoStack *stack);
-EXTERN void TkUndoInsertUndoSeparator(TkUndoRedoStack *stack);
-EXTERN TkUndoSubAtom * TkUndoMakeCmdSubAtom(Tcl_Command command,
+MODULE_SCOPE TkUndoRedoStack *TkUndoInitStack(Tcl_Interp *interp, int maxdepth);
+MODULE_SCOPE void TkUndoSetDepth(TkUndoRedoStack *stack, int maxdepth);
+MODULE_SCOPE void TkUndoClearStacks(TkUndoRedoStack *stack);
+MODULE_SCOPE void TkUndoFreeStack(TkUndoRedoStack *stack);
+MODULE_SCOPE void TkUndoInsertUndoSeparator(TkUndoRedoStack *stack);
+MODULE_SCOPE TkUndoSubAtom *TkUndoMakeCmdSubAtom(Tcl_Command command,
Tcl_Obj *actionScript, TkUndoSubAtom *subAtomList);
-EXTERN TkUndoSubAtom * TkUndoMakeSubAtom(TkUndoProc *funcPtr,
+MODULE_SCOPE TkUndoSubAtom *TkUndoMakeSubAtom(TkUndoProc *funcPtr,
ClientData clientData, Tcl_Obj *actionScript,
TkUndoSubAtom *subAtomList);
-EXTERN void TkUndoPushAction(TkUndoRedoStack *stack,
+MODULE_SCOPE void TkUndoPushAction(TkUndoRedoStack *stack,
TkUndoSubAtom *apply, TkUndoSubAtom *revert);
-EXTERN int TkUndoRevert(TkUndoRedoStack *stack);
-EXTERN int TkUndoApply(TkUndoRedoStack *stack);
+MODULE_SCOPE int TkUndoRevert(TkUndoRedoStack *stack);
+MODULE_SCOPE int TkUndoApply(TkUndoRedoStack *stack);
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT