• Home
  • History
  • Annotate
  • only in this directory
NameDateSize

..14-Nov-201347

aclocal.m4H A D13-Jun-2005187

ChangeLogH A D09-Apr-20102.4 KiB

configureH A D11-Dec-2012331.9 KiB

configure.inH A D11-Dec-20126.7 KiB

Makefile.inH A D03-Jun-201017.5 KiB

pkgIndex.tcl.inH A D03-Mar-20091.3 KiB

READMEH A D18-Nov-20022.7 KiB

tkimg.cH A D28-Jun-20104.8 KiB

tkimg.declsH A D06-Jul-20102.9 KiB

tkimg.hH A D03-Jun-20103.9 KiB

tkimgConfig.sh.inH A D23-Oct-20082.1 KiB

tkimgDecls.hH A D06-Jul-20107.5 KiB

tkimgIO.cH A D28-Jun-201013.8 KiB

tkimgPPB.cH A D04-May-20104.9 KiB

tkimgStubInit.cH A D28-Jun-20101.2 KiB

tkimgStubLib.cH A D28-Jun-20101.4 KiB

tkimgUtils.cH A D28-Jun-20106.7 KiB

README

1
2tkimg_Fix*Proc's
3
4Signature of photo image type functions
5
6
7			Tk 8.3.2 or earlier		Tk 8.3 or later
8==============================================================================
9Tk_ImageStringWriteProc	int				int
10			------------------------------------------------------
11			Tcl_Interp *interp,		Tcl_Interp *interp,
12			Tcl_DString *dataPtr,		Tcl_Obj *format,
13			char *formatString,		Tk_PhotoImageBlock *blockPtr
14			Tk_PhotoImageBlock *blockPtr
15==============================================================================
16Tk_ImageFileMatchProc	int				int
17			------------------------------------------------------
18			Tcl_Channel chan,		Tcl_Channel chan,
19			char *fileName,			CONST char *fileName,
20			char *formatString,		Tcl_Obj *format,
21			int *widthPtr,			int *widthPtr,
22			int *heightPtr			int *heightPtr,
23							Tcl_Interp *interp
24==============================================================================
25Tk_ImageStringMatchProc	int				int
26			------------------------------------------------------
27			char *string,			Tcl_Obj *dataObj, 
28			char *formatString,		Tcl_Obj *format, 
29			int *widthPtr,			int *widthPtr, 
30			int *heightPtr			int *heightPtr,
31							Tcl_Interp *interp
32==============================================================================
33
34Different number of arguments, with different types, and the arguments
35are permuted.
36
37A Tk 8.3 core takes special steps so that a specially written photo
38image can distinguish between the two possible types of calls using
39the arguments alone.
40
41It always calls the function with the maximal number of arguments
42possible, padding with NULLs if the 8.3 signature has not enough
43arguments. See 'Tk_ImageStringWriteProc' (tkImgPhoto.c, line 962).
44
45In the case of the other two procedures the photo image type can check
46the integrity of the last argument to distinguish between the two
47cores. When called from an 8.3.2 or earlier core the last argument
48will be bogus (random data).
49
50This is actually the method used by Img 1.2.4. It checks that
51interp->result == interp->resultSpace. There are two problems with
52that approach:
53
54(1)	The pointer stored in 'interp' is random, and might not be
55	dereferencable. In other words, a segementation fault can
56	happen. Just assume 'interp == NULL' for example.
57
58(2)	It requires access to private definitions of the core
59	(Definition of 'struct Interp').
60
61Because this Img 2.0 will use a different approach. When loaded into
62the system it will ask for the current version of Tk, and modify its
63behaviour accordingly.
64
65
66	tkimg_FixChanMatchProc  (interp, chan, file, format, width, height)
67	tkimg_FixObjMatchProc   (interp, data, format, width, height)
68	tkimg_FixStringWriteProc(data, interp, dataPtr, format, blockPtr)
69