summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-31 07:12:31 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-31 07:12:31 (GMT)
commit35720db1d661f7697792d72d75dbdd519c7f20b1 (patch)
treeee09125b330b284ffbca8b2ff548977d57842207 /macosx
parent5eb1ee14861ec921faf373ca991b67cc770a4f4e (diff)
downloadtk-35720db1d661f7697792d72d75dbdd519c7f20b1.zip
tk-35720db1d661f7697792d72d75dbdd519c7f20b1.tar.gz
tk-35720db1d661f7697792d72d75dbdd519c7f20b1.tar.bz2
More tweaks, (mainly TkMacOSXGetCGContextForDrawable <-> TkMacOSXCGContext)
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXDraw.c8
-rw-r--r--macosx/tkMacOSXImage.c4
-rw-r--r--macosx/tkMacOSXPrivate.h4
3 files changed, 8 insertions, 8 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 7e19c56..dcec1f6 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -207,7 +207,7 @@ CreateNSImageFromPixmap(
CGImageRef cgImage;
NSImage *nsImage;
NSBitmapImageRep *bitmapImageRep;
- CGContextRef context = TkMacOSXGetCGContextForDrawable(pixmap);
+ CGContextRef context = TkMacOSXCGContext(pixmap);
if (context) {
cgImage = CGBitmapContextCreateImage(context);
@@ -226,7 +226,7 @@ CreateNSImageFromPixmap(
/*
*----------------------------------------------------------------------
*
- * TkMacOSXCGContext --
+ * TkMacOSXGetCGContextForDrawable --
*
* Get CGContext for given Drawable, creating one if necessary.
*
@@ -240,7 +240,7 @@ CreateNSImageFromPixmap(
*/
void *
-TkMacOSXCGContext(
+TkMacOSXGetCGContextForDrawable(
Drawable drawable)
{
MacDrawable *macDraw = (MacDrawable *)drawable;
@@ -1295,7 +1295,7 @@ TkMacOSXSetupDrawingContext(
* drawing to a window and we use the current context of its ContentView.
*/
- dc.context = TkMacOSXGetCGContextForDrawable(d);
+ dc.context = TkMacOSXCGContext(d);
if (dc.context) {
dc.portBounds = CGContextGetClipBoundingBox(dc.context);
} else {
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c
index 4179819..c757bb6 100644
--- a/macosx/tkMacOSXImage.c
+++ b/macosx/tkMacOSXImage.c
@@ -538,7 +538,7 @@ CreateCGImageFromDrawableRect(
CGRect image_rect = CGRectMake(x, y, width, height);
- cg_context = TkMacOSXGetCGContextForDrawable(drawable);
+ cg_context = TkMacOSXCGContext(drawable);
cg_image = CGBitmapContextCreateImage((CGContextRef) cg_context);
if (cg_image) {
result = CGImageCreateWithImageInRect(cg_image, image_rect);
@@ -597,7 +597,7 @@ CreateCGImageFromPixmap(
Drawable pixmap)
{
CGImageRef img = NULL;
- CGContextRef context = TkMacOSXGetCGContextForDrawable(pixmap);
+ CGContextRef context = TkMacOSXCGContext(pixmap);
if (context) {
img = CGBitmapContextCreateImage(context);
diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h
index e1ace4d..2c7546e 100644
--- a/macosx/tkMacOSXPrivate.h
+++ b/macosx/tkMacOSXPrivate.h
@@ -244,8 +244,8 @@ MODULE_SCOPE OSStatus TkMacOSHIShapeUnion(HIShapeRef inShape1,
(NSWindow *)TkMacOSXDrawable(drawable)
#define TkMacOSXContentView(drawable) \
(TKContentView *)TkMacOSXGetRootControl(drawable)
-#define TkMacOSXGetCGContextForDrawable(drawable) \
- (CGContextRef)TkMacOSXCGContext(drawable)
+#define TkMacOSXCGContext(drawable) \
+ (CGContextRef)TkMacOSXGetCGContextForDrawable(drawable)
MODULE_SCOPE void * TkMacOSXGetNamedSymbol(const char *module,
const char *symbol);