forked from enlightenment/enlightenment
parent
31753dfde4
commit
b7de1627bd
|
@ -45,6 +45,7 @@ edc/ilist.edc \
|
||||||
edc/init.edc \
|
edc/init.edc \
|
||||||
edc/label.edc \
|
edc/label.edc \
|
||||||
edc/menu.edc \
|
edc/menu.edc \
|
||||||
|
edc/mixer.edc \
|
||||||
edc/notification.edc \
|
edc/notification.edc \
|
||||||
edc/pager.edc \
|
edc/pager.edc \
|
||||||
edc/pointer.edc \
|
edc/pointer.edc \
|
||||||
|
@ -199,6 +200,7 @@ img/knob_sz_20.png \
|
||||||
img/knob_sz_22.png \
|
img/knob_sz_22.png \
|
||||||
img/knob_sz_24.png \
|
img/knob_sz_24.png \
|
||||||
img/led_dark.png \
|
img/led_dark.png \
|
||||||
|
img/led_dot_white.png \
|
||||||
img/led_light.png \
|
img/led_light.png \
|
||||||
img/led_red_light.png \
|
img/led_red_light.png \
|
||||||
img/led_strobe.png \
|
img/led_strobe.png \
|
||||||
|
@ -247,6 +249,7 @@ img/slider_run_bevel_horiz.png \
|
||||||
img/slider_run_bevel_vert.png \
|
img/slider_run_bevel_vert.png \
|
||||||
img/slot_horiz_bottom.png \
|
img/slot_horiz_bottom.png \
|
||||||
img/slot_horiz_top.png \
|
img/slot_horiz_top.png \
|
||||||
|
img/speaker.png \
|
||||||
img/sym_check_alum.png \
|
img/sym_check_alum.png \
|
||||||
img/sym_close_dark_normal.png \
|
img/sym_close_dark_normal.png \
|
||||||
img/sym_close_dark_selected.png \
|
img/sym_close_dark_selected.png \
|
||||||
|
|
|
@ -55,6 +55,7 @@ collections {
|
||||||
#include "edc/cpufreq.edc"
|
#include "edc/cpufreq.edc"
|
||||||
#include "edc/temperature.edc"
|
#include "edc/temperature.edc"
|
||||||
#include "edc/backlight.edc"
|
#include "edc/backlight.edc"
|
||||||
|
#include "edc/mixer.edc"
|
||||||
|
|
||||||
// port unchanged stuff so this can work as a replacement
|
// port unchanged stuff so this can work as a replacement
|
||||||
#include "edc/O/battery.edc"
|
#include "edc/O/battery.edc"
|
||||||
|
@ -64,8 +65,8 @@ collections {
|
||||||
#include "edc/O/evrything.edc"
|
#include "edc/O/evrything.edc"
|
||||||
#include "edc/O/icons.edc"
|
#include "edc/O/icons.edc"
|
||||||
#include "edc/O/illume_gad.edc"
|
#include "edc/O/illume_gad.edc"
|
||||||
#include "edc/O/mixer.edc"
|
|
||||||
#include "edc/O/wallpaper.edc"
|
#include "edc/O/wallpaper.edc"
|
||||||
|
//#include "edc/O/mixer.edc"
|
||||||
//#include "edc/O/backlight.edc"
|
//#include "edc/O/backlight.edc"
|
||||||
//#include "edc/O/temperature.edc"
|
//#include "edc/O/temperature.edc"
|
||||||
//#include "edc/O/cpufreq.edc"
|
//#include "edc/O/cpufreq.edc"
|
||||||
|
|
|
@ -0,0 +1,205 @@
|
||||||
|
group { name: "e/modules/mixer/main";
|
||||||
|
images.image: "speaker.png" COMP;
|
||||||
|
images.image: "led_dot_white.png" COMP;
|
||||||
|
max: 160 160;
|
||||||
|
min: 16 16;
|
||||||
|
script {
|
||||||
|
public message(Msg_Type:type, id, ...) {
|
||||||
|
if ((type == MSG_INT_SET) && (id == 0)) {
|
||||||
|
new m, l, r;
|
||||||
|
|
||||||
|
m = getarg(2);
|
||||||
|
l = getarg(3);
|
||||||
|
r = getarg(4);
|
||||||
|
|
||||||
|
if (m) {
|
||||||
|
run_program(PROGRAM:"mute");
|
||||||
|
} else {
|
||||||
|
run_program(PROGRAM:"unmute");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (l <= 0) {
|
||||||
|
run_program(PROGRAM:"l0-off");
|
||||||
|
run_program(PROGRAM:"l1-off");
|
||||||
|
run_program(PROGRAM:"l2-off");
|
||||||
|
run_program(PROGRAM:"l3-off");
|
||||||
|
run_program(PROGRAM:"l4-off");
|
||||||
|
} else if (l <= 20) {
|
||||||
|
run_program(PROGRAM:"l0-on");
|
||||||
|
run_program(PROGRAM:"l1-off");
|
||||||
|
run_program(PROGRAM:"l2-off");
|
||||||
|
run_program(PROGRAM:"l3-off");
|
||||||
|
run_program(PROGRAM:"l4-off");
|
||||||
|
} else if (l <= 40) {
|
||||||
|
run_program(PROGRAM:"l0-on");
|
||||||
|
run_program(PROGRAM:"l1-on");
|
||||||
|
run_program(PROGRAM:"l2-off");
|
||||||
|
run_program(PROGRAM:"l3-off");
|
||||||
|
run_program(PROGRAM:"l4-off");
|
||||||
|
} else if (l <= 60) {
|
||||||
|
run_program(PROGRAM:"l0-on");
|
||||||
|
run_program(PROGRAM:"l1-on");
|
||||||
|
run_program(PROGRAM:"l2-on");
|
||||||
|
run_program(PROGRAM:"l3-off");
|
||||||
|
run_program(PROGRAM:"l4-off");
|
||||||
|
} else if (l <= 80) {
|
||||||
|
run_program(PROGRAM:"l0-on");
|
||||||
|
run_program(PROGRAM:"l1-on");
|
||||||
|
run_program(PROGRAM:"l2-on");
|
||||||
|
run_program(PROGRAM:"l3-on");
|
||||||
|
run_program(PROGRAM:"l4-off");
|
||||||
|
} else {
|
||||||
|
run_program(PROGRAM:"l0-on");
|
||||||
|
run_program(PROGRAM:"l1-on");
|
||||||
|
run_program(PROGRAM:"l2-on");
|
||||||
|
run_program(PROGRAM:"l3-on");
|
||||||
|
run_program(PROGRAM:"l4-on");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (r <= 0) {
|
||||||
|
run_program(PROGRAM:"r0-off");
|
||||||
|
run_program(PROGRAM:"r1-off");
|
||||||
|
run_program(PROGRAM:"r2-off");
|
||||||
|
run_program(PROGRAM:"r3-off");
|
||||||
|
run_program(PROGRAM:"r4-off");
|
||||||
|
} else if (r <= 20) {
|
||||||
|
run_program(PROGRAM:"r0-on");
|
||||||
|
run_program(PROGRAM:"r1-off");
|
||||||
|
run_program(PROGRAM:"r2-off");
|
||||||
|
run_program(PROGRAM:"r3-off");
|
||||||
|
run_program(PROGRAM:"r4-off");
|
||||||
|
} else if (r <= 40) {
|
||||||
|
run_program(PROGRAM:"r0-on");
|
||||||
|
run_program(PROGRAM:"r1-on");
|
||||||
|
run_program(PROGRAM:"r2-off");
|
||||||
|
run_program(PROGRAM:"r3-off");
|
||||||
|
run_program(PROGRAM:"r4-off");
|
||||||
|
} else if (r <= 60) {
|
||||||
|
run_program(PROGRAM:"r0-on");
|
||||||
|
run_program(PROGRAM:"r1-on");
|
||||||
|
run_program(PROGRAM:"r2-on");
|
||||||
|
run_program(PROGRAM:"r3-off");
|
||||||
|
run_program(PROGRAM:"r4-off");
|
||||||
|
} else if (r <= 80) {
|
||||||
|
run_program(PROGRAM:"r0-on");
|
||||||
|
run_program(PROGRAM:"r1-on");
|
||||||
|
run_program(PROGRAM:"r2-on");
|
||||||
|
run_program(PROGRAM:"r3-on");
|
||||||
|
run_program(PROGRAM:"r4-off");
|
||||||
|
} else {
|
||||||
|
run_program(PROGRAM:"r0-on");
|
||||||
|
run_program(PROGRAM:"r1-on");
|
||||||
|
run_program(PROGRAM:"r2-on");
|
||||||
|
run_program(PROGRAM:"r3-on");
|
||||||
|
run_program(PROGRAM:"r4-on");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
parts {
|
||||||
|
part { name: "speaker";
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
aspect: 1 1; aspect_preference: BOTH;
|
||||||
|
image.normal: "speaker.png";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part { name: "state"; type: RECT;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
rel1.relative: -1.0 -1.0;
|
||||||
|
rel2.relative: 2.0 2.0;
|
||||||
|
color: 51 153 255 255;
|
||||||
|
}
|
||||||
|
description { state: "mute" 0.0;
|
||||||
|
inherit: "default" 0.0;
|
||||||
|
color: 255 153 51 255;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#define LED(_NAME, _BASE, _X, _SIZE) \
|
||||||
|
part { name: _NAME; type: RECT; \
|
||||||
|
clip_to: "state"; \
|
||||||
|
description { state: "default" 0.0; \
|
||||||
|
rel1.relative: ((_BASE+(_X*8))/160) (80/160); \
|
||||||
|
rel2.relative: ((_BASE+(_X*8))/160) (80/160); \
|
||||||
|
min: 1 1; \
|
||||||
|
max: 1 1; \
|
||||||
|
visible: 0; \
|
||||||
|
color: 255 255 255 0; \
|
||||||
|
} \
|
||||||
|
description { state: "active" 0.0; \
|
||||||
|
inherit: "default" 0.0; \
|
||||||
|
visible: 1; \
|
||||||
|
color: 255 255 255 255; \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
part { name: _NAME"g"; \
|
||||||
|
clip_to: "state"; \
|
||||||
|
description { state: "default" 0.0; \
|
||||||
|
rel1.to: _NAME; \
|
||||||
|
rel2.to: _NAME; \
|
||||||
|
image.normal: "led_dot_white.png"; \
|
||||||
|
min: _SIZE _SIZE; \
|
||||||
|
visible: 0; \
|
||||||
|
color: 255 255 255 0; \
|
||||||
|
} \
|
||||||
|
description { state: "active" 0.0; \
|
||||||
|
inherit: "default" 0.0; \
|
||||||
|
visible: 1; \
|
||||||
|
color: 255 255 255 255; \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
LED("r0", 99, 0, 1)
|
||||||
|
LED("r1", 99, 1, 9)
|
||||||
|
LED("r2", 99, 2, 15)
|
||||||
|
LED("r3", 99, 3, 21)
|
||||||
|
LED("r4", 99, 4, 27)
|
||||||
|
LED("l0", 61, 0, 1)
|
||||||
|
LED("l1", 61, -1, 9)
|
||||||
|
LED("l2", 61, -2, 15)
|
||||||
|
LED("l3", 61, -3, 21)
|
||||||
|
LED("l4", 61, -4, 27)
|
||||||
|
#undef LED
|
||||||
|
part { name: "over"; type: RECT;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
rel1.to: "speaker";
|
||||||
|
rel2.to: "speaker";
|
||||||
|
color: 255 255 255 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
programs {
|
||||||
|
program { name: "mute";
|
||||||
|
action: STATE_SET "mute" 0.0;
|
||||||
|
transition: LINEAR 0.3;
|
||||||
|
target: "state";
|
||||||
|
}
|
||||||
|
program { name: "unmute";
|
||||||
|
action: STATE_SET "default" 0.0;
|
||||||
|
transition: LINEAR 0.2;
|
||||||
|
target: "state";
|
||||||
|
}
|
||||||
|
#define PROG(_NAME) \
|
||||||
|
program { name: _NAME"-on"; \
|
||||||
|
action: STATE_SET "active" 0.0; \
|
||||||
|
target: _NAME; \
|
||||||
|
target: _NAME"g"; \
|
||||||
|
} \
|
||||||
|
program { name: _NAME"-off"; \
|
||||||
|
action: STATE_SET "default" 0.0; \
|
||||||
|
target: _NAME; \
|
||||||
|
target: _NAME"g"; \
|
||||||
|
}
|
||||||
|
PROG("r0")
|
||||||
|
PROG("r1")
|
||||||
|
PROG("r2")
|
||||||
|
PROG("r3")
|
||||||
|
PROG("r4")
|
||||||
|
PROG("l0")
|
||||||
|
PROG("l1")
|
||||||
|
PROG("l2")
|
||||||
|
PROG("l3")
|
||||||
|
PROG("l4")
|
||||||
|
#undef PROG
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 509 B |
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
Loading…
Reference in New Issue