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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
/*
* Copyright (C) 2011-2015 Karlsruhe Institute of Technology
*
* This file is part of Ufo.
*
* This library is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ufo-reader.h"
typedef UfoReaderIface UfoReaderInterface;
G_DEFINE_INTERFACE (UfoReader, ufo_reader, 0)
gboolean
ufo_reader_can_open (UfoReader *reader,
const gchar *filename)
{
return UFO_READER_GET_IFACE (reader)->can_open (reader, filename);
}
gboolean
ufo_reader_open (UfoReader *reader,
const gchar *filename,
guint start,
GError **error)
{
return UFO_READER_GET_IFACE (reader)->open (reader, filename, start, error);
}
void
ufo_reader_close (UfoReader *reader)
{
UFO_READER_GET_IFACE (reader)->close (reader);
}
gboolean
ufo_reader_data_available (UfoReader *reader)
{
return UFO_READER_GET_IFACE (reader)->data_available (reader);
}
gboolean
ufo_reader_get_meta (UfoReader *reader,
UfoRequisition *requisition,
gsize *num_images,
UfoBufferDepth *bitdepth,
GError **error)
{
return UFO_READER_GET_IFACE (reader)->get_meta (reader, requisition, num_images, bitdepth, error);
}
gsize
ufo_reader_read (UfoReader *reader,
UfoBuffer *buffer,
UfoRequisition *requisition,
guint roi_y,
guint roi_height,
guint roi_step,
guint image_step)
{
return UFO_READER_GET_IFACE (reader)->read (reader, buffer, requisition, roi_y, roi_height, roi_step, image_step);
}
static void
ufo_reader_default_init (UfoReaderInterface *iface)
{
}
|