Champlain.Tile

g Atk.ImplementorIface Atk.ImplementorIface Clutter.Actor Clutter.Actor Atk.ImplementorIface->Clutter.Actor Champlain.Exportable Champlain.Exportable Champlain.Tile Champlain.Tile Champlain.Exportable->Champlain.Tile Clutter.Actor->Champlain.Tile Clutter.Animatable Clutter.Animatable Clutter.Animatable->Clutter.Actor Clutter.Container Clutter.Container Clutter.Container->Clutter.Actor Clutter.Scriptable Clutter.Scriptable Clutter.Scriptable->Clutter.Actor GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface GObject.GInterface->Champlain.Exportable GObject.GInterface->Clutter.Animatable GObject.GInterface->Clutter.Container GObject.GInterface->Clutter.Scriptable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Clutter.Actor GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned

Subclasses:

None

Methods

Inherited:

Clutter.Actor (238), GObject.Object (37), Clutter.Animatable (5), Clutter.Container (17), Clutter.Scriptable (4), Champlain.Exportable (2)

Structs:

GObject.ObjectClass (5)

class

new ()

class

new_full (x, y, size, zoom_level)

display_content ()

get_content ()

get_etag ()

get_fade_in ()

get_modified_time ()

get_size ()

get_state ()

get_x ()

get_y ()

get_zoom_level ()

set_content (actor)

set_etag (etag)

set_fade_in (fade_in)

set_modified_time (time)

set_size (size)

set_state (state)

set_x (x)

set_y (y)

set_zoom_level (zoom_level)

Virtual Methods

Inherited:

Clutter.Actor (35), GObject.Object (7), Clutter.Animatable (5), Clutter.Container (13), Clutter.Scriptable (4), Champlain.Exportable (2)

Properties

Inherited:

Clutter.Actor (82), Champlain.Exportable (1)

Name

Type

Flags

Short Description

etag

str

r/w

The entity tag of the tile

fade-in

bool

r/w

Tile should fade in

state

Champlain.State

r/w

The state of the tile

zoom-level

int

r/w

The zoom level of the tile

Signals

Inherited:

Clutter.Actor (26), GObject.Object (1), Clutter.Container (3)

Name

Short Description

render-complete

The Champlain.Tile ::render-complete signal is emitted when rendering of the tile is completed by the renderer.

Fields

Inherited:

Clutter.Actor (26), GObject.Object (1), Clutter.Container (3)

Name

Type

Access

Description

parent

Clutter.Actor

r

Class Details

class Champlain.Tile(**kwargs)
Bases:

Clutter.Actor, Champlain.Exportable

Abstract:

No

Structure:

Champlain.TileClass

The Champlain.Tile structure contains only private data and should be accessed using the provided API

New in version 0.4.

classmethod new()
Returns:

a new Champlain.Tile

Return type:

Champlain.Tile

Creates an instance of Champlain.Tile.

New in version 0.4.

classmethod new_full(x, y, size, zoom_level)
Parameters:
  • x (int) – the x position

  • y (int) – the y position

  • size (int) – the size in pixels

  • zoom_level (int) – the zoom level

Returns:

a Champlain.Tile

Return type:

Champlain.Tile

Creates an instance of Champlain.Tile.

New in version 0.4.

display_content()

Displays the tile’s content.

New in version 0.8.

get_content()
Returns:

the tile’s content, this actor will change each time the tile’s content changes. You should not unref this content, it is owned by the tile.

Return type:

Clutter.Actor

Gets the tile’s content actor.

New in version 0.4.

get_etag()
Returns:

the tile’s ETag

Return type:

str

Gets the tile’s ETag.

New in version 0.4.

get_fade_in()
Returns:

the return value determines whether the tile should fade in when loading.

Return type:

bool

Checks whether the tile should fade in.

New in version 0.6.

get_modified_time()
Returns:

the tile’s last modified time

Return type:

GLib.TimeVal

Gets the tile’s last modified time.

New in version 0.4.

get_size()
Returns:

the tile’s size in pixels

Return type:

int

Gets the tile’s size.

New in version 0.4.

get_state()
Returns:

the tile’s Champlain.State

Return type:

Champlain.State

Gets the current state of tile loading.

New in version 0.4.

get_x()
Returns:

the tile’s x position

Return type:

int

Gets the tile’s x position.

New in version 0.4.

get_y()
Returns:

the tile’s y position

Return type:

int

Gets the tile’s y position.

New in version 0.4.

get_zoom_level()
Returns:

the tile’s zoom level

Return type:

int

Gets the tile’s zoom level.

New in version 0.4.

set_content(actor)
Parameters:

actor (Clutter.Actor) – the new content

Sets the tile’s content. To also disppay the tile, you have to call Champlain.Tile.display_content() in addition.

New in version 0.4.

set_etag(etag)
Parameters:

etag (str) – the tile’s ETag as sent by the server

Sets the tile’s ETag

New in version 0.4.

set_fade_in(fade_in)
Parameters:

fade_in (bool) – determines whether the tile should fade in when loading

Sets the flag determining whether the tile should fade in when loading

New in version 0.6.

set_modified_time(time)
Parameters:

time (GLib.TimeVal) – a GLib.TimeVal, the value will be copied

Sets the tile’s modified time

New in version 0.4.

set_size(size)
Parameters:

size (int) – the size in pixels

Sets the tile’s size

New in version 0.4.

set_state(state)
Parameters:

state (Champlain.State) – a Champlain.State

Sets the tile’s Champlain.State

New in version 0.4.

set_x(x)
Parameters:

x (int) – the position

Sets the tile’s x position

New in version 0.4.

set_y(y)
Parameters:

y (int) – the position

Sets the tile’s y position

New in version 0.4.

set_zoom_level(zoom_level)
Parameters:

zoom_level (int) – the zoom level

Sets the tile’s zoom level

New in version 0.4.

Signal Details

Champlain.Tile.signals.render_complete(tile, data, size, error)
Signal Name:

render-complete

Flags:

RUN_LAST

Parameters:
  • tile (Champlain.Tile) – The object which received the signal

  • data (object or None) – the result of the rendering

  • size (int) – size of data

  • error (bool) – True if there was an error during rendering

The Champlain.Tile ::render-complete signal is emitted when rendering of the tile is completed by the renderer.

New in version 0.10.

Property Details

Champlain.Tile.props.etag
Name:

etag

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The tile’s ETag. This information is sent by some web servers as a mean to identify if a tile has changed. This information is saved in the cache and sent in GET queries.

New in version 0.4.

Champlain.Tile.props.fade_in
Name:

fade-in

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Specifies whether the tile should fade in when loading

New in version 0.6.

Champlain.Tile.props.state
Name:

state

Type:

Champlain.State

Default Value:

Champlain.State.NONE

Flags:

READABLE, WRITABLE

The state of the tile

New in version 0.4.

Champlain.Tile.props.zoom_level
Name:

zoom-level

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The zoom level of the tile

New in version 0.4.