head	1.12;
access;
symbols
	core-8-5-9:1.10
	core-8-5-8:1.10
	macosx-cocoa-merge:1.12
	macosx-cocoa-premerge:1.12
	macosx-carbon-freeze:1.12
	core-8-5-7:1.10
	core-8-5-6:1.10
	core-8-6-b1:1.12
	core-8-6-a3:1.11
	core-8-5-5:1.10
	core-8-6-a2:1.11
	core-8-5-4:1.10
	core-8-5-3:1.10
	core-8-6-a1:1.10
	core-8-4-19:1.5
	core-8-5-branch:1.10.0.2
	core-8-5-2:1.10
	core-8-4-18:1.5
	core-8-5-1:1.10
	core-8-4-17:1.5
	core-8-5-0:1.10
	core-8-5-b3:1.8
	core-8-5-b2:1.8
	core-8-4-16:1.5
	core-8-5-b1:1.8
	core-stablilizer-merge:1.8
	core-stabilizer-branch:1.8.0.2
	core-stabilizer-merge:1.10
	core-8-4-15:1.5
	core-8-5-a6:1.7
	core-8-5-a5:1.6
	core-8-4-14:1.5
	core-8-5-a4:1.6
	core-8-4-13:1.5
	core-8-4-12:1.5
	core-8-4-11:1.5
	core-8-5-a3:1.6
	core-8-4-10:1.5
	core-8-4-9-branch:1.5.0.8
	core-8-5-a2:1.6
	core-8-4-9:1.5
	core-8-4-8:1.5
	core-8-4-7:1.5
	core-8-5-a1:1.5
	core-8-4-6:1.5
	core-8-4-5:1.5
	mistachkin-dev-branch:1.5.0.6
	core-8-4-4:1.5
	core-8-4-3:1.5
	core-8-4-branch:1.5.0.4
	core-8-4-2:1.5
	core-8-4-1:1.5
	core-8-3-5:1.4
	core-8-4-0:1.5
	macosx-8-4-merge-2002-08-31-trunk:1.5
	macosx-8-4-premerge-2002-08-31-branch:1.5
	macosx-8-4-premerge-2002-08-31-trunk:1.5
	macosx-8-4-merge-2002-08-30-branch:1.5
	macosx-8-4-merge-2002-08-30-trunk:1.5
	macosx-8-4-merge-2002-08-20-branch:1.5
	macosx-8-4-merge-2002-08-20-trunk:1.5
	core-8-4-b2:1.5
	core-8-4-b1:1.5
	macosx-premerge-6-9-02:1.5
	core-8-4-a4:1.5
	core-8-3-4:1.4
	macosx-8-4-branch:1.5.0.2
	macosx-8-4-branchpoint:1.5
	core-8-4-a3:1.4
	core-8-3-3:1.4
	dgp-privates-into-namespace:1.4.0.6
	tclpro-1-5-0:1.4
	core-8-4-win-speedup:1.4.0.4
	core-8-4-a2:1.4
	tclpro-1-4-1:1.4
	tclpro-1-4-0:1.4
	core-8-3-2:1.4
	ajuba-ajuba2-2-1-base:1.4
	ajuba-ajuba2-2-0:1.4
	core-8-4-a1:1.4
	core-8-3-1-branch:1.4.0.2
	core-8-3-1:1.4
	scriptics-sc-2-0-b5:1.4
	scriptics-sc-2-0-fixed:1.4
	scriptics-sc-2-0-b2:1.4
	scriptics-sc-2-0-b1:1.4
	core-8-3-0:1.4
	core-8-3-b2:1.3
	core-8-3-b1:1.3
	scriptics-sc-1-1:1.2
	scriptics-sc-1-1-b1:1.2
	core-8-2-3:1.2
	scriptics-sc-1-1-branch:1.2.0.16
	scriptics-sc-1-1-base:1.2
	scriptics-sc-1-0:1.2
	scriptics-sc-1-0-branch:1.2.0.14
	scriptics-sc-1-0-base:1.2
	core-8-2-2:1.2
	core-8-2-1:1.2
	scriptics-bc-1-0-b1:1.2
	core-8-2-1-branch:1.2.0.12
	scriptics-tclpro-1-3-0:1.2
	core-8-2-0:1.2
	core-8-2-b3-branch:1.2.0.10
	core-8-2-b3-base:1.2
	scriptics-tclpro-1-3-b4:1.2
	core-8-2-b2:1.2
	scriptics-tclpro-1-3-b3:1.2
	core-8-2-b1:1.2
	scriptics-tclpro-1-3-b2:1.2
	merge-to-mainline-5/21/99:1.2
	scriptics-tclpro-1-3-b2-branch:1.2.0.8
	core-8-1-1:1.2
	scriptics-tclpro-1-3-b1:1.2
	core-8-1-1-base:1.2
	core-8-1-0:1.2
	merge-to-mainline-4-29-99:1.2
	merge-to-mainline-4-23-99:1.2
	core-8-1-branch-old:1.1.0.4
	core-8-0-6-branch:1.2.0.6
	core-8-0-6-base:1.2
	core-8-0-5:1.2
	core-8-1-b3:1.1.4.1
	core-8-1-b2:1.1.4.1
	dev-8-1-stubs-branch:1.1.4.1.0.2
	dev-stubs-branch:1.2.0.4
	scriptics-tclpro-1-2:1.2
	scriptics-tclpro-1-2-b2:1.2
	core-8-1-merge-2/10/99:1.2
	core-8-0-5-branch:1.2.0.2
	core-8-0-5-base:1.2
	scriptics-tclpro-1-2-b1:1.2
	scriptics-tclpro-1-2-a1:1.2
	core-8-1-b1:1.1.4.1
	core-8-0-4:1.2
	core-8-1-a2:1.1
	core-8-0-2:1.1
	core-8-0-3:1.2;
locks; strict;
comment	@# @;


1.12
date	2008.11.09.23.16.56;	author nijtmans;	state Exp;
branches;
next	1.11;

1.11
date	2008.06.30.22.57.01;	author dkf;	state Exp;
branches;
next	1.10;

1.10
date	2007.12.13.15.23.42;	author dgp;	state Exp;
branches;
next	1.9;

1.9
date	2007.12.10.16.21.48;	author jenglish;	state Exp;
branches;
next	1.8;

1.8
date	2007.05.14.20.58.25;	author dgp;	state Exp;
branches
	1.8.2.1;
next	1.7;

1.7
date	2007.01.05.00.00.49;	author nijtmans;	state Exp;
branches;
next	1.6;

1.6
date	2004.09.19.16.05.36;	author dkf;	state Exp;
branches;
next	1.5;

1.5
date	2001.08.23.19.11.22;	author hobbs;	state Exp;
branches;
next	1.4;

1.4
date	2000.02.08.11.31.30;	author hobbs;	state Exp;
branches
	1.4.4.1;
next	1.3;

1.3
date	99.10.29.03.57.40;	author hobbs;	state Exp;
branches;
next	1.2;

1.2
date	98.09.14.18.22.47;	author stanton;	state Exp;
branches;
next	1.1;

1.1
date	98.04.01.09.40.01;	author rjohnson;	state Exp;
branches
	1.1.4.1;
next	;

1.1.4.1
date	98.09.30.02.15.49;	author stanton;	state Exp;
branches;
next	;

1.4.4.1
date	2002.04.02.20.57.53;	author hobbs;	state Exp;
branches;
next	;

1.8.2.1
date	2007.12.10.18.39.27;	author dgp;	state Exp;
branches;
next	;


desc
@@


1.12
log
@One more (hopefully the last) signature change
in Tk_CreatePhotoImageFormat
@
text
@'\"
'\" Copyright (c) 1994 The Australian National University
'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" Author: Paul Mackerras (paulus@@cs.anu.edu.au),
'\"	    Department of Computer Science,
'\"	    Australian National University.
'\"
'\" RCS: @@(#) $Id: CrtPhImgFmt.3,v 1.11 2008/06/30 22:57:01 dkf Exp $
'\"
.so man.macros
.TH Tk_CreatePhotoImageFormat 3 8.5 Tk "Tk Library Procedures"
.BS
.SH NAME
Tk_CreatePhotoImageFormat \- define new file format for photo images
.SH SYNOPSIS
.nf
\fB#include <tk.h>\fR
.sp
\fBTk_CreatePhotoImageFormat\fR(\fIformatPtr\fR)
.SH ARGUMENTS
.AS "const Tk_PhotoImageFormat" *formatPtr
.AP "const Tk_PhotoImageFormat" *formatPtr in
Structure that defines the new file format.
.BE
.SH DESCRIPTION
.PP
\fBTk_CreatePhotoImageFormat\fR is invoked to define a new file format
for image data for use with photo images.  The code that implements an
image file format is called an image file format handler, or
handler for short.  The photo image code
maintains a list of handlers that can be used to read and
write data to or from a file.  Some handlers may also
support reading image data from a string or converting image data to a
string format.
The user can specify which handler to use with the \fB\-format\fR
image configuration option or the \fB\-format\fR option to the
\fBread\fR and \fBwrite\fR photo image subcommands.
.PP
An image file format handler consists of a collection of procedures
plus a Tk_PhotoImageFormat structure, which contains the name of the
image file format and pointers to six procedures provided by the
handler to deal with files and strings in this format.  The
Tk_PhotoImageFormat structure contains the following fields:
.CS
typedef struct Tk_PhotoImageFormat {
    const char *\fIname\fR;
    Tk_ImageFileMatchProc *\fIfileMatchProc\fR;
    Tk_ImageStringMatchProc *\fIstringMatchProc\fR;
    Tk_ImageFileReadProc *\fIfileReadProc\fR;
    Tk_ImageStringReadProc *\fIstringReadProc\fR;
    Tk_ImageFileWriteProc *\fIfileWriteProc\fR;
    Tk_ImageStringWriteProc *\fIstringWriteProc\fR;
} \fBTk_PhotoImageFormat\fR;
.CE
.PP
The handler need not provide implementations of all six procedures.
For example, the procedures that handle string data would not be
provided for a format in which the image data are stored in binary,
and could therefore contain null characters.  If any procedure is not
implemented, the corresponding pointer in the Tk_PhotoImageFormat
structure should be set to NULL.  The handler must provide the
\fIfileMatchProc\fR procedure if it provides the \fIfileReadProc\fR
procedure, and the \fIstringMatchProc\fR procedure if it provides the
\fIstringReadProc\fR procedure.
.SS NAME
.PP
\fIformatPtr->name\fR provides a name for the image type.
Once \fBTk_CreatePhotoImageFormat\fR returns, this name may be used
in the \fB\-format\fR photo image configuration and subcommand option.
The manual page for the photo image (photo(n)) describes how image
file formats are chosen based on their names and the value given to
the \fB\-format\fR option. The first character of \fIformatPtr->name\fR
must not be an uppercase character from the ASCII character set
(that is, one of the characters \fBA\fR-\fBZ\fR).  Such names are used
only for legacy interface support (see below).
.SS FILEMATCHPROC
.PP
\fIformatPtr->fileMatchProc\fR provides the address of a procedure for
Tk to call when it is searching for an image file format handler
suitable for reading data in a given file.
\fIformatPtr->fileMatchProc\fR must match the following prototype:
.CS
typedef int \fBTk_ImageFileMatchProc\fR(
        Tcl_Channel \fIchan\fR,
        const char *\fIfileName\fR,
        Tcl_Obj *\fIformat\fR,
        int *\fIwidthPtr\fR,
        int *\fIheightPtr\fR,
        Tcl_Interp *\fIinterp\fR);
.CE
The \fIfileName\fR argument is the name of the file containing the
image data, which is open for reading as \fIchan\fR.  The
\fIformat\fR argument contains the value given for the
\fB\-format\fR option, or NULL if the option was not specified.
If the data in the file appears to be in the format supported by this
handler, the \fIformatPtr->fileMatchProc\fR procedure should store the
width and height of the image in *\fIwidthPtr\fR and *\fIheightPtr\fR
respectively, and return 1.  Otherwise it should return 0.
.SS STRINGMATCHPROC
.PP
\fIformatPtr->stringMatchProc\fR provides the address of a procedure for
Tk to call when it is searching for an image file format handler for
suitable for reading data from a given string.
\fIformatPtr->stringMatchProc\fR must match the following prototype:
.CS
typedef int \fBTk_ImageStringMatchProc\fR(
        Tcl_Obj *\fIdata\fR,
        Tcl_Obj *\fIformat\fR,
        int *\fIwidthPtr\fR,
        int *\fIheightPtr\fR,
        Tcl_Interp *\fIinterp\fR);
.CE
The \fIdata\fR argument points to the object containing the image
data.  The \fIformat\fR argument contains the value given for
the \fB\-format\fR option, or NULL if the option was not specified.
If the data in the string appears to be in the format supported by
this handler, the \fIformatPtr->stringMatchProc\fR procedure should
store the width and height of the image in *\fIwidthPtr\fR and
*\fIheightPtr\fR respectively, and return 1.  Otherwise it should
return 0.
.SS FILEREADPROC
.PP
\fIformatPtr->fileReadProc\fR provides the address of a procedure for
Tk to call to read data from an image file into a photo image.
\fIformatPtr->fileReadProc\fR must match the following prototype:
.CS
typedef int \fBTk_ImageFileReadProc\fR(
        Tcl_Interp *\fIinterp\fR,
        Tcl_Channel \fIchan\fR,
        const char *\fIfileName\fR,
        Tcl_Obj *\fIformat\fR,
        PhotoHandle \fIimageHandle\fR,
        int \fIdestX\fR, int \fIdestY\fR,
        int \fIwidth\fR, int \fIheight\fR,
        int \fIsrcX\fR, int \fIsrcY\fR);
.CE
The \fIinterp\fR argument is the interpreter in which the command was
invoked to read the image; it should be used for reporting errors.
The image data is in the file named \fIfileName\fR, which is open for
reading as \fIchan\fR.  The \fIformat\fR argument contains the
value given for the \fB\-format\fR option, or NULL if the option was
not specified.  The image data in the file, or a subimage of it, is to
be read into the photo image identified by the handle
\fIimageHandle\fR.  The subimage of the data in the file is of
dimensions \fIwidth\fR x \fIheight\fR and has its top-left corner at
coordinates (\fIsrcX\fR,\fIsrcY\fR).  It is to be stored in the photo
image with its top-left corner at coordinates
(\fIdestX\fR,\fIdestY\fR) using the \fBTk_PhotoPutBlock\fR procedure.
The return value is a standard Tcl return value.
.SS STRINGREADPROC
.PP
\fIformatPtr->stringReadProc\fR provides the address of a procedure for
Tk to call to read data from a string into a photo image.
\fIformatPtr->stringReadProc\fR must match the following prototype:
.CS
typedef int \fBTk_ImageStringReadProc\fR(
        Tcl_Interp *\fIinterp\fR,
        Tcl_Obj *\fIdata\fR,
        Tcl_Obj *\fIformat\fR,
        PhotoHandle \fIimageHandle\fR,
        int \fIdestX\fR, int \fIdestY\fR,
        int \fIwidth\fR, int \fIheight\fR,
        int \fIsrcX\fR, int \fIsrcY\fR);
.CE
The \fIinterp\fR argument is the interpreter in which the command was
invoked to read the image; it should be used for reporting errors.
The \fIdata\fR argument points to the image data in object form.
The \fIformat\fR argument contains the
value given for the \fB\-format\fR option, or NULL if the option was
not specified.  The image data in the string, or a subimage of it, is to
be read into the photo image identified by the handle
\fIimageHandle\fR.  The subimage of the data in the string is of
dimensions \fIwidth\fR x \fIheight\fR and has its top-left corner at
coordinates (\fIsrcX\fR,\fIsrcY\fR).  It is to be stored in the photo
image with its top-left corner at coordinates
(\fIdestX\fR,\fIdestY\fR) using the \fBTk_PhotoPutBlock\fR procedure.
The return value is a standard Tcl return value.
.SS FILEWRITEPROC
.PP
\fIformatPtr->fileWriteProc\fR provides the address of a procedure for
Tk to call to write data from a photo image to a file.
\fIformatPtr->fileWriteProc\fR must match the following prototype:
.CS
typedef int \fBTk_ImageFileWriteProc\fR(
        Tcl_Interp *\fIinterp\fR,
        const char *\fIfileName\fR,
        Tcl_Obj *\fIformat\fR,
        Tk_PhotoImageBlock *\fIblockPtr\fR);
.CE
The \fIinterp\fR argument is the interpreter in which the command was
invoked to write the image; it should be used for reporting errors.
The image data to be written are in memory and are described by the
Tk_PhotoImageBlock structure pointed to by \fIblockPtr\fR; see the
manual page FindPhoto(3) for details.  The \fIfileName\fR argument
points to the string giving the name of the file in which to write the
image data.  The \fIformat\fR argument contains the
value given for the \fB\-format\fR option, or NULL if the option was
not specified.  The format string can contain extra characters
after the name of the format.  If appropriate, the
\fIformatPtr->fileWriteProc\fR procedure may interpret these
characters to specify further details about the image file.
The return value is a standard Tcl return value.
.SS STRINGWRITEPROC
.PP
\fIformatPtr->stringWriteProc\fR provides the address of a procedure for
Tk to call to translate image data from a photo image into a string.
\fIformatPtr->stringWriteProc\fR must match the following prototype:
.CS
typedef int \fBTk_ImageStringWriteProc\fR(
        Tcl_Interp *\fIinterp\fR,
        Tcl_Obj *\fIformat\fR,
        Tk_PhotoImageBlock *\fIblockPtr\fR);
.CE
The \fIinterp\fR argument is the interpreter in which the command was
invoked to convert the image; it should be used for reporting errors.
The image data to be converted are in memory and are described by the
Tk_PhotoImageBlock structure pointed to by \fIblockPtr\fR; see the
manual page FindPhoto(3) for details.  The data for the string
should be put in the interpreter \fIinterp\fR result.
The \fIformat\fR argument contains the
value given for the \fB\-format\fR option, or NULL if the option was
not specified.  The format string can contain extra characters
after the name of the format.  If appropriate, the
\fIformatPtr->stringWriteProc\fR procedure may interpret these
characters to specify further details about the image file.
The return value is a standard Tcl return value.
.SH "LEGACY INTERFACE SUPPORT"
.PP
In Tk 8.2 and earlier, the definition of all the function pointer
types stored in fields of a \fBTk_PhotoImageFormat\fR struct were
incompatibly different.  Legacy programs and libraries dating from
those days may still contain code that defines extended Tk photo image
formats using the old interface.  The Tk header file will still support
this legacy interface if the code is compiled with the
macro \fBUSE_OLD_IMAGE\fR defined.  Alternatively, the legacy interfaces
are used if the first character of \fIformatPtr->name\fR is an
uppercase ASCII character (\fBA\fR-\fBZ\fR), and explicit casts
are used to forgive the type mismatch.  For example,
.CS
static Tk_PhotoImageFormat myFormat = {
    "MyFormat",
    (Tk_ImageFileMatchProc *) FileMatch,
    NULL,
    (Tk_ImageFileReadProc *) FileRead,
    NULL,
    NULL,
    NULL
};
.CE
would define a minimal \fBTk_PhotoImageFormat\fR that operates provide
only file reading capability, where \fBFileMatch\fR and \fBFileRead\fR
are written according to the legacy interfaces of Tk 8.2 or earlier.
.PP
Any stub-enabled extension providing an extended photo image format
via the legacy interface enabled by the \fBUSE_OLD_IMAGE\fR macro
that is compiled against Tk 8.5 headers and linked against the
Tk 8.5 stub library will produce a file that can be loaded only
into interps with Tk 8.5 or later; that is, the normal stub-compatibility
rules.  If a developer needs to generate from such code a file
that is loadable into interps with Tk 8.4 or earlier, they must
use Tk 8.4 headers and stub libraries to do so.
.PP
Any new code written today should not make use of the legacy
interfaces.  Expect their support to go away in Tk 9.
.SH "SEE ALSO"
Tk_FindPhoto, Tk_PhotoPutBlock
.SH KEYWORDS
photo image, image file
@


1.11
log
@Minor doc updates (removing out of date changebars, improving typedef formatting,
 etc.)
@
text
@d12 1
a12 1
'\" RCS: @@(#) $Id: CrtPhImgFmt.3,v 1.10 2007/12/13 15:23:42 dgp Exp $
d25 2
a26 2
.AS Tk_PhotoImageFormat *formatPtr
.AP Tk_PhotoImageFormat *formatPtr in
d50 1
a50 1
    char *\fIname\fR;
@


1.10
log
@merge stable branch onto HEAD
@
text
@d12 1
a12 1
'\" RCS: @@(#) $Id: CrtPhImgFmt.3,v 1.8.2.1 2007/12/10 18:39:27 dgp Exp $
a28 1

d57 1
a57 1
} Tk_PhotoImageFormat;
d69 1
a69 2

.SH NAME
d80 2
a81 2

.SH FILEMATCHPROC
d87 7
a93 7
typedef int Tk_ImageFileMatchProc(
    Tcl_Channel \fIchan\fR,
    const char *\fIfileName\fR,
    Tcl_Obj *\fIformat\fR,
    int *\fIwidthPtr\fR,
    int *\fIheightPtr\fR,
    Tcl_Interp *\fIinterp\fR);
d103 2
a104 2

.SH STRINGMATCHPROC
d110 6
a115 6
typedef int Tk_ImageStringMatchProc(
    Tcl_Obj *\fIdata\fR,
    Tcl_Obj *\fIformat\fR,
    int *\fIwidthPtr\fR,
    int *\fIheightPtr\fR,
    Tcl_Interp *\fIinterp\fR);
d125 2
a126 2

.SH FILEREADPROC
d131 9
a139 9
typedef int Tk_ImageFileReadProc(
    Tcl_Interp *\fIinterp\fR,
    Tcl_Channel \fIchan\fR,
    const char *\fIfileName\fR,
    Tcl_Obj *\fIformat\fR,
    PhotoHandle \fIimageHandle\fR,
    int \fIdestX\fR, int \fIdestY\fR,
    int \fIwidth\fR, int \fIheight\fR,
    int \fIsrcX\fR, int \fIsrcY\fR);
d154 2
a155 2

.SH STRINGREADPROC
d160 8
a167 8
typedef int Tk_ImageStringReadProc(
    Tcl_Interp *\fIinterp\fR,
    Tcl_Obj *\fIdata\fR,
    Tcl_Obj *\fIformat\fR,
    PhotoHandle \fIimageHandle\fR,
    int \fIdestX\fR, int \fIdestY\fR,
    int \fIwidth\fR, int \fIheight\fR,
    int \fIsrcX\fR, int \fIsrcY\fR);
d182 2
a183 2

.SH FILEWRITEPROC
d188 5
a192 5
typedef int Tk_ImageFileWriteProc(
    Tcl_Interp *\fIinterp\fR,
    const char *\fIfileName\fR,
    Tcl_Obj *\fIformat\fR,
    Tk_PhotoImageBlock *\fIblockPtr\fR);
d207 2
a208 2

.SH STRINGWRITEPROC
d213 4
a216 4
typedef int Tk_ImageStringWriteProc(
    Tcl_Interp *\fIinterp\fR,
    Tcl_Obj *\fIformat\fR,
    Tk_PhotoImageBlock *\fIblockPtr\fR);
a230 1

d232 1
a268 1

a270 1

@


1.9
log
@Various markup fixes
(mostly: missing quotes on .SH arguments, extraneous .PPs)
@
text
@d12 1
a12 1
'\" RCS: @@(#) $Id: CrtPhImgFmt.3,v 1.8 2007/05/14 20:58:25 dgp Exp $
@


1.8
log
@        [Tk Bug 1712081]

        * unix/Makefile.in:     Updates to account for new and deleted files
        * win/Makefile.in:      tkStubImg.c and tkOldTest.c.
        * win/makefile.bc:
        * win/makefile.vc:

        * generic/tkOldTest.c (new):    New file used to create testing
        * generic/tkTest.c:             commands for testing various Tk
        * tests/constraints.tcl:        legacy interfaces where a separate
        * tests/image.test:             compilation unit is needed in order
        to #define suitable macros during compilation.  Only the effect of
        USE_OLD_IMAGE on Tk_CreateImageType() is currently tested, but more
        similar testing commands can be added to this same file.  New
        constraint defined to detect presence of the image type provided by
        the new testing code, and a few tests added to exercise it.  Having
        USE_OLD_IMAGE support tested by the default test suite should reduce
        chance of a recurrence of this bug.

        * doc/CrtImgType.3:     Revised docs to better indicate the legacy
        * doc/CrtPhImgFmt.3:    nature of the interfaces supported by
        USE_OLD_IMAGE.

        * generic/tkDecls.h:    make genstubs
        * generic/tkStubInit.c:

        * generic/tk.decls:             Reworked USE_OLD_IMAGE support to use
        * generic/tk.h:                 the same support mechanisms both with
        * generic/tkStubImg.c (deleted):and without a stub-enabled build.  In
        each case, route the legacy calls to Tk_CreateImageType and
        Tk_CreatePhotoImageFormat through the Tk_CreateOldImageType and
        Tk_CreateOldPhotoImageFormat routines.  Add those routines to the
        public stub table so they're available to a stub-enabled extension.
        Remove the definition of Tk_InitImageArgs() and use a macro to
        convert any calls to it in source code into a comment.

        * generic/tkImage.c:    Removed the MODULE_SCOPE declarations that
        * generic/tkImgPhoto.c: broke USE_OLD_IMAGE support.
@
text
@d12 1
a12 1
'\" RCS: @@(#) $Id: CrtPhImgFmt.3,v 1.7 2007/01/05 00:00:49 nijtmans Exp $
d234 1
a234 2
.SH LEGACY INTERFACE SUPPORT
.PP
@


1.8.2.1
log
@merge updates from HEAD
@
text
@d12 1
a12 1
'\" RCS: @@(#) $Id: CrtPhImgFmt.3,v 1.8 2007/05/14 20:58:25 dgp Exp $
d234 2
a235 1
.SH "LEGACY INTERFACE SUPPORT"
@


1.7
log
@various "const" additions, in line with TIP #27
fix bug #1627732
@
text
@d12 1
a12 1
'\" RCS: @@(#) $Id: CrtPhImgFmt.3,v 1.6 2004/09/19 16:05:36 dkf Exp $
d15 1
a15 1
.TH Tk_CreatePhotoImageFormat 3 8.3 Tk "Tk Library Procedures"
a70 8
.SH PORTABILITY
.PP
In Tk 8.2 and earlier, a different interface was used. Tk 8.3 will
still support the old format handlers if the format name is in upper
case. If you still want to compile old format handlers with Tk8.3,
use the flag -DUSE_OLD_IMAGE. This will restore all function prototypes
to match the pre-8.3 situation.

d78 4
a81 3
the \fB\-format\fR option. For new format handlers, the name should
be in lower case. Pre-8.3 format handlers are assumed to be in
upper case.
d234 39
@


1.6
log
@Standardize style of section refs & public symbols. Remove displayed tabs
@
text
@d12 1
a12 1
'\" RCS: @@(#) $Id: CrtPhImgFmt.3,v 1.5 2001/08/23 19:11:22 hobbs Exp $
d98 1
a98 1
    CONST char *\fIfileName\fR,
d143 1
a143 1
    CONST char *\fIfileName\fR,
d199 1
a199 1
    CONST char *\fIfileName\fR,
@


1.5
log
@removed bogus note about including tkPhoto.h
@
text
@d12 1
a12 1
'\" RCS: @@(#) $Id: CrtPhImgFmt.3,v 1.4 2000/02/08 11:31:30 hobbs Exp $
d51 7
a57 7
	char *\fIname\fR;
	Tk_ImageFileMatchProc *\fIfileMatchProc\fR;
	Tk_ImageStringMatchProc *\fIstringMatchProc\fR;
	Tk_ImageFileReadProc *\fIfileReadProc\fR;
	Tk_ImageStringReadProc *\fIstringReadProc\fR;
	Tk_ImageFileWriteProc *\fIfileWriteProc\fR;
	Tk_ImageStringWriteProc *\fIstringWriteProc\fR;
d97 6
a102 6
	Tcl_Channel \fIchan\fR,
	CONST char *\fIfileName\fR,
	Tcl_Obj *\fIformat\fR,
	int *\fIwidthPtr\fR,
	int *\fIheightPtr\fR,
	Tcl_Interp *\fIinterp\fR);
d120 5
a124 5
	Tcl_Obj *\fIdata\fR,
	Tcl_Obj *\fIformat\fR,
	int *\fIwidthPtr\fR,
	int *\fIheightPtr\fR,
	Tcl_Interp *\fIinterp\fR);
d141 8
a148 8
	Tcl_Interp *\fIinterp\fR,
	Tcl_Channel \fIchan\fR,
	CONST char *\fIfileName\fR,
	Tcl_Obj *\fIformat\fR,
	PhotoHandle \fIimageHandle\fR,
	int \fIdestX\fR, int \fIdestY\fR,
	int \fIwidth\fR, int \fIheight\fR,
	int \fIsrcX\fR, int \fIsrcY\fR);
d170 7
a176 7
	Tcl_Interp *\fIinterp\fR,
	Tcl_Obj *\fIdata\fR,
	Tcl_Obj *\fIformat\fR,
	PhotoHandle \fIimageHandle\fR,
	int \fIdestX\fR, int \fIdestY\fR,
	int \fIwidth\fR, int \fIheight\fR,
	int \fIsrcX\fR, int \fIsrcY\fR);
d198 4
a201 4
	Tcl_Interp *\fIinterp\fR,
	CONST char *\fIfileName\fR,
	Tcl_Obj *\fIformat\fR,
	Tk_PhotoImageBlock *\fIblockPtr\fR);
d223 3
a225 3
	Tcl_Interp *\fIinterp\fR,
	Tcl_Obj *\fIformat\fR,
	Tk_PhotoImageBlock *\fIblockPtr\fR);
@


1.4
log
@	* generic/tkDecls.h:
	* generic/tk.decls:
	* generic/tk.h: moved new public functions created in dash patch
	to the stubs interface [Bug: 4062]

	* generic/tk.h:
	* doc/CrtImgType.3:
	* doc/CrtPhImgFmt.3:
	* generic/tk.h:
	* generic/tkImgGIF.c:
	* generic/tkImgPhoto.c:
	* generic/tkStubImg.c (new file):
	* generic/tkTest.c:
	* unix/Makefile.in:
	* win/Makefile.in:
	* win/makefile.vc: improved support for moving from the old style
	image C API to the new obj'ified one with new Tk_InitImageArgs
	command and stub'ing of image code.  See docs for how to make the
	transition. [Bug: 4060]
@
text
@d12 1
a12 1
'\" RCS: @@(#) $Id: CrtPhImgFmt.3,v 1.3 1999/10/29 03:57:40 hobbs Exp $
a21 1
\fB#include <tkPhoto.h>\fR
@


1.4.4.1
log
@sync with head
@
text
@d12 1
a12 1
'\" RCS: @@(#) $Id: CrtPhImgFmt.3,v 1.5 2001/08/23 19:11:22 hobbs Exp $
d22 1
@


1.3
log
@	* doc/CrtImgType.3:
	* doc/CrtPhImgFmt.3:
	* doc/FindPhoto.3:
	* doc/photo.n: new docs for Img patch mods
@
text
@d12 1
a12 1
'\" RCS: @@(#) $Id: CrtPhImgFmt.3,v 1.2 1998/09/14 18:22:47 stanton Exp $
d15 1
a15 1
.TH Tk_CreatePhotoImageFormat 3 4.0 Tk "Tk Library Procedures"
d72 8
d87 3
a89 1
the \fB\-format\fR option.
d99 1
a99 1
	char *\fIfileName\fR,
d121 1
a121 1
	char *\fIstring\fR,
d127 1
a127 1
The \fIstring\fR argument points to the string containing the image
d144 1
a144 1
	char *\fIfileName\fR,
d172 1
a172 1
	char *\fIstring\fR,
d181 1
a181 1
The \fIstring\fR argument points to the image data in string form.
d200 1
a200 1
	char *\fIfileName\fR,
a224 1
	Tcl_DString *\fIdataPtr\fR,
d233 1
a233 1
should be appended to the dynamic string given by \fIdataPtr\fR.
@


1.2
log
@Replaced SCCS strings, fixed binary files
@
text
@d12 1
a12 1
'\" RCS: @@(#) $Id$
d90 1
a90 1
	char *\fIformatString\fR,
d92 2
a93 1
	int *\fIheightPtr\fR);
d97 1
a97 1
\fIformatString\fR argument contains the value given for the
d112 1
a112 1
	char *\fIformatString\fR,
d114 2
a115 1
	int *\fIheightPtr\fR);
d118 1
a118 1
data.  The \fIformatString\fR argument contains the value given for
d135 1
a135 1
	char *\fIformatString\fR,
d144 1
a144 1
reading as \fIchan\fR.  The \fIformatString\fR argument contains the
d163 1
a163 1
	char *\fIformatString\fR,
d172 1
a172 1
The \fIformatString\fR argument contains the
d191 1
a191 1
	char *\fIformatString\fR,
d200 1
a200 1
image data.  The \fIformatString\fR argument contains the
d216 1
a216 1
	char *\fIformatString\fR,
d225 1
a225 1
The \fIformatString\fR argument contains the
@


1.1
log
@Initial revision
@
text
@d12 1
a12 1
'\" SCCS: @@(#) CrtPhImgFmt.3 1.10 97/10/31 12:58:54
@


1.1.4.1
log
@Merged 8.0.3 changes into 8.1
@
text
@d12 1
a12 1
'\" RCS: @@(#) $Id: CrtPhImgFmt.3,v 1.2 1998/09/14 18:22:47 stanton Exp $
@


