RE: How to get the titles for all top level windows

2007-05-22 Thread Sreeram Akella
Hi Wally,

Thanks for your quick response. But is there any way I can get the list
of all the windows of all applications, just like what a Window manager
would maintain?

Thanks
Sreeram

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 22, 2007 4:49 PM
To: Sreeram Akella
Cc: gtk-app-devel-list@gnome.org
Subject: Re: How to get the titles for all top level windows

On Tue, 2007-05-22 at 16:33 -0700, Sreeram Akella wrote:
> Hi,
> I am using GTK version 2.8.9 on Fedora Core 6.
> I need to develop an application that lists all top level windows
along
> with the corresponding titles. I tried using the method
> gdk_windows_get_toplevels() to return the GList of all top level
windows
> on the default screen on the default display. When I check the count
of
> the list returned, I always get 1 irrespective of the number of GUI
> applications I am running. 

It returns the number of top-level windows in _an_ application.  It
doesn't have a way to reach through the X server and query which X apps
are gtk apps, and query them for how many top-level windows _they_ have.

Each of your apps (that you've instrumented) apparently have only one
top-level window.  gtk supports having more than one top-level window in
an application, but apparently none of the apps in which you make that
call are using more than 1.


  // Wally

-- 
[EMAIL PROTECTED]
Office: 619.278.2084
Cell:   619.990.2286
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to get the titles for all top level windows

2007-05-22 Thread Emmanuele Bassi
On Tue, 2007-05-22 at 16:33 -0700, Sreeram Akella wrote:

> I would greatly appreciate it if some one can point me to the error here
> or still better a code snippet that can do this.

you want to use libwnck, not gtk+ if you plan to manipulate the entire
windows list.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi,  E: [EMAIL PROTECTED]
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to get the titles for all top level windows

2007-05-22 Thread wallace . owen
On Tue, 2007-05-22 at 16:33 -0700, Sreeram Akella wrote:
> Hi,
> I am using GTK version 2.8.9 on Fedora Core 6.
> I need to develop an application that lists all top level windows along
> with the corresponding titles. I tried using the method
> gdk_windows_get_toplevels() to return the GList of all top level windows
> on the default screen on the default display. When I check the count of
> the list returned, I always get 1 irrespective of the number of GUI
> applications I am running. 

It returns the number of top-level windows in _an_ application.  It
doesn't have a way to reach through the X server and query which X apps
are gtk apps, and query them for how many top-level windows _they_ have.

Each of your apps (that you've instrumented) apparently have only one
top-level window.  gtk supports having more than one top-level window in
an application, but apparently none of the apps in which you make that
call are using more than 1.


  // Wally

-- 
[EMAIL PROTECTED]
Office: 619.278.2084
Cell:   619.990.2286
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to get the titles for all top level windows

2007-05-22 Thread Brian J. Tarricone
On Tue, 22 May 2007 16:33:49 -0700 Sreeram Akella wrote:

>I need to develop an application that lists all top level windows along
>with the corresponding titles. I tried using the method
>gdk_windows_get_toplevels() to return the GList of all top level
>windows on the default screen on the default display. When I check the
>count of the list returned, I always get 1 irrespective of the number
>of GUI applications I am running. 

gdk_windows_get_toplevels() will only return the windows that gdk knows
about: that is, the windows created by your application, or X windows
wrapped by gdk (by the application) using gdk_window_foreign_new().

To actually get all the toplevel windows, you could either use raw
Xlib, or there's probably something in libwnck that could help you.

-brian

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list