From: Emmanuel Rodriguez Date: Mon, 18 May 2009 19:26:09 +0000 (+0200) Subject: ChamplainMapSourceConstructor is more binding friendly. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10c36e424e231c8b0e6f0b2c3d2a3a55d32ac564;p=libchamplain ChamplainMapSourceConstructor is more binding friendly. Since the constructor is a callback it is now passed an extra gpointer. This will allow the bindings to properly pass a custom parameter that will wrap a language defined function with the extra parameters. The type ChamplainMapSourceDesc has been enhanced with an extra gpointer. --- diff --git a/champlain/champlain-map-source-desc.h b/champlain/champlain-map-source-desc.h index 358b67a..1840036 100644 --- a/champlain/champlain-map-source-desc.h +++ b/champlain/champlain-map-source-desc.h @@ -27,6 +27,10 @@ G_BEGIN_DECLS + +typedef struct _ChamplainMapSourceDesc ChamplainMapSourceDesc; + + /** * ChamplainMapSourceConstructor: * @@ -35,7 +39,8 @@ G_BEGIN_DECLS * * Since: 0.4 */ -typedef ChamplainMapSource * (*ChamplainMapSourceConstructor) (); +typedef ChamplainMapSource * (*ChamplainMapSourceConstructor) ( + ChamplainMapSourceDesc *desc, gpointer *data); #define CHAMPLAIN_MAP_SOURCE_CONSTRUCTOR (f) ((ChamplainMapSourceConstructor) (f)) #define CHAMPLAIN_MAP_SOURCE_DESC(obj) ((ChamplainMapSourceDesc *) (obj)) @@ -47,7 +52,7 @@ typedef ChamplainMapSource * (*ChamplainMapSourceConstructor) (); * * Since: 0.4 */ -typedef struct { +struct _ChamplainMapSourceDesc { gchar *id; gchar *name; gchar *license; @@ -56,7 +61,8 @@ typedef struct { gint max_zoom_level; ChamplainMapProjection projection; ChamplainMapSourceConstructor constructor; -} ChamplainMapSourceDesc; + gpointer *data; +}; G_END_DECLS