Commit b94ecff5 authored by Karine Delvare's avatar Karine Delvare Committed by Karine Delvare

app/tools/gimprectangletool.[ch] code cleanup, replace virtualization

2005-09-03  Karine Delvare  <kdelvare@nerim.net>

  * app/tools/gimprectangletool.[ch]
  * app/tools/gimprectangleoptions.[ch]: code cleanup, replace
  virtualization functions with interface properties.

  * app/tools/gimpcroptool.[ch]
  * app/tools/gimpnewrectselecttool.[ch]
  * app/tools/gimpcropoptions.[ch]
  * app/tools/gimpnewrectselectoptions.[ch]: code cleanup, use said
  interface properties.
parent 34975e19
2005-09-03 Karine Delvare <kdelvare@nerim.net>
* app/tools/gimprectangletool.[ch]
* app/tools/gimprectangleoptions.[ch]: code cleanup, replace
virtualization functions with interface properties.
* app/tools/gimpcroptool.[ch]
* app/tools/gimpnewrectselecttool.[ch]
* app/tools/gimpcropoptions.[ch]
* app/tools/gimpnewrectselectoptions.[ch]: code cleanup, use said
interface properties.
2005-09-03 Michael Natterer <mitch@gimp.org>
* app/base/pixel-surround.c: s/row_stride/rowstride/g.
......
......@@ -38,8 +38,6 @@
enum
{
PROP_0,
PROP_LAYER_ONLY,
PROP_CROP_MODE,
PROP_HIGHLIGHT,
PROP_FIXED_WIDTH,
PROP_WIDTH,
......@@ -50,7 +48,9 @@ enum
PROP_FIXED_CENTER,
PROP_CENTER_X,
PROP_CENTER_Y,
PROP_UNIT
PROP_UNIT,
PROP_LAYER_ONLY,
PROP_CROP_MODE
};
......@@ -66,46 +66,6 @@ static void gimp_crop_options_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
void gimp_crop_options_set_highlight (GimpRectangleOptions *options,
gboolean highlight);
gboolean gimp_crop_options_get_highlight (GimpRectangleOptions *options);
void gimp_crop_options_set_fixed_width (GimpRectangleOptions *options,
gboolean fixed_width);
gboolean gimp_crop_options_get_fixed_width (GimpRectangleOptions *options);
void gimp_crop_options_set_width (GimpRectangleOptions *options,
gdouble width);
gdouble gimp_crop_options_get_width (GimpRectangleOptions *options);
void gimp_crop_options_set_fixed_height (GimpRectangleOptions *options,
gboolean fixed_height);
gboolean gimp_crop_options_get_fixed_height (GimpRectangleOptions *options);
void gimp_crop_options_set_height (GimpRectangleOptions *options,
gdouble height);
gdouble gimp_crop_options_get_height (GimpRectangleOptions *options);
void gimp_crop_options_set_fixed_aspect (GimpRectangleOptions *options,
gboolean fixed_aspect);
gboolean gimp_crop_options_get_fixed_aspect (GimpRectangleOptions *options);
void gimp_crop_options_set_aspect (GimpRectangleOptions *options,
gdouble aspect);
gdouble gimp_crop_options_get_aspect (GimpRectangleOptions *options);
void gimp_crop_options_set_fixed_center (GimpRectangleOptions *options,
gboolean fixed_center);
gboolean gimp_crop_options_get_fixed_center (GimpRectangleOptions *options);
void gimp_crop_options_set_center_x (GimpRectangleOptions *options,
gdouble center_x);
gdouble gimp_crop_options_get_center_x (GimpRectangleOptions *options);
void gimp_crop_options_set_center_y (GimpRectangleOptions *options,
gdouble center_y);
gdouble gimp_crop_options_get_center_y (GimpRectangleOptions *options);
void gimp_crop_options_set_unit (GimpRectangleOptions *options,
GimpUnit unit);
GimpUnit gimp_crop_options_get_unit (GimpRectangleOptions *options);
static GimpToolOptionsClass *parent_class = NULL;
......@@ -166,79 +126,13 @@ gimp_crop_options_class_init (GimpCropOptionsClass *klass)
GIMP_TYPE_CROP_MODE,
GIMP_CROP_MODE_CROP,
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_HIGHLIGHT,
"highlight",
N_("Highlight rectangle"),
TRUE,
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_FIXED_WIDTH,
"fixed-width", N_("Fixed width"),
FALSE, 0);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_WIDTH,
"width", N_("Width"),
0.0, GIMP_MAX_IMAGE_SIZE, 1.0,
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_FIXED_HEIGHT,
"fixed-height", N_("Fixed height"),
FALSE, 0);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_HEIGHT,
"height", N_("Height"),
0.0, GIMP_MAX_IMAGE_SIZE, 1.0,
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_FIXED_ASPECT,
"fixed-aspect", N_("Fixed aspect"),
FALSE, 0);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_ASPECT,
"aspect", N_("Aspect"),
0.0, GIMP_MAX_IMAGE_SIZE, 1.0,
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_FIXED_CENTER,
"fixed-center", N_("Fixed center"),
FALSE, 0);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_CENTER_X,
"center-x", N_("Center X"),
0.0, GIMP_MAX_IMAGE_SIZE, 1.0,
0);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_CENTER_Y,
"center-y", N_("Center Y"),
0.0, GIMP_MAX_IMAGE_SIZE, 1.0,
0);
GIMP_CONFIG_INSTALL_PROP_UNIT (object_class, PROP_UNIT,
"unit", NULL,
TRUE, FALSE, GIMP_UNIT_PIXEL, 0);
gimp_rectangle_options_install_properties (object_class);
}
static void
gimp_crop_options_rectangle_options_iface_init (GimpRectangleOptionsInterface *rectangle_iface)
{
rectangle_iface->set_highlight = gimp_crop_options_set_highlight;
rectangle_iface->get_highlight = gimp_crop_options_get_highlight;
rectangle_iface->set_fixed_width = gimp_crop_options_set_fixed_width;
rectangle_iface->get_fixed_width = gimp_crop_options_get_fixed_width;
rectangle_iface->set_width = gimp_crop_options_set_width;
rectangle_iface->get_width = gimp_crop_options_get_width;
rectangle_iface->set_fixed_height = gimp_crop_options_set_fixed_height;
rectangle_iface->get_fixed_height = gimp_crop_options_get_fixed_height;
rectangle_iface->set_height = gimp_crop_options_set_height;
rectangle_iface->get_height = gimp_crop_options_get_height;
rectangle_iface->set_fixed_aspect = gimp_crop_options_set_fixed_aspect;
rectangle_iface->get_fixed_aspect = gimp_crop_options_get_fixed_aspect;
rectangle_iface->set_aspect = gimp_crop_options_set_aspect;
rectangle_iface->get_aspect = gimp_crop_options_get_aspect;
rectangle_iface->set_fixed_center = gimp_crop_options_set_fixed_center;
rectangle_iface->get_fixed_center = gimp_crop_options_get_fixed_center;
rectangle_iface->set_center_x = gimp_crop_options_set_center_x;
rectangle_iface->get_center_x = gimp_crop_options_get_center_x;
rectangle_iface->set_center_y = gimp_crop_options_set_center_y;
rectangle_iface->get_center_y = gimp_crop_options_get_center_y;
rectangle_iface->set_unit = gimp_crop_options_set_unit;
rectangle_iface->get_unit = gimp_crop_options_get_unit;
}
static void
......@@ -248,49 +142,28 @@ gimp_crop_options_set_property (GObject *object,
GParamSpec *pspec)
{
GimpCropOptions *options = GIMP_CROP_OPTIONS (object);
GimpRectangleOptions *rectangle_options = GIMP_RECTANGLE_OPTIONS (options);
switch (property_id)
{
case GIMP_RECTANGLE_OPTIONS_PROP_HIGHLIGHT:
case GIMP_RECTANGLE_OPTIONS_PROP_FIXED_WIDTH:
case GIMP_RECTANGLE_OPTIONS_PROP_WIDTH:
case GIMP_RECTANGLE_OPTIONS_PROP_FIXED_HEIGHT:
case GIMP_RECTANGLE_OPTIONS_PROP_HEIGHT:
case GIMP_RECTANGLE_OPTIONS_PROP_FIXED_ASPECT:
case GIMP_RECTANGLE_OPTIONS_PROP_ASPECT:
case GIMP_RECTANGLE_OPTIONS_PROP_FIXED_CENTER:
case GIMP_RECTANGLE_OPTIONS_PROP_CENTER_X:
case GIMP_RECTANGLE_OPTIONS_PROP_CENTER_Y:
case GIMP_RECTANGLE_OPTIONS_PROP_UNIT:
gimp_rectangle_options_set_property (object, property_id, value, pspec);
break;
case PROP_LAYER_ONLY:
options->layer_only = g_value_get_boolean (value);
break;
case PROP_CROP_MODE:
options->crop_mode = g_value_get_enum (value);
break;
case PROP_HIGHLIGHT:
gimp_rectangle_options_set_highlight (rectangle_options, g_value_get_boolean (value));
break;
case PROP_FIXED_WIDTH:
gimp_rectangle_options_set_fixed_width (rectangle_options, g_value_get_boolean (value));
break;
case PROP_WIDTH:
gimp_rectangle_options_set_width (rectangle_options, g_value_get_double (value));
break;
case PROP_FIXED_HEIGHT:
gimp_rectangle_options_set_fixed_height (rectangle_options, g_value_get_boolean (value));
break;
case PROP_HEIGHT:
gimp_rectangle_options_set_height (rectangle_options, g_value_get_double (value));
break;
case PROP_FIXED_ASPECT:
gimp_rectangle_options_set_fixed_aspect (rectangle_options, g_value_get_boolean (value));
break;
case PROP_ASPECT:
gimp_rectangle_options_set_aspect (rectangle_options, g_value_get_double (value));
break;
case PROP_FIXED_CENTER:
gimp_rectangle_options_set_fixed_center (rectangle_options, g_value_get_boolean (value));
break;
case PROP_CENTER_X:
gimp_rectangle_options_set_center_x (rectangle_options, g_value_get_double (value));
break;
case PROP_CENTER_Y:
gimp_rectangle_options_set_center_y (rectangle_options, g_value_get_double (value));
break;
case PROP_UNIT:
gimp_rectangle_options_set_unit (rectangle_options, g_value_get_int (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -304,220 +177,34 @@ gimp_crop_options_get_property (GObject *object,
GParamSpec *pspec)
{
GimpCropOptions *options = GIMP_CROP_OPTIONS (object);
GimpRectangleOptions *rectangle_options = GIMP_RECTANGLE_OPTIONS (options);
switch (property_id)
{
case GIMP_RECTANGLE_OPTIONS_PROP_HIGHLIGHT:
case GIMP_RECTANGLE_OPTIONS_PROP_FIXED_WIDTH:
case GIMP_RECTANGLE_OPTIONS_PROP_WIDTH:
case GIMP_RECTANGLE_OPTIONS_PROP_FIXED_HEIGHT:
case GIMP_RECTANGLE_OPTIONS_PROP_HEIGHT:
case GIMP_RECTANGLE_OPTIONS_PROP_FIXED_ASPECT:
case GIMP_RECTANGLE_OPTIONS_PROP_ASPECT:
case GIMP_RECTANGLE_OPTIONS_PROP_FIXED_CENTER:
case GIMP_RECTANGLE_OPTIONS_PROP_CENTER_X:
case GIMP_RECTANGLE_OPTIONS_PROP_CENTER_Y:
case GIMP_RECTANGLE_OPTIONS_PROP_UNIT:
gimp_rectangle_options_get_property (object, property_id, value, pspec);
break;
case PROP_LAYER_ONLY:
g_value_set_boolean (value, options->layer_only);
break;
case PROP_CROP_MODE:
g_value_set_enum (value, options->crop_mode);
break;
case PROP_HIGHLIGHT:
g_value_set_boolean (value, gimp_rectangle_options_get_highlight (rectangle_options));
break;
case PROP_FIXED_WIDTH:
g_value_set_boolean (value, gimp_rectangle_options_get_fixed_width (rectangle_options));
break;
case PROP_WIDTH:
g_value_set_double (value, gimp_rectangle_options_get_width (rectangle_options));
break;
case PROP_FIXED_HEIGHT:
g_value_set_boolean (value, gimp_rectangle_options_get_fixed_height (rectangle_options));
break;
case PROP_HEIGHT:
g_value_set_double (value, gimp_rectangle_options_get_height (rectangle_options));
break;
case PROP_FIXED_ASPECT:
g_value_set_boolean (value, gimp_rectangle_options_get_fixed_aspect (rectangle_options));
break;
case PROP_ASPECT:
g_value_set_double (value, gimp_rectangle_options_get_aspect (rectangle_options));
break;
case PROP_FIXED_CENTER:
g_value_set_boolean (value, gimp_rectangle_options_get_fixed_center (rectangle_options));
break;
case PROP_CENTER_X:
g_value_set_double (value, gimp_rectangle_options_get_center_x (rectangle_options));
break;
case PROP_CENTER_Y:
g_value_set_double (value, gimp_rectangle_options_get_center_y (rectangle_options));
break;
case PROP_UNIT:
g_value_set_int (value, gimp_rectangle_options_get_unit (rectangle_options));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
void
gimp_crop_options_set_highlight (GimpRectangleOptions *options,
gboolean highlight)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
crop_options->highlight = highlight;
}
gboolean
gimp_crop_options_get_highlight (GimpRectangleOptions *options)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
return crop_options->highlight;
}
void
gimp_crop_options_set_fixed_width (GimpRectangleOptions *options,
gboolean fixed_width)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
crop_options->fixed_width = fixed_width;
}
gboolean
gimp_crop_options_get_fixed_width (GimpRectangleOptions *options)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
return crop_options->fixed_width;
}
void
gimp_crop_options_set_width (GimpRectangleOptions *options,
gdouble width)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
crop_options->width = width;
}
gdouble
gimp_crop_options_get_width (GimpRectangleOptions *options)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
return crop_options->width;
}
void
gimp_crop_options_set_fixed_height (GimpRectangleOptions *options,
gboolean fixed_height)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
crop_options->fixed_height = fixed_height;
}
gboolean
gimp_crop_options_get_fixed_height (GimpRectangleOptions *options)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
return crop_options->fixed_height;
}
void
gimp_crop_options_set_height (GimpRectangleOptions *options,
gdouble height)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
crop_options->height = height;
}
gdouble
gimp_crop_options_get_height (GimpRectangleOptions *options)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
return crop_options->height;
}
void
gimp_crop_options_set_fixed_aspect (GimpRectangleOptions *options,
gboolean fixed_aspect)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
crop_options->fixed_aspect = fixed_aspect;
}
gboolean
gimp_crop_options_get_fixed_aspect (GimpRectangleOptions *options)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
return crop_options->fixed_aspect;
}
void
gimp_crop_options_set_aspect (GimpRectangleOptions *options,
gdouble aspect)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
crop_options->aspect = aspect;
}
gdouble
gimp_crop_options_get_aspect (GimpRectangleOptions *options)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
return crop_options->aspect;
}
void
gimp_crop_options_set_fixed_center (GimpRectangleOptions *options,
gboolean fixed_center)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
crop_options->fixed_center = fixed_center;
}
gboolean
gimp_crop_options_get_fixed_center (GimpRectangleOptions *options)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
return crop_options->fixed_center;
}
void
gimp_crop_options_set_center_x (GimpRectangleOptions *options,
gdouble center_x)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
crop_options->center_x = center_x;
}
gdouble
gimp_crop_options_get_center_x (GimpRectangleOptions *options)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
return crop_options->center_x;
}
void
gimp_crop_options_set_center_y (GimpRectangleOptions *options,
gdouble center_y)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
crop_options->center_y = center_y;
}
gdouble
gimp_crop_options_get_center_y (GimpRectangleOptions *options)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
return crop_options->center_y;
}
void
gimp_crop_options_set_unit (GimpRectangleOptions *options,
GimpUnit unit)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
crop_options->unit = unit;
}
GimpUnit
gimp_crop_options_get_unit (GimpRectangleOptions *options)
{
GimpCropOptions *crop_options = GIMP_CROP_OPTIONS (options);
return crop_options->unit;
}
GtkWidget *
gimp_crop_options_gui (GimpToolOptions *tool_options)
{
......
......@@ -40,23 +40,6 @@ struct _GimpCropOptions
gboolean layer_only;
GimpCropMode crop_mode;
gboolean highlight;
gboolean fixed_width;
gdouble width;
gboolean fixed_height;
gdouble height;
gboolean fixed_aspect;
gdouble aspect;
gboolean fixed_center;
gdouble center_x;
gdouble center_y;
GimpUnit unit;
};
......
......@@ -64,84 +64,6 @@ static gboolean gimp_crop_tool_execute (GimpRectangleTool *rectangle,
gint w,
gint h);
void gimp_crop_tool_set_controls (GimpRectangleTool *tool,
GtkWidget *controls);
GtkWidget * gimp_crop_tool_get_controls (GimpRectangleTool *tool);
void gimp_crop_tool_set_entry (GimpRectangleTool *tool,
GtkWidget *entry);
GtkWidget * gimp_crop_tool_get_entry (GimpRectangleTool *tool);
void gimp_crop_tool_set_startx (GimpRectangleTool *tool,
gint startx);
gint gimp_crop_tool_get_startx (GimpRectangleTool *tool);
void gimp_crop_tool_set_starty (GimpRectangleTool *tool,
gint starty);
gint gimp_crop_tool_get_starty (GimpRectangleTool *tool);
void gimp_crop_tool_set_lastx (GimpRectangleTool *tool,
gint lastx);
gint gimp_crop_tool_get_lastx (GimpRectangleTool *tool);
void gimp_crop_tool_set_lasty (GimpRectangleTool *tool,
gint lasty);
gint gimp_crop_tool_get_lasty (GimpRectangleTool *tool);
void gimp_crop_tool_set_pressx (GimpRectangleTool *tool,
gint pressx);
gint gimp_crop_tool_get_pressx (GimpRectangleTool *tool);
void gimp_crop_tool_set_pressy (GimpRectangleTool *tool,
gint pressy);
gint gimp_crop_tool_get_pressy (GimpRectangleTool *tool);
void gimp_crop_tool_set_x1 (GimpRectangleTool *tool,
gint x1);
gint gimp_crop_tool_get_x1 (GimpRectangleTool *tool);
void gimp_crop_tool_set_y1 (GimpRectangleTool *tool,
gint y1);
gint gimp_crop_tool_get_y1 (GimpRectangleTool *tool);
void gimp_crop_tool_set_x2 (GimpRectangleTool *tool,
gint x2);
gint gimp_crop_tool_get_x2 (GimpRectangleTool *tool);
void gimp_crop_tool_set_y2 (GimpRectangleTool *tool,
gint y2);
gint gimp_crop_tool_get_y2 (GimpRectangleTool *tool);
void gimp_crop_tool_set_function (GimpRectangleTool *tool,
guint function);
guint gimp_crop_tool_get_function (GimpRectangleTool *tool);
void gimp_crop_tool_set_dx1 (GimpRectangleTool *tool,
gint dx1);
gint gimp_crop_tool_get_dx1 (GimpRectangleTool *tool);
void gimp_crop_tool_set_dy1 (GimpRectangleTool *tool,
gint dy1);
gint gimp_crop_tool_get_dy1 (GimpRectangleTool *tool);
void gimp_crop_tool_set_dx2 (GimpRectangleTool *tool,
gint dx2);
gint gimp_crop_tool_get_dx2 (GimpRectangleTool *tool);
void gimp_crop_tool_set_dy2 (GimpRectangleTool *tool,
gint dy2);
gint gimp_crop_tool_get_dy2 (GimpRectangleTool *tool);
void gimp_crop_tool_set_dcw (GimpRectangleTool *tool,
gint dcw);
gint gimp_crop_tool_get_dcw (GimpRectangleTool *tool);
void gimp_crop_tool_set_dch (GimpRectangleTool *tool,
gint dch);
gint gimp_crop_tool_get_dch (GimpRectangleTool *tool);
void gimp_crop_tool_set_origx (GimpRectangleTool *tool,
gdouble origx);
gdouble gimp_crop_tool_get_origx (GimpRectangleTool *tool);
void gimp_crop_tool_set_origy (GimpRectangleTool *tool,
gdouble origy);
gdouble gimp_crop_tool_get_origy (GimpRectangleTool *tool);
void gimp_crop_tool_set_sizew (GimpRectangleTool *tool,
gdouble sizew);
gdouble gimp_crop_tool_get_sizew (GimpRectangleTool *tool);
void gimp_crop_tool_set_sizeh (GimpRectangleTool *tool,
gdouble sizeh);
gdouble gimp_crop_tool_get_sizeh (GimpRectangleTool *tool);
static GimpDrawToolClass *parent_class = NULL;
......@@ -211,7 +133,11 @@ gimp_crop_tool_class_init (GimpCropToolClass *klass)
parent_class = g_type_class_peek_parent (klass);
object_class->constructor = gimp_crop_tool_constructor;
object_class->dispose = gimp_rectangle_tool_dispose;
object_class->finalize = gimp_crop_tool_finalize;
object_class->set_property = gimp_rectangle_tool_set_property;
object_class->get_property = gimp_rectangle_tool_get_property;
gimp_rectangle_tool_install_properties (object_class);
tool_class->initialize = gimp_rectangle_tool_initialize;
tool_class->control = gimp_crop_tool_control;
......@@ -237,52 +163,6 @@ gimp_crop_tool_init (GimpCropTool *crop_tool)
static void
gimp_crop_tool_rectangle_tool_iface_init (GimpRectangleToolInterface *rectangle_iface)
{
rectangle_iface->set_controls = gimp_crop_tool_set_controls;
rectangle_iface->get_controls = gimp_crop_tool_get_controls;
rectangle_iface->set_entry = gimp_crop_tool_set_entry;
rectangle_iface->get_entry = gimp_crop_tool_get_entry;
rectangle_iface->set_startx = gimp_crop_tool_set_startx;
rectangle_iface->get_startx = gimp_crop_tool_get_startx;
rectangle_iface->set_starty = gimp_crop_tool_set_starty;
rectangle_iface->get_starty = gimp_crop_tool_get_starty;
rectangle_iface->set_lastx = gimp_crop_tool_set_lastx;
rectangle_iface->get_lastx = gimp_crop_tool_get_lastx;
rectangle_iface->set_lasty = gimp_crop_tool_set_lasty;
rectangle_iface->get_lasty = gimp_crop_tool_get_lasty;
rectangle_iface->set_pressx = gimp_crop_tool_set_pressx;
rectangle_iface->get_pressx = gimp_crop_tool_get_pressx;
rectangle_iface->set_pressy = gimp_crop_tool_set_pressy;
rectangle_iface->get_pressy = gimp_crop_tool_get_pressy;
rectangle_iface->set_x1 = gimp_crop_tool_set_x1;
rectangle_iface->get_x1 = gimp_crop_tool_get_x1;
rectangle_iface->set_y1 = gimp_crop_tool_set_y1;
rectangle_iface->get_y1 = gimp_crop_tool_get_y1;
rectangle_iface->set_x2 = gimp_crop_tool_set_x2;
rectangle_iface->get_x2 = gimp_crop_tool_get_x2;
rectangle_iface->set_y2 = gimp_crop_tool_set_y2;
rectangle_iface->get_y2 = gimp_crop_tool_get_y2;
rectangle_iface->set_function = gimp_crop_tool_set_function;
rectangle_iface->get_function = gimp_crop_tool_get_function;
rectangle_iface->set_dx1 = gimp_crop_tool_set_dx1;
rectangle_iface->get_dx1 = gimp_crop_tool_get_dx1;
rectangle_iface->set_dy1 = gimp_crop_tool_set_dy1;
rectangle_iface->get_dy1 = gimp_crop_tool_get_dy1;