ChamplainTile

## ChamplainTile ChamplainTile — An object that represent map tiles |

## Synopsis

                        ChamplainTile;
    ChamplainTile*      champlain_tile_new                  (void);
    ChamplainTile*      champlain_tile_new_full             (gint x,
                                                             gint y,
                                                             guint size,
                                                             gint zoom_level);
    gint                champlain_tile_get_x                (ChamplainTile *self);
    gint                champlain_tile_get_y                (ChamplainTile *self);
    gint                champlain_tile_get_zoom_level       (ChamplainTile *self);
    guint               champlain_tile_get_size             (ChamplainTile *self);
    ChamplainState      champlain_tile_get_state            (ChamplainTile *self);
    const gchar *       champlain_tile_get_uri              (ChamplainTile *self);
    const gchar *       champlain_tile_get_filename         (ChamplainTile *self);
    ClutterActor *      champlain_tile_get_actor            (ChamplainTile *self);
    void                champlain_tile_set_x                (ChamplainTile *self,
                                                             gint x);
    void                champlain_tile_set_y                (ChamplainTile *self,
                                                             gint y);
    void                champlain_tile_set_zoom_level       (ChamplainTile *self,
                                                             gint zoom_level);
    void                champlain_tile_set_size             (ChamplainTile *self,
                                                             guint size);
    void                champlain_tile_set_state            (ChamplainTile *self,
                                                             ChamplainState state);
    void                champlain_tile_set_uri              (ChamplainTile *self,
                                                             const gchar *uri);
    void                champlain_tile_set_filename         (ChamplainTile *self,
                                                             const gchar *filename);
    ClutterActor *      champlain_tile_get_content          (ChamplainTile *self);
    const gchar *       champlain_tile_get_etag             (ChamplainTile *self);
    const GTimeVal *    champlain_tile_get_modified_time    (ChamplainTile *self);
    gchar *             champlain_tile_get_modified_time_string
                                                            (ChamplainTile *self);
    void                champlain_tile_set_content          (ChamplainTile *self,
                                                             ClutterActor *actor,
                                                             gboolean fade_in);
    void                champlain_tile_set_etag             (ChamplainTile *self,
                                                             const gchar *etag);
    void                champlain_tile_set_modified_time    (ChamplainTile *self,
                                                             const GTimeVal *time);

## Object Hierarchy

      GObject
       +----ChamplainTile

## Properties

      "actor"                    ClutterActor*         : Read
      "content"                  ClutterActor*         : Read / Write
      "etag"                     gchar*                : Read / Write
      "filename"                 gchar*                : Read / Write
      "size"                     guint                 : Read / Write
      "state"                    ChamplainState        : Read / Write
      "uri"                      gchar*                : Read / Write
      "x"                        gint                  : Read / Write
      "y"                        gint                  : Read / Write
      "zoom-level"               gint                  : Read / Write

## Description

This object represents map tiles. Tiles are loaded by ChamplainMapSource.

## Details

### ChamplainTile

    typedef struct _ChamplainTile ChamplainTile;

### champlain_tile_new ()

    ChamplainTile*      champlain_tile_new                  (void);

Returns : | a new ChamplainTile

Since 0.4

### champlain_tile_new_full ()

    ChamplainTile*      champlain_tile_new_full             (gint x,
                                                             gint y,
                                                             guint size,
                                                             gint zoom_level);

`x` : | the x position
`y` : | the y position
`size` : | the size in pixels
`zoom_level` : | the zoom level
Returns : | a ChamplainTile

Since 0.4

### champlain_tile_get_x ()

    gint                champlain_tile_get_x                (ChamplainTile *self);

`self` : | the ChamplainTile
Returns : | the tile's x position

Since 0.4

### champlain_tile_get_y ()

    gint                champlain_tile_get_y                (ChamplainTile *self);

`self` : | the ChamplainTile
Returns : | the tile's y position

Since 0.4

### champlain_tile_get_zoom_level ()

    gint                champlain_tile_get_zoom_level       (ChamplainTile *self);

`self` : | the ChamplainTile
Returns : | the tile's zoom level

Since 0.4

### champlain_tile_get_size ()

    guint               champlain_tile_get_size             (ChamplainTile *self);

`self` : | the ChamplainTile
Returns : | the tile's size in pixels

Since 0.4

### champlain_tile_get_state ()

    ChamplainState      champlain_tile_get_state            (ChamplainTile *self);

`self` : | the ChamplainTile
Returns : | the tile's ChamplainState

Since 0.4

### champlain_tile_get_uri ()

    const gchar *       champlain_tile_get_uri              (ChamplainTile *self);

`self` : | the ChamplainTile
Returns : | the tile's remote uri

Since 0.4

### champlain_tile_get_filename ()

    const gchar *       champlain_tile_get_filename         (ChamplainTile *self);

`self` : | the ChamplainTile
Returns : | the tile's local filename

Since 0.4

### champlain_tile_get_actor ()

    ClutterActor *      champlain_tile_get_actor            (ChamplainTile *self);

`self` : | the ChamplainTile
Returns : | the tile's actor. This actor should not change during the tile's lifetime. You should not unref this actor, it is owned by the tile.

Since 0.4

### champlain_tile_set_x ()

    void                champlain_tile_set_x                (ChamplainTile *self,
                                                             gint x);

Sets the tile's x position

`self` : | the ChamplainTile
`x` : | the position

Since 0.4

### champlain_tile_set_y ()

    void                champlain_tile_set_y                (ChamplainTile *self,
                                                             gint y);

Sets the tile's y position

`self` : | the ChamplainTile
`y` : | the position

Since 0.4

### champlain_tile_set_zoom_level ()

    void                champlain_tile_set_zoom_level       (ChamplainTile *self,
                                                             gint zoom_level);

Sets the tile's zoom level

`self` : | the ChamplainTile
`zoom_level` : | the zoom level

Since 0.4

### champlain_tile_set_size ()

    void                champlain_tile_set_size             (ChamplainTile *self,
                                                             guint size);

Sets the tile's size

`self` : | the ChamplainTile
`size` : | the size in pixels

Since 0.4

### champlain_tile_set_state ()

    void                champlain_tile_set_state            (ChamplainTile *self,
                                                             ChamplainState state);

Sets the tile's ChamplainState

`self` : | the ChamplainTile
`state` : | a ChamplainState

Since 0.4

### champlain_tile_set_uri ()

    void                champlain_tile_set_uri              (ChamplainTile *self,
                                                             const gchar *uri);

Sets the tile's uri

`self` : | the ChamplainTile
`uri` : | the uri

Since 0.4

### champlain_tile_set_filename ()

    void                champlain_tile_set_filename         (ChamplainTile *self,
                                                             const gchar *filename);

Sets the tile's filename

`self` : | the ChamplainTile
`filename` : | a local path to an image

Since 0.4

### champlain_tile_get_content ()

    ClutterActor *      champlain_tile_get_content          (ChamplainTile *self);

`self` : |
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.

Since 0.4

### champlain_tile_get_etag ()

    const gchar *       champlain_tile_get_etag             (ChamplainTile *self);

`self` : | the ChamplainTile
Returns : | the tile's ETag

Since 0.4

### champlain_tile_get_modified_time ()

    const GTimeVal *    champlain_tile_get_modified_time    (ChamplainTile *self);

`self` : | the ChamplainTile
Returns : | the tile's last modified time

Since 0.4

### champlain_tile_get_modified_time_string ()

    gchar *             champlain_tile_get_modified_time_string
                                                            (ChamplainTile *self);

`self` : | the ChamplainTile
Returns : | the tile's modified time as a string (formated as per RFC 1123)

Since 0.4

### champlain_tile_set_content ()

    void                champlain_tile_set_content          (ChamplainTile *self,
                                                             ClutterActor *actor,
                                                             gboolean fade_in);

Sets the tile's content

`self` : | the ChamplainTile
`actor` : | the new content
`fade_in` : | if the new content should be faded in

Since 0.4

### champlain_tile_set_etag ()

    void                champlain_tile_set_etag             (ChamplainTile *self,
                                                             const gchar *etag);

Sets the tile's ETag

`self` : | the ChamplainTile
`etag` : | the tile's ETag as sent by the server

Since 0.4

### champlain_tile_set_modified_time ()

    void                champlain_tile_set_modified_time    (ChamplainTile *self,
                                                             const GTimeVal *time);

Sets the tile's modified time

`self` : | the ChamplainTile
`time` : | a GTimeVal, the value will be copied

Since 0.4

## Property Details

### The `"actor"` property

      "actor"                    ClutterActor*         : Read

The ClutterActor where the tile content is rendered. Should never change during the tile's life.

Since 0.4

### The `"content"` property

      "content"                  ClutterActor*         : Read / Write

The ClutterActor with the specific image content. When changing this property, the new actor will be faded in.

Since 0.4

### The `"etag"` property

      "etag"                     gchar*                : Read / Write

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.

Default value: NULL

Since 0.4

### The `"filename"` property

      "filename"                 gchar*                : Read / Write

The local path of the cached tile

Default value: ""

Since 0.4

### The `"size"` property

      "size"                     guint                 : Read / Write

The size of the tile in pixels

Allowed values: <= G_MAXINT

Default value: 256

Since 0.4

### The `"state"` property

      "state"                    ChamplainState        : Read / Write

The state of the tile

Default value: CHAMPLAIN_STATE_NONE

Since 0.4

### The `"uri"` property

      "uri"                      gchar*                : Read / Write

The remote uri of the tile

Default value: ""

Since 0.4

### The `"x"` property

      "x"                        gint                  : Read / Write

The x position of the tile

Default value: 0

Since 0.4

### The `"y"` property

      "y"                        gint                  : Read / Write

The y position of the tile

Default value: 0

Since 0.4

### The `"zoom-level"` property

      "zoom-level"               gint                  : Read / Write

The zoom level of the tile

Default value: 0

Since 0.4