// Code generated by wlbgen. DO NOT EDIT. // Protocol: xdg_system_bell_v1 // Source: xdg-system-bell-v1.xml // Upstream protocol copyright and license: // Copyright © 2016, 2023 Red Hat // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice (including the next // paragraph) shall be included in all copies or substantial portions of the // Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. package xdgsystembell import ( cross_wl_surface "github.com/bnema/go-wayland-bindings/client/wayland" "github.com/bnema/wlturbo/wl" ) // XdgSystemBellInterface is the protocol interface name. const XdgSystemBellInterface = "xdg_system_bell_v1" // XdgSystemBell is the generated binding for xdg_system_bell_v1 version 1. type XdgSystemBell struct { wl.BaseProxy } // NewXdgSystemBell returns an unbound XdgSystemBell. func NewXdgSystemBell(ctx *wl.Context) *XdgSystemBell { obj := &XdgSystemBell{} obj.SetContext(ctx) ctx.Register(obj) return obj } // Notify that the object will no longer be used. func (o *XdgSystemBell) Destroy() error { if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 0, Name: "xdg_system_bell_v1.destroy", Destructor: true}); err != nil { return err } return nil } // This requests rings the system bell on behalf of a client. How ringing the bell is implemented is up to the compositor. It may be an audible sound, a visual feedback of some kind, or any other thing including nothing. The passed surface should correspond to a toplevel like surface role, or be null, meaning the client doesn't have a particular toplevel it wants to associate the bell ringing with. See the xdg-shell protocol extension for a toplevel like surface role. func (o *XdgSystemBell) Ring(surface *cross_wl_surface.Surface) error { var arg0 wl.Object if surface != nil { arg0 = surface } if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 1, Name: "xdg_system_bell_v1.ring"}, wl.ArgObject(arg0)); err != nil { return err } return nil } // EventSignature returns the declared event argument types in wire order. func (o *XdgSystemBell) EventSignature(opcode uint16) (string, bool) { switch opcode { default: return "", false } } // Dispatch decodes one event on xdg_system_bell_v1 and calls the registered handlers. func (o *XdgSystemBell) Dispatch(event *wl.Event) { switch event.Opcode { default: } }