GTK Wrapper Hurdles & Nuklear Update
- Posted by Icy_Viking in June
- 625 views
Hi all,
I recently tried to wrap GTK4 for Euphoria. I pretty much develop under and for Windows. I do have WSL installed, but I don't use it as much as I should. I wrapped a big chunk of GTK4, but keep getting errors even trying to make a simple program like displaying a window. My guess is that it has to do with GTK4's event system relying on macros. There's a probably a way to make Euphoria version of them. I also wonder if its the GTK4's DLLs I found may have a issue, as I didn't build them myself.
I was using the 64-bit of Euphoria to run the GTK4 wrapper files. I have both 32 and 64-bit versions of Euphoria installed. I renamed eui (in the 64-bit installation of Euphoria) to eui64.exe to make it easier for me to run between 32 and 64-bit euphoria programs.
[https://github.com/wingtk/gvsbuild] - Where I got the GTK4 DLL's from.
I could try wrapping GTK3 as that may be easier, but I'm not sure how feasible it would be. Anyways, I'll probably focus on Nuklear for now.
eui myprogram.ex -- for 32-bit euphoria programs eui64 myprogram.ex --for 64-bit euphoria programs
As for Nuklear wrapper, I'm still working on it. I'll probably use SDL or GFLW to make some test examples when I get around to making them.
A machine level exception occurred. During c_func() statement, ffi. (line 1065) (signal 11) gtk_window_new()
include std/ffi.e include std/machine.e include gtk.e atom app = 0 atom win = gtk_window_new() gtk_window_set_application(win,app) gtk_window_present(win)
public constant xgtk_window_new = define_c_func(gtk,"+gtk_window_new",{},C_POINTER) public function gtk_window_new() return c_func(xgtk_window_new,{}) end function