[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.
This commit is contained in:
Øyvind Kolås 2009-03-12 11:48:44 +00:00
parent 5895048f65
commit 56568db3b0
2 changed files with 11 additions and 7 deletions

View File

@ -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
*

View File

@ -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);