diff options
author | das <das> | 2002-08-31 06:12:19 (GMT) |
---|---|---|
committer | das <das> | 2002-08-31 06:12:19 (GMT) |
commit | e947c1d0d386b229818958dc12ea0cc20e4ec582 (patch) | |
tree | 303845583d22d9e5e5f3f53edf451167cb5847e6 /generic/tkStubInit.c | |
parent | 62d94160aed093a9505d60181a1509e69bd02bb6 (diff) | |
download | tk-e947c1d0d386b229818958dc12ea0cc20e4ec582.zip tk-e947c1d0d386b229818958dc12ea0cc20e4ec582.tar.gz tk-e947c1d0d386b229818958dc12ea0cc20e4ec582.tar.bz2 |
*** macosx-8-4-branch merged into the mainline [tcl patch #602770] ***macosx_8_4_merge_2002_08_31_trunk
* generic/tk.decls:
* generic/tkInt.decls: added new "aqua" specific entries to the
stubs tables. Changed all "unix" entries to "x11" to allow us to
distinguish and build both "aqua" on MacOSX and "x11" on MacOSX.
* generic/tk.h: added a #ifnded RESOURCE_INCLUDED so that tk.h can
be passed to the resource compiler.
* generic/tkCmds.c (Tk_TkObjCmd): added [tk windowingsystem]
subcommand: returns "x11" when running on X11, "win32" on Windows,
"classic" on MacOS9 and "aqua" on MacOSX Aqua (i.e. Carbon)
* generic/tkFont.c (TkFontGetFirstTextLayout): new private function
returning the first chunk of a Tk_TextLayout, i.e. until the first
font change on the first line (or the whole first line if there is
no such font change).
* generic/tkMain.c: made Tcl_ThreadDataKey static
* library/demos/puzzle.tcl: fixed button metrics for aqua
* tests/cursor.test: check for presence of arrow cursor instead of
heart cursor
* xlib/xcolors.c: changed xColors static initialization to more
standard C
* macosx/Wish.pbproj/jingham.pbxuser (new):
* macosx/Wish.pbproj/project.pbxproj (new): project for Apple's
ProjectBuilder IDE.
* macosx/Makefile (new): simple makefile for building the project
from the command line via the ProjectBuilder tool 'pbxbuild'.
* macosx/tkMacOSXAppInit.c (new): macosx specific AppInit looking
for a AppMain.tcl file in its bundled Resources/Scripts folder. If
present, argv[1] is set to that file and the Scripts folder is
added to the auto_path. This allows tk apps to embed scripts within
their bundle directory structure.
* macosx/tkMacOSXInit.c (new): macosx adapted version of
tkUnixInit.c: we initialize & cache the Carbon native encoding
(e.g. 'macRoman') and try to find the tk script library files
inside Tk packaged as a framework.
* macosx/tkMacOSXNotify.c (new): new macosx specific merged
Carbon/select-based notifier.
* macosx/tkMacOSXEvent.c (new):
* macosx/tkMacOSXEvent.h (new):
* macosx/tkMacOSXKeyEvent.c (new):
* macosx/tkMacOSXMouseEvent.c (new):
* macosx/tkMacOSXWindowEvent.c (new): new macosx specific event
handling functionality.
* macosx/tkMacOSX.h (new):
* macosx/tkMacOSXBitmap.c (new):
* macosx/tkMacOSXButton.c (new):
* macosx/tkMacOSXClipboard.c (new):
* macosx/tkMacOSXColor.c (new):
* macosx/tkMacOSXConfig.c (new):
* macosx/tkMacOSXCursor.c (new):
* macosx/tkMacOSXDefault.h (new):
* macosx/tkMacOSXDialog.c (new):
* macosx/tkMacOSXDraw.c (new):
* macosx/tkMacOSXEmbed.c (new):
* macosx/tkMacOSXFont.c (new):
* macosx/tkMacOSXHLEvents.c (new):
* macosx/tkMacOSXInt.h (new):
* macosx/tkMacOSXKeyboard.c (new):
* macosx/tkMacOSXMenu.c (new):
* macosx/tkMacOSXMenubutton.c (new):
* macosx/tkMacOSXMenus.c (new):
* macosx/tkMacOSXPort.h (new):
* macosx/tkMacOSXRegion.c (new):
* macosx/tkMacOSXScale.c (new):
* macosx/tkMacOSXScrlbr.c (new):
* macosx/tkMacOSXSubwindows.c (new):
* macosx/tkMacOSXTest.c (new):
* macosx/tkMacOSXUtil.c (new):
* macosx/tkMacOSXUtil.h (new):
* macosx/tkMacOSXWm.c (new):
* macosx/tkMacOSXWm.h (new):
* macosx/tkMacOSXXStubs.c (new): macosx ports of classic mac Tk
implementation in tk/mac.
* macosx/tkMacOSXSend.c (new): only send to local interp
implemented currently.
* macosx/tkMacOSXDebug.h (new):
* macosx/tkMacOSXDebug.c (new): new macosx specific functions for
debugging MacOS events, regions, etc.
* macosx/tkAboutDlg.r (new):
* macosx/tkMacOSXApplication.r (new):
* macosx/tkMacOSXCursors.r (new):
* macosx/tkMacOSXLibrary.r (new):
* macosx/tkMacOSXMenu.r (new):
* macosx/tkMacOSXResource.r (new):
* macosx/tkMacOSXXCursors.r (new):
* macosx/tclets.r (new): sources for Rez resource compiler.
* macosx/Wish.icns (new): Wish application icon.
* generic/tk.h:
* generic/default.h:
* generic/tkBind.c:
* generic/tkCmds.c:
* generic/tkGrab.c:
* generic/tkPointer.c:
* generic/tkPort.h:
* generic/tkSelect.c:
* generic/tkStubLib.c:
* generic/tkTest.c:
* generic/tkText.c:
* generic/tkWindow.c:
* unix/tkUnix3d.c:
* xlib/xgc.c:
* xlib/X11/X.h:
* xlib/X11/Xlib.h:
* xlib/X11/Xutil.h: added #includes and #ifdefs for macosx
* library/bgerror.tcl:
* library/button.tcl:
* library/console.tcl:
* library/dialog.tcl:
* library/entry.tcl:
* library/listbox.tcl:
* library/menu.tcl:
* library/msgbox.tcl:
* library/scrlbar.tcl:
* library/spinbox.tcl:
* library/text.tcl:
* library/tk.tcl:
* library/demos/menu.tcl:
* library/demos/menubu.tcl:
* library/demos/widget: check [tk windowingsystem] instead of
and/or in addition to $tcl_platform(platform).
* generic/tkInt.h:
* mac/tkMacBitmap.c:
* mac/tkMacWm.c: added missing CONSTification
* generic/tkIntDecls.h:
* generic/tkIntPlatDecls.h:
* generic/tkIntXlibDecls.h:
* generic/tkPlatDecls.h:
* generic/tkStubInit.c: regen
Diffstat (limited to 'generic/tkStubInit.c')
-rw-r--r-- | generic/tkStubInit.c | 244 |
1 files changed, 227 insertions, 17 deletions
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index e92d4f5..bf3e770 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -8,19 +8,31 @@ * 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.37 2002/06/18 23:51:46 dkf Exp $ + * RCS: @(#) $Id: tkStubInit.c,v 1.38 2002/08/31 06:12:27 das Exp $ */ #include "tkInt.h" #include "tkPort.h" +#if !(defined(__WIN32__) && defined(MAC_TCL) || defined(MAC_OSX_TK)) +/* UNIX */ +#define UNIX_TK +#endif + #ifdef __WIN32__ #include "tkWinInt.h" #endif -#ifdef MAC_TCL +#if defined(MAC_TCL) +/* set this locally .. we could have used _TKMACINT */ +#define MAC_TK #include "tkMacInt.h" #endif +#if defined(MAC_OSX_TK) +/* set this locally .. we could have used _TKMACINT */ +#include "tkMacOSXInt.h" +#endif + #include "tkDecls.h" #include "tkPlatDecls.h" #include "tkIntDecls.h" @@ -169,6 +181,9 @@ TkIntStubs tkIntStubs = { #ifdef MAC_TCL TkClipBox, /* 113 */ #endif /* MAC_TCL */ +#ifdef MAC_OSX_TK + TkClipBox, /* 113 */ +#endif /* MAC_OSX_TK */ #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ NULL, /* 114 */ #endif /* UNIX */ @@ -178,6 +193,9 @@ TkIntStubs tkIntStubs = { #ifdef MAC_TCL TkCreateRegion, /* 114 */ #endif /* MAC_TCL */ +#ifdef MAC_OSX_TK + TkCreateRegion, /* 114 */ +#endif /* MAC_OSX_TK */ #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ NULL, /* 115 */ #endif /* UNIX */ @@ -187,6 +205,9 @@ TkIntStubs tkIntStubs = { #ifdef MAC_TCL TkDestroyRegion, /* 115 */ #endif /* MAC_TCL */ +#ifdef MAC_OSX_TK + TkDestroyRegion, /* 115 */ +#endif /* MAC_OSX_TK */ #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ NULL, /* 116 */ #endif /* UNIX */ @@ -196,6 +217,9 @@ TkIntStubs tkIntStubs = { #ifdef MAC_TCL TkIntersectRegion, /* 116 */ #endif /* MAC_TCL */ +#ifdef MAC_OSX_TK + TkIntersectRegion, /* 116 */ +#endif /* MAC_OSX_TK */ #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ NULL, /* 117 */ #endif /* UNIX */ @@ -205,6 +229,9 @@ TkIntStubs tkIntStubs = { #ifdef MAC_TCL TkRectInRegion, /* 117 */ #endif /* MAC_TCL */ +#ifdef MAC_OSX_TK + TkRectInRegion, /* 117 */ +#endif /* MAC_OSX_TK */ #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ NULL, /* 118 */ #endif /* UNIX */ @@ -214,6 +241,9 @@ TkIntStubs tkIntStubs = { #ifdef MAC_TCL TkSetRegion, /* 118 */ #endif /* MAC_TCL */ +#ifdef MAC_OSX_TK + TkSetRegion, /* 118 */ +#endif /* MAC_OSX_TK */ #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ NULL, /* 119 */ #endif /* UNIX */ @@ -223,6 +253,9 @@ TkIntStubs tkIntStubs = { #ifdef MAC_TCL TkUnionRectWithRegion, /* 119 */ #endif /* MAC_TCL */ +#ifdef MAC_OSX_TK + TkUnionRectWithRegion, /* 119 */ +#endif /* MAC_OSX_TK */ NULL, /* 120 */ #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ NULL, /* 121 */ @@ -233,6 +266,9 @@ TkIntStubs tkIntStubs = { #ifdef MAC_TCL TkpCreateNativeBitmap, /* 121 */ #endif /* MAC_TCL */ +#ifdef MAC_OSX_TK + TkpCreateNativeBitmap, /* 121 */ +#endif /* MAC_OSX_TK */ #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ NULL, /* 122 */ #endif /* UNIX */ @@ -242,6 +278,9 @@ TkIntStubs tkIntStubs = { #ifdef MAC_TCL TkpDefineNativeBitmaps, /* 122 */ #endif /* MAC_TCL */ +#ifdef MAC_OSX_TK + TkpDefineNativeBitmaps, /* 122 */ +#endif /* MAC_OSX_TK */ NULL, /* 123 */ #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ NULL, /* 124 */ @@ -252,6 +291,9 @@ TkIntStubs tkIntStubs = { #ifdef MAC_TCL TkpGetNativeAppBitmap, /* 124 */ #endif /* MAC_TCL */ +#ifdef MAC_OSX_TK + TkpGetNativeAppBitmap, /* 124 */ +#endif /* MAC_OSX_TK */ NULL, /* 125 */ NULL, /* 126 */ NULL, /* 127 */ @@ -281,6 +323,9 @@ TkIntStubs tkIntStubs = { #ifdef MAC_TCL TkSubtractRegion, /* 145 */ #endif /* MAC_TCL */ +#ifdef MAC_OSX_TK + TkSubtractRegion, /* 145 */ +#endif /* MAC_OSX_TK */ TkStylePkgInit, /* 146 */ TkStylePkgFree, /* 147 */ }; @@ -288,21 +333,6 @@ TkIntStubs tkIntStubs = { TkIntPlatStubs tkIntPlatStubs = { TCL_STUB_MAGIC, NULL, -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - TkCreateXEventSource, /* 0 */ - TkFreeWindowId, /* 1 */ - TkInitXId, /* 2 */ - TkpCmapStressed, /* 3 */ - TkpSync, /* 4 */ - TkUnixContainerId, /* 5 */ - TkUnixDoOneXEvent, /* 6 */ - TkUnixSetMenubar, /* 7 */ - TkpScanWindowId, /* 8 */ - TkWmCleanup, /* 9 */ - TkSendCleanup, /* 10 */ - TkFreeXId, /* 11 */ - TkpWmSetState, /* 12 */ -#endif /* UNIX */ #ifdef __WIN32__ TkAlignImageData, /* 0 */ NULL, /* 1 */ @@ -408,6 +438,77 @@ TkIntPlatStubs tkIntPlatStubs = { TkMacPreprocessMenu, /* 65 */ TkpIsWindowFloating, /* 66 */ #endif /* MAC_TCL */ +#ifdef MAC_OSX_TK + TkGenerateActivateEvents, /* 0 */ + NULL, /* 1 */ + NULL, /* 2 */ + TkPointerDeadWindow, /* 3 */ + TkpSetCapture, /* 4 */ + TkpSetCursor, /* 5 */ + TkpWmSetState, /* 6 */ + TkAboutDlg, /* 7 */ + TkMacOSXButtonKeyState, /* 8 */ + TkMacOSXClearMenubarActive, /* 9 */ + TkMacOSXDispatchMenuEvent, /* 10 */ + TkMacOSXInstallCursor, /* 11 */ + TkMacOSXHandleTearoffMenu, /* 12 */ + NULL, /* 13 */ + TkMacOSXDoHLEvent, /* 14 */ + NULL, /* 15 */ + TkMacOSXGetXWindow, /* 16 */ + TkMacOSXGrowToplevel, /* 17 */ + TkMacOSXHandleMenuSelect, /* 18 */ + NULL, /* 19 */ + NULL, /* 20 */ + TkMacOSXInvalidateWindow, /* 21 */ + TkMacOSXIsCharacterMissing, /* 22 */ + TkMacOSXMakeRealWindowExist, /* 23 */ + TkMacOSXMakeStippleMap, /* 24 */ + TkMacOSXMenuClick, /* 25 */ + TkMacOSXRegisterOffScreenWindow, /* 26 */ + TkMacOSXResizable, /* 27 */ + TkMacOSXSetHelpMenuItemCount, /* 28 */ + TkMacOSXSetScrollbarGrow, /* 29 */ + TkMacOSXSetUpClippingRgn, /* 30 */ + TkMacOSXSetUpGraphicsPort, /* 31 */ + TkMacOSXUpdateClipRgn, /* 32 */ + TkMacOSXUnregisterMacWindow, /* 33 */ + TkMacOSXUseMenuID, /* 34 */ + TkMacOSXVisableClipRgn, /* 35 */ + TkMacOSXWinBounds, /* 36 */ + TkMacOSXWindowOffset, /* 37 */ + TkSetMacColor, /* 38 */ + TkSetWMName, /* 39 */ + TkSuspendClipboard, /* 40 */ + TkMacOSXZoomToplevel, /* 41 */ + Tk_TopCoordsToWindow, /* 42 */ + TkMacOSXContainerId, /* 43 */ + TkMacOSXGetHostToplevel, /* 44 */ + TkMacOSXPreprocessMenu, /* 45 */ + TkpIsWindowFloating, /* 46 */ + TkMacOSXGetCapture, /* 47 */ + NULL, /* 48 */ + TkGetTransientMaster, /* 49 */ + TkGenerateButtonEvent, /* 50 */ + TkGenWMDestroyEvent, /* 51 */ + NULL, /* 52 */ + TkpGetMS, /* 53 */ +#endif /* MAC_OSX_TK */ +#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) /* X11 */ + TkCreateXEventSource, /* 0 */ + TkFreeWindowId, /* 1 */ + TkInitXId, /* 2 */ + TkpCmapStressed, /* 3 */ + TkpSync, /* 4 */ + TkUnixContainerId, /* 5 */ + TkUnixDoOneXEvent, /* 6 */ + TkUnixSetMenubar, /* 7 */ + TkpScanWindowId, /* 8 */ + TkWmCleanup, /* 9 */ + TkSendCleanup, /* 10 */ + TkFreeXId, /* 11 */ + TkpWmSetState, /* 12 */ +#endif /* X11 */ }; TkIntXlibStubs tkIntXlibStubs = { @@ -614,6 +715,98 @@ TkIntXlibStubs tkIntXlibStubs = { XQueryColor, /* 88 */ XQueryColors, /* 89 */ #endif /* MAC_TCL */ +#ifdef MAC_OSX_TK + XSetDashes, /* 0 */ + XGetModifierMapping, /* 1 */ + XCreateImage, /* 2 */ + XGetImage, /* 3 */ + XGetAtomName, /* 4 */ + XKeysymToString, /* 5 */ + XCreateColormap, /* 6 */ + XGContextFromGC, /* 7 */ + XKeycodeToKeysym, /* 8 */ + XStringToKeysym, /* 9 */ + XRootWindow, /* 10 */ + XSetErrorHandler, /* 11 */ + XAllocColor, /* 12 */ + XBell, /* 13 */ + XChangeProperty, /* 14 */ + XChangeWindowAttributes, /* 15 */ + XConfigureWindow, /* 16 */ + XCopyArea, /* 17 */ + XCopyPlane, /* 18 */ + XCreateBitmapFromData, /* 19 */ + XDefineCursor, /* 20 */ + XDestroyWindow, /* 21 */ + XDrawArc, /* 22 */ + XDrawLines, /* 23 */ + XDrawRectangle, /* 24 */ + XFillArc, /* 25 */ + XFillPolygon, /* 26 */ + XFillRectangles, /* 27 */ + XFreeColormap, /* 28 */ + XFreeColors, /* 29 */ + XFreeModifiermap, /* 30 */ + XGetGeometry, /* 31 */ + XGetWindowProperty, /* 32 */ + XGrabKeyboard, /* 33 */ + XGrabPointer, /* 34 */ + XKeysymToKeycode, /* 35 */ + XMapWindow, /* 36 */ + XMoveResizeWindow, /* 37 */ + XMoveWindow, /* 38 */ + XQueryPointer, /* 39 */ + XRaiseWindow, /* 40 */ + XRefreshKeyboardMapping, /* 41 */ + XResizeWindow, /* 42 */ + XSelectInput, /* 43 */ + XSendEvent, /* 44 */ + XSetIconName, /* 45 */ + XSetInputFocus, /* 46 */ + XSetSelectionOwner, /* 47 */ + XSetWindowBackground, /* 48 */ + XSetWindowBackgroundPixmap, /* 49 */ + XSetWindowBorder, /* 50 */ + XSetWindowBorderPixmap, /* 51 */ + XSetWindowBorderWidth, /* 52 */ + XSetWindowColormap, /* 53 */ + XUngrabKeyboard, /* 54 */ + XUngrabPointer, /* 55 */ + XUnmapWindow, /* 56 */ + TkPutImage, /* 57 */ + XParseColor, /* 58 */ + XCreateGC, /* 59 */ + XFreeGC, /* 60 */ + XInternAtom, /* 61 */ + XSetBackground, /* 62 */ + XSetForeground, /* 63 */ + XSetClipMask, /* 64 */ + XSetClipOrigin, /* 65 */ + XSetTSOrigin, /* 66 */ + XChangeGC, /* 67 */ + XSetFont, /* 68 */ + XSetArcMode, /* 69 */ + XSetStipple, /* 70 */ + XSetFillRule, /* 71 */ + XSetFillStyle, /* 72 */ + XSetFunction, /* 73 */ + XSetLineAttributes, /* 74 */ + _XInitImageFuncPtrs, /* 75 */ + XCreateIC, /* 76 */ + XGetVisualInfo, /* 77 */ + XSetWMClientMachine, /* 78 */ + XStringListToTextProperty, /* 79 */ + XDrawSegments, /* 80 */ + XForceScreenSaver, /* 81 */ + XDrawLine, /* 82 */ + XFillRectangle, /* 83 */ + XClearWindow, /* 84 */ + XDrawPoint, /* 85 */ + XDrawPoints, /* 86 */ + XWarpPointer, /* 87 */ + XQueryColor, /* 88 */ + XQueryColors, /* 89 */ +#endif /* MAC_OSX_TK */ }; TkPlatStubs tkPlatStubs = { @@ -640,6 +833,19 @@ TkPlatStubs tkPlatStubs = { TkMacHaveAppearance, /* 9 */ TkMacGetDrawablePort, /* 10 */ #endif /* MAC_TCL */ +#ifdef MAC_OSX_TK + Tk_MacOSXSetEmbedHandler, /* 0 */ + Tk_MacOSXTurnOffMenus, /* 1 */ + Tk_MacOSXTkOwnsCursor, /* 2 */ + TkMacOSXInitMenus, /* 3 */ + TkMacOSXInitAppleEvents, /* 4 */ + TkGenWMConfigureEvent, /* 5 */ + TkMacOSXInvalClipRgns, /* 6 */ + TkMacOSXGetDrawablePort, /* 7 */ + TkMacOSXGetRootControl, /* 8 */ + Tk_MacOSXSetupTkNotifier, /* 9 */ + Tk_MacOSXIsAppInFront, /* 10 */ +#endif /* MAC_OSX_TK */ }; static TkStubHooks tkStubHooks = { @@ -920,3 +1126,7 @@ TkStubs tkStubs = { }; /* !END!: Do not edit above this line. */ + +#undef UNIX_TK +#undef MAC_TK +#undef MAC_OSX_TK |