diff options
author | Benjamin Otte <otte@redhat.com> | 2011-10-16 12:01:16 -0700 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-10-16 22:31:54 -0700 |
commit | 0871f62b1fc0276e6f40a3273f08e82fbc23b85a (patch) | |
tree | 354c6e7f1830a9eae4838ab8290de50d9008200d | |
parent | 166ef16dd188758f9622ce772a68c78737768bbb (diff) |
image: Use cairo-gobject for types from cairo objects
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | libgame/game-image.c | 19 | ||||
-rw-r--r-- | libgame/game-image.h | 2 |
3 files changed, 6 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac index 0cf85db..2dd81c7 100644 --- a/configure.ac +++ b/configure.ac @@ -42,6 +42,7 @@ dnl feel free to test with lower requirements, these are the ones that dnl are known to work PKG_CHECK_MODULES(LIBGAME, \ cairo \ + cairo-gobject \ gnet-2.0 >= 2.0.7 \ gtk+-3.0 >= 3.0.0 \ libxml-2.0 >= 2.5.9 \ diff --git a/libgame/game-image.c b/libgame/game-image.c index d6d7c0b..ce3968e 100644 --- a/libgame/game-image.c +++ b/libgame/game-image.c @@ -20,22 +20,13 @@ #include "game-private.h" #include "game-image.h" + +#include <cairo-gobject.h> +#include <gdk/gdk.h> + #include "game-marshal.h" #include "game-portable.h" -#include <gdk/gdk.h> -GType -game_cairo_surface_get_type (void) -{ - static GType type = 0; - - if (type == 0) - type = g_boxed_type_register_static ("GameCairoSurface", - (GBoxedCopyFunc) cairo_surface_reference, - (GBoxedFreeFunc) cairo_surface_destroy); - - return type; -} enum { PROP_0, @@ -148,7 +139,7 @@ game_image_class_init (gpointer g_class, gpointer class_data) g_object_class_install_property (object_class, PROP_IMAGE, g_param_spec_boxed ("surface", _("surface"), _("cairo image surface to display"), - GAME_TYPE_CAIRO_SURFACE, G_PARAM_READWRITE)); + CAIRO_GOBJECT_TYPE_SURFACE, G_PARAM_READWRITE)); gameobject_class->copy = game_image_copy; diff --git a/libgame/game-image.h b/libgame/game-image.h index 0c1793e..c1f8d1a 100644 --- a/libgame/game-image.h +++ b/libgame/game-image.h @@ -26,8 +26,6 @@ G_BEGIN_DECLS -#define GAME_TYPE_CAIRO_SURFACE (game_cairo_surface_get_type ()) - #define GAME_TYPE_IMAGE (game_image_get_type ()) #define GAME_IMAGE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GAME_TYPE_IMAGE, GameImage)) #define GAME_IMAGE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GAME_TYPE_IMAGE, GameImageClass)) |