2008-04-30 A. Walton <awalton@gnome.org>
[nautilus.git] / libnautilus-private / nautilus-undo-transaction.h
blob26d407457b20cb4b58ce8cc5563c52d3b6d8b3d9
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
3 /* NautilusUndoTransaction - An object for an undoable transaction.
4 * Used internally by undo machinery.
5 * Not public.
7 * Copyright (C) 2000 Eazel, Inc.
9 * Author: Gene Z. Ragan <gzr@eazel.com>
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Library General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Library General Public License for more details.
21 * You should have received a copy of the GNU Library General Public
22 * License along with this library; if not, write to the
23 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 * Boston, MA 02111-1307, USA.
27 #ifndef NAUTILUS_UNDO_TRANSACTION_H
28 #define NAUTILUS_UNDO_TRANSACTION_H
30 #include <libnautilus-private/nautilus-undo.h>
32 #define NAUTILUS_TYPE_UNDO_TRANSACTION \
33 (nautilus_undo_transaction_get_type ())
34 #define NAUTILUS_UNDO_TRANSACTION(obj) \
35 (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_UNDO_TRANSACTION, NautilusUndoTransaction))
36 #define NAUTILUS_UNDO_TRANSACTION_CLASS(klass) \
37 (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_UNDO_TRANSACTION, NautilusUndoTransactionClass))
38 #define NAUTILUS_IS_UNDO_TRANSACTION(obj) \
39 (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_UNDO_TRANSACTION))
40 #define NAUTILUS_IS_UNDO_TRANSACTION_CLASS(klass) \
41 (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_UNDO_TRANSACTION))
43 /* The typedef for NautilusUndoTransaction is in nautilus-undo.h
44 to avoid circular deps */
45 typedef struct _NautilusUndoTransactionClass NautilusUndoTransactionClass;
47 struct _NautilusUndoTransaction {
48 GObject parent_slot;
50 char *operation_name;
51 char *undo_menu_item_label;
52 char *undo_menu_item_hint;
53 char *redo_menu_item_label;
54 char *redo_menu_item_hint;
55 GList *atom_list;
57 NautilusUndoManager *owner;
60 struct _NautilusUndoTransactionClass {
61 GObjectClass parent_slot;
64 GType nautilus_undo_transaction_get_type (void);
65 NautilusUndoTransaction *nautilus_undo_transaction_new (const char *operation_name,
66 const char *undo_menu_item_label,
67 const char *undo_menu_item_hint,
68 const char *redo_menu_item_label,
69 const char *redo_menu_item_hint);
70 void nautilus_undo_transaction_add_atom (NautilusUndoTransaction *transaction,
71 const NautilusUndoAtom *atom);
72 void nautilus_undo_transaction_add_to_undo_manager (NautilusUndoTransaction *transaction,
73 NautilusUndoManager *manager);
74 void nautilus_undo_transaction_unregister_object (GObject *atom_target);
75 void nautilus_undo_transaction_undo (NautilusUndoTransaction *transaction);
77 #endif /* NAUTILUS_UNDO_TRANSACTION_H */