[gimp] app: add gimp_tool_widget_get_shell(), and implement get_property("item")
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add gimp_tool_widget_get_shell(), and implement get_property("item")
- Date: Sun, 11 Jun 2017 16:27:45 +0000 (UTC)
commit b92d98857c65226de9668fd8a69868cb80f7a90f
Author: Michael Natterer <mitch gimp org>
Date: Sun Jun 11 18:26:37 2017 +0200
app: add gimp_tool_widget_get_shell(), and implement get_property("item")
forgot the latter in the initial version.
app/display/gimptoolwidget.c | 12 ++++++++++++
app/display/gimptoolwidget.h | 23 ++++++++++++-----------
2 files changed, 24 insertions(+), 11 deletions(-)
---
diff --git a/app/display/gimptoolwidget.c b/app/display/gimptoolwidget.c
index d8ac28b..dfa262e 100644
--- a/app/display/gimptoolwidget.c
+++ b/app/display/gimptoolwidget.c
@@ -181,6 +181,10 @@ gimp_tool_widget_get_property (GObject *object,
g_value_set_object (value, private->shell);
break;
+ case PROP_ITEM:
+ g_value_set_object (value, private->item);
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -202,6 +206,14 @@ gimp_tool_widget_properties_changed (GObject *object,
/* public functions */
+GimpDisplayShell *
+gimp_tool_widget_get_shell (GimpToolWidget *widget)
+{
+ g_return_val_if_fail (GIMP_IS_TOOL_WIDGET (widget), NULL);
+
+ return widget->private->shell;
+}
+
GimpCanvasItem *
gimp_tool_widget_get_item (GimpToolWidget *widget)
{
diff --git a/app/display/gimptoolwidget.h b/app/display/gimptoolwidget.h
index 4feb2f4..cc8ad66 100644
--- a/app/display/gimptoolwidget.h
+++ b/app/display/gimptoolwidget.h
@@ -89,23 +89,24 @@ struct _GimpToolWidgetClass
};
-GType gimp_tool_widget_get_type (void) G_GNUC_CONST;
+GType gimp_tool_widget_get_type (void) G_GNUC_CONST;
-GimpCanvasItem * gimp_tool_widget_get_item (GimpToolWidget *widget);
+GimpDisplayShell * gimp_tool_widget_get_shell (GimpToolWidget *widget);
+GimpCanvasItem * gimp_tool_widget_get_item (GimpToolWidget *widget);
/* for subclasses, to add and manage their items
*/
-void gimp_tool_widget_add_item (GimpToolWidget *widget,
- GimpCanvasItem *item);
-void gimp_tool_widget_remove_item (GimpToolWidget *widget,
- GimpCanvasItem *item);
+void gimp_tool_widget_add_item (GimpToolWidget *widget,
+ GimpCanvasItem *item);
+void gimp_tool_widget_remove_item (GimpToolWidget *widget,
+ GimpCanvasItem *item);
-GimpCanvasGroup * gimp_tool_widget_add_stroke_group (GimpToolWidget *widget);
-GimpCanvasGroup * gimp_tool_widget_add_fill_group (GimpToolWidget *widget);
+GimpCanvasGroup * gimp_tool_widget_add_stroke_group (GimpToolWidget *widget);
+GimpCanvasGroup * gimp_tool_widget_add_fill_group (GimpToolWidget *widget);
-void gimp_tool_widget_push_group (GimpToolWidget *widget,
- GimpCanvasGroup *group);
-void gimp_tool_widget_pop_group (GimpToolWidget *widget);
+void gimp_tool_widget_push_group (GimpToolWidget *widget,
+ GimpCanvasGroup *group);
+void gimp_tool_widget_pop_group (GimpToolWidget *widget);
/* convenience functions to add specific items
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]