Don't install test plugins
[rodin/chimara.git] / libchimara / resource.c
index c6b4d34dc0cd4433c74461a48f91b988b2847a2e..b3c98ecbdc1ee9724daed6849b2bee1ad1f46136 100644 (file)
@@ -1,22 +1,25 @@
 #include "resource.h"
 
-extern ChimaraGlkPrivate *glk_data;
+extern GPrivate *glk_data_key;
 
 /**
  * giblorb_set_resource_map:
- * @file The file stream to read the resource map from
+ * @file: The file stream to read the resource map from
  *
  * This function tells the library that the file is indeed the Blorby source
  * of all resource goodness. Whenever your program calls an image or sound
  * function, such as glk_image_draw(), the library will search this file for
  * the resource you request. 
  *
- * Do not close the stream after calling this function. The library is
- * responsible for closing the stream at shutdown time.
+ * Do <emphasis>not</emphasis> close the stream after calling this function. 
+ * The library is responsible for closing the stream at shutdown time.
+ *
+ * Returns: a Blorb error code.
  */
 giblorb_err_t
 giblorb_set_resource_map(strid_t file)
 {
+       ChimaraGlkPrivate *glk_data = g_private_get(glk_data_key);
        giblorb_map_t *newmap; /* create map allocates memory */
        giblorb_err_t error = giblorb_create_map(file, &newmap);
 
@@ -40,12 +43,16 @@ giblorb_set_resource_map(strid_t file)
 /**
  * giblorb_get_resource_map:
  * 
- * This function returns the current resource map being used. Returns NULL
- * if #giblorb_set_resource_map() has not been called yet.
+ * This function returns the current resource map being used. Returns %NULL
+ * if giblorb_set_resource_map() has not been called yet.
+ *
+ * Returns: a resource map, or %NULL.
  */
 giblorb_map_t*
 giblorb_get_resource_map()
 {
+       ChimaraGlkPrivate *glk_data = g_private_get(glk_data_key);
+       
        if(glk_data->resource_map == NULL) {
                WARNING("Resource map not set yet.\n");
        }