libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
Loading...
Searching...
No Matches
GblCClosure Struct Reference

#include <gimbal_c_closure.h>

Inheritance diagram for GblCClosure:
Collaboration diagram for GblCClosure:

Data Fields

union { 
 
   GblCClosureClass *   pClass 
 
   GblClosure   base 
 
};  
 
struct { 
 
   GblFnPtr   pFnCallback 
 
private_ 
 
- Data Fields inherited from GblClosure
union { 
 
   GblClosureClass *   pClass 
 
   GblBox   base 
 
};  
 
struct { 
 
   GblMarshalFn   pFnMarshal 
 
private_ 
 
- Data Fields inherited from GblInstance
GblClasspClass
 

Related Symbols

(Note that these are not member symbols.)

Lifetime Management

Methods for managing GblCClosure lifetime

GblCClosureGblCClosure_create (GblFnPtr pFnCallback, void *pUserdata)
 
GblCClosureGblCClosure_ref (GblCClosure *pSelf)
 
GblRefCount GblCClosure_unref (GblCClosure *pSelf)
 
Accessors

Get/Set methods for GblCClosure

void GblCClosure_setCallback (GblCClosure *pSelf, GblFnPtr pFnCallback)
 
GblFnPtr GblCClosure_callback (const GblCClosure *pSelf)
 

Detailed Description

Closure type for invoking C functions.

GblCClosure is a GblClosure which is used to marshal generic arguments into a C function pointer and marshal out the return value.

See also
GblClosure

Definition at line 58 of file gimbal_c_closure.h.

Friends And Related Symbol Documentation

◆ GblCClosure_create()

GblCClosure * GblCClosure_create ( GblFnPtr pFnCallback,
void * pUserdata )
related

Creates a GblCClosure instance with the given callback and userdata, returning a pointer to it.

◆ GblCClosure_ref()

GblCClosure * GblCClosure_ref ( GblCClosure * pSelf)
related

Creates and returns a new reference to the given GblCClosure, incrementing its refcount.

◆ GblCClosure_unref()

GblRefCount GblCClosure_unref ( GblCClosure * pSelf)
related

Releases the reference to the given GblCClosure, destroying it upon hitting zero.

◆ GblCClosure_setCallback()

void GblCClosure_setCallback ( GblCClosure * pSelf,
GblFnPtr pFnCallback )
related

Sets the C callback function of the given GblCClosure instance.

◆ GblCClosure_callback()

GblFnPtr GblCClosure_callback ( const GblCClosure * pSelf)
related

Returns the C callback function of the given GblClosure instance.

Field Documentation

◆ pClass

GblCClosureClass* GblCClosure::pClass

Pointer to class/vtable structure.

Definition at line 58 of file gimbal_c_closure.h.

◆ base

GblClosure GblCClosure::base

Inherited base instance structure.

Definition at line 58 of file gimbal_c_closure.h.

◆ pFnCallback

GblFnPtr GblCClosure::pFnCallback

PRIVATE: C Function pointer to invoke as a callback.

Definition at line 60 of file gimbal_c_closure.h.


The documentation for this struct was generated from the following file: