module GI.WebKit.Objects.DOMDOMPlugin
(
DOMDOMPlugin(..) ,
DOMDOMPluginK ,
toDOMDOMPlugin ,
noDOMDOMPlugin ,
dOMDOMPluginGetDescription ,
dOMDOMPluginGetFilename ,
dOMDOMPluginGetLength ,
dOMDOMPluginGetName ,
dOMDOMPluginItem ,
dOMDOMPluginNamedItem ,
DOMDOMPluginDescriptionPropertyInfo ,
getDOMDOMPluginDescription ,
DOMDOMPluginFilenamePropertyInfo ,
getDOMDOMPluginFilename ,
DOMDOMPluginLengthPropertyInfo ,
getDOMDOMPluginLength ,
DOMDOMPluginNamePropertyInfo ,
getDOMDOMPluginName ,
) 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.WebKit.Types
import GI.WebKit.Callbacks
import qualified GI.GObject as GObject
newtype DOMDOMPlugin = DOMDOMPlugin (ForeignPtr DOMDOMPlugin)
foreign import ccall "webkit_dom_dom_plugin_get_type"
c_webkit_dom_dom_plugin_get_type :: IO GType
type instance ParentTypes DOMDOMPlugin = DOMDOMPluginParentTypes
type DOMDOMPluginParentTypes = '[DOMObject, GObject.Object]
instance GObject DOMDOMPlugin where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_webkit_dom_dom_plugin_get_type
class GObject o => DOMDOMPluginK o
instance (GObject o, IsDescendantOf DOMDOMPlugin o) => DOMDOMPluginK o
toDOMDOMPlugin :: DOMDOMPluginK o => o -> IO DOMDOMPlugin
toDOMDOMPlugin = unsafeCastTo DOMDOMPlugin
noDOMDOMPlugin :: Maybe DOMDOMPlugin
noDOMDOMPlugin = Nothing
getDOMDOMPluginDescription :: (MonadIO m, DOMDOMPluginK o) => o -> m T.Text
getDOMDOMPluginDescription obj = liftIO $ getObjectPropertyString obj "description"
data DOMDOMPluginDescriptionPropertyInfo
instance AttrInfo DOMDOMPluginDescriptionPropertyInfo where
type AttrAllowedOps DOMDOMPluginDescriptionPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMDOMPluginDescriptionPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMDOMPluginDescriptionPropertyInfo = DOMDOMPluginK
type AttrGetType DOMDOMPluginDescriptionPropertyInfo = T.Text
type AttrLabel DOMDOMPluginDescriptionPropertyInfo = "DOMDOMPlugin::description"
attrGet _ = getDOMDOMPluginDescription
attrSet _ = undefined
attrConstruct _ = undefined
getDOMDOMPluginFilename :: (MonadIO m, DOMDOMPluginK o) => o -> m T.Text
getDOMDOMPluginFilename obj = liftIO $ getObjectPropertyString obj "filename"
data DOMDOMPluginFilenamePropertyInfo
instance AttrInfo DOMDOMPluginFilenamePropertyInfo where
type AttrAllowedOps DOMDOMPluginFilenamePropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMDOMPluginFilenamePropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMDOMPluginFilenamePropertyInfo = DOMDOMPluginK
type AttrGetType DOMDOMPluginFilenamePropertyInfo = T.Text
type AttrLabel DOMDOMPluginFilenamePropertyInfo = "DOMDOMPlugin::filename"
attrGet _ = getDOMDOMPluginFilename
attrSet _ = undefined
attrConstruct _ = undefined
getDOMDOMPluginLength :: (MonadIO m, DOMDOMPluginK o) => o -> m Word64
getDOMDOMPluginLength obj = liftIO $ getObjectPropertyUInt64 obj "length"
data DOMDOMPluginLengthPropertyInfo
instance AttrInfo DOMDOMPluginLengthPropertyInfo where
type AttrAllowedOps DOMDOMPluginLengthPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMDOMPluginLengthPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMDOMPluginLengthPropertyInfo = DOMDOMPluginK
type AttrGetType DOMDOMPluginLengthPropertyInfo = Word64
type AttrLabel DOMDOMPluginLengthPropertyInfo = "DOMDOMPlugin::length"
attrGet _ = getDOMDOMPluginLength
attrSet _ = undefined
attrConstruct _ = undefined
getDOMDOMPluginName :: (MonadIO m, DOMDOMPluginK o) => o -> m T.Text
getDOMDOMPluginName obj = liftIO $ getObjectPropertyString obj "name"
data DOMDOMPluginNamePropertyInfo
instance AttrInfo DOMDOMPluginNamePropertyInfo where
type AttrAllowedOps DOMDOMPluginNamePropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMDOMPluginNamePropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMDOMPluginNamePropertyInfo = DOMDOMPluginK
type AttrGetType DOMDOMPluginNamePropertyInfo = T.Text
type AttrLabel DOMDOMPluginNamePropertyInfo = "DOMDOMPlugin::name"
attrGet _ = getDOMDOMPluginName
attrSet _ = undefined
attrConstruct _ = undefined
type instance AttributeList DOMDOMPlugin = DOMDOMPluginAttributeList
type DOMDOMPluginAttributeList = ('[ '("core-object", DOMObjectCoreObjectPropertyInfo), '("description", DOMDOMPluginDescriptionPropertyInfo), '("filename", DOMDOMPluginFilenamePropertyInfo), '("length", DOMDOMPluginLengthPropertyInfo), '("name", DOMDOMPluginNamePropertyInfo)] :: [(Symbol, *)])
type instance SignalList DOMDOMPlugin = DOMDOMPluginSignalList
type DOMDOMPluginSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "webkit_dom_dom_plugin_get_description" webkit_dom_dom_plugin_get_description ::
Ptr DOMDOMPlugin ->
IO CString
dOMDOMPluginGetDescription ::
(MonadIO m, DOMDOMPluginK a) =>
a ->
m T.Text
dOMDOMPluginGetDescription _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_dom_plugin_get_description _obj'
checkUnexpectedReturnNULL "webkit_dom_dom_plugin_get_description" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_dom_plugin_get_filename" webkit_dom_dom_plugin_get_filename ::
Ptr DOMDOMPlugin ->
IO CString
dOMDOMPluginGetFilename ::
(MonadIO m, DOMDOMPluginK a) =>
a ->
m T.Text
dOMDOMPluginGetFilename _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_dom_plugin_get_filename _obj'
checkUnexpectedReturnNULL "webkit_dom_dom_plugin_get_filename" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_dom_plugin_get_length" webkit_dom_dom_plugin_get_length ::
Ptr DOMDOMPlugin ->
IO Word64
dOMDOMPluginGetLength ::
(MonadIO m, DOMDOMPluginK a) =>
a ->
m Word64
dOMDOMPluginGetLength _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_dom_plugin_get_length _obj'
touchManagedPtr _obj
return result
foreign import ccall "webkit_dom_dom_plugin_get_name" webkit_dom_dom_plugin_get_name ::
Ptr DOMDOMPlugin ->
IO CString
dOMDOMPluginGetName ::
(MonadIO m, DOMDOMPluginK a) =>
a ->
m T.Text
dOMDOMPluginGetName _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_dom_plugin_get_name _obj'
checkUnexpectedReturnNULL "webkit_dom_dom_plugin_get_name" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_dom_plugin_item" webkit_dom_dom_plugin_item ::
Ptr DOMDOMPlugin ->
Word64 ->
IO (Ptr DOMDOMMimeType)
dOMDOMPluginItem ::
(MonadIO m, DOMDOMPluginK a) =>
a ->
Word64 ->
m DOMDOMMimeType
dOMDOMPluginItem _obj index = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_dom_plugin_item _obj' index
checkUnexpectedReturnNULL "webkit_dom_dom_plugin_item" result
result' <- (wrapObject DOMDOMMimeType) result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_dom_plugin_named_item" webkit_dom_dom_plugin_named_item ::
Ptr DOMDOMPlugin ->
CString ->
IO (Ptr DOMDOMMimeType)
dOMDOMPluginNamedItem ::
(MonadIO m, DOMDOMPluginK a) =>
a ->
T.Text ->
m DOMDOMMimeType
dOMDOMPluginNamedItem _obj name = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
name' <- textToCString name
result <- webkit_dom_dom_plugin_named_item _obj' name'
checkUnexpectedReturnNULL "webkit_dom_dom_plugin_named_item" result
result' <- (wrapObject DOMDOMMimeType) result
touchManagedPtr _obj
freeMem name'
return result'