Re: How to iterate windows
- From: Tristan Van Berkom <tristan van berkom gmail com>
- To: Chris Garrett <cgarrett degarrah com>
- Cc: gtk-list gnome org
- Subject: Re: How to iterate windows
- Date: Mon, 14 Feb 2005 13:52:33 -0500
On Mon, 14 Feb 2005 11:38:46 -0700, Chris Garrett <cgarrett degarrah com> 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]