Two finger zoom on mac
BlitzMax Forums/BlitzMax Programming/Two finger zoom on mac
| ||
Im not sure how you call it but is there any way to use the touchpad to get two finger zooming like you can do in safari or other programs. When I look for events nothing registers when i try that. Do anyone have any tips, ideas or perhaps a module? |
| ||
As for tips, here's the documentation. http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/EventOverview/HandlingTouchEvents/HandlingTouchEvents.html |
| ||
It's called Multi-Touch. |
| ||
Thanks! thats a good start :) |
| ||
And, because I was bored: Removed, see code archive entry linked below Note: the documentation is sort of contradictory about whether or not you can use setNextResponder:, so I'm ignoring the part that says you shouldn't use it. I'm also not sure about how these get removed from the responder chain, so that's probably a bug in the code. In general, though, this is territory I'm unfamiliar with, so you'd probably have to check the documentation to make sure things aren't going to explode after an hour. |
| ||
Thanks alot! Its works quite well! Although it does print a bunch of bad refs after a short while. But it does work :) Im very thankfull for that! |
| ||
Try removing the BBRELEASE at the end of -magnifyWithEvent:, I put that in there since I wasn't sure about how reference count would be maintained off the top of my head and didn't feel like checking my notes. |
| ||
Added an entry to the code archives for this: Multitouch Trackpad Events Works for swiping, magnification, and rotation now; the responder chain doesn't get horribly broken when destroying the handler, as it did before; it shouldn't cause any badrefs errors; etc. |
| ||
Thank you so much! :) Today i will giver it a more proper testing :) |
| ||
Works very well :) I wonder if there is any way to use the two finger scrolling. I wonder since if i use two fingers now it already acts like the scrollwheel. Thanks again for your effort! |
| ||
You can get that event information by implementing -scrollWheel: in an NSResponder subclass. BlitzMax already handles this in the brl.System module through the bbSystemEmitOSEvent routine, but only gets the Y delta from the scrollwheel event. I don't know why it ignores the X scroll, but it's pretty clearly not handling the event correctly. Edit: See here: http://www.blitzbasic.com/Community/posts.php?topic=88534 |
| ||
One more question. This works very well in a windoed mode. but when i try to make it full screen it crashes. Is it just like that for me? |
| ||
Hm, I managed to stop the crashing by working with the NSOpenGLContext instead of trying to mess with the TGLGraphics context itself, but it doesn't seem to receive events in fullscreen mode. It may be easier to just add handling for the events to BBGLWindow's sendEvent: method (in brl.glgraphics) rather than trying to jam a new responder into the responder chain. |