1group { name: "e/modules/connman/main"; 2 images.image: "slot_horiz_top.png" COMP; 3 images.image: "slot_horiz_bottom.png" COMP; 4 images.image: "wifi_base.png" COMP; 5 images.image: "wifi_sig_1.png" COMP; 6 images.image: "wifi_sig_2.png" COMP; 7 images.image: "wifi_sig_3.png" COMP; 8 images.image: "eth.png" COMP; 9 images.image: "exlclam.png" COMP; 10 images.image: "hole_tiny.png" COMP; 11 images.image: "led_tiny_orange.png" COMP; 12 images.image: "led_tiny_green.png" COMP; 13 images.image: "bt_base.png" COMP; 14 images.image: "bt_sig_1.png" COMP; 15 images.image: "bt_sig_2.png" COMP; 16 images.image: "cell_base.png" COMP; 17 images.image: "cell_sig_1.png" COMP; 18 images.image: "cell_sig_2.png" COMP; 19 images.image: "cell_sig_3.png" COMP; 20 images.image: "cell_sig_4.png" COMP; 21 parts { 22 part { name: "slot_bottom"; mouse_events: 0; 23 description { state: "default" 0.0; 24 rel1.to: "slot"; 25 rel2.relative: 1.0 0.5; 26 rel2.to: "slot"; 27 min: 0 3; 28 image.normal: "slot_horiz_bottom.png"; 29 fixed: 0 1; 30 } 31 } 32/////////////////////// 33 part { name: "exclam_base"; mouse_events: 0; 34 clip_to: "clip_exclam"; 35 description { state: "default" 0.0; 36 aspect: (71/144) (71/144); aspect_preference: BOTH; 37 align: 0.5 1.0; 38 rel2.relative: 1.0 0.5; 39 rel2.to_y: "slot"; 40 image.normal: "exlclam.png"; 41 } 42 } 43/////////////////////// 44 part { name: "eth_base"; mouse_events: 0; 45 clip_to: "clip_eth"; 46 description { state: "default" 0.0; 47 aspect: (60/144) (60/144); aspect_preference: BOTH; 48 align: 0.5 1.0; 49 rel2.relative: 1.0 0.5; 50 rel2.to_y: "slot"; 51 image.normal: "eth.png"; 52 } 53 } 54/////////////////////// 55 part { name: "wifi_base"; mouse_events: 0; 56 clip_to: "clip_wifi"; 57 description { state: "default" 0.0; 58 aspect: (160/144) (160/144); aspect_preference: BOTH; 59 align: 0.5 1.0; 60 rel2.relative: 1.0 0.5; 61 rel2.to_y: "slot"; 62 image.normal: "wifi_base.png"; 63 } 64 } 65 part { name: "wifi_1"; mouse_events: 0; 66 clip_to: "clip_wifi"; 67 description { state: "default" 0.0; 68 rel1.to: "wifi_base"; 69 rel2.to: "wifi_base"; 70 image.normal: "wifi_sig_1.png"; 71 visible: 0; 72 } 73 description { state: "partly" 0.0; 74 inherit: "default" 0.0; 75 color: 255 255 255 128; 76 visible: 1; 77 } 78 description { state: "visible" 0.0; 79 inherit: "default" 0.0; 80 visible: 1; 81 } 82 } 83 part { name: "wifi_2"; mouse_events: 0; 84 clip_to: "clip_wifi"; 85 description { state: "default" 0.0; 86 rel1.to: "wifi_base"; 87 rel2.to: "wifi_base"; 88 image.normal: "wifi_sig_2.png"; 89 visible: 0; 90 } 91 description { state: "partly" 0.0; 92 inherit: "default" 0.0; 93 color: 255 255 255 128; 94 visible: 1; 95 } 96 description { state: "visible" 0.0; 97 inherit: "default" 0.0; 98 visible: 1; 99 } 100 } 101 part { name: "wifi_3"; mouse_events: 0; 102 clip_to: "clip_wifi"; 103 description { state: "default" 0.0; 104 rel1.to: "wifi_base"; 105 rel2.to: "wifi_base"; 106 image.normal: "wifi_sig_3.png"; 107 visible: 0; 108 } 109 description { state: "partly" 0.0; 110 inherit: "default" 0.0; 111 color: 255 255 255 128; 112 visible: 1; 113 } 114 description { state: "visible" 0.0; 115 inherit: "default" 0.0; 116 visible: 1; 117 } 118 } 119/////////////////////// 120 part { name: "bt_base"; mouse_events: 0; 121 clip_to: "clip_bt"; 122 description { state: "default" 0.0; 123 aspect: (160/144) (160/144); aspect_preference: BOTH; 124 align: 0.5 1.0; 125 rel2.relative: 1.0 0.5; 126 rel2.to_y: "slot"; 127 image.normal: "bt_base.png"; 128 } 129 } 130 part { name: "bt_1"; mouse_events: 0; 131 clip_to: "clip_bt"; 132 description { state: "default" 0.0; 133 rel1.to: "bt_base"; 134 rel2.to: "bt_base"; 135 image.normal: "bt_sig_1.png"; 136 visible: 0; 137 } 138 description { state: "partly" 0.0; 139 inherit: "default" 0.0; 140 color: 255 255 255 128; 141 visible: 1; 142 } 143 description { state: "visible" 0.0; 144 inherit: "default" 0.0; 145 visible: 1; 146 } 147 } 148 part { name: "bt_2"; mouse_events: 0; 149 clip_to: "clip_bt"; 150 description { state: "default" 0.0; 151 rel1.to: "bt_base"; 152 rel2.to: "bt_base"; 153 image.normal: "bt_sig_2.png"; 154 visible: 0; 155 } 156 description { state: "partly" 0.0; 157 inherit: "default" 0.0; 158 color: 255 255 255 128; 159 visible: 1; 160 } 161 description { state: "visible" 0.0; 162 inherit: "default" 0.0; 163 visible: 1; 164 } 165 } 166/////////////////////// 167 part { name: "cell_base"; mouse_events: 0; 168 clip_to: "clip_cell"; 169 description { state: "default" 0.0; 170 aspect: (160/144) (160/144); aspect_preference: BOTH; 171 align: 0.5 1.0; 172 rel2.relative: 1.0 0.5; 173 rel2.to_y: "slot"; 174 image.normal: "cell_base.png"; 175 } 176 } 177 part { name: "cell_1"; mouse_events: 0; 178 clip_to: "clip_cell"; 179 description { state: "default" 0.0; 180 rel1.to: "cell_base"; 181 rel2.to: "cell_base"; 182 image.normal: "cell_sig_1.png"; 183 visible: 0; 184 } 185 description { state: "partly" 0.0; 186 inherit: "default" 0.0; 187 color: 255 255 255 128; 188 visible: 1; 189 } 190 description { state: "visible" 0.0; 191 inherit: "default" 0.0; 192 visible: 1; 193 } 194 } 195 part { name: "cell_2"; mouse_events: 0; 196 clip_to: "clip_cell"; 197 description { state: "default" 0.0; 198 rel1.to: "cell_base"; 199 rel2.to: "cell_base"; 200 image.normal: "cell_sig_2.png"; 201 visible: 0; 202 } 203 description { state: "partly" 0.0; 204 inherit: "default" 0.0; 205 color: 255 255 255 128; 206 visible: 1; 207 } 208 description { state: "visible" 0.0; 209 inherit: "default" 0.0; 210 visible: 1; 211 } 212 } 213 part { name: "cell_3"; mouse_events: 0; 214 clip_to: "clip_cell"; 215 description { state: "default" 0.0; 216 rel1.to: "cell_base"; 217 rel2.to: "cell_base"; 218 image.normal: "cell_sig_3.png"; 219 visible: 0; 220 } 221 description { state: "partly" 0.0; 222 inherit: "default" 0.0; 223 color: 255 255 255 128; 224 visible: 1; 225 } 226 description { state: "visible" 0.0; 227 inherit: "default" 0.0; 228 visible: 1; 229 } 230 } 231 part { name: "cell_4"; mouse_events: 0; 232 clip_to: "clip_cell"; 233 description { state: "default" 0.0; 234 rel1.to: "cell_base"; 235 rel2.to: "cell_base"; 236 image.normal: "cell_sig_4.png"; 237 visible: 0; 238 } 239 description { state: "partly" 0.0; 240 inherit: "default" 0.0; 241 color: 255 255 255 128; 242 visible: 1; 243 } 244 description { state: "visible" 0.0; 245 inherit: "default" 0.0; 246 visible: 1; 247 } 248 } 249/////////////////////// 250 part { name: "slot"; mouse_events: 0; 251 description { state: "default" 0.0; 252 rel1.offset: 0 -1; 253 rel1.relative: (21/160) 1.0; 254 rel2.offset: -1 -1; 255 rel2.relative: (140/160) 1.0; 256 align: 0.5 1.0; 257 min: 0 6; 258 image.normal: "slot_horiz_top.png"; 259 fixed: 0 1; 260 } 261 } 262 part { name: "hole"; mouse_events: 0; 263 description { state: "default" 0.0; 264 rel1.offset: -4 -4; 265 rel1.relative: 1.0 1.0; 266 rel2.offset: -4 -4; 267 align: 1.0 1.0; 268 min: 4 4; 269 max: 4 4; 270 image.normal: "hole_tiny.png"; 271 fixed: 1 1; 272 } 273 } 274 part { name: "clip_exclam"; type: RECT; 275 description { state: "default" 0.0; 276 visible: 1; 277 } 278 description { state: "wifi" 0.0; 279 visible: 0; 280 } 281 description { state: "eth" 0.0; 282 visible: 0; 283 } 284 description { state: "bt" 0.0; 285 visible: 0; 286 } 287 description { state: "cell" 0.0; 288 visible: 0; 289 } 290 } 291 part { name: "clip_wifi"; type: RECT; 292 description { state: "default" 0.0; 293 visible: 0; 294 } 295 description { state: "wifi" 0.0; 296 visible: 1; 297 } 298 description { state: "eth" 0.0; 299 visible: 0; 300 } 301 description { state: "bt" 0.0; 302 visible: 0; 303 } 304 description { state: "cell" 0.0; 305 visible: 0; 306 } 307 } 308 part { name: "clip_eth"; type: RECT; 309 description { state: "default" 0.0; 310 visible: 0; 311 } 312 description { state: "wifi" 0.0; 313 visible: 0; 314 } 315 description { state: "eth" 0.0; 316 visible: 1; 317 } 318 description { state: "bt" 0.0; 319 visible: 0; 320 } 321 description { state: "cell" 0.0; 322 visible: 0; 323 } 324 } 325 part { name: "clip_bt"; type: RECT; 326 description { state: "default" 0.0; 327 visible: 0; 328 } 329 description { state: "wifi" 0.0; 330 visible: 0; 331 } 332 description { state: "eth" 0.0; 333 visible: 0; 334 } 335 description { state: "bt" 0.0; 336 visible: 1; 337 } 338 description { state: "cell" 0.0; 339 visible: 0; 340 } 341 } 342 part { name: "clip_cell"; type: RECT; 343 description { state: "default" 0.0; 344 visible: 0; 345 } 346 description { state: "wifi" 0.0; 347 visible: 0; 348 } 349 description { state: "eth" 0.0; 350 visible: 0; 351 } 352 description { state: "bt" 0.0; 353 visible: 0; 354 } 355 description { state: "cell" 0.0; 356 visible: 1; 357 } 358 } 359 part { name: "led"; mouse_events: 0; 360 description { state: "default" 0.0; 361 rel1.to: "hole"; 362 rel2.to: "hole"; 363 min: 10 10; 364 max: 10 10; 365 image.normal: "led_tiny_orange.png"; 366 fixed: 1 1; 367 visible: 0; 368 } 369 description { state: "connected" 0.0; 370 inherit: "default" 0.0; 371 image.normal: "led_tiny_orange.png"; 372 visible: 1; 373 } 374 description { state: "online" 0.0; 375 inherit: "default" 0.0; 376 image.normal: "led_tiny_green.png"; 377 visible: 1; 378 } 379 } 380 part { name: "event"; type: RECT; 381 description { state: "default" 0.0; 382 color: 0 0 0 0; 383 } 384 } 385 } 386 387#define SCRIPT_MESSAGE() \ 388script { \ 389public message(Msg_Type:type, id, ...) { \ 390if ((type == MSG_INT_SET) && (id == 1)) { \ 391new state = getarg(2), signl = getarg(3); \ 392if (signl <= 14) { \ 393set_state(PART:"wifi_1", "default", 0.0); \ 394set_state(PART:"wifi_2", "default", 0.0); \ 395set_state(PART:"wifi_3", "default", 0.0); \ 396} \ 397else if (signl <= 28) { \ 398set_state(PART:"wifi_1", "partly", 0.0); \ 399set_state(PART:"wifi_2", "default", 0.0); \ 400set_state(PART:"wifi_3", "default", 0.0); \ 401} \ 402else if (signl <= 42) { \ 403set_state(PART:"wifi_1", "visible", 0.0); \ 404set_state(PART:"wifi_2", "default", 0.0); \ 405set_state(PART:"wifi_3", "default", 0.0); \ 406} \ 407else if (signl <= 57) { \ 408set_state(PART:"wifi_1", "visible", 0.0); \ 409set_state(PART:"wifi_2", "partly", 0.0); \ 410set_state(PART:"wifi_3", "default", 0.0); \ 411} \ 412else if (signl <= 71) { \ 413set_state(PART:"wifi_1", "visible", 0.0); \ 414set_state(PART:"wifi_2", "visible", 0.0); \ 415set_state(PART:"wifi_3", "default", 0.0); \ 416} \ 417else if (signl <= 85) { \ 418set_state(PART:"wifi_1", "visible", 0.0); \ 419set_state(PART:"wifi_2", "visible", 0.0); \ 420set_state(PART:"wifi_3", "partly", 0.0); \ 421} \ 422else { \ 423set_state(PART:"wifi_1", "visible", 0.0); \ 424set_state(PART:"wifi_2", "visible", 0.0); \ 425set_state(PART:"wifi_3", "visible", 0.0); \ 426} \ 427if (signl <= 20) { \ 428set_state(PART:"bt_1", "default", 0.0); \ 429set_state(PART:"bt_2", "default", 0.0); \ 430} \ 431else if (signl <= 40) { \ 432set_state(PART:"bt_1", "partly", 0.0); \ 433set_state(PART:"bt_2", "default", 0.0); \ 434} \ 435else if (signl <= 60) { \ 436set_state(PART:"bt_1", "visible", 0.0); \ 437set_state(PART:"bt_2", "default", 0.0); \ 438} \ 439else if (signl <= 80) { \ 440set_state(PART:"bt_1", "visible", 0.0); \ 441set_state(PART:"bt_2", "partly", 0.0); \ 442} \ 443else { \ 444set_state(PART:"bt_1", "visible", 0.0); \ 445set_state(PART:"bt_2", "visible", 0.0); \ 446} \ 447if (signl <= 11) { \ 448set_state(PART:"cell_1", "default", 0.0); \ 449set_state(PART:"cell_2", "default", 0.0); \ 450set_state(PART:"cell_3", "default", 0.0); \ 451set_state(PART:"cell_4", "default", 0.0); \ 452} \ 453else if (signl <= 22) { \ 454set_state(PART:"cell_1", "partly", 0.0); \ 455set_state(PART:"cell_2", "default", 0.0); \ 456set_state(PART:"cell_3", "default", 0.0); \ 457set_state(PART:"cell_4", "default", 0.0); \ 458} \ 459else if (signl <= 33) { \ 460set_state(PART:"cell_1", "visible", 0.0); \ 461set_state(PART:"cell_2", "default", 0.0); \ 462set_state(PART:"cell_3", "default", 0.0); \ 463set_state(PART:"cell_4", "default", 0.0); \ 464} \ 465else if (signl <= 44) { \ 466set_state(PART:"cell_1", "visible", 0.0); \ 467set_state(PART:"cell_2", "partly", 0.0); \ 468set_state(PART:"cell_3", "default", 0.0); \ 469set_state(PART:"cell_4", "default", 0.0); \ 470} \ 471else if (signl <= 55) { \ 472set_state(PART:"cell_1", "visible", 0.0); \ 473set_state(PART:"cell_2", "visible", 0.0); \ 474set_state(PART:"cell_3", "default", 0.0); \ 475set_state(PART:"cell_4", "default", 0.0); \ 476} \ 477else if (signl <= 66) { \ 478set_state(PART:"cell_1", "visible", 0.0); \ 479set_state(PART:"cell_2", "visible", 0.0); \ 480set_state(PART:"cell_3", "partly", 0.0); \ 481set_state(PART:"cell_4", "default", 0.0); \ 482} \ 483else if (signl <= 77) { \ 484set_state(PART:"cell_1", "visible", 0.0); \ 485set_state(PART:"cell_2", "visible", 0.0); \ 486set_state(PART:"cell_3", "visible", 0.0); \ 487set_state(PART:"cell_4", "default", 0.0); \ 488} \ 489else if (signl <= 88) { \ 490set_state(PART:"cell_1", "visible", 0.0); \ 491set_state(PART:"cell_2", "visible", 0.0); \ 492set_state(PART:"cell_3", "visible", 0.0); \ 493set_state(PART:"cell_4", "partly", 0.0); \ 494} \ 495else { \ 496set_state(PART:"cell_1", "visible", 0.0); \ 497set_state(PART:"cell_2", "visible", 0.0); \ 498set_state(PART:"cell_3", "visible", 0.0); \ 499set_state(PART:"cell_4", "visible", 0.0); \ 500} \ 501if ((state == 2)) { \ 502set_state(PART:"led", "default", 0.0); \ 503run_program(PROGRAM:"connecting"); \ 504return; } \ 505else if ((state == 3)) { return; } \ 506else if ((state == 4)) { set_state(PART:"led", "connected", 0.0); } \ 507else if ((state == 5)) { set_state(PART:"led", "online", 0.0); } \ 508else { set_state(PART:"led", "default", 0.0); \ 509} } } } 510 511 SCRIPT_MESSAGE() 512 programs { 513 program { name: "connecting"; 514 action: STATE_SET "connected" 0.0; 515 target: "led"; 516 in: 0.3 0.0; 517 after: "connecting2"; 518 } 519 program { name: "connecting2"; 520 action: STATE_SET "default" 0.0; 521 target: "led"; 522 in: 0.3 0.0; 523 after: "connecting"; 524 } 525// program { 526// signal: "e,available"; source: "e"; 527// } 528// program { 529// signal: "e,unavailable"; source: "e"; 530// } 531 program { 532 signal: "e,changed,connected,no"; source: "e"; 533 action: STATE_SET "default" 0.0; 534 target: "clip_exclam"; 535 target: "clip_wifi"; 536 target: "clip_eth"; 537 target: "clip_bt"; 538 target: "clip_cell"; 539 } 540 program { 541 signal: "e,changed,technology,wifi"; source: "e"; 542 action: STATE_SET "wifi" 0.0; 543 target: "clip_exclam"; 544 target: "clip_wifi"; 545 target: "clip_eth"; 546 target: "clip_bt"; 547 target: "clip_cell"; 548 } 549 program { 550 signal: "e,changed,technology,ethernet"; source: "e"; 551 action: STATE_SET "eth" 0.0; 552 target: "clip_exclam"; 553 target: "clip_wifi"; 554 target: "clip_eth"; 555 target: "clip_bt"; 556 target: "clip_cell"; 557 } 558 program { 559 signal: "e,changed,technology,bluetooth"; source: "e"; 560 action: STATE_SET "bt" 0.0; 561 target: "clip_exclam"; 562 target: "clip_wifi"; 563 target: "clip_eth"; 564 target: "clip_bt"; 565 target: "clip_cell"; 566 } 567 program { 568 signal: "e,changed,technology,cellular"; source: "e"; 569 action: STATE_SET "cell" 0.0; 570 target: "clip_exclam"; 571 target: "clip_wifi"; 572 target: "clip_eth"; 573 target: "clip_bt"; 574 target: "clip_cell"; 575 } 576 program { 577 signal: "e,changed,technology,other"; source: "e"; 578 action: STATE_SET "default" 0.0; 579 target: "clip_exclam"; 580 target: "clip_wifi"; 581 target: "clip_eth"; 582 target: "clip_bt"; 583 target: "clip_cell"; 584 } 585 } 586} 587 588group { name: "e/modules/connman/icon/wifi"; 589 inherit: "e/modules/connman/main"; 590 SCRIPT_MESSAGE() 591 programs { 592 program { 593 signal: "load"; source: ""; 594 action: STATE_SET "wifi" 0.0; 595 target: "clip_exclam"; 596 target: "clip_wifi"; 597 target: "clip_eth"; 598 target: "clip_bt"; 599 target: "clip_cell"; 600 } 601 } 602} 603 604group { name: "e/modules/connman/icon/ethernet"; 605 inherit: "e/modules/connman/main"; 606 SCRIPT_MESSAGE() 607 programs { 608 program { 609 signal: "load"; source: ""; 610 action: STATE_SET "eth" 0.0; 611 target: "clip_exclam"; 612 target: "clip_wifi"; 613 target: "clip_eth"; 614 target: "clip_bt"; 615 target: "clip_cell"; 616 } 617 } 618} 619 620group { name: "e/modules/connman/icon/bluetooth"; 621 inherit: "e/modules/connman/main"; 622 SCRIPT_MESSAGE() 623 programs { 624 program { 625 signal: "load"; source: ""; 626 action: STATE_SET "bt" 0.0; 627 target: "clip_exclam"; 628 target: "clip_wifi"; 629 target: "clip_eth"; 630 target: "clip_bt"; 631 target: "clip_cell"; 632 } 633 } 634} 635 636group { name: "e/modules/connman/icon/cellular"; 637 inherit: "e/modules/connman/main"; 638 SCRIPT_MESSAGE() 639 programs { 640 program { 641 signal: "load"; source: ""; 642 action: STATE_SET "cell" 0.0; 643 target: "clip_exclam"; 644 target: "clip_wifi"; 645 target: "clip_eth"; 646 target: "clip_bt"; 647 target: "clip_cell"; 648 } 649 } 650} 651 652group { name: "e/modules/connman/end"; 653 images.image: "glow_lock_locked.png" COMP; 654 images.image: "glow_lock_unlocked.png" COMP; 655 images.image: "glow_lock_double.png" COMP; 656 parts { 657 part { name: "base"; mouse_events: 0; 658 description { state: "default" 0.0; 659 image.normal: "glow_lock_locked.png"; 660 aspect: 1.0 1.0; aspect_preference: BOTH; 661 visible: 0; 662 } 663 description { state: "none" 0.0; 664 inherit: "default" 0.0; 665 image.normal: "glow_lock_unlocked.png"; 666 visible: 1; 667 } 668 description { state: "wep" 0.0; 669 inherit: "default" 0.0; 670 image.normal: "glow_lock_locked.png"; 671 visible: 1; 672 } 673 description { state: "psk" 0.0; 674 inherit: "default" 0.0; 675 image.normal: "glow_lock_double.png"; 676 visible: 1; 677 } 678 } 679 } 680 programs { 681 program { 682 signal: "e,security,off"; source: "e"; 683 action: STATE_SET "default" 0.0; 684 target: "base"; 685 } 686 program { 687 signal: "e,security,none"; source: "e"; 688 action: STATE_SET "none" 0.0; 689 target: "base"; 690 } 691 program { 692 signal: "e,security,wep"; source: "e"; 693 action: STATE_SET "wep" 0.0; 694 target: "base"; 695 } 696 program { 697 signal: "e,security,psk"; source: "e"; 698 action: STATE_SET "psk" 0.0; 699 target: "base"; 700 } 701 program { 702 signal: "e,security,ieee8021x"; source: "e"; 703 action: STATE_SET "psk" 0.0; 704 target: "base"; 705 } 706 program { 707 signal: "e,security,wps"; source: "e"; 708 action: STATE_SET "wep" 0.0; 709 target: "base"; 710 } 711 } 712} 713