}
///////////////////////////////////////////////////////////////////////////////
+#define elm_slideshow_item_add(id) \
+ part { name: "image_"id"_1_whole"; \
+ description { \
+ state: "default" 0.0; \
+ color: 255 255 255 255; \
+ rel1.to: "position_"id; \
+ rel2.to: "position_"id; \
+ } \
+ description { \
+ state: "fade_prev_next" 0.0; \
+ inherit: "default" 0.0; \
+ color: 255 255 255 0; \
+ } \
+ description { \
+ state: "black_fade_prev_next_init" 0.0; \
+ inherit: "default" 0.0; \
+ color: 255 255 255 255; \
+ } \
+ description { \
+ state: "black_fade_prev_next" 0.0; \
+ inherit: "default" 0.0; \
+ color: 0 0 0 255; \
+ } \
+ description { \
+ state: "horizontal_next_init" 0.0; \
+ inherit: "default" 0.0; \
+ } \
+ description { \
+ state: "horizontal_next" 0.0; \
+ inherit: "default" 0.0; \
+ rel1.relative: -1.0 0.0; \
+ rel2.relative: 0.0 1.0; \
+ } \
+ description { \
+ state: "horizontal_prev_init" 0.0; \
+ inherit: "default" 0.0; \
+ } \
+ description { \
+ state: "horizontal_prev" 0.0; \
+ inherit: "default" 0.0; \
+ rel1.relative: 1.0 0.0; \
+ rel2.relative: 2.0 1.0; \
+ } \
+ description { \
+ state: "vertical_next_init" 0.0; \
+ inherit: "default" 0.0; \
+ } \
+ description { \
+ state: "vertical_next" 0.0; \
+ inherit: "default" 0.0; \
+ rel1.relative: 0.0 -1.0; \
+ rel2.relative: 1.0 0.0; \
+ } \
+ description { \
+ state: "vertical_prev_init" 0.0; \
+ inherit: "default" 0.0; \
+ } \
+ description { \
+ state: "vertical_prev" 0.0; \
+ inherit: "default" 0.0; \
+ rel1.relative: 0.0 1.0; \
+ rel2.relative: 1.0 2.0; \
+ } \
+ } \
+ part { name: "image_"id"_2_whole"; \
+ description { \
+ state: "default" 0.0; \
+ visible: 1; \
+ color: 255 255 255 0; \
+ rel1.to: "position_"id; \
+ rel2.to: "position_"id; \
+ } \
+ description { \
+ state: "fade_prev_next" 0.0; \
+ inherit: "default" 0.0; \
+ color: 255 255 255 255; \
+ } \
+ description { \
+ state: "black_fade_prev_next_init" 0.0; \
+ inherit: "default" 0.0; \
+ color: 0 0 0 0; \
+ } \
+ description { \
+ state: "black_fade_prev_next" 0.0; \
+ inherit: "default" 0.0; \
+ color: 255 255 255 255; \
+ } \
+ description { \
+ state: "horizontal_next_init" 0.0; \
+ inherit: "default" 0.0; \
+ rel1.relative: 1.0 0.0; \
+ rel2.relative: 2.0 1.0; \
+ color: 255 255 255 255; \
+ } \
+ description { \
+ state: "horizontal_next" 0.0; \
+ inherit: "default" 0.0; \
+ color: 255 255 255 255; \
+ } \
+ description { \
+ state: "horizontal_prev_init" 0.0; \
+ inherit: "default" 0.0; \
+ rel1.relative: -1.0 0.0; \
+ rel2.relative: 0.0 1.0; \
+ color: 255 255 255 255; \
+ } \
+ description { \
+ state: "horizontal_prev" 0.0; \
+ inherit: "default" 0.0; \
+ color: 255 255 255 255; \
+ } \
+ description { \
+ state: "vertical_next_init" 0.0; \
+ inherit: "default" 0.0; \
+ rel1.relative: 0.0 1.0; \
+ rel2.relative: 1.0 2.0; \
+ color: 255 255 255 255; \
+ } \
+ description { \
+ state: "vertical_next" 0.0; \
+ inherit: "default" 0.0; \
+ color: 255 255 255 255; \
+ } \
+ description { \
+ state: "vertical_prev_init" 0.0; \
+ inherit: "default" 0.0; \
+ rel1.relative: 0.0 -1.0; \
+ rel2.relative: 1.0 0.0; \
+ color: 255 255 255 255; \
+ } \
+ description { \
+ state: "vertical_prev" 0.0; \
+ inherit: "default" 0.0; \
+ color: 255 255 255 255; \
+ } \
+ description { \
+ state: "square_prev_next_init" 0.0; \
+ inherit: "default" 0.0; \
+ rel1.relative: 0.5 0.5; \
+ rel2.relative: 0.5 0.5; \
+ color: 255 255 255 255; \
+ } \
+ description { \
+ state: "square_prev_next" 0.0; \
+ inherit: "default" 0.0; \
+ rel1.relative: 0.0 0.0; \
+ rel2.relative: 1.0 1.0; \
+ color: 255 255 255 255; \
+ } \
+ } \
+ part { name: "elm.swallow."id".1"; \
+ type: SWALLOW; \
+ clip_to: "image_"id"_1_whole"; \
+ description { \
+ state: "default" 0.0; \
+ rel1.to: "image_"id"_1_whole"; \
+ rel2.to: "image_"id"_1_whole"; \
+ color: 255 255 255 255; \
+ } \
+ description { \
+ state: "not_fullscreen" 0.0; \
+ rel1.relative: 0.1 0.1; \
+ rel1.to: "image_"id"_1_whole"; \
+ rel2.relative: 0.9 0.9; \
+ rel2.to: "image_"id"_1_whole"; \
+ color: 255 255 255 255; \
+ } \
+ description { \
+ state: "expose" 0.0; \
+ inherit: "default" 0.0; \
+ } \
+ } \
+ part { name: "elm.swallow."id".2"; \
+ type: SWALLOW; \
+ clip_to: "image_"id"_2_whole"; \
+ description { \
+ state: "default" 0.0; \
+ color: 255 255 255 255; \
+ rel1.to: "image_"id"_2_whole"; \
+ rel2.to: "image_"id"_2_whole"; \
+ } \
+ description { \
+ state: "not_fullscreen" 0.0; \
+ color: 255 255 255 255; \
+ rel1.relative: 0.1 0.1; \
+ rel1.to: "image_"id"_2_whole"; \
+ rel2.relative: 0.9 0.9; \
+ rel2.to: "image_"id"_2_whole"; \
+ } \
+ description { \
+ state: "expose" 0.0; \
+ inherit: "default" 0.0; \
+ } \
+ }
+
group { name: "elm/slideshow/base/default";
data {
item: transitions "fade black_fade horizontal vertical square";
- item: layouts "fullscreen not_fullscreen";
+ item: layouts "fullscreen not_fullscreen expose";
+ item: expose 2;
}
parts {
part { name: "whole";
color: 20 20 20 255;
}
}
- part { name: "image_1_whole";
- description {
- state: "default" 0.0;
- color: 255 255 255 255;
- }
- description {
- state: "fade_prev_next" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 0;
- }
- description {
- state: "black_fade_prev_next_init" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 255;
- }
- description {
- state: "black_fade_prev_next" 0.0;
- inherit: "default" 0.0;
- color: 0 0 0 255;
- }
- description {
- state: "horizontal_next_init" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "horizontal_next" 0.0;
- inherit: "default" 0.0;
- rel1.relative: -1.0 0.0;
- rel2.relative: 0.0 1.0;
- }
- description {
- state: "horizontal_prev_init" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "horizontal_prev" 0.0;
- inherit: "default" 0.0;
- rel1.relative: 1.0 0.0;
- rel2.relative: 2.0 1.0;
- }
- description {
- state: "vertical_next_init" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "vertical_next" 0.0;
- inherit: "default" 0.0;
- rel1.relative: 0.0 -1.0;
- rel2.relative: 1.0 0.0;
- }
- description {
- state: "vertical_prev_init" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "vertical_prev" 0.0;
- inherit: "default" 0.0;
- rel1.relative: 0.0 1.0;
- rel2.relative: 1.0 2.0;
- }
- }
- part { name: "image_2_whole";
- description {
- state: "default" 0.0;
- visible: 1;
- color: 255 255 255 0;
- }
- description {
- state: "fade_prev_next" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 255;
- }
- description {
- state: "black_fade_prev_next_init" 0.0;
- inherit: "default" 0.0;
- color: 0 0 0 0;
- }
- description {
- state: "black_fade_prev_next" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 255;
- }
- description {
- state: "horizontal_next_init" 0.0;
- inherit: "default" 0.0;
- rel1.relative: 1.0 0.0;
- rel2.relative: 2.0 1.0;
- color: 255 255 255 255;
- }
- description {
- state: "horizontal_next" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 255;
- }
- description {
- state: "horizontal_prev_init" 0.0;
- inherit: "default" 0.0;
- rel1.relative: -1.0 0.0;
- rel2.relative: 0.0 1.0;
- color: 255 255 255 255;
- }
- description {
- state: "horizontal_prev" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 255;
- }
- description {
- state: "vertical_next_init" 0.0;
- inherit: "default" 0.0;
- rel1.relative: 0.0 1.0;
- rel2.relative: 1.0 2.0;
- color: 255 255 255 255;
- }
- description {
- state: "vertical_next" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 255;
- }
- description {
- state: "vertical_prev_init" 0.0;
- inherit: "default" 0.0;
- rel1.relative: 0.0 -1.0;
- rel2.relative: 1.0 0.0;
- color: 255 255 255 255;
- }
- description {
- state: "vertical_prev" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 255;
- }
- description {
- state: "square_prev_next_init" 0.0;
- inherit: "default" 0.0;
- rel1.relative: 0.5 0.5;
- rel2.relative: 0.5 0.5;
- color: 255 255 255 255;
- }
- description {
- state: "square_prev_next" 0.0;
- inherit: "default" 0.0;
- rel1.relative: 0.0 0.0;
- rel2.relative: 1.0 1.0;
- color: 255 255 255 255;
- }
- }
- part { name: "elm.swallow.1";
- type: SWALLOW;
- clip_to: "image_1_whole";
- description {
- state: "default" 0.0;
- rel1.to: "image_1_whole";
- rel2.to: "image_1_whole";
- color: 255 255 255 255;
- }
- description {
- state: "not_fullscreen" 0.0;
- rel1.relative: 0.1 0.1;
- rel1.to: "image_1_whole";
- rel2.relative: 0.9 0.9;
- rel2.to: "image_1_whole";
- color: 255 255 255 255;
- }
- }
- part { name: "elm.swallow.2";
- type: SWALLOW;
- clip_to: "image_2_whole";
- description {
- state: "default" 0.0;
- color: 255 255 255 255;
- rel1.to: "image_2_whole";
- rel2.to: "image_2_whole";
- }
- description {
- state: "not_fullscreen" 0.0;
- color: 255 255 255 255;
- rel1.relative: 0.1 0.1;
- rel1.to: "image_2_whole";
- rel2.relative: 0.9 0.9;
- rel2.to: "image_2_whole";
- }
- }
+ part { name: "position_0";
+ description {
+ state: "default" 0.0;
+ }
+ description {
+ state: "not_fullscreen" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "expose" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 0.4 0.4;
+ rel2.relative: 0.6 0.6;
+ }
+ }
+ part { name: "position_-2";
+ description {
+ state: "default" 0.0;
+ rel1.relative: 0.0 1.0;
+ rel2.relative: 0.2 1.2;
+ }
+ description {
+ state: "not_fullscreen" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "expose" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 0.0 0.4;
+ rel2.relative: 0.2 0.6;
+ }
+ }
+ part { name: "position_-1";
+ description {
+ state: "default" 0.0;
+ rel1.relative: 0.2 -0.2;
+ rel2.relative: 0.4 0.0;
+ }
+ description {
+ state: "not_fullscreen" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "expose" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 0.2 0.4;
+ rel2.relative: 0.4 0.6;
+ }
+ }
+ part { name: "position_1";
+ description {
+ state: "default" 0.0;
+ rel1.relative: 0.6 1.0;
+ rel2.relative: 0.8 1.2;
+ }
+ description {
+ state: "not_fullscreen" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "expose" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 0.6 0.4;
+ rel2.relative: 0.8 0.6;
+ }
+ }
+ part { name: "position_2";
+ description {
+ state: "default" 0.0;
+ rel1.relative: 0.8 -0.2;
+ rel2.relative: 1.0 0.0;
+ }
+ description {
+ state: "not_fullscreen" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "expose" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 0.8 0.4;
+ rel2.relative: 1.0 0.6;
+ }
+ }
+ elm_slideshow_item_add(-2);
+ elm_slideshow_item_add(-1);
+ elm_slideshow_item_add(0);
+ elm_slideshow_item_add(1);
+ elm_slideshow_item_add(2);
+
part { name: "events_catcher";
type: RECT;
repeat_events: 1;
}
}
programs {
- //Substyle
- program { name: "layout_fullscreen";
+ //Layout
+ program { name: "layout_fullscreen";
signal: "layout,fullscreen";
source: "slideshow";
action: STATE_SET "default" 0.0;
- target: "elm.swallow.1";
- target: "elm.swallow.2";
+ target: "elm.swallow.0.1";
+ target: "elm.swallow.0.2";
+ target: "elm.swallow.-1.1";
+ target: "elm.swallow.-1.2";
+ target: "elm.swallow.1.1";
+ target: "elm.swallow.1.2";
+ target: "elm.swallow.-2.1";
+ target: "elm.swallow.-2.2";
+ target: "elm.swallow.2.1";
+ target: "elm.swallow.2.2";
+ target: "position_0";
+ target: "position_-1";
+ target: "position_1";
+ target: "position_-2";
+ target: "position_2";
transition: SINUSOIDAL 1.0;
- }
- program { name: "layout_not_fullscreen";
+ }
+ program { name: "layout_not_fullscreen";
signal: "layout,not_fullscreen";
source: "slideshow";
action: STATE_SET "not_fullscreen" 0.0;
- target: "elm.swallow.1";
- target: "elm.swallow.2";
+ target: "elm.swallow.0.1";
+ target: "elm.swallow.0.2";
+ target: "elm.swallow.-1.1";
+ target: "elm.swallow.-1.2";
+ target: "elm.swallow.1.1";
+ target: "elm.swallow.1.2";
+ target: "elm.swallow.-2.1";
+ target: "elm.swallow.-2.2";
+ target: "elm.swallow.2.1";
+ target: "elm.swallow.2.2";
+ target: "position_0";
+ target: "position_-1";
+ target: "position_1";
+ target: "position_-2";
+ target: "position_2";
transition: SINUSOIDAL 1.0;
- }
- //
+ }
+ program { name: "layout_expose";
+ signal: "layout,expose";
+ source: "slideshow";
+ action: STATE_SET "expose" 0.0;
+ target: "elm.swallow.0.1";
+ target: "elm.swallow.0.2";
+ target: "elm.swallow.-1.1";
+ target: "elm.swallow.-1.2";
+ target: "elm.swallow.1.1";
+ target: "elm.swallow.1.2";
+ target: "elm.swallow.-2.1";
+ target: "elm.swallow.-2.2";
+ target: "elm.swallow.2.1";
+ target: "elm.swallow.2.2";
+ target: "position_0";
+ target: "position_-1";
+ target: "position_1";
+ target: "position_-2";
+ target: "position_2";
+ transition: SINUSOIDAL 1.0;
+ }
+ //
program { name: "fade_next";
signal: "fade,next";
source: "slideshow";
action: STATE_SET "default" 0.0;
- target: "image_1_whole";
- target: "image_2_whole";
+ target: "image_0_1_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_1_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_1_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_1_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_1_whole";
+ target: "image_2_2_whole";
after: "fade_next_2";
}
program { name: "fade_next_2";
action: STATE_SET "fade_prev_next" 0.0;
- target: "image_1_whole";
- target: "image_2_whole";
+ target: "image_0_1_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_1_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_1_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_1_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_1_whole";
+ target: "image_2_2_whole";
transition: SINUSOIDAL 1.5;
after: "end";
}
signal: "fade,previous";
source: "slideshow";
action: STATE_SET "default" 0.0;
- target: "image_1_whole";
- target: "image_2_whole";
+ target: "image_0_1_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_1_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_1_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_1_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_1_whole";
+ target: "image_2_2_whole";
after: "fade_previous_2";
}
program { name: "fade_previous_2";
action: STATE_SET "fade_prev_next" 0.0;
- target: "image_1_whole";
- target: "image_2_whole";
+ target: "image_0_1_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_1_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_1_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_1_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_1_whole";
+ target: "image_2_2_whole";
transition: SINUSOIDAL 1.5;
after: "end";
}
signal: "black_fade,next";
source: "slideshow";
action: STATE_SET "black_fade_prev_next_init" 0.0;
- target: "image_1_whole";
- target: "image_2_whole";
+ target: "image_0_1_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_1_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_1_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_1_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_1_whole";
+ target: "image_2_2_whole";
after: "black_fade_next_2";
}
program { name: "black_fade_next_2";
action: STATE_SET "black_fade_prev_next" 0.0;
- target: "image_1_whole";
+ target: "image_0_1_whole";
+ target: "image_-1_1_whole";
+ target: "image_1_1_whole";
+ target: "image_-2_1_whole";
+ target: "image_2_1_whole";
transition: SINUSOIDAL 0.75;
after: "black_fade_next_3";
}
program { name: "black_fade_next_3";
action: STATE_SET "black_fade_prev_next" 0.0;
- target: "image_2_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_2_whole";
transition: SINUSOIDAL 0.75;
after: "end";
}
signal: "black_fade,previous";
source: "slideshow";
action: STATE_SET "black_fade_prev_next_init" 0.0;
- target: "image_1_whole";
- target: "image_2_whole";
+ target: "image_0_1_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_1_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_1_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_1_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_1_whole";
+ target: "image_2_2_whole";
after: "black_fade_previous_2";
}
program { name: "black_fade_previous_2";
action: STATE_SET "black_fade_prev_next" 0.0;
- target: "image_1_whole";
+ target: "image_0_1_whole";
+ target: "image_-1_1_whole";
+ target: "image_1_1_whole";
+ target: "image_-2_1_whole";
+ target: "image_2_1_whole";
transition: SINUSOIDAL 0.75;
after: "black_fade_previous_3";
}
program { name: "black_fade_previous_3";
action: STATE_SET "black_fade_prev_next" 0.0;
- target: "image_2_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_2_whole";
transition: SINUSOIDAL 0.75;
after: "end";
}
signal: "horizontal,next";
source: "slideshow";
action: STATE_SET "horizontal_next_init" 0.0;
- target: "image_1_whole";
- target: "image_2_whole";
+ target: "image_0_1_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_1_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_1_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_1_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_1_whole";
+ target: "image_2_2_whole";
after: "horizontal_next_2";
}
program { name: "horizontal_next_2";
action: STATE_SET "horizontal_next" 0.0;
- target: "image_1_whole";
- target: "image_2_whole";
+ target: "image_0_1_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_1_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_1_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_1_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_1_whole";
+ target: "image_2_2_whole";
transition: SINUSOIDAL 1.5;
after: "end";
}
signal: "horizontal,previous";
source: "slideshow";
action: STATE_SET "horizontal_prev_init" 0.0;
- target: "image_1_whole";
- target: "image_2_whole";
+ target: "image_0_1_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_1_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_1_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_1_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_1_whole";
+ target: "image_2_2_whole";
after: "horizontal_previous_2";
}
program { name: "horizontal_previous_2";
action: STATE_SET "horizontal_prev" 0.0;
- target: "image_1_whole";
- target: "image_2_whole";
+ target: "image_0_1_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_1_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_1_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_1_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_1_whole";
+ target: "image_2_2_whole";
transition: SINUSOIDAL 1.5;
after: "end";
}
signal: "vertical,next";
source: "slideshow";
action: STATE_SET "vertical_next_init" 0.0;
- target: "image_1_whole";
- target: "image_2_whole";
+ target: "image_0_1_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_1_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_1_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_1_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_1_whole";
+ target: "image_2_2_whole";
after: "vertical_next_2";
}
program { name: "vertical_next_2";
action: STATE_SET "vertical_next" 0.0;
- target: "image_1_whole";
- target: "image_2_whole";
+ target: "image_0_1_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_1_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_1_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_1_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_1_whole";
+ target: "image_2_2_whole";
transition: SINUSOIDAL 1.5;
after: "end";
}
signal: "vertical,previous";
source: "slideshow";
action: STATE_SET "vertical_prev_init" 0.0;
- target: "image_1_whole";
- target: "image_2_whole";
+ target: "image_0_1_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_1_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_1_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_1_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_1_whole";
+ target: "image_2_2_whole";
after: "vertical_previous_2";
}
program { name: "vertical_previous_2";
action: STATE_SET "vertical_prev" 0.0;
- target: "image_1_whole";
- target: "image_2_whole";
+ target: "image_0_1_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_1_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_1_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_1_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_1_whole";
+ target: "image_2_2_whole";
transition: SINUSOIDAL 1.5;
after: "end";
}
signal: "square,next";
source: "slideshow";
action: STATE_SET "square_prev_next_init" 0.0;
- target: "image_2_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_2_whole";
after: "square_next_2";
}
program { name: "square_next_2";
action: STATE_SET "square_prev_next" 0.0;
- target: "image_2_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_2_whole";
transition: SINUSOIDAL 1.5;
after: "end";
}
signal: "square,previous";
source: "slideshow";
action: STATE_SET "square_prev_next_init" 0.0;
- target: "image_2_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_2_whole";
after: "square_next_2";
}
program { name: "end";
action: SIGNAL_EMIT "end" "slideshow";
}
program { name: "end_signal";
- signal: "anim,end";
- source: "slideshow";
+ signal: "anim,end";
+ source: "slideshow";
action: STATE_SET "default" 0.0;
- target: "image_1_whole";
- target: "image_2_whole";
+ target: "image_0_1_whole";
+ target: "image_0_2_whole";
+ target: "image_-1_1_whole";
+ target: "image_-1_2_whole";
+ target: "image_1_1_whole";
+ target: "image_1_2_whole";
+ target: "image_-2_1_whole";
+ target: "image_-2_2_whole";
+ target: "image_2_1_whole";
+ target: "image_2_2_whole";
}
}
}
const void *data;
const Elm_Slideshow_Item_Class *itc;
- Evas_Object *o;
+ Evas_Object *o, *o_2;
+};
+
+struct _Elm_Slideshow_Layout
+{
+ const char *name;
+ int nb_items;
};
struct _Widget_Data
Eina_Bool loop:1;
struct {
- const char *current;
- Eina_List *list; //list of const char *
+ const Elm_Slideshow_Layout *current;
+ const Elm_Slideshow_Layout *next;
+ Eina_List *list; //list of Elm_Slideshow_Layout
} layout;
};
static void
_del_hook(Evas_Object *obj)
{
+ Elm_Slideshow_Layout *layout;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
elm_slideshow_clear(obj);
_elm_stringlist_free(wd->transitions);
if (wd->timer) ecore_timer_del(wd->timer);
- _elm_stringlist_free(wd->layout.list);
+ EINA_LIST_FREE(wd->layout.list, layout)
+ {
+ eina_stringshare_del(layout->name);
+ free(layout);
+ }
free(wd);
}
evas_object_size_hint_max_set(obj, minw, minh);
}
+
+static Elm_Slideshow_Item* _item_prev_get(Elm_Slideshow_Item* item)
+{
+ Widget_Data *wd = elm_widget_data_get(item->obj);
+ Elm_Slideshow_Item* prev = eina_list_data_get(eina_list_prev(item->l));
+ if(!prev && wd->loop)
+ prev = eina_list_data_get(eina_list_last(item->l));
+ return prev;
+}
+static Elm_Slideshow_Item* _item_next_get(Elm_Slideshow_Item* item)
+{
+ Widget_Data *wd = elm_widget_data_get(item->obj);
+ Elm_Slideshow_Item* next = eina_list_data_get(eina_list_next(item->l));
+ if(!next && wd->loop)
+ next = eina_list_data_get(wd->items);
+ return next;
+}
+
+
static void
_changed_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
}
static void
-_end(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
+_item_realize(Elm_Slideshow_Item *item, int num)
{
- Elm_Slideshow_Item *item;
- Widget_Data *wd = elm_widget_data_get(data);
- if (!wd) return;
- item = wd->previous;
- if (item && item->o)
- {
- edje_object_part_unswallow(NULL, item->o);
- evas_object_hide(item->o);
- }
- wd->previous = NULL;
+ Elm_Slideshow_Item *_item;
+ Evas_Object *obj = item->obj;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Coord w, h;
+
+ if (!wd) return;
+
+ if(num == 1)
+ {
+ if (!item->o && item->itc->func.get)
+ {
+ item->o = item->itc->func.get((void*)item->data, obj);
+ evas_object_smart_member_add(item->o, obj);
+ item->l_built = eina_list_append(NULL, item);
+ wd->items_built = eina_list_merge(wd->items_built, item->l_built);
+ evas_object_hide(item->o);
+ }
+ else if (item->l_built)
+ wd->items_built = eina_list_demote_list(wd->items_built, item->l_built);
+ }
+ else //num == 2
+ {
+ if (!item->o_2 && item->itc->func.get)
+ {
+ item->o_2 = item->itc->func.get((void*)item->data, obj);
+ evas_object_smart_member_add(item->o_2, obj);
+ evas_object_hide(item->o_2);
+ }
+ }
+
+ //delete unused items
+ while (eina_list_count(wd->items_built) > 5 + wd->layout.current->nb_items * 2)
+ {
+ _item = eina_list_data_get(wd->items_built);
+ wd->items_built = eina_list_remove_list(wd->items_built, wd->items_built);
+ if(item->itc->func.del)
+ {
+ item->itc->func.del((void*)item->data, _item->o);
+ item->itc->func.del((void*)item->data, _item->o_2);
+ }
+ else
+ {
+ evas_object_del(_item->o);
+ evas_object_del(_item->o_2);
+ }
+ _item->o = NULL;
+ }
+}
+
+static void
+_layout_end(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
+{
+ Elm_Slideshow_Item *item;
+ Widget_Data *wd = elm_widget_data_get(data);
+ if (!wd) return;
+
+ wd->layout.current = wd->layout.next;
+}
- item = wd->current;
- if (!item || !item->o) return;
+static void
+_first_last_get(Evas_Object *obj, Elm_Slideshow_Item *current, Elm_Slideshow_Item **_first, Elm_Slideshow_Item **_last)
+{
+ Elm_Slideshow_Item *first, *last;
+ int i;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+
+ last = current;
+ first = current;
+
+ Eina_Bool loop_1 = EINA_TRUE;
+ for(i = 0 - wd->layout.current->nb_items; i < 0 && first; i++)
+ {
+ if(!loop_1 && first == current)
+ break;
+ first = _item_prev_get(first);
+ loop_1 = EINA_FALSE;
+ }
+
+ loop_1 = EINA_TRUE;
+ for(i = 0; i < wd->layout.current->nb_items && last; i++)
+ {
+ if(!loop_1 && last == current)
+ break;
+ last = _item_next_get(last);
+ loop_1 = EINA_FALSE;
+ }
+
+ *_first = first;
+ *_last = last;
+}
- edje_object_part_unswallow(NULL, item->o);
- evas_object_show(item->o);
- edje_object_signal_emit(wd->slideshow, "anim,end", "slideshow");
- edje_object_part_swallow(wd->slideshow, "elm.swallow.1", item->o);
+static void
+_end(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
+{
+ char buf[PATH_MAX];
+ int i;
+ Elm_Slideshow_Item *item, *first, *last;
+ Widget_Data *wd = elm_widget_data_get(data);
+ if (!wd) return;
+
+ if(wd->previous)
+ {
+ _first_last_get(data, wd->previous, &first, &last);
+ while(1)
+ {
+ edje_object_part_unswallow(NULL, first->o);
+ evas_object_hide(first->o);
+
+ if(first == last)
+ break;
+ first = _item_next_get(first);
+ if(!first)
+ first = eina_list_data_get(wd->items);
+ }
+ wd->previous = NULL;
+ }
+
+
+ item = wd->current;
+ if (!item || !item->o) return;
+
+ _first_last_get(data, wd->current, &first, &last);
+ i = 0 - wd->layout.current->nb_items;
+ while(1)
+ {
+ _item_realize(first, 1);
+ edje_object_part_unswallow(NULL, first->o_2);
+ evas_object_hide(first->o_2);
+ edje_object_part_unswallow(NULL, first->o);
+ evas_object_show(first->o);
+ edje_object_signal_emit(wd->slideshow, "anim,end", "slideshow");
+ snprintf(buf, sizeof(buf), "elm.swallow.%d.1", i);
+ edje_object_part_swallow(wd->slideshow, buf, first->o);
+
+
+ if(first == last)
+ break;
+ first = _item_next_get(first);
+ if(!first)
+ first = eina_list_data_get(wd->items);
+ i++;
+ }
}
return ECORE_CALLBACK_CANCEL;
}
-static void
-_item_realize(Elm_Slideshow_Item *item)
-{
- Elm_Slideshow_Item *_item;
- Evas_Object *obj = item->obj;
- Widget_Data *wd = elm_widget_data_get(obj);
- Evas_Coord w, h;
- if (!wd) return;
- if (!item->o && item->itc->func.get)
- {
- item->o = item->itc->func.get((void*)item->data, obj);
- evas_object_smart_member_add(item->o, obj);
- item->l_built = eina_list_append(NULL, item);
- wd->items_built = eina_list_merge(wd->items_built, item->l_built);
- }
- else if (item->l_built)
- wd->items_built = eina_list_demote_list(wd->items_built, item->l_built);
-
- //we pre built the next and the previous item
- evas_object_geometry_get(obj, NULL, NULL, &w, &h);
-
- _item = eina_list_data_get(eina_list_prev(item->l));
- if (!_item && wd->loop)
- _item = eina_list_data_get(eina_list_last(item->l));
- if (_item && !_item->o && _item->itc->func.get)
- {
- _item->o = _item->itc->func.get((void*)_item->data, obj);
- evas_object_hide(_item->o);
- evas_object_resize(_item->o, w, h);
- evas_object_smart_member_add(_item->o, obj);
- _item->l_built = eina_list_append(NULL, _item);
- wd->items_built = eina_list_merge(wd->items_built, _item->l_built);
- }
- else if (_item && _item->l_built)
- wd->items_built = eina_list_demote_list(wd->items_built, _item->l_built);
-
-
- _item = eina_list_data_get(eina_list_next(item->l));
- if ( !_item && wd->loop)
- _item = eina_list_data_get(wd->items);
- if (_item && !_item->o && _item->itc->func.get)
- {
- _item->o = _item->itc->func.get((void*)_item->data, obj);
- evas_object_hide(_item->o);
- evas_object_resize(_item->o, w, h);
- evas_object_smart_member_add(_item->o, obj);
- _item->l_built = eina_list_append(NULL, _item);
- wd->items_built = eina_list_merge(wd->items_built, _item->l_built);
- }
- else if (_item && _item->l_built)
- wd->items_built = eina_list_demote_list(wd->items_built, _item->l_built);
-
- //only the three last items are keep
- while (eina_list_count(wd->items_built) > 3)
- {
- _item = eina_list_data_get(wd->items_built);
- wd->items_built = eina_list_remove_list(wd->items_built, wd->items_built);
- if(item->itc->func.del)
- item->itc->func.del((void*)item->data, _item->o);
- else
- evas_object_del(_item->o);
- _item->o = NULL;
- }
-}
/**
* Add a new slideshow to the parent
EAPI Evas_Object *
elm_slideshow_add(Evas_Object *parent)
{
+ Eina_List *layouts, *l;
+ const char *s;
Evas_Object *obj;
Evas *e;
Widget_Data *wd;
wd->slideshow = edje_object_add(e);
_elm_theme_object_set(obj, wd->slideshow, "slideshow", "base", "default");
+ evas_object_smart_member_add(wd->slideshow, obj);
elm_widget_resize_object_set(obj, wd->slideshow);
evas_object_show(wd->slideshow);
if (eina_list_count(wd->transitions) > 0)
wd->transition = eina_stringshare_add(eina_list_data_get(wd->transitions));
- wd->layout.list = _elm_stringlist_get(edje_object_data_get(wd->slideshow, "layouts"));
- if (eina_list_count(wd->layout.list) > 0)
- wd->layout.current = eina_stringshare_add(eina_list_data_get(wd->layout.list));
+ layouts = _elm_stringlist_get(edje_object_data_get(wd->slideshow, "layouts"));
+ EINA_LIST_FOREACH(layouts, l, s)
+ {
+ Elm_Slideshow_Layout* layout = calloc(1, sizeof(Elm_Slideshow_Layout));
+ layout->name = eina_stringshare_add(s);
+ const char *n = edje_object_data_get(wd->slideshow, s);
+ if(n)
+ {
+ int i = atoi(n);
+ layout->nb_items = i;
+ }
+ else
+ layout->nb_items = 0;
+ wd->layout.list = eina_list_append(wd->layout.list, layout);
+ }
+ _elm_stringlist_free(layouts);
+ if (eina_list_count(wd->layout.list) > 0)
+ wd->layout.current = eina_list_data_get(wd->layout.list);
edje_object_signal_callback_add(wd->slideshow, "end", "slideshow", _end, obj);
+ edje_object_signal_callback_add(wd->slideshow, "layout,end", "slideshow", _layout_end, obj);
evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
evas_object_event_callback_add(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj);
wd->previous = wd->current;
wd->current = item;
- _item_realize(item);
+ _item_realize(item, 1);
_end(item->obj, item->obj, NULL, NULL);
}
elm_slideshow_next(Evas_Object *obj)
{
char buf[1024];
- Elm_Slideshow_Item *next = NULL;
+ int i;
+ Elm_Slideshow_Item *next = NULL, *first, *last;
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->current)
- next = eina_list_data_get(eina_list_next(wd->current->l));
- else
- next = NULL;
-
- if (wd->current && !next && wd->loop)
- next = eina_list_data_get(wd->items);
+ next = _item_next_get(wd->current);
if (!next || next == wd->current) return;
+
_end(obj, obj, NULL, NULL);
if (wd->timer) ecore_timer_del(wd->timer);
if (wd->timeout > 0)
wd->timer = ecore_timer_add(wd->timeout, _timer_cb, obj);
-
- _item_realize(next);
- edje_object_part_swallow(wd->slideshow, "elm.swallow.2", next->o);
- evas_object_show(next->o);
-
- snprintf(buf, 1024, "%s,next", wd->transition);
+
+ _first_last_get(obj, next, &first, &last);
+
+ i = 0 - wd->layout.current->nb_items;
+ while(1)
+ {
+ _item_realize(first, 2);
+
+ snprintf(buf, sizeof(buf), "elm.swallow.%d.2", i);
+ edje_object_part_swallow(wd->slideshow, buf, first->o_2);
+ evas_object_show(first->o_2);
+
+
+ if(first == last)
+ break;
+ first = _item_next_get(first);
+ if(!first)
+ first = eina_list_data_get(wd->items);
+ i++;
+ }
+
+ snprintf(buf, sizeof(buf), "%s,next", wd->transition);
edje_object_signal_emit(wd->slideshow, buf, "slideshow");
wd->previous = wd->current;
elm_slideshow_previous(Evas_Object *obj)
{
char buf[1024];
- Elm_Slideshow_Item *prev;
+ Elm_Slideshow_Item *prev = NULL, *first, *last;
+ int i;
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->current)
- prev = eina_list_data_get(eina_list_prev(wd->current->l));
- else
- prev = NULL;
-
- if (wd->current && !prev && wd->loop)
- prev = eina_list_data_get(eina_list_last(wd->items));
+ prev = _item_prev_get(wd->current);
if (!prev || prev == wd->current) return;
if (wd->timeout > 0)
wd->timer = ecore_timer_add(wd->timeout, _timer_cb, obj);
- _item_realize(prev);
-
- edje_object_part_swallow(wd->slideshow, "elm.swallow.2", prev->o);
- evas_object_show(prev->o);
+ _first_last_get(obj, prev, &first, &last);
+
+ i = 0 - wd->layout.current->nb_items;
+ while(1)
+ {
+ _item_realize(first, 2);
+
+ snprintf(buf, sizeof(buf), "elm.swallow.%d.2", i);
+ edje_object_part_swallow(wd->slideshow, buf, first->o_2);
+ evas_object_show(first->o_2);
+
+
+ if(first == last)
+ break;
+ first = _item_next_get(first);
+ if(!first)
+ first = eina_list_data_get(wd->items);
+ i++;
+ }
+
snprintf(buf, 1024, "%s,previous", wd->transition);
edje_object_signal_emit(wd->slideshow, buf, "slideshow");
* Returns the list of layouts available.
*
* @param obj The slideshow object
- * @return Returns the list of layout (list of const char*)
+ * @return Returns the list of layout (list of const Elm_Slideshow_Layout*)
*
* @ingroup Slideshow
*/
*
* @ingroup Slideshow
*/
-EAPI const char *
+EAPI const Elm_Slideshow_Layout *
elm_slideshow_layout_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
* @ingroup Slideshow
*/
EAPI void
-elm_slideshow_layout_set(Evas_Object *obj, const char *layout)
+elm_slideshow_layout_set(Evas_Object *obj, const Elm_Slideshow_Layout *layout)
{
char buf[PATH_MAX];
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- wd->layout.current = eina_stringshare_add(layout);
- snprintf(buf, sizeof(buf), "layout,%s", wd->layout.current);
- edje_object_signal_emit(wd->slideshow, buf, "slideshow");
+ snprintf(buf, sizeof(buf), "layout,%s", layout->name);
+ if(wd->layout.current->nb_items > layout->nb_items)
+ {
+ wd->layout.next = layout;
+ edje_object_signal_emit(wd->slideshow, buf, "slideshow");
+ }
+ else
+ {
+ wd->layout.current = layout;
+ edje_object_signal_emit(wd->slideshow, buf, "slideshow");
+ }
+ _end(obj, NULL, NULL, NULL);
}
/**
EAPI void
elm_slideshow_clear(Evas_Object *obj)
{
- Elm_Slideshow_Item *item;
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- wd->previous = NULL;
- wd->current = NULL;
- EINA_LIST_FREE(wd->items_built, item)
- {
- if (item->itc->func.del)
- item->itc->func.del((void*)item->data, item->o);
- else
- evas_object_del(item->o);
- }
-
- EINA_LIST_FREE(wd->items, item)
- {
- free(item);
- }
+ Elm_Slideshow_Item *item;
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ wd->previous = NULL;
+ wd->current = NULL;
+ EINA_LIST_FREE(wd->items_built, item)
+ {
+ if (item->itc->func.del)
+ {
+ item->itc->func.del((void*)item->data, item->o);
+ item->itc->func.del((void*)item->data, item->o_2);
+ }
+ else
+ {
+ evas_object_del(item->o);
+ evas_object_del(item->o_2);
+ }
+ }
+
+ EINA_LIST_FREE(wd->items, item)
+ {
+ free(item);
+ }
}
EAPI void
elm_slideshow_item_del(Elm_Slideshow_Item *item)
{
- if (!item) return;
- Widget_Data *wd = elm_widget_data_get(item->obj);
- if (!wd) return;
- if (wd->previous == item) wd->previous = NULL;
- if (wd->current == item)
- {
- Eina_List *l = eina_list_data_find_list(wd->items, item);
- Eina_List *l2 = eina_list_next(l);
- wd->current = NULL;
- if (!l2)
- l2 = eina_list_nth_list(wd->items, eina_list_count(wd->items) - 1);
- if (l2)
- elm_slideshow_show(eina_list_data_get(l2));
- }
-
- wd->items = eina_list_remove_list(wd->items, item->l);
- wd->items_built = eina_list_remove_list(wd->items_built, item->l_built);
-
- if (item->o && item->itc->func.del)
- item->itc->func.del((void*)item->data, wd->previous->o);
- else if (item->o)
- evas_object_del(item->o);
- free(item);
+ if (!item) return;
+ Widget_Data *wd = elm_widget_data_get(item->obj);
+ if (!wd) return;
+ if (wd->previous == item) wd->previous = NULL;
+ if (wd->current == item)
+ {
+ Eina_List *l = eina_list_data_find_list(wd->items, item);
+ Eina_List *l2 = eina_list_next(l);
+ wd->current = NULL;
+ if (!l2)
+ l2 = eina_list_nth_list(wd->items, eina_list_count(wd->items) - 1);
+ if (l2)
+ elm_slideshow_show(eina_list_data_get(l2));
+ }
+
+ wd->items = eina_list_remove_list(wd->items, item->l);
+ wd->items_built = eina_list_remove_list(wd->items_built, item->l_built);
+
+ if (item->o && item->itc->func.del)
+ item->itc->func.del((void*)item->data, wd->previous->o);
+ else if (item->o)
+ evas_object_del(item->o);
+ free(item);
}
/**
return (void *)item->data;
}
-
+/**
+ * Returns the name of a layout
+ *
+ * @param layout the layout item
+ * @return Returns the name of the layout
+ *
+ * @ingroup Slideshow
+ */
+EAPI const char *
+elm_slideshow_layout_name_get(const Elm_Slideshow_Layout *layout)
+{
+ if (!layout) return NULL;
+ return layout->name;
+}