static void gimp_tool_real_cursor_update (GimpTool *tool, GimpCoords *coords, GdkModifierType state, GimpDisplay *display) { gimp_tool_set_cursor (tool, display, gimp_tool_control_get_cursor (tool->control), gimp_tool_control_get_tool_cursor (tool->control), gimp_tool_control_get_cursor_modifier (tool->control)); }
static void gimp_selection_tool_cursor_update (GimpTool *tool, const GimpCoords *coords, GdkModifierType state, GimpDisplay *display) { GimpSelectionTool *selection_tool = GIMP_SELECTION_TOOL (tool); GimpSelectionOptions *options; GimpToolCursorType tool_cursor; GimpCursorModifier modifier; options = GIMP_SELECTION_TOOL_GET_OPTIONS (tool); tool_cursor = gimp_tool_control_get_tool_cursor (tool->control); modifier = GIMP_CURSOR_MODIFIER_NONE; switch (selection_tool->function) { case SELECTION_SELECT: switch (options->operation) { case GIMP_CHANNEL_OP_REPLACE: break; case GIMP_CHANNEL_OP_ADD: modifier = GIMP_CURSOR_MODIFIER_PLUS; break; case GIMP_CHANNEL_OP_SUBTRACT: modifier = GIMP_CURSOR_MODIFIER_MINUS; break; case GIMP_CHANNEL_OP_INTERSECT: modifier = GIMP_CURSOR_MODIFIER_INTERSECT; break; } break; case SELECTION_MOVE_MASK: modifier = GIMP_CURSOR_MODIFIER_MOVE; break; case SELECTION_MOVE: case SELECTION_MOVE_COPY: tool_cursor = GIMP_TOOL_CURSOR_MOVE; break; case SELECTION_ANCHOR: modifier = GIMP_CURSOR_MODIFIER_ANCHOR; break; } /* we don't set the bad modifier ourselves, so a subclass has set * it, always leave it there since it's more important than what we * have to say. */ if (gimp_tool_control_get_cursor_modifier (tool->control) == GIMP_CURSOR_MODIFIER_BAD) { modifier = GIMP_CURSOR_MODIFIER_BAD; } gimp_tool_set_cursor (tool, display, gimp_tool_control_get_cursor (tool->control), tool_cursor, modifier); }