Commit bf5bf481 authored by Jiří Techet's avatar Jiří Techet

Whitespace and alignment cleanups

parent 8634c7e6
......@@ -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
{
......
......@@ -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;
......
......@@ -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:
......
......@@ -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;
......
......@@ -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);
}
......
......@@ -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);
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
......
......@@ -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));
}
......
......@@ -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));
}
......
......@@ -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;
......
......@@ -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));
/**
......
......@@ -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
{
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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),
......
......@@ -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));
......
......@@ -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,