1 2 /* nautilus-file-undo-manager.h - Manages the undo/redo stack 3 * 4 * Copyright (C) 2007-2011 Amos Brocco 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public 8 * License as published by the Free Software Foundation; either 9 * version 2 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public 17 * License along with this library; if not, see <http://www.gnu.org/licenses/>. 18 * 19 * Author: Amos Brocco <amos.brocco@gmail.com> 20 */ 21 22 #pragma once 23 24 #include <glib.h> 25 #include <glib-object.h> 26 #include <gtk/gtk.h> 27 #include <gio/gio.h> 28 29 #include "nautilus-file-undo-operations.h" 30 31 #define NAUTILUS_TYPE_FILE_UNDO_MANAGER\ 32 (nautilus_file_undo_manager_get_type()) 33 34 G_DECLARE_FINAL_TYPE (NautilusFileUndoManager, nautilus_file_undo_manager, NAUTILUS, FILE_UNDO_MANAGER, GObject) 35 36 typedef enum { 37 NAUTILUS_FILE_UNDO_MANAGER_STATE_NONE, 38 NAUTILUS_FILE_UNDO_MANAGER_STATE_UNDO, 39 NAUTILUS_FILE_UNDO_MANAGER_STATE_REDO 40 } NautilusFileUndoManagerState; 41 42 NautilusFileUndoManager *nautilus_file_undo_manager_new (void); 43 NautilusFileUndoManager * nautilus_file_undo_manager_get (void); 44 45 void nautilus_file_undo_manager_set_action (NautilusFileUndoInfo *info); 46 NautilusFileUndoInfo *nautilus_file_undo_manager_get_action (void); 47 48 NautilusFileUndoManagerState nautilus_file_undo_manager_get_state (void); 49 50 void nautilus_file_undo_manager_undo (GtkWindow *parent_window, 51 NautilusFileOperationsDBusData *dbus_data); 52 void nautilus_file_undo_manager_redo (GtkWindow *parent_window, 53 NautilusFileOperationsDBusData *dbus_data); 54 55 gboolean nautilus_file_undo_manager_is_operating (void); 56