blob: 38657c67f313e3e0d973b736399ac5dc00da72f4 [file] [log] [blame]
Stepan Salenikovich5c54b352016-09-14 14:28:19 -04001/*
2 * Copyright © 2009 Bastien Nocera <hadess@hadess.net>
3 *
4 * Licensed under the GNU General Public License Version 2
5 *
6 * This program 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 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef _CC_CROP_AREA_H_
21#define _CC_CROP_AREA_H_
22
23#include <glib-object.h>
24#include <gtk/gtk.h>
25
26G_BEGIN_DECLS
27
28#define CC_TYPE_CROP_AREA (cc_crop_area_get_type ())
29#define CC_CROP_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CC_TYPE_CROP_AREA, \
30 CcCropArea))
31#define CC_CROP_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CC_TYPE_CROP_AREA, \
32 CcCropAreaClass))
33#define CC_IS_CROP_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CC_TYPE_CROP_AREA))
34#define CC_IS_CROP_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CC_TYPE_CROP_AREA))
35#define CC_CROP_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CC_TYPE_CROP_AREA, \
36 CcCropAreaClass))
37
38typedef struct _CcCropAreaClass CcCropAreaClass;
39typedef struct _CcCropArea CcCropArea;
40typedef struct _CcCropAreaPrivate CcCropAreaPrivate;
41
42struct _CcCropAreaClass {
43 GtkDrawingAreaClass parent_class;
44};
45
46struct _CcCropArea {
47 GtkDrawingArea parent_instance;
48 CcCropAreaPrivate *priv;
49};
50
51GType cc_crop_area_get_type (void) G_GNUC_CONST;
52
53GtkWidget *cc_crop_area_new (void);
54GdkPixbuf *cc_crop_area_get_picture (CcCropArea *area);
55void cc_crop_area_set_picture (CcCropArea *area,
56 GdkPixbuf *pixbuf);
57void cc_crop_area_set_min_size (CcCropArea *area,
58 gint width,
59 gint height);
60void cc_crop_area_set_constrain_aspect (CcCropArea *area,
61 gboolean constrain);
62
63G_END_DECLS
64
65#endif /* _CC_CROP_AREA_H_ */