module GI.WebKit2.Objects.BackForwardListItem
(
BackForwardListItem(..) ,
BackForwardListItemK ,
toBackForwardListItem ,
noBackForwardListItem ,
backForwardListItemGetOriginalUri ,
backForwardListItemGetTitle ,
backForwardListItemGetUri ,
) 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 BackForwardListItem = BackForwardListItem (ForeignPtr BackForwardListItem)
foreign import ccall "webkit_back_forward_list_item_get_type"
c_webkit_back_forward_list_item_get_type :: IO GType
type instance ParentTypes BackForwardListItem = BackForwardListItemParentTypes
type BackForwardListItemParentTypes = '[GObject.Object]
instance GObject BackForwardListItem where
gobjectIsInitiallyUnowned _ = True
gobjectType _ = c_webkit_back_forward_list_item_get_type
class GObject o => BackForwardListItemK o
instance (GObject o, IsDescendantOf BackForwardListItem o) => BackForwardListItemK o
toBackForwardListItem :: BackForwardListItemK o => o -> IO BackForwardListItem
toBackForwardListItem = unsafeCastTo BackForwardListItem
noBackForwardListItem :: Maybe BackForwardListItem
noBackForwardListItem = Nothing
type instance AttributeList BackForwardListItem = BackForwardListItemAttributeList
type BackForwardListItemAttributeList = ('[ ] :: [(Symbol, *)])
type instance SignalList BackForwardListItem = BackForwardListItemSignalList
type BackForwardListItemSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "webkit_back_forward_list_item_get_original_uri" webkit_back_forward_list_item_get_original_uri ::
Ptr BackForwardListItem ->
IO CString
backForwardListItemGetOriginalUri ::
(MonadIO m, BackForwardListItemK a) =>
a ->
m T.Text
backForwardListItemGetOriginalUri _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_back_forward_list_item_get_original_uri _obj'
checkUnexpectedReturnNULL "webkit_back_forward_list_item_get_original_uri" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_back_forward_list_item_get_title" webkit_back_forward_list_item_get_title ::
Ptr BackForwardListItem ->
IO CString
backForwardListItemGetTitle ::
(MonadIO m, BackForwardListItemK a) =>
a ->
m T.Text
backForwardListItemGetTitle _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_back_forward_list_item_get_title _obj'
checkUnexpectedReturnNULL "webkit_back_forward_list_item_get_title" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_back_forward_list_item_get_uri" webkit_back_forward_list_item_get_uri ::
Ptr BackForwardListItem ->
IO CString
backForwardListItemGetUri ::
(MonadIO m, BackForwardListItemK a) =>
a ->
m T.Text
backForwardListItemGetUri _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_back_forward_list_item_get_uri _obj'
checkUnexpectedReturnNULL "webkit_back_forward_list_item_get_uri" result
result' <- cstringToText result
touchManagedPtr _obj
return result'