open-src/proto/sun-ext-protos/include/transovl.h
changeset 258 959991251e79
child 907 3c35d611cdaa
equal deleted inserted replaced
257:258e599d0802 258:959991251e79
       
     1 /* Copyright 1994 Sun Microsystems, Inc.  All rights reserved.
       
     2  *
       
     3  * Permission is hereby granted, free of charge, to any person obtaining a
       
     4  * copy of this software and associated documentation files (the
       
     5  * "Software"), to deal in the Software without restriction, including
       
     6  * without limitation the rights to use, copy, modify, merge, publish,
       
     7  * distribute, and/or sell copies of the Software, and to permit persons
       
     8  * to whom the Software is furnished to do so, provided that the above
       
     9  * copyright notice(s) and this permission notice appear in all copies of
       
    10  * the Software and that both the above copyright notice(s) and this
       
    11  * permission notice appear in supporting documentation.
       
    12  *
       
    13  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
       
    14  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
       
    15  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
       
    16  * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
       
    17  * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
       
    18  * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
       
    19  * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
       
    20  * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
       
    21  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
       
    22  *
       
    23  * Except as contained in this notice, the name of a copyright holder
       
    24  * shall not be used in advertising or otherwise to promote the sale, use
       
    25  * or other dealings in this Software without prior written authorization
       
    26  * of the copyright holder.
       
    27  */
       
    28 
       
    29 #pragma ident	"@(#)transovl.h	35.3	07/12/04 INCLUDE_EXT SMI"
       
    30 
       
    31 #ifndef _TRANSOVL_H_
       
    32 #define _TRANSOVL_H_
       
    33 
       
    34 #if defined(__cplusplus)
       
    35 extern "C" {
       
    36 #endif
       
    37 
       
    38 #ifndef _TRANSOVL_SERVER_
       
    39 
       
    40 #include <X11/Xlib.h>
       
    41 #include <X11/Xutil.h>
       
    42 
       
    43 #endif /* _TRANSOVL_SERVER_ */
       
    44 
       
    45 #define X_OvlQueryVersion			0
       
    46 #define X_OvlGetPartners			1
       
    47 #define X_OvlGetSharedPixels			2
       
    48 #define X_OvlGetSharedColors			3
       
    49 #define X_OvlCreateWindow			4
       
    50 #define X_OvlIsOverlayWindow			5
       
    51 #define X_OvlSetWindowTransparent		6
       
    52 #define X_OvlSetPaintType			7
       
    53 #define X_OvlCopyPaintType			8
       
    54 #define X_OvlCopyAreaAndPaintType		9
       
    55 #define X_OvlReadScreen				10
       
    56 
       
    57 #define OvlNumberEvents				0
       
    58 
       
    59 typedef enum {
       
    60     XSolarisOvlPaintTransparent,
       
    61     XSolarisOvlPaintOpaque
       
    62 } XSolarisOvlPaintType;
       
    63 
       
    64 typedef enum {
       
    65     XSolarisOvlSuccess,
       
    66     XSolarisOvlQualifiedSuccess,
       
    67     XSolarisOvlCriteriaFailure,
       
    68     XSolarisOvlFailure
       
    69 } XSolarisOvlSelectStatus;
       
    70 
       
    71 typedef enum {
       
    72     XSolarisOvlSelectBestOverlay,
       
    73     XSolarisOvlSelectBestUnderlay
       
    74 } XSolarisOvlSelectType;
       
    75 
       
    76 typedef struct {
       
    77     unsigned long	hardCriteriaMask;
       
    78     unsigned long	softCriteriaMask;
       
    79     int			c_class;
       
    80     unsigned int	depth;
       
    81     unsigned int	minColors;
       
    82     unsigned int	minRed;
       
    83     unsigned int	minGreen;
       
    84     unsigned int	minBlue;
       
    85     unsigned int	minBitsPerRGB;
       
    86     unsigned int	minBuffers;
       
    87 } XSolarisOvlVisualCriteria;
       
    88 
       
    89 typedef struct {
       
    90     XSolarisOvlVisualCriteria	overlayCriteria;
       
    91     XSolarisOvlVisualCriteria	underlayCriteria;
       
    92 } XSolarisOvlPairCriteria;
       
    93 
       
    94 #define XSolarisOvlVisualClass		(1L<<0)
       
    95 #define XSolarisOvlDepth		(1L<<1)
       
    96 #define XSolarisOvlMinColors		(1L<<2)
       
    97 #define XSolarisOvlMinRed		(1L<<3)
       
    98 #define XSolarisOvlMinGreen		(1L<<4)
       
    99 #define XSolarisOvlMinBlue		(1L<<5)
       
   100 #define XSolarisOvlMinBitsPerRGB	(1L<<6)
       
   101 #define XSolarisOvlMinBuffers		(1L<<7)
       
   102 #define XSolarisOvlUnsharedPixels	(1L<<8)
       
   103 #define XSolarisOvlUnsharedColors	(1L<<9)
       
   104 #define XSolarisOvlPreferredPartner	(1L<<10)
       
   105 
       
   106 #define XSolarisOvlCopyOpaque		(1L<<0)
       
   107 #define XSolarisOvlCopyTransparent	(1L<<1)
       
   108 #define XSolarisOvlCopyAll		(XSolarisOvlCopyOpaque|XSolarisOvlCopyTransparent)
       
   109 
       
   110 #ifndef _TRANSOVL_SERVER_
       
   111 
       
   112 #if defined(__STDC__) || defined(__cplusplus)
       
   113 extern Bool XSolarisOvlQueryExtension(Display *, int *, int *);
       
   114 
       
   115 extern Status XSolarisOvlQueryVersion(Display *, int *, int *);
       
   116 
       
   117 extern Window XSolarisOvlCreateWindow(Display *, Window, int, int, 
       
   118 		unsigned int, unsigned int, unsigned int, int, 
       
   119 		unsigned int, Visual *, unsigned long, XSetWindowAttributes *);
       
   120 
       
   121 extern Bool XSolarisOvlIsOverlayWindow(Display *, Window);
       
   122 
       
   123 extern void XSolarisOvlSetWindowTransparent(Display *, Window);
       
   124 
       
   125 extern Status XSolarisOvlSetPaintType(Display *, GC, XSolarisOvlPaintType);
       
   126 
       
   127 extern XSolarisOvlPaintType XSolarisOvlGetPaintType(Display *, GC);
       
   128 
       
   129 extern Status XSolarisOvlCopyPaintType(Display *, Drawable, Drawable, GC, 
       
   130 		int, int, unsigned int, unsigned int, int, int, 
       
   131 		unsigned long, unsigned long);
       
   132 
       
   133 extern Status XSolarisOvlCopyAreaAndPaintType(Display *, 
       
   134 		Drawable, Drawable, Drawable, Drawable,
       
   135 		GC, GC, int, int, int, int, 
       
   136 		unsigned int, unsigned int, int, int, int, int, 
       
   137 		unsigned long, unsigned long);
       
   138 
       
   139 extern XImage *XReadScreen(Display *, Window, int, int, unsigned int, unsigned int, Bool);
       
   140 
       
   141 extern XSolarisOvlSelectStatus XSolarisOvlSelectPartner(Display *, int, VisualID, 
       
   142 		XSolarisOvlSelectType, int, XSolarisOvlVisualCriteria *, XVisualInfo *, 
       
   143 		unsigned long *);
       
   144 
       
   145 extern XSolarisOvlSelectStatus XSolarisOvlSelectPair(Display *, int, int, 
       
   146 		XSolarisOvlPairCriteria *, XVisualInfo *, XVisualInfo *, 
       
   147 		unsigned long *, unsigned long *);
       
   148 #else
       
   149 extern Bool XSolarisOvlQueryExtension();
       
   150 extern Status XSolarisOvlQueryVersion();
       
   151 extern Window XSolarisOvlCreateWindow();
       
   152 extern Bool XSolarisOvlIsOverlayWindow();
       
   153 extern void XSolarisOvlSetWindowTransparent();
       
   154 extern Status XSolarisOvlSetPaintType();
       
   155 extern XSolarisOvlPaintType XSolarisOvlGetPaintType();
       
   156 extern Status XSolarisOvlCopyPaintType();
       
   157 extern Status XSolarisOvlCopyAreaAndPaintType();
       
   158 extern XImage *XReadScreen();
       
   159 extern XSolarisOvlSelectStatus XSolarisOvlSelectPartner();
       
   160 extern XSolarisOvlSelectStatus XSolarisOvlSelectPair();
       
   161 #endif
       
   162 
       
   163 #endif /* _TRANSOVL_SERVER_ */
       
   164 
       
   165 #if defined(__cplusplus)
       
   166 }
       
   167 #endif
       
   168 
       
   169 #endif /* _TRANSOVL_H_ */