{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.WebKit2.Objects.EditorState
(
EditorState(..) ,
IsEditorState ,
toEditorState ,
#if defined(ENABLE_OVERLOADING)
ResolveEditorStateMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
EditorStateGetTypingAttributesMethodInfo,
#endif
editorStateGetTypingAttributes ,
#if defined(ENABLE_OVERLOADING)
EditorStateIsCopyAvailableMethodInfo ,
#endif
editorStateIsCopyAvailable ,
#if defined(ENABLE_OVERLOADING)
EditorStateIsCutAvailableMethodInfo ,
#endif
editorStateIsCutAvailable ,
#if defined(ENABLE_OVERLOADING)
EditorStateIsPasteAvailableMethodInfo ,
#endif
editorStateIsPasteAvailable ,
#if defined(ENABLE_OVERLOADING)
EditorStateIsRedoAvailableMethodInfo ,
#endif
editorStateIsRedoAvailable ,
#if defined(ENABLE_OVERLOADING)
EditorStateIsUndoAvailableMethodInfo ,
#endif
editorStateIsUndoAvailable ,
#if defined(ENABLE_OVERLOADING)
EditorStateTypingAttributesPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
editorStateTypingAttributes ,
#endif
getEditorStateTypingAttributes ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified GI.GObject.Objects.Object as GObject.Object
newtype EditorState = EditorState (SP.ManagedPtr EditorState)
deriving (EditorState -> EditorState -> Bool
(EditorState -> EditorState -> Bool)
-> (EditorState -> EditorState -> Bool) -> Eq EditorState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EditorState -> EditorState -> Bool
== :: EditorState -> EditorState -> Bool
$c/= :: EditorState -> EditorState -> Bool
/= :: EditorState -> EditorState -> Bool
Eq)
instance SP.ManagedPtrNewtype EditorState where
toManagedPtr :: EditorState -> ManagedPtr EditorState
toManagedPtr (EditorState ManagedPtr EditorState
p) = ManagedPtr EditorState
p
foreign import ccall "webkit_editor_state_get_type"
c_webkit_editor_state_get_type :: IO B.Types.GType
instance B.Types.TypedObject EditorState where
glibType :: IO GType
glibType = IO GType
c_webkit_editor_state_get_type
instance B.Types.GObject EditorState
class (SP.GObject o, O.IsDescendantOf EditorState o) => IsEditorState o
instance (SP.GObject o, O.IsDescendantOf EditorState o) => IsEditorState o
instance O.HasParentTypes EditorState
type instance O.ParentTypes EditorState = '[GObject.Object.Object]
toEditorState :: (MIO.MonadIO m, IsEditorState o) => o -> m EditorState
toEditorState :: forall (m :: * -> *) o.
(MonadIO m, IsEditorState o) =>
o -> m EditorState
toEditorState = IO EditorState -> m EditorState
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO EditorState -> m EditorState)
-> (o -> IO EditorState) -> o -> m EditorState
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr EditorState -> EditorState) -> o -> IO EditorState
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr EditorState -> EditorState
EditorState
instance B.GValue.IsGValue (Maybe EditorState) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_webkit_editor_state_get_type
gvalueSet_ :: Ptr GValue -> Maybe EditorState -> IO ()
gvalueSet_ Ptr GValue
gv Maybe EditorState
P.Nothing = Ptr GValue -> Ptr EditorState -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr EditorState
forall a. Ptr a
FP.nullPtr :: FP.Ptr EditorState)
gvalueSet_ Ptr GValue
gv (P.Just EditorState
obj) = EditorState -> (Ptr EditorState -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr EditorState
obj (Ptr GValue -> Ptr EditorState -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe EditorState)
gvalueGet_ Ptr GValue
gv = do
Ptr EditorState
ptr <- Ptr GValue -> IO (Ptr EditorState)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr EditorState)
if Ptr EditorState
ptr Ptr EditorState -> Ptr EditorState -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr EditorState
forall a. Ptr a
FP.nullPtr
then EditorState -> Maybe EditorState
forall a. a -> Maybe a
P.Just (EditorState -> Maybe EditorState)
-> IO EditorState -> IO (Maybe EditorState)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr EditorState -> EditorState)
-> Ptr EditorState -> IO EditorState
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr EditorState -> EditorState
EditorState Ptr EditorState
ptr
else Maybe EditorState -> IO (Maybe EditorState)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe EditorState
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveEditorStateMethod (t :: Symbol) (o :: *) :: * where
ResolveEditorStateMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveEditorStateMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveEditorStateMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveEditorStateMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveEditorStateMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveEditorStateMethod "isCopyAvailable" o = EditorStateIsCopyAvailableMethodInfo
ResolveEditorStateMethod "isCutAvailable" o = EditorStateIsCutAvailableMethodInfo
ResolveEditorStateMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveEditorStateMethod "isPasteAvailable" o = EditorStateIsPasteAvailableMethodInfo
ResolveEditorStateMethod "isRedoAvailable" o = EditorStateIsRedoAvailableMethodInfo
ResolveEditorStateMethod "isUndoAvailable" o = EditorStateIsUndoAvailableMethodInfo
ResolveEditorStateMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveEditorStateMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveEditorStateMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveEditorStateMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveEditorStateMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveEditorStateMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveEditorStateMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveEditorStateMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveEditorStateMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveEditorStateMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveEditorStateMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveEditorStateMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveEditorStateMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveEditorStateMethod "getTypingAttributes" o = EditorStateGetTypingAttributesMethodInfo
ResolveEditorStateMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveEditorStateMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveEditorStateMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveEditorStateMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveEditorStateMethod t EditorState, O.OverloadedMethod info EditorState p) => OL.IsLabel t (EditorState -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveEditorStateMethod t EditorState, O.OverloadedMethod info EditorState p, R.HasField t EditorState p) => R.HasField t EditorState p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveEditorStateMethod t EditorState, O.OverloadedMethodInfo info EditorState) => OL.IsLabel t (O.MethodProxy info EditorState) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getEditorStateTypingAttributes :: (MonadIO m, IsEditorState o) => o -> m Word32
getEditorStateTypingAttributes :: forall (m :: * -> *) o.
(MonadIO m, IsEditorState o) =>
o -> m Word32
getEditorStateTypingAttributes o
obj = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"typing-attributes"
#if defined(ENABLE_OVERLOADING)
data EditorStateTypingAttributesPropertyInfo
instance AttrInfo EditorStateTypingAttributesPropertyInfo where
type AttrAllowedOps EditorStateTypingAttributesPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint EditorStateTypingAttributesPropertyInfo = IsEditorState
type AttrSetTypeConstraint EditorStateTypingAttributesPropertyInfo = (~) ()
type AttrTransferTypeConstraint EditorStateTypingAttributesPropertyInfo = (~) ()
type AttrTransferType EditorStateTypingAttributesPropertyInfo = ()
type AttrGetType EditorStateTypingAttributesPropertyInfo = Word32
type AttrLabel EditorStateTypingAttributesPropertyInfo = "typing-attributes"
type AttrOrigin EditorStateTypingAttributesPropertyInfo = EditorState
attrGet = getEditorStateTypingAttributes
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2.Objects.EditorState.typingAttributes"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.29/docs/GI-WebKit2-Objects-EditorState.html#g:attr:typingAttributes"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList EditorState
type instance O.AttributeList EditorState = EditorStateAttributeList
type EditorStateAttributeList = ('[ '("typingAttributes", EditorStateTypingAttributesPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
editorStateTypingAttributes :: AttrLabelProxy "typingAttributes"
editorStateTypingAttributes = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList EditorState = EditorStateSignalList
type EditorStateSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "webkit_editor_state_get_typing_attributes" webkit_editor_state_get_typing_attributes ::
Ptr EditorState ->
IO Word32
editorStateGetTypingAttributes ::
(B.CallStack.HasCallStack, MonadIO m, IsEditorState a) =>
a
-> m Word32
editorStateGetTypingAttributes :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEditorState a) =>
a -> m Word32
editorStateGetTypingAttributes a
editorState = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr EditorState
editorState' <- a -> IO (Ptr EditorState)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editorState
Word32
result <- Ptr EditorState -> IO Word32
webkit_editor_state_get_typing_attributes Ptr EditorState
editorState'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
editorState
Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data EditorStateGetTypingAttributesMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsEditorState a) => O.OverloadedMethod EditorStateGetTypingAttributesMethodInfo a signature where
overloadedMethod = editorStateGetTypingAttributes
instance O.OverloadedMethodInfo EditorStateGetTypingAttributesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2.Objects.EditorState.editorStateGetTypingAttributes",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.29/docs/GI-WebKit2-Objects-EditorState.html#v:editorStateGetTypingAttributes"
})
#endif
foreign import ccall "webkit_editor_state_is_copy_available" webkit_editor_state_is_copy_available ::
Ptr EditorState ->
IO CInt
editorStateIsCopyAvailable ::
(B.CallStack.HasCallStack, MonadIO m, IsEditorState a) =>
a
-> m Bool
editorStateIsCopyAvailable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEditorState a) =>
a -> m Bool
editorStateIsCopyAvailable a
editorState = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr EditorState
editorState' <- a -> IO (Ptr EditorState)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editorState
CInt
result <- Ptr EditorState -> IO CInt
webkit_editor_state_is_copy_available Ptr EditorState
editorState'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
editorState
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data EditorStateIsCopyAvailableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsEditorState a) => O.OverloadedMethod EditorStateIsCopyAvailableMethodInfo a signature where
overloadedMethod = editorStateIsCopyAvailable
instance O.OverloadedMethodInfo EditorStateIsCopyAvailableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2.Objects.EditorState.editorStateIsCopyAvailable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.29/docs/GI-WebKit2-Objects-EditorState.html#v:editorStateIsCopyAvailable"
})
#endif
foreign import ccall "webkit_editor_state_is_cut_available" webkit_editor_state_is_cut_available ::
Ptr EditorState ->
IO CInt
editorStateIsCutAvailable ::
(B.CallStack.HasCallStack, MonadIO m, IsEditorState a) =>
a
-> m Bool
editorStateIsCutAvailable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEditorState a) =>
a -> m Bool
editorStateIsCutAvailable a
editorState = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr EditorState
editorState' <- a -> IO (Ptr EditorState)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editorState
CInt
result <- Ptr EditorState -> IO CInt
webkit_editor_state_is_cut_available Ptr EditorState
editorState'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
editorState
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data EditorStateIsCutAvailableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsEditorState a) => O.OverloadedMethod EditorStateIsCutAvailableMethodInfo a signature where
overloadedMethod = editorStateIsCutAvailable
instance O.OverloadedMethodInfo EditorStateIsCutAvailableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2.Objects.EditorState.editorStateIsCutAvailable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.29/docs/GI-WebKit2-Objects-EditorState.html#v:editorStateIsCutAvailable"
})
#endif
foreign import ccall "webkit_editor_state_is_paste_available" webkit_editor_state_is_paste_available ::
Ptr EditorState ->
IO CInt
editorStateIsPasteAvailable ::
(B.CallStack.HasCallStack, MonadIO m, IsEditorState a) =>
a
-> m Bool
editorStateIsPasteAvailable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEditorState a) =>
a -> m Bool
editorStateIsPasteAvailable a
editorState = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr EditorState
editorState' <- a -> IO (Ptr EditorState)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editorState
CInt
result <- Ptr EditorState -> IO CInt
webkit_editor_state_is_paste_available Ptr EditorState
editorState'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
editorState
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data EditorStateIsPasteAvailableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsEditorState a) => O.OverloadedMethod EditorStateIsPasteAvailableMethodInfo a signature where
overloadedMethod = editorStateIsPasteAvailable
instance O.OverloadedMethodInfo EditorStateIsPasteAvailableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2.Objects.EditorState.editorStateIsPasteAvailable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.29/docs/GI-WebKit2-Objects-EditorState.html#v:editorStateIsPasteAvailable"
})
#endif
foreign import ccall "webkit_editor_state_is_redo_available" webkit_editor_state_is_redo_available ::
Ptr EditorState ->
IO CInt
editorStateIsRedoAvailable ::
(B.CallStack.HasCallStack, MonadIO m, IsEditorState a) =>
a
-> m Bool
editorStateIsRedoAvailable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEditorState a) =>
a -> m Bool
editorStateIsRedoAvailable a
editorState = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr EditorState
editorState' <- a -> IO (Ptr EditorState)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editorState
CInt
result <- Ptr EditorState -> IO CInt
webkit_editor_state_is_redo_available Ptr EditorState
editorState'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
editorState
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data EditorStateIsRedoAvailableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsEditorState a) => O.OverloadedMethod EditorStateIsRedoAvailableMethodInfo a signature where
overloadedMethod = editorStateIsRedoAvailable
instance O.OverloadedMethodInfo EditorStateIsRedoAvailableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2.Objects.EditorState.editorStateIsRedoAvailable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.29/docs/GI-WebKit2-Objects-EditorState.html#v:editorStateIsRedoAvailable"
})
#endif
foreign import ccall "webkit_editor_state_is_undo_available" webkit_editor_state_is_undo_available ::
Ptr EditorState ->
IO CInt
editorStateIsUndoAvailable ::
(B.CallStack.HasCallStack, MonadIO m, IsEditorState a) =>
a
-> m Bool
editorStateIsUndoAvailable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEditorState a) =>
a -> m Bool
editorStateIsUndoAvailable a
editorState = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr EditorState
editorState' <- a -> IO (Ptr EditorState)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
editorState
CInt
result <- Ptr EditorState -> IO CInt
webkit_editor_state_is_undo_available Ptr EditorState
editorState'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
editorState
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data EditorStateIsUndoAvailableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsEditorState a) => O.OverloadedMethod EditorStateIsUndoAvailableMethodInfo a signature where
overloadedMethod = editorStateIsUndoAvailable
instance O.OverloadedMethodInfo EditorStateIsUndoAvailableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2.Objects.EditorState.editorStateIsUndoAvailable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.29/docs/GI-WebKit2-Objects-EditorState.html#v:editorStateIsUndoAvailable"
})
#endif