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

     1  /*
     2  
     3  Copyright 1995  Kaleb S. KEITHLEY
     4  
     5  Permission is hereby granted, free of charge, to any person obtaining
     6  a copy of this software and associated documentation files (the
     7  "Software"), to deal in the Software without restriction, including
     8  without limitation the rights to use, copy, modify, merge, publish,
     9  distribute, sublicense, and/or sell copies of the Software, and to
    10  permit persons to whom the Software is furnished to do so, subject to
    11  the following conditions:
    12  
    13  The above copyright notice and this permission notice shall be
    14  included in all copies or substantial portions of the Software.
    15  
    16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    17  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    18  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    19  IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES
    20  OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
    21  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    22  OTHER DEALINGS IN THE SOFTWARE.
    23  
    24  Except as contained in this notice, the name of Kaleb S. KEITHLEY
    25  shall not be used in advertising or otherwise to promote the sale, use
    26  or other dealings in this Software without prior written authorization
    27  from Kaleb S. KEITHLEY
    28  
    29  */
    30  
    31  /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
    32  
    33  #ifndef _XF86VIDMODEPROTO_H_
    34  #define _XF86VIDMODEPROTO_H_
    35  
    36  #include <X11/extensions/xf86vm.h>
    37  
    38  #define XF86VIDMODENAME "XFree86-VidModeExtension"
    39  
    40  #define XF86VIDMODE_MAJOR_VERSION	2	/* current version numbers */
    41  #define XF86VIDMODE_MINOR_VERSION	2
    42  
    43  #define X_XF86VidModeQueryVersion	0
    44  #define X_XF86VidModeGetModeLine	1
    45  #define X_XF86VidModeModModeLine	2
    46  #define X_XF86VidModeSwitchMode		3
    47  #define X_XF86VidModeGetMonitor		4
    48  #define X_XF86VidModeLockModeSwitch	5
    49  #define X_XF86VidModeGetAllModeLines	6
    50  #define X_XF86VidModeAddModeLine	7
    51  #define X_XF86VidModeDeleteModeLine	8
    52  #define X_XF86VidModeValidateModeLine	9
    53  #define X_XF86VidModeSwitchToMode	10
    54  #define X_XF86VidModeGetViewPort	11
    55  #define X_XF86VidModeSetViewPort	12
    56  /* new for version 2.x of this extension */
    57  #define X_XF86VidModeGetDotClocks	13
    58  #define X_XF86VidModeSetClientVersion	14
    59  #define X_XF86VidModeSetGamma		15
    60  #define X_XF86VidModeGetGamma		16
    61  #define X_XF86VidModeGetGammaRamp	17
    62  #define X_XF86VidModeSetGammaRamp	18
    63  #define X_XF86VidModeGetGammaRampSize	19
    64  #define X_XF86VidModeGetPermissions	20
    65  /*
    66   * major version 0 == uses parameter-to-wire functions in XFree86 libXxf86vm.
    67   * major version 1 == uses parameter-to-wire functions hard-coded in xvidtune
    68   *                    client.
    69   * major version 2 == uses new protocol version in XFree86 4.0.
    70   */
    71  
    72  typedef struct _XF86VidModeQueryVersion {
    73      CARD8	reqType;		/* always XF86VidModeReqCode */
    74      CARD8	xf86vidmodeReqType;	/* always X_XF86VidModeQueryVersion */
    75      CARD16	length;
    76  } xXF86VidModeQueryVersionReq;
    77  #define sz_xXF86VidModeQueryVersionReq	4
    78  
    79  typedef struct {
    80      BYTE	type;			/* X_Reply */
    81      BOOL	pad1;
    82      CARD16	sequenceNumber;
    83      CARD32	length;
    84      CARD16	majorVersion;		/* major version of XF86VidMode */
    85      CARD16	minorVersion;		/* minor version of XF86VidMode */
    86      CARD32	pad2;
    87      CARD32	pad3;
    88      CARD32	pad4;
    89      CARD32	pad5;
    90      CARD32	pad6;
    91  } xXF86VidModeQueryVersionReply;
    92  #define sz_xXF86VidModeQueryVersionReply	32
    93  
    94  typedef struct _XF86VidModeGetModeLine {
    95      CARD8	reqType;		/* always XF86VidModeReqCode */
    96      CARD8	xf86vidmodeReqType;
    97      CARD16	length;
    98      CARD16	screen;
    99      CARD16	pad;
   100  } xXF86VidModeGetModeLineReq,
   101    xXF86VidModeGetAllModeLinesReq,
   102    xXF86VidModeGetMonitorReq,
   103    xXF86VidModeGetViewPortReq,
   104    xXF86VidModeGetDotClocksReq,
   105    xXF86VidModeGetPermissionsReq;
   106  #define sz_xXF86VidModeGetModeLineReq		8
   107  #define sz_xXF86VidModeGetAllModeLinesReq	8
   108  #define sz_xXF86VidModeGetMonitorReq		8
   109  #define sz_xXF86VidModeGetViewPortReq		8
   110  #define sz_xXF86VidModeGetDotClocksReq		8
   111  #define sz_xXF86VidModeGetPermissionsReq	8
   112  
   113  typedef struct {
   114      BYTE	type;			/* X_Reply */
   115      BOOL	pad1;
   116      CARD16	sequenceNumber;
   117      CARD32	length;
   118      CARD32	dotclock;
   119      CARD16	hdisplay;
   120      CARD16	hsyncstart;
   121      CARD16	hsyncend;
   122      CARD16	htotal;
   123      CARD16	hskew;
   124      CARD16	vdisplay;
   125      CARD16	vsyncstart;
   126      CARD16	vsyncend;
   127      CARD16	vtotal;
   128      CARD16	pad2;
   129      CARD32	flags;
   130      CARD32	reserved1;
   131      CARD32	reserved2;
   132      CARD32	reserved3;
   133      CARD32	privsize;
   134  } xXF86VidModeGetModeLineReply;
   135  #define sz_xXF86VidModeGetModeLineReply	52
   136  
   137  /* 0.x version */
   138  typedef struct {
   139      BYTE	type;			/* X_Reply */
   140      BOOL	pad1;
   141      CARD16	sequenceNumber;
   142      CARD32	length;
   143      CARD32	dotclock;
   144      CARD16	hdisplay;
   145      CARD16	hsyncstart;
   146      CARD16	hsyncend;
   147      CARD16	htotal;
   148      CARD16	vdisplay;
   149      CARD16	vsyncstart;
   150      CARD16	vsyncend;
   151      CARD16	vtotal;
   152      CARD32	flags;
   153      CARD32	privsize;
   154  } xXF86OldVidModeGetModeLineReply;
   155  #define sz_xXF86OldVidModeGetModeLineReply	36
   156  
   157  typedef struct {
   158      CARD32	dotclock;
   159      CARD16	hdisplay;
   160      CARD16	hsyncstart;
   161      CARD16	hsyncend;
   162      CARD16	htotal;
   163      CARD32	hskew;
   164      CARD16	vdisplay;
   165      CARD16	vsyncstart;
   166      CARD16	vsyncend;
   167      CARD16	vtotal;
   168      CARD16	pad1;
   169      CARD32	flags;
   170      CARD32	reserved1;
   171      CARD32	reserved2;
   172      CARD32	reserved3;
   173      CARD32	privsize;
   174  } xXF86VidModeModeInfo;
   175  
   176  /* 0.x version */
   177  typedef struct {
   178      CARD32	dotclock;
   179      CARD16	hdisplay;
   180      CARD16	hsyncstart;
   181      CARD16	hsyncend;
   182      CARD16	htotal;
   183      CARD16	vdisplay;
   184      CARD16	vsyncstart;
   185      CARD16	vsyncend;
   186      CARD16	vtotal;
   187      CARD32	flags;
   188      CARD32	privsize;
   189  } xXF86OldVidModeModeInfo;
   190  
   191  typedef struct {
   192      BYTE	type;			/* X_Reply */
   193      BOOL	pad1;
   194      CARD16	sequenceNumber;
   195      CARD32	length;
   196      CARD32	modecount;
   197      CARD32	pad2;
   198      CARD32	pad3;
   199      CARD32	pad4;
   200      CARD32	pad5;
   201      CARD32	pad6;
   202  } xXF86VidModeGetAllModeLinesReply;
   203  #define sz_xXF86VidModeGetAllModeLinesReply	32
   204  
   205  typedef struct _XF86VidModeAddModeLine {
   206      CARD8	reqType;		/* always XF86VidModeReqCode */
   207      CARD8	xf86vidmodeReqType;	/* always X_XF86VidModeAddMode */
   208      CARD16	length;
   209      CARD32	screen;			/* could be CARD16 but need the pad */
   210      CARD32	dotclock;
   211      CARD16	hdisplay;
   212      CARD16	hsyncstart;
   213      CARD16	hsyncend;
   214      CARD16	htotal;
   215      CARD16	hskew;
   216      CARD16	vdisplay;
   217      CARD16	vsyncstart;
   218      CARD16	vsyncend;
   219      CARD16	vtotal;
   220      CARD16	pad1;
   221      CARD32	flags;
   222      CARD32	reserved1;
   223      CARD32	reserved2;
   224      CARD32	reserved3;
   225      CARD32	privsize;
   226      CARD32	after_dotclock;
   227      CARD16	after_hdisplay;
   228      CARD16	after_hsyncstart;
   229      CARD16	after_hsyncend;
   230      CARD16	after_htotal;
   231      CARD16	after_hskew;
   232      CARD16	after_vdisplay;
   233      CARD16	after_vsyncstart;
   234      CARD16	after_vsyncend;
   235      CARD16	after_vtotal;
   236      CARD16	pad2;
   237      CARD32	after_flags;
   238      CARD32	reserved4;
   239      CARD32	reserved5;
   240      CARD32	reserved6;
   241  } xXF86VidModeAddModeLineReq;
   242  #define sz_xXF86VidModeAddModeLineReq	92
   243  
   244  /* 0.x version */
   245  typedef struct _XF86OldVidModeAddModeLine {
   246      CARD8	reqType;		/* always XF86VidModeReqCode */
   247      CARD8	xf86vidmodeReqType;	/* always X_XF86VidModeAddMode */
   248      CARD16	length;
   249      CARD32	screen;			/* could be CARD16 but need the pad */
   250      CARD32	dotclock;
   251      CARD16	hdisplay;
   252      CARD16	hsyncstart;
   253      CARD16	hsyncend;
   254      CARD16	htotal;
   255      CARD16	vdisplay;
   256      CARD16	vsyncstart;
   257      CARD16	vsyncend;
   258      CARD16	vtotal;
   259      CARD32	flags;
   260      CARD32	privsize;
   261      CARD32	after_dotclock;
   262      CARD16	after_hdisplay;
   263      CARD16	after_hsyncstart;
   264      CARD16	after_hsyncend;
   265      CARD16	after_htotal;
   266      CARD16	after_vdisplay;
   267      CARD16	after_vsyncstart;
   268      CARD16	after_vsyncend;
   269      CARD16	after_vtotal;
   270      CARD32	after_flags;
   271  } xXF86OldVidModeAddModeLineReq;
   272  #define sz_xXF86OldVidModeAddModeLineReq	60
   273  
   274  typedef struct _XF86VidModeModModeLine {
   275      CARD8	reqType;		/* always XF86VidModeReqCode */
   276      CARD8	xf86vidmodeReqType;	/* always X_XF86VidModeModModeLine */
   277      CARD16	length;
   278      CARD32	screen;			/* could be CARD16 but need the pad */
   279      CARD16	hdisplay;
   280      CARD16	hsyncstart;
   281      CARD16	hsyncend;
   282      CARD16	htotal;
   283      CARD16	hskew;
   284      CARD16	vdisplay;
   285      CARD16	vsyncstart;
   286      CARD16	vsyncend;
   287      CARD16	vtotal;
   288      CARD16	pad1;
   289      CARD32	flags;
   290      CARD32	reserved1;
   291      CARD32	reserved2;
   292      CARD32	reserved3;
   293      CARD32	privsize;
   294  } xXF86VidModeModModeLineReq;
   295  #define sz_xXF86VidModeModModeLineReq	48
   296  
   297  /* 0.x version */
   298  typedef struct _XF86OldVidModeModModeLine {
   299      CARD8	reqType;		/* always XF86OldVidModeReqCode */
   300      CARD8	xf86vidmodeReqType;	/* always X_XF86OldVidModeModModeLine */
   301      CARD16	length;
   302      CARD32	screen;			/* could be CARD16 but need the pad */
   303      CARD16	hdisplay;
   304      CARD16	hsyncstart;
   305      CARD16	hsyncend;
   306      CARD16	htotal;
   307      CARD16	vdisplay;
   308      CARD16	vsyncstart;
   309      CARD16	vsyncend;
   310      CARD16	vtotal;
   311      CARD32	flags;
   312      CARD32	privsize;
   313  } xXF86OldVidModeModModeLineReq;
   314  #define sz_xXF86OldVidModeModModeLineReq	32
   315  
   316  typedef struct _XF86VidModeValidateModeLine {
   317      CARD8	reqType;		/* always XF86VidModeReqCode */
   318      CARD8	xf86vidmodeReqType;
   319      CARD16	length;
   320      CARD32	screen;			/* could be CARD16 but need the pad */
   321      CARD32	dotclock;
   322      CARD16	hdisplay;
   323      CARD16	hsyncstart;
   324      CARD16	hsyncend;
   325      CARD16	htotal;
   326      CARD16	hskew;
   327      CARD16	vdisplay;
   328      CARD16	vsyncstart;
   329      CARD16	vsyncend;
   330      CARD16	vtotal;
   331      CARD16	pad1;
   332      CARD32	flags;
   333      CARD32	reserved1;
   334      CARD32	reserved2;
   335      CARD32	reserved3;
   336      CARD32	privsize;
   337  } xXF86VidModeDeleteModeLineReq,
   338    xXF86VidModeValidateModeLineReq,
   339    xXF86VidModeSwitchToModeReq;
   340  #define sz_xXF86VidModeDeleteModeLineReq	52
   341  #define sz_xXF86VidModeValidateModeLineReq	52
   342  #define sz_xXF86VidModeSwitchToModeReq		52
   343  
   344  /* 0.x version */
   345  typedef struct _XF86OldVidModeValidateModeLine {
   346      CARD8	reqType;		/* always XF86OldVidModeReqCode */
   347      CARD8	xf86vidmodeReqType;
   348      CARD16	length;
   349      CARD32	screen;			/* could be CARD16 but need the pad */
   350      CARD32	dotclock;
   351      CARD16	hdisplay;
   352      CARD16	hsyncstart;
   353      CARD16	hsyncend;
   354      CARD16	htotal;
   355      CARD16	vdisplay;
   356      CARD16	vsyncstart;
   357      CARD16	vsyncend;
   358      CARD16	vtotal;
   359      CARD32	flags;
   360      CARD32	privsize;
   361  } xXF86OldVidModeDeleteModeLineReq,
   362    xXF86OldVidModeValidateModeLineReq,
   363    xXF86OldVidModeSwitchToModeReq;
   364  #define sz_xXF86OldVidModeDeleteModeLineReq	36
   365  #define sz_xXF86OldVidModeValidateModeLineReq	36
   366  #define sz_xXF86OldVidModeSwitchToModeReq	36
   367  
   368  typedef struct _XF86VidModeSwitchMode {
   369      CARD8	reqType;		/* always XF86VidModeReqCode */
   370      CARD8	xf86vidmodeReqType;	/* always X_XF86VidModeSwitchMode */
   371      CARD16	length;
   372      CARD16	screen;
   373      CARD16	zoom;
   374  } xXF86VidModeSwitchModeReq;
   375  #define sz_xXF86VidModeSwitchModeReq	8
   376  
   377  typedef struct _XF86VidModeLockModeSwitch {
   378      CARD8	reqType;		/* always XF86VidModeReqCode */
   379      CARD8	xf86vidmodeReqType;	/* always X_XF86VidModeLockModeSwitch */
   380      CARD16	length;
   381      CARD16	screen;
   382      CARD16	lock;
   383  } xXF86VidModeLockModeSwitchReq;
   384  #define sz_xXF86VidModeLockModeSwitchReq	8
   385  
   386  typedef struct {
   387      BYTE	type;			/* X_Reply */
   388      BOOL	pad1;
   389      CARD16	sequenceNumber;
   390      CARD32	length;
   391      CARD32	status;
   392      CARD32	pad2;
   393      CARD32	pad3;
   394      CARD32	pad4;
   395      CARD32	pad5;
   396      CARD32	pad6;
   397  } xXF86VidModeValidateModeLineReply;
   398  #define sz_xXF86VidModeValidateModeLineReply	32
   399  
   400  typedef struct {
   401      BYTE	type;			/* X_Reply */
   402      BOOL	pad1;
   403      CARD16	sequenceNumber;
   404      CARD32	length;
   405      CARD8	vendorLength;
   406      CARD8	modelLength;
   407      CARD8	nhsync;
   408      CARD8	nvsync;
   409      CARD32	pad2;
   410      CARD32	pad3;
   411      CARD32	pad4;
   412      CARD32	pad5;
   413      CARD32	pad6;
   414  } xXF86VidModeGetMonitorReply;
   415  #define sz_xXF86VidModeGetMonitorReply	32
   416  
   417  typedef struct {
   418      BYTE	type;
   419      BOOL	pad1;
   420      CARD16	sequenceNumber;
   421      CARD32	length;
   422      CARD32	x;
   423      CARD32	y;
   424      CARD32	pad2;
   425      CARD32	pad3;
   426      CARD32	pad4;
   427      CARD32	pad5;
   428  } xXF86VidModeGetViewPortReply;
   429  #define sz_xXF86VidModeGetViewPortReply	32
   430  
   431  typedef struct _XF86VidModeSetViewPort {
   432      CARD8	reqType;		/* always VidModeReqCode */
   433      CARD8	xf86vidmodeReqType;	/* always X_XF86VidModeSetViewPort */
   434      CARD16	length;
   435      CARD16	screen;
   436      CARD16	pad;
   437      CARD32	x;
   438      CARD32	y;
   439  } xXF86VidModeSetViewPortReq;
   440  #define sz_xXF86VidModeSetViewPortReq	16
   441  
   442  typedef struct {
   443      BYTE	type;
   444      BOOL	pad1;
   445      CARD16	sequenceNumber;
   446      CARD32	length;
   447      CARD32	flags;
   448      CARD32	clocks;
   449      CARD32	maxclocks;
   450      CARD32	pad2;
   451      CARD32	pad3;
   452      CARD32	pad4;
   453  } xXF86VidModeGetDotClocksReply;
   454  #define sz_xXF86VidModeGetDotClocksReply	32
   455  
   456  typedef struct _XF86VidModeSetClientVersion {
   457      CARD8	reqType;		/* always XF86VidModeReqCode */
   458      CARD8	xf86vidmodeReqType;
   459      CARD16	length;
   460      CARD16	major;
   461      CARD16	minor;
   462  } xXF86VidModeSetClientVersionReq;
   463  #define sz_xXF86VidModeSetClientVersionReq	8
   464  
   465  typedef struct _XF86VidModeGetGamma {
   466      CARD8	reqType;		/* always XF86VidModeReqCode */
   467      CARD8	xf86vidmodeReqType;
   468      CARD16	length;
   469      CARD16	screen;
   470      CARD16	pad;
   471      CARD32	pad1;
   472      CARD32	pad2;
   473      CARD32	pad3;
   474      CARD32	pad4;
   475      CARD32	pad5;
   476      CARD32	pad6;
   477  } xXF86VidModeGetGammaReq;
   478  #define sz_xXF86VidModeGetGammaReq		32
   479  
   480  typedef struct {
   481      BYTE	type;
   482      BOOL	pad;
   483      CARD16	sequenceNumber;
   484      CARD32	length;
   485      CARD32	red;
   486      CARD32	green;
   487      CARD32	blue;
   488      CARD32	pad1;
   489      CARD32	pad2;
   490      CARD32	pad3;
   491  } xXF86VidModeGetGammaReply;
   492  #define sz_xXF86VidModeGetGammaReply		32
   493  
   494  typedef struct _XF86VidModeSetGamma {
   495      CARD8	reqType;		/* always XF86VidModeReqCode */
   496      CARD8	xf86vidmodeReqType;
   497      CARD16	length;
   498      CARD16	screen;
   499      CARD16	pad;
   500      CARD32	red;
   501      CARD32	green;
   502      CARD32	blue;
   503      CARD32	pad1;
   504      CARD32	pad2;
   505      CARD32	pad3;
   506  } xXF86VidModeSetGammaReq;
   507  #define sz_xXF86VidModeSetGammaReq		32
   508  
   509  
   510  typedef struct _XF86VidModeSetGammaRamp {
   511      CARD8       reqType;                /* always XF86VidModeReqCode */
   512      CARD8       xf86vidmodeReqType;
   513      CARD16      length;
   514      CARD16      screen;
   515      CARD16      size;
   516  } xXF86VidModeSetGammaRampReq;
   517  #define sz_xXF86VidModeSetGammaRampReq             8
   518  
   519  typedef struct _XF86VidModeGetGammaRamp {
   520      CARD8       reqType;                /* always XF86VidModeReqCode */
   521      CARD8       xf86vidmodeReqType;
   522      CARD16      length;
   523      CARD16      screen;
   524      CARD16      size;
   525  } xXF86VidModeGetGammaRampReq;
   526  #define sz_xXF86VidModeGetGammaRampReq             8
   527  
   528  typedef struct {
   529      BYTE        type;
   530      BOOL        pad;
   531      CARD16      sequenceNumber;
   532      CARD32      length;
   533      CARD16      size;
   534      CARD16      pad0;
   535      CARD32      pad1;
   536      CARD32      pad2;
   537      CARD32      pad3;
   538      CARD32      pad4;
   539      CARD32      pad5;
   540  } xXF86VidModeGetGammaRampReply;
   541  #define sz_xXF86VidModeGetGammaRampReply            32
   542  
   543  typedef struct _XF86VidModeGetGammaRampSize {
   544      CARD8       reqType;                /* always XF86VidModeReqCode */
   545      CARD8       xf86vidmodeReqType;
   546      CARD16      length;
   547      CARD16      screen;
   548      CARD16      pad;
   549  } xXF86VidModeGetGammaRampSizeReq;
   550  #define sz_xXF86VidModeGetGammaRampSizeReq             8
   551  
   552  typedef struct {
   553      BYTE        type;
   554      BOOL        pad;
   555      CARD16      sequenceNumber;
   556      CARD32      length;
   557      CARD16      size;
   558      CARD16      pad0;
   559      CARD32      pad1;
   560      CARD32      pad2;
   561      CARD32      pad3;
   562      CARD32      pad4;
   563      CARD32      pad5;
   564  } xXF86VidModeGetGammaRampSizeReply;
   565  #define sz_xXF86VidModeGetGammaRampSizeReply            32
   566  
   567  typedef struct {
   568      BYTE        type;
   569      BOOL        pad;
   570      CARD16      sequenceNumber;
   571      CARD32      length;
   572      CARD32      permissions;
   573      CARD32      pad1;
   574      CARD32      pad2;
   575      CARD32      pad3;
   576      CARD32      pad4;
   577      CARD32      pad5;
   578  } xXF86VidModeGetPermissionsReply;
   579  #define sz_xXF86VidModeGetPermissionsReply            32
   580  
   581  
   582  #endif /* _XF86VIDMODEPROTO_H_ */
   583