diff options
-rw-r--r-- | generic/tk.decls | 6 | ||||
-rw-r--r-- | generic/tk3d.c | 2 | ||||
-rw-r--r-- | generic/tkCmds.c | 4 | ||||
-rw-r--r-- | generic/tkColor.c | 4 | ||||
-rw-r--r-- | generic/tkCursor.c | 2 | ||||
-rw-r--r-- | generic/tkDecls.h | 12 | ||||
-rw-r--r-- | generic/tkImgPhoto.c | 4 | ||||
-rw-r--r-- | macosx/tkMacOSXDialog.c | 2 | ||||
-rw-r--r-- | win/tkWinDialog.c | 2 | ||||
-rw-r--r-- | win/tkWinWm.c | 4 |
10 files changed, 21 insertions, 21 deletions
diff --git a/generic/tk.decls b/generic/tk.decls index 3c94054..87e568f 100644 --- a/generic/tk.decls +++ b/generic/tk.decls @@ -337,7 +337,7 @@ declare 79 { } declare 80 { Tk_3DBorder Tk_Get3DBorder(Tcl_Interp *interp, Tk_Window tkwin, - Tk_Uid colorName) + const char *colorName) } declare 81 { void Tk_GetAllBindings(Tcl_Interp *interp, @@ -366,7 +366,7 @@ declare 87 { int Tk_GetCapStyle(Tcl_Interp *interp, const char *str, int *capPtr) } declare 88 { - XColor *Tk_GetColor(Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid name) + XColor *Tk_GetColor(Tcl_Interp *interp, Tk_Window tkwin, const char *name) } declare 89 { XColor *Tk_GetColorByValue(Tk_Window tkwin, XColor *colorPtr) @@ -377,7 +377,7 @@ declare 90 { } declare 91 { Tk_Cursor Tk_GetCursor(Tcl_Interp *interp, Tk_Window tkwin, - Tk_Uid str) + const char *str) } declare 92 { Tk_Cursor Tk_GetCursorFromData(Tcl_Interp *interp, diff --git a/generic/tk3d.c b/generic/tk3d.c index 8082f0c..343759e 100644 --- a/generic/tk3d.c +++ b/generic/tk3d.c @@ -184,7 +184,7 @@ Tk_Get3DBorder( Tcl_Interp *interp, /* Place to store an error message. */ Tk_Window tkwin, /* Token for window in which border will be * drawn. */ - Tk_Uid colorName) /* String giving name of color for window + const char *colorName) /* String giving name of color for window * background. */ { Tcl_HashEntry *hashPtr; diff --git a/generic/tkCmds.c b/generic/tkCmds.c index f6fb07e..108d730 100644 --- a/generic/tkCmds.c +++ b/generic/tkCmds.c @@ -1776,11 +1776,11 @@ Tk_WinfoObjCmd( { Colormap temp = Tk_Colormap(tkwin); Tk_Colormap(tkwin) = TK_DYNAMIC_COLORMAP; - colorPtr = Tk_GetColor(interp, tkwin, Tcl_GetString(objv[3])); + colorPtr = Tk_AllocColorFromObj(interp, tkwin, objv[3]); Tk_Colormap(tkwin) = temp; } #else - colorPtr = Tk_GetColor(interp, tkwin, Tcl_GetString(objv[3])); + colorPtr = Tk_AllocColorFromObj(interp, tkwin, objv[3]); #endif if (colorPtr == NULL) { return TCL_ERROR; diff --git a/generic/tkColor.c b/generic/tkColor.c index baff5e7..10733a5 100644 --- a/generic/tkColor.c +++ b/generic/tkColor.c @@ -153,7 +153,7 @@ Tk_AllocColorFromObj( * Still no luck. Call Tk_GetColor to allocate a new TkColor object. */ - tkColPtr = (TkColor *) Tk_GetColor(interp, tkwin, Tcl_GetString(objPtr)); + tkColPtr = (TkColor *)Tk_GetColor(interp, tkwin, Tcl_GetString(objPtr)); objPtr->internalRep.twoPtrValue.ptr1 = tkColPtr; if (tkColPtr != NULL) { tkColPtr->objRefCount++; @@ -190,7 +190,7 @@ Tk_GetColor( Tcl_Interp *interp, /* Place to leave error message if color can't * be found. */ Tk_Window tkwin, /* Window in which color will be used. */ - Tk_Uid name) /* Name of color to be allocated (in form + const char *name) /* Name of color to be allocated (in form * suitable for passing to XParseColor). */ { Tcl_HashEntry *nameHashPtr; diff --git a/generic/tkCursor.c b/generic/tkCursor.c index 1bed0c4..600d034 100644 --- a/generic/tkCursor.c +++ b/generic/tkCursor.c @@ -190,7 +190,7 @@ Tk_Cursor Tk_GetCursor( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ Tk_Window tkwin, /* Window in which cursor will be used. */ - Tk_Uid string) /* Description of cursor. See manual entry for + const char *string) /* Description of cursor. See manual entry for * details on legal syntax. */ { TkCursor *cursorPtr = TkcGetCursor(interp, tkwin, string); diff --git a/generic/tkDecls.h b/generic/tkDecls.h index bdad3d1..3620980 100644 --- a/generic/tkDecls.h +++ b/generic/tkDecls.h @@ -298,7 +298,7 @@ EXTERN void Tk_GeometryRequest(Tk_Window tkwin, int reqWidth, int reqHeight); /* 80 */ EXTERN Tk_3DBorder Tk_Get3DBorder(Tcl_Interp *interp, Tk_Window tkwin, - Tk_Uid colorName); + const char *colorName); /* 81 */ EXTERN void Tk_GetAllBindings(Tcl_Interp *interp, Tk_BindingTable bindingTable, void *object); @@ -323,7 +323,7 @@ EXTERN int Tk_GetCapStyle(Tcl_Interp *interp, const char *str, int *capPtr); /* 88 */ EXTERN XColor * Tk_GetColor(Tcl_Interp *interp, Tk_Window tkwin, - Tk_Uid name); + const char *name); /* 89 */ EXTERN XColor * Tk_GetColorByValue(Tk_Window tkwin, XColor *colorPtr); /* 90 */ @@ -331,7 +331,7 @@ EXTERN Colormap Tk_GetColormap(Tcl_Interp *interp, Tk_Window tkwin, const char *str); /* 91 */ EXTERN Tk_Cursor Tk_GetCursor(Tcl_Interp *interp, Tk_Window tkwin, - Tk_Uid str); + const char *str); /* 92 */ EXTERN Tk_Cursor Tk_GetCursorFromData(Tcl_Interp *interp, Tk_Window tkwin, const char *source, @@ -1017,7 +1017,7 @@ typedef struct TkStubs { TCL_DEPRECATED_API("function does nothing, call can be removed") void (*tk_FreeXId) (Display *display, XID xid); /* 77 */ GC (*tk_GCForColor) (XColor *colorPtr, Drawable drawable); /* 78 */ void (*tk_GeometryRequest) (Tk_Window tkwin, int reqWidth, int reqHeight); /* 79 */ - Tk_3DBorder (*tk_Get3DBorder) (Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid colorName); /* 80 */ + Tk_3DBorder (*tk_Get3DBorder) (Tcl_Interp *interp, Tk_Window tkwin, const char *colorName); /* 80 */ void (*tk_GetAllBindings) (Tcl_Interp *interp, Tk_BindingTable bindingTable, void *object); /* 81 */ int (*tk_GetAnchor) (Tcl_Interp *interp, const char *str, Tk_Anchor *anchorPtr); /* 82 */ const char * (*tk_GetAtomName) (Tk_Window tkwin, Atom atom); /* 83 */ @@ -1025,10 +1025,10 @@ typedef struct TkStubs { Pixmap (*tk_GetBitmap) (Tcl_Interp *interp, Tk_Window tkwin, const char *str); /* 85 */ Pixmap (*tk_GetBitmapFromData) (Tcl_Interp *interp, Tk_Window tkwin, const void *source, int width, int height); /* 86 */ int (*tk_GetCapStyle) (Tcl_Interp *interp, const char *str, int *capPtr); /* 87 */ - XColor * (*tk_GetColor) (Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid name); /* 88 */ + XColor * (*tk_GetColor) (Tcl_Interp *interp, Tk_Window tkwin, const char *name); /* 88 */ XColor * (*tk_GetColorByValue) (Tk_Window tkwin, XColor *colorPtr); /* 89 */ Colormap (*tk_GetColormap) (Tcl_Interp *interp, Tk_Window tkwin, const char *str); /* 90 */ - Tk_Cursor (*tk_GetCursor) (Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid str); /* 91 */ + Tk_Cursor (*tk_GetCursor) (Tcl_Interp *interp, Tk_Window tkwin, const char *str); /* 91 */ Tk_Cursor (*tk_GetCursorFromData) (Tcl_Interp *interp, Tk_Window tkwin, const char *source, const char *mask, int width, int height, int xHot, int yHot, Tk_Uid fg, Tk_Uid bg); /* 92 */ Tk_Font (*tk_GetFont) (Tcl_Interp *interp, Tk_Window tkwin, const char *str); /* 93 */ Tk_Font (*tk_GetFontFromObj) (Tk_Window tkwin, Tcl_Obj *objPtr); /* 94 */ diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 374e259..2844852 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -1742,8 +1742,8 @@ ParseSubcommandOptions( goto oneValueRequired; } *optIndexPtr = ++index; - optPtr->background = Tk_GetColor(interp, Tk_MainWindow(interp), - Tcl_GetString(objv[index])); + optPtr->background = Tk_AllocColorFromObj(interp, Tk_MainWindow(interp), + objv[index]); if (!optPtr->background) { return TCL_ERROR; } diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c index 425919c..f2368ac 100644 --- a/macosx/tkMacOSXDialog.c +++ b/macosx/tkMacOSXDialog.c @@ -464,7 +464,7 @@ Tk_ChooseColorObjCmd( case COLOR_INITIAL: { XColor *colorPtr; - colorPtr = Tk_GetColor(interp, tkwin, value); + colorPtr = Tk_AllocColorFromObj(interp, tkwin, objv[i + 1]); if (colorPtr == NULL) { goto end; } diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index 6ced04a..668d038 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -760,7 +760,7 @@ Tk_ChooseColorObjCmd( case COLOR_INITIAL: { XColor *colorPtr; - colorPtr = Tk_GetColor(interp, tkwin, string); + colorPtr = Tk_AllocColorFromObj(interp, tkwin, valuePtr); if (colorPtr == NULL) { return TCL_ERROR; } diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 8aef4fa..c2d1683 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -3070,7 +3070,7 @@ WmAttributesCmd( } wmPtr->alpha = dval; } else { /* -transparentcolor */ - const char *crefstr = Tcl_GetStringFromObj(objv[i+1], &length); + (void)Tcl_GetStringFromObj(objv[i+1], &length); if (length == 0) { /* reset to no transparent color */ @@ -3080,7 +3080,7 @@ WmAttributesCmd( } } else { XColor *cPtr = - Tk_GetColor(interp, tkwin, crefstr); + Tk_AllocColorFromObj(interp, tkwin, objv[i+1]); if (cPtr == NULL) { return TCL_ERROR; } |