[anjuta] libanjuta: add some gobject-introspection annotations



commit 14450fad85bdf2b86a3856686de5c8ea2e067bd7
Author: Abderrahim Kitouni <a kitouni gmail com>
Date:   Fri Dec 17 22:15:07 2010 +0100

    libanjuta: add some gobject-introspection annotations
    
    There is much work to do on this front, I've only looked at APIs used
    by the vala support plugin or that prevent correct generation of vapi

 libanjuta/anjuta-plugin.c          |    4 +-
 libanjuta/anjuta-project.h         |    6 +++-
 libanjuta/anjuta-shell.c           |    2 +-
 libanjuta/anjuta-status.c          |    5 +++-
 libanjuta/interfaces/libanjuta.idl |   44 ++++++++++++++++++------------------
 5 files changed, 33 insertions(+), 28 deletions(-)
---
diff --git a/libanjuta/anjuta-plugin.c b/libanjuta/anjuta-plugin.c
index 196e4e3..27d0e50 100644
--- a/libanjuta/anjuta-plugin.c
+++ b/libanjuta/anjuta-plugin.c
@@ -405,8 +405,8 @@ value_removed_cb (AnjutaShell *shell,
  * anjuta_plugin_add_watch:
  * @plugin: a #AnjutaPlugin derived class object.
  * @name: Name of the value to watch.
- * @added: Callback to call when the value is added.
- * @removed: Callback to call when the value is removed.
+ * @added: (closure user_data) (scope call): Callback to call when the value is added.
+ * @removed: (closure user_data) (scope call): Callback to call when the value is removed.
  * @user_data: User data to pass to callbacks.
  * 
  * Adds a watch for @name value. When the value is added in shell, the @added
diff --git a/libanjuta/anjuta-project.h b/libanjuta/anjuta-project.h
index 8ca2fb5..687f0f3 100644
--- a/libanjuta/anjuta-project.h
+++ b/libanjuta/anjuta-project.h
@@ -212,12 +212,14 @@ AnjutaProjectNode *anjuta_project_source_get_node_from_file (const AnjutaProject
 
 #define ANJUTA_TYPE_PROJECT_NODE_INFO (anjuta_project_node_info_get_type ())
 
-typedef struct _AnjutaProjectNodeInfo
+typedef struct _AnjutaProjectNodeInfo  AnjutaProjectNodeInfo;
+
+struct _AnjutaProjectNodeInfo
 {
 	AnjutaProjectNodeType type;
 	gchar *name;
 	gchar *mime_type;
-} AnjutaProjectNodeInfo;
+};
 
 GType anjuta_project_node_info_get_type (void);
 
diff --git a/libanjuta/anjuta-shell.c b/libanjuta/anjuta-shell.c
index 6c1cb9e..4fc5187 100644
--- a/libanjuta/anjuta-shell.c
+++ b/libanjuta/anjuta-shell.c
@@ -756,7 +756,7 @@ anjuta_shell_remove_value (AnjutaShell *shell,
  * Notice that this function takes the interface name string as string, unlike
  * anjuta_plugins_get_interface() which takes the type directly.
  *
- * Return value: A plugin object implementing the primary interface or NULL.
+ * Return value: (transfer none): A plugin object implementing the primary interface or NULL.
  */
 GObject*
 anjuta_shell_get_object (AnjutaShell *shell, const gchar *iface_name,
diff --git a/libanjuta/anjuta-status.c b/libanjuta/anjuta-status.c
index bdcede2..a5ead1e 100644
--- a/libanjuta/anjuta-status.c
+++ b/libanjuta/anjuta-status.c
@@ -610,7 +610,10 @@ anjuta_status_timeout (AnjutaStatus *status)
 	return FALSE;
 }
 
-/* Display message in status until timeout (secondes) */
+/**
+ * anjuta_status: (skip)
+ * Display message in status until timeout (seconds)
+ */
 void
 anjuta_status (AnjutaStatus *status, const gchar *mesg, gint timeout)
 {
diff --git a/libanjuta/interfaces/libanjuta.idl b/libanjuta/interfaces/libanjuta.idl
index 65bc6db..ef4e529 100644
--- a/libanjuta/interfaces/libanjuta.idl
+++ b/libanjuta/interfaces/libanjuta.idl
@@ -53,7 +53,7 @@ interface IAnjutaFile
 	 *
 	 * Returns the file that was opened with ianjuta_file_open().
 	 *
-	 * Return value: The last file opened.
+	 * Return value: (transfer full): The last file opened.
 	 */
 	GFile* get_file ();
 	
@@ -498,15 +498,15 @@ interface IAnjutaIterable
 	gint get_length ();
 
 	/**
-	* ianjuta_iterable_clone:
-	* @obj: Self
-	* @err: Error propagation and reporting
-	* 
-	* Clones the iterable. The returned iterable object must be unreffed
-	* when done.
-	*
-	* Returns: A new instance of this iterable pointing at the same location.
-	*/
+	 * ianjuta_iterable_clone:
+	 * @obj: Self
+	 * @err: Error propagation and reporting
+	 * 
+	 * Clones the iterable. The returned iterable object must be unreffed
+	 * when done.
+	 *
+	 * Returns: (transfer full): A new instance of this iterable pointing at the same location.
+	 */
 	IAnjutaIterable *clone ();
 
 	/**
@@ -1566,15 +1566,15 @@ interface IAnjutaEditor
 	gint get_column ();
 	
 	/**
-	* ianjuta_editor_get_line_begin_position:
-	* @obj: Self
-	* @line: fixme
-	* @err: Error propagation and reporting.
-	*
-	* fixme
-	*
-	* Returns: fixme
-	*/
+	 * ianjuta_editor_get_line_begin_position:
+	 * @obj: Self
+	 * @line: fixme
+	 * @err: Error propagation and reporting.
+	 *
+	 * fixme
+	 *
+	 * Returns: (transfer full): fixme
+	 */
 	IAnjutaIterable* get_line_begin_position (gint line);
 	
 	/**
@@ -1625,14 +1625,14 @@ interface IAnjutaEditor
 	 */
 	gint   get_offset ();
 	
-	/*
+	/**
 	 * ianjuta_editor_get_position:
 	 * @obj: Self
 	 * @err: Error propagation and reporting
 	 *
 	 * Get current caret position.
 	 *
-	 * Returns: Iterator that points to the current position.
+	 * Returns: (transfer full): Iterator that points to the current position.
 	 */
 	IAnjutaIterable*   get_position ();
 	
@@ -3618,7 +3618,7 @@ interface IAnjutaProjectManager
 	 * @obj: Self
 	 * @err: Error propagation and reporting.
 	 *
-	 * Returns: (element-type utf8): the list of pkg-config packages that the current project
+	 * Returns: (element-type utf8) (transfer full): the list of pkg-config packages that the current project
 	 * requires in it's configure.ac. Can be NULL if there is no project
 	 * opened currently or no package is required.
 	 */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]