*** Plucked rev 3f699c081b38f9d19632fcee1c23cbc96fce3092 (sulabh@soc.pidgin.im):
[pidgin-git.git] / pidgin / gtksourceundomanager.h
blob432312e5c0983cc61a6dba4610b71adb332fbd13
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * gtksourceundomanager.h
4 * This file is part of GtkSourceView
6 * Copyright (C) 1998, 1999 Alex Roberts, Evan Lawrence
7 * Copyright (C) 2000, 2001 Chema Celorio, Paolo Maggi
8 * Copyright (C) 2002, 2003 Paolo Maggi
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 * Boston, MA 02111-1301, USA. * *
26 #ifndef __GTK_SOURCE_UNDO_MANAGER_H__
27 #define __GTK_SOURCE_UNDO_MANAGER_H__
29 #include <gtk/gtktextbuffer.h>
31 #define GTK_SOURCE_TYPE_UNDO_MANAGER (gtk_source_undo_manager_get_type ())
32 #define GTK_SOURCE_UNDO_MANAGER(obj) (GTK_CHECK_CAST ((obj), GTK_SOURCE_TYPE_UNDO_MANAGER, GtkSourceUndoManager))
33 #define GTK_SOURCE_UNDO_MANAGER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_SOURCE_TYPE_UNDO_MANAGER, GtkSourceUndoManagerClass))
34 #define GTK_SOURCE_IS_UNDO_MANAGER(obj) (GTK_CHECK_TYPE ((obj), GTK_SOURCE_TYPE_UNDO_MANAGER))
35 #define GTK_SOURCE_IS_UNDO_MANAGER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_SOURCE_TYPE_UNDO_MANAGER))
36 #define GTK_SOURCE_UNDO_MANAGER_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_SOURCE_TYPE_UNDO_MANAGER, GtkSourceUndoManagerClass))
39 typedef struct _GtkSourceUndoManager GtkSourceUndoManager;
40 typedef struct _GtkSourceUndoManagerClass GtkSourceUndoManagerClass;
42 typedef struct _GtkSourceUndoManagerPrivate GtkSourceUndoManagerPrivate;
44 struct _GtkSourceUndoManager
46 GObject base;
48 GtkSourceUndoManagerPrivate *priv;
51 struct _GtkSourceUndoManagerClass
53 GObjectClass parent_class;
55 /* Signals */
56 void (*can_undo) (GtkSourceUndoManager *um, gboolean can_undo);
57 void (*can_redo) (GtkSourceUndoManager *um, gboolean can_redo);
60 GType gtk_source_undo_manager_get_type (void) G_GNUC_CONST;
62 GtkSourceUndoManager* gtk_source_undo_manager_new (GtkTextBuffer *buffer);
64 gboolean gtk_source_undo_manager_can_undo (const GtkSourceUndoManager *um);
65 gboolean gtk_source_undo_manager_can_redo (const GtkSourceUndoManager *um);
67 void gtk_source_undo_manager_undo (GtkSourceUndoManager *um);
68 void gtk_source_undo_manager_redo (GtkSourceUndoManager *um);
70 void gtk_source_undo_manager_begin_not_undoable_action
71 (GtkSourceUndoManager *um);
72 void gtk_source_undo_manager_end_not_undoable_action
73 (GtkSourceUndoManager *um);
75 gint gtk_source_undo_manager_get_max_undo_levels
76 (GtkSourceUndoManager *um);
77 void gtk_source_undo_manager_set_max_undo_levels
78 (GtkSourceUndoManager *um,
79 gint undo_levels);
81 #endif /* __GTK_SOURCE_UNDO_MANAGER_H__ */