1. EFL Wrapper Update

Hi all,

I recently started on working a wrapper for the EFL libraries. (Enlightenment Foundation libraries or EFL for short).

This is a huge library and will take awhile to finish, however I am happy with progress so far and besides a lot of functions, it doesn't seem overly difficult to wrap.

https://en.wikipedia.org/wiki/Enlightenment_Foundation_Libraries

https://www.enlightenment.org/_legacy_embed/bg_example_01_c.html - Example wrapped (only wrapped functions needed to make simple example so far)

Yes, I realized I spelled elementary wrong as "elemantary.e"

public atom elm 
 
ifdef WINDOWS then 
	elm = open_dll("libelementary-1.dll") 
end ifdef 
 
if elm = -1 then 
	puts(1,"Failed to load elementary!\n") 
	abort(1) 
end if 
 
public constant Elm_Event_Policy_Changed = define_c_struct({ 
	C_UINT, --policy 
	C_INT, --new_value 
	C_INT  --old_value 
}) 
 
public enum type Elm_Policy 
	ELM_POLICY_QUIT = 0, 
	ELM_POLICY_EXIT, 
	ELM_POLICY_THROTTLE, 
	ELM_POLICY_LAST 
end type 
 
public constant xelm_win_util_standard_add = define_c_func(elm,"+elm_win_util_standard_add",{C_STRING,C_STRING},C_POINTER) 
 
public function elm_win_util_standard_add(sequence name,sequence title) 
	return c_func(xelm_win_util_standard_add,{name,title}) 
end function 
 
public function elm_policy_set(atom policy,atom val) 
	return c_func(xelm_policy_set,{policy,val}) 
end function 
 
 
public atom evas 
 
ifdef WINDOWS then 
	evas = open_dll("libevas-1.dll") 
end ifdef 
 
if evas = -1 then 
	puts(1,"Failed to open evas!\n") 
	abort(1) 
end if 
 
public constant xevas_object_show = define_c_proc(evas,"+evas_object_show",{C_POINTER}) 
 
public procedure evas_object_show(atom obj) 
	c_proc(xevas_object_show,{obj}) 
end procedure 
 
public constant xevas_object_resize = define_c_proc(evas,"+evas_object_resize",{C_POINTER,C_INT,C_INT}) 
 
public procedure evas_object_resize(atom obj,atom w,atom h) 
	c_proc(xevas_object_resize,{obj,w,h}) 
end procedure 
include std/ffi.e 
include evas.e 
include elemantary.e 
 
constant TRUE = 1, FALSE = 0 
 
elm_init(NULL,NULL) 
 
elm_policy_set(ELM_POLICY_QUIT,ELM_POLICY_EXIT) 
 
atom win = elm_win_util_standard_add("Main","Hello World") 
elm_win_autodel_set(win,TRUE) 
 
evas_object_resize(win,320,320) 
 
evas_object_show(win) 
 
elm_run() 

https://ibb.co/WnGVzqr - Simple image of window running to show proof

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu