gth-comment.h 3.78 KB
Newer Older
Paolo Bacchilega's avatar
Paolo Bacchilega committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */

/*
 *  GThumb
 *
 *  Copyright (C) 2009 The Free Software Foundation, Inc.
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
 */

#ifndef GTH_COMMENT_H
#define GTH_COMMENT_H

#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <gthumb.h>

#define GTH_TYPE_COMMENT (gth_comment_get_type ())
#define GTH_COMMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTH_TYPE_COMMENT, GthComment))
#define GTH_COMMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTH_TYPE_COMMENT, GthCommentClass))
#define GTH_IS_COMMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTH_TYPE_COMMENT))
#define GTH_IS_COMMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTH_TYPE_COMMENT))
#define GTH_COMMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTH_TYPE_COMMENT, GthCommentClass))

typedef struct _GthComment GthComment;
typedef struct _GthCommentClass GthCommentClass;
typedef struct _GthCommentPrivate GthCommentPrivate;

struct _GthComment {
        GObject     parent_instance;
        GthCommentPrivate *priv;
};

struct _GthCommentClass {
        GObjectClass parent_class;
};

GFile *           gth_comment_get_comment_file           (GFile       *file);
GType             gth_comment_get_type                   (void);
GthComment *      gth_comment_new                        (void);
GthComment *      gth_comment_new_for_file               (GFile       *file,
							  GError     **error);
char *            gth_comment_to_data                    (GthComment  *comment,
							  gsize       *length);
GthComment *      gth_comment_dup                        (GthComment  *comment);
void              gth_comment_reset                      (GthComment  *comment);
60
61
void              gth_comment_set_caption                (GthComment  *comment,
							  const char  *value);
Paolo Bacchilega's avatar
Paolo Bacchilega committed
62
63
64
65
66
67
68
69
70
71
72
73
void              gth_comment_set_note                   (GthComment  *comment,
							  const char  *value);
void              gth_comment_set_place                  (GthComment  *comment,
							  const char  *value);
void              gth_comment_clear_categories           (GthComment  *comment);							  
void              gth_comment_add_category               (GthComment  *comment,
							  const char  *value);
void              gth_comment_reset_time                 (GthComment  *comment); 							  
void              gth_comment_set_time_from_exif_format  (GthComment  *comment,
							  const char  *value);
void              gth_comment_set_time_from_time_t       (GthComment  *comment,
							  time_t       value);						  
74
const char *      gth_comment_get_caption                (GthComment  *comment);
Paolo Bacchilega's avatar
Paolo Bacchilega committed
75
76
77
78
79
80
81
82
const char *      gth_comment_get_note                   (GthComment  *comment);
const char *      gth_comment_get_place                  (GthComment  *comment);
GPtrArray *       gth_comment_get_categories             (GthComment  *comment);
GDate *           gth_comment_get_date                   (GthComment  *comment);
GthTime *         gth_comment_get_time_of_day            (GthComment  *comment);
char *            gth_comment_get_time_as_exif_format    (GthComment  *comment);

#endif /* GTH_COMMENT_H */