From 36afb0e0cb18e36835a0a6b73eb9fbd92c23ff0c Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Mon, 8 Feb 2010 22:30:02 +0000 Subject: [PATCH] Document GisCallback --- src/objects/gis-callback.c | 18 ++++++++++++++++++ src/objects/gis-callback.h | 7 +++++++ 2 files changed, 25 insertions(+) diff --git a/src/objects/gis-callback.c b/src/objects/gis-callback.c index 05fa746..9e63737 100644 --- a/src/objects/gis-callback.c +++ b/src/objects/gis-callback.c @@ -15,6 +15,15 @@ * along with this program. If not, see . */ +/** + * SECTION:gis-callback + * @short_description: Custom callback objects + * + * #GisCallback objects are used for custom drawing functions. A common example + * of this would be to render something which does not easily fit into a normal + * object. For instance, a Heads-Up-Display overlay. + */ + #include #include "gis-callback.h" @@ -28,6 +37,15 @@ static void gis_callback_class_init(GisCallbackClass *klass) { } +/** + * gis_callback_new: + * @callback: the function to call to draw the object + * @user_data: user data to pass to the drawing function + * + * Create a #GisCallback object with an associated function and user data. + * + * Returns: the new #GisCallback + */ GisCallback *gis_callback_new(GisCallbackFunc callback, gpointer user_data) { GisCallback *cb = g_object_new(GIS_TYPE_CALLBACK, NULL); diff --git a/src/objects/gis-callback.h b/src/objects/gis-callback.h index aa95ff9..b9c77da 100644 --- a/src/objects/gis-callback.h +++ b/src/objects/gis-callback.h @@ -33,6 +33,13 @@ typedef struct _GisCallback GisCallback; typedef struct _GisCallbackClass GisCallbackClass; +/** + * GisCallbackFunc: + * @callback: the callback object to be drawn + * @user_data: the user data associated with the callback + * + * A function to be called when the callback object is being rendered + */ typedef void (*GisCallbackFunc)(GisCallback *callback, gpointer user_data); struct _GisCallback { -- 2.43.2