# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1302200404 0 # Node ID d94a4fa0359e01bb5ad79c16f9a1acb24598c41e # Parent 21ed1421399c67d95e3770e66a7ea1eec9731dae Implemented the motion notify event on Mac. Most of it was there except the event handler. Also removed the stub for dw_window_track() this appears to be an unused function only implemented on OS/2. diff -r 21ed1421399c -r d94a4fa0359e mac/dw.m --- a/mac/dw.m Thu Apr 07 09:04:48 2011 +0000 +++ b/mac/dw.m Thu Apr 07 18:20:04 2011 +0000 @@ -228,6 +228,15 @@ return buttonfunc(object, (int)x, (int)y, button, handler->data); } + /* Motion notify event */ + case 5: + { + int (* API motionfunc)(HWND, int, int, int, void *) = (int (* API)(HWND, int, int, int, void *))handler->signalfunction; + int buttonmask = (int)[NSEvent pressedMouseButtons]; + NSPoint point = [NSEvent mouseLocation]; + + return motionfunc(object, (int)point.x, (int)point.y, buttonmask, handler->data); + } /* Window close event */ case 6: { @@ -580,6 +589,7 @@ -(void)windowDidBecomeMain:(id)sender; -(void)menuHandler:(id)sender; -(void)keyDown:(NSEvent *)theEvent; +-(void)mouseMoved:(NSEvent *)theEvent; @end @implementation DWView @@ -624,6 +634,7 @@ -(void)setMenu:(NSMenu *)input { windowmenu = input; [windowmenu retain]; } -(void)menuHandler:(id)sender { _event_handler(sender, nil, 8); } -(void)keyDown:(NSEvent *)theEvent { _event_handler(self, theEvent, 2); _event_handler([self window], theEvent, 2); } +-(void)mouseMoved:(NSEvent *)theEvent { _event_handler(self, theEvent, 5); } @end /* Subclass for a button type */ @@ -6694,16 +6705,6 @@ } /* - * Tracks this window movement. - * Parameters: - * handle: Handle to frame to be tracked. - */ -void API dw_window_track(HWND handle) -{ - NSLog(@"dw_window_track() unimplemented\n"); -} - -/* * Changes a window's parent to newparent. * Parameters: * handle: The window handle to destroy.