Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating synthetic mouse events with CGEventCreateMouseEvent (was Re: Determining screen coverage of an application)




On Oct 28, 2005, at 8:54 PM, Gregory Cooksey wrote:

Now I'm running into a problem creating the actual events.  I call

CGEventRef ev = CGEventCreateMouseEvent(source, kCGEventLeftMouseDown, position, kCGMouseButtonLeft);
CGPostEventToPSN(&psn, ev);


and the target application doesn't seem to receive any event at all. I've installed a monitor at the PSN tap, and it's seeing events of type kCGEventNull instead of kCGEventLeftMouseDown. I tried adding a click state field to the mouse event in case the problem was due to that being absent, but it didn't help. Am I missing something else here?

You might try asking on the quartz-dev mailing list; the CoreGraphics engineer who is responsible for this API reads that list, but I don't think he reads this one.


-eric


_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Determining screen coverage of an application (From: Gregory Cooksey <email@hidden>)
 >Re: Determining screen coverage of an application (From: Eric Schlegel <email@hidden>)
 >Creating synthetic mouse events with CGEventCreateMouseEvent (was Re: Determining screen coverage of an application) (From: Gregory Cooksey <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.