Elm: Add pointer edc for mouse_pointers of elm wayland client apps.
authordevilhorns <devilhorns@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 10 Feb 2012 08:10:43 +0000 (08:10 +0000)
committerdevilhorns <devilhorns@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 10 Feb 2012 08:10:43 +0000 (08:10 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@67812 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

data/themes/default.edc
data/themes/widgets/pointer.edc [new file with mode: 0644]

index 09361ba..afc0c90 100644 (file)
@@ -367,5 +367,5 @@ collections {
 #include "widgets/naviframe.edc"
 #include "widgets/multibuttonentry.edc"
 #include "ews.edc"
-
+#include "widgets/pointer.edc"
 }
diff --git a/data/themes/widgets/pointer.edc b/data/themes/widgets/pointer.edc
new file mode 100644 (file)
index 0000000..5a04748
--- /dev/null
@@ -0,0 +1,189 @@
+   group {
+      name: "elm/pointer/base/default";
+      images {
+         image: "pointer.png" COMP;
+         image: "pointer_glow.png" COMP;
+         image: "pointer_glint_01.png" COMP;
+         image: "pointer_glint_02.png" COMP;
+         image: "pointer_glint_03.png" COMP;
+         image: "pointer_glint_04.png" COMP;
+         image: "pointer_glint_05.png" COMP;
+         image: "pointer_glint_06.png" COMP;
+         image: "pointer_glint_07.png" COMP;
+         image: "pointer_glint_08.png" COMP;
+         image: "pointer_glint_09.png" COMP;
+         image: "pointer_glint_10.png" COMP;
+         image: "pointer_glint_11.png" COMP;
+         image: "pointer_glint_12.png" COMP;
+      }
+      parts {
+         part {
+            name: "base";
+            mouse_events: 0;
+            description {
+               state: "default" 0.0;
+               aspect: 0.71875 0.71875;
+               /* force a specific aspect ratio so
+                * when it gets scaled it wont squash
+                * or stretch */
+               aspect_preference: BOTH;
+               /* both axes control aspect - thus it
+                * will be WITHIN the bounds the axes
+                * of thre part describe */
+               image {
+                  normal: "pointer.png";
+               }
+            }
+         }
+         part {
+            name: "glow";
+            /* this overlay is used to put a white glow
+             * around the pointer, so when the pointer is
+             * idle every now and again it will pulsate
+             * with this glow to just remind you where the
+             * pointer is (if you lose a black-ish
+             * pointer on a black background) */
+            mouse_events: 0;
+            description {
+               state: "default" 0.0;
+               rel1.to: "base";
+               rel2.to: "base";
+               visible: 0;
+               color: 255 255 255 0;
+               image.normal: "pointer_glow.png";
+            }
+            description {
+               state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               color: 255 255 255 255;
+            }
+         }
+         part {
+            name: "glint";
+            /* this overlay flips a series of small images
+             * over the pointer. they look like a white
+             * light/refelection when put over the pointer
+             * base image - and produce a "glinting" effect
+             * when played back fast */
+            mouse_events: 0;
+            description {
+               state: "default" 0.0;
+               rel1.to: "base";
+               rel2.to: "base";
+               visible: 0;
+               image.normal: "pointer_glint_12.png";
+            }
+            description {
+               state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               image.tween: "pointer_glint_01.png";
+               image.tween: "pointer_glint_02.png";
+               image.tween: "pointer_glint_03.png";
+               image.tween: "pointer_glint_04.png";
+               image.tween: "pointer_glint_05.png";
+               image.tween: "pointer_glint_06.png";
+               image.tween: "pointer_glint_07.png";
+               image.tween: "pointer_glint_08.png";
+               image.tween: "pointer_glint_09.png";
+               image.tween: "pointer_glint_10.png";
+               image.tween: "pointer_glint_11.png";
+               image.normal: "pointer_glint_12.png";
+            }
+         }
+         part {
+            name: "elm.swallow.hotspot";
+            /* this is a "fake" swallow part
+             * that is used by e to determine
+             * the pointer hotspot - or where
+             * the actual mouse events get
+             * reported from on the cursor */
+            type: SWALLOW;
+            description {
+               state: "default" 0.0;
+               visible: 0;
+               rel1 {
+                  /* the hotspot will scale with the cursor here */
+                  to: "base";
+                  relative: 0.27 0.125;
+                  offset: 0 0;
+               }
+               rel2 {
+                  to: "base";
+                  relative: 0.27 0.125;
+                  offset: 0 0;
+               }
+            }
+         }
+      }
+      programs {
+         program {
+            name: "mouse_down";
+            /* called every time elm detects a mouse
+             * press */
+            signal: "elm,action,mouse,down";
+            source: "elm";
+            action: STATE_SET "visible" 0.0;
+            transition: LINEAR 0.3;
+            target: "glint";
+            after: "mouse_down2";
+         }
+         program {
+            name: "mouse_down2";
+            action: STATE_SET "default" 0.0;
+            target: "glint";
+         }
+         program {
+            name: "mouse_idle";
+            /* called when e thinks the mouse went
+             * idle and isn't moving */
+            signal: "elm,state,mouse,idle";
+            source: "elm";
+            action: STATE_SET "visible" 0.0;
+            in: 5.0 0.0;
+            transition: SINUSOIDAL 1.0;
+            target: "glow";
+            after: "mouse_idle2";
+         }
+         program {
+            name: "mouse_idle2";
+            action: STATE_SET "default" 0.0;
+            transition: SINUSOIDAL 2.0;
+            target: "glow";
+            after: "mouse_idle";
+         }
+         program {
+            name: "mouse_active";
+            /* called when e sees the mouse become
+             * active again */
+            signal: "elm,state,mouse,active";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "glow";
+            after: "mouse_active2";
+         }
+         program {
+            name: "mouse_active2";
+            action: ACTION_STOP;
+            target: "mouse_idle";
+            target: "mouse_idle2";
+         }
+         // when mouse button is released. not used here
+         //         program { name: "xx";
+         //       signal: "e,action,mouse,up";
+         //       source: "e";
+         //    }
+         // when mouse button is moved. not used here
+         //         program { name: "xx";
+         //       signal: "e,action,mouse,move";
+         //       source: "e";
+         //    }
+         // when mouse wheel is scrolled. not used here
+         //         program { name: "xx";
+         //       signal: "e,action,mouse,wheel";
+         //       source: "e";
+         //    }
+      }
+   }
+