Re: Dispatch NSEvent to everyone
Re: Dispatch NSEvent to everyone
- Subject: Re: Dispatch NSEvent to everyone
- From: Jean-Daniel Dupas <email@hidden>
- Date: Fri, 18 Jul 2008 18:05:56 +0200
Le 18 juil. 08 à 17:55, Matthew Williamson a écrit :
Hello list,
Ok, I'm completely new to Cocoa programming, but I've been
programming for 10 years, so I think I can figure this out.
I'm trying to do something remotely similar to a VNC server (pun
intended :-) ), but I need to be able to send Cocoa events into the
system--meaning CGPostMouseEvent won't cut it. I've seen
NSApplication postEvent:atStart: and sendEvent: , but from what I
can tell these only dispatch events to the current application. Is
there a way to dispatch an event to be handled by the whole
windowing system?
All the code examples I can find seem to use CGPostMouseEvent to
accomplish this kind of thing. But I need to be able to do more
kinds of events than the Carbon API provides functions for. It seems
like there should be a way to do this...and without resorting to
something like objc_sendMsg :-).
Or am I missing something fundamental about the event messaging
system?
Thanks in advance!
-Matt
You may have more lick using CGEvent API (especially CGEventCreate...
family functions and CGEventPost).
http://developer.apple.com/documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html
_______________________________________________
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