Merge branch 'mesa_7_5_branch'
[mesa.git] / src / gallium / auxiliary / util / u_handle_table.h
index 51fc273865feefb5284485c00687ffe78ada0de8..d080135c9f40d479173ce9648698753870243046 100644 (file)
@@ -26,6 +26,7 @@
  **************************************************************************/
 
 /**
+ * @file
  * Generic handle table.
  *  
  * @author José Fonseca <jrfonseca@tungstengraphics.com>
@@ -42,6 +43,8 @@ extern "C" {
    
 /**
  * Abstract data type to map integer handles to objects.
+ * 
+ * Also referred as "pointer array".
  */
 struct handle_table;
 
@@ -70,6 +73,14 @@ unsigned
 handle_table_add(struct handle_table *ht, 
                  void *object);
 
+/**
+ * Returns zero on failure (out of memory).
+ */
+unsigned
+handle_table_set(struct handle_table *ht, 
+                 unsigned handle,
+                 void *object);
+
 /**
  * Fetch an existing object.
  * 
@@ -89,6 +100,15 @@ void
 handle_table_destroy(struct handle_table *ht);
 
 
+unsigned
+handle_table_get_first_handle(struct handle_table *ht);
+
+
+unsigned
+handle_table_get_next_handle(struct handle_table *ht,
+                             unsigned handle);
+
+
 #ifdef __cplusplus
 }
 #endif