[docs] Document the newly added functions

Document the ClutterBackend font name accessors, and the
clutter_actor_get_pango_context() getter method.
This commit is contained in:
Emmanuele Bassi 2008-12-23 16:59:14 +00:00
parent 9389d9755d
commit f777bc629a
3 changed files with 51 additions and 3 deletions

View File

@ -7598,6 +7598,27 @@ clutter_actor_grab_key_focus (ClutterActor *self)
clutter_stage_set_key_focus (CLUTTER_STAGE (parent), self);
}
/**
* clutter_actor_get_pango_context:
* @self: a #ClutterActor
*
* Retrieves the #PangoContext for @self. The actor's #PangoContext
* is already configured using the appropriate font map, resolution
* and font options.
*
* The returned #PangoContext will be updated each time the options
* stored by the default #ClutterBackend change.
*
* You can use the returned #PangoContext to create a #PangoLayout
* and render text using cogl_pango_render_layout() to reuse the
* glyphs cache also used by Clutter.
*
* Return value: the #PangoContext for a #ClutterActor. The returned
* #PangoContext is owned by the actor and should not be unreferenced
* by the application code
*
* Since: 1.0
*/
PangoContext *
clutter_actor_get_pango_context (ClutterActor *self)
{

View File

@ -521,6 +521,18 @@ clutter_backend_get_font_options (ClutterBackend *backend)
return priv->font_options;
}
/**
* clutter_backend_set_font_name:
* @backend: a #ClutterBackend
* @font_name: the name of the font
*
* Sets the default font to be used by Clutter. The @font_name string
* must either be %NULL, which means that the font name from the
* default #ClutterBackend will be used; or be something that can
* be parsed by the pango_font_description_from_string() function.
*
* Since: 1.0
*/
void
clutter_backend_set_font_name (ClutterBackend *backend,
const gchar *font_name)
@ -541,6 +553,18 @@ clutter_backend_set_font_name (ClutterBackend *backend,
g_signal_emit (backend, backend_signals[FONT_CHANGED], 0);
}
/**
* clutter_backend_get_font_name:
* @backend: a #ClutterBackend
*
* Retrieves the default font name as set by
* clutter_backend_set_font_name().
*
* Return value: the font name for the backend. The returned string is
* owned by the #ClutterBackend and should never be modified or freed
*
* Since: 1.0
*/
G_CONST_RETURN gchar *
clutter_backend_get_font_name (ClutterBackend *backend)
{

View File

@ -478,6 +478,7 @@ clutter_actor_get_rotationx
<SUBSECTION>
clutter_actor_grab_key_focus
clutter_actor_get_pango_context
<SUBSECTION Standard>
CLUTTER_TYPE_GEOMETRY
@ -872,14 +873,16 @@ clutter_behaviour_ellipse_get_type
<FILE>clutter-backend</FILE>
<TITLE>ClutterBackend</TITLE>
clutter_get_default_backend
clutter_backend_get_resolution
clutter_backend_set_resolution
clutter_backend_get_double_click_time
clutter_backend_get_resolution
clutter_backend_set_double_click_time
clutter_backend_get_double_click_distance
clutter_backend_get_double_click_time
clutter_backend_set_double_click_distance
clutter_backend_get_double_click_distance
clutter_backend_set_font_options
clutter_backend_get_font_options
clutter_backend_set_font_name
clutter_backend_get_font_name
<SUBSECTION Standard>
CLUTTER_BACKEND
CLUTTER_IS_BACKEND