efl/legacy/edje/data/src/e_logo.edc

702 lines
18 KiB
Plaintext

fonts {
font: "Vera.ttf" "Vera";
font: "VeraBd.ttf" "Vera Bold";
}
images {
image: "bg.png" LOSSY 95;
image: "e.png" LOSSY 95;
// used for anim
image: "e001.png" LOSSY 95;
image: "e002.png" LOSSY 95;
image: "e003.png" LOSSY 95;
image: "e004.png" LOSSY 95;
image: "e005.png" LOSSY 95;
image: "e006.png" LOSSY 95;
image: "e007.png" LOSSY 95;
image: "e008.png" LOSSY 95;
image: "e009.png" LOSSY 95;
image: "e010.png" LOSSY 95;
image: "e011.png" LOSSY 95;
image: "e012.png" LOSSY 95;
image: "e013.png" LOSSY 95;
image: "e014.png" LOSSY 95;
image: "e015.png" LOSSY 95;
image: "e016.png" LOSSY 95;
image: "e017.png" LOSSY 95;
image: "e018.png" LOSSY 95;
image: "e019.png" LOSSY 95;
image: "e020.png" LOSSY 95;
image: "e021.png" LOSSY 95;
image: "e022.png" LOSSY 95;
image: "e023.png" LOSSY 95;
image: "e024.png" LOSSY 95;
image: "e025.png" LOSSY 95;
image: "e026.png" LOSSY 95;
image: "e027.png" LOSSY 95;
image: "e028.png" LOSSY 95;
image: "e029.png" LOSSY 95;
image: "e030.png" LOSSY 95;
image: "e031.png" LOSSY 95;
image: "e032.png" LOSSY 95;
image: "e033.png" LOSSY 95;
image: "e034.png" LOSSY 95;
image: "e035.png" LOSSY 95;
image: "e036.png" LOSSY 95;
image: "e037.png" LOSSY 95;
image: "e038.png" LOSSY 95;
image: "e039.png" LOSSY 95;
image: "e040.png" LOSSY 95;
image: "e041.png" LOSSY 95;
image: "e042.png" LOSSY 95;
image: "e043.png" LOSSY 95;
image: "e044.png" LOSSY 95;
image: "e045.png" LOSSY 95;
image: "e046.png" LOSSY 95;
image: "e047.png" LOSSY 95;
image: "e048.png" LOSSY 95;
image: "e049.png" LOSSY 95;
image: "e050.png" LOSSY 95;
image: "e051.png" LOSSY 95;
image: "e052.png" LOSSY 95;
image: "e053.png" LOSSY 95;
image: "e054.png" LOSSY 95;
image: "e055.png" LOSSY 95;
image: "e056.png" LOSSY 95;
image: "e057.png" LOSSY 95;
image: "e058.png" LOSSY 95;
image: "e059.png" LOSSY 95;
image: "e060.png" LOSSY 95;
image: "e061.png" LOSSY 95;
image: "e062.png" LOSSY 95;
image: "e063.png" LOSSY 95;
image: "e064.png" LOSSY 95;
image: "e065.png" LOSSY 95;
image: "e066.png" LOSSY 95;
image: "e067.png" LOSSY 95;
image: "e068.png" LOSSY 95;
image: "e069.png" LOSSY 95;
image: "e070.png" LOSSY 95;
image: "e071.png" LOSSY 95;
image: "e072.png" LOSSY 95;
image: "e073.png" LOSSY 95;
image: "e074.png" LOSSY 95;
image: "e075.png" LOSSY 95;
image: "e076.png" LOSSY 95;
image: "e077.png" LOSSY 95;
image: "e078.png" LOSSY 95;
image: "e079.png" LOSSY 95;
image: "e080.png" LOSSY 95;
image: "e081.png" LOSSY 95;
image: "e082.png" LOSSY 95;
image: "e083.png" LOSSY 95;
image: "e084.png" LOSSY 95;
image: "e085.png" LOSSY 95;
image: "e086.png" LOSSY 95;
image: "e087.png" LOSSY 95;
image: "e088.png" LOSSY 95;
image: "e089.png" LOSSY 95;
image: "e090.png" LOSSY 95;
image: "e091.png" LOSSY 95;
image: "e092.png" LOSSY 95;
image: "e093.png" LOSSY 95;
image: "e094.png" LOSSY 95;
image: "e095.png" LOSSY 95;
image: "e096.png" LOSSY 95;
image: "e097.png" LOSSY 95;
image: "e098.png" LOSSY 95;
image: "e099.png" LOSSY 95;
image: "e100.png" LOSSY 95;
image: "e101.png" LOSSY 95;
image: "e102.png" LOSSY 95;
image: "e103.png" LOSSY 95;
image: "e104.png" LOSSY 95;
image: "e105.png" LOSSY 95;
image: "e106.png" LOSSY 95;
image: "e107.png" LOSSY 95;
image: "e108.png" LOSSY 95;
image: "e109.png" LOSSY 95;
image: "e110.png" LOSSY 95;
image: "e111.png" LOSSY 95;
image: "e112.png" LOSSY 95;
image: "e113.png" LOSSY 95;
image: "e114.png" LOSSY 95;
image: "e115.png" LOSSY 95;
image: "e116.png" LOSSY 95;
image: "e117.png" LOSSY 95;
image: "e118.png" LOSSY 95;
image: "e119.png" LOSSY 95;
image: "e120.png" LOSSY 95;
}
data
{
item: "My Data" "The string to attach to this data";
item: "The Key" "String data attached to the key";
}
collections {
group {
name: "test";
min: 128 128;
max: 1024 768;
data {
item: "My Data" "The string to attach to this data";
item: "The Key" "String data attached to the key";
}
script {
public global_int;
public global_float;
public global_str;
public global_click_count;
public timer_cb(val)
{
emit("PROGRAAAAAAAM", "TIMER@!@!@!@!@!@!@!");
}
public anim_cb(val, Float: pos)
{
new buf[100];
snprintf(buf, 100, "val = %i, pos = %f", val, pos);
emit("PR AAAAAAAAANIM", buf);
}
public message(Msg_Type:type, id, ...)
{
emit("MSG", "PROCESS");
if (type == MSG_NONE)
{
new buf[100];
snprintf(buf, sizeof(buf), "ID: %i", id);
emit("MESSAGE_NONE", buf);
}
else if (type == MSG_STRING)
{
new str[100];
new buf[100];
snprintf(buf, sizeof(buf), "MESSAGE STRING ID: %i", id);
for (new j = 0; j < (sizeof(str) - 1); j++)
{
str[j] = getarg(2, j);
if (str[j] == 0) break;
}
emit(buf, str);
}
else if (type == MSG_INT_SET)
{
new buf[100];
snprintf(buf, sizeof(buf), "MESSAGE INT SET ID: %i", id);
for (new i = 2; i < numargs(); i++)
{
new val;
new str[100];
val = getarg(i);
snprintf(str, sizeof(str), "V %i", val);
emit(buf, str);
}
}
}
}
parts {
part {
name: "background";
mouse_events: 0;
description {
state: "default" 0.0;
color_class: "bg";
rel1 {
relative: 0.0 0.0;
offset: 0 0;
}
rel2 {
relative: 1.0 1.0;
offset: -1 -1;
}
image {
normal: "bg.png";
}
border: 12 12 12 12;
}
}
part {
name: "text";
type: TEXT;
effect: SOFT_SHADOW;
description {
state: "default" 0.0;
rel1 {
relative: 1.0 0.0;
offset: 0 0;
to: "logo";
}
rel2 {
relative: 3.0 1.0;
offset: -64 -1;
to: "logo";
}
color_class: "fg";
color: 255 255 255 255;
// color2: 0 0 255 255;
color3: 0 0 0 32;
text {
text: "This is a longer test string";
text_class: "plainjane";
font: "Vera";
size: 10;
// fit: 0 1;
// min: 1 1;
align: 0.0 0.5;
}
}
}
/* test swallowing */
/*
part {
name: "swallow";
mouse_events: 0;
type: RECT;
description {
state: "default" 0.0;
rel1 {
relative: 0.0 1.0;
offset: 0 0;
to: "logo";
}
rel2 {
relative: 1.0 1.0;
offset: -1 99;
to: "logo";
}
color: 0 0 0 100;
}
}
*/
part {
name: "logo";
description {
state: "default" 0.0;
min: 64 64;
max: 320 320;
aspect: 1.0 1.0;
rel1 {
relative: 0.0 0.0;
offset: 16 16;
}
rel2 {
relative: 0.3 0.3;
offset: 15 16;
}
image {
normal: "e.png";
}
/*
fill {
smooth: 0;
}
*/
}
description {
state: "clicked" 0.0;
min: 48 48;
max: 280 280;
aspect: 1.0 1.0;
rel1 {
relative: 0.0 0.0;
offset: 20 20;
}
rel2 {
relative: 0.3 0.3;
offset: 12 12;
}
image {
normal: "e.png";
}
}
}
part {
name: "logo_anim";
// clip_to: "clip";
description {
state: "default" 0.0;
max: 160 120;
aspect: 1.3333 1.3333;
rel1 {
relative: 0.0 0.0;
offset: 16 16;
}
rel2 {
relative: 1.0 1.0;
offset: -17 -17;
}
image {
normal: "e120.png";
tween: "e001.png";
tween: "e002.png";
tween: "e003.png";
tween: "e004.png";
tween: "e005.png";
tween: "e006.png";
tween: "e007.png";
tween: "e008.png";
tween: "e009.png";
tween: "e010.png";
tween: "e011.png";
tween: "e012.png";
tween: "e013.png";
tween: "e014.png";
tween: "e015.png";
tween: "e016.png";
tween: "e017.png";
tween: "e018.png";
tween: "e019.png";
tween: "e020.png";
tween: "e021.png";
tween: "e022.png";
tween: "e023.png";
tween: "e024.png";
tween: "e025.png";
tween: "e026.png";
tween: "e027.png";
tween: "e028.png";
tween: "e029.png";
tween: "e030.png";
tween: "e031.png";
tween: "e032.png";
tween: "e033.png";
tween: "e034.png";
tween: "e035.png";
tween: "e036.png";
tween: "e037.png";
tween: "e038.png";
tween: "e039.png";
tween: "e040.png";
tween: "e041.png";
tween: "e042.png";
tween: "e043.png";
tween: "e044.png";
tween: "e045.png";
tween: "e046.png";
tween: "e047.png";
tween: "e048.png";
tween: "e049.png";
tween: "e050.png";
tween: "e051.png";
tween: "e052.png";
tween: "e053.png";
tween: "e054.png";
tween: "e055.png";
tween: "e056.png";
tween: "e057.png";
tween: "e058.png";
tween: "e059.png";
tween: "e060.png";
tween: "e061.png";
tween: "e062.png";
tween: "e063.png";
tween: "e064.png";
tween: "e065.png";
tween: "e066.png";
tween: "e067.png";
tween: "e068.png";
tween: "e069.png";
tween: "e070.png";
tween: "e071.png";
tween: "e072.png";
tween: "e073.png";
tween: "e074.png";
tween: "e075.png";
tween: "e076.png";
tween: "e077.png";
tween: "e078.png";
tween: "e079.png";
tween: "e080.png";
tween: "e081.png";
tween: "e082.png";
tween: "e083.png";
tween: "e084.png";
tween: "e085.png";
tween: "e086.png";
tween: "e087.png";
tween: "e088.png";
tween: "e089.png";
tween: "e090.png";
tween: "e091.png";
tween: "e092.png";
tween: "e093.png";
tween: "e094.png";
tween: "e095.png";
tween: "e096.png";
tween: "e097.png";
tween: "e098.png";
tween: "e099.png";
tween: "e100.png";
tween: "e101.png";
tween: "e102.png";
tween: "e103.png";
tween: "e104.png";
tween: "e105.png";
tween: "e106.png";
tween: "e107.png";
tween: "e108.png";
tween: "e109.png";
tween: "e110.png";
tween: "e111.png";
tween: "e112.png";
tween: "e113.png";
tween: "e114.png";
tween: "e115.png";
tween: "e116.png";
tween: "e117.png";
tween: "e118.png";
tween: "e119.png";
}
}
}
part {
name: "dragable";
mouse_events: 1;
dragable {
// drag in: DIR: ON/OFF STEPPING COUNT;
x: -1 1 0;
y: 1 1 0;
confine: "background";
}
description {
state: "default" 0.0;
min: 36 36;
rel1 {
relative: 0.5 0.5;
offset: 0 0;
}
rel2 {
relative: 0.5 0.5;
offset: 0 0;
}
image {
normal: "bg.png";
}
border: 12 12 12 12;
}
}
}
programs {
program {
name: "logo_click";
signal: "mouse,down,1";
source: "logo";
// test to see if program loops can be avoided
// signal: "*";
// source: "*";
action: STATE_SET "clicked" 0.0;
transition: LINEAR 0.0;
target: "logo";
}
program {
name: "logo_unclick";
signal: "mouse,up,1";
source: "logo";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.25;
target: "logo";
}
program {
name: "logo_animate";
signal: "show";
source: "";
action: STATE_SET "default" 0.0;
transition: LINEAR 4.0;
target: "logo_anim";
after: "logo_animate"; // at end... loop
}
program {
name: "logo_animate_stop";
signal: "mouse,down,1";
source: "logo_anim";
action: ACTION_STOP;
target: "logo_animate";
}
// Test get_drag_dir function. Clicking with mouse button
// 1 on that long rectangle causes a print-out of its
// dragability directions.
program {
name: "test_drag_dir";
signal: "mouse,down,1";
source: "dragable";
script {
new j;
new buff[256];
j = get_drag_dir(PART:"dragable");
snprintf(buff, 256, "**Drag Direction** %i", j);
emit("DEBUG...", buff);
}
}
// Test the get_drag function. Dragging the long rectangle
// causes print-out of dragging coordinates.
program {
name: "test_get_drag";
signal: "drag";
source: "dragable";
script {
new Float:dx;
new Float:dy;
new buff[256];
get_drag(PART:"dragable", dx, dy);
snprintf(buff, 256, "**Drag** x: %f y: %f", dx, dy);
emit("DEBUG...", buff);
}
}
// Test the set_drag function. Clicking with mouse button
// 3 on the text object causes the long rectangle to be
// translated to the coordinates (0.1, 0.5)
program {
name: "test_set_drag";
signal: "mouse,down,3";
source: "text";
script {
set_drag(PART:"dragable", 0.1, 0.5);
emit("DEBUG...", "SET_DRAG");
}
}
// Test the set_text and get_text functions. Clicking down on
// the text with button 1 changes the text, releasing reverts.
program {
name: "test_set_and_get_text1";
signal: "mouse,down,1";
source: "text";
script {
new buf[256];
get_text(PART:"text", buf, 256);
emit("DEBUG...", buf);
set_text(PART:"text", "Text has changed");
new r,g,b,a;
set_color_class("bg", 255, 0, 0, 127);
get_color_class("bg", r, g, b, a);
snprintf(buf, 256, "r: %i g: %i b: %i a: %i", r, g, b, a);
emit("DEBUG...", buf);
new font[100];
new Float:size;
get_text_class("plainjane", font, size);
snprintf(buf, 256, "%s SIZE: %f", font, size);
emit("DEBUG...", buf);
set_text_class("plainjane", "Vera Bold", 10.0);
}
}
program {
name: "test_set_and_get_text2";
signal: "mouse,up,1";
source: "text";
script {
set_text(PART:"text", "This is a longer test string");
new w;
new h;
new w2;
new h2;
get_min_size(w, h);
get_max_size(w2, h2);
new buf[256];
snprintf(buf, 256, "**Min Size** w: %i h: %i\n**Max Size** w: %i h: %i", w, h, w2, h2);
emit("DEBUG...", buf);
get_mouse(w,h);
snprintf(buf, 256, "**Mouse at** x: %i y: %i\n", w, h);
emit("DEBUG...", buf);
set_color_class("bg", 255, 255, 255, 255);
set_text_class("plainjane", "Vera", 8.0);
}
}
program {
name: "logo_animate_signal";
signal: "mouse,up,1";
source: "logo_anim";
// action: SIGNAL_EMIT "do_it" "the_source";
script {
set_int(global_int, PART:"logo");
set_int(global_int, PART:"dragable");
set_int(global_int, IMAGE:"e001.png");
set_int(global_int, IMAGE:"e002.png");
set_int(global_int, IMAGE:"e003.png");
set_int(global_int, IMAGE:"e007.png");
set_int(global_int, PROGRAM:"logo_animate_signal");
set_int(global_int, PROGRAM:"logo_animate_signal");
set_int(global_int, PROGRAM:"logo_animate_signal");
emit("PROGRAAAAAAAM", "TEEEEEEEEEEEEEST");
// set_int(global_int, 10);
set_float(global_float, 10.0);
set_str(global_str, "smelly fish");
new buf[256];
new i;
i = get_int(global_int);
snprintf(buf, 256, "1. i = %i :)", i);
emit("DEBUG...", buf);
new Float:f;
f = get_float(global_float);
snprintf(buf, 256, "2. f = %f :)", f);
emit("DEBUG...", buf);
new s[256];
get_str(global_str, s, 256);
snprintf(buf, 256, "3. s = %s :)", s);
emit("DEBUG...", buf);
set_state(PART:"logo", "clicked", 0.0);
set_tween_state(PART:"logo", randf(), "default", 0.0, "clicked", 0.0);
run_program(PROGRAM:"logo_click_d2");
timer(2.5, "timer_cb", 777);
anim(1.5, "anim_cb", 7777);
}
}
#if 0
program {
name: "random_signal";
signal: "show";
source: "";
in: 1.0 5.0;
action: SIGNAL_EMIT "do_random" "the_source";
}
program {
name: "random_signal";
signal: "do_random";
source: "the_source";
in: 1.0 5.0;
action: SIGNAL_EMIT "do_random" "the_source";
}
#endif
program {
name: "logo_click_d1";
signal: "mouse,down,1";
source: "logo";
action: DRAG_VAL_STEP 1.0 1.0;
target: "dragable";
}
program {
name: "logo_click_d2";
signal: "mouse,down,2";
source: "logo";
script {
new i = get_int(global_click_count);
set_int(global_click_count, i + 1);
if (i < 5)
send_message(MSG_NONE, 777);
else if (i < 10)
send_message(MSG_STRING, 123, "blah blah panties");
}
}
program {
name: "logo_click_d3";
signal: "mouse,down,3";
source: "logo";
action: DRAG_VAL_STEP -1.0 -1.0;
target: "dragable";
}
}
}
}