Documentation
¶
Index ¶
- type DecorationManager
- type ToplevelDecoration
- func (i *ToplevelDecoration) AddConfigureHandler(h ToplevelDecorationConfigureHandler)
- func (i *ToplevelDecoration) Destroy() error
- func (i *ToplevelDecoration) Dispatch(event *client.Event)
- func (i *ToplevelDecoration) RemoveConfigureHandler(h ToplevelDecorationConfigureHandler)
- func (i *ToplevelDecoration) SetMode(mode uint32) error
- func (i *ToplevelDecoration) UnsetMode() error
- type ToplevelDecorationConfigureEvent
- type ToplevelDecorationConfigureHandler
- type ToplevelDecorationError
- type ToplevelDecorationMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DecorationManager ¶
DecorationManager : 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 NewDecorationManager ¶
func NewDecorationManager(ctx *client.Context) *DecorationManager
NewDecorationManager : 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 (*DecorationManager) Destroy ¶
func (i *DecorationManager) Destroy() error
Destroy : destroy the decoration manager object
Destroy the decoration manager. This doesn't destroy objects created with the manager.
func (*DecorationManager) GetToplevelDecoration ¶
func (i *DecorationManager) GetToplevelDecoration(toplevel *xdg_shell.Toplevel) (*ToplevelDecoration, 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 ToplevelDecoration ¶
ToplevelDecoration : 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 NewToplevelDecoration ¶
func NewToplevelDecoration(ctx *client.Context) *ToplevelDecoration
NewToplevelDecoration : 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 (*ToplevelDecoration) AddConfigureHandler ¶
func (i *ToplevelDecoration) AddConfigureHandler(h ToplevelDecorationConfigureHandler)
AddConfigureHandler : adds handler for ToplevelDecorationConfigureEvent
func (*ToplevelDecoration) Destroy ¶
func (i *ToplevelDecoration) Destroy() error
Destroy : destroy the decoration object
Switch back to a mode without any server-side decorations at the next commit.
func (*ToplevelDecoration) Dispatch ¶
func (i *ToplevelDecoration) Dispatch(event *client.Event)
func (*ToplevelDecoration) RemoveConfigureHandler ¶
func (i *ToplevelDecoration) RemoveConfigureHandler(h ToplevelDecorationConfigureHandler)
func (*ToplevelDecoration) SetMode ¶
func (i *ToplevelDecoration) 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 (*ToplevelDecoration) UnsetMode ¶
func (i *ToplevelDecoration) 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 ToplevelDecorationConfigureEvent ¶
type ToplevelDecorationConfigureEvent struct {
Mode uint32
}
ToplevelDecorationConfigureEvent : 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 ToplevelDecorationConfigureHandler ¶
type ToplevelDecorationConfigureHandler interface {
HandleToplevelDecorationConfigure(ToplevelDecorationConfigureEvent)
}
type ToplevelDecorationError ¶
type ToplevelDecorationError uint32
const ( // ToplevelDecorationErrorUnconfiguredBuffer : xdg_toplevel has a buffer attached before configure ToplevelDecorationErrorUnconfiguredBuffer ToplevelDecorationError = 0 // ToplevelDecorationErrorAlreadyConstructed : xdg_toplevel already has a decoration object ToplevelDecorationErrorAlreadyConstructed ToplevelDecorationError = 1 // ToplevelDecorationErrorOrphaned : xdg_toplevel destroyed before the decoration object ToplevelDecorationErrorOrphaned ToplevelDecorationError = 2 )
ToplevelDecorationError :
func (ToplevelDecorationError) Name ¶
func (e ToplevelDecorationError) Name() string
func (ToplevelDecorationError) String ¶
func (e ToplevelDecorationError) String() string
func (ToplevelDecorationError) Value ¶
func (e ToplevelDecorationError) Value() string
type ToplevelDecorationMode ¶
type ToplevelDecorationMode uint32
const ( // ToplevelDecorationModeClientSide : no server-side window decoration ToplevelDecorationModeClientSide ToplevelDecorationMode = 1 // ToplevelDecorationModeServerSide : server-side window decoration ToplevelDecorationModeServerSide ToplevelDecorationMode = 2 )
ToplevelDecorationMode : window decoration modes
These values describe window decoration modes.
func (ToplevelDecorationMode) Name ¶
func (e ToplevelDecorationMode) Name() string
func (ToplevelDecorationMode) String ¶
func (e ToplevelDecorationMode) String() string
func (ToplevelDecorationMode) Value ¶
func (e ToplevelDecorationMode) Value() string