/*
- * Copyright (C) 2008 Pierre-Luc Beaudoin <pierre-luc@pierlux.com>
+ * Copyright (C) 2008, 2009 Pierre-Luc Beaudoin <pierre-luc@pierlux.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
PROP_ACTOR
};
-typedef struct _ChamplainZoomLevelPrivate ChamplainZoomLevelPrivate;
-
struct _ChamplainZoomLevelPrivate {
guint width;
guint height;
{
//FIXME: Get rid of tiles here?
guint k;
- ChamplainZoomLevelPrivate *priv = GET_PRIVATE (object);
ChamplainZoomLevel *level = CHAMPLAIN_ZOOM_LEVEL (object);
+ ChamplainZoomLevelPrivate *priv = level->priv;
g_object_unref (priv->actor);
priv->tiles = g_ptr_array_sized_new (64);
priv->actor = g_object_ref (clutter_group_new ());
+ self->priv = priv;
}
ChamplainZoomLevel*
{
g_return_if_fail (CHAMPLAIN_ZOOM_LEVEL (self));
- ChamplainZoomLevelPrivate *priv = GET_PRIVATE (self);
+ ChamplainZoomLevelPrivate *priv = self->priv;
g_object_ref (tile);
g_ptr_array_add (priv->tiles, tile);
{
g_return_if_fail (CHAMPLAIN_ZOOM_LEVEL (self));
- ChamplainZoomLevelPrivate *priv = GET_PRIVATE (self);
+ ChamplainZoomLevelPrivate *priv = self->priv;
g_signal_emit (self, signals[SIGNAL_TILE_REMOVED], 0, tile);
g_ptr_array_remove_fast (priv->tiles, tile);
{
g_return_val_if_fail (CHAMPLAIN_ZOOM_LEVEL (self), 0);
- ChamplainZoomLevelPrivate *priv = GET_PRIVATE (self);
+ ChamplainZoomLevelPrivate *priv = self->priv;
return priv->tiles->len;
}
{
g_return_val_if_fail (CHAMPLAIN_ZOOM_LEVEL (self), NULL);
- ChamplainZoomLevelPrivate *priv = GET_PRIVATE (self);
+ ChamplainZoomLevelPrivate *priv = self->priv;
return g_ptr_array_index (priv->tiles, index);
}
g_return_val_if_fail (CHAMPLAIN_ZOOM_LEVEL (self), 0);
- ChamplainZoomLevelPrivate *priv = GET_PRIVATE (self);
+ ChamplainZoomLevelPrivate *priv = self->priv;
return priv->width;
}
{
g_return_val_if_fail (CHAMPLAIN_ZOOM_LEVEL (self), 0);
- ChamplainZoomLevelPrivate *priv = GET_PRIVATE (self);
+ ChamplainZoomLevelPrivate *priv = self->priv;
return priv->height;
}
{
g_return_val_if_fail (CHAMPLAIN_ZOOM_LEVEL (self), 0);
- ChamplainZoomLevelPrivate *priv = GET_PRIVATE (self);
+ ChamplainZoomLevelPrivate *priv = self->priv;
return priv->zoom_level;
}
{
g_return_if_fail (CHAMPLAIN_ZOOM_LEVEL (self));
- ChamplainZoomLevelPrivate *priv = GET_PRIVATE (self);
+ ChamplainZoomLevelPrivate *priv = self->priv;
priv->width = width;
g_object_notify (G_OBJECT (self), "width");
{
g_return_if_fail (CHAMPLAIN_ZOOM_LEVEL (self));
- ChamplainZoomLevelPrivate *priv = GET_PRIVATE (self);
+ ChamplainZoomLevelPrivate *priv = self->priv;
priv->height = height;
g_object_notify (G_OBJECT (self), "height");
{
g_return_if_fail (CHAMPLAIN_ZOOM_LEVEL (self));
- ChamplainZoomLevelPrivate *priv = GET_PRIVATE (self);
+ ChamplainZoomLevelPrivate *priv = self->priv;
priv->zoom_level = zoom_level;
g_object_notify (G_OBJECT (self), "zoom-level");
{
g_return_val_if_fail (CHAMPLAIN_ZOOM_LEVEL (self), NULL);
- ChamplainZoomLevelPrivate *priv = GET_PRIVATE (self);
+ ChamplainZoomLevelPrivate *priv = self->priv;
return priv->actor;
}