    {-# LANGUAGE TypeApplications #-}

    -- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
    -- License    : LGPL-2.1
    -- Maintainer : Iñaki García Etxebarria
    --
    -- A t'GI.Pango.Structs.TabArray.TabArray' struct contains an array
    -- of tab stops. Each tab stop has an alignment and a position.

    #if !defined(__HADDOCK_VERSION__)
    #define ENABLE_OVERLOADING
    #endif

    module GI.Pango.Structs.TabArray
        (

    -- * Exported types
        TabArray(..)                            ,

     -- * Methods
    -- ** Overloaded methods #method:Overloaded methods#

    #if defined(ENABLE_OVERLOADING)
        ResolveTabArrayMethod                   ,
    #endif

    -- ** copy #method:copy#

    #if defined(ENABLE_OVERLOADING)
        TabArrayCopyMethodInfo                  ,
    #endif
        tabArrayCopy                            ,

    -- ** free #method:free#

    #if defined(ENABLE_OVERLOADING)
        TabArrayFreeMethodInfo                  ,
    #endif
        tabArrayFree                            ,

    -- ** getPositionsInPixels #method:getPositionsInPixels#

    #if defined(ENABLE_OVERLOADING)
        TabArrayGetPositionsInPixelsMethodInfo  ,
    #endif
        tabArrayGetPositionsInPixels            ,

    -- ** getSize #method:getSize#

    #if defined(ENABLE_OVERLOADING)
        TabArrayGetSizeMethodInfo               ,
    #endif
        tabArrayGetSize                         ,

    -- ** getTab #method:getTab#

    #if defined(ENABLE_OVERLOADING)
        TabArrayGetTabMethodInfo                ,
    #endif
        tabArrayGetTab                          ,

    -- ** new #method:new#

        tabArrayNew                             ,

    -- ** resize #method:resize#

    #if defined(ENABLE_OVERLOADING)
        TabArrayResizeMethodInfo                ,
    #endif
        tabArrayResize                          ,

    -- ** setTab #method:setTab#

    #if defined(ENABLE_OVERLOADING)
        TabArraySetTabMethodInfo                ,
    #endif
        tabArraySetTab                          ,

        ) where

    import Data.GI.Base.ShortPrelude
    import qualified Data.GI.Base.ShortPrelude as SP
    import qualified Data.GI.Base.Overloading as O
    import qualified Prelude as P

    import qualified Data.GI.Base.Attributes as GI.Attributes
    import qualified Data.GI.Base.BasicTypes as B.Types
    import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
    import qualified Data.GI.Base.GArray as B.GArray
    import qualified Data.GI.Base.GClosure as B.GClosure
    import qualified Data.GI.Base.GError as B.GError
    import qualified Data.GI.Base.GVariant as B.GVariant
    import qualified Data.GI.Base.GValue as B.GValue
    import qualified Data.GI.Base.GParamSpec as B.GParamSpec
    import qualified Data.GI.Base.CallStack as B.CallStack
    import qualified Data.GI.Base.Properties as B.Properties
    import qualified Data.GI.Base.Signals as B.Signals
    import qualified Control.Monad.IO.Class as MIO
    import qualified Data.Text as T
    import qualified Data.ByteString.Char8 as B
    import qualified Data.Map as Map
    import qualified Foreign.Ptr as FP
    import qualified GHC.OverloadedLabels as OL

    import {-# SOURCE #-} qualified GI.Pango.Enums as Pango.Enums

    -- | Memory-managed wrapper type.
    newtype TabArray = TabArray (SP.ManagedPtr TabArray)
        deriving (TabArray -> TabArray -> Bool
    (TabArray -> TabArray -> Bool)
    -> (TabArray -> TabArray -> Bool) -> Eq TabArray
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: TabArray -> TabArray -> Bool
    $c/= :: TabArray -> TabArray -> Bool
    == :: TabArray -> TabArray -> Bool
    $c== :: TabArray -> TabArray -> Bool
    Eq)

    instance SP.ManagedPtrNewtype TabArray where
        toManagedPtr :: TabArray -> ManagedPtr TabArray
    toManagedPtr (TabArray p :: ManagedPtr TabArray
    p) = ManagedPtr TabArray
    p

    foreign import ccall "pango_tab_array_get_type" c_pango_tab_array_get_type ::
        IO GType

    type instance O.ParentTypes TabArray = '[]
    instance O.HasParentTypes TabArray

    instance B.Types.TypedObject TabArray where
        glibType :: IO GType
    glibType = IO GType
    c_pango_tab_array_get_type

    instance B.Types.GBoxed TabArray

    -- | Convert 'TabArray' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
    instance B.GValue.IsGValue TabArray where
        toGValue :: TabArray -> IO GValue
    toGValue o :: TabArray
    o = do
            GType
    gtype <- IO GType
    c_pango_tab_array_get_type
            TabArray -> (Ptr TabArray -> IO GValue) -> IO GValue
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    B.ManagedPtr.withManagedPtr TabArray
    o (GType
    -> (GValue -> Ptr TabArray -> IO ()) -> Ptr TabArray -> IO GValue
    forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
    B.GValue.buildGValue GType
    gtype GValue -> Ptr TabArray -> IO ()
    forall a. GValue -> Ptr a -> IO ()
    B.GValue.set_boxed)

        fromGValue :: GValue -> IO TabArray
    fromGValue gv :: GValue
    gv = do
            Ptr TabArray
    ptr <- GValue -> IO (Ptr TabArray)
    forall b. GValue -> IO (Ptr b)
    B.GValue.get_boxed GValue
    gv :: IO (Ptr TabArray)
            (ManagedPtr TabArray -> TabArray) -> Ptr TabArray -> IO TabArray
    forall a.
    (HasCallStack, GBoxed a) =>
    (ManagedPtr a -> a) -> Ptr a -> IO a
    B.ManagedPtr.newBoxed ManagedPtr TabArray -> TabArray
    TabArray Ptr TabArray
    ptr

    #if defined(ENABLE_OVERLOADING)
    instance O.HasAttributeList TabArray
    type instance O.AttributeList TabArray = TabArrayAttributeList
    type TabArrayAttributeList = ('[ ] :: [(Symbol, *)])
    #endif

    -- method TabArray::new
    -- method type : Constructor
    -- Args: [ Arg
    --           { argCName = "initial_size"
    --           , argType = TBasicType TInt
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just "Initial number of tab stops to allocate, can be 0"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "positions_in_pixels"
    --           , argType = TBasicType TBoolean
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "whether positions are in pixel units"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "Pango" , name = "TabArray" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "pango_tab_array_new" pango_tab_array_new ::
        Int32 ->                                -- initial_size : TBasicType TInt
        CInt ->                                 -- positions_in_pixels : TBasicType TBoolean
        IO (Ptr TabArray)

    -- | Creates an array of /@initialSize@/ tab stops. Tab stops are specified in
    -- pixel units if /@positionsInPixels@/ is 'P.True', otherwise in Pango
    -- units. All stops are initially at position 0.
    tabArrayNew ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        Int32
        -- ^ /@initialSize@/: Initial number of tab stops to allocate, can be 0
        -> Bool
        -- ^ /@positionsInPixels@/: whether positions are in pixel units
        -> m TabArray
        -- ^ __Returns:__ the newly allocated t'GI.Pango.Structs.TabArray.TabArray', which should
        --               be freed with 'GI.Pango.Structs.TabArray.tabArrayFree'.
    tabArrayNew :: Int32 -> Bool -> m TabArray
    tabArrayNew initialSize :: Int32
    initialSize positionsInPixels :: Bool
    positionsInPixels = IO TabArray -> m TabArray
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO TabArray -> m TabArray) -> IO TabArray -> m TabArray
    forall a b. (a -> b) -> a -> b
    $ do
        let positionsInPixels' :: CInt
    positionsInPixels' = (Int -> CInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Bool -> Int
    forall a. Enum a => a -> Int
    fromEnum) Bool
    positionsInPixels
        Ptr TabArray
    result <- Int32 -> CInt -> IO (Ptr TabArray)
    pango_tab_array_new Int32
    initialSize CInt
    positionsInPixels'
        Text -> Ptr TabArray -> IO ()
    forall a. HasCallStack => Text -> Ptr a -> IO ()
    checkUnexpectedReturnNULL "tabArrayNew" Ptr TabArray
    result
        TabArray
    result' <- ((ManagedPtr TabArray -> TabArray) -> Ptr TabArray -> IO TabArray
    forall a.
    (HasCallStack, GBoxed a) =>
    (ManagedPtr a -> a) -> Ptr a -> IO a
    wrapBoxed ManagedPtr TabArray -> TabArray
    TabArray) Ptr TabArray
    result
        TabArray -> IO TabArray
    forall (m :: * -> *) a. Monad m => a -> m a
    return TabArray
    result'

    #if defined(ENABLE_OVERLOADING)
    #endif

    -- method TabArray::copy
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "src"
    --           , argType =
    --               TInterface Name { namespace = "Pango" , name = "TabArray" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "#PangoTabArray to copy"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "Pango" , name = "TabArray" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "pango_tab_array_copy" pango_tab_array_copy ::
        Ptr TabArray ->                         -- src : TInterface (Name {namespace = "Pango", name = "TabArray"})
        IO (Ptr TabArray)

    -- | Copies a t'GI.Pango.Structs.TabArray.TabArray'
    tabArrayCopy ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        TabArray
        -- ^ /@src@/: t'GI.Pango.Structs.TabArray.TabArray' to copy
        -> m TabArray
        -- ^ __Returns:__ the newly allocated t'GI.Pango.Structs.TabArray.TabArray', which should
        --               be freed with 'GI.Pango.Structs.TabArray.tabArrayFree'.
    tabArrayCopy :: TabArray -> m TabArray
    tabArrayCopy src :: TabArray
    src = IO TabArray -> m TabArray
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO TabArray -> m TabArray) -> IO TabArray -> m TabArray
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr TabArray
    src' <- TabArray -> IO (Ptr TabArray)
    forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
    unsafeManagedPtrGetPtr TabArray
    src
        Ptr TabArray
    result <- Ptr TabArray -> IO (Ptr TabArray)
    pango_tab_array_copy Ptr TabArray
    src'
        Text -> Ptr TabArray -> IO ()
    forall a. HasCallStack => Text -> Ptr a -> IO ()
    checkUnexpectedReturnNULL "tabArrayCopy" Ptr TabArray
    result
        TabArray
    result' <- ((ManagedPtr TabArray -> TabArray) -> Ptr TabArray -> IO TabArray
    forall a.
    (HasCallStack, GBoxed a) =>
    (ManagedPtr a -> a) -> Ptr a -> IO a
    wrapBoxed ManagedPtr TabArray -> TabArray
    TabArray) Ptr TabArray
    result
        TabArray -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr TabArray
    src
        TabArray -> IO TabArray
    forall (m :: * -> *) a. Monad m => a -> m a
    return TabArray
    result'

    #if defined(ENABLE_OVERLOADING)
    data TabArrayCopyMethodInfo
    instance (signature ~ (m TabArray), MonadIO m) => O.MethodInfo TabArrayCopyMethodInfo TabArray signature where
        overloadedMethod = tabArrayCopy

    #endif

    -- method TabArray::free
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "tab_array"
    --           , argType =
    --               TInterface Name { namespace = "Pango" , name = "TabArray" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #PangoTabArray" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "pango_tab_array_free" pango_tab_array_free ::
        Ptr TabArray ->                         -- tab_array : TInterface (Name {namespace = "Pango", name = "TabArray"})
        IO ()

    -- | Frees a tab array and associated resources.
    tabArrayFree ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        TabArray
        -- ^ /@tabArray@/: a t'GI.Pango.Structs.TabArray.TabArray'
        -> m ()
    tabArrayFree :: TabArray -> m ()
    tabArrayFree tabArray :: TabArray
    tabArray = IO () -> m ()
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr TabArray
    tabArray' <- TabArray -> IO (Ptr TabArray)
    forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
    unsafeManagedPtrGetPtr TabArray
    tabArray
        Ptr TabArray -> IO ()
    pango_tab_array_free Ptr TabArray
    tabArray'
        TabArray -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr TabArray
    tabArray
        () -> IO ()
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    #if defined(ENABLE_OVERLOADING)
    data TabArrayFreeMethodInfo
    instance (signature ~ (m ()), MonadIO m) => O.MethodInfo TabArrayFreeMethodInfo TabArray signature where
        overloadedMethod = tabArrayFree

    #endif

    -- method TabArray::get_positions_in_pixels
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "tab_array"
    --           , argType =
    --               TInterface Name { namespace = "Pango" , name = "TabArray" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #PangoTabArray" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "pango_tab_array_get_positions_in_pixels" pango_tab_array_get_positions_in_pixels ::
        Ptr TabArray ->                         -- tab_array : TInterface (Name {namespace = "Pango", name = "TabArray"})
        IO CInt

    -- | Returns 'P.True' if the tab positions are in pixels, 'P.False' if they are
    -- in Pango units.
    tabArrayGetPositionsInPixels ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        TabArray
        -- ^ /@tabArray@/: a t'GI.Pango.Structs.TabArray.TabArray'
        -> m Bool
        -- ^ __Returns:__ whether positions are in pixels.
    tabArrayGetPositionsInPixels :: TabArray -> m Bool
    tabArrayGetPositionsInPixels tabArray :: TabArray
    tabArray = IO Bool -> m Bool
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr TabArray
    tabArray' <- TabArray -> IO (Ptr TabArray)
    forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
    unsafeManagedPtrGetPtr TabArray
    tabArray
        CInt
    result <- Ptr TabArray -> IO CInt
    pango_tab_array_get_positions_in_pixels Ptr TabArray
    tabArray'
        let result' :: Bool
    result' = (CInt -> CInt -> Bool
    forall a. Eq a => a -> a -> Bool
    /= 0) CInt
    result
        TabArray -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr TabArray
    tabArray
        Bool -> IO Bool
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    #if defined(ENABLE_OVERLOADING)
    data TabArrayGetPositionsInPixelsMethodInfo
    instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TabArrayGetPositionsInPixelsMethodInfo TabArray signature where
        overloadedMethod = tabArrayGetPositionsInPixels

    #endif

    -- method TabArray::get_size
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "tab_array"
    --           , argType =
    --               TInterface Name { namespace = "Pango" , name = "TabArray" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #PangoTabArray" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TInt)
    -- throws : False
    -- Skip return : False

    foreign import ccall "pango_tab_array_get_size" pango_tab_array_get_size ::
        Ptr TabArray ->                         -- tab_array : TInterface (Name {namespace = "Pango", name = "TabArray"})
        IO Int32

    -- | Gets the number of tab stops in /@tabArray@/.
    tabArrayGetSize ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        TabArray
        -- ^ /@tabArray@/: a t'GI.Pango.Structs.TabArray.TabArray'
        -> m Int32
        -- ^ __Returns:__ the number of tab stops in the array.
    tabArrayGetSize :: TabArray -> m Int32
    tabArrayGetSize tabArray :: TabArray
    tabArray = IO Int32 -> m Int32
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr TabArray
    tabArray' <- TabArray -> IO (Ptr TabArray)
    forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
    unsafeManagedPtrGetPtr TabArray
    tabArray
        Int32
    result <- Ptr TabArray -> IO Int32
    pango_tab_array_get_size Ptr TabArray
    tabArray'
        TabArray -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr TabArray
    tabArray
        Int32 -> IO Int32
    forall (m :: * -> *) a. Monad m => a -> m a
    return Int32
    result

    #if defined(ENABLE_OVERLOADING)
    data TabArrayGetSizeMethodInfo
    instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo TabArrayGetSizeMethodInfo TabArray signature where
        overloadedMethod = tabArrayGetSize

    #endif

    -- method TabArray::get_tab
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "tab_array"
    --           , argType =
    --               TInterface Name { namespace = "Pango" , name = "TabArray" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #PangoTabArray" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "tab_index"
    --           , argType = TBasicType TInt
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "tab stop index" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "alignment"
    --           , argType =
    --               TInterface Name { namespace = "Pango" , name = "TabAlign" }
    --           , direction = DirectionOut
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "location to store alignment, or %NULL"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , transfer = TransferEverything
    --           }
    --       , Arg
    --           { argCName = "location"
    --           , argType = TBasicType TInt
    --           , direction = DirectionOut
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "location to store tab position, or %NULL"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , transfer = TransferEverything
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "pango_tab_array_get_tab" pango_tab_array_get_tab ::
        Ptr TabArray ->                         -- tab_array : TInterface (Name {namespace = "Pango", name = "TabArray"})
        Int32 ->                                -- tab_index : TBasicType TInt
        Ptr CUInt ->                            -- alignment : TInterface (Name {namespace = "Pango", name = "TabAlign"})
        Ptr Int32 ->                            -- location : TBasicType TInt
        IO ()

    -- | Gets the alignment and position of a tab stop.
    tabArrayGetTab ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        TabArray
        -- ^ /@tabArray@/: a t'GI.Pango.Structs.TabArray.TabArray'
        -> Int32
        -- ^ /@tabIndex@/: tab stop index
        -> m ((Pango.Enums.TabAlign, Int32))
    tabArrayGetTab :: TabArray -> Int32 -> m (TabAlign, Int32)
    tabArrayGetTab tabArray :: TabArray
    tabArray tabIndex :: Int32
    tabIndex = IO (TabAlign, Int32) -> m (TabAlign, Int32)
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (TabAlign, Int32) -> m (TabAlign, Int32))
    -> IO (TabAlign, Int32) -> m (TabAlign, Int32)
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr TabArray
    tabArray' <- TabArray -> IO (Ptr TabArray)
    forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
    unsafeManagedPtrGetPtr TabArray
    tabArray
        Ptr CUInt
    alignment <- IO (Ptr CUInt)
    forall a. Storable a => IO (Ptr a)
    allocMem :: IO (Ptr CUInt)
        Ptr Int32
    location <- IO (Ptr Int32)
    forall a. Storable a => IO (Ptr a)
    allocMem :: IO (Ptr Int32)
        Ptr TabArray -> Int32 -> Ptr CUInt -> Ptr Int32 -> IO ()
    pango_tab_array_get_tab Ptr TabArray
    tabArray' Int32
    tabIndex Ptr CUInt
    alignment Ptr Int32
    location
        CUInt
    alignment' <- Ptr CUInt -> IO CUInt
    forall a. Storable a => Ptr a -> IO a
    peek Ptr CUInt
    alignment
        let alignment'' :: TabAlign
    alignment'' = (Int -> TabAlign
    forall a. Enum a => Int -> a
    toEnum (Int -> TabAlign) -> (CUInt -> Int) -> CUInt -> TabAlign
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . CUInt -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral) CUInt
    alignment'
        Int32
    location' <- Ptr Int32 -> IO Int32
    forall a. Storable a => Ptr a -> IO a
    peek Ptr Int32
    location
        TabArray -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr TabArray
    tabArray
        Ptr CUInt -> IO ()
    forall a. Ptr a -> IO ()
    freeMem Ptr CUInt
    alignment
        Ptr Int32 -> IO ()
    forall a. Ptr a -> IO ()
    freeMem Ptr Int32
    location
        (TabAlign, Int32) -> IO (TabAlign, Int32)
    forall (m :: * -> *) a. Monad m => a -> m a
    return (TabAlign
    alignment'', Int32
    location')

    #if defined(ENABLE_OVERLOADING)
    data TabArrayGetTabMethodInfo
    instance (signature ~ (Int32 -> m ((Pango.Enums.TabAlign, Int32))), MonadIO m) => O.MethodInfo TabArrayGetTabMethodInfo TabArray signature where
        overloadedMethod = tabArrayGetTab

    #endif

    -- XXX Could not generate method TabArray::get_tabs
    {-  Bad introspection data: `TCArray False (-1) (-1) (TBasicType TInt)' is an array type, but contains no length information,
        so it cannot be unpacked.
    -}
    -- method TabArray::resize
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "tab_array"
    --           , argType =
    --               TInterface Name { namespace = "Pango" , name = "TabArray" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #PangoTabArray" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "new_size"
    --           , argType = TBasicType TInt
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "new size of the array"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "pango_tab_array_resize" pango_tab_array_resize ::
        Ptr TabArray ->                         -- tab_array : TInterface (Name {namespace = "Pango", name = "TabArray"})
        Int32 ->                                -- new_size : TBasicType TInt
        IO ()

    -- | Resizes a tab array. You must subsequently initialize any tabs that
    -- were added as a result of growing the array.
    tabArrayResize ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        TabArray
        -- ^ /@tabArray@/: a t'GI.Pango.Structs.TabArray.TabArray'
        -> Int32
        -- ^ /@newSize@/: new size of the array
        -> m ()
    tabArrayResize :: TabArray -> Int32 -> m ()
    tabArrayResize tabArray :: TabArray
    tabArray newSize :: Int32
    newSize = IO () -> m ()
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr TabArray
    tabArray' <- TabArray -> IO (Ptr TabArray)
    forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
    unsafeManagedPtrGetPtr TabArray
    tabArray
        Ptr TabArray -> Int32 -> IO ()
    pango_tab_array_resize Ptr TabArray
    tabArray' Int32
    newSize
        TabArray -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr TabArray
    tabArray
        () -> IO ()
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    #if defined(ENABLE_OVERLOADING)
    data TabArrayResizeMethodInfo
    instance (signature ~ (Int32 -> m ()), MonadIO m) => O.MethodInfo TabArrayResizeMethodInfo TabArray signature where
        overloadedMethod = tabArrayResize

    #endif

    -- method TabArray::set_tab
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "tab_array"
    --           , argType =
    --               TInterface Name { namespace = "Pango" , name = "TabArray" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #PangoTabArray" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "tab_index"
    --           , argType = TBasicType TInt
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the index of a tab stop"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "alignment"
    --           , argType =
    --               TInterface Name { namespace = "Pango" , name = "TabAlign" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "tab alignment" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "location"
    --           , argType = TBasicType TInt
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "tab location in Pango units"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "pango_tab_array_set_tab" pango_tab_array_set_tab ::
        Ptr TabArray ->                         -- tab_array : TInterface (Name {namespace = "Pango", name = "TabArray"})
        Int32 ->                                -- tab_index : TBasicType TInt
        CUInt ->                                -- alignment : TInterface (Name {namespace = "Pango", name = "TabAlign"})
        Int32 ->                                -- location : TBasicType TInt
        IO ()

    -- | Sets the alignment and location of a tab stop.
    -- /@alignment@/ must always be @/PANGO_TAB_LEFT/@ in the current
    -- implementation.
    tabArraySetTab ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        TabArray
        -- ^ /@tabArray@/: a t'GI.Pango.Structs.TabArray.TabArray'
        -> Int32
        -- ^ /@tabIndex@/: the index of a tab stop
        -> Pango.Enums.TabAlign
        -- ^ /@alignment@/: tab alignment
        -> Int32
        -- ^ /@location@/: tab location in Pango units
        -> m ()
    tabArraySetTab :: TabArray -> Int32 -> TabAlign -> Int32 -> m ()
    tabArraySetTab tabArray :: TabArray
    tabArray tabIndex :: Int32
    tabIndex alignment :: TabAlign
    alignment location :: Int32
    location = IO () -> m ()
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr TabArray
    tabArray' <- TabArray -> IO (Ptr TabArray)
    forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
    unsafeManagedPtrGetPtr TabArray
    tabArray
        let alignment' :: CUInt
    alignment' = (Int -> CUInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (Int -> CUInt) -> (TabAlign -> Int) -> TabAlign -> CUInt
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . TabAlign -> Int
    forall a. Enum a => a -> Int
    fromEnum) TabAlign
    alignment
        Ptr TabArray -> Int32 -> CUInt -> Int32 -> IO ()
    pango_tab_array_set_tab Ptr TabArray
    tabArray' Int32
    tabIndex CUInt
    alignment' Int32
    location
        TabArray -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr TabArray
    tabArray
        () -> IO ()
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    #if defined(ENABLE_OVERLOADING)
    data TabArraySetTabMethodInfo
    instance (signature ~ (Int32 -> Pango.Enums.TabAlign -> Int32 -> m ()), MonadIO m) => O.MethodInfo TabArraySetTabMethodInfo TabArray signature where
        overloadedMethod = tabArraySetTab

    #endif

    #if defined(ENABLE_OVERLOADING)
    type family ResolveTabArrayMethod (t :: Symbol) (o :: *) :: * where
        ResolveTabArrayMethod "copy" o = TabArrayCopyMethodInfo
        ResolveTabArrayMethod "free" o = TabArrayFreeMethodInfo
        ResolveTabArrayMethod "resize" o = TabArrayResizeMethodInfo
        ResolveTabArrayMethod "getPositionsInPixels" o = TabArrayGetPositionsInPixelsMethodInfo
        ResolveTabArrayMethod "getSize" o = TabArrayGetSizeMethodInfo
        ResolveTabArrayMethod "getTab" o = TabArrayGetTabMethodInfo
        ResolveTabArrayMethod "setTab" o = TabArraySetTabMethodInfo
        ResolveTabArrayMethod l o = O.MethodResolutionFailed l o

    instance (info ~ ResolveTabArrayMethod t TabArray, O.MethodInfo info TabArray p) => OL.IsLabel t (TabArray -> p) where
    #if MIN_VERSION_base(4,10,0)
        fromLabel = O.overloadedMethod @info
    #else
        fromLabel _ = O.overloadedMethod @info
    #endif

    #endif