ephoto/data/themes/ephoto.edc

1408 lines
49 KiB
Plaintext

#define FIXED_SIZE(_W, _H) \
min: _W _H; max: _W _H;
collections {
images {
image: "sel_border.png" COMP;
image: "sel_corner1.png" COMP;
image: "sel_corner3.png" COMP;
image: "sel_corner5.png" COMP;
image: "sel_corner7.png" COMP;
}
group { "elm/label/base/info";
mouse_events: 0;
styles {
style { name: "info_style";
base: "font=Sans font_size=10 align=center valign=0.5 color=#ffffff style=glow glow_color=#151515 glow_color2=#000000 wrap=mixed text_class=info color_class=text";
}
}
parts {
textblock { "elm.text";
scale: 1;
desc {
text {
style: "info_style";
min: 1 1;
ellipsis: -1;
}
}
}
}
}
group { name: "ephoto,slideshow,base";
data {
item: transitions "fade black_fade square";
}
parts {
rect { "background";
scale: 1;
description {
state: "default" 0.0;
color: 0 0 0 255;
}
}
rect { "slide_clip";
scale: 1;
description { state: "default" 0.0;
rel1.to: "background";
rel2.to: "background";
color: 255 255 255 255;
}
description { state: "fade" 0.0;
inherit: "default" 0.0;
color: 255 255 255 0;
}
description { state: "black_fade_init" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255;
}
description { state: "black_fade" 0.0;
inherit: "default" 0.0;
color: 0 0 0 255;
}
description { state: "square" 0.0;
inherit: "default" 0.0;
color: 255 255 255 0;
}
}
rect { "slide_clip2";
scale: 1;
description { state: "default" 0.0;
rel1.to: "background";
rel2.to: "background";
color: 255 255 255 0;
}
description { state: "fade" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255;
}
description { state: "black_fade_init" 0.0;
inherit: "default" 0.0;
color: 0 0 0 255;
}
description { state: "black_fade" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255;
}
description { state: "square_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" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 0.0;
rel2.relative: 1.0 1.0;
color: 255 255 255 255;
}
}
swallow { "ephoto.swallow.slideshow.item";
scale: 1;
mouse_events: 1;
clip_to: "slide_clip";
description {
state: "default" 0.0;
rel1.to: "slide_clip";
rel2.to: "slide_clip";
}
}
swallow { "ephoto.swallow.slideshow.item2";
scale: 1;
mouse_events: 1;
clip_to: "slide_clip2";
description {
state: "default" 0.0;
rel1.to: "slide_clip2";
rel2.to: "slide_clip2";
}
}
}
programs {
program {
signal: "ephoto,fade";
source: "ephoto";
action: STATE_SET "default" 0.0;
target: "slide_clip";
target: "slide_clip2";
after: "fade_2";
}
program { name: "fade_2";
action: STATE_SET "fade" 0.0;
target: "slide_clip";
target: "slide_clip2";
transition: SINUSOIDAL 1.5;
after: "end";
}
program {
signal: "ephoto,black_fade";
source: "ephoto";
action: STATE_SET "black_fade_init" 0.0;
target: "slide_clip";
target: "slide_clip2";
after: "black_fade_2";
}
program { name: "black_fade_2";
action: STATE_SET "black_fade" 0.0;
target: "slide_clip";
transition: SINUSOIDAL 0.75;
after: "black_fade_3";
}
program { name: "black_fade_3";
action: SIGNAL_EMIT "ephoto,transition,raise" "ephoto";
after: "black_fade_4";
}
program { name: "black_fade_4";
action: STATE_SET "black_fade" 0.0;
target: "slide_clip2";
transition: SINUSOIDAL 0.75;
after: "end";
}
program {
signal: "ephoto,square";
source: "ephoto";
action: STATE_SET "square_init" 0.0;
target: "slide_clip2";
after: "square_next_2";
}
program { name: "square_next_2";
action: STATE_SET "square" 0.0;
target: "slide_clip";
target: "slide_clip2";
transition: SINUSOIDAL 1.5;
after: "end";
}
program {
signal: "ephoto,none";
source: "ephoto";
action: STATE_SET "fade" 0.0;
target: "slide_clip";
target: "slide_clip2";
after: "end";
}
program { name: "end";
action: SIGNAL_EMIT "ephoto,transition,end" "ephoto";
}
program {
signal: "ephoto,transition,done";
source: "ephoto";
action: STATE_SET "default" 0.0;
target: "slide_clip";
target: "slide_clip2";
}
}
}
group { name: "ephoto,slideshow,item";
script {
public timeout;
public message(Msg_Type:type, id, ...) {
if ((type == MSG_FLOAT_SET) && (id == 1)) {
new Float:time;
time = getfarg(2);
set_float(timeout, time);
}
}
public left_to_right(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_left_to_right", 0.0,
SINUSOIDAL, pos);
}
public right_to_left(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_right_to_left", 0.0,
SINUSOIDAL, pos);
}
public top_to_bottom(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_top_to_bottom", 0.0,
SINUSOIDAL, pos);
}
public bottom_to_top(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_bottom_to_top", 0.0,
SINUSOIDAL, pos);
}
public left_in(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_left_in", 0.0,
SINUSOIDAL, pos);
}
public right_in(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_right_in", 0.0,
SINUSOIDAL, pos);
}
public top_in(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_top_in", 0.0,
SINUSOIDAL, pos);
}
public bottom_in(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_bottom_in", 0.0,
SINUSOIDAL, pos);
}
public left_out(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_left_out", 0.0,
SINUSOIDAL, pos);
}
public right_out(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_right_out", 0.0,
SINUSOIDAL, pos);
}
public top_out(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_top_out", 0.0,
SINUSOIDAL, pos);
}
public bottom_out(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_bottom_out", 0.0,
SINUSOIDAL, pos);
}
public left_top_corner(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_left_top_corner", 0.0,
SINUSOIDAL, pos);
}
public right_top_corner(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_right_top_corner", 0.0,
SINUSOIDAL, pos);
}
public right_bottom_corner(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_right_bottom_corner", 0.0,
SINUSOIDAL, pos);
}
public left_bottom_corner(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_left_bottom_corner", 0.0,
SINUSOIDAL, pos);
}
public left_top_corner_in(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_left_top_corner_in", 0.0,
SINUSOIDAL, pos);
}
public right_top_corner_in(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_right_top_corner_in", 0.0,
SINUSOIDAL, pos);
}
public right_bottom_corner_in(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_right_bottom_corner_in", 0.0,
SINUSOIDAL, pos);
}
public left_bottom_corner_in(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_left_bottom_corner_in", 0.0,
SINUSOIDAL, pos);
}
public left_top_corner_out(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_left_top_corner_out", 0.0,
SINUSOIDAL, pos);
}
public right_top_corner_out(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_right_top_corner_out", 0.0,
SINUSOIDAL, pos);
}
public right_bottom_corner_out(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_right_bottom_corner_out", 0.0,
SINUSOIDAL, pos);
}
public left_bottom_corner_out(val, Float:pos) {
set_state_anim(PART:"ephoto.swallow.slideshow.item",
"end_left_bottom_corner_out", 0.0,
SINUSOIDAL, pos);
}
}
parts {
rect { "background";
scale: 1;
description {
state: "default" 0.0;
color: 0 0 0 255;
}
}
rect { "slide_clip";
scale: 1;
description { state: "default" 0.0;
rel1.to: "background";
rel2.to: "background";
color: 255 255 255 255;
}
}
swallow { "ephoto.swallow.slideshow.item";
scale: 1;
clip_to: "slide_clip";
mouse_events: 1;
description {
state: "default" 0.0;
rel1.to: "background";
rel1.relative: 0.0 0.0;
rel2.to: "background";
rel2.relative: 1.0 1.0;
}
description {
state: "default_left_to_right" 0.0;
rel1.to: "background";
rel1.relative: -0.2 0.0;
rel2.to: "background";
rel2.relative: 1.0 1.0;
}
description {
state: "end_left_to_right" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 0.0;
rel2.relative: 1.2 1.0;
}
description {
state: "default_right_to_left" 0.0;
rel1.to: "background";
rel1.relative: 0.0 0.0;
rel2.to: "background";
rel2.relative: 1.2 1.0;
}
description {
state: "end_right_to_left" 0.0;
inherit: "default" 0.0;
rel1.relative: -0.2 0.0;
rel2.relative: 1.0 1.0;
}
description {
state: "default_top_to_bottom" 0.0;
rel1.to: "background";
rel1.relative: 0.0 -0.2;
rel2.to: "background";
rel2.relative: 1.0 1.0;
}
description {
state: "end_top_to_bottom" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 0.0;
rel2.relative: 1.0 1.2;
}
description {
state: "default_bottom_to_top" 0.0;
rel1.to: "background";
rel1.relative: 0.0 0.0;
rel2.to: "background";
rel2.relative: 1.0 1.2;
}
description {
state: "end_bottom_to_top" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 -0.2;
rel2.relative: 1.0 1.0;
}
description {
state: "default_left_in" 0.0;
rel1.to: "background";
rel1.relative: -0.5 0.0;
rel2.to: "background";
rel2.relative: 1.0 1.0;
}
description {
state: "end_left_in" 0.0;
rel1.to: "background";
rel1.relative: -0.1 0.0;
rel2.to: "background";
rel2.relative: 1.0 1.0;
}
description {
state: "default_right_in" 0.0;
rel1.to: "background";
rel1.relative: 0.0 0.0;
rel2.to: "background";
rel2.relative: 1.5 1.0;
}
description {
state: "end_right_in" 0.0;
rel1.to: "background";
rel1.relative: 0.0 0.0;
rel2.to: "background";
rel2.relative: 1.1 1.0;
}
description {
state: "default_top_in" 0.0;
rel1.to: "background";
rel1.relative: 0.0 -0.5;
rel2.to: "background";
rel2.relative: 1.0 1.0;
}
description {
state: "end_top_in" 0.0;
rel1.to: "background";
rel1.relative: 0.0 -0.1;
rel2.to: "background";
rel2.relative: 1.0 1.0;
}
description {
state: "default_bottom_in" 0.0;
rel1.to: "background";
rel1.relative: 0.0 0.0;
rel2.to: "background";
rel2.relative: 1.0 1.5;
}
description {
state: "end_bottom_in" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 0.0;
rel2.relative: 1.0 1.1;
}
description {
state: "default_left_out" 0.0;
rel1.to: "background";
rel1.relative: -0.1 0.0;
rel2.to: "background";
rel2.relative: 1.0 1.0;
}
description {
state: "end_left_out" 0.0;
inherit: "default" 0.0;
rel1.relative: -0.5 0.0;
rel2.relative: 1.0 1.0;
}
description {
state: "default_right_out" 0.0;
rel1.to: "background";
rel1.relative: 0.0 0.0;
rel2.to: "background";
rel2.relative: 1.1 1.0;
}
description {
state: "end_right_out" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 0.0;
rel2.relative: 1.5 1.0;
}
description {
state: "default_top_out" 0.0;
rel1.to: "background";
rel1.relative: 0.0 -0.1;
rel2.to: "background";
rel2.relative: 1.0 1.0;
}
description {
state: "end_top_out" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 -0.5;
rel2.relative: 1.0 1.0;
}
description {
state: "default_bottom_out" 0.0;
rel1.to: "background";
rel1.relative: 0.0 0.0;
rel2.to: "background";
rel2.relative: 1.0 1.0;
}
description {
state: "end_bottom_out" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 0.0;
rel2.relative: 1.0 1.4;
}
description {
state: "default_left_top_corner" 0.0;
rel1.to: "background";
rel1.relative: -0.2 -0.2;
rel2.to: "background";
rel2.relative: 1.0 1.0;
}
description {
state: "end_left_top_corner" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 0.0;
rel2.relative: 1.2 1.2;
}
description {
state: "default_right_top_corner" 0.0;
rel1.to: "background";
rel1.relative: 0.0 -0.2;
rel2.to: "background";
rel2.relative: 1.2 1.0;
}
description {
state: "end_right_top_corner" 0.0;
inherit: "default" 0.0;
rel1.relative: -0.2 0.0;
rel2.relative: 1.0 1.2;
}
description {
state: "default_right_bottom_corner" 0.0;
rel1.to: "background";
rel1.relative: 0.0 0.0;
rel2.to: "background";
rel2.relative: 1.2 1.2;
}
description {
state: "end_right_bottom_corner" 0.0;
inherit: "default" 0.0;
rel1.relative: -0.2 -0.2;
rel2.relative: 1.0 1.0;
}
description {
state: "default_left_bottom_corner" 0.0;
rel1.to: "background";
rel1.relative: -0.2 0.0;
rel2.to: "background";
rel2.relative: 1.0 1.2;
}
description {
state: "end_left_bottom_corner" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 -0.2;
rel2.relative: 1.2 1.0;
}
description {
state: "default_left_top_corner_in" 0.0;
rel1.to: "background";
rel1.relative: -0.5 -0.5;
rel2.to: "background";
rel2.relative: 1.0 1.0;
}
description {
state: "end_left_top_corner_in" 0.0;
inherit: "default" 0.0;
rel1.relative: -0.1 -0.1;
rel2.relative: 1.0 1.0;
}
description {
state: "default_right_top_corner_in" 0.0;
rel1.to: "background";
rel1.relative: 0.0 -0.5;
rel2.to: "background";
rel2.relative: 1.5 1.0;
}
description {
state: "end_right_top_corner_in" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 -0.1;
rel2.relative: 1.1 1.0;
}
description {
state: "default_right_bottom_corner_in" 0.0;
rel1.to: "background";
rel1.relative: 0.0 0.0;
rel2.to: "background";
rel2.relative: 1.5 1.5;
}
description {
state: "end_right_bottom_corner_in" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 0.0;
rel2.relative: 1.1 1.1;
}
description {
state: "default_left_bottom_corner_in" 0.0;
rel1.to: "background";
rel1.relative: -0.5 0.0;
rel2.to: "background";
rel2.relative: 1.0 1.5;
}
description {
state: "end_left_bottom_corner_in" 0.0;
inherit: "default" 0.0;
rel1.relative: -0.1 0.0;
rel2.relative: 1.0 1.1;
}
description {
state: "default_left_top_corner_out" 0.0;
rel1.to: "background";
rel1.relative: -0.1 -0.1;
rel2.to: "background";
rel2.relative: 1.0 1.0;
}
description {
state: "end_left_top_corner_out" 0.0;
inherit: "default" 0.0;
rel1.relative: -0.5 -0.5;
rel2.relative: 1.0 1.0;
}
description {
state: "default_right_top_corner_out" 0.0;
rel1.to: "background";
rel1.relative: 0.0 -0.1;
rel2.to: "background";
rel2.relative: 1.1 1.0;
}
description {
state: "end_right_top_corner_out" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 -0.5;
rel2.relative: 1.5 1.0;
}
description {
state: "default_right_bottom_corner_out" 0.0;
rel1.to: "background";
rel1.relative: 0.0 0.0;
rel2.to: "background";
rel2.relative: 1.1 1.1;
}
description {
state: "end_right_bottom_corner_out" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 0.0;
rel2.relative: 1.5 1.5;
}
description {
state: "default_left_bottom_corner_out" 0.0;
rel1.to: "background";
rel1.relative: -0.1 0.0;
rel2.to: "background";
rel2.relative: 1.0 1.1;
}
description {
state: "end_left_bottom_corner_out" 0.0;
inherit: "default" 0.0;
rel1.relative: -0.5 0.0;
rel2.relative: 1.0 1.5;
}
}
}
programs {
program {
signal: "ephoto,slideshow,move,left,to,right";
source: "ephoto";
script {
anim(get_float(timeout), "left_to_right", 1);
}
}
program {
signal: "ephoto,slideshow,move,right,to,left";
source: "ephoto";
script {
anim(get_float(timeout), "right_to_left", 1);
}
}
program {
signal: "ephoto,slideshow,move,top,to,bottom";
source: "ephoto";
script {
anim(get_float(timeout), "top_to_bottom", 1);
}
}
program {
signal: "ephoto,slideshow,move,bottom,to,top";
source: "ephoto";
script {
anim(get_float(timeout), "bottom_to_top", 1);
}
}
program {
signal: "ephoto,slideshow,move,left,in";
source: "ephoto";
script {
anim(get_float(timeout), "left_in", 1);
}
}
program {
signal: "ephoto,slideshow,move,right,in";
source: "ephoto";
script {
anim(get_float(timeout), "right_in", 1);
}
}
program {
signal: "ephoto,slideshow,move,top,in";
source: "ephoto";
script {
anim(get_float(timeout), "top_in", 1);
}
}
program {
signal: "ephoto,slideshow,move,bottom,in";
source: "ephoto";
script {
anim(get_float(timeout), "bottom_in", 1);
}
}
program {
signal: "ephoto,slideshow,move,left,out";
source: "ephoto";
script {
anim(get_float(timeout), "left_out", 1);
}
}
program {
signal: "ephoto,slideshow,move,right,out";
source: "ephoto";
script {
anim(get_float(timeout), "right_out", 1);
}
}
program {
signal: "ephoto,slideshow,move,top,out";
source: "ephoto";
script {
anim(get_float(timeout), "top_out", 1);
}
}
program {
signal: "ephoto,slideshow,move,bottom,out";
source: "ephoto";
script {
anim(get_float(timeout), "bottom_out", 1);
}
}
program {
signal: "ephoto,slideshow,move,left,top,corner";
source: "ephoto";
script {
anim(get_float(timeout), "left_top_corner", 1);
}
}
program {
signal: "ephoto,slideshow,move,right,top,corner";
source: "ephoto";
script {
anim(get_float(timeout), "right_top_corner", 1);
}
}
program {
signal: "ephoto,slideshow,move,right,bottom,corner";
source: "ephoto";
script {
anim(get_float(timeout), "right_bottom_corner", 1);
}
}
program {
signal: "ephoto,slideshow,move,left,bottom,corner";
source: "ephoto";
script {
anim(get_float(timeout), "left_bottom_corner", 1);
}
}
program {
signal: "ephoto,slideshow,move,left,top,corner,in";
source: "ephoto";
script {
anim(get_float(timeout), "left_top_corner_in", 1);
}
}
program {
signal: "ephoto,slideshow,move,right,top,corner,in";
source: "ephoto";
script {
anim(get_float(timeout), "right_top_corner_in", 1);
}
}
program {
signal: "ephoto,slideshow,move,right,bottom,corner,in";
source: "ephoto";
script {
anim(get_float(timeout), "right_bottom_corner_in", 1);
}
}
program {
signal: "ephoto,slideshow,move,left,bottom,corner,in";
source: "ephoto";
script {
anim(get_float(timeout), "left_bottom_corner_in", 1);
}
}
program {
signal: "ephoto,slideshow,move,left,top,corner,out";
source: "ephoto";
script {
anim(get_float(timeout), "left_top_corner_out", 1);
}
}
program {
signal: "ephoto,slideshow,move,right,top,corner,out";
source: "ephoto";
script {
anim(get_float(timeout), "right_top_corner_out", 1);
}
}
program {
signal: "ephoto,slideshow,move,right,bottom,corner,out";
source: "ephoto";
script {
anim(get_float(timeout), "right_bottom_corner_out", 1);
}
}
program {
signal: "ephoto,slideshow,move,left,bottom,corner,out";
source: "ephoto";
script {
anim(get_float(timeout), "left_bottom_corner_out", 1);
}
}
program {
signal: "ephoto,slideshow,default,left,to,right";
source: "ephoto";
action: STATE_SET "default_left_to_right" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,right,to,left";
source: "ephoto";
action: STATE_SET "default_right_to_left" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,top,to,bottom";
source: "ephoto";
action: STATE_SET "default_top_to_bottom" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,bottom,to,top";
source: "ephoto";
action: STATE_SET "default_bottom_to_top" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,left,in";
source: "ephoto";
action: STATE_SET "default_left_in" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,right,in";
source: "ephoto";
action: STATE_SET "default_right_in" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,top,in";
source: "ephoto";
action: STATE_SET "default_top_in" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,bottom,in";
source: "ephoto";
action: STATE_SET "default_bottom_in" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,left,out";
source: "ephoto";
action: STATE_SET "default_left_out" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,right,out";
source: "ephoto";
action: STATE_SET "default_right_out" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,top,out";
source: "ephoto";
action: STATE_SET "default_top_out" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,bottom,out";
source: "ephoto";
action: STATE_SET "default_bottom_out" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,left,top,corner";
source: "ephoto";
action: STATE_SET "default_left_top_corner" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,right,top,corner";
source: "ephoto";
action: STATE_SET "default_right_top_corner" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,right,bottom,corner";
source: "ephoto";
action: STATE_SET "default_right_bottom_corner" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,left,bottom,corner";
source: "ephoto";
action: STATE_SET "default_left_bottom_corner" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,left,top,corner,in";
source: "ephoto";
action: STATE_SET "default_left_top_corner_in" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,right,top,corner,in";
source: "ephoto";
action: STATE_SET "default_right_top_corner_in" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,right,bottom,corner,in";
source: "ephoto";
action: STATE_SET "default_right_bottom_corner_in" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,left,bottom,corner,in";
source: "ephoto";
action: STATE_SET "default_left_bottom_corner_in" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,left,top,corner,out";
source: "ephoto";
action: STATE_SET "default_left_top_corner_out" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,right,top,corner,out";
source: "ephoto";
action: STATE_SET "default_right_top_corner_out" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,right,bottom,corner,out";
source: "ephoto";
action: STATE_SET "default_right_bottom_corner_out" 0.0;
target: "ephoto.swallow.slideshow.item";
}
program {
signal: "ephoto,slideshow,default,left,bottom,corner,out";
source: "ephoto";
action: STATE_SET "default_left_bottom_corner_out" 0.0;
target: "ephoto.swallow.slideshow.item";
}
}
}
group { name: "ephoto,image,cropper,base";
script {
public message(Msg_Type:type, id, ...) {
if ((type == MSG_INT_SET) && (id == 1)) {
new movetype, cox, coy, pox, poy, ix, iy, iw, ih, cx, cy, cw, ch;
movetype = getarg(2);
cox = getarg(3);
coy = getarg(4);
get_geometry(PART:"ephoto.swallow.image", ix, iy, iw, ih);
get_geometry(PART:"ephoto.swallow.cropper", cx, cy, cw, ch);
custom_state(PART:"ephoto.swallow.cropper", "default", 0.0);
if (movetype == 0) {
new ppox, ppoy;
get_state_val(PART:"ephoto.swallow.cropper", STATE_REL1_OFFSET, pox, poy);
get_state_val(PART:"ephoto.swallow.cropper", STATE_REL2_OFFSET, ppox, ppoy);
if (cx+cox < ix)
cox = ix-cx;
if (cx+cw+cox > ix+iw)
cox = (ix+iw)-(cx+cw);
if (cy+coy < iy)
coy = iy-cy;
if (cy+ch+coy > iy+ih)
coy = (iy+ih)-(cy+ch);
pox += cox;
poy += coy;
ppox += cox;
ppoy += coy;
set_state_val(PART:"ephoto.swallow.cropper", STATE_REL1_OFFSET, pox, poy);
set_state_val(PART:"ephoto.swallow.cropper", STATE_REL2_OFFSET, ppox, ppoy);
}
if (movetype == 1 || movetype == 2 || movetype == 8) {
get_state_val(PART:"ephoto.swallow.cropper", STATE_REL1_OFFSET, pox, poy);
if (cx+cox < ix)
cox = ix-cx;
if (cy+coy < iy)
coy = iy-cy;
if (cw-cox < 20)
return;
if (ch-coy < 20)
return;
cox += pox;
coy += poy;
set_state_val(PART:"ephoto.swallow.cropper", STATE_REL1_OFFSET, cox, coy);
}
if (movetype == 3) {
new ppox, ppoy;
get_state_val(PART:"ephoto.swallow.cropper", STATE_REL1_OFFSET, pox, poy);
get_state_val(PART:"ephoto.swallow.cropper", STATE_REL2_OFFSET, ppox, ppoy);
if (cx+cw+cox > ix+iw)
cox = (ix+iw)-(cx+cw);
if (cy+coy < iy)
coy = iy-cy;
if (cw+cox < 20)
return;
if (ch-coy < 20)
return;
poy += coy;
ppox += cox;
set_state_val(PART:"ephoto.swallow.cropper", STATE_REL1_OFFSET, pox, poy);
set_state_val(PART:"ephoto.swallow.cropper", STATE_REL2_OFFSET, ppox, ppoy);
}
if (movetype == 4 || movetype == 5 || movetype == 6) {
get_state_val(PART:"ephoto.swallow.cropper", STATE_REL2_OFFSET, pox, poy);
if (cx+cw+cox > ix+iw)
cox = (ix+iw)-(cx+cw);
if (cy+ch+coy > iy+ih)
coy = (iy+ih)-(cy+ch);
if (cw+cox < 20)
return;
if (ch+coy < 20)
return;
cox += pox;
coy += poy;
set_state_val(PART:"ephoto.swallow.cropper", STATE_REL2_OFFSET, cox, coy);
}
if (movetype == 7) {
new ppox, ppoy;
get_state_val(PART:"ephoto.swallow.cropper", STATE_REL1_OFFSET, pox, poy);
get_state_val(PART:"ephoto.swallow.cropper", STATE_REL2_OFFSET, ppox, ppoy);
if (cx+cox < ix)
cox = ix-cx;
if (cy+ch+coy > iy+ih)
coy = (iy+ih)-(cy+ch);
if (cw-cox < 20)
return;
if (ch+coy < 20)
return;
pox += cox;
ppoy += coy;
set_state_val(PART:"ephoto.swallow.cropper", STATE_REL1_OFFSET, pox, poy);
set_state_val(PART:"ephoto.swallow.cropper", STATE_REL2_OFFSET, ppox, ppoy);
}
if (movetype == 9) {
new ppox, ppoy;
get_state_val(PART:"ephoto.swallow.cropper", STATE_REL1_OFFSET, pox, poy);
get_state_val(PART:"ephoto.swallow.cropper", STATE_REL2_OFFSET, ppox, ppoy);
if (cx < ix)
cox = ix-cx;
if (cx+cw > ix+iw)
cox = (ix+iw)-(cx+cw);
if (cy < iy)
coy = iy-cy;
if (cy+ch > iy+ih)
coy = (iy+ih)-(cy+ch);
pox += cox;
ppox += cox;
poy += coy;
ppoy += coy;
set_state_val(PART:"ephoto.swallow.cropper", STATE_REL1_OFFSET, pox, poy);
set_state_val(PART:"ephoto.swallow.cropper", STATE_REL2_OFFSET, ppox, ppoy);
}
if (movetype == 10) {
set_state_val(PART:"ephoto.swallow.cropper", STATE_REL1_OFFSET, 0, 0);
set_state_val(PART:"ephoto.swallow.cropper", STATE_REL2_OFFSET, 0, 0);
}
if (movetype == 11) {
new buf[32];
snprintf(buf, sizeof(buf), "%dx%d", cox, coy);
set_text(PART:"ephoto.cropper.size", buf);
}
set_state(PART:"ephoto.swallow.cropper", "custom", 0.0);
if (movetype != 0) {
emit("cropper,changed", "ephoto.swallow.cropper");
}
}
}
}
parts {
rect { name: "clipper";
description { state: "default" 0.0;
}
}
swallow { name: "ephoto.swallow.image";
scale: 1;
mouse_events: 0;
clip_to: "clipper";
description { state: "default" 0.0;
}
}
swallow { name: "ephoto.swallow.cropper";
scale: 1;
mouse_events: 1;
clip_to: "clipper";
description { state: "default" 0.0;
min: 20 20;
rel1.to: "ephoto.swallow.image";
rel1.relative: 0.2 0.2;
rel2.to: "ephoto.swallow.image";
rel2.relative: 0.8 0.8;
}
}
text { name: "ephoto.cropper.size";
effect: GLOW;
scale: 1;
mouse_events: 0;
clip_to: "clipper";
description { state: "default" 0.0;
color: 255 255 255 255;
rel1.to: "ephoto.swallow.cropper";
rel2.to: "ephoto.swallow.cropper";
text {
text: "";
font: FN;
size: 12;
align: 0.5 1.0;
}
}
}
rect { name: "shader_top";
scale: 1;
mouse_events: 0;
clip_to: "clipper";
description { state: "default" 0.0;
color: 0 0 0 150;
rel1.to: "clipper";
rel1.relative: 0.0 0.0;
rel2.to: "ephoto.swallow.cropper";
rel2.relative: 1.0 0.0;
}
}
rect { name: "shader_left";
scale: 1;
mouse_events: 0;
clip_to: "clipper";
description { state: "default" 0.0;
color: 0 0 0 150;
rel1.to: "shader_top";
rel1.relative: 0.0 1.0;
rel2.to: "ephoto.swallow.cropper";
rel2.relative: 0.0 1.0;
}
}
rect { name: "shader_bottom";
scale: 1;
mouse_events: 0;
clip_to: "clipper";
description { state: "default" 0.0;
color: 0 0 0 150;
rel1.to: "shader_left";
rel1.relative: 0.0 1.0;
rel2.to: "clipper";
rel2.relative: 1.0 1.0;
}
}
rect { name: "shader_right";
scale: 1;
mouse_events: 0;
clip_to: "clipper";
description { state: "default" 0.0;
color: 0 0 0 150;
rel1.to: "shader_top";
rel1.relative: 1.0 0.0;
rel2.to: "shader_bottom";
rel2.relative: 1.0 0.0;
}
}
}
}
group { name: "ephoto,image,cropper";
parts {
image { name: "cropper";
repeat_events: 1;
description { state: "default" 0.0;
color: 255 255 255 200;
image {
normal: "sel_border.png";
border: 3 3 3 3;
middle: NONE;
}
}
}
rect { name: "dragger";
repeat_events: 1;
description { state: "default" 0.0;
color: 255 255 255 0;
rel1 {
to: "handle1";
relative: 1.0 1.0;
}
rel2 {
to: "handle5";
relative: 0.0 0.0;
}
}
}
image { name: "handle1";
repeat_events: 1;
description { state: "default" 0.0;
FIXED_SIZE(22, 22)
rel1.offset: 1 1;
align: 0.0 0.0;
color: 255 255 255 0;
image.normal: "sel_corner1.png";
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
color: 255 255 255 200;
}
}
rect { name: "handle2";
repeat_events: 1;
description { state: "default" 0.0;
color: 255 255 255 0;
rel1 {
to: "handle1";
relative: 1.0 0.0;
offset: 3 2;
}
rel2 {
to: "handle3";
relative: 0.0 1.0;
offset: -4 -2;
}
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
color: 255 255 255 80;
}
}
image { name: "handle3";
repeat_events: 1;
description { state: "default" 0.0;
FIXED_SIZE(22, 22)
rel1.offset: 0 1;
rel2.offset: -2 -1;
align: 1.0 0.0;
color: 255 255 255 0;
image.normal: "sel_corner3.png";
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
color: 255 255 255 200;
}
}
rect { name: "handle4";
repeat_events: 1;
description { state: "default" 0.0;
color: 255 255 255 0;
rel1 {
to: "handle3";
relative: 0.0 1.0;
offset: 1 3;
}
rel2 {
to: "handle5";
relative: 1.0 0.0;
offset: -3 -4;
}
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
color: 255 255 255 80;
}
}
image { name: "handle5";
repeat_events: 1;
description { state: "default" 0.0;
FIXED_SIZE(22, 22)
rel2.offset: -2 -2;
align: 1.0 1.0;
color: 255 255 255 0;
image.normal: "sel_corner5.png";
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
color: 255 255 255 200;
}
}
rect { name: "handle6";
repeat_events: 1;
description { state: "default" 0.0;
rel1 {
to: "handle7";
relative: 1.0 0.0;
offset: 3 1;
}
rel2 {
to: "handle5";
relative: 0.0 1.0;
offset: -4 -3;
}
color: 255 255 255 0;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
color: 255 255 255 80;
}
}
image { name: "handle7";
repeat_events: 1;
description { state: "default" 0.0;
FIXED_SIZE(22, 22)
rel1.offset: 1 0;
rel2.offset: -1 -2;
align: 0.0 1.0;
color: 255 255 255 0;
image.normal: "sel_corner7.png";
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
color: 255 255 255 200;
}
}
rect { name: "handle8";
repeat_events: 1;
description { state: "default" 0.0;
rel1 {
to: "handle1";
relative: 0.0 1.0;
offset: 2 3;
}
rel2 {
to: "handle7";
relative: 1.0 0.0;
offset: -2 -4;
}
color: 255 255 255 0;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
color: 255 255 255 80;
}
}
}
programs {
program {
signal: "mouse,in"; source: "cropper";
action: STATE_SET "visible" 0.0;
transition: LINEAR 0.3 ;
targets: "handle1" "handle3" "handle5" "handle7";
}
program {
signal: "mouse,out"; source: "cropper";
action: STATE_SET "default" 0.0;
transition: LINEAR 0.3 ;
targets: "handle1" "handle3" "handle5" "handle7";
}
#define SHOW_HIDE_LATERALS(_NAME_) \
program { \
signal: "mouse,in"; source: _NAME_; \
action: STATE_SET "visible" 0.0; \
transition: LINEAR 0.3 ; \
target: _NAME_; \
} \
program { \
signal: "mouse,out"; source: _NAME_; \
action: STATE_SET "default" 0.0; \
transition: LINEAR 0.3 ; \
target: _NAME_; \
}
SHOW_HIDE_LATERALS("handle2")
SHOW_HIDE_LATERALS("handle4")
SHOW_HIDE_LATERALS("handle6")
SHOW_HIDE_LATERALS("handle8")
#undef SHOW_HIDE_LATERALS
}
}
}