github.com/rajveermalviya/gamen@v0.1.2-0.20220930195403-9be15877c1aa/internal/xkbcommon/include/X11/extensions/renderproto.h (about)

     1  /*
     2   * Copyright © 2000 SuSE, Inc.
     3   *
     4   * Permission to use, copy, modify, distribute, and sell this software and its
     5   * documentation for any purpose is hereby granted without fee, provided that
     6   * the above copyright notice appear in all copies and that both that
     7   * copyright notice and this permission notice appear in supporting
     8   * documentation, and that the name of SuSE not be used in advertising or
     9   * publicity pertaining to distribution of the software without specific,
    10   * written prior permission.  SuSE makes no representations about the
    11   * suitability of this software for any purpose.  It is provided "as is"
    12   * without express or implied warranty.
    13   *
    14   * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
    15   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
    16   * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    17   * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
    18   * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
    19   * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    20   *
    21   * Author:  Keith Packard, SuSE, Inc.
    22   */
    23  
    24  #ifndef _XRENDERP_H_
    25  #define _XRENDERP_H_
    26  
    27  #include <X11/Xmd.h>
    28  #include <X11/extensions/render.h>
    29  
    30  #define Window CARD32
    31  #define Drawable CARD32
    32  #define Font CARD32
    33  #define Pixmap CARD32
    34  #define Cursor CARD32
    35  #define Colormap CARD32
    36  #define GContext CARD32
    37  #define Atom CARD32
    38  #define VisualID CARD32
    39  #define Time CARD32
    40  #define KeyCode CARD8
    41  #define KeySym CARD32
    42  
    43  #define Picture	    CARD32
    44  #define PictFormat  CARD32
    45  #define Fixed	    INT32
    46  #define Glyphset    CARD32
    47  
    48  /*
    49   * data structures
    50   */
    51  
    52  typedef struct {
    53      CARD16  red;
    54      CARD16  redMask;
    55      CARD16  green;
    56      CARD16  greenMask;
    57      CARD16  blue;
    58      CARD16  blueMask;
    59      CARD16  alpha;
    60      CARD16  alphaMask;
    61  } xDirectFormat;
    62  
    63  #define sz_xDirectFormat    16
    64  
    65  typedef struct {
    66      PictFormat	id;
    67      CARD8	type;
    68      CARD8	depth;
    69      CARD16	pad1;
    70      xDirectFormat   direct;
    71      Colormap	colormap;
    72  } xPictFormInfo;
    73  
    74  #define sz_xPictFormInfo    28
    75  
    76  typedef struct {
    77      VisualID	visual;
    78      PictFormat	format;
    79  } xPictVisual;
    80  
    81  #define sz_xPictVisual	    8
    82  
    83  typedef struct {
    84      CARD8	depth;
    85      CARD8	pad1;
    86      CARD16	nPictVisuals;
    87      CARD32	pad2;
    88  } xPictDepth;
    89  
    90  #define sz_xPictDepth	8
    91  
    92  typedef struct {
    93      CARD32	nDepth;
    94      PictFormat	fallback;
    95  } xPictScreen;
    96  
    97  #define sz_xPictScreen	8
    98  
    99  typedef struct {
   100      CARD32	pixel;
   101      CARD16	red;
   102      CARD16	green;
   103      CARD16	blue;
   104      CARD16	alpha;
   105  } xIndexValue;
   106  
   107  #define sz_xIndexValue	12
   108  
   109  typedef struct {
   110      CARD16	red;
   111      CARD16	green;
   112      CARD16	blue;
   113      CARD16	alpha;
   114  } xRenderColor;
   115  
   116  #define sz_xRenderColor	8
   117  
   118  typedef struct {
   119      Fixed	x;
   120      Fixed	y;
   121  } xPointFixed;
   122  
   123  #define sz_xPointFixed	8
   124  
   125  typedef struct {
   126      xPointFixed	p1;
   127      xPointFixed p2;
   128  } xLineFixed;
   129  
   130  #define sz_xLineFixed	16
   131  
   132  typedef struct {
   133      xPointFixed	p1, p2, p3;
   134  } xTriangle;
   135  
   136  #define sz_xTriangle	24
   137  
   138  typedef struct {
   139      Fixed	top;
   140      Fixed	bottom;
   141      xLineFixed	left;
   142      xLineFixed	right;
   143  } xTrapezoid;
   144  
   145  #define sz_xTrapezoid	40
   146  
   147  typedef struct {
   148      CARD16  width;
   149      CARD16  height;
   150      INT16   x;
   151      INT16   y;
   152      INT16   xOff;
   153      INT16   yOff;
   154  } xGlyphInfo;
   155  
   156  #define sz_xGlyphInfo	12
   157  
   158  typedef struct {
   159      CARD8   len;
   160      CARD8   pad1;
   161      CARD16  pad2;
   162      INT16   deltax;
   163      INT16   deltay;
   164  } xGlyphElt;
   165  
   166  #define sz_xGlyphElt	8
   167  
   168  typedef struct {
   169      Fixed   l, r, y;
   170  } xSpanFix;
   171  
   172  #define sz_xSpanFix	12
   173  
   174  typedef struct {
   175      xSpanFix	top, bot;
   176  } xTrap;
   177  
   178  #define sz_xTrap	24
   179  
   180  /*
   181   * requests and replies
   182   */
   183  typedef struct {
   184      CARD8   reqType;
   185      CARD8   renderReqType;
   186      CARD16  length;
   187      CARD32  majorVersion;
   188      CARD32  minorVersion;
   189  } xRenderQueryVersionReq;
   190  
   191  #define sz_xRenderQueryVersionReq   12
   192  
   193  typedef struct {
   194      BYTE    type;   /* X_Reply */
   195      BYTE    pad1;
   196      CARD16  sequenceNumber;
   197      CARD32  length;
   198      CARD32  majorVersion;
   199      CARD32  minorVersion;
   200      CARD32  pad2;
   201      CARD32  pad3;
   202      CARD32  pad4;
   203      CARD32  pad5;
   204  } xRenderQueryVersionReply;
   205  
   206  #define sz_xRenderQueryVersionReply	32
   207  
   208  typedef struct {
   209      CARD8   reqType;
   210      CARD8   renderReqType;
   211      CARD16  length;
   212  } xRenderQueryPictFormatsReq;
   213  
   214  #define sz_xRenderQueryPictFormatsReq	4
   215  
   216  typedef struct {
   217      BYTE    type;   /* X_Reply */
   218      BYTE    pad1;
   219      CARD16  sequenceNumber;
   220      CARD32  length;
   221      CARD32  numFormats;
   222      CARD32  numScreens;
   223      CARD32  numDepths;
   224      CARD32  numVisuals;
   225      CARD32  numSubpixel;	    /* Version 0.6 */
   226      CARD32  pad5;
   227  } xRenderQueryPictFormatsReply;
   228  
   229  #define sz_xRenderQueryPictFormatsReply	32
   230  
   231  typedef struct {
   232      CARD8   reqType;
   233      CARD8   renderReqType;
   234      CARD16  length;
   235      PictFormat	format;
   236  } xRenderQueryPictIndexValuesReq;
   237  
   238  #define sz_xRenderQueryPictIndexValuesReq   8
   239  
   240  typedef struct {
   241      BYTE    type;   /* X_Reply */
   242      BYTE    pad1;
   243      CARD16  sequenceNumber;
   244      CARD32  length;
   245      CARD32  numIndexValues;
   246      CARD32  pad2;
   247      CARD32  pad3;
   248      CARD32  pad4;
   249      CARD32  pad5;
   250      CARD32  pad6;
   251  } xRenderQueryPictIndexValuesReply;
   252  
   253  #define sz_xRenderQueryPictIndexValuesReply 32
   254  
   255  typedef struct {
   256      CARD8	reqType;
   257      CARD8	renderReqType;
   258      CARD16	length;
   259      Picture	pid;
   260      Drawable	drawable;
   261      PictFormat	format;
   262      CARD32	mask;
   263  } xRenderCreatePictureReq;
   264  
   265  #define sz_xRenderCreatePictureReq	    20
   266  
   267  typedef struct {
   268      CARD8	reqType;
   269      CARD8	renderReqType;
   270      CARD16	length;
   271      Picture	picture;
   272      CARD32	mask;
   273  } xRenderChangePictureReq;
   274  
   275  #define sz_xRenderChangePictureReq	    12
   276  
   277  typedef struct {
   278      CARD8       reqType;
   279      CARD8       renderReqType;
   280      CARD16      length;
   281      Picture     picture;
   282      INT16       xOrigin;
   283      INT16       yOrigin;
   284  } xRenderSetPictureClipRectanglesReq;
   285  
   286  #define sz_xRenderSetPictureClipRectanglesReq	    12
   287  
   288  typedef struct {
   289      CARD8       reqType;
   290      CARD8       renderReqType;
   291      CARD16      length;
   292      Picture     picture;
   293  } xRenderFreePictureReq;
   294  
   295  #define sz_xRenderFreePictureReq	    8
   296  
   297  typedef struct {
   298      CARD8       reqType;
   299      CARD8       renderReqType;
   300      CARD16      length;
   301      CARD8	op;
   302      CARD8	pad1;
   303      CARD16	pad2;
   304      Picture	src;
   305      Picture	mask;
   306      Picture	dst;
   307      INT16	xSrc;
   308      INT16	ySrc;
   309      INT16	xMask;
   310      INT16	yMask;
   311      INT16	xDst;
   312      INT16	yDst;
   313      CARD16	width;
   314      CARD16	height;
   315  } xRenderCompositeReq;
   316  
   317  #define sz_xRenderCompositeReq		    36
   318  
   319  typedef struct {
   320      CARD8       reqType;
   321      CARD8       renderReqType;
   322      CARD16      length;
   323      Picture	src;
   324      Picture	dst;
   325      CARD32	colorScale;
   326      CARD32	alphaScale;
   327      INT16	xSrc;
   328      INT16	ySrc;
   329      INT16	xDst;
   330      INT16	yDst;
   331      CARD16	width;
   332      CARD16	height;
   333  } xRenderScaleReq;
   334  
   335  #define sz_xRenderScaleReq			    32
   336  
   337  typedef struct {
   338      CARD8       reqType;
   339      CARD8       renderReqType;
   340      CARD16      length;
   341      CARD8	op;
   342      CARD8	pad1;
   343      CARD16	pad2;
   344      Picture	src;
   345      Picture	dst;
   346      PictFormat	maskFormat;
   347      INT16	xSrc;
   348      INT16	ySrc;
   349  } xRenderTrapezoidsReq;
   350  
   351  #define sz_xRenderTrapezoidsReq			    24
   352  
   353  typedef struct {
   354      CARD8       reqType;
   355      CARD8       renderReqType;
   356      CARD16      length;
   357      CARD8	op;
   358      CARD8	pad1;
   359      CARD16	pad2;
   360      Picture	src;
   361      Picture	dst;
   362      PictFormat	maskFormat;
   363      INT16	xSrc;
   364      INT16	ySrc;
   365  } xRenderTrianglesReq;
   366  
   367  #define sz_xRenderTrianglesReq			    24
   368  
   369  typedef struct {
   370      CARD8       reqType;
   371      CARD8       renderReqType;
   372      CARD16      length;
   373      CARD8	op;
   374      CARD8	pad1;
   375      CARD16	pad2;
   376      Picture	src;
   377      Picture	dst;
   378      PictFormat	maskFormat;
   379      INT16	xSrc;
   380      INT16	ySrc;
   381  } xRenderTriStripReq;
   382  
   383  #define sz_xRenderTriStripReq			    24
   384  
   385  typedef struct {
   386      CARD8       reqType;
   387      CARD8       renderReqType;
   388      CARD16      length;
   389      CARD8	op;
   390      CARD8	pad1;
   391      CARD16	pad2;
   392      Picture	src;
   393      Picture	dst;
   394      PictFormat	maskFormat;
   395      INT16	xSrc;
   396      INT16	ySrc;
   397  } xRenderTriFanReq;
   398  
   399  #define sz_xRenderTriFanReq			    24
   400  
   401  typedef struct {
   402      CARD8       reqType;
   403      CARD8       renderReqType;
   404      CARD16      length;
   405      Glyphset    gsid;
   406      PictFormat  format;
   407  } xRenderCreateGlyphSetReq;
   408  
   409  #define sz_xRenderCreateGlyphSetReq		    12
   410  
   411  typedef struct {
   412      CARD8       reqType;
   413      CARD8       renderReqType;
   414      CARD16      length;
   415      Glyphset    gsid;
   416      Glyphset    existing;
   417  } xRenderReferenceGlyphSetReq;
   418  
   419  #define sz_xRenderReferenceGlyphSetReq		    24
   420  
   421  typedef struct {
   422      CARD8       reqType;
   423      CARD8       renderReqType;
   424      CARD16      length;
   425      Glyphset    glyphset;
   426  } xRenderFreeGlyphSetReq;
   427  
   428  #define sz_xRenderFreeGlyphSetReq		    8
   429  
   430  typedef struct {
   431      CARD8       reqType;
   432      CARD8       renderReqType;
   433      CARD16      length;
   434      Glyphset    glyphset;
   435      CARD32	nglyphs;
   436  } xRenderAddGlyphsReq;
   437  
   438  #define sz_xRenderAddGlyphsReq			    12
   439  
   440  typedef struct {
   441      CARD8       reqType;
   442      CARD8       renderReqType;
   443      CARD16      length;
   444      Glyphset    glyphset;
   445  } xRenderFreeGlyphsReq;
   446  
   447  #define sz_xRenderFreeGlyphsReq			    8
   448  
   449  typedef struct {
   450      CARD8       reqType;
   451      CARD8       renderReqType;
   452      CARD16      length;
   453      CARD8	op;
   454      CARD8	pad1;
   455      CARD16	pad2;
   456      Picture	src;
   457      Picture	dst;
   458      PictFormat	maskFormat;
   459      Glyphset	glyphset;
   460      INT16	xSrc;
   461      INT16	ySrc;
   462  } xRenderCompositeGlyphsReq, xRenderCompositeGlyphs8Req,
   463  xRenderCompositeGlyphs16Req, xRenderCompositeGlyphs32Req;
   464  
   465  #define sz_xRenderCompositeGlyphs8Req		    28
   466  #define sz_xRenderCompositeGlyphs16Req		    28
   467  #define sz_xRenderCompositeGlyphs32Req		    28
   468  
   469  /* 0.1 and higher */
   470  
   471  typedef struct {
   472      CARD8	reqType;
   473      CARD8       renderReqType;
   474      CARD16      length;
   475      CARD8	op;
   476      CARD8	pad1;
   477      CARD16	pad2;
   478      Picture	dst;
   479      xRenderColor    color;
   480  } xRenderFillRectanglesReq;
   481  
   482  #define sz_xRenderFillRectanglesReq		    20
   483  
   484  /* 0.5 and higher */
   485  
   486  typedef struct {
   487      CARD8	reqType;
   488      CARD8	renderReqType;
   489      CARD16	length;
   490      Cursor	cid;
   491      Picture	src;
   492      CARD16	x;
   493      CARD16	y;
   494  } xRenderCreateCursorReq;
   495  
   496  #define sz_xRenderCreateCursorReq		    16
   497  
   498  /* 0.6 and higher */
   499  
   500  /*
   501   * This can't use an array because 32-bit values may be in bitfields
   502   */
   503  typedef struct {
   504      Fixed	matrix11;
   505      Fixed	matrix12;
   506      Fixed	matrix13;
   507      Fixed	matrix21;
   508      Fixed	matrix22;
   509      Fixed	matrix23;
   510      Fixed	matrix31;
   511      Fixed	matrix32;
   512      Fixed	matrix33;
   513  } xRenderTransform;
   514  
   515  #define sz_xRenderTransform 36
   516  
   517  typedef struct {
   518      CARD8		reqType;
   519      CARD8		renderReqType;
   520      CARD16		length;
   521      Picture		picture;
   522      xRenderTransform	transform;
   523  } xRenderSetPictureTransformReq;
   524  
   525  #define sz_xRenderSetPictureTransformReq	    44
   526  
   527  typedef struct {
   528      CARD8		reqType;
   529      CARD8		renderReqType;
   530      CARD16		length;
   531      Drawable		drawable;
   532  } xRenderQueryFiltersReq;
   533  
   534  #define sz_xRenderQueryFiltersReq		    8
   535  
   536  typedef struct {
   537      BYTE    type;   /* X_Reply */
   538      BYTE    pad1;
   539      CARD16  sequenceNumber;
   540      CARD32  length;
   541      CARD32  numAliases;	/* LISTofCARD16 */
   542      CARD32  numFilters;	/* LISTofSTRING8 */
   543      CARD32  pad2;
   544      CARD32  pad3;
   545      CARD32  pad4;
   546      CARD32  pad5;
   547  } xRenderQueryFiltersReply;
   548  
   549  #define sz_xRenderQueryFiltersReply		    32
   550  
   551  typedef struct {
   552      CARD8		reqType;
   553      CARD8		renderReqType;
   554      CARD16		length;
   555      Picture		picture;
   556      CARD16		nbytes; /* number of bytes in name */
   557      CARD16		pad;
   558  } xRenderSetPictureFilterReq;
   559  
   560  #define sz_xRenderSetPictureFilterReq		    12
   561  
   562  /* 0.8 and higher */
   563  
   564  typedef struct {
   565      Cursor		cursor;
   566      CARD32		delay;
   567  } xAnimCursorElt;
   568  
   569  #define sz_xAnimCursorElt			    8
   570  
   571  typedef struct {
   572      CARD8		reqType;
   573      CARD8		renderReqType;
   574      CARD16		length;
   575      Cursor		cid;
   576  } xRenderCreateAnimCursorReq;
   577  
   578  #define sz_xRenderCreateAnimCursorReq		    8
   579  
   580  /* 0.9 and higher */
   581  
   582  typedef struct {
   583      CARD8		reqType;
   584      CARD8		renderReqType;
   585      CARD16		length;
   586      Picture		picture;
   587      INT16		xOff;
   588      INT16		yOff;
   589  } xRenderAddTrapsReq;
   590  
   591  #define sz_xRenderAddTrapsReq			    12
   592  
   593  /* 0.10 and higher */
   594  
   595  typedef struct {
   596      CARD8	reqType;
   597      CARD8	renderReqType;
   598      CARD16	length;
   599      Picture	pid;
   600      xRenderColor color;
   601  } xRenderCreateSolidFillReq;
   602  
   603  #define sz_xRenderCreateSolidFillReq                 16
   604  
   605  typedef struct {
   606      CARD8	reqType;
   607      CARD8	renderReqType;
   608      CARD16	length;
   609      Picture	pid;
   610      xPointFixed p1;
   611      xPointFixed p2;
   612      CARD32      nStops;
   613  } xRenderCreateLinearGradientReq;
   614  
   615  #define sz_xRenderCreateLinearGradientReq                 28
   616  
   617  typedef struct {
   618      CARD8	reqType;
   619      CARD8	renderReqType;
   620      CARD16	length;
   621      Picture	pid;
   622      xPointFixed inner;
   623      xPointFixed outer;
   624      Fixed       inner_radius;
   625      Fixed       outer_radius;
   626      CARD32      nStops;
   627  } xRenderCreateRadialGradientReq;
   628  
   629  #define sz_xRenderCreateRadialGradientReq                 36
   630  
   631  typedef struct {
   632      CARD8	reqType;
   633      CARD8	renderReqType;
   634      CARD16	length;
   635      Picture	pid;
   636      xPointFixed center;
   637      Fixed       angle; /* in degrees */
   638      CARD32      nStops;
   639  } xRenderCreateConicalGradientReq;
   640  
   641  #define sz_xRenderCreateConicalGradientReq                 24
   642  
   643  #undef Window
   644  #undef Drawable
   645  #undef Font
   646  #undef Pixmap
   647  #undef Cursor
   648  #undef Colormap
   649  #undef GContext
   650  #undef Atom
   651  #undef VisualID
   652  #undef Time
   653  #undef KeyCode
   654  #undef KeySym
   655  
   656  #undef Picture
   657  #undef PictFormat
   658  #undef Fixed
   659  #undef Glyphset
   660  
   661  #endif /* _XRENDERP_H_ */