Re: Controlling Spaces and retrieving information about the current Space?
Re: Controlling Spaces and retrieving information about the current Space?
- Subject: Re: Controlling Spaces and retrieving information about the current Space?
- From: Eric Schlegel <email@hidden>
- Date: Tue, 22 Sep 2009 09:19:25 -0700
On Sep 21, 2009, at 4:39 PM, Hippo Man wrote:
Is there a way in Cocoa to programmatically query which Space the user
is currently looking at? In other words, if I have six Spaces defined
and Space 3 happens to be the one which is currently visible on my
screen, how can I make some sort of Cocoa-based query to find out that
Space 3 is the one that's currently visible?
You could use the (CoreGraphics, not Cocoa) API
CGWindowListCreateDescriptionFromArray to get a window description
dictionary for a window, and then look at the WorkspaceID data in that
dictionary. There is no defined mapping from WorkspaceID to a
particular space, however.
Secondly, is there any way in any of those environments to
programmatically switch Spaces? For example, if Space 3 happens to be
visible, is there any Cocoa code I can run which will switch the
visibility to, say, Space 2?
No, there is no API (in Cocoa or otherwise) to control the active space.
-eric
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden