1 /* xscreensaver, Copyright (c) 1992, 1993, 1994, 1997, 2001, 2003
2 * Jamie Zawinski <jwz@jwz.org>
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation. No representations are made about the suitability of this
9 * software for any purpose. It is provided "as is" without express or
13 #ifndef __GRABSCREEN_H__
14 #define __GRABSCREEN_H__
16 /* This will write an image onto the given Drawable.
17 The Drawable (arg 3) may be a Window or a Pixmap.
19 The Window must be the top-level window. The image *may or may not*
20 be written to the window, though it will definitely be written to
21 the drawable. It's fine for args 2 and 3 to be the same window, or
22 for arg 2 to be a Window, and arg 3 to be a Pixmap.
24 The loaded image might be from a file, or from a screen shot of the
25 desktop, or from the system's video input, depending on user
28 Many colors may be allocated from the window's colormap.
30 extern void load_random_image (Screen *screen,
31 Window top_level_window,
32 Drawable target_window_or_pixmap);
35 /* Uh, don't call this. */
36 extern void grab_screen_image (Screen *, Window);
39 /* Whether one should use GCSubwindowMode when drawing on this window
40 (assuming a screen image has been grabbed onto it.) Yes, this is a
42 extern Bool use_subwindow_mode_p(Screen *screen, Window window);
44 /* Whether the given window is:
45 - the real root window;
46 - the virtual root window;
47 - a direct child of the root window;
48 - a direct child of the window manager's decorations.
50 extern Bool top_level_window_p(Screen *screen, Window window);
52 #endif /* __GRABSCREEN_H__ */