enlightenment-module-desksa.../e-module-desksanity.edc

124 lines
3.5 KiB
Plaintext

collections {
group { name: "icon";
images.image: "epic-e-256.png" COMP;
parts {
part { name: "icon"; mouse_events: 0;
description { state: "default";
aspect_preference: BOTH;
image.normal: "epic-e-256.png";
}
}
}
}
group { name: "e/modules/desksanity/moveresize";
parts {
part { name: "outline"; type: TEXT; mouse_events: 0;
effect: OUTLINE;
scale: 1;
description { state: "default" 0.0;
rel1.to: "e.text";
rel1.offset: -1 -1;
rel2.to: "e.text";
color: 0 0 0 255;
color2: 0 0 0 255;
color3: 0 0 0 255;
text { font: "Sans"; size: 16;
text_source: "e.text";
min: 1 1;
}
}
}
part { name: "e.text"; type: TEXT; mouse_events: 0;
effect: GLOW;
scale: 1;
description { state: "default" 0.0;
color: 51 153 255 255;
color2: 51 153 255 24;
color3: 51 153 255 18;
text { font: "Sans"; size: 16;
min: 1 1;
}
}
}
}
}
#define COMP_EFFECT_DURATION 0.2
group { name: "e/comp/effects/desksanity/maximize";
script {
public message(Msg_Type:type, id, ...) {
if ((type == MSG_INT_SET) && (id == 0)) {
/* set state */
new st;
st = getarg(2);
if (st == 1)
set_state(PART:"mover", "custom", 0.0);
else
set_state(PART:"mover", "default", 0.0);
} else if ((type == MSG_INT_SET) && (id == 1)) {
/* client geom[4] */
new x, y, xx, yy;
x = getarg(2);
y = getarg(3);
xx = getarg(4);
yy = getarg(5);
custom_state(PART:"mover", "default", 0.0);
set_state_val(PART:"mover", STATE_REL1_OFFSET, x, y);
set_state_val(PART:"mover", STATE_REL2_OFFSET, xx, yy);
}
}
}
parts {
part { name: "mover"; type: SPACER;
description { state: "default" 0.0;
}
}
part { name: "e.swallow.content"; type: SWALLOW;
description { state: "default" 0.0;
rel1.to: "mover";
rel2.to: "mover";
}
}
}
programs {
program {
name: "show";
signal: "e,action,go";
source: "e";
filter: "mover" "default";
action: STATE_SET "custom" 0.0;
transition: SINUSOIDAL COMP_EFFECT_DURATION CURRENT;
target: "mover";
after: "done";
}
program {
name: "hide";
signal: "e,action,go";
source: "e";
filter: "mover" "custom";
action: STATE_SET "default" 0.0;
transition: SINUSOIDAL COMP_EFFECT_DURATION CURRENT;
target: "mover";
after: "done";
}
program {
name: "stop";
signal: "e,action,stop";
source: "e";
action: ACTION_STOP;
target: "show";
target: "hide";
}
program {
name: "done";
action: SIGNAL_EMIT "e,action,done" "e";
}
}
}
}