Multitouch wrapper

Member
Posts: 20
Joined: 2010.09
Post: #1
Hey,

I'm kind of a newb in C, and I've been researching methods of wrapping OS X's multitouch API in a basic BSD dylib in C. I need this dylib to give some interpreted programming languages I use access to the multitouch in MacBooks, for gaming reasons (tasty from a design standpoint).

However, I'm lost. I read apple's documentation, and naturally it's a nightmare to find what you need to find. Could anyone give me any headers to .h files that will link under basic BSD dylib C, and multitouch commands... and... help. Blink


Anyone has any idea how this can be done?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
The multitouch events come through the normal event stream, so you'll need a hook into GM's event loop somehow.
Quote this message in a reply
Member
Posts: 20
Joined: 2010.09
Post: #3
There's no way that can be done, the only way you can access non-native GM functions is through dylibs. However, is it possible to access the OS X event stream through the dylib, managing loops and everything to make it consistent and usable in GM?

Sadly, GM4Mac by itself is still a Windows port and we'll probably never see Mac-native features like the multitouch, which is pretty awesome in the eyes of game design. Thus, it's the job of chumps like me to provide dylibs that link between GM and the OS itself.

Or a separate multitouch API of sorts? The main problem here is accessing the required functions through the dylib, once we have that it's all a matter of mixing GML and C to make both programs cooperate.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
If you can't hook into GM's event loop, I think you're out of luck here.

You could read the raw multitouch data from IOKit outside of the event stream perhaps, but you're definitely on your own there!
Quote this message in a reply
Member
Posts: 20
Joined: 2010.09
Post: #5
Ugh, IOKit is ridiculously low-level for a noob like me. LOL

I guess my best choice is to email YYG and ask them for some way to plug into the event stream. Although it's unlikely that they'll care. Mad

~Question: what's the best place to learn openAL programming for the Macintosh. While playing around with documentation, I've had trouble actually getting stuff working, it seems like openAL/Mac is implemented differently.

Any pointers? Rolleyes
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #6
OpenAL's a standard. If you find something that "works differently", maybe it's a bug Rasp Any old OpenAL sample code should work.
Quote this message in a reply
Post Reply