summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-17 19:29:10 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-17 19:29:10 (GMT)
commit73a13ad72aaee4affacc0bccba88de8caac73f1d (patch)
treefa85a32878947d9871e30c1bd7766a3e85027963 /macosx
parentc5b9cd53fd9e807f139d017cfebc0a220a1a52d6 (diff)
parentbe28f5167c3804d1e68670b0afb1d57601a78a41 (diff)
downloadtk-73a13ad72aaee4affacc0bccba88de8caac73f1d.zip
tk-73a13ad72aaee4affacc0bccba88de8caac73f1d.tar.gz
tk-73a13ad72aaee4affacc0bccba88de8caac73f1d.tar.bz2
Merge 8.6. Make some functions MODULE_SCOPE or static
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXDialog.c10
-rw-r--r--macosx/tkMacOSXImage.c19
-rw-r--r--macosx/tkMacOSXImage.h5
-rw-r--r--macosx/tkMacOSXPrint.c2
-rw-r--r--macosx/ttkMacOSXTheme.c12
5 files changed, 24 insertions, 24 deletions
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index 7469073..a01b0a2 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -3,11 +3,11 @@
*
* Contains the Mac implementation of the common dialog boxes.
*
- * Copyright (c) 1996-1997 Sun Microsystems, Inc.
- * Copyright (c) 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2017 Christian Gollwitzer
- * Copyright (c) 2022 Marc Culler
+ * Copyright © 1996-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009, Apple Inc.
+ * Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2017 Christian Gollwitzer
+ * Copyright © 2022 Marc Culler
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c
index 726d8b9..01c0b1b 100644
--- a/macosx/tkMacOSXImage.c
+++ b/macosx/tkMacOSXImage.c
@@ -4,10 +4,10 @@
* The code in this file provides an interface for XImages, and
* implements the nsimage image type.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright (c) 2001-2009, Apple Inc.
- * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2017-2021 Marc Culler.
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009, Apple Inc.
+ * Copyright © 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2017-2021 Marc Culler.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -502,6 +502,9 @@ TkMacOSXPutImage(
MacDrawable *macDraw = (MacDrawable *)drawable;
int result = Success;
+ if (width <= 0 || height <= 0) {
+ return Success; /* Is OK. Nothing to see here, literally. */
+ }
LastKnownRequestProcessed(display)++;
if (!TkMacOSXSetupDrawingContext(drawable, gc, &dc)) {
return BadDrawable;
@@ -623,7 +626,7 @@ int TkpPutRGBAImage(
*----------------------------------------------------------------------
*/
-CGImageRef
+static CGImageRef
CreateCGImageFromDrawableRect(
Drawable drawable,
int x,
@@ -736,7 +739,7 @@ CreatePDFFromDrawableRect(
*----------------------------------------------------------------------
*/
-CGImageRef
+static CGImageRef
CreateCGImageFromPixmap(
Drawable pixmap)
{
@@ -1096,12 +1099,12 @@ struct TkMacOSXNSImageModel {
int radius; /* Radius for rounded corners. */
int ring; /* Thickness of the focus ring. */
double alpha; /* Transparency, between 0.0 and 1.0*/
- bool pressed; /* Image is for use in a pressed button.*/
- bool templ; /* Image is for use as a template.*/
char *imageName ; /* Malloc'ed image name. */
char *source; /* Malloc'ed string describing the image. */
char *as; /* Malloc'ed interpretation of source */
int flags; /* Sundry flags, defined below. */
+ bool pressed; /* Image is for use in a pressed button.*/
+ bool templ; /* Image is for use as a template.*/
TkMacOSXNSImageInstance *instancePtr; /* Start of list of instances associated
* with this model. */
NSImage *image; /* The underlying NSImage object. */
diff --git a/macosx/tkMacOSXImage.h b/macosx/tkMacOSXImage.h
index 7dcb50e..277683f 100644
--- a/macosx/tkMacOSXImage.h
+++ b/macosx/tkMacOSXImage.h
@@ -18,8 +18,5 @@
* Function prototypes
*/
-CGImageRef CreateCGImageFromPixmap(Drawable pixmap);
-CGImageRef CreateCGImageFromDrawableRect( Drawable drawable,
- int x, int y, unsigned int width, unsigned int height);
-CFDataRef CreatePDFFromDrawableRect( Drawable drawable,
+MODULE_SCOPE CFDataRef CreatePDFFromDrawableRect( Drawable drawable,
int x, int y, unsigned int width, unsigned int height);
diff --git a/macosx/tkMacOSXPrint.c b/macosx/tkMacOSXPrint.c
index 9797bfa..ee30e1f 100644
--- a/macosx/tkMacOSXPrint.c
+++ b/macosx/tkMacOSXPrint.c
@@ -22,7 +22,7 @@
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
-#include <tkMacOSXImage.h>
+#include "tkMacOSXImage.h"
#include "tkMacOSXPrivate.h"
NSString * fileName = nil;
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index f651c06..e3afc47 100644
--- a/macosx/ttkMacOSXTheme.c
+++ b/macosx/ttkMacOSXTheme.c
@@ -3,12 +3,12 @@
*
* Tk theme engine for Mac OSX, using the Appearance Manager API.
*
- * Copyright (c) 2004 Joe English
- * Copyright (c) 2005 Neil Madden
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2008-2009 Apple Inc.
- * Copyright (c) 2009 Kevin Walzer/WordTech Communications LLC.
- * Copyright (c) 2019 Marc Culler
+ * Copyright © 2004 Joe English
+ * Copyright © 2005 Neil Madden
+ * Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2008-2009 Apple Inc.
+ * Copyright © 2009 Kevin Walzer/WordTech Communications LLC.
+ * Copyright © 2019 Marc Culler
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.