summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-01-25 14:41:41 -0500
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-01-26 12:21:58 +0100
commit25925f026407a16795961334be0346f0509f9a28 (patch)
tree4b1ffe7101e2618e7f6fd55bbd6252cba5f7e1dc
parentd6992432c8fe54135a7acc780c6e0cd8cf70400a (diff)
downloadefl-25925f026407a16795961334be0346f0509f9a28.tar.gz
elm_photo: implement remaining efl.file methods
ref T5719 Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de> Differential Revision: https://phab.enlightenment.org/D7788
-rw-r--r--src/lib/elementary/elm_photo.c29
-rw-r--r--src/lib/elementary/elm_photo.eo3
2 files changed, 31 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_photo.c b/src/lib/elementary/elm_photo.c
index 0d6e94652a..53300f9d0e 100644
--- a/src/lib/elementary/elm_photo.c
+++ b/src/lib/elementary/elm_photo.c
@@ -325,6 +325,12 @@ _elm_photo_efl_object_constructor(Eo *obj, Elm_Photo_Data *_pd EINA_UNUSED)
return obj;
}
+EOLIAN static void
+_elm_photo_efl_file_file_get(const Eo *obj EINA_UNUSED, Elm_Photo_Data *sd, const char **file, const char **key EINA_UNUSED)
+{
+ efl_file_get(sd->icon, file, NULL);
+}
+
EOLIAN static Eina_Bool
_elm_photo_efl_file_file_set(Eo *obj, Elm_Photo_Data *sd, const char *file, const char *key EINA_UNUSED)
{
@@ -342,6 +348,29 @@ _elm_photo_efl_file_file_set(Eo *obj, Elm_Photo_Data *sd, const char *file, cons
return EINA_TRUE;
}
+EOLIAN static void
+_elm_photo_efl_file_mmap_get(const Eo *obj EINA_UNUSED, Elm_Photo_Data *sd, const Eina_File **file, const char **key EINA_UNUSED)
+{
+ efl_file_mmap_get(sd->icon, file, key);
+}
+
+EOLIAN static Eina_Bool
+_elm_photo_efl_file_mmap_set(Eo *obj, Elm_Photo_Data *sd, const Eina_File *file, const char *key EINA_UNUSED)
+{
+ if (!file)
+ {
+ if (!elm_icon_standard_set(sd->icon, "no_photo")) return EINA_FALSE;
+ }
+ else
+ {
+ if (!efl_file_mmap_set(sd->icon, file, NULL)) return EINA_FALSE;
+ }
+
+ _sizing_eval(obj);
+
+ return EINA_TRUE;
+}
+
static void
_elm_photo_class_constructor(Efl_Class *klass)
{
diff --git a/src/lib/elementary/elm_photo.eo b/src/lib/elementary/elm_photo.eo
index e91ef68bc8..3ceb6d7653 100644
--- a/src/lib/elementary/elm_photo.eo
+++ b/src/lib/elementary/elm_photo.eo
@@ -7,7 +7,8 @@ class Elm.Photo extends Efl.Ui.Widget implements Efl.File, Efl.Ui.Clickable, Efl
implements {
class.constructor;
Efl.Object.constructor;
- Efl.File.file { set; }
+ Efl.File.file { set; get; }
+ Efl.File.mmap { set; get; }
Efl.Ui.Widget.theme_apply;
Efl.Ui.Draggable.drag_target { get; set; }
}