summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-20 06:37:34 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-20 06:37:34 (GMT)
commit41b819e2be9dd110354f34eb007b7ebea51665fa (patch)
treeba1cfbd5f6a984ff3fc712ad8c00a6a87a79b348
parent78a63588e2175efc7951d8fbe1e198920d297125 (diff)
parentddd5fe8daea297d73f78c70cb5bfb6c151d4b627 (diff)
downloadtk-41b819e2be9dd110354f34eb007b7ebea51665fa.zip
tk-41b819e2be9dd110354f34eb007b7ebea51665fa.tar.gz
tk-41b819e2be9dd110354f34eb007b7ebea51665fa.tar.bz2
rfe-2636558 simplification. Restore forwards compatibility with Tk 8.5
-rw-r--r--ChangeLog7
-rw-r--r--generic/tk.decls16
-rw-r--r--generic/tkBitmap.c22
-rw-r--r--generic/tkDecls.h40
-rw-r--r--generic/tkStubInit.c11
5 files changed, 38 insertions, 58 deletions
diff --git a/ChangeLog b/ChangeLog
index e9fec86..e718dec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-06-20 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tk.decls: rfe-2636558 simplification. Restore forwards
+ * generic/tkBitmap.c: compatibility with Tk 8.5.
+ * generic/tkdecls.h:
+ * generic/tkStubInit.c:
+
2012-06-15 Donal K. Fellows <dkf@users.sf.net>
* generic/ttk/ttkTreeview.c (unshareObj): [Bug 3535362]: Changed name
diff --git a/generic/tk.decls b/generic/tk.decls
index e54b804..11b4f87 100644
--- a/generic/tk.decls
+++ b/generic/tk.decls
@@ -207,8 +207,8 @@ declare 43 {
const char *pathName, const char *screenName)
}
declare 44 {
- int Tk_OldDefineBitmap(Tcl_Interp *interp, const char *name,
- const char *source, int width, int height)
+ int Tk_DefineBitmap(Tcl_Interp *interp, const char *name,
+ const void *source, int width, int height)
}
declare 45 {
void Tk_DefineCursor(Tk_Window window, Tk_Cursor cursor)
@@ -359,8 +359,8 @@ declare 85 {
Pixmap Tk_GetBitmap(Tcl_Interp *interp, Tk_Window tkwin, const char *str)
}
declare 86 {
- Pixmap Tk_OldGetBitmapFromData(Tcl_Interp *interp,
- Tk_Window tkwin, const char *source, int width, int height)
+ Pixmap Tk_GetBitmapFromData(Tcl_Interp *interp,
+ Tk_Window tkwin, const void *source, int width, int height)
}
declare 87 {
int Tk_GetCapStyle(Tcl_Interp *interp, const char *str, int *capPtr)
@@ -1069,15 +1069,11 @@ declare 273 {
void Tk_CreateOldPhotoImageFormat(const Tk_PhotoImageFormat *formatPtr)
}
-# See [Enhancement request 2636558] Tk_DefineBitmap and
-# Tk_GetBitmapFromData signature problem
declare 274 {
- int Tk_DefineBitmap(Tcl_Interp *interp, const char *name,
- const void *source, int width, int height)
+ void reserved274(void)
}
declare 275 {
- Pixmap Tk_GetBitmapFromData(Tcl_Interp *interp,
- Tk_Window tkwin, const void *source, int width, int height)
+ void reserved275(void)
}
# Define the platform specific public Tk interface. These functions are
diff --git a/generic/tkBitmap.c b/generic/tkBitmap.c
index 675a42a..b0d1ecc 100644
--- a/generic/tkBitmap.c
+++ b/generic/tkBitmap.c
@@ -458,18 +458,6 @@ GetBitmap(
*/
int
-Tk_OldDefineBitmap(
- Tcl_Interp *interp, /* Interpreter to use for error reporting. */
- const char *name, /* Name to use for bitmap. Must not already be
- * defined as a bitmap. */
- const char *source, /* Address of bits for bitmap. */
- int width, /* Width of bitmap. */
- int height) /* Height of bitmap. */
-{
- return Tk_DefineBitmap(interp, name, source, width, height);
-}
-
-int
Tk_DefineBitmap(
Tcl_Interp *interp, /* Interpreter to use for error reporting. */
const char *name, /* Name to use for bitmap. Must not already be
@@ -814,16 +802,6 @@ DupBitmapObjProc(
/* ARGSUSED */
Pixmap
-Tk_OldGetBitmapFromData(
- Tcl_Interp *interp, /* Interpreter to use for error reporting. */
- Tk_Window tkwin, /* Window in which bitmap will be used. */
- const char *source, /* Bitmap data for bitmap shape. */
- int width, int height) /* Dimensions of bitmap. */
-{
- return Tk_GetBitmapFromData(interp, tkwin, source, width, height);
-}
-
-Pixmap
Tk_GetBitmapFromData(
Tcl_Interp *interp, /* Interpreter to use for error reporting. */
Tk_Window tkwin, /* Window in which bitmap will be used. */
diff --git a/generic/tkDecls.h b/generic/tkDecls.h
index fb949b2..d080e93 100644
--- a/generic/tkDecls.h
+++ b/generic/tkDecls.h
@@ -181,9 +181,8 @@ EXTERN Tk_Window Tk_CreateWindowFromPath(Tcl_Interp *interp,
Tk_Window tkwin, const char *pathName,
const char *screenName);
/* 44 */
-EXTERN int Tk_OldDefineBitmap(Tcl_Interp *interp,
- const char *name, const char *source,
- int width, int height);
+EXTERN int Tk_DefineBitmap(Tcl_Interp *interp, const char *name,
+ const void *source, int width, int height);
/* 45 */
EXTERN void Tk_DefineCursor(Tk_Window window, Tk_Cursor cursor);
/* 46 */
@@ -304,8 +303,8 @@ EXTERN CONST84_RETURN char * Tk_GetBinding(Tcl_Interp *interp,
EXTERN Pixmap Tk_GetBitmap(Tcl_Interp *interp, Tk_Window tkwin,
const char *str);
/* 86 */
-EXTERN Pixmap Tk_OldGetBitmapFromData(Tcl_Interp *interp,
- Tk_Window tkwin, const char *source,
+EXTERN Pixmap Tk_GetBitmapFromData(Tcl_Interp *interp,
+ Tk_Window tkwin, const void *source,
int width, int height);
/* 87 */
EXTERN int Tk_GetCapStyle(Tcl_Interp *interp, const char *str,
@@ -862,12 +861,9 @@ EXTERN void Tk_CreateOldImageType(const Tk_ImageType *typePtr);
EXTERN void Tk_CreateOldPhotoImageFormat(
const Tk_PhotoImageFormat *formatPtr);
/* 274 */
-EXTERN int Tk_DefineBitmap(Tcl_Interp *interp, const char *name,
- const void *source, int width, int height);
+EXTERN void reserved274(void);
/* 275 */
-EXTERN Pixmap Tk_GetBitmapFromData(Tcl_Interp *interp,
- Tk_Window tkwin, const void *source,
- int width, int height);
+EXTERN void reserved275(void);
typedef struct TkStubHooks {
const struct TkPlatStubs *tkPlatStubs;
@@ -924,7 +920,7 @@ typedef struct TkStubs {
void (*tk_CreateSelHandler) (Tk_Window tkwin, Atom selection, Atom target, Tk_SelectionProc *proc, ClientData clientData, Atom format); /* 41 */
Tk_Window (*tk_CreateWindow) (Tcl_Interp *interp, Tk_Window parent, const char *name, const char *screenName); /* 42 */
Tk_Window (*tk_CreateWindowFromPath) (Tcl_Interp *interp, Tk_Window tkwin, const char *pathName, const char *screenName); /* 43 */
- int (*tk_OldDefineBitmap) (Tcl_Interp *interp, const char *name, const char *source, int width, int height); /* 44 */
+ int (*tk_DefineBitmap) (Tcl_Interp *interp, const char *name, const void *source, int width, int height); /* 44 */
void (*tk_DefineCursor) (Tk_Window window, Tk_Cursor cursor); /* 45 */
void (*tk_DeleteAllBindings) (Tk_BindingTable bindingTable, ClientData object); /* 46 */
int (*tk_DeleteBinding) (Tcl_Interp *interp, Tk_BindingTable bindingTable, ClientData object, const char *eventStr); /* 47 */
@@ -966,7 +962,7 @@ typedef struct TkStubs {
CONST84_RETURN char * (*tk_GetAtomName) (Tk_Window tkwin, Atom atom); /* 83 */
CONST84_RETURN char * (*tk_GetBinding) (Tcl_Interp *interp, Tk_BindingTable bindingTable, ClientData object, const char *eventStr); /* 84 */
Pixmap (*tk_GetBitmap) (Tcl_Interp *interp, Tk_Window tkwin, const char *str); /* 85 */
- Pixmap (*tk_OldGetBitmapFromData) (Tcl_Interp *interp, Tk_Window tkwin, const char *source, int width, int height); /* 86 */
+ 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_GetColorByValue) (Tk_Window tkwin, XColor *colorPtr); /* 89 */
@@ -1154,8 +1150,8 @@ typedef struct TkStubs {
Tcl_Interp * (*tk_Interp) (Tk_Window tkwin); /* 271 */
void (*tk_CreateOldImageType) (const Tk_ImageType *typePtr); /* 272 */
void (*tk_CreateOldPhotoImageFormat) (const Tk_PhotoImageFormat *formatPtr); /* 273 */
- int (*tk_DefineBitmap) (Tcl_Interp *interp, const char *name, const void *source, int width, int height); /* 274 */
- Pixmap (*tk_GetBitmapFromData) (Tcl_Interp *interp, Tk_Window tkwin, const void *source, int width, int height); /* 275 */
+ void (*reserved274) (void); /* 274 */
+ void (*reserved275) (void); /* 275 */
} TkStubs;
#ifdef __cplusplus
@@ -1260,8 +1256,8 @@ extern const TkStubs *tkStubsPtr;
(tkStubsPtr->tk_CreateWindow) /* 42 */
#define Tk_CreateWindowFromPath \
(tkStubsPtr->tk_CreateWindowFromPath) /* 43 */
-#define Tk_OldDefineBitmap \
- (tkStubsPtr->tk_OldDefineBitmap) /* 44 */
+#define Tk_DefineBitmap \
+ (tkStubsPtr->tk_DefineBitmap) /* 44 */
#define Tk_DefineCursor \
(tkStubsPtr->tk_DefineCursor) /* 45 */
#define Tk_DeleteAllBindings \
@@ -1344,8 +1340,8 @@ extern const TkStubs *tkStubsPtr;
(tkStubsPtr->tk_GetBinding) /* 84 */
#define Tk_GetBitmap \
(tkStubsPtr->tk_GetBitmap) /* 85 */
-#define Tk_OldGetBitmapFromData \
- (tkStubsPtr->tk_OldGetBitmapFromData) /* 86 */
+#define Tk_GetBitmapFromData \
+ (tkStubsPtr->tk_GetBitmapFromData) /* 86 */
#define Tk_GetCapStyle \
(tkStubsPtr->tk_GetCapStyle) /* 87 */
#define Tk_GetColor \
@@ -1718,10 +1714,10 @@ extern const TkStubs *tkStubsPtr;
(tkStubsPtr->tk_CreateOldImageType) /* 272 */
#define Tk_CreateOldPhotoImageFormat \
(tkStubsPtr->tk_CreateOldPhotoImageFormat) /* 273 */
-#define Tk_DefineBitmap \
- (tkStubsPtr->tk_DefineBitmap) /* 274 */
-#define Tk_GetBitmapFromData \
- (tkStubsPtr->tk_GetBitmapFromData) /* 275 */
+#define reserved274 \
+ (tkStubsPtr->reserved274) /* 274 */
+#define reserved275 \
+ (tkStubsPtr->reserved275) /* 275 */
#endif /* defined(USE_TK_STUBS) */
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index 4bdc955..271243e 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -226,6 +226,9 @@ void TkSubtractRegion (TkRegion a, TkRegion b, TkRegion c)
# endif
#endif /* !__WIN32__ */
+#define reserved274 (void (*)(void)) Tk_DefineBitmap
+#define reserved275 (void (*)(void)) Tk_GetBitmapFromData
+
/*
* WARNING: The contents of this file is automatically generated by the
* tools/genStubs.tcl script. Any modifications to the function declarations
@@ -873,7 +876,7 @@ const TkStubs tkStubs = {
Tk_CreateSelHandler, /* 41 */
Tk_CreateWindow, /* 42 */
Tk_CreateWindowFromPath, /* 43 */
- Tk_OldDefineBitmap, /* 44 */
+ Tk_DefineBitmap, /* 44 */
Tk_DefineCursor, /* 45 */
Tk_DeleteAllBindings, /* 46 */
Tk_DeleteBinding, /* 47 */
@@ -915,7 +918,7 @@ const TkStubs tkStubs = {
Tk_GetAtomName, /* 83 */
Tk_GetBinding, /* 84 */
Tk_GetBitmap, /* 85 */
- Tk_OldGetBitmapFromData, /* 86 */
+ Tk_GetBitmapFromData, /* 86 */
Tk_GetCapStyle, /* 87 */
Tk_GetColor, /* 88 */
Tk_GetColorByValue, /* 89 */
@@ -1103,8 +1106,8 @@ const TkStubs tkStubs = {
Tk_Interp, /* 271 */
Tk_CreateOldImageType, /* 272 */
Tk_CreateOldPhotoImageFormat, /* 273 */
- Tk_DefineBitmap, /* 274 */
- Tk_GetBitmapFromData, /* 275 */
+ reserved274, /* 274 */
+ reserved275, /* 275 */
};
/* !END!: Do not edit above this line. */