app: add signal GimpToolWidget::snap_offsets() and API to emit it

so widgets can notify their handling tool of snap offsets.
This commit is contained in:
Michael Natterer
2017-06-13 23:17:30 +02:00
parent 495f90e6e2
commit 013bb4d81f
2 changed files with 40 additions and 1 deletions

View File

@ -49,6 +49,11 @@ struct _GimpToolWidgetClass
/* signals */
void (* changed) (GimpToolWidget *widget);
void (* snap_offsets) (GimpToolWidget *widget,
gint offset_x,
gint offset_y,
gint width,
gint height);
void (* status) (GimpToolWidget *widget,
const gchar *status);
@ -96,8 +101,13 @@ GType gimp_tool_widget_get_type (void) G_GNUC_CONST;
GimpDisplayShell * gimp_tool_widget_get_shell (GimpToolWidget *widget);
GimpCanvasItem * gimp_tool_widget_get_item (GimpToolWidget *widget);
/* for subclasses, to add emit status messages
/* for subclasses, to notify the handling tool
*/
void gimp_tool_widget_snap_offsets (GimpToolWidget *widget,
gint offset_x,
gint offset_y,
gint width,
gint height);
void gimp_tool_widget_status (GimpToolWidget *widget,
const gchar *status);