gi-gtk-3.0.11: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.LockButton

Contents

Description

GtkLockButton is a widget that can be used in control panels or preference dialogs to allow users to obtain and revoke authorizations needed to operate the controls. The required authorization is represented by a Permission object. Concrete implementations of Permission may use PolicyKit or some other authorization framework. To obtain a PolicyKit-based Permission, use polkit_permission_new().

If the user is not currently allowed to perform the action, but can obtain the permission, the widget looks like this:

and the user can click the button to request the permission. Depending on the platform, this may pop up an authentication dialog or ask the user to authenticate in some other way. Once the user has obtained the permission, the widget changes to this:

and the permission can be dropped again by clicking the button. If the user is not able to obtain the permission at all, the widget looks like this:

If the user has the permission and cannot drop it, the button is hidden.

The text (and tooltips) that are shown in the various cases can be adjusted with the LockButton:text-lock, LockButton:text-unlock, LockButton:tooltip-lock, LockButton:tooltip-unlock and LockButton:tooltip-not-authorized properties.

Synopsis

Exported types

Methods

getPermission

lockButtonGetPermission Source #

Arguments

:: (HasCallStack, MonadIO m, IsLockButton a) 
=> a

button: a LockButton

-> m Permission

Returns: the Permission of button

Obtains the Permission object that controls button.

Since: 3.2

new

lockButtonNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsPermission a) 
=> Maybe a

permission: a Permission

-> m LockButton

Returns: a new LockButton

Creates a new lock button which reflects the permission.

Since: 3.2

setPermission

lockButtonSetPermission Source #

Arguments

:: (HasCallStack, MonadIO m, IsLockButton a, IsPermission b) 
=> a

button: a LockButton

-> Maybe b

permission: a Permission object, or Nothing

-> m () 

Sets the Permission object that controls button.

Since: 3.2

Properties

permission

data LockButtonPermissionPropertyInfo Source #

Instances

AttrInfo LockButtonPermissionPropertyInfo Source # 
type AttrOrigin LockButtonPermissionPropertyInfo Source # 
type AttrLabel LockButtonPermissionPropertyInfo Source # 
type AttrGetType LockButtonPermissionPropertyInfo Source # 
type AttrBaseTypeConstraint LockButtonPermissionPropertyInfo Source # 
type AttrSetTypeConstraint LockButtonPermissionPropertyInfo Source # 
type AttrAllowedOps LockButtonPermissionPropertyInfo Source # 

textLock

data LockButtonTextLockPropertyInfo Source #

Instances

AttrInfo LockButtonTextLockPropertyInfo Source # 
type AttrOrigin LockButtonTextLockPropertyInfo Source # 
type AttrLabel LockButtonTextLockPropertyInfo Source # 
type AttrGetType LockButtonTextLockPropertyInfo Source # 
type AttrBaseTypeConstraint LockButtonTextLockPropertyInfo Source # 
type AttrSetTypeConstraint LockButtonTextLockPropertyInfo Source # 
type AttrAllowedOps LockButtonTextLockPropertyInfo Source # 

textUnlock

data LockButtonTextUnlockPropertyInfo Source #

Instances

AttrInfo LockButtonTextUnlockPropertyInfo Source # 
type AttrOrigin LockButtonTextUnlockPropertyInfo Source # 
type AttrLabel LockButtonTextUnlockPropertyInfo Source # 
type AttrGetType LockButtonTextUnlockPropertyInfo Source # 
type AttrBaseTypeConstraint LockButtonTextUnlockPropertyInfo Source # 
type AttrSetTypeConstraint LockButtonTextUnlockPropertyInfo Source # 
type AttrAllowedOps LockButtonTextUnlockPropertyInfo Source # 

tooltipLock

data LockButtonTooltipLockPropertyInfo Source #

Instances

AttrInfo LockButtonTooltipLockPropertyInfo Source # 
type AttrOrigin LockButtonTooltipLockPropertyInfo Source # 
type AttrLabel LockButtonTooltipLockPropertyInfo Source # 
type AttrGetType LockButtonTooltipLockPropertyInfo Source # 
type AttrBaseTypeConstraint LockButtonTooltipLockPropertyInfo Source # 
type AttrSetTypeConstraint LockButtonTooltipLockPropertyInfo Source # 
type AttrAllowedOps LockButtonTooltipLockPropertyInfo Source # 

tooltipNotAuthorized

data LockButtonTooltipNotAuthorizedPropertyInfo Source #

Instances

AttrInfo LockButtonTooltipNotAuthorizedPropertyInfo Source # 
type AttrOrigin LockButtonTooltipNotAuthorizedPropertyInfo Source # 
type AttrLabel LockButtonTooltipNotAuthorizedPropertyInfo Source # 
type AttrGetType LockButtonTooltipNotAuthorizedPropertyInfo Source # 
type AttrBaseTypeConstraint LockButtonTooltipNotAuthorizedPropertyInfo Source # 
type AttrSetTypeConstraint LockButtonTooltipNotAuthorizedPropertyInfo Source # 
type AttrAllowedOps LockButtonTooltipNotAuthorizedPropertyInfo Source # 

tooltipUnlock

data LockButtonTooltipUnlockPropertyInfo Source #

Instances

AttrInfo LockButtonTooltipUnlockPropertyInfo Source # 
type AttrOrigin LockButtonTooltipUnlockPropertyInfo Source # 
type AttrLabel LockButtonTooltipUnlockPropertyInfo Source # 
type AttrGetType LockButtonTooltipUnlockPropertyInfo Source # 
type AttrBaseTypeConstraint LockButtonTooltipUnlockPropertyInfo Source # 
type AttrSetTypeConstraint LockButtonTooltipUnlockPropertyInfo Source # 
type AttrAllowedOps LockButtonTooltipUnlockPropertyInfo Source #