gi-webkit2-0.2.8.12: GI/WebKit2/Objects/BackForwardListItem.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}
module GI.WebKit2.Objects.BackForwardListItem
(
-- * Exported types
BackForwardListItem(..) ,
BackForwardListItemK ,
toBackForwardListItem ,
noBackForwardListItem ,
-- * Methods
-- ** backForwardListItemGetOriginalUri
backForwardListItemGetOriginalUri ,
-- ** backForwardListItemGetTitle
backForwardListItemGetTitle ,
-- ** backForwardListItemGetUri
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, *)])
-- method BackForwardListItem::get_original_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardListItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardListItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "webkit_back_forward_list_item_get_original_uri" webkit_back_forward_list_item_get_original_uri ::
Ptr BackForwardListItem -> -- _obj : TInterface "WebKit2" "BackForwardListItem"
IO CString
backForwardListItemGetOriginalUri ::
(MonadIO m, BackForwardListItemK a) =>
a -> -- _obj
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'
-- method BackForwardListItem::get_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardListItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardListItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "webkit_back_forward_list_item_get_title" webkit_back_forward_list_item_get_title ::
Ptr BackForwardListItem -> -- _obj : TInterface "WebKit2" "BackForwardListItem"
IO CString
backForwardListItemGetTitle ::
(MonadIO m, BackForwardListItemK a) =>
a -> -- _obj
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'
-- method BackForwardListItem::get_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardListItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardListItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "webkit_back_forward_list_item_get_uri" webkit_back_forward_list_item_get_uri ::
Ptr BackForwardListItem -> -- _obj : TInterface "WebKit2" "BackForwardListItem"
IO CString
backForwardListItemGetUri ::
(MonadIO m, BackForwardListItemK a) =>
a -> -- _obj
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'