[retro-gtk/wip/aplazas/options] Add missing documentation



commit afcaa31bbf651247f285694e29a88d30d182611c
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Fri Nov 24 12:06:49 2017 +0100

    Add missing documentation

 retro-gtk/retro-core.c   |   19 ++++++++++++++++++-
 retro-gtk/retro-option.c |   42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 1 deletions(-)
---
diff --git a/retro-gtk/retro-core.c b/retro-gtk/retro-core.c
index a03aff4..ed8e4dd 100644
--- a/retro-gtk/retro-core.c
+++ b/retro-gtk/retro-core.c
@@ -1932,7 +1932,15 @@ retro_core_iterate_controllers (RetroCore *self)
   return retro_controller_iterator_new (self->controllers);
 }
 
-
+/**
+ * retro_core_has_option:
+ * @self: a #RetroCore
+ * @key: the key of the option
+ *
+ * Gets whether the core has an option for the given key.
+ *
+ * Returns: whether the core has an option for the given key
+ */
 gboolean
 retro_core_has_option (RetroCore   *self,
                        const gchar *key)
@@ -1943,6 +1951,15 @@ retro_core_has_option (RetroCore   *self,
   return g_hash_table_contains (self->options, key);
 }
 
+/**
+ * retro_core_get_option:
+ * @self: a #RetroCore
+ * @key: the key of the option
+ *
+ * Gets the option for the given key.
+ *
+ * Returns: (transfer none): the option
+ */
 RetroOption *
 retro_core_get_option (RetroCore    *self,
                        const gchar  *key)
diff --git a/retro-gtk/retro-option.c b/retro-gtk/retro-option.c
index f40c12b..3216154 100644
--- a/retro-gtk/retro-option.c
+++ b/retro-gtk/retro-option.c
@@ -66,6 +66,14 @@ retro_option_init (RetroOption *self)
 
 /* Public */
 
+/**
+ * retro_option_get_key:
+ * @self: a #RetroOption
+ *
+ * Gets the key of @self.
+ *
+ * Returns: (transfer none): the key of @self
+ */
 const gchar *
 retro_option_get_key (RetroOption *self)
 {
@@ -74,6 +82,14 @@ retro_option_get_key (RetroOption *self)
   return self->key;
 }
 
+/**
+ * retro_option_get_description:
+ * @self: a #RetroOption
+ *
+ * Gets the description of @self.
+ *
+ * Returns: (transfer none): the description of @self
+ */
 const gchar *
 retro_option_get_description (RetroOption *self)
 {
@@ -82,6 +98,15 @@ retro_option_get_description (RetroOption *self)
   return self->description;
 }
 
+/**
+ * retro_option_get_values:
+ * @self: a #RetroOption
+ *
+ * Gets the value of @self.
+ *
+ * Returns: (array zero-terminated=1) (element-type utf8) (transfer none): the
+ * value of @self
+ */
 const gchar **
 retro_option_get_values (RetroOption *self)
 {
@@ -90,6 +115,14 @@ retro_option_get_values (RetroOption *self)
   return (const gchar **) self->values;
 }
 
+/**
+ * retro_option_get_value:
+ * @self: a #RetroOption
+ *
+ * Gets the value of @self.
+ *
+ * Returns: (transfer none): the value of @self
+ */
 const gchar *
 retro_option_get_value (RetroOption *self)
 {
@@ -98,6 +131,15 @@ retro_option_get_value (RetroOption *self)
   return self->values[self->value];
 }
 
+/**
+ * retro_option_set_value:
+ * @self: a #RetroOption
+ * @value: the value
+ * @error: return location for a #GError, or %NULL
+ *
+ * Sets the value for @self. An error will be thrown if the value is invalid for
+ * @self.
+ */
 void
 retro_option_set_value (RetroOption  *self,
                         const gchar  *value,


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