summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-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
9 files changed, 70 insertions, 53 deletions
diff --git a/ChangeLog b/ChangeLog
index a7d96df..344def6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-11-01 Daniel Steffen <das@users.sourceforge.net>
+
+ * 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:
+
2006-10-31 Pat Thoyts <patthoyts@users.sourceforge.net>
* rules.vc: Fix bug #1582769 build with VC2003 and correct i386 arch.
diff --git a/macosx/tkMacOSXCarbonEvents.c b/macosx/tkMacOSXCarbonEvents.c
index 76bfa8d..7808b01 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.3.2.14 2006/08/21 01:09:32 das Exp $
+ * RCS: @(#) $Id: tkMacOSXCarbonEvents.c,v 1.3.2.15 2006/10/31 22:33:38 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 a8d9231..02c51a9 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.2.2.8 2006/07/20 06:26:45 das Exp $
+ * RCS: @(#) $Id: tkMacOSXDebug.c,v 1.2.2.9 2006/10/31 22:33:38 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 d3d0d67..008a70d 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.2.2.6 2006/04/28 06:02:59 das Exp $
+ * RCS: @(#) $Id: tkMacOSXDebug.h,v 1.2.2.7 2006/10/31 22:33:38 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 802a15c..b98ec45 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.2.2.3 2006/04/22 04:12:25 das Exp $
+ * RCS: @(#) $Id: tkMacOSXEmbed.c,v 1.2.2.4 2006/10/31 22:33:38 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 6b6e4ff..2427155 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.3.2.8 2006/05/12 18:17:55 das Exp $
+ * RCS: @(#) $Id: tkMacOSXEvent.c,v 1.3.2.9 2006/10/31 22:33:38 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 337efbe..96df487 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.3.2.14 2006/09/11 14:41:16 das Exp $
+ * RCS: @(#) $Id: tkMacOSXInt.h,v 1.3.2.15 2006/10/31 22:33:38 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 a38907d..d536a1b 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.2.2.12 2006/07/24 04:45:26 das Exp $
+ * RCS: @(#) $Id: tkMacOSXSubwindows.c,v 1.2.2.13 2006/10/31 22:33:38 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 16f9da9..d8815bc 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.7.2.34 2006/09/11 16:12:58 das Exp $
+ * RCS: @(#) $Id: tkMacOSXWm.c,v 1.7.2.35 2006/10/31 22:33:38 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -3644,7 +3644,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
@@ -3657,7 +3657,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;
@@ -5124,9 +5124,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");
}
}