Creating a runloop to handle specific mouse events
Creating a runloop to handle specific mouse events
- Subject: Creating a runloop to handle specific mouse events
- From: Berk Özer <email@hidden>
- Date: Wed, 03 Sep 2008 18:36:02 +0200
Hi all!
At one point, my application blocks the runloop and I have to poll for
mouse events by calling [NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:]. I'm not happy with
the polling. It seems to me that creating a separate thread and
configuring its runloop to process the events I'm interested in
(specific mouse events for a specific window) is a more elegant
solution. I couldn't find any example code doing that. I suspect that
it's not possible for third-party developers to tap into the event
stream coming from the window server, to create a CFRunloopSource
similar to the one that feeds the main runloop.
Request for comments.
Thank you.
Regards
Berk Özer
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden