1
0
Fork 0

2008-06-13 Emmanuele Bassi <ebassi@openedhand.com>

* tests/test-cogl-offscreen.c:
	* tests/test-cogl-primitives.c:
	* tests/test-cogl-tex-convert.c:
	* tests/test-cogl-tex-foreign.c:
	* tests/test-cogl-tex-getset.c:
	* tests/test-cogl-tex-tile.c:
	* tests/test-layout.c:
	* tests/test-pixmap.c:
	* tests/test-texture-quality.c: Miscellaneous fixes for distcheck
	to pass.
This commit is contained in:
Emmanuele Bassi 2008-06-13 15:18:08 +00:00
parent 4b97a02410
commit 81861656e8
9 changed files with 31 additions and 50 deletions

View file

@ -198,9 +198,6 @@ main (int argc, char *argv[])
{
ClutterActor *stage;
ClutterActor *coglbox;
ClutterTimeline *timeline;
ClutterBehaviour *behave;
ClutterAlpha *alpha;
clutter_init(&argc, &argv);

View file

@ -194,12 +194,12 @@ test_coglbox_paint(ClutterActor *self)
{
timer = g_timer_new ();
g_timer_start (timer);
paint_index = 0;
}
if (g_timer_elapsed (timer, NULL) >= 1)
{
paint_index = (++paint_index) % NUM_PAINT_FUNCS;
paint_index += 1;
paint_index = paint_index % NUM_PAINT_FUNCS;
g_timer_start (timer);
}

View file

@ -196,25 +196,11 @@ test_coglbox_new (void)
return g_object_new (TEST_TYPE_COGLBOX, NULL);
}
static void
frame_cb (ClutterTimeline *timeline,
gint frame_num,
gpointer data)
{
TestCoglboxPrivate *priv = TEST_COGLBOX_GET_PRIVATE (data);
priv->frame = frame_num;
clutter_actor_queue_redraw (CLUTTER_ACTOR (data));
}
int
main (int argc, char *argv[])
{
ClutterActor *stage;
ClutterActor *coglbox;
ClutterTimeline *timeline;
ClutterBehaviour *behave;
ClutterAlpha *alpha;
clutter_init(&argc, &argv);

View file

@ -192,9 +192,6 @@ main (int argc, char *argv[])
{
ClutterActor *stage;
ClutterActor *coglbox;
ClutterTimeline *timeline;
ClutterBehaviour *behave;
ClutterAlpha *alpha;
clutter_init(&argc, &argv);

View file

@ -250,9 +250,6 @@ main (int argc, char *argv[])
{
ClutterActor *stage;
ClutterActor *coglbox;
ClutterTimeline *timeline;
ClutterBehaviour *behave;
ClutterAlpha *alpha;
clutter_init(&argc, &argv);

View file

@ -198,8 +198,6 @@ main (int argc, char *argv[])
ClutterActor *stage;
ClutterActor *coglbox;
ClutterTimeline *timeline;
ClutterBehaviour *behave;
ClutterAlpha *alpha;
clutter_init(&argc, &argv);

View file

@ -563,11 +563,10 @@ my_thing_new (gint padding,
/* test code */
static ClutterActor *stage = NULL;
static ClutterActor *box = NULL;
static ClutterActor *icon = NULL;
static ClutterTimeline *timeline = NULL;
static ClutterBehaviour *behaviour = NULL;
static ClutterActor *box = NULL;
static ClutterActor *icon = NULL;
static ClutterTimeline *main_timeline = NULL;
static ClutterBehaviour *behaviour = NULL;
static ClutterColor bg_color;
@ -623,7 +622,7 @@ decrease_property_value (ClutterActor *actor,
}
static ClutterActor *
create_item()
create_item (void)
{
ClutterActor *clone =
clutter_clone_texture_new (CLUTTER_TEXTURE (icon));
@ -638,7 +637,7 @@ create_item()
}
static gboolean
keypress_cb (ClutterStage *stage,
keypress_cb (ClutterActor *actor,
ClutterKeyEvent *event,
gpointer data)
{
@ -709,17 +708,19 @@ keypress_cb (ClutterStage *stage,
case CLUTTER_z:
{
if (clutter_timeline_is_playing (timeline))
clutter_timeline_pause (timeline);
if (clutter_timeline_is_playing (main_timeline))
clutter_timeline_pause (main_timeline);
else
clutter_timeline_start (timeline);
clutter_timeline_start (main_timeline);
break;
}
default:
break;
}
break;
}
return FALSE;
}
static void
@ -746,7 +747,7 @@ int
main (int argc,
char *argv[])
{
ClutterActor *instructions;
ClutterActor *stage, *instructions;
gint i;
GError *error = NULL;
@ -757,13 +758,13 @@ main (int argc,
clutter_color_parse ("Red", &bg_color);
timeline = clutter_timeline_new_for_duration (2000);
clutter_timeline_set_loop (timeline, TRUE);
g_signal_connect (timeline, "new-frame",
main_timeline = clutter_timeline_new_for_duration (2000);
clutter_timeline_set_loop (main_timeline, TRUE);
g_signal_connect (main_timeline, "new-frame",
G_CALLBACK (relayout_on_frame),
NULL);
behaviour = clutter_behaviour_scale_new (clutter_alpha_new_full (timeline,
behaviour = clutter_behaviour_scale_new (clutter_alpha_new_full (main_timeline,
CLUTTER_ALPHA_SINE,
NULL, NULL),
1.0, 1.0, 2.0, 2.0);
@ -810,7 +811,7 @@ main (int argc,
clutter_main ();
g_object_unref (timeline);
g_object_unref (main_timeline);
g_object_unref (behaviour);
return EXIT_SUCCESS;

View file

@ -1,6 +1,9 @@
#include <config.h>
#include <stdlib.h>
#include <string.h>
#if HAVE_CLUTTER_GLX
#include <clutter/clutter.h>
@ -12,7 +15,6 @@
#include <X11/Xlib.h>
#include <X11/extensions/Xcomposite.h>
#include <string.h>
#define IMAGE "redhand.png"
@ -35,6 +37,8 @@ stage_press_cb (ClutterActor *actor,
&gc_values);
XDrawLine (dpy, pxm, gc, 0, 0, 100, 100);
return FALSE;
}
@ -144,7 +148,6 @@ main (int argc, char **argv)
# ifdef USE_GDKPIXBUF
ClutterActor *stage, *tex;
Pixmap pixmap;
guint w, h, d;
const ClutterColor gry = { 0x99, 0x99, 0x99, 0xFF };
Window win_remote;
@ -201,8 +204,9 @@ main (int argc, char **argv)
clutter_main ();
# endif /* USE_GDKPIXBUF */
return EXIT_SUCCESS;
}
#else /* HAVE_CLUTTER_GLX */
int main(int argc, char **argv){return 0;};
int main (int argc, char **argv) { return EXIT_SUCCESS; };
#endif /* HAVE_CLUTTER_GLX */

View file

@ -62,10 +62,11 @@ main (int argc, char *argv[])
error = NULL;
image = clutter_texture_new_from_file (argv[1]?argv[1]:"redhand.png", &error);
if (error)
g_error ("Unable to load image.", error->message);
g_error ("Unable to load image: %s", error->message);
if (!argv[1])
g_print ("Hint: the redhand.png isn't a good test image for this, this test can take any clutter loadable image as an argument\n");
g_print ("Hint: the redhand.png isn't a good test image for this test.\n"
"This test can take any clutter loadable image as an argument\n");
/* center the image */
clutter_actor_set_position (image,