summaryrefslogtreecommitdiff
path: root/legacy/elementary/data/themes/widgets/pointer.edc
blob: 2e0437013ad97d456d5f4b6cd018e1dcb47f7eb3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
   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;
               min: 23 32;
               /* 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";
         //    }
      }
   }