[libchamplain] Whitespace and alignment cleanups
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] Whitespace and alignment cleanups
- Date: Sun, 27 Mar 2011 17:05:07 +0000 (UTC)
commit bf5bf481d3cdeef3f6a865aca3bc02a79ae86259
Author: JiÅ?Ã Techet <techet gmail com>
Date: Sat Mar 26 03:20:52 2011 +0100
Whitespace and alignment cleanups
champlain/champlain-adjustment.c | 3 +-
champlain/champlain-adjustment.h | 22 +++++--
champlain/champlain-bounding-box.h | 2 +-
champlain/champlain-coordinate.c | 4 +-
champlain/champlain-error-tile-renderer.c | 4 +-
champlain/champlain-group.c | 7 +-
champlain/champlain-group.h | 15 ++---
champlain/champlain-kinetic-scroll-view.c | 16 ++--
champlain/champlain-kinetic-scroll-view.h | 21 ++++--
champlain/champlain-label.c | 87 +++++++++++++++++-------
champlain/champlain-location.c | 18 ++++--
champlain/champlain-location.h | 14 +++-
champlain/champlain-map-source-desc.c | 8 ++-
champlain/champlain-marker-layer.c | 3 +-
champlain/champlain-marker.c | 72 +++++++++++++------
champlain/champlain-network-bbox-tile-source.c | 9 ++-
champlain/champlain-network-tile-source.c | 5 +-
champlain/champlain-path-layer.c | 15 +++--
champlain/champlain-tile-source.c | 19 +++---
champlain/champlain-view.c | 60 ++++++++++++----
champlain/champlain-view.h | 2 -
champlain/champlain-viewport.c | 4 +-
champlain/champlain-viewport.h | 22 +++++--
23 files changed, 289 insertions(+), 143 deletions(-)
---
diff --git a/champlain/champlain-adjustment.c b/champlain/champlain-adjustment.c
index 56d1fd6..dce4b07 100644
--- a/champlain/champlain-adjustment.c
+++ b/champlain/champlain-adjustment.c
@@ -33,7 +33,8 @@
G_DEFINE_TYPE (ChamplainAdjustment, champlain_adjustment, G_TYPE_OBJECT)
-#define ADJUSTMENT_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CHAMPLAIN_TYPE_ADJUSTMENT, ChamplainAdjustmentPrivate))
+#define ADJUSTMENT_PRIVATE(o) \
+ (G_TYPE_INSTANCE_GET_PRIVATE ((o), CHAMPLAIN_TYPE_ADJUSTMENT, ChamplainAdjustmentPrivate))
struct _ChamplainAdjustmentPrivate
{
diff --git a/champlain/champlain-adjustment.h b/champlain/champlain-adjustment.h
index dfe0eba..0e809c0 100644
--- a/champlain/champlain-adjustment.h
+++ b/champlain/champlain-adjustment.h
@@ -28,12 +28,22 @@
G_BEGIN_DECLS
-#define CHAMPLAIN_TYPE_ADJUSTMENT (champlain_adjustment_get_type ())
-#define CHAMPLAIN_ADJUSTMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_ADJUSTMENT, ChamplainAdjustment))
-#define CHAMPLAIN_IS_ADJUSTMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_ADJUSTMENT))
-#define CHAMPLAIN_ADJUSTMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_ADJUSTMENT, ChamplainAdjustmentClass))
-#define CHAMPLAIN_IS_ADJUSTMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_ADJUSTMENT))
-#define CHAMPLAIN_ADJUSTMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_ADJUSTMENT, ChamplainAdjustmentClass))
+#define CHAMPLAIN_TYPE_ADJUSTMENT champlain_adjustment_get_type ()
+
+#define CHAMPLAIN_ADJUSTMENT(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_ADJUSTMENT, ChamplainAdjustment))
+
+#define CHAMPLAIN_IS_ADJUSTMENT(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_ADJUSTMENT))
+
+#define CHAMPLAIN_ADJUSTMENT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_ADJUSTMENT, ChamplainAdjustmentClass))
+
+#define CHAMPLAIN_IS_ADJUSTMENT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_ADJUSTMENT))
+
+#define CHAMPLAIN_ADJUSTMENT_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_ADJUSTMENT, ChamplainAdjustmentClass))
typedef struct _ChamplainAdjustment ChamplainAdjustment;
typedef struct _ChamplainAdjustmentPrivate ChamplainAdjustmentPrivate;
diff --git a/champlain/champlain-bounding-box.h b/champlain/champlain-bounding-box.h
index 3173144..1e01a33 100644
--- a/champlain/champlain-bounding-box.h
+++ b/champlain/champlain-bounding-box.h
@@ -29,7 +29,7 @@ G_BEGIN_DECLS
typedef struct _ChamplainBoundingBox ChamplainBoundingBox;
-#define CHAMPLAIN_BOUNDING_BOX(obj) ((ChamplainBoundingBox *) (obj))
+#define CHAMPLAIN_BOUNDING_BOX(obj) ((ChamplainBoundingBox *) (obj))
/**
* ChamplainBoundingBox:
diff --git a/champlain/champlain-coordinate.c b/champlain/champlain-coordinate.c
index d336a73..46f4e7d 100644
--- a/champlain/champlain-coordinate.c
+++ b/champlain/champlain-coordinate.c
@@ -49,7 +49,7 @@ static void location_interface_init (ChamplainLocationIface *iface);
G_DEFINE_TYPE_WITH_CODE (ChamplainCoordinate, champlain_coordinate, G_TYPE_INITIALLY_UNOWNED,
G_IMPLEMENT_INTERFACE (CHAMPLAIN_TYPE_LOCATION, location_interface_init));
-#define CHAMPLAIN_COORDINATE_GET_PRIVATE(obj) \
+#define GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), CHAMPLAIN_TYPE_COORDINATE, ChamplainCoordinatePrivate))
struct _ChamplainCoordinatePrivate
@@ -200,7 +200,7 @@ champlain_coordinate_class_init (ChamplainCoordinateClass *coordinate_class)
static void
champlain_coordinate_init (ChamplainCoordinate *coordinate)
{
- ChamplainCoordinatePrivate *priv = CHAMPLAIN_COORDINATE_GET_PRIVATE (coordinate);
+ ChamplainCoordinatePrivate *priv = GET_PRIVATE (coordinate);
coordinate->priv = priv;
diff --git a/champlain/champlain-error-tile-renderer.c b/champlain/champlain-error-tile-renderer.c
index daa4129..0942305 100644
--- a/champlain/champlain-error-tile-renderer.c
+++ b/champlain/champlain-error-tile-renderer.c
@@ -173,7 +173,9 @@ champlain_error_tile_renderer_init (ChamplainErrorTileRenderer *self)
ChamplainErrorTileRenderer *
champlain_error_tile_renderer_new (guint tile_size)
{
- return g_object_new (CHAMPLAIN_TYPE_ERROR_TILE_RENDERER, "tile-size", tile_size, NULL);
+ return g_object_new (CHAMPLAIN_TYPE_ERROR_TILE_RENDERER,
+ "tile-size", tile_size,
+ NULL);
}
diff --git a/champlain/champlain-group.c b/champlain/champlain-group.c
index c3df8a4..ee1e428 100644
--- a/champlain/champlain-group.c
+++ b/champlain/champlain-group.c
@@ -43,7 +43,7 @@
#include <clutter/clutter.h>
-#define CHAMPLAIN_GROUP_GET_PRIVATE(obj) \
+#define GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), CHAMPLAIN_TYPE_GROUP, ChamplainGroupPrivate))
struct _ChamplainGroupPrivate
@@ -64,8 +64,7 @@ enum
static void clutter_container_iface_init (ClutterContainerIface *iface);
G_DEFINE_TYPE_WITH_CODE (ChamplainGroup, champlain_group, CLUTTER_TYPE_ACTOR,
- G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_CONTAINER,
- clutter_container_iface_init));
+ G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_CONTAINER, clutter_container_iface_init));
/*
static gint
@@ -399,7 +398,7 @@ champlain_group_class_init (ChamplainGroupClass *klass)
static void
champlain_group_init (ChamplainGroup *self)
{
- self->priv = CHAMPLAIN_GROUP_GET_PRIVATE (self);
+ self->priv = GET_PRIVATE (self);
self->priv->layout = clutter_fixed_layout_new ();
g_object_ref_sink (self->priv->layout);
diff --git a/champlain/champlain-group.h b/champlain/champlain-group.h
index e146a91..3c4dfc1 100644
--- a/champlain/champlain-group.h
+++ b/champlain/champlain-group.h
@@ -32,24 +32,19 @@ G_BEGIN_DECLS
#define CHAMPLAIN_TYPE_GROUP champlain_group_get_type ()
#define CHAMPLAIN_GROUP(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
- CHAMPLAIN_TYPE_GROUP, ChamplainGroup))
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_GROUP, ChamplainGroup))
#define CHAMPLAIN_GROUP_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), \
- CHAMPLAIN_TYPE_GROUP, ChamplainGroupClass))
+ (G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_GROUP, ChamplainGroupClass))
#define CHAMPLAIN_IS_GROUP(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
- CHAMPLAIN_TYPE_GROUP))
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_GROUP))
#define CHAMPLAIN_IS_GROUP_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), \
- CHAMPLAIN_TYPE_GROUP))
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_GROUP))
#define CHAMPLAIN_GROUP_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), \
- CHAMPLAIN_TYPE_GROUP, ChamplainGroupClass))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_GROUP, ChamplainGroupClass))
typedef struct _ChamplainGroup ChamplainGroup;
typedef struct _ChamplainGroupClass ChamplainGroupClass;
diff --git a/champlain/champlain-kinetic-scroll-view.c b/champlain/champlain-kinetic-scroll-view.c
index 4c76568..57c60c6 100644
--- a/champlain/champlain-kinetic-scroll-view.c
+++ b/champlain/champlain-kinetic-scroll-view.c
@@ -31,13 +31,11 @@
static void clutter_container_iface_init (ClutterContainerIface *iface);
G_DEFINE_TYPE_WITH_CODE (ChamplainKineticScrollView, champlain_kinetic_scroll_view, CLUTTER_TYPE_ACTOR,
- G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_CONTAINER,
- clutter_container_iface_init))
+ G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_CONTAINER, clutter_container_iface_init))
-#define KINETIC_SCROLL_VIEW_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
- CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW, \
- ChamplainKineticScrollViewPrivate))
+#define GET_PRIVATE(o) \
+ (G_TYPE_INSTANCE_GET_PRIVATE ((o), CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW, ChamplainKineticScrollViewPrivate))
typedef struct
{
@@ -310,8 +308,10 @@ champlain_kinetic_scroll_view_class_init (ChamplainKineticScrollViewClass *klass
G_PARAM_READWRITE));
signals[PANNING_COMPLETED] =
- g_signal_new ("panning-completed", G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST, 0, NULL, NULL,
+ g_signal_new ("panning-completed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL,
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}
@@ -882,7 +882,7 @@ button_press_event_cb (ClutterActor *actor,
static void
champlain_kinetic_scroll_view_init (ChamplainKineticScrollView *self)
{
- ChamplainKineticScrollViewPrivate *priv = self->priv = KINETIC_SCROLL_VIEW_PRIVATE (self);
+ ChamplainKineticScrollViewPrivate *priv = self->priv = GET_PRIVATE (self);
priv->motion_buffer = g_array_sized_new (FALSE, TRUE,
sizeof (ChamplainKineticScrollViewMotion), 3);
diff --git a/champlain/champlain-kinetic-scroll-view.h b/champlain/champlain-kinetic-scroll-view.h
index cb041ab..6c82fd6 100644
--- a/champlain/champlain-kinetic-scroll-view.h
+++ b/champlain/champlain-kinetic-scroll-view.h
@@ -28,13 +28,22 @@
G_BEGIN_DECLS
-#define CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW (champlain_kinetic_scroll_view_get_type ())
-#define CHAMPLAIN_KINETIC_SCROLL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW, ChamplainKineticScrollView))
-#define CHAMPLAIN_IS_KINETIC_SCROLL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW))
-#define CHAMPLAIN_KINETIC_SCROLL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW, ChamplainKineticScrollViewClass))
-#define CHAMPLAIN_IS_KINETIC_SCROLL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW))
-#define CHAMPLAIN_KINETIC_SCROLL_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW, ChamplainKineticScrollViewClass))
+#define CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW champlain_kinetic_scroll_view_get_type ()
+#define CHAMPLAIN_KINETIC_SCROLL_VIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW, ChamplainKineticScrollView))
+
+#define CHAMPLAIN_IS_KINETIC_SCROLL_VIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW))
+
+#define CHAMPLAIN_KINETIC_SCROLL_VIEW_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW, ChamplainKineticScrollViewClass))
+
+#define CHAMPLAIN_IS_KINETIC_SCROLL_VIEW_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW))
+
+#define CHAMPLAIN_KINETIC_SCROLL_VIEW_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW, ChamplainKineticScrollViewClass))
typedef struct _ChamplainKineticScrollView ChamplainKineticScrollView;
typedef struct _ChamplainKineticScrollViewPrivate ChamplainKineticScrollViewPrivate;
diff --git a/champlain/champlain-label.c b/champlain/champlain-label.c
index b1b1b94..39c27bf 100644
--- a/champlain/champlain-label.c
+++ b/champlain/champlain-label.c
@@ -461,8 +461,11 @@ champlain_label_class_init (ChamplainLabelClass *klass)
* Since: 0.10
*/
g_object_class_install_property (object_class, PROP_TEXT,
- g_param_spec_string ("text", "Text", "The text of the label",
- "", CHAMPLAIN_PARAM_READWRITE));
+ g_param_spec_string ("text",
+ "Text",
+ "The text of the label",
+ "",
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainLabel:image:
@@ -472,8 +475,11 @@ champlain_label_class_init (ChamplainLabelClass *klass)
* Since: 0.10
*/
g_object_class_install_property (object_class, PROP_IMAGE,
- g_param_spec_object ("image", "Image", "The image of the label",
- CLUTTER_TYPE_ACTOR, CHAMPLAIN_PARAM_READWRITE));
+ g_param_spec_object ("image",
+ "Image",
+ "The image of the label",
+ CLUTTER_TYPE_ACTOR,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainLabel:use-markup:
@@ -483,8 +489,11 @@ champlain_label_class_init (ChamplainLabelClass *klass)
* Since: 0.10
*/
g_object_class_install_property (object_class, PROP_USE_MARKUP,
- g_param_spec_boolean ("use-markup", "Use Markup", "The text uses markup",
- FALSE, CHAMPLAIN_PARAM_READWRITE));
+ g_param_spec_boolean ("use-markup",
+ "Use Markup",
+ "The text uses markup",
+ FALSE,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainLabel:alignment:
@@ -494,8 +503,12 @@ champlain_label_class_init (ChamplainLabelClass *klass)
* Since: 0.10
*/
g_object_class_install_property (object_class, PROP_ALIGNMENT,
- g_param_spec_enum ("alignment", "Alignment", "The label's alignment",
- PANGO_TYPE_ALIGNMENT, PANGO_ALIGN_LEFT, CHAMPLAIN_PARAM_READWRITE));
+ g_param_spec_enum ("alignment",
+ "Alignment",
+ "The label's alignment",
+ PANGO_TYPE_ALIGNMENT,
+ PANGO_ALIGN_LEFT,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainLabel:color:
@@ -505,8 +518,11 @@ champlain_label_class_init (ChamplainLabelClass *klass)
* Since: 0.10
*/
g_object_class_install_property (object_class, PROP_COLOR,
- clutter_param_spec_color ("color", "Color", "The label's color",
- &DEFAULT_COLOR, CHAMPLAIN_PARAM_READWRITE));
+ clutter_param_spec_color ("color",
+ "Color",
+ "The label's color",
+ &DEFAULT_COLOR,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainLabel:text-color:
@@ -516,8 +532,11 @@ champlain_label_class_init (ChamplainLabelClass *klass)
* Since: 0.10
*/
g_object_class_install_property (object_class, PROP_TEXT_COLOR,
- clutter_param_spec_color ("text-color", "Text Color", "The label's text color",
- &DEFAULT_TEXT_COLOR, CHAMPLAIN_PARAM_READWRITE));
+ clutter_param_spec_color ("text-color",
+ "Text Color",
+ "The label's text color",
+ &DEFAULT_TEXT_COLOR,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainLabel:font-name:
@@ -527,8 +546,11 @@ champlain_label_class_init (ChamplainLabelClass *klass)
* Since: 0.10
*/
g_object_class_install_property (object_class, PROP_FONT_NAME,
- g_param_spec_string ("font-name", "Font Name", "The label's text font name",
- "Sans 11", CHAMPLAIN_PARAM_READWRITE));
+ g_param_spec_string ("font-name",
+ "Font Name",
+ "The label's text font name",
+ "Sans 11",
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainLabel:wrap:
@@ -538,8 +560,11 @@ champlain_label_class_init (ChamplainLabelClass *klass)
* Since: 0.10
*/
g_object_class_install_property (object_class, PROP_WRAP,
- g_param_spec_boolean ("wrap", "Wrap", "The label's text wrap",
- FALSE, CHAMPLAIN_PARAM_READWRITE));
+ g_param_spec_boolean ("wrap",
+ "Wrap",
+ "The label's text wrap",
+ FALSE,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainLabel:wrap-mode:
@@ -549,8 +574,12 @@ champlain_label_class_init (ChamplainLabelClass *klass)
* Since: 0.10
*/
g_object_class_install_property (object_class, PROP_WRAP_MODE,
- g_param_spec_enum ("wrap-mode", "Wrap Mode", "The label's text wrap mode",
- PANGO_TYPE_WRAP_MODE, PANGO_WRAP_WORD, CHAMPLAIN_PARAM_READWRITE));
+ g_param_spec_enum ("wrap-mode",
+ "Wrap Mode",
+ "The label's text wrap mode",
+ PANGO_TYPE_WRAP_MODE,
+ PANGO_WRAP_WORD,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainLabel:ellipsize:
@@ -560,8 +589,12 @@ champlain_label_class_init (ChamplainLabelClass *klass)
* Since: 0.10
*/
g_object_class_install_property (object_class, PROP_ELLIPSIZE,
- g_param_spec_enum ("ellipsize", "Ellipsize Mode", "The label's text ellipsize mode",
- PANGO_TYPE_ELLIPSIZE_MODE, PANGO_ELLIPSIZE_NONE, CHAMPLAIN_PARAM_READWRITE));
+ g_param_spec_enum ("ellipsize",
+ "Ellipsize Mode",
+ "The label's text ellipsize mode",
+ PANGO_TYPE_ELLIPSIZE_MODE,
+ PANGO_ELLIPSIZE_NONE,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainLabel:draw-background:
@@ -571,8 +604,11 @@ champlain_label_class_init (ChamplainLabelClass *klass)
* Since: 0.10
*/
g_object_class_install_property (object_class, PROP_DRAW_BACKGROUND,
- g_param_spec_boolean ("draw-background", "Draw Background", "The label has a background",
- TRUE, CHAMPLAIN_PARAM_READWRITE));
+ g_param_spec_boolean ("draw-background",
+ "Draw Background",
+ "The label has a background",
+ TRUE,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainLabel:single-line-mode:
@@ -582,8 +618,11 @@ champlain_label_class_init (ChamplainLabelClass *klass)
* Since: 0.10
*/
g_object_class_install_property (object_class, PROP_SINGLE_LINE_MODE,
- g_param_spec_boolean ("single-line-mode", "Single Line Mode", "The label's single line mode",
- TRUE, CHAMPLAIN_PARAM_READWRITE));
+ g_param_spec_boolean ("single-line-mode",
+ "Single Line Mode",
+ "The label's single line mode",
+ TRUE,
+ CHAMPLAIN_PARAM_READWRITE));
}
diff --git a/champlain/champlain-location.c b/champlain/champlain-location.c
index bcccb5a..05b7273 100644
--- a/champlain/champlain-location.c
+++ b/champlain/champlain-location.c
@@ -15,7 +15,6 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
/**
* SECTION:champlain-location
* @short_description: An interface common to objects having latitude and longitude
@@ -28,6 +27,7 @@
#include "champlain-private.h"
typedef ChamplainLocationIface ChamplainLocationInterface;
+
G_DEFINE_INTERFACE (ChamplainLocation, champlain_location, G_TYPE_OBJECT);
@@ -42,9 +42,13 @@ champlain_location_default_init (ChamplainLocationInterface *iface)
* Since: 0.10
*/
g_object_interface_install_property (iface,
- g_param_spec_double ("longitude", "Longitude",
+ g_param_spec_double ("longitude",
+ "Longitude",
"The longitude coordonate",
- -180.0f, 180.0f, 0.0f, CHAMPLAIN_PARAM_READWRITE));
+ -180.0f,
+ 180.0f,
+ 0.0f,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainLocation:latitude:
@@ -54,9 +58,13 @@ champlain_location_default_init (ChamplainLocationInterface *iface)
* Since: 0.10
*/
g_object_interface_install_property (iface,
- g_param_spec_double ("latitude", "Latitude",
+ g_param_spec_double ("latitude",
+ "Latitude",
"The latitude coordonate",
- -90.0f, 90.0f, 0.0f, CHAMPLAIN_PARAM_READWRITE));
+ -90.0f,
+ 90.0f,
+ 0.0f,
+ CHAMPLAIN_PARAM_READWRITE));
}
diff --git a/champlain/champlain-location.h b/champlain/champlain-location.h
index 464d081..4cc9c1e 100644
--- a/champlain/champlain-location.h
+++ b/champlain/champlain-location.h
@@ -27,10 +27,16 @@
G_BEGIN_DECLS
-#define CHAMPLAIN_TYPE_LOCATION (champlain_location_get_type ())
-#define CHAMPLAIN_LOCATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_LOCATION, ChamplainLocation))
-#define CHAMPLAIN_IS_LOCATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_LOCATION))
-#define CHAMPLAIN_LOCATION_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), CHAMPLAIN_TYPE_LOCATION, ChamplainLocationIface))
+#define CHAMPLAIN_TYPE_LOCATION (champlain_location_get_type ())
+
+#define CHAMPLAIN_LOCATION(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_LOCATION, ChamplainLocation))
+
+#define CHAMPLAIN_IS_LOCATION(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_LOCATION))
+
+#define CHAMPLAIN_LOCATION_GET_IFACE(inst) \
+ (G_TYPE_INSTANCE_GET_INTERFACE ((inst), CHAMPLAIN_TYPE_LOCATION, ChamplainLocationIface))
typedef struct _ChamplainLocation ChamplainLocation; /* Dummy object */
typedef struct _ChamplainLocationIface ChamplainLocationIface;
diff --git a/champlain/champlain-map-source-desc.c b/champlain/champlain-map-source-desc.c
index 27ea415..15922f8 100644
--- a/champlain/champlain-map-source-desc.c
+++ b/champlain/champlain-map-source-desc.c
@@ -331,7 +331,9 @@ champlain_map_source_desc_class_init (ChamplainMapSourceDescClass *klass)
g_param_spec_uint ("min-zoom-level",
"Min zoom level",
"The lowest allowed level of zoom",
- 0, 20, 0,
+ 0,
+ 20,
+ 0,
G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
/**
@@ -346,7 +348,9 @@ champlain_map_source_desc_class_init (ChamplainMapSourceDescClass *klass)
g_param_spec_uint ("max-zoom-level",
"Max zoom level",
"The highest allowed level of zoom",
- 0, 20, 20,
+ 0,
+ 20,
+ 20,
G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
/**
diff --git a/champlain/champlain-marker-layer.c b/champlain/champlain-marker-layer.c
index 12338fb..31b5c1b 100644
--- a/champlain/champlain-marker-layer.c
+++ b/champlain/champlain-marker-layer.c
@@ -40,7 +40,8 @@
G_DEFINE_TYPE (ChamplainMarkerLayer, champlain_marker_layer, CHAMPLAIN_TYPE_LAYER)
-#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CHAMPLAIN_TYPE_MARKER_LAYER, ChamplainMarkerLayerPrivate))
+#define GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CHAMPLAIN_TYPE_MARKER_LAYER, ChamplainMarkerLayerPrivate))
enum
{
diff --git a/champlain/champlain-marker.c b/champlain/champlain-marker.c
index 77fd97d..37e89be 100644
--- a/champlain/champlain-marker.c
+++ b/champlain/champlain-marker.c
@@ -85,10 +85,9 @@ static gdouble get_longitude (ChamplainLocation *location);
static void location_interface_init (ChamplainLocationIface *iface);
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (ChamplainMarker, champlain_marker, CLUTTER_TYPE_ACTOR,
- G_IMPLEMENT_INTERFACE (CHAMPLAIN_TYPE_LOCATION,
- location_interface_init));
+ G_IMPLEMENT_INTERFACE (CHAMPLAIN_TYPE_LOCATION, location_interface_init));
-#define CHAMPLAIN_MARKER_GET_PRIVATE(obj) \
+#define GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), CHAMPLAIN_TYPE_MARKER, ChamplainMarkerPrivate))
struct _ChamplainMarkerPrivate
@@ -345,9 +344,11 @@ champlain_marker_class_init (ChamplainMarkerClass *marker_class)
* Since: 0.10
*/
g_object_class_install_property (object_class, PROP_SELECTED,
- g_param_spec_boolean ("selected", "Selected",
+ g_param_spec_boolean ("selected",
+ "Selected",
"The sighlighted state of the marker",
- FALSE, CHAMPLAIN_PARAM_READWRITE));
+ FALSE,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainMarker:selectable:
@@ -357,9 +358,11 @@ champlain_marker_class_init (ChamplainMarkerClass *marker_class)
* Since: 0.10
*/
g_object_class_install_property (object_class, PROP_SELECTABLE,
- g_param_spec_boolean ("selectable", "Selectable",
+ g_param_spec_boolean ("selectable",
+ "Selectable",
"The draggable state of the marker",
- FALSE, CHAMPLAIN_PARAM_READWRITE));
+ FALSE,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainMarker:draggable:
@@ -369,9 +372,11 @@ champlain_marker_class_init (ChamplainMarkerClass *marker_class)
* Since: 0.10
*/
g_object_class_install_property (object_class, PROP_DRAGGABLE,
- g_param_spec_boolean ("draggable", "Draggable",
+ g_param_spec_boolean ("draggable",
+ "Draggable",
"The draggable state of the marker",
- FALSE, CHAMPLAIN_PARAM_READWRITE));
+ FALSE,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainMarker::button-press:
@@ -382,9 +387,14 @@ champlain_marker_class_init (ChamplainMarkerClass *marker_class)
* Since: 0.10
*/
signals[BUTTON_PRESS_SIGNAL] =
- g_signal_new ("button-press", G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST, 0, NULL, NULL,
- g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+ g_signal_new ("button-press",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL,
+ g_cclosure_marshal_VOID__BOXED,
+ G_TYPE_NONE,
+ 1,
+ CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
/**
* ChamplainMarker::button-release:
@@ -395,9 +405,14 @@ champlain_marker_class_init (ChamplainMarkerClass *marker_class)
* Since: 0.10
*/
signals[BUTTON_RELEASE_SIGNAL] =
- g_signal_new ("button-release", G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST, 0, NULL, NULL,
- g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+ g_signal_new ("button-release",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL,
+ g_cclosure_marshal_VOID__BOXED,
+ G_TYPE_NONE,
+ 1,
+ CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
/**
* ChamplainMarker::drag-motion:
@@ -411,9 +426,14 @@ champlain_marker_class_init (ChamplainMarkerClass *marker_class)
* Since: 0.10
*/
signals[DRAG_MOTION_SIGNAL] =
- g_signal_new ("drag-motion", G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST, 0, NULL, NULL,
- _champlain_marshal_VOID__DOUBLE_DOUBLE_BOXED, G_TYPE_NONE, 3, G_TYPE_DOUBLE, G_TYPE_DOUBLE, CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+ g_signal_new ("drag-motion",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL,
+ _champlain_marshal_VOID__DOUBLE_DOUBLE_BOXED,
+ G_TYPE_NONE,
+ 3,
+ G_TYPE_DOUBLE, G_TYPE_DOUBLE, CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
/**
* ChamplainMarker::drag-finish:
@@ -425,9 +445,14 @@ champlain_marker_class_init (ChamplainMarkerClass *marker_class)
* Since: 0.10
*/
signals[DRAG_FINISH_SIGNAL] =
- g_signal_new ("drag-finish", G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST, 0, NULL, NULL,
- g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+ g_signal_new ("drag-finish",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL,
+ g_cclosure_marshal_VOID__BOXED,
+ G_TYPE_NONE,
+ 1,
+ CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
g_object_class_override_property (object_class,
@@ -456,7 +481,8 @@ motion_event_cb (ClutterActor *stage,
event->y,
&x, &y))
{
- g_signal_emit_by_name (marker, "drag-motion", x - priv->click_x, y - priv->click_y, event);
+ g_signal_emit_by_name (marker, "drag-motion",
+ x - priv->click_x, y - priv->click_y, event);
priv->moved = TRUE;
}
@@ -566,7 +592,7 @@ button_press_event_cb (ClutterActor *actor,
static void
champlain_marker_init (ChamplainMarker *marker)
{
- ChamplainMarkerPrivate *priv = CHAMPLAIN_MARKER_GET_PRIVATE (marker);
+ ChamplainMarkerPrivate *priv = GET_PRIVATE (marker);
marker->priv = priv;
diff --git a/champlain/champlain-network-bbox-tile-source.c b/champlain/champlain-network-bbox-tile-source.c
index 19e3c8f..192a43f 100644
--- a/champlain/champlain-network-bbox-tile-source.c
+++ b/champlain/champlain-network-bbox-tile-source.c
@@ -245,12 +245,15 @@ champlain_network_bbox_tile_source_init (ChamplainNetworkBboxTileSource *self)
priv->soup_session = soup_session_async_new_with_options (
"proxy-uri", soup_uri_new (priv->proxy_uri),
#ifdef HAVE_LIBSOUP_GNOME
- SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_PROXY_RESOLVER_GNOME,
+ SOUP_SESSION_ADD_FEATURE_BY_TYPE,
+ SOUP_TYPE_PROXY_RESOLVER_GNOME,
#endif
NULL);
g_object_set (G_OBJECT (priv->soup_session),
- "user-agent", "libchamplain/" CHAMPLAIN_VERSION_S,
- "max-conns-per-host", 2, NULL);
+ "user-agent",
+ "libchamplain/" CHAMPLAIN_VERSION_S,
+ "max-conns-per-host", 2,
+ NULL);
priv->state = CHAMPLAIN_STATE_NONE;
}
diff --git a/champlain/champlain-network-tile-source.c b/champlain/champlain-network-tile-source.c
index 04e4cb2..675a3c5 100644
--- a/champlain/champlain-network-tile-source.c
+++ b/champlain/champlain-network-tile-source.c
@@ -231,7 +231,7 @@ champlain_network_tile_source_class_init (ChamplainNetworkTileSourceClass *klass
"URI Format",
"The URI format",
"",
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
g_object_class_install_property (object_class, PROP_URI_FORMAT, pspec);
/**
@@ -278,7 +278,8 @@ champlain_network_tile_source_init (ChamplainNetworkTileSource *tile_source)
priv->soup_session = soup_session_async_new_with_options (
"proxy-uri", NULL,
#ifdef HAVE_LIBSOUP_GNOME
- SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_PROXY_RESOLVER_GNOME,
+ SOUP_SESSION_ADD_FEATURE_BY_TYPE,
+ SOUP_TYPE_PROXY_RESOLVER_GNOME,
#endif
NULL);
g_object_set (G_OBJECT (priv->soup_session),
diff --git a/champlain/champlain-path-layer.c b/champlain/champlain-path-layer.c
index 2afa4f0..caf9518 100644
--- a/champlain/champlain-path-layer.c
+++ b/champlain/champlain-path-layer.c
@@ -44,7 +44,8 @@
G_DEFINE_TYPE (ChamplainPathLayer, champlain_path_layer, CHAMPLAIN_TYPE_LAYER)
-#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CHAMPLAIN_TYPE_PATH_LAYER, ChamplainPathLayerPrivate))
+#define GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CHAMPLAIN_TYPE_PATH_LAYER, ChamplainPathLayerPrivate))
enum
{
@@ -356,7 +357,8 @@ champlain_path_layer_class_init (ChamplainPathLayerClass *klass)
g_param_spec_boolean ("closed",
"Closed Path",
"The Path is Closed",
- FALSE, CHAMPLAIN_PARAM_READWRITE));
+ FALSE,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainPathLayer:fill:
@@ -370,7 +372,8 @@ champlain_path_layer_class_init (ChamplainPathLayerClass *klass)
g_param_spec_boolean ("fill",
"Fill",
"The shape is filled",
- FALSE, CHAMPLAIN_PARAM_READWRITE));
+ FALSE,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainPathLayer:stroke:
@@ -384,7 +387,8 @@ champlain_path_layer_class_init (ChamplainPathLayerClass *klass)
g_param_spec_boolean ("stroke",
"Stroke",
"The shape is stroked",
- TRUE, CHAMPLAIN_PARAM_READWRITE));
+ TRUE,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainPathLayer:stroke-color:
@@ -428,7 +432,8 @@ champlain_path_layer_class_init (ChamplainPathLayerClass *klass)
g_param_spec_double ("stroke-width",
"Stroke Width",
"The path's stroke width",
- 0, 100.0,
+ 0,
+ 100.0,
2.0,
CHAMPLAIN_PARAM_READWRITE));
diff --git a/champlain/champlain-tile-source.c b/champlain/champlain-tile-source.c
index ccb7889..6f0e7dc 100644
--- a/champlain/champlain-tile-source.c
+++ b/champlain/champlain-tile-source.c
@@ -30,7 +30,8 @@
G_DEFINE_ABSTRACT_TYPE (ChamplainTileSource, champlain_tile_source, CHAMPLAIN_TYPE_MAP_SOURCE);
-#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CHAMPLAIN_TYPE_TILE_SOURCE, ChamplainTileSourcePrivate))
+#define GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CHAMPLAIN_TYPE_TILE_SOURCE, ChamplainTileSourcePrivate))
enum
{
@@ -254,7 +255,7 @@ champlain_tile_source_class_init (ChamplainTileSourceClass *klass)
"Id",
"The id of the tile source",
"",
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
g_object_class_install_property (object_class, PROP_ID, pspec);
/**
@@ -268,7 +269,7 @@ champlain_tile_source_class_init (ChamplainTileSourceClass *klass)
"Name",
"The name of the tile source",
"",
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
g_object_class_install_property (object_class, PROP_NAME, pspec);
/**
@@ -282,7 +283,7 @@ champlain_tile_source_class_init (ChamplainTileSourceClass *klass)
"License",
"The usage license of the tile source",
"",
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
g_object_class_install_property (object_class, PROP_LICENSE, pspec);
/**
@@ -296,7 +297,7 @@ champlain_tile_source_class_init (ChamplainTileSourceClass *klass)
"License-uri",
"The usage license's uri for more information",
"",
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
g_object_class_install_property (object_class, PROP_LICENSE_URI, pspec);
/**
@@ -312,7 +313,7 @@ champlain_tile_source_class_init (ChamplainTileSourceClass *klass)
0,
50,
0,
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
g_object_class_install_property (object_class, PROP_MIN_ZOOM_LEVEL, pspec);
/**
@@ -328,7 +329,7 @@ champlain_tile_source_class_init (ChamplainTileSourceClass *klass)
0,
50,
18,
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
g_object_class_install_property (object_class, PROP_MAX_ZOOM_LEVEL, pspec);
/**
@@ -344,7 +345,7 @@ champlain_tile_source_class_init (ChamplainTileSourceClass *klass)
0,
2048,
256,
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
g_object_class_install_property (object_class, PROP_TILE_SIZE, pspec);
/**
@@ -359,7 +360,7 @@ champlain_tile_source_class_init (ChamplainTileSourceClass *klass)
"The map projection",
CHAMPLAIN_TYPE_MAP_PROJECTION,
CHAMPLAIN_MAP_PROJECTION_MERCATOR,
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
g_object_class_install_property (object_class, PROP_MAP_PROJECTION, pspec);
/**
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index d017132..4f5bf00 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -107,6 +107,7 @@ static guint signals[LAST_SIGNAL] = { 0, };
#define GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), CHAMPLAIN_TYPE_VIEW, ChamplainViewPrivate))
+
#define ZOOM_LEVEL_OUT_OF_RANGE(priv, level) \
(level < priv->min_zoom_level || \
level > priv->max_zoom_level || \
@@ -770,7 +771,10 @@ champlain_view_class_init (ChamplainViewClass *champlainViewClass)
g_param_spec_double ("longitude",
"Longitude",
"The longitude coordonate of the map",
- -180.0f, 180.0f, 0.0f, CHAMPLAIN_PARAM_READWRITE));
+ -180.0f,
+ 180.0f,
+ 0.0f,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainView:latitude:
@@ -784,7 +788,10 @@ champlain_view_class_init (ChamplainViewClass *champlainViewClass)
g_param_spec_double ("latitude",
"Latitude",
"The latitude coordonate of the map",
- -90.0f, 90.0f, 0.0f, CHAMPLAIN_PARAM_READWRITE));
+ -90.0f,
+ 90.0f,
+ 0.0f,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainView:zoom-level:
@@ -798,7 +805,10 @@ champlain_view_class_init (ChamplainViewClass *champlainViewClass)
g_param_spec_uint ("zoom-level",
"Zoom level",
"The level of zoom of the map",
- 0, 20, 3, CHAMPLAIN_PARAM_READWRITE));
+ 0,
+ 20,
+ 3,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainView:min-zoom-level:
@@ -812,7 +822,10 @@ champlain_view_class_init (ChamplainViewClass *champlainViewClass)
g_param_spec_uint ("min-zoom-level",
"Min zoom level",
"The lowest allowed level of zoom",
- 0, 20, 0, CHAMPLAIN_PARAM_READWRITE));
+ 0,
+ 20,
+ 0,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainView:max-zoom-level:
@@ -826,7 +839,10 @@ champlain_view_class_init (ChamplainViewClass *champlainViewClass)
g_param_spec_uint ("max-zoom-level",
"Max zoom level",
"The highest allowed level of zoom",
- 0, 20, 20, CHAMPLAIN_PARAM_READWRITE));
+ 0,
+ 20,
+ 20,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainView:map-source:
@@ -855,7 +871,8 @@ champlain_view_class_init (ChamplainViewClass *champlainViewClass)
g_param_spec_boolean ("kinetic-mode",
"Kinetic Mode",
"Determines whether the view should use kinetic mode.",
- FALSE, CHAMPLAIN_PARAM_READWRITE));
+ FALSE,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainView:deceleration:
@@ -869,7 +886,10 @@ champlain_view_class_init (ChamplainViewClass *champlainViewClass)
g_param_spec_double ("deceleration",
"Deceleration rate",
"Rate at which the view will decelerate in kinetic mode.",
- 1.0001, 2.0, 1.1, CHAMPLAIN_PARAM_READWRITE));
+ 1.0001,
+ 2.0,
+ 1.1,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainView:keep-center-on-resize:
@@ -884,7 +904,8 @@ champlain_view_class_init (ChamplainViewClass *champlainViewClass)
"Keep center on resize",
"Keep the current centered position "
"upon resizing",
- TRUE, CHAMPLAIN_PARAM_READWRITE));
+ TRUE,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainView:zoom-on-double-click:
@@ -898,7 +919,8 @@ champlain_view_class_init (ChamplainViewClass *champlainViewClass)
g_param_spec_boolean ("zoom-on-double-click",
"Zoom in on double click",
"Zoom in and recenter on double click on the map",
- TRUE, CHAMPLAIN_PARAM_READWRITE));
+ TRUE,
+ CHAMPLAIN_PARAM_READWRITE));
/**
* ChamplainView:state
@@ -928,9 +950,13 @@ champlain_view_class_init (ChamplainViewClass *champlainViewClass)
* Since: 0.4
*/
signals[ANIMATION_COMPLETED] =
- g_signal_new ("animation-completed", G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, 0, NULL, NULL,
- g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 0);
+ g_signal_new ("animation-completed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
+ 0, NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE,
+ 0);
/**
* ChamplainView::layer-relocated:
@@ -943,9 +969,13 @@ champlain_view_class_init (ChamplainViewClass *champlainViewClass)
* Since: 0.10
*/
signals[LAYER_RELOCATED] =
- g_signal_new ("layer-relocated", G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST, 0, NULL, NULL,
- g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+ g_signal_new ("layer-relocated",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
}
diff --git a/champlain/champlain-view.h b/champlain/champlain-view.h
index 5e6f2d0..8fd48ac 100644
--- a/champlain/champlain-view.h
+++ b/champlain/champlain-view.h
@@ -145,8 +145,6 @@ void champlain_view_bin_layout_add (ChamplainView *view,
ChamplainLicense *champlain_view_get_license_actor (ChamplainView *view);
-
-
G_END_DECLS
#endif
diff --git a/champlain/champlain-viewport.c b/champlain/champlain-viewport.c
index acf2f5c..256c090 100644
--- a/champlain/champlain-viewport.c
+++ b/champlain/champlain-viewport.c
@@ -29,12 +29,10 @@
#include "champlain-viewport.h"
#include "champlain-private.h"
-
G_DEFINE_TYPE (ChamplainViewport, champlain_viewport, CLUTTER_TYPE_ACTOR)
#define GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((o), CHAMPLAIN_TYPE_VIEWPORT, \
- ChamplainViewportPrivate))
+ (G_TYPE_INSTANCE_GET_PRIVATE ((o), CHAMPLAIN_TYPE_VIEWPORT, ChamplainViewportPrivate))
struct _ChamplainViewportPrivate
{
diff --git a/champlain/champlain-viewport.h b/champlain/champlain-viewport.h
index 72d7782..766b2f7 100644
--- a/champlain/champlain-viewport.h
+++ b/champlain/champlain-viewport.h
@@ -29,12 +29,22 @@
G_BEGIN_DECLS
-#define CHAMPLAIN_TYPE_VIEWPORT (champlain_viewport_get_type ())
-#define CHAMPLAIN_VIEWPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_VIEWPORT, ChamplainViewport))
-#define CHAMPLAIN_IS_VIEWPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_VIEWPORT))
-#define CHAMPLAIN_VIEWPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_VIEWPORT, ChamplainViewportClass))
-#define CHAMPLAIN_IS_VIEWPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_VIEWPORT))
-#define CHAMPLAIN_VIEWPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_VIEWPORT, ChamplainViewportClass))
+#define CHAMPLAIN_TYPE_VIEWPORT champlain_viewport_get_type ()
+
+#define CHAMPLAIN_VIEWPORT(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_VIEWPORT, ChamplainViewport))
+
+#define CHAMPLAIN_IS_VIEWPORT(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_VIEWPORT))
+
+#define CHAMPLAIN_VIEWPORT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_VIEWPORT, ChamplainViewportClass))
+
+#define CHAMPLAIN_IS_VIEWPORT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_VIEWPORT))
+
+#define CHAMPLAIN_VIEWPORT_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_VIEWPORT, ChamplainViewportClass))
typedef struct _ChamplainViewport ChamplainViewport;
typedef struct _ChamplainViewportPrivate ChamplainViewportPrivate;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]