[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: api for programmatically getting a list of all windows
From: |
Dr. H. Nikolaus Schaller |
Subject: |
Re: api for programmatically getting a list of all windows |
Date: |
Tue, 18 Sep 2012 08:42:48 +0200 |
Am 18.09.2012 um 08:25 schrieb Dan Hitt:
> On Sun, Sep 16, 2012 at 10:38 PM, Germán A. Arias <german@xelalug.org> wrote:
>> El dom, 16-09-2012 a las 22:31 -0700, Dan Hitt escribió:
>>> I would like to programmatically get a list of all windows on
>>> my screen in a gnustep application.
>>>
>>> I suppose i could shell out and call
>>> xwininfo -tree -root
>>> and then parse the output, but i imagine there must
>>> be a much more systematic way to do this involving
>>> standard gnustep classes.
> .....
>>>
>>
>> NSArray *allWindows = [NSApp windows];
>
> Thank you Germán.
>
> Now, please correct me where i'm wrong, but i believe that
> the windows method only returns the windows in your application,
yes. It may not even return all windows of one application (e.g. floating
panels. menus).
> but not in other applications, or
> non-application x-windows programs.
>
> I would like a list of all the windows on the screen, from all sources:
> the current application, other gnustep applications, and all the xwindows
> as well.
>
> I do recognize that there can only be less information available about
> other applications, and even less for non-gnustep windows.
>
> I imagine that i can code something up, either parsing xwininfo or calling
> xlib routines directly, or something along those lines.
>
> But before embarking on that sort of journey i would like to know if
> there's a more systematic way of doing this. (The main pieces of
> information i'd like to know about each window is what its placement
> and dimensions are, and something about what it is.)
>
> TIA for any info.
look for NSWindowList() as the "official" API.
http://lists.gnu.org/archive/html/bug-gnustep/2006-10/msg00054.html
Nikolaus
- api for programmatically getting a list of all windows, Dan Hitt, 2012/09/17
- Re: api for programmatically getting a list of all windows, A. Arias, 2012/09/17
- Re: api for programmatically getting a list of all windows, Dan Hitt, 2012/09/18
- Re: api for programmatically getting a list of all windows, Riccardo Mottola, 2012/09/18
- Re: api for programmatically getting a list of all windows, Dan Hitt, 2012/09/18
- Re: api for programmatically getting a list of all windows, Matt Rice, 2012/09/18
- Re: api for programmatically getting a list of all windows, Ivan Vučica, 2012/09/18
- Re: api for programmatically getting a list of all windows, Dan Hitt, 2012/09/19
- Re: api for programmatically getting a list of all windows, Fred Kiefer, 2012/09/23
- Re: api for programmatically getting a list of all windows, Ivan Vučica, 2012/09/23
- Re: api for programmatically getting a list of all windows,
Dr. H. Nikolaus Schaller <=