libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
Loading...
Searching...
No Matches
gimbal_c_closure.h File Reference

Go to the source code of this file.

Data Structures

struct  GblCClosureClass
 
struct  GblCClosure
 

Macros

Type System

Type UUID and cast operators

#define GBL_C_CLOSURE_TYPE
 
#define GBL_C_CLOSURE(self)
 
#define GBL_C_CLOSURE_CLASS(klass)
 
#define GBL_C_CLOSURE_GET_CLASS(self)
 

Functions

GblType GblCClosure_type (void)
 

Detailed Description

GblCClosure, C function callback closure, and API.

This file contains the definition of and API around GblCClosure, which is the plain C function implementation of the GblClosure type.

It simply stores the value of a generic C function pointer, expecting to have either a marshal or meta marshal which converts arguments into plain C types, casts the callback to its correct type, invokes it, passing the arguments, and stores its return value as a GblVariant.

Author
2023 Falco Girgis

Definition in file gimbal_c_closure.h.

Macro Definition Documentation

◆ GBL_C_CLOSURE_TYPE

#define GBL_C_CLOSURE_TYPE

Type UUID of GblCClosure.

Definition at line 27 of file gimbal_c_closure.h.

◆ GBL_C_CLOSURE

#define GBL_C_CLOSURE (   self)

Function-style GblInstance cast.

Definition at line 28 of file gimbal_c_closure.h.

◆ GBL_C_CLOSURE_CLASS

#define GBL_C_CLOSURE_CLASS (   klass)

Function-style GblClass cast.

Definition at line 29 of file gimbal_c_closure.h.

◆ GBL_C_CLOSURE_GET_CLASS

#define GBL_C_CLOSURE_GET_CLASS (   self)

Get GblCClosureClass from GblInstance.

Definition at line 30 of file gimbal_c_closure.h.

Function Documentation

◆ GblCClosure_type()

GblType GblCClosure_type ( void  )

Returns the GblType UUID for GblCClosure.