2
* Copyright (C) 2009 Canonical Ltd.
3
* Author: Robert Ancell <robert.ancell@canonical.com>
5
* This program is free software: you can redistribute it and/or modify it under
6
* the terms of the GNU General Public License as published by the Free Software
7
* Foundation, either version 3 of the License, or (at your option) any later
8
* version. See http://www.gnu.org/copyleft/gpl.html the full text of the
15
#include <glib-object.h>
17
#include <gdk-pixbuf/gdk-pixbuf.h>
22
#define PAGE_TYPE (page_get_type ())
23
#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAGE_TYPE, Page))
34
typedef struct PagePrivate PagePrivate;
38
GObject parent_instance;
44
GObjectClass parent_class;
46
void (*pixels_changed) (Page *page);
47
void (*size_changed) (Page *page);
48
void (*scan_line_changed) (Page *page);
49
void (*scan_direction_changed) (Page *page);
50
void (*crop_changed) (Page *page);
54
GType page_get_type (void);
56
Page *page_new (gint width, gint height, gint dpi, ScanDirection scan_direction);
58
void page_set_page_info (Page *page, ScanPageInfo *info);
60
gint page_get_dpi (Page *page);
62
gint page_get_width (Page *page);
64
gint page_get_height (Page *page);
66
gint page_get_depth (Page *page);
68
gint page_get_n_channels (Page *page);
70
gint page_get_rowstride (Page *page);
72
const guchar *page_get_pixels (Page *page);
74
guchar *page_get_pixel (Page *page, gint x, gint y);
76
gboolean page_is_landscape (Page *page);
78
gint page_get_scan_width (Page *page);
80
gint page_get_scan_height (Page *page);
82
void page_set_color_profile (Page *page, const gchar *color_profile);
84
const gchar *page_get_color_profile (Page *page);
86
void page_start (Page *page);
88
gboolean page_is_scanning (Page *page);
90
gboolean page_has_data (Page *page);
92
gboolean page_is_color (Page *page);
94
gint page_get_scan_line (Page *page);
96
void page_parse_scan_line (Page *page, ScanLine *line);
98
void page_finish (Page *page);
100
ScanDirection page_get_scan_direction (Page *page);
102
void page_rotate_left (Page *page);
104
void page_rotate_right (Page *page);
106
void page_set_no_crop (Page *page);
108
void page_set_custom_crop (Page *page, gint width, gint height);
110
void page_set_named_crop (Page *page, const gchar *name);
112
void page_move_crop (Page *page, gint x, gint y);
114
void page_rotate_crop (Page *page);
116
gboolean page_has_crop (Page *page);
118
void page_get_crop (Page *page, gint *x, gint *y, gint *width, gint *height);
120
gchar *page_get_named_crop (Page *page);
122
GdkPixbuf *page_get_image (Page *page, gboolean apply_crop);
124
gboolean page_save (Page *page, const gchar *type, GFile *file, GError **error);
126
#endif /* _PAGE_H_ */