Commit 8d6d014b authored by Jiří Techet's avatar Jiří Techet

Reformat code with uncrustify and fix manually

uncrustify seems to be a very good and customizable
pretty-printer and does a very good job formating
the code to match the telepathy style. The minor problems
where it failed were corrected manually.
Signed-off-by: default avatarJiří Techet <techet@gmail.com>
parent 74b123f3
......@@ -51,10 +51,10 @@ enum
PROP_VIEW
};
//static guint gtk_champlain_embed_embed_signals[LAST_SIGNAL] = { 0, };
/* static guint gtk_champlain_embed_embed_signals[LAST_SIGNAL] = { 0, }; */
#define GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), GTK_TYPE_CHAMPLAIN_EMBED, GtkChamplainEmbedPrivate))
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_CHAMPLAIN_EMBED, GtkChamplainEmbedPrivate))
struct _GtkChamplainEmbedPrivate
{
......@@ -69,20 +69,27 @@ struct _GtkChamplainEmbedPrivate
};
static void gtk_champlain_embed_get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec);
static void gtk_champlain_embed_set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec);
static void gtk_champlain_embed_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static void gtk_champlain_embed_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_champlain_embed_finalize (GObject *object);
static void gtk_champlain_embed_dispose (GObject *object);
static void gtk_champlain_embed_class_init (GtkChamplainEmbedClass *klass);
static void gtk_champlain_embed_init (GtkChamplainEmbed *view);
static void view_size_allocated_cb (GtkWidget *widget,
GtkAllocation *allocation, GtkChamplainEmbed *view);
static gboolean mouse_button_cb (GtkWidget *widget, GdkEventButton *event,
GtkAllocation *allocation,
GtkChamplainEmbed *view);
static gboolean mouse_button_cb (GtkWidget *widget,
GdkEventButton *event,
GtkChamplainEmbed *view);
static void view_size_allocated_cb (GtkWidget *widget,
GtkAllocation *allocation, GtkChamplainEmbed *view);
GtkAllocation *allocation,
GtkChamplainEmbed *view);
static void view_realize_cb (GtkWidget *widget,
GtkChamplainEmbed *view);
......@@ -97,32 +104,32 @@ gtk_champlain_embed_get_property (GObject *object,
GtkChamplainEmbed *embed = GTK_CHAMPLAIN_EMBED (object);
GtkChamplainEmbedPrivate *priv = embed->priv;
switch(prop_id)
switch (prop_id)
{
case PROP_VIEW:
g_value_set_object (value, priv->view);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
case PROP_VIEW:
g_value_set_object (value, priv->view);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
static void
gtk_champlain_embed_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
//GtkChamplainEmbed *embed = GTK_CHAMPLAIN_EMBED (object);
//GtkChamplainEmbedPrivate *priv = embed->priv;
switch(prop_id)
{
switch (prop_id)
{
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
}
static void
gtk_champlain_embed_dispose (GObject *object)
{
......@@ -150,12 +157,14 @@ gtk_champlain_embed_dispose (GObject *object)
G_OBJECT_CLASS (gtk_champlain_embed_parent_class)->dispose (object);
}
static void
gtk_champlain_embed_finalize (GObject *object)
{
G_OBJECT_CLASS (gtk_champlain_embed_parent_class)->finalize (object);
}
static void
gtk_champlain_embed_class_init (GtkChamplainEmbedClass *klass)
{
......@@ -168,23 +177,24 @@ gtk_champlain_embed_class_init (GtkChamplainEmbedClass *klass)
object_class->set_property = gtk_champlain_embed_set_property;
/**
* GtkChamplainEmbed:champlain-view:
*
* The #ChamplainView to embed in the Gtk+ widget.
*
* Since: 0.4
*/
* GtkChamplainEmbed:champlain-view:
*
* The #ChamplainView to embed in the Gtk+ widget.
*
* Since: 0.4
*/
g_object_class_install_property (object_class,
PROP_VIEW,
g_param_spec_object ("champlain-view",
"Champlain view",
"The ChamplainView to embed into the Gtk+ widget",
CHAMPLAIN_TYPE_VIEW,
G_PARAM_READABLE));
"Champlain view",
"The ChamplainView to embed into the Gtk+ widget",
CHAMPLAIN_TYPE_VIEW,
G_PARAM_READABLE));
}
static void
set_view (GtkChamplainEmbed* embed,
set_view (GtkChamplainEmbed *embed,
ChamplainView *view)
{
GtkChamplainEmbedPrivate *priv = embed->priv;
......@@ -204,6 +214,7 @@ set_view (GtkChamplainEmbed* embed,
clutter_container_add_actor (CLUTTER_CONTAINER (stage), CLUTTER_ACTOR (priv->view));
}
static void
gtk_champlain_embed_init (GtkChamplainEmbed *embed)
{
......@@ -211,46 +222,47 @@ gtk_champlain_embed_init (GtkChamplainEmbed *embed)
ClutterActor *stage;
GtkChamplainEmbedPrivate *priv = GET_PRIVATE (embed);
embed->priv = priv;
priv->clutter_embed = gtk_clutter_embed_new ();
g_signal_connect (priv->clutter_embed,
"size-allocate",
G_CALLBACK (view_size_allocated_cb),
embed);
"size-allocate",
G_CALLBACK (view_size_allocated_cb),
embed);
g_signal_connect (priv->clutter_embed,
"realize",
G_CALLBACK (view_realize_cb),
embed);
"realize",
G_CALLBACK (view_realize_cb),
embed);
g_signal_connect (priv->clutter_embed,
"button-press-event",
G_CALLBACK (mouse_button_cb),
embed);
"button-press-event",
G_CALLBACK (mouse_button_cb),
embed);
g_signal_connect (priv->clutter_embed,
"button-release-event",
G_CALLBACK (mouse_button_cb),
embed);
// Setup cursors
"button-release-event",
G_CALLBACK (mouse_button_cb),
embed);
/* Setup cursors */
priv->cursor_hand_open = gdk_cursor_new (GDK_HAND1);
priv->cursor_hand_closed = gdk_cursor_new (GDK_FLEUR);
priv->view = NULL;
set_view (embed, CHAMPLAIN_VIEW (champlain_view_new ()));
// Setup stage
/* Setup stage */
stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (priv->clutter_embed));
clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
gtk_container_add (GTK_CONTAINER (embed), priv->clutter_embed);
}
static void
view_realize_cb (GtkWidget *widget,
GtkChamplainEmbed *view)
{
ClutterColor color = {0, 0, 0, };
ClutterColor color = { 0, 0, 0, };
GtkChamplainEmbedPrivate *priv = view->priv;
/* Setup mouse cursor to a hand */
......@@ -266,6 +278,7 @@ view_realize_cb (GtkWidget *widget,
/* To be added later: bg[active] (for selected markers, but focus is on another widget) */
}
static void
view_size_allocated_cb (GtkWidget *widget,
GtkAllocation *allocation,
......@@ -280,6 +293,7 @@ view_size_allocated_cb (GtkWidget *widget,
priv->height = allocation->height;
}
static gboolean
mouse_button_cb (GtkWidget *widget,
GdkEventButton *event,
......@@ -289,14 +303,15 @@ mouse_button_cb (GtkWidget *widget,
if (event->type == GDK_BUTTON_PRESS)
gdk_window_set_cursor (gtk_widget_get_window (priv->clutter_embed),
priv->cursor_hand_closed);
priv->cursor_hand_closed);
else
gdk_window_set_cursor (gtk_widget_get_window (priv->clutter_embed),
priv->cursor_hand_open);
priv->cursor_hand_open);
return FALSE;
}
/**
* gtk_champlain_embed_new:
*
......@@ -312,6 +327,7 @@ gtk_champlain_embed_new ()
return g_object_new (GTK_TYPE_CHAMPLAIN_EMBED, NULL);
}
/**
* gtk_champlain_embed_get_view:
* @embed: a #ChamplainView, the map view to embed
......@@ -323,9 +339,9 @@ gtk_champlain_embed_new ()
* Since: 0.4
*/
ChamplainView *
gtk_champlain_embed_get_view (GtkChamplainEmbed* embed)
gtk_champlain_embed_get_view (GtkChamplainEmbed *embed)
{
g_return_val_if_fail (GTK_CHAMPLAIN_IS_EMBED(embed), NULL);
g_return_val_if_fail (GTK_CHAMPLAIN_IS_EMBED (embed), NULL);
GtkChamplainEmbedPrivate *priv = embed->priv;
return priv->view;
......
......@@ -29,22 +29,22 @@
G_BEGIN_DECLS
#define GTK_TYPE_CHAMPLAIN_EMBED \
(gtk_champlain_embed_get_type())
(gtk_champlain_embed_get_type ())
#define GTK_CHAMPLAIN_EMBED(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_CHAMPLAIN_EMBED, GtkChamplainEmbed))
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CHAMPLAIN_EMBED, GtkChamplainEmbed))
#define GTK_CHAMPLAIN_EMBED_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_CHAMPLAIN_EMBED, GtkChamplainEmbedClass))
(G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CHAMPLAIN_EMBED, GtkChamplainEmbedClass))
#define GTK_CHAMPLAIN_IS_EMBED(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_CHAMPLAIN_EMBED))
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CHAMPLAIN_EMBED))
#define GTK_CHAMPLAIN_IS_EMBED_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_CHAMPLAIN_EMBED))
(G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CHAMPLAIN_EMBED))
#define GTK_CHAMPLAIN_EMBED_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_CHAMPLAIN_EMBED, GtkChamplainEmbedClass))
(G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CHAMPLAIN_EMBED, GtkChamplainEmbedClass))
typedef struct _GtkChamplainEmbedPrivate GtkChamplainEmbedPrivate;
......@@ -62,13 +62,12 @@ struct _GtkChamplainEmbed
struct _GtkChamplainEmbedClass
{
GtkAlignmentClass parent_class;
};
GType gtk_champlain_embed_get_type (void);
GtkWidget *gtk_champlain_embed_new (void);
ChamplainView *gtk_champlain_embed_get_view (GtkChamplainEmbed* embed);
ChamplainView *gtk_champlain_embed_get_view (GtkChamplainEmbed *embed);
G_END_DECLS
......
......@@ -63,12 +63,12 @@ enum
PROP_HIGHLIGHTED,
};
//static guint champlain_base_marker_signals[LAST_SIGNAL] = { 0, };
/* static guint champlain_base_marker_signals[LAST_SIGNAL] = { 0, }; */
G_DEFINE_TYPE (ChamplainBaseMarker, champlain_base_marker, CLUTTER_TYPE_GROUP);
#define CHAMPLAIN_BASE_MARKER_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), CHAMPLAIN_TYPE_BASE_MARKER, ChamplainBaseMarkerPrivate))
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), CHAMPLAIN_TYPE_BASE_MARKER, ChamplainBaseMarkerPrivate))
struct _ChamplainBaseMarkerPrivate
{
......@@ -83,71 +83,81 @@ champlain_base_marker_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
ChamplainBaseMarker *base_marker = CHAMPLAIN_BASE_MARKER (object);
ChamplainBaseMarkerPrivate *priv = base_marker->priv;
switch (prop_id)
{
case PROP_LONGITUDE:
g_value_set_double (value, priv->lon);
break;
case PROP_LATITUDE:
g_value_set_double (value, priv->lat);
break;
case PROP_HIGHLIGHTED:
g_value_set_boolean (value, priv->highlighted);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
ChamplainBaseMarker *base_marker = CHAMPLAIN_BASE_MARKER (object);
ChamplainBaseMarkerPrivate *priv = base_marker->priv;
switch (prop_id)
{
case PROP_LONGITUDE:
g_value_set_double (value, priv->lon);
break;
case PROP_LATITUDE:
g_value_set_double (value, priv->lat);
break;
case PROP_HIGHLIGHTED:
g_value_set_boolean (value, priv->highlighted);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
static void
champlain_base_marker_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
ChamplainBaseMarker *base_marker = CHAMPLAIN_BASE_MARKER (object);
ChamplainBaseMarkerPrivate *priv = base_marker->priv;
ChamplainBaseMarker *base_marker = CHAMPLAIN_BASE_MARKER (object);
ChamplainBaseMarkerPrivate *priv = base_marker->priv;
switch (prop_id)
{
case PROP_LONGITUDE:
{
gdouble lon = g_value_get_double (value);
champlain_base_marker_set_position (base_marker, priv->lat, lon);
break;
}
case PROP_LATITUDE:
{
gdouble lat = g_value_get_double (value);
champlain_base_marker_set_position (base_marker, lat, priv->lon);
break;
}
switch (prop_id)
case PROP_HIGHLIGHTED:
{
case PROP_LONGITUDE:
{
gdouble lon = g_value_get_double (value);
champlain_base_marker_set_position (base_marker, priv->lat, lon);
break;
}
case PROP_LATITUDE:
{
gdouble lat = g_value_get_double (value);
champlain_base_marker_set_position (base_marker, lat, priv->lon);
break;
}
case PROP_HIGHLIGHTED:
{
gboolean bvalue = g_value_get_boolean (value);
champlain_base_marker_set_highlighted (base_marker, bvalue);
break;
}
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
gboolean bvalue = g_value_get_boolean (value);
champlain_base_marker_set_highlighted (base_marker, bvalue);
break;
}
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
static void
champlain_base_marker_dispose (GObject *object)
{
G_OBJECT_CLASS (champlain_base_marker_parent_class)->dispose (object);
}
static void
champlain_base_marker_finalize (GObject *object)
{
G_OBJECT_CLASS (champlain_base_marker_parent_class)->finalize (object);
}
static void
champlain_base_marker_class_init (ChamplainBaseMarkerClass *marker_class)
{
......@@ -160,42 +170,43 @@ champlain_base_marker_class_init (ChamplainBaseMarkerClass *marker_class)
object_class->set_property = champlain_base_marker_set_property;
/**
* ChamplainBaseMarker:longitude:
*
* The longitude coordonate of the map
*
* Since: 0.4
*/
* ChamplainBaseMarker:longitude:
*
* The longitude coordonate of the map
*
* Since: 0.4
*/
g_object_class_install_property (object_class, PROP_LONGITUDE,
g_param_spec_double ("longitude", "Longitude",
"The longitude coordonate of the base_marker",
-180.0f, 180.0f, 0.0f, CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainBaseMarker:latitude:
*
* The latitude coordonate of the map
*
* Since: 0.4
*/
* ChamplainBaseMarker:latitude:
*
* The latitude coordonate of the map
*
* Since: 0.4
*/
g_object_class_install_property (object_class, PROP_LATITUDE,
g_param_spec_double ("latitude", "Latitude",
"The latitude coordonate of the base_marker",
-90.0f, 90.0f, 0.0f, CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainBaseMarker:highlighted:
*
* The highlighted state of the marker
*
* Since: 0.4
*/
* ChamplainBaseMarker:highlighted:
*
* The highlighted state of the marker
*
* Since: 0.4
*/
g_object_class_install_property (object_class, PROP_HIGHLIGHTED,
g_param_spec_boolean ("highlighted", "Highlighted",
"The highlighted stated of the marker",
FALSE, CHAMPLAIN_PARAM_READWRITE));
}
static void
champlain_base_marker_init (ChamplainBaseMarker *marker)
{
......@@ -228,6 +239,7 @@ champlain_base_marker_new (void)
return CLUTTER_ACTOR (base_marker);
}
/**
* champlain_base_marker_set_position:
* @marker: a #ChamplainBaseMarker
......@@ -254,6 +266,7 @@ champlain_base_marker_set_position (ChamplainBaseMarker *marker,
g_object_notify (G_OBJECT (marker), "longitude");
}
/**
* champlain_base_marker_get_latitude:
* @marker: a #ChamplainBaseMarker
......@@ -264,13 +277,15 @@ champlain_base_marker_set_position (ChamplainBaseMarker *marker,
*
* Since: 0.6
*/
gdouble champlain_base_marker_get_latitude (ChamplainBaseMarker *marker)
gdouble
champlain_base_marker_get_latitude (ChamplainBaseMarker *marker)
{
g_return_val_if_fail (CHAMPLAIN_IS_BASE_MARKER (marker), 0.0);
return marker->priv->lat;
}
/**
* champlain_base_marker_get_longitude:
* @marker: a #ChamplainBaseMarker
......@@ -281,13 +296,15 @@ gdouble champlain_base_marker_get_latitude (ChamplainBaseMarker *marker)
*
* Since: 0.6
*/
gdouble champlain_base_marker_get_longitude (ChamplainBaseMarker *marker)
gdouble
champlain_base_marker_get_longitude (ChamplainBaseMarker *marker)
{
g_return_val_if_fail (CHAMPLAIN_IS_BASE_MARKER (marker), 0.0);
return marker->priv->lon;
}
/**
* champlain_base_marker_set_highlighted:
* @marker: a #ChamplainBaseMarker
......@@ -309,6 +326,7 @@ champlain_base_marker_set_highlighted (ChamplainBaseMarker *marker,
g_object_notify (G_OBJECT (marker), "highlighted");
}
/**
* champlain_base_marker_get_highlighted:
* @marker: a #ChamplainBaseMarker
......@@ -327,6 +345,7 @@ champlain_base_marker_get_highlighted (ChamplainBaseMarker *marker)
return marker->priv->highlighted;
}
/**
* champlain_base_marker_animate_in:
* @marker: The marker
......@@ -341,6 +360,7 @@ champlain_base_marker_animate_in (ChamplainBaseMarker *marker)
champlain_base_marker_animate_in_with_delay (marker, 0);
}
/**
* champlain_base_marker_animate_in_with_delay :
* @marker: The marker
......@@ -373,6 +393,7 @@ champlain_base_marker_animate_in_with_delay (ChamplainBaseMarker *marker,
"scale-x", 1.0, "scale-y", 1.0, NULL);
}
/**
* champlain_base_marker_animate_out:
* @marker: The marker
......@@ -387,8 +408,9 @@ champlain_base_marker_animate_out (ChamplainBaseMarker *marker)
champlain_base_marker_animate_out_with_delay (marker, 0);
}
static gboolean
on_idle (ChamplainBaseMarker* marker)
on_idle (ChamplainBaseMarker *marker)
{
/* Notify the view that the position changed so that the marker's
* position is reset, it has to happen on idle as Clutter seems to
......@@ -400,16 +422,18 @@ on_idle (ChamplainBaseMarker* marker)
return FALSE;
}
static void
on_animation_completed (G_GNUC_UNUSED ClutterAnimation* animation,
on_animation_completed (G_GNUC_UNUSED ClutterAnimation *animation,
ChamplainBaseMarker *marker)
{
g_idle_add_full (G_PRIORITY_DEFAULT,
(GSourceFunc)on_idle,
g_object_ref (marker),
(GDestroyNotify)g_object_unref);
(GSourceFunc) on_idle,
g_object_ref (marker),
(GDestroyNotify) g_object_unref);
}
/**
* champlain_base_marker_animate_out_with_delay :
* @marker: The marker
......
......@@ -30,22 +30,22 @@
G_BEGIN_DECLS
#define CHAMPLAIN_TYPE_BASE_MARKER champlain_base_marker_get_type()
#define CHAMPLAIN_TYPE_BASE_MARKER champlain_base_marker_get_type ()
#define CHAMPLAIN_BASE_MARKER(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), CHAMPLAIN_TYPE_BASE_MARKER, ChamplainBaseMarker))
(G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_BASE_MARKER, ChamplainBaseMarker))
#define CHAMPLAIN_BASE_MARKER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), CHAMPLAIN_TYPE_BASE_MARKER, ChamplainBaseMarkerClass))
(G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_BASE_MARKER, ChamplainBaseMarkerClass))
#define CHAMPLAIN_IS_BASE_MARKER(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), CHAMPLAIN_TYPE_BASE_MARKER))
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_BASE_MARKER))
#define CHAMPLAIN_IS_BASE_MARKER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), CHAMPLAIN_TYPE_BASE_MARKER))
(G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_BASE_MARKER))
#define CHAMPLAIN_BASE_MARKER_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), CHAMPLAIN_TYPE_BASE_MARKER, ChamplainBaseMarkerClass))
(G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_BASE_MARKER, ChamplainBaseMarkerClass))
typedef struct _ChamplainBaseMarkerPrivate ChamplainBaseMarkerPrivate;
......@@ -70,7 +70,8 @@ GType champlain_base_marker_get_type (void);
ClutterActor *champlain_base_marker_new (void);
void champlain_base_marker_set_position (ChamplainBaseMarker *marker,
gdouble latitude, gdouble longitude);
gdouble latitude,
gdouble longitude);
gdouble champlain_base_marker_get_latitude (ChamplainBaseMarker *marker);
gdouble champlain_base_marker_get_longitude (ChamplainBaseMarker *marker);
void champlain_base_marker_set_highlighted (ChamplainBaseMarker *marker,
......
......@@ -45,6 +45,7 @@ champlain_bounding_box_get_type (void)
return type;
}
/**
* champlain_bounding_box_new:
*
......@@ -61,6 +62,7 @@ champlain_bounding_box_new (void)
return g_slice_new (ChamplainBoundingBox);
}
/**
* champlain_bounding_box_copy:
* @bbox: a #ChamplainBoundingBox
......@@ -81,6 +83,7 @@ champlain_bounding_box_copy (const ChamplainBoundingBox *bbox)
return NULL;
}
/**
* champlain_bounding_box_free:
* @bbox: a #ChamplainBoundingBox
......@@ -99,6 +102,7 @@ champlain_bounding_box_free (ChamplainBoundingBox *bbox)
g_slice_free (ChamplainBoundingBox, bbox);
}
/**
* champlain_bounding_box_get_center:
* @bbox: a #ChamplainBoundingBox
......
......@@ -42,7 +42,8 @@ typedef struct _ChamplainBoundingBox ChamplainBoundingBox;
*
* Since: 0.6
*/
struct _ChamplainBoundingBox {
struct _ChamplainBoundingBox
{
gdouble left;
gdouble bottom;
gdouble right;
......@@ -52,9 +53,9 @@ struct _ChamplainBoundingBox {
GType champlain_bounding_box_get_type (void) G_GNUC_CONST;
#define CHAMPLAIN_TYPE_BOUNDING_BOX (champlain_bounding_box_get_type ())
ChamplainBoundingBox * champlain_bounding_box_new (void);
ChamplainBoundingBox *champlain_bounding_box_new (void);
ChamplainBoundingBox * champlain_bounding_box_copy (const ChamplainBoundingBox *bbox);
ChamplainBoundingBox *champlain_bounding_box_copy (const ChamplainBoundingBox *bbox);
void champlain_bounding_box_free (ChamplainBoundingBox *bbox);
......
......@@ -52,27 +52,31 @@ debug_set_flags (ChamplainDebugFlags new_flags)
flags |= new_flags;
}
void
champlain_debug_set_flags (const gchar *flags_string)
{
guint nkeys;
for (nkeys = 0; keys[nkeys].value; nkeys++);
for (nkeys = 0; keys[nkeys].value; nkeys++)
;
if (flags_string)
debug_set_flags (g_parse_debug_string (flags_string, keys, nkeys));
debug_set_flags (g_parse_debug_string (flags_string, keys, nkeys));
}