Re: RGFW Wrapper and Partial OpenGL Wrapper

new topic     » goto parent     » topic index » view thread      » older message » newer message
ghaberek said...
Icy_Viking said...

That's awesome that std/ffi.e is coming close to completion. I've looked into starting a new win32lib, but the windows API is huge.

My first though is that we should probably wrap Win32 API first, keeping as close to the original design as possible.

However, it's so structure-heavy that we might be better off waiting until we implement actual structs (and classes).

-Greg

Having struct in Euphoria would be amazing. It'd also make wrapping libraries easier. FFI has proven pretty useful. Though it would be much nicer to have struct support built into Euphoria.

include std/ffi.e 
 
public constant public constant Vector2 = define_c_struct({ 
	C_FLOAT, --x [1] 
	C_FLOAT  --y [2] 
}) 
 
sequence Pos = {50,10} x is [1], y is [2] 
 
--Let's say Eu has a built in struct member 
--My idea would be something like 
--Basically something very similar to C structs 
 
Struct myStruct { 
 atom x 
 atom y 
} 
 
--You could access members as 
 
myStruct.x = 10  
 
--Or 
 
myStruct:x = 10 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu