I didn't know I could put that in DllImport declaration. I will give it a
try.

As for using NSDate that example is for timing how long something took time,
while I want to periodically execute my custom method.


Duane Wandless wrote
> 
> It looks like CGEventCreateMouseEvent is in the ApplicationServices
> framework.
> http://developer.apple.com/library/mac/#documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html
> 
> 
> Your DllImport would be something like:
> 
> [System.Runtime.InteropServices.DllImport("/System/Library/Frameworks/ApplicationServices.framework/ApplicationServices")]
>         --- the signature
> 
> For a high resolution timer maybe this will point you in the correct
> direction:
> http://stackoverflow.com/questions/3540234/high-resolution-timer-for-iphone
> 
> Duane
> 
> On Mon, Sep 17, 2012 at 2:34 PM, George <mcnamaragio@> wrote:
> 
>> 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?
>>
>> Duane Wandless wrote
>>  I cannot tell from your questions whether or not you have found MonoMac.
>> If you have great. If not: http://www.mono-project.com/MonoMac
>> http://tirania.org/monomac/ 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 <[hidden
>> email]&lt;http://user/SendEmail.jtp?type=node&amp;node=4656666&amp;i=0&gt;>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 >
>> [hidden
>> email]
>> &lt;http://user/SendEmail.jtp?type=node&amp;node=4656666&amp;i=1&gt; >
>> http://lists.ximian.com/mailman/listinfo/mono-osx > >
>> _______________________________________________ Mono-osx mailing list
>> [hidden
>> email]
>> &lt;http://user/SendEmail.jtp?type=node&amp;node=4656666&amp;i=2&gt;
>> http://lists.ximian.com/mailman/listinfo/mono-osx
>>
>>
>> ------------------------------
>> View this message in context: Re: Porting windows specific functionality
>> to
>> mac&lt;http://mono.1490590.n4.nabble.com/Porting-windows-specific-functionality-to-mac-tp4656663p4656666.html&gt;
>> Sent from the Mono - OSX mailing list
>> archive&lt;http://mono.1490590.n4.nabble.com/Mono-OSX-f1546893.html&gt;at
>> Nabble.com.
>>
>> _______________________________________________
>> Mono-osx mailing list
>> [email protected]
>> http://lists.ximian.com/mailman/listinfo/mono-osx
>>
>>
> 
> _______________________________________________
> Mono-osx mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/mono-osx
> 




--
View this message in context: 
http://mono.1490590.n4.nabble.com/Porting-windows-specific-functionality-to-mac-tp4656663p4656674.html
Sent from the Mono - OSX mailing list archive at Nabble.com.
_______________________________________________
Mono-osx mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/mono-osx

Reply via email to