[libchamplain] ChamplainMapSourceConstructor is more binding friendly.
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Subject: [libchamplain] ChamplainMapSourceConstructor is more binding friendly.
- Date: Fri, 12 Jun 2009 00:59:03 -0400 (EDT)
commit 10c36e424e231c8b0e6f0b2c3d2a3a55d32ac564
Author: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
Date: Mon May 18 21:26:09 2009 +0200
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.
champlain/champlain-map-source-desc.h | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]