extsessionlock

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ERROR_ALREADY_CONSTRUCTED = 4

ERROR_ALREADY_CONSTRUCTED is the error already_constructed value.

View Source
const ERROR_COMMIT_BEFORE_FIRST_ACK = 0

ERROR_COMMIT_BEFORE_FIRST_ACK is the error commit_before_first_ack value.

View Source
const ERROR_DIMENSIONS_MISMATCH = 2

ERROR_DIMENSIONS_MISMATCH is the error dimensions_mismatch value.

View Source
const ERROR_DUPLICATE_OUTPUT = 3

ERROR_DUPLICATE_OUTPUT is the error duplicate_output value.

View Source
const ERROR_INVALID_DESTROY = 0

ERROR_INVALID_DESTROY is the error invalid_destroy value.

View Source
const ERROR_INVALID_SERIAL = 3

ERROR_INVALID_SERIAL is the error invalid_serial value.

View Source
const ERROR_INVALID_UNLOCK = 1

ERROR_INVALID_UNLOCK is the error invalid_unlock value.

View Source
const ERROR_NULL_BUFFER = 1

ERROR_NULL_BUFFER is the error null_buffer value.

View Source
const ERROR_ROLE = 2

ERROR_ROLE is the error role value.

View Source
const ExtSessionLockInterface = "ext_session_lock_v1"

ExtSessionLockInterface is the protocol interface name.

View Source
const ExtSessionLockManagerInterface = "ext_session_lock_manager_v1"

ExtSessionLockManagerInterface is the protocol interface name.

View Source
const ExtSessionLockSurfaceInterface = "ext_session_lock_surface_v1"

ExtSessionLockSurfaceInterface is the protocol interface name.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtSessionLock

type ExtSessionLock struct {
	wl.BaseProxy
	// contains filtered or unexported fields
}

ExtSessionLock is the generated binding for ext_session_lock_v1 version 1.

func NewExtSessionLock

func NewExtSessionLock(ctx *wl.Context) *ExtSessionLock

NewExtSessionLock returns an unbound ExtSessionLock.

func (*ExtSessionLock) Destroy

func (o *ExtSessionLock) Destroy() error

This informs the compositor that the lock object will no longer be used. Existing objects created through this interface remain valid. After this request is made, lock surfaces created through this object should be destroyed by the client as they will no longer be used by the compositor. It is a protocol error to make this request if the locked event was sent, the unlock_and_destroy request must be used instead.

func (*ExtSessionLock) Dispatch

func (o *ExtSessionLock) Dispatch(event *wl.Event)

Dispatch decodes one event on ext_session_lock_v1 and calls the registered handlers.

func (*ExtSessionLock) EventSignature

func (o *ExtSessionLock) EventSignature(opcode uint16) (string, bool)

EventSignature returns the declared event argument types in wire order.

func (*ExtSessionLock) GetLockSurface

func (o *ExtSessionLock) GetLockSurface(surface *cross_wl_surface.Surface, output *cross_wl_output.Output) (*ExtSessionLockSurface, error)

The client is expected to create lock surfaces for all outputs currently present and any new outputs as they are advertised. These won't be displayed by the compositor unless the lock is successful and the locked event is sent. Providing a wl_surface which already has a role or already has a buffer attached or committed is a protocol error, as is attaching/committing a buffer before the first ext_session_lock_surface_v1.configure event. Attempting to create more than one lock surface for a given output is a duplicate_output protocol error.

func (*ExtSessionLock) OnFinished

func (o *ExtSessionLock) OnFinished(handler func())

OnFinished registers a handler for the finished event.

Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.

func (*ExtSessionLock) OnLocked

func (o *ExtSessionLock) OnLocked(handler func())

OnLocked registers a handler for the locked event.

Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.

func (*ExtSessionLock) UnlockAndDestroy

func (o *ExtSessionLock) UnlockAndDestroy() error

This request indicates that the session should be unlocked, for example because the user has entered their password and it has been verified by the client. This request also informs the compositor that the lock object will no longer be used and should be destroyed. Existing objects created through this interface remain valid. After this request is made, lock surfaces created through this object should be destroyed by the client as they will no longer be used by the compositor. It is a protocol error to make this request if the locked event has not been sent. In that case, the lock object must be destroyed using the destroy request. Note that a correct client that wishes to exit directly after unlocking the session must use the wl_display.sync request to ensure the server receives and processes the unlock_and_destroy request. Otherwise there is no guarantee that the server has unlocked the session due to the asynchronous nature of the Wayland protocol. For example, the server might terminate the client with a protocol error before it processes the unlock_and_destroy request.

type ExtSessionLockManager

type ExtSessionLockManager struct {
	wl.BaseProxy
}

ExtSessionLockManager is the generated binding for ext_session_lock_manager_v1 version 1.

func NewExtSessionLockManager

func NewExtSessionLockManager(ctx *wl.Context) *ExtSessionLockManager

NewExtSessionLockManager returns an unbound ExtSessionLockManager.

func (*ExtSessionLockManager) Destroy

func (o *ExtSessionLockManager) Destroy() error

This informs the compositor that the session lock manager object will no longer be used. Existing objects created through this interface remain valid.

func (*ExtSessionLockManager) Dispatch

func (o *ExtSessionLockManager) Dispatch(event *wl.Event)

Dispatch decodes one event on ext_session_lock_manager_v1 and calls the registered handlers.

func (*ExtSessionLockManager) EventSignature

func (o *ExtSessionLockManager) EventSignature(opcode uint16) (string, bool)

EventSignature returns the declared event argument types in wire order.

func (*ExtSessionLockManager) Lock

This request creates a session lock and asks the compositor to lock the session. The compositor will send either the ext_session_lock_v1.locked or ext_session_lock_v1.finished event on the created object in response to this request.

type ExtSessionLockSurface

type ExtSessionLockSurface struct {
	wl.BaseProxy
	// contains filtered or unexported fields
}

ExtSessionLockSurface is the generated binding for ext_session_lock_surface_v1 version 1.

func NewExtSessionLockSurface

func NewExtSessionLockSurface(ctx *wl.Context) *ExtSessionLockSurface

NewExtSessionLockSurface returns an unbound ExtSessionLockSurface.

func (*ExtSessionLockSurface) AckConfigure

func (o *ExtSessionLockSurface) AckConfigure(serial uint32) error

When a configure event is received, if a client commits the surface in response to the configure event, then the client must make an ack_configure request sometime before the commit request, passing along the serial of the configure event. If the client receives multiple configure events before it can respond to one, it only has to ack the last configure event. A client is not required to commit immediately after sending an ack_configure request - it may even ack_configure several times before its next surface commit. A client may send multiple ack_configure requests before committing, but only the last request sent before a commit indicates which configure event the client really is responding to. Sending an ack_configure request consumes the configure event referenced by the given serial, as well as all older configure events sent on this object. It is a protocol error to issue multiple ack_configure requests referencing the same configure event or to issue an ack_configure request referencing a configure event older than the last configure event acked for a given lock surface.

func (*ExtSessionLockSurface) Destroy

func (o *ExtSessionLockSurface) Destroy() error

This informs the compositor that the lock surface object will no longer be used. It is recommended for a lock client to destroy lock surfaces if their corresponding wl_output global is removed. If a lock surface on an active output is destroyed before the ext_session_lock_v1.unlock_and_destroy event is sent, the compositor must fall back to rendering a solid color.

func (*ExtSessionLockSurface) Dispatch

func (o *ExtSessionLockSurface) Dispatch(event *wl.Event)

Dispatch decodes one event on ext_session_lock_surface_v1 and calls the registered handlers.

func (*ExtSessionLockSurface) EventSignature

func (o *ExtSessionLockSurface) EventSignature(opcode uint16) (string, bool)

EventSignature returns the declared event argument types in wire order.

func (*ExtSessionLockSurface) OnConfigure

func (o *ExtSessionLockSurface) OnConfigure(handler func(serial uint32, width uint32, height uint32))

OnConfigure registers a handler for the configure event.

Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL