[EGIT] [core/elementary] master 01/05: [Elementary/example]: Add new 3D game - Sphere Hunter.

2014-12-09 Thread se.osadchy
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=3d4ec8654322c2bf979eb187260593b43cecf819

commit 3d4ec8654322c2bf979eb187260593b43cecf819
Author: se.osadchy 
Date:   Wed Dec 10 03:53:40 2014 +0100

[Elementary/example]: Add new 3D game - Sphere Hunter.

Summary: This example shows the just using elementary with evas 3D.

Reviewers: cedric, raster, Hermet

Differential Revision: https://phab.enlightenment.org/D1755
---
 src/examples/sphere_hunter/EFL_defeat.png  | Bin 0 -> 88373 bytes
 src/examples/sphere_hunter/EFL_victory.png | Bin 0 -> 108064 bytes
 src/examples/sphere_hunter/evas_3d_sphere_hunter.c | 954 +
 src/examples/sphere_hunter/score.jpg   | Bin 0 -> 51305 bytes
 src/examples/sphere_hunter/sphere_hunter.edc   | 251 ++
 5 files changed, 1205 insertions(+)

diff --git a/src/examples/sphere_hunter/EFL_defeat.png 
b/src/examples/sphere_hunter/EFL_defeat.png
new file mode 100644
index 000..0839bce
Binary files /dev/null and b/src/examples/sphere_hunter/EFL_defeat.png differ
diff --git a/src/examples/sphere_hunter/EFL_victory.png 
b/src/examples/sphere_hunter/EFL_victory.png
new file mode 100644
index 000..c5dc2ca
Binary files /dev/null and b/src/examples/sphere_hunter/EFL_victory.png differ
diff --git a/src/examples/sphere_hunter/evas_3d_sphere_hunter.c 
b/src/examples/sphere_hunter/evas_3d_sphere_hunter.c
new file mode 100644
index 000..b37b84e
--- /dev/null
+++ b/src/examples/sphere_hunter/evas_3d_sphere_hunter.c
@@ -0,0 +1,954 @@
+/*
+* Catch all the cubes to score 10 points and win.
+* w - up
+* s - down
+* a - left
+* d - right
+* space - jump
+* key Up - scale +
+* key Down - scale -
+* n - normal scale
+* TODO: add more levels.
+*
+* Compile with:
+* edje_cc sphere_hunter.edc
+* gcc -o evas_3d_sphere_hunter evas_3d_sphere_hunter.c -g `pkg-config --libs 
--cflags evas ecore elementary eina eo` -lm
+*/
+
+#define EFL_EO_API_SUPPORT
+#define EFL_BETA_API_SUPPORT
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define  WIDTH  700
+#define  HEIGHT 800
+#define  ANGLE_IT   0.006
+#define  GE -0.1
+#define  KE 1
+
+typedef struct _Scene_Data
+{
+   Eo   *root_node;
+   Eo   *camera_node;
+   Eo   *light_node;
+   Eo   *mesh_node_ball;
+
+   Eina_List *items;
+
+   Eo   *scene;
+   Eo   *camera;
+   Eo   *light;
+   Eo   *mesh_cube;
+   Eo   *material_cube;
+   Eo   *mesh_ball;
+   Eo   *material_ball;
+} Scene_Data;
+
+typedef struct _vec4
+{
+   float   x;
+   float   y;
+   float   z;
+   float   w;
+} vec4;
+
+typedef struct _vec3
+{
+   float   x;
+   float   y;
+   float   z;
+} vec3;
+
+typedef struct _vec2
+{
+   float   x;
+   float   y;
+} vec2;
+
+typedef struct _vertex
+{
+   vec3position;
+   vec3normal;
+   vec3tangent;
+   vec4color;
+   vec3texcoord;
+} vertex;
+
+Evas_Object  *win   = NULL;
+Evas_Object  *layout= NULL;
+Evas_Object  *text  = NULL;
+Evas_Object  *btn_restart= NULL;
+Evas_Object  *btn_quit  = NULL;
+Eina_List*nodes = NULL;
+
+Ecore_Animator   *anim_cube = NULL;
+Ecore_Animator   *anim_camera   = NULL;
+Ecore_Animator   *anim_ball = NULL;
+Evas *evas  = NULL;
+Eo   *image = NULL;
+
+
+Evas_Realball_position_x= 0.0;
+Evas_Realball_position_y= -1.0;
+Evas_Realball_position_z= 0.0;
+Evas_Realball_vel_x = 0.0;
+Evas_Realball_vel_y = 0.0;
+Evas_Realball_vel_z = 0.0;
+Evas_Realball_ac_x  = 0.0;
+Evas_Realball_ac_y  = GE;
+Evas_Realball_ac_z  = 0.0;
+Evas_Realplane_alpha_x  = 0.0;
+Evas_Realplane_alpha_z  = 0.0;
+Eina_Boolreload = EINA_TRUE;
+Eina_Booljump   = EINA_FALSE;
+Eina_Boolgame   = EINA_TRUE;
+
+vertex   *vertices  = NULL;
+int  score  = 0;
+int  vertex_count   = 0;
+int  index_count= 0;
+unsigned short   *indices   = NULL;
+floatcamera_y   = 40.0;
+floatcamera_z   = 70.0;
+int  hight  = 1;
+
+
+static const float cube_vertices[] =
+{
+   /* Front */
+   -1.0,  1.0,  1.0, 0.0,  0.0,  1.0, 1.0, 0.0, 0.0, 1.0, 0.0,  
1.0,
+1.0,  1.0,  1.0, 0.0,  0.0,  1.0, 1.0, 0.0, 0.0, 1.0, 1.0,  
1.0,
+   -1.0, -1.0,  1.0, 0.0,  0.0,  1.0, 1.0, 0.0, 0.0, 1.0, 0.0,  
0.0,
+1.0, -1.0,  1.0, 0.0,  0.0,  1.0, 1.0, 0.0, 0.0, 1.0, 1.0,  
0.0,
+
+   /* Back */
+1.0,  1.0, -1.0, 0.0,  0.0, -1.0, 0.0, 0.0, 1.0, 1.0, 0.0,  
1.0,
+   -1.0,  1.0, -1.0, 

[EGIT] [tools/eflete] master 09/19: fix issue with ecore_audio

2016-06-16 Thread se.osadchy
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=184abbf3cfbf90a4020281f81ae5096d249141e7

commit 184abbf3cfbf90a4020281f81ae5096d249141e7
Author: se.osadchy 
Date:   Thu Jun 16 12:23:47 2016 +0300

fix issue with ecore_audio

Signed-off-by: Vitalii Vorobiov 
---
 src/bin/ui/sound_player/sound_player.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bin/ui/sound_player/sound_player.c 
b/src/bin/ui/sound_player/sound_player.c
index 0fe2a0b..8bd124a 100644
--- a/src/bin/ui/sound_player/sound_player.c
+++ b/src/bin/ui/sound_player/sound_player.c
@@ -338,10 +338,12 @@ sound_player_sound_set(Sound_Data *sound)
 void
 sound_player_sound_unset(void)
 {
+#ifdef HAVE_AUDIO
ecore_audio_obj_paused_set(in, true);
ecore_timer_freeze(timer);
 
_play_finished_cb(NULL, NULL);
+#endif
 }
 
 Evas_Object *

-- 




[EGIT] [tools/eflete] master 02/03: Fix work of Shortcust for macOS

2016-06-22 Thread se.osadchy
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=ebec6689bb5b7d437ed378f0b8425588e0d764df

commit ebec6689bb5b7d437ed378f0b8425588e0d764df
Author: se.osadchy 
Date:   Wed Jun 22 16:34:29 2016 +0300

Fix work of Shortcust for macOS
---
 src/bin/ui/shortcuts/shortcuts.c | 120 ---
 1 file changed, 63 insertions(+), 57 deletions(-)

diff --git a/src/bin/ui/shortcuts/shortcuts.c b/src/bin/ui/shortcuts/shortcuts.c
index 45d50f8..ec25ea8 100644
--- a/src/bin/ui/shortcuts/shortcuts.c
+++ b/src/bin/ui/shortcuts/shortcuts.c
@@ -23,65 +23,71 @@ static inline unsigned int
 _keycode_convert(unsigned int keycode)
 {
 #ifdef __APPLE__
-#define KEY(mac, lin) case mac: return lin;
+#define KEY(mac, lin) case mac: return lin;
switch (keycode)
{
-  KEY(26, 10) /* 1 */
-  KEY(27, 11)
-  KEY(28, 12)
-  KEY(29, 13)
-  KEY(31, 14)
-  KEY(30, 15)
-  KEY(34, 16)
-  KEY(36, 17)
-  KEY(33, 18)
-  KEY(37, 19)
-  KEY(35, 20) /* - */
-  KEY(32, 21) /* = */
-
-  KEY(20, 24) /* q */
-  KEY(21, 25)
-  KEY(22, 26)
-  KEY(23, 27)
-  KEY(25, 28)
-  KEY(24, 29)
-  KEY(40, 30)
-  KEY(42, 31)
-  KEY(39, 32)
-  KEY(43, 33) /* p */
-  KEY(41, 34) /* [ */
-  KEY(38, 35) /* ] */
-  KEY(50, 51) /* \ */
-
-  KEY(8, 38) /* a */
-  KEY(9, 39)
-  KEY(10, 40)
-  KEY(11, 41)
-  KEY(13, 42)
-  KEY(12, 43)
-  KEY(46, 44)
-  KEY(48, 45)
-  KEY(45, 46)
-  KEY(49, 47) /* ; */
-  KEY(47, 48) /* ' */
-
-  KEY(14, 52) /* z */
-  KEY(15, 53)
-  KEY(16, 54)
-  KEY(17, 55)
-  KEY(19, 56)
-  KEY(53, 57)
-  KEY(54, 58)
-  KEY(51, 59)
-  KEY(55, 60)
-  KEY(52, 61) /* / */
-
-  KEY(56, 23) /* tab */
-
-  KEY(66, 64) /* Alt_L */
-
-  KEY(131, 113) /* left */
-  KEY(132, 114) /* right */
+  KEY(18, 10) /* 1 */
+  KEY(19, 11)
+  KEY(20, 12)
+  KEY(21, 13)
+  KEY(23, 14)
+  KEY(22, 15)
+  KEY(26, 16)
+  KEY(28, 17)
+  KEY(25, 18)
+  KEY(29, 19)
+  KEY(27, 20) /* - */
+  KEY(24, 21) /* = */
+
+  KEY(12, 24) /* q */
+  KEY(13, 25)
+  KEY(14, 26)
+  KEY(15, 27)
+  KEY(17, 28)
+  KEY(16, 29)
+  KEY(32, 30)
+  KEY(34, 31)
+  KEY(31, 32)
+  KEY(35, 33) /* p */
+  KEY(33, 34) /* [ */
+  KEY(30, 35) /* ] */
+  KEY(42, 51) /* \ */
+
+  KEY(0, 38) /* a */
+  KEY(1, 39)
+  KEY(2, 40)
+  KEY(3, 41)
+  KEY(5, 42)
+  KEY(4, 43)
+  KEY(38, 44)
+  KEY(40, 45)
+  KEY(37, 46)
+  KEY(41, 47) /* ; */
+  KEY(39, 48) /* ' */
+
+  KEY(6, 52) /* z */
+  KEY(7, 53)
+  KEY(8, 54)
+  KEY(9, 55)
+  KEY(11, 56)
+  KEY(45, 57)
+  KEY(46, 58)
+  KEY(43, 59)
+  KEY(47, 60)
+  KEY(44, 61) /* / */
+
+  KEY(48, 23) /* tab */
+
+  KEY(123, 113) /* left */
+  KEY(124, 114) /* right */
+
+  KEY(122, 67) /* F1 */
+  KEY(120, 68) /* F2 */
+  KEY(99, 69) /* F3 */
+  KEY(98, 73) /* F7 */
+  KEY(100, 74) /* F8 */
+  KEY(101, 75) /* F9 */
+  KEY(109, 76) /* F10 */
}
DBG("notconverted mac keycode: %d", keycode);
 #undef KEY

-- 




[EGIT] [core/efl] master 01/01: evas: fix work of engine on macOS.

2016-07-11 Thread se.osadchy
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f796f04aae894274e7819b0e4a61b4386aa9fb05

commit f796f04aae894274e7819b0e4a61b4386aa9fb05
Author: se.osadchy 
Date:   Mon Jul 11 10:54:47 2016 -0700

evas: fix work of engine on macOS.

Summary: Update eng_image_free function and check of references.

Reviewers: thiepha, NikaWhite, FurryMyad, raster, cedric

Subscribers: raster, jpeg

Differential Revision: https://phab.enlightenment.org/D4150

Signed-off-by: Cedric BAIL 
---
 src/modules/evas/engines/gl_cocoa/evas_engine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/evas/engines/gl_cocoa/evas_engine.c 
b/src/modules/evas/engines/gl_cocoa/evas_engine.c
index dfe82da..1cd81c7 100644
--- a/src/modules/evas/engines/gl_cocoa/evas_engine.c
+++ b/src/modules/evas/engines/gl_cocoa/evas_engine.c
@@ -582,7 +582,7 @@ eng_image_free(void *data, void *image)
re = (Render_Engine *)data;
if (!image) return;
eng_window_use(re->win);
-   evas_gl_common_image_free(image);
+   evas_gl_common_image_unref(image);
 }
 
 static void

-- 




[EGIT] [core/efl] master 03/03: elm_map: Fix work of elm_map_overlay_icon_set if icon is NULL.

2017-03-21 Thread se.osadchy
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a63ce8c2e2be61ba3acf1d9b71c963f313ad5cf6

commit a63ce8c2e2be61ba3acf1d9b71c963f313ad5cf6
Author: se.osadchy 
Date:   Tue Mar 21 11:13:15 2017 -0700

elm_map: Fix work of elm_map_overlay_icon_set if icon is NULL.

Summary:
Delete check on NULL for icon object due to incorrect work. Function must 
delete
icon in map overlay (according to documentation) if we set NULL, but with 
this check -
nothing happening and after elm_map_overlay_icon_get we have not NULL 
returned value.
@fix

Reviewers: cedric, Hermet, raster, jpeg

Reviewed By: cedric

Subscribers: artem.popov

Differential Revision: https://phab.enlightenment.org/D4720
---
 src/lib/elementary/elm_map.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c
index 0a93398..ebcc32f 100644
--- a/src/lib/elementary/elm_map.c
+++ b/src/lib/elementary/elm_map.c
@@ -5082,7 +5082,6 @@ elm_map_overlay_icon_set(Elm_Map_Overlay *overlay,
  Evas_Object *icon)
 {
EINA_SAFETY_ON_NULL_RETURN(overlay);
-   EINA_SAFETY_ON_NULL_RETURN(icon);
EINA_SAFETY_ON_NULL_RETURN(overlay->wsd);
ELM_MAP_CHECK((overlay->wsd)->obj);
 

-- 




[EGIT] [core/efl] master 02/03: elm_map: Fix elm_map_overlay_color_get

2017-04-19 Thread se.osadchy
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=abd71b2cfc004e2b607b03d8d5b39597c7e2ece8

commit abd71b2cfc004e2b607b03d8d5b39597c7e2ece8
Author: se.osadchy 
Date:   Wed Apr 19 14:45:04 2017 +0900

elm_map: Fix elm_map_overlay_color_get

Summary:
Add all supports types for overlay color (such as in Doc.)
@fix

Reviewers: cedric, Hermet, raster, NikaWhite, jpeg

Reviewed By: jpeg

Subscribers: jpeg, artem.popov

Differential Revision: https://phab.enlightenment.org/D4800
---
 src/lib/elementary/elm_map.c | 19 +--
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c
index ebcc32f..e633adb 100644
--- a/src/lib/elementary/elm_map.c
+++ b/src/lib/elementary/elm_map.c
@@ -5202,14 +5202,21 @@ elm_map_overlay_color_get(const Elm_Map_Overlay 
*overlay,
EINA_SAFETY_ON_NULL_RETURN(overlay->wsd);
ELM_MAP_CHECK((overlay->wsd)->obj);
 
-   if (overlay->type == ELM_MAP_OVERLAY_TYPE_ROUTE)
+   switch (overlay->type)
  {
-if (r) *r = overlay->c.r;
-if (g) *g = overlay->c.g;
-if (b) *b = overlay->c.b;
-if (a) *a = overlay->c.a;
+case ELM_MAP_OVERLAY_TYPE_ROUTE:
+case ELM_MAP_OVERLAY_TYPE_DEFAULT:
+case ELM_MAP_OVERLAY_TYPE_CLASS:
+   if (r) *r = overlay->c.r;
+   if (g) *g = overlay->c.g;
+   if (b) *b = overlay->c.b;
+   if (a) *a = overlay->c.a;
+   break;
+
+default:
+   ERR("Not supported overlay type: %d", overlay->type);
+   break;
  }
-   else ERR("Not supported overlay type: %d", overlay->type);
 }
 
 EAPI void

-- 




[EGIT] [core/efl] master 05/09: evas: Evas_3D - add destructors for clean of memory.

2015-02-23 Thread se.osadchy
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cd4c0324ec531541f67680c6c54fc9951b0f2967

commit cd4c0324ec531541f67680c6c54fc9951b0f2967
Author: se.osadchy 
Date:   Mon Feb 23 14:42:42 2015 +0100

evas: Evas_3D - add destructors for clean of memory.

Summary: Update and add new destructors.

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2029
---
 src/lib/evas/canvas/evas_3d_camera.c   | 18 --
 src/lib/evas/canvas/evas_3d_light.c| 16 +++-
 src/lib/evas/canvas/evas_3d_material.c | 23 ---
 src/lib/evas/canvas/evas_3d_mesh.c |  1 -
 src/lib/evas/canvas/evas_3d_node.c | 11 ---
 src/lib/evas/canvas/evas_3d_node.eo|  1 +
 src/lib/evas/canvas/evas_3d_texture.c  | 20 +++-
 7 files changed, 79 insertions(+), 11 deletions(-)

diff --git a/src/lib/evas/canvas/evas_3d_camera.c 
b/src/lib/evas/canvas/evas_3d_camera.c
index c6da2d3..7a9c8a5 100644
--- a/src/lib/evas/canvas/evas_3d_camera.c
+++ b/src/lib/evas/canvas/evas_3d_camera.c
@@ -74,8 +74,22 @@ EOLIAN static void
 _evas_3d_camera_eo_base_destructor(Eo *obj,
   Evas_3D_Camera_Data *pd)
 {
-   //evas_3d_object_unreference(&pd->base);
-   if (pd->nodes) eina_hash_free(pd->nodes);
+   Eina_Iterator *it = NULL;
+   void *data = NULL;
+   Evas_3D_Node_Data *node = NULL;
+
+   if (pd->nodes)
+ {
+it = eina_hash_iterator_key_new(pd->nodes);
+while (eina_iterator_next(it, &data))
+  {
+ node = eo_data_scope_get(data, EVAS_3D_NODE_CLASS);
+ node->data.camera.camera = NULL;
+  }
+
+eina_hash_free(pd->nodes);
+ }
+
eo_do_super(obj, MY_CLASS, eo_destructor());
 }
 
diff --git a/src/lib/evas/canvas/evas_3d_light.c 
b/src/lib/evas/canvas/evas_3d_light.c
index f9ca75b..d8c73b6 100644
--- a/src/lib/evas/canvas/evas_3d_light.c
+++ b/src/lib/evas/canvas/evas_3d_light.c
@@ -97,8 +97,22 @@ _evas_3d_light_eo_base_constructor(Eo *obj, 
Evas_3D_Light_Data *pd)
 EOLIAN static void
 _evas_3d_light_eo_base_destructor(Eo *obj, Evas_3D_Light_Data *pd)
 {
+   Eina_Iterator *it = NULL;
+   void *data = NULL;
+   Evas_3D_Node_Data *node = NULL;
+
if (pd->nodes)
- eina_hash_free(pd->nodes);
+ {
+it = eina_hash_iterator_key_new(pd->nodes);
+while (eina_iterator_next(it, &data))
+  {
+ node = eo_data_scope_get(data, EVAS_3D_NODE_CLASS);
+ node->data.light.light = NULL;
+  }
+
+eina_hash_free(pd->nodes);
+ }
+
eo_do_super(obj, MY_CLASS, eo_destructor());
 }
 
diff --git a/src/lib/evas/canvas/evas_3d_material.c 
b/src/lib/evas/canvas/evas_3d_material.c
index 8cd325d..aee8c85 100644
--- a/src/lib/evas/canvas/evas_3d_material.c
+++ b/src/lib/evas/canvas/evas_3d_material.c
@@ -104,17 +104,34 @@ _evas_3d_material_eo_base_constructor(Eo *obj 
EINA_UNUSED, Evas_3D_Material_Data
 EOLIAN static void
 _evas_3d_material_eo_base_destructor(Eo *obj, Evas_3D_Material_Data *pd)
 {
-   int i;
+   int i = 0;
+   Eina_Iterator *it = NULL;
+   void *data = NULL;
+   Evas_3D_Mesh_Data *mesh = NULL;
+   Eina_List *l = NULL;
+   Evas_3D_Mesh_Frame *f = NULL;
 
if (pd->meshes)
- eina_hash_free(pd->meshes);
+ {
+it = eina_hash_iterator_key_new(pd->meshes);
+while (eina_iterator_next(it, &data))
+  {
+ mesh = eo_data_scope_get(data, EVAS_3D_MESH_CLASS);
+ if (mesh->frames)
+   {
+  EINA_LIST_FOREACH(mesh->frames, l, f)
+ f->material = NULL;
+   }
+  }
+eina_iterator_free(it);
+eina_hash_free(pd->meshes);
+ }
 
for (i = 0; i < EVAS_3D_MATERIAL_ATTRIB_COUNT; i++)
  {
 if (pd->attribs[i].texture)
   {
  evas_3d_texture_material_del(pd->attribs[i].texture, obj);
- //eo_unref(pd->attribs[i].texture);
   }
  }
eo_do_super(obj, MY_CLASS, eo_destructor());
diff --git a/src/lib/evas/canvas/evas_3d_mesh.c 
b/src/lib/evas/canvas/evas_3d_mesh.c
index 44304380..27006f4 100644
--- a/src/lib/evas/canvas/evas_3d_mesh.c
+++ b/src/lib/evas/canvas/evas_3d_mesh.c
@@ -259,7 +259,6 @@ _evas_3d_mesh_eo_base_constructor(Eo *obj, 
Evas_3D_Mesh_Data *pd)
 EOLIAN static void
 _evas_3d_mesh_eo_base_destructor(Eo *obj, Evas_3D_Mesh_Data *pd)
 {
-   //evas_3d_object_unreference(&pd->base);
_mesh_fini(pd);
eo_do_super(obj, MY_CLASS, eo_destructor());
 }
diff --git a/src/lib/evas/canvas/evas_3d_node.c 
b/src/lib/evas/canvas/evas_3d_node.c
index 84f6204..af91886 100644
--- a/src/lib/evas/canvas/evas_3d_node.c
+++ b/src/lib/evas/canvas/evas_3d_node.c
@@ -628,7 +628,

[EGIT] [core/efl] master 10/12: evas: fix bug in the destructor of node in Evas_3D.

2015-03-06 Thread se.osadchy
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e58b135e31d636d5c56336c298950779ec2b8ff2

commit e58b135e31d636d5c56336c298950779ec2b8ff2
Author: se.osadchy 
Date:   Fri Mar 6 19:12:57 2015 +0100

evas: fix bug in the destructor of node in Evas_3D.

Summary: Bug relative with segmentation fault if node isn't mesh_node type.

@fix

Reviewers: cedric, raster, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2101

Signed-off-by: Cedric BAIL 
---
 src/lib/evas/canvas/evas_3d_node.c | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/lib/evas/canvas/evas_3d_node.c 
b/src/lib/evas/canvas/evas_3d_node.c
index 09bffc8..1f69cdc 100644
--- a/src/lib/evas/canvas/evas_3d_node.c
+++ b/src/lib/evas/canvas/evas_3d_node.c
@@ -621,7 +621,12 @@ _node_free(Evas_3D_Object *obj)
 eina_list_free(pd->members);
  }
 
-   if (pd->data.mesh.meshes)
+   if (pd->parent)
+ {
+eo_do(pd->parent, evas_3d_node_member_del(obj));
+ }
+
+   if (pd->type == EVAS_3D_NODE_TYPE_MESH && pd->data.mesh.meshes)
  {
 Eina_List *l;
 Evas_3D_Mesh *m;
@@ -632,10 +637,10 @@ _node_free(Evas_3D_Object *obj)
   }
 
 eina_list_free(pd->data.mesh.meshes);
- }
 
-   if (pd->data.mesh.node_meshes)
- eina_hash_free(pd->data.mesh.node_meshes);
+if (pd->data.mesh.node_meshes)
+  eina_hash_free(pd->data.mesh.node_meshes);
+ }
 
if (pd->scenes_root)
  eina_hash_free(pd->scenes_root);

-- 




[EGIT] [tools/eflete] master 02/02: Fix default config path for OS X

2016-06-13 Thread se.osadchy
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=3dbfb3f0fdf051d1024fb93fb35aa4e0c40e4239

commit 3dbfb3f0fdf051d1024fb93fb35aa4e0c40e4239
Author: se.osadchy 
Date:   Mon Jun 13 19:09:51 2016 +0300

Fix default config path for OS X
---
 src/bin/config/config.c | 21 +
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/src/bin/config/config.c b/src/bin/config/config.c
index 0c11080..bc2c529 100644
--- a/src/bin/config/config.c
+++ b/src/bin/config/config.c
@@ -37,6 +37,19 @@ static Eet_Data_Descriptor *edd_profile = NULL;
 static Eet_Data_Descriptor *edd_keys = NULL;
 static Eet_Data_Descriptor *edd_color = NULL;
 
+#ifdef __APPLE__
+Eina_Stringshare *
+config_dir_get(void)
+{
+   const char *conf_path = NULL;
+   Eina_Stringshare *cfg;
+
+   conf_path = "Library/Preferences";
+   cfg = eina_stringshare_printf("%s/%s", getenv("HOME"), conf_path);
+
+   return cfg;
+}
+#else
 Eina_Stringshare *
 config_dir_get(void)
 {
@@ -53,7 +66,7 @@ config_dir_get(void)
  }
return cfg;
 }
-
+#endif
 static Eina_Stringshare *
 _config_file_path_get(void)
 {
@@ -505,15 +518,15 @@ config_save(void)
tmp = _config_tmp_file_path_get(cfg);
 
ef = eet_open(tmp, EET_FILE_MODE_WRITE);
-   if (!ef) return false;
+   if (!ef) return EINA_FALSE;
ok = eet_data_write(ef, edd_base, CONFIG_FILE_KEY, config, 1);
eet_close(ef);
-   if (!ok) return false;
+   if (!ok) return EINA_FALSE;
ecore_file_mv(tmp, cfg);
 
eina_stringshare_del(tmp);
eina_stringshare_del(cfg);
-   return true;
+   return EINA_TRUE;
 }
 
 Config *

-- 




[EGIT] [core/efl] master 08/13: elm gesture layer: add check for negative input tap start timeout.

2017-02-07 Thread se.osadchy
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=56d31f30b7f6d62e4502f2001af360e1bf6edffe

commit 56d31f30b7f6d62e4502f2001af360e1bf6edffe
Author: se.osadchy 
Date:   Tue Feb 7 13:37:11 2017 -0800

elm gesture layer: add check for negative input tap start timeout.

Summary:
Add set 0 as start timeout if negative input value.
@fix

Reviewers: cedric, Hermet, raster

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4625

Signed-off-by: Cedric BAIL 
---
 src/lib/elementary/elm_gesture_layer.c| 4 ++--
 src/lib/elementary/elm_gesture_layer_common.h | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/lib/elementary/elm_gesture_layer.c 
b/src/lib/elementary/elm_gesture_layer.c
index 39db639..b08dcb1 100644
--- a/src/lib/elementary/elm_gesture_layer.c
+++ b/src/lib/elementary/elm_gesture_layer.c
@@ -4095,7 +4095,7 @@ elm_gesture_layer_long_tap_start_timeout_set(Evas_Object 
*obj, double long_tap_s
 {
ELM_GESTURE_LAYER_CHECK(obj);
ELM_GESTURE_LAYER_DATA_GET(obj, sd);
-   sd->long_tap_start_timeout = long_tap_start_timeout;
+   sd->long_tap_start_timeout = ((long_tap_start_timeout > 0) ? 
long_tap_start_timeout : 0);
 }
 
 EAPI double
@@ -4127,7 +4127,7 @@ elm_gesture_layer_double_tap_timeout_set(Evas_Object 
*obj, double double_tap_tim
 {
ELM_GESTURE_LAYER_CHECK(obj);
ELM_GESTURE_LAYER_DATA_GET(obj, sd);
-   sd->double_tap_timeout = double_tap_timeout;
+   sd->double_tap_timeout = ((double_tap_timeout > 0) ? double_tap_timeout : 
0);
 }
 
 EAPI double
diff --git a/src/lib/elementary/elm_gesture_layer_common.h 
b/src/lib/elementary/elm_gesture_layer_common.h
index cf9f23b..bb061f3 100644
--- a/src/lib/elementary/elm_gesture_layer_common.h
+++ b/src/lib/elementary/elm_gesture_layer_common.h
@@ -288,7 +288,8 @@ EAPI unsigned int 
elm_gesture_layer_flick_time_limit_ms_get(const Evas_Object *o
 /**
  * This function sets the gesture layer long tap start timeout of an object
  *
- * Recognize as a long tap when a tab occurs over @c long_tap_start_timeout.
+ * Recognize as a long tap when a tab occurs over @c long_tap_start_timeout,
+ * if set negative value, timeout will be 0.
  *
  * @param obj gesture-layer.
  * @param long_tap_start_timeout long tap start timeout
@@ -333,7 +334,7 @@ EAPI Eina_Bool elm_gesture_layer_continues_enable_get(const 
Evas_Object *obj);
  * This function sets the gesture layer double tap timeout of an object
  *
  * When the time diffrence between two tabs is less than the @c 
double_tap_timeout value,
- * it is recognized as a double tab.
+ * it is recognized as a double tab, if set negative value, timeout will be 0.
  *
  * @param obj gesture-layer.
  * @param double_tap_timeout double tap timeout

--