Re: CIMGUI Wrapper Help

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu