Documentation
¶
Overview ¶
Package sessionlock was automatically generated by github.com/bnema/puregotk DO NOT EDIT
Index ¶
- func Available() bool
- func InstanceGLibType() types.GType
- func IsSupported() bool
- type Instance
- func (x *Instance) AssignWindowToMonitor(WindowVar *gtk.Window, MonitorVar *gdk.Monitor)
- func (x *Instance) ConnectFailed(cb *func(Instance)) uint
- func (x *Instance) ConnectLocked(cb *func(Instance)) uint
- func (x *Instance) ConnectMonitor(cb *func(Instance, uintptr)) uint
- func (x *Instance) ConnectUnlocked(cb *func(Instance)) uint
- func (c *Instance) GoPointer() uintptr
- func (x *Instance) IsLocked() bool
- func (x *Instance) Lock() bool
- func (c *Instance) SetGoPointer(ptr uintptr)
- func (x *Instance) Unlock()
- type InstanceClass
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Available ¶
func Available() bool
Available reports whether the shared library was loaded successfully.
func InstanceGLibType ¶
func IsSupported ¶
func IsSupported() bool
May block for a Wayland roundtrip the first time it's called.
Types ¶
type Instance ¶
An instance of the object used to control locking the screen. Multiple instances can exist at once, but only one can be locked at a time.
func NewInstance ¶
func NewInstance() *Instance
func (*Instance) AssignWindowToMonitor ¶
This must be called with a different unrealized window once for each monitor immediately after calling gtk_session_lock_lock(). Hiding a window that is active on a monitor or not letting a window be resized by the library is not allowed (may result in a Wayland protocol error). The window will be unmapped and gtk_window_destroy() called on it when the current lock ends.
func (*Instance) ConnectFailed ¶
The ::failed signal is fired when the lock could not be acquired.
func (*Instance) ConnectLocked ¶
The ::locked signal is fired when the screen is successfully locked.
func (*Instance) ConnectMonitor ¶
The ::monitor signal is fired once for each monitor that exists when a lock is started, and then whenever a new monitor is detected during the lock. You generally want to call gtk_session_lock_instance_assign_window_to_monitor() once in the handler for this signal with a newly created window and the given monitor.
This API does not directly tell you when a monitor is removed (GTK APIs can be used for that), however the window you send to gtk_session_lock_instance_assign_window_to_monitor() will be automatically unmapped and dereferenced when its monitor is removed or the screen is unlocked.
func (*Instance) ConnectUnlocked ¶
The ::unlocked signal is fired when the session is unlocked, which may have been caused by a call to gtk_session_lock_instance_unlock() or by the compositor.
func (*Instance) Lock ¶
Lock the screen. This should be called before assigning any windows to monitors. If this function fails the ::failed signal is emitted, if it succeeds the ::locked signal is emitted. The ::failed signal may be emitted before the function returns (for example, if another #GtkSessionLockInstance holds a lock) or later (if another process holds a lock). The only case where neither signal is triggered is if the instance is already locked.
func (*Instance) SetGoPointer ¶
type InstanceClass ¶
type InstanceClass struct {
ParentClass gobject.ObjectClass
// contains filtered or unexported fields
}
func (*InstanceClass) GoPointer ¶
func (x *InstanceClass) GoPointer() uintptr