github.com/rajveermalviya/gamen@v0.1.2-0.20220930195403-9be15877c1aa/internal/wayland/wayland-client-protocol.go (about)

     1  // Code generated by internal/wayland/wl/gen; DO NOT EDIT.
     2  // XML file : ./protocols/wayland.xml
     3  
     4  //go:build linux && !android
     5  
     6  package wayland
     7  
     8  /*
     9  
    10  #include "wayland-client-protocol.h"
    11  
    12  */
    13  import "C"
    14  import "unsafe"
    15  
    16  // These errors are global and can be emitted in response to any
    17  // server request.
    18  type enum_wl_display_error C.uint32_t
    19  
    20  const (
    21  	// server couldn't find object
    22  	WL_DISPLAY_ERROR_INVALID_OBJECT enum_wl_display_error = 0
    23  	// method doesn't exist on the specified interface or malformed request
    24  	WL_DISPLAY_ERROR_INVALID_METHOD enum_wl_display_error = 1
    25  	// server is out of memory
    26  	WL_DISPLAY_ERROR_NO_MEMORY enum_wl_display_error = 2
    27  	// implementation error in compositor
    28  	WL_DISPLAY_ERROR_IMPLEMENTATION enum_wl_display_error = 3
    29  )
    30  
    31  func (l *wl_library) wl_display_add_listener(wl_display *C.struct_wl_display, listener *C.struct_wl_display_listener, data unsafe.Pointer) C.int {
    32  	return C.gamen_wl_display_add_listener(l.wl_proxy_add_listener_handle, wl_display, listener, data)
    33  }
    34  
    35  // asynchronous roundtrip
    36  //
    37  // The sync request asks the server to emit the 'done' event
    38  // on the returned wl_callback object.  Since requests are
    39  // handled in-order and events are delivered in-order, this can
    40  // be used as a barrier to ensure all previous requests and the
    41  // resulting events have been handled.
    42  //
    43  // The object returned by this request will be destroyed by the
    44  // compositor after the callback is fired and as such the client must not
    45  // attempt to use it after that point.
    46  //
    47  // The callback_data passed in the callback is the event serial.
    48  func (l *wl_library) wl_display_sync(wl_display *C.struct_wl_display) *C.struct_wl_callback {
    49  	return C.gamen_wl_display_sync(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_display)
    50  }
    51  
    52  // get global registry object
    53  //
    54  // This request creates a registry object that allows the client
    55  // to list and bind the global objects available from the
    56  // compositor.
    57  //
    58  // It should be noted that the server side resources consumed in
    59  // response to a get_registry request can only be released when the
    60  // client disconnects, not when the client side proxy is destroyed.
    61  // Therefore, clients should invoke get_registry as infrequently as
    62  // possible to avoid wasting memory.
    63  func (l *wl_library) wl_display_get_registry(wl_display *C.struct_wl_display) *C.struct_wl_registry {
    64  	return C.gamen_wl_display_get_registry(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_display)
    65  }
    66  
    67  func (l *wl_library) wl_registry_add_listener(wl_registry *C.struct_wl_registry, listener *C.struct_wl_registry_listener, data unsafe.Pointer) C.int {
    68  	return C.gamen_wl_registry_add_listener(l.wl_proxy_add_listener_handle, wl_registry, listener, data)
    69  }
    70  
    71  // bind an object to the display
    72  //
    73  // Binds a new, client-created object to the server using the
    74  // specified name as the identifier.
    75  func (l *wl_library) wl_registry_bind(wl_registry *C.struct_wl_registry, name C.uint32_t, iface *C.struct_wl_interface, version C.uint32_t) unsafe.Pointer {
    76  	return C.gamen_wl_registry_bind(l.wl_proxy_marshal_flags, wl_registry, name, iface, version)
    77  }
    78  
    79  func (l *wl_library) wl_registry_destroy(wl_registry *C.struct_wl_registry) {
    80  	l.wl_proxy_destroy((*C.struct_wl_proxy)(wl_registry))
    81  }
    82  
    83  func (l *wl_library) wl_callback_add_listener(wl_callback *C.struct_wl_callback, listener *C.struct_wl_callback_listener, data unsafe.Pointer) C.int {
    84  	return C.gamen_wl_callback_add_listener(l.wl_proxy_add_listener_handle, wl_callback, listener, data)
    85  }
    86  
    87  func (l *wl_library) wl_callback_destroy(wl_callback *C.struct_wl_callback) {
    88  	l.wl_proxy_destroy((*C.struct_wl_proxy)(wl_callback))
    89  }
    90  
    91  // create new surface
    92  //
    93  // Ask the compositor to create a new surface.
    94  func (l *wl_library) wl_compositor_create_surface(wl_compositor *C.struct_wl_compositor) *C.struct_wl_surface {
    95  	return C.gamen_wl_compositor_create_surface(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_compositor)
    96  }
    97  
    98  // create new region
    99  //
   100  // Ask the compositor to create a new region.
   101  func (l *wl_library) wl_compositor_create_region(wl_compositor *C.struct_wl_compositor) *C.struct_wl_region {
   102  	return C.gamen_wl_compositor_create_region(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_compositor)
   103  }
   104  
   105  func (l *wl_library) wl_compositor_destroy(wl_compositor *C.struct_wl_compositor) {
   106  	l.wl_proxy_destroy((*C.struct_wl_proxy)(wl_compositor))
   107  }
   108  
   109  // create a buffer from the pool
   110  //
   111  // Create a wl_buffer object from the pool.
   112  //
   113  // The buffer is created offset bytes into the pool and has
   114  // width and height as specified.  The stride argument specifies
   115  // the number of bytes from the beginning of one row to the beginning
   116  // of the next.  The format is the pixel format of the buffer and
   117  // must be one of those advertised through the wl_shm.format event.
   118  //
   119  // A buffer will keep a reference to the pool it was created from
   120  // so it is valid to destroy the pool immediately after creating
   121  // a buffer from it.
   122  func (l *wl_library) wl_shm_pool_create_buffer(wl_shm_pool *C.struct_wl_shm_pool, offset, width, height, stride C.int32_t, format enum_wl_shm_format) *C.struct_wl_buffer {
   123  	return C.gamen_wl_shm_pool_create_buffer(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_shm_pool, offset, width, height, stride, C.uint32_t(format))
   124  }
   125  
   126  // destroy the pool
   127  //
   128  // Destroy the shared memory pool.
   129  //
   130  // The mmapped memory will be released when all
   131  // buffers that have been created from this pool
   132  // are gone.
   133  func (l *wl_library) wl_shm_pool_destroy(wl_shm_pool *C.struct_wl_shm_pool) {
   134  	C.gamen_wl_shm_pool_destroy(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_shm_pool)
   135  }
   136  
   137  // change the size of the pool mapping
   138  //
   139  // This request will cause the server to remap the backing memory
   140  // for the pool from the file descriptor passed when the pool was
   141  // created, but using the new size.  This request can only be
   142  // used to make the pool bigger.
   143  //
   144  // This request only changes the amount of bytes that are mmapped
   145  // by the server and does not touch the file corresponding to the
   146  // file descriptor passed at creation time. It is the client's
   147  // responsibility to ensure that the file is at least as big as
   148  // the new pool size.
   149  func (l *wl_library) wl_shm_pool_resize(wl_shm_pool *C.struct_wl_shm_pool, size C.int32_t) {
   150  	C.gamen_wl_shm_pool_resize(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_shm_pool, size)
   151  }
   152  
   153  // These errors can be emitted in response to wl_shm requests.
   154  type enum_wl_shm_error C.uint32_t
   155  
   156  const (
   157  	// buffer format is not known
   158  	WL_SHM_ERROR_INVALID_FORMAT enum_wl_shm_error = 0
   159  	// invalid size or stride during pool or buffer creation
   160  	WL_SHM_ERROR_INVALID_STRIDE enum_wl_shm_error = 1
   161  	// mmapping the file descriptor failed
   162  	WL_SHM_ERROR_INVALID_FD enum_wl_shm_error = 2
   163  )
   164  
   165  // This describes the memory layout of an individual pixel.
   166  //
   167  // All renderers should support argb8888 and xrgb8888 but any other
   168  // formats are optional and may not be supported by the particular
   169  // renderer in use.
   170  //
   171  // The drm format codes match the macros defined in drm_fourcc.h, except
   172  // argb8888 and xrgb8888. The formats actually supported by the compositor
   173  // will be reported by the format event.
   174  //
   175  // For all wl_shm formats and unless specified in another protocol
   176  // extension, pre-multiplied alpha is used for pixel values.
   177  type enum_wl_shm_format C.uint32_t
   178  
   179  const (
   180  	// 32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian
   181  	WL_SHM_FORMAT_ARGB_8888 enum_wl_shm_format = 0
   182  	// 32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian
   183  	WL_SHM_FORMAT_XRGB_8888 enum_wl_shm_format = 1
   184  	// 8-bit color index format, [7:0] C
   185  	WL_SHM_FORMAT_C_8 enum_wl_shm_format = 0x20203843
   186  	// 8-bit RGB format, [7:0] R:G:B 3:3:2
   187  	WL_SHM_FORMAT_RGB_332 enum_wl_shm_format = 0x38424752
   188  	// 8-bit BGR format, [7:0] B:G:R 2:3:3
   189  	WL_SHM_FORMAT_BGR_233 enum_wl_shm_format = 0x38524742
   190  	// 16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian
   191  	WL_SHM_FORMAT_XRGB_4444 enum_wl_shm_format = 0x32315258
   192  	// 16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian
   193  	WL_SHM_FORMAT_XBGR_4444 enum_wl_shm_format = 0x32314258
   194  	// 16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian
   195  	WL_SHM_FORMAT_RGBX_4444 enum_wl_shm_format = 0x32315852
   196  	// 16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian
   197  	WL_SHM_FORMAT_BGRX_4444 enum_wl_shm_format = 0x32315842
   198  	// 16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian
   199  	WL_SHM_FORMAT_ARGB_4444 enum_wl_shm_format = 0x32315241
   200  	// 16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian
   201  	WL_SHM_FORMAT_ABGR_4444 enum_wl_shm_format = 0x32314241
   202  	// 16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian
   203  	WL_SHM_FORMAT_RGBA_4444 enum_wl_shm_format = 0x32314152
   204  	// 16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian
   205  	WL_SHM_FORMAT_BGRA_4444 enum_wl_shm_format = 0x32314142
   206  	// 16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian
   207  	WL_SHM_FORMAT_XRGB_1555 enum_wl_shm_format = 0x35315258
   208  	// 16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian
   209  	WL_SHM_FORMAT_XBGR_1555 enum_wl_shm_format = 0x35314258
   210  	// 16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian
   211  	WL_SHM_FORMAT_RGBX_5551 enum_wl_shm_format = 0x35315852
   212  	// 16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian
   213  	WL_SHM_FORMAT_BGRX_5551 enum_wl_shm_format = 0x35315842
   214  	// 16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian
   215  	WL_SHM_FORMAT_ARGB_1555 enum_wl_shm_format = 0x35315241
   216  	// 16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian
   217  	WL_SHM_FORMAT_ABGR_1555 enum_wl_shm_format = 0x35314241
   218  	// 16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian
   219  	WL_SHM_FORMAT_RGBA_5551 enum_wl_shm_format = 0x35314152
   220  	// 16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian
   221  	WL_SHM_FORMAT_BGRA_5551 enum_wl_shm_format = 0x35314142
   222  	// 16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian
   223  	WL_SHM_FORMAT_RGB_565 enum_wl_shm_format = 0x36314752
   224  	// 16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian
   225  	WL_SHM_FORMAT_BGR_565 enum_wl_shm_format = 0x36314742
   226  	// 24-bit RGB format, [23:0] R:G:B little endian
   227  	WL_SHM_FORMAT_RGB_888 enum_wl_shm_format = 0x34324752
   228  	// 24-bit BGR format, [23:0] B:G:R little endian
   229  	WL_SHM_FORMAT_BGR_888 enum_wl_shm_format = 0x34324742
   230  	// 32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian
   231  	WL_SHM_FORMAT_XBGR_8888 enum_wl_shm_format = 0x34324258
   232  	// 32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian
   233  	WL_SHM_FORMAT_RGBX_8888 enum_wl_shm_format = 0x34325852
   234  	// 32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian
   235  	WL_SHM_FORMAT_BGRX_8888 enum_wl_shm_format = 0x34325842
   236  	// 32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian
   237  	WL_SHM_FORMAT_ABGR_8888 enum_wl_shm_format = 0x34324241
   238  	// 32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian
   239  	WL_SHM_FORMAT_RGBA_8888 enum_wl_shm_format = 0x34324152
   240  	// 32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian
   241  	WL_SHM_FORMAT_BGRA_8888 enum_wl_shm_format = 0x34324142
   242  	// 32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian
   243  	WL_SHM_FORMAT_XRGB_2101010 enum_wl_shm_format = 0x30335258
   244  	// 32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian
   245  	WL_SHM_FORMAT_XBGR_2101010 enum_wl_shm_format = 0x30334258
   246  	// 32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian
   247  	WL_SHM_FORMAT_RGBX_1010102 enum_wl_shm_format = 0x30335852
   248  	// 32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian
   249  	WL_SHM_FORMAT_BGRX_1010102 enum_wl_shm_format = 0x30335842
   250  	// 32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian
   251  	WL_SHM_FORMAT_ARGB_2101010 enum_wl_shm_format = 0x30335241
   252  	// 32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian
   253  	WL_SHM_FORMAT_ABGR_2101010 enum_wl_shm_format = 0x30334241
   254  	// 32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian
   255  	WL_SHM_FORMAT_RGBA_1010102 enum_wl_shm_format = 0x30334152
   256  	// 32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian
   257  	WL_SHM_FORMAT_BGRA_1010102 enum_wl_shm_format = 0x30334142
   258  	// packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian
   259  	WL_SHM_FORMAT_YUYV enum_wl_shm_format = 0x56595559
   260  	// packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian
   261  	WL_SHM_FORMAT_YVYU enum_wl_shm_format = 0x55595659
   262  	// packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian
   263  	WL_SHM_FORMAT_UYVY enum_wl_shm_format = 0x59565955
   264  	// packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian
   265  	WL_SHM_FORMAT_VYUY enum_wl_shm_format = 0x59555956
   266  	// packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian
   267  	WL_SHM_FORMAT_AYUV enum_wl_shm_format = 0x56555941
   268  	// 2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane
   269  	WL_SHM_FORMAT_NV_12 enum_wl_shm_format = 0x3231564e
   270  	// 2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane
   271  	WL_SHM_FORMAT_NV_21 enum_wl_shm_format = 0x3132564e
   272  	// 2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane
   273  	WL_SHM_FORMAT_NV_16 enum_wl_shm_format = 0x3631564e
   274  	// 2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane
   275  	WL_SHM_FORMAT_NV_61 enum_wl_shm_format = 0x3136564e
   276  	// 3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes
   277  	WL_SHM_FORMAT_YUV_410 enum_wl_shm_format = 0x39565559
   278  	// 3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes
   279  	WL_SHM_FORMAT_YVU_410 enum_wl_shm_format = 0x39555659
   280  	// 3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes
   281  	WL_SHM_FORMAT_YUV_411 enum_wl_shm_format = 0x31315559
   282  	// 3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes
   283  	WL_SHM_FORMAT_YVU_411 enum_wl_shm_format = 0x31315659
   284  	// 3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes
   285  	WL_SHM_FORMAT_YUV_420 enum_wl_shm_format = 0x32315559
   286  	// 3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes
   287  	WL_SHM_FORMAT_YVU_420 enum_wl_shm_format = 0x32315659
   288  	// 3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes
   289  	WL_SHM_FORMAT_YUV_422 enum_wl_shm_format = 0x36315559
   290  	// 3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes
   291  	WL_SHM_FORMAT_YVU_422 enum_wl_shm_format = 0x36315659
   292  	// 3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes
   293  	WL_SHM_FORMAT_YUV_444 enum_wl_shm_format = 0x34325559
   294  	// 3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes
   295  	WL_SHM_FORMAT_YVU_444 enum_wl_shm_format = 0x34325659
   296  	// [7:0] R
   297  	WL_SHM_FORMAT_R_8 enum_wl_shm_format = 0x20203852
   298  	// [15:0] R little endian
   299  	WL_SHM_FORMAT_R_16 enum_wl_shm_format = 0x20363152
   300  	// [15:0] R:G 8:8 little endian
   301  	WL_SHM_FORMAT_RG_88 enum_wl_shm_format = 0x38384752
   302  	// [15:0] G:R 8:8 little endian
   303  	WL_SHM_FORMAT_GR_88 enum_wl_shm_format = 0x38385247
   304  	// [31:0] R:G 16:16 little endian
   305  	WL_SHM_FORMAT_RG_1616 enum_wl_shm_format = 0x32334752
   306  	// [31:0] G:R 16:16 little endian
   307  	WL_SHM_FORMAT_GR_1616 enum_wl_shm_format = 0x32335247
   308  	// [63:0] x:R:G:B 16:16:16:16 little endian
   309  	WL_SHM_FORMAT_XRGB_16161616_F enum_wl_shm_format = 0x48345258
   310  	// [63:0] x:B:G:R 16:16:16:16 little endian
   311  	WL_SHM_FORMAT_XBGR_16161616_F enum_wl_shm_format = 0x48344258
   312  	// [63:0] A:R:G:B 16:16:16:16 little endian
   313  	WL_SHM_FORMAT_ARGB_16161616_F enum_wl_shm_format = 0x48345241
   314  	// [63:0] A:B:G:R 16:16:16:16 little endian
   315  	WL_SHM_FORMAT_ABGR_16161616_F enum_wl_shm_format = 0x48344241
   316  	// [31:0] X:Y:Cb:Cr 8:8:8:8 little endian
   317  	WL_SHM_FORMAT_XYUV_8888 enum_wl_shm_format = 0x56555958
   318  	// [23:0] Cr:Cb:Y 8:8:8 little endian
   319  	WL_SHM_FORMAT_VUY_888 enum_wl_shm_format = 0x34325556
   320  	// Y followed by U then V, 10:10:10. Non-linear modifier only
   321  	WL_SHM_FORMAT_VUY_101010 enum_wl_shm_format = 0x30335556
   322  	// [63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 10:6:10:6:10:6:10:6 little endian per 2 Y pixels
   323  	WL_SHM_FORMAT_Y_210 enum_wl_shm_format = 0x30313259
   324  	// [63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 12:4:12:4:12:4:12:4 little endian per 2 Y pixels
   325  	WL_SHM_FORMAT_Y_212 enum_wl_shm_format = 0x32313259
   326  	// [63:0] Cr0:Y1:Cb0:Y0 16:16:16:16 little endian per 2 Y pixels
   327  	WL_SHM_FORMAT_Y_216 enum_wl_shm_format = 0x36313259
   328  	// [31:0] A:Cr:Y:Cb 2:10:10:10 little endian
   329  	WL_SHM_FORMAT_Y_410 enum_wl_shm_format = 0x30313459
   330  	// [63:0] A:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian
   331  	WL_SHM_FORMAT_Y_412 enum_wl_shm_format = 0x32313459
   332  	// [63:0] A:Cr:Y:Cb 16:16:16:16 little endian
   333  	WL_SHM_FORMAT_Y_416 enum_wl_shm_format = 0x36313459
   334  	// [31:0] X:Cr:Y:Cb 2:10:10:10 little endian
   335  	WL_SHM_FORMAT_XVYU_2101010 enum_wl_shm_format = 0x30335658
   336  	// [63:0] X:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian
   337  	WL_SHM_FORMAT_XVYU_12_16161616 enum_wl_shm_format = 0x36335658
   338  	// [63:0] X:Cr:Y:Cb 16:16:16:16 little endian
   339  	WL_SHM_FORMAT_XVYU_16161616 enum_wl_shm_format = 0x38345658
   340  	// [63:0]   A3:A2:Y3:0:Cr0:0:Y2:0:A1:A0:Y1:0:Cb0:0:Y0:0  1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian
   341  	WL_SHM_FORMAT_Y_0_L_0 enum_wl_shm_format = 0x304c3059
   342  	// [63:0]   X3:X2:Y3:0:Cr0:0:Y2:0:X1:X0:Y1:0:Cb0:0:Y0:0  1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian
   343  	WL_SHM_FORMAT_X_0_L_0 enum_wl_shm_format = 0x304c3058
   344  	// [63:0]   A3:A2:Y3:Cr0:Y2:A1:A0:Y1:Cb0:Y0  1:1:10:10:10:1:1:10:10:10 little endian
   345  	WL_SHM_FORMAT_Y_0_L_2 enum_wl_shm_format = 0x324c3059
   346  	// [63:0]   X3:X2:Y3:Cr0:Y2:X1:X0:Y1:Cb0:Y0  1:1:10:10:10:1:1:10:10:10 little endian
   347  	WL_SHM_FORMAT_X_0_L_2        enum_wl_shm_format = 0x324c3058
   348  	WL_SHM_FORMAT_YUV_420_8_BIT  enum_wl_shm_format = 0x38305559
   349  	WL_SHM_FORMAT_YUV_420_10_BIT enum_wl_shm_format = 0x30315559
   350  	WL_SHM_FORMAT_XRGB_8888_A_8  enum_wl_shm_format = 0x38415258
   351  	WL_SHM_FORMAT_XBGR_8888_A_8  enum_wl_shm_format = 0x38414258
   352  	WL_SHM_FORMAT_RGBX_8888_A_8  enum_wl_shm_format = 0x38415852
   353  	WL_SHM_FORMAT_BGRX_8888_A_8  enum_wl_shm_format = 0x38415842
   354  	WL_SHM_FORMAT_RGB_888_A_8    enum_wl_shm_format = 0x38413852
   355  	WL_SHM_FORMAT_BGR_888_A_8    enum_wl_shm_format = 0x38413842
   356  	WL_SHM_FORMAT_RGB_565_A_8    enum_wl_shm_format = 0x38413552
   357  	WL_SHM_FORMAT_BGR_565_A_8    enum_wl_shm_format = 0x38413542
   358  	// non-subsampled Cr:Cb plane
   359  	WL_SHM_FORMAT_NV_24 enum_wl_shm_format = 0x3432564e
   360  	// non-subsampled Cb:Cr plane
   361  	WL_SHM_FORMAT_NV_42 enum_wl_shm_format = 0x3234564e
   362  	// 2x1 subsampled Cr:Cb plane, 10 bit per channel
   363  	WL_SHM_FORMAT_P_210 enum_wl_shm_format = 0x30313250
   364  	// 2x2 subsampled Cr:Cb plane 10 bits per channel
   365  	WL_SHM_FORMAT_P_010 enum_wl_shm_format = 0x30313050
   366  	// 2x2 subsampled Cr:Cb plane 12 bits per channel
   367  	WL_SHM_FORMAT_P_012 enum_wl_shm_format = 0x32313050
   368  	// 2x2 subsampled Cr:Cb plane 16 bits per channel
   369  	WL_SHM_FORMAT_P_016 enum_wl_shm_format = 0x36313050
   370  	// [63:0] A:x:B:x:G:x:R:x 10:6:10:6:10:6:10:6 little endian
   371  	WL_SHM_FORMAT_AXBXGXRX_106106106106 enum_wl_shm_format = 0x30314241
   372  	// 2x2 subsampled Cr:Cb plane
   373  	WL_SHM_FORMAT_NV_15 enum_wl_shm_format = 0x3531564e
   374  	WL_SHM_FORMAT_Q_410 enum_wl_shm_format = 0x30313451
   375  	WL_SHM_FORMAT_Q_401 enum_wl_shm_format = 0x31303451
   376  	// [63:0] x:R:G:B 16:16:16:16 little endian
   377  	WL_SHM_FORMAT_XRGB_16161616 enum_wl_shm_format = 0x38345258
   378  	// [63:0] x:B:G:R 16:16:16:16 little endian
   379  	WL_SHM_FORMAT_XBGR_16161616 enum_wl_shm_format = 0x38344258
   380  	// [63:0] A:R:G:B 16:16:16:16 little endian
   381  	WL_SHM_FORMAT_ARGB_16161616 enum_wl_shm_format = 0x38345241
   382  	// [63:0] A:B:G:R 16:16:16:16 little endian
   383  	WL_SHM_FORMAT_ABGR_16161616 enum_wl_shm_format = 0x38344241
   384  )
   385  
   386  func (l *wl_library) wl_shm_add_listener(wl_shm *C.struct_wl_shm, listener *C.struct_wl_shm_listener, data unsafe.Pointer) C.int {
   387  	return C.gamen_wl_shm_add_listener(l.wl_proxy_add_listener_handle, wl_shm, listener, data)
   388  }
   389  
   390  // create a shm pool
   391  //
   392  // Create a new wl_shm_pool object.
   393  //
   394  // The pool can be used to create shared memory based buffer
   395  // objects.  The server will mmap size bytes of the passed file
   396  // descriptor, to use as backing memory for the pool.
   397  func (l *wl_library) wl_shm_create_pool(wl_shm *C.struct_wl_shm, fd, size C.int32_t) *C.struct_wl_shm_pool {
   398  	return C.gamen_wl_shm_create_pool(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_shm, fd, size)
   399  }
   400  
   401  func (l *wl_library) wl_shm_destroy(wl_shm *C.struct_wl_shm) {
   402  	l.wl_proxy_destroy((*C.struct_wl_proxy)(wl_shm))
   403  }
   404  
   405  func (l *wl_library) wl_buffer_add_listener(wl_buffer *C.struct_wl_buffer, listener *C.struct_wl_buffer_listener, data unsafe.Pointer) C.int {
   406  	return C.gamen_wl_buffer_add_listener(l.wl_proxy_add_listener_handle, wl_buffer, listener, data)
   407  }
   408  
   409  // destroy a buffer
   410  //
   411  // Destroy a buffer. If and how you need to release the backing
   412  // storage is defined by the buffer factory interface.
   413  //
   414  // For possible side-effects to a surface, see wl_surface.attach.
   415  func (l *wl_library) wl_buffer_destroy(wl_buffer *C.struct_wl_buffer) {
   416  	C.gamen_wl_buffer_destroy(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_buffer)
   417  }
   418  
   419  type enum_wl_data_offer_error C.uint32_t
   420  
   421  const (
   422  	// finish request was called untimely
   423  	WL_DATA_OFFER_ERROR_INVALID_FINISH enum_wl_data_offer_error = 0
   424  	// action mask contains invalid values
   425  	WL_DATA_OFFER_ERROR_INVALID_ACTION_MASK enum_wl_data_offer_error = 1
   426  	// action argument has an invalid value
   427  	WL_DATA_OFFER_ERROR_INVALID_ACTION enum_wl_data_offer_error = 2
   428  	// offer doesn't accept this request
   429  	WL_DATA_OFFER_ERROR_INVALID_OFFER enum_wl_data_offer_error = 3
   430  )
   431  
   432  func (l *wl_library) wl_data_offer_add_listener(wl_data_offer *C.struct_wl_data_offer, listener *C.struct_wl_data_offer_listener, data unsafe.Pointer) C.int {
   433  	return C.gamen_wl_data_offer_add_listener(l.wl_proxy_add_listener_handle, wl_data_offer, listener, data)
   434  }
   435  
   436  // accept one of the offered mime types
   437  //
   438  // Indicate that the client can accept the given mime type, or
   439  // NULL for not accepted.
   440  //
   441  // For objects of version 2 or older, this request is used by the
   442  // client to give feedback whether the client can receive the given
   443  // mime type, or NULL if none is accepted; the feedback does not
   444  // determine whether the drag-and-drop operation succeeds or not.
   445  //
   446  // For objects of version 3 or newer, this request determines the
   447  // final result of the drag-and-drop operation. If the end result
   448  // is that no mime types were accepted, the drag-and-drop operation
   449  // will be cancelled and the corresponding drag source will receive
   450  // wl_data_source.cancelled. Clients may still use this event in
   451  // conjunction with wl_data_source.action for feedback.
   452  func (l *wl_library) wl_data_offer_accept(wl_data_offer *C.struct_wl_data_offer, serial C.uint32_t, mime_type *C.char) {
   453  	C.gamen_wl_data_offer_accept(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_data_offer, serial, mime_type)
   454  }
   455  
   456  // request that the data is transferred
   457  //
   458  // To transfer the offered data, the client issues this request
   459  // and indicates the mime type it wants to receive.  The transfer
   460  // happens through the passed file descriptor (typically created
   461  // with the pipe system call).  The source client writes the data
   462  // in the mime type representation requested and then closes the
   463  // file descriptor.
   464  //
   465  // The receiving client reads from the read end of the pipe until
   466  // EOF and then closes its end, at which point the transfer is
   467  // complete.
   468  //
   469  // This request may happen multiple times for different mime types,
   470  // both before and after wl_data_device.drop. Drag-and-drop destination
   471  // clients may preemptively fetch data or examine it more closely to
   472  // determine acceptance.
   473  func (l *wl_library) wl_data_offer_receive(wl_data_offer *C.struct_wl_data_offer, mime_type *C.char, fd C.int32_t) {
   474  	C.gamen_wl_data_offer_receive(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_data_offer, mime_type, fd)
   475  }
   476  
   477  // destroy data offer
   478  //
   479  // Destroy the data offer.
   480  func (l *wl_library) wl_data_offer_destroy(wl_data_offer *C.struct_wl_data_offer) {
   481  	C.gamen_wl_data_offer_destroy(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_data_offer)
   482  }
   483  
   484  // the offer will no longer be used
   485  //
   486  // Notifies the compositor that the drag destination successfully
   487  // finished the drag-and-drop operation.
   488  //
   489  // Upon receiving this request, the compositor will emit
   490  // wl_data_source.dnd_finished on the drag source client.
   491  //
   492  // It is a client error to perform other requests than
   493  // wl_data_offer.destroy after this one. It is also an error to perform
   494  // this request after a NULL mime type has been set in
   495  // wl_data_offer.accept or no action was received through
   496  // wl_data_offer.action.
   497  //
   498  // If wl_data_offer.finish request is received for a non drag and drop
   499  // operation, the invalid_finish protocol error is raised.
   500  func (l *wl_library) wl_data_offer_finish(wl_data_offer *C.struct_wl_data_offer) {
   501  	C.gamen_wl_data_offer_finish(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_data_offer)
   502  }
   503  
   504  // set the available/preferred drag-and-drop actions
   505  //
   506  // Sets the actions that the destination side client supports for
   507  // this operation. This request may trigger the emission of
   508  // wl_data_source.action and wl_data_offer.action events if the compositor
   509  // needs to change the selected action.
   510  //
   511  // This request can be called multiple times throughout the
   512  // drag-and-drop operation, typically in response to wl_data_device.enter
   513  // or wl_data_device.motion events.
   514  //
   515  // This request determines the final result of the drag-and-drop
   516  // operation. If the end result is that no action is accepted,
   517  // the drag source will receive wl_data_source.cancelled.
   518  //
   519  // The dnd_actions argument must contain only values expressed in the
   520  // wl_data_device_manager.dnd_actions enum, and the preferred_action
   521  // argument must only contain one of those values set, otherwise it
   522  // will result in a protocol error.
   523  //
   524  // While managing an "ask" action, the destination drag-and-drop client
   525  // may perform further wl_data_offer.receive requests, and is expected
   526  // to perform one last wl_data_offer.set_actions request with a preferred
   527  // action other than "ask" (and optionally wl_data_offer.accept) before
   528  // requesting wl_data_offer.finish, in order to convey the action selected
   529  // by the user. If the preferred action is not in the
   530  // wl_data_offer.source_actions mask, an error will be raised.
   531  //
   532  // If the "ask" action is dismissed (e.g. user cancellation), the client
   533  // is expected to perform wl_data_offer.destroy right away.
   534  //
   535  // This request can only be made on drag-and-drop offers, a protocol error
   536  // will be raised otherwise.
   537  func (l *wl_library) wl_data_offer_set_actions(wl_data_offer *C.struct_wl_data_offer, dnd_actions, preferred_action enum_wl_data_device_manager_dnd_action) {
   538  	C.gamen_wl_data_offer_set_actions(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_data_offer, C.uint32_t(dnd_actions), C.uint32_t(preferred_action))
   539  }
   540  
   541  type enum_wl_data_source_error C.uint32_t
   542  
   543  const (
   544  	// action mask contains invalid values
   545  	WL_DATA_SOURCE_ERROR_INVALID_ACTION_MASK enum_wl_data_source_error = 0
   546  	// source doesn't accept this request
   547  	WL_DATA_SOURCE_ERROR_INVALID_SOURCE enum_wl_data_source_error = 1
   548  )
   549  
   550  func (l *wl_library) wl_data_source_add_listener(wl_data_source *C.struct_wl_data_source, listener *C.struct_wl_data_source_listener, data unsafe.Pointer) C.int {
   551  	return C.gamen_wl_data_source_add_listener(l.wl_proxy_add_listener_handle, wl_data_source, listener, data)
   552  }
   553  
   554  // add an offered mime type
   555  //
   556  // This request adds a mime type to the set of mime types
   557  // advertised to targets.  Can be called several times to offer
   558  // multiple types.
   559  func (l *wl_library) wl_data_source_offer(wl_data_source *C.struct_wl_data_source, mime_type *C.char) {
   560  	C.gamen_wl_data_source_offer(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_data_source, mime_type)
   561  }
   562  
   563  // destroy the data source
   564  //
   565  // Destroy the data source.
   566  func (l *wl_library) wl_data_source_destroy(wl_data_source *C.struct_wl_data_source) {
   567  	C.gamen_wl_data_source_destroy(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_data_source)
   568  }
   569  
   570  // set the available drag-and-drop actions
   571  //
   572  // Sets the actions that the source side client supports for this
   573  // operation. This request may trigger wl_data_source.action and
   574  // wl_data_offer.action events if the compositor needs to change the
   575  // selected action.
   576  //
   577  // The dnd_actions argument must contain only values expressed in the
   578  // wl_data_device_manager.dnd_actions enum, otherwise it will result
   579  // in a protocol error.
   580  //
   581  // This request must be made once only, and can only be made on sources
   582  // used in drag-and-drop, so it must be performed before
   583  // wl_data_device.start_drag. Attempting to use the source other than
   584  // for drag-and-drop will raise a protocol error.
   585  func (l *wl_library) wl_data_source_set_actions(wl_data_source *C.struct_wl_data_source, dnd_actions enum_wl_data_device_manager_dnd_action) {
   586  	C.gamen_wl_data_source_set_actions(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_data_source, C.uint32_t(dnd_actions))
   587  }
   588  
   589  type enum_wl_data_device_error C.uint32_t
   590  
   591  const (
   592  	// given wl_surface has another role
   593  	WL_DATA_DEVICE_ERROR_ROLE enum_wl_data_device_error = 0
   594  )
   595  
   596  func (l *wl_library) wl_data_device_add_listener(wl_data_device *C.struct_wl_data_device, listener *C.struct_wl_data_device_listener, data unsafe.Pointer) C.int {
   597  	return C.gamen_wl_data_device_add_listener(l.wl_proxy_add_listener_handle, wl_data_device, listener, data)
   598  }
   599  
   600  // start drag-and-drop operation
   601  //
   602  // This request asks the compositor to start a drag-and-drop
   603  // operation on behalf of the client.
   604  //
   605  // The source argument is the data source that provides the data
   606  // for the eventual data transfer. If source is NULL, enter, leave
   607  // and motion events are sent only to the client that initiated the
   608  // drag and the client is expected to handle the data passing
   609  // internally. If source is destroyed, the drag-and-drop session will be
   610  // cancelled.
   611  //
   612  // The origin surface is the surface where the drag originates and
   613  // the client must have an active implicit grab that matches the
   614  // serial.
   615  //
   616  // The icon surface is an optional (can be NULL) surface that
   617  // provides an icon to be moved around with the cursor.  Initially,
   618  // the top-left corner of the icon surface is placed at the cursor
   619  // hotspot, but subsequent wl_surface.attach request can move the
   620  // relative position. Attach requests must be confirmed with
   621  // wl_surface.commit as usual. The icon surface is given the role of
   622  // a drag-and-drop icon. If the icon surface already has another role,
   623  // it raises a protocol error.
   624  //
   625  // The current and pending input regions of the icon wl_surface are
   626  // cleared, and wl_surface.set_input_region is ignored until the
   627  // wl_surface is no longer used as the icon surface. When the use
   628  // as an icon ends, the current and pending input regions become
   629  // undefined, and the wl_surface is unmapped.
   630  func (l *wl_library) wl_data_device_start_drag(wl_data_device *C.struct_wl_data_device, source *C.struct_wl_data_source, origin, icon *C.struct_wl_surface, serial C.uint32_t) {
   631  	C.gamen_wl_data_device_start_drag(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_data_device, source, origin, icon, serial)
   632  }
   633  
   634  // copy data to the selection
   635  //
   636  // This request asks the compositor to set the selection
   637  // to the data from the source on behalf of the client.
   638  //
   639  // To unset the selection, set the source to NULL.
   640  func (l *wl_library) wl_data_device_set_selection(wl_data_device *C.struct_wl_data_device, source *C.struct_wl_data_source, serial C.uint32_t) {
   641  	C.gamen_wl_data_device_set_selection(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_data_device, source, serial)
   642  }
   643  
   644  // destroy data device
   645  //
   646  // This request destroys the data device.
   647  func (l *wl_library) wl_data_device_release(wl_data_device *C.struct_wl_data_device) {
   648  	C.gamen_wl_data_device_release(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_data_device)
   649  }
   650  
   651  func (l *wl_library) wl_data_device_destroy(wl_data_device *C.struct_wl_data_device) {
   652  	l.wl_proxy_destroy((*C.struct_wl_proxy)(wl_data_device))
   653  }
   654  
   655  // This is a bitmask of the available/preferred actions in a
   656  // drag-and-drop operation.
   657  //
   658  // In the compositor, the selected action is a result of matching the
   659  // actions offered by the source and destination sides.  "action" events
   660  // with a "none" action will be sent to both source and destination if
   661  // there is no match. All further checks will effectively happen on
   662  // (source actions ∩ destination actions).
   663  //
   664  // In addition, compositors may also pick different actions in
   665  // reaction to key modifiers being pressed. One common design that
   666  // is used in major toolkits (and the behavior recommended for
   667  // compositors) is:
   668  //
   669  // - If no modifiers are pressed, the first match (in bit order)
   670  // will be used.
   671  // - Pressing Shift selects "move", if enabled in the mask.
   672  // - Pressing Control selects "copy", if enabled in the mask.
   673  //
   674  // Behavior beyond that is considered implementation-dependent.
   675  // Compositors may for example bind other modifiers (like Alt/Meta)
   676  // or drags initiated with other buttons than BTN_LEFT to specific
   677  // actions (e.g. "ask").
   678  type enum_wl_data_device_manager_dnd_action C.uint32_t
   679  
   680  const (
   681  	// no action
   682  	WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE enum_wl_data_device_manager_dnd_action = 0
   683  	// copy action
   684  	WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY enum_wl_data_device_manager_dnd_action = 1
   685  	// move action
   686  	WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE enum_wl_data_device_manager_dnd_action = 2
   687  	// ask action
   688  	WL_DATA_DEVICE_MANAGER_DND_ACTION_ASK enum_wl_data_device_manager_dnd_action = 4
   689  )
   690  
   691  // create a new data source
   692  //
   693  // Create a new data source.
   694  func (l *wl_library) wl_data_device_manager_create_data_source(wl_data_device_manager *C.struct_wl_data_device_manager) *C.struct_wl_data_source {
   695  	return C.gamen_wl_data_device_manager_create_data_source(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_data_device_manager)
   696  }
   697  
   698  // create a new data device
   699  //
   700  // Create a new data device for a given seat.
   701  func (l *wl_library) wl_data_device_manager_get_data_device(wl_data_device_manager *C.struct_wl_data_device_manager, seat *C.struct_wl_seat) *C.struct_wl_data_device {
   702  	return C.gamen_wl_data_device_manager_get_data_device(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_data_device_manager, seat)
   703  }
   704  
   705  func (l *wl_library) wl_data_device_manager_destroy(wl_data_device_manager *C.struct_wl_data_device_manager) {
   706  	l.wl_proxy_destroy((*C.struct_wl_proxy)(wl_data_device_manager))
   707  }
   708  
   709  type enum_wl_shell_error C.uint32_t
   710  
   711  const (
   712  	// given wl_surface has another role
   713  	WL_SHELL_ERROR_ROLE enum_wl_shell_error = 0
   714  )
   715  
   716  // create a shell surface from a surface
   717  //
   718  // Create a shell surface for an existing surface. This gives
   719  // the wl_surface the role of a shell surface. If the wl_surface
   720  // already has another role, it raises a protocol error.
   721  //
   722  // Only one shell surface can be associated with a given surface.
   723  func (l *wl_library) wl_shell_get_shell_surface(wl_shell *C.struct_wl_shell, surface *C.struct_wl_surface) *C.struct_wl_shell_surface {
   724  	return C.gamen_wl_shell_get_shell_surface(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_shell, surface)
   725  }
   726  
   727  func (l *wl_library) wl_shell_destroy(wl_shell *C.struct_wl_shell) {
   728  	l.wl_proxy_destroy((*C.struct_wl_proxy)(wl_shell))
   729  }
   730  
   731  // These values are used to indicate which edge of a surface
   732  // is being dragged in a resize operation. The server may
   733  // use this information to adapt its behavior, e.g. choose
   734  // an appropriate cursor image.
   735  type enum_wl_shell_surface_resize C.uint32_t
   736  
   737  const (
   738  	// no edge
   739  	WL_SHELL_SURFACE_RESIZE_NONE enum_wl_shell_surface_resize = 0
   740  	// top edge
   741  	WL_SHELL_SURFACE_RESIZE_TOP enum_wl_shell_surface_resize = 1
   742  	// bottom edge
   743  	WL_SHELL_SURFACE_RESIZE_BOTTOM enum_wl_shell_surface_resize = 2
   744  	// left edge
   745  	WL_SHELL_SURFACE_RESIZE_LEFT enum_wl_shell_surface_resize = 4
   746  	// top and left edges
   747  	WL_SHELL_SURFACE_RESIZE_TOP_LEFT enum_wl_shell_surface_resize = 5
   748  	// bottom and left edges
   749  	WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT enum_wl_shell_surface_resize = 6
   750  	// right edge
   751  	WL_SHELL_SURFACE_RESIZE_RIGHT enum_wl_shell_surface_resize = 8
   752  	// top and right edges
   753  	WL_SHELL_SURFACE_RESIZE_TOP_RIGHT enum_wl_shell_surface_resize = 9
   754  	// bottom and right edges
   755  	WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT enum_wl_shell_surface_resize = 10
   756  )
   757  
   758  // These flags specify details of the expected behaviour
   759  // of transient surfaces. Used in the set_transient request.
   760  type enum_wl_shell_surface_transient C.uint32_t
   761  
   762  const (
   763  	// do not set keyboard focus
   764  	WL_SHELL_SURFACE_TRANSIENT_INACTIVE enum_wl_shell_surface_transient = 0x1
   765  )
   766  
   767  // Hints to indicate to the compositor how to deal with a conflict
   768  // between the dimensions of the surface and the dimensions of the
   769  // output. The compositor is free to ignore this parameter.
   770  type enum_wl_shell_surface_fullscreen_method C.uint32_t
   771  
   772  const (
   773  	// no preference, apply default policy
   774  	WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT enum_wl_shell_surface_fullscreen_method = 0
   775  	// scale, preserve the surface's aspect ratio and center on output
   776  	WL_SHELL_SURFACE_FULLSCREEN_METHOD_SCALE enum_wl_shell_surface_fullscreen_method = 1
   777  	// switch output mode to the smallest mode that can fit the surface, add black borders to compensate size mismatch
   778  	WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER enum_wl_shell_surface_fullscreen_method = 2
   779  	// no upscaling, center on output and add black borders to compensate size mismatch
   780  	WL_SHELL_SURFACE_FULLSCREEN_METHOD_FILL enum_wl_shell_surface_fullscreen_method = 3
   781  )
   782  
   783  func (l *wl_library) wl_shell_surface_add_listener(wl_shell_surface *C.struct_wl_shell_surface, listener *C.struct_wl_shell_surface_listener, data unsafe.Pointer) C.int {
   784  	return C.gamen_wl_shell_surface_add_listener(l.wl_proxy_add_listener_handle, wl_shell_surface, listener, data)
   785  }
   786  
   787  // respond to a ping event
   788  //
   789  // A client must respond to a ping event with a pong request or
   790  // the client may be deemed unresponsive.
   791  func (l *wl_library) wl_shell_surface_pong(wl_shell_surface *C.struct_wl_shell_surface, serial C.uint32_t) {
   792  	C.gamen_wl_shell_surface_pong(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_shell_surface, serial)
   793  }
   794  
   795  // start an interactive move
   796  //
   797  // Start a pointer-driven move of the surface.
   798  //
   799  // This request must be used in response to a button press event.
   800  // The server may ignore move requests depending on the state of
   801  // the surface (e.g. fullscreen or maximized).
   802  func (l *wl_library) wl_shell_surface_move(wl_shell_surface *C.struct_wl_shell_surface, seat *C.struct_wl_seat, serial C.uint32_t) {
   803  	C.gamen_wl_shell_surface_move(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_shell_surface, seat, serial)
   804  }
   805  
   806  // start an interactive resize
   807  //
   808  // Start a pointer-driven resizing of the surface.
   809  //
   810  // This request must be used in response to a button press event.
   811  // The server may ignore resize requests depending on the state of
   812  // the surface (e.g. fullscreen or maximized).
   813  func (l *wl_library) wl_shell_surface_resize(wl_shell_surface *C.struct_wl_shell_surface, seat *C.struct_wl_seat, serial C.uint32_t, edges enum_wl_shell_surface_resize) {
   814  	C.gamen_wl_shell_surface_resize(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_shell_surface, seat, serial, C.uint32_t(edges))
   815  }
   816  
   817  // make the surface a toplevel surface
   818  //
   819  // Map the surface as a toplevel surface.
   820  //
   821  // A toplevel surface is not fullscreen, maximized or transient.
   822  func (l *wl_library) wl_shell_surface_set_toplevel(wl_shell_surface *C.struct_wl_shell_surface) {
   823  	C.gamen_wl_shell_surface_set_toplevel(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_shell_surface)
   824  }
   825  
   826  // make the surface a transient surface
   827  //
   828  // Map the surface relative to an existing surface.
   829  //
   830  // The x and y arguments specify the location of the upper left
   831  // corner of the surface relative to the upper left corner of the
   832  // parent surface, in surface-local coordinates.
   833  //
   834  // The flags argument controls details of the transient behaviour.
   835  func (l *wl_library) wl_shell_surface_set_transient(wl_shell_surface *C.struct_wl_shell_surface, parent *C.struct_wl_surface, x, y C.int32_t, flags enum_wl_shell_surface_transient) {
   836  	C.gamen_wl_shell_surface_set_transient(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_shell_surface, parent, x, y, C.uint32_t(flags))
   837  }
   838  
   839  // make the surface a fullscreen surface
   840  //
   841  // Map the surface as a fullscreen surface.
   842  //
   843  // If an output parameter is given then the surface will be made
   844  // fullscreen on that output. If the client does not specify the
   845  // output then the compositor will apply its policy - usually
   846  // choosing the output on which the surface has the biggest surface
   847  // area.
   848  //
   849  // The client may specify a method to resolve a size conflict
   850  // between the output size and the surface size - this is provided
   851  // through the method parameter.
   852  //
   853  // The framerate parameter is used only when the method is set
   854  // to "driver", to indicate the preferred framerate. A value of 0
   855  // indicates that the client does not care about framerate.  The
   856  // framerate is specified in mHz, that is framerate of 60000 is 60Hz.
   857  //
   858  // A method of "scale" or "driver" implies a scaling operation of
   859  // the surface, either via a direct scaling operation or a change of
   860  // the output mode. This will override any kind of output scaling, so
   861  // that mapping a surface with a buffer size equal to the mode can
   862  // fill the screen independent of buffer_scale.
   863  //
   864  // A method of "fill" means we don't scale up the buffer, however
   865  // any output scale is applied. This means that you may run into
   866  // an edge case where the application maps a buffer with the same
   867  // size of the output mode but buffer_scale 1 (thus making a
   868  // surface larger than the output). In this case it is allowed to
   869  // downscale the results to fit the screen.
   870  //
   871  // The compositor must reply to this request with a configure event
   872  // with the dimensions for the output on which the surface will
   873  // be made fullscreen.
   874  func (l *wl_library) wl_shell_surface_set_fullscreen(wl_shell_surface *C.struct_wl_shell_surface, method enum_wl_shell_surface_fullscreen_method, framerate C.uint32_t, output *C.struct_wl_output) {
   875  	C.gamen_wl_shell_surface_set_fullscreen(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_shell_surface, C.uint32_t(method), framerate, output)
   876  }
   877  
   878  // make the surface a popup surface
   879  //
   880  // Map the surface as a popup.
   881  //
   882  // A popup surface is a transient surface with an added pointer
   883  // grab.
   884  //
   885  // An existing implicit grab will be changed to owner-events mode,
   886  // and the popup grab will continue after the implicit grab ends
   887  // (i.e. releasing the mouse button does not cause the popup to
   888  // be unmapped).
   889  //
   890  // The popup grab continues until the window is destroyed or a
   891  // mouse button is pressed in any other client's window. A click
   892  // in any of the client's surfaces is reported as normal, however,
   893  // clicks in other clients' surfaces will be discarded and trigger
   894  // the callback.
   895  //
   896  // The x and y arguments specify the location of the upper left
   897  // corner of the surface relative to the upper left corner of the
   898  // parent surface, in surface-local coordinates.
   899  func (l *wl_library) wl_shell_surface_set_popup(wl_shell_surface *C.struct_wl_shell_surface, seat *C.struct_wl_seat, serial C.uint32_t, parent *C.struct_wl_surface, x, y C.int32_t, flags enum_wl_shell_surface_transient) {
   900  	C.gamen_wl_shell_surface_set_popup(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_shell_surface, seat, serial, parent, x, y, C.uint32_t(flags))
   901  }
   902  
   903  // make the surface a maximized surface
   904  //
   905  // Map the surface as a maximized surface.
   906  //
   907  // If an output parameter is given then the surface will be
   908  // maximized on that output. If the client does not specify the
   909  // output then the compositor will apply its policy - usually
   910  // choosing the output on which the surface has the biggest surface
   911  // area.
   912  //
   913  // The compositor will reply with a configure event telling
   914  // the expected new surface size. The operation is completed
   915  // on the next buffer attach to this surface.
   916  //
   917  // A maximized surface typically fills the entire output it is
   918  // bound to, except for desktop elements such as panels. This is
   919  // the main difference between a maximized shell surface and a
   920  // fullscreen shell surface.
   921  //
   922  // The details depend on the compositor implementation.
   923  func (l *wl_library) wl_shell_surface_set_maximized(wl_shell_surface *C.struct_wl_shell_surface, output *C.struct_wl_output) {
   924  	C.gamen_wl_shell_surface_set_maximized(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_shell_surface, output)
   925  }
   926  
   927  // set surface title
   928  //
   929  // Set a short title for the surface.
   930  //
   931  // This string may be used to identify the surface in a task bar,
   932  // window list, or other user interface elements provided by the
   933  // compositor.
   934  //
   935  // The string must be encoded in UTF-8.
   936  func (l *wl_library) wl_shell_surface_set_title(wl_shell_surface *C.struct_wl_shell_surface, title *C.char) {
   937  	C.gamen_wl_shell_surface_set_title(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_shell_surface, title)
   938  }
   939  
   940  // set surface class
   941  //
   942  // Set a class for the surface.
   943  //
   944  // The surface class identifies the general class of applications
   945  // to which the surface belongs. A common convention is to use the
   946  // file name (or the full path if it is a non-standard location) of
   947  // the application's .desktop file as the class.
   948  func (l *wl_library) wl_shell_surface_set_class(wl_shell_surface *C.struct_wl_shell_surface, class_ *C.char) {
   949  	C.gamen_wl_shell_surface_set_class(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_shell_surface, class_)
   950  }
   951  
   952  func (l *wl_library) wl_shell_surface_destroy(wl_shell_surface *C.struct_wl_shell_surface) {
   953  	l.wl_proxy_destroy((*C.struct_wl_proxy)(wl_shell_surface))
   954  }
   955  
   956  // These errors can be emitted in response to wl_surface requests.
   957  type enum_wl_surface_error C.uint32_t
   958  
   959  const (
   960  	// buffer scale value is invalid
   961  	WL_SURFACE_ERROR_INVALID_SCALE enum_wl_surface_error = 0
   962  	// buffer transform value is invalid
   963  	WL_SURFACE_ERROR_INVALID_TRANSFORM enum_wl_surface_error = 1
   964  	// buffer size is invalid
   965  	WL_SURFACE_ERROR_INVALID_SIZE enum_wl_surface_error = 2
   966  	// buffer offset is invalid
   967  	WL_SURFACE_ERROR_INVALID_OFFSET enum_wl_surface_error = 3
   968  )
   969  
   970  func (l *wl_library) wl_surface_add_listener(wl_surface *C.struct_wl_surface, listener *C.struct_wl_surface_listener, data unsafe.Pointer) C.int {
   971  	return C.gamen_wl_surface_add_listener(l.wl_proxy_add_listener_handle, wl_surface, listener, data)
   972  }
   973  
   974  // delete surface
   975  //
   976  // Deletes the surface and invalidates its object ID.
   977  func (l *wl_library) wl_surface_destroy(wl_surface *C.struct_wl_surface) {
   978  	C.gamen_wl_surface_destroy(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_surface)
   979  }
   980  
   981  // set the surface contents
   982  //
   983  // Set a buffer as the content of this surface.
   984  //
   985  // The new size of the surface is calculated based on the buffer
   986  // size transformed by the inverse buffer_transform and the
   987  // inverse buffer_scale. This means that at commit time the supplied
   988  // buffer size must be an integer multiple of the buffer_scale. If
   989  // that's not the case, an invalid_size error is sent.
   990  //
   991  // The x and y arguments specify the location of the new pending
   992  // buffer's upper left corner, relative to the current buffer's upper
   993  // left corner, in surface-local coordinates. In other words, the
   994  // x and y, combined with the new surface size define in which
   995  // directions the surface's size changes. Setting anything other than 0
   996  // as x and y arguments is discouraged, and should instead be replaced
   997  // with using the separate wl_surface.offset request.
   998  //
   999  // When the bound wl_surface version is 5 or higher, passing any
  1000  // non-zero x or y is a protocol violation, and will result in an
  1001  // 'invalid_offset' error being raised. To achieve equivalent semantics,
  1002  // use wl_surface.offset.
  1003  //
  1004  // Surface contents are double-buffered state, see wl_surface.commit.
  1005  //
  1006  // The initial surface contents are void; there is no content.
  1007  // wl_surface.attach assigns the given wl_buffer as the pending
  1008  // wl_buffer. wl_surface.commit makes the pending wl_buffer the new
  1009  // surface contents, and the size of the surface becomes the size
  1010  // calculated from the wl_buffer, as described above. After commit,
  1011  // there is no pending buffer until the next attach.
  1012  //
  1013  // Committing a pending wl_buffer allows the compositor to read the
  1014  // pixels in the wl_buffer. The compositor may access the pixels at
  1015  // any time after the wl_surface.commit request. When the compositor
  1016  // will not access the pixels anymore, it will send the
  1017  // wl_buffer.release event. Only after receiving wl_buffer.release,
  1018  // the client may reuse the wl_buffer. A wl_buffer that has been
  1019  // attached and then replaced by another attach instead of committed
  1020  // will not receive a release event, and is not used by the
  1021  // compositor.
  1022  //
  1023  // If a pending wl_buffer has been committed to more than one wl_surface,
  1024  // the delivery of wl_buffer.release events becomes undefined. A well
  1025  // behaved client should not rely on wl_buffer.release events in this
  1026  // case. Alternatively, a client could create multiple wl_buffer objects
  1027  // from the same backing storage or use wp_linux_buffer_release.
  1028  //
  1029  // Destroying the wl_buffer after wl_buffer.release does not change
  1030  // the surface contents. Destroying the wl_buffer before wl_buffer.release
  1031  // is allowed as long as the underlying buffer storage isn't re-used (this
  1032  // can happen e.g. on client process termination). However, if the client
  1033  // destroys the wl_buffer before receiving the wl_buffer.release event and
  1034  // mutates the underlying buffer storage, the surface contents become
  1035  // undefined immediately.
  1036  //
  1037  // If wl_surface.attach is sent with a NULL wl_buffer, the
  1038  // following wl_surface.commit will remove the surface content.
  1039  func (l *wl_library) wl_surface_attach(wl_surface *C.struct_wl_surface, buffer *C.struct_wl_buffer, x, y C.int32_t) {
  1040  	C.gamen_wl_surface_attach(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_surface, buffer, x, y)
  1041  }
  1042  
  1043  // mark part of the surface damaged
  1044  //
  1045  // This request is used to describe the regions where the pending
  1046  // buffer is different from the current surface contents, and where
  1047  // the surface therefore needs to be repainted. The compositor
  1048  // ignores the parts of the damage that fall outside of the surface.
  1049  //
  1050  // Damage is double-buffered state, see wl_surface.commit.
  1051  //
  1052  // The damage rectangle is specified in surface-local coordinates,
  1053  // where x and y specify the upper left corner of the damage rectangle.
  1054  //
  1055  // The initial value for pending damage is empty: no damage.
  1056  // wl_surface.damage adds pending damage: the new pending damage
  1057  // is the union of old pending damage and the given rectangle.
  1058  //
  1059  // wl_surface.commit assigns pending damage as the current damage,
  1060  // and clears pending damage. The server will clear the current
  1061  // damage as it repaints the surface.
  1062  //
  1063  // Note! New clients should not use this request. Instead damage can be
  1064  // posted with wl_surface.damage_buffer which uses buffer coordinates
  1065  // instead of surface coordinates.
  1066  func (l *wl_library) wl_surface_damage(wl_surface *C.struct_wl_surface, x, y, width, height C.int32_t) {
  1067  	C.gamen_wl_surface_damage(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_surface, x, y, width, height)
  1068  }
  1069  
  1070  // request a frame throttling hint
  1071  //
  1072  // Request a notification when it is a good time to start drawing a new
  1073  // frame, by creating a frame callback. This is useful for throttling
  1074  // redrawing operations, and driving animations.
  1075  //
  1076  // When a client is animating on a wl_surface, it can use the 'frame'
  1077  // request to get notified when it is a good time to draw and commit the
  1078  // next frame of animation. If the client commits an update earlier than
  1079  // that, it is likely that some updates will not make it to the display,
  1080  // and the client is wasting resources by drawing too often.
  1081  //
  1082  // The frame request will take effect on the next wl_surface.commit.
  1083  // The notification will only be posted for one frame unless
  1084  // requested again. For a wl_surface, the notifications are posted in
  1085  // the order the frame requests were committed.
  1086  //
  1087  // The server must send the notifications so that a client
  1088  // will not send excessive updates, while still allowing
  1089  // the highest possible update rate for clients that wait for the reply
  1090  // before drawing again. The server should give some time for the client
  1091  // to draw and commit after sending the frame callback events to let it
  1092  // hit the next output refresh.
  1093  //
  1094  // A server should avoid signaling the frame callbacks if the
  1095  // surface is not visible in any way, e.g. the surface is off-screen,
  1096  // or completely obscured by other opaque surfaces.
  1097  //
  1098  // The object returned by this request will be destroyed by the
  1099  // compositor after the callback is fired and as such the client must not
  1100  // attempt to use it after that point.
  1101  //
  1102  // The callback_data passed in the callback is the current time, in
  1103  // milliseconds, with an undefined base.
  1104  func (l *wl_library) wl_surface_frame(wl_surface *C.struct_wl_surface) *C.struct_wl_callback {
  1105  	return C.gamen_wl_surface_frame(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_surface)
  1106  }
  1107  
  1108  // set opaque region
  1109  //
  1110  // This request sets the region of the surface that contains
  1111  // opaque content.
  1112  //
  1113  // The opaque region is an optimization hint for the compositor
  1114  // that lets it optimize the redrawing of content behind opaque
  1115  // regions.  Setting an opaque region is not required for correct
  1116  // behaviour, but marking transparent content as opaque will result
  1117  // in repaint artifacts.
  1118  //
  1119  // The opaque region is specified in surface-local coordinates.
  1120  //
  1121  // The compositor ignores the parts of the opaque region that fall
  1122  // outside of the surface.
  1123  //
  1124  // Opaque region is double-buffered state, see wl_surface.commit.
  1125  //
  1126  // wl_surface.set_opaque_region changes the pending opaque region.
  1127  // wl_surface.commit copies the pending region to the current region.
  1128  // Otherwise, the pending and current regions are never changed.
  1129  //
  1130  // The initial value for an opaque region is empty. Setting the pending
  1131  // opaque region has copy semantics, and the wl_region object can be
  1132  // destroyed immediately. A NULL wl_region causes the pending opaque
  1133  // region to be set to empty.
  1134  func (l *wl_library) wl_surface_set_opaque_region(wl_surface *C.struct_wl_surface, region *C.struct_wl_region) {
  1135  	C.gamen_wl_surface_set_opaque_region(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_surface, region)
  1136  }
  1137  
  1138  // set input region
  1139  //
  1140  // This request sets the region of the surface that can receive
  1141  // pointer and touch events.
  1142  //
  1143  // Input events happening outside of this region will try the next
  1144  // surface in the server surface stack. The compositor ignores the
  1145  // parts of the input region that fall outside of the surface.
  1146  //
  1147  // The input region is specified in surface-local coordinates.
  1148  //
  1149  // Input region is double-buffered state, see wl_surface.commit.
  1150  //
  1151  // wl_surface.set_input_region changes the pending input region.
  1152  // wl_surface.commit copies the pending region to the current region.
  1153  // Otherwise the pending and current regions are never changed,
  1154  // except cursor and icon surfaces are special cases, see
  1155  // wl_pointer.set_cursor and wl_data_device.start_drag.
  1156  //
  1157  // The initial value for an input region is infinite. That means the
  1158  // whole surface will accept input. Setting the pending input region
  1159  // has copy semantics, and the wl_region object can be destroyed
  1160  // immediately. A NULL wl_region causes the input region to be set
  1161  // to infinite.
  1162  func (l *wl_library) wl_surface_set_input_region(wl_surface *C.struct_wl_surface, region *C.struct_wl_region) {
  1163  	C.gamen_wl_surface_set_input_region(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_surface, region)
  1164  }
  1165  
  1166  // commit pending surface state
  1167  //
  1168  // Surface state (input, opaque, and damage regions, attached buffers,
  1169  // etc.) is double-buffered. Protocol requests modify the pending state,
  1170  // as opposed to the current state in use by the compositor. A commit
  1171  // request atomically applies all pending state, replacing the current
  1172  // state. After commit, the new pending state is as documented for each
  1173  // related request.
  1174  //
  1175  // On commit, a pending wl_buffer is applied first, and all other state
  1176  // second. This means that all coordinates in double-buffered state are
  1177  // relative to the new wl_buffer coming into use, except for
  1178  // wl_surface.attach itself. If there is no pending wl_buffer, the
  1179  // coordinates are relative to the current surface contents.
  1180  //
  1181  // All requests that need a commit to become effective are documented
  1182  // to affect double-buffered state.
  1183  //
  1184  // Other interfaces may add further double-buffered surface state.
  1185  func (l *wl_library) wl_surface_commit(wl_surface *C.struct_wl_surface) {
  1186  	C.gamen_wl_surface_commit(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_surface)
  1187  }
  1188  
  1189  // sets the buffer transformation
  1190  //
  1191  // This request sets an optional transformation on how the compositor
  1192  // interprets the contents of the buffer attached to the surface. The
  1193  // accepted values for the transform parameter are the values for
  1194  // wl_output.transform.
  1195  //
  1196  // Buffer transform is double-buffered state, see wl_surface.commit.
  1197  //
  1198  // A newly created surface has its buffer transformation set to normal.
  1199  //
  1200  // wl_surface.set_buffer_transform changes the pending buffer
  1201  // transformation. wl_surface.commit copies the pending buffer
  1202  // transformation to the current one. Otherwise, the pending and current
  1203  // values are never changed.
  1204  //
  1205  // The purpose of this request is to allow clients to render content
  1206  // according to the output transform, thus permitting the compositor to
  1207  // use certain optimizations even if the display is rotated. Using
  1208  // hardware overlays and scanning out a client buffer for fullscreen
  1209  // surfaces are examples of such optimizations. Those optimizations are
  1210  // highly dependent on the compositor implementation, so the use of this
  1211  // request should be considered on a case-by-case basis.
  1212  //
  1213  // Note that if the transform value includes 90 or 270 degree rotation,
  1214  // the width of the buffer will become the surface height and the height
  1215  // of the buffer will become the surface width.
  1216  //
  1217  // If transform is not one of the values from the
  1218  // wl_output.transform enum the invalid_transform protocol error
  1219  // is raised.
  1220  func (l *wl_library) wl_surface_set_buffer_transform(wl_surface *C.struct_wl_surface, transform enum_wl_output_transform) {
  1221  	C.gamen_wl_surface_set_buffer_transform(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_surface, C.int32_t(transform))
  1222  }
  1223  
  1224  // sets the buffer scaling factor
  1225  //
  1226  // This request sets an optional scaling factor on how the compositor
  1227  // interprets the contents of the buffer attached to the window.
  1228  //
  1229  // Buffer scale is double-buffered state, see wl_surface.commit.
  1230  //
  1231  // A newly created surface has its buffer scale set to 1.
  1232  //
  1233  // wl_surface.set_buffer_scale changes the pending buffer scale.
  1234  // wl_surface.commit copies the pending buffer scale to the current one.
  1235  // Otherwise, the pending and current values are never changed.
  1236  //
  1237  // The purpose of this request is to allow clients to supply higher
  1238  // resolution buffer data for use on high resolution outputs. It is
  1239  // intended that you pick the same buffer scale as the scale of the
  1240  // output that the surface is displayed on. This means the compositor
  1241  // can avoid scaling when rendering the surface on that output.
  1242  //
  1243  // Note that if the scale is larger than 1, then you have to attach
  1244  // a buffer that is larger (by a factor of scale in each dimension)
  1245  // than the desired surface size.
  1246  //
  1247  // If scale is not positive the invalid_scale protocol error is
  1248  // raised.
  1249  func (l *wl_library) wl_surface_set_buffer_scale(wl_surface *C.struct_wl_surface, scale C.int32_t) {
  1250  	C.gamen_wl_surface_set_buffer_scale(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_surface, scale)
  1251  }
  1252  
  1253  // mark part of the surface damaged using buffer coordinates
  1254  //
  1255  // This request is used to describe the regions where the pending
  1256  // buffer is different from the current surface contents, and where
  1257  // the surface therefore needs to be repainted. The compositor
  1258  // ignores the parts of the damage that fall outside of the surface.
  1259  //
  1260  // Damage is double-buffered state, see wl_surface.commit.
  1261  //
  1262  // The damage rectangle is specified in buffer coordinates,
  1263  // where x and y specify the upper left corner of the damage rectangle.
  1264  //
  1265  // The initial value for pending damage is empty: no damage.
  1266  // wl_surface.damage_buffer adds pending damage: the new pending
  1267  // damage is the union of old pending damage and the given rectangle.
  1268  //
  1269  // wl_surface.commit assigns pending damage as the current damage,
  1270  // and clears pending damage. The server will clear the current
  1271  // damage as it repaints the surface.
  1272  //
  1273  // This request differs from wl_surface.damage in only one way - it
  1274  // takes damage in buffer coordinates instead of surface-local
  1275  // coordinates. While this generally is more intuitive than surface
  1276  // coordinates, it is especially desirable when using wp_viewport
  1277  // or when a drawing library (like EGL) is unaware of buffer scale
  1278  // and buffer transform.
  1279  //
  1280  // Note: Because buffer transformation changes and damage requests may
  1281  // be interleaved in the protocol stream, it is impossible to determine
  1282  // the actual mapping between surface and buffer damage until
  1283  // wl_surface.commit time. Therefore, compositors wishing to take both
  1284  // kinds of damage into account will have to accumulate damage from the
  1285  // two requests separately and only transform from one to the other
  1286  // after receiving the wl_surface.commit.
  1287  func (l *wl_library) wl_surface_damage_buffer(wl_surface *C.struct_wl_surface, x, y, width, height C.int32_t) {
  1288  	C.gamen_wl_surface_damage_buffer(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_surface, x, y, width, height)
  1289  }
  1290  
  1291  // set the surface contents offset
  1292  //
  1293  // The x and y arguments specify the location of the new pending
  1294  // buffer's upper left corner, relative to the current buffer's upper
  1295  // left corner, in surface-local coordinates. In other words, the
  1296  // x and y, combined with the new surface size define in which
  1297  // directions the surface's size changes.
  1298  //
  1299  // Surface location offset is double-buffered state, see
  1300  // wl_surface.commit.
  1301  //
  1302  // This request is semantically equivalent to and the replaces the x and y
  1303  // arguments in the wl_surface.attach request in wl_surface versions prior
  1304  // to 5. See wl_surface.attach for details.
  1305  func (l *wl_library) wl_surface_offset(wl_surface *C.struct_wl_surface, x, y C.int32_t) {
  1306  	C.gamen_wl_surface_offset(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_surface, x, y)
  1307  }
  1308  
  1309  // This is a bitmask of capabilities this seat has; if a member is
  1310  // set, then it is present on the seat.
  1311  type enum_wl_seat_capability C.uint32_t
  1312  
  1313  const (
  1314  	// the seat has pointer devices
  1315  	WL_SEAT_CAPABILITY_POINTER enum_wl_seat_capability = 1
  1316  	// the seat has one or more keyboards
  1317  	WL_SEAT_CAPABILITY_KEYBOARD enum_wl_seat_capability = 2
  1318  	// the seat has touch devices
  1319  	WL_SEAT_CAPABILITY_TOUCH enum_wl_seat_capability = 4
  1320  )
  1321  
  1322  // These errors can be emitted in response to wl_seat requests.
  1323  type enum_wl_seat_error C.uint32_t
  1324  
  1325  const (
  1326  	// get_pointer, get_keyboard or get_touch called on seat without the matching capability
  1327  	WL_SEAT_ERROR_MISSING_CAPABILITY enum_wl_seat_error = 0
  1328  )
  1329  
  1330  func (l *wl_library) wl_seat_add_listener(wl_seat *C.struct_wl_seat, listener *C.struct_wl_seat_listener, data unsafe.Pointer) C.int {
  1331  	return C.gamen_wl_seat_add_listener(l.wl_proxy_add_listener_handle, wl_seat, listener, data)
  1332  }
  1333  
  1334  // return pointer object
  1335  //
  1336  // The ID provided will be initialized to the wl_pointer interface
  1337  // for this seat.
  1338  //
  1339  // This request only takes effect if the seat has the pointer
  1340  // capability, or has had the pointer capability in the past.
  1341  // It is a protocol violation to issue this request on a seat that has
  1342  // never had the pointer capability. The missing_capability error will
  1343  // be sent in this case.
  1344  func (l *wl_library) wl_seat_get_pointer(wl_seat *C.struct_wl_seat) *C.struct_wl_pointer {
  1345  	return C.gamen_wl_seat_get_pointer(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_seat)
  1346  }
  1347  
  1348  // return keyboard object
  1349  //
  1350  // The ID provided will be initialized to the wl_keyboard interface
  1351  // for this seat.
  1352  //
  1353  // This request only takes effect if the seat has the keyboard
  1354  // capability, or has had the keyboard capability in the past.
  1355  // It is a protocol violation to issue this request on a seat that has
  1356  // never had the keyboard capability. The missing_capability error will
  1357  // be sent in this case.
  1358  func (l *wl_library) wl_seat_get_keyboard(wl_seat *C.struct_wl_seat) *C.struct_wl_keyboard {
  1359  	return C.gamen_wl_seat_get_keyboard(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_seat)
  1360  }
  1361  
  1362  // return touch object
  1363  //
  1364  // The ID provided will be initialized to the wl_touch interface
  1365  // for this seat.
  1366  //
  1367  // This request only takes effect if the seat has the touch
  1368  // capability, or has had the touch capability in the past.
  1369  // It is a protocol violation to issue this request on a seat that has
  1370  // never had the touch capability. The missing_capability error will
  1371  // be sent in this case.
  1372  func (l *wl_library) wl_seat_get_touch(wl_seat *C.struct_wl_seat) *C.struct_wl_touch {
  1373  	return C.gamen_wl_seat_get_touch(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_seat)
  1374  }
  1375  
  1376  // release the seat object
  1377  //
  1378  // Using this request a client can tell the server that it is not going to
  1379  // use the seat object anymore.
  1380  func (l *wl_library) wl_seat_release(wl_seat *C.struct_wl_seat) {
  1381  	C.gamen_wl_seat_release(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_seat)
  1382  }
  1383  
  1384  func (l *wl_library) wl_seat_destroy(wl_seat *C.struct_wl_seat) {
  1385  	l.wl_proxy_destroy((*C.struct_wl_proxy)(wl_seat))
  1386  }
  1387  
  1388  type enum_wl_pointer_error C.uint32_t
  1389  
  1390  const (
  1391  	// given wl_surface has another role
  1392  	WL_POINTER_ERROR_ROLE enum_wl_pointer_error = 0
  1393  )
  1394  
  1395  // Describes the physical state of a button that produced the button
  1396  // event.
  1397  type enum_wl_pointer_button_state C.uint32_t
  1398  
  1399  const (
  1400  	// the button is not pressed
  1401  	WL_POINTER_BUTTON_STATE_RELEASED enum_wl_pointer_button_state = 0
  1402  	// the button is pressed
  1403  	WL_POINTER_BUTTON_STATE_PRESSED enum_wl_pointer_button_state = 1
  1404  )
  1405  
  1406  // Describes the axis types of scroll events.
  1407  type enum_wl_pointer_axis C.uint32_t
  1408  
  1409  const (
  1410  	// vertical axis
  1411  	WL_POINTER_AXIS_VERTICAL_SCROLL enum_wl_pointer_axis = 0
  1412  	// horizontal axis
  1413  	WL_POINTER_AXIS_HORIZONTAL_SCROLL enum_wl_pointer_axis = 1
  1414  )
  1415  
  1416  // Describes the source types for axis events. This indicates to the
  1417  // client how an axis event was physically generated; a client may
  1418  // adjust the user interface accordingly. For example, scroll events
  1419  // from a "finger" source may be in a smooth coordinate space with
  1420  // kinetic scrolling whereas a "wheel" source may be in discrete steps
  1421  // of a number of lines.
  1422  //
  1423  // The "continuous" axis source is a device generating events in a
  1424  // continuous coordinate space, but using something other than a
  1425  // finger. One example for this source is button-based scrolling where
  1426  // the vertical motion of a device is converted to scroll events while
  1427  // a button is held down.
  1428  //
  1429  // The "wheel tilt" axis source indicates that the actual device is a
  1430  // wheel but the scroll event is not caused by a rotation but a
  1431  // (usually sideways) tilt of the wheel.
  1432  type enum_wl_pointer_axis_source C.uint32_t
  1433  
  1434  const (
  1435  	// a physical wheel rotation
  1436  	WL_POINTER_AXIS_SOURCE_WHEEL enum_wl_pointer_axis_source = 0
  1437  	// finger on a touch surface
  1438  	WL_POINTER_AXIS_SOURCE_FINGER enum_wl_pointer_axis_source = 1
  1439  	// continuous coordinate space
  1440  	WL_POINTER_AXIS_SOURCE_CONTINUOUS enum_wl_pointer_axis_source = 2
  1441  	// a physical wheel tilt
  1442  	WL_POINTER_AXIS_SOURCE_WHEEL_TILT enum_wl_pointer_axis_source = 3
  1443  )
  1444  
  1445  func (l *wl_library) wl_pointer_add_listener(wl_pointer *C.struct_wl_pointer, listener *C.struct_wl_pointer_listener, data unsafe.Pointer) C.int {
  1446  	return C.gamen_wl_pointer_add_listener(l.wl_proxy_add_listener_handle, wl_pointer, listener, data)
  1447  }
  1448  
  1449  // set the pointer surface
  1450  //
  1451  // Set the pointer surface, i.e., the surface that contains the
  1452  // pointer image (cursor). This request gives the surface the role
  1453  // of a cursor. If the surface already has another role, it raises
  1454  // a protocol error.
  1455  //
  1456  // The cursor actually changes only if the pointer
  1457  // focus for this device is one of the requesting client's surfaces
  1458  // or the surface parameter is the current pointer surface. If
  1459  // there was a previous surface set with this request it is
  1460  // replaced. If surface is NULL, the pointer image is hidden.
  1461  //
  1462  // The parameters hotspot_x and hotspot_y define the position of
  1463  // the pointer surface relative to the pointer location. Its
  1464  // top-left corner is always at (x, y) - (hotspot_x, hotspot_y),
  1465  // where (x, y) are the coordinates of the pointer location, in
  1466  // surface-local coordinates.
  1467  //
  1468  // On surface.attach requests to the pointer surface, hotspot_x
  1469  // and hotspot_y are decremented by the x and y parameters
  1470  // passed to the request. Attach must be confirmed by
  1471  // wl_surface.commit as usual.
  1472  //
  1473  // The hotspot can also be updated by passing the currently set
  1474  // pointer surface to this request with new values for hotspot_x
  1475  // and hotspot_y.
  1476  //
  1477  // The current and pending input regions of the wl_surface are
  1478  // cleared, and wl_surface.set_input_region is ignored until the
  1479  // wl_surface is no longer used as the cursor. When the use as a
  1480  // cursor ends, the current and pending input regions become
  1481  // undefined, and the wl_surface is unmapped.
  1482  //
  1483  // The serial parameter must match the latest wl_pointer.enter
  1484  // serial number sent to the client. Otherwise the request will be
  1485  // ignored.
  1486  func (l *wl_library) wl_pointer_set_cursor(wl_pointer *C.struct_wl_pointer, serial C.uint32_t, surface *C.struct_wl_surface, hotspot_x, hotspot_y C.int32_t) {
  1487  	C.gamen_wl_pointer_set_cursor(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_pointer, serial, surface, hotspot_x, hotspot_y)
  1488  }
  1489  
  1490  // release the pointer object
  1491  //
  1492  // Using this request a client can tell the server that it is not going to
  1493  // use the pointer object anymore.
  1494  //
  1495  // This request destroys the pointer proxy object, so clients must not call
  1496  // wl_pointer_destroy() after using this request.
  1497  func (l *wl_library) wl_pointer_release(wl_pointer *C.struct_wl_pointer) {
  1498  	C.gamen_wl_pointer_release(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_pointer)
  1499  }
  1500  
  1501  func (l *wl_library) wl_pointer_destroy(wl_pointer *C.struct_wl_pointer) {
  1502  	l.wl_proxy_destroy((*C.struct_wl_proxy)(wl_pointer))
  1503  }
  1504  
  1505  // This specifies the format of the keymap provided to the
  1506  // client with the wl_keyboard.keymap event.
  1507  type enum_wl_keyboard_keymap_format C.uint32_t
  1508  
  1509  const (
  1510  	// no keymap; client must understand how to interpret the raw keycode
  1511  	WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP enum_wl_keyboard_keymap_format = 0
  1512  	// libxkbcommon compatible, null-terminated string; to determine the xkb keycode, clients must add 8 to the key event keycode
  1513  	WL_KEYBOARD_KEYMAP_FORMAT_XKB_V_1 enum_wl_keyboard_keymap_format = 1
  1514  )
  1515  
  1516  // Describes the physical state of a key that produced the key event.
  1517  type enum_wl_keyboard_key_state C.uint32_t
  1518  
  1519  const (
  1520  	// key is not pressed
  1521  	WL_KEYBOARD_KEY_STATE_RELEASED enum_wl_keyboard_key_state = 0
  1522  	// key is pressed
  1523  	WL_KEYBOARD_KEY_STATE_PRESSED enum_wl_keyboard_key_state = 1
  1524  )
  1525  
  1526  func (l *wl_library) wl_keyboard_add_listener(wl_keyboard *C.struct_wl_keyboard, listener *C.struct_wl_keyboard_listener, data unsafe.Pointer) C.int {
  1527  	return C.gamen_wl_keyboard_add_listener(l.wl_proxy_add_listener_handle, wl_keyboard, listener, data)
  1528  }
  1529  
  1530  // release the keyboard object
  1531  func (l *wl_library) wl_keyboard_release(wl_keyboard *C.struct_wl_keyboard) {
  1532  	C.gamen_wl_keyboard_release(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_keyboard)
  1533  }
  1534  
  1535  func (l *wl_library) wl_keyboard_destroy(wl_keyboard *C.struct_wl_keyboard) {
  1536  	l.wl_proxy_destroy((*C.struct_wl_proxy)(wl_keyboard))
  1537  }
  1538  
  1539  func (l *wl_library) wl_touch_add_listener(wl_touch *C.struct_wl_touch, listener *C.struct_wl_touch_listener, data unsafe.Pointer) C.int {
  1540  	return C.gamen_wl_touch_add_listener(l.wl_proxy_add_listener_handle, wl_touch, listener, data)
  1541  }
  1542  
  1543  // release the touch object
  1544  func (l *wl_library) wl_touch_release(wl_touch *C.struct_wl_touch) {
  1545  	C.gamen_wl_touch_release(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_touch)
  1546  }
  1547  
  1548  func (l *wl_library) wl_touch_destroy(wl_touch *C.struct_wl_touch) {
  1549  	l.wl_proxy_destroy((*C.struct_wl_proxy)(wl_touch))
  1550  }
  1551  
  1552  // This enumeration describes how the physical
  1553  // pixels on an output are laid out.
  1554  type enum_wl_output_subpixel C.uint32_t
  1555  
  1556  const (
  1557  	// unknown geometry
  1558  	WL_OUTPUT_SUBPIXEL_UNKNOWN enum_wl_output_subpixel = 0
  1559  	// no geometry
  1560  	WL_OUTPUT_SUBPIXEL_NONE enum_wl_output_subpixel = 1
  1561  	// horizontal RGB
  1562  	WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB enum_wl_output_subpixel = 2
  1563  	// horizontal BGR
  1564  	WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR enum_wl_output_subpixel = 3
  1565  	// vertical RGB
  1566  	WL_OUTPUT_SUBPIXEL_VERTICAL_RGB enum_wl_output_subpixel = 4
  1567  	// vertical BGR
  1568  	WL_OUTPUT_SUBPIXEL_VERTICAL_BGR enum_wl_output_subpixel = 5
  1569  )
  1570  
  1571  // This describes the transform that a compositor will apply to a
  1572  // surface to compensate for the rotation or mirroring of an
  1573  // output device.
  1574  //
  1575  // The flipped values correspond to an initial flip around a
  1576  // vertical axis followed by rotation.
  1577  //
  1578  // The purpose is mainly to allow clients to render accordingly and
  1579  // tell the compositor, so that for fullscreen surfaces, the
  1580  // compositor will still be able to scan out directly from client
  1581  // surfaces.
  1582  type enum_wl_output_transform C.uint32_t
  1583  
  1584  const (
  1585  	// no transform
  1586  	WL_OUTPUT_TRANSFORM_NORMAL enum_wl_output_transform = 0
  1587  	// 90 degrees counter-clockwise
  1588  	WL_OUTPUT_TRANSFORM_90 enum_wl_output_transform = 1
  1589  	// 180 degrees counter-clockwise
  1590  	WL_OUTPUT_TRANSFORM_180 enum_wl_output_transform = 2
  1591  	// 270 degrees counter-clockwise
  1592  	WL_OUTPUT_TRANSFORM_270 enum_wl_output_transform = 3
  1593  	// 180 degree flip around a vertical axis
  1594  	WL_OUTPUT_TRANSFORM_FLIPPED enum_wl_output_transform = 4
  1595  	// flip and rotate 90 degrees counter-clockwise
  1596  	WL_OUTPUT_TRANSFORM_FLIPPED_90 enum_wl_output_transform = 5
  1597  	// flip and rotate 180 degrees counter-clockwise
  1598  	WL_OUTPUT_TRANSFORM_FLIPPED_180 enum_wl_output_transform = 6
  1599  	// flip and rotate 270 degrees counter-clockwise
  1600  	WL_OUTPUT_TRANSFORM_FLIPPED_270 enum_wl_output_transform = 7
  1601  )
  1602  
  1603  // These flags describe properties of an output mode.
  1604  // They are used in the flags bitfield of the mode event.
  1605  type enum_wl_output_mode C.uint32_t
  1606  
  1607  const (
  1608  	// indicates this is the current mode
  1609  	WL_OUTPUT_MODE_CURRENT enum_wl_output_mode = 0x1
  1610  	// indicates this is the preferred mode
  1611  	WL_OUTPUT_MODE_PREFERRED enum_wl_output_mode = 0x2
  1612  )
  1613  
  1614  func (l *wl_library) wl_output_add_listener(wl_output *C.struct_wl_output, listener *C.struct_wl_output_listener, data unsafe.Pointer) C.int {
  1615  	return C.gamen_wl_output_add_listener(l.wl_proxy_add_listener_handle, wl_output, listener, data)
  1616  }
  1617  
  1618  // release the output object
  1619  //
  1620  // Using this request a client can tell the server that it is not going to
  1621  // use the output object anymore.
  1622  func (l *wl_library) wl_output_release(wl_output *C.struct_wl_output) {
  1623  	C.gamen_wl_output_release(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_output)
  1624  }
  1625  
  1626  func (l *wl_library) wl_output_destroy(wl_output *C.struct_wl_output) {
  1627  	l.wl_proxy_destroy((*C.struct_wl_proxy)(wl_output))
  1628  }
  1629  
  1630  // destroy region
  1631  //
  1632  // Destroy the region.  This will invalidate the object ID.
  1633  func (l *wl_library) wl_region_destroy(wl_region *C.struct_wl_region) {
  1634  	C.gamen_wl_region_destroy(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_region)
  1635  }
  1636  
  1637  // add rectangle to region
  1638  //
  1639  // Add the specified rectangle to the region.
  1640  func (l *wl_library) wl_region_add(wl_region *C.struct_wl_region, x, y, width, height C.int32_t) {
  1641  	C.gamen_wl_region_add(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_region, x, y, width, height)
  1642  }
  1643  
  1644  // subtract rectangle from region
  1645  //
  1646  // Subtract the specified rectangle from the region.
  1647  func (l *wl_library) wl_region_subtract(wl_region *C.struct_wl_region, x, y, width, height C.int32_t) {
  1648  	C.gamen_wl_region_subtract(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_region, x, y, width, height)
  1649  }
  1650  
  1651  type enum_wl_subcompositor_error C.uint32_t
  1652  
  1653  const (
  1654  	// the to-be sub-surface is invalid
  1655  	WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE enum_wl_subcompositor_error = 0
  1656  )
  1657  
  1658  // unbind from the subcompositor interface
  1659  //
  1660  // Informs the server that the client will not be using this
  1661  // protocol object anymore. This does not affect any other
  1662  // objects, wl_subsurface objects included.
  1663  func (l *wl_library) wl_subcompositor_destroy(wl_subcompositor *C.struct_wl_subcompositor) {
  1664  	C.gamen_wl_subcompositor_destroy(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_subcompositor)
  1665  }
  1666  
  1667  // give a surface the role sub-surface
  1668  //
  1669  // Create a sub-surface interface for the given surface, and
  1670  // associate it with the given parent surface. This turns a
  1671  // plain wl_surface into a sub-surface.
  1672  //
  1673  // The to-be sub-surface must not already have another role, and it
  1674  // must not have an existing wl_subsurface object. Otherwise a protocol
  1675  // error is raised.
  1676  //
  1677  // Adding sub-surfaces to a parent is a double-buffered operation on the
  1678  // parent (see wl_surface.commit). The effect of adding a sub-surface
  1679  // becomes visible on the next time the state of the parent surface is
  1680  // applied.
  1681  //
  1682  // This request modifies the behaviour of wl_surface.commit request on
  1683  // the sub-surface, see the documentation on wl_subsurface interface.
  1684  func (l *wl_library) wl_subcompositor_get_subsurface(wl_subcompositor *C.struct_wl_subcompositor, surface, parent *C.struct_wl_surface) *C.struct_wl_subsurface {
  1685  	return C.gamen_wl_subcompositor_get_subsurface(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_subcompositor, surface, parent)
  1686  }
  1687  
  1688  type enum_wl_subsurface_error C.uint32_t
  1689  
  1690  const (
  1691  	// wl_surface is not a sibling or the parent
  1692  	WL_SUBSURFACE_ERROR_BAD_SURFACE enum_wl_subsurface_error = 0
  1693  )
  1694  
  1695  // remove sub-surface interface
  1696  //
  1697  // The sub-surface interface is removed from the wl_surface object
  1698  // that was turned into a sub-surface with a
  1699  // wl_subcompositor.get_subsurface request. The wl_surface's association
  1700  // to the parent is deleted, and the wl_surface loses its role as
  1701  // a sub-surface. The wl_surface is unmapped immediately.
  1702  func (l *wl_library) wl_subsurface_destroy(wl_subsurface *C.struct_wl_subsurface) {
  1703  	C.gamen_wl_subsurface_destroy(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_subsurface)
  1704  }
  1705  
  1706  // reposition the sub-surface
  1707  //
  1708  // This schedules a sub-surface position change.
  1709  // The sub-surface will be moved so that its origin (top left
  1710  // corner pixel) will be at the location x, y of the parent surface
  1711  // coordinate system. The coordinates are not restricted to the parent
  1712  // surface area. Negative values are allowed.
  1713  //
  1714  // The scheduled coordinates will take effect whenever the state of the
  1715  // parent surface is applied. When this happens depends on whether the
  1716  // parent surface is in synchronized mode or not. See
  1717  // wl_subsurface.set_sync and wl_subsurface.set_desync for details.
  1718  //
  1719  // If more than one set_position request is invoked by the client before
  1720  // the commit of the parent surface, the position of a new request always
  1721  // replaces the scheduled position from any previous request.
  1722  //
  1723  // The initial position is 0, 0.
  1724  func (l *wl_library) wl_subsurface_set_position(wl_subsurface *C.struct_wl_subsurface, x, y C.int32_t) {
  1725  	C.gamen_wl_subsurface_set_position(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_subsurface, x, y)
  1726  }
  1727  
  1728  // restack the sub-surface
  1729  //
  1730  // This sub-surface is taken from the stack, and put back just
  1731  // above the reference surface, changing the z-order of the sub-surfaces.
  1732  // The reference surface must be one of the sibling surfaces, or the
  1733  // parent surface. Using any other surface, including this sub-surface,
  1734  // will cause a protocol error.
  1735  //
  1736  // The z-order is double-buffered. Requests are handled in order and
  1737  // applied immediately to a pending state. The final pending state is
  1738  // copied to the active state the next time the state of the parent
  1739  // surface is applied. When this happens depends on whether the parent
  1740  // surface is in synchronized mode or not. See wl_subsurface.set_sync and
  1741  // wl_subsurface.set_desync for details.
  1742  //
  1743  // A new sub-surface is initially added as the top-most in the stack
  1744  // of its siblings and parent.
  1745  func (l *wl_library) wl_subsurface_place_above(wl_subsurface *C.struct_wl_subsurface, sibling *C.struct_wl_surface) {
  1746  	C.gamen_wl_subsurface_place_above(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_subsurface, sibling)
  1747  }
  1748  
  1749  // restack the sub-surface
  1750  //
  1751  // The sub-surface is placed just below the reference surface.
  1752  // See wl_subsurface.place_above.
  1753  func (l *wl_library) wl_subsurface_place_below(wl_subsurface *C.struct_wl_subsurface, sibling *C.struct_wl_surface) {
  1754  	C.gamen_wl_subsurface_place_below(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_subsurface, sibling)
  1755  }
  1756  
  1757  // set sub-surface to synchronized mode
  1758  //
  1759  // Change the commit behaviour of the sub-surface to synchronized
  1760  // mode, also described as the parent dependent mode.
  1761  //
  1762  // In synchronized mode, wl_surface.commit on a sub-surface will
  1763  // accumulate the committed state in a cache, but the state will
  1764  // not be applied and hence will not change the compositor output.
  1765  // The cached state is applied to the sub-surface immediately after
  1766  // the parent surface's state is applied. This ensures atomic
  1767  // updates of the parent and all its synchronized sub-surfaces.
  1768  // Applying the cached state will invalidate the cache, so further
  1769  // parent surface commits do not (re-)apply old state.
  1770  //
  1771  // See wl_subsurface for the recursive effect of this mode.
  1772  func (l *wl_library) wl_subsurface_set_sync(wl_subsurface *C.struct_wl_subsurface) {
  1773  	C.gamen_wl_subsurface_set_sync(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_subsurface)
  1774  }
  1775  
  1776  // set sub-surface to desynchronized mode
  1777  //
  1778  // Change the commit behaviour of the sub-surface to desynchronized
  1779  // mode, also described as independent or freely running mode.
  1780  //
  1781  // In desynchronized mode, wl_surface.commit on a sub-surface will
  1782  // apply the pending state directly, without caching, as happens
  1783  // normally with a wl_surface. Calling wl_surface.commit on the
  1784  // parent surface has no effect on the sub-surface's wl_surface
  1785  // state. This mode allows a sub-surface to be updated on its own.
  1786  //
  1787  // If cached state exists when wl_surface.commit is called in
  1788  // desynchronized mode, the pending state is added to the cached
  1789  // state, and applied as a whole. This invalidates the cache.
  1790  //
  1791  // Note: even if a sub-surface is set to desynchronized, a parent
  1792  // sub-surface may override it to behave as synchronized. For details,
  1793  // see wl_subsurface.
  1794  //
  1795  // If a surface's parent surface behaves as desynchronized, then
  1796  // the cached state is applied on set_desync.
  1797  func (l *wl_library) wl_subsurface_set_desync(wl_subsurface *C.struct_wl_subsurface) {
  1798  	C.gamen_wl_subsurface_set_desync(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, wl_subsurface)
  1799  }