{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Atk.Structs.Implementor
(
Implementor(..) ,
noImplementor ,
#if defined(ENABLE_OVERLOADING)
ResolveImplementorMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ImplementorRefAccessibleMethodInfo ,
#endif
implementorRefAccessible ,
) 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.ManagedPtr as B.ManagedPtr
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 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.Atk.Objects.Object as Atk.Object
newtype Implementor = Implementor (ManagedPtr Implementor)
deriving (Implementor -> Implementor -> Bool
(Implementor -> Implementor -> Bool)
-> (Implementor -> Implementor -> Bool) -> Eq Implementor
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Implementor -> Implementor -> Bool
$c/= :: Implementor -> Implementor -> Bool
== :: Implementor -> Implementor -> Bool
$c== :: Implementor -> Implementor -> Bool
Eq)
instance WrappedPtr Implementor where
wrappedPtrCalloc :: IO (Ptr Implementor)
wrappedPtrCalloc = Ptr Implementor -> IO (Ptr Implementor)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Implementor
forall a. Ptr a
nullPtr
wrappedPtrCopy :: Implementor -> IO Implementor
wrappedPtrCopy = Implementor -> IO Implementor
forall (m :: * -> *) a. Monad m => a -> m a
return
wrappedPtrFree :: Maybe (GDestroyNotify Implementor)
wrappedPtrFree = Maybe (GDestroyNotify Implementor)
forall a. Maybe a
Nothing
noImplementor :: Maybe Implementor
noImplementor :: Maybe Implementor
noImplementor = Maybe Implementor
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Implementor
type instance O.AttributeList Implementor = ImplementorAttributeList
type ImplementorAttributeList = ('[ ] :: [(Symbol, *)])
#endif
foreign import ccall "atk_implementor_ref_accessible" atk_implementor_ref_accessible ::
Ptr Implementor ->
IO (Ptr Atk.Object.Object)
implementorRefAccessible ::
(B.CallStack.HasCallStack, MonadIO m) =>
Implementor
-> m Atk.Object.Object
implementorRefAccessible :: Implementor -> m Object
implementorRefAccessible implementor :: Implementor
implementor = IO Object -> m Object
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Object -> m Object) -> IO Object -> m Object
forall a b. (a -> b) -> a -> b
$ do
Ptr Implementor
implementor' <- Implementor -> IO (Ptr Implementor)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Implementor
implementor
Ptr Object
result <- Ptr Implementor -> IO (Ptr Object)
atk_implementor_ref_accessible Ptr Implementor
implementor'
Text -> Ptr Object -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "implementorRefAccessible" Ptr Object
result
Object
result' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Object -> Object
Atk.Object.Object) Ptr Object
result
Implementor -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Implementor
implementor
Object -> IO Object
forall (m :: * -> *) a. Monad m => a -> m a
return Object
result'
#if defined(ENABLE_OVERLOADING)
data ImplementorRefAccessibleMethodInfo
instance (signature ~ (m Atk.Object.Object), MonadIO m) => O.MethodInfo ImplementorRefAccessibleMethodInfo Implementor signature where
overloadedMethod = implementorRefAccessible
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveImplementorMethod (t :: Symbol) (o :: *) :: * where
ResolveImplementorMethod "refAccessible" o = ImplementorRefAccessibleMethodInfo
ResolveImplementorMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveImplementorMethod t Implementor, O.MethodInfo info Implementor p) => OL.IsLabel t (Implementor -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif