Re: Controlling Spaces and retrieving information about the current Space?

2009-09-23 Thread Hippo Man
> >>> Secondly, is there any way in any of those environments to > >>> programmatically switch Spaces? [ ... ] > >> > >> No, there is no API (in Cocoa or otherwise) to control the active > space. > > >But how does Spaces do it? Is it via an internal, private API that > >people like us don't have a

Re: Controlling Spaces and retrieving information about the current Space?

2009-09-23 Thread Chris Idou
>>> Secondly, is there any way in any of those environments to >>> programmatically switch Spaces? [ ... ] >> >> No, there is no API (in Cocoa or otherwise) to control the active space. >But how does Spaces do it? Is it via an internal, private API that >people like us don't have access to? Th

Re: Controlling Spaces and retrieving information about the current Space?

2009-09-23 Thread Graham Cox
On 24/09/2009, at 4:26 AM, Hippo Man wrote: But how does Spaces do it? Is it via an internal, private API that people like us don't have access to? Yep. There are many of these - probably more than there are public ones. Get used to it! --Graham

Re: Controlling Spaces and retrieving information about the current Space?

2009-09-23 Thread Hippo Man
Randall Meadows wrote: On Sep 23, 2009, at 2:27 PM, Hippo Man wrote: On Tue, Sep 22, 2009 at 12:27, Jesper Storm Bache wrote: There is very little external control over Spaces. Be sure to file enhancement request radars. One related question: I'm new to the Apple development world, and I wa

Re: Controlling Spaces and retrieving information about the current Space?

2009-09-23 Thread Hippo Man
On Tue, Sep 22, 2009 at 12:27, Jesper Storm Bache wrote: > There is very little external control over Spaces. > Be sure to file enhancement request radars. One related question: I'm new to the Apple development world, and I want to make sure that I know the right place to file such an enhancement

Re: Controlling Spaces and retrieving information about the current Space?

2009-09-23 Thread Hippo Man
On Wed, Sep 23, 2009 at 14:44, Kyle Sluder wrote: > This issue has come up a few times recently: "I want to do X on my own > computer!  I should be able to do it!" I'm not trying to assert that I _should_ be able to anything. Please re-read my messages here, so you can disabuse yourself of that m

Re: Controlling Spaces and retrieving information about the current Space?

2009-09-23 Thread Kyle Sluder
On Wed, Sep 23, 2009 at 11:24 AM, Hippo Man wrote: > Understood. But I'm wanting to write my _own_ app to control window > placement within Spaces on my _own_ computer. I want to automate this > instead of having to do a lot of mouse clicking and dragging. This issue has come up a few times recen

Re: Controlling Spaces and retrieving information about the current Space?

2009-09-23 Thread Hippo Man
On Tue, Sep 22, 2009 at 12:27, Jesper Storm Bache wrote: > So far we have the following: > [ ... etc. ... ] > > For example, to determine whether or not a (candidate) window is on > the active Space on 10.5, I ended up doing: > [ ... etc. ... ] > > Obviously this is not desirable code, but this is

Re: Controlling Spaces and retrieving information about the current Space?

2009-09-23 Thread Hippo Man
On Tue, Sep 22, 2009 at 12:19, Eric Schlegel wrote: > > 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? [ ... ] > > You could use the (CoreGraphics, not Cocoa) API > CGWindowListCreateDescriptionF

Re: Controlling Spaces and retrieving information about the current Space?

2009-09-23 Thread Hippo Man
On Wed, Sep 23, 2009 at 06:46, Jeremy Pereira wrote: > Speaking as a user of Mac OS X, I am relieved about this.  Spaces is a > feature that is designed to allow the user to manage the way his/her apps > appear.  Applications which interfere with the user's preferences (e.g. by > changing the spac

Re: Controlling Spaces and retrieving information about the current Space?

2009-09-23 Thread Jeremy Pereira
On 22 Sep 2009, at 17:19, Eric Schlegel wrote: 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

Re: Controlling Spaces and retrieving information about the current Space?

2009-09-22 Thread Jesper Storm Bache
There is very little external control over Spaces. Be sure to file enhancement request radars. So far we have the following: 1) In 10.6 you can ask a window whether or not it is on the active Space ( [NSWindow isOnActiveSpace]) 2) CGWindow.h allows you to query for the space id (kCGWindowWorks

Re: Controlling Spaces and retrieving information about the current Space?

2009-09-22 Thread Eric Schlegel
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