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:
@ -27,6 +27,7 @@
|
|||||||
#include "widgets/gimpmenufactory.h"
|
#include "widgets/gimpmenufactory.h"
|
||||||
#include "widgets/gimpuimanager.h"
|
#include "widgets/gimpuimanager.h"
|
||||||
|
|
||||||
|
#include "gimpdisplayshell.h"
|
||||||
#include "gimpimagewindow.h"
|
#include "gimpimagewindow.h"
|
||||||
|
|
||||||
#include "gimp-intl.h"
|
#include "gimp-intl.h"
|
||||||
@ -169,3 +170,14 @@ gimp_image_window_destroy (GtkObject *object)
|
|||||||
|
|
||||||
GTK_OBJECT_CLASS (parent_class)->destroy (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;
|
||||||
|
}
|
||||||
|
@ -47,5 +47,8 @@ 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__ */
|
#endif /* __GIMP_IMAGE_WINDOW_H__ */
|
||||||
|
Reference in New Issue
Block a user