Re: CIMGUI Wrapper Help
- Posted by jmduro May 31, 2023
- 745 views
I don't know if this can be of any help but I put my C structures manager on Github: https://github.com/jm-duro/Structures.
Here is an extract of the raylib demo code:
include std/dll.e include std/machine.e include ../include/structs.e -- Vector2, 2 components public sequence RL_VECTOR2 = "typedef struct Vector2 {" & " float x;" & -- Vector x component " float y;" & -- Vector y component "} Vector2;" constant raylib = open_dll( "raylib.dll" ), xGetWindowPosition = define_c_func( raylib, "+GetWindowPosition", {}, C_POINTER ), $ public function GetWindowPosition() atom p = c_func( xGetWindowPosition, {} ) -- returns {x,y} sequence Vector2 = createStructure(RL_VECTOR2, p) return readStructure(Vector2) end function
Jean-Marc