diff options
author | Jess VanDerwalker <washu@sonic.net> | 2012-04-04 15:23:58 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2012-04-05 11:48:47 -0700 |
commit | e4937cdf20f0845bcd6dca1be019735fc62b504b (patch) | |
tree | c6339376ebb012ab68edb5016edf69b6db7e4718 /src/xtoq/XtoqController.m | |
parent | 0f1ccd10cd8e999b5d630296afccbf5d921e8306 (diff) |
Mouse button press and release rolled into one function.
xcwm_input_button_pressed and xcwm_input_button_released compressed into one function - xcwm_input_mouse_button_event that takes a state parameter to determine if mouse button has been pressed or released.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Diffstat (limited to 'src/xtoq/XtoqController.m')
-rw-r--r-- | src/xtoq/XtoqController.m | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/xtoq/XtoqController.m b/src/xtoq/XtoqController.m index 5db1462..087eeff 100644 --- a/src/xtoq/XtoqController.m +++ b/src/xtoq/XtoqController.m @@ -171,9 +171,8 @@ //CGFloat heightFloat; NSDictionary *mouseMoveInfo = [aNotification userInfo]; - NSEvent * event = [mouseMoveInfo objectForKey: @"1"]; - NSNumber *xNum = [mouseMoveInfo objectForKey: @"2"]; - NSNumber *yNum = [mouseMoveInfo objectForKey: @"3"]; + NSNumber *xNum = [mouseMoveInfo objectForKey: @"1"]; + NSNumber *yNum = [mouseMoveInfo objectForKey: @"2"]; int height = [[NSScreen mainScreen] frame].size.height; @@ -235,10 +234,11 @@ int buttonInt = [mouseButton intValue]; dispatch_async(xcwmDispatchQueue, - ^{ xcwm_input_button_press (rootContext, - 0, - 0, - buttonInt);;}); + ^{ xcwm_input_mouse_button_event (rootContext, + 0, + 0, + buttonInt, + 1);;}); } // on this side all I have is a xcwm_context , on the library side I need @@ -257,10 +257,11 @@ int buttonInt = [mouseButton intValue]; dispatch_async(xcwmDispatchQueue, - ^{ xcwm_input_button_release (rootContext, - 0, - 0, - buttonInt);;}); + ^{ xcwm_input_mouse_button_event (rootContext, + 0, + 0, + buttonInt, + 0);;}); } |