cmap_grab.h revision 830
1265N/A/* Copyright 1996 Sun Microsystems, Inc. All rights reserved. 1265N/A * Use is subject to license terms. 1265N/A * Permission is hereby granted, free of charge, to any person obtaining a 1265N/A * copy of this software and associated documentation files (the 1244N/A * "Software"), to deal in the Software without restriction, including 1265N/A * without limitation the rights to use, copy, modify, merge, publish, 1244N/A * distribute, and/or sell copies of the Software, and to permit persons 1244N/A * to whom the Software is furnished to do so, provided that the above 1244N/A * copyright notice(s) and this permission notice appear in all copies of 1265N/A * the Software and that both the above copyright notice(s) and this 1265N/A * permission notice appear in supporting documentation. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * Except as contained in this notice, the name of a copyright holder * shall not be used in advertising or otherwise to promote the sale, use * or other dealings in this Software without prior written authorization * of the copyright holder. * cmap_grab.h - colormap grabber structures and information * Colormap grabber header file. * lock and unlock colormap info page. 'infop' is the Grabbedcmap * pointer returned by cmapgrab_grab() * sh_cmapgrab_cookie(infop) * returns the colormap info page cookie used to map the info page. * this is the value that should be returned to the requesting /* method to use to load colormaps */ #
define CMMAGIC 0x434d4150 /* "CMAP" */#
define SCR_DEV_CG2 4 /* Sun CG2 framebuffer (depth 8) */#
define SCR_DEV_BW2 5 /* Sun BW2 framebuffer (depth 1) */#
define SCR_DEV_CG4 6 /* Sun CG4 framebuffer (1 or 8) */#
define SCR_DEV_CG5 11 /* Sun CG5 framebuffer (depth 8) */#
define SCR_DEV_CG8 12 /* Sun CG8 framebuffer (depth 8, 24 bit color)*/#
define SCR_DEV_GT 13 /* Sun GT (Hawk) depth 1, 8, and 24 bit */#
define SCR_DEV_CG12 14 /* Sun CG12 (Egret) depth 1, 8, and 24 bit *//* info in shared memory */ /* version 0 info starts here */ long cm_magic ;
/* "CMAP" = 0x434d4150 ("PAMC" on 386i) */ /* server-specific info, not meaningful to client */ int cm_default ;
/* is it the default colormap for this screen */ color map "xnews_default" */ color map "xnews_installed" */ int cm_start ;
/* first valid location */ int cm_len ;
/* number of valid locations */ int cm_cmapnum ;
/* [0]cmap number - FB's with multiple maps */ the start of the shadow colormap */ /* version 1 info starts here */ int cm_scount ;
/* server's last remembered count */ /* version 2 info starts here */ /* Do NOT add any fields below dev_info */ /* followed by three arrays of u_shorts, length cm_len, for red, green and blue and one array of bytes which are the change flags for their respective colors: Clients set a flag to non-zero to indicate that the color has been changed. The server clears these when the chagnes #
define CM_LOCKDEV 0
/* use GRABPAGEALLOC from device */#
endif /* _CMAP_GRAB_H */