The Big Project I was working on

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


I was recently working a big project. A wrapper if you will. It was a wrapper of FTLK. I had found a C port of FLTK. I had used that as a basis for the project. However after finding some issues with it, I'm unsure if I'm able to continue with it. A lot of functions have been wrapped and there are many more that need to be wrapped.

The C port of FLTK was based on this.

It is not very well documented. In fact the github repo says you can follow along with the official CPlusPlus FLTK Docs. This is possible, but it is also harder to read and adjust for a more pure C code approach. Also, according to the DLL, there are over 9,000 functions.

--Snippet of some Wrapper Code 
public constant xFl_Window_new = define_c_func(fltk,"+Fl_Window_new",{C_INT,C_INT,C_INT,C_INT,C_POINTER},C_POINTER) 
public function Fl_Window_new(atom x,atom y,atom w,atom h,sequence title) 
 atom str = allocate_wstring(title,1) 
 return c_func(xFl_Window_new,{x,y,w,h,str}) 
end function 
public constant xFl_Window_end = define_c_proc(fltk,"+Fl_Window_end",{C_POINTER}) 
public procedure Fl_Window_end(atom w) 
end procedure 
public constant xFl_Window_show = define_c_proc(fltk,"+Fl_Window_show",{C_POINTER}) 
public procedure Fl_Window_show(atom w) 
end procedure 
public constant xFl_Button_new = define_c_func(fltk,"+Fl_Button_new",{C_INT,C_INT,C_INT,C_INT,C_POINTER},C_POINTER) 
public function Fl_Button_new(atom x,atom y,atom w,atom h,sequence title) 
 atom str = allocate_string(title,1) 
 return c_func(xFl_Button_new,{x,y,w,h,str}) 
end function 
--Example program 
include std/machine.e 
include std/dll.e 
include EuFLTK.ew 
atom win = Fl_Window_new(100,100,600,400,"Example Win") 
atom bar = Fl_Box_new(0,0,600,60,"FTLK") 
atom btn = Fl_Button_new(600 - 100, 400 - 100, 100,20,"Hello") 
public function Return_Fl() 
 return Fl_run() 
end function 

AS you can see that text does not display cleary. At this point it is stuck in limbo until I decide to try to finish or abandon it. I am curious to hear what you guys think.

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


Quick Links

User menu

Not signed in.

Misc Menu