- arrayDtoC
T* arrayDtoC(T[] array)
Template to copy a D array for use by C.
- cToD
T cToD(void* data)
Template to copy a D value from a C value.
- cValueFree
void cValueFree(void* data)
Free a C value. The value type is defined by the equivalent D template type T. Does nothing if the type does not need to be freed.
- containerFree
void containerFree(CT container)
Free a GLib container type.
- containerTypeIsSupported
bool containerTypeIsSupported()
Check if a type is supported for the purpose of transforming between C and D containers
- containerTypeSize
uint containerTypeSize()
Get the size required for the type of an element for a container.
- dToC
void dToC(T val, void* data)
Template to copy a C value from a D value.
- freezeDelegate
void* freezeDelegate(void* dlg)
Freeze a delegate to C heap memory and pin the context in the GC.
- fromCString
string fromCString(const(char)* cstr, Flag!"Free" free)
Convert a C string to a D string, with parameter to consume (free) the C string with g_free().
- gArrayGFromD
GArray* gArrayGFromD(T[] a)
Template to convert a D array to a GArray for passing to C functions
- gArrayGToD
T[] gArrayGToD(GArray* gArray)
Convert a GLib GArray to a D array.
- gByteArrayFromD
GByteArray* gByteArrayFromD(ubyte[] a)
Template to convert a D ubyte array to a GByteArray for passing to C functions
- gByteArrayToD
ubyte[] gByteArrayToD(GByteArray* gByteArray)
Convert a GLib GByteArray to a D array.
- gBytesFromD
GBytes* gBytesFromD(ubyte[] a)
Template to convert a D ubyte array to a GBytes for passing to C functions
- gBytesToD
ubyte[] gBytesToD(GBytes* gBytes)
Convert a GLib GBytes to a D array.
- gHashTableFromD
GHashTable* gHashTableFromD(V[K] map)
Convert a D map to a GHashTable.
- gHashTableToD
V[K] gHashTableToD(GHashTable* hash)
Template to convert a GHashTable to a D associative array.
K: The key D type
V: The value D type
owned: Set to true if caller takes ownership of hash (frees it), false to leave it alone (default)
- gListFromD
GList* gListFromD(T[] a)
Template to convert a D array to a GList for passing to C functions
- gListToD
T[] gListToD(GList* list)
Convert a GLib GList to a D array.
- gPtrArrayFromD
GPtrArray* gPtrArrayFromD(T[] a)
Template to convert a D array to a GPtrArray for passing to C functions
- gPtrArrayToD
T[] gPtrArrayToD(GPtrArray* ptrArray)
Convert a GLib GPtrArray to a D array.
- gSListFromD
GSList* gSListFromD(T[] a)
Template to convert a D array to a GSList for passing to C functions
- gSListToD
T[] gSListToD(GSList* list)
Convert a GLib GSList to a D array.
- isTypeCopyableStruct
bool isTypeCopyableStruct()
Check if a type is a Boxed or Reffed type
- isTypeSimple
bool isTypeSimple()
Check if a type is considered a simple container type (can be copied directly)
- ptrFreezeGC
void ptrFreezeGC(void* ptr)
Prevent the garbage collector from freeing or moving a memory region.
Necessary when passing data to C which might not have any remaining pointers to it in D heap memory.
- ptrThawDestroyNotify
void ptrThawDestroyNotify(void* ptr)
GDestroyNotify callback which can be used to re-enable garbage collection and moving for a memory region frozen by ptrFreezeGC().
- ptrThawGC
void ptrThawGC(void* ptr)
Re-enable garbage collection and moving of a memory region which was frozen by ptrFreezeGC().
- strdup
char* strdup(const(char)* s)
Duplicate a zero terminate C string.
- thawDelegate
void thawDelegate(void* dlg)
Destroy a C heap memory allocated duplicated delegate and unpin context in the GC which was created with freezeDelegate().
- toCString
char* toCString(string dstr, Flag!"Alloc" alloc)
Convert a D string to a zero terminated C string, with allocation parameter.
- Flag (from std.typecons)
public
import std.typecons : Flag, No, Tuple, Yes;
Undocumented in source.
- No (from std.typecons)
public
import std.typecons : Flag, No, Tuple, Yes;
Undocumented in source.
- ParameterStorageClass (from std.traits)
public
import std.traits : isCallable, Parameters, ParameterStorageClass, ParameterStorageClassTuple, ReturnType;
Undocumented in source.
- ParameterStorageClassTuple (from std.traits)
public
import std.traits : isCallable, Parameters, ParameterStorageClass, ParameterStorageClassTuple, ReturnType;
Undocumented in source.
- Parameters (from std.traits)
public
import std.traits : isCallable, Parameters, ParameterStorageClass, ParameterStorageClassTuple, ReturnType;
Undocumented in source.
- ReturnType (from std.traits)
public
import std.traits : isCallable, Parameters, ParameterStorageClass, ParameterStorageClassTuple, ReturnType;
Undocumented in source.
- Tuple (from std.typecons)
public
import std.typecons : Flag, No, Tuple, Yes;
Undocumented in source.
- Yes (from std.typecons)
public
import std.typecons : Flag, No, Tuple, Yes;
Undocumented in source.
- isCallable (from std.traits)
public
import std.traits : isCallable, Parameters, ParameterStorageClass, ParameterStorageClassTuple, ReturnType;
Undocumented in source.
- memset (from core.stdc.string)
public
import core.stdc.string : memset;
Undocumented in source.