diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkImgPhoto.c | 33 | ||||
-rw-r--r-- | generic/tkInt.decls | 6 | ||||
-rw-r--r-- | generic/tkIntDecls.h | 10 | ||||
-rw-r--r-- | generic/tkStubInit.c | 3 |
4 files changed, 48 insertions, 4 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 4084fc5..42647eb 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -15,7 +15,7 @@ * Department of Computer Science, * Australian National University. * - * RCS: @(#) $Id: tkImgPhoto.c,v 1.21 2000/08/21 22:45:15 ericm Exp $ + * RCS: @(#) $Id: tkImgPhoto.c,v 1.22 2000/11/21 16:18:05 dkf Exp $ */ #include "tkInt.h" @@ -4694,6 +4694,37 @@ Tk_PhotoSetSize(handle, width, height) /* *---------------------------------------------------------------------- * + * 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 --git a/generic/tkInt.decls b/generic/tkInt.decls index 2269f21..94112c1 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tkInt.decls,v 1.17 2000/04/10 22:43:11 ericm Exp $ +# RCS: @(#) $Id: tkInt.decls,v 1.18 2000/11/21 16:18:05 dkf Exp $ library tk @@ -632,6 +632,10 @@ declare 139 generic { void TkpInitKeymapInfo (TkDisplay *dispPtr) } +declare 140 generic { + TkRegion TkPhotoGetValidRegion (Tk_PhotoHandle handle) +} + ############################################################################## # Define the platform specific internal Tcl interface. These functions are diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h index 07d8cfd..4ae9367 100644 --- a/generic/tkIntDecls.h +++ b/generic/tkIntDecls.h @@ -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: tkIntDecls.h,v 1.10 2000/04/10 22:43:12 ericm Exp $ + * RCS: @(#) $Id: tkIntDecls.h,v 1.11 2000/11/21 16:18:05 dkf Exp $ */ #ifndef _TKINTDECLS @@ -515,6 +515,9 @@ EXTERN KeySym TkpGetKeySym _ANSI_ARGS_((TkDisplay * dispPtr, /* 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,6 +822,7 @@ typedef struct TkIntStubs { 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 @@ -1471,6 +1475,10 @@ extern TkIntStubs *tkIntStubsPtr; #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 --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 2fe2b7f..560fbb2 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkStubInit.c,v 1.24 2000/10/05 18:31:26 ericm Exp $ + * RCS: @(#) $Id: tkStubInit.c,v 1.25 2000/11/21 16:18:05 dkf Exp $ */ #include "tkInt.h" @@ -347,6 +347,7 @@ TkIntStubs tkIntStubs = { TkpSetKeycodeAndState, /* 137 */ TkpGetKeySym, /* 138 */ TkpInitKeymapInfo, /* 139 */ + TkPhotoGetValidRegion, /* 140 */ }; TkIntPlatStubs tkIntPlatStubs = { |