~ubuntu-branches/ubuntu/oneiric/almanah/oneiric

« back to all changes in this revision

Viewing changes to src/entry.h

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Ebner
  • Date: 2009-05-16 15:49:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090516154921-2uhvlj8btb4qygmd
Tags: 0.6.1-0ubuntu1
* New upstream release (LP: #368078)
* debian/control:
  - Bump Standards-Version to 3.8.1
  - Add intltool, libedataserver1.2-dev, libedataserverui1.2-dev, 
    libecal1.2-dev, libcryptui-dev as build dependency
  - Remove build dependency on autotools-dev and chrpath
* debian/{control/compat/rules}: Move to mimalistic dh7 style
* Update debian/watch
* Update copyright information

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
 
2
/*
 
3
 * Almanah
 
4
 * Copyright (C) Philip Withnall 2008 <philip@tecnocode.co.uk>
 
5
 * 
 
6
 * Almanah is free software: you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation, either version 3 of the License, or
 
9
 * (at your option) any later version.
 
10
 *
 
11
 * Almanah 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
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with Almanah.  If not, see <http://www.gnu.org/licenses/>.
 
18
 */
 
19
 
 
20
#ifndef ALMANAH_ENTRY_H
 
21
#define ALMANAH_ENTRY_H
 
22
 
 
23
#include <glib.h>
 
24
#include <glib-object.h>
 
25
 
 
26
G_BEGIN_DECLS
 
27
 
 
28
typedef enum {
 
29
        ALMANAH_ENTRY_EDITABLE = 1,
 
30
        ALMANAH_ENTRY_FUTURE = 2,
 
31
        ALMANAH_ENTRY_PAST = 0
 
32
} AlmanahEntryEditability;
 
33
 
 
34
/* The number of days after which a diary entry requires confirmation to be edited */
 
35
#define ALMANAH_ENTRY_CUTOFF_AGE 14
 
36
 
 
37
#define ALMANAH_TYPE_ENTRY              (almanah_entry_get_type ())
 
38
#define ALMANAH_ENTRY(o)                (G_TYPE_CHECK_INSTANCE_CAST ((o), ALMANAH_TYPE_ENTRY, AlmanahEntry))
 
39
#define ALMANAH_ENTRY_CLASS(k)          (G_TYPE_CHECK_CLASS_CAST((k), ALMANAH_TYPE_ENTRY, AlmanahEntryClass))
 
40
#define ALMANAH_IS_ENTRY(o)             (G_TYPE_CHECK_INSTANCE_TYPE ((o), ALMANAH_TYPE_ENTRY))
 
41
#define ALMANAH_IS_ENTRY_CLASS(k)       (G_TYPE_CHECK_CLASS_TYPE ((k), ALMANAH_TYPE_ENTRY))
 
42
#define ALMANAH_ENTRY_GET_CLASS(o)      (G_TYPE_INSTANCE_GET_CLASS ((o), ALMANAH_TYPE_ENTRY, AlmanahEntryClass))
 
43
 
 
44
typedef struct _AlmanahEntryPrivate     AlmanahEntryPrivate;
 
45
 
 
46
typedef struct {
 
47
        GObject parent;
 
48
        AlmanahEntryPrivate *priv;
 
49
} AlmanahEntry;
 
50
 
 
51
typedef struct {
 
52
        GObjectClass parent;
 
53
} AlmanahEntryClass;
 
54
 
 
55
GType almanah_entry_get_type (void);
 
56
AlmanahEntry *almanah_entry_new (GDate *date);
 
57
 
 
58
const guint8 *almanah_entry_get_data (AlmanahEntry *self, gsize *length);
 
59
void almanah_entry_set_data (AlmanahEntry *self, const guint8 *data, gsize length);
 
60
gboolean almanah_entry_get_content (AlmanahEntry *self, GtkTextBuffer *text_buffer, gboolean create_tags, GError **error);
 
61
void almanah_entry_set_content (AlmanahEntry *self, GtkTextBuffer *text_buffer);
 
62
 
 
63
void almanah_entry_get_date (AlmanahEntry *self, GDate *date);
 
64
AlmanahEntryEditability almanah_entry_get_editability (AlmanahEntry *self);
 
65
gboolean almanah_entry_is_empty (AlmanahEntry *self);
 
66
 
 
67
G_END_DECLS
 
68
 
 
69
#endif /* !ALMANAH_ENTRY_H */