summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen okra Houston <smhouston88@gmail.com>2016-11-18 14:14:27 -0600
committerStephen okra Houston <smhouston88@gmail.com>2016-11-18 14:15:39 -0600
commitd5183d7ab78e3e36e90abe402804b58fab16d206 (patch)
treeaaf8402236fa82437b224eee6994cb1db48314f0
parente317099426f4f0e83ef37bb3622564c634bdde41 (diff)
Luncher: Add the engage style that can be selected for luncher.
Please make sure your e and efl are updated together while using this. It is not perfect and fairly buggy currently so use at your own risk.
-rw-r--r--data/elementary/themes/edc/luncher.edc236
1 files changed, 230 insertions, 6 deletions
diff --git a/data/elementary/themes/edc/luncher.edc b/data/elementary/themes/edc/luncher.edc
index 6008e09021..834023ff25 100644
--- a/data/elementary/themes/edc/luncher.edc
+++ b/data/elementary/themes/edc/luncher.edc
@@ -1,4 +1,7 @@
1group { name: "e/gadget/luncher/bar"; 1group { name: "e/gadget/luncher/bar";
2 data {
3 item: styles "default engage";
4 }
2 parts { 5 parts {
3 part { name: "e.swallow.drop"; type: SWALLOW; 6 part { name: "e.swallow.drop"; type: SWALLOW;
4 description { state: "default" 0.0; 7 description { state: "default" 0.0;
@@ -20,12 +23,208 @@ group { name: "e/gadget/luncher/bar";
20group { name: "e/gadget/luncher/icon"; 23group { name: "e/gadget/luncher/icon";
21 script { 24 script {
22 public urgent; 25 public urgent;
26 public style;
27 public message(Msg_Type:type, id, ...) {
28
29//Style Variable - Used to Identify Style - Name Must Match an Item in the Data List of e/gadget/luncher/bar
30//Style Setting Messages Will Always Have an ID of 1
31//Icon Messages Related To The Style Will Have an ID of 2.
32//Arguments are in the Following Order:
33//X Position of the Cursor
34//Y Position of the Cursor
35//X Position of Icon
36//Y Position of Icon
37//Width of icon
38//Height of icon
39//Location of the bar - 0 is left, 1 is top, 2 is right, 3 is bottom
40
41 if ((type == MSG_STRING) && (id == 1)) {
42 new s[32];
43
44 getsarg(2, s, sizeof(s));
45 set_str(style, s);
46 }
47 if ((type == MSG_INT_SET) && (id == 2)) {
48 new xpos = getarg(2);
49 new ypos = getarg(3);
50 new x = getarg(4);
51 new y = getarg(5);
52 new w = getarg(6);
53 new h = getarg(7);
54 new pos = getarg(8);
55 new s[32];
56
57 get_str(style, s, sizeof(s));
58
59 if (!strcmp(s, "default")) {
60 if ((pos == 0) || (pos == 2)) {
61 if ((ypos >= y) && (ypos <= (y+h))) {
62 set_state_anim(PART:"background", "default", 0.0, LINEAR, 1.0);
63 }
64 else {
65 set_state_anim(PART:"background", "default", 0.0, LINEAR, 1.0);
66 }
67 }
68 else if ((pos == 1) || (pos == 3)) {
69 if ((xpos >= x) && (xpos <= (x+w))) {
70 set_state_anim(PART:"background", "visible", 0.0, LINEAR, 1.0);
71 }
72 else {
73 set_state_anim(PART:"background", "default", 0.0, LINEAR, 1.0);
74 }
75 }
76 }
77 else if (!strcmp(s, "engage")) {
78 if (pos == 0) {
79 if ((ypos >= y) && (ypos <= (y+h))) {
80 custom_state(PART:"sizer", "default", 0.0);
81 set_state_val(PART:"sizer", STATE_REL1, 0.0, -0.5);
82 set_state_val(PART:"sizer", STATE_REL2, 2.0, 1.5);
83 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
84 }
85 else if (((ypos-h) >= y) && ((ypos-h) <= (y+h))) {
86 custom_state(PART:"sizer", "default", 0.0);
87 set_state_val(PART:"sizer", STATE_REL1, 0.0, -0.3);
88 set_state_val(PART:"sizer", STATE_REL2, 1.6, 1.3);
89 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
90 }
91 else if (((ypos+h) >= y) && ((ypos+h) <= (y+h))) {
92 custom_state(PART:"sizer", "default", 0.0);
93 set_state_val(PART:"sizer", STATE_REL1, 0.0, -0.3);
94 set_state_val(PART:"sizer", STATE_REL2, 1.6, 1.3);
95 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
96 }
97 else if (((ypos-(h*2)) >= y) && ((ypos-(h*2)) <= (y+h))) {
98 custom_state(PART:"sizer", "default", 0.0);
99 set_state_val(PART:"sizer", STATE_REL1, 0.0, -0.2);
100 set_state_val(PART:"sizer", STATE_REL2, 1.4, 1.2);
101 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
102 }
103 else if (((ypos+(h*2)) >= y) && ((ypos+(h*2)) <= (y+h))) {
104 custom_state(PART:"sizer", "default", 0.0);
105 set_state_val(PART:"sizer", STATE_REL1, 0.0, -0.2);
106 set_state_val(PART:"sizer", STATE_REL2, 1.4, 1.2);
107 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
108 }
109 else {
110 set_state_anim(PART:"sizer", "default", 0.0, LINEAR, 1.0);
111 }
112 }
113 else if (pos == 1) {
114 if ((xpos >= x) && (xpos <= (x+w))) {
115 custom_state(PART:"sizer", "default", 0.0);
116 set_state_val(PART:"sizer", STATE_REL1, -0.5, 0.0);
117 set_state_val(PART:"sizer", STATE_REL2, 1.5, 2.0);
118 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
119 }
120 else if (((xpos-w) >= x) && ((xpos-w) <= (x+w))) {
121 custom_state(PART:"sizer", "default", 0.0);
122 set_state_val(PART:"sizer", STATE_REL1, -0.3, 0.0);
123 set_state_val(PART:"sizer", STATE_REL2, 1.3, 1.6);
124 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
125 }
126 else if (((xpos+w) >= x) && ((xpos+w) <= (x+w))) {
127 custom_state(PART:"sizer", "default", 0.0);
128 set_state_val(PART:"sizer", STATE_REL1, -0.3, 0.0);
129 set_state_val(PART:"sizer", STATE_REL2, 1.3, 1.6);
130 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
131 }
132 else if (((xpos-(w*2)) >= x) && ((xpos-(w*2)) <= (x+w))) {
133 custom_state(PART:"sizer", "default", 0.0);
134 set_state_val(PART:"sizer", STATE_REL1, -0.2, 0.0);
135 set_state_val(PART:"sizer", STATE_REL2, 1.2, 1.4);
136 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
137 }
138 else if (((xpos+(w*2)) >= x) && ((xpos+(w*2)) <= (x+w))) {
139 custom_state(PART:"sizer", "default", 0.0);
140 set_state_val(PART:"sizer", STATE_REL1, -0.2, 0.0);
141 set_state_val(PART:"sizer", STATE_REL2, 1.2, 1.4);
142 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
143 }
144 else {
145 set_state_anim(PART:"sizer", "default", 0.0, LINEAR, 1.0);
146 }
147 }
148 else if (pos == 2) {
149 if ((ypos >= y) && (ypos <= (y+h))) {
150 custom_state(PART:"sizer", "default", 0.0);
151 set_state_val(PART:"sizer", STATE_REL1, -1.0, -0.5);
152 set_state_val(PART:"sizer", STATE_REL2, 1.0, 1.5);
153 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
154 }
155 else if (((ypos-h) >= y) && ((ypos-h) <= (y+h))) {
156 custom_state(PART:"sizer", "default", 0.0);
157 set_state_val(PART:"sizer", STATE_REL1, -0.6, -0.3);
158 set_state_val(PART:"sizer", STATE_REL2, 1.0, 1.3);
159 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
160 }
161 else if (((ypos+h) >= y) && ((ypos+h) <= (y+h))) {
162 custom_state(PART:"sizer", "default", 0.0);
163 set_state_val(PART:"sizer", STATE_REL1, -0.6, -0.3);
164 set_state_val(PART:"sizer", STATE_REL2, 1.0, 1.3);
165 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
166 }
167 else if (((ypos-(h*2)) >= y) && ((ypos-(h*2)) <= (y+h))) {
168 custom_state(PART:"sizer", "default", 0.0);
169 set_state_val(PART:"sizer", STATE_REL1, -0.4, -0.2);
170 set_state_val(PART:"sizer", STATE_REL2, 1.0, 1.2);
171 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
172 }
173 else if (((ypos+(h*2)) >= y) && ((ypos+(h*2)) <= (y+h))) {
174 custom_state(PART:"sizer", "default", 0.0);
175 set_state_val(PART:"sizer", STATE_REL1, -0.4, -0.2);
176 set_state_val(PART:"sizer", STATE_REL2, 1.0, 1.2);
177 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
178 }
179 else {
180 set_state_anim(PART:"sizer", "default", 0.0, LINEAR, 1.0);
181 }
182 }
183 else if (pos == 3) {
184 if ((xpos >= x) && (xpos <= (x+w))) {
185 custom_state(PART:"sizer", "default", 0.0);
186 set_state_val(PART:"sizer", STATE_REL1, -0.5, -1.0);
187 set_state_val(PART:"sizer", STATE_REL2, 1.5, 1.0);
188 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
189 }
190 else if (((xpos-w) >= x) && ((xpos-w) <= (x+w))) {
191 custom_state(PART:"sizer", "default", 0.0);
192 set_state_val(PART:"sizer", STATE_REL1, -0.3, -0.6);
193 set_state_val(PART:"sizer", STATE_REL2, 1.3, 1.0);
194 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
195 }
196 else if (((xpos+w) >= x) && ((xpos+w) <= (x+w))) {
197 custom_state(PART:"sizer", "default", 0.0);
198 set_state_val(PART:"sizer", STATE_REL1, -0.3, -0.6);
199 set_state_val(PART:"sizer", STATE_REL2, 1.3, 1.0);
200 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
201 }
202 else if (((xpos-(w*2)) >= x) && ((xpos-(w*2)) <= (x+w))) {
203 custom_state(PART:"sizer", "default", 0.0);
204 set_state_val(PART:"sizer", STATE_REL1, -0.2, -0.4);
205 set_state_val(PART:"sizer", STATE_REL2, 1.2, 1.0);
206 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
207 }
208 else if (((xpos+(w*2)) >= x) && ((xpos+(w*2)) <= (x+w))) {
209 custom_state(PART:"sizer", "default", 0.0);
210 set_state_val(PART:"sizer", STATE_REL1, -0.2, -0.4);
211 set_state_val(PART:"sizer", STATE_REL2, 1.2, 1.0);
212 set_state_anim(PART:"sizer", "custom", 0.0, LINEAR, 1.0);
213 }
214 else {
215 set_state_anim(PART:"sizer", "default", 0.0, LINEAR, 1.0);
216 }
217 }
218 }
219 emit("e,state,resized", "e");
220 }
221 }
23 } 222 }
24 parts { 223 parts {
25 part { name: "item_clip"; type: RECT; 224 part { name: "item_clip"; type: RECT;
26 description { state: "default" 0.0; 225 description { state: "default" 0.0;
27 rel1.to: "e.swallow.icon"; 226 rel1.to: "sizer";
28 rel2.to: "e.swallow.icon"; 227 rel2.to: "sizer";
29 rel1.offset: -100 -100; 228 rel1.offset: -100 -100;
30 rel2.offset: 99 99; 229 rel2.offset: 99 99;
31 color: 255 255 255 255; 230 color: 255 255 255 255;
@@ -35,13 +234,24 @@ group { name: "e/gadget/luncher/icon";
35 color: 255 255 255 64; 234 color: 255 255 255 64;
36 } 235 }
37 } 236 }
237 part { name: "sizer"; type: RECT;
238 clip_to: "item_clip";
239 mouse_events: 0;
240 description {
241 align: 0 0;
242 state: "default" 0.0;
243 rel1.relative: 0.0 0.0;
244 rel2.relative: 1.0 1.0;
245 color: 255 255 255 0;
246 }
247 }
38 part { name: "background"; type: RECT; 248 part { name: "background"; type: RECT;
39 clip_to: "item_clip"; 249 clip_to: "item_clip";
40 mouse_events: 0; 250 mouse_events: 0;
41 description { state: "default" 0.0; 251 description { state: "default" 0.0;
42 visible: 0; 252 visible: 0;
43 rel1.offset: 0 0; 253 rel1.to: "sizer";
44 rel2.offset: -1 -1; 254 rel2.to: "sizer";
45 color: 255 255 255 0; 255 color: 255 255 255 0;
46 } 256 }
47 description { state: "visible" 0.0; 257 description { state: "visible" 0.0;
@@ -52,9 +262,12 @@ group { name: "e/gadget/luncher/icon";
52 } 262 }
53 part { name: "indicator"; type: RECT; 263 part { name: "indicator"; type: RECT;
54 clip_to: "item_clip"; 264 clip_to: "item_clip";
265 mouse_events: 0;
55 description { state: "default" 0.0; 266 description { state: "default" 0.0;
56 visible: 0; 267 visible: 0;
57 align: 0.6 0.6; 268 align: 0.6 0.6;
269 rel1.to: "sizer";
270 rel2.to: "sizer";
58 color: 255 255 255 0; 271 color: 255 255 255 0;
59 } 272 }
60 description { state: "on_left" 0.0; 273 description { state: "on_left" 0.0;
@@ -97,10 +310,11 @@ group { name: "e/gadget/luncher/icon";
97 part { name: "e.swallow.icon"; type: SWALLOW; 310 part { name: "e.swallow.icon"; type: SWALLOW;
98 clip_to: "item_clip"; 311 clip_to: "item_clip";
99 mouse_events: 1; 312 mouse_events: 1;
313 repeat_events: 1;
100 description { state: "default" 0.0; 314 description { state: "default" 0.0;
101 align: 0.5 0.5; 315 align: 0.5 0.5;
102 rel1.offset: 0 0; 316 rel1.to: "sizer";
103 rel2.offset: -1 -1; 317 rel2.to: "sizer";
104 } 318 }
105 description { state: "on_left" 0.0; 319 description { state: "on_left" 0.0;
106 inherit: "default" 0.0; 320 inherit: "default" 0.0;
@@ -138,6 +352,8 @@ group { name: "e/gadget/luncher/icon";
138 clip_to: "item_clip"; 352 clip_to: "item_clip";
139 description { state: "default" 0.0; 353 description { state: "default" 0.0;
140 visible: 0; 354 visible: 0;
355 rel1.to: "sizer";
356 rel2.to: "sizer";
141 color: 255 255 255 0; 357 color: 255 255 255 0;
142 } 358 }
143 description { state: "visible" 0.0; 359 description { state: "visible" 0.0;
@@ -170,14 +386,22 @@ group { name: "e/gadget/luncher/icon";
170 } 386 }
171 } 387 }
172 programs { 388 programs {
389 program { name: "set_default";
390 signal: "e,state,default"; source: "e";
391 action: STATE_SET "default" 0.0;
392 transition: LINEAR 0.2;
393 target: "sizer";
394 }
173 program { name: "focused"; 395 program { name: "focused";
174 signal: "e,state,focused"; source: "e"; 396 signal: "e,state,focused"; source: "e";
175 action: STATE_SET "visible" 0.0; 397 action: STATE_SET "visible" 0.0;
398 transition: LINEAR 0.5;
176 target: background; 399 target: background;
177 } 400 }
178 program { name: "unfocused"; 401 program { name: "unfocused";
179 signal: "e,state,unfocused"; source: "e"; 402 signal: "e,state,unfocused"; source: "e";
180 action: STATE_SET "default" 0.0; 403 action: STATE_SET "default" 0.0;
404 transition: LINEAR 0.5;
181 target: background; 405 target: background;
182 } 406 }
183 program { name: "starting"; 407 program { name: "starting";