{- | 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.Pango.Objects.FontsetSimple ( -- * Exported types FontsetSimple(..) , FontsetSimpleK , toFontsetSimple , noFontsetSimple , -- * Methods -- ** fontsetSimpleAppend fontsetSimpleAppend , -- ** fontsetSimpleNew fontsetSimpleNew , -- ** fontsetSimpleSize fontsetSimpleSize , ) 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.Pango.Types import GI.Pango.Callbacks import qualified GI.GObject as GObject newtype FontsetSimple = FontsetSimple (ForeignPtr FontsetSimple) foreign import ccall "pango_fontset_simple_get_type" c_pango_fontset_simple_get_type :: IO GType type instance ParentTypes FontsetSimple = FontsetSimpleParentTypes type FontsetSimpleParentTypes = '[Fontset, GObject.Object] instance GObject FontsetSimple where gobjectIsInitiallyUnowned _ = False gobjectType _ = c_pango_fontset_simple_get_type class GObject o => FontsetSimpleK o instance (GObject o, IsDescendantOf FontsetSimple o) => FontsetSimpleK o toFontsetSimple :: FontsetSimpleK o => o -> IO FontsetSimple toFontsetSimple = unsafeCastTo FontsetSimple noFontsetSimple :: Maybe FontsetSimple noFontsetSimple = Nothing type instance AttributeList FontsetSimple = FontsetSimpleAttributeList type FontsetSimpleAttributeList = ('[ ] :: [(Symbol, *)]) type instance SignalList FontsetSimple = FontsetSimpleSignalList type FontsetSimpleSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)]) -- method FontsetSimple::new -- method type : Constructor -- Args : [Arg {argName = "language", argType = TInterface "Pango" "Language", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "language", argType = TInterface "Pango" "Language", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Pango" "FontsetSimple" -- throws : False -- Skip return : False foreign import ccall "pango_fontset_simple_new" pango_fontset_simple_new :: Ptr Language -> -- language : TInterface "Pango" "Language" IO (Ptr FontsetSimple) fontsetSimpleNew :: (MonadIO m) => Language -> -- language m FontsetSimple fontsetSimpleNew language = liftIO $ do let language' = unsafeManagedPtrGetPtr language result <- pango_fontset_simple_new language' checkUnexpectedReturnNULL "pango_fontset_simple_new" result result' <- (wrapObject FontsetSimple) result touchManagedPtr language return result' -- method FontsetSimple::append -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "FontsetSimple", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "font", argType = TInterface "Pango" "Font", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "FontsetSimple", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "font", argType = TInterface "Pango" "Font", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_fontset_simple_append" pango_fontset_simple_append :: Ptr FontsetSimple -> -- _obj : TInterface "Pango" "FontsetSimple" Ptr Font -> -- font : TInterface "Pango" "Font" IO () fontsetSimpleAppend :: (MonadIO m, FontsetSimpleK a, FontK b) => a -> -- _obj b -> -- font m () fontsetSimpleAppend _obj font = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let font' = unsafeManagedPtrCastPtr font pango_fontset_simple_append _obj' font' touchManagedPtr _obj touchManagedPtr font return () -- method FontsetSimple::size -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "FontsetSimple", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "FontsetSimple", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TInt32 -- throws : False -- Skip return : False foreign import ccall "pango_fontset_simple_size" pango_fontset_simple_size :: Ptr FontsetSimple -> -- _obj : TInterface "Pango" "FontsetSimple" IO Int32 fontsetSimpleSize :: (MonadIO m, FontsetSimpleK a) => a -> -- _obj m Int32 fontsetSimpleSize _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_fontset_simple_size _obj' touchManagedPtr _obj return result