~ubuntu-branches/ubuntu/utopic/almanah/utopic

« back to all changes in this revision

Viewing changes to src/definition.h

  • Committer: Package Import Robot
  • Author(s): Angel Abad
  • Date: 2012-10-29 10:14:18 UTC
  • mfrom: (1.4.1) (10.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20121029101418-k2c27xb0aku22zeg
Tags: 0.10.0-1~exp1
* Imported Upstream version 0.10.0
* debian/control:
  - Bump evolution Build-Depends ( >=3.6.0)
  - debian/control: Depends on evolution-common (>= 3.6.0)
* Bump Standards-Version to 3.9.4 (no changes)

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-2009 <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_DEFINITION_H
21
 
#define ALMANAH_DEFINITION_H
22
 
 
23
 
#include <glib.h>
24
 
#include <glib-object.h>
25
 
#include <gtk/gtk.h>
26
 
 
27
 
G_BEGIN_DECLS
28
 
 
29
 
typedef enum {
30
 
        ALMANAH_DEFINITION_UNKNOWN = 0,
31
 
        ALMANAH_DEFINITION_FILE = 1,
32
 
        ALMANAH_DEFINITION_NOTE,
33
 
        ALMANAH_DEFINITION_URI,
34
 
        ALMANAH_DEFINITION_CONTACT
35
 
} AlmanahDefinitionType;
36
 
 
37
 
#define ALMANAH_TYPE_DEFINITION                 (almanah_definition_get_type ())
38
 
#define ALMANAH_DEFINITION(o)                   (G_TYPE_CHECK_INSTANCE_CAST ((o), ALMANAH_TYPE_DEFINITION, AlmanahDefinition))
39
 
#define ALMANAH_DEFINITION_CLASS(k)             (G_TYPE_CHECK_CLASS_CAST((k), ALMANAH_TYPE_DEFINITION, AlmanahDefinitionClass))
40
 
#define ALMANAH_IS_DEFINITION(o)                (G_TYPE_CHECK_INSTANCE_TYPE ((o), ALMANAH_TYPE_DEFINITION))
41
 
#define ALMANAH_IS_DEFINITION_CLASS(k)          (G_TYPE_CHECK_CLASS_TYPE ((k), ALMANAH_TYPE_DEFINITION))
42
 
#define ALMANAH_DEFINITION_GET_CLASS(o)         (G_TYPE_INSTANCE_GET_CLASS ((o), ALMANAH_TYPE_DEFINITION, AlmanahDefinitionClass))
43
 
 
44
 
typedef struct _AlmanahDefinitionPrivate        AlmanahDefinitionPrivate;
45
 
 
46
 
typedef struct {
47
 
        GObject parent;
48
 
        AlmanahDefinitionPrivate *priv;
49
 
} AlmanahDefinition;
50
 
 
51
 
typedef struct {
52
 
        GObjectClass parent;
53
 
 
54
 
        AlmanahDefinitionType type_id;
55
 
        const gchar *name;
56
 
        const gchar *description;
57
 
        const gchar *icon_name;
58
 
 
59
 
        gboolean (*view) (AlmanahDefinition *definition);
60
 
        void (*build_dialog) (AlmanahDefinition *definition, GtkVBox *parent_vbox);
61
 
        void (*close_dialog) (AlmanahDefinition *definition, GtkVBox *parent_vbox);
62
 
        void (*parse_text) (AlmanahDefinition *definition, const gchar *text);
63
 
        gchar *(*get_blurb) (AlmanahDefinition *definition);
64
 
} AlmanahDefinitionClass;
65
 
 
66
 
GType almanah_definition_get_type (void);
67
 
 
68
 
AlmanahDefinition *almanah_definition_new (AlmanahDefinitionType type_id);
69
 
 
70
 
AlmanahDefinitionType almanah_definition_get_type_id (AlmanahDefinition *self);
71
 
const gchar *almanah_definition_get_name (AlmanahDefinition *self);
72
 
const gchar *almanah_definition_get_description (AlmanahDefinition *self);
73
 
const gchar *almanah_definition_get_icon_name (AlmanahDefinition *self);
74
 
 
75
 
gboolean almanah_definition_view (AlmanahDefinition *self);
76
 
void almanah_definition_build_dialog (AlmanahDefinition *self, GtkVBox *parent_vbox);
77
 
void almanah_definition_close_dialog (AlmanahDefinition *self, GtkVBox *parent_vbox);
78
 
void almanah_definition_parse_text (AlmanahDefinition *self, const gchar *text);
79
 
gchar *almanah_definition_get_blurb (AlmanahDefinition *self);
80
 
 
81
 
const gchar *almanah_definition_get_text (AlmanahDefinition *self);
82
 
void almanah_definition_set_text (AlmanahDefinition *self, const gchar *text);
83
 
 
84
 
const gchar *almanah_definition_get_value (AlmanahDefinition *self);
85
 
void almanah_definition_set_value (AlmanahDefinition *self, const gchar *value);
86
 
const gchar *almanah_definition_get_value2 (AlmanahDefinition *self);
87
 
void almanah_definition_set_value2 (AlmanahDefinition *self, const gchar *value);
88
 
 
89
 
void almanah_definition_populate_model (GtkListStore *list_store, guint type_id_column, guint name_column, guint icon_name_column);
90
 
 
91
 
G_END_DECLS
92
 
 
93
 
#endif /* !ALMANAH_DEFINITION_H */