Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GI.Gst.Structs.ByteArrayInterface
Description
Interface for an array of bytes. It is expected to be subclassed to implement
resize
virtual method using language native array implementation, such as
GLib's ByteArray
, C++'s std::vector<uint8_t>
or Rust's Vec<u8>
.
resize
implementation could allocate more than requested to avoid repeated
reallocations. It can return False
, or be set to Nothing
, in the case the
array cannot grow.
Since: 1.24
Synopsis
- newtype ByteArrayInterface = ByteArrayInterface (ManagedPtr ByteArrayInterface)
- newZeroByteArrayInterface :: MonadIO m => m ByteArrayInterface
- getByteArrayInterfaceData :: MonadIO m => ByteArrayInterface -> m Word8
- setByteArrayInterfaceData :: MonadIO m => ByteArrayInterface -> Word8 -> m ()
- getByteArrayInterfaceLen :: MonadIO m => ByteArrayInterface -> m CSize
- setByteArrayInterfaceLen :: MonadIO m => ByteArrayInterface -> CSize -> m ()
- clearByteArrayInterfaceResize :: MonadIO m => ByteArrayInterface -> m ()
- getByteArrayInterfaceResize :: MonadIO m => ByteArrayInterface -> m (Maybe ByteArrayInterfaceResizeFieldCallback)
- setByteArrayInterfaceResize :: MonadIO m => ByteArrayInterface -> FunPtr C_ByteArrayInterfaceResizeFieldCallback -> m ()
Exported types
newtype ByteArrayInterface Source #
Memory-managed wrapper type.
Constructors
ByteArrayInterface (ManagedPtr ByteArrayInterface) |
Instances
Eq ByteArrayInterface Source # | |
Defined in GI.Gst.Structs.ByteArrayInterface Methods (==) :: ByteArrayInterface -> ByteArrayInterface -> Bool # (/=) :: ByteArrayInterface -> ByteArrayInterface -> Bool # | |
BoxedPtr ByteArrayInterface Source # | |
Defined in GI.Gst.Structs.ByteArrayInterface Methods boxedPtrCopy :: ByteArrayInterface -> IO ByteArrayInterface boxedPtrFree :: ByteArrayInterface -> IO () | |
CallocPtr ByteArrayInterface Source # | |
Defined in GI.Gst.Structs.ByteArrayInterface Methods | |
ManagedPtrNewtype ByteArrayInterface Source # | |
Defined in GI.Gst.Structs.ByteArrayInterface Methods toManagedPtr :: ByteArrayInterface -> ManagedPtr ByteArrayInterface | |
tag ~ 'AttrSet => Constructible ByteArrayInterface tag Source # | |
Defined in GI.Gst.Structs.ByteArrayInterface Methods new :: MonadIO m => (ManagedPtr ByteArrayInterface -> ByteArrayInterface) -> [AttrOp ByteArrayInterface tag] -> m ByteArrayInterface |
newZeroByteArrayInterface :: MonadIO m => m ByteArrayInterface Source #
Construct a ByteArrayInterface
struct initialized to zero.
Methods
Properties
data
A pointer to an array of bytes.
getByteArrayInterfaceData :: MonadIO m => ByteArrayInterface -> m Word8 Source #
Get the value of the “data
” field.
When overloading is enabled, this is equivalent to
get
byteArrayInterface #data
setByteArrayInterfaceData :: MonadIO m => ByteArrayInterface -> Word8 -> m () Source #
Set the value of the “data
” field.
When overloading is enabled, this is equivalent to
set
byteArrayInterface [ #data:=
value ]
len
Number of bytes in data
.
getByteArrayInterfaceLen :: MonadIO m => ByteArrayInterface -> m CSize Source #
Get the value of the “len
” field.
When overloading is enabled, this is equivalent to
get
byteArrayInterface #len
setByteArrayInterfaceLen :: MonadIO m => ByteArrayInterface -> CSize -> m () Source #
Set the value of the “len
” field.
When overloading is enabled, this is equivalent to
set
byteArrayInterface [ #len:=
value ]
resize
Reallocate data
.
clearByteArrayInterfaceResize :: MonadIO m => ByteArrayInterface -> m () Source #
Set the value of the “resize
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#resize
getByteArrayInterfaceResize :: MonadIO m => ByteArrayInterface -> m (Maybe ByteArrayInterfaceResizeFieldCallback) Source #
Get the value of the “resize
” field.
When overloading is enabled, this is equivalent to
get
byteArrayInterface #resize
setByteArrayInterfaceResize :: MonadIO m => ByteArrayInterface -> FunPtr C_ByteArrayInterfaceResizeFieldCallback -> m () Source #
Set the value of the “resize
” field.
When overloading is enabled, this is equivalent to
set
byteArrayInterface [ #resize:=
value ]