forked from AuroraMiddleware/gtk
Add gtk_window_group_get_windows().
* gtk/gtk.symbols: * gtk/gtkwindow.[ch] (gtk_window_group_get_windows): New function. svn path=/trunk/; revision=20632
This commit is contained in:
parent
dd8ea21142
commit
870b9c868c
@ -4822,6 +4822,7 @@ gtk_window_group_add_window
|
||||
gtk_window_group_get_type G_GNUC_CONST
|
||||
gtk_window_group_new
|
||||
gtk_window_group_remove_window
|
||||
gtk_window_group_get_windows
|
||||
gtk_window_has_toplevel_focus
|
||||
gtk_window_iconify
|
||||
gtk_window_is_active
|
||||
|
@ -7456,6 +7456,37 @@ gtk_window_group_remove_window (GtkWindowGroup *window_group,
|
||||
g_object_unref (window);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_group_get_windows:
|
||||
* @window_group: a #GtkWindowGroup
|
||||
*
|
||||
* Returns a list of the #GtkWindows that belong to @window_group.
|
||||
*
|
||||
* Returns: A newly-allocated list of windows inside the group.
|
||||
*
|
||||
* Since: GSEAL-branch
|
||||
**/
|
||||
GList *
|
||||
gtk_window_group_get_windows (GtkWindowGroup *window_group)
|
||||
{
|
||||
GList *toplevels, *toplevel, *group_windows;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_WINDOW_GROUP (window_group), NULL);
|
||||
|
||||
group_windows = NULL;
|
||||
toplevels = gtk_window_list_toplevels ();
|
||||
|
||||
for (toplevel = toplevels; toplevel; toplevel = toplevel->next)
|
||||
{
|
||||
GtkWindow *window = toplevel->data;
|
||||
|
||||
if (window_group == window->group)
|
||||
group_windows = g_list_prepend (group_windows, window);
|
||||
}
|
||||
|
||||
return g_list_reverse (group_windows);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_get_group:
|
||||
* @window: a #GtkWindow, or %NULL
|
||||
|
@ -394,6 +394,8 @@ void gtk_window_group_add_window (GtkWindowGroup *window_grou
|
||||
GtkWindow *window);
|
||||
void gtk_window_group_remove_window (GtkWindowGroup *window_group,
|
||||
GtkWindow *window);
|
||||
GList * gtk_window_group_get_windows (GtkWindowGroup *window_group);
|
||||
|
||||
|
||||
/* --- internal functions --- */
|
||||
void _gtk_window_internal_set_focus (GtkWindow *window,
|
||||
|
Loading…
Reference in New Issue
Block a user