Talk:Edje examples

From Openmoko

(Difference between revisions)
Jump to: navigation, search
 
(3 intermediate revisions by one user not shown)
Line 7: Line 7:
 
  I have seen that there is a new part type: TABLE, maybe this can help ?
 
  I have seen that there is a new part type: TABLE, maybe this can help ?
 
* Where can i find the api to be used in embreyo scripts ?
 
* Where can i find the api to be used in embreyo scripts ?
 +
Functions I dig out of the edje source:
 +
<pre>
 +
numargs();
 +
getarg(arg, index=0);
 +
setarg(arg, index=0, value);
 +
 +
Float:atof(string[]);
 +
Float:fract(Float:value);
 +
      round(Float:value, Float_Round_Method:method=ROUND);
 +
Float:sqrt(Float:value);
 +
Float:pow(Float:value, Float:exponent);
 +
Float:log(Float:value, Float:base=10.0);
 +
Float:sin(Float:value, Float_Angle_Mode:mode=RADIAN);
 +
Float:cos(Float:value, Float_Angle_Mode:mode=RADIAN);
 +
Float:tan(Float:value, Float_Angle_Mode:mode=RADIAN);
 +
Float:abs(Float:value);
 +
      atoi(str[]);
 +
      fnmatch(glob[], str[]);
 +
      strcmp(str1[], str2[]);
 +
      strncmp(str1[], str2[]);
 +
      strcpy(dst[], src[]);
 +
      strncpy(dst[], src[], n);
 +
      strlen(str[]);
 +
      strcat(dst[], src[]);
 +
      strncat(dst[], src[], n);
 +
      strprep(dst[], src[]);
 +
      strnprep(dst[], src[], n);
 +
      strcut(dst[], str[], n, n2);
 +
      snprintf(dst[], dstn, fmt[], ...);
 +
      strstr(str[], ndl[]);
 +
      strchr(str[], ch[]);
 +
      strrchr(str[], ch[]);
 +
      rand();
 +
Float:randf();
 +
Float:seconds();
 +
      date(&year, &month, &day, &yearday, &weekday, &hr, &min, &Float:sec);
 +
 +
get_int(id)
 +
set_int(id, v)
 +
Float:get_float (id)
 +
set_float(id, Float:v)
 +
get_strlen(id)
 +
get_str(id, dst[], maxlen)
 +
set_str(id, str[])
 +
timer(Float:in, fname[], val)
 +
cancel_timer(id)
 +
anim(Float:len, fname[], val)
 +
cancel_anim(id)
 +
emit(sig[], src[])
 +
set_state(part_id, state[], Float:state_val)
 +
set_tween_state(part_id, Float:tween, state1[], Float:state1_val, state2[], Float:state2_val)
 +
run_program(program_id)
 +
Direction:get_drag_dir(part_id)
 +
get_drag(part_id, &Float:dx, &Float:&dy)
 +
set_drag(part_id, Float:dx, Float:dy)
 +
get_drag_size(part_id, &Float:dx, &Float:&dy)
 +
set_drag_size(part_id, Float:dx, Float:dy)
 +
set_text(part_id, str[])
 +
get_text(part_id, dst[], maxlen)
 +
get_min_size(w, h)
 +
get_max_size(w, h)
 +
set_color_class(class[], r, g, b, a)
 +
get_color_class(class[], &r, &g, &b, &a)
 +
set_text_class(class[], font[], Float:size)
 +
get_text_class(class[], font[], &Float:size)
 +
get_drag_step(part_id, &Float:dx, &Float:&dy)
 +
set_drag_step(part_id, Float:dx, Float:dy)
 +
get_drag_page(part_id, &Float:dx, &Float:&dy)
 +
set_drag_page(part_id, Float:dx, Float:dy)
 +
get_geometry(part_id, &Float:x, &Float:y, &Float:w, &Float:h)
 +
get_mouse(&x, &y)
 +
stop_program(program_id)
 +
stop_programs_on(part_id)
 +
set_min_size(w, h)
 +
set_max_size(w, h)
 +
send_message(Msg_Type:type, id, ...)
 +
 +
count(id)
 +
remove(id, n)
 +
 +
append_int(id, v)
 +
prepend_int(id, v)
 +
insert_int(id, n, v)
 +
replace_int(id, n, v)
 +
fetch_int(id, n)
 +
 +
append_str(id, str[])
 +
prepend_str(id, str[])
 +
insert_str(id, n, str[])
 +
replace_str(id, n, str[])
 +
fetch_str(id, n, dst[], maxlen)
 +
 +
append_float(id, Float:v)
 +
prepend_float(id, Float:v)
 +
insert_float(id, n, Float:v)
 +
replace_float(id, n, Float:v)
 +
Float:fetch_float(id, n)
 +
 +
custom_state(part_id, state[], Float:state_val = 0.0)
 +
set_state_val(part_id, State_Param:param, ...)
 +
get_state_val(part_id, State_Param:param, ...)
 +
 +
Supported parameters:
 +
align[Float:x, Float:y]
 +
min[w, h]
 +
max[w, h]
 +
step[x,y]
 +
aspect[Float:min, Float:max]
 +
color[r,g,b,a]
 +
color2[r,g,b,a]
 +
color3[r,g,b,a]
 +
aspect_preference
 +
rel1[relx,rely]
 +
rel1[part_id,part_id]
 +
rel1[offx,offy]
 +
rel2[relx,relyr]
 +
rel2[part_id,part_id]
 +
rel2[offx,offy]
 +
image[image_id] <- all images have an Id not name in the edje
 +
border[l,r,t,b]
 +
fill[smooth]
 +
fill[pos_relx,pos_rely,pos_offx,pos_offy]
 +
fill[sz_relx,sz_rely,sz_offx,sz_offy]
 +
color_class
 +
text[text]
 +
text[text_class]
 +
text[font]
 +
text[size]
 +
text[style]
 +
text[fit_x,fit_y]
 +
text[min_x,min_y]
 +
text[align_x,align_y]
 +
visible
 +
 +
** part_id and program_id need to be able to be "found" from strings
 +
 +
get_drag_count(part_id, &Float:dx, &Float:&dy)
 +
set_drag_count(part_id, Float:dx, Float:dy)
 +
set_drag_confine(part_id, confine_part_id)
 +
get_size(&w, &h);
 +
resize_request(w, h)
 +
get_mouse_buttons()
 +
//set_type(part_id, Type:type)
 +
//set_effect(part_id, Effect:fx)
 +
set_mouse_events(part_id, ev)
 +
get_mouse_events(part_id)
 +
set_repeat_events(part_id, rep)
 +
get_repeat_events(part_id)
 +
set_clip(part_id, clip_part_id)
 +
get_clip(part_id)
 +
 +
part_swallow(part_id, group_name)
 +
</pre>
 +
 +
* Is it possible to add own embreyo functions to the edje smart object ?
 +
 
* Are there any default fonts, colorclasses, styles or images available?
 
* Are there any default fonts, colorclasses, styles or images available?
 
* Is it possible to dynamically determ the source of signal when wild cards are used ?
 
* Is it possible to dynamically determ the source of signal when wild cards are used ?
 
* Is it possible to declare transparency of images?
 
* Is it possible to declare transparency of images?
 +
It possible todo this with edje_editor but I didn't found attribute yet.
 +
 
* Using an edje/evas program as root window (dedicated application)?
 
* Using an edje/evas program as root window (dedicated application)?
 
  When setting the fullscreen attribute on the evas canvas the canvas will occupy the complete screen.
 
  When setting the fullscreen attribute on the evas canvas the canvas will occupy the complete screen.
Line 15: Line 173:
 
* What is e_dbus exactly (is it wrapper around dbus?), which services are there ?
 
* What is e_dbus exactly (is it wrapper around dbus?), which services are there ?
 
* Is it possible to mix edje user interface with ewl elements ?
 
* Is it possible to mix edje user interface with ewl elements ?
 +
 +
hello, i want to view video in edje using gstreamer instead of xine..
 +
This is because i want to use firewire port as video source.
 +
i apreciatte any idea.
 +
thanks,
 +
jony

Latest revision as of 20:29, 28 April 2009

Comments and questions are welcome

TODO: add some theory.

Questions:

  • Howto deal with dynamic user interfaces, e.g: tabular data?
I have seen that there is a new part type: TABLE, maybe this can help ?
  • Where can i find the api to be used in embreyo scripts ?

Functions I dig out of the edje source:

numargs();
 getarg(arg, index=0);
 setarg(arg, index=0, value);

 Float:atof(string[]);
 Float:fract(Float:value);
       round(Float:value, Float_Round_Method:method=ROUND);
 Float:sqrt(Float:value);
 Float:pow(Float:value, Float:exponent);
 Float:log(Float:value, Float:base=10.0);
 Float:sin(Float:value, Float_Angle_Mode:mode=RADIAN);
 Float:cos(Float:value, Float_Angle_Mode:mode=RADIAN);
 Float:tan(Float:value, Float_Angle_Mode:mode=RADIAN);
 Float:abs(Float:value);
       atoi(str[]);
       fnmatch(glob[], str[]);
       strcmp(str1[], str2[]);
       strncmp(str1[], str2[]);
       strcpy(dst[], src[]);
       strncpy(dst[], src[], n);
       strlen(str[]);
       strcat(dst[], src[]);
       strncat(dst[], src[], n);
       strprep(dst[], src[]);
       strnprep(dst[], src[], n);
       strcut(dst[], str[], n, n2);
       snprintf(dst[], dstn, fmt[], ...);
       strstr(str[], ndl[]);
       strchr(str[], ch[]);
       strrchr(str[], ch[]);
       rand();
 Float:randf();
 Float:seconds();
       date(&year, &month, &day, &yearday, &weekday, &hr, &min, &Float:sec);

 get_int(id)
 set_int(id, v)
 Float:get_float (id)
 set_float(id, Float:v)
 get_strlen(id)
 get_str(id, dst[], maxlen)
 set_str(id, str[])
 timer(Float:in, fname[], val)
 cancel_timer(id)
 anim(Float:len, fname[], val)
 cancel_anim(id)
 emit(sig[], src[])
 set_state(part_id, state[], Float:state_val)
 set_tween_state(part_id, Float:tween, state1[], Float:state1_val, state2[], Float:state2_val)
 run_program(program_id)
 Direction:get_drag_dir(part_id)
 get_drag(part_id, &Float:dx, &Float:&dy)
 set_drag(part_id, Float:dx, Float:dy)
 get_drag_size(part_id, &Float:dx, &Float:&dy)
 set_drag_size(part_id, Float:dx, Float:dy)
 set_text(part_id, str[])
 get_text(part_id, dst[], maxlen)
 get_min_size(w, h)
 get_max_size(w, h)
 set_color_class(class[], r, g, b, a)
 get_color_class(class[], &r, &g, &b, &a)
 set_text_class(class[], font[], Float:size)
 get_text_class(class[], font[], &Float:size)
 get_drag_step(part_id, &Float:dx, &Float:&dy)
 set_drag_step(part_id, Float:dx, Float:dy)
 get_drag_page(part_id, &Float:dx, &Float:&dy)
 set_drag_page(part_id, Float:dx, Float:dy)
 get_geometry(part_id, &Float:x, &Float:y, &Float:w, &Float:h)
 get_mouse(&x, &y)
 stop_program(program_id)
 stop_programs_on(part_id)
 set_min_size(w, h)
 set_max_size(w, h)
 send_message(Msg_Type:type, id, ...)

 count(id)
 remove(id, n)

 append_int(id, v)
 prepend_int(id, v)
 insert_int(id, n, v)
 replace_int(id, n, v)
 fetch_int(id, n)

 append_str(id, str[])
 prepend_str(id, str[])
 insert_str(id, n, str[])
 replace_str(id, n, str[])
 fetch_str(id, n, dst[], maxlen)

 append_float(id, Float:v)
 prepend_float(id, Float:v)
 insert_float(id, n, Float:v)
 replace_float(id, n, Float:v)
 Float:fetch_float(id, n)

 custom_state(part_id, state[], Float:state_val = 0.0)
 set_state_val(part_id, State_Param:param, ...)
 get_state_val(part_id, State_Param:param, ...)

 Supported parameters:
 align[Float:x, Float:y]
 min[w, h]
 max[w, h]
 step[x,y]
 aspect[Float:min, Float:max]
 color[r,g,b,a]
 color2[r,g,b,a]
 color3[r,g,b,a]
 aspect_preference
 rel1[relx,rely]
 rel1[part_id,part_id]
 rel1[offx,offy]
 rel2[relx,relyr]
 rel2[part_id,part_id]
 rel2[offx,offy]
 image[image_id] <- all images have an Id not name in the edje
 border[l,r,t,b]
 fill[smooth]
 fill[pos_relx,pos_rely,pos_offx,pos_offy]
 fill[sz_relx,sz_rely,sz_offx,sz_offy]
 color_class
 text[text]
 text[text_class]
 text[font]
 text[size]
 text[style]
 text[fit_x,fit_y]
 text[min_x,min_y]
 text[align_x,align_y]
 visible

 ** part_id and program_id need to be able to be "found" from strings

 get_drag_count(part_id, &Float:dx, &Float:&dy)
 set_drag_count(part_id, Float:dx, Float:dy)
 set_drag_confine(part_id, confine_part_id)
 get_size(&w, &h);
 resize_request(w, h)
 get_mouse_buttons()
 //set_type(part_id, Type:type)
 //set_effect(part_id, Effect:fx)
 set_mouse_events(part_id, ev)
 get_mouse_events(part_id)
 set_repeat_events(part_id, rep)
 get_repeat_events(part_id)
 set_clip(part_id, clip_part_id)
 get_clip(part_id)

 part_swallow(part_id, group_name)
  • Is it possible to add own embreyo functions to the edje smart object ?
  • Are there any default fonts, colorclasses, styles or images available?
  • Is it possible to dynamically determ the source of signal when wild cards are used ?
  • Is it possible to declare transparency of images?
It possible todo this with edje_editor but I didn't found attribute yet.
  • Using an edje/evas program as root window (dedicated application)?
When setting the fullscreen attribute on the evas canvas the canvas will occupy the complete screen.
  • Howto use gstreamer as backend of emotion ?
  • What is e_dbus exactly (is it wrapper around dbus?), which services are there ?
  • Is it possible to mix edje user interface with ewl elements ?

hello, i want to view video in edje using gstreamer instead of xine.. This is because i want to use firewire port as video source. i apreciatte any idea. thanks, jony

Personal tools

Comments and questions are welcome

TODO: add some theory.

Questions:

  • Howto deal with dynamic user interfaces, e.g: tabular data?
I have seen that there is a new part type: TABLE, maybe this can help ?
  • Where can i find the api to be used in embreyo scripts ?
  • Are there any default fonts, colorclasses, styles or images available?
  • Is it possible to dynamically determ the source of signal when wild cards are used ?
  • Is it possible to declare transparency of images?
  • Using an edje/evas program as root window (dedicated application)?
When setting the fullscreen attribute on the evas canvas the canvas will occupy the complete screen.
  • Howto use gstreamer as backend of emotion ?
  • What is e_dbus exactly (is it wrapper around dbus?), which services are there ?
  • Is it possible to mix edje user interface with ewl elements ?