{- |
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.GLib.Structs.TestLogBuffer
    ( 

-- * Exported types
    TestLogBuffer(..)                       ,
    noTestLogBuffer                         ,


 -- * Methods
-- ** testLogBufferFree
    testLogBufferFree                       ,


-- ** testLogBufferPush
    testLogBufferPush                       ,




    ) 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 TestLogBuffer = TestLogBuffer (ForeignPtr TestLogBuffer)
noTestLogBuffer :: Maybe TestLogBuffer
noTestLogBuffer = Nothing

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

foreign import ccall "g_test_log_buffer_free" g_test_log_buffer_free :: 
    Ptr TestLogBuffer ->                    -- _obj : TInterface "GLib" "TestLogBuffer"
    IO ()


testLogBufferFree ::
    (MonadIO m) =>
    TestLogBuffer ->                        -- _obj
    m ()
testLogBufferFree _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    g_test_log_buffer_free _obj'
    touchManagedPtr _obj
    return ()

-- method TestLogBuffer::push
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "GLib" "TestLogBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_bytes", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bytes", argType = TBasicType TUInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "GLib" "TestLogBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_bytes", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bytes", argType = TBasicType TUInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "g_test_log_buffer_push" g_test_log_buffer_push :: 
    Ptr TestLogBuffer ->                    -- _obj : TInterface "GLib" "TestLogBuffer"
    Word32 ->                               -- n_bytes : TBasicType TUInt32
    Word8 ->                                -- bytes : TBasicType TUInt8
    IO ()


testLogBufferPush ::
    (MonadIO m) =>
    TestLogBuffer ->                        -- _obj
    Word32 ->                               -- n_bytes
    Word8 ->                                -- bytes
    m ()
testLogBufferPush _obj n_bytes bytes = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    g_test_log_buffer_push _obj' n_bytes bytes
    touchManagedPtr _obj
    return ()