dga_rtnshared.h revision 830
546N/A/* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
546N/A * Use is subject to license terms.
546N/A *
546N/A * Permission is hereby granted, free of charge, to any person obtaining a
546N/A * copy of this software and associated documentation files (the
546N/A * "Software"), to deal in the Software without restriction, including
546N/A * without limitation the rights to use, copy, modify, merge, publish,
546N/A * distribute, and/or sell copies of the Software, and to permit persons
546N/A * to whom the Software is furnished to do so, provided that the above
546N/A * copyright notice(s) and this permission notice appear in all copies of
546N/A * the Software and that both the above copyright notice(s) and this
546N/A * permission notice appear in supporting documentation.
546N/A *
546N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
546N/A * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
546N/A * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
546N/A * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
1233N/A * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
546N/A * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
546N/A * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
919N/A * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
919N/A * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
919N/A *
919N/A * Except as contained in this notice, the name of a copyright holder
919N/A * shall not be used in advertising or otherwise to promote the sale, use
546N/A * or other dealings in this Software without prior written authorization
919N/A * of the copyright holder.
919N/A */
919N/A
546N/A#pragma ident "@(#)dga_rtnshared.h 1.3 09/11/09 SMI"
919N/A
919N/A#ifndef _DGA_RTNSHARED_H
919N/A#define _DGA_RTNSHARED_H
919N/A
919N/A/*
919N/A * dga_rtnshared.h - Sun Direct Graphics Access shared page include file.
919N/A */
546N/A
546N/A/*
546N/A * These structures and definitions are for the DGA
546N/A * shared memory retained window grabber.
546N/A *
546N/A * Note: It is intended that grabbed retained windows are used in
546N/A * conjunction with grabbbed visible windows. Therefore the
546N/A * visible window must be grabbed prior to grabbing the
546N/A * retained window. The client then accesses the retained
546N/A * window structures indirectly through the dga_window
546N/A * structure defined for the associated grabbed visible
546N/A * window.
546N/A */
546N/A#define RTN_MAGIC 0x52544E44 /* "RTND" = 0x52544E44 */
546N/A#define RTN_VERS 0 /* Current version number */
546N/A#define RTN_FILE "/shrtndm" /* Shared info file base name. Full */
546N/A /* name is base name + port # + '.' */
546N/A /* + window id */
546N/A#define RTN_MAXPATH 237 /* 237 = Allocated size (256) - the */
546N/A /* length of the filename (18) - 1 */
546N/A /* for the null character */
546N/A#define RTN_FAILED 0 /* Value returned from rtn funcs */
546N/A /* upon failure */
546N/A#define RTN_PASSED -1 /* Value returned from rtn funcs */
546N/A /* upon success */
546N/A#define RTN_GRABBED 1 /* Flag that signifies that the */
546N/A /* window is shared retained */
546N/A#define RTN_MAPPED 2 /* Flag that signifies that the */
546N/A /* shared retained window is mapped */
1233N/A#define RTN_MAPCHG 4 /* Flag that signifies that the */
546N/A /* shared info has gone from mapped */
546N/A /* to unmapped. */
546N/A/*
546N/A * Shared Retained Information. This structure contains the information
546N/A * necessary to allow the server and client to share access to a DGA
1233N/A * retained window. This information is located in the first page of
546N/A * the shared memory created by the server in response to a call to
546N/A * XDgaGrabRetainedWindow(). The server communicates the current state
1233N/A * of the shared retained raster to the client through the fields within
546N/A * this structure.
546N/A */
546N/A
546N/Atypedef struct shared_retained_info
546N/A{
546N/A u_int magic; /* magic number, "RTND"=0x52544E44 */
546N/A u_char version; /* version, currently 0 */
546N/A u_char obsolete; /* file obsolete information flag */
546N/A u_char device; /* device type identifier from fbio.h*/
546N/A u_char cached; /* pixels currently cached on device */
546N/A u_int s_cacheseq; /* server's cache sequence count */
546N/A u_int s_modified; /*server has changed this data struct*/
546N/A u_char *s_wxlink; /* server's link to WXINFO struct */
546N/A u_int first_mmap_offset; /* mmap offset to next file section */
546N/A u_int device_offset; /* offset to device specific section */
546N/A short width; /* raster width */
546N/A short height; /* raster height */
546N/A u_int linebytes; /* bytes per scanline */
546N/A int s_fd; /* server's file descriptor */
546N/A u_int s_size; /* server size of pixel array */
546N/A u_char *s_pixels; /* server shared pixel memory pointer*/
546N/A u_char fn[256]; /* shared file name */
546N/A u_char scr_name[32]; /* screen name for cached rasters */
546N/A int c_fd; /* client's file descriptor */
546N/A u_int c_size; /* client size of pixel array */
546N/A u_char *c_pixels; /* client shared pixel memory pointer*/
546N/A u_int c_modified; /* client noticed server mods */
546N/A u_int c_cacheseq; /* client noticed server cache mods */
546N/A u_char bitsperpixel; /* bits per pixel */
546N/A u_char pad1[155]; /* unused pad area up to 512 bytes */
546N/A u_char dev_info[32]; /* device specific information */
546N/A} SHARED_RETAINED_INFO;
546N/A
546N/A
546N/A#endif /* _DGA_RTNSHARED_H */
546N/A