RE: Obtaining information about the System's current cursor
RE: Obtaining information about the System's current cursor
- Subject: RE: Obtaining information about the System's current cursor
- From: "Mark McElhinney" <email@hidden>
- Date: Thu, 29 Sep 2005 15:15:53 -0600
- Thread-topic: Obtaining information about the System's current cursor
Thanks Ricky. That's an unfortunate response. We would like to display
the correct cursor, so that the viewer, or remote controller, can get a
very accurate picture of what is going on, so they can see that the
person is editing text, or has a wait cursor, etc. Currently I am just
displaying the cursor that is returned from [NSCursor currentCursor]
which is usually the arrow, and then I just repaint some of the colors
to red so the viewer can distinguish between their cursor and the remote
cursor.
This is an inter operating system application, where the mac version can
display a windows desktop, and vice versa. So rather than just have some
default cursor showing, we would rather the actual Mac cursor, or
Windows cursor be displayed.
Thanks for the response though. If anyone else has ideas, please let me
know.
Mark McElhinney
-----Original Message-----
From: Ricky Sharp [mailto:email@hidden]
Sent: Thursday, September 29, 2005 3:09 PM
To: Mark McElhinney
Cc: email@hidden
Subject: Re: Obtaining information about the System's current cursor
On Sep 29, 2005, at 3:37 PM, Mark McElhinney wrote:
> Is there any way for a cocoa application to determine what cursor
> the OS
> is using at any given time? I have seen NSCursors currentCursor
> method,
> however, this only returns the current cursor for your application.
>
> If there is no way to determine the cursor type at any given time, is
> the any sort of callback that you can subscribe to that will inform
> your
> application when the cursor changes?
>
> If neither of these are doable in a Cocoa application, does anyone
> know
> of another means to obtain this information?
I don't think obtaining the cursor system-wide is possible at all.
Furthermore, some apps (like ones I've written) hide the real cursor
and just animate a sprite around the screen. In other cases, the
cursor could be currently obscured.
> Purpose: I need to capture the entire desktop area, including the
> cursor, but referencing the screen bytes with CGDisplayBaseAddress
> only
> give the screen information, not the cursor information. So I then get
> the mouse location using [NSEvent mouseLocation] and if I can find out
> which cursor is being used, can then draw it into my buffer at the
> correct location.
Have you looked at how others apps implement this? For example,
Apple's Grab let's you specify which cursor to draw when the
screenshot is taken.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden