ClutterBackend

ClutterBackend — Backend abstraction

Synopsis

ClutterBackend*     clutter_get_default_backend         (void);
gdouble             clutter_backend_get_resolution      (ClutterBackend *backend);
void                clutter_backend_set_resolution      (ClutterBackend *backend,
                                                         gdouble dpi);
guint               clutter_backend_get_double_click_time
                                                        (ClutterBackend *backend);
void                clutter_backend_set_double_click_time
                                                        (ClutterBackend *backend,
                                                         guint msec);
guint               clutter_backend_get_double_click_distance
                                                        (ClutterBackend *backend);
void                clutter_backend_set_double_click_distance
                                                        (ClutterBackend *backend,
                                                         guint distance);
void                clutter_backend_set_font_options    (ClutterBackend *backend,
                                                         cairo_font_options_t *options);
cairo_font_options_t* clutter_backend_get_font_options  (ClutterBackend *backend);

Description

Clutter can be compiled against different backends. Each backend has to implement a set of functions, in order to be used by Clutter.

ClutterBackend is the base class abstracting the various implementation; it provides a basic API to query the backend for generic information and settings.

ClutterBackend is available since Clutter 0.4

Details

clutter_get_default_backend ()

ClutterBackend*     clutter_get_default_backend         (void);

FIXME

Returns :

the default backend. You should not ref or unref the returned object. Applications should not rarely need to use this.

Since 0.4


clutter_backend_get_resolution ()

gdouble             clutter_backend_get_resolution      (ClutterBackend *backend);

Gets the resolution for font handling on the screen; see clutter_backend_set_resolution() for full details.

backend :

a ClutterBackend

Returns :

the current resolution, or -1 if no resolution has been set.

Since 0.4


clutter_backend_set_resolution ()

void                clutter_backend_set_resolution      (ClutterBackend *backend,
                                                         gdouble dpi);

Sets the resolution for font handling on the screen. This is a scale factor between points specified in a PangoFontDescription and cairo units. The default value is 96, meaning that a 10 point font will be 13 units high. (10 * 96. / 72. = 13.3).

Applications should never need to call this function.

backend :

a ClutterBackend

dpi :

the resolution in "dots per inch" (Physical inches aren't actually involved; the terminology is conventional).

Since 0.4


clutter_backend_get_double_click_time ()

guint               clutter_backend_get_double_click_time
                                                        (ClutterBackend *backend);

Gets the maximum time between two button press events, as set by clutter_backend_set_double_click_time().

backend :

a ClutterBackend

Returns :

a time in milliseconds

Since 0.4


clutter_backend_set_double_click_time ()

void                clutter_backend_set_double_click_time
                                                        (ClutterBackend *backend,
                                                         guint msec);

Sets the maximum time between two button press events, used to verify whether it's a double click event or not.

backend :

a ClutterBackend

msec :

milliseconds between two button press events

Since 0.4


clutter_backend_get_double_click_distance ()

guint               clutter_backend_get_double_click_distance
                                                        (ClutterBackend *backend);

Retrieves the distance used to verify a double click event

backend :

a ClutterBackend

Returns :

a distance, in pixels.

Since 0.4


clutter_backend_set_double_click_distance ()

void                clutter_backend_set_double_click_distance
                                                        (ClutterBackend *backend,
                                                         guint distance);

Sets the maximum distance used to verify a double click event.

backend :

a ClutterBackend

distance :

a distance, in pixels

Since 0.4


clutter_backend_set_font_options ()

void                clutter_backend_set_font_options    (ClutterBackend *backend,
                                                         cairo_font_options_t *options);

Sets the new font options for backend. If options is NULL, the first following call to clutter_backend_get_font_options() will return the default font options for backend.

This function is intended for actors creating a Pango layout using the PangoCairo API.

backend :

a ClutterBackend

options :

Cairo font options for the backend, or NULL

Since 0.8


clutter_backend_get_font_options ()

cairo_font_options_t* clutter_backend_get_font_options  (ClutterBackend *backend);

Retrieves the font options for backend.

backend :

a ClutterBackend

Returns :

the font options of the ClutterBackend

Since 0.8