зеркало из https://github.com/mono/mail-archives.git
123 строки
7.2 KiB
HTML
123 строки
7.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-osx] Porting windows specific functionality to mac
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:mono-osx%40lists.ximian.com?Subject=Re%3A%20%5BMono-osx%5D%20Porting%20windows%20specific%20functionality%20to%20mac&In-Reply-To=%3CCAMfhp5GuAfsBD3hOgL21J9oDQp8r%3DA%3DtuXBpx_0XNP%2BsPh5eCg%40mail.gmail.com%3E">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<style type="text/css">
|
|
pre {
|
|
white-space: pre-wrap; /* css-2.1, curent FF, Opera, Safari */
|
|
}
|
|
</style>
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="005085.html">
|
|
<LINK REL="Next" HREF="005087.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-osx] Porting windows specific functionality to mac</H1>
|
|
<B>Duane Wandless</B>
|
|
<A HREF="mailto:mono-osx%40lists.ximian.com?Subject=Re%3A%20%5BMono-osx%5D%20Porting%20windows%20specific%20functionality%20to%20mac&In-Reply-To=%3CCAMfhp5GuAfsBD3hOgL21J9oDQp8r%3DA%3DtuXBpx_0XNP%2BsPh5eCg%40mail.gmail.com%3E"
|
|
TITLE="[Mono-osx] Porting windows specific functionality to mac">duane at wandless.net
|
|
</A><BR>
|
|
<I>Mon Sep 17 19:03:23 UTC 2012</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="005085.html">[Mono-osx] Porting windows specific functionality to mac
|
|
</A></li>
|
|
<LI>Next message: <A HREF="005087.html">[Mono-osx] Porting windows specific functionality to mac
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#5086">[ date ]</a>
|
|
<a href="thread.html#5086">[ thread ]</a>
|
|
<a href="subject.html#5086">[ subject ]</a>
|
|
<a href="author.html#5086">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>It looks like CGEventCreateMouseEvent is in the ApplicationServices
|
|
framework.
|
|
<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>
|
|
|
|
|
|
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:
|
|
<A HREF="http://stackoverflow.com/questions/3540234/high-resolution-timer-for-iphone">http://stackoverflow.com/questions/3540234/high-resolution-timer-for-iphone</A>
|
|
|
|
Duane
|
|
|
|
On Mon, Sep 17, 2012 at 2:34 PM, George <<A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">mcnamaragio at gmail.com</A>> wrote:
|
|
|
|
><i> Thanks for your reply. Yes, I am using MonoMac. I was unable to find
|
|
</I>><i> anything related to CGEventCreateMouseEvent in MonoMac docs. Which library
|
|
</I>><i> should I PInvoke? Any thoughts about high precision timer?
|
|
</I>><i>
|
|
</I>><i> Duane Wandless wrote
|
|
</I>><i> I cannot tell from your questions whether or not you have found MonoMac.
|
|
</I>><i> If you have great. If not: <A HREF="http://www.mono-project.com/MonoMac">http://www.mono-project.com/MonoMac</A>
|
|
</I>><i> <A HREF="http://tirania.org/monomac/">http://tirania.org/monomac/</A> If MonoMac does not provide bindings for
|
|
</I>><i> CGEventCreateMouseEvent then yes you can add them using PInvoke. Duane On
|
|
</I>><i> Mon, Sep 17, 2012 at 8:57 AM, Giorgi Dalakishvili <[hidden email]<<A HREF="http://user/SendEmail.jtp?type=node&node=4656666&i=0">http://user/SendEmail.jtp?type=node&node=4656666&i=0</A>>>wrote:
|
|
</I>><i> > Hello, > > > > I am porting a Winforms application to Mac and need some
|
|
</I>><i> help with porting > windows specific functionality. > > > > I am using
|
|
</I>><i> multimedia timers to execute a callback method repeatedly. Is > there
|
|
</I>><i> anything similar on Mac OS x and how do I use it from Mono? I am > aware of
|
|
</I>><i> NSTimer but it does not have the precision I am looking for. > > > > Also,
|
|
</I>><i> I am using mouse hooks to track mouse and SendInput to simulate > mouse
|
|
</I>><i> events. I am able to get track mouse with NSEvent but I’m not sure > how to
|
|
</I>><i> simulate mouse clicks. I found that it is possible with >
|
|
</I>><i> CGEventCreateMouseEvent and CGEventPost but how do I call these from Mono?
|
|
</I>><i> > Do I need to use PInvoke? > > > > Thank you in advance. > >
|
|
</I>><i> _______________________________________________ > Mono-osx mailing list > [hidden
|
|
</I>><i> email] <<A HREF="http://user/SendEmail.jtp?type=node&node=4656666&i=1">http://user/SendEmail.jtp?type=node&node=4656666&i=1</A>> >
|
|
</I>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">http://lists.ximian.com/mailman/listinfo/mono-osx</A> > >
|
|
</I>><i> _______________________________________________ Mono-osx mailing list [hidden
|
|
</I>><i> email] <<A HREF="http://user/SendEmail.jtp?type=node&node=4656666&i=2">http://user/SendEmail.jtp?type=node&node=4656666&i=2</A>>
|
|
</I>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">http://lists.ximian.com/mailman/listinfo/mono-osx</A>
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i> ------------------------------
|
|
</I>><i> View this message in context: Re: Porting windows specific functionality
|
|
</I>><i> to mac<<A HREF="http://mono.1490590.n4.nabble.com/Porting-windows-specific-functionality-to-mac-tp4656663p4656666.html">http://mono.1490590.n4.nabble.com/Porting-windows-specific-functionality-to-mac-tp4656663p4656666.html</A>>
|
|
</I>><i> Sent from the Mono - OSX mailing list archive<<A HREF="http://mono.1490590.n4.nabble.com/Mono-OSX-f1546893.html">http://mono.1490590.n4.nabble.com/Mono-OSX-f1546893.html</A>>at Nabble.com.
|
|
</I>><i>
|
|
</I>><i> _______________________________________________
|
|
</I>><i> Mono-osx mailing list
|
|
</I>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">Mono-osx at lists.ximian.com</A>
|
|
</I>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">http://lists.ximian.com/mailman/listinfo/mono-osx</A>
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>-------------- next part --------------
|
|
An HTML attachment was scrubbed...
|
|
URL: <<A HREF="http://lists.ximian.com/pipermail/mono-osx/attachments/20120917/5a50eade/attachment.html">http://lists.ximian.com/pipermail/mono-osx/attachments/20120917/5a50eade/attachment.html</A>>
|
|
</PRE>
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="005085.html">[Mono-osx] Porting windows specific functionality to mac
|
|
</A></li>
|
|
<LI>Next message: <A HREF="005087.html">[Mono-osx] Porting windows specific functionality to mac
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#5086">[ date ]</a>
|
|
<a href="thread.html#5086">[ thread ]</a>
|
|
<a href="subject.html#5086">[ subject ]</a>
|
|
<a href="author.html#5086">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/mono-osx">More information about the Mono-osx
|
|
mailing list</a><br>
|
|
</body></html>
|