X-Git-Url: http://pileus.org/git/?p=grits;a=blobdiff_plain;f=src%2Fobjects%2Fgis-tile.h;h=98052c69abb821d4f7b2634891e59abc523f8f7d;hp=06ce337af5443f191558a42644fb73404b337e7b;hb=9bdbbfd22cc893880cd5f7671917acf15f5e82e5;hpb=36afb0e0cb18e36835a0a6b73eb9fbd92c23ff0c diff --git a/src/objects/gis-tile.h b/src/objects/gis-tile.h index 06ce337..98052c6 100644 --- a/src/objects/gis-tile.h +++ b/src/objects/gis-tile.h @@ -55,15 +55,46 @@ struct _GisTileClass { GisObjectClass parent_class; }; +/** + * GisTileLoadFunc: + * @tile: the tile to load + * @user_data: data paseed to the function + * + * Used to load the image data associated with a tile. For GisOpenGL, this + * function should store the OpenGL texture number in the tiles data field. + */ typedef void (*GisTileLoadFunc)(GisTile *tile, gpointer user_data); + +/** + * GisTileFreeFunc: + * @tile: the tile to free + * @user_data: data paseed to the function + * + * Used to free the image data associated with a tile + */ typedef void (*GisTileFreeFunc)(GisTile *tile, gpointer user_data); /* Forech functions */ +/** + * gis_tile_foreach: + * @parent: the #GisTile to iterate over + * @child: a pointer to a #GisTile to store the current subtile + * + * Iterate over each imediate subtile of @parent. + */ #define gis_tile_foreach(parent, child) \ for (int _x = 0; _x < G_N_ELEMENTS(parent->children); _x++) \ for (int _y = 0; child = parent->children[_x][_y], \ _y < G_N_ELEMENTS(parent->children[_x]); _y++) +/** + * gis_tile_foreach_index: + * @parent: the #GisTile to iterate over + * @x: integer to store the x index of the current subtile + * @y: integer to store the y index of the current subtile + * + * Iterate over each imediate subtile of @parent. + */ #define gis_tile_foreach_index(parent, x, y) \ for (x = 0; x < G_N_ELEMENTS(parent->children); x++) \ for (y = 0; y < G_N_ELEMENTS(parent->children[x]); y++)