(original) (raw)

diff -rc tk8.4a1.ORIGINAL/generic/tkImgPhoto.c tk8.4a1/generic/tkImgPhoto.c *** tk8.4a1.ORIGINAL/generic/tkImgPhoto.c Tue Apr 25 02:03:06 2000 --- tk8.4a1/generic/tkImgPhoto.c Fri Jun 23 09:54:54 2000 *************** *** 4704,4709 **** --- 4704,4739 ---- /* *---------------------------------------------------------------------- * + * TkGetPhotoValidRegion -- + * + * This procedure is called to get the part of the photo where + * there is valid data. Or, conversely, the part of the photo + * which is transparent. + * + * Results: + * A TkRegion value that indicates the current area of the photo + * that is valid. This value should not be used after any + * modification to the photo image. + * + * Side Effects: + * None. + * + *---------------------------------------------------------------------- + */ + TkRegion + TkPhotoGetValidRegion(handle) + Tk_PhotoHandle handle; /* Handle for the image whose valid region + * is to obtained. */ + { + PhotoMaster *masterPtr; + + masterPtr = (PhotoMaster *) handle; + return masterPtr->validRegion; + } + + /* + *---------------------------------------------------------------------- + * * ImgGetPhoto -- * * This procedure is called to obtain image data from a photo diff -rc tk8.4a1.ORIGINAL/generic/tkInt.decls tk8.4a1/generic/tkInt.decls *** tk8.4a1.ORIGINAL/generic/tkInt.decls Mon Apr 10 23:43:11 2000 --- tk8.4a1/generic/tkInt.decls Fri Jun 23 09:54:55 2000 *************** *** 632,637 **** --- 632,641 ---- void TkpInitKeymapInfo (TkDisplay *dispPtr) } + declare 140 generic { + TkRegion TkPhotoGetValidRegion (Tk_PhotoHandle handle) + } + ############################################################################## # Define the platform specific internal Tcl interface. These functions are diff -rc tk8.4a1.ORIGINAL/generic/tkIntDecls.h tk8.4a1/generic/tkIntDecls.h *** tk8.4a1.ORIGINAL/generic/tkIntDecls.h Mon Apr 10 23:43:12 2000 --- tk8.4a1/generic/tkIntDecls.h Fri Jun 23 09:59:52 2000 *************** *** 515,520 **** --- 515,523 ---- /* 139 */ EXTERN void TkpInitKeymapInfo _ANSI_ARGS_((TkDisplay * dispPtr)); + /* 140 */ + EXTERN TkRegion TkPhotoGetValidRegion _ANSI_ARGS_((Tk_PhotoHandle handle)); + typedef struct TkIntStubs { int magic; struct TkIntStubHooks *hooks; *************** *** 819,824 **** --- 822,828 ---- void (*tkpSetKeycodeAndState) _ANSI_ARGS_((Tk_Window tkwin, KeySym keySym, XEvent * eventPtr)); /* 137 */ KeySym (*tkpGetKeySym) _ANSI_ARGS_((TkDisplay * dispPtr, XEvent * eventPtr)); /* 138 */ void (*tkpInitKeymapInfo) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 139 */ + TkRegion (*tkPhotoGetValidRegion) _ANSI_ARGS_((Tk_PhotoHandle handle)); /* 140 */ } TkIntStubs; #ifdef __cplusplus *************** *** 1470,1475 **** --- 1474,1483 ---- #ifndef TkpInitKeymapInfo #define TkpInitKeymapInfo \ (tkIntStubsPtr->tkpInitKeymapInfo) /* 139 */ + #endif + #ifndef TkPhotoGetValidRegion + #define TkPhotoGetValidRegion \ + (tkIntStubsPtr->tkPhotoGetValidRegion) /* 140 */ #endif #endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */ diff -rc tk8.4a1.ORIGINAL/generic/tkStubInit.c tk8.4a1/generic/tkStubInit.c *** tk8.4a1.ORIGINAL/generic/tkStubInit.c Sat Jun 3 09:58:16 2000 --- tk8.4a1/generic/tkStubInit.c Fri Jun 23 10:02:17 2000 *************** *** 347,352 **** --- 347,353 ---- TkpSetKeycodeAndState, /* 137 */ TkpGetKeySym, /* 138 */ TkpInitKeymapInfo, /* 139 */ + TkPhotoGetValidRegion, /* 140 */ }; TkIntPlatStubs tkIntPlatStubs = {