< prev index next >

src/java.desktop/unix/native/libawt_xawt/awt/wsutils.h

Print this page

        

*** 1,6 **** --- 1,7 ---- /* + * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 19,29 **** * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ - /* $XConsortium: wsutils.h /main/3 1996/10/14 15:04:17 swick $ */ /** ------------------------------------------------------------------------ This file contains routines for manipulating generic lists. Lists are implemented with a "harness". In other words, each node in the list consists of two pointers, one to the data item and one to the next node in the list. The head of the list is --- 20,29 ----
*** 34,88 **** This file is available under and governed by the GNU General Public License version 2 only, as published by the Free Software Foundation. However, the following notice accompanied the original version of this file: ! Copyright (c) 1994 Hewlett-Packard Co. ! Copyright (c) 1996 X Consortium ! Permission is hereby granted, free of charge, to any person obtaining ! a copy of this software and associated documentation files (the ! "Software"), to deal in the Software without restriction, including ! without limitation the rights to use, copy, modify, merge, publish, ! distribute, sublicense, and sell copies of the Software, and to ! permit persons to whom the Software is furnished to do so, subject to ! the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 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. ! IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ! Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization ! from the X Consortium. ------------------------------------------------------------------------ **/ /****************************************************************************** * * This file contains various typedef's, macros and procedure declarations for * a set of example utility procedures contained in the file "wsutils.c". * ******************************************************************************/ /* This is the actual structure returned by the X server describing the * SERVER_OVERLAY_VISUAL property. */ typedef struct { VisualID visualID; /* The VisualID of the overlay visual */ ! long transparentType; /* Can be None, TransparentPixel or * TransparentMask */ ! long value; /* Pixel value */ ! long layer; /* Overlay planes will always be in * layer 1 */ } OverlayVisualPropertyRec; /* This is structure also describes the SERVER_OVERLAY_VISUAL property, but --- 34,89 ---- This file is available under and governed by the GNU General Public License version 2 only, as published by the Free Software Foundation. However, the following notice accompanied the original version of this file: ! Copyright 1994 Hewlett-Packard Co. ! Copyright 1996, 1998 The Open Group ! Permission to use, copy, modify, distribute, and sell this software and its ! documentation for any purpose is hereby granted without fee, provided that ! the above copyright notice appear in all copies and that both that ! copyright notice and this permission notice appear in supporting ! documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 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. ! IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ! Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization ! from The Open Group. ------------------------------------------------------------------------ **/ + /****************************************************************************** * * This file contains various typedef's, macros and procedure declarations for * a set of example utility procedures contained in the file "wsutils.c". * ******************************************************************************/ + typedef unsigned long Pixel; + /* This is the actual structure returned by the X server describing the * SERVER_OVERLAY_VISUAL property. */ typedef struct { VisualID visualID; /* The VisualID of the overlay visual */ ! int transparentType; /* Can be None, TransparentPixel or * TransparentMask */ ! Pixel value; /* Pixel value */ ! int layer; /* Overlay planes will always be in * layer 1 */ } OverlayVisualPropertyRec; /* This is structure also describes the SERVER_OVERLAY_VISUAL property, but
*** 91,104 **** * refering to the visual's ID. */ typedef struct { XVisualInfo *pOverlayVisualInfo; /* Pointer to the XVisualInfo struct */ ! long transparentType; /* Can be None, TransparentPixel or * TransparentMask */ ! long value; /* Pixel value */ ! long layer; /* Overlay planes will always be in * layer 1 */ } OverlayInfo; /* These macros are the values of the "transparentType" above: */ --- 92,105 ---- * refering to the visual's ID. */ typedef struct { XVisualInfo *pOverlayVisualInfo; /* Pointer to the XVisualInfo struct */ ! int transparentType; /* Can be None, TransparentPixel or * TransparentMask */ ! Pixel value; /* Pixel value */ ! int layer; /* Overlay planes will always be in * layer 1 */ } OverlayInfo; /* These macros are the values of the "transparentType" above: */
*** 156,186 **** * If the routine sucessfully obtained the visual information, it returns zero. * If the routine didn't obtain the visual information, it returns non-zero. * ******************************************************************************/ ! extern int32_t GetXVisualInfo( ! #if NeedFunctionPrototypes Display *display, /* Which X server (aka "display"). */ ! int32_t screen, /* Which screen of the "display". */ ! int32_t *transparentOverlays, /* Non-zero if there's at least one * overlay visual and if at least one * of those supports a transparent * pixel. */ ! int32_t *numVisuals, /* Number of XVisualInfo struct's ! * pointed to by pVisuals. */ XVisualInfo **pVisuals, /* All of the device's visuals. */ ! int32_t *numOverlayVisuals, /* Number of OverlayInfo's pointed * to by pOverlayVisuals. If this * number is zero, the device does * not have overlay planes. */ OverlayInfo **pOverlayVisuals, /* The device's overlay plane visual * information. */ ! int32_t *numImageVisuals, /* Number of XVisualInfo's pointed * to by pImageVisuals. */ XVisualInfo ***pImageVisuals /* The device's image visuals. */ - #endif ); /****************************************************************************** * --- 157,185 ---- * If the routine sucessfully obtained the visual information, it returns zero. * If the routine didn't obtain the visual information, it returns non-zero. * ******************************************************************************/ ! extern int GetXVisualInfo( Display *display, /* Which X server (aka "display"). */ ! int screen, /* Which screen of the "display". */ ! int *transparentOverlays, /* Non-zero if there's at least one * overlay visual and if at least one * of those supports a transparent * pixel. */ ! int *numVisuals, /* Number of XVisualInfo struct's ! * pointed to to by pVisuals. */ XVisualInfo **pVisuals, /* All of the device's visuals. */ ! int *numOverlayVisuals, /* Number of OverlayInfo's pointed * to by pOverlayVisuals. If this * number is zero, the device does * not have overlay planes. */ OverlayInfo **pOverlayVisuals, /* The device's overlay plane visual * information. */ ! int *numImageVisuals, /* Number of XVisualInfo's pointed * to by pImageVisuals. */ XVisualInfo ***pImageVisuals /* The device's image visuals. */ ); /****************************************************************************** *
*** 189,203 **** * This routine frees the data that was allocated by GetXVisualInfo(). * ******************************************************************************/ extern void FreeXVisualInfo( - #if NeedFunctionPrototypes XVisualInfo *pVisuals, OverlayInfo *pOverlayVisuals, XVisualInfo **pImageVisuals - #endif ); /****************************************************************************** * --- 188,200 ----
*** 217,242 **** * NOTE: This is just an example of what can be done. It may or may not be * useful for any specific application. * ******************************************************************************/ ! extern int32_t FindImagePlanesVisual( ! #if NeedFunctionPrototypes Display *display, /* Which X server (aka "display"). */ ! int32_t screen, /* Which screen of the "display". */ ! int32_t numImageVisuals, /* Number of XVisualInfo's pointed * to by pImageVisuals. */ XVisualInfo **pImageVisuals, /* The device's image visuals. */ ! int32_t sbCmapHint, /* What Starbase cmap modes will be * used with the visual. NOTE: This * is a mask of the possible values. */ ! int32_t depthHint, /* Desired depth. */ ! int32_t depthFlexibility, /* How much the actual value in * "depthHint" is desired. */ Visual **pImageVisualToUse, /* The screen's image visual to use. */ ! int32_t *depthObtained /* Actual depth of the visual. */ ! #endif ); /****************************************************************************** * --- 214,237 ---- * NOTE: This is just an example of what can be done. It may or may not be * useful for any specific application. * ******************************************************************************/ ! extern int FindImagePlanesVisual( Display *display, /* Which X server (aka "display"). */ ! int screen, /* Which screen of the "display". */ ! int numImageVisuals, /* Number of XVisualInfo's pointed * to by pImageVisuals. */ XVisualInfo **pImageVisuals, /* The device's image visuals. */ ! int sbCmapHint, /* What Starbase cmap modes will be * used with the visual. NOTE: This * is a mask of the possible values. */ ! int depthHint, /* Desired depth. */ ! int depthFlexibility, /* How much the actual value in * "depthHint" is desired. */ Visual **pImageVisualToUse, /* The screen's image visual to use. */ ! int *depthObtained /* Actual depth of the visual. */ ); /****************************************************************************** *
*** 265,293 **** * NOTE: This is just an example of what can be done. It may or may not be * useful for any specific application. * ******************************************************************************/ ! extern int32_t FindOverlayPlanesVisual( ! #if NeedFunctionPrototypes Display *display, /* Which X server (aka "display"). */ ! int32_t screen, /* Which screen of the "display". */ ! int32_t numOverlayVisuals, /* Number of OverlayInfo's pointed * to by pOverlayVisuals. */ OverlayInfo *pOverlayVisuals, /* The device's overlay plane visual * information. */ ! int32_t depthHint, /* Desired depth. */ ! int32_t depthFlexibility, /* How much the actual value in * "depthHint" is desired. */ ! int32_t transparentBackground, /* Non-zero if the visual must have * a transparent color. */ Visual **pOverlayVisualToUse, /* The screen's overlay visual to * use. */ ! int32_t *depthObtained, /* Actual depth of the visual. */ ! int32_t *transparentColor /* The transparent color the program * can use with the visual. */ - #endif ); /****************************************************************************** * --- 260,286 ---- * NOTE: This is just an example of what can be done. It may or may not be * useful for any specific application. * ******************************************************************************/ ! extern int FindOverlayPlanesVisual( Display *display, /* Which X server (aka "display"). */ ! int screen, /* Which screen of the "display". */ ! int numOverlayVisuals, /* Number of OverlayInfo's pointed * to by pOverlayVisuals. */ OverlayInfo *pOverlayVisuals, /* The device's overlay plane visual * information. */ ! int depthHint, /* Desired depth. */ ! int depthFlexibility, /* How much the actual value in * "depthHint" is desired. */ ! int transparentBackground, /* Non-zero if the visual must have * a transparent color. */ Visual **pOverlayVisualToUse, /* The screen's overlay visual to * use. */ ! int *depthObtained, /* Actual depth of the visual. */ ! int *transparentColor /* The transparent color the program * can use with the visual. */ ); /****************************************************************************** *
*** 306,336 **** * NOTE: This is just an example of what can be done. It may or may not be * useful for any specific application. * ******************************************************************************/ ! extern int32_t CreateImagePlanesWindow( ! #if NeedFunctionPrototypes Display *display, /* Which X server (aka "display"). */ ! int32_t screen, /* Which screen of the "display". */ Window parentWindow, /* Window ID of the parent window for * the created window. */ ! int32_t windowX, /* Desired X coord. of the window. */ ! int32_t windowY, /* Desired Y coord of the window. */ ! int32_t windowWidth, /* Desired width of the window. */ ! int32_t windowHeight, /* Desired height of the window. */ ! int32_t windowDepth, /* Desired depth of the window. */ Visual *pImageVisualToUse, /* The window's image planes visual. */ ! int32_t argc, /* Program's argc parameter. */ char *argv[], /* Program's argv parameter. */ char *windowName, /* Name to put on window's border. */ char *iconName, /* Name to put on window's icon. */ Window *imageWindow, /* Window ID of the created window. */ Colormap *imageColormap, /* The window's colormap. */ ! int32_t *mustFreeImageColormap /* Non-zero if the program must call * XFreeColormap() for imageColormap. */ - #endif ); /****************************************************************************** * --- 299,327 ---- * NOTE: This is just an example of what can be done. It may or may not be * useful for any specific application. * ******************************************************************************/ ! extern int CreateImagePlanesWindow( Display *display, /* Which X server (aka "display"). */ ! int screen, /* Which screen of the "display". */ Window parentWindow, /* Window ID of the parent window for * the created window. */ ! int windowX, /* Desired X coord. of the window. */ ! int windowY, /* Desired Y coord of the window. */ ! int windowWidth, /* Desired width of the window. */ ! int windowHeight, /* Desired height of the window. */ ! int windowDepth, /* Desired depth of the window. */ Visual *pImageVisualToUse, /* The window's image planes visual. */ ! int argc, /* Program's argc parameter. */ char *argv[], /* Program's argv parameter. */ char *windowName, /* Name to put on window's border. */ char *iconName, /* Name to put on window's icon. */ Window *imageWindow, /* Window ID of the created window. */ Colormap *imageColormap, /* The window's colormap. */ ! int *mustFreeImageColormap /* Non-zero if the program must call * XFreeColormap() for imageColormap. */ ); /****************************************************************************** *
*** 349,380 **** * NOTE: This is just an example of what can be done. It may or may not be * useful for any specific application. * ******************************************************************************/ ! int32_t CreateOverlayPlanesWindow( ! #if NeedFunctionPrototypes Display *display, /* Which X server (aka "display"). */ ! int32_t screen, /* Which screen of the "display". */ Window parentWindow, /* Window ID of the parent window for * the created window. */ ! int32_t windowX, /* Desired X coord. of the window. */ ! int32_t windowY, /* Desired Y coord of the window. */ ! int32_t windowWidth, /* Desired width of the window. */ ! int32_t windowHeight, /* Desired height of the window. */ ! int32_t windowDepth, /* Desired depth of the window. */ Visual *pOverlayVisualToUse, /* The window's overlay planes visual.*/ ! int32_t argc, /* Program's argc parameter. */ char *argv[], /* Program's argv parameter. */ char *windowName, /* Name to put on window's border. */ char *iconName, /* Name to put on window's icon. */ ! int32_t transparentBackground, /* Non-zero if the window's background * should be a transparent color. */ ! int32_t *transparentColor, /* The transparent color to use as the * window's background. */ Window *overlayWindow, /* Window ID of the created window. */ Colormap *overlayColormap, /* The window's colormap. */ ! int32_t *mustFreeOverlayColormap/* Non-zero if the program must call * XFreeColormap() for * overlayColormap. */ - #endif ); --- 340,369 ---- * NOTE: This is just an example of what can be done. It may or may not be * useful for any specific application. * ******************************************************************************/ ! int CreateOverlayPlanesWindow( Display *display, /* Which X server (aka "display"). */ ! int screen, /* Which screen of the "display". */ Window parentWindow, /* Window ID of the parent window for * the created window. */ ! int windowX, /* Desired X coord. of the window. */ ! int windowY, /* Desired Y coord of the window. */ ! int windowWidth, /* Desired width of the window. */ ! int windowHeight, /* Desired height of the window. */ ! int windowDepth, /* Desired depth of the window. */ Visual *pOverlayVisualToUse, /* The window's overlay planes visual.*/ ! int argc, /* Program's argc parameter. */ char *argv[], /* Program's argv parameter. */ char *windowName, /* Name to put on window's border. */ char *iconName, /* Name to put on window's icon. */ ! int transparentBackground, /* Non-zero if the window's background * should be a transparent color. */ ! int *transparentColor, /* The transparent color to use as the * window's background. */ Window *overlayWindow, /* Window ID of the created window. */ Colormap *overlayColormap, /* The window's colormap. */ ! int *mustFreeOverlayColormap/* Non-zero if the program must call * XFreeColormap() for * overlayColormap. */ );
< prev index next >