summaryrefslogtreecommitdiffstats
path: root/generic/tkBind.c
Commit message (Collapse)AuthorAgeFilesLines
* Different approach to stubs for the TkpScanWindowId() declaration.dgp2015-02-121-19/+19
| | | Man, what an inflexible maintenance chore this stuff is.
* Merge updates from core 8.5 branch.Joe Mistachkin2014-11-111-1/+1
|\
| * Eliminate all usage of deprecated Tcl_EvalObj, Tcl_GlobalEval and ↵jan.nijtmans2013-01-111-1/+1
| |\ | | | | | | | | | | | | | | | | | | Tcl_GlobalEvalObj functions. Add [file normalize] to pkgIndex.tcl, in order to prevent '..' in file paths. Remove unused TCLPATCHL, it should be ".0" for all final releases. Enable tk.h to be used with higher tcl.h versions which might lack _ANSI_ARGS_
| | * More complete purge of things only present for supporting long-dead Mac 9 ↵dgp2012-11-151-1/+1
| | | | | | | | | | | | systems.
| | * unneccessary variablejan.nijtmans2012-05-021-8/+0
| | |
* | | Add support for an 'M' binding substitution that is replaced with the number ↵Joe Mistachkin2012-11-161-2/+10
|/ / | | | | | | of script-based binding patterns matched so far for the event.
* | [Bug 533519]: Window placement with multiple screensjan.nijtmans2012-05-021-20/+0
|\ \ | |/
| * [Bug 533519]: Window placement with multiple screensjan.nijtmans2012-05-021-12/+0
| |\
| | * fix (hopefully) menu posting in the same way as window placementjan.nijtmans2012-04-201-12/+0
| | |
* | | [Bug 3520202]: %K must not work with <MouseWheel> or effects are undefined!dkf2012-04-221-4/+4
|\ \ \ | |/ /
| * | [Bug 3520202]: %K must not work with <MouseWheel> or effects are undefined!dkf2012-04-221-4/+4
| |/
* | [Bug 3176239] control-MouseWheel causes segvjan.nijtmans2012-04-061-1/+1
|\ \ | |/
| * [Bug 3176239] control-MouseWheel causes segvjan.nijtmans2012-04-061-1/+1
| |
* | Purge RCS Keywords.dgp2011-06-081-2/+0
|\ \ | |/
| * Purge RCS Keywords.dgp2011-06-081-2/+0
| |
| * * generic/tkBind.c (TkBindInit): for REDO_KEYSYM_LOOKUP, changedas2006-07-211-7/+9
| | | | | | | | | | | | | | | | | | keysym-to-string mapping hash to use first name in ks_names.h instead of last (if there are multiple possibilities), e.g. "F11" instead of "L1". * macosx/tkMacOSXKeyboard.c (TkpGetKeySym): correct keysyms for pure modifier key presses [Bugs 700311, 1525905]; correct keysym for Enter key; add keysyms for new NumLock and Fn modifiers (added 2005-08-09).
| * * generic/tkBind.c (Tk_BindEvent, ChangeScreen): replacehobbs2006-04-111-6/+9
| | | | | | | | Tcl_GlobalEval with more efficient Tcl_EvalEx.
| * * generic/tkBind.c <HandleEventGenerate>: Modified to fix wishdgp2004-05-131-3/+11
| | | | | | | | | | crach due to incorrectly generate <Destroy> event. This bug was reported in comp.lang.tcl but not logged.
| * * generic/tkBind.c (HandleEventGenerate): only modify root[xy]hobbs2004-02-181-11/+24
| | | | | | | | with [xy] when they haven't been otherwise set.
* | Tk_CreateBinding: Silently ignore empty binding scripts (Fixes [Bug 3006842]).jenglish2010-05-311-2/+6
| | | | | | | | ttkTreeview.c: [$tv tag bind $tag <...> {}] now removes binding.
* | Fix various gcc-4.4 warnings and formatting, allnijtmans2010-01-291-163/+144
| | | | | | | | backported from HEAD.
* | revert HandleEventGenerate change, it was causing bind-8.2 to faildas2009-04-111-2/+1
| |
* | * generic/tkBind.c (HandleEventGenerate): ensure window exists beforedas2009-04-101-1/+2
| | | | | | | | generating an event for it (fixes testsuite crash).
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | Tidy up some variable types.patthoyts2007-11-171-3/+3
| |
* | header cleanupdgp2007-09-071-2/+1
| |
* | various "const" additions, in line with TIP #27nijtmans2007-01-181-31/+31
| |
* | * generic/tkBind.c (TkBindInit): for REDO_KEYSYM_LOOKUP, changedas2006-07-211-7/+9
| | | | | | | | | | | | | | | | | | keysym-to-string mapping hash to use first name in ks_names.h instead of last (if there are multiple possibilities), e.g. "F11" instead of "L1". * macosx/tkMacOSXKeyboard.c (TkpGetKeySym): correct keysyms for pure modifier key presses [Bugs 700311, 1525905]; correct keysym for Enter key; add keysyms for new NumLock and Fn modifiers (added 2005-08-09).
* | * generic/tkBind.c (Tk_BindEvent, TkCopyAndGlobalEval): usehobbs2006-05-251-4/+6
| | | | | | | | Tcl_EvalEx instead of Tcl_GlobalEval.
* | Lots of ANSIfying of function decls.dkf2005-11-171-26/+26
| | | | | | | | Also a few spots where code has been cleaned up more completely.
* | Fixes of other issues raised in [Bug 1353022]dkf2005-11-101-2/+4
| |
* | ANSIfydkf2005-11-041-172/+165
| |
* | Getting more systematic about styledkf2005-08-101-1545/+1485
| | | | | | | | | | 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
* | TIP#165 (user data field) implementation.dkf2004-08-291-5/+40
| |
* | TIP#158 implementation; keypad keys on Win are now distinguishable.dkf2004-07-051-1/+2
| |
* | Modified HandleEventGenerate to properly generate <Destroy> eventchengyemao2004-05-131-3/+11
| |
* | Removed support for Mac OS Classic platform [Patch 918139]das2004-03-171-2/+2
| |
* | * generic/tkBind.c (HandleEventGenerate): only modify root[xy]hobbs2004-02-181-11/+24
| | | | | | | | with [xy] when they haven't been otherwise set.
* | * generic/tk3d.c: All uses of 'panic' (the macro) changeddavygrvy2004-01-131-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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:
* | * generic/tkBind.c (TkpGetBindingXEvent): Add helper methodmdejong2003-04-141-2/+28
|/ | | | | | | | | | | | | | that can be used to query the XEvent* for the currently executing binding. * generic/tkInt.h: Declare TkpGetBindingXEvent. * win/tkWinMenu.c (MenuKeyBindProc, TkWinMenuKeyObjCmd, TkpInitializeMenuBindings): Rename MenuKeyBindProc to TkWinMenuKeyObjCmd and convert it into a Tcl command named tk::tkWinMenuKey. Bind keyboard accelerator actions to this Tcl command instead of using a native C binding. This makes it possible to extend the existing binding with Tcl code and makes the Windows version work just like the unix version.
* Make all %-expansions generate ?? when their event doesn't have the rightdkf2003-02-281-57/+92
| | | | underlying field to prevent a crash on Windows. [Bug #612110]
* *** macosx-8-4-branch merged into the mainline [tcl patch #602770] ***macosx_8_4_merge_2002_08_31_trunkdas2002-08-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tk.decls: * generic/tkInt.decls: added new "aqua" specific entries to the stubs tables. Changed all "unix" entries to "x11" to allow us to distinguish and build both "aqua" on MacOSX and "x11" on MacOSX. * generic/tk.h: added a #ifnded RESOURCE_INCLUDED so that tk.h can be passed to the resource compiler. * generic/tkCmds.c (Tk_TkObjCmd): added [tk windowingsystem] subcommand: returns "x11" when running on X11, "win32" on Windows, "classic" on MacOS9 and "aqua" on MacOSX Aqua (i.e. Carbon) * generic/tkFont.c (TkFontGetFirstTextLayout): new private function returning the first chunk of a Tk_TextLayout, i.e. until the first font change on the first line (or the whole first line if there is no such font change). * generic/tkMain.c: made Tcl_ThreadDataKey static * library/demos/puzzle.tcl: fixed button metrics for aqua * tests/cursor.test: check for presence of arrow cursor instead of heart cursor * xlib/xcolors.c: changed xColors static initialization to more standard C * macosx/Wish.pbproj/jingham.pbxuser (new): * macosx/Wish.pbproj/project.pbxproj (new): project for Apple's ProjectBuilder IDE. * macosx/Makefile (new): simple makefile for building the project from the command line via the ProjectBuilder tool 'pbxbuild'. * macosx/tkMacOSXAppInit.c (new): macosx specific AppInit looking for a AppMain.tcl file in its bundled Resources/Scripts folder. If present, argv[1] is set to that file and the Scripts folder is added to the auto_path. This allows tk apps to embed scripts within their bundle directory structure. * macosx/tkMacOSXInit.c (new): macosx adapted version of tkUnixInit.c: we initialize & cache the Carbon native encoding (e.g. 'macRoman') and try to find the tk script library files inside Tk packaged as a framework. * macosx/tkMacOSXNotify.c (new): new macosx specific merged Carbon/select-based notifier. * macosx/tkMacOSXEvent.c (new): * macosx/tkMacOSXEvent.h (new): * macosx/tkMacOSXKeyEvent.c (new): * macosx/tkMacOSXMouseEvent.c (new): * macosx/tkMacOSXWindowEvent.c (new): new macosx specific event handling functionality. * macosx/tkMacOSX.h (new): * macosx/tkMacOSXBitmap.c (new): * macosx/tkMacOSXButton.c (new): * macosx/tkMacOSXClipboard.c (new): * macosx/tkMacOSXColor.c (new): * macosx/tkMacOSXConfig.c (new): * macosx/tkMacOSXCursor.c (new): * macosx/tkMacOSXDefault.h (new): * macosx/tkMacOSXDialog.c (new): * macosx/tkMacOSXDraw.c (new): * macosx/tkMacOSXEmbed.c (new): * macosx/tkMacOSXFont.c (new): * macosx/tkMacOSXHLEvents.c (new): * macosx/tkMacOSXInt.h (new): * macosx/tkMacOSXKeyboard.c (new): * macosx/tkMacOSXMenu.c (new): * macosx/tkMacOSXMenubutton.c (new): * macosx/tkMacOSXMenus.c (new): * macosx/tkMacOSXPort.h (new): * macosx/tkMacOSXRegion.c (new): * macosx/tkMacOSXScale.c (new): * macosx/tkMacOSXScrlbr.c (new): * macosx/tkMacOSXSubwindows.c (new): * macosx/tkMacOSXTest.c (new): * macosx/tkMacOSXUtil.c (new): * macosx/tkMacOSXUtil.h (new): * macosx/tkMacOSXWm.c (new): * macosx/tkMacOSXWm.h (new): * macosx/tkMacOSXXStubs.c (new): macosx ports of classic mac Tk implementation in tk/mac. * macosx/tkMacOSXSend.c (new): only send to local interp implemented currently. * macosx/tkMacOSXDebug.h (new): * macosx/tkMacOSXDebug.c (new): new macosx specific functions for debugging MacOS events, regions, etc. * macosx/tkAboutDlg.r (new): * macosx/tkMacOSXApplication.r (new): * macosx/tkMacOSXCursors.r (new): * macosx/tkMacOSXLibrary.r (new): * macosx/tkMacOSXMenu.r (new): * macosx/tkMacOSXResource.r (new): * macosx/tkMacOSXXCursors.r (new): * macosx/tclets.r (new): sources for Rez resource compiler. * macosx/Wish.icns (new): Wish application icon. * generic/tk.h: * generic/default.h: * generic/tkBind.c: * generic/tkCmds.c: * generic/tkGrab.c: * generic/tkPointer.c: * generic/tkPort.h: * generic/tkSelect.c: * generic/tkStubLib.c: * generic/tkTest.c: * generic/tkText.c: * generic/tkWindow.c: * unix/tkUnix3d.c: * xlib/xgc.c: * xlib/X11/X.h: * xlib/X11/Xlib.h: * xlib/X11/Xutil.h: added #includes and #ifdefs for macosx * library/bgerror.tcl: * library/button.tcl: * library/console.tcl: * library/dialog.tcl: * library/entry.tcl: * library/listbox.tcl: * library/menu.tcl: * library/msgbox.tcl: * library/scrlbar.tcl: * library/spinbox.tcl: * library/text.tcl: * library/tk.tcl: * library/demos/menu.tcl: * library/demos/menubu.tcl: * library/demos/widget: check [tk windowingsystem] instead of and/or in addition to $tcl_platform(platform). * generic/tkInt.h: * mac/tkMacBitmap.c: * mac/tkMacWm.c: added missing CONSTification * generic/tkIntDecls.h: * generic/tkIntPlatDecls.h: * generic/tkIntXlibDecls.h: * generic/tkPlatDecls.h: * generic/tkStubInit.c: regen
* Applied companion patch for Tcl Patch 585105,dgp2002-08-051-29/+43
| | | | | | | | | | | | | | | | | | | | | 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)
* * generic/tkBind.c (TkBindDeadWindow):mdejong2002-06-191-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle case where Tk_DestroyWindow is invoked on clipboard and send windows. * generic/tkClipboard.c (TkClipCleanup): Invoke Tk_DestroyWindow to cleanup the dispPtr->clipWindow. Call Tcl_Preserve and Tcl_Release on the window to avoid an invalid memory ref on shutdown. * generic/tkEvent.c (Tk_HandleEvent): Panic if XCreateIC is invoked twice for the same window. This should never happen, the check were just added to make sure it does not since this could lead to crashes in XCloseIM. * generic/tkFocus.c (TkFocusDeadWindow): Handle case where Tk_DestroyWindow is invoked on clipboard and send windows. * generic/tkOption.c (TkOptionDeadWindow): Ditto. * generic/tkWindow.c (TkCloseDisplay): Move deletion of dispPtr->winTable after TkpCloseDisplay call since Tk_DestroyWindow uses it and could be called by TkpCloseDisplay for clipboard/send windows. Also invoke ckfree for the dispPtr instead of doing it in TkpCloseDisplay. (Tk_DestroyWindow): Check for a null winPtr->mainPtr before doing certain cleanup tasks so the we can invoke Tk_DestroyWindow on clipboard and send windows. We need to do this so that XDestroyIC will get invoked for the input contexts of each window. * mac/tkMacXStubs.c (TkpCloseDisplay): Don't free the displayPtr since this is now done in TkCloseDisplay. * unix/tkUnixEvent.c (TkpCloseDisplay, OpenIM): Remove conditional compilation around calls to XCloseIM since I am confident that the crashes related to input contexts has been fixed. Don't free the displayPtr since this is now done in TkCloseDisplay. * unix/tkUnixSend.c (TkSendCleanup): Invoke the Tk_DestroyWindow method to cleanup the special send window. This will call XDestroyIC and thereby avoid a crash in XCloseIM. The send window needs to be Tcl_Preserve and Tcl_Release to avoid an invalid memory ref on shutdown. * win/tkWinX.c (TkpCloseDisplay): Don't free the displayPtr since this is now done in TkCloseDisplay.
* * generic/tkBind.c (HandleEventGenerate):hobbs2002-06-151-4/+4
| | | | | * generic/tkInt.h: changed warpInProgress boolean from int to a bit in the flags variable (TK_DISPLAY_IN_WARP)
* * generic/tkBind.c (ExpandPercents): Cast argument tomdejong2002-06-141-2/+2
| | | | Tk_GetAtomName in order to avoid compiler warning.
* TIP #47 "Modifying Tk to Allow Writing X Window managers"jenglish2002-06-141-6/+99
| | | | | | | | (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.
* * Updated callers of Tcl_SplitList and Tcl_Merge.dgp2002-01-251-2/+2
| | | | | | | | | * Updated callers of Tcl_GetStringResult. Rewrote PrintScrollFractions to ScrollFractions to stop scribbling directly on interp->result. * Updated callers of Tcl_GetVar, Tcl_GetVar2 * Updated callers of Tcl_SplitPath, Tcl_JoinPath, and Tcl_TranslateFileName.
* * Updates to handle change in type of tablePtrdgp2002-01-171-3/+3
| | | | | argument of Tcl_GetIndexFromObj(Struct) from (char **) to (CONST char **). [TIP 27] [Patch 504705]
* * generic/tkBind.c (TkBindFree):dgp2002-01-041-2/+2
| | | | | | * generic/tkGrid.c (ResolveConstraints,CheckSlotData,DestroyGrid): * generic/tkSelect.c (Tk_DeleteSelHandler,TkSelDeadWindow): Replaced Tcl_Free calls with ckfree so that memory debugging is fully supported.