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

     1  // Code generated by internal/wayland/wl/gen; DO NOT EDIT.
     2  // XML file : ./protocols/xdg-shell.xml
     3  
     4  //go:build linux && !android
     5  
     6  package wayland
     7  
     8  /*
     9  
    10  #include "xdg-shell-client-protocol.h"
    11  
    12  */
    13  import "C"
    14  import "unsafe"
    15  
    16  type enum_xdg_wm_base_error C.uint32_t
    17  
    18  const (
    19  	// given wl_surface has another role
    20  	XDG_WM_BASE_ERROR_ROLE enum_xdg_wm_base_error = 0
    21  	// xdg_wm_base was destroyed before children
    22  	XDG_WM_BASE_ERROR_DEFUNCT_SURFACES enum_xdg_wm_base_error = 1
    23  	// the client tried to map or destroy a non-topmost popup
    24  	XDG_WM_BASE_ERROR_NOT_THE_TOPMOST_POPUP enum_xdg_wm_base_error = 2
    25  	// the client specified an invalid popup parent surface
    26  	XDG_WM_BASE_ERROR_INVALID_POPUP_PARENT enum_xdg_wm_base_error = 3
    27  	// the client provided an invalid surface state
    28  	XDG_WM_BASE_ERROR_INVALID_SURFACE_STATE enum_xdg_wm_base_error = 4
    29  	// the client provided an invalid positioner
    30  	XDG_WM_BASE_ERROR_INVALID_POSITIONER enum_xdg_wm_base_error = 5
    31  )
    32  
    33  func (l *wl_library) xdg_wm_base_add_listener(xdg_wm_base *C.struct_xdg_wm_base, listener *C.struct_xdg_wm_base_listener, data unsafe.Pointer) C.int {
    34  	return C.gamen_xdg_wm_base_add_listener(l.wl_proxy_add_listener_handle, xdg_wm_base, listener, data)
    35  }
    36  
    37  // destroy xdg_wm_base
    38  //
    39  // Destroy this xdg_wm_base object.
    40  //
    41  // Destroying a bound xdg_wm_base object while there are surfaces
    42  // still alive created by this xdg_wm_base object instance is illegal
    43  // and will result in a protocol error.
    44  func (l *wl_library) xdg_wm_base_destroy(xdg_wm_base *C.struct_xdg_wm_base) {
    45  	C.gamen_xdg_wm_base_destroy(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_wm_base)
    46  }
    47  
    48  // create a positioner object
    49  //
    50  // Create a positioner object. A positioner object is used to position
    51  // surfaces relative to some parent surface. See the interface description
    52  // and xdg_surface.get_popup for details.
    53  func (l *wl_library) xdg_wm_base_create_positioner(xdg_wm_base *C.struct_xdg_wm_base) *C.struct_xdg_positioner {
    54  	return C.gamen_xdg_wm_base_create_positioner(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_wm_base)
    55  }
    56  
    57  // create a shell surface from a surface
    58  //
    59  // This creates an xdg_surface for the given surface. While xdg_surface
    60  // itself is not a role, the corresponding surface may only be assigned
    61  // a role extending xdg_surface, such as xdg_toplevel or xdg_popup. It is
    62  // illegal to create an xdg_surface for a wl_surface which already has an
    63  // assigned role and this will result in a protocol error.
    64  //
    65  // This creates an xdg_surface for the given surface. An xdg_surface is
    66  // used as basis to define a role to a given surface, such as xdg_toplevel
    67  // or xdg_popup. It also manages functionality shared between xdg_surface
    68  // based surface roles.
    69  //
    70  // See the documentation of xdg_surface for more details about what an
    71  // xdg_surface is and how it is used.
    72  func (l *wl_library) xdg_wm_base_get_xdg_surface(xdg_wm_base *C.struct_xdg_wm_base, surface *C.struct_wl_surface) *C.struct_xdg_surface {
    73  	return C.gamen_xdg_wm_base_get_xdg_surface(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_wm_base, surface)
    74  }
    75  
    76  // respond to a ping event
    77  //
    78  // A client must respond to a ping event with a pong request or
    79  // the client may be deemed unresponsive. See xdg_wm_base.ping.
    80  func (l *wl_library) xdg_wm_base_pong(xdg_wm_base *C.struct_xdg_wm_base, serial C.uint32_t) {
    81  	C.gamen_xdg_wm_base_pong(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_wm_base, serial)
    82  }
    83  
    84  type enum_xdg_positioner_error C.uint32_t
    85  
    86  const (
    87  	// invalid input provided
    88  	XDG_POSITIONER_ERROR_INVALID_INPUT enum_xdg_positioner_error = 0
    89  )
    90  
    91  type enum_xdg_positioner_anchor C.uint32_t
    92  
    93  const (
    94  	XDG_POSITIONER_ANCHOR_NONE         enum_xdg_positioner_anchor = 0
    95  	XDG_POSITIONER_ANCHOR_TOP          enum_xdg_positioner_anchor = 1
    96  	XDG_POSITIONER_ANCHOR_BOTTOM       enum_xdg_positioner_anchor = 2
    97  	XDG_POSITIONER_ANCHOR_LEFT         enum_xdg_positioner_anchor = 3
    98  	XDG_POSITIONER_ANCHOR_RIGHT        enum_xdg_positioner_anchor = 4
    99  	XDG_POSITIONER_ANCHOR_TOP_LEFT     enum_xdg_positioner_anchor = 5
   100  	XDG_POSITIONER_ANCHOR_BOTTOM_LEFT  enum_xdg_positioner_anchor = 6
   101  	XDG_POSITIONER_ANCHOR_TOP_RIGHT    enum_xdg_positioner_anchor = 7
   102  	XDG_POSITIONER_ANCHOR_BOTTOM_RIGHT enum_xdg_positioner_anchor = 8
   103  )
   104  
   105  type enum_xdg_positioner_gravity C.uint32_t
   106  
   107  const (
   108  	XDG_POSITIONER_GRAVITY_NONE         enum_xdg_positioner_gravity = 0
   109  	XDG_POSITIONER_GRAVITY_TOP          enum_xdg_positioner_gravity = 1
   110  	XDG_POSITIONER_GRAVITY_BOTTOM       enum_xdg_positioner_gravity = 2
   111  	XDG_POSITIONER_GRAVITY_LEFT         enum_xdg_positioner_gravity = 3
   112  	XDG_POSITIONER_GRAVITY_RIGHT        enum_xdg_positioner_gravity = 4
   113  	XDG_POSITIONER_GRAVITY_TOP_LEFT     enum_xdg_positioner_gravity = 5
   114  	XDG_POSITIONER_GRAVITY_BOTTOM_LEFT  enum_xdg_positioner_gravity = 6
   115  	XDG_POSITIONER_GRAVITY_TOP_RIGHT    enum_xdg_positioner_gravity = 7
   116  	XDG_POSITIONER_GRAVITY_BOTTOM_RIGHT enum_xdg_positioner_gravity = 8
   117  )
   118  
   119  // The constraint adjustment value define ways the compositor will adjust
   120  // the position of the surface, if the unadjusted position would result
   121  // in the surface being partly constrained.
   122  //
   123  // Whether a surface is considered 'constrained' is left to the compositor
   124  // to determine. For example, the surface may be partly outside the
   125  // compositor's defined 'work area', thus necessitating the child surface's
   126  // position be adjusted until it is entirely inside the work area.
   127  //
   128  // The adjustments can be combined, according to a defined precedence: 1)
   129  // Flip, 2) Slide, 3) Resize.
   130  type enum_xdg_positioner_constraint_adjustment C.uint32_t
   131  
   132  const (
   133  	XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_NONE     enum_xdg_positioner_constraint_adjustment = 0
   134  	XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X  enum_xdg_positioner_constraint_adjustment = 1
   135  	XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_Y  enum_xdg_positioner_constraint_adjustment = 2
   136  	XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_X   enum_xdg_positioner_constraint_adjustment = 4
   137  	XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y   enum_xdg_positioner_constraint_adjustment = 8
   138  	XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_X enum_xdg_positioner_constraint_adjustment = 16
   139  	XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_Y enum_xdg_positioner_constraint_adjustment = 32
   140  )
   141  
   142  // destroy the xdg_positioner object
   143  //
   144  // Notify the compositor that the xdg_positioner will no longer be used.
   145  func (l *wl_library) xdg_positioner_destroy(xdg_positioner *C.struct_xdg_positioner) {
   146  	C.gamen_xdg_positioner_destroy(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_positioner)
   147  }
   148  
   149  // set the size of the to-be positioned rectangle
   150  //
   151  // Set the size of the surface that is to be positioned with the positioner
   152  // object. The size is in surface-local coordinates and corresponds to the
   153  // window geometry. See xdg_surface.set_window_geometry.
   154  //
   155  // If a zero or negative size is set the invalid_input error is raised.
   156  func (l *wl_library) xdg_positioner_set_size(xdg_positioner *C.struct_xdg_positioner, width, height C.int32_t) {
   157  	C.gamen_xdg_positioner_set_size(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_positioner, width, height)
   158  }
   159  
   160  // set the anchor rectangle within the parent surface
   161  //
   162  // Specify the anchor rectangle within the parent surface that the child
   163  // surface will be placed relative to. The rectangle is relative to the
   164  // window geometry as defined by xdg_surface.set_window_geometry of the
   165  // parent surface.
   166  //
   167  // When the xdg_positioner object is used to position a child surface, the
   168  // anchor rectangle may not extend outside the window geometry of the
   169  // positioned child's parent surface.
   170  //
   171  // If a negative size is set the invalid_input error is raised.
   172  func (l *wl_library) xdg_positioner_set_anchor_rect(xdg_positioner *C.struct_xdg_positioner, x, y, width, height C.int32_t) {
   173  	C.gamen_xdg_positioner_set_anchor_rect(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_positioner, x, y, width, height)
   174  }
   175  
   176  // set anchor rectangle anchor
   177  //
   178  // Defines the anchor point for the anchor rectangle. The specified anchor
   179  // is used derive an anchor point that the child surface will be
   180  // positioned relative to. If a corner anchor is set (e.g. 'top_left' or
   181  // 'bottom_right'), the anchor point will be at the specified corner;
   182  // otherwise, the derived anchor point will be centered on the specified
   183  // edge, or in the center of the anchor rectangle if no edge is specified.
   184  func (l *wl_library) xdg_positioner_set_anchor(xdg_positioner *C.struct_xdg_positioner, anchor enum_xdg_positioner_anchor) {
   185  	C.gamen_xdg_positioner_set_anchor(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_positioner, C.uint32_t(anchor))
   186  }
   187  
   188  // set child surface gravity
   189  //
   190  // Defines in what direction a surface should be positioned, relative to
   191  // the anchor point of the parent surface. If a corner gravity is
   192  // specified (e.g. 'bottom_right' or 'top_left'), then the child surface
   193  // will be placed towards the specified gravity; otherwise, the child
   194  // surface will be centered over the anchor point on any axis that had no
   195  // gravity specified.
   196  func (l *wl_library) xdg_positioner_set_gravity(xdg_positioner *C.struct_xdg_positioner, gravity enum_xdg_positioner_gravity) {
   197  	C.gamen_xdg_positioner_set_gravity(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_positioner, C.uint32_t(gravity))
   198  }
   199  
   200  // set the adjustment to be done when constrained
   201  //
   202  // Specify how the window should be positioned if the originally intended
   203  // position caused the surface to be constrained, meaning at least
   204  // partially outside positioning boundaries set by the compositor. The
   205  // adjustment is set by constructing a bitmask describing the adjustment to
   206  // be made when the surface is constrained on that axis.
   207  //
   208  // If no bit for one axis is set, the compositor will assume that the child
   209  // surface should not change its position on that axis when constrained.
   210  //
   211  // If more than one bit for one axis is set, the order of how adjustments
   212  // are applied is specified in the corresponding adjustment descriptions.
   213  //
   214  // The default adjustment is none.
   215  func (l *wl_library) xdg_positioner_set_constraint_adjustment(xdg_positioner *C.struct_xdg_positioner, constraint_adjustment C.uint32_t) {
   216  	C.gamen_xdg_positioner_set_constraint_adjustment(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_positioner, constraint_adjustment)
   217  }
   218  
   219  // set surface position offset
   220  //
   221  // Specify the surface position offset relative to the position of the
   222  // anchor on the anchor rectangle and the anchor on the surface. For
   223  // example if the anchor of the anchor rectangle is at (x, y), the surface
   224  // has the gravity bottom|right, and the offset is (ox, oy), the calculated
   225  // surface position will be (x + ox, y + oy). The offset position of the
   226  // surface is the one used for constraint testing. See
   227  // set_constraint_adjustment.
   228  //
   229  // An example use case is placing a popup menu on top of a user interface
   230  // element, while aligning the user interface element of the parent surface
   231  // with some user interface element placed somewhere in the popup surface.
   232  func (l *wl_library) xdg_positioner_set_offset(xdg_positioner *C.struct_xdg_positioner, x, y C.int32_t) {
   233  	C.gamen_xdg_positioner_set_offset(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_positioner, x, y)
   234  }
   235  
   236  // continuously reconstrain the surface
   237  //
   238  // When set reactive, the surface is reconstrained if the conditions used
   239  // for constraining changed, e.g. the parent window moved.
   240  //
   241  // If the conditions changed and the popup was reconstrained, an
   242  // xdg_popup.configure event is sent with updated geometry, followed by an
   243  // xdg_surface.configure event.
   244  func (l *wl_library) xdg_positioner_set_reactive(xdg_positioner *C.struct_xdg_positioner) {
   245  	C.gamen_xdg_positioner_set_reactive(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_positioner)
   246  }
   247  
   248  // Set the parent window geometry the compositor should use when
   249  // positioning the popup. The compositor may use this information to
   250  // determine the future state the popup should be constrained using. If
   251  // this doesn't match the dimension of the parent the popup is eventually
   252  // positioned against, the behavior is undefined.
   253  //
   254  // The arguments are given in the surface-local coordinate space.
   255  func (l *wl_library) xdg_positioner_set_parent_size(xdg_positioner *C.struct_xdg_positioner, parent_width, parent_height C.int32_t) {
   256  	C.gamen_xdg_positioner_set_parent_size(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_positioner, parent_width, parent_height)
   257  }
   258  
   259  // set parent configure this is a response to
   260  //
   261  // Set the serial of an xdg_surface.configure event this positioner will be
   262  // used in response to. The compositor may use this information together
   263  // with set_parent_size to determine what future state the popup should be
   264  // constrained using.
   265  func (l *wl_library) xdg_positioner_set_parent_configure(xdg_positioner *C.struct_xdg_positioner, serial C.uint32_t) {
   266  	C.gamen_xdg_positioner_set_parent_configure(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_positioner, serial)
   267  }
   268  
   269  type enum_xdg_surface_error C.uint32_t
   270  
   271  const (
   272  	XDG_SURFACE_ERROR_NOT_CONSTRUCTED     enum_xdg_surface_error = 1
   273  	XDG_SURFACE_ERROR_ALREADY_CONSTRUCTED enum_xdg_surface_error = 2
   274  	XDG_SURFACE_ERROR_UNCONFIGURED_BUFFER enum_xdg_surface_error = 3
   275  )
   276  
   277  func (l *wl_library) xdg_surface_add_listener(xdg_surface *C.struct_xdg_surface, listener *C.struct_xdg_surface_listener, data unsafe.Pointer) C.int {
   278  	return C.gamen_xdg_surface_add_listener(l.wl_proxy_add_listener_handle, xdg_surface, listener, data)
   279  }
   280  
   281  // destroy the xdg_surface
   282  //
   283  // Destroy the xdg_surface object. An xdg_surface must only be destroyed
   284  // after its role object has been destroyed.
   285  func (l *wl_library) xdg_surface_destroy(xdg_surface *C.struct_xdg_surface) {
   286  	C.gamen_xdg_surface_destroy(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_surface)
   287  }
   288  
   289  // assign the xdg_toplevel surface role
   290  //
   291  // This creates an xdg_toplevel object for the given xdg_surface and gives
   292  // the associated wl_surface the xdg_toplevel role.
   293  //
   294  // See the documentation of xdg_toplevel for more details about what an
   295  // xdg_toplevel is and how it is used.
   296  func (l *wl_library) xdg_surface_get_toplevel(xdg_surface *C.struct_xdg_surface) *C.struct_xdg_toplevel {
   297  	return C.gamen_xdg_surface_get_toplevel(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_surface)
   298  }
   299  
   300  // assign the xdg_popup surface role
   301  //
   302  // This creates an xdg_popup object for the given xdg_surface and gives
   303  // the associated wl_surface the xdg_popup role.
   304  //
   305  // If null is passed as a parent, a parent surface must be specified using
   306  // some other protocol, before committing the initial state.
   307  //
   308  // See the documentation of xdg_popup for more details about what an
   309  // xdg_popup is and how it is used.
   310  func (l *wl_library) xdg_surface_get_popup(xdg_surface, parent *C.struct_xdg_surface, positioner *C.struct_xdg_positioner) *C.struct_xdg_popup {
   311  	return C.gamen_xdg_surface_get_popup(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_surface, parent, positioner)
   312  }
   313  
   314  // set the new window geometry
   315  //
   316  // The window geometry of a surface is its "visible bounds" from the
   317  // user's perspective. Client-side decorations often have invisible
   318  // portions like drop-shadows which should be ignored for the
   319  // purposes of aligning, placing and constraining windows.
   320  //
   321  // The window geometry is double buffered, and will be applied at the
   322  // time wl_surface.commit of the corresponding wl_surface is called.
   323  //
   324  // When maintaining a position, the compositor should treat the (x, y)
   325  // coordinate of the window geometry as the top left corner of the window.
   326  // A client changing the (x, y) window geometry coordinate should in
   327  // general not alter the position of the window.
   328  //
   329  // Once the window geometry of the surface is set, it is not possible to
   330  // unset it, and it will remain the same until set_window_geometry is
   331  // called again, even if a new subsurface or buffer is attached.
   332  //
   333  // If never set, the value is the full bounds of the surface,
   334  // including any subsurfaces. This updates dynamically on every
   335  // commit. This unset is meant for extremely simple clients.
   336  //
   337  // The arguments are given in the surface-local coordinate space of
   338  // the wl_surface associated with this xdg_surface.
   339  //
   340  // The width and height must be greater than zero. Setting an invalid size
   341  // will raise an error. When applied, the effective window geometry will be
   342  // the set window geometry clamped to the bounding rectangle of the
   343  // combined geometry of the surface of the xdg_surface and the associated
   344  // subsurfaces.
   345  func (l *wl_library) xdg_surface_set_window_geometry(xdg_surface *C.struct_xdg_surface, x, y, width, height C.int32_t) {
   346  	C.gamen_xdg_surface_set_window_geometry(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_surface, x, y, width, height)
   347  }
   348  
   349  // ack a configure event
   350  //
   351  // When a configure event is received, if a client commits the
   352  // surface in response to the configure event, then the client
   353  // must make an ack_configure request sometime before the commit
   354  // request, passing along the serial of the configure event.
   355  //
   356  // For instance, for toplevel surfaces the compositor might use this
   357  // information to move a surface to the top left only when the client has
   358  // drawn itself for the maximized or fullscreen state.
   359  //
   360  // If the client receives multiple configure events before it
   361  // can respond to one, it only has to ack the last configure event.
   362  //
   363  // A client is not required to commit immediately after sending
   364  // an ack_configure request - it may even ack_configure several times
   365  // before its next surface commit.
   366  //
   367  // A client may send multiple ack_configure requests before committing, but
   368  // only the last request sent before a commit indicates which configure
   369  // event the client really is responding to.
   370  func (l *wl_library) xdg_surface_ack_configure(xdg_surface *C.struct_xdg_surface, serial C.uint32_t) {
   371  	C.gamen_xdg_surface_ack_configure(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_surface, serial)
   372  }
   373  
   374  type enum_xdg_toplevel_error C.uint32_t
   375  
   376  const (
   377  	// provided value is
   378  	// not a valid variant of the resize_edge enum
   379  	XDG_TOPLEVEL_ERROR_INVALID_RESIZE_EDGE enum_xdg_toplevel_error = 0
   380  )
   381  
   382  // These values are used to indicate which edge of a surface
   383  // is being dragged in a resize operation.
   384  type enum_xdg_toplevel_resize_edge C.uint32_t
   385  
   386  const (
   387  	XDG_TOPLEVEL_RESIZE_EDGE_NONE         enum_xdg_toplevel_resize_edge = 0
   388  	XDG_TOPLEVEL_RESIZE_EDGE_TOP          enum_xdg_toplevel_resize_edge = 1
   389  	XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM       enum_xdg_toplevel_resize_edge = 2
   390  	XDG_TOPLEVEL_RESIZE_EDGE_LEFT         enum_xdg_toplevel_resize_edge = 4
   391  	XDG_TOPLEVEL_RESIZE_EDGE_TOP_LEFT     enum_xdg_toplevel_resize_edge = 5
   392  	XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM_LEFT  enum_xdg_toplevel_resize_edge = 6
   393  	XDG_TOPLEVEL_RESIZE_EDGE_RIGHT        enum_xdg_toplevel_resize_edge = 8
   394  	XDG_TOPLEVEL_RESIZE_EDGE_TOP_RIGHT    enum_xdg_toplevel_resize_edge = 9
   395  	XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM_RIGHT enum_xdg_toplevel_resize_edge = 10
   396  )
   397  
   398  // The different state values used on the surface. This is designed for
   399  // state values like maximized, fullscreen. It is paired with the
   400  // configure event to ensure that both the client and the compositor
   401  // setting the state can be synchronized.
   402  //
   403  // States set in this way are double-buffered. They will get applied on
   404  // the next commit.
   405  type enum_xdg_toplevel_state C.uint32_t
   406  
   407  const (
   408  	// the surface is maximized
   409  	XDG_TOPLEVEL_STATE_MAXIMIZED enum_xdg_toplevel_state = 1
   410  	// the surface is fullscreen
   411  	XDG_TOPLEVEL_STATE_FULLSCREEN enum_xdg_toplevel_state = 2
   412  	// the surface is being resized
   413  	XDG_TOPLEVEL_STATE_RESIZING enum_xdg_toplevel_state = 3
   414  	// the surface is now activated
   415  	XDG_TOPLEVEL_STATE_ACTIVATED    enum_xdg_toplevel_state = 4
   416  	XDG_TOPLEVEL_STATE_TILED_LEFT   enum_xdg_toplevel_state = 5
   417  	XDG_TOPLEVEL_STATE_TILED_RIGHT  enum_xdg_toplevel_state = 6
   418  	XDG_TOPLEVEL_STATE_TILED_TOP    enum_xdg_toplevel_state = 7
   419  	XDG_TOPLEVEL_STATE_TILED_BOTTOM enum_xdg_toplevel_state = 8
   420  )
   421  
   422  type enum_xdg_toplevel_wm_capabilities C.uint32_t
   423  
   424  const (
   425  	// show_window_menu is available
   426  	XDG_TOPLEVEL_WM_CAPABILITIES_WINDOW_MENU enum_xdg_toplevel_wm_capabilities = 1
   427  	// set_maximized and unset_maximized are available
   428  	XDG_TOPLEVEL_WM_CAPABILITIES_MAXIMIZE enum_xdg_toplevel_wm_capabilities = 2
   429  	// set_fullscreen and unset_fullscreen are available
   430  	XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN enum_xdg_toplevel_wm_capabilities = 3
   431  	// set_minimized is available
   432  	XDG_TOPLEVEL_WM_CAPABILITIES_MINIMIZE enum_xdg_toplevel_wm_capabilities = 4
   433  )
   434  
   435  func (l *wl_library) xdg_toplevel_add_listener(xdg_toplevel *C.struct_xdg_toplevel, listener *C.struct_xdg_toplevel_listener, data unsafe.Pointer) C.int {
   436  	return C.gamen_xdg_toplevel_add_listener(l.wl_proxy_add_listener_handle, xdg_toplevel, listener, data)
   437  }
   438  
   439  // destroy the xdg_toplevel
   440  //
   441  // This request destroys the role surface and unmaps the surface;
   442  // see "Unmapping" behavior in interface section for details.
   443  func (l *wl_library) xdg_toplevel_destroy(xdg_toplevel *C.struct_xdg_toplevel) {
   444  	C.gamen_xdg_toplevel_destroy(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_toplevel)
   445  }
   446  
   447  // set the parent of this surface
   448  //
   449  // Set the "parent" of this surface. This surface should be stacked
   450  // above the parent surface and all other ancestor surfaces.
   451  //
   452  // Parent surfaces should be set on dialogs, toolboxes, or other
   453  // "auxiliary" surfaces, so that the parent is raised when the dialog
   454  // is raised.
   455  //
   456  // Setting a null parent for a child surface unsets its parent. Setting
   457  // a null parent for a surface which currently has no parent is a no-op.
   458  //
   459  // Only mapped surfaces can have child surfaces. Setting a parent which
   460  // is not mapped is equivalent to setting a null parent. If a surface
   461  // becomes unmapped, its children's parent is set to the parent of
   462  // the now-unmapped surface. If the now-unmapped surface has no parent,
   463  // its children's parent is unset. If the now-unmapped surface becomes
   464  // mapped again, its parent-child relationship is not restored.
   465  func (l *wl_library) xdg_toplevel_set_parent(xdg_toplevel, parent *C.struct_xdg_toplevel) {
   466  	C.gamen_xdg_toplevel_set_parent(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_toplevel, parent)
   467  }
   468  
   469  // set surface title
   470  //
   471  // Set a short title for the surface.
   472  //
   473  // This string may be used to identify the surface in a task bar,
   474  // window list, or other user interface elements provided by the
   475  // compositor.
   476  //
   477  // The string must be encoded in UTF-8.
   478  func (l *wl_library) xdg_toplevel_set_title(xdg_toplevel *C.struct_xdg_toplevel, title *C.char) {
   479  	C.gamen_xdg_toplevel_set_title(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_toplevel, title)
   480  }
   481  
   482  // set application ID
   483  //
   484  // Set an application identifier for the surface.
   485  //
   486  // The app ID identifies the general class of applications to which
   487  // the surface belongs. The compositor can use this to group multiple
   488  // surfaces together, or to determine how to launch a new application.
   489  //
   490  // For D-Bus activatable applications, the app ID is used as the D-Bus
   491  // service name.
   492  //
   493  // The compositor shell will try to group application surfaces together
   494  // by their app ID. As a best practice, it is suggested to select app
   495  // ID's that match the basename of the application's .desktop file.
   496  // For example, "org.freedesktop.FooViewer" where the .desktop file is
   497  // "org.freedesktop.FooViewer.desktop".
   498  //
   499  // Like other properties, a set_app_id request can be sent after the
   500  // xdg_toplevel has been mapped to update the property.
   501  //
   502  // See the desktop-entry specification [0] for more details on
   503  // application identifiers and how they relate to well-known D-Bus
   504  // names and .desktop files.
   505  //
   506  // [0] http://standards.freedesktop.org/desktop-entry-spec/
   507  func (l *wl_library) xdg_toplevel_set_app_id(xdg_toplevel *C.struct_xdg_toplevel, app_id *C.char) {
   508  	C.gamen_xdg_toplevel_set_app_id(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_toplevel, app_id)
   509  }
   510  
   511  // show the window menu
   512  //
   513  // Clients implementing client-side decorations might want to show
   514  // a context menu when right-clicking on the decorations, giving the
   515  // user a menu that they can use to maximize or minimize the window.
   516  //
   517  // This request asks the compositor to pop up such a window menu at
   518  // the given position, relative to the local surface coordinates of
   519  // the parent surface. There are no guarantees as to what menu items
   520  // the window menu contains.
   521  //
   522  // This request must be used in response to some sort of user action
   523  // like a button press, key press, or touch down event.
   524  func (l *wl_library) xdg_toplevel_show_window_menu(xdg_toplevel *C.struct_xdg_toplevel, seat *C.struct_wl_seat, serial C.uint32_t, x, y C.int32_t) {
   525  	C.gamen_xdg_toplevel_show_window_menu(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_toplevel, seat, serial, x, y)
   526  }
   527  
   528  // start an interactive move
   529  //
   530  // Start an interactive, user-driven move of the surface.
   531  //
   532  // This request must be used in response to some sort of user action
   533  // like a button press, key press, or touch down event. The passed
   534  // serial is used to determine the type of interactive move (touch,
   535  // pointer, etc).
   536  //
   537  // The server may ignore move requests depending on the state of
   538  // the surface (e.g. fullscreen or maximized), or if the passed serial
   539  // is no longer valid.
   540  //
   541  // If triggered, the surface will lose the focus of the device
   542  // (wl_pointer, wl_touch, etc) used for the move. It is up to the
   543  // compositor to visually indicate that the move is taking place, such as
   544  // updating a pointer cursor, during the move. There is no guarantee
   545  // that the device focus will return when the move is completed.
   546  func (l *wl_library) xdg_toplevel_move(xdg_toplevel *C.struct_xdg_toplevel, seat *C.struct_wl_seat, serial C.uint32_t) {
   547  	C.gamen_xdg_toplevel_move(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_toplevel, seat, serial)
   548  }
   549  
   550  // start an interactive resize
   551  //
   552  // Start a user-driven, interactive resize of the surface.
   553  //
   554  // This request must be used in response to some sort of user action
   555  // like a button press, key press, or touch down event. The passed
   556  // serial is used to determine the type of interactive resize (touch,
   557  // pointer, etc).
   558  //
   559  // The server may ignore resize requests depending on the state of
   560  // the surface (e.g. fullscreen or maximized).
   561  //
   562  // If triggered, the client will receive configure events with the
   563  // "resize" state enum value and the expected sizes. See the "resize"
   564  // enum value for more details about what is required. The client
   565  // must also acknowledge configure events using "ack_configure". After
   566  // the resize is completed, the client will receive another "configure"
   567  // event without the resize state.
   568  //
   569  // If triggered, the surface also will lose the focus of the device
   570  // (wl_pointer, wl_touch, etc) used for the resize. It is up to the
   571  // compositor to visually indicate that the resize is taking place,
   572  // such as updating a pointer cursor, during the resize. There is no
   573  // guarantee that the device focus will return when the resize is
   574  // completed.
   575  //
   576  // The edges parameter specifies how the surface should be resized, and
   577  // is one of the values of the resize_edge enum. Values not matching
   578  // a variant of the enum will cause a protocol error. The compositor
   579  // may use this information to update the surface position for example
   580  // when dragging the top left corner. The compositor may also use
   581  // this information to adapt its behavior, e.g. choose an appropriate
   582  // cursor image.
   583  func (l *wl_library) xdg_toplevel_resize(xdg_toplevel *C.struct_xdg_toplevel, seat *C.struct_wl_seat, serial C.uint32_t, edges enum_xdg_toplevel_resize_edge) {
   584  	C.gamen_xdg_toplevel_resize(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_toplevel, seat, serial, C.uint32_t(edges))
   585  }
   586  
   587  // set the maximum size
   588  //
   589  // Set a maximum size for the window.
   590  //
   591  // The client can specify a maximum size so that the compositor does
   592  // not try to configure the window beyond this size.
   593  //
   594  // The width and height arguments are in window geometry coordinates.
   595  // See xdg_surface.set_window_geometry.
   596  //
   597  // Values set in this way are double-buffered. They will get applied
   598  // on the next commit.
   599  //
   600  // The compositor can use this information to allow or disallow
   601  // different states like maximize or fullscreen and draw accurate
   602  // animations.
   603  //
   604  // Similarly, a tiling window manager may use this information to
   605  // place and resize client windows in a more effective way.
   606  //
   607  // The client should not rely on the compositor to obey the maximum
   608  // size. The compositor may decide to ignore the values set by the
   609  // client and request a larger size.
   610  //
   611  // If never set, or a value of zero in the request, means that the
   612  // client has no expected maximum size in the given dimension.
   613  // As a result, a client wishing to reset the maximum size
   614  // to an unspecified state can use zero for width and height in the
   615  // request.
   616  //
   617  // Requesting a maximum size to be smaller than the minimum size of
   618  // a surface is illegal and will result in a protocol error.
   619  //
   620  // The width and height must be greater than or equal to zero. Using
   621  // strictly negative values for width and height will result in a
   622  // protocol error.
   623  func (l *wl_library) xdg_toplevel_set_max_size(xdg_toplevel *C.struct_xdg_toplevel, width, height C.int32_t) {
   624  	C.gamen_xdg_toplevel_set_max_size(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_toplevel, width, height)
   625  }
   626  
   627  // set the minimum size
   628  //
   629  // Set a minimum size for the window.
   630  //
   631  // The client can specify a minimum size so that the compositor does
   632  // not try to configure the window below this size.
   633  //
   634  // The width and height arguments are in window geometry coordinates.
   635  // See xdg_surface.set_window_geometry.
   636  //
   637  // Values set in this way are double-buffered. They will get applied
   638  // on the next commit.
   639  //
   640  // The compositor can use this information to allow or disallow
   641  // different states like maximize or fullscreen and draw accurate
   642  // animations.
   643  //
   644  // Similarly, a tiling window manager may use this information to
   645  // place and resize client windows in a more effective way.
   646  //
   647  // The client should not rely on the compositor to obey the minimum
   648  // size. The compositor may decide to ignore the values set by the
   649  // client and request a smaller size.
   650  //
   651  // If never set, or a value of zero in the request, means that the
   652  // client has no expected minimum size in the given dimension.
   653  // As a result, a client wishing to reset the minimum size
   654  // to an unspecified state can use zero for width and height in the
   655  // request.
   656  //
   657  // Requesting a minimum size to be larger than the maximum size of
   658  // a surface is illegal and will result in a protocol error.
   659  //
   660  // The width and height must be greater than or equal to zero. Using
   661  // strictly negative values for width and height will result in a
   662  // protocol error.
   663  func (l *wl_library) xdg_toplevel_set_min_size(xdg_toplevel *C.struct_xdg_toplevel, width, height C.int32_t) {
   664  	C.gamen_xdg_toplevel_set_min_size(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_toplevel, width, height)
   665  }
   666  
   667  // maximize the window
   668  //
   669  // Maximize the surface.
   670  //
   671  // After requesting that the surface should be maximized, the compositor
   672  // will respond by emitting a configure event. Whether this configure
   673  // actually sets the window maximized is subject to compositor policies.
   674  // The client must then update its content, drawing in the configured
   675  // state. The client must also acknowledge the configure when committing
   676  // the new content (see ack_configure).
   677  //
   678  // It is up to the compositor to decide how and where to maximize the
   679  // surface, for example which output and what region of the screen should
   680  // be used.
   681  //
   682  // If the surface was already maximized, the compositor will still emit
   683  // a configure event with the "maximized" state.
   684  //
   685  // If the surface is in a fullscreen state, this request has no direct
   686  // effect. It may alter the state the surface is returned to when
   687  // unmaximized unless overridden by the compositor.
   688  func (l *wl_library) xdg_toplevel_set_maximized(xdg_toplevel *C.struct_xdg_toplevel) {
   689  	C.gamen_xdg_toplevel_set_maximized(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_toplevel)
   690  }
   691  
   692  // unmaximize the window
   693  //
   694  // Unmaximize the surface.
   695  //
   696  // After requesting that the surface should be unmaximized, the compositor
   697  // will respond by emitting a configure event. Whether this actually
   698  // un-maximizes the window is subject to compositor policies.
   699  // If available and applicable, the compositor will include the window
   700  // geometry dimensions the window had prior to being maximized in the
   701  // configure event. The client must then update its content, drawing it in
   702  // the configured state. The client must also acknowledge the configure
   703  // when committing the new content (see ack_configure).
   704  //
   705  // It is up to the compositor to position the surface after it was
   706  // unmaximized; usually the position the surface had before maximizing, if
   707  // applicable.
   708  //
   709  // If the surface was already not maximized, the compositor will still
   710  // emit a configure event without the "maximized" state.
   711  //
   712  // If the surface is in a fullscreen state, this request has no direct
   713  // effect. It may alter the state the surface is returned to when
   714  // unmaximized unless overridden by the compositor.
   715  func (l *wl_library) xdg_toplevel_unset_maximized(xdg_toplevel *C.struct_xdg_toplevel) {
   716  	C.gamen_xdg_toplevel_unset_maximized(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_toplevel)
   717  }
   718  
   719  // set the window as fullscreen on an output
   720  //
   721  // Make the surface fullscreen.
   722  //
   723  // After requesting that the surface should be fullscreened, the
   724  // compositor will respond by emitting a configure event. Whether the
   725  // client is actually put into a fullscreen state is subject to compositor
   726  // policies. The client must also acknowledge the configure when
   727  // committing the new content (see ack_configure).
   728  //
   729  // The output passed by the request indicates the client's preference as
   730  // to which display it should be set fullscreen on. If this value is NULL,
   731  // it's up to the compositor to choose which display will be used to map
   732  // this surface.
   733  //
   734  // If the surface doesn't cover the whole output, the compositor will
   735  // position the surface in the center of the output and compensate with
   736  // with border fill covering the rest of the output. The content of the
   737  // border fill is undefined, but should be assumed to be in some way that
   738  // attempts to blend into the surrounding area (e.g. solid black).
   739  //
   740  // If the fullscreened surface is not opaque, the compositor must make
   741  // sure that other screen content not part of the same surface tree (made
   742  // up of subsurfaces, popups or similarly coupled surfaces) are not
   743  // visible below the fullscreened surface.
   744  func (l *wl_library) xdg_toplevel_set_fullscreen(xdg_toplevel *C.struct_xdg_toplevel, output *C.struct_wl_output) {
   745  	C.gamen_xdg_toplevel_set_fullscreen(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_toplevel, output)
   746  }
   747  
   748  // unset the window as fullscreen
   749  //
   750  // Make the surface no longer fullscreen.
   751  //
   752  // After requesting that the surface should be unfullscreened, the
   753  // compositor will respond by emitting a configure event.
   754  // Whether this actually removes the fullscreen state of the client is
   755  // subject to compositor policies.
   756  //
   757  // Making a surface unfullscreen sets states for the surface based on the following:
   758  // * the state(s) it may have had before becoming fullscreen
   759  // * any state(s) decided by the compositor
   760  // * any state(s) requested by the client while the surface was fullscreen
   761  //
   762  // The compositor may include the previous window geometry dimensions in
   763  // the configure event, if applicable.
   764  //
   765  // The client must also acknowledge the configure when committing the new
   766  // content (see ack_configure).
   767  func (l *wl_library) xdg_toplevel_unset_fullscreen(xdg_toplevel *C.struct_xdg_toplevel) {
   768  	C.gamen_xdg_toplevel_unset_fullscreen(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_toplevel)
   769  }
   770  
   771  // set the window as minimized
   772  //
   773  // Request that the compositor minimize your surface. There is no
   774  // way to know if the surface is currently minimized, nor is there
   775  // any way to unset minimization on this surface.
   776  //
   777  // If you are looking to throttle redrawing when minimized, please
   778  // instead use the wl_surface.frame event for this, as this will
   779  // also work with live previews on windows in Alt-Tab, Expose or
   780  // similar compositor features.
   781  func (l *wl_library) xdg_toplevel_set_minimized(xdg_toplevel *C.struct_xdg_toplevel) {
   782  	C.gamen_xdg_toplevel_set_minimized(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_toplevel)
   783  }
   784  
   785  type enum_xdg_popup_error C.uint32_t
   786  
   787  const (
   788  	// tried to grab after being mapped
   789  	XDG_POPUP_ERROR_INVALID_GRAB enum_xdg_popup_error = 0
   790  )
   791  
   792  func (l *wl_library) xdg_popup_add_listener(xdg_popup *C.struct_xdg_popup, listener *C.struct_xdg_popup_listener, data unsafe.Pointer) C.int {
   793  	return C.gamen_xdg_popup_add_listener(l.wl_proxy_add_listener_handle, xdg_popup, listener, data)
   794  }
   795  
   796  // remove xdg_popup interface
   797  //
   798  // This destroys the popup. Explicitly destroying the xdg_popup
   799  // object will also dismiss the popup, and unmap the surface.
   800  //
   801  // If this xdg_popup is not the "topmost" popup, a protocol error
   802  // will be sent.
   803  func (l *wl_library) xdg_popup_destroy(xdg_popup *C.struct_xdg_popup) {
   804  	C.gamen_xdg_popup_destroy(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_popup)
   805  }
   806  
   807  // make the popup take an explicit grab
   808  //
   809  // This request makes the created popup take an explicit grab. An explicit
   810  // grab will be dismissed when the user dismisses the popup, or when the
   811  // client destroys the xdg_popup. This can be done by the user clicking
   812  // outside the surface, using the keyboard, or even locking the screen
   813  // through closing the lid or a timeout.
   814  //
   815  // If the compositor denies the grab, the popup will be immediately
   816  // dismissed.
   817  //
   818  // This request must be used in response to some sort of user action like a
   819  // button press, key press, or touch down event. The serial number of the
   820  // event should be passed as 'serial'.
   821  //
   822  // The parent of a grabbing popup must either be an xdg_toplevel surface or
   823  // another xdg_popup with an explicit grab. If the parent is another
   824  // xdg_popup it means that the popups are nested, with this popup now being
   825  // the topmost popup.
   826  //
   827  // Nested popups must be destroyed in the reverse order they were created
   828  // in, e.g. the only popup you are allowed to destroy at all times is the
   829  // topmost one.
   830  //
   831  // When compositors choose to dismiss a popup, they may dismiss every
   832  // nested grabbing popup as well. When a compositor dismisses popups, it
   833  // will follow the same dismissing order as required from the client.
   834  //
   835  // If the topmost grabbing popup is destroyed, the grab will be returned to
   836  // the parent of the popup, if that parent previously had an explicit grab.
   837  //
   838  // If the parent is a grabbing popup which has already been dismissed, this
   839  // popup will be immediately dismissed. If the parent is a popup that did
   840  // not take an explicit grab, an error will be raised.
   841  //
   842  // During a popup grab, the client owning the grab will receive pointer
   843  // and touch events for all their surfaces as normal (similar to an
   844  // "owner-events" grab in X11 parlance), while the top most grabbing popup
   845  // will always have keyboard focus.
   846  func (l *wl_library) xdg_popup_grab(xdg_popup *C.struct_xdg_popup, seat *C.struct_wl_seat, serial C.uint32_t) {
   847  	C.gamen_xdg_popup_grab(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_popup, seat, serial)
   848  }
   849  
   850  // recalculate the popup's location
   851  //
   852  // Reposition an already-mapped popup. The popup will be placed given the
   853  // details in the passed xdg_positioner object, and a
   854  // xdg_popup.repositioned followed by xdg_popup.configure and
   855  // xdg_surface.configure will be emitted in response. Any parameters set
   856  // by the previous positioner will be discarded.
   857  //
   858  // The passed token will be sent in the corresponding
   859  // xdg_popup.repositioned event. The new popup position will not take
   860  // effect until the corresponding configure event is acknowledged by the
   861  // client. See xdg_popup.repositioned for details. The token itself is
   862  // opaque, and has no other special meaning.
   863  //
   864  // If multiple reposition requests are sent, the compositor may skip all
   865  // but the last one.
   866  //
   867  // If the popup is repositioned in response to a configure event for its
   868  // parent, the client should send an xdg_positioner.set_parent_configure
   869  // and possibly an xdg_positioner.set_parent_size request to allow the
   870  // compositor to properly constrain the popup.
   871  //
   872  // If the popup is repositioned together with a parent that is being
   873  // resized, but not in response to a configure event, the client should
   874  // send an xdg_positioner.set_parent_size request.
   875  func (l *wl_library) xdg_popup_reposition(xdg_popup *C.struct_xdg_popup, positioner *C.struct_xdg_positioner, token C.uint32_t) {
   876  	C.gamen_xdg_popup_reposition(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, xdg_popup, positioner, token)
   877  }