summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXCursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXCursor.c')
-rw-r--r--macosx/tkMacOSXCursor.c75
1 files changed, 14 insertions, 61 deletions
diff --git a/macosx/tkMacOSXCursor.c b/macosx/tkMacOSXCursor.c
index 812f54e..9371889 100644
--- a/macosx/tkMacOSXCursor.c
+++ b/macosx/tkMacOSXCursor.c
@@ -187,15 +187,6 @@ static const struct CursorName cursorNames[] = {
static TkMacOSXCursor *gCurrentCursor = NULL;
/* A pointer to the current cursor. */
-static int gResizeOverride = false;
- /* A boolean indicating whether we should use
- * the resize cursor during installations. */
-static int gTkOwnsCursor = true;/* A boolean indicating whether Tk owns the
- * cursor. If not (for instance, in the case
- * where a Tk window is embedded in another
- * app's window, and the cursor is out of the
- * Tk window, we will not attempt to adjust
- * the cursor. */
/*
* Declarations of procedures local to this file
@@ -375,14 +366,13 @@ FindCursorByName(
TkCursor *
TkGetCursorByName(
Tcl_Interp *interp, /* Interpreter to use for error reporting. */
- Tk_Window tkwin, /* Window in which cursor will be used. */
+ TCL_UNUSED(Tk_Window), /* Window in which cursor will be used. */
Tk_Uid string) /* Description of cursor. See manual entry
* for details on legal syntax. */
{
TkMacOSXCursor *macCursorPtr = NULL;
const char **argv = NULL;
int argc;
- (void)tkwin;
/*
* All cursor names are valid lists of one element (for
@@ -430,24 +420,16 @@ TkGetCursorByName(
TkCursor *
TkCreateCursorFromData(
- Tk_Window tkwin, /* Window in which cursor will be used. */
- const char *source, /* Bitmap data for cursor shape. */
- const char *mask, /* Bitmap data for cursor mask. */
- int width, int height, /* Dimensions of cursor. */
- int xHot, int yHot, /* Location of hot-spot in cursor. */
- XColor fgColor, /* Foreground color for cursor. */
- XColor bgColor) /* Background color for cursor. */
+ TCL_UNUSED(Tk_Window), /* Window in which cursor will be used. */
+ TCL_UNUSED(const char *), /* Bitmap data for cursor shape. */
+ TCL_UNUSED(const char *), /* Bitmap data for cursor mask. */
+ TCL_UNUSED(int), /* Dimensions of cursor. */
+ TCL_UNUSED(int),
+ TCL_UNUSED(int), /* Location of hot-spot in cursor. */
+ TCL_UNUSED(int),
+ TCL_UNUSED(XColor), /* Foreground color for cursor. */
+ TCL_UNUSED(XColor)) /* Background color for cursor. */
{
- (void)tkwin;
- (void)source;
- (void)mask;
- (void)width;
- (void)height;
- (void)xHot;
- (void)yHot;
- (void)fgColor;
- (void)bgColor;
-
return NULL;
}
@@ -498,17 +480,15 @@ TkpFreeCursor(
*----------------------------------------------------------------------
*/
-void
+static void
TkMacOSXInstallCursor(
- int resizeOverride)
+ void)
{
TkMacOSXCursor *macCursorPtr = gCurrentCursor;
static int cursorHidden = 0;
int cursorNone = 0;
- gResizeOverride = resizeOverride;
-
- if (resizeOverride || !macCursorPtr) {
+ if (!macCursorPtr) {
[[NSCursor arrowCursor] set];
} else {
switch (macCursorPtr->type) {
@@ -556,10 +536,6 @@ TkpSetCursor(
{
int cursorChanged = 1;
- if (!gTkOwnsCursor) {
- return;
- }
-
if (cursor == None) {
/*
* This is a little tricky. We can't really tell whether
@@ -578,34 +554,11 @@ TkpSetCursor(
}
if (Tk_MacOSXIsAppInFront() && cursorChanged) {
- TkMacOSXInstallCursor(gResizeOverride);
+ TkMacOSXInstallCursor();
}
}
/*
- *----------------------------------------------------------------------
- *
- * Tk_MacOSXTkOwnsCursor --
- *
- * Sets whether Tk has the right to adjust the cursor.
- *
- * Results:
- * None.
- *
- * Side effects:
- * May keep Tk from changing the cursor.
- *
- *----------------------------------------------------------------------
- */
-
-void
-Tk_MacOSXTkOwnsCursor(
- int tkOwnsIt)
-{
- gTkOwnsCursor = tkOwnsIt;
-}
-
-/*
* Local Variables:
* mode: objc
* c-basic-offset: 4