forked from enlightenment/efl
Elm_Slideshow:
- Add a new layout : expose - Add a way to display more than 1 slide at a time, the number of slides displayed is defined in the layout SVN revision: 50256
This commit is contained in:
parent
6005cc95e7
commit
3eaecdafbd
|
@ -8497,10 +8497,206 @@ collections {
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
#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";
|
group { name: "elm/slideshow/base/default";
|
||||||
data {
|
data {
|
||||||
item: transitions "fade black_fade horizontal vertical square";
|
item: transitions "fade black_fade horizontal vertical square";
|
||||||
item: layouts "fullscreen not_fullscreen";
|
item: layouts "fullscreen not_fullscreen expose";
|
||||||
|
item: expose 2;
|
||||||
}
|
}
|
||||||
parts {
|
parts {
|
||||||
part { name: "whole";
|
part { name: "whole";
|
||||||
|
@ -8511,187 +8707,95 @@ collections {
|
||||||
color: 20 20 20 255;
|
color: 20 20 20 255;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
part { name: "image_1_whole";
|
part { name: "position_0";
|
||||||
description {
|
description {
|
||||||
state: "default" 0.0;
|
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 {
|
description {
|
||||||
state: "not_fullscreen" 0.0;
|
state: "not_fullscreen" 0.0;
|
||||||
rel1.relative: 0.1 0.1;
|
inherit: "default" 0.0;
|
||||||
rel1.to: "image_1_whole";
|
}
|
||||||
rel2.relative: 0.9 0.9;
|
description {
|
||||||
rel2.to: "image_1_whole";
|
state: "expose" 0.0;
|
||||||
color: 255 255 255 255;
|
inherit: "default" 0.0;
|
||||||
|
rel1.relative: 0.4 0.4;
|
||||||
|
rel2.relative: 0.6 0.6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
part { name: "elm.swallow.2";
|
part { name: "position_-2";
|
||||||
type: SWALLOW;
|
|
||||||
clip_to: "image_2_whole";
|
|
||||||
description {
|
description {
|
||||||
state: "default" 0.0;
|
state: "default" 0.0;
|
||||||
color: 255 255 255 255;
|
rel1.relative: 0.0 1.0;
|
||||||
rel1.to: "image_2_whole";
|
rel2.relative: 0.2 1.2;
|
||||||
rel2.to: "image_2_whole";
|
|
||||||
}
|
}
|
||||||
description {
|
description {
|
||||||
state: "not_fullscreen" 0.0;
|
state: "not_fullscreen" 0.0;
|
||||||
color: 255 255 255 255;
|
inherit: "default" 0.0;
|
||||||
rel1.relative: 0.1 0.1;
|
}
|
||||||
rel1.to: "image_2_whole";
|
description {
|
||||||
rel2.relative: 0.9 0.9;
|
state: "expose" 0.0;
|
||||||
rel2.to: "image_2_whole";
|
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";
|
part { name: "events_catcher";
|
||||||
type: RECT;
|
type: RECT;
|
||||||
repeat_events: 1;
|
repeat_events: 1;
|
||||||
|
@ -8703,21 +8807,68 @@ collections {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
programs {
|
programs {
|
||||||
//Substyle
|
//Layout
|
||||||
program { name: "layout_fullscreen";
|
program { name: "layout_fullscreen";
|
||||||
signal: "layout,fullscreen";
|
signal: "layout,fullscreen";
|
||||||
source: "slideshow";
|
source: "slideshow";
|
||||||
action: STATE_SET "default" 0.0;
|
action: STATE_SET "default" 0.0;
|
||||||
target: "elm.swallow.1";
|
target: "elm.swallow.0.1";
|
||||||
target: "elm.swallow.2";
|
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;
|
transition: SINUSOIDAL 1.0;
|
||||||
}
|
}
|
||||||
program { name: "layout_not_fullscreen";
|
program { name: "layout_not_fullscreen";
|
||||||
signal: "layout,not_fullscreen";
|
signal: "layout,not_fullscreen";
|
||||||
source: "slideshow";
|
source: "slideshow";
|
||||||
action: STATE_SET "not_fullscreen" 0.0;
|
action: STATE_SET "not_fullscreen" 0.0;
|
||||||
target: "elm.swallow.1";
|
target: "elm.swallow.0.1";
|
||||||
target: "elm.swallow.2";
|
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;
|
transition: SINUSOIDAL 1.0;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -8725,14 +8876,30 @@ collections {
|
||||||
signal: "fade,next";
|
signal: "fade,next";
|
||||||
source: "slideshow";
|
source: "slideshow";
|
||||||
action: STATE_SET "default" 0.0;
|
action: STATE_SET "default" 0.0;
|
||||||
target: "image_1_whole";
|
target: "image_0_1_whole";
|
||||||
target: "image_2_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";
|
after: "fade_next_2";
|
||||||
}
|
}
|
||||||
program { name: "fade_next_2";
|
program { name: "fade_next_2";
|
||||||
action: STATE_SET "fade_prev_next" 0.0;
|
action: STATE_SET "fade_prev_next" 0.0;
|
||||||
target: "image_1_whole";
|
target: "image_0_1_whole";
|
||||||
target: "image_2_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;
|
transition: SINUSOIDAL 1.5;
|
||||||
after: "end";
|
after: "end";
|
||||||
}
|
}
|
||||||
|
@ -8740,14 +8907,30 @@ collections {
|
||||||
signal: "fade,previous";
|
signal: "fade,previous";
|
||||||
source: "slideshow";
|
source: "slideshow";
|
||||||
action: STATE_SET "default" 0.0;
|
action: STATE_SET "default" 0.0;
|
||||||
target: "image_1_whole";
|
target: "image_0_1_whole";
|
||||||
target: "image_2_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";
|
after: "fade_previous_2";
|
||||||
}
|
}
|
||||||
program { name: "fade_previous_2";
|
program { name: "fade_previous_2";
|
||||||
action: STATE_SET "fade_prev_next" 0.0;
|
action: STATE_SET "fade_prev_next" 0.0;
|
||||||
target: "image_1_whole";
|
target: "image_0_1_whole";
|
||||||
target: "image_2_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;
|
transition: SINUSOIDAL 1.5;
|
||||||
after: "end";
|
after: "end";
|
||||||
}
|
}
|
||||||
|
@ -8755,19 +8938,35 @@ collections {
|
||||||
signal: "black_fade,next";
|
signal: "black_fade,next";
|
||||||
source: "slideshow";
|
source: "slideshow";
|
||||||
action: STATE_SET "black_fade_prev_next_init" 0.0;
|
action: STATE_SET "black_fade_prev_next_init" 0.0;
|
||||||
target: "image_1_whole";
|
target: "image_0_1_whole";
|
||||||
target: "image_2_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";
|
after: "black_fade_next_2";
|
||||||
}
|
}
|
||||||
program { name: "black_fade_next_2";
|
program { name: "black_fade_next_2";
|
||||||
action: STATE_SET "black_fade_prev_next" 0.0;
|
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;
|
transition: SINUSOIDAL 0.75;
|
||||||
after: "black_fade_next_3";
|
after: "black_fade_next_3";
|
||||||
}
|
}
|
||||||
program { name: "black_fade_next_3";
|
program { name: "black_fade_next_3";
|
||||||
action: STATE_SET "black_fade_prev_next" 0.0;
|
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;
|
transition: SINUSOIDAL 0.75;
|
||||||
after: "end";
|
after: "end";
|
||||||
}
|
}
|
||||||
|
@ -8775,19 +8974,35 @@ collections {
|
||||||
signal: "black_fade,previous";
|
signal: "black_fade,previous";
|
||||||
source: "slideshow";
|
source: "slideshow";
|
||||||
action: STATE_SET "black_fade_prev_next_init" 0.0;
|
action: STATE_SET "black_fade_prev_next_init" 0.0;
|
||||||
target: "image_1_whole";
|
target: "image_0_1_whole";
|
||||||
target: "image_2_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";
|
after: "black_fade_previous_2";
|
||||||
}
|
}
|
||||||
program { name: "black_fade_previous_2";
|
program { name: "black_fade_previous_2";
|
||||||
action: STATE_SET "black_fade_prev_next" 0.0;
|
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;
|
transition: SINUSOIDAL 0.75;
|
||||||
after: "black_fade_previous_3";
|
after: "black_fade_previous_3";
|
||||||
}
|
}
|
||||||
program { name: "black_fade_previous_3";
|
program { name: "black_fade_previous_3";
|
||||||
action: STATE_SET "black_fade_prev_next" 0.0;
|
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;
|
transition: SINUSOIDAL 0.75;
|
||||||
after: "end";
|
after: "end";
|
||||||
}
|
}
|
||||||
|
@ -8795,14 +9010,30 @@ collections {
|
||||||
signal: "horizontal,next";
|
signal: "horizontal,next";
|
||||||
source: "slideshow";
|
source: "slideshow";
|
||||||
action: STATE_SET "horizontal_next_init" 0.0;
|
action: STATE_SET "horizontal_next_init" 0.0;
|
||||||
target: "image_1_whole";
|
target: "image_0_1_whole";
|
||||||
target: "image_2_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";
|
after: "horizontal_next_2";
|
||||||
}
|
}
|
||||||
program { name: "horizontal_next_2";
|
program { name: "horizontal_next_2";
|
||||||
action: STATE_SET "horizontal_next" 0.0;
|
action: STATE_SET "horizontal_next" 0.0;
|
||||||
target: "image_1_whole";
|
target: "image_0_1_whole";
|
||||||
target: "image_2_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;
|
transition: SINUSOIDAL 1.5;
|
||||||
after: "end";
|
after: "end";
|
||||||
}
|
}
|
||||||
|
@ -8810,14 +9041,30 @@ collections {
|
||||||
signal: "horizontal,previous";
|
signal: "horizontal,previous";
|
||||||
source: "slideshow";
|
source: "slideshow";
|
||||||
action: STATE_SET "horizontal_prev_init" 0.0;
|
action: STATE_SET "horizontal_prev_init" 0.0;
|
||||||
target: "image_1_whole";
|
target: "image_0_1_whole";
|
||||||
target: "image_2_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";
|
after: "horizontal_previous_2";
|
||||||
}
|
}
|
||||||
program { name: "horizontal_previous_2";
|
program { name: "horizontal_previous_2";
|
||||||
action: STATE_SET "horizontal_prev" 0.0;
|
action: STATE_SET "horizontal_prev" 0.0;
|
||||||
target: "image_1_whole";
|
target: "image_0_1_whole";
|
||||||
target: "image_2_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;
|
transition: SINUSOIDAL 1.5;
|
||||||
after: "end";
|
after: "end";
|
||||||
}
|
}
|
||||||
|
@ -8825,14 +9072,30 @@ collections {
|
||||||
signal: "vertical,next";
|
signal: "vertical,next";
|
||||||
source: "slideshow";
|
source: "slideshow";
|
||||||
action: STATE_SET "vertical_next_init" 0.0;
|
action: STATE_SET "vertical_next_init" 0.0;
|
||||||
target: "image_1_whole";
|
target: "image_0_1_whole";
|
||||||
target: "image_2_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";
|
after: "vertical_next_2";
|
||||||
}
|
}
|
||||||
program { name: "vertical_next_2";
|
program { name: "vertical_next_2";
|
||||||
action: STATE_SET "vertical_next" 0.0;
|
action: STATE_SET "vertical_next" 0.0;
|
||||||
target: "image_1_whole";
|
target: "image_0_1_whole";
|
||||||
target: "image_2_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;
|
transition: SINUSOIDAL 1.5;
|
||||||
after: "end";
|
after: "end";
|
||||||
}
|
}
|
||||||
|
@ -8840,14 +9103,30 @@ collections {
|
||||||
signal: "vertical,previous";
|
signal: "vertical,previous";
|
||||||
source: "slideshow";
|
source: "slideshow";
|
||||||
action: STATE_SET "vertical_prev_init" 0.0;
|
action: STATE_SET "vertical_prev_init" 0.0;
|
||||||
target: "image_1_whole";
|
target: "image_0_1_whole";
|
||||||
target: "image_2_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";
|
after: "vertical_previous_2";
|
||||||
}
|
}
|
||||||
program { name: "vertical_previous_2";
|
program { name: "vertical_previous_2";
|
||||||
action: STATE_SET "vertical_prev" 0.0;
|
action: STATE_SET "vertical_prev" 0.0;
|
||||||
target: "image_1_whole";
|
target: "image_0_1_whole";
|
||||||
target: "image_2_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;
|
transition: SINUSOIDAL 1.5;
|
||||||
after: "end";
|
after: "end";
|
||||||
}
|
}
|
||||||
|
@ -8855,12 +9134,20 @@ collections {
|
||||||
signal: "square,next";
|
signal: "square,next";
|
||||||
source: "slideshow";
|
source: "slideshow";
|
||||||
action: STATE_SET "square_prev_next_init" 0.0;
|
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";
|
after: "square_next_2";
|
||||||
}
|
}
|
||||||
program { name: "square_next_2";
|
program { name: "square_next_2";
|
||||||
action: STATE_SET "square_prev_next" 0.0;
|
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;
|
transition: SINUSOIDAL 1.5;
|
||||||
after: "end";
|
after: "end";
|
||||||
}
|
}
|
||||||
|
@ -8868,7 +9155,11 @@ collections {
|
||||||
signal: "square,previous";
|
signal: "square,previous";
|
||||||
source: "slideshow";
|
source: "slideshow";
|
||||||
action: STATE_SET "square_prev_next_init" 0.0;
|
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";
|
after: "square_next_2";
|
||||||
}
|
}
|
||||||
program { name: "end";
|
program { name: "end";
|
||||||
|
@ -8878,8 +9169,16 @@ collections {
|
||||||
signal: "anim,end";
|
signal: "anim,end";
|
||||||
source: "slideshow";
|
source: "slideshow";
|
||||||
action: STATE_SET "default" 0.0;
|
action: STATE_SET "default" 0.0;
|
||||||
target: "image_1_whole";
|
target: "image_0_1_whole";
|
||||||
target: "image_2_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";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ static void
|
||||||
_layout_select(void *data, Evas_Object *obj, void *event_info)
|
_layout_select(void *data, Evas_Object *obj, void *event_info)
|
||||||
{
|
{
|
||||||
elm_slideshow_layout_set(slideshow, data);
|
elm_slideshow_layout_set(slideshow, data);
|
||||||
elm_hoversel_label_set(obj, data);
|
elm_hoversel_label_set(obj, elm_slideshow_layout_name_get(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -108,7 +108,8 @@ test_slideshow(void *data, Evas_Object *obj, void *event_info)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *notify, *bx, *bt, *hv, *spin;
|
Evas_Object *win, *bg, *notify, *bx, *bt, *hv, *spin;
|
||||||
const Eina_List *l;
|
const Eina_List *l;
|
||||||
const char *transition, *layout;
|
const char *transition, *s;
|
||||||
|
Elm_Slideshow_Layout *layout;
|
||||||
|
|
||||||
win = elm_win_add(NULL, "Slideshow", ELM_WIN_BASIC);
|
win = elm_win_add(NULL, "Slideshow", ELM_WIN_BASIC);
|
||||||
elm_win_title_set(win, "Slideshow");
|
elm_win_title_set(win, "Slideshow");
|
||||||
|
@ -175,8 +176,9 @@ test_slideshow(void *data, Evas_Object *obj, void *event_info)
|
||||||
elm_box_pack_end(bx, hv);
|
elm_box_pack_end(bx, hv);
|
||||||
elm_hoversel_hover_parent_set(hv, win);
|
elm_hoversel_hover_parent_set(hv, win);
|
||||||
EINA_LIST_FOREACH(elm_slideshow_layouts_get(slideshow), l, layout)
|
EINA_LIST_FOREACH(elm_slideshow_layouts_get(slideshow), l, layout)
|
||||||
elm_hoversel_item_add(hv, layout, NULL, 0, _layout_select, layout);
|
elm_hoversel_item_add(hv, elm_slideshow_layout_name_get(layout),
|
||||||
elm_hoversel_label_set(hv, elm_slideshow_layout_get(slideshow));
|
NULL, 0, _layout_select, layout);
|
||||||
|
elm_hoversel_label_set(hv, elm_slideshow_layout_name_get(elm_slideshow_layout_get(slideshow)));
|
||||||
evas_object_show(hv);
|
evas_object_show(hv);
|
||||||
|
|
||||||
spin = elm_spinner_add(win);
|
spin = elm_spinner_add(win);
|
||||||
|
|
|
@ -1204,6 +1204,7 @@ extern "C" {
|
||||||
typedef struct _Elm_Slideshow_Item_Class Elm_Slideshow_Item_Class;
|
typedef struct _Elm_Slideshow_Item_Class Elm_Slideshow_Item_Class;
|
||||||
typedef struct _Elm_Slideshow_Item_Class_Func Elm_Slideshow_Item_Class_Func;
|
typedef struct _Elm_Slideshow_Item_Class_Func Elm_Slideshow_Item_Class_Func;
|
||||||
typedef struct _Elm_Slideshow_Item Elm_Slideshow_Item;
|
typedef struct _Elm_Slideshow_Item Elm_Slideshow_Item;
|
||||||
|
typedef struct _Elm_Slideshow_Layout Elm_Slideshow_Layout;
|
||||||
typedef Evas_Object *(*SlideshowItemGetFunc) (void *data, Evas_Object *obj);
|
typedef Evas_Object *(*SlideshowItemGetFunc) (void *data, Evas_Object *obj);
|
||||||
typedef void (*SlideshowItemDelFunc) (void *data, Evas_Object *obj);
|
typedef void (*SlideshowItemDelFunc) (void *data, Evas_Object *obj);
|
||||||
|
|
||||||
|
@ -1215,8 +1216,8 @@ extern "C" {
|
||||||
} func;
|
} func;
|
||||||
};
|
};
|
||||||
|
|
||||||
EAPI Evas_Object * elm_slideshow_add(Evas_Object *parent);
|
EAPI Evas_Object *elm_slideshow_add(Evas_Object *parent);
|
||||||
EAPI Elm_Slideshow_Item* elm_slideshow_item_add(Evas_Object *obj, const Elm_Slideshow_Item_Class *itc, const void *data);
|
EAPI Elm_Slideshow_Item *elm_slideshow_item_add(Evas_Object *obj, const Elm_Slideshow_Item_Class *itc, const void *data);
|
||||||
EAPI void elm_slideshow_show(Elm_Slideshow_Item *item);
|
EAPI void elm_slideshow_show(Elm_Slideshow_Item *item);
|
||||||
EAPI void elm_slideshow_next(Evas_Object *obj);
|
EAPI void elm_slideshow_next(Evas_Object *obj);
|
||||||
EAPI void elm_slideshow_previous(Evas_Object *obj);
|
EAPI void elm_slideshow_previous(Evas_Object *obj);
|
||||||
|
@ -1230,12 +1231,13 @@ extern "C" {
|
||||||
EAPI void elm_slideshow_clear(Evas_Object *obj);
|
EAPI void elm_slideshow_clear(Evas_Object *obj);
|
||||||
EAPI const Eina_List *elm_slideshow_items_get(const Evas_Object *obj);
|
EAPI const Eina_List *elm_slideshow_items_get(const Evas_Object *obj);
|
||||||
EAPI void elm_slideshow_item_del(Elm_Slideshow_Item *item);
|
EAPI void elm_slideshow_item_del(Elm_Slideshow_Item *item);
|
||||||
EAPI void * elm_slideshow_item_data_get(Elm_Slideshow_Item *item);
|
EAPI void *elm_slideshow_item_data_get(Elm_Slideshow_Item *item);
|
||||||
EAPI Elm_Slideshow_Item* elm_slideshow_item_current_get(const Evas_Object *obj);
|
EAPI Elm_Slideshow_Item *elm_slideshow_item_current_get(const Evas_Object *obj);
|
||||||
EAPI Evas_Object* elm_slideshow_item_object_get(Elm_Slideshow_Item* item);
|
EAPI Evas_Object* elm_slideshow_item_object_get(Elm_Slideshow_Item* item);
|
||||||
EAPI const char * elm_slideshow_layout_get(const Evas_Object *obj);
|
EAPI const Elm_Slideshow_Layout *elm_slideshow_layout_get(const Evas_Object *obj);
|
||||||
EAPI void elm_slideshow_layout_set(Evas_Object *obj, const char *layout);
|
EAPI void elm_slideshow_layout_set(Evas_Object *obj, const Elm_Slideshow_Layout *layout);
|
||||||
EAPI const Eina_List *elm_slideshow_layouts_get(const Evas_Object *obj);
|
EAPI const Eina_List *elm_slideshow_layouts_get(const Evas_Object *obj);
|
||||||
|
EAPI const char *elm_slideshow_layout_name_get(const Elm_Slideshow_Layout *layout);
|
||||||
|
|
||||||
|
|
||||||
EAPI Evas_Object *elm_fileselector_add(Evas_Object *parent);
|
EAPI Evas_Object *elm_fileselector_add(Evas_Object *parent);
|
||||||
|
|
|
@ -30,7 +30,13 @@ struct _Elm_Slideshow_Item
|
||||||
const void *data;
|
const void *data;
|
||||||
const Elm_Slideshow_Item_Class *itc;
|
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
|
struct _Widget_Data
|
||||||
|
@ -51,8 +57,9 @@ struct _Widget_Data
|
||||||
Eina_Bool loop:1;
|
Eina_Bool loop:1;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
const char *current;
|
const Elm_Slideshow_Layout *current;
|
||||||
Eina_List *list; //list of const char *
|
const Elm_Slideshow_Layout *next;
|
||||||
|
Eina_List *list; //list of Elm_Slideshow_Layout
|
||||||
} layout;
|
} layout;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -66,12 +73,17 @@ static Eina_Bool _timer_cb(void *data);
|
||||||
static void
|
static void
|
||||||
_del_hook(Evas_Object *obj)
|
_del_hook(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
Elm_Slideshow_Layout *layout;
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
elm_slideshow_clear(obj);
|
elm_slideshow_clear(obj);
|
||||||
_elm_stringlist_free(wd->transitions);
|
_elm_stringlist_free(wd->transitions);
|
||||||
if (wd->timer) ecore_timer_del(wd->timer);
|
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);
|
free(wd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,6 +109,25 @@ _sizing_eval(Evas_Object *obj)
|
||||||
evas_object_size_hint_max_set(obj, minw, minh);
|
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
|
static void
|
||||||
_changed_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_changed_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
|
@ -110,26 +141,151 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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;
|
||||||
|
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;
|
Elm_Slideshow_Item *item;
|
||||||
Widget_Data *wd = elm_widget_data_get(data);
|
Widget_Data *wd = elm_widget_data_get(data);
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
item = wd->previous;
|
|
||||||
if (item && item->o)
|
wd->layout.current = wd->layout.next;
|
||||||
|
}
|
||||||
|
|
||||||
|
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++)
|
||||||
{
|
{
|
||||||
edje_object_part_unswallow(NULL, item->o);
|
if(!loop_1 && first == current)
|
||||||
evas_object_hide(item->o);
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
wd->previous = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
item = wd->current;
|
item = wd->current;
|
||||||
if (!item || !item->o) return;
|
if (!item || !item->o) return;
|
||||||
|
|
||||||
edje_object_part_unswallow(NULL, item->o);
|
_first_last_get(data, wd->current, &first, &last);
|
||||||
evas_object_show(item->o);
|
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");
|
edje_object_signal_emit(wd->slideshow, "anim,end", "slideshow");
|
||||||
edje_object_part_swallow(wd->slideshow, "elm.swallow.1", item->o);
|
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++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -144,71 +300,7 @@ _timer_cb(void *data)
|
||||||
return ECORE_CALLBACK_CANCEL;
|
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
|
* Add a new slideshow to the parent
|
||||||
|
@ -221,6 +313,8 @@ _item_realize(Elm_Slideshow_Item *item)
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
elm_slideshow_add(Evas_Object *parent)
|
elm_slideshow_add(Evas_Object *parent)
|
||||||
{
|
{
|
||||||
|
Eina_List *layouts, *l;
|
||||||
|
const char *s;
|
||||||
Evas_Object *obj;
|
Evas_Object *obj;
|
||||||
Evas *e;
|
Evas *e;
|
||||||
Widget_Data *wd;
|
Widget_Data *wd;
|
||||||
|
@ -240,6 +334,7 @@ elm_slideshow_add(Evas_Object *parent)
|
||||||
|
|
||||||
wd->slideshow = edje_object_add(e);
|
wd->slideshow = edje_object_add(e);
|
||||||
_elm_theme_object_set(obj, wd->slideshow, "slideshow", "base", "default");
|
_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);
|
elm_widget_resize_object_set(obj, wd->slideshow);
|
||||||
evas_object_show(wd->slideshow);
|
evas_object_show(wd->slideshow);
|
||||||
|
|
||||||
|
@ -247,11 +342,27 @@ elm_slideshow_add(Evas_Object *parent)
|
||||||
if (eina_list_count(wd->transitions) > 0)
|
if (eina_list_count(wd->transitions) > 0)
|
||||||
wd->transition = eina_stringshare_add(eina_list_data_get(wd->transitions));
|
wd->transition = eina_stringshare_add(eina_list_data_get(wd->transitions));
|
||||||
|
|
||||||
wd->layout.list = _elm_stringlist_get(edje_object_data_get(wd->slideshow, "layouts"));
|
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)
|
if (eina_list_count(wd->layout.list) > 0)
|
||||||
wd->layout.current = eina_stringshare_add(eina_list_data_get(wd->layout.list));
|
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, "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_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);
|
evas_object_event_callback_add(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj);
|
||||||
|
@ -310,7 +421,7 @@ elm_slideshow_show(Elm_Slideshow_Item *item)
|
||||||
|
|
||||||
wd->previous = wd->current;
|
wd->previous = wd->current;
|
||||||
wd->current = item;
|
wd->current = item;
|
||||||
_item_realize(item);
|
_item_realize(item, 1);
|
||||||
|
|
||||||
_end(item->obj, item->obj, NULL, NULL);
|
_end(item->obj, item->obj, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
@ -326,34 +437,47 @@ EAPI void
|
||||||
elm_slideshow_next(Evas_Object *obj)
|
elm_slideshow_next(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
Elm_Slideshow_Item *next = NULL;
|
int i;
|
||||||
|
Elm_Slideshow_Item *next = NULL, *first, *last;
|
||||||
ELM_CHECK_WIDTYPE(obj, widtype);
|
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
|
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
|
|
||||||
if (wd->current)
|
if (wd->current)
|
||||||
next = eina_list_data_get(eina_list_next(wd->current->l));
|
next = _item_next_get(wd->current);
|
||||||
else
|
|
||||||
next = NULL;
|
|
||||||
|
|
||||||
if (wd->current && !next && wd->loop)
|
|
||||||
next = eina_list_data_get(wd->items);
|
|
||||||
|
|
||||||
if (!next || next == wd->current) return;
|
if (!next || next == wd->current) return;
|
||||||
|
|
||||||
|
|
||||||
_end(obj, obj, NULL, NULL);
|
_end(obj, obj, NULL, NULL);
|
||||||
|
|
||||||
if (wd->timer) ecore_timer_del(wd->timer);
|
if (wd->timer) ecore_timer_del(wd->timer);
|
||||||
if (wd->timeout > 0)
|
if (wd->timeout > 0)
|
||||||
wd->timer = ecore_timer_add(wd->timeout, _timer_cb, obj);
|
wd->timer = ecore_timer_add(wd->timeout, _timer_cb, obj);
|
||||||
|
|
||||||
_item_realize(next);
|
|
||||||
|
|
||||||
edje_object_part_swallow(wd->slideshow, "elm.swallow.2", next->o);
|
_first_last_get(obj, next, &first, &last);
|
||||||
evas_object_show(next->o);
|
|
||||||
|
|
||||||
snprintf(buf, 1024, "%s,next", wd->transition);
|
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");
|
edje_object_signal_emit(wd->slideshow, buf, "slideshow");
|
||||||
|
|
||||||
wd->previous = wd->current;
|
wd->previous = wd->current;
|
||||||
|
@ -371,19 +495,15 @@ EAPI void
|
||||||
elm_slideshow_previous(Evas_Object *obj)
|
elm_slideshow_previous(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
Elm_Slideshow_Item *prev;
|
Elm_Slideshow_Item *prev = NULL, *first, *last;
|
||||||
|
int i;
|
||||||
ELM_CHECK_WIDTYPE(obj, widtype);
|
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
|
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
|
|
||||||
if (wd->current)
|
if (wd->current)
|
||||||
prev = eina_list_data_get(eina_list_prev(wd->current->l));
|
prev = _item_prev_get(wd->current);
|
||||||
else
|
|
||||||
prev = NULL;
|
|
||||||
|
|
||||||
if (wd->current && !prev && wd->loop)
|
|
||||||
prev = eina_list_data_get(eina_list_last(wd->items));
|
|
||||||
|
|
||||||
if (!prev || prev == wd->current) return;
|
if (!prev || prev == wd->current) return;
|
||||||
|
|
||||||
|
@ -393,10 +513,26 @@ elm_slideshow_previous(Evas_Object *obj)
|
||||||
if (wd->timeout > 0)
|
if (wd->timeout > 0)
|
||||||
wd->timer = ecore_timer_add(wd->timeout, _timer_cb, obj);
|
wd->timer = ecore_timer_add(wd->timeout, _timer_cb, obj);
|
||||||
|
|
||||||
_item_realize(prev);
|
_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++;
|
||||||
|
}
|
||||||
|
|
||||||
edje_object_part_swallow(wd->slideshow, "elm.swallow.2", prev->o);
|
|
||||||
evas_object_show(prev->o);
|
|
||||||
|
|
||||||
snprintf(buf, 1024, "%s,previous", wd->transition);
|
snprintf(buf, 1024, "%s,previous", wd->transition);
|
||||||
edje_object_signal_emit(wd->slideshow, buf, "slideshow");
|
edje_object_signal_emit(wd->slideshow, buf, "slideshow");
|
||||||
|
@ -426,7 +562,7 @@ elm_slideshow_transitions_get(const Evas_Object *obj)
|
||||||
* Returns the list of layouts available.
|
* Returns the list of layouts available.
|
||||||
*
|
*
|
||||||
* @param obj The slideshow object
|
* @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
|
||||||
*/
|
*/
|
||||||
|
@ -537,7 +673,7 @@ elm_slideshow_loop_set(Evas_Object *obj, Eina_Bool loop)
|
||||||
*
|
*
|
||||||
* @ingroup Slideshow
|
* @ingroup Slideshow
|
||||||
*/
|
*/
|
||||||
EAPI const char *
|
EAPI const Elm_Slideshow_Layout *
|
||||||
elm_slideshow_layout_get(const Evas_Object *obj)
|
elm_slideshow_layout_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
|
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
|
||||||
|
@ -555,16 +691,25 @@ elm_slideshow_layout_get(const Evas_Object *obj)
|
||||||
* @ingroup Slideshow
|
* @ingroup Slideshow
|
||||||
*/
|
*/
|
||||||
EAPI void
|
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];
|
char buf[PATH_MAX];
|
||||||
ELM_CHECK_WIDTYPE(obj, widtype);
|
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
wd->layout.current = eina_stringshare_add(layout);
|
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "layout,%s", wd->layout.current);
|
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");
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -603,9 +748,15 @@ elm_slideshow_clear(Evas_Object *obj)
|
||||||
EINA_LIST_FREE(wd->items_built, item)
|
EINA_LIST_FREE(wd->items_built, item)
|
||||||
{
|
{
|
||||||
if (item->itc->func.del)
|
if (item->itc->func.del)
|
||||||
|
{
|
||||||
item->itc->func.del((void*)item->data, item->o);
|
item->itc->func.del((void*)item->data, item->o);
|
||||||
|
item->itc->func.del((void*)item->data, item->o_2);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
evas_object_del(item->o);
|
evas_object_del(item->o);
|
||||||
|
evas_object_del(item->o_2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_LIST_FREE(wd->items, item)
|
EINA_LIST_FREE(wd->items, item)
|
||||||
|
@ -714,4 +865,17 @@ elm_slideshow_item_data_get(Elm_Slideshow_Item * item)
|
||||||
return (void *)item->data;
|
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;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue