{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) 'GI.GIRepository.Objects.Repository.Repository' is used to manage repositories of namespaces. Namespaces are represented on disk by type libraries (.typelib files). -} module GI.GIRepository.Objects.Repository ( -- * Exported types Repository(..) , IsRepository , toRepository , noRepository , -- * Methods -- ** dump #method:dump# repositoryDump , -- ** enumerateVersions #method:enumerateVersions# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryEnumerateVersionsMethodInfo , #endif repositoryEnumerateVersions , -- ** errorQuark #method:errorQuark# repositoryErrorQuark , -- ** findByErrorDomain #method:findByErrorDomain# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryFindByErrorDomainMethodInfo , #endif repositoryFindByErrorDomain , -- ** findByGtype #method:findByGtype# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryFindByGtypeMethodInfo , #endif repositoryFindByGtype , -- ** findByName #method:findByName# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryFindByNameMethodInfo , #endif repositoryFindByName , -- ** getCPrefix #method:getCPrefix# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetCPrefixMethodInfo , #endif repositoryGetCPrefix , -- ** getDefault #method:getDefault# repositoryGetDefault , -- ** getDependencies #method:getDependencies# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetDependenciesMethodInfo , #endif repositoryGetDependencies , -- ** getImmediateDependencies #method:getImmediateDependencies# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetImmediateDependenciesMethodInfo, #endif repositoryGetImmediateDependencies , -- ** getInfo #method:getInfo# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetInfoMethodInfo , #endif repositoryGetInfo , -- ** getLoadedNamespaces #method:getLoadedNamespaces# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetLoadedNamespacesMethodInfo , #endif repositoryGetLoadedNamespaces , -- ** getNInfos #method:getNInfos# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetNInfosMethodInfo , #endif repositoryGetNInfos , -- ** getSearchPath #method:getSearchPath# repositoryGetSearchPath , -- ** getSharedLibrary #method:getSharedLibrary# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetSharedLibraryMethodInfo , #endif repositoryGetSharedLibrary , -- ** getTypelibPath #method:getTypelibPath# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetTypelibPathMethodInfo , #endif repositoryGetTypelibPath , -- ** getVersion #method:getVersion# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryGetVersionMethodInfo , #endif repositoryGetVersion , -- ** isRegistered #method:isRegistered# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryIsRegisteredMethodInfo , #endif repositoryIsRegistered , -- ** loadTypelib #method:loadTypelib# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryLoadTypelibMethodInfo , #endif repositoryLoadTypelib , -- ** prependLibraryPath #method:prependLibraryPath# repositoryPrependLibraryPath , -- ** prependSearchPath #method:prependSearchPath# repositoryPrependSearchPath , -- ** require #method:require# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryRequireMethodInfo , #endif repositoryRequire , -- ** requirePrivate #method:requirePrivate# #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) RepositoryRequirePrivateMethodInfo , #endif repositoryRequirePrivate , ) 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.GError as B.GError import qualified Data.GI.Base.GVariant as B.GVariant import qualified Data.GI.Base.GParamSpec as B.GParamSpec import qualified Data.GI.Base.CallStack as B.CallStack 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 {-# SOURCE #-} qualified GI.GIRepository.Flags as GIRepository.Flags import {-# SOURCE #-} qualified GI.GIRepository.Structs.BaseInfo as GIRepository.BaseInfo import {-# SOURCE #-} qualified GI.GIRepository.Structs.Typelib as GIRepository.Typelib import qualified GI.GObject.Objects.Object as GObject.Object newtype Repository = Repository (ManagedPtr Repository) foreign import ccall "g_irepository_get_type" c_g_irepository_get_type :: IO GType instance GObject Repository where gobjectType _ = c_g_irepository_get_type class GObject o => IsRepository o #if MIN_VERSION_base(4,9,0) instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError Repository a) => IsRepository a #endif instance IsRepository Repository instance GObject.Object.IsObject Repository toRepository :: (MonadIO m, IsRepository o) => o -> m Repository toRepository = liftIO . unsafeCastTo Repository noRepository :: Maybe Repository noRepository = Nothing #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) type family ResolveRepositoryMethod (t :: Symbol) (o :: *) :: * where ResolveRepositoryMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo ResolveRepositoryMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo ResolveRepositoryMethod "enumerateVersions" o = RepositoryEnumerateVersionsMethodInfo ResolveRepositoryMethod "findByErrorDomain" o = RepositoryFindByErrorDomainMethodInfo ResolveRepositoryMethod "findByGtype" o = RepositoryFindByGtypeMethodInfo ResolveRepositoryMethod "findByName" o = RepositoryFindByNameMethodInfo ResolveRepositoryMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo ResolveRepositoryMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo ResolveRepositoryMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo ResolveRepositoryMethod "isRegistered" o = RepositoryIsRegisteredMethodInfo ResolveRepositoryMethod "loadTypelib" o = RepositoryLoadTypelibMethodInfo ResolveRepositoryMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo ResolveRepositoryMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo ResolveRepositoryMethod "ref" o = GObject.Object.ObjectRefMethodInfo ResolveRepositoryMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo ResolveRepositoryMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo ResolveRepositoryMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo ResolveRepositoryMethod "require" o = RepositoryRequireMethodInfo ResolveRepositoryMethod "requirePrivate" o = RepositoryRequirePrivateMethodInfo ResolveRepositoryMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo ResolveRepositoryMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo ResolveRepositoryMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo ResolveRepositoryMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo ResolveRepositoryMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo ResolveRepositoryMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo ResolveRepositoryMethod "getCPrefix" o = RepositoryGetCPrefixMethodInfo ResolveRepositoryMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo ResolveRepositoryMethod "getDependencies" o = RepositoryGetDependenciesMethodInfo ResolveRepositoryMethod "getImmediateDependencies" o = RepositoryGetImmediateDependenciesMethodInfo ResolveRepositoryMethod "getInfo" o = RepositoryGetInfoMethodInfo ResolveRepositoryMethod "getLoadedNamespaces" o = RepositoryGetLoadedNamespacesMethodInfo ResolveRepositoryMethod "getNInfos" o = RepositoryGetNInfosMethodInfo ResolveRepositoryMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo ResolveRepositoryMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo ResolveRepositoryMethod "getSharedLibrary" o = RepositoryGetSharedLibraryMethodInfo ResolveRepositoryMethod "getTypelibPath" o = RepositoryGetTypelibPathMethodInfo ResolveRepositoryMethod "getVersion" o = RepositoryGetVersionMethodInfo ResolveRepositoryMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo ResolveRepositoryMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo ResolveRepositoryMethod l o = O.MethodResolutionFailed l o instance (info ~ ResolveRepositoryMethod t Repository, O.MethodInfo info Repository p) => O.IsLabelProxy t (Repository -> p) where fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #if MIN_VERSION_base(4,9,0) instance (info ~ ResolveRepositoryMethod t Repository, O.MethodInfo info Repository p) => O.IsLabel t (Repository -> 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 #endif #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) instance O.HasAttributeList Repository type instance O.AttributeList Repository = RepositoryAttributeList type RepositoryAttributeList = ('[ ] :: [(Symbol, *)]) #endif #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) #endif #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) type instance O.SignalList Repository = RepositorySignalList type RepositorySignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)]) #endif -- method Repository::enumerate_versions -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "GIRepository", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GIRepository or %NULL for the singleton\n process-global default #GIRepository", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "namespace_", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "GI namespace, e.g. \"Gtk\"", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TGList (TBasicType TUTF8)) -- throws : False -- Skip return : False foreign import ccall "g_irepository_enumerate_versions" g_irepository_enumerate_versions :: Ptr Repository -> -- repository : TInterface (Name {namespace = "GIRepository", name = "Repository"}) CString -> -- namespace_ : TBasicType TUTF8 IO (Ptr (GList CString)) {- | Obtain an unordered list of versions (either currently loaded or available) for /@namespace_@/ in this /@repository@/. -} repositoryEnumerateVersions :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.GIRepository.Objects.Repository.Repository' or 'Nothing' for the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository' -} -> T.Text {- ^ /@namespace_@/: GI namespace, e.g. \"Gtk\" -} -> m [T.Text] {- ^ __Returns:__ the array of versions. -} repositoryEnumerateVersions repository namespace_ = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository namespace_' <- textToCString namespace_ result <- g_irepository_enumerate_versions repository' namespace_' result' <- unpackGList result result'' <- mapM cstringToText result' mapGList freeMem result g_list_free result touchManagedPtr repository freeMem namespace_' return result'' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryEnumerateVersionsMethodInfo instance (signature ~ (T.Text -> m [T.Text]), MonadIO m, IsRepository a) => O.MethodInfo RepositoryEnumerateVersionsMethodInfo a signature where overloadedMethod _ = repositoryEnumerateVersions #endif -- method Repository::find_by_error_domain -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "GIRepository", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GIRepository or %NULL for the singleton\n process-global default #GIRepository", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "domain", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GError domain", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})) -- throws : False -- Skip return : False foreign import ccall "g_irepository_find_by_error_domain" g_irepository_find_by_error_domain :: Ptr Repository -> -- repository : TInterface (Name {namespace = "GIRepository", name = "Repository"}) Word32 -> -- domain : TBasicType TUInt32 IO (Ptr GIRepository.BaseInfo.BaseInfo) {- | Searches for the enum type corresponding to the given 'GError' domain. Before calling this function for a particular namespace, you must call 'GI.GIRepository.Objects.Repository.repositoryRequire' once to load the namespace, or otherwise ensure the namespace has already been loaded. @since 1.29.17 -} repositoryFindByErrorDomain :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.GIRepository.Objects.Repository.Repository' or 'Nothing' for the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository' -} -> Word32 {- ^ /@domain@/: a 'GError' domain -} -> m GIRepository.BaseInfo.BaseInfo {- ^ __Returns:__ @/GIEnumInfo/@ representing metadata about /@domain@/\'s enum type, or 'Nothing' -} repositoryFindByErrorDomain repository domain = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository result <- g_irepository_find_by_error_domain repository' domain checkUnexpectedReturnNULL "repositoryFindByErrorDomain" result result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result touchManagedPtr repository return result' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryFindByErrorDomainMethodInfo instance (signature ~ (Word32 -> m GIRepository.BaseInfo.BaseInfo), MonadIO m, IsRepository a) => O.MethodInfo RepositoryFindByErrorDomainMethodInfo a signature where overloadedMethod _ = repositoryFindByErrorDomain #endif -- method Repository::find_by_gtype -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "GIRepository", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GIRepository or %NULL for the singleton\n process-global default #GIRepository", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "gtype", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "GType to search for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})) -- throws : False -- Skip return : False foreign import ccall "g_irepository_find_by_gtype" g_irepository_find_by_gtype :: Ptr Repository -> -- repository : TInterface (Name {namespace = "GIRepository", name = "Repository"}) CGType -> -- gtype : TBasicType TGType IO (Ptr GIRepository.BaseInfo.BaseInfo) {- | Searches all loaded namespaces for a particular 'GType'. Note that in order to locate the metadata, the namespace corresponding to the type must first have been loaded. There is currently no mechanism for determining the namespace which corresponds to an arbitrary GType - thus, this function will operate most reliably when you know the GType to originate from be from a loaded namespace. -} repositoryFindByGtype :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.GIRepository.Objects.Repository.Repository' or 'Nothing' for the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository' -} -> GType {- ^ /@gtype@/: GType to search for -} -> m GIRepository.BaseInfo.BaseInfo {- ^ __Returns:__ 'GI.GIRepository.Structs.BaseInfo.BaseInfo' representing metadata about /@type@/, or 'Nothing' -} repositoryFindByGtype repository gtype = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository let gtype' = gtypeToCGType gtype result <- g_irepository_find_by_gtype repository' gtype' checkUnexpectedReturnNULL "repositoryFindByGtype" result result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result touchManagedPtr repository return result' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryFindByGtypeMethodInfo instance (signature ~ (GType -> m GIRepository.BaseInfo.BaseInfo), MonadIO m, IsRepository a) => O.MethodInfo RepositoryFindByGtypeMethodInfo a signature where overloadedMethod _ = repositoryFindByGtype #endif -- method Repository::find_by_name -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "GIRepository", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GIRepository or %NULL for the singleton\n process-global default #GIRepository", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "namespace_", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Namespace which will be searched", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Entry name to find", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})) -- throws : False -- Skip return : False foreign import ccall "g_irepository_find_by_name" g_irepository_find_by_name :: Ptr Repository -> -- repository : TInterface (Name {namespace = "GIRepository", name = "Repository"}) CString -> -- namespace_ : TBasicType TUTF8 CString -> -- name : TBasicType TUTF8 IO (Ptr GIRepository.BaseInfo.BaseInfo) {- | Searches for a particular entry in a namespace. Before calling this function for a particular namespace, you must call 'GI.GIRepository.Objects.Repository.repositoryRequire' once to load the namespace, or otherwise ensure the namespace has already been loaded. -} repositoryFindByName :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.GIRepository.Objects.Repository.Repository' or 'Nothing' for the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository' -} -> T.Text {- ^ /@namespace_@/: Namespace which will be searched -} -> T.Text {- ^ /@name@/: Entry name to find -} -> m GIRepository.BaseInfo.BaseInfo {- ^ __Returns:__ 'GI.GIRepository.Structs.BaseInfo.BaseInfo' representing metadata about /@name@/, or 'Nothing' -} repositoryFindByName repository namespace_ name = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository namespace_' <- textToCString namespace_ name' <- textToCString name result <- g_irepository_find_by_name repository' namespace_' name' checkUnexpectedReturnNULL "repositoryFindByName" result result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result touchManagedPtr repository freeMem namespace_' freeMem name' return result' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryFindByNameMethodInfo instance (signature ~ (T.Text -> T.Text -> m GIRepository.BaseInfo.BaseInfo), MonadIO m, IsRepository a) => O.MethodInfo RepositoryFindByNameMethodInfo a signature where overloadedMethod _ = repositoryFindByName #endif -- method Repository::get_c_prefix -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "GIRepository", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GIRepository or %NULL for the singleton\n process-global default #GIRepository", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "namespace_", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Namespace to inspect", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "g_irepository_get_c_prefix" g_irepository_get_c_prefix :: Ptr Repository -> -- repository : TInterface (Name {namespace = "GIRepository", name = "Repository"}) CString -> -- namespace_ : TBasicType TUTF8 IO CString {- | This function returns the \"C prefix\", or the C level namespace associated with the given introspection namespace. Each C symbol starts with this prefix, as well each 'GType' in the library. Note: The namespace must have already been loaded using a function such as 'GI.GIRepository.Objects.Repository.repositoryRequire' before calling this function. -} repositoryGetCPrefix :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.GIRepository.Objects.Repository.Repository' or 'Nothing' for the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository' -} -> T.Text {- ^ /@namespace_@/: Namespace to inspect -} -> m T.Text {- ^ __Returns:__ C namespace prefix, or 'Nothing' if none associated -} repositoryGetCPrefix repository namespace_ = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository namespace_' <- textToCString namespace_ result <- g_irepository_get_c_prefix repository' namespace_' checkUnexpectedReturnNULL "repositoryGetCPrefix" result result' <- cstringToText result touchManagedPtr repository freeMem namespace_' return result' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryGetCPrefixMethodInfo instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetCPrefixMethodInfo a signature where overloadedMethod _ = repositoryGetCPrefix #endif -- method Repository::get_dependencies -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "GIRepository", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GIRepository or %NULL for the singleton\n process-global default #GIRepository", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "namespace_", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Namespace of interest", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8)) -- throws : False -- Skip return : False foreign import ccall "g_irepository_get_dependencies" g_irepository_get_dependencies :: Ptr Repository -> -- repository : TInterface (Name {namespace = "GIRepository", name = "Repository"}) CString -> -- namespace_ : TBasicType TUTF8 IO (Ptr CString) {- | Return an array of all (transitive) versioned dependencies for /@namespace_@/. Returned strings are of the form \<code>namespace-version\<\/code>. Note: /@namespace_@/ must have already been loaded using a function such as 'GI.GIRepository.Objects.Repository.repositoryRequire' before calling this function. To get only the immediate dependencies for /@namespace_@/, use 'GI.GIRepository.Objects.Repository.repositoryGetImmediateDependencies'. -} repositoryGetDependencies :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.GIRepository.Objects.Repository.Repository' or 'Nothing' for the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository' -} -> T.Text {- ^ /@namespace_@/: Namespace of interest -} -> m [T.Text] {- ^ __Returns:__ Zero-terminated string array of all versioned dependencies -} repositoryGetDependencies repository namespace_ = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository namespace_' <- textToCString namespace_ result <- g_irepository_get_dependencies repository' namespace_' checkUnexpectedReturnNULL "repositoryGetDependencies" result result' <- unpackZeroTerminatedUTF8CArray result mapZeroTerminatedCArray freeMem result freeMem result touchManagedPtr repository freeMem namespace_' return result' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryGetDependenciesMethodInfo instance (signature ~ (T.Text -> m [T.Text]), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetDependenciesMethodInfo a signature where overloadedMethod _ = repositoryGetDependencies #endif -- method Repository::get_immediate_dependencies -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "GIRepository", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GIRepository or %NULL for the singleton\n process-global default #GIRepository", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "namespace_", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Namespace of interest", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8)) -- throws : False -- Skip return : False foreign import ccall "g_irepository_get_immediate_dependencies" g_irepository_get_immediate_dependencies :: Ptr Repository -> -- repository : TInterface (Name {namespace = "GIRepository", name = "Repository"}) CString -> -- namespace_ : TBasicType TUTF8 IO (Ptr CString) {- | Return an array of the immediate versioned dependencies for /@namespace_@/. Returned strings are of the form \<code>namespace-version\<\/code>. Note: /@namespace_@/ must have already been loaded using a function such as 'GI.GIRepository.Objects.Repository.repositoryRequire' before calling this function. To get the transitive closure of dependencies for /@namespace_@/, use 'GI.GIRepository.Objects.Repository.repositoryGetDependencies'. @since 1.44 -} repositoryGetImmediateDependencies :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.GIRepository.Objects.Repository.Repository' or 'Nothing' for the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository' -} -> T.Text {- ^ /@namespace_@/: Namespace of interest -} -> m [T.Text] {- ^ __Returns:__ Zero-terminated string array of immediate versioned dependencies -} repositoryGetImmediateDependencies repository namespace_ = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository namespace_' <- textToCString namespace_ result <- g_irepository_get_immediate_dependencies repository' namespace_' checkUnexpectedReturnNULL "repositoryGetImmediateDependencies" result result' <- unpackZeroTerminatedUTF8CArray result mapZeroTerminatedCArray freeMem result freeMem result touchManagedPtr repository freeMem namespace_' return result' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryGetImmediateDependenciesMethodInfo instance (signature ~ (T.Text -> m [T.Text]), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetImmediateDependenciesMethodInfo a signature where overloadedMethod _ = repositoryGetImmediateDependencies #endif -- method Repository::get_info -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "GIRepository", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GIRepository or %NULL for the singleton\n process-global default #GIRepository", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "namespace_", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Namespace to inspect", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "index", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "0-based offset into namespace metadata for entry", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "BaseInfo"})) -- throws : False -- Skip return : False foreign import ccall "g_irepository_get_info" g_irepository_get_info :: Ptr Repository -> -- repository : TInterface (Name {namespace = "GIRepository", name = "Repository"}) CString -> -- namespace_ : TBasicType TUTF8 Int32 -> -- index : TBasicType TInt IO (Ptr GIRepository.BaseInfo.BaseInfo) {- | This function returns a particular metadata entry in the given namespace /@namespace_@/. The namespace must have already been loaded before calling this function. See 'GI.GIRepository.Objects.Repository.repositoryGetNInfos' to find the maximum number of entries. -} repositoryGetInfo :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.GIRepository.Objects.Repository.Repository' or 'Nothing' for the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository' -} -> T.Text {- ^ /@namespace_@/: Namespace to inspect -} -> Int32 {- ^ /@index@/: 0-based offset into namespace metadata for entry -} -> m GIRepository.BaseInfo.BaseInfo {- ^ __Returns:__ 'GI.GIRepository.Structs.BaseInfo.BaseInfo' containing metadata -} repositoryGetInfo repository namespace_ index = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository namespace_' <- textToCString namespace_ result <- g_irepository_get_info repository' namespace_' index checkUnexpectedReturnNULL "repositoryGetInfo" result result' <- (wrapBoxed GIRepository.BaseInfo.BaseInfo) result touchManagedPtr repository freeMem namespace_' return result' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryGetInfoMethodInfo instance (signature ~ (T.Text -> Int32 -> m GIRepository.BaseInfo.BaseInfo), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetInfoMethodInfo a signature where overloadedMethod _ = repositoryGetInfo #endif -- method Repository::get_loaded_namespaces -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "GIRepository", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GIRepository or %NULL for the singleton\n process-global default #GIRepository", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8)) -- throws : False -- Skip return : False foreign import ccall "g_irepository_get_loaded_namespaces" g_irepository_get_loaded_namespaces :: Ptr Repository -> -- repository : TInterface (Name {namespace = "GIRepository", name = "Repository"}) IO (Ptr CString) {- | Return the list of currently loaded namespaces. -} repositoryGetLoadedNamespaces :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.GIRepository.Objects.Repository.Repository' or 'Nothing' for the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository' -} -> m [T.Text] {- ^ __Returns:__ List of namespaces -} repositoryGetLoadedNamespaces repository = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository result <- g_irepository_get_loaded_namespaces repository' checkUnexpectedReturnNULL "repositoryGetLoadedNamespaces" result result' <- unpackZeroTerminatedUTF8CArray result mapZeroTerminatedCArray freeMem result freeMem result touchManagedPtr repository return result' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryGetLoadedNamespacesMethodInfo instance (signature ~ (m [T.Text]), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetLoadedNamespacesMethodInfo a signature where overloadedMethod _ = repositoryGetLoadedNamespaces #endif -- method Repository::get_n_infos -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "GIRepository", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GIRepository or %NULL for the singleton\n process-global default #GIRepository", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "namespace_", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Namespace to inspect", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "g_irepository_get_n_infos" g_irepository_get_n_infos :: Ptr Repository -> -- repository : TInterface (Name {namespace = "GIRepository", name = "Repository"}) CString -> -- namespace_ : TBasicType TUTF8 IO Int32 {- | This function returns the number of metadata entries in given namespace /@namespace_@/. The namespace must have already been loaded before calling this function. -} repositoryGetNInfos :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.GIRepository.Objects.Repository.Repository' or 'Nothing' for the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository' -} -> T.Text {- ^ /@namespace_@/: Namespace to inspect -} -> m Int32 {- ^ __Returns:__ number of metadata entries -} repositoryGetNInfos repository namespace_ = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository namespace_' <- textToCString namespace_ result <- g_irepository_get_n_infos repository' namespace_' touchManagedPtr repository freeMem namespace_' return result #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryGetNInfosMethodInfo instance (signature ~ (T.Text -> m Int32), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetNInfosMethodInfo a signature where overloadedMethod _ = repositoryGetNInfos #endif -- method Repository::get_shared_library -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "GIRepository", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GIRepository or %NULL for the singleton\n process-global default #GIRepository", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "namespace_", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Namespace to inspect", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "g_irepository_get_shared_library" g_irepository_get_shared_library :: Ptr Repository -> -- repository : TInterface (Name {namespace = "GIRepository", name = "Repository"}) CString -> -- namespace_ : TBasicType TUTF8 IO CString {- | This function returns a comma-separated list of paths to the shared C libraries associated with the given namespace /@namespace_@/. There may be no shared library path associated, in which case this function will return 'Nothing'. Note: The namespace must have already been loaded using a function such as 'GI.GIRepository.Objects.Repository.repositoryRequire' before calling this function. -} repositoryGetSharedLibrary :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.GIRepository.Objects.Repository.Repository' or 'Nothing' for the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository' -} -> T.Text {- ^ /@namespace_@/: Namespace to inspect -} -> m T.Text {- ^ __Returns:__ Comma-separated list of paths to shared libraries, or 'Nothing' if none are associated -} repositoryGetSharedLibrary repository namespace_ = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository namespace_' <- textToCString namespace_ result <- g_irepository_get_shared_library repository' namespace_' checkUnexpectedReturnNULL "repositoryGetSharedLibrary" result result' <- cstringToText result touchManagedPtr repository freeMem namespace_' return result' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryGetSharedLibraryMethodInfo instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetSharedLibraryMethodInfo a signature where overloadedMethod _ = repositoryGetSharedLibrary #endif -- method Repository::get_typelib_path -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "GIRepository", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GIRepository or %NULL for the singleton\n process-global default #GIRepository", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "namespace_", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "GI namespace to use, e.g. \"Gtk\"", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "g_irepository_get_typelib_path" g_irepository_get_typelib_path :: Ptr Repository -> -- repository : TInterface (Name {namespace = "GIRepository", name = "Repository"}) CString -> -- namespace_ : TBasicType TUTF8 IO CString {- | If namespace /@namespace_@/ is loaded, return the full path to the .typelib file it was loaded from. If the typelib for namespace /@namespace_@/ was included in a shared library, return the special string \"<builtin>\". -} repositoryGetTypelibPath :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.GIRepository.Objects.Repository.Repository' or 'Nothing' for the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository' -} -> T.Text {- ^ /@namespace_@/: GI namespace to use, e.g. \"Gtk\" -} -> m T.Text {- ^ __Returns:__ Filesystem path (or $lt;builtin$gt;) if successful, 'Nothing' if namespace is not loaded -} repositoryGetTypelibPath repository namespace_ = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository namespace_' <- textToCString namespace_ result <- g_irepository_get_typelib_path repository' namespace_' checkUnexpectedReturnNULL "repositoryGetTypelibPath" result result' <- cstringToText result touchManagedPtr repository freeMem namespace_' return result' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryGetTypelibPathMethodInfo instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetTypelibPathMethodInfo a signature where overloadedMethod _ = repositoryGetTypelibPath #endif -- method Repository::get_version -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "GIRepository", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GIRepository or %NULL for the singleton\n process-global default #GIRepository", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "namespace_", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Namespace to inspect", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "g_irepository_get_version" g_irepository_get_version :: Ptr Repository -> -- repository : TInterface (Name {namespace = "GIRepository", name = "Repository"}) CString -> -- namespace_ : TBasicType TUTF8 IO CString {- | This function returns the loaded version associated with the given namespace /@namespace_@/. Note: The namespace must have already been loaded using a function such as 'GI.GIRepository.Objects.Repository.repositoryRequire' before calling this function. -} repositoryGetVersion :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.GIRepository.Objects.Repository.Repository' or 'Nothing' for the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository' -} -> T.Text {- ^ /@namespace_@/: Namespace to inspect -} -> m T.Text {- ^ __Returns:__ Loaded version -} repositoryGetVersion repository namespace_ = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository namespace_' <- textToCString namespace_ result <- g_irepository_get_version repository' namespace_' checkUnexpectedReturnNULL "repositoryGetVersion" result result' <- cstringToText result touchManagedPtr repository freeMem namespace_' return result' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryGetVersionMethodInfo instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetVersionMethodInfo a signature where overloadedMethod _ = repositoryGetVersion #endif -- method Repository::is_registered -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "GIRepository", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GIRepository or %NULL for the singleton\n process-global default #GIRepository", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "namespace_", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Namespace of interest", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "version", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Required version, may be %NULL for latest", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "g_irepository_is_registered" g_irepository_is_registered :: Ptr Repository -> -- repository : TInterface (Name {namespace = "GIRepository", name = "Repository"}) CString -> -- namespace_ : TBasicType TUTF8 CString -> -- version : TBasicType TUTF8 IO CInt {- | Check whether a particular namespace (and optionally, a specific version thereof) is currently loaded. This function is likely to only be useful in unusual circumstances; in order to act upon metadata in the namespace, you should call 'GI.GIRepository.Objects.Repository.repositoryRequire' instead which will ensure the namespace is loaded, and return as quickly as this function will if it has already been loaded. -} repositoryIsRegistered :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.GIRepository.Objects.Repository.Repository' or 'Nothing' for the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository' -} -> T.Text {- ^ /@namespace_@/: Namespace of interest -} -> Maybe (T.Text) {- ^ /@version@/: Required version, may be 'Nothing' for latest -} -> m Bool {- ^ __Returns:__ 'True' if namespace-version is loaded, 'False' otherwise -} repositoryIsRegistered repository namespace_ version = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository namespace_' <- textToCString namespace_ maybeVersion <- case version of Nothing -> return nullPtr Just jVersion -> do jVersion' <- textToCString jVersion return jVersion' result <- g_irepository_is_registered repository' namespace_' maybeVersion let result' = (/= 0) result touchManagedPtr repository freeMem namespace_' freeMem maybeVersion return result' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryIsRegisteredMethodInfo instance (signature ~ (T.Text -> Maybe (T.Text) -> m Bool), MonadIO m, IsRepository a) => O.MethodInfo RepositoryIsRegisteredMethodInfo a signature where overloadedMethod _ = repositoryIsRegistered #endif -- method Repository::load_typelib -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "GIRepository", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GIRepository or %NULL for the singleton\n process-global default #GIRepository", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "typelib", argType = TInterface (Name {namespace = "GIRepository", name = "Typelib"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "TODO", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "GIRepository", name = "RepositoryLoadFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "TODO", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : True -- Skip return : False foreign import ccall "g_irepository_load_typelib" g_irepository_load_typelib :: Ptr Repository -> -- repository : TInterface (Name {namespace = "GIRepository", name = "Repository"}) Ptr GIRepository.Typelib.Typelib -> -- typelib : TInterface (Name {namespace = "GIRepository", name = "Typelib"}) CUInt -> -- flags : TInterface (Name {namespace = "GIRepository", name = "RepositoryLoadFlags"}) Ptr (Ptr GError) -> -- error IO CString {- | TODO -} repositoryLoadTypelib :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.GIRepository.Objects.Repository.Repository' or 'Nothing' for the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository' -} -> GIRepository.Typelib.Typelib {- ^ /@typelib@/: TODO -} -> [GIRepository.Flags.RepositoryLoadFlags] {- ^ /@flags@/: TODO -} -> m T.Text {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryLoadTypelib repository typelib flags = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository typelib' <- unsafeManagedPtrGetPtr typelib let flags' = gflagsToWord flags onException (do result <- propagateGError $ g_irepository_load_typelib repository' typelib' flags' checkUnexpectedReturnNULL "repositoryLoadTypelib" result result' <- cstringToText result touchManagedPtr repository touchManagedPtr typelib return result' ) (do return () ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryLoadTypelibMethodInfo instance (signature ~ (GIRepository.Typelib.Typelib -> [GIRepository.Flags.RepositoryLoadFlags] -> m T.Text), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLoadTypelibMethodInfo a signature where overloadedMethod _ = repositoryLoadTypelib #endif -- method Repository::require -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "GIRepository", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GIRepository or %NULL for the singleton\n process-global default #GIRepository", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "namespace_", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "GI namespace to use, e.g. \"Gtk\"", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "version", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Version of namespace, may be %NULL for latest", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "GIRepository", name = "RepositoryLoadFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Set of %GIRepositoryLoadFlags, may be 0", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "Typelib"})) -- throws : True -- Skip return : False foreign import ccall "g_irepository_require" g_irepository_require :: Ptr Repository -> -- repository : TInterface (Name {namespace = "GIRepository", name = "Repository"}) CString -> -- namespace_ : TBasicType TUTF8 CString -> -- version : TBasicType TUTF8 CUInt -> -- flags : TInterface (Name {namespace = "GIRepository", name = "RepositoryLoadFlags"}) Ptr (Ptr GError) -> -- error IO (Ptr GIRepository.Typelib.Typelib) {- | Force the namespace /@namespace_@/ to be loaded if it isn\'t already. If /@namespace_@/ is not loaded, this function will search for a \".typelib\" file using the repository search path. In addition, a version /@version@/ of namespace may be specified. If /@version@/ is not specified, the latest will be used. -} repositoryRequire :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.GIRepository.Objects.Repository.Repository' or 'Nothing' for the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository' -} -> T.Text {- ^ /@namespace_@/: GI namespace to use, e.g. \"Gtk\" -} -> Maybe (T.Text) {- ^ /@version@/: Version of namespace, may be 'Nothing' for latest -} -> [GIRepository.Flags.RepositoryLoadFlags] {- ^ /@flags@/: Set of @/GIRepositoryLoadFlags/@, may be 0 -} -> m GIRepository.Typelib.Typelib {- ^ __Returns:__ a pointer to the 'GI.GIRepository.Structs.Typelib.Typelib' if successful, 'Nothing' otherwise /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryRequire repository namespace_ version flags = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository namespace_' <- textToCString namespace_ maybeVersion <- case version of Nothing -> return nullPtr Just jVersion -> do jVersion' <- textToCString jVersion return jVersion' let flags' = gflagsToWord flags onException (do result <- propagateGError $ g_irepository_require repository' namespace_' maybeVersion flags' checkUnexpectedReturnNULL "repositoryRequire" result result' <- (newPtr GIRepository.Typelib.Typelib) result touchManagedPtr repository freeMem namespace_' freeMem maybeVersion return result' ) (do freeMem namespace_' freeMem maybeVersion ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryRequireMethodInfo instance (signature ~ (T.Text -> Maybe (T.Text) -> [GIRepository.Flags.RepositoryLoadFlags] -> m GIRepository.Typelib.Typelib), MonadIO m, IsRepository a) => O.MethodInfo RepositoryRequireMethodInfo a signature where overloadedMethod _ = repositoryRequire #endif -- method Repository::require_private -- method type : OrdinaryMethod -- Args : [Arg {argCName = "repository", argType = TInterface (Name {namespace = "GIRepository", name = "Repository"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GIRepository or %NULL for the singleton\n process-global default #GIRepository", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "typelib_dir", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Private directory where to find the requested typelib", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "namespace_", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "GI namespace to use, e.g. \"Gtk\"", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "version", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Version of namespace, may be %NULL for latest", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "GIRepository", name = "RepositoryLoadFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Set of %GIRepositoryLoadFlags, may be 0", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "Typelib"})) -- throws : True -- Skip return : False foreign import ccall "g_irepository_require_private" g_irepository_require_private :: Ptr Repository -> -- repository : TInterface (Name {namespace = "GIRepository", name = "Repository"}) CString -> -- typelib_dir : TBasicType TUTF8 CString -> -- namespace_ : TBasicType TUTF8 CString -> -- version : TBasicType TUTF8 CUInt -> -- flags : TInterface (Name {namespace = "GIRepository", name = "RepositoryLoadFlags"}) Ptr (Ptr GError) -> -- error IO (Ptr GIRepository.Typelib.Typelib) {- | Force the namespace /@namespace_@/ to be loaded if it isn\'t already. If /@namespace_@/ is not loaded, this function will search for a \".typelib\" file within the private directory only. In addition, a version /@version@/ of namespace should be specified. If /@version@/ is not specified, the latest will be used. -} repositoryRequirePrivate :: (B.CallStack.HasCallStack, MonadIO m, IsRepository a) => a {- ^ /@repository@/: A 'GI.GIRepository.Objects.Repository.Repository' or 'Nothing' for the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository' -} -> T.Text {- ^ /@typelibDir@/: Private directory where to find the requested typelib -} -> T.Text {- ^ /@namespace_@/: GI namespace to use, e.g. \"Gtk\" -} -> Maybe (T.Text) {- ^ /@version@/: Version of namespace, may be 'Nothing' for latest -} -> [GIRepository.Flags.RepositoryLoadFlags] {- ^ /@flags@/: Set of @/GIRepositoryLoadFlags/@, may be 0 -} -> m GIRepository.Typelib.Typelib {- ^ __Returns:__ a pointer to the 'GI.GIRepository.Structs.Typelib.Typelib' if successful, 'Nothing' otherwise /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryRequirePrivate repository typelibDir namespace_ version flags = liftIO $ do repository' <- unsafeManagedPtrCastPtr repository typelibDir' <- textToCString typelibDir namespace_' <- textToCString namespace_ maybeVersion <- case version of Nothing -> return nullPtr Just jVersion -> do jVersion' <- textToCString jVersion return jVersion' let flags' = gflagsToWord flags onException (do result <- propagateGError $ g_irepository_require_private repository' typelibDir' namespace_' maybeVersion flags' checkUnexpectedReturnNULL "repositoryRequirePrivate" result result' <- (newPtr GIRepository.Typelib.Typelib) result touchManagedPtr repository freeMem typelibDir' freeMem namespace_' freeMem maybeVersion return result' ) (do freeMem typelibDir' freeMem namespace_' freeMem maybeVersion ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) data RepositoryRequirePrivateMethodInfo instance (signature ~ (T.Text -> T.Text -> Maybe (T.Text) -> [GIRepository.Flags.RepositoryLoadFlags] -> m GIRepository.Typelib.Typelib), MonadIO m, IsRepository a) => O.MethodInfo RepositoryRequirePrivateMethodInfo a signature where overloadedMethod _ = repositoryRequirePrivate #endif -- method Repository::dump -- method type : MemberFunction -- Args : [Arg {argCName = "arg", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "g_irepository_dump" g_irepository_dump :: CString -> -- arg : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO CInt {- | /No description available in the introspection data./ -} repositoryDump :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} repositoryDump arg = liftIO $ do arg' <- textToCString arg onException (do _ <- propagateGError $ g_irepository_dump arg' freeMem arg' return () ) (do freeMem arg' ) #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) #endif -- method Repository::error_quark -- method type : MemberFunction -- Args : [] -- Lengths : [] -- returnType : Just (TBasicType TUInt32) -- throws : False -- Skip return : False foreign import ccall "g_irepository_error_quark" g_irepository_error_quark :: IO Word32 {- | /No description available in the introspection data./ -} repositoryErrorQuark :: (B.CallStack.HasCallStack, MonadIO m) => m Word32 repositoryErrorQuark = liftIO $ do result <- g_irepository_error_quark return result #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) #endif -- method Repository::get_default -- method type : MemberFunction -- Args : [] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "GIRepository", name = "Repository"})) -- throws : False -- Skip return : False foreign import ccall "g_irepository_get_default" g_irepository_get_default :: IO (Ptr Repository) {- | Returns the singleton process-global default 'GI.GIRepository.Objects.Repository.Repository'. It is not currently supported to have multiple repositories in a particular process, but this function is provided in the unlikely eventuality that it would become possible, and as a convenience for higher level language bindings to conform to the GObject method call conventions. All methods on 'GI.GIRepository.Objects.Repository.Repository' also accept 'Nothing' as an instance parameter to mean this default repository, which is usually more convenient for C. -} repositoryGetDefault :: (B.CallStack.HasCallStack, MonadIO m) => m Repository {- ^ __Returns:__ The global singleton 'GI.GIRepository.Objects.Repository.Repository' -} repositoryGetDefault = liftIO $ do result <- g_irepository_get_default checkUnexpectedReturnNULL "repositoryGetDefault" result result' <- (newObject Repository) result return result' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) #endif -- method Repository::get_search_path -- method type : MemberFunction -- Args : [] -- Lengths : [] -- returnType : Just (TGSList (TBasicType TFileName)) -- throws : False -- Skip return : False foreign import ccall "g_irepository_get_search_path" g_irepository_get_search_path :: IO (Ptr (GSList CString)) {- | Returns the current search path 'GI.GIRepository.Objects.Repository.Repository' will use when loading typelib files. The list is internal to @/GIRespository/@ and should not be freed, nor should its string elements. -} repositoryGetSearchPath :: (B.CallStack.HasCallStack, MonadIO m) => m [[Char]] {- ^ __Returns:__ 'GI.GLib.Structs.SList.SList' of strings -} repositoryGetSearchPath = liftIO $ do result <- g_irepository_get_search_path result' <- unpackGSList result result'' <- mapM cstringToString result' return result'' #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) #endif -- method Repository::prepend_library_path -- method type : MemberFunction -- Args : [Arg {argCName = "directory", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "g_irepository_prepend_library_path" g_irepository_prepend_library_path :: CString -> -- directory : TBasicType TUTF8 IO () {- | /No description available in the introspection data./ -} repositoryPrependLibraryPath :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -> m () repositoryPrependLibraryPath directory = liftIO $ do directory' <- textToCString directory g_irepository_prepend_library_path directory' freeMem directory' return () #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) #endif -- method Repository::prepend_search_path -- method type : MemberFunction -- Args : [Arg {argCName = "directory", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "directory name to prepend to the typelib\n search path", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "g_irepository_prepend_search_path" g_irepository_prepend_search_path :: CString -> -- directory : TBasicType TFileName IO () {- | Prepends /@directory@/ to the typelib search path. See 'GI.GIRepository.Objects.Repository.repositoryGetSearchPath'. -} repositoryPrependSearchPath :: (B.CallStack.HasCallStack, MonadIO m) => [Char] {- ^ /@directory@/: directory name to prepend to the typelib search path -} -> m () repositoryPrependSearchPath directory = liftIO $ do directory' <- stringToCString directory g_irepository_prepend_search_path directory' freeMem directory' return () #if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__) #endif