diff options
Diffstat (limited to 'pig/pig-pixbuf-picture.h')
-rw-r--r-- | pig/pig-pixbuf-picture.h | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/pig/pig-pixbuf-picture.h b/pig/pig-pixbuf-picture.h new file mode 100644 index 0000000..7d45937 --- /dev/null +++ b/pig/pig-pixbuf-picture.h @@ -0,0 +1,76 @@ +/* Pig + * Copyright (C) 2011 Benjamin Otte <otte@gnome.org> + * + * 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 2 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, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#if !defined (__PIG_PIXBUF_H_INSIDE__) && !defined (PIG_PIXBUF_COMPILATION) +#error "Only <pig/pig-pixbuf.h> can be included directly." +#endif + +#ifndef __PIG_PIXBUF_PICTURE_H__ +#define __PIG_PIXBUF_PICTURE_H__ + +#include <pig/pig.h> + +#include <gdk-pixbuf/gdk-pixbuf.h> + + +G_BEGIN_DECLS + +#define PIG_TYPE_PIXBUF_PICTURE (pig_pixbuf_picture_get_type ()) +#define PIG_PIXBUF_PICTURE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PIG_TYPE_PIXBUF_PICTURE, PigPixbufPicture)) +#define PIG_PIXBUF_PICTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIG_TYPE_PIXBUF_PICTURE, PigPixbufPictureClass)) +#define PIG_IS_PIXBUF_PICTURE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PIG_TYPE_PIXBUF_PICTURE)) +#define PIG_IS_PIXBUF_PICTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIG_TYPE_PIXBUF_PICTURE)) +#define PIG_PIXBUF_PICTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIG_TYPE_PIXBUF_PICTURE, PigPixbufPictureClass)) + +typedef struct _PigPixbufPicture PigPixbufPicture; +typedef struct _PigPixbufPicturePrivate PigPixbufPicturePrivate; +typedef struct _PigPixbufPictureClass PigPixbufPictureClass; + +struct _PigPixbufPicture { + /*< private >*/ + PigPicture parent_picture; + + PigPixbufPicturePrivate *priv; +}; + +struct _PigPixbufPictureClass { + /*< private >*/ + PigPictureClass parent_class; +}; + +GType pig_pixbuf_picture_get_type (void); + +PigPicture * pig_pixbuf_picture_new (GdkPixbuf *pixbuf); + +void pig_pixbuf_picture_set_pixbuf (PigPixbufPicture *picture, + GdkPixbuf * pixbuf); +GdkPixbuf * pig_pixbuf_picture_get_pixbuf (PigPixbufPicture *picture); +void pig_pixbuf_picture_set_keep_pixbuf (PigPixbufPicture *picture, + gboolean keep_pixbuf); +gboolean pig_pixbuf_picture_get_keep_pixbuf (PigPixbufPicture *picture); +void pig_pixbuf_picture_set_keep_surface (PigPixbufPicture *picture, + gboolean keep_surface); +gboolean pig_pixbuf_picture_get_keep_surface (PigPixbufPicture *picture); + + +cairo_surface_t * pig_pixbuf_create_surface (const GdkPixbuf * pixbuf); + +G_END_DECLS + +#endif /* __PIG_PIXBUF_PICTURE_H__ */ |