author | Alan Coopersmith <Alan.Coopersmith@Sun.COM> |
Thu, 18 Feb 2010 16:03:08 -0800 | |
changeset 907 | 3c35d611cdaa |
parent 830 | 186f3c438b46 |
child 919 | 425233ae7236 |
permissions | -rw-r--r-- |
830
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
1 |
/* Copyright 1993 Sun Microsystems, Inc. All rights reserved. |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
2 |
* Use is subject to license terms. |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
3 |
* |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
4 |
* Permission is hereby granted, free of charge, to any person obtaining a |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
5 |
* copy of this software and associated documentation files (the |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
6 |
* "Software"), to deal in the Software without restriction, including |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
7 |
* without limitation the rights to use, copy, modify, merge, publish, |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
8 |
* distribute, and/or sell copies of the Software, and to permit persons |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
9 |
* to whom the Software is furnished to do so, provided that the above |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
10 |
* copyright notice(s) and this permission notice appear in all copies of |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
11 |
* the Software and that both the above copyright notice(s) and this |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
12 |
* permission notice appear in supporting documentation. |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
13 |
* |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
14 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
15 |
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
16 |
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
17 |
* OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
18 |
* HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
19 |
* INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
20 |
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
21 |
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
22 |
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
23 |
* |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
24 |
* Except as contained in this notice, the name of a copyright holder |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
25 |
* shall not be used in advertising or otherwise to promote the sale, use |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
26 |
* or other dealings in this Software without prior written authorization |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
27 |
* of the copyright holder. |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
28 |
*/ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
29 |
|
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
30 |
|
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
31 |
#ifndef _PIX_GRAB_H |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
32 |
#define _PIX_GRAB_H |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
33 |
|
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
34 |
#ifndef PMODIF |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
35 |
#define PMODIF 1 /* server has set a new cache */ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
36 |
#define PIX_FILE "/shpxm" /* Shared info file base name*/ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
37 |
/* name is base name + port # + '.' */ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
38 |
/* + pixmap id */ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
39 |
#define PIX_FAILED 0 /* Fail Value returned from pix funcs */ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
40 |
#define PIX_PASSED -1 /* Pass Value returned from pix funcs */ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
41 |
|
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
42 |
/* client structure's pix_flag values */ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
43 |
#define PIX_NOTICE_CLIPCHG 1 |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
44 |
|
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
45 |
/* |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
46 |
* Shared Pixmap Information. This structure contains the information |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
47 |
* necessary to allow the server and client to share access to a DGA |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
48 |
* pixmap . This information is located in the first page of |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
49 |
* the shared memory created by the server in response to a call to |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
50 |
* XDgaGrabPixmap(). The server communicates the current state |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
51 |
* of the shared pixmap to the client through the fields within |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
52 |
* this structure. |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
53 |
*/ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
54 |
|
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
55 |
typedef struct shpx_client_entry { |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
56 |
u_int cid; /* client id */ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
57 |
SHPX_DIRECTORY *shpx_directory; /* server's per client shpx dir */ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
58 |
u_int fd; /* server's per client file descrptr*/ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
59 |
u_int size; /* client file size */ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
60 |
u_int npix; /* number of pixmaps using this entry */ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
61 |
} SHPX_CLIENT_ENTRY; |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
62 |
|
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
63 |
|
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
64 |
/* |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
65 |
* Internal DGA Pixmap Macros |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
66 |
*/ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
67 |
|
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
68 |
#define PIX_INFOP(clientp) ((SHARED_PIXMAP_INFO *) ((clientp)->p_infop)) |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
69 |
|
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
70 |
/* definitions of lock marcos for pixmaps - move this to dga.h later */ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
71 |
|
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
72 |
|
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
73 |
/* DGA_LOCK_SRC_AND_DST will go here after they are debugged */ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
74 |
#endif /* PMODIF */ |
186f3c438b46
6899630 move libdga to open-src & /usr/X11
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
75 |
#endif /* _PIX_GRAB_H */ |