Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
SimplePermission
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 request or release will result in errors.
Synopsis
- newtype SimplePermission = SimplePermission (ManagedPtr SimplePermission)
- class GObject o => IsSimplePermission o
- toSimplePermission :: (MonadIO m, IsSimplePermission o) => o -> m SimplePermission
- noSimplePermission :: Maybe SimplePermission
- simplePermissionNew :: (HasCallStack, MonadIO m) => Bool -> m SimplePermission
Exported types
newtype SimplePermission Source #
Memory-managed wrapper type.
Instances
GObject SimplePermission Source # | |
Defined in GI.Gio.Objects.SimplePermission gobjectType :: SimplePermission -> IO GType # | |
IsObject SimplePermission Source # | |
Defined in GI.Gio.Objects.SimplePermission | |
IsPermission SimplePermission Source # | |
Defined in GI.Gio.Objects.SimplePermission | |
IsSimplePermission SimplePermission Source # | |
Defined in GI.Gio.Objects.SimplePermission |
class GObject o => IsSimplePermission o Source #
Type class for types which can be safely cast to SimplePermission
, for instance with toSimplePermission
.
Instances
(GObject a, (UnknownAncestorError SimplePermission a :: Constraint)) => IsSimplePermission a Source # | |
Defined in GI.Gio.Objects.SimplePermission | |
IsSimplePermission SimplePermission Source # | |
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
.
noSimplePermission :: Maybe SimplePermission Source #
A convenience alias for Nothing
:: Maybe
SimplePermission
.
Methods
new
:: (HasCallStack, MonadIO m) | |
=> Bool |
|
-> m SimplePermission | Returns: the |
Creates a new Permission
instance that represents an action that is
either always or never allowed.
Since: 2.26