gi-poppler-0.0.30.12: GI/Poppler/Objects/AnnotMovie.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.Poppler.Objects.AnnotMovie
(
-- * Exported types
AnnotMovie(..) ,
AnnotMovieK ,
toAnnotMovie ,
noAnnotMovie ,
-- * Methods
-- ** annotMovieGetMovie
annotMovieGetMovie ,
-- ** annotMovieGetTitle
annotMovieGetTitle ,
) 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.Poppler.Types
import GI.Poppler.Callbacks
import qualified GI.GObject as GObject
newtype AnnotMovie = AnnotMovie (ForeignPtr AnnotMovie)
foreign import ccall "poppler_annot_movie_get_type"
c_poppler_annot_movie_get_type :: IO GType
type instance ParentTypes AnnotMovie = AnnotMovieParentTypes
type AnnotMovieParentTypes = '[Annot, GObject.Object]
instance GObject AnnotMovie where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_poppler_annot_movie_get_type
class GObject o => AnnotMovieK o
instance (GObject o, IsDescendantOf AnnotMovie o) => AnnotMovieK o
toAnnotMovie :: AnnotMovieK o => o -> IO AnnotMovie
toAnnotMovie = unsafeCastTo AnnotMovie
noAnnotMovie :: Maybe AnnotMovie
noAnnotMovie = Nothing
type instance AttributeList AnnotMovie = AnnotMovieAttributeList
type AnnotMovieAttributeList = ('[ ] :: [(Symbol, *)])
type instance SignalList AnnotMovie = AnnotMovieSignalList
type AnnotMovieSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
-- method AnnotMovie::get_movie
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMovie", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMovie", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Poppler" "Movie"
-- throws : False
-- Skip return : False
foreign import ccall "poppler_annot_movie_get_movie" poppler_annot_movie_get_movie ::
Ptr AnnotMovie -> -- _obj : TInterface "Poppler" "AnnotMovie"
IO (Ptr Movie)
annotMovieGetMovie ::
(MonadIO m, AnnotMovieK a) =>
a -> -- _obj
m Movie
annotMovieGetMovie _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_annot_movie_get_movie _obj'
checkUnexpectedReturnNULL "poppler_annot_movie_get_movie" result
result' <- (newObject Movie) result
touchManagedPtr _obj
return result'
-- method AnnotMovie::get_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMovie", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Poppler" "AnnotMovie", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "poppler_annot_movie_get_title" poppler_annot_movie_get_title ::
Ptr AnnotMovie -> -- _obj : TInterface "Poppler" "AnnotMovie"
IO CString
annotMovieGetTitle ::
(MonadIO m, AnnotMovieK a) =>
a -> -- _obj
m T.Text
annotMovieGetTitle _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- poppler_annot_movie_get_title _obj'
checkUnexpectedReturnNULL "poppler_annot_movie_get_title" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'