h-raylib-5.5.2.1: Raylib bindings for Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Raylib.Internal.Foreign

Description

Miscellaneous utility functions for marshalling values to/from C. The most notable thing in this module is the Freeable typeclass.

Synopsis

Documentation

c'free :: Ptr () -> IO () Source #

p'free :: FunPtr (Ptr a -> IO ()) Source #

freeMaybePtr :: Ptr () -> IO () Source #

class Freeable a where Source #

A typeclass used internally to free complex data types. You will most likely not have to use this directly. If you do need to implement it, you can probably just stick with the default definitions of rlFree and rlFreeDependents.

Minimal complete definition

Nothing

Methods

rlFreeDependents :: a -> Ptr a -> IO () Source #

Frees the data "dependent" on a pointer, which usually means dynamic C arrays, i.e. more pointers

rlFree :: a -> Ptr a -> IO () Source #

Receives a pointer and frees all of the data associated with it, including the pointer itself

Instances

Instances details
Freeable CBool Source # 
Instance details

Defined in Raylib.Internal.Foreign

Freeable CChar Source # 
Instance details

Defined in Raylib.Internal.Foreign

Freeable CFloat Source # 
Instance details

Defined in Raylib.Internal.Foreign

Freeable CInt Source # 
Instance details

Defined in Raylib.Internal.Foreign

Methods

rlFreeDependents :: CInt -> Ptr CInt -> IO () Source #

rlFree :: CInt -> Ptr CInt -> IO () Source #

Freeable CShort Source # 
Instance details

Defined in Raylib.Internal.Foreign

Freeable CUChar Source # 
Instance details

Defined in Raylib.Internal.Foreign

Freeable CUInt Source # 
Instance details

Defined in Raylib.Internal.Foreign

Freeable CUShort Source # 
Instance details

Defined in Raylib.Internal.Foreign

Freeable AutomationEvent Source # 
Instance details

Defined in Raylib.Types.Core

Freeable AutomationEventList Source # 
Instance details

Defined in Raylib.Types.Core

Freeable Color Source # 
Instance details

Defined in Raylib.Types.Core

Freeable ConfigFlag Source # 
Instance details

Defined in Raylib.Types.Core

Freeable FilePathList Source # 
Instance details

Defined in Raylib.Types.Core

Freeable Matrix Source # 
Instance details

Defined in Raylib.Types.Core

Freeable Rectangle Source # 
Instance details

Defined in Raylib.Types.Core

Freeable VrDeviceInfo Source # 
Instance details

Defined in Raylib.Types.Core

Freeable VrStereoConfig Source # 
Instance details

Defined in Raylib.Types.Core

Freeable AudioStream Source # 
Instance details

Defined in Raylib.Types.Core.Audio

Freeable Music Source # 
Instance details

Defined in Raylib.Types.Core.Audio

Freeable RAudioBuffer Source # 
Instance details

Defined in Raylib.Types.Core.Audio

Freeable RAudioProcessor Source # 
Instance details

Defined in Raylib.Types.Core.Audio

Freeable Sound Source # 
Instance details

Defined in Raylib.Types.Core.Audio

Freeable Wave Source # 
Instance details

Defined in Raylib.Types.Core.Audio

Methods

rlFreeDependents :: Wave -> Ptr Wave -> IO () Source #

rlFree :: Wave -> Ptr Wave -> IO () Source #

Freeable Camera2D Source # 
Instance details

Defined in Raylib.Types.Core.Camera

Freeable Camera3D Source # 
Instance details

Defined in Raylib.Types.Core.Camera

Freeable BoneInfo Source # 
Instance details

Defined in Raylib.Types.Core.Models

Freeable BoundingBox Source # 
Instance details

Defined in Raylib.Types.Core.Models

Freeable Material Source # 
Instance details

Defined in Raylib.Types.Core.Models

Freeable MaterialMap Source # 
Instance details

Defined in Raylib.Types.Core.Models

Freeable Mesh Source # 
Instance details

Defined in Raylib.Types.Core.Models

Methods

rlFreeDependents :: Mesh -> Ptr Mesh -> IO () Source #

rlFree :: Mesh -> Ptr Mesh -> IO () Source #

Freeable Model Source # 
Instance details

Defined in Raylib.Types.Core.Models

Freeable ModelAnimation Source # 
Instance details

Defined in Raylib.Types.Core.Models

Freeable Ray Source # 
Instance details

Defined in Raylib.Types.Core.Models

Methods

rlFreeDependents :: Ray -> Ptr Ray -> IO () Source #

rlFree :: Ray -> Ptr Ray -> IO () Source #

Freeable RayCollision Source # 
Instance details

Defined in Raylib.Types.Core.Models

Freeable Shader Source # 
Instance details

Defined in Raylib.Types.Core.Models

Freeable Transform Source # 
Instance details

Defined in Raylib.Types.Core.Models

Freeable Font Source # 
Instance details

Defined in Raylib.Types.Core.Text

Methods

rlFreeDependents :: Font -> Ptr Font -> IO () Source #

rlFree :: Font -> Ptr Font -> IO () Source #

Freeable GlyphInfo Source # 
Instance details

Defined in Raylib.Types.Core.Text

Freeable Image Source # 
Instance details

Defined in Raylib.Types.Core.Textures

Freeable NPatchInfo Source # 
Instance details

Defined in Raylib.Types.Core.Textures

Freeable RenderTexture Source # 
Instance details

Defined in Raylib.Types.Core.Textures

Freeable Texture Source # 
Instance details

Defined in Raylib.Types.Core.Textures

Freeable GuiStyleProp Source # 
Instance details

Defined in Raylib.Types.Util.GUI

Freeable RLDrawCall Source # 
Instance details

Defined in Raylib.Types.Util.RLGL

Freeable RLRenderBatch Source # 
Instance details

Defined in Raylib.Types.Util.RLGL

Freeable RLVertexBuffer Source # 
Instance details

Defined in Raylib.Types.Util.RLGL

Freeable (Ptr CChar) Source # 
Instance details

Defined in Raylib.Internal.Foreign

Freeable (V2 a) Source # 
Instance details

Defined in Raylib.Internal.Foreign

Methods

rlFreeDependents :: V2 a -> Ptr (V2 a) -> IO () Source #

rlFree :: V2 a -> Ptr (V2 a) -> IO () Source #

Freeable (V3 a) Source # 
Instance details

Defined in Raylib.Internal.Foreign

Methods

rlFreeDependents :: V3 a -> Ptr (V3 a) -> IO () Source #

rlFree :: V3 a -> Ptr (V3 a) -> IO () Source #

Freeable (V4 a) Source # 
Instance details

Defined in Raylib.Internal.Foreign

Methods

rlFreeDependents :: V4 a -> Ptr (V4 a) -> IO () Source #

rlFree :: V4 a -> Ptr (V4 a) -> IO () Source #

(Freeable a, Storable a) => Freeable [a] Source # 
Instance details

Defined in Raylib.Internal.Foreign

Methods

rlFreeDependents :: [a] -> Ptr [a] -> IO () Source #

rlFree :: [a] -> Ptr [a] -> IO () Source #

rlFreeMaybeArray :: (Freeable a, Storable a) => Maybe [a] -> Ptr a -> IO () Source #

pop :: (Freeable a, Storable a) => Ptr a -> IO a Source #

popCArray :: (Freeable a, Storable a) => Int -> Ptr a -> IO [a] Source #

withFreeable :: (Freeable a, Storable a) => a -> (Ptr a -> IO b) -> IO b Source #

withFreeableArray :: (Freeable a, Storable a) => [a] -> (Ptr a -> IO b) -> IO b Source #

withFreeableArrayLen :: (Freeable a, Storable a) => [a] -> (Int -> Ptr a -> IO b) -> IO b Source #

withFreeableArray2D :: (Freeable a, Storable a) => [[a]] -> (Ptr (Ptr a) -> IO b) -> IO b Source #

withMaybe :: Storable a => Maybe a -> (Ptr a -> IO b) -> IO b Source #

peekMaybe :: Storable a => Ptr (Ptr a) -> IO (Maybe a) Source #

peekMaybeOff :: Storable a => Ptr (Ptr a) -> Int -> IO (Maybe a) Source #

pokeMaybe :: Storable a => Ptr (Ptr a) -> Maybe a -> IO () Source #

pokeMaybeOff :: Storable a => Ptr (Ptr a) -> Int -> Maybe a -> IO () Source #

peekMaybeArray :: Storable a => Int -> Ptr a -> IO (Maybe [a]) Source #

peekStaticArray :: Storable a => Int -> Ptr a -> IO [a] Source #

peekStaticArrayOff :: Storable a => Int -> Ptr a -> Int -> IO [a] Source #

pokeStaticArray :: Storable a => Ptr a -> [a] -> IO () Source #

pokeStaticArrayOff :: Storable a => Ptr a -> Int -> [a] -> IO () Source #

rightPad :: Int -> a -> [a] -> [a] Source #