gi-gtk-3.0.42: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.LockButton

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:textLock, LockButton:textUnlock, LockButton:tooltipLock, LockButton:tooltipUnlock and LockButton:tooltipNotAuthorized properties.

Synopsis

Exported types

newtype LockButton Source #

Memory-managed wrapper type.

Constructors

LockButton (ManagedPtr LockButton) 

Instances

Instances details
Eq LockButton Source # 
Instance details

Defined in GI.Gtk.Objects.LockButton

GObject LockButton Source # 
Instance details

Defined in GI.Gtk.Objects.LockButton

ManagedPtrNewtype LockButton Source # 
Instance details

Defined in GI.Gtk.Objects.LockButton

Methods

toManagedPtr :: LockButton -> ManagedPtr LockButton

TypedObject LockButton Source # 
Instance details

Defined in GI.Gtk.Objects.LockButton

Methods

glibType :: IO GType

HasParentTypes LockButton Source # 
Instance details

Defined in GI.Gtk.Objects.LockButton

IsGValue (Maybe LockButton) Source #

Convert LockButton to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.LockButton

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe LockButton -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe LockButton)

type ParentTypes LockButton Source # 
Instance details

Defined in GI.Gtk.Objects.LockButton

type ParentTypes LockButton = '[Button, Bin, Container, Widget, Object, ImplementorIface, Actionable, Activatable, Buildable]

class (GObject o, IsDescendantOf LockButton o) => IsLockButton o Source #

Type class for types which can be safely cast to LockButton, for instance with toLockButton.

Instances

Instances details
(GObject o, IsDescendantOf LockButton o) => IsLockButton o Source # 
Instance details

Defined in GI.Gtk.Objects.LockButton

toLockButton :: (MonadIO m, IsLockButton o) => o -> m LockButton Source #

Cast to LockButton, for types for which this is known to be safe. For general casts, use castTo.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

activate, add, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, clicked, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, doSetRelatedAction, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, enter, errorBell, event, forall, forceFloating, foreach, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, leave, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, pressed, propagateDraw, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, released, remove, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, resizeChildren, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, syncActionProperties, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, watchClosure.

Getters

getAccessible, getActionGroup, getActionName, getActionTargetValue, getAlignment, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAlwaysShowImage, getAncestor, getAppPaintable, getBorderWidth, getCanDefault, getCanFocus, getChild, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEventWindow, getEvents, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getImage, getImagePosition, getInternalChild, getLabel, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPermission, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRelatedAction, getRelief, getRequestMode, getRequisition, getResizeMode, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getUseActionAppearance, getUseStock, getUseUnderline, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.

Setters

setAccelPath, setActionName, setActionTargetValue, setAlignment, setAllocation, setAlwaysShowImage, setAppPaintable, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDetailedActionName, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setImage, setImagePosition, setLabel, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setParent, setParentWindow, setPermission, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setRelatedAction, setRelief, setResizeMode, setSensitive, setSizeRequest, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setUseActionAppearance, setUseStock, setUseUnderline, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.

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

No description available in the introspection data.

clearLockButtonPermission :: (MonadIO m, IsLockButton o) => o -> m () Source #

Set the value of the “permission” property to Nothing. When overloading is enabled, this is equivalent to

clear #permission

constructLockButtonPermission :: (IsLockButton o, MonadIO m, IsPermission a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “permission” property. This is rarely needed directly, but it is used by new.

getLockButtonPermission :: (MonadIO m, IsLockButton o) => o -> m Permission Source #

Get the value of the “permission” property. When overloading is enabled, this is equivalent to

get lockButton #permission

setLockButtonPermission :: (MonadIO m, IsLockButton o, IsPermission a) => o -> a -> m () Source #

Set the value of the “permission” property. When overloading is enabled, this is equivalent to

set lockButton [ #permission := value ]

textLock

No description available in the introspection data.

clearLockButtonTextLock :: (MonadIO m, IsLockButton o) => o -> m () Source #

Set the value of the “text-lock” property to Nothing. When overloading is enabled, this is equivalent to

clear #textLock

constructLockButtonTextLock :: (IsLockButton o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “text-lock” property. This is rarely needed directly, but it is used by new.

getLockButtonTextLock :: (MonadIO m, IsLockButton o) => o -> m (Maybe Text) Source #

Get the value of the “text-lock” property. When overloading is enabled, this is equivalent to

get lockButton #textLock

setLockButtonTextLock :: (MonadIO m, IsLockButton o) => o -> Text -> m () Source #

Set the value of the “text-lock” property. When overloading is enabled, this is equivalent to

set lockButton [ #textLock := value ]

textUnlock

No description available in the introspection data.

clearLockButtonTextUnlock :: (MonadIO m, IsLockButton o) => o -> m () Source #

Set the value of the “text-unlock” property to Nothing. When overloading is enabled, this is equivalent to

clear #textUnlock

constructLockButtonTextUnlock :: (IsLockButton o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “text-unlock” property. This is rarely needed directly, but it is used by new.

getLockButtonTextUnlock :: (MonadIO m, IsLockButton o) => o -> m (Maybe Text) Source #

Get the value of the “text-unlock” property. When overloading is enabled, this is equivalent to

get lockButton #textUnlock

setLockButtonTextUnlock :: (MonadIO m, IsLockButton o) => o -> Text -> m () Source #

Set the value of the “text-unlock” property. When overloading is enabled, this is equivalent to

set lockButton [ #textUnlock := value ]

tooltipLock

No description available in the introspection data.

clearLockButtonTooltipLock :: (MonadIO m, IsLockButton o) => o -> m () Source #

Set the value of the “tooltip-lock” property to Nothing. When overloading is enabled, this is equivalent to

clear #tooltipLock

constructLockButtonTooltipLock :: (IsLockButton o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “tooltip-lock” property. This is rarely needed directly, but it is used by new.

getLockButtonTooltipLock :: (MonadIO m, IsLockButton o) => o -> m (Maybe Text) Source #

Get the value of the “tooltip-lock” property. When overloading is enabled, this is equivalent to

get lockButton #tooltipLock

setLockButtonTooltipLock :: (MonadIO m, IsLockButton o) => o -> Text -> m () Source #

Set the value of the “tooltip-lock” property. When overloading is enabled, this is equivalent to

set lockButton [ #tooltipLock := value ]

tooltipNotAuthorized

No description available in the introspection data.

clearLockButtonTooltipNotAuthorized :: (MonadIO m, IsLockButton o) => o -> m () Source #

Set the value of the “tooltip-not-authorized” property to Nothing. When overloading is enabled, this is equivalent to

clear #tooltipNotAuthorized

constructLockButtonTooltipNotAuthorized :: (IsLockButton o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “tooltip-not-authorized” property. This is rarely needed directly, but it is used by new.

getLockButtonTooltipNotAuthorized :: (MonadIO m, IsLockButton o) => o -> m (Maybe Text) Source #

Get the value of the “tooltip-not-authorized” property. When overloading is enabled, this is equivalent to

get lockButton #tooltipNotAuthorized

setLockButtonTooltipNotAuthorized :: (MonadIO m, IsLockButton o) => o -> Text -> m () Source #

Set the value of the “tooltip-not-authorized” property. When overloading is enabled, this is equivalent to

set lockButton [ #tooltipNotAuthorized := value ]

tooltipUnlock

No description available in the introspection data.

clearLockButtonTooltipUnlock :: (MonadIO m, IsLockButton o) => o -> m () Source #

Set the value of the “tooltip-unlock” property to Nothing. When overloading is enabled, this is equivalent to

clear #tooltipUnlock

constructLockButtonTooltipUnlock :: (IsLockButton o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “tooltip-unlock” property. This is rarely needed directly, but it is used by new.

getLockButtonTooltipUnlock :: (MonadIO m, IsLockButton o) => o -> m (Maybe Text) Source #

Get the value of the “tooltip-unlock” property. When overloading is enabled, this is equivalent to

get lockButton #tooltipUnlock

setLockButtonTooltipUnlock :: (MonadIO m, IsLockButton o) => o -> Text -> m () Source #

Set the value of the “tooltip-unlock” property. When overloading is enabled, this is equivalent to

set lockButton [ #tooltipUnlock := value ]