summaryrefslogtreecommitdiffstats
path: root/generic/tkCursor.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-08-05 04:30:37 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-08-05 04:30:37 (GMT)
commitb5333ac3910c2299be88875fe833d76136a92fc0 (patch)
tree7d072949961c0e2749f8fc33c73bf1d093c3d635 /generic/tkCursor.c
parent54f11088e5bee7a0f06235e8b67cdde9dfa614d4 (diff)
downloadtk-b5333ac3910c2299be88875fe833d76136a92fc0.zip
tk-b5333ac3910c2299be88875fe833d76136a92fc0.tar.gz
tk-b5333ac3910c2299be88875fe833d76136a92fc0.tar.bz2
Applied companion patch for Tcl Patch 585105,
updating Tk to use Tcl 8.4's fully CONST-ified interface, and fully CONSTifying Tk at the same time. This patch includes purging Tk of its last direct access to interp->result. [Bug 589853] The substantial changes include copying event sequence strings into Tcl_DStrings in tkBind.c, and copying [text] indices into Tcl_DStrings because parsing them involved overwriting them. If this causes performance trouble, that can be resolved by further converting them to Tcl_Obj's. The #defines USE_NON_CONST and USE_COMPAT_CONST have the same effect for Tk as they do for Tcl. (They actually change tcl.h)
Diffstat (limited to 'generic/tkCursor.c')
-rw-r--r--generic/tkCursor.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/generic/tkCursor.c b/generic/tkCursor.c
index 89c40ae..ce6b381 100644
--- a/generic/tkCursor.c
+++ b/generic/tkCursor.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCursor.c,v 1.8 2001/10/23 08:40:47 dkf Exp $
+ * RCS: @(#) $Id: tkCursor.c,v 1.9 2002/08/05 04:30:38 dgp Exp $
*/
#include "tkPort.h"
@@ -26,8 +26,8 @@
*/
typedef struct {
- char *source; /* Cursor bits. */
- char *mask; /* Mask bits. */
+ CONST char *source; /* Cursor bits. */
+ CONST char *mask; /* Mask bits. */
int width, height; /* Dimensions of cursor (and data
* and mask). */
int xHot, yHot; /* Location of cursor hot-spot. */
@@ -45,7 +45,7 @@ static void DupCursorObjProc _ANSI_ARGS_((Tcl_Obj *srcObjPtr,
static void FreeCursor _ANSI_ARGS_((TkCursor *cursorPtr));
static void FreeCursorObjProc _ANSI_ARGS_((Tcl_Obj *objPtr));
static TkCursor * GetCursor _ANSI_ARGS_((Tcl_Interp *interp,
- Tk_Window tkwin, char *name));
+ Tk_Window tkwin, CONST char *name));
static TkCursor * GetCursorFromObj _ANSI_ARGS_((Tk_Window tkwin,
Tcl_Obj *objPtr));
static void InitCursorObj _ANSI_ARGS_((Tcl_Obj *objPtr));
@@ -189,7 +189,7 @@ Tk_Cursor
Tk_GetCursor(interp, tkwin, string)
Tcl_Interp *interp; /* Interpreter to use for error reporting. */
Tk_Window tkwin; /* Window in which cursor will be used. */
- char *string; /* Description of cursor. See manual entry
+ Tk_Uid string; /* Description of cursor. See manual entry
* for details on legal syntax. */
{
TkCursor *cursorPtr = GetCursor(interp, tkwin, string);
@@ -230,7 +230,7 @@ static TkCursor *
GetCursor(interp, tkwin, string)
Tcl_Interp *interp; /* Interpreter to use for error reporting. */
Tk_Window tkwin; /* Window in which cursor will be used. */
- char *string; /* Description of cursor. See manual entry
+ CONST char *string; /* Description of cursor. See manual entry
* for details on legal syntax. */
{
Tcl_HashEntry *nameHashPtr;
@@ -318,8 +318,8 @@ Tk_GetCursorFromData(interp, tkwin, source, mask, width, height,
xHot, yHot, fg, bg)
Tcl_Interp *interp; /* Interpreter to use for error reporting. */
Tk_Window tkwin; /* Window in which cursor will be used. */
- char *source; /* Bitmap data for cursor shape. */
- char *mask; /* Bitmap data for cursor mask. */
+ CONST char *source; /* Bitmap data for cursor shape. */
+ CONST char *mask; /* Bitmap data for cursor mask. */
int width, height; /* Dimensions of cursor. */
int xHot, yHot; /* Location of hot-spot in cursor. */
Tk_Uid fg; /* Foreground color for cursor. */
@@ -418,7 +418,7 @@ Tk_GetCursorFromData(interp, tkwin, source, mask, width, height,
*--------------------------------------------------------------
*/
-char *
+CONST char *
Tk_NameOfCursor(display, cursor)
Display *display; /* Display for which cursor was allocated. */
Tk_Cursor cursor; /* Identifier for cursor whose name is