Larger backgrounds can now be set to scroll whenever a E changes between desks. Kind...
authorViktor Kojouharov <vkojouharov@gmail.com>
Thu, 7 May 2009 18:39:55 +0000 (18:39 +0000)
committerViktor Kojouharov <vkojouharov@gmail.com>
Thu, 7 May 2009 18:39:55 +0000 (18:39 +0000)
commit648d75caab1f7c45f6dcc146b50d7591b5088dd2
treecf15d39de3935bc943eea878519ec8bd4c2b017c
parent9825672529a8043491ccdb1bbd91f5870df76d9e
Larger backgrounds can now be set to scroll whenever a E changes between desks. Kind of like a transition, but uses only one (the first desk's), larger wallpaper instead of several wallpapers for all desks, and it overrides the transition settings if activated.

The option can currently be activated from Virtual Desktops Settings -> Advanced. A better home and preview would be better for these settings.

In more detail, this option can make a wallpaper, larger than the geometry of the zone, scroll appropriately with each desk change. Consider a nice panorama picture, which is as wide as the total desks' width. Then, at most, E will scroll the background by 1 / (number of desks) for each desk change. The direction of the scrolling is dependent on the desk change itself. Also, the user can specify a coefficient of maximum scrolling for each axis. If the coefficient is 0, the wallpaper will not move.

More advanced animations can be constructed with edje. The data item "directional_freedom" "(1|0) (1|0)" can toggle the actual wallpaper scrolling done by E for each axis. A message with the current x/y position, panning w|h, and zone w|h is sent to the background edje with each desk change animation tick. An example embryo script that handles the message, and changes a hypothetical "a1" part in the "e/desktop/background" group is shown below:

         public message(Msg_Type:type, id, ...) {
            if (type == MSG_INT_SET) {
               new x = getarg(2);
               new y = getarg(3);
  //      new max_x = getarg(4);
  //      new max_y = getarg(5);
  //      new w = getarg(6);
  //      new h = getarg(7);
               custom_state(PART:"a1", "default", 0.0);
               set_state_val(PART:"a1", STATE_FILL_POS, 0.0, 0.0, -x / 4, -y / 4);
               set_state(PART:"a1", "custom", 0.0);
            }
         }

SVN revision: 40543
data/themes/default.edc
src/bin/e_bg.c
src/bin/e_bg.h
src/bin/e_config.c
src/bin/e_config.h
src/bin/e_desk.c
src/bin/e_zone.c
src/bin/e_zone.h
src/modules/conf_desks/e_int_config_desks.c