Documentation ¶
Index ¶
- Constants
- type ZxdgDecorationManagerV1
- type ZxdgToplevelDecorationV1
- func (i *ZxdgToplevelDecorationV1) AddConfigureHandler(h ZxdgToplevelDecorationV1ConfigureHandler)
- func (i *ZxdgToplevelDecorationV1) Destroy() error
- func (i *ZxdgToplevelDecorationV1) Dispatch(event *client.Event)
- func (i *ZxdgToplevelDecorationV1) RemoveConfigureHandler(h ZxdgToplevelDecorationV1ConfigureHandler)
- func (i *ZxdgToplevelDecorationV1) SetMode(mode uint32) error
- func (i *ZxdgToplevelDecorationV1) UnsetMode() error
- type ZxdgToplevelDecorationV1ConfigureEvent
- type ZxdgToplevelDecorationV1ConfigureHandler
Constants ¶
const ( // ZxdgToplevelDecorationV1ErrorUnconfiguredBuffer : xdg_toplevel has a buffer attached before configure ZxdgToplevelDecorationV1ErrorUnconfiguredBuffer = 0 // ZxdgToplevelDecorationV1ErrorAlreadyConstructed : xdg_toplevel already has a decoration object ZxdgToplevelDecorationV1ErrorAlreadyConstructed = 1 // ZxdgToplevelDecorationV1ErrorOrphaned : xdg_toplevel destroyed before the decoration object ZxdgToplevelDecorationV1ErrorOrphaned = 2 )
ZxdgToplevelDecorationV1Error :
const ( // ZxdgToplevelDecorationV1ModeClientSide : no server-side window decoration ZxdgToplevelDecorationV1ModeClientSide = 1 // ZxdgToplevelDecorationV1ModeServerSide : server-side window decoration ZxdgToplevelDecorationV1ModeServerSide = 2 )
ZxdgToplevelDecorationV1Mode : window decoration modes
These values describe window decoration modes.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZxdgDecorationManagerV1 ¶
ZxdgDecorationManagerV1 : window decoration manager
This interface allows a compositor to announce support for server-side decorations.
A window decoration is a set of window controls as deemed appropriate by the party managing them, such as user interface components used to move, resize and change a window's state.
A client can use this protocol to request being decorated by a supporting compositor.
If compositor and client do not negotiate the use of a server-side decoration using this protocol, clients continue to self-decorate as they see fit.
Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset.
func NewZxdgDecorationManagerV1 ¶
func NewZxdgDecorationManagerV1(ctx *client.Context) *ZxdgDecorationManagerV1
NewZxdgDecorationManagerV1 : window decoration manager
This interface allows a compositor to announce support for server-side decorations.
A window decoration is a set of window controls as deemed appropriate by the party managing them, such as user interface components used to move, resize and change a window's state.
A client can use this protocol to request being decorated by a supporting compositor.
If compositor and client do not negotiate the use of a server-side decoration using this protocol, clients continue to self-decorate as they see fit.
Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset.
func (*ZxdgDecorationManagerV1) Destroy ¶
func (i *ZxdgDecorationManagerV1) Destroy() error
Destroy : destroy the decoration manager object
Destroy the decoration manager. This doesn't destroy objects created with the manager.
func (*ZxdgDecorationManagerV1) GetToplevelDecoration ¶
func (i *ZxdgDecorationManagerV1) GetToplevelDecoration(toplevel *xdgshell.Toplevel) (*ZxdgToplevelDecorationV1, error)
GetToplevelDecoration : create a new toplevel decoration object
Create a new decoration object associated with the given toplevel.
Creating an xdg_toplevel_decoration from an xdg_toplevel which has a buffer attached or committed is a client error, and any attempts by a client to attach or manipulate a buffer prior to the first xdg_toplevel_decoration.configure event must also be treated as errors.
type ZxdgToplevelDecorationV1 ¶
ZxdgToplevelDecorationV1 : decoration object for a toplevel surface
The decoration object allows the compositor to toggle server-side window decorations for a toplevel surface. The client can request to switch to another mode.
The xdg_toplevel_decoration object must be destroyed before its xdg_toplevel.
func NewZxdgToplevelDecorationV1 ¶
func NewZxdgToplevelDecorationV1(ctx *client.Context) *ZxdgToplevelDecorationV1
NewZxdgToplevelDecorationV1 : decoration object for a toplevel surface
The decoration object allows the compositor to toggle server-side window decorations for a toplevel surface. The client can request to switch to another mode.
The xdg_toplevel_decoration object must be destroyed before its xdg_toplevel.
func (*ZxdgToplevelDecorationV1) AddConfigureHandler ¶
func (i *ZxdgToplevelDecorationV1) AddConfigureHandler(h ZxdgToplevelDecorationV1ConfigureHandler)
AddConfigureHandler : suggest a surface change
The configure event asks the client to change its decoration mode. The configured state should not be applied immediately. Clients must send an ack_configure in response to this event. See xdg_surface.configure and xdg_surface.ack_configure for details.
A configure event can be sent at any time. The specified mode must be obeyed by the client.
func (*ZxdgToplevelDecorationV1) Destroy ¶
func (i *ZxdgToplevelDecorationV1) Destroy() error
Destroy : destroy the decoration object
Switch back to a mode without any server-side decorations at the next commit.
func (*ZxdgToplevelDecorationV1) Dispatch ¶
func (i *ZxdgToplevelDecorationV1) Dispatch(event *client.Event)
func (*ZxdgToplevelDecorationV1) RemoveConfigureHandler ¶
func (i *ZxdgToplevelDecorationV1) RemoveConfigureHandler(h ZxdgToplevelDecorationV1ConfigureHandler)
func (*ZxdgToplevelDecorationV1) SetMode ¶
func (i *ZxdgToplevelDecorationV1) SetMode(mode uint32) error
SetMode : set the decoration mode
Set the toplevel surface decoration mode. This informs the compositor that the client prefers the provided decoration mode.
After requesting a decoration mode, the compositor will respond by emitting an xdg_surface.configure event. The client should then update its content, drawing it without decorations if the received mode is server-side decorations. The client must also acknowledge the configure when committing the new content (see xdg_surface.ack_configure).
The compositor can decide not to use the client's mode and enforce a different mode instead.
Clients whose decoration mode depend on the xdg_toplevel state may send a set_mode request in response to an xdg_surface.configure event and wait for the next xdg_surface.configure event to prevent unwanted state. Such clients are responsible for preventing configure loops and must make sure not to send multiple successive set_mode requests with the same decoration mode.
mode: the decoration mode
func (*ZxdgToplevelDecorationV1) UnsetMode ¶
func (i *ZxdgToplevelDecorationV1) UnsetMode() error
UnsetMode : unset the decoration mode
Unset the toplevel surface decoration mode. This informs the compositor that the client doesn't prefer a particular decoration mode.
This request has the same semantics as set_mode.
type ZxdgToplevelDecorationV1ConfigureEvent ¶
type ZxdgToplevelDecorationV1ConfigureEvent struct {
Mode uint32
}
ZxdgToplevelDecorationV1ConfigureEvent : suggest a surface change
The configure event asks the client to change its decoration mode. The configured state should not be applied immediately. Clients must send an ack_configure in response to this event. See xdg_surface.configure and xdg_surface.ack_configure for details.
A configure event can be sent at any time. The specified mode must be obeyed by the client.
type ZxdgToplevelDecorationV1ConfigureHandler ¶
type ZxdgToplevelDecorationV1ConfigureHandler interface {
HandleZxdgToplevelDecorationV1Configure(ZxdgToplevelDecorationV1ConfigureEvent)
}