#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Atk.Objects.ObjectFactory
(
ObjectFactory(..) ,
IsObjectFactory ,
toObjectFactory ,
noObjectFactory ,
#if ENABLE_OVERLOADING
ObjectFactoryCreateAccessibleMethodInfo ,
#endif
objectFactoryCreateAccessible ,
#if ENABLE_OVERLOADING
ObjectFactoryGetAccessibleTypeMethodInfo,
#endif
objectFactoryGetAccessibleType ,
#if ENABLE_OVERLOADING
ObjectFactoryInvalidateMethodInfo ,
#endif
objectFactoryInvalidate ,
) 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.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
import qualified GI.GObject.Objects.Object as GObject.Object
newtype ObjectFactory = ObjectFactory (ManagedPtr ObjectFactory)
foreign import ccall "atk_object_factory_get_type"
c_atk_object_factory_get_type :: IO GType
instance GObject ObjectFactory where
gobjectType = c_atk_object_factory_get_type
class (GObject o, O.IsDescendantOf ObjectFactory o) => IsObjectFactory o
instance (GObject o, O.IsDescendantOf ObjectFactory o) => IsObjectFactory o
instance O.HasParentTypes ObjectFactory
type instance O.ParentTypes ObjectFactory = '[GObject.Object.Object]
toObjectFactory :: (MonadIO m, IsObjectFactory o) => o -> m ObjectFactory
toObjectFactory = liftIO . unsafeCastTo ObjectFactory
noObjectFactory :: Maybe ObjectFactory
noObjectFactory = Nothing
#if ENABLE_OVERLOADING
type family ResolveObjectFactoryMethod (t :: Symbol) (o :: *) :: * where
ResolveObjectFactoryMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveObjectFactoryMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveObjectFactoryMethod "createAccessible" o = ObjectFactoryCreateAccessibleMethodInfo
ResolveObjectFactoryMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveObjectFactoryMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveObjectFactoryMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveObjectFactoryMethod "invalidate" o = ObjectFactoryInvalidateMethodInfo
ResolveObjectFactoryMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveObjectFactoryMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveObjectFactoryMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveObjectFactoryMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveObjectFactoryMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveObjectFactoryMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveObjectFactoryMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveObjectFactoryMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveObjectFactoryMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveObjectFactoryMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveObjectFactoryMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveObjectFactoryMethod "getAccessibleType" o = ObjectFactoryGetAccessibleTypeMethodInfo
ResolveObjectFactoryMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveObjectFactoryMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveObjectFactoryMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveObjectFactoryMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveObjectFactoryMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveObjectFactoryMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveObjectFactoryMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveObjectFactoryMethod t ObjectFactory, O.MethodInfo info ObjectFactory p) => OL.IsLabel t (ObjectFactory -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList ObjectFactory
type instance O.AttributeList ObjectFactory = ObjectFactoryAttributeList
type ObjectFactoryAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList ObjectFactory = ObjectFactorySignalList
type ObjectFactorySignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "atk_object_factory_create_accessible" atk_object_factory_create_accessible ::
Ptr ObjectFactory ->
Ptr GObject.Object.Object ->
IO (Ptr Atk.Object.Object)
objectFactoryCreateAccessible ::
(B.CallStack.HasCallStack, MonadIO m, IsObjectFactory a, GObject.Object.IsObject b) =>
a
-> b
-> m Atk.Object.Object
objectFactoryCreateAccessible factory obj = liftIO $ do
factory' <- unsafeManagedPtrCastPtr factory
obj' <- unsafeManagedPtrCastPtr obj
result <- atk_object_factory_create_accessible factory' obj'
checkUnexpectedReturnNULL "objectFactoryCreateAccessible" result
result' <- (wrapObject Atk.Object.Object) result
touchManagedPtr factory
touchManagedPtr obj
return result'
#if ENABLE_OVERLOADING
data ObjectFactoryCreateAccessibleMethodInfo
instance (signature ~ (b -> m Atk.Object.Object), MonadIO m, IsObjectFactory a, GObject.Object.IsObject b) => O.MethodInfo ObjectFactoryCreateAccessibleMethodInfo a signature where
overloadedMethod _ = objectFactoryCreateAccessible
#endif
foreign import ccall "atk_object_factory_get_accessible_type" atk_object_factory_get_accessible_type ::
Ptr ObjectFactory ->
IO CGType
objectFactoryGetAccessibleType ::
(B.CallStack.HasCallStack, MonadIO m, IsObjectFactory a) =>
a
-> m GType
objectFactoryGetAccessibleType factory = liftIO $ do
factory' <- unsafeManagedPtrCastPtr factory
result <- atk_object_factory_get_accessible_type factory'
let result' = GType result
touchManagedPtr factory
return result'
#if ENABLE_OVERLOADING
data ObjectFactoryGetAccessibleTypeMethodInfo
instance (signature ~ (m GType), MonadIO m, IsObjectFactory a) => O.MethodInfo ObjectFactoryGetAccessibleTypeMethodInfo a signature where
overloadedMethod _ = objectFactoryGetAccessibleType
#endif
foreign import ccall "atk_object_factory_invalidate" atk_object_factory_invalidate ::
Ptr ObjectFactory ->
IO ()
objectFactoryInvalidate ::
(B.CallStack.HasCallStack, MonadIO m, IsObjectFactory a) =>
a
-> m ()
objectFactoryInvalidate factory = liftIO $ do
factory' <- unsafeManagedPtrCastPtr factory
atk_object_factory_invalidate factory'
touchManagedPtr factory
return ()
#if ENABLE_OVERLOADING
data ObjectFactoryInvalidateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsObjectFactory a) => O.MethodInfo ObjectFactoryInvalidateMethodInfo a signature where
overloadedMethod _ = objectFactoryInvalidate
#endif