Rage video and audio player
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2173 lines
71 KiB

efl_version: 1 25;
collections {
#define CTRLSIZE 26
group { name: "rage/core";
images.image: "vg1.png" COMP;
images.image: "shadow_circle_horiz.png" COMP;
images.image: "shadow_circle_vert.png" COMP;
images.image: "icon_exclamation.png" COMP;
images.image: "icon_eject.png" COMP;
images.image: "icon_mute.png" COMP;
images.image: "icon_volume.png" COMP;
images.image: "icon_prev.png" COMP;
images.image: "icon_next.png" COMP;
images.image: "icon_rewind.png" COMP;
images.image: "icon_forward.png" COMP;
images.image: "icon_stop.png" COMP;
images.image: "icon_pause.png" COMP;
images.image: "icon_play.png" COMP;
images.image: "icon_refresh.png" COMP;
images.image: "icon_arrow_right.png" COMP;
images.image: "icon_spanner.png" COMP;
images.image: "icon_fullscreen.png" COMP;
images.image: "icon_unfullscreen.png" COMP;
images.image: "icon_close.png" COMP;
images.image: "win_shadow.png" COMP;
images.image: "tv-bg.png" COMP;
images.image: "tv-over.png" COMP;
images.image: "r-0.png" COMP;
images.image: "r-1.png" COMP;
images.image: "r-2.png" COMP;
images.image: "r-3.png" COMP;
images.image: "r-4.png" COMP;
script {
public pos_visible;
public pos_timer;
public drag_is_down;
public novideo;
public browser;
public message(Msg_Type:type, id, ...) {
if ((type == MSG_FLOAT) && (id == 1)) { // volume 0.0->1.0
new Float:val = getfarg(2);
if (val < 0.0) val = 0.0;
else if (val > 1.0) val = 1.0;
custom_state(PART:"vol_indicator_fg", "default", 0.0);
set_state_val(PART:"vol_indicator_fg", STATE_REL2, val, 1.0);
set_state(PART:"vol_indicator_fg", "custom", 0.0);
}
}
public pos_timeout(val) {
set_int(pos_timer, 0);
if (get_int(pos_visible)) {
set_int(pos_visible, 0);
stop_program(PROGRAM:"poshide");
stop_program(PROGRAM:"posshow");
run_program(PROGRAM:"poshide");
stop_program(PROGRAM:"cbarhide");
stop_program(PROGRAM:"cbarshow");
run_program(PROGRAM:"cbarhide");
}
}
public pos_show() {
if (!get_int(browser)) {
new t;
if (!get_int(pos_visible)) {
set_int(pos_visible, 1);
stop_program(PROGRAM:"poshide");
stop_program(PROGRAM:"posshow");
run_program(PROGRAM:"posshow");
stop_program(PROGRAM:"cbarhide");
stop_program(PROGRAM:"cbarshow");
run_program(PROGRAM:"cbarshow");
}
t = get_int(pos_timer);
if (t) cancel_timer(t);
t = timer(5.0, "pos_timeout", 1);
set_int(pos_timer, t);
}
}
}
parts {
//// -- BACKGROUND
part { name: "bg"; type: RECT; mouse_events: 0;
description { state: "default" 0.0;
color: 64 64 64 255;
}
}
part { name: "vg1"; mouse_events: 0;
description { state: "default" 0.0;
fixed: 1 1;
rel2.relative: 1.0 0.5;
image.normal: "vg1.png";
color: 64 64 64 255;
fill {
size.relative: 0.0 1.0;
size.offset: 256 0;
smooth: 0;
}
}
description { state: "focused" 0.0;
inherit: "default" 0.0;
color: 32 32 32 255;
}
}
program { signal: "state,win,focused"; source: "rage";
action: STATE_SET "focused" 0.0;
target: "vg1";
}
program { signal: "state,win,unfocused"; source: "rage";
action: STATE_SET "default" 0.0;
target: "vg1";
}
part { name: "shadow"; type: RECT;
description { state: "default" 0.0;
visible: 0;
}
description { state: "video" 0.0;
inherit: "default" 0.0;
visible: 1;
}
description { state: "novideo" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
part { name: "sh_t"; nomouse;
scale: 1;
clip_to: "shadow";
description { state: "default" 0.0;
rel.to: "rage.content";
rel2.relative: 1.0 0.0;
image.normal: "shadow_circle_horiz.png";
min: 0 32;
color: 255 255 255 128;
fixed: 1 1;
}
}
part { name: "sh_b"; nomouse;
scale: 1;
clip_to: "shadow";
description { state: "default" 0.0;
rel.to: "rage.content";
rel1.relative: 0.0 1.0;
image.normal: "shadow_circle_horiz.png";
min: 0 32;
color: 255 255 255 128;
fixed: 1 1;
}
}
part { name: "sh_l"; nomouse;
scale: 1;
clip_to: "shadow";
description { state: "default" 0.0;
rel.to: "rage.content";
rel2.relative: 0.0 1.0;
image.normal: "shadow_circle_vert.png";
min: 32 0;
color: 255 255 255 128;
fixed: 1 1;
}
}
part { name: "sh_r"; nomouse;
scale: 1;
clip_to: "shadow";
description { state: "default" 0.0;
rel.to: "rage.content";
rel1.relative: 1.0 0.0;
image.normal: "shadow_circle_vert.png";
min: 32 0;
color: 255 255 255 128;
fixed: 1 1;
}
}
part { name: "black"; type: RECT; mouse_events: 0;
description { state: "default" 0.0;
color: 0 0 0 0;
visible: 0;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
color: 0 0 0 255;
visible: 1;
}
}
program { signal: "state,win,fullscreen"; source: "rage";
action: STATE_SET "visible" 0.0;
transition: SINUSOIDAL 0.2;
target: "black";
}
program { signal: "state,win,normal"; source: "rage";
action: STATE_SET "default" 0.0;
transition: SINUSOIDAL 1.0;
target: "black";
}
part { name: "base"; type: RECT; mouse_events: 0;
description { state: "default" 0.0;
rel.to: "rage.content";
color: 0 0 0 255;
visible: 0;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
color: 32 32 32 255;
}
description { state: "play" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
part { name: "exclam"; mouse_events: 0;
scale: 1;
clip_to: "novid_clip";
description { state: "default" 0.0;
rel.to: "base";
fixed: 1 1;
image.normal: "icon_exclamation.png";
max: 24 24;
aspect: 1.0 1.0; aspect_preference: BOTH;
color: 255 255 255 0;
visible: 0;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255;
visible: 1;
}
description { state: "play" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
program { signal: "action,newvid"; source: "rage";
action: STATE_SET "default" 0.0;
target: "exclam";
target: "base";
after: "newvid2";
}
program { name: "newvid2";
action: STATE_SET "visible" 0.0;
in: 2.0 0.0;
transition: SINUSOIDAL 1.0;
target: "exclam";
target: "base";
}
program { signal: "action,frame"; source: "rage";
action: STATE_SET "play" 0.0;
target: "exclam";
target: "base";
}
part { name: "content_black"; type: RECT; mouse_events: 0;
description { state: "default" 0.0;
rel.to: "rage.content";
color: 0 0 0 255;
visible: 0;
}
description { state: "novideo" 0.0;
inherit: "default" 0.0;
visible: 0;
}
description { state: "video" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "rage.content"; type: SWALLOW;
description { state: "default" 0.0;
visible: 0;
}
description { state: "novideo" 0.0;
visible: 0;
}
description { state: "video" 0.0;
visible: 1;
}
}
part { name: "controlbar_shadow_clip"; type: RECT;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
rel2.relative: 1.0 0.0;
rel2.to_y: "controlbar";
}
}
part { name: "controlbar_shadow"; mouse_events: 0;
scale: 1;
clip_to: "controlbar_shadow_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel.to: "controlbar";
rel2.relative: 1.0 0.0;
image.normal: "shadow_circle_horiz.png";
min: 0 32;
color: 255 255 255 128;
}
}
part { name: "prefsize"; type: SPACER;
scale: 1;
description { state: "default" 0.0;
rel2.to: "controlbar";
rel2.relative: 1.0 0.0;
}
description { state: "pref" 0.0;
inherit: "default" 0.0;
min: 290 238;
}
}
program { signal: "pref,size,on"; source: "rage";
action: STATE_SET "pref" 0.0;
target: "prefsize";
}
program { signal: "pref,size,off"; source: "rage";
action: STATE_SET "default" 0.0;
target: "prefsize";
}
part { name: "novid_clip"; type: RECT;
description { state: "default" 0.0;
}
description { state: "novideo" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
part { name: "speaker_clip"; type: RECT;
description { state: "default" 0.0;
visible: 0;
}
description { state: "novideo" 0.0;
inherit: "default" 0.0;
visible: 1;
}
description { state: "video" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
part { name: "art_clip"; type: RECT;
clip_to: "speaker_clip";
scale: 1;
description { state: "default" 0.0;
visible: 0;
color: 255 255 255 0;
rel1.relative: -0.5 -0.5;
rel2.relative: 1.5 1.5;
aspect: 1.0 1.0; aspect_preference: NONE;
max: 580 580;
fixed: 1 1;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 0.0;
rel2.relative: 1.0 1.0;
visible: 1;
color: 255 255 255 255;
max: 290 290;
}
}
part { name: "art_clip2"; type: RECT;
clip_to: "art_clip";
description { state: "default" 0.0;
fixed: 1 1;
}
}
part { name: "art_clip3"; type: RECT;
description { state: "default" 0.0;
visible: 0;
color: 255 255 255 0;
fixed: 1 1;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 0.0;
rel2.relative: 1.0 1.0;
visible: 1;
color: 255 255 255 255;
}
}
part { name: "artshadow"; mouse_events: 0;
clip_to: "art_clip3";
description { state: "default" 0.0;
rel.to: "art_clip";
color: 255 255 255 128;
image.normal: "win_shadow.png";
image.border: 14 14 14 14;
image.middle: 0;
rel1.offset: -7 -3;
rel2.offset: 6 11;
fill.smooth: 0;
fixed: 1 1;
}
}
part { name: "rage.art"; type: SWALLOW; mouse_events: 0;
clip_to: "art_clip2";
description { state: "default" 0.0;
rel.to: "art_clip";
}
}
program { signal: "state,novideo"; source: "rage";
action: STATE_SET "novideo" 0.0;
target: "speaker_clip";
target: "shadow";
target: "statusloc";
target: "content_black";
target: "rage.content";
}
program { signal: "state,default"; source: "rage";
action: STATE_SET "default" 0.0;
target: "speaker_clip";
target: "shadow";
target: "statusloc";
target: "content_black";
target: "rage.content";
}
program { signal: "state,video"; source: "rage";
action: STATE_SET "video" 0.0;
target: "speaker_clip";
target: "shadow";
target: "statusloc";
target: "content_black";
target: "rage.content";
}
program { signal: "state,novideo"; source: "rage";
script {
set_int(novideo, 1);
pos_show();
}
}
program { signal: "state,video"; source: "rage";
script {
set_int(novideo, 0);
pos_show();
}
}
program { signal: "state,novideo"; source: "rage";
action: STATE_SET "default" 0.0;
transition: ACCELERATE 0.2;
target: "art_clip";
target: "art_clip3";
}
program { signal: "state,default"; source: "rage";
action: STATE_SET "default" 0.0;
transition: ACCELERATE 0.2;
target: "art_clip";
target: "art_clip3";
}
program { signal: "state,video"; source: "rage";
action: STATE_SET "default" 0.0;
transition: ACCELERATE 0.2;
target: "art_clip";
target: "art_clip3";
}
program { signal: "action,newvid"; source: "rage";
action: STATE_SET "default" 0.0;
transition: ACCELERATE 0.2;
target: "art_clip";
target: "art_clip3";
}
program { signal: "state,noart"; source: "rage";
action: STATE_SET "default" 0.0;
transition: ACCELERATE 0.3;
target: "art_clip";
target: "art_clip3";
}
program { signal: "state,art"; source: "rage";
action: STATE_SET "visible" 0.0;
transition: DECELERATE 0.3;
target: "art_clip";
target: "art_clip3";
}
snapshot { "art_filter";
clip_to: "art_clip";
desc { state: "default" 0.0;
rel.to: "art_clip";
filter.code: "padding_set { 0 } blur { state.pos * 50, color = '#ffff' }";
visible: 0;
}
desc { state: "visible" 0.0;
inherit: "default" 0.0;
filter.code: "padding_set { 0 } blur { (1.0 - state.pos) * 50, color = '#ffff' }";
visible: 1;
}
}
program { signal: "action,play"; source: "rage";
action: STATE_SET "default" 0.0;
transition: SINUSOIDAL 0.2;
target: "art_filter";
}
program { signal: "action,pause"; source: "rage";
action: STATE_SET "visible" 0.0;
transition: SINUSOIDAL 0.4;
target: "art_filter";
}
part { name: "rage.gesture"; type: SWALLOW;
description { state: "default" 0.0;
rel2.to_y: "controlbar";
rel2.relative: 1.0 0.0;
}
}
part { name: "browser2"; type: SPACER;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
}
description { state: "fs" 0.0;
inherit: "default" 0.0;
rel1.offset: 40 0;
rel2.offset: -41 -1;
offscale;
}
}
part { name: "rage.browser"; type: SWALLOW;
description { state: "default" 0.0;
rel.to: "browser2";
rel1.relative: 1.0 0.0;
rel2.relative: 2.0 1.0;
fixed: 1 1;
visible: 0;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 0.0;
rel2.relative: 1.0 1.0;
visible: 1;
}
}
program { signal: "browser,state,visible"; source: "rage";
action: STATE_SET "visible" 0.0;
transition: DECELERATE 0.3;
target: "rage.browser";
}
program { signal: "browser,state,visible"; source: "rage";
script {
set_int(browser, 1);
if (get_int(pos_visible)) {
new t = get_int(pos_timer);
if (t) cancel_timer(t);
pos_timeout(0);
}
}
}
program { signal: "browser,state,hidden"; source: "rage";
action: STATE_SET "default" 0.0;
transition: ACCELERATE 0.5;
target: "rage.browser";
after: "browser_hidden";
}
program { name: "browser_hidden";
action: SIGNAL_EMIT "browser,state,hidden,finished" "rage";
after: "browser_hidden2";
}
program { name: "browser_hidden2";
script {
set_int(browser, 0);
pos_show();
}
}
program { signal: "state,win,fullscreen"; source: "rage";
action: STATE_SET "fs" 0.0;
target: "browser2";
}
program { signal: "state,win,normal"; source: "rage";
action: STATE_SET "default" 0.0;
target: "browser2";
}
part { name: "rage.list"; type: SWALLOW;
description { state: "default" 0.0;
align: 0.0 0.5;
rel1.relative: 1.0 0.0;
rel2.relative: 1.0 0.0;
rel2.to_y: "controlbar";
fixed: 1 1;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
align: 1.0 0.5;
visible: 1;
}
}
program { signal: "list,state,visible"; source: "rage";
action: STATE_SET "visible" 0.0;
transition: DECELERATE 0.3;
target: "rage.list";
}
program { signal: "list,state,hidden"; source: "rage";
action: STATE_SET "default" 0.0;
transition: ACCELERATE 0.5;
target: "rage.list";
after: "list_hidden";
}
program { name: "list_hidden";
action: SIGNAL_EMIT "list,state,hidden,finished" "rage";
}
part { name: "controlbar_clip"; type: RECT;
description { state: "default" 0.0;
color: 255 255 255 0;
visible: 0;
}
description { state: "visible" 0.0;
color: 255 255 255 255;
visible: 1;
}
}
part { name: "controlbar"; type: RECT; mouse_events: 0;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
color: 64 64 64 128;
rel1.to: "rage.pos.prev.swallow";
}
description { state: "novideo" 0.0;
inherit: "default" 0.0;
color: 64 64 64 0;
visible: 0;
}
}
program { signal: "state,novideo"; source: "rage";
action: STATE_SET "default" 0.0;
target: "controlbar";
}
program { signal: "state,video"; source: "rage";
action: STATE_SET "default" 0.0;
target: "controlbar";
}
part { name: "posclip"; type: RECT;
description { state: "default" 0.0;
color: 255 255 255 0;
visible: 0;
}
description { state: "visible" 0.0;
color: 255 255 255 255;
visible: 1;
}
}
part { name: "bar_bg"; type: SPACER;
description { state: "default" 0.0;
fixed: 1 1;
rel1.offset: 0 -1;
rel1.relative: 0.0 1.0;
min: 1 1;
}
}
part { name: "rage.dragable.pos"; type: RECT; mouse_events: 0;
clip_to: "controlbar_clip";
dragable.x: 1 1 0;
dragable.y: 0 0 0;
dragable.confine: "bar_bg";
description { state: "default" 0.0;
min: 1 1;
max: 1 1;
rel1.relative: 0.5 0.0;
rel1.to_x: "bar_bg";
rel2.relative: 0.5 1.0;
rel2.to_x: "bar_bg";
color: 0 0 0 0;
fixed: 1 1;
}
}
part { name: "bar"; type: RECT; mouse_events: 0;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
fixed: 1 1;
color: 51 153 255 255;
rel1.offset: 0 -5;
rel1.relative: 0.0 1.0;
rel1.to_x: "bar_bg";
rel2.to_x: "rage.dragable.pos";
min: 0 5;
}
}
part { name: "rage.pos.swallow"; type: SWALLOW;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
rel.to: "rage.dragable.pos";
align: 0.5 1.0;
min: CTRLSIZE CTRLSIZE;
}
}
part { name: "posevent"; type: RECT;
clip_to: "controlbar_clip";
scale: 1;
ignore_flags: ON_HOLD;
dragable.events: "rage.dragable.pos";
description { state: "default" 0.0;
fixed: 1 1;
rel.to: "rage.pos.swallow";
color: 0 0 0 0;
min: CTRLSIZE CTRLSIZE;
align: 0.5 1.0;
}
}
part { name: "rage.pos.prev.swallow"; type: SWALLOW;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
rel1.relative: 0.0 0.0;
rel1.to_y: "dragover_event";
rel2.relative: 0.0 0.0;
rel2.to_y: "dragover_event";
min: CTRLSIZE CTRLSIZE;
align: 0.0 1.0;
}
}
part { name: "rage.pos.play.swallow"; type: SWALLOW;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
rel1.to_x: "rage.pos.prev.swallow";
rel1.to_y: "dragover_event";
rel1.relative: 1.0 0.0;
rel2.to_x: "rage.pos.prev.swallow";
rel2.to_y: "dragover_event";
rel2.relative: 1.0 0.0;
min: CTRLSIZE CTRLSIZE;
align: 0.0 1.0;
}
}
part { name: "rage.pos.next.swallow"; type: SWALLOW;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
rel1.to_x: "rage.pos.play.swallow";
rel1.to_y: "dragover_event";
rel1.relative: 1.0 0.0;
rel2.to_x: "rage.pos.play.swallow";
rel2.to_y: "dragover_event";
rel2.relative: 1.0 0.0;
min: CTRLSIZE CTRLSIZE;
align: 0.0 1.0;
}
}
part { name: "rage.vol.swallow"; type: SWALLOW;
scale: 1;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel1.to_y: "dragover_event";
rel1.relative: 1.0 0.0;
rel2.to_y: "dragover_event";
rel2.relative: 1.0 0.0;
min: (CTRLSIZE*4) CTRLSIZE;
align: 1.0 1.0;
}
}
part { name: "pos_prev";
scale: 1;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel.to: "rage.pos.prev.swallow";
image.normal: "icon_prev.png";
min: CTRLSIZE CTRLSIZE; max: CTRLSIZE CTRLSIZE;
}
description { state: "active" 0.0;
inherit: "default" 0.0;
color: 160 160 160 255;
}
}
part { name: "pos_prevev"; type: RECT;
description { state: "default" 0.0;
rel.to: "rage.pos.prev.swallow";
color: 0 0 0 0;
}
}
program { signal: "mouse,down,1"; source: "pos_prevev";
action: STATE_SET "active" 0.0;
target: "pos_prev";
}
program { signal: "mouse,up,1"; source: "pos_prevev";
action: STATE_SET "default" 0.0;
target: "pos_prev";
}
part { name: "playpause"; type: RECT;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
visible: 0;
}
description { state: "pause" 0.0;
visible: 1;
}
}
part { name: "playpause2"; type: RECT;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
visible: 1;
}
description { state: "pause" 0.0;
visible: 0;
}
}
part { name: "pos_pause"; scale: 1;