From 56568db3b0b9eebf7f000407e1334a5b4d85e889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Thu, 12 Mar 2009 11:48:44 +0000 Subject: [PATCH] [clutter-texture] fixed gtk-doc formatting, and init threads in test. Fixed markup to actually work with gtk-doc, also do a g_thread_init in the test. --- clutter/clutter-texture.c | 14 ++++++++------ tests/interactive/test-texture-async.c | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/clutter/clutter-texture.c b/clutter/clutter-texture.c index 95a190543..7e57dba09 100644 --- a/clutter/clutter-texture.c +++ b/clutter/clutter-texture.c @@ -1047,9 +1047,9 @@ clutter_texture_class_init (ClutterTextureClass *klass) * * Tries to load a texture from a filename by using a local thread to perform * the read operations. The initially created texture has dimensions 0x0 when - * the true size becomes available the ClutterTexture::size-change signal is + * the true size becomes available the #ClutterTexture::size-change signal is * emitted and when the image has completed loading the - * ClutterTexture::load-finished signal is emitted. + * #ClutterTexture::load-finished signal is emitted. * * Threading is only enabled if g_thread_init() has been called prior to * clutter_init(), otherwise #ClutterTexture will use the main loop to load @@ -1074,7 +1074,7 @@ clutter_texture_class_init (ClutterTextureClass *klass) /** * ClutterTexture:load-data-async: * - * Like ClutterTexture:load-async but loads the width and height + * Like #ClutterTexture:load-async but loads the width and height * synchronously causing some blocking. * * Since: 1.0 @@ -1089,6 +1089,7 @@ clutter_texture_class_init (ClutterTextureClass *klass) CLUTTER_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); + /** * ClutterTexture::size-change: * @texture: the texture which received the signal @@ -1884,9 +1885,10 @@ clutter_texture_async_load (ClutterTexture *self, * * If #ClutterTexture:load-async is set to %TRUE, this function * will return as soon as possible, and the actual image loading - * from disk will be performed asynchronously. #ClutterTexture::load-finished - * will be emitted when the image has been loaded or if an error - * occurred. + * from disk will be performed asynchronously. #ClutterTexture::size-change + * will be emitten when the size of the texture is available and + * #ClutterTexture::load-finished will be emitted when the image has been + * loaded or if an error occurred. * * Return value: %TRUE if the image was successfully loaded and set * diff --git a/tests/interactive/test-texture-async.c b/tests/interactive/test-texture-async.c index cd2b07e1a..5c1b8064d 100644 --- a/tests/interactive/test-texture-async.c +++ b/tests/interactive/test-texture-async.c @@ -54,7 +54,8 @@ static gboolean task (gpointer foo) { clutter_actor_set_position (image[i], 50+i*100, 0+i*50); clone[i]=clutter_clone_new (image[i]); - g_signal_connect (image[i], "size-change", size_change_cb, clone[i]); + g_signal_connect (image[i], "size-change", + G_CALLBACK (size_change_cb), clone[i]); clutter_container_add (CLUTTER_CONTAINER (stage), clone[i], NULL); clutter_actor_set_position (clone[i], 50+i*100, 150+i*50+100); } @@ -80,6 +81,7 @@ test_texture_async_main (int argc, char *argv[]) clutter_init (&argc, &argv); + g_thread_init (NULL); stage = clutter_stage_get_default (); clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);