gi-gio-2.0.38: Gio bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gio.Objects.SimplePermission

Contents

- Exported types
- Methods
  - new

Description

`GSimplePermission` is a trivial implementation of `Permission` that represents a permission that is either always or never allowed. The value is given at construction and doesn’t change.

Calling `permissionAcquire` or `permissionRelease` on a `GSimplePermission` will result in errors.

Synopsis

- newtype SimplePermission = SimplePermission (ManagedPtr SimplePermission)
- class (GObject o, IsDescendantOf SimplePermission o) => IsSimplePermission o
- toSimplePermission :: (MonadIO m, IsSimplePermission o) => o -> m SimplePermission
- simplePermissionNew :: (HasCallStack, MonadIO m) => Bool -> m SimplePermission

# Exported types

newtype SimplePermission Source #

Memory-managed wrapper type.

Constructors

SimplePermission (ManagedPtr SimplePermission) |

#### Instances

Instances details

Eq SimplePermission Source # |
Instance details Defined in GI.Gio.Objects.SimplePermission Methods (==) :: SimplePermission -> SimplePermission -> Bool Source # (/=) :: SimplePermission -> SimplePermission -> Bool Source #
GObject SimplePermission Source # |
Instance details Defined in GI.Gio.Objects.SimplePermission
ManagedPtrNewtype SimplePermission Source # |
Instance details Defined in GI.Gio.Objects.SimplePermission Methods toManagedPtr :: SimplePermission -> ManagedPtr SimplePermission Source #
TypedObject SimplePermission Source # |
Instance details Defined in GI.Gio.Objects.SimplePermission Methods glibType :: IO GType Source #
HasParentTypes SimplePermission Source # |
Instance details Defined in GI.Gio.Objects.SimplePermission
IsGValue (Maybe SimplePermission) Source # | Convert `SimplePermission` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gio.Objects.SimplePermission Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe SimplePermission -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe SimplePermission) Source #
type ParentTypes SimplePermission Source # |
Instance details Defined in GI.Gio.Objects.SimplePermission type ParentTypes SimplePermission = '[Permission, Object]

class (GObject o, IsDescendantOf SimplePermission o) => IsSimplePermission o Source #

Type class for types which can be safely cast to `SimplePermission`, for instance with `toSimplePermission`.

#### Instances

Instances details

(GObject o, IsDescendantOf SimplePermission o) => IsSimplePermission o Source # |
Instance details Defined in GI.Gio.Objects.SimplePermission

toSimplePermission :: (MonadIO m, IsSimplePermission o) => o -> m SimplePermission Source #

Cast to `SimplePermission`, 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

acquire, acquireAsync, acquireFinish, bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, implUpdate, isFloating, notify, notifyByPspec, ref, refSink, release, releaseAsync, releaseFinish, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getAllowed, getCanAcquire, getCanRelease, getData, getProperty, getQdata.

#### Setters

setData, setDataFull, setProperty.

## new

simplePermissionNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Bool | `allowed`: `True` if the action is allowed
-> m SimplePermission | Returns: the `SimplePermission`, as a `Permission`

Creates a new `Permission` instance that represents an action that is either always or never allowed.

Since: 2.26