Add gimp_display_shell_get_window() which returns an image window or NULL

This commit is contained in:
Michael Natterer 2009-09-28 23:53:05 +02:00
parent 35739c743c
commit 97987aff6e
2 changed files with 11 additions and 0 deletions

View File

@ -1162,6 +1162,15 @@ gimp_display_shell_new (GimpDisplay *display,
return GTK_WIDGET (shell);
}
GimpImageWindow *
gimp_display_shell_get_window (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), NULL);
return GIMP_IMAGE_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (shell),
GIMP_TYPE_IMAGE_WINDOW));
}
void
gimp_display_shell_reconnect (GimpDisplayShell *shell)
{

View File

@ -232,6 +232,8 @@ GtkWidget * gimp_display_shell_new (GimpDisplay *display,
GimpUIManager *popup_manager,
GimpDialogFactory *display_factory);
GimpImageWindow * gimp_display_shell_get_window (GimpDisplayShell *shell);
void gimp_display_shell_reconnect (GimpDisplayShell *shell);
void gimp_display_shell_empty (GimpDisplayShell *shell);