forked from enlightenment/efl
Photo: Use file interface.
This commit is contained in:
parent
282e21a10a
commit
0b9ec03952
|
@ -324,7 +324,7 @@ _elm_photo_eo_base_constructor(Eo *obj, Elm_Photo_Data *_pd EINA_UNUSED)
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_photo_file_set(Eo *obj, Elm_Photo_Data *sd, const char *file)
|
||||
_elm_photo_efl_file_file_set(Eo *obj, Elm_Photo_Data *sd, const char *file, const char *key EINA_UNUSED)
|
||||
{
|
||||
if (!file)
|
||||
{
|
||||
|
@ -410,4 +410,10 @@ _elm_photo_class_constructor(Eo_Class *klass)
|
|||
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_photo_file_set(Eo *obj, const char *file)
|
||||
{
|
||||
return eo_do((Eo *) obj, efl_file_set(file, NULL));
|
||||
}
|
||||
|
||||
#include "elm_photo.eo.c"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Elm_Photo (Elm_Widget, Evas.Clickable_Interface, Evas.Draggable_Interface)
|
||||
class Elm_Photo (Elm_Widget, Efl.File, Evas.Clickable_Interface, Evas.Draggable_Interface)
|
||||
{
|
||||
eo_prefix: elm_obj_photo;
|
||||
properties {
|
||||
|
@ -74,23 +74,6 @@ class Elm_Photo (Elm_Widget, Evas.Clickable_Interface, Evas.Draggable_Interface)
|
|||
int size; /*@ The size of the photo */
|
||||
}
|
||||
}
|
||||
file {
|
||||
set {
|
||||
/*@
|
||||
Set the file that will be used as the photo widget's image.
|
||||
|
||||
@return @c EINA_TRUE on success, @c EINA_FALSE otherwise
|
||||
|
||||
@note Use @c NULL on @a file to set the photo widget back to it's
|
||||
initial state, which indicates "no photo".
|
||||
|
||||
@ingroup Photo */
|
||||
return: bool;
|
||||
}
|
||||
values {
|
||||
const(char)* file; /*@ The path to file that will be used as @a obj's image. */
|
||||
}
|
||||
}
|
||||
}
|
||||
methods {
|
||||
thumb_set @const {
|
||||
|
@ -107,6 +90,7 @@ class Elm_Photo (Elm_Widget, Evas.Clickable_Interface, Evas.Draggable_Interface)
|
|||
implements {
|
||||
class.constructor;
|
||||
Eo.Base.constructor;
|
||||
Efl.File.file.set;
|
||||
Evas.Object_Smart.add;
|
||||
Evas.Object_Smart.del;
|
||||
Elm_Widget.theme_apply;
|
||||
|
|
|
@ -8,4 +8,19 @@
|
|||
*/
|
||||
EAPI Evas_Object *elm_photo_add(Evas_Object *parent);
|
||||
|
||||
#include "elm_photo.eo.legacy.h"
|
||||
/**
|
||||
*
|
||||
* Set the file that will be used as the photo widget's image.
|
||||
*
|
||||
* @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
|
||||
*
|
||||
* @note Use @c NULL on @a file to set the photo widget back to it's
|
||||
* initial state, which indicates "no photo".
|
||||
*
|
||||
* @ingroup Photo
|
||||
*
|
||||
* @param[in] file The path to file that will be used as @a obj's image.
|
||||
*/
|
||||
EAPI Eina_Bool elm_photo_file_set(Eo *obj, const char *file);
|
||||
|
||||
#include "elm_photo.eo.legacy.h"
|
||||
|
|
Loading…
Reference in New Issue