Access to all widgets on the screen



Hi, I need to list all windows and objects from all the GTK (not only my
application)

I tried to use GDK function gdk_window_get_children, but only recives my
windows...

Anyone can help me? Thanks

paste code from my test:
GdkScreen *screen;
GdkWindow *root;
GList *windows;

screen = gdk_screen_get_default();
root = gdk_screen_get_root_window(screen);
windows = gdk_window_get_children (root);

for(; windows; windows = windows->next)
{
GdkWindow *window = windows->data;
GdkWindowType type = gdk_window_get_window_type(window);
if ( type == GDK_WINDOW_TOPLEVEL || type == GDK_WINDOW_DIALOG )
{
g_print("gtkwindow: %p\n", window);
gdk_window_set_title(window,"Test");
}
else
{
g_print("unknown window: %p\n", window);
}
}



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