+extern void load_random_image (Screen *screen,
+ Window top_level_window,
+ Drawable target_window_or_pixmap,
+ char **filename_return);
+
+/* Like the above, but loads the image in the background and runs the
+ given callback once it has been loaded.
+ */
+extern void fork_load_random_image (Screen *screen, Window window,
+ Drawable drawable,
+ void (*callback) (Screen *, Window,
+ Drawable,
+ const char *name,
+ void *closure),
+ void *closure);
+
+
+/* Whether one should use GCSubwindowMode when drawing on this window
+ (assuming a screen image has been grabbed onto it.) Yes, this is a
+ total kludge. */
+extern Bool use_subwindow_mode_p(Screen *screen, Window window);
+
+/* Whether the given window is:
+ - the real root window;
+ - the virtual root window;
+ - a direct child of the root window;
+ - a direct child of the window manager's decorations.
+ */
+extern Bool top_level_window_p(Screen *screen, Window window);
+
+
+/* Don't call this: this is for the "xscreensaver-getimage" program only. */
+extern void grab_screen_image_internal (Screen *, Window);
+
+/* Don't use this: this is how "xscreensaver-getimage" and "grabclient.c"
+ pass the file name around. */
+#define XA_XSCREENSAVER_IMAGE_FILENAME "_SCREENSAVER_IMAGE_FILENAME"