1. GTK Wrapper Hurdles & Nuklear Update

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 
new topic     » topic index » view message » categorize

2. Re: GTK Wrapper Hurdles & Nuklear Update

Wrapping GTK4 is an exercise in futility.

Compared with GTK3, they've made the easy things more difficult, and the complex things even more complex.

I have a few simple programs working in GTK4, but have no interest in doing more, since it's unlikely more than 2 people would use it. Unfortunately, I think the same is true of any other GUI as well.

new topic     » goto parent     » topic index » view message » categorize

3. Re: GTK Wrapper Hurdles & Nuklear Update

irv said...

Wrapping GTK4 is an exercise in futility.

Compared with GTK3, they've made the easy things more difficult, and the complex things even more complex.

I have a few simple programs working in GTK4, but have no interest in doing more, since it's unlikely more than 2 people would use it. Unfortunately, I think the same is true of any other GUI as well.

Yeah, I think if it I was going to wrap GTK, I'd just wrap GTK3. GTK4 is proving to be very difficult. Again, even wrapping a GUI seems almost pointless.

new topic     » goto parent     » topic index » view message » categorize

4. Re: GTK Wrapper Hurdles & Nuklear Update

Here are a few simple programs so you can see the basic structure, how to deal with the macros, and how to implement the OOP inheritance.

Updated: https://drive.google.com/file/d/1PEzShEjKubl-jofpe48bELoX-tJBRZV5/view?usp=sharing

new topic     » goto parent     » topic index » view message » categorize

5. Re: GTK Wrapper Hurdles & Nuklear Update

irv said...

Here are a few simple programs so you can see the basic structure, how to deal with the macros, and how to implement the OOP inheritance.

Updated: https://drive.google.com/file/d/1PEzShEjKubl-jofpe48bELoX-tJBRZV5/view?usp=sharing

Thanks irv, I'll look over it.

new topic     » goto parent     » topic index » view message » categorize

6. Re: GTK Wrapper Hurdles & Nuklear Update

Be aware that while you can use "application window" per the GTK docs, it really adds nothing useful to small programs. It just means you have to write convoluted code. I avoid it in these demos for that reason.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu