summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXEmbed.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXEmbed.c')
-rw-r--r--macosx/tkMacOSXEmbed.c93
1 files changed, 79 insertions, 14 deletions
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index 0830d4a..fd1bae6 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -8,16 +8,17 @@
* Tk application is allowed on the Macintosh.
*
* Copyright (c) 1996-1997 Sun Microsystems, Inc.
- * Copyright 2001, Apple Computer, Inc.
- * Copyright (c) 2006-2008 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright 2001-2009, Apple Inc.
+ * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
*
- * See the file "license.terms" for information on usage and redistribution of
- * this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXEmbed.c,v 1.16.2.2 2008/06/19 00:14:21 das Exp $
+ * RCS: @(#) $Id: tkMacOSXEmbed.c,v 1.20 2009/06/29 14:35:01 das Exp $
*/
-#include "tkMacOSXInt.h"
+#include "tkMacOSXPrivate.h"
+#include "tkBusy.h"
/*
* One of the following structures exists for each container in this
@@ -145,10 +146,10 @@ TkpMakeWindow(
winPtr->privatePtr = macWin;
macWin->visRgn = NULL;
macWin->aboveVisRgn = NULL;
- macWin->drawRect = CGRectNull;
+ macWin->drawRgn = NULL;
macWin->referenceCount = 0;
macWin->flags = TK_CLIP_INVALID;
- macWin->grafPtr = NULL;
+ macWin->view = nil;
macWin->context = NULL;
macWin->size = CGSizeZero;
if (Tk_IsTopLevel(macWin->winPtr)) {
@@ -201,7 +202,7 @@ TkpUseWindow(
* string is bogus. */
Tk_Window tkwin, /* Tk window that does not yet have an
* associated X window. */
- CONST char *string) /* String identifying an X window to use for
+ const char *string) /* String identifying an X window to use for
* tkwin; must be an integer value. */
{
TkWindow *winPtr = (TkWindow *) tkwin;
@@ -279,12 +280,12 @@ TkpUseWindow(
* correctly find the container's port.
*/
- macWin->grafPtr = NULL;
+ macWin->view = nil;
macWin->context = NULL;
macWin->size = CGSizeZero;
macWin->visRgn = NULL;
macWin->aboveVisRgn = NULL;
- macWin->drawRect = CGRectNull;
+ macWin->drawRgn = NULL;
macWin->referenceCount = 0;
macWin->flags = TK_CLIP_INVALID;
macWin->toplevel = macWin;
@@ -312,7 +313,7 @@ TkpUseWindow(
*/
if (tkMacOSXEmbedHandler == NULL ||
- tkMacOSXEmbedHandler->registerWinProc((int) parent,
+ tkMacOSXEmbedHandler->registerWinProc((long) parent,
(Tk_Window) winPtr) != TCL_OK) {
Tcl_AppendResult(interp, "The window ID ", string,
" does not correspond to a valid Tk Window.", NULL);
@@ -563,7 +564,7 @@ TkpTestembedCmd(
ClientData clientData, /* Main window for application. */
Tcl_Interp *interp, /* Current interpreter. */
int argc, /* Number of arguments. */
- CONST char **argv) /* Argument strings. */
+ const char **argv) /* Argument strings. */
{
int all;
Container *containerPtr;
@@ -642,6 +643,7 @@ TkpRedirectKeyEvent(
XEvent *eventPtr) /* X event to redirect (should be KeyPress or
* KeyRelease). */
{
+ /* TODO: Implement this or decide it definitely needs no implementation */
}
/*
@@ -1087,7 +1089,7 @@ EmbedWindowDeleted(
XEvent event;
event.xany.serial =
- Tk_Display(containerPtr->parentPtr)->request;
+ LastKnownRequestProcessed(Tk_Display(containerPtr->parentPtr));
event.xany.send_event = False;
event.xany.display = Tk_Display(containerPtr->parentPtr);
@@ -1118,3 +1120,66 @@ EmbedWindowDeleted(
ckfree((char *) containerPtr);
}
}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TkpShowBusyWindow, TkpHideBusyWindow, TkpMakeTransparentWindowExist,
+ * TkpCreateBusy --
+ *
+ * Portability layer for busy windows. Holds platform-specific gunk for
+ * the [tk busy] command, which is currently a dummy implementation for
+ * OSX/Aqua. The individual functions are supposed to do the following:
+ *
+ * TkpShowBusyWindow --
+ * Make the busy window appear.
+ *
+ * TkpHideBusyWindow --
+ * Make the busy window go away.
+ *
+ * TkpMakeTransparentWindowExist --
+ * Actually make a transparent window.
+ *
+ * TkpCreateBusy --
+ * Creates the platform-specific part of a busy window structure.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TkpShowBusyWindow(
+ TkBusy busy)
+{
+}
+
+void
+TkpHideBusyWindow(
+ TkBusy busy)
+{
+}
+
+void
+TkpMakeTransparentWindowExist(
+ Tk_Window tkwin, /* Token for window. */
+ Window parent) /* Parent window. */
+{
+}
+
+void
+TkpCreateBusy(
+ Tk_FakeWin *winPtr,
+ Tk_Window tkRef,
+ Window* parentPtr,
+ Tk_Window tkParent,
+ TkBusy busy)
+{
+}
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 4
+ * fill-column: 79
+ * coding: utf-8
+ * End:
+ */