* @short_description: Loadable Icons
* @see_also: #GIcon, #GThemedIcon
*
- * Implements #GIcon and adds the ability to load icons.
- *
+ * Extends the #GIcon interface and adds the ability to load icons.
**/
static void g_loadable_icon_real_load_async (GLoadableIcon *icon,
* g_loadable_icon_load:
* @icon: a #GLoadableIcon.
* @size: an integer.
- * @type:
+ * @type: a location to store the type of the loaded icon, %NULL to ignore.
* @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError location to store the error occuring, or %NULL to
* ignore.
* Returns: a #GInputStream to read the icon from.
**/
GInputStream *
-g_loadable_icon_load (GLoadableIcon *icon,
- int size,
- char **type,
- GCancellable *cancellable,
- GError **error)
+g_loadable_icon_load (GLoadableIcon *icon,
+ int size,
+ char **type,
+ GCancellable *cancellable,
+ GError **error)
{
GLoadableIconIface *iface;
iface = G_LOADABLE_ICON_GET_IFACE (icon);
return (* iface->load) (icon, size, type, cancellable, error);
-
}
/**
* Loads an icon asynchronously. To finish this function, see
* g_loadable_icon_load_finish(). For the synchronous, blocking
* version of this function, see g_loadable_icon_load().
- *
**/
void
-g_loadable_icon_load_async (GLoadableIcon *icon,
- int size,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
+g_loadable_icon_load_async (GLoadableIcon *icon,
+ int size,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
GLoadableIconIface *iface;
iface = G_LOADABLE_ICON_GET_IFACE (icon);
(* iface->load_async) (icon, size, cancellable, callback, user_data);
-
}
/**
* g_loadable_icon_load_finish:
* @icon: a #GLoadableIcon.
* @res: a #GAsyncResult.
- * @type:
+ * @type: a location to store the type of the loaded icon, %NULL to ignore.
* @error: a #GError location to store the error occuring, or %NULL to
* ignore.
*
* Returns: a #GInputStream to read the icon from.
**/
GInputStream *
-g_loadable_icon_load_finish (GLoadableIcon *icon,
- GAsyncResult *res,
- char **type,
- GError **error)
+g_loadable_icon_load_finish (GLoadableIcon *icon,
+ GAsyncResult *res,
+ char **type,
+ GError **error)
{
GLoadableIconIface *iface;
iface = G_LOADABLE_ICON_GET_IFACE (icon);
return (* iface->load_finish) (icon, res, type, error);
-
}
/********************************************
static void
load_async_thread (GSimpleAsyncResult *res,
- GObject *object,
- GCancellable *cancellable)
+ GObject *object,
+ GCancellable *cancellable)
{
GLoadableIconIface *iface;
GInputStream *stream;
static void
-g_loadable_icon_real_load_async (GLoadableIcon *icon,
- int size,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
+g_loadable_icon_real_load_async (GLoadableIcon *icon,
+ int size,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
GSimpleAsyncResult *res;
LoadData *data;
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res);
LoadData *data;
- g_assert (g_simple_async_result_get_source_tag (simple) == g_loadable_icon_real_load_async);
+ g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == g_loadable_icon_real_load_async);
data = g_simple_async_result_get_op_res_gpointer (simple);