Revert recent graph-ness. There is a much better way todo this type of stuff.
SVN revision: 31527
This commit is contained in:
parent
8b8f5d5b92
commit
10f78b10dd
|
@ -13,7 +13,6 @@ cpu.edj
|
||||||
EXTRA_DIST = $(files_DATA) \
|
EXTRA_DIST = $(files_DATA) \
|
||||||
cpu.edc \
|
cpu.edc \
|
||||||
VeraMono.ttf \
|
VeraMono.ttf \
|
||||||
VeraBd.ttf \
|
|
||||||
cpu.png \
|
cpu.png \
|
||||||
e_modules-cpu.spec
|
e_modules-cpu.spec
|
||||||
|
|
||||||
|
@ -29,8 +28,7 @@ INCLUDES = -I. \
|
||||||
pkgdir = $(datadir)/$(MODULE_ARCH)
|
pkgdir = $(datadir)/$(MODULE_ARCH)
|
||||||
pkg_LTLIBRARIES = module.la
|
pkg_LTLIBRARIES = module.la
|
||||||
module_la_SOURCES = e_mod_main.c \
|
module_la_SOURCES = e_mod_main.c \
|
||||||
e_mod_main.h \
|
e_mod_main.h
|
||||||
e_mod_config.c
|
|
||||||
|
|
||||||
module_la_LIBADD = @e_libs@
|
module_la_LIBADD = @e_libs@
|
||||||
module_la_LDFLAGS = -module -avoid-version
|
module_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
789
cpu.edc
789
cpu.edc
|
@ -6,13 +6,11 @@ images
|
||||||
fonts
|
fonts
|
||||||
{
|
{
|
||||||
font: "VeraMono.ttf" "VeraMono";
|
font: "VeraMono.ttf" "VeraMono";
|
||||||
font: "VeraBd.ttf" "VeraBold";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
styles
|
styles
|
||||||
{
|
{
|
||||||
style
|
style {
|
||||||
{
|
|
||||||
name: "cpu_style";
|
name: "cpu_style";
|
||||||
base: "font=VeraMono font_size=10 text_class=tb_plain align=center color=#fff style=outline_soft_shadow shadow_color=#00000032 wrap=word";
|
base: "font=VeraMono font_size=10 text_class=tb_plain align=center color=#fff style=outline_soft_shadow shadow_color=#00000032 wrap=word";
|
||||||
tag: "br" "\n";
|
tag: "br" "\n";
|
||||||
|
@ -47,7 +45,18 @@ collections
|
||||||
aspect: 1.0 1.0;
|
aspect: 1.0 1.0;
|
||||||
aspect_preference: BOTH;
|
aspect_preference: BOTH;
|
||||||
align: 0.5 0.5;
|
align: 0.5 0.5;
|
||||||
image.normal: "cpu.png";
|
rel1
|
||||||
|
{
|
||||||
|
relative: 0.0 0.0;
|
||||||
|
}
|
||||||
|
rel2
|
||||||
|
{
|
||||||
|
relative: 1.0 1.0;
|
||||||
|
}
|
||||||
|
image
|
||||||
|
{
|
||||||
|
normal: "cpu.png";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
part
|
part
|
||||||
|
@ -61,10 +70,17 @@ collections
|
||||||
{
|
{
|
||||||
state: "default" 0.0;
|
state: "default" 0.0;
|
||||||
align: 0.5 0.5;
|
align: 0.5 0.5;
|
||||||
rel1.to: "cpu";
|
rel1
|
||||||
rel2.to: "cpu";
|
|
||||||
text
|
|
||||||
{
|
{
|
||||||
|
relative: 0.0 0.0;
|
||||||
|
to: "cpu";
|
||||||
|
}
|
||||||
|
rel2
|
||||||
|
{
|
||||||
|
relative: 1.0 1.0;
|
||||||
|
to: "cpu";
|
||||||
|
}
|
||||||
|
text {
|
||||||
style: "cpu_style";
|
style: "cpu_style";
|
||||||
min: 0 1;
|
min: 0 1;
|
||||||
}
|
}
|
||||||
|
@ -72,762 +88,3 @@ collections
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
group
|
|
||||||
{
|
|
||||||
name: "modules/cpu/popup";
|
|
||||||
data
|
|
||||||
{
|
|
||||||
item: "chart_color1" "0 59 179 170";
|
|
||||||
item: "chart_color2" "4 179 0 170";
|
|
||||||
item: "chart_color3" "180 0 0 170";
|
|
||||||
item: "chart_color4" "179 55 0 170";
|
|
||||||
}
|
|
||||||
parts
|
|
||||||
{
|
|
||||||
part
|
|
||||||
{
|
|
||||||
name: "bg";
|
|
||||||
type: RECT;
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "default" 0.0;
|
|
||||||
min: 100 100;
|
|
||||||
color: 0 0 0 0;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_2" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
min: 200 100;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_3" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
min: 150 100;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_4" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
min: 150 150;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part
|
|
||||||
{
|
|
||||||
name: "chart1";
|
|
||||||
type: SWALLOW;
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "default" 0.0;
|
|
||||||
rel1.relative: 0.04 0.04;
|
|
||||||
rel2.relative: 0.96 0.96;
|
|
||||||
color: 255 255 255 255;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_2" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
rel1.relative: 0.04 0.04;
|
|
||||||
rel2.relative: 0.48 0.96;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_3" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
rel1.relative: 0.04 0.04;
|
|
||||||
rel2.relative: 0.6 0.96;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_4" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
rel1.relative: 0.04 0.04;
|
|
||||||
rel2.relative: 0.48 0.48;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part
|
|
||||||
{
|
|
||||||
name: "chart2";
|
|
||||||
type: SWALLOW;
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "default" 0.0;
|
|
||||||
visible: 0;
|
|
||||||
color: 255 255 255 255;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_2" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.52 0.04;
|
|
||||||
rel2.relative: 0.96 0.96;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_3" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.62 0.04;
|
|
||||||
rel2.relative: 0.96 0.48;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_4" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.52 0.04;
|
|
||||||
rel2.relative: 0.96 0.48;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part
|
|
||||||
{
|
|
||||||
name: "chart3";
|
|
||||||
type: SWALLOW;
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "default" 0.0;
|
|
||||||
visible: 0;
|
|
||||||
color: 255 255 255 255;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_2" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_3" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.62 0.52;
|
|
||||||
rel2.relative: 0.96 0.96;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_4" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.04 0.52;
|
|
||||||
rel2.relative: 0.48 0.96;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part
|
|
||||||
{
|
|
||||||
name: "chart4";
|
|
||||||
type: SWALLOW;
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "default" 0.0;
|
|
||||||
visible: 0;
|
|
||||||
color: 255 255 255 255;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_2" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_3" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_4" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.52 0.52;
|
|
||||||
rel2.relative: 0.96 0.96;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part
|
|
||||||
{
|
|
||||||
name: "num1";
|
|
||||||
type: TEXT;
|
|
||||||
effect: SOFT_SHADOW;
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "default" 0.0;
|
|
||||||
fixed: 1 1;
|
|
||||||
rel1.relative: 0.5 0.5;
|
|
||||||
rel2.relative: 0.5 0.5;
|
|
||||||
color: 255 255 255 255;
|
|
||||||
color3: 0 0 0 42;
|
|
||||||
text
|
|
||||||
{
|
|
||||||
text: "1";
|
|
||||||
min: 1 1;
|
|
||||||
size: 30;
|
|
||||||
font: "VeraBold";
|
|
||||||
align: 0.5 0.5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_2" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
rel1.relative: 0.25 0.5;
|
|
||||||
rel2.relative: 0.25 0.5;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_3" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
rel1.relative: 0.33333 0.5;
|
|
||||||
rel2.relative: 0.33333 0.5;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_4" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
rel1.relative: 0.25 0.25;
|
|
||||||
rel2.relative: 0.25 0.25;
|
|
||||||
text.size: 20;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part
|
|
||||||
{
|
|
||||||
name: "num2";
|
|
||||||
type: TEXT;
|
|
||||||
effect: SOFT_SHADOW;
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "default" 0.0;
|
|
||||||
fixed: 1 1;
|
|
||||||
visible: 0;
|
|
||||||
color: 255 255 255 255;
|
|
||||||
color3: 0 0 0 42;
|
|
||||||
text
|
|
||||||
{
|
|
||||||
text: "2";
|
|
||||||
min: 1 1;
|
|
||||||
size: 30;
|
|
||||||
font: "VeraBold";
|
|
||||||
align: 0.5 0.5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_2" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.75 0.5;
|
|
||||||
rel2.relative: 0.75 0.5;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_3" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.833333 0.25;
|
|
||||||
rel2.relative: 0.833333 0.25;
|
|
||||||
text.size: 20;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_4" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.75 0.25;
|
|
||||||
rel2.relative: 0.75 0.25;
|
|
||||||
text.size: 20;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part
|
|
||||||
{
|
|
||||||
name: "num3";
|
|
||||||
type: TEXT;
|
|
||||||
effect: SOFT_SHADOW;
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "default" 0.0;
|
|
||||||
fixed: 1 1;
|
|
||||||
color: 255 255 255 255;
|
|
||||||
color3: 0 0 0 42;
|
|
||||||
visible: 0;
|
|
||||||
text
|
|
||||||
{
|
|
||||||
text: "3";
|
|
||||||
min: 1 1;
|
|
||||||
size: 30;
|
|
||||||
font: "VeraBold";
|
|
||||||
align: 0.5 0.5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_2" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_3" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.833333 0.75;
|
|
||||||
rel2.relative: 0.833333 0.75;
|
|
||||||
text.size: 20;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_4" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.25 0.75;
|
|
||||||
rel2.relative: 0.25 0.75;
|
|
||||||
text.size: 20;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part
|
|
||||||
{
|
|
||||||
name: "num4";
|
|
||||||
type: TEXT;
|
|
||||||
effect: SOFT_SHADOW;
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "default" 0.0;
|
|
||||||
fixed: 1 1;
|
|
||||||
color: 255 255 255 255;
|
|
||||||
color3: 0 0 0 42;
|
|
||||||
visible: 0;
|
|
||||||
text
|
|
||||||
{
|
|
||||||
text: "4";
|
|
||||||
min: 1 1;
|
|
||||||
size: 30;
|
|
||||||
font: "VeraBold";
|
|
||||||
align: 0.5 0.5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_2" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_3" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_4" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.75 0.75;
|
|
||||||
rel2.relative: 0.75 0.75;
|
|
||||||
text.size: 20;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part
|
|
||||||
{
|
|
||||||
name: "y1";
|
|
||||||
type: RECT;
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "default" 0.0;
|
|
||||||
min: 1 1;
|
|
||||||
max: 1 9999;
|
|
||||||
fixed: 1 1;
|
|
||||||
rel1
|
|
||||||
{
|
|
||||||
relative: 0.04 0.04;
|
|
||||||
offset: -1 -4;
|
|
||||||
}
|
|
||||||
rel2
|
|
||||||
{
|
|
||||||
relative: 0.04 0.96;
|
|
||||||
offset: -1 2;
|
|
||||||
}
|
|
||||||
color: 0 0 0 255;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_2" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
rel1.relative: 0.04 0.04;
|
|
||||||
rel2.relative: 0.04 0.96;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_3" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
rel1.relative: 0.04 0.04;
|
|
||||||
rel2.relative: 0.04 0.96;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_4" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
rel1.relative: 0.04 0.04;
|
|
||||||
rel2.relative: 0.04 0.48;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part
|
|
||||||
{
|
|
||||||
name: "y2";
|
|
||||||
type: RECT;
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "default" 0.0;
|
|
||||||
min: 1 1;
|
|
||||||
max: 1 9999;
|
|
||||||
fixed: 1 1;
|
|
||||||
visible: 0;
|
|
||||||
rel1.offset: -1 -4;
|
|
||||||
rel2.offset: -1 2;
|
|
||||||
color: 0 0 0 255;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_2" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.52 0.04;
|
|
||||||
rel2.relative: 0.52 0.96;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_3" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.62 0.04;
|
|
||||||
rel2.relative: 0.62 0.48;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_4" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.52 0.04;
|
|
||||||
rel2.relative: 0.52 0.48;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part
|
|
||||||
{
|
|
||||||
name: "y3";
|
|
||||||
type: RECT;
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "default" 0.0;
|
|
||||||
min: 1 1;
|
|
||||||
max: 1 9999;
|
|
||||||
fixed: 1 1;
|
|
||||||
visible: 0;
|
|
||||||
rel1.offset: -1 -4;
|
|
||||||
rel2.offset: -1 2;
|
|
||||||
color: 0 0 0 255;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_2" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_3" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.62 0.52;
|
|
||||||
rel2.relative: 0.62 0.96;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_4" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.04 0.52;
|
|
||||||
rel2.relative: 0.04 0.96;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part
|
|
||||||
{
|
|
||||||
name: "y4";
|
|
||||||
type: RECT;
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "default" 0.0;
|
|
||||||
min: 1 1;
|
|
||||||
max: 1 9999;
|
|
||||||
fixed: 1 1;
|
|
||||||
visible: 0;
|
|
||||||
rel1.offset: -1 -4;
|
|
||||||
rel2.offset: -1 2;
|
|
||||||
color: 0 0 0 255;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_2" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_3" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_4" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.52 0.52;
|
|
||||||
rel2.relative: 0.52 0.96;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part
|
|
||||||
{
|
|
||||||
name: "x1";
|
|
||||||
type: RECT;
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "default" 0.0;
|
|
||||||
min: 1 1;
|
|
||||||
max: 9999 1;
|
|
||||||
fixed: 1 1;
|
|
||||||
rel1
|
|
||||||
{
|
|
||||||
relative: 0.04 0.96;
|
|
||||||
offset: -4 0;
|
|
||||||
}
|
|
||||||
rel2
|
|
||||||
{
|
|
||||||
relative: 0.96 0.96;
|
|
||||||
offset: 2 0;
|
|
||||||
}
|
|
||||||
color: 0 0 0 255;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_2" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
rel2.relative: 0.48 0.96;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_3" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
rel2.relative: 0.6 0.96;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_4" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
rel1.relative: 0.04 0.48;
|
|
||||||
rel2.relative: 0.48 0.48;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part
|
|
||||||
{
|
|
||||||
name: "x2";
|
|
||||||
type: RECT;
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "default" 0.0;
|
|
||||||
min: 1 1;
|
|
||||||
max: 9999 1;
|
|
||||||
fixed: 1 1;
|
|
||||||
visible: 0;
|
|
||||||
rel1.offset: -4 0;
|
|
||||||
rel2.offset: 2 0;
|
|
||||||
color: 0 0 0 255;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_2" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.52 0.96;
|
|
||||||
rel2.relative: 0.96 0.96;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_3" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.62 0.48;
|
|
||||||
rel2.relative: 0.96 0.48;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_4" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.52 0.48;
|
|
||||||
rel2.relative: 0.96 0.48;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part
|
|
||||||
{
|
|
||||||
name: "x3";
|
|
||||||
type: RECT;
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "default" 0.0;
|
|
||||||
min: 1 1;
|
|
||||||
max: 9999 1;
|
|
||||||
fixed: 1 1;
|
|
||||||
visible: 0;
|
|
||||||
rel1.offset: -4 0;
|
|
||||||
rel2.offset: 2 0;
|
|
||||||
color: 0 0 0 255;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_2" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_3" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.62 0.96;
|
|
||||||
rel2.relative: 0.96 0.96;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_4" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.04 0.96;
|
|
||||||
rel2.relative: 0.48 0.96;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part
|
|
||||||
{
|
|
||||||
name: "x4";
|
|
||||||
type: RECT;
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "default" 0.0;
|
|
||||||
min: 1 1;
|
|
||||||
max: 9999 1;
|
|
||||||
fixed: 1 1;
|
|
||||||
visible: 0;
|
|
||||||
rel1.offset: -4 0;
|
|
||||||
rel2.offset: 2 0;
|
|
||||||
color: 0 0 0 255;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_2" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_3" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
}
|
|
||||||
description
|
|
||||||
{
|
|
||||||
state: "cpu_count_4" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
rel1.relative: 0.52 0.96;
|
|
||||||
rel2.relative: 0.96 0.96;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
programs
|
|
||||||
{
|
|
||||||
program
|
|
||||||
{
|
|
||||||
name: "1_cpu";
|
|
||||||
signal: "e,state,orientation,1";
|
|
||||||
source: "e";
|
|
||||||
action: STATE_SET "default" 0.0;
|
|
||||||
target: "bg";
|
|
||||||
target: "chart1";
|
|
||||||
target: "chart2";
|
|
||||||
target: "chart3";
|
|
||||||
target: "chart4";
|
|
||||||
target: "num1";
|
|
||||||
target: "num2";
|
|
||||||
target: "num3";
|
|
||||||
target: "num4";
|
|
||||||
target: "x1";
|
|
||||||
target: "x2";
|
|
||||||
target: "x3";
|
|
||||||
target: "x4";
|
|
||||||
target: "y1";
|
|
||||||
target: "y2";
|
|
||||||
target: "y3";
|
|
||||||
target: "y4";
|
|
||||||
}
|
|
||||||
program
|
|
||||||
{
|
|
||||||
name: "2_cpu";
|
|
||||||
signal: "e,state,orientation,2";
|
|
||||||
source: "e";
|
|
||||||
action: STATE_SET "cpu_count_2" 0.0;
|
|
||||||
target: "bg";
|
|
||||||
target: "chart1";
|
|
||||||
target: "chart2";
|
|
||||||
target: "chart3";
|
|
||||||
target: "chart4";
|
|
||||||
target: "num1";
|
|
||||||
target: "num2";
|
|
||||||
target: "num3";
|
|
||||||
target: "num4";
|
|
||||||
target: "x1";
|
|
||||||
target: "x2";
|
|
||||||
target: "x3";
|
|
||||||
target: "x4";
|
|
||||||
target: "y1";
|
|
||||||
target: "y2";
|
|
||||||
target: "y3";
|
|
||||||
target: "y4";
|
|
||||||
}
|
|
||||||
program
|
|
||||||
{
|
|
||||||
name: "3_cpu";
|
|
||||||
signal: "e,state,orientation,3";
|
|
||||||
source: "e";
|
|
||||||
action: STATE_SET "cpu_count_3" 0.0;
|
|
||||||
target: "bg";
|
|
||||||
target: "chart1";
|
|
||||||
target: "chart2";
|
|
||||||
target: "chart3";
|
|
||||||
target: "chart4";
|
|
||||||
target: "num1";
|
|
||||||
target: "num2";
|
|
||||||
target: "num3";
|
|
||||||
target: "num4";
|
|
||||||
target: "x1";
|
|
||||||
target: "x2";
|
|
||||||
target: "x3";
|
|
||||||
target: "x4";
|
|
||||||
target: "y1";
|
|
||||||
target: "y2";
|
|
||||||
target: "y3";
|
|
||||||
target: "y4";
|
|
||||||
}
|
|
||||||
program
|
|
||||||
{
|
|
||||||
name: "4_cpu";
|
|
||||||
signal: "e,state,orientation,4";
|
|
||||||
source: "e";
|
|
||||||
action: STATE_SET "cpu_count_4" 0.0;
|
|
||||||
target: "bg";
|
|
||||||
target: "chart1";
|
|
||||||
target: "chart2";
|
|
||||||
target: "chart3";
|
|
||||||
target: "chart4";
|
|
||||||
target: "num1";
|
|
||||||
target: "num2";
|
|
||||||
target: "num3";
|
|
||||||
target: "num4";
|
|
||||||
target: "x1";
|
|
||||||
target: "x2";
|
|
||||||
target: "x3";
|
|
||||||
target: "x4";
|
|
||||||
target: "y1";
|
|
||||||
target: "y2";
|
|
||||||
target: "y3";
|
|
||||||
target: "y4";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
123
e_mod_config.c
123
e_mod_config.c
|
@ -1,123 +0,0 @@
|
||||||
/*
|
|
||||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2(0
|
|
||||||
*/
|
|
||||||
#include <e.h>
|
|
||||||
#include "e_mod_main.h"
|
|
||||||
|
|
||||||
struct _E_Config_Dialog_Data
|
|
||||||
{
|
|
||||||
double poll_time;
|
|
||||||
int show_popup;
|
|
||||||
double max_points;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Protos */
|
|
||||||
static void *_create_data(E_Config_Dialog * cfd);
|
|
||||||
static void _free_data(E_Config_Dialog * cfd, E_Config_Dialog_Data * cfdata);
|
|
||||||
static Evas_Object *_basic_create_widgets(E_Config_Dialog * cfd, Evas * evas,
|
|
||||||
E_Config_Dialog_Data * cfdata);
|
|
||||||
static int _basic_apply_data(E_Config_Dialog * cfd,
|
|
||||||
E_Config_Dialog_Data * cfdata);
|
|
||||||
static void _fill_data(Config_Item * ci, E_Config_Dialog_Data * cfdata);
|
|
||||||
|
|
||||||
static int max_points;
|
|
||||||
|
|
||||||
/* Config Calls */
|
|
||||||
void
|
|
||||||
_config_cpu_module(Config_Item * ci, int max)
|
|
||||||
{
|
|
||||||
E_Config_Dialog *cfd;
|
|
||||||
E_Config_Dialog_View *v;
|
|
||||||
E_Container *con;
|
|
||||||
char buf[4096];
|
|
||||||
|
|
||||||
v = E_NEW(E_Config_Dialog_View, 1);
|
|
||||||
|
|
||||||
v->create_cfdata = _create_data;
|
|
||||||
v->free_cfdata = _free_data;
|
|
||||||
v->basic.apply_cfdata = _basic_apply_data;
|
|
||||||
v->basic.create_widgets = _basic_create_widgets;
|
|
||||||
|
|
||||||
max_points = max;
|
|
||||||
snprintf(buf, sizeof(buf), "%s/module.edj",
|
|
||||||
e_module_dir_get(cpu_conf->module));
|
|
||||||
con = e_container_current_get(e_manager_current_get());
|
|
||||||
cfd = e_config_dialog_new(con,
|
|
||||||
_("CPU Configuration"),
|
|
||||||
"Cpu",
|
|
||||||
"_e_modules_cpu_config_dialog",
|
|
||||||
buf, 0, v, ci);
|
|
||||||
cpu_conf->config_dialog = cfd;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_fill_data(Config_Item * ci, E_Config_Dialog_Data * cfdata)
|
|
||||||
{
|
|
||||||
cfdata->poll_time = ci->poll_time;
|
|
||||||
cfdata->show_popup = ci->show_popup;
|
|
||||||
cfdata->max_points = (double) ci->max_points;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void *
|
|
||||||
_create_data(E_Config_Dialog * cfd)
|
|
||||||
{
|
|
||||||
E_Config_Dialog_Data *cfdata;
|
|
||||||
Config_Item *ci;
|
|
||||||
|
|
||||||
ci = cfd->data;
|
|
||||||
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
|
||||||
|
|
||||||
_fill_data(ci, cfdata);
|
|
||||||
return cfdata;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_free_data(E_Config_Dialog * cfd, E_Config_Dialog_Data * cfdata)
|
|
||||||
{
|
|
||||||
if (!cpu_conf)
|
|
||||||
return;
|
|
||||||
cpu_conf->config_dialog = NULL;
|
|
||||||
free(cfdata);
|
|
||||||
cfdata = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Evas_Object *
|
|
||||||
_basic_create_widgets(E_Config_Dialog * cfd, Evas * evas,
|
|
||||||
E_Config_Dialog_Data * cfdata)
|
|
||||||
{
|
|
||||||
Evas_Object *o, *of, *ob;
|
|
||||||
|
|
||||||
o = e_widget_list_add(evas, 0, 0);
|
|
||||||
of = e_widget_framelist_add(evas, _("General Settings"), 0);
|
|
||||||
ob = e_widget_check_add(evas, _("Show Popup On Mouse Over"),
|
|
||||||
&(cfdata->show_popup));
|
|
||||||
e_widget_framelist_object_append(of, ob);
|
|
||||||
ob = e_widget_label_add(evas, _("Check Interval:"));
|
|
||||||
e_widget_framelist_object_append(of, ob);
|
|
||||||
ob = e_widget_slider_add(evas, 1, 0, _("%1.0f seconds"), 1.0, 60.0, 1.0, 0,
|
|
||||||
&(cfdata->poll_time), NULL, 150);
|
|
||||||
e_widget_framelist_object_append(of, ob);
|
|
||||||
ob = e_widget_label_add(evas, _("Maximum chart points:"));
|
|
||||||
e_widget_framelist_object_append(of, ob);
|
|
||||||
ob = e_widget_slider_add(evas, 1, 0, _("%1.0f points"), 1.0, (double) max_points, 1.0, 0,
|
|
||||||
&(cfdata->max_points), NULL, 150);
|
|
||||||
e_widget_framelist_object_append(of, ob);
|
|
||||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
|
||||||
|
|
||||||
return o;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
_basic_apply_data(E_Config_Dialog * cfd, E_Config_Dialog_Data * cfdata)
|
|
||||||
{
|
|
||||||
Config_Item *ci;
|
|
||||||
|
|
||||||
ci = cfd->data;
|
|
||||||
ci->poll_time = cfdata->poll_time;
|
|
||||||
ci->show_popup = cfdata->show_popup;
|
|
||||||
ci->max_points = (int) cfdata->max_points;
|
|
||||||
e_config_save_queue();
|
|
||||||
_cpu_config_updated(ci->id);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
|
@ -16,9 +16,7 @@ struct _Config
|
||||||
struct _Config_Item
|
struct _Config_Item
|
||||||
{
|
{
|
||||||
const char *id;
|
const char *id;
|
||||||
double poll_time;
|
double interval;
|
||||||
int show_popup;
|
|
||||||
int max_points;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
EAPI extern E_Module_Api e_modapi;
|
EAPI extern E_Module_Api e_modapi;
|
||||||
|
@ -28,8 +26,7 @@ EAPI int e_modapi_shutdown (E_Module *m);
|
||||||
EAPI int e_modapi_save (E_Module *m);
|
EAPI int e_modapi_save (E_Module *m);
|
||||||
EAPI int e_modapi_about (E_Module *m);
|
EAPI int e_modapi_about (E_Module *m);
|
||||||
|
|
||||||
void _cpu_config_updated (const char *id);
|
//void _config_cpu_module (Config_Item *ci);
|
||||||
void _config_cpu_module (Config_Item *ci, int max);
|
|
||||||
|
|
||||||
extern Config *cpu_conf;
|
extern Config *cpu_conf;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue