Access Apple Magic Trackpad input in C ++ program

I would like to read trackpad multiplexing gestures and coordinate data in my C ++ program. Where can I find some introductory tutorials on this?

+6
source share
2 answers

The way to work is really objective-c ++, which is just a combination of C ++ and objective-c. This is very powerful because you can start using all of Apple's structures in your C ++ projects.

You should study a little objective-c, rename some .m files to .mm (or .cpp files to .mm) and read the documentation for the boxes during touch events. ( https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSResponder_Class/Reference/Reference.html#//apple_ref/occ/instm/NSResponder/touchesBeganWithEvent :)

Or if objective-c scares you, check out this trackpad multiplexer for OpenFrameworks https://github.com/jens-ae/ofxMultiTouchPad

0
source

You should take a look at the Cocoa Event Handling Guide .
To use the Cocoa framework in your C ++ program, use Objective-C ++ .

+2
source

Source: https://habr.com/ru/post/943737/


All Articles