packages feed

gi-gobject-0.2.46.13: GI/GObject/Structs/ClosureNotifyData.hs


{- |
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.GObject.Structs.ClosureNotifyData
    ( 

-- * Exported types
    ClosureNotifyData(..)                   ,
    newZeroClosureNotifyData                ,
    noClosureNotifyData                     ,


 -- * Properties
-- ** Data
    closureNotifyDataReadData               ,




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

newtype ClosureNotifyData = ClosureNotifyData (ForeignPtr ClosureNotifyData)
-- | Construct a `ClosureNotifyData` struct initialized to zero.
newZeroClosureNotifyData :: MonadIO m => m ClosureNotifyData
newZeroClosureNotifyData = liftIO $ callocBytes 16 >>= wrapPtr ClosureNotifyData

noClosureNotifyData :: Maybe ClosureNotifyData
noClosureNotifyData = Nothing

closureNotifyDataReadData :: ClosureNotifyData -> IO (Ptr ())
closureNotifyDataReadData s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO (Ptr ())
    return val

-- XXX Skipped getter for "ClosureNotifyData:notify" :: Not implemented: "Wrapping foreign callbacks is not supported yet"

type family ResolveClosureNotifyDataMethod (t :: Symbol) (o :: *) :: * where
    ResolveClosureNotifyDataMethod l o = MethodResolutionFailed l o

instance (info ~ ResolveClosureNotifyDataMethod t ClosureNotifyData, MethodInfo info ClosureNotifyData p) => IsLabelProxy t (ClosureNotifyData -> p) where
    fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveClosureNotifyDataMethod t ClosureNotifyData, MethodInfo info ClosureNotifyData p) => IsLabel t (ClosureNotifyData -> p) where
    fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)
#endif