Safe Haskell | None |
---|---|
Language | Haskell2010 |
A minimal wrapper for libgirepository.
Synopsis
- girRequire :: Text -> Text -> IO Typelib
- data Typelib
- setupTypelibSearchPath :: [FilePath] -> IO ()
- data FieldInfo = FieldInfo {}
- girStructFieldInfo :: Text -> Text -> IO (Int, Map Text FieldInfo)
- girUnionFieldInfo :: Text -> Text -> IO (Int, Map Text FieldInfo)
- girLoadGType :: Typelib -> Text -> IO GType
- girIsSymbolResolvable :: Typelib -> Text -> IO Bool
Documentation
girRequire :: Text -> Text -> IO Typelib Source #
Ensure that the given version of the namespace is loaded. If that is not possible we error out.
Wrapper for GITypelib
, remembering the originating namespace
and version.
setupTypelibSearchPath :: [FilePath] -> IO () Source #
A convenience function for setting up the typelib search path
from the environment. Note that for efficiency reasons this should
only be called once per program run. If the list of paths passed in
is empty, the environment variable HASKELL_GI_TYPELIB_SEARCH_PATH
will be checked. In either case the system directories will be
searched after the passed in directories.
Extra info about a field in a struct or union which is not easily determined from the GIR file. (And which we determine by using libgirepository.)
girStructFieldInfo :: Text -> Text -> IO (Int, Map Text FieldInfo) Source #
Find out the size of a struct, and the map from field names to offsets inside the struct.
girUnionFieldInfo :: Text -> Text -> IO (Int, Map Text FieldInfo) Source #
Find out the size of a union, and the map from field names to offsets inside the union.