Documentation
¶
Index ¶
- Constants
- type ScreencopyFrame
- func (o *ScreencopyFrame) Copy(buffer *cross_wl_buffer.Buffer) error
- func (o *ScreencopyFrame) CopyWithDamage(buffer *cross_wl_buffer.Buffer) error
- func (o *ScreencopyFrame) Destroy() error
- func (o *ScreencopyFrame) Dispatch(event *wl.Event)
- func (o *ScreencopyFrame) EventSignature(opcode uint16) (string, bool)
- func (o *ScreencopyFrame) OnBuffer(handler func(format uint32, width uint32, height uint32, stride uint32))
- func (o *ScreencopyFrame) OnBufferDone(handler func())
- func (o *ScreencopyFrame) OnDamage(handler func(x uint32, y uint32, width uint32, height uint32))
- func (o *ScreencopyFrame) OnFailed(handler func())
- func (o *ScreencopyFrame) OnFlags(handler func(flags uint32))
- func (o *ScreencopyFrame) OnLinuxDmabuf(handler func(format uint32, width uint32, height uint32))
- func (o *ScreencopyFrame) OnReady(handler func(tvSecHi uint32, tvSecLo uint32, tvNsec uint32))
- type ScreencopyManager
- func (o *ScreencopyManager) CaptureOutput(overlayCursor int32, output *cross_wl_output.Output) (*ScreencopyFrame, error)
- func (o *ScreencopyManager) CaptureOutputRegion(overlayCursor int32, output *cross_wl_output.Output, x int32, y int32, ...) (*ScreencopyFrame, error)
- func (o *ScreencopyManager) Destroy() error
- func (o *ScreencopyManager) Dispatch(event *wl.Event)
- func (o *ScreencopyManager) EventSignature(opcode uint16) (string, bool)
Constants ¶
const ERROR_ALREADY_USED = 0
ERROR_ALREADY_USED is the error already_used value.
const ERROR_INVALID_BUFFER = 1
ERROR_INVALID_BUFFER is the error invalid_buffer value.
const FLAGS_Y_INVERT = 1
FLAGS_Y_INVERT is the flags y_invert value.
const ScreencopyFrameInterface = "zwlr_screencopy_frame_v1"
ScreencopyFrameInterface is the protocol interface name.
const ScreencopyManagerInterface = "zwlr_screencopy_manager_v1"
ScreencopyManagerInterface is the protocol interface name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScreencopyFrame ¶
ScreencopyFrame is the generated binding for zwlr_screencopy_frame_v1 version 3.
func NewScreencopyFrame ¶
func NewScreencopyFrame(ctx *wl.Context) *ScreencopyFrame
NewScreencopyFrame returns an unbound ScreencopyFrame.
func (*ScreencopyFrame) Copy ¶
func (o *ScreencopyFrame) Copy(buffer *cross_wl_buffer.Buffer) error
Copy the frame to the supplied buffer. The buffer must have the correct size, see zwlr_screencopy_frame_v1.buffer and zwlr_screencopy_frame_v1.linux_dmabuf. The buffer needs to have a supported format. If the frame is successfully copied, "flags" and "ready" events are sent. Otherwise, a "failed" event is sent.
func (*ScreencopyFrame) CopyWithDamage ¶
func (o *ScreencopyFrame) CopyWithDamage(buffer *cross_wl_buffer.Buffer) error
Same as copy, except it waits until there is damage to copy.
func (*ScreencopyFrame) Destroy ¶
func (o *ScreencopyFrame) Destroy() error
Destroys the frame. This request can be sent at any time by the client.
func (*ScreencopyFrame) Dispatch ¶
func (o *ScreencopyFrame) Dispatch(event *wl.Event)
Dispatch decodes one event on zwlr_screencopy_frame_v1 and calls the registered handlers.
func (*ScreencopyFrame) EventSignature ¶
func (o *ScreencopyFrame) EventSignature(opcode uint16) (string, bool)
EventSignature returns the declared event argument types in wire order.
func (*ScreencopyFrame) OnBuffer ¶
func (o *ScreencopyFrame) OnBuffer(handler func(format uint32, width uint32, height uint32, stride uint32))
OnBuffer registers a handler for the buffer event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*ScreencopyFrame) OnBufferDone ¶
func (o *ScreencopyFrame) OnBufferDone(handler func())
OnBufferDone registers a handler for the buffer_done event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*ScreencopyFrame) OnDamage ¶
func (o *ScreencopyFrame) OnDamage(handler func(x uint32, y uint32, width uint32, height uint32))
OnDamage registers a handler for the damage event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*ScreencopyFrame) OnFailed ¶
func (o *ScreencopyFrame) OnFailed(handler func())
OnFailed registers a handler for the failed event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*ScreencopyFrame) OnFlags ¶
func (o *ScreencopyFrame) OnFlags(handler func(flags uint32))
OnFlags registers a handler for the flags event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*ScreencopyFrame) OnLinuxDmabuf ¶
func (o *ScreencopyFrame) OnLinuxDmabuf(handler func(format uint32, width uint32, height uint32))
OnLinuxDmabuf registers a handler for the linux_dmabuf event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*ScreencopyFrame) OnReady ¶
func (o *ScreencopyFrame) OnReady(handler func(tvSecHi uint32, tvSecLo uint32, tvNsec uint32))
OnReady registers a handler for the ready event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
type ScreencopyManager ¶
ScreencopyManager is the generated binding for zwlr_screencopy_manager_v1 version 3.
func NewScreencopyManager ¶
func NewScreencopyManager(ctx *wl.Context) *ScreencopyManager
NewScreencopyManager returns an unbound ScreencopyManager.
func (*ScreencopyManager) CaptureOutput ¶
func (o *ScreencopyManager) CaptureOutput(overlayCursor int32, output *cross_wl_output.Output) (*ScreencopyFrame, error)
Capture the next frame of an entire output.
func (*ScreencopyManager) CaptureOutputRegion ¶
func (o *ScreencopyManager) CaptureOutputRegion(overlayCursor int32, output *cross_wl_output.Output, x int32, y int32, width int32, height int32) (*ScreencopyFrame, error)
Capture the next frame of an output's region. The region is given in output logical coordinates, see xdg_output.logical_size. The region will be clipped to the output's extents.
func (*ScreencopyManager) Destroy ¶
func (o *ScreencopyManager) Destroy() error
All objects created by the manager will still remain valid, until their appropriate destroy request has been called.
func (*ScreencopyManager) Dispatch ¶
func (o *ScreencopyManager) Dispatch(event *wl.Event)
Dispatch decodes one event on zwlr_screencopy_manager_v1 and calls the registered handlers.
func (*ScreencopyManager) EventSignature ¶
func (o *ScreencopyManager) EventSignature(opcode uint16) (string, bool)
EventSignature returns the declared event argument types in wire order.