~ubuntu-branches/debian/squeeze/tasks/squeeze

« back to all changes in this revision

Viewing changes to libkoto/koto-undo-manager.h

  • Committer: Bazaar Package Importer
  • Author(s): Ross Burton, Loic Minier
  • Date: 2008-02-20 17:24:42 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20080220172442-rso0p0yngsf414dy
Tags: 0.13-1
[ Loic Minier ]

* New upstream release.
* Bump up Standards-Version to 3.7.3.
* Rework to build a Hildon flavour of the package.
  - New binary package tasks-hildon; add conflicts with tasks and update
    descriptions; add install file; this package must be the first in the
    control file as to permit the dbg symbols for the standard tasks package
    to be in tasks-dbg instead of the tasks-hildon ones.
  - Add build hooks for configure, build, and install to add flavour /
    package specific rules and configure flags.
  - Build-dep on libhildon-1-dev, libdbus-1-dev, libhildonmime-dev for the
    Hildon flavour.
* Add explicit Copyright statement to debian/copyright.
* Use ${binary:Version} instead of ${Source-Version}; build-dep on dpkg-dev
  >= 1.13.19.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 
2
/*
 
3
 *  Authors: Iain Holmes <iain@gnome.org>
 
4
 *
 
5
 *  Copyright 2002 - 2006 Iain Holmes
 
6
 *
 
7
 *  This file is free software; you can redistribute it and/or
 
8
 *  modify it under the terms of version 2 of the GNU Library General Public
 
9
 *  License as published by the Free Software Foundation;
 
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
 *  Library General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU Library General Public
 
17
 *  License along with this library; if not, write to the
 
18
 *  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
19
 *  Boston, MA 02111-1307, USA.
 
20
 *
 
21
 */
 
22
 
 
23
#ifndef __KOTO_UNDO_MANAGER_H__
 
24
#define __KOTO_UNDO_MANAGER_H__
 
25
 
 
26
#include <glib-object.h>
 
27
#include <glib.h>
 
28
 
 
29
#include "koto-undoable.h"
 
30
 
 
31
#define KOTO_TYPE_UNDO_MANAGER (koto_undo_manager_get_type ())
 
32
#define KOTO_UNDO_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), KOTO_TYPE_UNDO_MANAGER, KotoUndoManager))
 
33
#define KOTO_IS_UNDO_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), KOTO_TYPE_UNDO_MANAGER))
 
34
 
 
35
typedef struct _KotoUndoContext KotoUndoContext;
 
36
typedef struct _KotoUndoHistory {
 
37
        char *name;
 
38
 
 
39
        gboolean current; /* Is this the position we are at in the history */
 
40
        KotoUndoContext *ctxt; 
 
41
} KotoUndoHistory;
 
42
 
 
43
typedef struct _KotoUndoManager KotoUndoManager;
 
44
typedef struct _KotoUndoManagerClass KotoUndoManagerClass;
 
45
typedef struct _KotoUndoManagerPrivate KotoUndoManagerPrivate;
 
46
 
 
47
struct _KotoUndoManager {
 
48
        GObject object;
 
49
 
 
50
        KotoUndoManagerPrivate *priv;
 
51
};
 
52
 
 
53
struct _KotoUndoManagerClass {
 
54
        GObjectClass parent_class;
 
55
 
 
56
        void (*changed) (KotoUndoManager *manager);
 
57
};
 
58
 
 
59
GType koto_undo_manager_get_type (void);
 
60
KotoUndoManager *koto_undo_manager_new (void);
 
61
 
 
62
gboolean koto_undo_manager_can_undo (KotoUndoManager *manager);
 
63
gboolean koto_undo_manager_can_redo (KotoUndoManager *manager);
 
64
 
 
65
KotoUndoContext *koto_undo_manager_context_begin (KotoUndoManager *manager,
 
66
                                                      const char *name);
 
67
KotoUndoContext *
 
68
koto_undo_manager_context_begin_formatted (KotoUndoManager *manager,
 
69
                                           const char *format, ...);
 
70
 
 
71
void koto_undo_manager_context_end (KotoUndoManager *manager,
 
72
                                      KotoUndoContext *ctxt);
 
73
void koto_undo_manager_context_cancel (KotoUndoManager *manager,
 
74
                                         KotoUndoContext *ctxt);
 
75
 
 
76
void koto_undo_context_add (KotoUndoContext *context,
 
77
                              KotoUndoable *undoable);
 
78
const char *koto_undo_manager_get_undo_name (KotoUndoManager *manager);
 
79
const char *koto_undo_manager_get_redo_name (KotoUndoManager *manager);
 
80
 
 
81
void koto_undo_manager_undo (KotoUndoManager *manager);
 
82
void koto_undo_manager_redo (KotoUndoManager *manager);
 
83
 
 
84
GList *koto_undo_manager_get_history (KotoUndoManager *manager);
 
85
 
 
86
#endif