Re: [E-devel] [RFC] background panning when changing desks
On Fri, 01 May 2009 11:59:45 +0200 Viktor Kojouharov vkojouha...@gmail.com said: On Fri, 2009-05-01 at 10:33 +1000, Carsten Haitzler wrote: On Fri, 01 May 2009 02:02:01 +0200 Viktor Kojouharov vkojouha...@gmail.com said: I've updated the patch with a few fixes and also with sending a message with all the info that can be used to reproduce the animation (see line 249). The question is, how easy would be for a designer to use this info and create the parallax effect in edje? I don't know embryo that much, but I haven't seen a way to run a program and specify a transition for it as well. as per my previous mail - look at e_fwin.c - in fact COPY the code that is in _e_fwin_pan_scroll_update(). ALL you need to do is figure out pan.x/y, pan.max_x/max_y and pan.w/h for the desktop while scrolling. pan.w/h would be the size of the zone (zone-w,h). pan.x/y would be top-left x,y of the desktop relative to all the virtual desktops. i.e. pan.x = desk-x * zone-w, pan.y = desk-y * zone-h (and of course you need to interpolate this as you slide/switch desks) and pan.max_x = (e_config-zone_desks_x_count - 1) * zone-w (and same for y). i'm sure you can figure out the rest :) and you have a working example bg (the fileman one) to test with (and build off). you'll get the idea. And here's patch number three. I'm sending the same info that the fwin is sending (current pos, total drag size and total size). It works great so far. The only difference is that the bg_object itself slides from the scrollframe, whereas the fwin bg theme needs to handle all the moving. I could also look for a data item in the bg edje, which would tell me whether I should not scroll the bg object itself, and let the edje handle all changes, for ever more freedom in theming. Though I think that by default, the bg object should scroll with desk change, since it doesn't require any themeing (the user can just use a larger image, and it will scroll without any edc programming). cast: http://www.youtube.com/watch?v=AqUcbp0VvPc p.s.: raster, since you have a bunch of screencasts on your site, what program do you use to record the screen? i'e used several - xvidcap, enthrall and some other one i cant remember... btw - good job on the scrolly bg thing. now i need to just make a slick, minimal yet nice scrollable bg... something involving landscapes... -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [RFC] background panning when changing desks
On Fri, 2009-05-01 at 10:33 +1000, Carsten Haitzler wrote: On Fri, 01 May 2009 02:02:01 +0200 Viktor Kojouharov vkojouha...@gmail.com said: I've updated the patch with a few fixes and also with sending a message with all the info that can be used to reproduce the animation (see line 249). The question is, how easy would be for a designer to use this info and create the parallax effect in edje? I don't know embryo that much, but I haven't seen a way to run a program and specify a transition for it as well. as per my previous mail - look at e_fwin.c - in fact COPY the code that is in _e_fwin_pan_scroll_update(). ALL you need to do is figure out pan.x/y, pan.max_x/max_y and pan.w/h for the desktop while scrolling. pan.w/h would be the size of the zone (zone-w,h). pan.x/y would be top-left x,y of the desktop relative to all the virtual desktops. i.e. pan.x = desk-x * zone-w, pan.y = desk-y * zone-h (and of course you need to interpolate this as you slide/switch desks) and pan.max_x = (e_config-zone_desks_x_count - 1) * zone-w (and same for y). i'm sure you can figure out the rest :) and you have a working example bg (the fileman one) to test with (and build off). you'll get the idea. And here's patch number three. I'm sending the same info that the fwin is sending (current pos, total drag size and total size). It works great so far. The only difference is that the bg_object itself slides from the scrollframe, whereas the fwin bg theme needs to handle all the moving. I could also look for a data item in the bg edje, which would tell me whether I should not scroll the bg object itself, and let the edje handle all changes, for ever more freedom in theming. Though I think that by default, the bg object should scroll with desk change, since it doesn't require any themeing (the user can just use a larger image, and it will scroll without any edc programming). cast: http://www.youtube.com/watch?v=AqUcbp0VvPc p.s.: raster, since you have a bunch of screencasts on your site, what program do you use to record the screen? Index: src/bin/e_zone.c === --- src/bin/e_zone.c (revision 40414) +++ src/bin/e_zone.c (working copy) @@ -235,6 +235,8 @@ e_zone_move(E_Zone *zone, int x, int y) zone-x = x; zone-y = y; evas_object_move(zone-bg_object, x, y); + if (zone-bg_scrollframe) + evas_object_move(zone-bg_scrollframe, x, y); evas_object_move(zone-bg_event_object, x, y); evas_object_move(zone-bg_clip_object, x, y); @@ -287,6 +289,8 @@ e_zone_resize(E_Zone *zone, int w, int h) zone-w = w; zone-h = h; evas_object_resize(zone-bg_object, w, h); + if (zone-bg_scrollframe) + evas_object_resize(zone-bg_scrollframe, w, h); evas_object_resize(zone-bg_event_object, w, h); evas_object_resize(zone-bg_clip_object, w, h); @@ -345,9 +349,13 @@ e_zone_move_resize(E_Zone *zone, int x, int y, int zone-h = h; evas_object_move(zone-bg_object, x, y); + if (zone-bg_scrollframe) + evas_object_move(zone-bg_scrollframe, x, y); evas_object_move(zone-bg_event_object, x, y); evas_object_move(zone-bg_clip_object, x, y); evas_object_resize(zone-bg_object, w, h); + if (zone-bg_scrollframe) + evas_object_resize(zone-bg_scrollframe, w, h); evas_object_resize(zone-bg_event_object, w, h); evas_object_resize(zone-bg_clip_object, w, h); @@ -939,6 +947,8 @@ _e_zone_free(E_Zone *zone) { E_Container *con; Eina_List *l; + Ecore_Animator *anim; + void *data; int x, y; /* Delete the edge windows if they exist */ @@ -988,9 +998,14 @@ _e_zone_free(E_Zone *zone) con = zone-container; if (zone-name) eina_stringshare_del(zone-name); con-zones = eina_list_remove(con-zones, zone); + anim = evas_object_data_get(zone-bg_object, switch_animator); + if (anim) ecore_animator_del(anim); + data = evas_object_data_get(zone-bg_object, switch_animator_params); + if (data) E_FREE(data); evas_object_del(zone-bg_event_object); evas_object_del(zone-bg_clip_object); evas_object_del(zone-bg_object); + evas_object_del(zone-bg_scrollframe); if (zone-prev_bg_object) evas_object_del(zone-prev_bg_object); if (zone-transition_object) evas_object_del(zone-transition_object); Index: src/bin/e_zone.h === --- src/bin/e_zone.h (revision 40414) +++ src/bin/e_zone.h (working copy) @@ -48,6 +48,7 @@ struct _E_Zone Evas_Object *bg_event_object; Evas_Object *bg_clip_object; Evas_Object *prev_bg_object; + Evas_Object *bg_scrollframe; Evas_Object *transition_object; int desk_x_count, desk_y_count; Index: src/bin/e_config.c === --- src/bin/e_config.c (revision 40414) +++ src/bin/e_config.c (working copy) @@ -622,6 +622,9 @@
Re: [E-devel] [RFC] background panning when changing desks
I've updated the patch with a few fixes and also with sending a message with all the info that can be used to reproduce the animation (see line 249). The question is, how easy would be for a designer to use this info and create the parallax effect in edje? I don't know embryo that much, but I haven't seen a way to run a program and specify a transition for it as well. I cant quite get this patch to work here. I get the options in the Virtual Desktops dialog, but no cool panning. Also, it seems to break the desktop wallpaper? Reverting now for more testing. -Toma. -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [RFC] background panning when changing desks
On Fri, 2009-05-01 at 21:05 +0800, Toma wrote: I've updated the patch with a few fixes and also with sending a message with all the info that can be used to reproduce the animation (see line 249). The question is, how easy would be for a designer to use this info and create the parallax effect in edje? I don't know embryo that much, but I haven't seen a way to run a program and specify a transition for it as well. I cant quite get this patch to work here. I get the options in the Virtual Desktops dialog, but no cool panning. Also, it seems to break the desktop wallpaper? Reverting now for more testing. -Toma. You could try with this patch. It fixes some minor things, and adds the 'directional_freedom' data item, which can restrict the actual bg object scrolling in the x/y direction: E.g: data.item: directional_freedom 1 0; will restrict actual scrolling in the x direction, leaving all logic for the edje file. Index: src/bin/e_zone.c === --- src/bin/e_zone.c (revision 40414) +++ src/bin/e_zone.c (working copy) @@ -235,6 +235,8 @@ e_zone_move(E_Zone *zone, int x, int y) zone-x = x; zone-y = y; evas_object_move(zone-bg_object, x, y); + if (zone-bg_scrollframe) + evas_object_move(zone-bg_scrollframe, x, y); evas_object_move(zone-bg_event_object, x, y); evas_object_move(zone-bg_clip_object, x, y); @@ -287,6 +289,8 @@ e_zone_resize(E_Zone *zone, int w, int h) zone-w = w; zone-h = h; evas_object_resize(zone-bg_object, w, h); + if (zone-bg_scrollframe) + evas_object_resize(zone-bg_scrollframe, w, h); evas_object_resize(zone-bg_event_object, w, h); evas_object_resize(zone-bg_clip_object, w, h); @@ -345,9 +349,13 @@ e_zone_move_resize(E_Zone *zone, int x, int y, int zone-h = h; evas_object_move(zone-bg_object, x, y); + if (zone-bg_scrollframe) + evas_object_move(zone-bg_scrollframe, x, y); evas_object_move(zone-bg_event_object, x, y); evas_object_move(zone-bg_clip_object, x, y); evas_object_resize(zone-bg_object, w, h); + if (zone-bg_scrollframe) + evas_object_resize(zone-bg_scrollframe, w, h); evas_object_resize(zone-bg_event_object, w, h); evas_object_resize(zone-bg_clip_object, w, h); @@ -939,6 +947,8 @@ _e_zone_free(E_Zone *zone) { E_Container *con; Eina_List *l; + Ecore_Animator *anim; + void *data; int x, y; /* Delete the edge windows if they exist */ @@ -988,9 +998,14 @@ _e_zone_free(E_Zone *zone) con = zone-container; if (zone-name) eina_stringshare_del(zone-name); con-zones = eina_list_remove(con-zones, zone); + anim = evas_object_data_get(zone-bg_object, switch_animator); + if (anim) ecore_animator_del(anim); + data = evas_object_data_get(zone-bg_object, switch_animator_params); + if (data) E_FREE(data); evas_object_del(zone-bg_event_object); evas_object_del(zone-bg_clip_object); evas_object_del(zone-bg_object); + evas_object_del(zone-bg_scrollframe); if (zone-prev_bg_object) evas_object_del(zone-prev_bg_object); if (zone-transition_object) evas_object_del(zone-transition_object); Index: src/bin/e_zone.h === --- src/bin/e_zone.h (revision 40414) +++ src/bin/e_zone.h (working copy) @@ -48,6 +48,7 @@ struct _E_Zone Evas_Object *bg_event_object; Evas_Object *bg_clip_object; Evas_Object *prev_bg_object; + Evas_Object *bg_scrollframe; Evas_Object *transition_object; int desk_x_count, desk_y_count; Index: src/bin/e_config.c === --- src/bin/e_config.c (revision 40414) +++ src/bin/e_config.c (working copy) @@ -622,6 +622,9 @@ e_config_init(void) E_CONFIG_VAL(D, T, desk_flip_animate_mode, INT); E_CONFIG_VAL(D, T, desk_flip_animate_interpolation, INT); E_CONFIG_VAL(D, T, desk_flip_animate_time, DOUBLE); + E_CONFIG_VAL(D, T, desk_flip_pan_bg, UCHAR); + E_CONFIG_VAL(D, T, desk_flip_pan_x_axis_factor, DOUBLE); + E_CONFIG_VAL(D, T, desk_flip_pan_y_axis_factor, DOUBLE); E_CONFIG_VAL(D, T, wallpaper_import_last_dev, STR); E_CONFIG_VAL(D, T, wallpaper_import_last_path, STR); @@ -915,6 +918,12 @@ e_config_load(void) e_config-screensaver_ask_presentation_timeout = 30.0; IFCFGEND; +IFCFG(0x0133); +COPYVAL(desk_flip_pan_bg); +COPYVAL(desk_flip_pan_x_axis_factor); +COPYVAL(desk_flip_pan_y_axis_factor); +IFCFGEND; + e_config-config_version = E_CONFIG_FILE_VERSION; _e_config_free(tcfg); } @@ -1017,6 +1026,9 @@ e_config_load(void) E_CONFIG_LIMIT(e_config-desk_flip_wrap, 0, 1); E_CONFIG_LIMIT(e_config-fullscreen_flip, 0, 1); E_CONFIG_LIMIT(e_config-icon_theme_overrides, 0, 1); + E_CONFIG_LIMIT(e_config-desk_flip_pan_bg, 0, 1); +
Re: [E-devel] [RFC] background panning when changing desks
On Wed, Apr 29, 2009 at 7:18 PM, Viktor Kojouharov vkojouha...@gmail.com wrote: On Wed, 2009-04-29 at 18:58 -0300, Rafael Antognolli wrote: On Wed, Apr 29, 2009 at 4:31 PM, Viktor Kojouharov vkojouha...@gmail.com wrote: Hi, I've been playing around with the making the bg_object pan on desk switch, instead of using transitions. To illustrate what I'm talking about, I made a rather crappy screencast (istanbul only seems to make 10fps screencasts, anyone have an alternative program?): http://www.youtube.com/watch?v=glYLH3GSikE The idea is that the background slides depending on its size relative to the geometry of all desks, as well as a user specified factor. E.g.: if you have 2 horizontal desks of size 640x480, and a bg of size 1280x480, the background will slide at most by a half of its size. If the user specifies a factor below 1.0, the offset of the bg is smaller, creating a parallax effect. If the bg size is smaller, the total offset will be smaller, thus not causing the bg to scroll off boundary. I've currently implemented it with this patch. It is toggable by an option in the virtual desks settings dialog, which will override any preselected transition (since it doesn't use the same function). Speed is not blazing fast, but I'm not sure if it can be faster with just using the software engine (using the gl engine for the container is flicker free though). So what do you guys think of this idea? Wow, very nice effect! Now I'm thinking if it would be possible to have a wallpaper with many layers, and some of them scroll more than others. This way you would have an effect as if the near mountains move faster than the far ones (giving an idea of depth)... If there's any way to communicate the direction, duration and distance to edje, then maybe it could be possible. Not sure how much info one could give with an edje signal. And the performance might degrade. just use edje messages instead of signals, you can give it an array of floats. As for performance, yeah, it will suck with slower machines. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [RFC] background panning when changing desks
On Thu, 2009-04-30 at 17:32 -0300, Gustavo Sverzut Barbieri wrote: On Wed, Apr 29, 2009 at 7:18 PM, Viktor Kojouharov vkojouha...@gmail.com wrote: On Wed, 2009-04-29 at 18:58 -0300, Rafael Antognolli wrote: On Wed, Apr 29, 2009 at 4:31 PM, Viktor Kojouharov vkojouha...@gmail.com wrote: Hi, I've been playing around with the making the bg_object pan on desk switch, instead of using transitions. To illustrate what I'm talking about, I made a rather crappy screencast (istanbul only seems to make 10fps screencasts, anyone have an alternative program?): http://www.youtube.com/watch?v=glYLH3GSikE The idea is that the background slides depending on its size relative to the geometry of all desks, as well as a user specified factor. E.g.: if you have 2 horizontal desks of size 640x480, and a bg of size 1280x480, the background will slide at most by a half of its size. If the user specifies a factor below 1.0, the offset of the bg is smaller, creating a parallax effect. If the bg size is smaller, the total offset will be smaller, thus not causing the bg to scroll off boundary. I've currently implemented it with this patch. It is toggable by an option in the virtual desks settings dialog, which will override any preselected transition (since it doesn't use the same function). Speed is not blazing fast, but I'm not sure if it can be faster with just using the software engine (using the gl engine for the container is flicker free though). So what do you guys think of this idea? Wow, very nice effect! Now I'm thinking if it would be possible to have a wallpaper with many layers, and some of them scroll more than others. This way you would have an effect as if the near mountains move faster than the far ones (giving an idea of depth)... If there's any way to communicate the direction, duration and distance to edje, then maybe it could be possible. Not sure how much info one could give with an edje signal. And the performance might degrade. just use edje messages instead of signals, you can give it an array of floats. As for performance, yeah, it will suck with slower machines. Actually, another idea which might work even easier (though it would be a bit more restricting), is to get all groups matching the 'e/desktop/background/*' glob. these groups can represent additional background elements, and they could have a data item, which specifies the speed coefficient, relative to the 'e/desktop/background' element. E.g.: I could have an 'e/desktop/background/sun' group, which would show a sun. It would have a data item 'data.item: relative_speed_x 0.1 # (0.0 - inf). Then the sun would be offset by 0.1 of the background offset in the X direction. This is easier for implementation and easier for the themers to do, but it only offers movement relative to the main background object (but it will achieve what Rafael is suggestion, so I don't know whether more freedom is needed). -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [RFC] background panning when changing desks
On Thu, Apr 30, 2009 at 6:13 PM, Viktor Kojouharov vkojouha...@gmail.com wrote: On Thu, 2009-04-30 at 17:32 -0300, Gustavo Sverzut Barbieri wrote: On Wed, Apr 29, 2009 at 7:18 PM, Viktor Kojouharov vkojouha...@gmail.com wrote: On Wed, 2009-04-29 at 18:58 -0300, Rafael Antognolli wrote: On Wed, Apr 29, 2009 at 4:31 PM, Viktor Kojouharov vkojouha...@gmail.com wrote: Hi, I've been playing around with the making the bg_object pan on desk switch, instead of using transitions. To illustrate what I'm talking about, I made a rather crappy screencast (istanbul only seems to make 10fps screencasts, anyone have an alternative program?): http://www.youtube.com/watch?v=glYLH3GSikE The idea is that the background slides depending on its size relative to the geometry of all desks, as well as a user specified factor. E.g.: if you have 2 horizontal desks of size 640x480, and a bg of size 1280x480, the background will slide at most by a half of its size. If the user specifies a factor below 1.0, the offset of the bg is smaller, creating a parallax effect. If the bg size is smaller, the total offset will be smaller, thus not causing the bg to scroll off boundary. I've currently implemented it with this patch. It is toggable by an option in the virtual desks settings dialog, which will override any preselected transition (since it doesn't use the same function). Speed is not blazing fast, but I'm not sure if it can be faster with just using the software engine (using the gl engine for the container is flicker free though). So what do you guys think of this idea? Wow, very nice effect! Now I'm thinking if it would be possible to have a wallpaper with many layers, and some of them scroll more than others. This way you would have an effect as if the near mountains move faster than the far ones (giving an idea of depth)... If there's any way to communicate the direction, duration and distance to edje, then maybe it could be possible. Not sure how much info one could give with an edje signal. And the performance might degrade. just use edje messages instead of signals, you can give it an array of floats. As for performance, yeah, it will suck with slower machines. Actually, another idea which might work even easier (though it would be a bit more restricting), is to get all groups matching the 'e/desktop/background/*' glob. these groups can represent additional background elements, and they could have a data item, which specifies the speed coefficient, relative to the 'e/desktop/background' element. E.g.: I could have an 'e/desktop/background/sun' group, which would show a sun. It would have a data item 'data.item: relative_speed_x 0.1 # (0.0 - inf). Then the sun would be offset by 0.1 of the background offset in the X direction. This is easier for implementation and easier for the themers to do, but it only offers movement relative to the main background object (but it will achieve what Rafael is suggestion, so I don't know whether more freedom is needed). i dislike as you'll need a special case. In the other way you just send some integers/floats that specify the overall state, for example: - this screen geometry (x, y, w, h) - the whole virtual size (w_all, h_all) - transition position (either -1.0..1.0, x_pos, y_pos...) then one can do all the fancy stuff, maybe gradient will change based on values, etc. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [RFC] background panning when changing desks
On Thu, 2009-04-30 at 18:26 -0300, Gustavo Sverzut Barbieri wrote: On Thu, Apr 30, 2009 at 6:13 PM, Viktor Kojouharov vkojouha...@gmail.com wrote: On Thu, 2009-04-30 at 17:32 -0300, Gustavo Sverzut Barbieri wrote: On Wed, Apr 29, 2009 at 7:18 PM, Viktor Kojouharov vkojouha...@gmail.com wrote: On Wed, 2009-04-29 at 18:58 -0300, Rafael Antognolli wrote: On Wed, Apr 29, 2009 at 4:31 PM, Viktor Kojouharov vkojouha...@gmail.com wrote: Hi, I've been playing around with the making the bg_object pan on desk switch, instead of using transitions. To illustrate what I'm talking about, I made a rather crappy screencast (istanbul only seems to make 10fps screencasts, anyone have an alternative program?): http://www.youtube.com/watch?v=glYLH3GSikE The idea is that the background slides depending on its size relative to the geometry of all desks, as well as a user specified factor. E.g.: if you have 2 horizontal desks of size 640x480, and a bg of size 1280x480, the background will slide at most by a half of its size. If the user specifies a factor below 1.0, the offset of the bg is smaller, creating a parallax effect. If the bg size is smaller, the total offset will be smaller, thus not causing the bg to scroll off boundary. I've currently implemented it with this patch. It is toggable by an option in the virtual desks settings dialog, which will override any preselected transition (since it doesn't use the same function). Speed is not blazing fast, but I'm not sure if it can be faster with just using the software engine (using the gl engine for the container is flicker free though). So what do you guys think of this idea? Wow, very nice effect! Now I'm thinking if it would be possible to have a wallpaper with many layers, and some of them scroll more than others. This way you would have an effect as if the near mountains move faster than the far ones (giving an idea of depth)... If there's any way to communicate the direction, duration and distance to edje, then maybe it could be possible. Not sure how much info one could give with an edje signal. And the performance might degrade. just use edje messages instead of signals, you can give it an array of floats. As for performance, yeah, it will suck with slower machines. Actually, another idea which might work even easier (though it would be a bit more restricting), is to get all groups matching the 'e/desktop/background/*' glob. these groups can represent additional background elements, and they could have a data item, which specifies the speed coefficient, relative to the 'e/desktop/background' element. E.g.: I could have an 'e/desktop/background/sun' group, which would show a sun. It would have a data item 'data.item: relative_speed_x 0.1 # (0.0 - inf). Then the sun would be offset by 0.1 of the background offset in the X direction. This is easier for implementation and easier for the themers to do, but it only offers movement relative to the main background object (but it will achieve what Rafael is suggestion, so I don't know whether more freedom is needed). i dislike as you'll need a special case. In the other way you just send some integers/floats that specify the overall state, for example: - this screen geometry (x, y, w, h) - the whole virtual size (w_all, h_all) - transition position (either -1.0..1.0, x_pos, y_pos...) then one can do all the fancy stuff, maybe gradient will change based on values, etc. true. I just didn't know up until know that I could send so much info to edje :) -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [RFC] background panning when changing desks
On Thu, 2009-04-30 at 18:26 -0300, Gustavo Sverzut Barbieri wrote: On Thu, Apr 30, 2009 at 6:13 PM, Viktor Kojouharov vkojouha...@gmail.com wrote: On Thu, 2009-04-30 at 17:32 -0300, Gustavo Sverzut Barbieri wrote: On Wed, Apr 29, 2009 at 7:18 PM, Viktor Kojouharov vkojouha...@gmail.com wrote: On Wed, 2009-04-29 at 18:58 -0300, Rafael Antognolli wrote: On Wed, Apr 29, 2009 at 4:31 PM, Viktor Kojouharov vkojouha...@gmail.com wrote: Hi, I've been playing around with the making the bg_object pan on desk switch, instead of using transitions. To illustrate what I'm talking about, I made a rather crappy screencast (istanbul only seems to make 10fps screencasts, anyone have an alternative program?): http://www.youtube.com/watch?v=glYLH3GSikE The idea is that the background slides depending on its size relative to the geometry of all desks, as well as a user specified factor. E.g.: if you have 2 horizontal desks of size 640x480, and a bg of size 1280x480, the background will slide at most by a half of its size. If the user specifies a factor below 1.0, the offset of the bg is smaller, creating a parallax effect. If the bg size is smaller, the total offset will be smaller, thus not causing the bg to scroll off boundary. I've currently implemented it with this patch. It is toggable by an option in the virtual desks settings dialog, which will override any preselected transition (since it doesn't use the same function). Speed is not blazing fast, but I'm not sure if it can be faster with just using the software engine (using the gl engine for the container is flicker free though). So what do you guys think of this idea? Wow, very nice effect! Now I'm thinking if it would be possible to have a wallpaper with many layers, and some of them scroll more than others. This way you would have an effect as if the near mountains move faster than the far ones (giving an idea of depth)... If there's any way to communicate the direction, duration and distance to edje, then maybe it could be possible. Not sure how much info one could give with an edje signal. And the performance might degrade. just use edje messages instead of signals, you can give it an array of floats. As for performance, yeah, it will suck with slower machines. Actually, another idea which might work even easier (though it would be a bit more restricting), is to get all groups matching the 'e/desktop/background/*' glob. these groups can represent additional background elements, and they could have a data item, which specifies the speed coefficient, relative to the 'e/desktop/background' element. E.g.: I could have an 'e/desktop/background/sun' group, which would show a sun. It would have a data item 'data.item: relative_speed_x 0.1 # (0.0 - inf). Then the sun would be offset by 0.1 of the background offset in the X direction. This is easier for implementation and easier for the themers to do, but it only offers movement relative to the main background object (but it will achieve what Rafael is suggestion, so I don't know whether more freedom is needed). i dislike as you'll need a special case. In the other way you just send some integers/floats that specify the overall state, for example: - this screen geometry (x, y, w, h) - the whole virtual size (w_all, h_all) - transition position (either -1.0..1.0, x_pos, y_pos...) then one can do all the fancy stuff, maybe gradient will change based on values, etc. I've updated the patch with a few fixes and also with sending a message with all the info that can be used to reproduce the animation (see line 249). The question is, how easy would be for a designer to use this info and create the parallax effect in edje? I don't know embryo that much, but I haven't seen a way to run a program and specify a transition for it as well. Index: src/bin/e_zone.c === --- src/bin/e_zone.c (revision 40414) +++ src/bin/e_zone.c (working copy) @@ -235,6 +235,8 @@ e_zone_move(E_Zone *zone, int x, int y) zone-x = x; zone-y = y; evas_object_move(zone-bg_object, x, y); + if (zone-bg_scrollframe) + evas_object_move(zone-bg_scrollframe, x, y); evas_object_move(zone-bg_event_object, x, y); evas_object_move(zone-bg_clip_object, x, y); @@ -287,6 +289,8 @@ e_zone_resize(E_Zone *zone, int w, int h) zone-w = w; zone-h = h; evas_object_resize(zone-bg_object, w, h); + if (zone-bg_scrollframe) + evas_object_resize(zone-bg_scrollframe, w, h); evas_object_resize(zone-bg_event_object, w, h); evas_object_resize(zone-bg_clip_object, w, h); @@ -345,9 +349,13 @@ e_zone_move_resize(E_Zone *zone, int x, int y, int zone-h = h; evas_object_move(zone-bg_object, x, y); + if (zone-bg_scrollframe) +
Re: [E-devel] [RFC] background panning when changing desks
On Thu, 30 Apr 2009 23:13:28 +0200 Viktor Kojouharov vkojouha...@gmail.com said: On Thu, 2009-04-30 at 17:32 -0300, Gustavo Sverzut Barbieri wrote: On Wed, Apr 29, 2009 at 7:18 PM, Viktor Kojouharov vkojouha...@gmail.com wrote: On Wed, 2009-04-29 at 18:58 -0300, Rafael Antognolli wrote: On Wed, Apr 29, 2009 at 4:31 PM, Viktor Kojouharov vkojouha...@gmail.com wrote: Hi, I've been playing around with the making the bg_object pan on desk switch, instead of using transitions. To illustrate what I'm talking about, I made a rather crappy screencast (istanbul only seems to make 10fps screencasts, anyone have an alternative program?): http://www.youtube.com/watch?v=glYLH3GSikE The idea is that the background slides depending on its size relative to the geometry of all desks, as well as a user specified factor. E.g.: if you have 2 horizontal desks of size 640x480, and a bg of size 1280x480, the background will slide at most by a half of its size. If the user specifies a factor below 1.0, the offset of the bg is smaller, creating a parallax effect. If the bg size is smaller, the total offset will be smaller, thus not causing the bg to scroll off boundary. I've currently implemented it with this patch. It is toggable by an option in the virtual desks settings dialog, which will override any preselected transition (since it doesn't use the same function). Speed is not blazing fast, but I'm not sure if it can be faster with just using the software engine (using the gl engine for the container is flicker free though). So what do you guys think of this idea? Wow, very nice effect! Now I'm thinking if it would be possible to have a wallpaper with many layers, and some of them scroll more than others. This way you would have an effect as if the near mountains move faster than the far ones (giving an idea of depth)... If there's any way to communicate the direction, duration and distance to edje, then maybe it could be possible. Not sure how much info one could give with an edje signal. And the performance might degrade. just use edje messages instead of signals, you can give it an array of floats. As for performance, yeah, it will suck with slower machines. Actually, another idea which might work even easier (though it would be a bit more restricting), is to get all groups matching the 'e/desktop/background/*' glob. these groups can represent additional background elements, and they could have a data item, which specifies the speed coefficient, relative to the 'e/desktop/background' element. E.g.: I could have an 'e/desktop/background/sun' group, which would show a sun. It would have a data item 'data.item: relative_speed_x 0.1 # (0.0 - inf). Then the sun would be offset by 0.1 of the background offset in the X direction. This is easier for implementation and easier for the themers to do, but it only offers movement relative to the main background object (but it will achieve what Rafael is suggestion, so I don't know whether more freedom is needed). take a look at e_fwin.c:_e_fwin_pan_scroll_update() in the fileman module... it does all of this already. for an example of edje that does it... http://www.rasterman.com/files/Custom-Background-etc..tar.gz untar it - open it in fileman. scroll around. resize it up and down to test horizontal scrolling too :) it's been doing this for quite some time now. anice hidden feature in efm that lets you have custom background AND even overlays per directory using magic files - meant to allow customising of your data when browsing it. this means you can let the designer of the bg now choose how to scroll, how to scroll, how many layers, where they are positioned depth-wise etc. etc. -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [RFC] background panning when changing desks
On Fri, 01 May 2009 02:02:01 +0200 Viktor Kojouharov vkojouha...@gmail.com said: I've updated the patch with a few fixes and also with sending a message with all the info that can be used to reproduce the animation (see line 249). The question is, how easy would be for a designer to use this info and create the parallax effect in edje? I don't know embryo that much, but I haven't seen a way to run a program and specify a transition for it as well. as per my previous mail - look at e_fwin.c - in fact COPY the code that is in _e_fwin_pan_scroll_update(). ALL you need to do is figure out pan.x/y, pan.max_x/max_y and pan.w/h for the desktop while scrolling. pan.w/h would be the size of the zone (zone-w,h). pan.x/y would be top-left x,y of the desktop relative to all the virtual desktops. i.e. pan.x = desk-x * zone-w, pan.y = desk-y * zone-h (and of course you need to interpolate this as you slide/switch desks) and pan.max_x = (e_config-zone_desks_x_count - 1) * zone-w (and same for y). i'm sure you can figure out the rest :) and you have a working example bg (the fileman one) to test with (and build off). you'll get the idea. -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] [RFC] background panning when changing desks
Hi, I've been playing around with the making the bg_object pan on desk switch, instead of using transitions. To illustrate what I'm talking about, I made a rather crappy screencast (istanbul only seems to make 10fps screencasts, anyone have an alternative program?): http://www.youtube.com/watch?v=glYLH3GSikE The idea is that the background slides depending on its size relative to the geometry of all desks, as well as a user specified factor. E.g.: if you have 2 horizontal desks of size 640x480, and a bg of size 1280x480, the background will slide at most by a half of its size. If the user specifies a factor below 1.0, the offset of the bg is smaller, creating a parallax effect. If the bg size is smaller, the total offset will be smaller, thus not causing the bg to scroll off boundary. I've currently implemented it with this patch. It is toggable by an option in the virtual desks settings dialog, which will override any preselected transition (since it doesn't use the same function). Speed is not blazing fast, but I'm not sure if it can be faster with just using the software engine (using the gl engine for the container is flicker free though). So what do you guys think of this idea? Index: src/bin/e_zone.c === --- src/bin/e_zone.c (revision 40414) +++ src/bin/e_zone.c (working copy) @@ -235,6 +235,8 @@ e_zone_move(E_Zone *zone, int x, int y) zone-x = x; zone-y = y; evas_object_move(zone-bg_object, x, y); + if (zone-bg_scrollframe) + evas_object_move(zone-bg_scrollframe, x, y); evas_object_move(zone-bg_event_object, x, y); evas_object_move(zone-bg_clip_object, x, y); @@ -287,6 +289,8 @@ e_zone_resize(E_Zone *zone, int w, int h) zone-w = w; zone-h = h; evas_object_resize(zone-bg_object, w, h); + if (zone-bg_scrollframe) + evas_object_resize(zone-bg_scrollframe, w, h); evas_object_resize(zone-bg_event_object, w, h); evas_object_resize(zone-bg_clip_object, w, h); @@ -345,9 +349,13 @@ e_zone_move_resize(E_Zone *zone, int x, int y, int zone-h = h; evas_object_move(zone-bg_object, x, y); + if (zone-bg_scrollframe) + evas_object_move(zone-bg_scrollframe, x, y); evas_object_move(zone-bg_event_object, x, y); evas_object_move(zone-bg_clip_object, x, y); evas_object_resize(zone-bg_object, w, h); + if (zone-bg_scrollframe) + evas_object_resize(zone-bg_scrollframe, w, h); evas_object_resize(zone-bg_event_object, w, h); evas_object_resize(zone-bg_clip_object, w, h); @@ -939,6 +947,8 @@ _e_zone_free(E_Zone *zone) { E_Container *con; Eina_List *l; + Ecore_Animator *anim; + void *data; int x, y; /* Delete the edge windows if they exist */ @@ -988,9 +998,14 @@ _e_zone_free(E_Zone *zone) con = zone-container; if (zone-name) eina_stringshare_del(zone-name); con-zones = eina_list_remove(con-zones, zone); + anim = evas_object_data_get(zone-bg_object, switch_animator); + if (anim) ecore_animator_del(anim); + data = evas_object_data_get(zone-bg_object, switch_animator_params); + if (data) E_FREE(data); evas_object_del(zone-bg_event_object); evas_object_del(zone-bg_clip_object); evas_object_del(zone-bg_object); + evas_object_del(zone-bg_scrollframe); if (zone-prev_bg_object) evas_object_del(zone-prev_bg_object); if (zone-transition_object) evas_object_del(zone-transition_object); Index: src/bin/e_zone.h === --- src/bin/e_zone.h (revision 40414) +++ src/bin/e_zone.h (working copy) @@ -48,6 +48,7 @@ struct _E_Zone Evas_Object *bg_event_object; Evas_Object *bg_clip_object; Evas_Object *prev_bg_object; + Evas_Object *bg_scrollframe; Evas_Object *transition_object; int desk_x_count, desk_y_count; Index: src/bin/e_config.c === --- src/bin/e_config.c (revision 40414) +++ src/bin/e_config.c (working copy) @@ -622,6 +622,9 @@ e_config_init(void) E_CONFIG_VAL(D, T, desk_flip_animate_mode, INT); E_CONFIG_VAL(D, T, desk_flip_animate_interpolation, INT); E_CONFIG_VAL(D, T, desk_flip_animate_time, DOUBLE); + E_CONFIG_VAL(D, T, desk_flip_pan_bg, UCHAR); + E_CONFIG_VAL(D, T, desk_flip_pan_x_axis_factor, DOUBLE); + E_CONFIG_VAL(D, T, desk_flip_pan_y_axis_factor, DOUBLE); E_CONFIG_VAL(D, T, wallpaper_import_last_dev, STR); E_CONFIG_VAL(D, T, wallpaper_import_last_path, STR); @@ -915,6 +918,12 @@ e_config_load(void) e_config-screensaver_ask_presentation_timeout = 30.0; IFCFGEND; +IFCFG(0x0133); +COPYVAL(desk_flip_pan_bg); +COPYVAL(desk_flip_pan_x_axis_factor); +COPYVAL(desk_flip_pan_y_axis_factor); +IFCFGEND; + e_config-config_version = E_CONFIG_FILE_VERSION; _e_config_free(tcfg); } @@ -1017,6 +1026,9 @@
Re: [E-devel] [RFC] background panning when changing desks
On Wed, Apr 29, 2009 at 4:31 PM, Viktor Kojouharov vkojouha...@gmail.com wrote: Hi, I've been playing around with the making the bg_object pan on desk switch, instead of using transitions. To illustrate what I'm talking about, I made a rather crappy screencast (istanbul only seems to make 10fps screencasts, anyone have an alternative program?): http://www.youtube.com/watch?v=glYLH3GSikE The idea is that the background slides depending on its size relative to the geometry of all desks, as well as a user specified factor. E.g.: if you have 2 horizontal desks of size 640x480, and a bg of size 1280x480, the background will slide at most by a half of its size. If the user specifies a factor below 1.0, the offset of the bg is smaller, creating a parallax effect. If the bg size is smaller, the total offset will be smaller, thus not causing the bg to scroll off boundary. I've currently implemented it with this patch. It is toggable by an option in the virtual desks settings dialog, which will override any preselected transition (since it doesn't use the same function). Speed is not blazing fast, but I'm not sure if it can be faster with just using the software engine (using the gl engine for the container is flicker free though). So what do you guys think of this idea? Wow, very nice effect! Now I'm thinking if it would be possible to have a wallpaper with many layers, and some of them scroll more than others. This way you would have an effect as if the near mountains move faster than the far ones (giving an idea of depth)... -- Rafael Antognolli -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [RFC] background panning when changing desks
On Wed, 2009-04-29 at 18:58 -0300, Rafael Antognolli wrote: On Wed, Apr 29, 2009 at 4:31 PM, Viktor Kojouharov vkojouha...@gmail.com wrote: Hi, I've been playing around with the making the bg_object pan on desk switch, instead of using transitions. To illustrate what I'm talking about, I made a rather crappy screencast (istanbul only seems to make 10fps screencasts, anyone have an alternative program?): http://www.youtube.com/watch?v=glYLH3GSikE The idea is that the background slides depending on its size relative to the geometry of all desks, as well as a user specified factor. E.g.: if you have 2 horizontal desks of size 640x480, and a bg of size 1280x480, the background will slide at most by a half of its size. If the user specifies a factor below 1.0, the offset of the bg is smaller, creating a parallax effect. If the bg size is smaller, the total offset will be smaller, thus not causing the bg to scroll off boundary. I've currently implemented it with this patch. It is toggable by an option in the virtual desks settings dialog, which will override any preselected transition (since it doesn't use the same function). Speed is not blazing fast, but I'm not sure if it can be faster with just using the software engine (using the gl engine for the container is flicker free though). So what do you guys think of this idea? Wow, very nice effect! Now I'm thinking if it would be possible to have a wallpaper with many layers, and some of them scroll more than others. This way you would have an effect as if the near mountains move faster than the far ones (giving an idea of depth)... If there's any way to communicate the direction, duration and distance to edje, then maybe it could be possible. Not sure how much info one could give with an edje signal. And the performance might degrade. -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel