FFI Helper API¶
Pointer-oriented helper functions for raw ctypes, WASM, and foreign runtimes.
Status: advanced/unstable
This generated page lists exported C functions and their canonical public types
classified by the v0.4 C API reference policy. Raw Python ctypes call forms are
documented separately.
Use this page when a foreign-function interface cannot safely call the canonical C API by value or cannot construct native records directly.
Common workflows:
Functions: 27 Types: 0
Symbol Groups¶
| Group | Functions | Types | Headers |
|---|---|---|---|
| Ffi | 27 | 0 | include/datoviz/ffi.h |
Grouped function index
Ffi
Ffi¶
Functions
dvz_ffi_depth_cue_desc()¶
Initialize a default depth-cue descriptor through an out pointer.
_Bool dvz_ffi_depth_cue_desc(
DvzDepthCueDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzDepthCueDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:293.
dvz_ffi_field_geometry()¶
Initialize a default sampled-field geometry descriptor through an out pointer.
_Bool dvz_ffi_field_geometry(
DvzFieldGeometry * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzFieldGeometry * |
output descriptor |
Declared in include/datoviz/ffi.h:221.
dvz_ffi_geometry_arrow_desc()¶
Initialize a default arrow geometry descriptor through an out pointer.
_Bool dvz_ffi_geometry_arrow_desc(
DvzGeometryArrowDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzGeometryArrowDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:104.
dvz_ffi_geometry_cone_desc()¶
Initialize a default cone geometry descriptor through an out pointer.
_Bool dvz_ffi_geometry_cone_desc(
DvzGeometryConeDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzGeometryConeDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:113.
dvz_ffi_geometry_cube_desc()¶
Initialize a default cube geometry descriptor through an out pointer.
_Bool dvz_ffi_geometry_cube_desc(
DvzGeometryCubeDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzGeometryCubeDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:122.
dvz_ffi_geometry_cylinder_desc()¶
Initialize a default cylinder geometry descriptor through an out pointer.
_Bool dvz_ffi_geometry_cylinder_desc(
DvzGeometryCylinderDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzGeometryCylinderDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:131.
dvz_ffi_geometry_disc_desc()¶
Initialize a default disc geometry descriptor through an out pointer.
_Bool dvz_ffi_geometry_disc_desc(
DvzGeometryDiscDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzGeometryDiscDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:140.
dvz_ffi_geometry_plane_desc()¶
Initialize a default plane geometry descriptor through an out pointer.
_Bool dvz_ffi_geometry_plane_desc(
DvzGeometryPlaneDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzGeometryPlaneDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:149.
dvz_ffi_geometry_regular_polygon_desc()¶
Initialize a default regular-polygon geometry descriptor through an out pointer.
_Bool dvz_ffi_geometry_regular_polygon_desc(
DvzGeometryRegularPolygonDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzGeometryRegularPolygonDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:158.
dvz_ffi_geometry_sector_desc()¶
Initialize a default sector geometry descriptor through an out pointer.
_Bool dvz_ffi_geometry_sector_desc(
DvzGeometrySectorDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzGeometrySectorDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:167.
dvz_ffi_geometry_sphere_desc()¶
Initialize a default sphere geometry descriptor through an out pointer.
_Bool dvz_ffi_geometry_sphere_desc(
DvzGeometrySphereDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzGeometrySphereDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:176.
dvz_ffi_geometry_star_desc()¶
Initialize a default star geometry descriptor through an out pointer.
_Bool dvz_ffi_geometry_star_desc(
DvzGeometryStarDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzGeometryStarDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:185.
dvz_ffi_geometry_surface_grid_desc()¶
Initialize a default surface-grid geometry descriptor through an out pointer.
_Bool dvz_ffi_geometry_surface_grid_desc(
DvzGeometrySurfaceGridDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzGeometrySurfaceGridDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:194.
dvz_ffi_geometry_torus_desc()¶
Initialize a default torus geometry descriptor through an out pointer.
_Bool dvz_ffi_geometry_torus_desc(
DvzGeometryTorusDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzGeometryTorusDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:203.
dvz_ffi_limb_material_desc()¶
Initialize a default limb material descriptor through an out pointer.
_Bool dvz_ffi_limb_material_desc(
DvzMaterialDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzMaterialDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:284.
dvz_ffi_material_desc()¶
Initialize a default material descriptor through an out pointer.
_Bool dvz_ffi_material_desc(
DvzMaterialDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzMaterialDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:257.
dvz_ffi_overlay_card_desc()¶
Initialize a default overlay-card descriptor through an out pointer.
_Bool dvz_ffi_overlay_card_desc(
DvzOverlayCardDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzOverlayCardDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:320.
dvz_ffi_overlay_card_style()¶
Initialize a default overlay-card style descriptor through an out pointer.
_Bool dvz_ffi_overlay_card_style(
DvzOverlayCardStyle * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzOverlayCardStyle * |
output descriptor |
Declared in include/datoviz/ffi.h:311.
dvz_ffi_panel_background_desc()¶
Initialize a default panel background descriptor through an out pointer.
_Bool dvz_ffi_panel_background_desc(
DvzPanelBackgroundDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzPanelBackgroundDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:248.
dvz_ffi_phong_material_desc()¶
Initialize a default Phong material descriptor through an out pointer.
_Bool dvz_ffi_phong_material_desc(
DvzMaterialDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzMaterialDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:266.
dvz_ffi_polygon_desc()¶
Initialize a default polygon descriptor through an out pointer.
_Bool dvz_ffi_polygon_desc(
DvzPolygonDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzPolygonDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:212.
dvz_ffi_reference_grid_desc()¶
Initialize a default reference-grid descriptor through an out pointer.
_Bool dvz_ffi_reference_grid_desc(
DvzReferenceGridDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzReferenceGridDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:230.
dvz_ffi_scale_bar_desc()¶
Initialize a default scale-bar descriptor through an out pointer.
_Bool dvz_ffi_scale_bar_desc(
DvzScaleBarDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzScaleBarDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:302.
dvz_ffi_standard_material_desc()¶
Initialize a default standard material descriptor through an out pointer.
_Bool dvz_ffi_standard_material_desc(
DvzMaterialDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzMaterialDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:275.
dvz_ffi_view_external_surface()¶
Create a hosted present view around an external Vulkan surface from FFI-friendly handles.
Foreign-function-interface adapters may use this helper when constructing DvzWindowExternalSurfaceInfo directly is undesirable. Native C and C++ callers should prefer dvz_view_external_surface().
DvzView * dvz_ffi_view_external_surface(
DvzApp * app,
DvzFigure * figure,
void * instance,
uint64_t surface,
uint32_t framebuffer_width,
uint32_t framebuffer_height,
float scale_x,
float scale_y,
_Bool owned_by_datoviz
);
| Field | Type | Description |
|---|---|---|
| return | DvzView * |
the view handle, or NULL on failure |
app |
DvzApp * |
the app |
figure |
DvzFigure * |
the figure to render (borrowed) |
instance |
void * |
borrowed VkInstance handle as an opaque pointer |
surface |
uint64_t |
borrowed or Datoviz-owned VkSurfaceKHR handle value |
framebuffer_width |
uint32_t |
framebuffer width in physical pixels |
framebuffer_height |
uint32_t |
framebuffer height in physical pixels |
scale_x |
float |
horizontal content scale |
scale_y |
float |
vertical content scale |
owned_by_datoviz |
_Bool |
whether Datoviz should destroy the surface |
Declared in include/datoviz/ffi.h:65.
dvz_ffi_view_update_external_surface()¶
Update a hosted external surface from FFI-friendly handles.
Foreign-function-interface adapters may use this helper when constructing DvzWindowExternalSurfaceInfo directly is undesirable. Native C and C++ callers should prefer dvz_view_update_external_surface().
DvzResult dvz_ffi_view_update_external_surface(
DvzView * view,
void * instance,
uint64_t surface,
uint32_t framebuffer_width,
uint32_t framebuffer_height,
float scale_x,
float scale_y,
_Bool owned_by_datoviz
);
| Field | Type | Description |
|---|---|---|
| return | DvzResult |
0 on success, negative on error |
view |
DvzView * |
view created with dvz_view_external_surface() or dvz_ffi_view_external_surface() |
instance |
void * |
borrowed VkInstance handle as an opaque pointer, or NULL for surface loss |
surface |
uint64_t |
borrowed or Datoviz-owned VkSurfaceKHR handle value, or zero for surface loss |
framebuffer_width |
uint32_t |
framebuffer width in physical pixels |
framebuffer_height |
uint32_t |
framebuffer height in physical pixels |
scale_x |
float |
horizontal content scale |
scale_y |
float |
vertical content scale |
owned_by_datoviz |
_Bool |
whether Datoviz should destroy the surface |
Declared in include/datoviz/ffi.h:88.
dvz_ffi_visual_transform_desc()¶
Initialize a default visual transform descriptor through an out pointer.
_Bool dvz_ffi_visual_transform_desc(
DvzVisualTransformDesc * out
);
| Field | Type | Description |
|---|---|---|
| return | _Bool |
true on success, false when out is NULL |
out |
DvzVisualTransformDesc * |
output descriptor |
Declared in include/datoviz/ffi.h:239.