]> Pileus Git - grits/commitdiff
Document GisCallback
authorAndy Spencer <andy753421@gmail.com>
Mon, 8 Feb 2010 22:30:02 +0000 (22:30 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 8 Feb 2010 22:30:02 +0000 (22:30 +0000)
src/objects/gis-callback.c
src/objects/gis-callback.h

index 05fa7467b5769abe92f5a5bc3651c3aedd3801a7..9e6373757166c17bd46c8dbe2c36dba4e537d480 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+/**
+ * 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 <config.h>
 #include "gis-callback.h"
 
 #include <config.h>
 #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);
 GisCallback *gis_callback_new(GisCallbackFunc callback, gpointer user_data)
 {
        GisCallback *cb = g_object_new(GIS_TYPE_CALLBACK, NULL);
index aa95ff976040fd7c2e78e022120eeb8bdf43c5dd..b9c77da8a8fbefb9d96e2b56610ca4431e5434e3 100644 (file)
 typedef struct _GisCallback      GisCallback;
 typedef struct _GisCallbackClass GisCallbackClass;
 
 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 {
 typedef void (*GisCallbackFunc)(GisCallback *callback, gpointer user_data);
 
 struct _GisCallback {