Hey all,
I was looking into porting the touch events into gambit, but I am pretty new to gambit and the c ffi specifically. The touch events are somewhat complex, taking an NSSet * and a UIEvent *. From what I can tell, the NSSet contains all current touch points (so if you have three fingers down, the NSSet contains three touch points) and the UIEvent has a history of all the touch points and where they have been since the first "touchesBegan" event, though I am not sure of the specific structure of these objects yet. I am wondering what is the best way to translate these into scheme data structures?
Thanks for any guidance on this, and I also noticed that James was talking about working on touch facilities as well. Maybe we could join forces on this? Or maybe you are already done?
- Ryan
Afficher les réponses par date
In the iPhone app I'm developing I am currently traversing the set of touch events in Objective-C and calling into touch-<began | moved | ended> Gambit-C callbacks I've defined that take an integer touch id and x,y coordinates. Active touches are tracked in Scheme in a hash table keyed on touch id. This has been suiting my multi-touch tracking needs so far. I'd be happy to share some code if there's interest.
'AA
On Jul 11, 2009, at 6:03 PM, Ryan Spangler patch_work8848@yahoo.com wrote:
Hey all,
I was looking into porting the touch events into gambit, but I am pretty new to gambit and the c ffi specifically. The touch events are somewhat complex, taking an NSSet * and a UIEvent *. From what I can tell, the NSSet contains all current touch points (so if you have three fingers down, the NSSet contains three touch points) and the UIEvent has a history of all the touch points and where they have been since the first "touchesBegan" event, though I am not sure of the specific structure of these objects yet. I am wondering what is the best way to translate these into scheme data structures?
Thanks for any guidance on this, and I also noticed that James was talking about working on touch facilities as well. Maybe we could join forces on this? Or maybe you are already done?
- Ryan
Gambit-iphone mailing list Gambit-iphone@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-iphone
Hey Ryan,
I have not worked much on access to Touch events yet, and you're probably looking for specific FFI code as an example. Andrew, it would be great if you could share your code!
I was thinking of exposing access to the UITouch and other event objects so that you could benefit from the normal Cocoa API. When I do this, I will share this code.
Thanks, James
On Sun, Jul 12, 2009 at 1:30 PM, Andrew Andkjarandkjar@obtech.net wrote:
In the iPhone app I'm developing I am currently traversing the set of touch events in Objective-C and calling into touch-<began | moved | ended> Gambit-C callbacks I've defined that take an integer touch id and x,y coordinates. Active touches are tracked in Scheme in a hash table keyed on touch id. This has been suiting my multi-touch tracking needs so far. I'd be happy to share some code if there's interest. 'AA On Jul 11, 2009, at 6:03 PM, Ryan Spangler patch_work8848@yahoo.com wrote:
Hey all,
I was looking into porting the touch events into gambit, but I am pretty new to gambit and the c ffi specifically. The touch events are somewhat complex, taking an NSSet * and a UIEvent *. From what I can tell, the NSSet contains all current touch points (so if you have three fingers down, the NSSet contains three touch points) and the UIEvent has a history of all the touch points and where they have been since the first "touchesBegan" event, though I am not sure of the specific structure of these objects yet. I am wondering what is the best way to translate these into scheme data structures?
Thanks for any guidance on this, and I also noticed that James was talking about working on touch facilities as well. Maybe we could join forces on this? Or maybe you are already done?
- Ryan
Gambit-iphone mailing list Gambit-iphone@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-iphone
Gambit-iphone mailing list Gambit-iphone@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-iphone
2009/7/12 Ryan Spangler patch_work8848@yahoo.com
Hey all,
I was looking into porting the touch events into gambit, but I am pretty new to gambit and the c ffi specifically. The touch events are somewhat complex, taking an NSSet * and a UIEvent *. From what I can tell, the NSSet contains all current touch points (so if you have three fingers down, the NSSet contains three touch points) and the UIEvent has a history of all the touch points and where they have been since the first "touchesBegan" event, though I am not sure of the specific structure of these objects yet. I am wondering what is the best way to translate these into scheme data structures?
Lately I have come to the conclusion that it might be easier to structure the program, such that the view and controller is programmed in Objective C and the model is programmed in Scheme. This might change when a real Objective C FFI emerges, but until then, using Objective C for the controller means that you can use reference material on iPhone development more easily. I myself have found that learning the ways of Interface Builder takes it toll, so adding one more obstacle is not worth it.
Apropos reference materials, I'll to recommend the book "iPhone SDK Development -Building iPhone Applications by Chris Adamson, Bill Dudnet with Marcel Molina. The book is especially good for newcomers to XCode and Interface Builder.
On Sat, Jul 11, 2009 at 6:03 PM, Ryan Spanglerpatch_work8848@yahoo.com wrote:
Hey all,
I was looking into porting the touch events into gambit, but I am pretty new to gambit and the c ffi specifically.
Hey guys,
I've finished my touch FFI. It provides interfaces for the appropriate Objective-C objects. You can read more about it here:
http://jlongster.com/blog/2009/07/20/touch-accelerometer-functionality-iphon...
gambit-iphone@iro.umontreal.ca