[gimp] Add gimp_image_window_get_active_display()
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Add gimp_image_window_get_active_display()
- Date: Tue, 29 Sep 2009 18:35:43 +0000 (UTC)
commit fcf09eea62d6a5927dd2f61499d5fac4f6f2429b
Author: Michael Natterer <mitch gimp org>
Date: Wed Sep 23 13:06:11 2009 +0200
Add gimp_image_window_get_active_display()
Should probably be refactored into something involving a GimpContext,
but it's good enough as intermediate step.
app/display/gimpimagewindow.c | 12 ++++++++++++
app/display/gimpimagewindow.h | 5 ++++-
2 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
index 33a8b70..18749e0 100644
--- a/app/display/gimpimagewindow.c
+++ b/app/display/gimpimagewindow.c
@@ -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;
+}
diff --git a/app/display/gimpimagewindow.h b/app/display/gimpimagewindow.h
index e061f50..f942a0b 100644
--- a/app/display/gimpimagewindow.h
+++ b/app/display/gimpimagewindow.h
@@ -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__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]