It looks like CGEventCreateMouseEvent is in the ApplicationServices framework.<div><a href="http://developer.apple.com/library/mac/#documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html">http://developer.apple.com/library/mac/#documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html</a>†</div>
<div><br></div><div>Your DllImport would be something like:</div><div><div>† † † † [System.Runtime.InteropServices.DllImport("/System/Library/Frameworks/ApplicationServices.framework/ApplicationServices")]</div>
</div><div>† † † † --- the signature</div><div><br></div><div>For a high resolution timer maybe this will point you in the correct direction:</div><div><a href="http://stackoverflow.com/questions/3540234/high-resolution-timer-for-iphone">http://stackoverflow.com/questions/3540234/high-resolution-timer-for-iphone</a>
</div><div><br></div><div>Duane</div><div><br><div class="gmail_quote">On Mon, Sep 17, 2012 at 2:34 PM, George <span dir="ltr"><<a href="mailto:mcnamaragio@gmail.com" target="_blank">mcnamaragio@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for your reply.

Yes, I am using MonoMac.

I was unable to find anything related to CGEventCreateMouseEvent in MonoMac docs. Which library should I PInvoke?

Any thoughts about high precision timer?

<blockquote style="border-left:2px solid #cccccc;padding:0 1em"><div>
<div style="font-weight:bold">Duane Wandless wrote</div>
<div>
I cannot tell from your questions whether or not you have found MonoMac.
 If you have great.  If not:
<a href="http://www.mono-project.com/MonoMac" target="_blank">http://www.mono-project.com/MonoMac</a>
<a href="http://tirania.org/monomac/" target="_blank">http://tirania.org/monomac/</a>

If MonoMac does not provide bindings for CGEventCreateMouseEvent then yes
you can add them using PInvoke.

Duane

On Mon, Sep 17, 2012 at 8:57 AM, Giorgi Dalakishvili
<<a href="http://user/SendEmail.jtp?type=node&node=4656666&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>>wrote:

> Hello,
>
>
>
> I am porting a Winforms application to Mac and need some help with porting
> windows specific functionality.
>
>
>
> I am using multimedia timers to execute a callback method repeatedly. Is
> there anything similar on Mac OS x and how do I use it from Mono? I am
> aware of NSTimer but it does not have the precision I am looking for.
>
>
>
> Also, I am using mouse hooks to track mouse and SendInput to simulate
> mouse events. I am able to get track mouse with NSEvent but Iím not sure
> how to simulate mouse clicks. I found that it is possible with
> CGEventCreateMouseEvent and CGEventPost but how do I call these from Mono?
> Do I need to use PInvoke?
>
>
>
> Thank you in advance.
>
> _______________________________________________
> Mono-osx mailing list
> <a href="http://user/SendEmail.jtp?type=node&node=4656666&i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>
> <a href="http://lists.ximian.com/mailman/listinfo/mono-osx" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-osx</a>
>
>

_______________________________________________
Mono-osx mailing list
<a href="http://user/SendEmail.jtp?type=node&node=4656666&i=2" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<a href="http://lists.ximian.com/mailman/listinfo/mono-osx" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-osx</a>
</div>
</div></blockquote>



        
        
        
<br><hr align="left" width="300">
View this message in context: <a href="http://mono.1490590.n4.nabble.com/Porting-windows-specific-functionality-to-mac-tp4656663p4656666.html" target="_blank">Re: Porting windows specific functionality to mac</a><br>
Sent from the <a href="http://mono.1490590.n4.nabble.com/Mono-OSX-f1546893.html" target="_blank">Mono - OSX mailing list archive</a> at Nabble.com.<br><br>_______________________________________________<br>
Mono-osx mailing list<br>
<a href="mailto:Mono-osx@lists.ximian.com">Mono-osx@lists.ximian.com</a><br>
<a href="http://lists.ximian.com/mailman/listinfo/mono-osx" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-osx</a><br>
<br></blockquote></div><br></div>