Re: [E-devel] [PATCH]: keyboard navigation in menus
2011/3/22 Carsten Haitzler ras...@rasterman.com: On Mon, 14 Mar 2011 17:40:46 +0100 Tristan Lelong tristan.lel...@blunderer.org said: cool. ok. patch 01. elm_menu_discard() - why that name? why can't just evas_object_hide() do the job? even if we had this api shouldn't it be more like elm_menu_hide() or elm_menu_close()? as such tho evas_object_hide() should do just nicely... unless your aim is to do some specific animations etc. evas_object_hide() is meant to guarantee a hidden state immediately. you can of course listen for hide events on the menu obj to handle hiding of sub-items and so on. In my mind, the discard menu function should do the same thing as a click outside the menu bar : hide menu with animations. This is used for having similar behaviour with mouse and with keyboard. I choosed to use discard because with hide the menu without triggering any menu_item action. If this is not enought to convince you ;-), I can change the name to elm_menu_hide, but as you said, this would imply no delay in state change. patch 02. actually looks ok except some minor things. do you compile with warnings on? -W -Wall? you really should.. in svn it goes with fixes. i'm feeling nice today :) Thx :-) Hi, here are the corrected patches. I hope I did not forget anything. 2011/3/10 Tristan Lelong tristan.lel...@blunderer.org: Ok, I correct all these and I'll submit patches again. Thx for the feedback. Le jeudi 10 mars 2011, Carsten Haitzler ras...@rasterman.com a écrit : On Wed, 9 Mar 2011 16:24:10 +0100 Tristan Lelong tristan.lel...@blunderer.org said: ok. going to have to reject here. patch 1: 1. formatting - elm_menu_discard() in Elementary.h.in doesnt align with the rest of the calls next to it (looks ugly) 2. elm_menu_discard() in elm_menu.c is indented using tabs, not spaces. make it align/look like all the code above/below it :) patch 2: 3. elm_menu_item_selected_get() also not aligned in Elementary.h.in 4. elm_menu_selected_item_get() also add a space between * and the function call. 5. more tabs in elm_menu.c indenting as opposed to spaces. 6. ELM_CHECK_WIDTYPE() is changed to remove the NULL return - this creates a bug. 7. ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN provides no return value as arg in elm_menu_item_selected_get(), elm_menu_item_prev_get(), elm_menu_item_next_get () 8. Eina_List * l there and not Eina_List *l. 9. space between eina_list_data_find_list and () 10. same with eina_list_next() and eina_list_prev() ... :) (don't worry - you'll learn that we are picky about these things) :) Hello, I was using elementary on a target that only has a keyboard, and I add to do several modification on the elm_menu to handle keyboard navigation. - patch 1: discard a menu from C source code - patch 2: add accessors for menu items and add the ability to handle selected item from C source code -- 618FE3EF -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler) ras...@rasterman.com -- 618FE3EF -- 618FE3EF -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler) ras...@rasterman.com -- 618FE3EF -- Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [PATCH]: keyboard navigation in menus
Hi, here are the corrected patches. I hope I did not forget anything. 2011/3/10 Tristan Lelong tristan.lel...@blunderer.org: Ok, I correct all these and I'll submit patches again. Thx for the feedback. Le jeudi 10 mars 2011, Carsten Haitzler ras...@rasterman.com a écrit : On Wed, 9 Mar 2011 16:24:10 +0100 Tristan Lelong tristan.lel...@blunderer.org said: ok. going to have to reject here. patch 1: 1. formatting - elm_menu_discard() in Elementary.h.in doesnt align with the rest of the calls next to it (looks ugly) 2. elm_menu_discard() in elm_menu.c is indented using tabs, not spaces. make it align/look like all the code above/below it :) patch 2: 3. elm_menu_item_selected_get() also not aligned in Elementary.h.in 4. elm_menu_selected_item_get() also add a space between * and the function call. 5. more tabs in elm_menu.c indenting as opposed to spaces. 6. ELM_CHECK_WIDTYPE() is changed to remove the NULL return - this creates a bug. 7. ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN provides no return value as arg in elm_menu_item_selected_get(), elm_menu_item_prev_get(), elm_menu_item_next_get () 8. Eina_List * l there and not Eina_List *l. 9. space between eina_list_data_find_list and () 10. same with eina_list_next() and eina_list_prev() ... :) (don't worry - you'll learn that we are picky about these things) :) Hello, I was using elementary on a target that only has a keyboard, and I add to do several modification on the elm_menu to handle keyboard navigation. - patch 1: discard a menu from C source code - patch 2: add accessors for menu items and add the ability to handle selected item from C source code -- 618FE3EF -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler) ras...@rasterman.com -- 618FE3EF -- 618FE3EF diff -Naur elementary-0.7.0.55225/src/lib/elm_menu.c elementary-0.7.0.55225.patched//src/lib/elm_menu.c --- elementary-0.7.0.55225/src/lib/elm_menu.c 2011-02-17 18:34:36.0 +0100 +++ elementary-0.7.0.55225.patched//src/lib/elm_menu.c 2011-02-17 18:33:50.0 +0100 @@ -536,6 +536,22 @@ } /** + * Close a opened menu + * + * @param obj the menu object + * @return void + * + * @ingroup Menu + */ +EAPI void +elm_menu_discard(Evas_Object *obj) +{ + ELM_CHECK_WIDTYPE(obj, widtype); + Widget_Data *wd = elm_widget_data_get(obj); + _menu_hide(obj, wd-hv, NULL); +} + +/** * Get the Evas_Object of an Elm_Menu_Item * * @param item The menu item object. diff -Naur elementary-0.7.0.55225/src/lib/Elementary.h.in elementary-0.7.0.55225.patched//src/lib/Elementary.h.in --- elementary-0.7.0.55225/src/lib/Elementary.h.in 2010-12-03 22:38:49.0 +0100 +++ elementary-0.7.0.55225.patched//src/lib/Elementary.h.in 2011-02-15 13:22:59.0 +0100 @@ -1490,6 +1490,7 @@ EAPI void elm_menu_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1); EAPI Evas_Object *elm_menu_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); EAPI void elm_menu_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); + EAPI void elm_menu_discard(Evas_Object *obj) EINA_ARG_NONNULL(1); EAPI Evas_Object *elm_menu_object_get(const Elm_Menu_Item *it) EINA_ARG_NONNULL(1); EAPI Elm_Menu_Item *elm_menu_item_add(Evas_Object *obj, Elm_Menu_Item *parent, const char *icon, const char *label, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); EAPI void elm_menu_item_label_set(Elm_Menu_Item *item, const char *label) EINA_ARG_NONNULL(1); diff -Naur elementary-0.7.0.55225/data/themes/default.edc elementary-0.7.0.55225.patched/data/themes/default.edc --- elementary-0.7.0.55225/data/themes/default.edc 2011-02-22 09:56:06.0 +0100 +++ elementary-0.7.0.55225.patched/data/themes/default.edc 2011-02-21 17:19:08.0 +0100 @@ -4192,6 +4192,7 @@ name: item_mouse_out; signal: mouse,out; source: over2; + action: SIGNAL_EMIT elm,action,inactivate ; after: item_mouse_out_2; after: item_mouse_out_3; } @@ -4289,6 +4290,18 @@ set_int(menu_disable, 1); } } + program { name: item_select; + signal: elm,state,selected; + source: elm; + after: item_mouse_in_2; + after: item_mouse_in_3; + } + program { name: item_unselect; + signal: elm,state,unselected; + source: elm; + after: item_mouse_out_2; + after: item_mouse_out_3; + } program { name: enable; signal: elm,state,enabled; source: elm; diff -Naur elementary-0.7.0.55225/src/lib/Elementary.h.in elementary-0.7.0.55225.patched/src/lib/Elementary.h.in --- elementary-0.7.0.55225
Re: [E-devel] [PATCH]: keyboard navigation in menus
Ok, I correct all these and I'll submit patches again. Thx for the feedback. Le jeudi 10 mars 2011, Carsten Haitzler ras...@rasterman.com a écrit : On Wed, 9 Mar 2011 16:24:10 +0100 Tristan Lelong tristan.lel...@blunderer.org said: ok. going to have to reject here. patch 1: 1. formatting - elm_menu_discard() in Elementary.h.in doesnt align with the rest of the calls next to it (looks ugly) 2. elm_menu_discard() in elm_menu.c is indented using tabs, not spaces. make it align/look like all the code above/below it :) patch 2: 3. elm_menu_item_selected_get() also not aligned in Elementary.h.in 4. elm_menu_selected_item_get() also add a space between * and the function call. 5. more tabs in elm_menu.c indenting as opposed to spaces. 6. ELM_CHECK_WIDTYPE() is changed to remove the NULL return - this creates a bug. 7. ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN provides no return value as arg in elm_menu_item_selected_get(), elm_menu_item_prev_get(), elm_menu_item_next_get () 8. Eina_List * l there and not Eina_List *l. 9. space between eina_list_data_find_list and () 10. same with eina_list_next() and eina_list_prev() ... :) (don't worry - you'll learn that we are picky about these things) :) Hello, I was using elementary on a target that only has a keyboard, and I add to do several modification on the elm_menu to handle keyboard navigation. - patch 1: discard a menu from C source code - patch 2: add accessors for menu items and add the ability to handle selected item from C source code -- 618FE3EF -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler) ras...@rasterman.com -- 618FE3EF -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] patch for edje program filter on source state
I modified the previous patch to use keyword filter instead of filter_state. It can take up to 2 arguments : filter: partname statename; - If both are present: it will check if state of partname matches statename. If partname doesn't exist, program won't be called. - if only statename is present: it will uses the source part as part to check state from. 2010/2/10 Cedric BAIL cedric.b...@free.fr On Mon, Feb 8, 2010 at 11:20 AM, tristan blunde...@gmail.com wrote: Ok, I followed your recommandations. Here is a new patch, with filter state using its own keyword. in svn, with few modification. -- Cedric BAIL -- 618FE3EF diff --git a/src/bin/edje_cc_handlers.c b/src/bin/edje_cc_handlers.c index ca1cb45..2e3945f 100644 --- a/src/bin/edje_cc_handlers.c +++ b/src/bin/edje_cc_handlers.c @@ -210,7 +210,8 @@ static void st_collections_group_parts_part_description_params_double(void); static void st_collections_group_programs_program_name(void); static void st_collections_group_parts_part_description_params_string(void); static void st_collections_group_programs_program_signal(void); - static void st_collections_group_programs_program_source(void); +static void st_collections_group_programs_program_source(void); +static void st_collections_group_programs_program_filter(void); static void st_collections_group_programs_program_in(void); static void st_collections_group_programs_program_action(void); static void st_collections_group_programs_program_transition(void); @@ -477,6 +478,7 @@ New_Statement_Handler statement_handlers[] = {collections.group.parts.program.name, st_collections_group_programs_program_name}, /* dup */ {collections.group.parts.program.signal, st_collections_group_programs_program_signal}, /* dup */ {collections.group.parts.program.source, st_collections_group_programs_program_source}, /* dup */ + {collections.group.parts.program.filter, st_collections_group_programs_program_filter}, /* dup */ {collections.group.parts.program.in, st_collections_group_programs_program_in}, /* dup */ {collections.group.parts.program.action, st_collections_group_programs_program_action}, /* dup */ {collections.group.parts.program.transition, st_collections_group_programs_program_transition}, /* dup */ @@ -485,6 +487,7 @@ New_Statement_Handler statement_handlers[] = {collections.group.program.name, st_collections_group_programs_program_name}, /* dup */ {collections.group.program.signal, st_collections_group_programs_program_signal}, /* dup */ {collections.group.program.source, st_collections_group_programs_program_source}, /* dup */ + {collections.group.program.filter, st_collections_group_programs_program_filter}, /* dup */ {collections.group.program.in, st_collections_group_programs_program_in}, /* dup */ {collections.group.program.action, st_collections_group_programs_program_action}, /* dup */ {collections.group.program.transition, st_collections_group_programs_program_transition}, /* dup */ @@ -493,6 +496,7 @@ New_Statement_Handler statement_handlers[] = {collections.group.programs.program.name, st_collections_group_programs_program_name}, {collections.group.programs.program.signal, st_collections_group_programs_program_signal}, {collections.group.programs.program.source, st_collections_group_programs_program_source}, + {collections.group.programs.program.filter, st_collections_group_programs_program_filter}, /* dup */ {collections.group.programs.program.in, st_collections_group_programs_program_in}, {collections.group.programs.program.action, st_collections_group_programs_program_action}, {collections.group.programs.program.transition, st_collections_group_programs_program_transition}, @@ -5698,6 +5702,7 @@ st_collections_group_parts_part_description_params_string(void) name: programname; signal: signalname; source: partname; + filter: partname statename; in: 0.3 0.0; action: STATE_SET statename state_value; transition: LINEAR 0.5; @@ -5802,7 +5807,7 @@ st_collections_group_programs_program_signal(void) @effect Source of accepted signal. Sources may be globbed, but only one source keyword per program may be used. ex:source: button-*; (Signals from -any part or program named button-* are accepted) +any part or program named button-* are accepted). @endproperty */ static void @@ -5821,6 +5826,37 @@ st_collections_group_programs_program_source(void) /** @page edcref @property +filter +@parameters +[filter part state] +@effect +The part [part] should be in state [state] for the signal to be accepted. Only one source state +keyword per program may be used. ex:state: button default; (Signals are accepted +if part button
Re: [E-devel] patch for edje program filter on source state
Ok, I followed your recommandations. Here is a new patch, with filter state using its own keyword. 2010/2/7 Carsten Haitzler ras...@rasterman.com On Mon, 1 Feb 2010 14:54:19 -0200 Gustavo Sverzut Barbieri barbi...@profusion.mobi said: i agreee - he syntax isnt good. if its a filter - make it program { name: w; signal: x; source: y; filter_state: z; if anything... :) how about that? On Mon, Feb 1, 2010 at 2:19 PM, tristan blunde...@gmail.com wrote: Hello, I was having trouble with the EDC programs that were missing a filter for the current state of source part. This allow for instance to make a toggle button without using any C code. I made a patch that add an optional parameter to the source keyword of an EDC program : the part state. If this second parameter is omitted, then it behave exactly the same as before, and therefore stay compatible with all other EDC files. Here is an example: program { name: set_on signal: mouse,up,*; source: button is_off action: STATE_SET is_on 0.0; target: button; } program { name: set_off signal: mouse,up,*; source: button is_on action: STATE_SET is_off 0.0; target: button; } dunno if this is good... and you don't need C code to do it, you can use embryo or lua. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- 618FE3EF diff --git a/src/bin/edje_cc_handlers.c b/src/bin/edje_cc_handlers.c index ca1cb45..624af10 100644 --- a/src/bin/edje_cc_handlers.c +++ b/src/bin/edje_cc_handlers.c @@ -210,7 +210,8 @@ static void st_collections_group_parts_part_description_params_double(void); static void st_collections_group_programs_program_name(void); static void st_collections_group_parts_part_description_params_string(void); static void st_collections_group_programs_program_signal(void); - static void st_collections_group_programs_program_source(void); +static void st_collections_group_programs_program_source(void); +static void st_collections_group_programs_program_filter_state(void); static void st_collections_group_programs_program_in(void); static void st_collections_group_programs_program_action(void); static void st_collections_group_programs_program_transition(void); @@ -477,6 +478,7 @@ New_Statement_Handler statement_handlers[] = {collections.group.parts.program.name, st_collections_group_programs_program_name}, /* dup */ {collections.group.parts.program.signal, st_collections_group_programs_program_signal}, /* dup */ {collections.group.parts.program.source, st_collections_group_programs_program_source}, /* dup */ + {collections.group.parts.program.filter_state, st_collections_group_programs_program_filter_state}, /* dup */ {collections.group.parts.program.in, st_collections_group_programs_program_in}, /* dup */ {collections.group.parts.program.action, st_collections_group_programs_program_action}, /* dup */ {collections.group.parts.program.transition, st_collections_group_programs_program_transition}, /* dup */ @@ -485,6 +487,7 @@ New_Statement_Handler statement_handlers[] = {collections.group.program.name, st_collections_group_programs_program_name}, /* dup */ {collections.group.program.signal, st_collections_group_programs_program_signal}, /* dup */ {collections.group.program.source, st_collections_group_programs_program_source}, /* dup */ + {collections.group.program.filter_state, st_collections_group_programs_program_filter_state}, /* dup */ {collections.group.program.in, st_collections_group_programs_program_in}, /* dup */ {collections.group.program.action, st_collections_group_programs_program_action}, /* dup */ {collections.group.program.transition, st_collections_group_programs_program_transition}, /* dup */ @@ -493,6 +496,7 @@ New_Statement_Handler statement_handlers[] = {collections.group.programs.program.name, st_collections_group_programs_program_name}, {collections.group.programs.program.signal, st_collections_group_programs_program_signal
Re: [E-devel] patch for edje program filter on source state
Here is a new patch that replace the strcmp by == (thank you cedric), but that might not work with editje. 2010/2/5 Cedric BAIL cedric.b...@free.fr On Mon, Feb 1, 2010 at 5:54 PM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: On Mon, Feb 1, 2010 at 2:19 PM, tristan blunde...@gmail.com wrote: Hello, I was having trouble with the EDC programs that were missing a filter for the current state of source part. This allow for instance to make a toggle button without using any C code. I made a patch that add an optional parameter to the source keyword of an EDC program : the part state. If this second parameter is omitted, then it behave exactly the same as before, and therefore stay compatible with all other EDC files. Here is an example: program { name: set_on signal: mouse,up,*; source: button is_off action: STATE_SET is_on 0.0; target: button; } program { name: set_off signal: mouse,up,*; source: button is_on action: STATE_SET is_off 0.0; target: button; } dunno if this is good... and you don't need C code to do it, you can use embryo or lua. Yes, you can, but it's lighter in my opinion if we could just do that this way. Reading from the patch, doesn't sound like it could break older edje and provide a nice feature for people that don't like to start an script just to test a state. -- Cedric BAIL -- 618FE3EF diff --git a/src/bin/edje_cc_handlers.c b/src/bin/edje_cc_handlers.c index ca1cb45..4872923 100644 --- a/src/bin/edje_cc_handlers.c +++ b/src/bin/edje_cc_handlers.c @@ -5697,7 +5697,7 @@ st_collections_group_parts_part_description_params_string(void) program { name: programname; signal: signalname; - source: partname; + source: partname statename; in: 0.3 0.0; action: STATE_SET statename state_value; transition: LINEAR 0.5; @@ -5798,11 +5798,13 @@ st_collections_group_programs_program_signal(void) @property source @parameters -[source name] +[source name state] @effect Source of accepted signal. Sources may be globbed, but only one source keyword per program may be used. ex:source: button-*; (Signals from -any part or program named button-* are accepted) +any part or program named button-* are accepted). + The state part is optional and allow you to accept signal only if name is + in its state state. No state set means all states. @endproperty */ static void @@ -5811,11 +5813,17 @@ st_collections_group_programs_program_source(void) Edje_Part_Collection *pc; Edje_Program *ep; - check_arg_count(1); + check_min_arg_count(1); pc = eina_list_data_get(eina_list_last(edje_collections)); ep = eina_list_data_get(eina_list_last(pc-programs)); ep-source = parse_str(0); + + if (is_param(1)) { + ep-source_state = parse_str(1); + } else { + ep-source_state = NULL; + } } /** diff --git a/src/lib/edje_data.c b/src/lib/edje_data.c index 11c4e9f..d4c77ca 100644 --- a/src/lib/edje_data.c +++ b/src/lib/edje_data.c @@ -214,6 +214,7 @@ _edje_edd_init(void) EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, name, name, EET_T_STRING); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, signal, signal, EET_T_STRING); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, source, source, EET_T_STRING); + EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, source_state, source_state, EET_T_STRING); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, in.from, in.from, EET_T_DOUBLE); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, in.range, in.range, EET_T_DOUBLE); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, action, action, EET_T_INT); diff --git a/src/lib/edje_edit.c b/src/lib/edje_edit.c index 36a34f0..a52df05 100644 --- a/src/lib/edje_edit.c +++ b/src/lib/edje_edit.c @@ -4762,6 +4762,7 @@ edje_edit_program_add(Evas_Object *obj, const char *name) epr-name = eina_stringshare_add(name); epr-signal = NULL; epr-source = NULL; + epr-source_state = NULL; epr-in.from = 0.0; epr-in.range = 0.0; epr-action = 0; @@ -4815,6 +4816,7 @@ edje_edit_program_del(Evas_Object *obj, const char *prog) _edje_if_string_free(ed, epr-name); _edje_if_string_free(ed, epr-signal); _edje_if_string_free(ed, epr-source); + _edje_if_string_free(ed, epr-source_state); _edje_if_string_free(ed, epr-state); _edje_if_string_free(ed, epr-state2); @@ -4981,6 +4983,32 @@ edje_edit_program_source_set(Evas_Object *obj, const char *prog, const char *sou } EAPI const char * +edje_edit_program_source_state_get(Evas_Object *obj, const char *prog) +{ + GET_EPR_OR_RETURN(NULL
Re: [E-devel] patch for edje program filter on source state
dunno if this is good... and you don't need C code to do it, you can use embryo or lua. I saw that you can use embryo, but I felt like this was missing since this little modification allow you to make EDC programs become so much more intelligent. About the check, this may require some optimizations because for now, it only strcmp the current state and the required state. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- 618FE3EF -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] patch for edje program filter on source state
Yes, I mean glob, like in source partnames. 2010/2/2 Gustavo Sverzut Barbieri barbi...@profusion.mobi On Tue, Feb 2, 2010 at 5:11 PM, tristan blunde...@gmail.com wrote: dunno if this is good... and you don't need C code to do it, you can use embryo or lua. I saw that you can use embryo, but I felt like this was missing since this little modification allow you to make EDC programs become so much more intelligent. About the check, this may require some optimizations because for now, it only strcmp the current state and the required state. What kind of optimization? Or you mean doing glob (using wildcards)? -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- 618FE3EF -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] patch for edje program filter on source state
Hello, I was having trouble with the EDC programs that were missing a filter for the current state of source part. This allow for instance to make a toggle button without using any C code. I made a patch that add an optional parameter to the source keyword of an EDC program : the part state. If this second parameter is omitted, then it behave exactly the same as before, and therefore stay compatible with all other EDC files. Here is an example: program { name: set_on signal: mouse,up,*; source: button is_off action: STATE_SET is_on 0.0; target: button; } program { name: set_off signal: mouse,up,*; source: button is_on action: STATE_SET is_off 0.0; target: button; } I hope this is the right way to do this. Here is the patch: diff --git a/src/bin/edje_cc_handlers.c b/src/bin/edje_cc_handlers.c index ca1cb45..4872923 100644 --- a/src/bin/edje_cc_handlers.c +++ b/src/bin/edje_cc_handlers.c @@ -5697,7 +5697,7 @@ st_collections_group_parts_part_description_params_string(void) program { name: programname; signal: signalname; - source: partname; + source: partname statename; in: 0.3 0.0; action: STATE_SET statename state_value; transition: LINEAR 0.5; @@ -5798,11 +5798,13 @@ st_collections_group_programs_program_signal(void) @property source @parameters -[source name] +[source name state] @effect Source of accepted signal. Sources may be globbed, but only one source keyword per program may be used. ex:source: button-*; (Signals from -any part or program named button-* are accepted) +any part or program named button-* are accepted). + The state part is optional and allow you to accept signal only if name is + in its state state. No state set means all states. @endproperty */ static void @@ -5811,11 +5813,17 @@ st_collections_group_programs_program_source(void) Edje_Part_Collection *pc; Edje_Program *ep; - check_arg_count(1); + check_min_arg_count(1); pc = eina_list_data_get(eina_list_last(edje_collections)); ep = eina_list_data_get(eina_list_last(pc-programs)); ep-source = parse_str(0); + + if (is_param(1)) { +ep-source_state = parse_str(1); + } else { +ep-source_state = NULL; + } } /** diff --git a/src/lib/edje_data.c b/src/lib/edje_data.c index 11c4e9f..d4c77ca 100644 --- a/src/lib/edje_data.c +++ b/src/lib/edje_data.c @@ -214,6 +214,7 @@ _edje_edd_init(void) EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, name, name, EET_T_STRING); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, signal, signal, EET_T_STRING); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, source, source, EET_T_STRING); + EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, source_state, source_state, EET_T_STRING); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, in.from, in.from, EET_T_DOUBLE); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, in.range, in.range, EET_T_DOUBLE); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, action, action, EET_T_INT); diff --git a/src/lib/edje_edit.c b/src/lib/edje_edit.c index 36a34f0..a52df05 100644 --- a/src/lib/edje_edit.c +++ b/src/lib/edje_edit.c @@ -4762,6 +4762,7 @@ edje_edit_program_add(Evas_Object *obj, const char *name) epr-name = eina_stringshare_add(name); epr-signal = NULL; epr-source = NULL; + epr-source_state = NULL; epr-in.from = 0.0; epr-in.range = 0.0; epr-action = 0; @@ -4815,6 +4816,7 @@ edje_edit_program_del(Evas_Object *obj, const char *prog) _edje_if_string_free(ed, epr-name); _edje_if_string_free(ed, epr-signal); _edje_if_string_free(ed, epr-source); + _edje_if_string_free(ed, epr-source_state); _edje_if_string_free(ed, epr-state); _edje_if_string_free(ed, epr-state2); @@ -4981,6 +4983,32 @@ edje_edit_program_source_set(Evas_Object *obj, const char *prog, const char *sou } EAPI const char * +edje_edit_program_source_state_get(Evas_Object *obj, const char *prog) +{ + GET_EPR_OR_RETURN(NULL); + + if (!epr-source_state) return NULL; + //printf(GET SOURCE for program: %s [%s]\n, prog, epr-source_state); + return eina_stringshare_add(epr-source_state); +} + +EAPI Eina_Bool +edje_edit_program_source_state_set(Evas_Object *obj, const char *prog, const char *source_state) +{ + GET_ED_OR_RETURN(0); + GET_EPR_OR_RETURN(0); + + if (!source_state) return 0; + + //printf(SET SOURCE for program: %s [%s]\n, prog, source); + + _edje_if_string_free(ed, epr-source_state); + epr-source = eina_stringshare_add(source_state); + + return 1; +} + +EAPI const char * edje_edit_program_signal_get(Evas_Object *obj, const char *prog) { GET_EPR_OR_RETURN(NULL); diff
[E-devel] emotion/vlc patch
Hi, here is a patch that add the vlc backend to emotion. Some function of emotion API are still stubbed but most of them should work fine. There is still a bug: SEGV in evas_common_convert_yuv_420p_601_rgba after the initial resize of movie frame. More information on this bug and the list of stubbed function can be found in emotion/src/module/vlc/TODO. I hope it will be helpful for somebody - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] emotion/vlc patch
Here is the missing patch ;-) 2008/9/22 Chidambar 'ilLogict' Zinnoury [EMAIL PROTECTED] Dans son message intitulé « [E-devel] emotion/vlc patch » du Mon, 22 Sep 2008 10:03:23 +0200, tristan [EMAIL PROTECTED] nous a donné l'occasion de lire : Hi, here is a patch that add the vlc backend to emotion. Some function of emotion API are still stubbed but most of them should work fine. There is still a bug: SEGV in evas_common_convert_yuv_420p_601_rgba after the initial resize of movie frame. More information on this bug and the list of stubbed function can be found in emotion/src/module/vlc/TODO. I hope it will be helpful for somebody It seems that you forgot to attach the patch :) Cheers! - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] vlc and emotion ... again
It seem there is a little problem with attached patch, so, you can download it from : http://www.guerrier.org/public/emotion-vlc.patch.gz - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel