Next: , Previous: ClutterAlpha, Up: Top


4 ClutterBackend

Backend abstraction

4.1 Overview

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

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

<clutter-backend> is available since Clutter 0.4

4.2 Usage

— Function: clutter-get-default-backend   (ret <clutter-backend>)

FIXME

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

Since 0.4

— Function: clutter-backend-get-resolution (self <clutter-backend>)   (ret double)
— Method: get-resolution

Gets the resolution for font handling on the screen; see clutter-backend-set-resolution for full details.

backend
a <clutter-backend>
ret
the current resolution, or -1 if no resolution has been set.

Since 0.4

— Function: clutter-backend-set-resolution (self <clutter-backend>) (dpi double)
— Method: set-resolution

Sets the resolution for font handling on the screen. This is a scale factor between points specified in a <pango-font-description> 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 <clutter-backend>
dpi
the resolution in "dots per inch" (Physical inches aren't actually involved; the terminology is conventional).

Since 0.4

— Function: clutter-backend-set-font-options (self <clutter-backend>) (options cairo-font-options-t)
— Method: set-font-options

Sets the new font options for backend. If options is ‘#f’, 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 <clutter-backend>
options
Cairo font options for the backend, or ‘#f

Since 0.8

— Function: clutter-backend-get-font-options (self <clutter-backend>)   (ret cairo-font-options-t)
— Method: get-font-options

Retrieves the font options for backend.

backend
a <clutter-backend>
ret
the font options of the <clutter-backend>

Since 0.8