* specified, and corresponds to the "main" main loop. See also
* g_main_context_get_thread_default().
*
- * Return value: the global default main context.
+ * Return value: (transfer none): the global default main context.
**/
GMainContext *
g_main_context_default (void)
* non-default context, so it is not safe to assume that this will
* always return %NULL if threads are not initialized.)
*
- * Returns: the thread-default #GMainContext, or %NULL if the
- * thread-default context is the global default context.
+ * Returns: (transfer none): the thread-default #GMainContext, or
+ * %NULL if the thread-default context is the global default context.
*
* Since: 2.22
**/
* Gets the #GMainContext with which the source is associated.
* Calling this function on a destroyed source is an error.
*
- * Return value: the #GMainContext with which the source is associated,
- * or %NULL if the context has not yet been added
- * to a source.
+ * Return value: (transfer none): the #GMainContext with which the
+ * source is associated, or %NULL if the context has not
+ * yet been added to a source.
**/
GMainContext *
g_source_get_context (GSource *source)
*
* Finds a #GSource given a pair of context and ID.
*
- * Return value: the #GSource if found, otherwise, %NULL
+ * Return value: (transfer none): the #GSource if found, otherwise, %NULL
**/
GSource *
g_main_context_find_source_by_id (GMainContext *context,
* multiple sources exist with the same source function and user data,
* the first one found will be returned.
*
- * Return value: the source, if one was found, otherwise %NULL
+ * Return value: (transfer none): the source, if one was found, otherwise %NULL
**/
GSource *
g_main_context_find_source_by_funcs_user_data (GMainContext *context,
* multiple sources exist with the same user data, the first
* one found will be returned.
*
- * Return value: the source, if one was found, otherwise %NULL
+ * Return value: (transfer none): the source, if one was found, otherwise %NULL
**/
GSource *
g_main_context_find_source_by_user_data (GMainContext *context,
*
* Returns the currently firing source for this thread.
*
- * Return value: The currently firing source or %NULL.
+ * Return value: (transfer none): The currently firing source or %NULL.
*
* Since: 2.12
*/
* g_main_context_query:
* @context: a #GMainContext
* @max_priority: maximum priority source to check
- * @timeout_: location to store timeout to be used in polling
- * @fds: location to store #GPollFD records that need to be polled.
+ * @timeout_: (out): location to store timeout to be used in polling
+ * @fds: (out caller-allocates) (array length=n_fds): location to
+ * store #GPollFD records that need to be polled.
* @n_fds: length of @fds.
*
* Determines information necessary to poll this main loop.
* g_main_context_check:
* @context: a #GMainContext
* @max_priority: the maximum numerical priority of sources to check
- * @fds: array of #GPollFD's that was passed to the last call to
- * g_main_context_query()
+ * @fds: (array length=n_fds): array of #GPollFD's that was passed to
+ * the last call to g_main_context_query()
* @n_fds: return value of g_main_context_query()
*
* Passes the results of polling back to the main loop.
*
* Returns the #GMainContext of @loop.
*
- * Return value: the #GMainContext of @loop
+ * Return value: (transfer none): the #GMainContext of @loop
**/
GMainContext *
g_main_loop_get_context (GMainLoop *loop)
/**
* g_main_context_invoke:
- * @context: a #GMainContext, or %NULL
+ * @context: (allow-none): a #GMainContext, or %NULL
* @function: function to call
* @data: data to pass to @function
*
/**
* g_main_context_invoke_full:
- * @context: a #GMainContext, or %NULL
+ * @context: (allow-none): a #GMainContext, or %NULL
* @priority: the priority at which to run @function
* @function: function to call
* @data: data to pass to @function
/**
* GSourceFunc:
- * @data: data passed to the function, set when the source was
+ * @user_data: data passed to the function, set when the source was
* created with one of the above functions
*
* Specifies the type of function passed to g_timeout_add(),
*
* Returns: %FALSE if the source should be removed
*/
-typedef gboolean (*GSourceFunc) (gpointer data);
+typedef gboolean (*GSourceFunc) (gpointer user_data);
/**
* GChildWatchFunc:
* @pid: the process id of the child process
* @status: Status information about the child process,
* see waitpid(2) for more information about this field
- * @data: user data passed to g_child_watch_add()
+ * @user_data: user data passed to g_child_watch_add()
*
* The type of functions to be called when a child exists.
*/
typedef void (*GChildWatchFunc) (GPid pid,
gint status,
- gpointer data);
+ gpointer user_data);
struct _GSource
{
/*< private >*/
*/
#define G_TYPE_VARIANT_BUILDER (g_variant_builder_get_type ())
+/**
+ * G_TYPE_MAIN_LOOP:
+ *
+ * The #GType for a boxed type holding a #GMainLoop.
+ *
+ * Since: 2.30
+ */
+#define G_TYPE_MAIN_LOOP (g_main_loop_get_type ())
+
+/**
+ * G_TYPE_MAIN_CONTEXT:
+ *
+ * The #GType for a boxed type holding a #GMainContext.
+ *
+ * Since: 2.30
+ */
+#define G_TYPE_MAIN_CONTEXT (g_main_context_get_type ())
+
+/**
+ * G_TYPE_SOURCE:
+ *
+ * The #GType for a boxed type holding a #GSource.
+ *
+ * Since: 2.30
+ */
+#define G_TYPE_SOURCE (g_source_get_type ())
+
GType g_date_get_type (void) G_GNUC_CONST;
GType g_strv_get_type (void) G_GNUC_CONST;
GType g_gstring_get_type (void) G_GNUC_CONST;
GType g_io_channel_get_type (void) G_GNUC_CONST;
GType g_io_condition_get_type (void) G_GNUC_CONST;
GType g_variant_builder_get_type (void) G_GNUC_CONST;
+GType g_main_loop_get_type (void) G_GNUC_CONST;
+GType g_main_context_get_type (void) G_GNUC_CONST;
+GType g_source_get_type (void) G_GNUC_CONST;
#if !defined(G_DISABLE_DEPRECATED) || defined(__GI_SCANNER__)
GType g_variant_get_gtype (void) G_GNUC_CONST;