diff --git a/doc/cookbook/examples/Makefile.am b/doc/cookbook/examples/Makefile.am index 4f0af585b..675224080 100644 --- a/doc/cookbook/examples/Makefile.am +++ b/doc/cookbook/examples/Makefile.am @@ -56,15 +56,13 @@ LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_API_VERSION@.la -lm AM_CFLAGS = $(CLUTTER_CFLAGS) AM_CPPFLAGS = \ - -DG_DISABLE_SINGLE_INCLUDES \ - -DCOGL_DISABLE_DEPRECATED \ - -DCOGL_DISABLE_DEPRECATION_WARNINGS \ - -DCLUTTER_DISABLE_DEPRECATION_WARNINGS \ - -DTESTS_DATA_DIR=\""$(top_srcdir)/tests/data/"\" \ -I$(top_srcdir)/ \ -I$(top_builddir)/ \ -I$(top_srcdir)/clutter \ -I$(top_builddir)/clutter \ + -DG_DISABLE_SINGLE_INCLUDES \ + -DCOGL_DISABLE_DEPRECATION_WARNINGS \ + -DCLUTTER_DISABLE_DEPRECATION_WARNINGS \ $(NULL) AM_LDFLAGS = $(CLUTTER_LIBS) -export-dynamic @@ -128,7 +126,12 @@ ui_data = \ $(srcdir)/script-ui.json \ $(NULL) +img_data = \ + $(srcdir)/redhand.png \ + $(srcdir)/smiley.png \ + $(NULL) + examplesdir = $(datadir)/clutter-1.0/cookbook/examples -examples_DATA = $(uidata) $(srcdir)/*.c $(srcdir)/*.h +examples_DATA = $(uidata) $(img_data) $(srcdir)/*.c $(srcdir)/*.h -include $(top_srcdir)/build/autotools/Makefile.am.gitignore diff --git a/doc/cookbook/examples/animations-rotating.c b/doc/cookbook/examples/animations-rotating.c index 411d5b849..4c2d39f43 100644 --- a/doc/cookbook/examples/animations-rotating.c +++ b/doc/cookbook/examples/animations-rotating.c @@ -52,7 +52,7 @@ main (int argc, char *argv[]) clutter_align_constraint_new (stage, CLUTTER_ALIGN_Y_AXIS, 0.5)); clutter_texture_set_sync_size (CLUTTER_TEXTURE (texture), TRUE); clutter_texture_set_from_file (CLUTTER_TEXTURE (texture), - TESTS_DATA_DIR "/redhand.png", + "redhand.png", &error); if (error != NULL) diff --git a/doc/cookbook/examples/events-mouse-scroll.c b/doc/cookbook/examples/events-mouse-scroll.c index e491c14de..1b2c8386b 100644 --- a/doc/cookbook/examples/events-mouse-scroll.c +++ b/doc/cookbook/examples/events-mouse-scroll.c @@ -68,7 +68,7 @@ main (int argc, char *argv[]) ClutterActor *viewport; ClutterActor *texture; - gchar *image_file_path = TESTS_DATA_DIR "/redhand.png"; + const gchar *image_file_path = "redhand.png"; if (argc > 1) { diff --git a/doc/cookbook/examples/events-pointer-motion-scribbler.c b/doc/cookbook/examples/events-pointer-motion-scribbler.c index 4d5168dc9..de065332e 100644 --- a/doc/cookbook/examples/events-pointer-motion-scribbler.c +++ b/doc/cookbook/examples/events-pointer-motion-scribbler.c @@ -2,6 +2,7 @@ * Simple scribble application: move mouse over the dark yellow * rectangle to draw brighter yellow lines */ + #include static const ClutterColor stage_color = { 0x33, 0x33, 0x55, 0xff }; diff --git a/doc/cookbook/examples/layouts-bind-constraint-overlay.c b/doc/cookbook/examples/layouts-bind-constraint-overlay.c index 77c209f7f..856955c70 100644 --- a/doc/cookbook/examples/layouts-bind-constraint-overlay.c +++ b/doc/cookbook/examples/layouts-bind-constraint-overlay.c @@ -73,7 +73,7 @@ main (int argc, char *argv[]) ClutterAction *click; GError *error = NULL; - gchar *filename = TESTS_DATA_DIR "/redhand.png"; + const gchar *filename = "redhand.png"; if (argc > 1) filename = argv[1]; diff --git a/doc/cookbook/examples/layouts-stacking.c b/doc/cookbook/examples/layouts-stacking.c index 9ee340b4c..d1d6321a5 100644 --- a/doc/cookbook/examples/layouts-stacking.c +++ b/doc/cookbook/examples/layouts-stacking.c @@ -20,7 +20,7 @@ main (int argc, char *argv[]) GError *error = NULL; gfloat width; - gchar *filename = TESTS_DATA_DIR "/redhand.png"; + const gchar *filename = "redhand.png"; if (argc > 1) filename = argv[1]; diff --git a/doc/cookbook/examples/redhand.png b/doc/cookbook/examples/redhand.png new file mode 100644 index 000000000..c07d8acd3 Binary files /dev/null and b/doc/cookbook/examples/redhand.png differ diff --git a/doc/cookbook/examples/textures-reflection.c b/doc/cookbook/examples/textures-reflection.c index 170e701c2..03c970d66 100644 --- a/doc/cookbook/examples/textures-reflection.c +++ b/doc/cookbook/examples/textures-reflection.c @@ -86,7 +86,7 @@ main (int argc, char *argv[]) texture = clutter_texture_new (); clutter_texture_set_from_file (CLUTTER_TEXTURE (texture), - TESTS_DATA_DIR "/redhand.png", + "redhand.png", &error); clutter_actor_add_constraint (texture, clutter_align_constraint_new (stage, CLUTTER_ALIGN_X_AXIS, 0.5)); clutter_actor_add_constraint (texture, clutter_align_constraint_new (stage, CLUTTER_ALIGN_Y_AXIS, 0.2));