summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXSubwindows.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-26 13:36:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-26 13:36:55 (GMT)
commitbc1b481b1b3661958beec5f99e123d503749accb (patch)
tree98686a7656eb1752d0e866e766c8451c92aee26d /macosx/tkMacOSXSubwindows.c
parent1618e2bbee42caa1010a3071f26917e298ba6ab7 (diff)
downloadtk-bc1b481b1b3661958beec5f99e123d503749accb.zip
tk-bc1b481b1b3661958beec5f99e123d503749accb.tar.gz
tk-bc1b481b1b3661958beec5f99e123d503749accb.tar.bz2
Another simplification: Change TkMacOSXDrawableView() from a MODULE_SCOPE function to a macro. This saves an empty wrapper-function for TkMacOSXGetRootControl()
Diffstat (limited to 'macosx/tkMacOSXSubwindows.c')
-rw-r--r--macosx/tkMacOSXSubwindows.c40
1 files changed, 7 insertions, 33 deletions
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index 64db1b1..dd00043 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -1154,14 +1154,15 @@ TkMacOSXGetDrawablePort(
*----------------------------------------------------------------------
*/
-NSView *
-TkMacOSXDrawableView(
- MacDrawable *macWin)
+void *
+TkMacOSXGetRootControl(
+ Drawable drawable)
{
- NSView *result = nil;
+ void *result = NULL;
+ MacDrawable *macWin = (MacDrawable *)drawable;
if (!macWin) {
- result = nil;
+ result = NULL;
} else if (!macWin->toplevel) {
result = macWin->view;
} else if (!(macWin->toplevel->flags & TK_EMBEDDED)) {
@@ -1170,7 +1171,7 @@ TkMacOSXDrawableView(
TkWindow *contWinPtr = TkpGetOtherWindow(macWin->toplevel->winPtr);
if (contWinPtr) {
- result = TkMacOSXDrawableView(contWinPtr->privatePtr);
+ result = TkMacOSXGetRootControl((Drawable)contWinPtr->privatePtr);
}
}
return result;
@@ -1179,33 +1180,6 @@ TkMacOSXDrawableView(
/*
*----------------------------------------------------------------------
*
- * TkMacOSXGetRootControl --
- *
- * This function returns the NSView for a given X drawable.
- *
- * Results:
- * A NSView* .
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-void *
-TkMacOSXGetRootControl(
- Drawable drawable)
-{
- /*
- * will probably need to fix this up for embedding
- */
-
- return TkMacOSXDrawableView((MacDrawable *) drawable);
-}
-
-/*
- *----------------------------------------------------------------------
- *
* TkMacOSXInvalClipRgns --
*
* This function invalidates the clipping regions for a given window and