Documentation
¶
Index ¶
- type Activation
- type ActivationToken
- func (i *ActivationToken) Commit() error
- func (i *ActivationToken) Destroy() error
- func (i *ActivationToken) Dispatch(opcode uint32, fd int, data []byte)
- func (i *ActivationToken) SetAppId(appId string) error
- func (i *ActivationToken) SetDoneHandler(f ActivationTokenDoneHandlerFunc)
- func (i *ActivationToken) SetSerial(serial uint32, seat *client.Seat) error
- func (i *ActivationToken) SetSurface(surface *client.Surface) error
- type ActivationTokenDoneEvent
- type ActivationTokenDoneHandlerFunc
- type ActivationTokenError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Activation ¶
Activation : interface for activating surfaces
A global interface used for informing the compositor about applications being activated or started, or for applications to request to be activated.
func NewActivation ¶
func NewActivation(ctx *client.Context) *Activation
NewActivation : interface for activating surfaces
A global interface used for informing the compositor about applications being activated or started, or for applications to request to be activated.
func (*Activation) Activate ¶
func (i *Activation) Activate(token string, surface *client.Surface) error
Activate : notify new interaction being available
Requests surface activation. It's up to the compositor to display this information as desired, for example by placing the surface above the rest.
The compositor may know who requested this by checking the activation token and might decide not to follow through with the activation if it's considered unwanted.
Compositors can ignore unknown activation tokens when an invalid token is passed.
token: the activation token of the initiating client surface: the wl_surface to activate
func (*Activation) Destroy ¶
func (i *Activation) Destroy() error
Destroy : destroy the xdg_activation object
Notify the compositor that the xdg_activation object will no longer be used.
The child objects created via this interface are unaffected and should be destroyed separately.
func (*Activation) GetActivationToken ¶
func (i *Activation) GetActivationToken() (*ActivationToken, error)
GetActivationToken : requests a token
Creates an xdg_activation_token_v1 object that will provide the initiating client with a unique token for this activation. This token should be offered to the clients to be activated.
type ActivationToken ¶
ActivationToken : an exported activation handle
An object for setting up a token and receiving a token handle that can be passed as an activation token to another client.
The object is created using the xdg_activation_v1.get_activation_token request. This object should then be populated with the app_id, surface and serial information and committed. The compositor shall then issue a done event with the token. In case the request's parameters are invalid, the compositor will provide an invalid token.
func NewActivationToken ¶
func NewActivationToken(ctx *client.Context) *ActivationToken
NewActivationToken : an exported activation handle
An object for setting up a token and receiving a token handle that can be passed as an activation token to another client.
The object is created using the xdg_activation_v1.get_activation_token request. This object should then be populated with the app_id, surface and serial information and committed. The compositor shall then issue a done event with the token. In case the request's parameters are invalid, the compositor will provide an invalid token.
func (*ActivationToken) Commit ¶
func (i *ActivationToken) Commit() error
Commit : issues the token request
Requests an activation token based on the different parameters that have been offered through set_serial, set_surface and set_app_id.
func (*ActivationToken) Destroy ¶
func (i *ActivationToken) Destroy() error
Destroy : destroy the xdg_activation_token_v1 object
Notify the compositor that the xdg_activation_token_v1 object will no longer be used.
func (*ActivationToken) Dispatch ¶
func (i *ActivationToken) Dispatch(opcode uint32, fd int, data []byte)
func (*ActivationToken) SetAppId ¶
func (i *ActivationToken) SetAppId(appId string) error
SetAppId : specifies the application being activated
The requesting client can specify an app_id to associate the token being created with it.
Must be sent before commit. This information is optional.
appId: the application id of the client being activated.
func (*ActivationToken) SetDoneHandler ¶
func (i *ActivationToken) SetDoneHandler(f ActivationTokenDoneHandlerFunc)
SetDoneHandler : sets handler for ActivationTokenDoneEvent
func (*ActivationToken) SetSerial ¶
func (i *ActivationToken) SetSerial(serial uint32, seat *client.Seat) error
SetSerial : specifies the seat and serial of the activating event
Provides information about the seat and serial event that requested the token.
The serial can come from an input or focus event. For instance, if a click triggers the launch of a third-party client, the launcher client should send a set_serial request with the serial and seat from the wl_pointer.button event.
Some compositors might refuse to activate toplevels when the token doesn't have a valid and recent enough event serial.
Must be sent before commit. This information is optional.
serial: the serial of the event that triggered the activation seat: the wl_seat of the event
func (*ActivationToken) SetSurface ¶
func (i *ActivationToken) SetSurface(surface *client.Surface) error
SetSurface : specifies the surface requesting activation
This request sets the surface requesting the activation. Note, this is different from the surface that will be activated.
Some compositors might refuse to activate toplevels when the token doesn't have a requesting surface.
Must be sent before commit. This information is optional.
surface: the requesting surface
type ActivationTokenDoneEvent ¶
type ActivationTokenDoneEvent struct {
Token string
}
ActivationTokenDoneEvent : the exported activation token
The 'done' event contains the unique token of this activation request and notifies that the provider is done.
type ActivationTokenDoneHandlerFunc ¶
type ActivationTokenDoneHandlerFunc func(ActivationTokenDoneEvent)
type ActivationTokenError ¶
type ActivationTokenError uint32
const ( // ActivationTokenErrorAlreadyUsed : The token has already been used previously ActivationTokenErrorAlreadyUsed ActivationTokenError = 0 )
ActivationTokenError :
func (ActivationTokenError) Name ¶
func (e ActivationTokenError) Name() string
func (ActivationTokenError) String ¶
func (e ActivationTokenError) String() string
func (ActivationTokenError) Value ¶
func (e ActivationTokenError) Value() string