Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
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, IsDescendantOf SimplePermission 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
Eq SimplePermission Source # | |
Defined in GI.Gio.Objects.SimplePermission (==) :: SimplePermission -> SimplePermission -> Bool # (/=) :: SimplePermission -> SimplePermission -> Bool # | |
GObject SimplePermission Source # | |
Defined in GI.Gio.Objects.SimplePermission gobjectType :: IO GType # | |
IsGValue SimplePermission Source # | Convert |
Defined in GI.Gio.Objects.SimplePermission toGValue :: SimplePermission -> IO GValue # fromGValue :: GValue -> IO SimplePermission # | |
HasParentTypes SimplePermission Source # | |
Defined in GI.Gio.Objects.SimplePermission | |
type ParentTypes SimplePermission Source # | |
Defined in GI.Gio.Objects.SimplePermission |
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
(GObject o, IsDescendantOf SimplePermission o) => IsSimplePermission o 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
Overloaded 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