From: A S <lio...@us...> - 2004-12-30 04:42:48
|
Update of /cvsroot/amsn/msn/utils/TkCximage/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19701/utils/TkCximage/src Modified Files: PhotoFormat.cpp TkCximage.cpp procs.cpp Log Message: tk8.3 compatibility Index: TkCximage.cpp =================================================================== RCS file: /cvsroot/amsn/msn/utils/TkCximage/src/TkCximage.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TkCximage.cpp 26 Dec 2004 22:25:18 -0000 1.3 --- TkCximage.cpp 30 Dec 2004 04:42:38 -0000 1.4 *************** *** 124,128 **** ! Return value : TCL_OK in case everything is ok, or TCL_ERROR in case there is an error (Tk version < 8.4) Comments : hummmm... not much, it's simple :) --- 124,128 ---- ! Return value : TCL_OK in case everything is ok, or TCL_ERROR in case there is an error (Tk version < 8.3) Comments : hummmm... not much, it's simple :) *************** *** 142,147 **** }; ! //Check TK version is 8.0 or higher ! if (Tk_InitStubs(interp, "8.4", 0) == NULL) { return TCL_ERROR; } --- 142,147 ---- }; ! //Check TK version is 8.3 or higher ! if (Tk_InitStubs(interp, "8.3", 0) == NULL) { return TCL_ERROR; } Index: PhotoFormat.cpp =================================================================== RCS file: /cvsroot/amsn/msn/utils/TkCximage/src/PhotoFormat.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PhotoFormat.cpp 29 Dec 2004 05:35:36 -0000 1.5 --- PhotoFormat.cpp 30 Dec 2004 04:42:38 -0000 1.6 *************** *** 138,141 **** --- 138,144 ---- block.offset[3] = 3; + #if TK_MINOR_VERSION == 3 + Tk_PhotoPutBlock(imageHandle, &block, destX, destY, width, height); + #else #if TK_MINOR_VERSION == 4 Tk_PhotoPutBlock(imageHandle, &block, destX, destY, width, height, TK_PHOTO_COMPOSITE_OVERLAY); *************** *** 145,148 **** --- 148,152 ---- #endif #endif + #endif image.FreeMemory(buffer); Index: procs.cpp =================================================================== RCS file: /cvsroot/amsn/msn/utils/TkCximage/src/procs.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** procs.cpp 26 Dec 2004 22:25:18 -0000 1.3 --- procs.cpp 30 Dec 2004 04:42:38 -0000 1.4 *************** *** 157,160 **** --- 157,163 ---- Tk_PhotoBlank(Photo); + #if TK_MINOR_VERSION == 3 + Tk_PhotoSetSize(Photo, width, height); + #else #if TK_MINOR_VERSION == 4 Tk_PhotoSetSize(Photo, width, height); *************** *** 164,167 **** --- 167,171 ---- #endif #endif + #endif *************** *** 195,198 **** --- 199,205 ---- block.offset[3] = 3; + #if TK_MINOR_VERSION == 3 + Tk_PhotoPutBlock(Photo, &block, 0, 0, width, height); + #else #if TK_MINOR_VERSION == 4 Tk_PhotoPutBlock(Photo, &block, 0, 0, width, height, TK_PHOTO_COMPOSITE_OVERLAY); *************** *** 202,206 **** #endif #endif ! image.FreeMemory(buffer); --- 209,214 ---- #endif #endif ! #endif ! image.FreeMemory(buffer); *************** *** 306,309 **** --- 314,320 ---- Tk_PhotoBlank(Photo); + #if TK_MINOR_VERSION == 3 + Tk_PhotoSetSize(Photo, width, height); + #else #if TK_MINOR_VERSION == 4 Tk_PhotoSetSize(Photo, width, height); *************** *** 313,316 **** --- 324,328 ---- #endif #endif + #endif *************** *** 342,345 **** --- 354,360 ---- block.offset[3] = 3; + #if TK_MINOR_VERSION == 3 + Tk_PhotoPutBlock(Photo, &block, 0, 0, width, height); + #else #if TK_MINOR_VERSION == 4 Tk_PhotoPutBlock(Photo, &block, 0, 0, width, height, TK_PHOTO_COMPOSITE_OVERLAY); *************** *** 349,352 **** --- 364,368 ---- #endif #endif + #endif image.FreeMemory(buffer); |