1 /* xscreensaver, Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 2001
2 * by 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 /* The MIT-SHM (Shared Memory) extension is pretty tricky to use.
14 This file contains the common boiler-plate for creating a shared
15 XImage structure, and for making sure that the shared memory segments
16 get allocated and shut down cleanly.
19 #ifndef __XSCREENSAVER_XSHM_H__
21 #ifdef HAVE_XSHM_EXTENSION
25 # include <X11/extensions/XShm.h>
27 extern XImage *create_xshm_image (Display *dpy, Visual *visual,
29 int format, char *data,
30 XShmSegmentInfo *shm_info,
31 unsigned int width, unsigned int height);
32 extern void destroy_xshm_image (Display *dpy, XImage *image,
33 XShmSegmentInfo *shm_info);
35 #endif /* HAVE_XSHM_EXTENSION */
37 #endif /* __XSCREENSAVER_XSHM_H__ */