discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: api for programmatically getting a list of all windows


From: Dan Hitt
Subject: Re: api for programmatically getting a list of all windows
Date: Mon, 17 Sep 2012 23:25:36 -0700

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,
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.

dan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]