Safe Haskell | None |
---|---|
Language | Haskell98 |
Marshalling of structs and unions.
Synopsis
- genStructOrUnionFields :: Name -> [Field] -> CodeGen ()
- genZeroStruct :: Name -> Struct -> CodeGen ()
- genZeroUnion :: Name -> Union -> CodeGen ()
- extractCallbacksInStruct :: (Name, API) -> [(Name, API)]
- fixAPIStructs :: (Name, API) -> (Name, API)
- ignoreStruct :: Name -> Struct -> Bool
- genWrappedPtr :: Name -> AllocationInfo -> Int -> CodeGen ()
Documentation
extractCallbacksInStruct :: (Name, API) -> [(Name, API)] Source #
Extract the callback types embedded in the fields of structs, and at the same time fix the type of the corresponding fields. Returns the list of APIs associated to this struct, not including the struct itself.
fixAPIStructs :: (Name, API) -> (Name, API) Source #
Fix the interface names of callback fields in an APIStruct to correspond to the ones that we are going to generate. If something other than an APIStruct is passed in we don't touch it.
ignoreStruct :: Name -> Struct -> Bool Source #
Whether (not) to generate bindings for the given struct.
genWrappedPtr :: Name -> AllocationInfo -> Int -> CodeGen () Source #
Generate the typeclass with information for how to allocate/deallocate a given type.