summaryrefslogtreecommitdiffstats
path: root/generic/tkImage.c
Commit message (Collapse)AuthorAgeFilesLines
* more places convertedjan.nijtmans2013-01-241-1/+1
| | | FossilOrigin-Name: 2d21003b2562cbaed99e61f022a567082c598f3c
* Merge core-8-5-branchjan.nijtmans2013-01-241-2/+2
|\ | | | | | | | | Various Tcl_GetIndexFromObj -> Tcl_GetIndexFromObjStruct changes. FossilOrigin-Name: 472e3798d1c835e41e6f42f189ae802a61971a4d
* | more auditing of error codesdkf2012-07-301-3/+3
| | | | | | FossilOrigin-Name: aae315a30f0b4367d59525a21dfb5139c4440a36
* | Much more cleaning up of result handling.dkf2012-07-231-13/+21
| | | | | | FossilOrigin-Name: 016ad9dac31d39cbc9ded6a6e8e75c11618318a8
* | Working towards adding all the Tcl_SetErrorCode calls that should be there.dkf2012-07-161-0/+4
| | | | | | | | | | ** WORK IN PROGRESS ** FossilOrigin-Name: 6f8f9336c381b81bbe323a8399eaf4dd3f89b34f
* | Purge RCS Keywordsdgp2011-06-081-2/+0
|\ \ | |/ | | FossilOrigin-Name: b8a1385217cc117d6962c234f0a4d28ff10e089c
| * Purge RCS Keywords.dgp2011-06-081-2/+0
| |\ | | | | | | FossilOrigin-Name: 3f95fbe0ce14948fd409844b915c18ef25d7d0a0
| | * Purge RCS Keywords.dgp2011-06-081-2/+0
| | | | | | | | | FossilOrigin-Name: a74f32bb6369d3e66e661145c81a98a14ed79b3a
| | * * generic/tkImage.c: Stopped [image create] from generating andgp2003-09-171-4/+7
| | | | | | | | | | | | | | | | | | | | | * tests/image.test: image command name that would overwrite an existing command name. Thanks to Michael Schlenker. [Bug 808039]. FossilOrigin-Name: 9572395920ee96dd2a850b1c3c01291f98bea7ac
| | * Backported fix for [Bug 749353]dkf2003-07-071-7/+20
| | | | | | | | | FossilOrigin-Name: 4568e2feb2f0be0ff0e99fb383b5dccb8b4110c9
| * | Relax the constraint that every Tk_ImageTypenijtmans2008-11-191-13/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | can only be passed to Tk_CreateImageType once. This allows tkImg to be loaded in multiple interpreters in a thread-enabled build of Tk. [Bug 2312027] FossilOrigin-Name: 89712bb5e2aa8b447442fa1147ad9cb9c2538350
* | | Remove casts from uses of ckalloc/ckfree/... now that Tcl declares them to bedkf2011-03-121-12/+12
| | | | | | | | | | | | | | | using useful casts internally. FossilOrigin-Name: 142e016e7b17277d81257da90477297eb9aaa05a
* | | - eliminate some unnessary type castsnijtmans2009-02-031-2/+2
| | | | | | | | | | | | | | | | | | | | | - some internal const decorations - spacing FossilOrigin-Name: 02ca10b00f1aed5c76ff8149fdbac48018e8bfa0
* | | Small syntactic improvementsdkf2008-11-121-18/+23
| | | | | | | | | FossilOrigin-Name: 0992c39f60e0ef2837062c4ca214c2bda688b7fb
* | | modify Tk_Create(Old)ImageType signature, relaxingnijtmans2008-11-121-16/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the constraint that every Tk_ImageType can only be passed to this function once. This allows tkImg to be loaded in multiple interpreters in a thread-enabled build of Tk. This CONSTification complies with TIP #27. It is binary compatible with the old interface, but not fully source compatible (although tkImg does not suffer). FossilOrigin-Name: 0dc5513575ecd2f1fcc825775e29a04c1fcae0b9
* | | Lots of small changes to make code more pretty and C89-like.dkf2008-11-081-20/+19
| | | | | | | | | FossilOrigin-Name: 782ccc1d4281d79d7cd4e7db9add4b5aceba18fe
* | | Add "const" to many internalnijtmans2008-10-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | const tables, so those will be put by the C-compiler in the TEXT segment in stead of the DATA segment. This makes those table sharable in shared libraries. FossilOrigin-Name: da3819dbb53904a418b6098f3b103df483c53304
* | | Greatly clean up Tk's handling of the writability of the Tcl result object.dkf2008-10-051-6/+7
| | | | | | | | | FossilOrigin-Name: a83341a36174d2059bc339dea19260a38eda5a01
* | | fix [2021443] inconsistant "wrong # args" messages (for Tk)nijtmans2008-07-231-2/+2
| | | | | | | | | FossilOrigin-Name: def570d7bdd7211b4c17c706781050222d16890f
* | | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-24/+23
|/ / | | | | FossilOrigin-Name: ddfd8bb6f7ecfa71a218a5dc88075a419e3e1d5c
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| | | | | | FossilOrigin-Name: e7868b44c1e7bffc63a053b87a96a4499757f80d
* | Make Ttk_GetImage safe if called with NULL interp. Added some testspatthoyts2007-10-091-2/+4
| | | | | | | | | | | | that crash on Windows without this fix. FossilOrigin-Name: fb96f8c88ef2cf1d01b5d1b3a39ac4242efa1bf9
* | header cleanupdgp2007-09-071-2/+1
| | | | | | FossilOrigin-Name: 04ffea40ef0b3c0cad59a3e1576275019f29e913
* | [Tk Bug 1712081]dgp2007-05-141-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. FossilOrigin-Name: 3d8af15d18f3b3196cf838b1acc80354e5b00adc
* | Fix minor K&R-ismdkf2007-02-121-66/+67
| | | | | | FossilOrigin-Name: 1d75ee9ecd08ea6d256b177acfb61877d31caaf9
* | whitespacedas2007-01-191-3/+3
| | | | | | FossilOrigin-Name: f6a4315018ffb688404f9c169cece08ef5275360
* | missing MODULE_SCOPE declarations and obsolete exports discovered by 'make ↵das2006-03-161-2/+1
| | | | | | | | | | checkstubs' FossilOrigin-Name: 390d117c848dc42217fe9bf461d4ce14b5e5bc48
* | * unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),das2005-11-271-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to configure (flag can't be present twice, so can't be in both CFLAGS and LDFLAGS during configure), don't use -prebind when deploying on 10.4, define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542). (SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete autoconf macros. Sync with tcl/unix/tcl.m4. * unix/configure.in: fix obsolete autoconf macros, sync gratuitous formatting/ordering differences with tcl/unix/configure.in. * unix/Makefile.in: add CFLAGS to wish/tktest link to make executable linking the same as during configure (needed to avoid loosing any linker relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS). Avoid concurrent linking of wish and compiling of tkTestInit.o during parallel make, fix dependencies and flags for building tkMacOSXInit.o (checkstubs, checkexports): dependency and Darwin fixes (dist): add new macosx files. * macosx/tkMacOSXEvent.c (TkMacOSXProcessEvent): * macosx/tkMacOSXEvent.h: * macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent): * macosx/tkMacOSXCarbonEvents.c: install standard application event handler, add & call functions to start and stop carbon even timer that runs the tcl event loop periodically during a nested carbon event loop in the toolbox (e.g. during menutracking) to ensure tcl timers etc continue to fire, register app event handler for menu tracking and HI command carbon events, move menu event handling to new handlers for those carbon events, no longer register for/handle appleevent carbon event (now dealt with by standard application event handler), event debugging code dynamically acquires carbon event debugging functions to allow use on Tiger where they are no longer exported from HIToolbox. * macosx/tkMacOSXFont.c (TkMacOSXUseAntialiasedText): * macosx/tkMacOSXKeyEvent.c (GetKeyboardLayout): * macosx/tkMacOSXCarbonEvents.c (TkMacOSXInitCarbonEvents): * macosx/tkMacOSXInit.c: * macosx/tkMacOSXInt.h: abstract common code to dynamically acquire address of a named symbol (from a loaded dynamic library) into new function TkMacOSXGetNamedSymbol() and macro TkMacOSXInitNamedSymbol. * macosx/tkMacOSXMenu.c (TkpNewMenu): * macosx/tkMacOSXMenubutton.c (MenuButtonInitControl): * macosx/tkMacOSXMenus.c (TkMacOSXHandleMenuSelect): switch to modern utf8 aware menu manager API, remove obsolete code, add error handling. * macosx/tkMacOSXMouseEvent.c: define OSX 10.3 or later only constants if necessary to allow compilation on OSX 10.2 * macosx/tkMacOSXWm.c (UpdateSizeHints): remove code that is never executed. * xlib/xgc.c (XCreateGC): sync with core-8-4-branch change. * generic/tk.h: add/correct location of version numbers in macosx files. * generic/tkInt.h: clarify fat compile comment. * macosx/Wish.pbproj/default.pbxuser (new file): * macosx/Wish.pbproj/jingham.pbxuser: * macosx/Wish.pbproj/project.pbxproj: * macosx/Wish.xcode/default.pbxuser: * macosx/Wish.xcode/project.pbxproj: * macosx/Wish.xcodeproj/default.pbxuser (new file): * macosx/Wish.xcodeproj/project.pbxproj (new file): new/updated projects for Xcode 2.2 on 10.4, Xcode 1.5 on 10.3 & ProjectBuilder on 10.2, with native tktest targets and support for universal (fat) compiles. * macosx/Tk-Info.plist (removed): * macosx/Wish-Info.plist (removed): * macosx/buildTkConfig.tcl (removed): remove obsolete build files. * macosx/README: clarification/cleanup, document new Xcode projects and universal (fat) builds via CFLAGS (i.e. ppc and i386 at the same time). * unix/Makefile.in: * unix/aclocal.m4: * unix/configure.in: * macosx/configure.ac (new file): add support for inclusion of unix/configure.in by macosx/configure.ac, allows generation of a config headers enabled configure script in macosx (required by Xcode projects). * macosx/GNUmakefile: rename from Makefile to avoid overwriting by configure run in tk/macosx, add support for reusing configure cache, build target fixes. * generic/tk3d.h: * generic/tkButton.h: * generic/tkCanvas.c: * generic/tkCanvas.h: * generic/tkColor.h: * generic/tkEntry.h: * generic/tkFileFilter.h: * generic/tkFont.c: * generic/tkFont.h: * generic/tkImage.c: * generic/tkImgPhoto.c: * generic/tkInt.h: * generic/tkMenu.c: * generic/tkMenu.h: * generic/tkMenubutton.h: * generic/tkScale.h: * generic/tkScrollbar.h: * generic/tkSelect.h: * generic/tkStubInit.c: * generic/tkStubLib.c: * generic/tkText.h: * generic/tkUndo.h: * macosx/tkMacOSXButton.c: * macosx/tkMacOSXDebug.c: * macosx/tkMacOSXDebug.h: * macosx/tkMacOSXDialog.c: * macosx/tkMacOSXDraw.c: * macosx/tkMacOSXEntry.c: * macosx/tkMacOSXFont.c: * macosx/tkMacOSXInt.h: * macosx/tkMacOSXMenu.c: * macosx/tkMacOSXMenubutton.c: * macosx/tkMacOSXMouseEvent.c: * macosx/tkMacOSXSend.c: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXXStubs.c: * unix/tkUnixButton.c: * unix/tkUnixMenu.c: * xlib/xgc.c: ensure externally visible symbols not contained in stubs table are declared as MODULE_SCOPE (or as static if not used outside of own source file), #ifdef out a few Xlib and aqua functions that are never called. These changes allow 'make checkstubs' to complete without error on Darwin with gcc 4. * macosx/tkMacOSXTest.c: * macosx/tkMacOSXPort.h: * win/tkWinTest.c: * generic/tkInt.decls: add functions needed by tktest to internal stubs table, correct signature of TkMacOSXHandleMenuSelect, add XSync to aqua Xlib stubs. * unix/tkUnixSend.c: * generic/tkText.c: * generic/tkTest.c: #ifdef unix only declarations. (TestmetricsCmd): unify win and mac implementation. (TestsendCmd): move to tkUnixSend.c to avoid access to global var. (TesttextCmd): move to tkText.c to avoid having to put all the internal text functions it uses into the stubs table. * generic/tkTextDisp.c: * macosx/tkMacOSXInit.c: * macosx/tkMacOSXKeyEvent.c: * macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXXStubs.c: fix gcc 4 warnings. * macosx/tkMacOSXNotify.c: * macosx/tkMacOSXScrlbr.c: sync with core-8-4-branch. * generic/tkIntDecls.h: * generic/tkIntPlatDecls.h: * generic/tkIntXlibDecls.h: * generic/tkStubInit.c: * unix/configure: * unix/tkConfig.h.in: regen. FossilOrigin-Name: 67cb6f9bd1c97c19475232affe5bfc072dabe2bf
* | ANSIfy and reduce casting of NULL to promote readabilitydkf2005-11-171-7/+6
| | | | | | FossilOrigin-Name: b6c2c77cac3cacef0e58af5c6be63af4359a2949
* | Lots of ANSIfying of function decls.dkf2005-11-171-4/+4
| | | | | | | | | | | | Also a few spots where code has been cleaned up more completely. FossilOrigin-Name: 2a0a22abb40373f8ef0be9a59e98a390b59ee72f
* | oopsdgp2005-08-111-2/+2
| | | | | | FossilOrigin-Name: 9ee319920d31f0774cd01d0ae4d106529f3d00e7
* | assorted typos and errors caught by compilerdgp2005-08-111-3/+5
| | | | | | FossilOrigin-Name: 202d05080d6c3dda25595f1d1065144230bf1fc6
* | Getting more systematic about styledkf2005-08-101-412/+363
| | | | | | | | | | | | | | Also start removing _ANSI_ARGS_; the core's required ANSI C for a while now Also fix [Bug 1252702]; size_t doesn't mix with Tcl_GetStringFromObj FossilOrigin-Name: 95ed0f915e157968e866e731484ea64d379250ec
* | * generic/tkImage.c: Stopped [image create] from generating andgp2003-09-171-4/+7
| | | | | | | | | | | | | | * tests/image.test: image command name that would overwrite an existing command name. Thanks to Michael Schlenker. [Bug 808039]. FossilOrigin-Name: 3023c17eaf943a887e0b043c7e6094ced7177168
* | Fixed [Bug 749353] by making the removal of masters from the global image tabledkf2003-07-071-7/+21
| | | | | | | | | | | | | | | | | | | | aggressive when the interp is being deleted, and making the deletion code always check to see whether it should actually be deleting an entry or not. No tests as it comes under the heading of crash-on-bug, and the bug is not easy to excite (it requires a full script and interpreter deletion with lots of events about.) FossilOrigin-Name: 69f63d6bd4909e39198b976695931983c99dab24
* | Stop deleted images from showing up in the various [image *] operations.dkf2003-05-081-2/+37
|/ | | | | | Can't delete early though as that removes the link with widgets and image names. FossilOrigin-Name: fe438f1771f133797c1f7f97fb4a273c23f3ce4a
* * generic/tkImage.c (Tk_ImageObjCmd): Added check to make suredkf2003-01-221-1/+16
| | | | | | | | | | | | | | that you're not creating an image named the same as .'s command, which refixes 220891, even when the name of the command has been changed with 'rename'. The error message is better too. * generic/tkFrame.c (TkToplevelWindowForCommand): Added way of mapping from command names to tkwins-for-toplevels. * tests/image.test (image-1.10,image-1.11): Updated to match new error message and added test for the rename case. * generic/tclInt.decls: Made TkToplevelWindowForCommand exported privately. FossilOrigin-Name: 046e519c6f18881f51585733434c4be2f64e93c9
* * generic/tkImage.c (DeleteImage): delete the image's entry in thehobbs2003-01-191-4/+2
| | | | | | | image table correctly when there are no more instances. This reopens bug 220891. [Bug #669759] FossilOrigin-Name: 4c4aaa60c81f1caf0a9f5cec108a0fc4c2fc1c71
* Applied companion patch for Tcl Patch 585105,dgp2002-08-051-5/+5
| | | | | | | | | | | | | | | | | | | | | | | updating Tk to use Tcl 8.4's fully CONST-ified interface, and fully CONSTifying Tk at the same time. This patch includes purging Tk of its last direct access to interp->result. [Bug 589853] The substantial changes include copying event sequence strings into Tcl_DStrings in tkBind.c, and copying [text] indices into Tcl_DStrings because parsing them involved overwriting them. If this causes performance trouble, that can be resolved by further converting them to Tcl_Obj's. The #defines USE_NON_CONST and USE_COMPAT_CONST have the same effect for Tk as they do for Tcl. (They actually change tcl.h) FossilOrigin-Name: 5603f01aa35a127f83db9bb68f3b1ff9e5bb64de
* * generic/tkImage.c (Tk_ImageObjCmd, DeleteImage): Callmdejong2002-06-181-1/+3
| | | | | | | | Tcl_Preserve and Tcl_Release for the masterPtr->winPtr window to avoid accessing memory that had already been deallocated in DeleteImage. FossilOrigin-Name: cf0b24b4f3fe492ecac0f27ddbe0c90cf74d8e91
* TIP #47 "Modifying Tk to Allow Writing X Window managers"jenglish2002-06-141-2/+2
| | | | | | | | | | (patch from Neil McKay). * Add CirculateRequest, Create, MapRequest, ResizeRequest, and ConfigureRequest event types; * Split TK_TOPLEVEL flag into TK_TOPLEVEL, TK_HAS_WRAPPER, TK_WIN_MANAGED, and TK_TOP_HIERARCHY. FossilOrigin-Name: ad38fbacd7328c607131ee691e933fcc9aa67d3e
* Clean-up bogus for loop in [image inuse] subcommand. [Bug #485803]ericm2002-02-031-7/+3
| | | FossilOrigin-Name: bd333aca1d05b68a1ddf89413e33d69c80d315b2
* * Updates to handle change in type of tablePtrdgp2002-01-171-2/+2
| | | | | | | argument of Tcl_GetIndexFromObj(Struct) from (char **) to (CONST char **). [TIP 27] [Patch 504705] FossilOrigin-Name: 85e5c7aa1baa3bd2b7bdb971f3cf83f4f5573723
* Better handling of when image creation nukes the main window so nowdkf2001-04-121-3/+8
| | | | | | does not crash on Linux. FossilOrigin-Name: 165d41635325ffd0a229c3dce74edff9fb4c8967
* * generic/tkImage.c (Tk_ImageObjCmd, EventuallyDeleteImage):hobbs2001-03-301-5/+6
| | | | | | added casts to allow compiling on Windows with debbuging. FossilOrigin-Name: 20d9467efc66dd0d9dd8b3a34eb9f10abc241171
* A better fix for #120819 (all it needed was some Tcl_Preserve()s)dkf2000-11-291-9/+40
| | | | | | | which also requires no documentation changes - the behaviour is now what you would predict from existing docs (as opposed to a crash!) FossilOrigin-Name: f59c57ea302b3ac4c40434d30ba1df0cf1645580
* Backed out previous change (except for test for bug.)dkf2000-11-281-13/+1
| | | FossilOrigin-Name: 56258a5385b081a3315988f44f363472425aa6c9
* Fixed bug #120819 by prohibiting images from starting with a period;dkf2000-11-231-1/+13
| | | | | | | | | | | I'm still not quite sure what exactly was going wrong in the bug, but I suspect the problem might have actually been due to the deletion of all images while in the midst of creating an image. The restriction is pretty light when it comes to existing code, since it previously caused a core dump due to an image typePtr field being set to random garbage, an indication of over-eager use of free()... FossilOrigin-Name: 82e37dee6856e7ed8fbc142dc0f924bac5c9801a
* * doc/image.n: Added documentation for [image inuse] command.ericm2000-05-151-6/+34
| | | | | | | | | | * tests/image.test: Added tests for [image inuse] command. * generic/tkImage.c (Tk_ImageObjCmd): Added [image inuse] command, which provides a means for programmers to determine if a given image is in use by any widgets. [RFE: 3327]. FossilOrigin-Name: 53c2f9bf908f0ca358175e6b6220862cb1376f2a
* * generic/tkImage.c (Tk_PostscriptImage): added check to createhobbs2000-04-251-1/+21
| | | | | | | | | | | | | necessary prolog for photos * generic/tkCanvPs.c: added Tk_PostscriptPhoto that outputs PS for photo images * generic/tkImgPhoto.c: new func ImgPhotoPostscript and added that in as ps proc in tkPhotoImageType. * generic/tkStubInit.c: * generic/tkDecls.h: * generic/tk.decls: added Tk_PostscriptPhoto FossilOrigin-Name: 3842066784654591370edf7d879dc46fb6bf3308