summaryrefslogtreecommitdiffstats
path: root/carbon
diff options
context:
space:
mode:
authordas <das>2009-06-29 14:35:01 (GMT)
committerdas <das>2009-06-29 14:35:01 (GMT)
commit8f9b8fd63b4da5f6f27b46c438c89f2baa15f0e8 (patch)
tree81b5743d2ff5d45f2ee4992153e4f34949ea8f8a /carbon
parente4a87c21cb59539eeddcc65d359e9b06d597fed3 (diff)
downloadtk-8f9b8fd63b4da5f6f27b46c438c89f2baa15f0e8.zip
tk-8f9b8fd63b4da5f6f27b46c438c89f2baa15f0e8.tar.gz
tk-8f9b8fd63b4da5f6f27b46c438c89f2baa15f0e8.tar.bz2
Merge of TkAqua Cocoa portmacosx_cocoa_merge
Diffstat (limited to 'carbon')
-rw-r--r--carbon/tkMacOSXButton.c4
-rw-r--r--carbon/tkMacOSXColor.c4
-rw-r--r--carbon/tkMacOSXDraw.c6
-rw-r--r--carbon/tkMacOSXHLEvents.c4
-rw-r--r--carbon/tkMacOSXInt.h10
-rw-r--r--carbon/tkMacOSXMouseEvent.c8
-rw-r--r--carbon/tkMacOSXSubwindows.c19
-rw-r--r--carbon/tkMacOSXWm.c19
8 files changed, 40 insertions, 34 deletions
diff --git a/carbon/tkMacOSXButton.c b/carbon/tkMacOSXButton.c
index a9127f7..bae2a88 100644
--- a/carbon/tkMacOSXButton.c
+++ b/carbon/tkMacOSXButton.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXButton.c,v 1.1 2009/06/26 01:42:46 das Exp $
+ * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2 2009/06/29 14:35:01 das Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -191,7 +191,7 @@ TkpDisplayButton(
Boolean portChanged;
Pixmap pixmap;
int width, height, fullWidth, fullHeight, textXOffset, textYOffset;
- int borderWidth, wasUsingControl;
+ int borderWidth = 0, wasUsingControl;
int haveImage = 0, haveText = 0, imageWidth = 0, imageHeight = 0;
int imageXOffset = 0, imageYOffset = 0; /* image information that will
* be used to restrict disabled
diff --git a/carbon/tkMacOSXColor.c b/carbon/tkMacOSXColor.c
index f894a4f..3ac8207 100644
--- a/carbon/tkMacOSXColor.c
+++ b/carbon/tkMacOSXColor.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: tkMacOSXColor.c,v 1.1 2009/06/26 01:42:46 das Exp $
+ * RCS: @(#) $Id: tkMacOSXColor.c,v 1.2 2009/06/29 14:35:01 das Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -283,7 +283,7 @@ GetThemeColor(
int
TkSetMacColor(
unsigned long pixel, /* Pixel value to convert. */
- RGBColor *macColor) /* Mac color struct to modify. */
+ void *macColor) /* Mac color struct to modify. */
{
OSStatus err = -1;
ThemeBrush brush;
diff --git a/carbon/tkMacOSXDraw.c b/carbon/tkMacOSXDraw.c
index 1f90d2d..da4603c 100644
--- a/carbon/tkMacOSXDraw.c
+++ b/carbon/tkMacOSXDraw.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.1 2009/06/26 01:42:46 das Exp $
+ * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.2 2009/06/29 14:35:01 das Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -1500,7 +1500,7 @@ TkScrollWindow(
void
TkMacOSXSetUpGraphicsPort(
GC gc, /* GC to apply to current port. */
- GWorldPtr destPort)
+ void *destPort)
{
CGrafPtr savePort;
Boolean portChanged;
@@ -1992,7 +1992,7 @@ NoQDClip(
*----------------------------------------------------------------------
*/
-BitMapPtr
+void *
TkMacOSXMakeStippleMap(
Drawable drawable, /* Window to apply stipple. */
Drawable stipple) /* The stipple pattern. */
diff --git a/carbon/tkMacOSXHLEvents.c b/carbon/tkMacOSXHLEvents.c
index 9aa5668..2a79b8d 100644
--- a/carbon/tkMacOSXHLEvents.c
+++ b/carbon/tkMacOSXHLEvents.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXHLEvents.c,v 1.1 2009/06/26 01:42:47 das Exp $
+ * RCS: @(#) $Id: tkMacOSXHLEvents.c,v 1.2 2009/06/29 14:35:01 das Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -133,7 +133,7 @@ TkMacOSXInitAppleEvents(
int
TkMacOSXDoHLEvent(
- EventRecord *theEvent)
+ void *theEvent)
{
return AEProcessAppleEvent(theEvent);
}
diff --git a/carbon/tkMacOSXInt.h b/carbon/tkMacOSXInt.h
index c349798..ce24386 100644
--- a/carbon/tkMacOSXInt.h
+++ b/carbon/tkMacOSXInt.h
@@ -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: tkMacOSXInt.h,v 1.1 2009/06/26 01:42:47 das Exp $
+ * RCS: @(#) $Id: tkMacOSXInt.h,v 1.2 2009/06/29 14:35:01 das Exp $
*/
#ifndef _TKMACINT
@@ -103,6 +103,14 @@ typedef struct {
MODULE_SCOPE TkMacOSXEmbedHandler *tkMacOSXEmbedHandler;
/*
+ * Defines for zero-sized GC cache
+ */
+
+typedef struct {} TkpGCCache;
+#define TkpInitGCCache(gc)
+#define TkpFreeGCCache(gc)
+
+/*
* Defines used for TkMacOSXInvalidateWindow
*/
diff --git a/carbon/tkMacOSXMouseEvent.c b/carbon/tkMacOSXMouseEvent.c
index 4ef0c82..b9e54f5 100644
--- a/carbon/tkMacOSXMouseEvent.c
+++ b/carbon/tkMacOSXMouseEvent.c
@@ -48,7 +48,7 @@
* permission to use and distribute the software in accordance with the
* terms specified in this license.
*
- * RCS: @(#) $Id: tkMacOSXMouseEvent.c,v 1.1 2009/06/26 01:42:47 das Exp $
+ * RCS: @(#) $Id: tkMacOSXMouseEvent.c,v 1.2 2009/06/29 14:35:01 das Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -342,7 +342,7 @@ TkMacOSXProcessMouseEvent(
}
break;
}
- case inGrow:
+ case inGrow: {
/*
* Generally the content region is the domain of Tk sub-windows.
* However, one exception is the grow region. A button down in this
@@ -350,10 +350,12 @@ TkMacOSXProcessMouseEvent(
* Tk may not get button down events in this area!
*/
- if (TkMacOSXGrowToplevel(medPtr->whichWin, where) == true) {
+ XPoint p = {where.h, where.v};
+ if (TkMacOSXGrowToplevel(medPtr->whichWin, p) == true) {
statusPtr->stopProcessing = 1;
return true;
}
+ }
case inContent:
return GenerateButtonEvent(medPtr);
}
diff --git a/carbon/tkMacOSXSubwindows.c b/carbon/tkMacOSXSubwindows.c
index 5fe18a9..a90f171 100644
--- a/carbon/tkMacOSXSubwindows.c
+++ b/carbon/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.1 2009/06/26 01:42:47 das Exp $
+ * RCS: @(#) $Id: tkMacOSXSubwindows.c,v 1.2 2009/06/29 14:35:01 das Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -971,20 +971,14 @@ TkMacOSXUpdateClipRgn(
*----------------------------------------------------------------------
*/
-RgnHandle
+TkRegion
TkMacOSXVisableClipRgn(
TkWindow *winPtr)
{
- static RgnHandle visQdRgn = NULL;
-
- if (visQdRgn == NULL) {
- visQdRgn = NewRgn();
- }
if (winPtr->privatePtr->flags & TK_CLIP_INVALID) {
TkMacOSXUpdateClipRgn(winPtr);
}
- ChkErr(HIShapeGetAsQDRgn, winPtr->privatePtr->visRgn, visQdRgn);
- return visQdRgn;
+ return (TkRegion)HIShapeCreateMutableCopy(winPtr->privatePtr->visRgn);
}
/*
@@ -1076,7 +1070,7 @@ TkMacOSXDrawableWindow(
*----------------------------------------------------------------------
*/
-CGrafPtr
+void *
TkMacOSXGetDrawablePort(
Drawable drawable)
{
@@ -1162,7 +1156,7 @@ TkMacOSXGetDrawablePort(
*----------------------------------------------------------------------
*/
-ControlRef
+void *
TkMacOSXGetRootControl(
Drawable drawable)
{
@@ -1288,8 +1282,9 @@ TkMacOSXInvalClipRgns(
void
TkMacOSXWinBounds(
TkWindow *winPtr,
- Rect *bounds)
+ void *b)
{
+ Rect *bounds = b;
bounds->left = winPtr->privatePtr->xOff;
bounds->top = winPtr->privatePtr->yOff;
bounds->right = bounds->left + winPtr->changes.width;
diff --git a/carbon/tkMacOSXWm.c b/carbon/tkMacOSXWm.c
index cd8ee6a..e5707f6 100644
--- a/carbon/tkMacOSXWm.c
+++ b/carbon/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.1 2009/06/26 01:42:47 das Exp $
+ * RCS: @(#) $Id: tkMacOSXWm.c,v 1.2 2009/06/29 14:35:01 das Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -4608,9 +4608,10 @@ TkMacOSXResizable(
int
TkMacOSXGrowToplevel(
- WindowRef whichWindow,
- Point start)
+ void *whichWindow,
+ XPoint s)
{
+ Point start = {s.y, s.x};
Point where = start;
TkDisplay *dispPtr;
Rect portRect;
@@ -4792,7 +4793,7 @@ TkGetTransientMaster(
Window
TkMacOSXGetXWindow(
- WindowRef macWinPtr)
+ void *macWinPtr)
{
Tcl_HashEntry *hPtr;
@@ -4886,7 +4887,7 @@ TkMacOSXIsWindowZoomed(
int
TkMacOSXZoomToplevel(
- WindowRef whichWindow, /* The Macintosh window to zoom. */
+ void *whichWindow, /* The Macintosh window to zoom. */
short zoomPart) /* Either inZoomIn or inZoomOut */
{
Window window;
@@ -5428,7 +5429,7 @@ TkMacOSXMakeRealWindowExist(
void
TkMacOSXRegisterOffScreenWindow(
Window window, /* Window structure. */
- GWorldPtr portPtr) /* Pointer to a Mac GWorld. */
+ void *portPtr) /* Pointer to a Mac GWorld. */
{
Tcl_HashEntry *valueHashPtr;
int isNew;
@@ -5463,7 +5464,7 @@ TkMacOSXRegisterOffScreenWindow(
void
TkMacOSXUnregisterMacWindow(
- WindowRef macWinPtr) /* Reference to a Mac Window */
+ void *macWinPtr) /* Reference to a Mac Window */
{
Tcl_HashEntry *entryPtr;
@@ -5651,7 +5652,7 @@ TkpWmSetState(
int
TkpIsWindowFloating(
- WindowRef wRef)
+ void *wRef)
{
WindowClass class;
@@ -5706,7 +5707,7 @@ TkMacOSXWindowClass(
void
TkMacOSXWindowOffset(
- WindowRef wRef,
+ void *wRef,
int *xOffset,
int *yOffset)
{