aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-01-25 12:47:38 -0500
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-01-25 21:20:25 +0100
commit3a2bfc0d05b2627721b67884703e67996a14dd46 (patch)
tree823d39d6d4e94a659d0d99c158779aeac1abcdb7
parentecore: make ecore_audio_out abstract (diff)
downloadefl-devs/bu5hm4n/implement-apis.tar.gz
evas_canvas3d_mesh: implement get methods for efl.file file and mmap propsdevs/bu5hm4n/implement-apis
also add unit tests for new methods ref https://phab.enlightenment.org/T5719 Differential Revision: https://phab.enlightenment.org/D7785
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_mesh.c16
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_mesh.eo4
-rw-r--r--src/tests/evas/evas_test_mesh.c9
3 files changed, 26 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/evas_canvas3d_mesh.c b/src/lib/evas/canvas/evas_canvas3d_mesh.c
index 5f3d6a0d9a..eb32e63182 100644
--- a/src/lib/evas/canvas/evas_canvas3d_mesh.c
+++ b/src/lib/evas/canvas/evas_canvas3d_mesh.c
@@ -876,7 +876,21 @@ _evas_canvas3d_mesh_efl_file_mmap_set(Eo *obj,
return EINA_TRUE;
}
-/* FIXME: Imelemnt mmap_get and file_get. */
+EOLIAN void
+_evas_canvas3d_mesh_efl_file_mmap_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *sd EINA_UNUSED, const Eina_File **file, const char **group)
+{
+ ERR("this function is not available for this object");
+ if (file) *file = NULL;
+ if (group) *group = NULL;
+}
+
+EOLIAN void
+_evas_canvas3d_mesh_efl_file_file_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *sd EINA_UNUSED, const char **file, const char **key)
+{
+ ERR("this function is not available for this object");
+ if (file) *file = NULL;
+ if (key) *key = NULL;
+}
EOLIAN static Eina_Bool
_evas_canvas3d_mesh_efl_file_file_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd,
diff --git a/src/lib/evas/canvas/evas_canvas3d_mesh.eo b/src/lib/evas/canvas/evas_canvas3d_mesh.eo
index c1b02b2f9c..d7ffa7300a 100644
--- a/src/lib/evas/canvas/evas_canvas3d_mesh.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_mesh.eo
@@ -426,8 +426,8 @@ class Evas.Canvas3D.Mesh extends Evas.Canvas3D.Object implements Efl.File
Efl.Object.destructor;
Evas.Canvas3D.Object.update_notify;
Evas.Canvas3D.Object.change_notify;
- Efl.File.file { set; }
- Efl.File.mmap { set; }
+ Efl.File.file { get; set; }
+ Efl.File.mmap { get; set; }
Efl.File.save;
}
diff --git a/src/tests/evas/evas_test_mesh.c b/src/tests/evas/evas_test_mesh.c
index 6ac928daab..424b57b724 100644
--- a/src/tests/evas/evas_test_mesh.c
+++ b/src/tests/evas/evas_test_mesh.c
@@ -44,6 +44,9 @@
{ \
int set_ok, save_ok; \
Eina_File *f; \
+ const Eina_File *f_get = NULL; \
+ const char *filename = NULL; \
+ const char *key = NULL; \
mesh = efl_add(EVAS_CANVAS3D_MESH_CLASS, e); \
mesh2 = efl_add(EVAS_CANVAS3D_MESH_CLASS, e); \
fail_if(mesh == NULL); \
@@ -55,11 +58,17 @@
fail_if(!save_ok); \
set_ok = efl_file_set(mesh2, buffer, NULL); \
fail_if(!set_ok); \
+ efl_file_get(mesh2, &filename, &key); \
+ fail_if(!!filename); \
+ fail_if(!!key); \
res = _compare_meshes(mesh, mesh2); \
fail_if(res == 1); \
f = eina_file_open(file->path, 0); \
fail_if(!f); \
set_ok = efl_file_mmap_set(mesh, f, NULL); \
+ efl_file_mmap_get(mesh, &f_get, &key); \
+ fail_if(!!f_get); \
+ fail_if(!!key); \
eina_file_close(f); \
save_ok = efl_file_save(mesh, buffer, NULL, NULL); \
fail_if(!set_ok); \