// Code generated by wlbgen. DO NOT EDIT. // Protocol: wlr_input_inhibit_unstable_v1 // Source: wlr-input-inhibitor-unstable-v1.xml // Upstream protocol copyright and license: // Copyright © 2018 Drew DeVault // // Permission to use, copy, modify, distribute, and sell this // software and its documentation for any purpose is hereby granted // without fee, provided that the above copyright notice appear in // all copies and that both that copyright notice and this permission // notice appear in supporting documentation, and that the name of // the copyright holders not be used in advertising or publicity // pertaining to distribution of the software without specific, // written prior permission. The copyright holders make no // representations about the suitability of this software for any // purpose. It is provided "as is" without express or implied // warranty. // // THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS // SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND // FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY // SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN // AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, // ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF // THIS SOFTWARE. package wlrinputinhibitor import ( "github.com/bnema/wlturbo/wl" ) // ERROR_ALREADY_INHIBITED is the error already_inhibited value. const ERROR_ALREADY_INHIBITED = 0 // InputInhibitManagerInterface is the protocol interface name. const InputInhibitManagerInterface = "zwlr_input_inhibit_manager_v1" // InputInhibitManager is the generated binding for zwlr_input_inhibit_manager_v1 version 1. type InputInhibitManager struct { wl.BaseProxy } // NewInputInhibitManager returns an unbound InputInhibitManager. func NewInputInhibitManager(ctx *wl.Context) *InputInhibitManager { obj := &InputInhibitManager{} obj.SetContext(ctx) ctx.Register(obj) return obj } // Activates the input inhibitor. As long as the inhibitor is active, the compositor will not send input events to other clients. func (o *InputInhibitManager) GetInhibitor() (*InputInhibitor, error) { child := &InputInhibitor{} child.SetContext(o.Context()) if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 0, Name: "zwlr_input_inhibit_manager_v1.get_inhibitor", Child: child}, wl.ArgObject(child)); err != nil { return nil, err } return child, nil } // EventSignature returns the declared event argument types in wire order. func (o *InputInhibitManager) EventSignature(opcode uint16) (string, bool) { switch opcode { default: return "", false } } // Dispatch decodes one event on zwlr_input_inhibit_manager_v1 and calls the registered handlers. func (o *InputInhibitManager) Dispatch(event *wl.Event) { switch event.Opcode { default: } } // InputInhibitorInterface is the protocol interface name. const InputInhibitorInterface = "zwlr_input_inhibitor_v1" // InputInhibitor is the generated binding for zwlr_input_inhibitor_v1 version 1. type InputInhibitor struct { wl.BaseProxy } // NewInputInhibitor returns an unbound InputInhibitor. func NewInputInhibitor(ctx *wl.Context) *InputInhibitor { obj := &InputInhibitor{} obj.SetContext(ctx) ctx.Register(obj) return obj } // Destroy the inhibitor and allow other clients to receive input. func (o *InputInhibitor) Destroy() error { if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 0, Name: "zwlr_input_inhibitor_v1.destroy", Destructor: true}); err != nil { return err } return nil } // EventSignature returns the declared event argument types in wire order. func (o *InputInhibitor) EventSignature(opcode uint16) (string, bool) { switch opcode { default: return "", false } } // Dispatch decodes one event on zwlr_input_inhibitor_v1 and calls the registered handlers. func (o *InputInhibitor) Dispatch(event *wl.Event) { switch event.Opcode { default: } }