~ubuntu-branches/debian/sid/libgxps/sid

« back to all changes in this revision

Viewing changes to tools/gxps-image-writer.h

  • Committer: Package Import Robot
  • Author(s): Michael Biebl
  • Date: 2012-03-08 16:00:35 UTC
  • Revision ID: package-import@ubuntu.com-20120308160035-umsq6046ch8d2nkh
Tags: upstream-0.2.1
ImportĀ upstreamĀ versionĀ 0.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* GXPSImageWriter
 
2
 *
 
3
 * Copyright (C) 2011  Carlos Garcia Campos <carlosgc@gnome.org>
 
4
 *
 
5
 * This library is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU Lesser General Public
 
7
 * License as published by the Free Software Foundation; either
 
8
 * version 2.1 of the License, or (at your option) any later version.
 
9
 *
 
10
 * This library is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
13
 * Lesser General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU Lesser General Public
 
16
 * License along with this library; if not, write to the Free Software
 
17
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
18
 */
 
19
 
 
20
#ifndef __GXPS_IMAGE_WRITER_H__
 
21
#define __GXPS_IMAGE_WRITER_H__
 
22
 
 
23
#include <stdio.h>
 
24
#include <glib-object.h>
 
25
 
 
26
G_BEGIN_DECLS
 
27
 
 
28
#define GXPS_TYPE_IMAGE_WRITER           (gxps_image_writer_get_type ())
 
29
#define GXPS_IMAGE_WRITER(obj)           (G_TYPE_CHECK_INSTANCE_CAST (obj, GXPS_TYPE_IMAGE_WRITER, GXPSImageWriter))
 
30
#define GXPS_IS_IMAGE_WRITER(obj)        (G_TYPE_CHECK_INSTANCE_TYPE (obj, GXPS_TYPE_IMAGE_WRITER))
 
31
#define GXPS_IMAGE_WRITER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXPS_TYPE_IMAGE_WRITER, GXPSImageWriterInterface))
 
32
 
 
33
typedef struct _GXPSImageWriter          GXPSImageWriter;
 
34
typedef struct _GXPSImageWriterInterface GXPSImageWriterInterface;
 
35
 
 
36
struct _GXPSImageWriterInterface {
 
37
        GTypeInterface g_iface;
 
38
 
 
39
        gboolean (* init)   (GXPSImageWriter *writer,
 
40
                             FILE            *fd,
 
41
                             guint            width,
 
42
                             guint            height,
 
43
                             guint            x_resolution,
 
44
                             guint            y_resolution);
 
45
        gboolean (* write)  (GXPSImageWriter *writer,
 
46
                             guchar          *row);
 
47
        gboolean (* finish) (GXPSImageWriter *writer);
 
48
};
 
49
 
 
50
GType    gxps_image_writer_get_type (void);
 
51
 
 
52
gboolean gxps_image_writer_init     (GXPSImageWriter *image_writer,
 
53
                                     FILE            *fd,
 
54
                                     guint            width,
 
55
                                     guint            height,
 
56
                                     guint            x_resolution,
 
57
                                     guint            y_resolution);
 
58
gboolean gxps_image_writer_write    (GXPSImageWriter *image_writer,
 
59
                                     guchar          *row);
 
60
gboolean gxps_image_writer_finish   (GXPSImageWriter *image_writer);
 
61
 
 
62
G_END_DECLS
 
63
 
 
64
#endif /* __GXPS_IMAGE_WRITER_H__ */