summaryrefslogtreecommitdiffstats
path: root/generic/tkConfig.c
Commit message (Collapse)AuthorAgeFilesLines
* More internal use of size_t, so refcounts can be bigger than before (2^31 -> ↵jan.nijtmans2016-11-041-11/+10
| | | | 2^32 on 32-bit platforms, even more on 64-bit)
* Bug [069c9e43c4]: FreeOptionInternalRep() breaks Tk_CreateOptionTable()jan.nijtmans2013-08-141-89/+50
|\
| * Fix reference counting for "option" objects, when being duplicated.bug_069c9e43c4jan.nijtmans2013-08-141-1/+24
| |
| * Fix some commentsjan.nijtmans2013-08-011-3/+3
| |
| * rebasejan.nijtmans2013-08-011-87/+25
| |\ |/ /
| * Suggested fix for Bug [069c9e43c4]jan.nijtmans2013-07-311-88/+33
|/
* Remove unneeded SetOptionFromAny and SetTextIndexFromAny. They were only ↵jan.nijtmans2013-02-261-34/+1
| | | | needed to prevent a panic in Tcl, but Tcl now generates a nice error-message in stead of panicing.
* Use internalRep.twoPtrValue.ptr1 in stead of internalRep.otherValuePtr ↵jan.nijtmans2013-02-011-1/+1
|\ | | | | | | | | everywhere. Change some internal "length" variables from type int to type size_t, so it could handle bigger string sizes (for "novem")
* | Convert all Tcl_SetResult calls to Tcl_SetObjResult calls. jan.nijtmans2013-01-281-2/+2
| | | | | | Convert Tcl_GetStringFromObj to Tcl_GetString when possible.
* | more places convertedjan.nijtmans2013-01-241-1/+1
| |
* | Merge core-8-5-branchjan.nijtmans2013-01-241-2/+2
|\ \ | |/ | | Various Tcl_GetIndexFromObj -> Tcl_GetIndexFromObjStruct changes.
| * SetOptions.3: minor doc fixjan.nijtmans2012-06-191-13/+13
| |\ | | | | | | | | | make various other tables const (all backported from Tk 8.6)
* | \ merge trunkdkf2012-08-081-3/+2
|\ \ \
* | | | Much more cleaning up of result handling.dkf2012-07-231-5/+7
| | | |
* | | | Working towards adding all the Tcl_SetErrorCode calls that should be there.dkf2012-07-161-16/+12
|/ / / | | | | | | ** WORK IN PROGRESS **
* | | Purge RCS Keywordsdgp2011-06-081-2/+0
|\ \ \ | |/ /
| * | Purge RCS Keywords.dgp2011-06-081-2/+0
| |\ \ | | |/
| | * Purge RCS Keywords.dgp2011-06-081-2/+0
| | |
| | * * generic/tkConfig.c (Tk_DeleteOptionTable, Tk_CreateOptionTable):hobbs2005-10-101-3/+3
| | | | | | | | | | | | properly alloc/delete one more option. [Bug 1319720] (melbardis)
| | * Fix [Bug 1252702]dkf2005-08-111-2/+2
| | |
* | | Remove casts from uses of ckalloc/ckfree/... now that Tcl declares them to bedkf2011-03-121-12/+10
| | | | | | | | | using useful casts internally.
* | | Use @EXEEXT@ in stead of @EXT_SUFFIX@nijtmans2010-02-221-6/+6
| | | | | | | | | | | | | | | Use -DBUILD_tk in Makefile Make internal Tk_ObjCustomOption const
* | | * generic/tkConfig.c: Added another dimension of refCounting to thedgp2009-12-151-6/+49
| | | | | | | | | | | | | | | | | | | | | | | | * generic/tkInt.c: "option" Tcl_ObjType to improve memory troubles * generic/tkObj.c: detailed in [Bug 2492179]. Also removed registration of the "option" Tcl_ObjType. *** POTENTIAL INCOMPATIBILITY *** for callers of Tcl_GetObjType("option") which must now handle a NULL return.
* | | * generic/tkInt.h: add assert macros for clang staticdas2009-06-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | analyzer and redefine Tcl_Panic to assert after panic in clang PURIFY builds. * generic/tkImgPhInstance.c: small fixes to make clang static * generic/tkTextDisp.c: analyzer happier. * generic/tkConfig.c: add clang assert for false positives * generic/tkUndo.c: from static analyzer.
* | | - eliminate some unnessary type castsnijtmans2009-02-031-3/+4
| | | | | | | | | | | | | | | - some internal const decorations - spacing
* | | Add "const" to many internalnijtmans2008-10-151-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.
* | | Greatly clean up Tk's handling of the writability of the Tcl result object.dkf2008-10-051-6/+5
| | |
* | | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-21/+21
|/ /
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | header cleanupdgp2007-09-071-3/+1
| |
* | Missed a place (or rather not all versions of GCC catch it.)dkf2007-05-031-36/+21
| |
* | Fix minor K&R-ismdkf2007-02-121-85/+84
| |
* | ANSIfy and reduce casting of NULL to promote readabilitydkf2005-11-171-24/+23
| |
* | * generic/tkConfig.c (Tk_DeleteOptionTable, Tk_CreateOptionTable):hobbs2005-10-101-3/+3
| | | | | | | | properly alloc/delete one more option. [Bug 1319720] (melbardis)
* | Getting more systematic about styledkf2005-08-101-938/+892
| | | | | | | | | | 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
* | * generic/tk3d.c: All uses of 'panic' (the macro) changeddavygrvy2004-01-131-4/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tkBind.c: to 'Tcl_Panic' (the function). The #define * generic/tkBitmap.c: of panic in tcl.h clearly states it is * generic/tkCanvArc.c: deprecated in the comments. * generic/tkCanvBmap.c: [Tcl Patch 865264] * generic/tkCanvImg.c: * generic/tkCanvLine.c: * generic/tkCanvPoly.c: * generic/tkCanvText.c: * generic/tkCanvWind.c: * generic/tkColor.c: * generic/tkConfig.c: * generic/tkCursor.c: * generic/tkError.c: * generic/tkEvent.c: * generic/tkFocus.c: * generic/tkFont.c: * generic/tkFrame.c: * generic/tkGC.c: * generic/tkGrid.c: * generic/tkImgBmap.c: * generic/tkImgPhoto.c: * generic/tkImgUtil.c: * generic/tkMenu.c: * generic/tkObj.c: * generic/tkPack.c: * generic/tkPlace.c: * generic/tkRectOval.c: * generic/tkSelect.c: * generic/tkText.c: * generic/tkTextBTree.c: * generic/tkTextDisp.c: * generic/tkTextImage.c: * generic/tkTextIndex.c: * generic/tkTextMark.c: * generic/tkTextWind.c: * generic/tkVisual.c: * generic/tkWindow.c: * mac/tkMacAppInit.c: * mac/tkMacAppearanceStubs.c: * mac/tkMacButton.c: * mac/tkMacDraw.c: * mac/tkMacEmbed.c: * mac/tkMacFont.c: * mac/tkMacInit.c: * mac/tkMacMenus.c: * mac/tkMacPort.h: * mac/tkMacSubwindows.c: * mac/tkMacWm.c: * mac/tkMacXStubs.c: * macosx/tkMacOSXEmbed.c: * macosx/tkMacOSXFont.c: * macosx/tkMacOSXMenus.c: * macosx/tkMacOSXNotify.c: * macosx/tkMacOSXPort.h: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXXStubs.c: * unix/tkUnix3d.c: * unix/tkUnixColor.c: * unix/tkUnixEmbed.c: * unix/tkUnixEvent.c: * unix/tkUnixFocus.c: * unix/tkUnixFont.c: * unix/tkUnixSelect.c: * unix/tkUnixSend.c: * unix/tkUnixWm.c: * win/tkWin3d.c: * win/tkWinButton.c: * win/tkWinColor.c: * win/tkWinDialog.c: * win/tkWinDraw.c: * win/tkWinEmbed.c: * win/tkWinFont.c: * win/tkWinPixmap.c: * win/tkWinPointer.c: * win/tkWinScrlbr.c: * win/tkWinWm.c: * win/tkWinX.c:
* Applied companion patch for Tcl Patch 585105,dgp2002-08-051-2/+2
| | | | | | | | | | | | | | | | | | | | | 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)
* Added TIP#48 style engine implementationdkf2002-06-181-28/+148
| | | | Frederic Bonnet to supply docs+tests as soon as possible.
* * 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]
* Register Tk's object types with Tcl (Tcl Bug 450545)dkf2001-08-151-4/+4
|
* * generic/tkConfig.c (Tk_InitOptions): Addedericm2000-10-121-1/+10
| | | | | | Tcl_IncrRefCount/Tcl_DecrRefCount calls on valuePtr, to prevent memory leaks when the value object comes from the option database. [Bug: 6275].
* * doc/SetOptions.3: Added note that restoreProc and freeProc mayericm2000-10-011-4/+6
| | | | | | | | be NULL. * generic/tkConfig.c (Tk_RestoreSavedOptions): For custom options, added test that the restoreProc is not NULL, to allow for custom options that don't care about supporting Tk_RestoreSavedOptions.
* * generic/tkTest.c: Fixed tests to use updated API.ericm2000-09-291-3/+5
| | | | | | | | | | | * doc/SetOptions.3: * generic/tk.h: * generic/tkConfig.c: Changed interface for Tk_CustomOptionSetProc and Tk_CustomOptionGetProc; these now take a pointer to the start of the widget record, and an integer offset to the slot for the option value, instead of just a pointer to the slot. This allows more sophisticated options to do interesting things based on other data in the widget record.
* * generic/tk.h: Added declaration of Tk_ObjCustomOption structure,ericm2000-09-171-2/+41
| | | | | | | | | | | | | | | | | | | | | | | used for TK_OPTION_CUSTOM, and typedef's of the functions Tk_CustomOptionSetProc, Tk_CustomOptionGetProc, Tk_CustomOptionRestoreProc, and Tk_CustomOptionFreeProc, used for TK_OPTION_CUSTOM. * doc/SetOptions.3: Added documentation of TK_OPTION_CUSTOM, and section "CUSTOM OPTION TYPES" explaining how to create and use custom options. * tests/config.test: Added tests for custom option type. * generic/tkTest.c: Added test support for TK_OPTION_CUSTOM to TestobjconfigObjCmd. Added CustomOption* functions to implement a test custom option. * generic/tkConfig.c: Added new option type TK_OPTION_CUSTOM, which allows the definition of custom option types by creating parsing, printing, freeing, and restoring procedures for a custom option. This is needed by the text and canvas widgets if they are to be fully objectified.
* * doc/SetOptions.3: Updated documentation to reflect support forericm2000-08-101-8/+18
| | | | | | | | | | | | | | | | | | TK_OPTION_NULL_OK for TK_OPTION_DOUBLE and TK_OPTION_PIXELS. * generic/tkConfig.c: Added for TK_OPTION_NULL_OK support for TK_OPTION_DOUBLE and TK_OPTION_PIXELS. * doc/place.n: Updated, reformatted manual entry. * tests/place.test: Added many tests. * generic/tkPlace.c (Tk_PlaceObjCmd): Updated to use Tk widget-option management facilities to manage place options (-x, -y, etc.), which simplifies the placer code. Added support for [place configure pathName] and [place configure pathName -option], similar to the behavior of the configure subcommand supported by widgets.
* * doc/SetOptions.3: Added information about TK_OPTION_NULL_OK withericm2000-05-171-26/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TK_OPTION_RELIEF. * win/tkWinButton.c: Removed bits about TK_RELIEF_LINK. * tests/button.test: Added tests for -overrelief; removed tests for -relief link. * mac/tkMacButton.c: Removed bits about TK_RELIEF_LINK. * generic/tkOldConfig.c: Removed bits about TK_RELIEF_LINK. * generic/tkConfig.c: Removed bits about TK_RELIEF_LINK; added support for TK_OPTION_NULL_OK for TK_OPTION_RELIEF. * library/button.tcl: Added binding support for -overrelief. * generic/tk3d.c (Tk_GetRelief): Added branch for TK_RELIEF_NULL. * generic/tkButton.c: Added -overrelief option; removed Enter/Leave EventProc masks and handlers. * generic/tk.h: Added TK_RELIEF_NULL definition, removed TK_RELIEF_LINK. * mac/tkMacDefault.h (DEF_BUTTON_OVER_RELIEF): * win/tkWinDefault.h (DEF_BUTTON_OVER_RELIEF): * unix/tkUnixDefault.h (DEF_BUTTON_OVER_RELIEF): Added default value for the -overrelief option.
* * doc/button.n: Added documentation for link relief.ericm2000-05-101-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/button.test: Added tests for link relief for buttons. * generic/tk.h (TK_CONFIG_LINK_OK): Added definition of TK_RELIEF_LINK, TK_OPTION_LINK_OK and TK_CONFIG_LINK_OK. [RFE: 4348] * generic/tk3d.c: Added support for link relief. [RFE: 4348] * mac/tkMacButton.c (TkpDisplayButton): * unix/tkUnixButton.c (TkpDisplayButton): Added support for link relief. [RFE: 4348] * generic/tkOldConfig.c (Tk_ConfigureWidget): * generic/tkConfig.c (DoObjConfig): Added understanding of link relief, which is allowed only for widgets that have TK_OPTION_LINK_OK or TK_CONFIG_LINK_OK set for the "-relief" option. [RFE: 4348] * generic/tkButton.c: Added TK_OPTION_LINK_OK to "-relief" option for buttons. [RFE: 4348] * win/tkWinWm.c (EX_TRANSIENT_STYLE): Removed WS_EX_TOOLWINDOW style bit, so that transient windows have full-size titlebars (like the tk_getOpenFile dialog). * win/tkWinMenu.c (GetMenuSeparatorGeometry): Tweaked height requested for separator bars to be (linespace - (2*descent)) instead of just (linespace); this makes the separator occupy a more correct amount of vertical space. [Bug: 5303].
* * generic/tkConfig.c (DoObjConfig): removed direct setting ofhobbs2000-04-251-2/+4
| | | | interp->result.
* * generic/tk.h:hobbs1999-11-231-3/+7
| | | | | | | * generic/tkConfig.c: added support for TK_OPTION_DONT_SET_DEFAULT as equiv for TK_CONFIG_DONT_SET_DEFAULT * generic/tkListbox.c: added TK_OPTION_DONT_SET_DEFAULT to the item specs
* Merged 8-1-0 into mainline.rjohnson1999-04-211-1/+1
|