1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
---|
2 | /* This file is part of the GtkHTML library |
---|
3 | |
---|
4 | Copyright (C) 2000 Helix Code, Inc. |
---|
5 | |
---|
6 | This library is free software; you can redistribute it and/or |
---|
7 | modify it under the terms of the GNU Library 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 | MERCHcANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
14 | Library General Public License for more details. |
---|
15 | |
---|
16 | You should have received a copy of the GNU Library General Public License |
---|
17 | along with this library; see the file COPYING.LIB. If not, write to |
---|
18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
19 | Boston, MA 02111-1307, USA. |
---|
20 | */ |
---|
21 | |
---|
22 | #ifndef _HTML_UNDO_H |
---|
23 | #define _HTML_UNDO_H |
---|
24 | |
---|
25 | #define HTML_UNDO_LIMIT 1024 |
---|
26 | |
---|
27 | #include "htmlundo-action.h" |
---|
28 | #include "htmlenums.h" |
---|
29 | |
---|
30 | #define HTML_UNDO_DATA(x) ((HTMLUndoData *) x) |
---|
31 | struct _HTMLUndoData { |
---|
32 | HTMLUndoDataDestroyFunc destroy; |
---|
33 | gint ref_count; |
---|
34 | }; |
---|
35 | |
---|
36 | HTMLUndo *html_undo_new (void); |
---|
37 | void html_undo_destroy (HTMLUndo *undo); |
---|
38 | void html_undo_do_undo (HTMLUndo *undo, |
---|
39 | HTMLEngine *engine); |
---|
40 | void html_undo_do_redo (HTMLUndo *undo, |
---|
41 | HTMLEngine *engine); |
---|
42 | void html_undo_discard_redo (HTMLUndo *undo); |
---|
43 | void html_undo_add_undo_action (HTMLUndo *undo, |
---|
44 | HTMLUndoAction *action); |
---|
45 | void html_undo_add_redo_action (HTMLUndo *undo, |
---|
46 | HTMLUndoAction *action); |
---|
47 | void html_undo_add_action (HTMLUndo *undo, |
---|
48 | HTMLUndoAction *action, |
---|
49 | HTMLUndoDirection dir); |
---|
50 | gboolean html_undo_has_undo_steps (HTMLUndo *undo); |
---|
51 | void html_undo_reset (HTMLUndo *undo); |
---|
52 | void html_undo_level_begin (HTMLUndo *undo, |
---|
53 | const gchar *undo_description, |
---|
54 | const gchar *redo_description); |
---|
55 | void html_undo_level_end (HTMLUndo *undo); |
---|
56 | gint html_undo_get_step_count (HTMLUndo *undo); |
---|
57 | void html_undo_freeze (HTMLUndo *undo); |
---|
58 | void html_undo_thaw (HTMLUndo *undo); |
---|
59 | /* |
---|
60 | * Undo Data |
---|
61 | */ |
---|
62 | void html_undo_data_init (HTMLUndoData *data); |
---|
63 | void html_undo_data_ref (HTMLUndoData *data); |
---|
64 | void html_undo_data_unref (HTMLUndoData *data); |
---|
65 | /* |
---|
66 | * Undo Direction |
---|
67 | */ |
---|
68 | HTMLUndoDirection html_undo_direction_reverse (HTMLUndoDirection dir); |
---|
69 | |
---|
70 | #endif /* _HTML_UNDO_H */ |
---|