New upstream version 3.5.99.27

This commit is contained in:
geos_one
2025-08-08 20:00:36 +02:00
commit bc8d10cc33
4267 changed files with 1757978 additions and 0 deletions

View File

@@ -0,0 +1,106 @@
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
*
* 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/or 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 (including the next
* paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
*/
/*
* Copyright © 2003 Keith Packard
*
* 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, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR 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.
*/
/*
* This file is a reduced version of the header file of
* <X11/extensions/Xcomposite.h>
*
* This copy of code has been introduced to allow a clear namespace
* separation between <X11/...> and <nx-X11/...> header files.
*
* This version of the Xcomposite library header file only contains symbols
* required by nxagent and strictly avoids indirectly including
* from an X11 library that is also shipped in nx-X11/lib/.
*
* When using <X11/extensions/Xcomposite.h> instead for inclusion in
* nxagent, it will attempt pulling in the <X11/extensions/Xlib.h>.
* However, the headers of the same name from <nx-X11/...> should be
* used instead.
*
* FIXME: Once the nxagent Xserver starts using libX11 from X.Org, this
* hack can be removed.
*
* 2016/04/07, Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
*/
#ifndef _XCOMPOSITE_H_
#define _XCOMPOSITE_H_
#include <X11/extensions/composite.h>
#include <nx-X11/Xfuncproto.h>
/*
* This revision number also appears in configure.ac, they have
* to be manually synchronized
*/
#define XCOMPOSITE_MAJOR COMPOSITE_MAJOR
#define XCOMPOSITE_MINOR COMPOSITE_MINOR
#define XCOMPOSITE_REVISION 2
#define XCOMPOSITE_VERSION ((XCOMPOSITE_MAJOR * 10000) + (XCOMPOSITE_MINOR * 100) + (XCOMPOSITE_REVISION))
_XFUNCPROTOBEGIN
Bool XCompositeQueryExtension (Display *dpy,
int *event_base_return,
int *error_base_return);
Status XCompositeQueryVersion (Display *dpy,
int *major_version_return,
int *minor_version_return);
void
XCompositeRedirectWindow (Display *dpy, Window window, int update);
void
XCompositeRedirectSubwindows (Display *dpy, Window window, int update);
void
XCompositeUnredirectWindow (Display *dpy, Window window, int update);
void
XCompositeUnredirectSubwindows (Display *dpy, Window window, int update);
_XFUNCPROTOEND
#endif /* _XCOMPOSITE_H_ */

View File

@@ -0,0 +1,90 @@
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright 2011 Red Hat, Inc.
*
* 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/or 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 (including the next
* paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
*/
/*
* Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
*
* 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, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR 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.
*/
/*
* This file is a reduced version of the header file of
* <X11/extensions/Xfixes.h>
*
* This copy of code has been introduced to allow a clear namespace
* separation between <X11/...> and <nx-X11/...> header files.
*
* This version of the Xfixes library header file only contains symbols
* required by nxagent and strictly avoids indirectly including
* from an X11 library that is also shipped in nx-X11/lib/.
*
* When using <X11/extensions/Xfixes.h> instead for inclusion in
* nxagent, it will attempt pulling in the <X11/extensions/Xlib.h>.
* However, the headers of the same name from <nx-X11/...> should be
* used instead.
*
* FIXME: Once the nxagent Xserver starts using libX11 from X.Org, this
* hack can be removed.
*
* 2015/12/28, Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
*/
#ifndef _XFIXES_H_
#define _XFIXES_H_
typedef struct {
int type; /* event base */
unsigned long serial;
Bool send_event;
Display *display;
Window window;
int subtype;
Window owner;
Atom selection;
Time timestamp;
Time selection_timestamp;
} XFixesSelectionNotifyEvent;
void
XFixesSelectSelectionInput (Display *dpy,
Window win,
Atom selection,
unsigned long eventMask);
#endif /* _XFIXES_H_ */

View File

@@ -0,0 +1,74 @@
/*
Copyright 2003 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.
*/
#ifndef _Xinerama_h
#define _Xinerama_h
#include <nx-X11/Xlib.h>
typedef struct {
int screen_number;
short x_org;
short y_org;
short width;
short height;
} XineramaScreenInfo;
_XFUNCPROTOBEGIN
Bool XineramaQueryExtension (
Display *dpy,
int *event_base,
int *error_base
);
Status XineramaQueryVersion(
Display *dpy,
int *major_versionp,
int *minor_versionp
);
Bool XineramaIsActive(Display *dpy);
/*
Returns the number of heads and a pointer to an array of
structures describing the position and size of the individual
heads. Returns NULL and number = 0 if Xinerama is not active.
Returned array should be freed with XFree().
*/
XineramaScreenInfo *
XineramaQueryScreens(
Display *dpy,
int *number
);
_XFUNCPROTOEND
#endif /* _Xinerama_h */

View File

@@ -0,0 +1,83 @@
/*
* Copyright © 2000 Compaq Computer Corporation, Inc.
* Copyright © 2002 Hewlett-Packard Company, Inc.
* Copyright © 2006 Intel Corporation
* Copyright © 2008 Red Hat, Inc.
*
* 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, and
* that the name of the copyright holders not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. The copyright holders make no representations
* about the suitability of this software for any purpose. It is provided "as
* is" without express or implied warranty.
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR 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.
*
* Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc.
* Keith Packard, Intel Corporation
*/
/*
* This file is a reduced version of the header file of
* <X11/extensions/Xrandr.h>
*
* This copy of code has been introduced to allow a clear namespace
* separation between <X11/...> and <nx-X11/...> header files.
*
* This version of the Xrandr library header file only contains symbols
* required by nxagent and strictly avoids indirectly including
* from an X11 library that is also shipped in nx-X11/lib/.
*
* When using <X11/extensions/Xrandr.h> instead for inclusion in
* nxagent, it will attempt pulling in the <X11/extensions/Xrender.h>
* header which in turn will include <X11/Xlib.h>. However, the headers of
* the same name from <nx-X11/...> should be used instead.
*
* FIXME: Once the nxagent Xserver starts using libXrender from X.Org, this
* hack can be removed.
*
* 2015/06/26, Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
*/
#ifndef _XRANDR_H_
#define _XRANDR_H_
#include <nx-X11/extensions/randr.h>
#include <nx-X11/Xfuncproto.h>
_XFUNCPROTOBEGIN
/*
* Events.
*/
typedef struct {
int type; /* event base */
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window window; /* window which selected for this event */
Window root; /* Root window for changed screen */
Time timestamp; /* when the screen change occurred */
Time config_timestamp; /* when the last configuration change */
SizeID size_index;
SubpixelOrder subpixel_order;
Rotation rotation;
int width;
int height;
int mwidth;
int mheight;
} XRRScreenChangeNotifyEvent;
_XFUNCPROTOEND
#endif /* _XRANDR_H_ */

View File

@@ -0,0 +1,528 @@
/*
*
* Copyright © 2000 SuSE, Inc.
*
* 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, and that the name of SuSE not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. SuSE makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR 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.
*
* Author: Keith Packard, SuSE, Inc.
*/
#ifndef _XRENDER_H_
#define _XRENDER_H_
#include <nx-X11/Xlib.h>
#include <nx-X11/Xfuncproto.h>
#include <nx-X11/Xosdefs.h>
#include <nx-X11/Xutil.h>
#include <nx-X11/extensions/render.h>
typedef struct {
short red;
short redMask;
short green;
short greenMask;
short blue;
short blueMask;
short alpha;
short alphaMask;
} XRenderDirectFormat;
typedef struct {
PictFormat id;
int type;
int depth;
XRenderDirectFormat direct;
Colormap colormap;
} XRenderPictFormat;
#define PictFormatID (1 << 0)
#define PictFormatType (1 << 1)
#define PictFormatDepth (1 << 2)
#define PictFormatRed (1 << 3)
#define PictFormatRedMask (1 << 4)
#define PictFormatGreen (1 << 5)
#define PictFormatGreenMask (1 << 6)
#define PictFormatBlue (1 << 7)
#define PictFormatBlueMask (1 << 8)
#define PictFormatAlpha (1 << 9)
#define PictFormatAlphaMask (1 << 10)
#define PictFormatColormap (1 << 11)
typedef struct _XRenderPictureAttributes {
int repeat;
Picture alpha_map;
int alpha_x_origin;
int alpha_y_origin;
int clip_x_origin;
int clip_y_origin;
Pixmap clip_mask;
Bool graphics_exposures;
int subwindow_mode;
int poly_edge;
int poly_mode;
Atom dither;
Bool component_alpha;
} XRenderPictureAttributes;
typedef struct {
unsigned short red;
unsigned short green;
unsigned short blue;
unsigned short alpha;
} XRenderColor;
typedef struct _XGlyphInfo {
unsigned short width;
unsigned short height;
short x;
short y;
short xOff;
short yOff;
} XGlyphInfo;
typedef struct _XGlyphElt8 {
GlyphSet glyphset;
_Xconst char *chars;
int nchars;
int xOff;
int yOff;
} XGlyphElt8;
typedef struct _XGlyphElt16 {
GlyphSet glyphset;
_Xconst unsigned short *chars;
int nchars;
int xOff;
int yOff;
} XGlyphElt16;
typedef struct _XGlyphElt32 {
GlyphSet glyphset;
_Xconst unsigned int *chars;
int nchars;
int xOff;
int yOff;
} XGlyphElt32;
typedef double XDouble;
typedef struct _XPointDouble {
XDouble x, y;
} XPointDouble;
#define XDoubleToFixed(f) ((XFixed) ((f) * 65536))
#define XFixedToDouble(f) (((XDouble) (f)) / 65536)
typedef int XFixed;
typedef struct _XPointFixed {
XFixed x, y;
} XPointFixed;
typedef struct _XLineFixed {
XPointFixed p1, p2;
} XLineFixed;
typedef struct _XTriangle {
XPointFixed p1, p2, p3;
} XTriangle;
typedef struct _XCircle {
XFixed x;
XFixed y;
XFixed radius;
} XCircle;
typedef struct _XTrapezoid {
XFixed top, bottom;
XLineFixed left, right;
} XTrapezoid;
typedef struct _XTransform {
XFixed matrix[3][3];
} XTransform;
typedef struct _XFilters {
int nfilter;
char **filter;
int nalias;
short *alias;
} XFilters;
typedef struct _XIndexValue {
unsigned long pixel;
unsigned short red, green, blue, alpha;
} XIndexValue;
typedef struct _XAnimCursor {
Cursor cursor;
unsigned long delay;
} XAnimCursor;
typedef struct _XSpanFix {
XFixed left, right, y;
} XSpanFix;
typedef struct _XTrap {
XSpanFix top, bottom;
} XTrap;
typedef struct _XLinearGradient {
XPointFixed p1;
XPointFixed p2;
} XLinearGradient;
typedef struct _XRadialGradient {
XCircle inner;
XCircle outer;
} XRadialGradient;
typedef struct _XConicalGradient {
XPointFixed center;
XFixed angle; /* in degrees */
} XConicalGradient;
_XFUNCPROTOBEGIN
Bool XRenderQueryExtension (Display *dpy, int *event_basep, int *error_basep);
Status XRenderQueryVersion (Display *dpy,
int *major_versionp,
int *minor_versionp);
Status XRenderQueryFormats (Display *dpy);
int XRenderQuerySubpixelOrder (Display *dpy, int screen);
Bool XRenderSetSubpixelOrder (Display *dpy, int screen, int subpixel);
XRenderPictFormat *
XRenderFindVisualFormat (Display *dpy, _Xconst Visual *visual);
XRenderPictFormat *
XRenderFindFormat (Display *dpy,
unsigned long mask,
_Xconst XRenderPictFormat *templ,
int count);
#define PictStandardARGB32 0
#define PictStandardRGB24 1
#define PictStandardA8 2
#define PictStandardA4 3
#define PictStandardA1 4
#define PictStandardNUM 5
XRenderPictFormat *
XRenderFindStandardFormat (Display *dpy,
int format);
XIndexValue *
XRenderQueryPictIndexValues(Display *dpy,
_Xconst XRenderPictFormat *format,
int *num);
Picture
XRenderCreatePicture (Display *dpy,
Drawable drawable,
_Xconst XRenderPictFormat *format,
unsigned long valuemask,
_Xconst XRenderPictureAttributes *attributes);
void
XRenderChangePicture (Display *dpy,
Picture picture,
unsigned long valuemask,
_Xconst XRenderPictureAttributes *attributes);
void
XRenderSetPictureClipRectangles (Display *dpy,
Picture picture,
int xOrigin,
int yOrigin,
_Xconst XRectangle *rects,
int n);
void
XRenderSetPictureClipRegion (Display *dpy,
Picture picture,
Region r);
void
XRenderSetPictureTransform (Display *dpy,
Picture picture,
XTransform *transform);
void
XRenderFreePicture (Display *dpy,
Picture picture);
void
XRenderComposite (Display *dpy,
int op,
Picture src,
Picture mask,
Picture dst,
int src_x,
int src_y,
int mask_x,
int mask_y,
int dst_x,
int dst_y,
unsigned int width,
unsigned int height);
GlyphSet
XRenderCreateGlyphSet (Display *dpy, _Xconst XRenderPictFormat *format);
GlyphSet
XRenderReferenceGlyphSet (Display *dpy, GlyphSet existing);
void
XRenderFreeGlyphSet (Display *dpy, GlyphSet glyphset);
void
XRenderAddGlyphs (Display *dpy,
GlyphSet glyphset,
_Xconst Glyph *gids,
_Xconst XGlyphInfo *glyphs,
int nglyphs,
_Xconst char *images,
int nbyte_images);
void
XRenderFreeGlyphs (Display *dpy,
GlyphSet glyphset,
_Xconst Glyph *gids,
int nglyphs);
void
XRenderCompositeString8 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
GlyphSet glyphset,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst char *string,
int nchar);
void
XRenderCompositeString16 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
GlyphSet glyphset,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst unsigned short *string,
int nchar);
void
XRenderCompositeString32 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
GlyphSet glyphset,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst unsigned int *string,
int nchar);
void
XRenderCompositeText8 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst XGlyphElt8 *elts,
int nelt);
void
XRenderCompositeText16 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst XGlyphElt16 *elts,
int nelt);
void
XRenderCompositeText32 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst XGlyphElt32 *elts,
int nelt);
void
XRenderFillRectangle (Display *dpy,
int op,
Picture dst,
_Xconst XRenderColor *color,
int x,
int y,
unsigned int width,
unsigned int height);
void
XRenderFillRectangles (Display *dpy,
int op,
Picture dst,
_Xconst XRenderColor *color,
_Xconst XRectangle *rectangles,
int n_rects);
void
XRenderCompositeTrapezoids (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
_Xconst XTrapezoid *traps,
int ntrap);
void
XRenderCompositeTriangles (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
_Xconst XTriangle *triangles,
int ntriangle);
void
XRenderCompositeTriStrip (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
_Xconst XPointFixed *points,
int npoint);
void
XRenderCompositeTriFan (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
_Xconst XPointFixed *points,
int npoint);
void
XRenderCompositeDoublePoly (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst XPointDouble *fpoints,
int npoints,
int winding);
Status
XRenderParseColor(Display *dpy,
char *spec,
XRenderColor *def);
Cursor
XRenderCreateCursor (Display *dpy,
Picture source,
unsigned int x,
unsigned int y);
XFilters *
XRenderQueryFilters (Display *dpy, Drawable drawable);
void
XRenderSetPictureFilter (Display *dpy,
Picture picture,
const char *filter,
XFixed *params,
int nparams);
Cursor
XRenderCreateAnimCursor (Display *dpy,
int ncursor,
XAnimCursor *cursors);
void
XRenderAddTraps (Display *dpy,
Picture picture,
int xOff,
int yOff,
_Xconst XTrap *traps,
int ntrap);
Picture XRenderCreateSolidFill (Display *dpy,
const XRenderColor *color);
Picture XRenderCreateLinearGradient (Display *dpy,
const XLinearGradient *gradient,
const XFixed *stops,
const XRenderColor *colors,
int nstops);
Picture XRenderCreateRadialGradient (Display *dpy,
const XRadialGradient *gradient,
const XFixed *stops,
const XRenderColor *colors,
int nstops);
Picture XRenderCreateConicalGradient (Display *dpy,
const XConicalGradient *gradient,
const XFixed *stops,
const XRenderColor *colors,
int nstops);
_XFUNCPROTOEND
#endif /* _XRENDER_H_ */

View File

@@ -0,0 +1,106 @@
/*
*
* Copyright © 2000 SuSE, Inc.
*
* 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, and that the name of SuSE not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. SuSE makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR 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.
*
* Author: Keith Packard, SuSE, Inc.
*/
#ifndef _XRENDERINT_H_
#define _XRENDERINT_H_
#include <nx-X11/Xlibint.h>
#include <nx-X11/Xutil.h>
#include <nx-X11/extensions/renderproto.h>
#include "Xrender_nxagent.h"
typedef struct {
Visual *visual;
XRenderPictFormat *format;
} XRenderVisual;
typedef struct {
int depth;
int nvisuals;
XRenderVisual *visuals;
} XRenderDepth;
typedef struct {
XRenderDepth *depths;
int ndepths;
XRenderPictFormat *fallback;
int subpixel;
} XRenderScreen;
typedef struct _XRenderInfo {
int major_version;
int minor_version;
XRenderPictFormat *format;
int nformat;
XRenderScreen *screen;
int nscreen;
XRenderDepth *depth;
int ndepth;
XRenderVisual *visual;
int nvisual;
int *subpixel;
int nsubpixel;
char **filter;
int nfilter;
short *filter_alias;
int nfilter_alias;
} XRenderInfo;
/* replaces XRenderExtDisplayInfo */
typedef struct _XRenderExtDisplayInfo {
struct _XRenderExtDisplayInfo *next; /* keep a linked list */
Display *display; /* which display this is */
XExtCodes *codes; /* the extension protocol codes */
XRenderInfo *info; /* extra data for the extension to use */
} XRenderExtDisplayInfo;
/* replaces XExtensionInfo */
typedef struct _XRenderExtInfo {
XRenderExtDisplayInfo *head; /* start of the list */
XRenderExtDisplayInfo *cur; /* most recently used */
int ndisplays; /* number of displays */
} XRenderExtInfo;
extern XRenderExtInfo XRenderExtensionInfo;
extern char XRenderExtensionName[];
XRenderExtDisplayInfo *
XRenderFindDisplay (Display *dpy);
#define RenderHasExtension(i) ((i) && ((i)->codes))
#define RenderCheckExtension(dpy,i,val) \
if (!RenderHasExtension(i)) { return val; }
#define RenderSimpleCheckExtension(dpy,i) \
if (!RenderHasExtension(i)) { return; }
/*
* Xlib uses long for 32-bit values. Xrender uses int. This
* matters on alpha. Note that this macro assumes that int is 32 bits.
*/
#define DataInt32(dpy,d,len) Data(dpy,(char *) (d),len)
#endif /* _XRENDERINT_H_ */

View File

@@ -0,0 +1,251 @@
/*
* Copyright (C) 1989-95 GROUPE BULL
*
* 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/or
* 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
* GROUPE BULL 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 GROUPE BULL shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from GROUPE BULL.
*/
/*****************************************************************************\
* xpm.h: *
* *
* XPM library *
* Include file *
* *
* Developed by Arnaud Le Hors *
\*****************************************************************************/
/*
* This file is a reduced version of the header file of
* <X11/xpm.h>
*
* This copy of code has been introduced to allow a clear namespace
* separation between <X11/...> and <nx-X11/...> header files.
*
* This version of the Xpm library header file only contains symbols
* required by nxagent and strictly avoids indirectly including
* from an X11 library that is also shipped in nx-X11/lib/.
*
* When using <X11/xpm.h> instead for inclusion in nxagent, it will
* attempt pulling in the <X11/extensions/Xlib.h> header file.
* However, the headers of the same name from <nx-X11/...> should be
* used instead.
*
* FIXME: Once the nxagent Xserver starts using libX11 from X.Org, this
* hack can be removed.
*
* 2015/06/26, Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
*/
#ifndef XPM_h
#define XPM_h
/*
* first some identification numbers:
* the version and revision numbers are determined with the following rule:
* SO Major number = LIB minor version number.
* SO Minor number = LIB sub-minor version number.
* e.g: Xpm version 3.2f
* we forget the 3 which is the format number, 2 gives 2, and f gives 6.
* thus we have XpmVersion = 2 and XpmRevision = 6
* which gives SOXPMLIBREV = 2.6
*
* Then the XpmIncludeVersion number is built from these numbers.
*/
#define XpmFormat 3
#define XpmVersion 4
#define XpmRevision 11
#define XpmIncludeVersion ((XpmFormat * 100 + XpmVersion) * 100 + XpmRevision)
#ifndef XPM_NUMBERS
/* let's define Pixel if it is not done yet */
#if ! defined(_XtIntrinsic_h) && ! defined(PIXEL_ALREADY_TYPEDEFED)
typedef unsigned long Pixel; /* Index into colormap */
# define PIXEL_ALREADY_TYPEDEFED
#endif
/* include headers from <nx-X11/...> instead of <X11/...> */
#include <nx-X11/Xlib.h>
#include <nx-X11/Xutil.h>
/* Return ErrorStatus codes:
* null if full success
* positive if partial success
* negative if failure
*/
#define XpmColorError 1
#define XpmSuccess 0
#define XpmOpenFailed -1
#define XpmFileInvalid -2
#define XpmNoMemory -3
#define XpmColorFailed -4
typedef struct {
char *name; /* Symbolic color name */
char *value; /* Color value */
Pixel pixel; /* Color pixel */
} XpmColorSymbol;
typedef struct {
char *name; /* name of the extension */
unsigned int nlines; /* number of lines in this extension */
char **lines; /* pointer to the extension array of strings */
} XpmExtension;
typedef struct {
char *string; /* characters string */
char *symbolic; /* symbolic name */
char *m_color; /* monochrom default */
char *g4_color; /* 4 level grayscale default */
char *g_color; /* other level grayscale default */
char *c_color; /* color default */
} XpmColor;
typedef struct {
unsigned int width; /* image width */
unsigned int height; /* image height */
unsigned int cpp; /* number of characters per pixel */
unsigned int ncolors; /* number of colors */
XpmColor *colorTable; /* list of related colors */
unsigned int *data; /* image data */
} XpmImage;
typedef struct {
unsigned long valuemask; /* Specifies which attributes are defined */
char *hints_cmt; /* Comment of the hints section */
char *colors_cmt; /* Comment of the colors section */
char *pixels_cmt; /* Comment of the pixels section */
unsigned int x_hotspot; /* Returns the x hotspot's coordinate */
unsigned int y_hotspot; /* Returns the y hotspot's coordinate */
unsigned int nextensions; /* number of extensions */
XpmExtension *extensions; /* pointer to array of extensions */
} XpmInfo;
typedef int (*XpmAllocColorFunc)(
Display* /* display */,
Colormap /* colormap */,
char* /* colorname */,
XColor* /* xcolor */,
void* /* closure */
);
typedef int (*XpmFreeColorsFunc)(
Display* /* display */,
Colormap /* colormap */,
Pixel* /* pixels */,
int /* npixels */,
void* /* closure */
);
/* required struct for hw/nxagent/Holder.c */
typedef struct {
unsigned long valuemask; /* Specifies which attributes are
defined */
Visual *visual; /* Specifies the visual to use */
Colormap colormap; /* Specifies the colormap to use */
unsigned int depth; /* Specifies the depth */
unsigned int width; /* Returns the width of the created
pixmap */
unsigned int height; /* Returns the height of the created
pixmap */
unsigned int x_hotspot; /* Returns the x hotspot's
coordinate */
unsigned int y_hotspot; /* Returns the y hotspot's
coordinate */
unsigned int cpp; /* Specifies the number of char per
pixel */
Pixel *pixels; /* List of used color pixels */
unsigned int npixels; /* Number of used pixels */
XpmColorSymbol *colorsymbols; /* List of color symbols to override */
unsigned int numsymbols; /* Number of symbols */
char *rgb_fname; /* RGB text file name */
unsigned int nextensions; /* Number of extensions */
XpmExtension *extensions; /* List of extensions */
unsigned int ncolors; /* Number of colors */
XpmColor *colorTable; /* List of colors */
/* 3.2 backward compatibility code */
char *hints_cmt; /* Comment of the hints section */
char *colors_cmt; /* Comment of the colors section */
char *pixels_cmt; /* Comment of the pixels section */
/* end 3.2 bc */
unsigned int mask_pixel; /* Color table index of transparent
color */
/* Color Allocation Directives */
Bool exactColors; /* Only use exact colors for visual */
unsigned int closeness; /* Allowable RGB deviation */
unsigned int red_closeness; /* Allowable red deviation */
unsigned int green_closeness; /* Allowable green deviation */
unsigned int blue_closeness; /* Allowable blue deviation */
int color_key; /* Use colors from this color set */
Pixel *alloc_pixels; /* Returns the list of alloc'ed color
pixels */
int nalloc_pixels; /* Returns the number of alloc'ed
color pixels */
Bool alloc_close_colors; /* Specify whether close colors should
be allocated using XAllocColor
or not */
int bitmap_format; /* Specify the format of 1bit depth
images: ZPixmap or XYBitmap */
/* Color functions */
XpmAllocColorFunc alloc_color; /* Application color allocator */
XpmFreeColorsFunc free_colors; /* Application color de-allocator */
void *color_closure; /* Application private data to pass to
alloc_color and free_colors */
} XpmAttributes;
/* XpmAttributes value masks bits */
/* required masks bits for hw/nxagent/Holder.c */
#define XpmDepth (1L<<2)
#define XpmSize (1L<<3) /* width & height */
/* macros for forward declarations of functions with prototypes */
#define FUNC(f, t, p) extern t f p
#define LFUNC(f, t, p) static t f p
/*
* functions declarations (for building nxagent against system wide libXpm4,
* but also against libNX_X11 (as opposed to system-wide libX11).
*/
_XFUNCPROTOBEGIN
/* Keep for hw/nxagent/Display.c */
FUNC(XpmCreatePixmapFromData, int, (Display *display,
Drawable d,
char **data,
Pixmap *pixmap_return,
Pixmap *shapemask_return,
XpmAttributes *attributes));
_XFUNCPROTOEND
#endif /* XPM_NUMBERS */
#endif