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