|  |  |  | GIO Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Prerequisites | Known Implementations | ||||
#include <gio/gio.h>
                    GLoadableIcon;
struct              GLoadableIconIface;
GInputStream *      g_loadable_icon_load                (GLoadableIcon *icon,
                                                         int size,
                                                         char **type,
                                                         GCancellable *cancellable,
                                                         GError **error);
void                g_loadable_icon_load_async          (GLoadableIcon *icon,
                                                         int size,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GInputStream *      g_loadable_icon_load_finish         (GLoadableIcon *icon,
                                                         GAsyncResult *res,
                                                         char **type,
                                                         GError **error);
typedef struct _GLoadableIcon GLoadableIcon;
Generic type for all kinds of icons that can be loaded as a stream.
struct GLoadableIconIface {
  GTypeInterface g_iface;
  /* Virtual Table */
  GInputStream * (* load)        (GLoadableIcon       *icon,
                                  int                  size,
                                  char               **type,
                                  GCancellable        *cancellable,
                                  GError             **error);
  void           (* load_async)  (GLoadableIcon       *icon,
                                  int                  size,
                                  GCancellable        *cancellable,
                                  GAsyncReadyCallback  callback,
                                  gpointer             user_data);
  GInputStream * (* load_finish) (GLoadableIcon       *icon,
                                  GAsyncResult        *res,
                                  char               **type,
                                  GError             **error);
};
Interface for icons that can be loaded as a stream.
| GTypeInterface  | The parent interface. | 
| Loads an icon. | |
| Loads an icon asynchronously. | |
| Finishes an asynchronous icon load. | 
GInputStream * g_loadable_icon_load (GLoadableIcon *icon,int size,char **type,GCancellable *cancellable,GError **error);
Loads a loadable icon. For the asynchronous version of this function, 
see g_loadable_icon_load_async().
| 
 | a GLoadableIcon. | 
| 
 | an integer. | 
| 
 | a location to store the type of the
loaded icon, NULLto ignore. [out][allow-none] | 
| 
 | optional GCancellable object, NULLto ignore. [allow-none] | 
| 
 | a GError location to store the error occuring, or NULLto
ignore. | 
| Returns : | a GInputStream to read the icon from. [transfer full] | 
void g_loadable_icon_load_async (GLoadableIcon *icon,int size,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
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().
| 
 | a GLoadableIcon. | 
| 
 | an integer. | 
| 
 | optional GCancellable object, NULLto ignore. [allow-none] | 
| 
 | a GAsyncReadyCallback to call when the request is satisfied. [scope async] | 
| 
 | the data to pass to callback function. [closure] | 
GInputStream * g_loadable_icon_load_finish (GLoadableIcon *icon,GAsyncResult *res,char **type,GError **error);
Finishes an asynchronous icon load started in g_loadable_icon_load_async().
| 
 | a GLoadableIcon. | 
| 
 | a GAsyncResult. | 
| 
 | a location to store the type of the loaded icon, NULLto ignore. | 
| 
 | a GError location to store the error occuring, or NULLto
ignore. | 
| Returns : | a GInputStream to read the icon from. [transfer full] |