summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hirt <daniel.hirt@samsung.com>2016-03-15 18:06:59 +0200
committerDaniel Hirt <daniel.hirt@samsung.com>2016-03-15 18:07:14 +0200
commit2bb6ad32057e567b3d4a595b8e9658352224b1ef (patch)
tree1e35066fd3328ba97435a0213e2df0b4b2532970
parent77bb8bd04a32b4bbb66e89a8dda25207f61b95d8 (diff)
Label: merge slide groups into Entry's theme
This should make sliding somewhat usable. Still need to see what might be broken.
-rw-r--r--data/themes/edc/elm/entry.edc357
1 files changed, 357 insertions, 0 deletions
diff --git a/data/themes/edc/elm/entry.edc b/data/themes/edc/elm/entry.edc
index 1ed14eee8..6ac503c20 100644
--- a/data/themes/edc/elm/entry.edc
+++ b/data/themes/edc/elm/entry.edc
@@ -1178,6 +1178,363 @@ group { name: "elm/entry/handler/end/default";
1178 } 1178 }
1179} 1179}
1180 1180
1181group { name: "elm/entry/base/slide_long";
1182 inherit: "elm/entry/base-noedit/default";
1183 script {
1184 public g_duration, g_stopslide, g_timer_id, g_anim_id;
1185
1186 public message(Msg_Type:type, id, ...) {
1187 if ((type == MSG_FLOAT_SET) && (id == 0)) {
1188 new Float:duration;
1189 duration = getfarg(2);
1190 set_float(g_duration, duration);
1191 }
1192 }
1193 public slide_to_end_anim(val, Float:pos) {
1194 new stopflag;
1195 new id;
1196 stopflag = get_int(g_stopslide);
1197 if (stopflag == 1) return;
1198 set_tween_state(PART:"elm.text", pos, "slide_begin", 0.0, "slide_end", 0.0);
1199 if (pos >= 1.0) {
1200 id = timer(0.5, "slide_to_begin", 1);
1201 set_int(g_timer_id, id);
1202 emit("elm,state,slide,end","elm");
1203 }
1204 }
1205 public slide_to_end() {
1206 new stopflag;
1207 new id;
1208 new Float:duration;
1209 stopflag = get_int(g_stopslide);
1210 if (stopflag == 1) return;
1211 duration = get_float(g_duration);
1212 id = anim(duration, "slide_to_end_anim", 1);
1213 set_int(g_anim_id, id);
1214 }
1215 public slide_to_begin() {
1216 new stopflag;
1217 new id;
1218 stopflag = get_int(g_stopslide);
1219 if (stopflag == 1) return;
1220 set_state(PART:"elm.text", "slide_begin", 0.0);
1221 id = timer(0.5, "slide_to_end", 1);
1222 set_int(g_timer_id, id);
1223 }
1224 public start_slide() {
1225 set_int(g_stopslide, 0);
1226 set_state(PART:"elm.text", "slide_begin", 0.0);
1227 slide_to_end();
1228 }
1229 public stop_slide() {
1230 new id;
1231 set_int(g_stopslide, 1);
1232 id = get_int(g_anim_id);
1233 cancel_anim(id);
1234 id = get_int(g_timer_id);
1235 cancel_timer(id);
1236 set_state(PART:"elm.text", "default", 0.0);
1237 }
1238 }
1239 parts {
1240 part { name: "entry.text.clip"; type: RECT;
1241 description { state: "default" 0.0;
1242 }
1243 }
1244 part { name: "elm.text"; type: TEXTBLOCK;
1245 scale: 1;
1246 clip_to: "entry.text.clip";
1247 description { state: "default" 0.0;
1248 rel1.relative: 0.0 0.0;
1249 rel2.relative: 1.0 1.0;
1250 align: 0.0 0.0;
1251 text {
1252 style: "entry_style";
1253 min: 0 1;
1254 }
1255 }
1256 description { state: "slide_end" 0.0;
1257 inherit: "default" 0.0;
1258 rel1.relative: 0.0 0.0;
1259 rel2.relative: 0.0 1.0;
1260 align: 1.0 0.0;
1261 text {
1262 style: "entry_style";
1263 min: 1 1;
1264 ellipsis: -1;
1265 }
1266 fixed: 1 0;
1267 }
1268 description { state: "slide_begin" 0.0;
1269 inherit: "default" 0.0;
1270 rel1.relative: 1.0 0.0;
1271 rel2.relative: 1.0 1.0;
1272 align: 0.0 0.0;
1273 text {
1274 style: "entry_style";
1275 min: 1 1;
1276 ellipsis: -1;
1277 }
1278 fixed: 1 0;
1279 }
1280 }
1281 }
1282 programs {
1283 program { name: "start_slide";
1284 signal: "elm,state,slide,start"; source: "elm";
1285 script {
1286 start_slide();
1287 }
1288 }
1289 program { name: "stop_slide";
1290 signal: "elm,state,slide,stop"; source: "elm";
1291 script {
1292 stop_slide();
1293 }
1294 }
1295 }
1296}
1297
1298group { name: "elm/entry/base/slide_short";
1299 inherit: "elm/entry/base-noedit/default";
1300 script {
1301 public g_duration, g_stopslide, g_timer_id, g_anim_id;
1302
1303 public message(Msg_Type:type, id, ...) {
1304 if ((type == MSG_FLOAT_SET) && (id == 0)) {
1305 new Float:duration;
1306 duration = getfarg(2);
1307 set_float(g_duration, duration);
1308 }
1309 }
1310 public slide_to_end_anim(val, Float:pos) {
1311 new stopflag;
1312 new id;
1313 stopflag = get_int(g_stopslide);
1314 if (stopflag == 1) return;
1315 set_tween_state(PART:"elm.text", pos, "slide_begin", 0.0, "slide_end", 0.0);
1316 if (pos >= 1.0) {
1317 id = timer(0.5, "slide_to_begin", 1);
1318 set_int(g_timer_id, id);
1319 emit("elm,state,slide,end","elm");
1320 }
1321 }
1322 public slide_to_end() {
1323 new stopflag;
1324 new id;
1325 new Float:duration;
1326 stopflag = get_int(g_stopslide);
1327 if (stopflag == 1) return;
1328 duration = get_float(g_duration);
1329 id = anim(duration, "slide_to_end_anim", 1);
1330 set_int(g_anim_id, id);
1331 }
1332 public slide_to_begin() {
1333 new stopflag;
1334 new id;
1335 stopflag = get_int(g_stopslide);
1336 if (stopflag == 1) return;
1337 set_state(PART:"elm.text", "slide_begin", 0.0);
1338 id = timer(0.5, "slide_to_end", 1);
1339 set_int(g_timer_id, id);
1340 }
1341 public start_slide() {
1342 set_int(g_stopslide, 0);
1343 set_state(PART:"elm.text", "slide_begin", 0.0);
1344 slide_to_end();
1345 }
1346 public stop_slide() {
1347 new id;
1348 set_int(g_stopslide, 1);
1349 id = get_int(g_anim_id);
1350 cancel_anim(id);
1351 id = get_int(g_timer_id);
1352 cancel_timer(id);
1353 set_state(PART:"elm.text", "default", 0.0);
1354 }
1355 }
1356 parts {
1357 part { name: "entry.text.clip"; type: RECT;
1358 description { state: "default" 0.0;
1359 }
1360 }
1361 part { name: "elm.text"; type: TEXTBLOCK;
1362 scale: 1;
1363 clip_to: "entry.text.clip";
1364 description { state: "default" 0.0;
1365 rel1.relative: 0.0 0.0;
1366 rel2.relative: 1.0 1.0;
1367 align: 0.0 0.0;
1368 text { style: "entry_style";
1369 min: 0 1;
1370 }
1371 }
1372 description { state: "slide_end" 0.0;
1373 inherit: "default" 0.0;
1374 rel1.relative: 1.0 0.0;
1375 rel2.relative: 1.0 1.0;
1376 align: 1.0 0.0;
1377 text { style: "entry_style";
1378 min: 1 1;
1379 ellipsis: -1;
1380 }
1381 fixed: 1 0;
1382 }
1383 description { state: "slide_begin" 0.0;
1384 inherit: "default" 0.0;
1385 rel1.relative: 0.0 0.0;
1386 rel2.relative: 0.0 1.0;
1387 align: 0.0 0.0;
1388 text { style: "entry_style";
1389 min: 1 1;
1390 ellipsis: -1;
1391 }
1392 fixed: 1 0;
1393 }
1394 }
1395 }
1396 programs {
1397 program { name: "start_slide";
1398 signal: "elm,state,slide,start"; source: "elm";
1399 script {
1400 start_slide();
1401 }
1402 }
1403 program { name: "stop_slide";
1404 signal: "elm,state,slide,stop"; source: "elm";
1405 script {
1406 stop_slide();
1407 }
1408 }
1409 }
1410}
1411
1412group { name: "elm/entry/base/slide_bounce";
1413 inherit: "elm/entry/base-noedit/default";
1414 script {
1415 public g_duration, g_stopslide, g_timer_id, g_anim_id;
1416
1417 public message(Msg_Type:type, id, ...) {
1418 if ((type == MSG_FLOAT_SET) && (id == 0)) {
1419 new Float:duration;
1420 duration = getfarg(2);
1421 set_float(g_duration, duration);
1422 }
1423 }
1424 public slide_to_end_anim(val, Float:pos) {
1425 new stopflag;
1426 new id;
1427 stopflag = get_int(g_stopslide);
1428 if (stopflag == 1) return;
1429 set_tween_state(PART:"elm.text", pos, "slide_begin", 0.0, "slide_end", 0.0);
1430 if (pos >= 1.0) {
1431 id = timer(0.5, "slide_to_begin", 1);
1432 set_int(g_timer_id, id);
1433 }
1434 }
1435 public slide_to_end() {
1436 new stopflag;
1437 new id;
1438 new Float:duration;
1439 stopflag = get_int(g_stopslide);
1440 if (stopflag == 1) return;
1441 duration = get_float(g_duration);
1442 id = anim(duration, "slide_to_end_anim", 1);
1443 set_int(g_anim_id, id);
1444 }
1445 public slide_to_begin_anim(val, Float:pos) {
1446 new stopflag;
1447 new id;
1448 stopflag = get_int(g_stopslide);
1449 if (stopflag == 1) return;
1450 set_tween_state(PART:"elm.text", pos, "slide_end", 0.0, "slide_begin", 0.0);
1451 if (pos >= 1.0) {
1452 id = timer(0.5, "slide_to_end", 1);
1453 set_int(g_timer_id, id);
1454 emit("elm,state,slide,end","elm");
1455 }
1456 }
1457 public slide_to_begin() {
1458 new stopflag;
1459 new id;
1460 new Float:duration;
1461 stopflag = get_int(g_stopslide);
1462 if (stopflag == 1) return;
1463 duration = get_float(g_duration);
1464 id = anim(duration, "slide_to_begin_anim", 1);
1465 set_int(g_anim_id, id);
1466 }
1467 public start_slide() {
1468 set_int(g_stopslide, 0);
1469 set_state(PART:"elm.text", "slide_begin", 0.0);
1470 slide_to_end();
1471 }
1472 public stop_slide() {
1473 new id;
1474 set_int(g_stopslide, 1);
1475 id = get_int(g_anim_id);
1476 cancel_anim(id);
1477 id = get_int(g_timer_id);
1478 cancel_timer(id);
1479 set_state(PART:"elm.text", "default", 0.0);
1480 }
1481 }
1482 parts {
1483 part { name: "entry.text.clip"; type: RECT;
1484 description { state: "default" 0.0;
1485 }
1486 }
1487 part { name: "elm.text"; type: TEXTBLOCK;
1488 scale: 1;
1489 clip_to: "entry.text.clip";
1490 description { state: "default" 0.0;
1491 rel1.relative: 0.0 0.0;
1492 rel2.relative: 1.0 1.0;
1493 align: 0.0 0.0;
1494 text { style: "entry_style";
1495 min: 0 1;
1496 }
1497 }
1498 description { state: "slide_end" 0.0;
1499 inherit: "default" 0.0;
1500 rel1.relative: 1.0 0.0;
1501 rel2.relative: 1.0 1.0;
1502 align: 1.0 0.0;
1503 text { style: "entry_style";
1504 min: 1 1;
1505 ellipsis: -1;
1506 }
1507 fixed: 1 0;
1508 }
1509 description { state: "slide_begin" 0.0;
1510 inherit: "default" 0.0;
1511 rel1.relative: 0.0 0.0;
1512 rel2.relative: 0.0 1.0;
1513 align: 0.0 0.0;
1514 text { style: "entry_style";
1515 min: 1 1;
1516 ellipsis: -1;
1517 }
1518 fixed: 1 0;
1519 }
1520 }
1521 }
1522 programs {
1523 program { name: "start_slide";
1524 signal: "elm,state,slide,start"; source: "elm";
1525 script {
1526 start_slide();
1527 }
1528 }
1529 program { name: "stop_slide";
1530 signal: "elm,state,slide,stop"; source: "elm";
1531 script {
1532 stop_slide();
1533 }
1534 }
1535 }
1536}
1537
1181/////////////////////////////////////////////////////////////////////////////// 1538///////////////////////////////////////////////////////////////////////////////
1182// emoticon images from: 1539// emoticon images from:
1183// Tanya - Latvia 1540// Tanya - Latvia