diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-03-16 14:58:17 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-03-16 14:58:17 (GMT) |
commit | 5702dc4a124c62207657dbb7418d9598d7b67c74 (patch) | |
tree | a8eb26838f34f3020ea9671d0b0b538f2630faca /generic/tk.h | |
parent | 25a825038ad9dc9220d97abbc78af164842e5885 (diff) | |
parent | 311812328b789a5546a79cbb62a73ce5e3a83c82 (diff) | |
download | tk-5702dc4a124c62207657dbb7418d9598d7b67c74.zip tk-5702dc4a124c62207657dbb7418d9598d7b67c74.tar.gz tk-5702dc4a124c62207657dbb7418d9598d7b67c74.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic/tk.h')
-rw-r--r-- | generic/tk.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/generic/tk.h b/generic/tk.h index cb385ee..7f74434 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -1437,6 +1437,36 @@ typedef int (Tk_ImageStringWriteProc) (Tcl_Interp *interp, Tcl_Obj *format, #endif /* USE_OLD_IMAGE */ /* + * The following alternate definitions are used with the Tk8.7 file format + * supporting a metadata dict, internal dstring and close file flag + */ + +typedef struct Tk_PhotoImageFormatVersion3 Tk_PhotoImageFormatVersion3; +typedef int (Tk_ImageFileMatchProcVersion3) (Tcl_Interp *interp, + Tcl_Channel chan, const char *fileName, Tcl_Obj *format, + Tcl_Obj *metadataIn, int *widthPtr, int *heightPtr, + Tcl_Obj *metadataOut); +typedef int (Tk_ImageStringMatchProcVersion3) (Tcl_Interp *interp, + Tcl_Obj *dataObj, Tcl_Obj *format, Tcl_Obj *metadataIn, int *widthPtr, + int *heightPtr, Tcl_Obj *metadataOut); +typedef int (Tk_ImageFileReadProcVersion3) (Tcl_Interp *interp, + Tcl_Channel chan, + const char *fileName, Tcl_Obj *format, Tcl_Obj *metadataIn, + Tk_PhotoHandle imageHandle, + int destX, int destY, int width, int height, int srcX, int srcY, + Tcl_Obj *metadataOut); +typedef int (Tk_ImageStringReadProcVersion3) (Tcl_Interp *interp, + Tcl_Obj *dataObj, Tcl_Obj *format, Tcl_Obj *metadataIn, + Tk_PhotoHandle imageHandle, int destX, int destY, int width, int height, + int srcX, int srcY, Tcl_Obj *metadataOut); +typedef int (Tk_ImageFileWriteProcVersion3) (Tcl_Interp *interp, + const char *fileName, Tcl_Obj *format, Tcl_Obj *metadataIn, + Tk_PhotoImageBlock *blockPtr); +typedef int (Tk_ImageStringWriteProcVersion3) (Tcl_Interp *interp, + Tcl_Obj *format, Tcl_Obj *metadataIn, Tk_PhotoImageBlock *blockPtr); + + +/* * The following structure represents a particular file format for storing * images (e.g., PPM, GIF, JPEG, etc.). It provides information to allow image * files of that format to be recognized and read into a photo image. @@ -1468,6 +1498,38 @@ struct Tk_PhotoImageFormat { * currently known. Filled in by Tk, not by * image format handler. */ }; + +/* + * The following structure is the same plus added support for the metadata + * structure. + */ + +struct Tk_PhotoImageFormatVersion3 { + const char *name; /* Name of image file format */ + Tk_ImageFileMatchProcVersion3 *fileMatchProc; + /* Procedure to call to determine whether an + * image file matches this format. */ + Tk_ImageStringMatchProcVersion3 *stringMatchProc; + /* Procedure to call to determine whether the + * data in a string matches this format. */ + Tk_ImageFileReadProcVersion3 *fileReadProc; + /* Procedure to call to read data from an + * image file into a photo image. */ + Tk_ImageStringReadProcVersion3 *stringReadProc; + /* Procedure to call to read data from a + * string into a photo image. */ + Tk_ImageFileWriteProcVersion3 *fileWriteProc; + /* Procedure to call to write data from a + * photo image to a file. */ + Tk_ImageStringWriteProcVersion3 *stringWriteProc; + /* Procedure to call to obtain a string + * representation of the data in a photo + * image.*/ + struct Tk_PhotoImageFormatVersion3 *nextPtr; + /* Next in list of all photo image formats + * currently known. Filled in by Tk, not by + * image format handler. */ +}; /* *---------------------------------------------------------------------- |