2002-03-29 03:50:29 +00:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995-2002 Spencer Kimball, Peter Mattis and others
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
2002-05-03 12:45:22 +00:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
#include "tools-types.h"
|
|
|
|
|
2002-03-29 03:50:29 +00:00
|
|
|
#include "gimptoolcontrol.h"
|
|
|
|
|
2002-05-03 12:45:22 +00:00
|
|
|
|
2002-03-29 03:50:29 +00:00
|
|
|
static void gimp_tool_control_class_init (GimpToolControlClass *klass);
|
2002-06-16 17:13:39 +00:00
|
|
|
static void gimp_tool_control_init (GimpToolControl *tool);
|
|
|
|
|
2002-03-29 03:50:29 +00:00
|
|
|
|
|
|
|
static GimpObjectClass *parent_class = NULL;
|
|
|
|
|
2002-06-16 17:13:39 +00:00
|
|
|
|
2002-03-29 03:50:29 +00:00
|
|
|
GType
|
|
|
|
gimp_tool_control_get_type (void)
|
|
|
|
{
|
|
|
|
static GType tool_control_type = 0;
|
|
|
|
|
|
|
|
if (! tool_control_type)
|
|
|
|
{
|
|
|
|
static const GTypeInfo tool_control_info =
|
|
|
|
{
|
|
|
|
sizeof (GimpToolControlClass),
|
|
|
|
(GBaseInitFunc) NULL,
|
|
|
|
(GBaseFinalizeFunc) NULL,
|
|
|
|
(GClassInitFunc) gimp_tool_control_class_init,
|
|
|
|
NULL, /* class_finalize */
|
|
|
|
NULL, /* class_data */
|
|
|
|
sizeof (GimpToolControl),
|
|
|
|
0, /* n_preallocs */
|
|
|
|
(GInstanceInitFunc) gimp_tool_control_init,
|
|
|
|
};
|
|
|
|
|
|
|
|
tool_control_type = g_type_register_static (GIMP_TYPE_OBJECT,
|
2004-02-08 21:46:30 +00:00
|
|
|
"GimpToolControl",
|
2002-06-16 17:13:39 +00:00
|
|
|
&tool_control_info, 0);
|
2002-03-29 03:50:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return tool_control_type;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_tool_control_class_init (GimpToolControlClass *klass)
|
|
|
|
{
|
|
|
|
parent_class = g_type_class_peek_parent (klass);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_tool_control_init (GimpToolControl *control)
|
|
|
|
{
|
2003-05-06 11:11:15 +00:00
|
|
|
control->active = FALSE;
|
2002-03-29 03:50:29 +00:00
|
|
|
control->paused_count = 0;
|
|
|
|
|
|
|
|
control->toggled = FALSE;
|
|
|
|
|
2003-04-17 02:57:33 +00:00
|
|
|
control->scroll_lock = FALSE;
|
|
|
|
control->auto_snap_to = TRUE;
|
|
|
|
control->snap_offset_x = 0;
|
|
|
|
control->snap_offset_y = 0;
|
|
|
|
control->snap_width = 0;
|
|
|
|
control->snap_height = 0;
|
|
|
|
|
|
|
|
control->preserve = TRUE;
|
2004-07-29 14:16:21 +00:00
|
|
|
control->dirty_mask = GIMP_DIRTY_NONE;
|
2003-04-17 02:57:33 +00:00
|
|
|
control->handle_empty_image = FALSE;
|
|
|
|
control->motion_mode = GIMP_MOTION_MODE_HINT;
|
2002-03-29 03:50:29 +00:00
|
|
|
|
2004-06-04 23:08:29 +00:00
|
|
|
control->cursor = GIMP_CURSOR_MOUSE;
|
2002-05-02 21:03:27 +00:00
|
|
|
control->tool_cursor = GIMP_TOOL_CURSOR_NONE;
|
|
|
|
control->cursor_modifier = GIMP_CURSOR_MODIFIER_NONE;
|
2002-03-29 03:50:29 +00:00
|
|
|
|
2004-06-04 23:08:29 +00:00
|
|
|
control->toggle_cursor = GIMP_CURSOR_MOUSE;
|
2002-05-02 21:03:27 +00:00
|
|
|
control->toggle_tool_cursor = GIMP_TOOL_CURSOR_NONE;
|
|
|
|
control->toggle_cursor_modifier = GIMP_CURSOR_MODIFIER_NONE;
|
2002-03-29 03:50:29 +00:00
|
|
|
}
|
2002-05-02 21:03:27 +00:00
|
|
|
|
2002-03-29 03:50:29 +00:00
|
|
|
void
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_pause (GimpToolControl *control)
|
2002-03-29 03:50:29 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
2002-03-29 03:50:29 +00:00
|
|
|
|
|
|
|
control->paused_count++;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_resume (GimpToolControl *control)
|
2002-03-29 03:50:29 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
2002-03-29 03:50:29 +00:00
|
|
|
|
|
|
|
control->paused_count--;
|
|
|
|
}
|
|
|
|
|
|
|
|
gboolean
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_is_paused (GimpToolControl *control)
|
2002-03-29 03:50:29 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
|
2002-03-29 03:50:29 +00:00
|
|
|
|
|
|
|
return control->paused_count > 0;
|
|
|
|
}
|
|
|
|
|
2004-02-08 21:46:30 +00:00
|
|
|
void
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_activate (GimpToolControl *control)
|
2002-03-29 03:50:29 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
2004-02-08 21:46:30 +00:00
|
|
|
#ifdef GIMP_UNSTABLE
|
2003-05-06 11:11:15 +00:00
|
|
|
g_return_if_fail (control->active == FALSE);
|
2004-02-08 21:46:30 +00:00
|
|
|
#endif
|
2002-03-29 03:50:29 +00:00
|
|
|
|
2003-05-06 11:11:15 +00:00
|
|
|
control->active = TRUE;
|
2002-03-29 03:50:29 +00:00
|
|
|
}
|
|
|
|
|
2004-02-08 21:46:30 +00:00
|
|
|
void
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_halt (GimpToolControl *control)
|
2002-03-29 03:50:29 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
2004-02-08 21:46:30 +00:00
|
|
|
#ifdef GIMP_UNSTABLE
|
2003-05-06 11:11:15 +00:00
|
|
|
g_return_if_fail (control->active == TRUE);
|
2004-02-08 21:46:30 +00:00
|
|
|
#endif
|
2002-03-29 03:50:29 +00:00
|
|
|
|
2003-05-06 11:11:15 +00:00
|
|
|
control->active = FALSE;
|
2002-03-29 03:50:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
gboolean
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_is_active (GimpToolControl *control)
|
2002-03-29 03:50:29 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
|
2002-03-29 03:50:29 +00:00
|
|
|
|
2003-05-06 11:11:15 +00:00
|
|
|
return control->active;
|
2002-03-29 03:50:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_set_toggle (GimpToolControl *control,
|
2004-02-08 21:46:30 +00:00
|
|
|
gboolean toggled)
|
2002-03-29 03:50:29 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
2002-03-29 03:50:29 +00:00
|
|
|
|
2002-06-16 17:13:39 +00:00
|
|
|
control->toggled = toggled ? TRUE : FALSE;
|
2002-03-29 03:50:29 +00:00
|
|
|
}
|
|
|
|
|
2002-05-02 21:03:27 +00:00
|
|
|
void
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_set_handles_empty_image (GimpToolControl *control,
|
2004-02-08 21:46:30 +00:00
|
|
|
gboolean handle_empty)
|
2002-05-02 21:03:27 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
2002-05-02 21:03:27 +00:00
|
|
|
|
2002-06-16 17:13:39 +00:00
|
|
|
control->handle_empty_image = handle_empty ? TRUE : FALSE;
|
2002-05-02 21:03:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_set_snap_to (GimpToolControl *control,
|
2004-02-08 21:46:30 +00:00
|
|
|
gboolean snap_to)
|
2002-05-02 21:03:27 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
2002-05-02 21:03:27 +00:00
|
|
|
|
2002-06-16 17:13:39 +00:00
|
|
|
control->auto_snap_to = snap_to ? TRUE : FALSE;
|
2002-05-02 21:03:27 +00:00
|
|
|
}
|
|
|
|
|
2003-04-17 02:57:33 +00:00
|
|
|
void
|
|
|
|
gimp_tool_control_set_snap_offsets (GimpToolControl *control,
|
|
|
|
gint offset_x,
|
|
|
|
gint offset_y,
|
|
|
|
gint width,
|
|
|
|
gint height)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
|
|
|
|
|
|
|
control->snap_offset_x = offset_x;
|
|
|
|
control->snap_offset_y = offset_y;
|
|
|
|
control->snap_width = width;
|
|
|
|
control->snap_height = height;
|
|
|
|
}
|
|
|
|
|
2002-05-02 21:03:27 +00:00
|
|
|
void
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_set_motion_mode (GimpToolControl *control,
|
|
|
|
GimpMotionMode motion_mode)
|
2002-05-02 21:03:27 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
2002-05-02 21:03:27 +00:00
|
|
|
|
|
|
|
control->motion_mode = motion_mode;
|
|
|
|
}
|
|
|
|
|
2002-03-29 03:50:29 +00:00
|
|
|
void
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_set_preserve (GimpToolControl *control,
|
2004-02-08 21:46:30 +00:00
|
|
|
gboolean preserve)
|
2002-03-29 03:50:29 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
2002-03-29 03:50:29 +00:00
|
|
|
|
2002-06-16 17:13:39 +00:00
|
|
|
control->preserve = preserve ? TRUE : FALSE;
|
2002-03-29 03:50:29 +00:00
|
|
|
}
|
|
|
|
|
2004-07-29 14:16:21 +00:00
|
|
|
void
|
|
|
|
gimp_tool_control_set_dirty_mask (GimpToolControl *control,
|
|
|
|
GimpDirtyMask dirty_mask)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
|
|
|
|
|
|
|
control->dirty_mask = dirty_mask;
|
|
|
|
}
|
|
|
|
|
2002-03-29 03:50:29 +00:00
|
|
|
void
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_set_cursor (GimpToolControl *control,
|
2004-06-14 10:19:39 +00:00
|
|
|
GimpCursorType cursor)
|
2002-03-29 03:50:29 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
2002-03-29 03:50:29 +00:00
|
|
|
|
2002-06-16 17:13:39 +00:00
|
|
|
control->cursor = cursor;
|
2002-03-29 03:50:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_set_tool_cursor (GimpToolControl *control,
|
2004-02-08 21:46:30 +00:00
|
|
|
GimpToolCursorType cursor)
|
2002-03-29 03:50:29 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
2002-03-29 03:50:29 +00:00
|
|
|
|
2004-02-08 21:46:30 +00:00
|
|
|
control->tool_cursor = cursor;
|
2002-03-29 03:50:29 +00:00
|
|
|
}
|
2002-06-16 17:13:39 +00:00
|
|
|
|
2002-03-29 03:50:29 +00:00
|
|
|
void
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_set_cursor_modifier (GimpToolControl *control,
|
2004-02-08 21:46:30 +00:00
|
|
|
GimpCursorModifier cmodifier)
|
2002-03-29 03:50:29 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
2002-03-29 03:50:29 +00:00
|
|
|
|
2004-02-08 21:46:30 +00:00
|
|
|
control->cursor_modifier = cmodifier;
|
2002-03-29 03:50:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_set_toggle_cursor (GimpToolControl *control,
|
2004-06-14 10:19:39 +00:00
|
|
|
GimpCursorType cursor)
|
2002-03-29 03:50:29 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
2002-03-29 03:50:29 +00:00
|
|
|
|
2002-06-16 17:13:39 +00:00
|
|
|
control->toggle_cursor = cursor;
|
2002-03-29 03:50:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_set_toggle_tool_cursor (GimpToolControl *control,
|
2004-02-08 21:46:30 +00:00
|
|
|
GimpToolCursorType cursor)
|
2002-03-29 03:50:29 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
2002-03-29 03:50:29 +00:00
|
|
|
|
2002-06-16 17:13:39 +00:00
|
|
|
control->toggle_tool_cursor = cursor;
|
2002-03-29 03:50:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_set_toggle_cursor_modifier (GimpToolControl *control,
|
2004-02-08 21:46:30 +00:00
|
|
|
GimpCursorModifier cmodifier)
|
2002-03-29 03:50:29 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
2002-03-29 03:50:29 +00:00
|
|
|
|
2004-02-08 21:46:30 +00:00
|
|
|
control->toggle_cursor_modifier = cmodifier;
|
2002-03-29 03:50:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_set_scroll_lock (GimpToolControl *control,
|
|
|
|
gboolean scroll_lock)
|
2002-03-29 03:50:29 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
2002-03-29 03:50:29 +00:00
|
|
|
|
2002-06-16 17:13:39 +00:00
|
|
|
control->scroll_lock = scroll_lock ? TRUE : FALSE;
|
2002-03-29 03:50:29 +00:00
|
|
|
}
|
|
|
|
|
2002-06-16 17:13:39 +00:00
|
|
|
|
2002-04-21 07:31:12 +00:00
|
|
|
GimpMotionMode
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_motion_mode (GimpToolControl *control)
|
2002-04-21 07:31:12 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), GIMP_MOTION_MODE_HINT);
|
2002-04-21 07:31:12 +00:00
|
|
|
|
|
|
|
return control->motion_mode;
|
|
|
|
}
|
|
|
|
|
|
|
|
gboolean
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_handles_empty_image (GimpToolControl *control)
|
2002-04-21 07:31:12 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
|
2002-04-21 07:31:12 +00:00
|
|
|
|
|
|
|
return control->handle_empty_image;
|
|
|
|
}
|
|
|
|
|
|
|
|
gboolean
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_auto_snap_to (GimpToolControl *control)
|
2002-04-21 07:31:12 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
|
2002-04-21 07:31:12 +00:00
|
|
|
|
|
|
|
return control->auto_snap_to;
|
|
|
|
}
|
|
|
|
|
2003-04-17 02:57:33 +00:00
|
|
|
void
|
|
|
|
gimp_tool_control_snap_offsets (GimpToolControl *control,
|
|
|
|
gint *offset_x,
|
|
|
|
gint *offset_y,
|
|
|
|
gint *width,
|
|
|
|
gint *height)
|
|
|
|
{
|
|
|
|
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
|
|
|
|
|
|
|
|
if (offset_x) *offset_x = control->snap_offset_x;
|
|
|
|
if (offset_y) *offset_y = control->snap_offset_y;
|
|
|
|
if (width) *width = control->snap_width;
|
|
|
|
if (height) *height = control->snap_height;
|
|
|
|
}
|
|
|
|
|
2002-04-21 07:31:12 +00:00
|
|
|
gboolean
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_preserve (GimpToolControl *control)
|
2002-04-21 07:31:12 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
|
2002-04-21 07:31:12 +00:00
|
|
|
|
|
|
|
return control->preserve;
|
|
|
|
}
|
|
|
|
|
2004-07-29 14:16:21 +00:00
|
|
|
GimpDirtyMask
|
|
|
|
gimp_tool_control_dirty_mask (GimpToolControl *control)
|
|
|
|
{
|
|
|
|
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), GIMP_DIRTY_NONE);
|
|
|
|
|
|
|
|
return control->dirty_mask;
|
|
|
|
}
|
|
|
|
|
2002-04-21 07:31:12 +00:00
|
|
|
gboolean
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_scroll_lock (GimpToolControl *control)
|
2002-04-21 07:31:12 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
|
2002-04-21 07:31:12 +00:00
|
|
|
|
|
|
|
return control->scroll_lock;
|
|
|
|
}
|
|
|
|
|
|
|
|
gboolean
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_is_toggled (GimpToolControl *control)
|
2002-04-21 07:31:12 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
|
2002-04-21 07:31:12 +00:00
|
|
|
|
|
|
|
return control->toggled;
|
|
|
|
}
|
|
|
|
|
2004-06-14 10:19:39 +00:00
|
|
|
GimpCursorType
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_get_cursor (GimpToolControl *control)
|
2002-04-21 07:31:12 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
|
2002-04-21 07:31:12 +00:00
|
|
|
|
|
|
|
return control->cursor;
|
|
|
|
}
|
|
|
|
|
2004-06-14 10:19:39 +00:00
|
|
|
GimpCursorType
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_get_toggle_cursor (GimpToolControl *control)
|
2002-04-21 07:31:12 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
|
2002-04-21 07:31:12 +00:00
|
|
|
|
|
|
|
return control->toggle_cursor;
|
|
|
|
}
|
|
|
|
|
2002-06-16 17:13:39 +00:00
|
|
|
GimpToolCursorType
|
|
|
|
gimp_tool_control_get_tool_cursor (GimpToolControl *control)
|
2002-04-21 07:31:12 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
|
2002-04-21 07:31:12 +00:00
|
|
|
|
|
|
|
return control->tool_cursor;
|
|
|
|
}
|
|
|
|
|
2002-06-16 17:13:39 +00:00
|
|
|
GimpToolCursorType
|
|
|
|
gimp_tool_control_get_toggle_tool_cursor (GimpToolControl *control)
|
2002-04-21 07:31:12 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
|
2002-04-21 07:31:12 +00:00
|
|
|
|
|
|
|
return control->toggle_tool_cursor;
|
|
|
|
}
|
|
|
|
|
2004-02-08 21:46:30 +00:00
|
|
|
GimpCursorModifier
|
2002-06-16 17:13:39 +00:00
|
|
|
gimp_tool_control_get_cursor_modifier (GimpToolControl *control)
|
2002-04-21 07:31:12 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
|
2002-04-21 07:31:12 +00:00
|
|
|
|
|
|
|
return control->cursor_modifier;
|
|
|
|
}
|
|
|
|
|
2002-06-16 17:13:39 +00:00
|
|
|
GimpCursorModifier
|
|
|
|
gimp_tool_control_get_toggle_cursor_modifier (GimpToolControl *control)
|
2002-04-21 07:31:12 +00:00
|
|
|
{
|
2002-06-16 17:13:39 +00:00
|
|
|
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
|
2002-04-21 07:31:12 +00:00
|
|
|
|
|
|
|
return control->toggle_cursor_modifier;
|
|
|
|
}
|