summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarc_culler <marc.culler@gmail.com>2020-12-11 05:55:13 (GMT)
committermarc_culler <marc.culler@gmail.com>2020-12-11 05:55:13 (GMT)
commit7d5165546e1f1cd69e5899902fe78af07524bac3 (patch)
tree6bb71d1b1a7776e639affdf3bbd982bc41fe97a7
parentdd9981cdf34805e32668ccc8856f95631c0e9940 (diff)
downloadtk-7d5165546e1f1cd69e5899902fe78af07524bac3.zip
tk-7d5165546e1f1cd69e5899902fe78af07524bac3.tar.gz
tk-7d5165546e1f1cd69e5899902fe78af07524bac3.tar.bz2
Fix the build on macOS 10.6.
-rw-r--r--macosx/tkMacOSXBitmap.c2
-rw-r--r--macosx/tkMacOSXColor.c7
-rw-r--r--macosx/tkMacOSXDraw.c2
-rw-r--r--macosx/tkMacOSXFont.c7
-rw-r--r--macosx/tkMacOSXPrivate.h1
-rw-r--r--macosx/ttkMacOSXTheme.c2
6 files changed, 10 insertions, 11 deletions
diff --git a/macosx/tkMacOSXBitmap.c b/macosx/tkMacOSXBitmap.c
index 29bb163..4c77d92 100644
--- a/macosx/tkMacOSXBitmap.c
+++ b/macosx/tkMacOSXBitmap.c
@@ -178,7 +178,7 @@ TkpCreateNativeBitmap(
NSImage *iconImage = [[NSWorkspace sharedWorkspace]
iconForFileType: iconUTI];
CGSize size = CGSizeMake(builtInIconSize, builtInIconSize);
- Pixmap pixmap = PixmapFromImage(display, iconImage, NSSizeToCGSize(size));
+ Pixmap pixmap = PixmapFromImage(display, iconImage, size);
return pixmap;
}
diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c
index 543f1d5..99606e0 100644
--- a/macosx/tkMacOSXColor.c
+++ b/macosx/tkMacOSXColor.c
@@ -342,13 +342,14 @@ GetRGBA(
[color getComponents: rgba];
#else
{
+ OSStatus err = noErr;
RGBColor rgb;
err = GetThemeTextColor(kThemeTextColorPushButtonActive, 32,
true, &rgb);
if (err == noErr) {
- rgba[0] = (CGFLoat) rgb.red / 65535;
- rgba[1] = (CGFLoat) rgb.green / 65535;
- rgba[2] = (CGFLoat) rgb.blue / 65535;
+ rgba[0] = (CGFloat) rgb.red / 65535;
+ rgba[1] = (CGFloat) rgb.green / 65535;
+ rgba[2] = (CGFloat) rgb.blue / 65535;
}
}
#endif
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 06d1810..22b6a45 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -1345,7 +1345,7 @@ TkMacOSXSetupDrawingContext(
* will get redrawn in the next call to its drawRect method.
*/
- currentBounds = CGContextGetClipBoundingBox(dc.context);
+ currentBounds = NSRectFromCGRect(CGContextGetClipBoundingBox(dc.context));
if (!NSContainsRect(currentBounds, drawingBounds)) {
[view addTkDirtyRect:drawingBounds];
}
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index 37d4eab..ca370f3 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -127,7 +127,7 @@ static int CreateNamedSystemFont(Tcl_Interp *interp,
self = [self init];
if (self) {
_string = [[NSString alloc] initWithString:aString];
- self.UTF8String = _string.UTF8String;
+ _UTF8String = _string.UTF8String;
}
return self;
}
@@ -149,10 +149,6 @@ static int CreateNamedSystemFont(Tcl_Interp *interp,
return [_string characterAtIndex:index];
}
-# ifndef __clang__
-@synthesize DString = _ds;
-#endif
-
- (Tcl_DString)DString
{
if ( _ds.string == NULL) {
@@ -177,6 +173,7 @@ static int CreateNamedSystemFont(Tcl_Interp *interp,
#ifndef __clang__
@synthesize UTF8String = _UTF8String;
+@synthesize DString = _ds;
#endif
@end
diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h
index 8e57641..ea53e5f 100644
--- a/macosx/tkMacOSXPrivate.h
+++ b/macosx/tkMacOSXPrivate.h
@@ -557,6 +557,7 @@ VISIBILITY_HIDDEN
@private
Tcl_DString _ds;
NSString *_string;
+ const char *_UTF8String;
}
@property const char *UTF8String;
@property (readonly) Tcl_DString DString;
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index b4ba894..17982b6 100644
--- a/macosx/ttkMacOSXTheme.c
+++ b/macosx/ttkMacOSXTheme.c
@@ -1351,7 +1351,7 @@ static void ButtonElementMinSize(
ThemeButtonParams *params = (ThemeButtonParams *)clientData;
if (params->heightMetric != NoThemeMetric) {
- ChkErr(GetThemeMetric, params->heightMetric, minHeight);
+ ChkErr(GetThemeMetric, params->heightMetric, (SInt *) minHeight);
/*
* The theme height does not include the 1-pixel border around