diff --git a/data/themes/default.edc b/data/themes/default.edc index 2f30dc1cb..0f6b95641 100644 --- a/data/themes/default.edc +++ b/data/themes/default.edc @@ -7871,6 +7871,358 @@ collections { ///////////////////////////////////////////////////////////////////////////// /*** MOD: CONNMAN ***/ +#define CONNMAN_ICON(_icon) \ + group { \ + name: "e/modules/connman/icon/"##_icon; \ + parts { \ + part { \ + name: #_icon; \ + type: IMAGE; \ + mouse_events: 0; \ + description { \ + state: "default" 0.0; \ + aspect: 1 1; \ + aspect_preference: BOTH; \ + image.image: "connman_"##_icon##".png" COMP; \ + image.normal: "connman_"##_icon##".png"; \ + } \ + } \ + } \ + } + +CONNMAN_ICON(3g) +CONNMAN_ICON(bluetooth) +CONNMAN_ICON(ethernet) + +#undef CONNMAN_ICON + + group { + name: "e/modules/connman/icon/wifi"; + +#define MSG_ID_STRENGHT 1 + +#define CONNMAN_BAR_OFF(_num) \ + part { \ + name: "bar_"##_num##"_off"; \ + type: IMAGE; \ + mouse_events: 0; \ + description { \ + state: "default" 0.0; \ + aspect: 1 1; \ + aspect_preference: BOTH; \ + image.image: "connman_wifi_"##_num##"_off.png" COMP; \ + image.normal: "connman_wifi_"##_num##"_off.png"; \ + } \ + } + +#define CONNMAN_BAR_ON(_num) \ + part { \ + name: "bar_"##_num##"_on"; \ + type: IMAGE; \ + mouse_events: 0; \ + description { \ + state: "default" 0.0; \ + aspect: 1 1; \ + aspect_preference: BOTH; \ + color: 255 255 255 0; \ + image.image: "connman_wifi_"##_num##"_on.png" COMP; \ + image.normal: "connman_wifi_"##_num##"_on.png"; \ + } \ + description { \ + state: "visible" 0.0; \ + inherit: "default" 0.0; \ + color: 255 255 255 255; \ + } \ + } + +#define CONNMAN_CONNECTING_ON(_cur, _next) \ + program { \ + name: "connecting,"##_cur##",on"; \ + action: STATE_SET "visible" 0.0; \ + transition: ACCELERATE 0.2; \ + target: "bar_"##_cur##"_on"; \ + after: "connecting,"##_cur##",off"; \ + after: "connecting,"##_next##",on"; \ + } + +#define CONNMAN_CONNECTING_OFF(_cur) \ + program { \ + name: "connecting,"##_cur##",off"; \ + action: STATE_SET "default" 0.0; \ + transition: DECELERATE 0.2; \ + target: "bar_"##_cur##"_on"; \ + } + + script { + public message(Msg_Type:type, id, ...) { + if ((type == MSG_INT) && (id == MSG_ID_STRENGHT)) { + new Float:st = getarg(2); + new buf[8]; + set_state(PART:"bar_0_on", "visible", 0.0); + set_tween_state(PART:"bar_1_on", (st - (100/3) * 0) / (100/3), + "default", 0.0, "visible", 0.0); + set_tween_state(PART:"bar_2_on", (st - (100/3) * 1) / (100/3), + "default", 0.0, "visible", 0.0); + set_tween_state(PART:"bar_3_on", (st - (100/3) * 2) / (100/3), + "default", 0.0, "visible", 0.0); + snprintf(buf, sizeof(buf), "%i%%", st); + set_text(PART:"e.text.strenght", buf); + } + } + } + + parts { + CONNMAN_BAR_OFF(0) + CONNMAN_BAR_OFF(1) + CONNMAN_BAR_OFF(2) + CONNMAN_BAR_OFF(3) + CONNMAN_BAR_ON(0) + CONNMAN_BAR_ON(1) + CONNMAN_BAR_ON(2) + CONNMAN_BAR_ON(3) + part { + name: "e.text.strenght"; + type: TEXT; + mouse_events: 0; + effect: SOFT_SHADOW; + description { + state: "default" 0.0; + color: 255 255 255 0; + text { + font: "Sans"; + size: 24; + align: 0.8 0.9; + text: ""; + } + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + color: 224 224 224 255; + color3: 0 0 0 64; + } + } + part { + name: "bar_not"; + type: IMAGE; + mouse_events: 0; + description { + state: "default" 0.0; + aspect: 1 1; + aspect_preference: BOTH; + image.image: "connman_wifi_not.png" COMP; + image.normal: "connman_wifi_not.png"; + color: 255 255 255 0; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + } + } + } + programs { + program { + name: "connman,enabled"; + signal: "e,available"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "bar_not"; + } + program { + name: "connman,disabled"; + signal: "e,unavailable"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "bar_1_on"; + target: "bar_2_on"; + target: "bar_3_on"; + after: "connman,disabled,2"; + } + program { + name: "connman,disabled,2"; + action: STATE_SET "visible" 0.0; + target: "bar_not"; + } + program { + name: "strenght,show"; + signal: "e,strenght,show"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "e.text.strenght"; + } + program { + name: "strenght,hide"; + signal: "e,strenght,hide"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "e.text.strenght"; + } + program { + name: "connecting"; + action: STATE_SET "default" 0.0; + target: "bar_1_on"; + target: "bar_2_on"; + target: "bar_3_on"; + after: "connecting,1,on"; + } + CONNMAN_CONNECTING_ON(1, 2) + CONNMAN_CONNECTING_ON(2, 3) + CONNMAN_CONNECTING_ON(3, 1) + CONNMAN_CONNECTING_OFF(1) + CONNMAN_CONNECTING_OFF(2) + CONNMAN_CONNECTING_OFF(3) + } + +#undef CONNMAN_BAR_OFF +#undef CONNMAN_BAR_ON +#undef CONNMAN_CONNECTING_ON +#undef CONNMAN_CONNECTING_OFF +#undef MSG_ID_STRENGHT + + } + + group { + name: "e/modules/connman/main"; + + parts { + part { + name: "eventarea"; + type: RECT; + mouse_events: 1; + description { + state: "default" 0.0; + color: 255 255 255 0; + } + } + part { + name: "icon"; + type: GROUP; + mouse_events: 0; + source: "e/modules/connman/icon/wifi"; + description { + state: "default" 0.0; + } + } + } + } + + group { + name: "e/modules/connman/end"; + parts { + part { + name: "state"; + type: IMAGE; + mouse_events: 0; + description { + state: "default" 0.0; + aspect: 1 1; + aspect_preference: BOTH; + color: 255 255 255 0; + image.image: "connman_ready.png" COMP; + image.normal: "connman_ready.png"; + rel2.relative: 0.3 1; + } + description { + state: "ready" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + } + description { + state: "online" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + image.image: "connman_online.png" COMP; + image.normal: "connman_online.png"; + } + } + part { + name: "security"; + type: IMAGE; + mouse_events: 0; + description { + state: "default" 0.0; + aspect: 1 1; + aspect_preference: BOTH; + color: 255 255 255 0; + rel1.relative: 0.3 0; + image.image: "connman_unsecure.png" COMP; + image.normal: "connman_unsecure.png"; + } + description { + state: "unsecure" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + } + description { + state: "almost_secure" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + image.image: "connman_almost_secure.png" COMP; + image.normal: "connman_almost_secure.png"; + } + description { + state: "secure" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + image.image: "connman_secure.png" COMP; + image.normal: "connman_secure.png"; + } + } + } + programs { + program { + name: "state,idle"; + signal: "e,state,idle"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "state"; + } + program { + name: "state,ready"; + signal: "e,state,ready"; + source: "e"; + action: STATE_SET "ready" 0.0; + target: "state"; + } + program { + name: "state,online"; + signal: "e,state,online"; + source: "e"; + action: STATE_SET "online" 0.0; + target: "state"; + } + program { + name: "security,off"; + signal: "e,security,off"; + source: "e"; + action: STATE_SET "default" 0.0; + target: "security"; + } + program { + name: "security,none"; + signal: "e,security,none"; + source: "e"; + action: STATE_SET "unsecure" 0.0; + target: "security"; + } + program { + name: "security,almost_secure"; + signal: "e,security,wep"; + source: "e"; + action: STATE_SET "almost_secure" 0.0; + target: "security"; + } + program { + name: "security,secure"; + signal: "e,security,psk"; + source: "e"; + action: STATE_SET "secure" 0.0; + target: "security"; + } + } + } + ///////////////////////////////////////////////////////////////////////////// /*** MOD: BLUEZ ***/ diff --git a/data/themes/images/Makefile.am b/data/themes/images/Makefile.am index 111b46f81..ef7789092 100644 --- a/data/themes/images/Makefile.am +++ b/data/themes/images/Makefile.am @@ -74,6 +74,23 @@ ch-m2-3.png \ ch-s1-3.png \ ch-s2-3.png \ clock_base.png \ +connman_3g.png \ +connman_almost_secure.png \ +connman_bluetooth.png \ +connman_ethernet.png \ +connman_online.png \ +connman_ready.png \ +connman_secure.png \ +connman_unsecure.png \ +connman_wifi_0_off.png \ +connman_wifi_0_on.png \ +connman_wifi_1_off.png \ +connman_wifi_1_on.png \ +connman_wifi_2_off.png \ +connman_wifi_2_on.png \ +connman_wifi_3_off.png \ +connman_wifi_3_on.png \ +connman_wifi_not.png \ dia_botshad.png \ dia_grad.png \ dia_topshad.png \ diff --git a/data/themes/images/connman_3g.png b/data/themes/images/connman_3g.png new file mode 100644 index 000000000..763baf9b0 Binary files /dev/null and b/data/themes/images/connman_3g.png differ diff --git a/data/themes/images/connman_almost_secure.png b/data/themes/images/connman_almost_secure.png new file mode 100644 index 000000000..feef034c7 Binary files /dev/null and b/data/themes/images/connman_almost_secure.png differ diff --git a/data/themes/images/connman_bluetooth.png b/data/themes/images/connman_bluetooth.png new file mode 100644 index 000000000..8e8e19b55 Binary files /dev/null and b/data/themes/images/connman_bluetooth.png differ diff --git a/data/themes/images/connman_ethernet.png b/data/themes/images/connman_ethernet.png new file mode 100644 index 000000000..88dcdbb12 Binary files /dev/null and b/data/themes/images/connman_ethernet.png differ diff --git a/data/themes/images/connman_online.png b/data/themes/images/connman_online.png new file mode 100644 index 000000000..fb485c5ca Binary files /dev/null and b/data/themes/images/connman_online.png differ diff --git a/data/themes/images/connman_ready.png b/data/themes/images/connman_ready.png new file mode 100644 index 000000000..137aa05ed Binary files /dev/null and b/data/themes/images/connman_ready.png differ diff --git a/data/themes/images/connman_secure.png b/data/themes/images/connman_secure.png new file mode 100644 index 000000000..57a0bb1d4 Binary files /dev/null and b/data/themes/images/connman_secure.png differ diff --git a/data/themes/images/connman_unsecure.png b/data/themes/images/connman_unsecure.png new file mode 100644 index 000000000..3aa1c2dbf Binary files /dev/null and b/data/themes/images/connman_unsecure.png differ diff --git a/data/themes/images/connman_wifi_0_off.png b/data/themes/images/connman_wifi_0_off.png new file mode 100644 index 000000000..8103bd405 Binary files /dev/null and b/data/themes/images/connman_wifi_0_off.png differ diff --git a/data/themes/images/connman_wifi_0_on.png b/data/themes/images/connman_wifi_0_on.png new file mode 100644 index 000000000..525fd625b Binary files /dev/null and b/data/themes/images/connman_wifi_0_on.png differ diff --git a/data/themes/images/connman_wifi_1_off.png b/data/themes/images/connman_wifi_1_off.png new file mode 100644 index 000000000..0d59e2a6d Binary files /dev/null and b/data/themes/images/connman_wifi_1_off.png differ diff --git a/data/themes/images/connman_wifi_1_on.png b/data/themes/images/connman_wifi_1_on.png new file mode 100644 index 000000000..baf856a9d Binary files /dev/null and b/data/themes/images/connman_wifi_1_on.png differ diff --git a/data/themes/images/connman_wifi_2_off.png b/data/themes/images/connman_wifi_2_off.png new file mode 100644 index 000000000..c19ca586d Binary files /dev/null and b/data/themes/images/connman_wifi_2_off.png differ diff --git a/data/themes/images/connman_wifi_2_on.png b/data/themes/images/connman_wifi_2_on.png new file mode 100644 index 000000000..0f9b45385 Binary files /dev/null and b/data/themes/images/connman_wifi_2_on.png differ diff --git a/data/themes/images/connman_wifi_3_off.png b/data/themes/images/connman_wifi_3_off.png new file mode 100644 index 000000000..ec35009dc Binary files /dev/null and b/data/themes/images/connman_wifi_3_off.png differ diff --git a/data/themes/images/connman_wifi_3_on.png b/data/themes/images/connman_wifi_3_on.png new file mode 100644 index 000000000..2b159874a Binary files /dev/null and b/data/themes/images/connman_wifi_3_on.png differ diff --git a/data/themes/images/connman_wifi_not.png b/data/themes/images/connman_wifi_not.png new file mode 100644 index 000000000..27ec5ba43 Binary files /dev/null and b/data/themes/images/connman_wifi_not.png differ