ftp://ftp.smr.ru/pub/0/FreeBSD/releases/distfiles/xscreensaver-3.16.tar.gz
[xscreensaver] / utils / xshm.h
1 /* xscreensaver, Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998
2  *  by Jamie Zawinski <jwz@jwz.org>
3  *
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 
10  * implied warranty.
11  */
12
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.
17  */
18
19 #ifndef __XSCREENSAVER_XSHM_H__
20
21 #ifdef HAVE_XSHM_EXTENSION
22
23 # include <sys/ipc.h>
24 # include <sys/shm.h>
25 # include <X11/extensions/XShm.h>
26
27 extern XImage *create_xshm_image (Display *dpy, Visual *visual,
28                                   unsigned int depth,
29                                   int format, char *data,
30                                   XShmSegmentInfo *shm_info,
31                                   unsigned int width, unsigned int height);
32
33 #endif /* HAVE_XSHM_EXTENSION */
34
35 #endif /* __XSCREENSAVER_XSHM_H__ */