// Code generated by wlbgen. DO NOT EDIT. // Protocol: ext_image_capture_source_v1 // Source: ext-image-capture-source-v1.xml // Upstream protocol copyright and license: // Copyright © 2022 Andri Yngvason // Copyright © 2024 Simon Ser // // 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 extimagecapturesource import ( cross_ext_foreign_toplevel_handle_v1 "github.com/bnema/go-wayland-bindings/client/extforeigntoplevellist" cross_wl_output "github.com/bnema/go-wayland-bindings/client/wayland" "github.com/bnema/wlturbo/wl" ) // ExtImageCaptureSourceInterface is the protocol interface name. const ExtImageCaptureSourceInterface = "ext_image_capture_source_v1" // ExtImageCaptureSource is the generated binding for ext_image_capture_source_v1 version 1. type ExtImageCaptureSource struct { wl.BaseProxy } // NewExtImageCaptureSource returns an unbound ExtImageCaptureSource. func NewExtImageCaptureSource(ctx *wl.Context) *ExtImageCaptureSource { obj := &ExtImageCaptureSource{} obj.SetContext(ctx) ctx.Register(obj) return obj } // Destroys the image capture source. This request may be sent at any time by the client. func (o *ExtImageCaptureSource) Destroy() error { if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 0, Name: "ext_image_capture_source_v1.destroy", Destructor: true}); err != nil { return err } return nil } // EventSignature returns the declared event argument types in wire order. func (o *ExtImageCaptureSource) EventSignature(opcode uint16) (string, bool) { switch opcode { default: return "", false } } // Dispatch decodes one event on ext_image_capture_source_v1 and calls the registered handlers. func (o *ExtImageCaptureSource) Dispatch(event *wl.Event) { switch event.Opcode { default: } } // ExtOutputImageCaptureSourceManagerInterface is the protocol interface name. const ExtOutputImageCaptureSourceManagerInterface = "ext_output_image_capture_source_manager_v1" // ExtOutputImageCaptureSourceManager is the generated binding for ext_output_image_capture_source_manager_v1 version 1. type ExtOutputImageCaptureSourceManager struct { wl.BaseProxy } // NewExtOutputImageCaptureSourceManager returns an unbound ExtOutputImageCaptureSourceManager. func NewExtOutputImageCaptureSourceManager(ctx *wl.Context) *ExtOutputImageCaptureSourceManager { obj := &ExtOutputImageCaptureSourceManager{} obj.SetContext(ctx) ctx.Register(obj) return obj } // Creates a source object for an output. Images captured from this source will show the same content as the output. Some elements may be omitted, such as cursors and overlays that have been marked as transparent to capturing. func (o *ExtOutputImageCaptureSourceManager) CreateSource(output *cross_wl_output.Output) (*ExtImageCaptureSource, error) { var arg1 wl.Object if output != nil { arg1 = output } child := &ExtImageCaptureSource{} child.SetContext(o.Context()) if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 0, Name: "ext_output_image_capture_source_manager_v1.create_source", Child: child}, wl.ArgObject(child), wl.ArgObject(arg1)); err != nil { return nil, err } return child, nil } // Destroys the manager. This request may be sent at any time by the client and objects created by the manager will remain valid after its destruction. func (o *ExtOutputImageCaptureSourceManager) Destroy() error { if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 1, Name: "ext_output_image_capture_source_manager_v1.destroy", Destructor: true}); err != nil { return err } return nil } // EventSignature returns the declared event argument types in wire order. func (o *ExtOutputImageCaptureSourceManager) EventSignature(opcode uint16) (string, bool) { switch opcode { default: return "", false } } // Dispatch decodes one event on ext_output_image_capture_source_manager_v1 and calls the registered handlers. func (o *ExtOutputImageCaptureSourceManager) Dispatch(event *wl.Event) { switch event.Opcode { default: } } // ExtForeignToplevelImageCaptureSourceManagerInterface is the protocol interface name. const ExtForeignToplevelImageCaptureSourceManagerInterface = "ext_foreign_toplevel_image_capture_source_manager_v1" // ExtForeignToplevelImageCaptureSourceManager is the generated binding for ext_foreign_toplevel_image_capture_source_manager_v1 version 1. type ExtForeignToplevelImageCaptureSourceManager struct { wl.BaseProxy } // NewExtForeignToplevelImageCaptureSourceManager returns an unbound ExtForeignToplevelImageCaptureSourceManager. func NewExtForeignToplevelImageCaptureSourceManager(ctx *wl.Context) *ExtForeignToplevelImageCaptureSourceManager { obj := &ExtForeignToplevelImageCaptureSourceManager{} obj.SetContext(ctx) ctx.Register(obj) return obj } // Creates a source object for a foreign toplevel handle. Images captured from this source will show the same content as the toplevel. func (o *ExtForeignToplevelImageCaptureSourceManager) CreateSource(toplevelHandle *cross_ext_foreign_toplevel_handle_v1.ExtForeignToplevelHandle) (*ExtImageCaptureSource, error) { var arg1 wl.Object if toplevelHandle != nil { arg1 = toplevelHandle } child := &ExtImageCaptureSource{} child.SetContext(o.Context()) if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 0, Name: "ext_foreign_toplevel_image_capture_source_manager_v1.create_source", Child: child}, wl.ArgObject(child), wl.ArgObject(arg1)); err != nil { return nil, err } return child, nil } // Destroys the manager. This request may be sent at any time by the client and objects created by the manager will remain valid after its destruction. func (o *ExtForeignToplevelImageCaptureSourceManager) Destroy() error { if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 1, Name: "ext_foreign_toplevel_image_capture_source_manager_v1.destroy", Destructor: true}); err != nil { return err } return nil } // EventSignature returns the declared event argument types in wire order. func (o *ExtForeignToplevelImageCaptureSourceManager) EventSignature(opcode uint16) (string, bool) { switch opcode { default: return "", false } } // Dispatch decodes one event on ext_foreign_toplevel_image_capture_source_manager_v1 and calls the registered handlers. func (o *ExtForeignToplevelImageCaptureSourceManager) Dispatch(event *wl.Event) { switch event.Opcode { default: } }