{- | 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.Layout ( -- * Exported types Layout(..) , LayoutK , toLayout , noLayout , -- * Methods -- ** layoutContextChanged layoutContextChanged , -- ** layoutCopy layoutCopy , -- ** layoutGetAlignment layoutGetAlignment , -- ** layoutGetAttributes layoutGetAttributes , -- ** layoutGetAutoDir layoutGetAutoDir , -- ** layoutGetBaseline layoutGetBaseline , -- ** layoutGetCharacterCount layoutGetCharacterCount , -- ** layoutGetContext layoutGetContext , -- ** layoutGetCursorPos layoutGetCursorPos , -- ** layoutGetEllipsize layoutGetEllipsize , -- ** layoutGetExtents layoutGetExtents , -- ** layoutGetFontDescription layoutGetFontDescription , -- ** layoutGetHeight layoutGetHeight , -- ** layoutGetIndent layoutGetIndent , -- ** layoutGetIter layoutGetIter , -- ** layoutGetJustify layoutGetJustify , -- ** layoutGetLine layoutGetLine , -- ** layoutGetLineCount layoutGetLineCount , -- ** layoutGetLineReadonly layoutGetLineReadonly , -- ** layoutGetLines layoutGetLines , -- ** layoutGetLinesReadonly layoutGetLinesReadonly , -- ** layoutGetLogAttrs layoutGetLogAttrs , -- ** layoutGetLogAttrsReadonly layoutGetLogAttrsReadonly , -- ** layoutGetPixelExtents layoutGetPixelExtents , -- ** layoutGetPixelSize layoutGetPixelSize , -- ** layoutGetSerial layoutGetSerial , -- ** layoutGetSingleParagraphMode layoutGetSingleParagraphMode , -- ** layoutGetSize layoutGetSize , -- ** layoutGetSpacing layoutGetSpacing , -- ** layoutGetTabs layoutGetTabs , -- ** layoutGetText layoutGetText , -- ** layoutGetUnknownGlyphsCount layoutGetUnknownGlyphsCount , -- ** layoutGetWidth layoutGetWidth , -- ** layoutGetWrap layoutGetWrap , -- ** layoutIndexToLineX layoutIndexToLineX , -- ** layoutIndexToPos layoutIndexToPos , -- ** layoutIsEllipsized layoutIsEllipsized , -- ** layoutIsWrapped layoutIsWrapped , -- ** layoutMoveCursorVisually layoutMoveCursorVisually , -- ** layoutNew layoutNew , -- ** layoutSetAlignment layoutSetAlignment , -- ** layoutSetAttributes layoutSetAttributes , -- ** layoutSetAutoDir layoutSetAutoDir , -- ** layoutSetEllipsize layoutSetEllipsize , -- ** layoutSetFontDescription layoutSetFontDescription , -- ** layoutSetHeight layoutSetHeight , -- ** layoutSetIndent layoutSetIndent , -- ** layoutSetJustify layoutSetJustify , -- ** layoutSetMarkup layoutSetMarkup , -- ** layoutSetMarkupWithAccel layoutSetMarkupWithAccel , -- ** layoutSetSingleParagraphMode layoutSetSingleParagraphMode , -- ** layoutSetSpacing layoutSetSpacing , -- ** layoutSetTabs layoutSetTabs , -- ** layoutSetText layoutSetText , -- ** layoutSetWidth layoutSetWidth , -- ** layoutSetWrap layoutSetWrap , -- ** layoutXyToIndex layoutXyToIndex , ) 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 Layout = Layout (ForeignPtr Layout) foreign import ccall "pango_layout_get_type" c_pango_layout_get_type :: IO GType type instance ParentTypes Layout = LayoutParentTypes type LayoutParentTypes = '[GObject.Object] instance GObject Layout where gobjectIsInitiallyUnowned _ = False gobjectType _ = c_pango_layout_get_type class GObject o => LayoutK o instance (GObject o, IsDescendantOf Layout o) => LayoutK o toLayout :: LayoutK o => o -> IO Layout toLayout = unsafeCastTo Layout noLayout :: Maybe Layout noLayout = Nothing type instance AttributeList Layout = LayoutAttributeList type LayoutAttributeList = ('[ ] :: [(Symbol, *)]) type instance SignalList Layout = LayoutSignalList type LayoutSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)]) -- method Layout::new -- method type : Constructor -- Args : [Arg {argName = "context", argType = TInterface "Pango" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "context", argType = TInterface "Pango" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Pango" "Layout" -- throws : False -- Skip return : False foreign import ccall "pango_layout_new" pango_layout_new :: Ptr Context -> -- context : TInterface "Pango" "Context" IO (Ptr Layout) layoutNew :: (MonadIO m, ContextK a) => a -> -- context m Layout layoutNew context = liftIO $ do let context' = unsafeManagedPtrCastPtr context result <- pango_layout_new context' checkUnexpectedReturnNULL "pango_layout_new" result result' <- (wrapObject Layout) result touchManagedPtr context return result' -- method Layout::context_changed -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_context_changed" pango_layout_context_changed :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO () layoutContextChanged :: (MonadIO m, LayoutK a) => a -> -- _obj m () layoutContextChanged _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj pango_layout_context_changed _obj' touchManagedPtr _obj return () -- method Layout::copy -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Pango" "Layout" -- throws : False -- Skip return : False foreign import ccall "pango_layout_copy" pango_layout_copy :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO (Ptr Layout) layoutCopy :: (MonadIO m, LayoutK a) => a -> -- _obj m Layout layoutCopy _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_copy _obj' checkUnexpectedReturnNULL "pango_layout_copy" result result' <- (wrapObject Layout) result touchManagedPtr _obj return result' -- method Layout::get_alignment -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Pango" "Alignment" -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_alignment" pango_layout_get_alignment :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO CUInt layoutGetAlignment :: (MonadIO m, LayoutK a) => a -> -- _obj m Alignment layoutGetAlignment _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_alignment _obj' let result' = (toEnum . fromIntegral) result touchManagedPtr _obj return result' -- method Layout::get_attributes -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Pango" "AttrList" -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_attributes" pango_layout_get_attributes :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO (Ptr AttrList) layoutGetAttributes :: (MonadIO m, LayoutK a) => a -> -- _obj m AttrList layoutGetAttributes _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_attributes _obj' checkUnexpectedReturnNULL "pango_layout_get_attributes" result result' <- (newBoxed AttrList) result touchManagedPtr _obj return result' -- method Layout::get_auto_dir -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_auto_dir" pango_layout_get_auto_dir :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO CInt layoutGetAutoDir :: (MonadIO m, LayoutK a) => a -> -- _obj m Bool layoutGetAutoDir _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_auto_dir _obj' let result' = (/= 0) result touchManagedPtr _obj return result' -- method Layout::get_baseline -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TInt32 -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_baseline" pango_layout_get_baseline :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO Int32 layoutGetBaseline :: (MonadIO m, LayoutK a) => a -> -- _obj m Int32 layoutGetBaseline _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_baseline _obj' touchManagedPtr _obj return result -- method Layout::get_character_count -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TInt32 -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_character_count" pango_layout_get_character_count :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO Int32 layoutGetCharacterCount :: (MonadIO m, LayoutK a) => a -> -- _obj m Int32 layoutGetCharacterCount _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_character_count _obj' touchManagedPtr _obj return result -- method Layout::get_context -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Pango" "Context" -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_context" pango_layout_get_context :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO (Ptr Context) layoutGetContext :: (MonadIO m, LayoutK a) => a -> -- _obj m Context layoutGetContext _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_context _obj' checkUnexpectedReturnNULL "pango_layout_get_context" result result' <- (newObject Context) result touchManagedPtr _obj return result' -- method Layout::get_cursor_pos -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "strong_pos", argType = TInterface "Pango" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "weak_pos", argType = TInterface "Pango" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_cursor_pos" pango_layout_get_cursor_pos :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Int32 -> -- index_ : TBasicType TInt32 Ptr Rectangle -> -- strong_pos : TInterface "Pango" "Rectangle" Ptr Rectangle -> -- weak_pos : TInterface "Pango" "Rectangle" IO () layoutGetCursorPos :: (MonadIO m, LayoutK a) => a -> -- _obj Int32 -> -- index_ m (Rectangle,Rectangle) layoutGetCursorPos _obj index_ = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj strong_pos <- callocBytes 16 :: IO (Ptr Rectangle) weak_pos <- callocBytes 16 :: IO (Ptr Rectangle) pango_layout_get_cursor_pos _obj' index_ strong_pos weak_pos strong_pos' <- (wrapPtr Rectangle) strong_pos weak_pos' <- (wrapPtr Rectangle) weak_pos touchManagedPtr _obj return (strong_pos', weak_pos') -- method Layout::get_ellipsize -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Pango" "EllipsizeMode" -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_ellipsize" pango_layout_get_ellipsize :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO CUInt layoutGetEllipsize :: (MonadIO m, LayoutK a) => a -> -- _obj m EllipsizeMode layoutGetEllipsize _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_ellipsize _obj' let result' = (toEnum . fromIntegral) result touchManagedPtr _obj return result' -- method Layout::get_extents -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ink_rect", argType = TInterface "Pango" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "logical_rect", argType = TInterface "Pango" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_extents" pango_layout_get_extents :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Ptr Rectangle -> -- ink_rect : TInterface "Pango" "Rectangle" Ptr Rectangle -> -- logical_rect : TInterface "Pango" "Rectangle" IO () layoutGetExtents :: (MonadIO m, LayoutK a) => a -> -- _obj m (Rectangle,Rectangle) layoutGetExtents _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj ink_rect <- callocBytes 16 :: IO (Ptr Rectangle) logical_rect <- callocBytes 16 :: IO (Ptr Rectangle) pango_layout_get_extents _obj' ink_rect logical_rect ink_rect' <- (wrapPtr Rectangle) ink_rect logical_rect' <- (wrapPtr Rectangle) logical_rect touchManagedPtr _obj return (ink_rect', logical_rect') -- method Layout::get_font_description -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Pango" "FontDescription" -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_font_description" pango_layout_get_font_description :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO (Ptr FontDescription) layoutGetFontDescription :: (MonadIO m, LayoutK a) => a -> -- _obj m FontDescription layoutGetFontDescription _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_font_description _obj' checkUnexpectedReturnNULL "pango_layout_get_font_description" result result' <- (newBoxed FontDescription) result touchManagedPtr _obj return result' -- method Layout::get_height -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TInt32 -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_height" pango_layout_get_height :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO Int32 layoutGetHeight :: (MonadIO m, LayoutK a) => a -> -- _obj m Int32 layoutGetHeight _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_height _obj' touchManagedPtr _obj return result -- method Layout::get_indent -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TInt32 -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_indent" pango_layout_get_indent :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO Int32 layoutGetIndent :: (MonadIO m, LayoutK a) => a -> -- _obj m Int32 layoutGetIndent _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_indent _obj' touchManagedPtr _obj return result -- method Layout::get_iter -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Pango" "LayoutIter" -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_iter" pango_layout_get_iter :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO (Ptr LayoutIter) layoutGetIter :: (MonadIO m, LayoutK a) => a -> -- _obj m LayoutIter layoutGetIter _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_iter _obj' checkUnexpectedReturnNULL "pango_layout_get_iter" result result' <- (wrapBoxed LayoutIter) result touchManagedPtr _obj return result' -- method Layout::get_justify -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_justify" pango_layout_get_justify :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO CInt layoutGetJustify :: (MonadIO m, LayoutK a) => a -> -- _obj m Bool layoutGetJustify _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_justify _obj' let result' = (/= 0) result touchManagedPtr _obj return result' -- method Layout::get_line -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "line", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "line", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Pango" "LayoutLine" -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_line" pango_layout_get_line :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Int32 -> -- line : TBasicType TInt32 IO (Ptr LayoutLine) layoutGetLine :: (MonadIO m, LayoutK a) => a -> -- _obj Int32 -> -- line m LayoutLine layoutGetLine _obj line = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_line _obj' line checkUnexpectedReturnNULL "pango_layout_get_line" result result' <- (newBoxed LayoutLine) result touchManagedPtr _obj return result' -- method Layout::get_line_count -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TInt32 -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_line_count" pango_layout_get_line_count :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO Int32 layoutGetLineCount :: (MonadIO m, LayoutK a) => a -> -- _obj m Int32 layoutGetLineCount _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_line_count _obj' touchManagedPtr _obj return result -- method Layout::get_line_readonly -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "line", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "line", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Pango" "LayoutLine" -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_line_readonly" pango_layout_get_line_readonly :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Int32 -> -- line : TBasicType TInt32 IO (Ptr LayoutLine) layoutGetLineReadonly :: (MonadIO m, LayoutK a) => a -> -- _obj Int32 -> -- line m LayoutLine layoutGetLineReadonly _obj line = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_line_readonly _obj' line checkUnexpectedReturnNULL "pango_layout_get_line_readonly" result result' <- (newBoxed LayoutLine) result touchManagedPtr _obj return result' -- method Layout::get_lines -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TGSList (TInterface "Pango" "LayoutLine") -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_lines" pango_layout_get_lines :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO (Ptr (GSList (Ptr LayoutLine))) layoutGetLines :: (MonadIO m, LayoutK a) => a -> -- _obj m [LayoutLine] layoutGetLines _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_lines _obj' checkUnexpectedReturnNULL "pango_layout_get_lines" result result' <- unpackGSList result result'' <- mapM (newBoxed LayoutLine) result' touchManagedPtr _obj return result'' -- method Layout::get_lines_readonly -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TGSList (TInterface "Pango" "LayoutLine") -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_lines_readonly" pango_layout_get_lines_readonly :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO (Ptr (GSList (Ptr LayoutLine))) layoutGetLinesReadonly :: (MonadIO m, LayoutK a) => a -> -- _obj m [LayoutLine] layoutGetLinesReadonly _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_lines_readonly _obj' checkUnexpectedReturnNULL "pango_layout_get_lines_readonly" result result' <- unpackGSList result result'' <- mapM (newBoxed LayoutLine) result' touchManagedPtr _obj return result'' -- method Layout::get_log_attrs -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attrs", argType = TCArray False (-1) 2 (TInterface "Pango" "LogAttr"), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferContainer},Arg {argName = "n_attrs", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- Lengths : [Arg {argName = "n_attrs", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_log_attrs" pango_layout_get_log_attrs :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Ptr (Ptr LogAttr) -> -- attrs : TCArray False (-1) 2 (TInterface "Pango" "LogAttr") Ptr Int32 -> -- n_attrs : TBasicType TInt32 IO () layoutGetLogAttrs :: (MonadIO m, LayoutK a) => a -> -- _obj m ([LogAttr]) layoutGetLogAttrs _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj attrs <- allocMem :: IO (Ptr (Ptr LogAttr)) n_attrs <- allocMem :: IO (Ptr Int32) pango_layout_get_log_attrs _obj' attrs n_attrs n_attrs' <- peek n_attrs attrs' <- peek attrs attrs'' <- (unpackBlockArrayWithLength 52 n_attrs') attrs' attrs''' <- mapM (newPtr 52 LogAttr) attrs'' freeMem attrs' touchManagedPtr _obj freeMem attrs freeMem n_attrs return attrs''' -- method Layout::get_log_attrs_readonly -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_attrs", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- Lengths : [Arg {argName = "n_attrs", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TCArray False (-1) 1 (TInterface "Pango" "LogAttr") -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_log_attrs_readonly" pango_layout_get_log_attrs_readonly :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Ptr Int32 -> -- n_attrs : TBasicType TInt32 IO (Ptr LogAttr) layoutGetLogAttrsReadonly :: (MonadIO m, LayoutK a) => a -> -- _obj m [LogAttr] layoutGetLogAttrsReadonly _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj n_attrs <- allocMem :: IO (Ptr Int32) result <- pango_layout_get_log_attrs_readonly _obj' n_attrs n_attrs' <- peek n_attrs checkUnexpectedReturnNULL "pango_layout_get_log_attrs_readonly" result result' <- (unpackBlockArrayWithLength 52 n_attrs') result result'' <- mapM (newPtr 52 LogAttr) result' touchManagedPtr _obj freeMem n_attrs return result'' -- method Layout::get_pixel_extents -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ink_rect", argType = TInterface "Pango" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "logical_rect", argType = TInterface "Pango" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_pixel_extents" pango_layout_get_pixel_extents :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Ptr Rectangle -> -- ink_rect : TInterface "Pango" "Rectangle" Ptr Rectangle -> -- logical_rect : TInterface "Pango" "Rectangle" IO () layoutGetPixelExtents :: (MonadIO m, LayoutK a) => a -> -- _obj m (Rectangle,Rectangle) layoutGetPixelExtents _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj ink_rect <- callocBytes 16 :: IO (Ptr Rectangle) logical_rect <- callocBytes 16 :: IO (Ptr Rectangle) pango_layout_get_pixel_extents _obj' ink_rect logical_rect ink_rect' <- (wrapPtr Rectangle) ink_rect logical_rect' <- (wrapPtr Rectangle) logical_rect touchManagedPtr _obj return (ink_rect', logical_rect') -- method Layout::get_pixel_size -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_pixel_size" pango_layout_get_pixel_size :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Ptr Int32 -> -- width : TBasicType TInt32 Ptr Int32 -> -- height : TBasicType TInt32 IO () layoutGetPixelSize :: (MonadIO m, LayoutK a) => a -> -- _obj m (Int32,Int32) layoutGetPixelSize _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj width <- allocMem :: IO (Ptr Int32) height <- allocMem :: IO (Ptr Int32) pango_layout_get_pixel_size _obj' width height width' <- peek width height' <- peek height touchManagedPtr _obj freeMem width freeMem height return (width', height') -- method Layout::get_serial -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUInt32 -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_serial" pango_layout_get_serial :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO Word32 layoutGetSerial :: (MonadIO m, LayoutK a) => a -> -- _obj m Word32 layoutGetSerial _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_serial _obj' touchManagedPtr _obj return result -- method Layout::get_single_paragraph_mode -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_single_paragraph_mode" pango_layout_get_single_paragraph_mode :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO CInt layoutGetSingleParagraphMode :: (MonadIO m, LayoutK a) => a -> -- _obj m Bool layoutGetSingleParagraphMode _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_single_paragraph_mode _obj' let result' = (/= 0) result touchManagedPtr _obj return result' -- method Layout::get_size -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_size" pango_layout_get_size :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Ptr Int32 -> -- width : TBasicType TInt32 Ptr Int32 -> -- height : TBasicType TInt32 IO () layoutGetSize :: (MonadIO m, LayoutK a) => a -> -- _obj m (Int32,Int32) layoutGetSize _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj width <- allocMem :: IO (Ptr Int32) height <- allocMem :: IO (Ptr Int32) pango_layout_get_size _obj' width height width' <- peek width height' <- peek height touchManagedPtr _obj freeMem width freeMem height return (width', height') -- method Layout::get_spacing -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TInt32 -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_spacing" pango_layout_get_spacing :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO Int32 layoutGetSpacing :: (MonadIO m, LayoutK a) => a -> -- _obj m Int32 layoutGetSpacing _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_spacing _obj' touchManagedPtr _obj return result -- method Layout::get_tabs -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Pango" "TabArray" -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_tabs" pango_layout_get_tabs :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO (Ptr TabArray) layoutGetTabs :: (MonadIO m, LayoutK a) => a -> -- _obj m TabArray layoutGetTabs _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_tabs _obj' checkUnexpectedReturnNULL "pango_layout_get_tabs" result result' <- (wrapBoxed TabArray) result touchManagedPtr _obj return result' -- method Layout::get_text -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUTF8 -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_text" pango_layout_get_text :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO CString layoutGetText :: (MonadIO m, LayoutK a) => a -> -- _obj m T.Text layoutGetText _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_text _obj' checkUnexpectedReturnNULL "pango_layout_get_text" result result' <- cstringToText result touchManagedPtr _obj return result' -- method Layout::get_unknown_glyphs_count -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TInt32 -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_unknown_glyphs_count" pango_layout_get_unknown_glyphs_count :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO Int32 layoutGetUnknownGlyphsCount :: (MonadIO m, LayoutK a) => a -> -- _obj m Int32 layoutGetUnknownGlyphsCount _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_unknown_glyphs_count _obj' touchManagedPtr _obj return result -- method Layout::get_width -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TInt32 -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_width" pango_layout_get_width :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO Int32 layoutGetWidth :: (MonadIO m, LayoutK a) => a -> -- _obj m Int32 layoutGetWidth _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_width _obj' touchManagedPtr _obj return result -- method Layout::get_wrap -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Pango" "WrapMode" -- throws : False -- Skip return : False foreign import ccall "pango_layout_get_wrap" pango_layout_get_wrap :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO CUInt layoutGetWrap :: (MonadIO m, LayoutK a) => a -> -- _obj m WrapMode layoutGetWrap _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_get_wrap _obj' let result' = (toEnum . fromIntegral) result touchManagedPtr _obj return result' -- method Layout::index_to_line_x -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "trailing", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "line", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "x_pos", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "trailing", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_index_to_line_x" pango_layout_index_to_line_x :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Int32 -> -- index_ : TBasicType TInt32 CInt -> -- trailing : TBasicType TBoolean Ptr Int32 -> -- line : TBasicType TInt32 Ptr Int32 -> -- x_pos : TBasicType TInt32 IO () layoutIndexToLineX :: (MonadIO m, LayoutK a) => a -> -- _obj Int32 -> -- index_ Bool -> -- trailing m (Int32,Int32) layoutIndexToLineX _obj index_ trailing = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let trailing' = (fromIntegral . fromEnum) trailing line <- allocMem :: IO (Ptr Int32) x_pos <- allocMem :: IO (Ptr Int32) pango_layout_index_to_line_x _obj' index_ trailing' line x_pos line' <- peek line x_pos' <- peek x_pos touchManagedPtr _obj freeMem line freeMem x_pos return (line', x_pos') -- method Layout::index_to_pos -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TInterface "Pango" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_index_to_pos" pango_layout_index_to_pos :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Int32 -> -- index_ : TBasicType TInt32 Ptr Rectangle -> -- pos : TInterface "Pango" "Rectangle" IO () layoutIndexToPos :: (MonadIO m, LayoutK a) => a -> -- _obj Int32 -> -- index_ m (Rectangle) layoutIndexToPos _obj index_ = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj pos <- callocBytes 16 :: IO (Ptr Rectangle) pango_layout_index_to_pos _obj' index_ pos pos' <- (wrapPtr Rectangle) pos touchManagedPtr _obj return pos' -- method Layout::is_ellipsized -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "pango_layout_is_ellipsized" pango_layout_is_ellipsized :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO CInt layoutIsEllipsized :: (MonadIO m, LayoutK a) => a -> -- _obj m Bool layoutIsEllipsized _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_is_ellipsized _obj' let result' = (/= 0) result touchManagedPtr _obj return result' -- method Layout::is_wrapped -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "pango_layout_is_wrapped" pango_layout_is_wrapped :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" IO CInt layoutIsWrapped :: (MonadIO m, LayoutK a) => a -> -- _obj m Bool layoutIsWrapped _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- pango_layout_is_wrapped _obj' let result' = (/= 0) result touchManagedPtr _obj return result' -- method Layout::move_cursor_visually -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "strong", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "old_index", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "old_trailing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "new_index", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "new_trailing", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "strong", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "old_index", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "old_trailing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_move_cursor_visually" pango_layout_move_cursor_visually :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" CInt -> -- strong : TBasicType TBoolean Int32 -> -- old_index : TBasicType TInt32 Int32 -> -- old_trailing : TBasicType TInt32 Int32 -> -- direction : TBasicType TInt32 Ptr Int32 -> -- new_index : TBasicType TInt32 Ptr Int32 -> -- new_trailing : TBasicType TInt32 IO () layoutMoveCursorVisually :: (MonadIO m, LayoutK a) => a -> -- _obj Bool -> -- strong Int32 -> -- old_index Int32 -> -- old_trailing Int32 -> -- direction m (Int32,Int32) layoutMoveCursorVisually _obj strong old_index old_trailing direction = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let strong' = (fromIntegral . fromEnum) strong new_index <- allocMem :: IO (Ptr Int32) new_trailing <- allocMem :: IO (Ptr Int32) pango_layout_move_cursor_visually _obj' strong' old_index old_trailing direction new_index new_trailing new_index' <- peek new_index new_trailing' <- peek new_trailing touchManagedPtr _obj freeMem new_index freeMem new_trailing return (new_index', new_trailing') -- method Layout::set_alignment -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "alignment", argType = TInterface "Pango" "Alignment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "alignment", argType = TInterface "Pango" "Alignment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_set_alignment" pango_layout_set_alignment :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" CUInt -> -- alignment : TInterface "Pango" "Alignment" IO () layoutSetAlignment :: (MonadIO m, LayoutK a) => a -> -- _obj Alignment -> -- alignment m () layoutSetAlignment _obj alignment = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let alignment' = (fromIntegral . fromEnum) alignment pango_layout_set_alignment _obj' alignment' touchManagedPtr _obj return () -- method Layout::set_attributes -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attrs", argType = TInterface "Pango" "AttrList", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attrs", argType = TInterface "Pango" "AttrList", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_set_attributes" pango_layout_set_attributes :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Ptr AttrList -> -- attrs : TInterface "Pango" "AttrList" IO () layoutSetAttributes :: (MonadIO m, LayoutK a) => a -> -- _obj Maybe (AttrList) -> -- attrs m () layoutSetAttributes _obj attrs = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj maybeAttrs <- case attrs of Nothing -> return nullPtr Just jAttrs -> do let jAttrs' = unsafeManagedPtrGetPtr jAttrs return jAttrs' pango_layout_set_attributes _obj' maybeAttrs touchManagedPtr _obj whenJust attrs touchManagedPtr return () -- method Layout::set_auto_dir -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "auto_dir", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "auto_dir", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_set_auto_dir" pango_layout_set_auto_dir :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" CInt -> -- auto_dir : TBasicType TBoolean IO () layoutSetAutoDir :: (MonadIO m, LayoutK a) => a -> -- _obj Bool -> -- auto_dir m () layoutSetAutoDir _obj auto_dir = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let auto_dir' = (fromIntegral . fromEnum) auto_dir pango_layout_set_auto_dir _obj' auto_dir' touchManagedPtr _obj return () -- method Layout::set_ellipsize -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ellipsize", argType = TInterface "Pango" "EllipsizeMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ellipsize", argType = TInterface "Pango" "EllipsizeMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_set_ellipsize" pango_layout_set_ellipsize :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" CUInt -> -- ellipsize : TInterface "Pango" "EllipsizeMode" IO () layoutSetEllipsize :: (MonadIO m, LayoutK a) => a -> -- _obj EllipsizeMode -> -- ellipsize m () layoutSetEllipsize _obj ellipsize = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let ellipsize' = (fromIntegral . fromEnum) ellipsize pango_layout_set_ellipsize _obj' ellipsize' touchManagedPtr _obj return () -- method Layout::set_font_description -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "desc", argType = TInterface "Pango" "FontDescription", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "desc", argType = TInterface "Pango" "FontDescription", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_set_font_description" pango_layout_set_font_description :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Ptr FontDescription -> -- desc : TInterface "Pango" "FontDescription" IO () layoutSetFontDescription :: (MonadIO m, LayoutK a) => a -> -- _obj Maybe (FontDescription) -> -- desc m () layoutSetFontDescription _obj desc = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj maybeDesc <- case desc of Nothing -> return nullPtr Just jDesc -> do let jDesc' = unsafeManagedPtrGetPtr jDesc return jDesc' pango_layout_set_font_description _obj' maybeDesc touchManagedPtr _obj whenJust desc touchManagedPtr return () -- method Layout::set_height -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_set_height" pango_layout_set_height :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Int32 -> -- height : TBasicType TInt32 IO () layoutSetHeight :: (MonadIO m, LayoutK a) => a -> -- _obj Int32 -> -- height m () layoutSetHeight _obj height = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj pango_layout_set_height _obj' height touchManagedPtr _obj return () -- method Layout::set_indent -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "indent", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "indent", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_set_indent" pango_layout_set_indent :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Int32 -> -- indent : TBasicType TInt32 IO () layoutSetIndent :: (MonadIO m, LayoutK a) => a -> -- _obj Int32 -> -- indent m () layoutSetIndent _obj indent = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj pango_layout_set_indent _obj' indent touchManagedPtr _obj return () -- method Layout::set_justify -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "justify", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "justify", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_set_justify" pango_layout_set_justify :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" CInt -> -- justify : TBasicType TBoolean IO () layoutSetJustify :: (MonadIO m, LayoutK a) => a -> -- _obj Bool -> -- justify m () layoutSetJustify _obj justify = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let justify' = (fromIntegral . fromEnum) justify pango_layout_set_justify _obj' justify' touchManagedPtr _obj return () -- method Layout::set_markup -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_set_markup" pango_layout_set_markup :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" CString -> -- markup : TBasicType TUTF8 Int32 -> -- length : TBasicType TInt32 IO () layoutSetMarkup :: (MonadIO m, LayoutK a) => a -> -- _obj T.Text -> -- markup Int32 -> -- length m () layoutSetMarkup _obj markup length_ = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj markup' <- textToCString markup pango_layout_set_markup _obj' markup' length_ touchManagedPtr _obj freeMem markup' return () -- method Layout::set_markup_with_accel -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_marker", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_char", argType = TBasicType TUniChar, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_marker", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_set_markup_with_accel" pango_layout_set_markup_with_accel :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" CString -> -- markup : TBasicType TUTF8 Int32 -> -- length : TBasicType TInt32 CInt -> -- accel_marker : TBasicType TUniChar Ptr CInt -> -- accel_char : TBasicType TUniChar IO () layoutSetMarkupWithAccel :: (MonadIO m, LayoutK a) => a -> -- _obj T.Text -> -- markup Int32 -> -- length Char -> -- accel_marker m (Char) layoutSetMarkupWithAccel _obj markup length_ accel_marker = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj markup' <- textToCString markup let accel_marker' = (fromIntegral . ord) accel_marker accel_char <- allocMem :: IO (Ptr CInt) pango_layout_set_markup_with_accel _obj' markup' length_ accel_marker' accel_char accel_char' <- peek accel_char let accel_char'' = (chr . fromIntegral) accel_char' touchManagedPtr _obj freeMem markup' freeMem accel_char return accel_char'' -- method Layout::set_single_paragraph_mode -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_set_single_paragraph_mode" pango_layout_set_single_paragraph_mode :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" CInt -> -- setting : TBasicType TBoolean IO () layoutSetSingleParagraphMode :: (MonadIO m, LayoutK a) => a -> -- _obj Bool -> -- setting m () layoutSetSingleParagraphMode _obj setting = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let setting' = (fromIntegral . fromEnum) setting pango_layout_set_single_paragraph_mode _obj' setting' touchManagedPtr _obj return () -- method Layout::set_spacing -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_set_spacing" pango_layout_set_spacing :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Int32 -> -- spacing : TBasicType TInt32 IO () layoutSetSpacing :: (MonadIO m, LayoutK a) => a -> -- _obj Int32 -> -- spacing m () layoutSetSpacing _obj spacing = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj pango_layout_set_spacing _obj' spacing touchManagedPtr _obj return () -- method Layout::set_tabs -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tabs", argType = TInterface "Pango" "TabArray", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tabs", argType = TInterface "Pango" "TabArray", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_set_tabs" pango_layout_set_tabs :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Ptr TabArray -> -- tabs : TInterface "Pango" "TabArray" IO () layoutSetTabs :: (MonadIO m, LayoutK a) => a -> -- _obj Maybe (TabArray) -> -- tabs m () layoutSetTabs _obj tabs = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj maybeTabs <- case tabs of Nothing -> return nullPtr Just jTabs -> do let jTabs' = unsafeManagedPtrGetPtr jTabs return jTabs' pango_layout_set_tabs _obj' maybeTabs touchManagedPtr _obj whenJust tabs touchManagedPtr return () -- method Layout::set_text -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_set_text" pango_layout_set_text :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" CString -> -- text : TBasicType TUTF8 Int32 -> -- length : TBasicType TInt32 IO () layoutSetText :: (MonadIO m, LayoutK a) => a -> -- _obj T.Text -> -- text Int32 -> -- length m () layoutSetText _obj text length_ = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj text' <- textToCString text pango_layout_set_text _obj' text' length_ touchManagedPtr _obj freeMem text' return () -- method Layout::set_width -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_set_width" pango_layout_set_width :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Int32 -> -- width : TBasicType TInt32 IO () layoutSetWidth :: (MonadIO m, LayoutK a) => a -> -- _obj Int32 -> -- width m () layoutSetWidth _obj width = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj pango_layout_set_width _obj' width touchManagedPtr _obj return () -- method Layout::set_wrap -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wrap", argType = TInterface "Pango" "WrapMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wrap", argType = TInterface "Pango" "WrapMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "pango_layout_set_wrap" pango_layout_set_wrap :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" CUInt -> -- wrap : TInterface "Pango" "WrapMode" IO () layoutSetWrap :: (MonadIO m, LayoutK a) => a -> -- _obj WrapMode -> -- wrap m () layoutSetWrap _obj wrap = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let wrap' = (fromIntegral . fromEnum) wrap pango_layout_set_wrap _obj' wrap' touchManagedPtr _obj return () -- method Layout::xy_to_index -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "trailing", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "pango_layout_xy_to_index" pango_layout_xy_to_index :: Ptr Layout -> -- _obj : TInterface "Pango" "Layout" Int32 -> -- x : TBasicType TInt32 Int32 -> -- y : TBasicType TInt32 Ptr Int32 -> -- index_ : TBasicType TInt32 Ptr Int32 -> -- trailing : TBasicType TInt32 IO CInt layoutXyToIndex :: (MonadIO m, LayoutK a) => a -> -- _obj Int32 -> -- x Int32 -> -- y m (Bool,Int32,Int32) layoutXyToIndex _obj x y = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj index_ <- allocMem :: IO (Ptr Int32) trailing <- allocMem :: IO (Ptr Int32) result <- pango_layout_xy_to_index _obj' x y index_ trailing let result' = (/= 0) result index_' <- peek index_ trailing' <- peek trailing touchManagedPtr _obj freeMem index_ freeMem trailing return (result', index_', trailing')