gir-repository r171 - in trunk: . gir
- From: tko svn gnome org
- To: svn-commits-list gnome org
- Subject: gir-repository r171 - in trunk: . gir
- Date: Mon, 27 Oct 2008 11:29:23 +0000 (UTC)
Author: tko
Date: Mon Oct 27 11:29:23 2008
New Revision: 171
URL: http://svn.gnome.org/viewvc/gir-repository?rev=171&view=rev
Log:
Build clutter customizations depending on GdkPixbuf conditionally
* configure.ac:
* gir/Clutter-custom.c
* gir/Clutter-custom.h (clutter_texture_set_from_pixbuf): Build
clutter customizations depending on GdkPixbuf conditionally only
if depending on clutter makes it available. Clutter doesn't
necessarily use GdkPixbuf (osx,win32) or export it as public API
(Requires.private)
Modified:
trunk/configure.ac
trunk/gir/Clutter-custom.c
trunk/gir/Clutter-custom.h
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Mon Oct 27 11:29:23 2008
@@ -118,6 +118,16 @@
CLUTTER_BACKEND=
if $have_clutter; then
CLUTTER_BACKEND="$($PKG_CONFIG --variable=backend clutter-0.8)"
+ # check if depending on clutter also brings usable gdk-pixbuf, clutter
+ # doesn't necessarily use (win32,osx) or export (Requires.private) it
+ save_CFLAGS="$CFLAGS"; CFLAGS="$CLUTTER_CFLAGS"
+ save_LDFLAGS="$LDFLAGS"; LDFLAGS="$CLUTTER_LIBS"
+ AC_TRY_LINK([#include <gdk-pixbuf/gdk-pixbuf.h>],
+ [GType gtype = GDK_TYPE_PIXBUF;],
+ AC_DEFINE(HAVE_CLUTTER_GDKPIXBUF, 1,
+ [Clutter is exporting gdk-pixbuf]))
+ CFLAGS="$save_CFLAGS"
+ LDFLAGS="$save_LDFLAGS"
fi
AC_SUBST(CLUTTER_BACKEND)
Modified: trunk/gir/Clutter-custom.c
==============================================================================
--- trunk/gir/Clutter-custom.c (original)
+++ trunk/gir/Clutter-custom.c Mon Oct 27 11:29:23 2008
@@ -52,6 +52,7 @@
color->alpha = GPOINTER_TO_INT(components->data);
}
+#ifdef HAVE_CLUTTER_GDKPIXBUF
/**
* clutter_texture_set_from_pixbuf:
* @texture: A #ClutterTexture
@@ -71,6 +72,7 @@
? 4 : 3,
0, NULL);
}
+#endif
ClutterGeometry *
clutter_geometry_new(void)
Modified: trunk/gir/Clutter-custom.h
==============================================================================
--- trunk/gir/Clutter-custom.h (original)
+++ trunk/gir/Clutter-custom.h Mon Oct 27 11:29:23 2008
@@ -6,7 +6,9 @@
#include <glib.h>
#include <clutter/clutter.h>
+#ifdef HAVE_CLUTTER_GDKPIXBUF
#include <gdk-pixbuf/gdk-pixbuf.h>
+#endif
G_BEGIN_DECLS
@@ -16,8 +18,10 @@
GList *components);
GList * clutter_color_get_components (ClutterColor *color);
+#ifdef HAVE_CLUTTER_GDKPIXBUF
gboolean clutter_texture_set_from_pixbuf (ClutterTexture *texture,
GdkPixbuf *pixbuf);
+#endif
ClutterGeometry *clutter_geometry_new (void);
gint clutter_geometry_get_x (ClutterGeometry *geometry);
gint clutter_geometry_get_y (ClutterGeometry *geometry);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]