void gimp_tool_control_set_wants_click (GimpToolControl *control, gboolean wants_click) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); control->wants_click = wants_click ? TRUE : FALSE; }
void gimp_tool_control_halt (GimpToolControl *control) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); g_return_if_fail (control->active == TRUE); control->active = FALSE; }
void gimp_tool_control_set_toggle_tool_cursor (GimpToolControl *control, GimpToolCursorType cursor) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); control->toggle_tool_cursor = cursor; }
void gimp_tool_control_set_motion_mode (GimpToolControl *control, GimpMotionMode motion_mode) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); control->motion_mode = motion_mode; }
void gimp_tool_control_set_snap_to (GimpToolControl *control, gboolean snap_to) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); control->auto_snap_to = snap_to ? TRUE : FALSE; }
void gimp_tool_control_resume (GimpToolControl *control) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); g_return_if_fail (control->paused_count > 0); control->paused_count--; }
void gimp_tool_control_set_toggle_cursor_modifier (GimpToolControl *control, GimpCursorModifier modifier) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); control->toggle_cursor_modifier = modifier; }
void gimp_tool_control_set_scroll_lock (GimpToolControl *control, gboolean scroll_lock) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); control->scroll_lock = scroll_lock ? TRUE : FALSE; }
void gimp_tool_control_set_handle_empty_image (GimpToolControl *control, gboolean handle_empty) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); control->handle_empty_image = handle_empty ? TRUE : FALSE; }
GimpCursorPrecision gimp_tool_control_get_precision (GimpToolControl *control) { g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), GIMP_CURSOR_PRECISION_PIXEL_CENTER); return control->precision; }
void gimp_tool_control_set_preserve (GimpToolControl *control, gboolean preserve) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); control->preserve = preserve ? TRUE : FALSE; }
GimpToolActiveModifiers gimp_tool_control_get_active_modifiers (GimpToolControl *control) { g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), GIMP_TOOL_ACTIVE_MODIFIERS_OFF); return control->active_modifiers; }
void gimp_tool_control_set_precision (GimpToolControl *control, GimpCursorPrecision precision) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); control->precision = precision; }
void gimp_tool_control_set_active_modifiers (GimpToolControl *control, GimpToolActiveModifiers active_modifiers) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); control->active_modifiers = active_modifiers; }
void gimp_tool_control_set_wants_all_key_events (GimpToolControl *control, gboolean wants_key_events) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); control->wants_all_key_events = wants_key_events ? TRUE : FALSE; }
void gimp_tool_control_set_dirty_action (GimpToolControl *control, GimpToolAction action) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); control->dirty_action = action; }
void gimp_tool_control_set_toggled (GimpToolControl *control, gboolean toggled) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); control->toggled = toggled ? TRUE : FALSE; }
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; }
void gimp_tool_control_activate (GimpToolControl *control) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); #ifdef GIMP_UNSTABLE g_return_if_fail (control->active == FALSE); #endif control->active = TRUE; }
GimpCursorModifier gimp_tool_control_get_cursor_modifier (GimpToolControl *control) { g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE); if (control->toggled && control->toggle_cursor_modifier != -1) return control->toggle_cursor_modifier; return control->cursor_modifier; }
GimpToolCursorType gimp_tool_control_get_tool_cursor (GimpToolControl *control) { g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE); if (control->toggled && control->toggle_tool_cursor != -1) return control->toggle_tool_cursor; return control->tool_cursor; }
void gimp_tool_control_pop_preserve (GimpToolControl *control) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); g_return_if_fail (control->preserve_stack != NULL); control->preserve = GPOINTER_TO_INT (control->preserve_stack->data); control->preserve_stack = g_slist_delete_link (control->preserve_stack, control->preserve_stack); }
void gimp_tool_control_push_preserve (GimpToolControl *control, gboolean preserve) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); control->preserve_stack = g_slist_prepend (control->preserve_stack, GINT_TO_POINTER (control->preserve)); control->preserve = preserve ? TRUE : FALSE; }
void gimp_tool_control_set_action_object_2 (GimpToolControl *control, const gchar *action) { g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); if (action != control->action_object_2) { g_free (control->action_object_2); control->action_object_2 = g_strdup (action); } }
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; }
void gimp_tool_control_get_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; }