# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# This file is part of Quarry                                     #
#                                                                 #
# Copyright (C) 2005, 2006 Paul Pogonyshev.                       #
#                                                                 #
# 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., 51 Franklin Street, Fifth Floor,     #
# Boston, MA 02110-1301, USA.                                     #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #


@mode undo_operations


@c_include "sgf-undo.h"


operations  SgfUndoOperation sgf_undo_operations {
  SGF_OPERATION_NEW_NODE
		sgf_operation_delete_node
		sgf_operation_add_node
		sgf_operation_new_node_free_data

  SGF_OPERATION_DELETE_NODE
  		sgf_operation_add_node
		sgf_operation_delete_node
  		sgf_operation_delete_node_free_data

  SGF_OPERATION_DELETE_NODE_CHILDREN
		sgf_operation_delete_node_children_undo
  		sgf_operation_delete_node_children_redo
  		sgf_operation_delete_node_children_free_data

  SGF_OPERATION_SWAP_NODES
		sgf_operation_swap_nodes_do_swap
		sgf_operation_swap_nodes_do_swap
		NULL

  SGF_OPERATION_CHANGE_NODE_MOVE_COLOR
		sgf_operation_change_node_move_color_do_change
		sgf_operation_change_node_move_color_do_change
		NULL

  SGF_OPERATION_CHANGE_NODE_TO_PLAY_COLOR
		sgf_operation_change_node_to_play_color_do_change
		sgf_operation_change_node_to_play_color_do_change
		NULL

  SGF_OPERATION_NEW_PROPERTY
		sgf_operation_delete_property
		sgf_operation_add_property
		sgf_operation_new_property_free_data

  SGF_OPERATION_DELETE_PROPERTY
		sgf_operation_add_property
		sgf_operation_delete_property
		sgf_operation_delete_property_free_data

  SGF_OPERATION_CHANGE_PROPERTY
		sgf_operation_change_property_do_change
		sgf_operation_change_property_do_change
		sgf_operation_change_property_free_data

@if SGF_REAL_VALUES_ALLOCATED_SEPARATELY
  SGF_OPERATION_CHANGE_REAL_PROPERTY
		sgf_operation_change_real_property_do_change
		sgf_operation_change_real_property_do_change
		NULL
@endif

  SGF_OPERATION_CUSTOM
		sgf_operation_custom_undo
		sgf_operation_custom_redo
		sgf_operation_custom_free_data

  + SGF_NUM_OPERATIONS
}
