Clutter.Backend

g Clutter.Backend Clutter.Backend GObject.Object GObject.Object GObject.Object->Clutter.Backend

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_double_click_distance ()

get_double_click_time ()

get_font_name ()

get_font_options ()

get_resolution ()

set_double_click_distance (distance)

set_double_click_time (msec)

set_font_name (font_name)

set_font_options (options)

set_resolution (dpi)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Name

Short Description

font-changed

The ::font-changed signal is emitted each time the font options have been changed through Clutter.Settings.

resolution-changed

The ::resolution-changed signal is emitted each time the font resolutions has been changed through Clutter.Settings.

settings-changed

The ::settings-changed signal is emitted each time the Clutter.Settings properties have been changed.

Fields

Inherited:

GObject.Object (1)

Class Details

class Clutter.Backend(**kwargs)
Bases:

GObject.Object

Abstract:

Yes

Structure:

Clutter.BackendClass

Clutter.Backend is an opaque structure whose members cannot be directly accessed.

New in version 0.4.

get_double_click_distance()
Returns:

a distance, in pixels.

Return type:

int

Retrieves the distance used to verify a double click event

New in version 0.4.

Deprecated since version 1.4: Use Clutter.Settings :double-click-distance instead

get_double_click_time()
Returns:

a time in milliseconds

Return type:

int

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

New in version 0.4.

Deprecated since version 1.4: Use Clutter.Settings :double-click-time instead

get_font_name()
Returns:

the font name for the backend. The returned string is owned by the Clutter.Backend and should never be modified or freed

Return type:

str

Retrieves the default font name as set by Clutter.Backend.set_font_name().

New in version 1.0.

Deprecated since version 1.4: Use Clutter.Settings :font-name instead

get_font_options()
Returns:

the font options of the Clutter.Backend. The returned cairo.FontOptions is owned by the backend and should not be modified or freed

Return type:

cairo.FontOptions

Retrieves the font options for self.

New in version 0.8.

get_resolution()
Returns:

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

Return type:

float

Gets the resolution for font handling on the screen.

The resolution is a scale factor between points specified in a Pango.FontDescription and cairo units. The default value is 96.0, meaning that a 10 point font will be 13 units high (10 * 96. / 72. = 13.3).

Clutter will set the resolution using the current backend when initializing; the resolution is also stored in the Clutter.Settings :font-dpi property.

New in version 0.4.

set_double_click_distance(distance)
Parameters:

distance (int) – a distance, in pixels

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

New in version 0.4.

Deprecated since version 1.4: Use Clutter.Settings :double-click-distance instead

set_double_click_time(msec)
Parameters:

msec (int) – milliseconds between two button press events

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

New in version 0.4.

Deprecated since version 1.4: Use Clutter.Settings :double-click-time instead

set_font_name(font_name)
Parameters:

font_name (str) – the name of the font

Sets the default font to be used by Clutter. The font_name string must either be None, which means that the font name from the default Clutter.Backend will be used; or be something that can be parsed by the Pango.FontDescription.from_string() function.

New in version 1.0.

Deprecated since version 1.4: Use Clutter.Settings :font-name instead

set_font_options(options)
Parameters:

options (cairo.FontOptions) – Cairo font options for the backend, or None

Sets the new font options for self. The Clutter.Backend will copy the cairo.FontOptions.

If options is None, the first following call to Clutter.Backend.get_font_options() will return the default font options for self.

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

New in version 0.8.

set_resolution(dpi)
Parameters:

dpi (float) – the resolution in “dots per inch” (Physical inches aren’t actually involved; the terminology is conventional).

Sets the resolution for font handling on the screen. This is a scale factor between points specified in a Pango.FontDescription 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.

New in version 0.4.

Deprecated since version 1.4: Use Clutter.Settings :font-dpi instead

Signal Details

Clutter.Backend.signals.font_changed(backend)
Signal Name:

font-changed

Flags:

RUN_FIRST

Parameters:

backend (Clutter.Backend) – The object which received the signal

The ::font-changed signal is emitted each time the font options have been changed through Clutter.Settings.

New in version 1.0.

Clutter.Backend.signals.resolution_changed(backend)
Signal Name:

resolution-changed

Flags:

RUN_FIRST

Parameters:

backend (Clutter.Backend) – The object which received the signal

The ::resolution-changed signal is emitted each time the font resolutions has been changed through Clutter.Settings.

New in version 1.0.

Clutter.Backend.signals.settings_changed(backend)
Signal Name:

settings-changed

Flags:

RUN_FIRST

Parameters:

backend (Clutter.Backend) – The object which received the signal

The ::settings-changed signal is emitted each time the Clutter.Settings properties have been changed.

New in version 1.4.