module GI.Atk.Objects.ObjectFactory
(
ObjectFactory(..) ,
ObjectFactoryK ,
toObjectFactory ,
noObjectFactory ,
objectFactoryCreateAccessible ,
objectFactoryGetAccessibleType ,
objectFactoryInvalidate ,
) 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.Atk.Types
import GI.Atk.Callbacks
import qualified GI.GObject as GObject
newtype ObjectFactory = ObjectFactory (ForeignPtr ObjectFactory)
foreign import ccall "atk_object_factory_get_type"
c_atk_object_factory_get_type :: IO GType
type instance ParentTypes ObjectFactory = ObjectFactoryParentTypes
type ObjectFactoryParentTypes = '[GObject.Object]
instance GObject ObjectFactory where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_atk_object_factory_get_type
class GObject o => ObjectFactoryK o
instance (GObject o, IsDescendantOf ObjectFactory o) => ObjectFactoryK o
toObjectFactory :: ObjectFactoryK o => o -> IO ObjectFactory
toObjectFactory = unsafeCastTo ObjectFactory
noObjectFactory :: Maybe ObjectFactory
noObjectFactory = Nothing
type instance AttributeList ObjectFactory = ObjectFactoryAttributeList
type ObjectFactoryAttributeList = ('[ ] :: [(Symbol, *)])
type instance SignalList ObjectFactory = ObjectFactorySignalList
type ObjectFactorySignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "atk_object_factory_create_accessible" atk_object_factory_create_accessible ::
Ptr ObjectFactory ->
Ptr GObject.Object ->
IO (Ptr Object)
objectFactoryCreateAccessible ::
(MonadIO m, ObjectFactoryK a, GObject.ObjectK b) =>
a ->
b ->
m Object
objectFactoryCreateAccessible _obj obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let obj' = unsafeManagedPtrCastPtr obj
result <- atk_object_factory_create_accessible _obj' obj'
checkUnexpectedReturnNULL "atk_object_factory_create_accessible" result
result' <- (wrapObject Object) result
touchManagedPtr _obj
touchManagedPtr obj
return result'
foreign import ccall "atk_object_factory_get_accessible_type" atk_object_factory_get_accessible_type ::
Ptr ObjectFactory ->
IO CGType
objectFactoryGetAccessibleType ::
(MonadIO m, ObjectFactoryK a) =>
a ->
m GType
objectFactoryGetAccessibleType _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- atk_object_factory_get_accessible_type _obj'
let result' = GType result
touchManagedPtr _obj
return result'
foreign import ccall "atk_object_factory_invalidate" atk_object_factory_invalidate ::
Ptr ObjectFactory ->
IO ()
objectFactoryInvalidate ::
(MonadIO m, ObjectFactoryK a) =>
a ->
m ()
objectFactoryInvalidate _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
atk_object_factory_invalidate _obj'
touchManagedPtr _obj
return ()