Re: How to iterate windows

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

 



On Mon, 14 Feb 2005 11:38:46 -0700, Chris Garrett <cgarrett@xxxxxxxxxxxx> wrote:
> Hi,
> 
> How do I iterate windows in gtk/gdk? I have tried the different toplevel
> functions but they only ever return 1 window. I'm using gtk 2.0.6 (rh8).

Use gtk_container_foreach() and write a recursive foreach function:

foreach_func(...)
{
   /* ... */

   if (GTK_IS_CONTAINER (widget)) {
          gtk_container_foreach (... foreach_func ...);
   }
}

If you must to have a list, you can use this technique to build one
by passing a "GList **" as user_data ;-)

Cheers,
                                       -Tristan
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux