summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXCarbonEvents.c
diff options
context:
space:
mode:
authordas <das>2005-12-13 03:44:33 (GMT)
committerdas <das>2005-12-13 03:44:33 (GMT)
commit3bdbff63fb0c811a2c2a1603ea18ac664882e8aa (patch)
tree6a819ca1e2c3174079895898e9a9b6227bb745e7 /macosx/tkMacOSXCarbonEvents.c
parente084245ccaf3d2437d5779d2846af55a36677cc6 (diff)
downloadtk-3bdbff63fb0c811a2c2a1603ea18ac664882e8aa.zip
tk-3bdbff63fb0c811a2c2a1603ea18ac664882e8aa.tar.gz
tk-3bdbff63fb0c811a2c2a1603ea18ac664882e8aa.tar.bz2
* library/demos/cscroll.tcl: add MouseWheel bindings for aqua.
* macosx/tkMacOSXCarbonEvents.c (TkMacOSXInitCarbonEvents): * macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent, GenerateMouseWheelEvent): add support for kEventMouseScroll events (smooth mouse wheel scrolling from mighty mouse or scrolling trackpad) by handling kEventMouseWheelMoved on application target as well as on dispatcher, in order to pick up synthesized MouseWheel events from HIObject handler (c.f. QA1453); add support for horizontal scrolling events by generating MouseWheel XEvent with Shift modifier.
Diffstat (limited to 'macosx/tkMacOSXCarbonEvents.c')
-rw-r--r--macosx/tkMacOSXCarbonEvents.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/macosx/tkMacOSXCarbonEvents.c b/macosx/tkMacOSXCarbonEvents.c
index a8b752c..c4aca8d 100644
--- a/macosx/tkMacOSXCarbonEvents.c
+++ b/macosx/tkMacOSXCarbonEvents.c
@@ -60,7 +60,7 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXCarbonEvents.c,v 1.7 2005/12/01 06:24:16 hobbs Exp $
+ * RCS: @(#) $Id: tkMacOSXCarbonEvents.c,v 1.8 2005/12/13 03:44:34 das Exp $
*/
#include "tkInt.h"
@@ -193,6 +193,7 @@ TkMacOSXInitCarbonEvents (
{kEventClassMenu, kEventMenuBeginTracking},
{kEventClassMenu, kEventMenuEndTracking},
{kEventClassCommand, kEventCommandProcess},
+ {kEventClassMouse, kEventMouseWheelMoved},
{kEventClassWindow, kEventWindowExpanded},
{kEventClassApplication, kEventAppHidden},
{kEventClassApplication, kEventAppShown},
@@ -231,6 +232,7 @@ TkMacOSXInitCarbonEvents (
_TraceEventByName(CFSTR("kEventMouseDown"));
_TraceEventByName(CFSTR("kEventMouseUp"));
_TraceEventByName(CFSTR("kEventMouseWheelMoved"));
+ _TraceEventByName(CFSTR("kEventMouseScroll"));
_TraceEventByName(CFSTR("kEventWindowUpdate"));
_TraceEventByName(CFSTR("kEventWindowActivated"));
_TraceEventByName(CFSTR("kEventWindowDeactivated"));