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

index ac01a294379b67c512ca585b815fad9407c7079b..84e5c4722eb3d07af753736cac19f80e2b8921a1 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+/**
+ * SECTION:gis-object
+ * @short_description: Base classes for drawing operations
+ *
+ * Objects in libgis are things which can be added to the viewer and will be
+ * displayed to the user. Each object has information such as it's location and
+ * level of detail which are used by the viewer to determine which objects
+ * should be drawn.
+ *
+ * Each #GisObject is also a #GObject, but not every GObject in libgis is a
+ * GisObject. The "Object" part of the name is just coincidence.
+ */
+
 #include <config.h>
 #include "gis-object.h"
 
-
-/* GisPoint */
+/************
+ * GisPoint *
+ ************/
+/**
+ * gis_point_new:
+ *
+ * Create a new #GisPoint
+ *
+ * Returns: the new point
+ */
 GisPoint *gis_point_new()
 {
        return g_new0(GisPoint, 1);
 }
 
+/**
+ * gis_point_set_lle:
+ * @point: the point to modify
+ * @lat:   the new latitude
+ * @lon:   the new longitude
+ * @elev:  the new elevation
+ *
+ * Set the latitude, longitude, and elevation for a point.
+ */
 void gis_point_set_lle(GisPoint *point, gdouble lat, gdouble lon, gdouble elev)
 {
        point->lat  = lat;
@@ -32,13 +62,22 @@ void gis_point_set_lle(GisPoint *point, gdouble lat, gdouble lon, gdouble elev)
        point->elev = elev;
 }
 
+/**
+ * gis_point_free:
+ * @point: The point to free
+ *
+ * Free data used by a #GisPoint
+ */
 void gis_point_free(GisPoint *point)
 {
        g_free(point);
 }
 
 
-/* GisObject */
+/*************
+ * GisObject *
+ *************/
+/* GObject stuff */
 G_DEFINE_ABSTRACT_TYPE(GisObject, gis_object, G_TYPE_OBJECT);
 static void gis_object_init(GisObject *object)
 {
index 313f454f49fe5c52a4c17ad1d2449f9f96f12f49..4f105d80a1f7a25f1a2c8304553e9878629f2ee3 100644 (file)
@@ -56,6 +56,14 @@ struct _GisObjectClass {
 
 GType gis_object_get_type(void);
 
+/**
+ * gis_object_center:
+ * @object: The #GisObject to get the center of
+ * 
+ * Get the #GisPoint representing the center of an object
+ *
+ * Returns: the center point
+ */
 #define gis_object_center(object) \
        (&GIS_OBJECT(object)->center)