summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-07-09 11:35:34 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-07-09 11:35:34 +0100
commit7d7c825ecd808fb4caccf13e23cc90a5c0d833e5 (patch)
tree49b1407256aa7f38e893ee34d3d4e9297295b5b5
parentda92c16753a6773bfe1a9c74325be300bf3a3eb9 (diff)
video smart - we dont need to handle the move func - smart clipped does
-rw-r--r--src/bin/video.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/bin/video.c b/src/bin/video.c
index dc8fa30..25f6842 100644
--- a/src/bin/video.c
+++ b/src/bin/video.c
@@ -409,9 +409,9 @@ _smart_add(Evas_Object *obj)
409 _parent_sc.add(obj); 409 _parent_sc.add(obj);
410 410
411 o = evas_object_rectangle_add(evas_object_evas_get(obj)); 411 o = evas_object_rectangle_add(evas_object_evas_get(obj));
412 evas_object_color_set(o, 255, 255, 255, 255);
412 evas_object_smart_member_add(o, obj); 413 evas_object_smart_member_add(o, obj);
413 sd->clip = o; 414 sd->clip = o;
414 evas_object_color_set(o, 255, 255, 255, 255);
415} 415}
416 416
417static void 417static void
@@ -450,12 +450,11 @@ static void
450_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) 450_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
451{ 451{
452 Video *sd = evas_object_smart_data_get(obj); 452 Video *sd = evas_object_smart_data_get(obj);
453 Evas_Coord ox, oy, ow, oh; 453 Evas_Coord ow, oh;
454 if (!sd) return; 454 if (!sd) return;
455 evas_object_geometry_get(obj, &ox, &oy, &ow, &oh); 455 evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
456 if ((ow == w) && (oh == h)) return; 456 if ((ow == w) && (oh == h)) return;
457 evas_object_smart_changed(obj); 457 evas_object_smart_changed(obj);
458 evas_object_resize(sd->clip, ow, oh);
459} 458}
460 459
461static Eina_Bool 460static Eina_Bool
@@ -524,14 +523,6 @@ _smart_calculate(Evas_Object *obj)
524} 523}
525 524
526static void 525static void
527_smart_move(Evas_Object *obj, Evas_Coord x EINA_UNUSED, Evas_Coord y EINA_UNUSED)
528{
529 Video *sd = evas_object_smart_data_get(obj);
530 if (!sd) return;
531 evas_object_smart_changed(obj);
532}
533
534static void
535_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event) 526_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
536{ 527{
537 Evas_Event_Mouse_Down *ev = event; 528 Evas_Event_Mouse_Down *ev = event;
@@ -574,7 +565,6 @@ _smart_init(void)
574 sc.add = _smart_add; 565 sc.add = _smart_add;
575 sc.del = _smart_del; 566 sc.del = _smart_del;
576 sc.resize = _smart_resize; 567 sc.resize = _smart_resize;
577 sc.move = _smart_move;
578 sc.calculate = _smart_calculate; 568 sc.calculate = _smart_calculate;
579 _smart = evas_smart_class_new(&sc); 569 _smart = evas_smart_class_new(&sc);
580} 570}