-extern void load_random_image (Screen *screen,
- Window top_level_window,
- Drawable target_window_or_pixmap,
- char **filename_return);
+extern void load_image_async (Screen *, Window, Drawable,
+ void (*callback) (Screen *, Window,
+ Drawable,
+ const char *name,
+ XRectangle *geometry,
+ void *closure),
+ void *closure);
+
+/* A utility wrapper around load_image_async() that is simpler if you
+ are only loading a single image at a time: just keep calling it
+ periodically until it returns NULL. When it does, the image has
+ been loaded.
+ */
+typedef struct async_load_state async_load_state;
+extern async_load_state *load_image_async_simple (async_load_state *,
+ Screen *,
+ Window top_level,
+ Drawable target,
+ char **filename_ret,
+ XRectangle *geometry_ret);
+