summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordas <das>2006-10-31 22:33:33 (GMT)
committerdas <das>2006-10-31 22:33:33 (GMT)
commitbd738e27a3e574c532139870400319684120100c (patch)
tree91f1ad67cdcc39fef1befc69415787833a73b6e6 /macosx
parent2f0a9d443ac48768f31536ed71c9e51d8636a68e (diff)
downloadtk-bd738e27a3e574c532139870400319684120100c.zip
tk-bd738e27a3e574c532139870400319684120100c.tar.gz
tk-bd738e27a3e574c532139870400319684120100c.tar.bz2
* macosx/tkMacOSXDebug.c: add TkMacOSX prefix to leftover macosx-private
* macosx/tkMacOSXDebug.h: global symbols without Tk prefix; ifdef out * macosx/tkMacOSXEmbed.c: currently unused debug procs. * macosx/tkMacOSXEvent.c: * macosx/tkMacOSXInt.h: * macosx/tkMacOSXCarbonEvents.c: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWm.c:
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXCarbonEvents.c4
-rw-r--r--macosx/tkMacOSXDebug.c26
-rw-r--r--macosx/tkMacOSXDebug.h24
-rw-r--r--macosx/tkMacOSXEmbed.c22
-rw-r--r--macosx/tkMacOSXEvent.c6
-rw-r--r--macosx/tkMacOSXInt.h6
-rw-r--r--macosx/tkMacOSXSubwindows.c12
-rw-r--r--macosx/tkMacOSXWm.c12
8 files changed, 59 insertions, 53 deletions
diff --git a/macosx/tkMacOSXCarbonEvents.c b/macosx/tkMacOSXCarbonEvents.c
index e1d963c..d9eba35 100644
--- a/macosx/tkMacOSXCarbonEvents.c
+++ b/macosx/tkMacOSXCarbonEvents.c
@@ -60,7 +60,7 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXCarbonEvents.c,v 1.12 2006/08/21 01:09:23 das Exp $
+ * RCS: @(#) $Id: tkMacOSXCarbonEvents.c,v 1.13 2006/10/31 22:33:34 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -122,7 +122,7 @@ CarbonEventHandlerProc (
char buf [256];
if (macEvent.eKind != kEventMouseMoved &&
macEvent.eKind != kEventMouseDragged) {
- CarbonEventToAscii(event, buf);
+ TkMacOSXCarbonEventToAscii(event, buf);
fprintf(stderr, "CarbonEventHandlerProc started handling %s\n", buf);
TkMacOSXInitNamedDebugSymbol(HIToolbox, void, _DebugPrintEvent,
EventRef inEvent);
diff --git a/macosx/tkMacOSXDebug.c b/macosx/tkMacOSXDebug.c
index 1d11c9a..4836a90 100644
--- a/macosx/tkMacOSXDebug.c
+++ b/macosx/tkMacOSXDebug.c
@@ -54,7 +54,7 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXDebug.c,v 1.9 2006/07/20 06:24:16 das Exp $
+ * RCS: @(#) $Id: tkMacOSXDebug.c,v 1.10 2006/10/31 22:33:34 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -219,7 +219,6 @@ static MyEventName controlEventNames [] = {
{ 0, NULL }
};
-
static MyEventName commandEventNames [] = {
{ kEventCommandProcess, "Process" },
{ kEventCommandUpdateStatus, "UpdateStatus" },
@@ -237,7 +236,7 @@ static MyEventNameList eventNameList [] = {
{ 0, NULL}
};
-
+#ifdef TK_MACOSXDEBUG_UNUSED
static MyEventName classicEventNames [] = {
{ nullEvent,"nullEvent" },
{ mouseDown,"mouseDown" },
@@ -252,9 +251,10 @@ static MyEventName classicEventNames [] = {
{ kHighLevelEvent,"kHighLevelEvent" },
{ 0, NULL }
};
+#endif /* TK_MACOSXDEBUG_UNUSED */
MODULE_SCOPE char *
-CarbonEventToAscii(EventRef eventRef, char * buf)
+TkMacOSXCarbonEventToAscii(EventRef eventRef, char * buf)
{
EventClass eventClass;
EventKind eventKind;
@@ -297,8 +297,9 @@ CarbonEventToAscii(EventRef eventRef, char * buf)
return iBuf;
}
+#ifdef TK_MACOSXDEBUG_UNUSED
MODULE_SCOPE char *
-CarbonEventKindToAscii(EventRef eventRef, char * buf )
+TkMacOSXCarbonEventKindToAscii(EventRef eventRef, char * buf )
{
EventClass eventClass;
EventKind eventKind;
@@ -334,7 +335,7 @@ CarbonEventKindToAscii(EventRef eventRef, char * buf )
}
MODULE_SCOPE char *
-ClassicEventToAscii(EventRecord * eventPtr, char * buf )
+TkMacOSXClassicEventToAscii(EventRecord * eventPtr, char * buf )
{
MyEventName * names = NULL;
int found = 0;
@@ -364,14 +365,14 @@ ClassicEventToAscii(EventRecord * eventPtr, char * buf )
}
MODULE_SCOPE void
-printPoint(char * tag, Point * p )
+TkMacOSXPrintPoint(char * tag, Point * p )
{
fprintf(stderr,"%s %4d %4d\n",
tag,p->h,p->v );
}
MODULE_SCOPE void
-printRect(char * tag, Rect * r )
+TkMacOSXPrintRect(char * tag, Rect * r )
{
fprintf(stderr,"%s %4d %4d %4d %4d (%dx%d)\n",
tag, r->left, r->top, r->right, r->bottom,
@@ -379,15 +380,15 @@ printRect(char * tag, Rect * r )
}
MODULE_SCOPE void
-printRegion(char * tag, RgnHandle rgn )
+TkMacOSXPrintRegion(char * tag, RgnHandle rgn )
{
Rect r;
GetRegionBounds(rgn,&r);
- printRect(tag,&r);
+ TkMacOSXPrintRect(tag,&r);
}
MODULE_SCOPE void
-printWindowTitle(char * tag, WindowRef window )
+TkMacOSXPrintWindowTitle(char * tag, WindowRef window )
{
Str255 title;
GetWTitle(window,title);
@@ -443,7 +444,7 @@ static MsgName trackingNames [] = {
};
MODULE_SCOPE char *
-MouseTrackingResultToAscii(MouseTrackingResult r, char * buf)
+TkMacOSXMouseTrackingResultToAscii(MouseTrackingResult r, char * buf)
{
MsgName * namePtr;
for (namePtr = trackingNames; namePtr->name; namePtr++) {
@@ -455,6 +456,7 @@ MouseTrackingResultToAscii(MouseTrackingResult r, char * buf)
sprintf(buf, "Unknown mouse tracking result : %d", r);
return buf;
}
+#endif /* TK_MACOSXDEBUG_UNUSED */
/*
*----------------------------------------------------------------------
diff --git a/macosx/tkMacOSXDebug.h b/macosx/tkMacOSXDebug.h
index f550923..9531ac8 100644
--- a/macosx/tkMacOSXDebug.h
+++ b/macosx/tkMacOSXDebug.h
@@ -50,7 +50,7 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXDebug.h,v 1.8 2006/04/28 06:02:48 das Exp $
+ * RCS: @(#) $Id: tkMacOSXDebug.h,v 1.9 2006/10/31 22:33:34 das Exp $
*/
#ifndef _TKMACDEBUG
@@ -65,17 +65,21 @@
#ifdef TK_MAC_DEBUG
-MODULE_SCOPE char * CarbonEventToAscii(EventRef eventRef, char * buf );
-MODULE_SCOPE char * ClassicEventToAscii(EventRecord * eventPtr, char * buf );
+MODULE_SCOPE char* TkMacOSXCarbonEventToAscii(EventRef eventRef, char * buf );
-MODULE_SCOPE void printRect(char * tag, Rect * r );
-MODULE_SCOPE void printPoint(char * tag, Point * p );
+#ifdef TK_MACOSXDEBUG_UNUSED
+MODULE_SCOPE char* TkMacOSXCarbonEventKindToAscii(EventRef eventRef, char * buf );
+MODULE_SCOPE char* TkMacOSXClassicEventToAscii(EventRecord * eventPtr, char * buf );
-MODULE_SCOPE void printRegion(char * tag, RgnHandle rgn );
-MODULE_SCOPE void printWindowTitle(char * tag, WindowRef window );
-MODULE_SCOPE char * TkMacOSXMenuMessageToAscii(int msg, char * s);
+MODULE_SCOPE void TkMacOSXPrintRect(char * tag, Rect * r );
+MODULE_SCOPE void TkMacOSXPrintPoint(char * tag, Point * p );
-MODULE_SCOPE char * MouseTrackingResultToAscii(MouseTrackingResult r, char * buf );
+MODULE_SCOPE void TkMacOSXPrintRegion(char * tag, RgnHandle rgn );
+MODULE_SCOPE void TkMacOSXPrintWindowTitle(char * tag, WindowRef window );
+MODULE_SCOPE char* TkMacOSXMenuMessageToAscii(int msg, char * s);
+
+MODULE_SCOPE char* TkMacOSXMouseTrackingResultToAscii(MouseTrackingResult r, char * buf );
+#endif
MODULE_SCOPE void* TkMacOSXGetNamedDebugSymbol(const char* module, const char* symbol);
@@ -86,6 +90,6 @@ MODULE_SCOPE void* TkMacOSXGetNamedDebugSymbol(const char* module, const char* s
symbol = TkMacOSXGetNamedDebugSymbol(STRINGIFY(module), STRINGIFY(_##symbol));\
}
-#endif
+#endif /* TK_MAC_DEBUG */
#endif
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index be37408..c82a649 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -14,7 +14,7 @@
* 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.7 2006/04/22 04:12:02 das Exp $
+ * RCS: @(#) $Id: tkMacOSXEmbed.c,v 1.8 2006/10/31 22:33:34 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -50,7 +50,7 @@ static Container *firstContainerPtr = NULL;
* Globals defined in this file
*/
-TkMacOSXEmbedHandler *gMacEmbedHandler = NULL;
+TkMacOSXEmbedHandler *tkMacOSXEmbedHandler = NULL;
/*
* Prototypes for static procedures defined in this file:
@@ -98,14 +98,14 @@ Tk_MacOSXSetEmbedHandler(
Tk_MacOSXEmbedGetClipProc *getClipProc,
Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc)
{
- if (gMacEmbedHandler == NULL) {
- gMacEmbedHandler = (TkMacOSXEmbedHandler *) ckalloc(sizeof(TkMacOSXEmbedHandler));
+ if (tkMacOSXEmbedHandler == NULL) {
+ tkMacOSXEmbedHandler = (TkMacOSXEmbedHandler *) ckalloc(sizeof(TkMacOSXEmbedHandler));
}
- gMacEmbedHandler->registerWinProc = registerWinProc;
- gMacEmbedHandler->getPortProc = getPortProc;
- gMacEmbedHandler->containerExistProc = containerExistProc;
- gMacEmbedHandler->getClipProc = getClipProc;
- gMacEmbedHandler->getOffsetProc = getOffsetProc;
+ tkMacOSXEmbedHandler->registerWinProc = registerWinProc;
+ tkMacOSXEmbedHandler->getPortProc = getPortProc;
+ tkMacOSXEmbedHandler->containerExistProc = containerExistProc;
+ tkMacOSXEmbedHandler->getClipProc = getClipProc;
+ tkMacOSXEmbedHandler->getOffsetProc = getOffsetProc;
}
@@ -336,8 +336,8 @@ TkpUseWindow(
* see if it can handle this window...
*/
- if (gMacEmbedHandler == NULL ||
- gMacEmbedHandler->registerWinProc((int) parent,
+ if (tkMacOSXEmbedHandler == NULL ||
+ tkMacOSXEmbedHandler->registerWinProc((int) parent,
(Tk_Window) winPtr) != TCL_OK) {
Tcl_AppendResult(interp, "The window ID ", string,
" does not correspond to a valid Tk Window.",
diff --git a/macosx/tkMacOSXEvent.c b/macosx/tkMacOSXEvent.c
index 40abc96..82a4ad0 100644
--- a/macosx/tkMacOSXEvent.c
+++ b/macosx/tkMacOSXEvent.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: tkMacOSXEvent.c,v 1.11 2006/05/12 18:17:48 das Exp $
+ * RCS: @(#) $Id: tkMacOSXEvent.c,v 1.12 2006/10/31 22:33:34 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -99,7 +99,7 @@ TkMacOSXProcessEvent(TkMacOSXEvent * eventPtr, MacEventStatus * statusPtr)
char buf [256];
fprintf(stderr,
"Unrecognised event : %s\n",
- CarbonEventToAscii(eventPtr->eventRef, buf));
+ TkMacOSXCarbonEventToAscii(eventPtr->eventRef, buf));
}
#endif
break;
@@ -282,7 +282,7 @@ TkMacOSXReceiveAndProcessEvent()
char buf [256];
fprintf(stderr,
"RCNE SendEventToEventTarget (%s) failed, %d\n",
- CarbonEventToAscii(eventRef, buf), (int)err);
+ TkMacOSXCarbonEventToAscii(eventRef, buf), (int)err);
}
#endif
ReleaseEvent(eventRef);
diff --git a/macosx/tkMacOSXInt.h b/macosx/tkMacOSXInt.h
index 262b842..f3bb504 100644
--- a/macosx/tkMacOSXInt.h
+++ b/macosx/tkMacOSXInt.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: tkMacOSXInt.h,v 1.19 2006/09/11 14:41:04 das Exp $
+ * RCS: @(#) $Id: tkMacOSXInt.h,v 1.20 2006/10/31 22:33:34 das Exp $
*/
#ifndef _TKMACINT
@@ -81,7 +81,7 @@ typedef struct TkMacOSXWindowList {
* embedding where Tk does not control the top-level. It contains
* various functions that are needed by Mac specific routines, like
* TkMacOSXGetDrawablePort. The definitions of the function types
- * are in tclMac.h.
+ * are in tkMacOSX.h.
*/
typedef struct {
@@ -92,7 +92,7 @@ typedef struct {
Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc;
} TkMacOSXEmbedHandler;
-MODULE_SCOPE TkMacOSXEmbedHandler *gMacEmbedHandler;
+MODULE_SCOPE TkMacOSXEmbedHandler *tkMacOSXEmbedHandler;
/*
* Defines used for TkMacOSXInvalidateWindow
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index e465ff9..a471e6f 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.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: tkMacOSXSubwindows.c,v 1.15 2006/07/24 04:45:23 das Exp $
+ * RCS: @(#) $Id: tkMacOSXSubwindows.c,v 1.16 2006/10/31 22:33:34 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -895,8 +895,8 @@ TkMacOSXUpdateClipRgn(
TkMacOSXUpdateClipRgn(contWinPtr);
SectRgn(rgn,
contWinPtr->privatePtr->aboveClipRgn, rgn);
- } else if (gMacEmbedHandler != NULL) {
- gMacEmbedHandler->getClipProc((Tk_Window) winPtr, tmpRgn);
+ } else if (tkMacOSXEmbedHandler != NULL) {
+ tkMacOSXEmbedHandler->getClipProc((Tk_Window) winPtr, tmpRgn);
SectRgn(rgn, tmpRgn, rgn);
}
@@ -1126,8 +1126,8 @@ TkMacOSXGetDrawablePort(
if (contWinPtr != NULL) {
resultPort = TkMacOSXGetDrawablePort(
(Drawable) contWinPtr->privatePtr);
- } else if (gMacEmbedHandler != NULL) {
- resultPort = gMacEmbedHandler->getPortProc(
+ } else if (tkMacOSXEmbedHandler != NULL) {
+ resultPort = tkMacOSXEmbedHandler->getPortProc(
(Tk_Window) macWin->winPtr);
}
@@ -1191,7 +1191,7 @@ TkMacOSXGetRootControl(
if (contWinPtr != NULL) {
result = TkMacOSXGetRootControl(
(Drawable) contWinPtr->privatePtr);
- } else if (gMacEmbedHandler != NULL) {
+ } else if (tkMacOSXEmbedHandler != NULL) {
result = NULL;
}
}
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index d5d7166..913a662 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.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: tkMacOSXWm.c,v 1.43 2006/09/11 16:12:39 das Exp $
+ * RCS: @(#) $Id: tkMacOSXWm.c,v 1.44 2006/10/31 22:33:34 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -3736,7 +3736,7 @@ Tk_GetRootCoords(
} else {
Point theOffset;
- if (gMacEmbedHandler->getOffsetProc != NULL) {
+ if (tkMacOSXEmbedHandler->getOffsetProc != NULL) {
/*
* We do not require that the changes.x & changes.y for
* a non-Tk master window be kept up to date. So we
@@ -3749,7 +3749,7 @@ Tk_GetRootCoords(
x -= winPtr->changes.x + winPtr->changes.border_width;
y -= winPtr->changes.y + winPtr->changes.border_width;
- gMacEmbedHandler->getOffsetProc((Tk_Window) winPtr, &theOffset);
+ tkMacOSXEmbedHandler->getOffsetProc((Tk_Window) winPtr, &theOffset);
x += theOffset.h;
y += theOffset.v;
@@ -5216,9 +5216,9 @@ TkMacOSXMakeRealWindowExist(
TkMacOSXMakeRealWindowExist(contWinPtr->privatePtr->toplevel->winPtr);
macWin->flags |= TK_HOST_EXISTS;
return;
- } else if (gMacEmbedHandler != NULL) {
- if (gMacEmbedHandler->containerExistProc != NULL) {
- if (gMacEmbedHandler->containerExistProc((Tk_Window) winPtr) != TCL_OK) {
+ } else if (tkMacOSXEmbedHandler != NULL) {
+ if (tkMacOSXEmbedHandler->containerExistProc != NULL) {
+ if (tkMacOSXEmbedHandler->containerExistProc((Tk_Window) winPtr) != TCL_OK) {
Tcl_Panic("ContainerExistProc could not make container");
}
}