module GI.WebKit2.Objects.EditorState
(
EditorState(..) ,
EditorStateK ,
toEditorState ,
noEditorState ,
editorStateGetTypingAttributes ,
EditorStateTypingAttributesPropertyInfo ,
getEditorStateTypingAttributes ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.WebKit2.Types
import GI.WebKit2.Callbacks
import qualified GI.GObject as GObject
newtype EditorState = EditorState (ForeignPtr EditorState)
foreign import ccall "webkit_editor_state_get_type"
c_webkit_editor_state_get_type :: IO GType
type instance ParentTypes EditorState = EditorStateParentTypes
type EditorStateParentTypes = '[GObject.Object]
instance GObject EditorState where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_webkit_editor_state_get_type
class GObject o => EditorStateK o
instance (GObject o, IsDescendantOf EditorState o) => EditorStateK o
toEditorState :: EditorStateK o => o -> IO EditorState
toEditorState = unsafeCastTo EditorState
noEditorState :: Maybe EditorState
noEditorState = Nothing
getEditorStateTypingAttributes :: (MonadIO m, EditorStateK o) => o -> m Word32
getEditorStateTypingAttributes obj = liftIO $ getObjectPropertyCUInt obj "typing-attributes"
data EditorStateTypingAttributesPropertyInfo
instance AttrInfo EditorStateTypingAttributesPropertyInfo where
type AttrAllowedOps EditorStateTypingAttributesPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EditorStateTypingAttributesPropertyInfo = (~) ()
type AttrBaseTypeConstraint EditorStateTypingAttributesPropertyInfo = EditorStateK
type AttrGetType EditorStateTypingAttributesPropertyInfo = Word32
type AttrLabel EditorStateTypingAttributesPropertyInfo = "EditorState::typing-attributes"
attrGet _ = getEditorStateTypingAttributes
attrSet _ = undefined
attrConstruct _ = undefined
type instance AttributeList EditorState = EditorStateAttributeList
type EditorStateAttributeList = ('[ '("typing-attributes", EditorStateTypingAttributesPropertyInfo)] :: [(Symbol, *)])
type instance SignalList EditorState = EditorStateSignalList
type EditorStateSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "webkit_editor_state_get_typing_attributes" webkit_editor_state_get_typing_attributes ::
Ptr EditorState ->
IO Word32
editorStateGetTypingAttributes ::
(MonadIO m, EditorStateK a) =>
a ->
m Word32
editorStateGetTypingAttributes _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_editor_state_get_typing_attributes _obj'
touchManagedPtr _obj
return result