summaryrefslogtreecommitdiffstats
path: root/mac/tkMacWm.c
diff options
context:
space:
mode:
authorwelch <welch>1998-07-06 22:59:42 (GMT)
committerwelch <welch>1998-07-06 22:59:42 (GMT)
commitb4296ca11c7d47f45dd0f31d0092bb5fef77e34e (patch)
treea46fab6a4367b8c3cb936973bb23689b55dc2597 /mac/tkMacWm.c
parent953b18d6d812dde54410640a66952a10df1e6ef9 (diff)
downloadtk-b4296ca11c7d47f45dd0f31d0092bb5fef77e34e.zip
tk-b4296ca11c7d47f45dd0f31d0092bb5fef77e34e.tar.gz
tk-b4296ca11c7d47f45dd0f31d0092bb5fef77e34e.tar.bz2
Mac updates for 8.0.3-2
Diffstat (limited to 'mac/tkMacWm.c')
-rw-r--r--mac/tkMacWm.c39
1 files changed, 15 insertions, 24 deletions
diff --git a/mac/tkMacWm.c b/mac/tkMacWm.c
index a8959f3..e323d12 100644
--- a/mac/tkMacWm.c
+++ b/mac/tkMacWm.c
@@ -27,14 +27,12 @@
#include "tkScrollbar.h"
/*
- * If HAVE_APPEARANCE is defined in MW_TkHeader.pch then we must have the
- * Appearance manager header & library. If so we can use these new API's to
- * have the iconify code do the right thing.
+ * We now require the Appearance headers. They come with CodeWarrior Pro,
+ * and are on the SDK CD. However, we do not require the Appearance
+ * extension
*/
-
-#ifdef HAVE_APPEARANCE
-# include <Appearance.h>
-#endif
+
+#include <Appearance.h>
/*
* A data structure of the following type holds information for
@@ -308,13 +306,12 @@ static Tk_GeomMgr wmMgrType = {
static Tcl_HashTable windowTable;
static int windowHashInit = false;
-void MacMoveWindow(WindowRef window, int x, int y);
+void tkMacMoveWindow(WindowRef window, int x, int y);
/*
* Forward declarations for procedures defined in this file:
*/
-static int HaveAppearance _ANSI_ARGS_((void));
static void InitialWindowBounds _ANSI_ARGS_((TkWindow *winPtr,
Rect *geometry));
static int ParseGeometry _ANSI_ARGS_((Tcl_Interp *interp,
@@ -3911,7 +3908,7 @@ TkMacMakeRealWindowExist(
tkMacWindowListPtr = listPtr;
macWin->portPtr = (GWorldPtr) newWindow;
- MacMoveWindow(newWindow, (int) geometry.left, (int) geometry.top);
+ tkMacMoveWindow(newWindow, (int) geometry.left, (int) geometry.top);
SetPort((GrafPtr) newWindow);
if (!windowHashInit) {
@@ -4170,8 +4167,7 @@ TkpWmSetState(winPtr, state)
Tk_UnmapWindow((Tk_Window) winPtr);
} else if (state == IconicState) {
Tk_UnmapWindow((Tk_Window) winPtr);
-#ifdef HAVE_APPEARANCE
- if (HaveAppearance()) {
+ if (TkMacHaveAppearance()) {
/*
* The window always gets unmapped. However, if we can show the
* icon version of the window (collapsed) we make the window visable
@@ -4185,14 +4181,11 @@ TkpWmSetState(winPtr, state)
CollapseWindow((WindowPtr) macWin, true);
}
}
-#endif
} else if (state == NormalState) {
Tk_MapWindow((Tk_Window) winPtr);
-#ifdef HAVE_APPEARANCE
- if (HaveAppearance()) {
+ if (TkMacHaveAppearance()) {
CollapseWindow((WindowPtr) macWin, false);
}
-#endif
} else if (state == ZoomState) {
/* TODO: need to support zoomed windows */
}
@@ -4200,7 +4193,7 @@ TkpWmSetState(winPtr, state)
/*
*----------------------------------------------------------------------
*
- * HaveAppearance --
+ * TkMacHaveAppearance --
*
* Determine if the appearance manager is available on this Mac.
* We cache the result so future calls are fast.
@@ -4214,22 +4207,20 @@ TkpWmSetState(winPtr, state)
*----------------------------------------------------------------------
*/
-static int
-HaveAppearance()
+int
+TkMacHaveAppearance()
{
static initialized = false;
- static int haveAppearance = false;
+ static int TkMacHaveAppearance = false;
long response = 0;
OSErr err = noErr;
-#ifdef HAVE_APPEARANCE
if (!initialized) {
err = Gestalt(gestaltAppearanceAttr, &response);
if (err == noErr) {
- haveAppearance = true;
+ TkMacHaveAppearance = true;
}
}
-#endif
- return haveAppearance;
+ return TkMacHaveAppearance;
}