{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)

The GIConv struct wraps an iconv() conversion descriptor. It contains
private data and should only be accessed using the following functions.
-}

module GI.GLib.Structs.IConv
    ( 

-- * Exported types
    IConv(..)                               ,
    noIConv                                 ,


 -- * Methods
-- ** iConvClose
    iConvClose                              ,




    ) 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.GLib.Types
import GI.GLib.Callbacks

newtype IConv = IConv (ForeignPtr IConv)
noIConv :: Maybe IConv
noIConv = Nothing

-- method IConv::close
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "GLib" "IConv", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "GLib" "IConv", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "g_iconv_close" g_iconv_close :: 
    Ptr IConv ->                            -- _obj : TInterface "GLib" "IConv"
    IO Int32


iConvClose ::
    (MonadIO m) =>
    IConv ->                                -- _obj
    m Int32
iConvClose _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- g_iconv_close _obj'
    touchManagedPtr _obj
    return result