#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.WebKit2.Objects.EditorState
(
EditorState(..) ,
IsEditorState ,
toEditorState ,
noEditorState ,
#if ENABLE_OVERLOADING
EditorStateGetTypingAttributesMethodInfo,
#endif
editorStateGetTypingAttributes ,
#if ENABLE_OVERLOADING
EditorStateIsCopyAvailableMethodInfo ,
#endif
editorStateIsCopyAvailable ,
#if ENABLE_OVERLOADING
EditorStateIsCutAvailableMethodInfo ,
#endif
editorStateIsCutAvailable ,
#if ENABLE_OVERLOADING
EditorStateIsPasteAvailableMethodInfo ,
#endif
editorStateIsPasteAvailable ,
#if ENABLE_OVERLOADING
EditorStateIsRedoAvailableMethodInfo ,
#endif
editorStateIsRedoAvailable ,
#if ENABLE_OVERLOADING
EditorStateIsUndoAvailableMethodInfo ,
#endif
editorStateIsUndoAvailable ,
#if ENABLE_OVERLOADING
EditorStateTypingAttributesPropertyInfo ,
#endif
#if 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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
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.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 GI.GObject.Objects.Object as GObject.Object
newtype EditorState = EditorState (ManagedPtr EditorState)
foreign import ccall "webkit_editor_state_get_type"
c_webkit_editor_state_get_type :: IO GType
instance GObject EditorState where
gobjectType = c_webkit_editor_state_get_type
class (GObject o, O.IsDescendantOf EditorState o) => IsEditorState o
instance (GObject o, O.IsDescendantOf EditorState o) => IsEditorState o
instance O.HasParentTypes EditorState
type instance O.ParentTypes EditorState = '[GObject.Object.Object]
toEditorState :: (MonadIO m, IsEditorState o) => o -> m EditorState
toEditorState = liftIO . unsafeCastTo EditorState
noEditorState :: Maybe EditorState
noEditorState = Nothing
#if 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 "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveEditorStateMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveEditorStateMethod t EditorState, O.MethodInfo info EditorState p) => OL.IsLabel t (EditorState -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
getEditorStateTypingAttributes :: (MonadIO m, IsEditorState o) => o -> m Word32
getEditorStateTypingAttributes obj = liftIO $ B.Properties.getObjectPropertyUInt32 obj "typing-attributes"
#if ENABLE_OVERLOADING
data EditorStateTypingAttributesPropertyInfo
instance AttrInfo EditorStateTypingAttributesPropertyInfo where
type AttrAllowedOps EditorStateTypingAttributesPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EditorStateTypingAttributesPropertyInfo = (~) ()
type AttrBaseTypeConstraint EditorStateTypingAttributesPropertyInfo = IsEditorState
type AttrGetType EditorStateTypingAttributesPropertyInfo = Word32
type AttrLabel EditorStateTypingAttributesPropertyInfo = "typing-attributes"
type AttrOrigin EditorStateTypingAttributesPropertyInfo = EditorState
attrGet _ = getEditorStateTypingAttributes
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList EditorState
type instance O.AttributeList EditorState = EditorStateAttributeList
type EditorStateAttributeList = ('[ '("typingAttributes", EditorStateTypingAttributesPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
editorStateTypingAttributes :: AttrLabelProxy "typingAttributes"
editorStateTypingAttributes = AttrLabelProxy
#endif
#if 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 editorState = liftIO $ do
editorState' <- unsafeManagedPtrCastPtr editorState
result <- webkit_editor_state_get_typing_attributes editorState'
touchManagedPtr editorState
return result
#if ENABLE_OVERLOADING
data EditorStateGetTypingAttributesMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsEditorState a) => O.MethodInfo EditorStateGetTypingAttributesMethodInfo a signature where
overloadedMethod _ = 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 editorState = liftIO $ do
editorState' <- unsafeManagedPtrCastPtr editorState
result <- webkit_editor_state_is_copy_available editorState'
let result' = (/= 0) result
touchManagedPtr editorState
return result'
#if ENABLE_OVERLOADING
data EditorStateIsCopyAvailableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsEditorState a) => O.MethodInfo EditorStateIsCopyAvailableMethodInfo a signature where
overloadedMethod _ = 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 editorState = liftIO $ do
editorState' <- unsafeManagedPtrCastPtr editorState
result <- webkit_editor_state_is_cut_available editorState'
let result' = (/= 0) result
touchManagedPtr editorState
return result'
#if ENABLE_OVERLOADING
data EditorStateIsCutAvailableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsEditorState a) => O.MethodInfo EditorStateIsCutAvailableMethodInfo a signature where
overloadedMethod _ = 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 editorState = liftIO $ do
editorState' <- unsafeManagedPtrCastPtr editorState
result <- webkit_editor_state_is_paste_available editorState'
let result' = (/= 0) result
touchManagedPtr editorState
return result'
#if ENABLE_OVERLOADING
data EditorStateIsPasteAvailableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsEditorState a) => O.MethodInfo EditorStateIsPasteAvailableMethodInfo a signature where
overloadedMethod _ = 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 editorState = liftIO $ do
editorState' <- unsafeManagedPtrCastPtr editorState
result <- webkit_editor_state_is_redo_available editorState'
let result' = (/= 0) result
touchManagedPtr editorState
return result'
#if ENABLE_OVERLOADING
data EditorStateIsRedoAvailableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsEditorState a) => O.MethodInfo EditorStateIsRedoAvailableMethodInfo a signature where
overloadedMethod _ = 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 editorState = liftIO $ do
editorState' <- unsafeManagedPtrCastPtr editorState
result <- webkit_editor_state_is_undo_available editorState'
let result' = (/= 0) result
touchManagedPtr editorState
return result'
#if ENABLE_OVERLOADING
data EditorStateIsUndoAvailableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsEditorState a) => O.MethodInfo EditorStateIsUndoAvailableMethodInfo a signature where
overloadedMethod _ = editorStateIsUndoAvailable
#endif