Add gimp_image_window_get_active_display()

Should probably be refactored into something involving a GimpContext,
but it's good enough as intermediate step.
This commit is contained in:
Michael Natterer 2009-09-23 13:06:11 +02:00
parent dc436b6f86
commit fcf09eea62
2 changed files with 16 additions and 1 deletions

View File

@ -27,6 +27,7 @@
#include "widgets/gimpmenufactory.h"
#include "widgets/gimpuimanager.h"
#include "gimpdisplayshell.h"
#include "gimpimagewindow.h"
#include "gimp-intl.h"
@ -169,3 +170,14 @@ gimp_image_window_destroy (GtkObject *object)
GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
/* public functions */
GimpDisplay *
gimp_image_window_get_active_display (GimpImageWindow *window)
{
g_return_val_if_fail (GIMP_IS_IMAGE_WINDOW (window), NULL);
return GIMP_DISPLAY_SHELL (window)->display;
}

View File

@ -45,7 +45,10 @@ struct _GimpImageWindowClass
};
GType gimp_image_window_get_type (void) G_GNUC_CONST;
GType gimp_image_window_get_type (void) G_GNUC_CONST;
GimpDisplay * gimp_image_window_get_active_display (GimpImageWindow *window);
#endif /* __GIMP_IMAGE_WINDOW_H__ */