func (i *Surface) Destroy() error {
	defer i.Context().Unregister(i)
	const opcode = 0
	const rLen = 8
	r := make([]byte, rLen)
	l := 0
	client.PutUint32(r[l:4], i.ID())
	l += 4
	client.PutUint32(r[l:l+4], uint32(rLen<<16|opcode&0x0000ffff))
	l += 4
	err := i.Context().WriteMsg(r, nil)
	return err
}
Destroy : destroy the xdg_surface

Destroy the xdg_surface object. An xdg_surface must only be destroyed
after its role object has been destroyed.
package xdg_shell
import (
	"reflect"
	"github.com/rajveermalviya/go-wayland/wayland/client"
)
type Shell struct {
	client.BaseProxy
	pingHandlers []ShellPingHandlerFunc
}
func NewShell(ctx *client.Context) *Shell {
	zxdgShellV6 := &Shell{}
	ctx.Register(zxdgShellV6)
	return zxdgShellV6
}
func (i *Shell) Destroy() error {
	defer i.Context().Unregister(i)
	const opcode = 0
	const rLen = 8
	r := make([]byte, rLen)
	l := 0
	client.PutUint32(r[l:4], i.ID())
	l += 4
	client.PutUint32(r[l:l+4], uint32(rLen<<16|opcode&0x0000ffff))
	l += 4
	err := i.Context().WriteMsg(r, nil)
	return err
}
func (i *Shell) CreatePositioner() (*Positioner, error) {
	id := NewPositioner(i.Context())
	const opcode = 1
	const rLen = 8 + 4
	r := make([]byte, rLen)
	l := 0
	client.PutUint32(r[l:4], i.ID())
	l += 4
	client.PutUint32(r[l:l+4], uint32(rLen<<16|opcode&0x0000ffff))
	l += 4
	client.PutUint32(r[l:l+4], id.ID())
	l += 4
	err := i.Context().WriteMsg(r, nil)
	return id, err
}
func (i *Shell) GetXdgSurface(surface *client.Surface) (*Surface, error) {
	id := NewSurface(i.Context())
	const opcode = 2
	const rLen = 8 + 4 + 4
	r := make([]byte, rLen)
	l := 0
	client.PutUint32(r[l:4], i.ID())
	l += 4
	client.PutUint32(r[l:l+4], uint32(rLen<<16|opcode&0x0000ffff))
	l += 4
	client.PutUint32(r[l:l+4], id.ID())
	l += 4
	client.PutUint32(r[l:l+4], surface.ID())
	l += 4
	err := i.Context().WriteMsg(r, nil)
	return id, err
}
func (i *Shell) Pong(serial uint32) error {
	const opcode = 3
	const rLen = 8 + 4
	r := make([]byte, rLen)
	l := 0
	client.PutUint32(r[l:4], i.ID())
	l += 4
	client.PutUint32(r[l:l+4], uint32(rLen<<16|opcode&0x0000ffff))
	l += 4
	client.PutUint32(r[l:l+4], uint32(serial))
	l += 4
	err := i.Context().WriteMsg(r, nil)
	return err
}
type ShellError uint32
const (
	ShellErrorRole ShellError = 0
	ShellErrorDefunctSurfaces ShellError = 1
	ShellErrorNotTheTopmostPopup ShellError = 2
	ShellErrorInvalidPopupParent ShellError = 3
	ShellErrorInvalidSurfaceState ShellError = 4
	ShellErrorInvalidPositioner ShellError = 5
)
func (e ShellError) Name() string {
	switch e {
	case ShellErrorRole:
		return "role"
	case ShellErrorDefunctSurfaces:
		return "defunct_surfaces"
	case ShellErrorNotTheTopmostPopup:
		return "not_the_topmost_popup"
	case ShellErrorInvalidPopupParent:
		return "invalid_popup_parent"
	case ShellErrorInvalidSurfaceState:
		return "invalid_surface_state"
	case ShellErrorInvalidPositioner:
		return "invalid_positioner"
	default:
		return ""
	}
}
func (e ShellError) Value() string {
	switch e {
	case ShellErrorRole:
		return "0"
	case ShellErrorDefunctSurfaces:
		return "1"
	case ShellErrorNotTheTopmostPopup:
		return "2"
	case ShellErrorInvalidPopupParent:
		return "3"
	case ShellErrorInvalidSurfaceState:
		return "4"
	case ShellErrorInvalidPositioner:
		return "5"
	default:
		return ""
	}
}
func (e ShellError) String() string {
	return e.Name() + "=" + e.Value()
}
type ShellPingEvent struct {
	Serial uint32
}
type ShellPingHandlerFunc func(ShellPingEvent)
func (i *Shell) AddPingHandler(f ShellPingHandlerFunc) {
	if f == nil {
		return
	}
	i.pingHandlers = append(i.pingHandlers, f)
}
func (i *Shell) RemovePingHandler(f ShellPingHandlerFunc) {
	for j, e := range i.pingHandlers {
		if reflect.ValueOf(e).Pointer() == reflect.ValueOf(f).Pointer() {
			i.pingHandlers = append(i.pingHandlers[:j], i.pingHandlers[j+1:]...)
			return
		}
	}
}
func (i *Shell) Dispatch(opcode uint16, fd uintptr, data []byte) {
	switch opcode {
	case 0:
		if len(i.pingHandlers) == 0 {
			return
		}
		var e ShellPingEvent
		l := 0
		e.Serial = client.Uint32(data[l : l+4])
		l += 4
		for _, f := range i.pingHandlers {
			f(e)
		}
	}
}
type Positioner struct {
	client.BaseProxy
}
func NewPositioner(ctx *client.Context) *Positioner {
	zxdgPositionerV6 := &Positioner{}
	ctx.Register(zxdgPositionerV6)
	return zxdgPositionerV6
}
func (i *Positioner) Destroy() error {
	defer i.Context().Unregister(i)
	const opcode = 0
	const rLen = 8
	r := make([]byte, rLen)
	l := 0
	client.PutUint32(r[l:4], i.ID())
	l += 4
	client.PutUint32(r[l:l+4], uint32(rLen<<16|opcode&0x0000ffff))
	l += 4
	err := i.Context().WriteMsg(r, nil)
	return err
}
func (i *Positioner) SetSize(width, height int32) error {
	const opcode = 1
	const rLen = 8 + 4 + 4
	r := make([]byte, rLen)
	l := 0
	client.PutUint32(r[l:4], i.ID())
	l += 4
	client.PutUint32(r[l:l+4], uint32(rLen<<16|opcode&0x0000ffff))
	l += 4
	client.PutUint32(r[l:l+4], uint32(width))
	l += 4
	client.PutUint32(r[l:l+4], uint32(height))
	l += 4
	err := i.Context().WriteMsg(r, nil)
	return err
}
func (i *Positioner) SetAnchorRect(x, y, width, height int32) error {
	const opcode = 2
	const rLen = 8 + 4 + 4 + 4 + 4
	r := make([]byte, rLen)
	l := 0
	client.PutUint32(r[l:4], i.ID())
	l += 4
	client.PutUint32(r[l:l+4], uint32(rLen<<16|opcode&0x0000ffff))
	l += 4
	client.PutUint32(r[l:l+4], uint32(x))
	l += 4
	client.PutUint32(r[l:l+4], uint32(y))
	l += 4
	client.PutUint32(r[l:l+4], uint32(width))
	l += 4
	client.PutUint32(r[l:l+4], uint32(height))
	l += 4
	err := i.Context().WriteMsg(r, nil)
	return err
}
func (i *Positioner) SetAnchor(anchor uint32) error {
	const opcode = 3
	const rLen = 8 + 4
	r := make([]byte, rLen)
	l := 0
	client.PutUint32(r[l:4], i.ID())
	l += 4
	client.PutUint32(r[l:l+4], uint32(rLen<<16|opcode&0x0000ffff))
	l += 4
	client.PutUint32(r[l:l+4], uint32(anchor))
	l += 4
	err := i.Context().WriteMsg(r, nil)
	return err
}
func (i *Positioner) SetGravity(gravity uint32) error {
	const opcode = 4
	const rLen = 8 + 4
	r := make([]byte, rLen)
	l := 0
	client.PutUint32(r[l:4], i.ID())
	l += 4
	client.PutUint32(r[l:l+4], uint32(rLen<<16|opcode&0x0000ffff))
	l += 4
	client.PutUint32(r[l:l+4], uint32(gravity))
	l += 4
	err := i.Context().WriteMsg(r, nil)
	return err
}
func (i *Positioner) SetConstraintAdjustment(constraintAdjustment uint32) error {
	const opcode = 5
	const rLen = 8 + 4
	r := make([]byte, rLen)
	l := 0
	client.PutUint32(r[l:4], i.ID())
	l += 4
	client.PutUint32(r[l:l+4], uint32(rLen<<16|opcode&0x0000ffff))
	l += 4
	client.PutUint32(r[l:l+4], uint32(constraintAdjustment))
	l += 4
	err := i.Context().WriteMsg(r, nil)
	return err
}
func (i *Positioner) SetOffset(x, y int32) error {
	const opcode = 6
	const rLen = 8 + 4 + 4
	r := make([]byte, rLen)
	l := 0
	client.PutUint32(r[l:4], i.ID())
	l += 4
	client.PutUint32(r[l:l+4], uint32(rLen<<16|opcode&0x0000ffff))
	l += 4
	client.PutUint32(r[l:l+4], uint32(x))
	l += 4
	client.PutUint32(r[l:l+4], uint32(y))
	l += 4
	err := i.Context().WriteMsg(r, nil)
	return err
}
type PositionerError uint32
const (
	PositionerErrorInvalidInput PositionerError = 0
)
func (e PositionerError) Name() string {
	switch e {
	case PositionerErrorInvalidInput:
		return "invalid_input"
	default:
		return ""
	}
}
func (e PositionerError) Value() string {
	switch e {
	case PositionerErrorInvalidInput:
		return "0"
	default:
		return ""
	}
}
func (e PositionerError) String() string {
	return e.Name() + "=" + e.Value()
}
type PositionerAnchor uint32
const (
	PositionerAnchorNone PositionerAnchor = 0
	PositionerAnchorTop PositionerAnchor = 1
	PositionerAnchorBottom PositionerAnchor = 2
	PositionerAnchorLeft PositionerAnchor = 4
	PositionerAnchorRight PositionerAnchor = 8
)
func (e PositionerAnchor) Name() string {
	switch e {
	case PositionerAnchorNone:
		return "none"
	case PositionerAnchorTop:
		return "top"
	case PositionerAnchorBottom:
		return "bottom"
	case PositionerAnchorLeft:
		return "left"
	case PositionerAnchorRight:
		return "right"
	default:
		return ""
	}
}
func (e PositionerAnchor) Value() string {
	switch e {
	case PositionerAnchorNone:
		return "0"
	case PositionerAnchorTop:
		return "1"
	case PositionerAnchorBottom:
		return "2"
	case PositionerAnchorLeft:
		return "4"
	case PositionerAnchorRight:
		return "8"
	default:
		return ""
	}
}
func (e PositionerAnchor) String() string {
	return e.Name() + "=" + e.Value()
}
type PositionerGravity uint32
const (
	PositionerGravityNone PositionerGravity = 0
	PositionerGravityTop PositionerGravity = 1
	PositionerGravityBottom PositionerGravity = 2
	PositionerGravityLeft PositionerGravity = 4
	PositionerGravityRight PositionerGravity = 8
)
func (e PositionerGravity) Name() string {
	switch e {
	case PositionerGravityNone:
		return "none"
	case PositionerGravityTop:
		return "top"
	case PositionerGravityBottom:
		return "bottom"
	case PositionerGravityLeft:
		return "left"
	case PositionerGravityRight:
		return "right"
	default:
		return ""
	}
}
func (e PositionerGravity) Value() string {
	switch e {
	case PositionerGravityNone:
		return "0"
	case PositionerGravityTop:
		return "1"
	case PositionerGravityBottom:
		return "2"
	case PositionerGravityLeft:
		return "4"
	case PositionerGravityRight:
		return "8"
	default:
		return ""
	}
}
func (e PositionerGravity) String() string {
	return e.Name() + "=" + e.Value()
}
type PositionerConstraintAdjustment uint32
const (
	PositionerConstraintAdjustmentNone    PositionerConstraintAdjustment = 0
	PositionerConstraintAdjustmentSlideX  PositionerConstraintAdjustment = 1
	PositionerConstraintAdjustmentSlideY  PositionerConstraintAdjustment = 2
	PositionerConstraintAdjustmentFlipX   PositionerConstraintAdjustment = 4
	PositionerConstraintAdjustmentFlipY   PositionerConstraintAdjustment = 8
	PositionerConstraintAdjustmentResizeX PositionerConstraintAdjustment = 16
	PositionerConstraintAdjustmentResizeY PositionerConstraintAdjustment = 32
)
func (e PositionerConstraintAdjustment) Name() string {
	switch e {
	case PositionerConstraintAdjustmentNone:
		return "none"
	case PositionerConstraintAdjustmentSlideX:
		return "slide_x"
	case PositionerConstraintAdjustmentSlideY:
		return "slide_y"
	case PositionerConstraintAdjustmentFlipX:
		return "flip_x"
	case PositionerConstraintAdjustmentFlipY:
		return "flip_y"
	case PositionerConstraintAdjustmentResizeX:
		return "resize_x"
	case PositionerConstraintAdjustmentResizeY:
		return "resize_y"
	default:
		return ""
	}
}
func (e PositionerConstraintAdjustment) Value() string {
	switch e {
	case PositionerConstraintAdjustmentNone:
		return "0"
	case PositionerConstraintAdjustmentSlideX:
		return "1"
	case PositionerConstraintAdjustmentSlideY:
		return "2"
	case PositionerConstraintAdjustmentFlipX:
		return "4"
	case PositionerConstraintAdjustmentFlipY:
		return "8"
	case PositionerConstraintAdjustmentResizeX:
		return "16"
	case PositionerConstraintAdjustmentResizeY:
		return "32"
	default:
		return ""
	}
}
func (e PositionerConstraintAdjustment) String() string {
	return e.Name() + "=" + e.Value()
}
type Surface struct {
	client.BaseProxy
	configureHandlers []SurfaceConfigureHandlerFunc
}
func NewSurface(ctx *client.Context) *Surface {
	zxdgSurfaceV6 := &Surface{}
	ctx.Register(zxdgSurfaceV6)
	return zxdgSurfaceV6
}