forked from enlightenment/efl
edje: Implement Efl.File.load_error
Don't create a new function with the same name, it's absurd.
This commit is contained in:
parent
4b18e754de
commit
6c53992668
|
@ -2,6 +2,19 @@
|
|||
|
||||
#include "edje_private.h"
|
||||
|
||||
EAPI Edje_Load_Error
|
||||
edje_object_load_error_get(const Eo *obj)
|
||||
{
|
||||
Efl_Image_Load_Error p = efl_file_load_error_get(obj);
|
||||
Edje *ed;
|
||||
|
||||
if (p != EFL_IMAGE_LOAD_ERROR_NONE) return EDJE_LOAD_ERROR_DOES_NOT_EXIST;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if (!ed) return EDJE_LOAD_ERROR_GENERIC;
|
||||
return ed->load_error;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
edje_object_part_geometry_get(const Edje_Object *obj, const char *part, int *x, int *y, int *w, int *h)
|
||||
{
|
||||
|
|
|
@ -167,9 +167,9 @@ _edje_object_efl_file_file_get(Eo *obj EINA_UNUSED, Edje *ed, const char **file,
|
|||
}
|
||||
|
||||
EOLIAN Efl_Image_Load_Error
|
||||
_edje_object_load_error_get(Eo *obj, Edje *ed)
|
||||
_edje_object_efl_file_load_error_get(Eo *obj, Edje *ed)
|
||||
{
|
||||
Efl_Image_Load_Error p = efl_file_load_error_get(obj);
|
||||
Efl_Image_Load_Error p = efl_file_load_error_get(efl_super(obj, EDJE_OBJECT_CLASS));
|
||||
|
||||
if (p != EFL_IMAGE_LOAD_ERROR_NONE) return p;
|
||||
switch (ed->load_error)
|
||||
|
@ -188,19 +188,6 @@ _edje_object_load_error_get(Eo *obj, Edje *ed)
|
|||
}
|
||||
}
|
||||
|
||||
EAPI Edje_Load_Error
|
||||
edje_object_load_error_get(const Eo *obj)
|
||||
{
|
||||
Efl_Image_Load_Error p = efl_file_load_error_get(obj);
|
||||
Edje *ed;
|
||||
|
||||
if (p != EFL_IMAGE_LOAD_ERROR_NONE) return EDJE_LOAD_ERROR_DOES_NOT_EXIST;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if (!ed) return EDJE_LOAD_ERROR_GENERIC;
|
||||
return ed->load_error;
|
||||
}
|
||||
|
||||
EAPI const char *
|
||||
edje_load_error_str(Edje_Load_Error error)
|
||||
{
|
||||
|
|
|
@ -85,22 +85,6 @@ class Edje.Object (Efl.Canvas.Group, Efl.File, Efl.Container, Efl.Part,
|
|||
$true will remove it (if it was issued before).]]
|
||||
}
|
||||
}
|
||||
@property load_error {
|
||||
get {
|
||||
[[Gets the (last) file loading error for a given Edje object
|
||||
|
||||
This function is meant to be used after an Edje EDJ file
|
||||
loading, what takes place with the $file_set() function. If that
|
||||
function does not return $true, one should check for the reason
|
||||
of failure with this one.
|
||||
]]
|
||||
legacy: null;
|
||||
}
|
||||
values {
|
||||
error: Efl.Image.Load.Error(Efl.Image.Load.Error.generic);
|
||||
[[The load error code.]]
|
||||
}
|
||||
}
|
||||
|
||||
access_part_iterate @beta {
|
||||
[[Iterates over all accessibility-enabled part names.]]
|
||||
|
@ -204,6 +188,7 @@ class Edje.Object (Efl.Canvas.Group, Efl.File, Efl.Container, Efl.Part,
|
|||
Efl.Ui.Base.language { set; get; }
|
||||
Efl.Ui.Base.scale { set; get; }
|
||||
Efl.Ui.Base.base_scale { get; }
|
||||
Efl.File.load_error { get; }
|
||||
Efl.File.mmap { get; set; }
|
||||
Efl.Container.content_remove;
|
||||
Efl.Part.part; [[Returns @Efl.Canvas.Layout.Part.]]
|
||||
|
|
|
@ -6,13 +6,7 @@ mixin Efl.File {
|
|||
methods {
|
||||
@property load_error {
|
||||
get {
|
||||
[[Gets the (last) file loading error for a given Edje object
|
||||
|
||||
This function is meant to be used after an Edje EDJ file
|
||||
loading, what takes place with the $file_set() function. If that
|
||||
function does not return $true, one should check for the reason
|
||||
of failure with this one.
|
||||
]]
|
||||
[[Gets the (last) file loading error for a given object.]]
|
||||
}
|
||||
values {
|
||||
error: Efl.Image.Load.Error(Efl.Image.Load.Error.none); [[The load error code.]]
|
||||
|
@ -105,9 +99,8 @@ mixin Efl.File {
|
|||
|
||||
You can specify some flags when saving the image. Currently
|
||||
acceptable flags are $quality and $compress. Eg.:
|
||||
"quality=100 compress=9"]]
|
||||
|
||||
return: bool; [[$true on success, $false otherwise]]
|
||||
"quality=100 compress=9".
|
||||
]]
|
||||
params {
|
||||
@in file: string @nonull; [[The filename to be used to save the image (extension
|
||||
obligatory).]]
|
||||
|
@ -116,6 +109,7 @@ mixin Efl.File {
|
|||
@in flags: string; [[String containing the flags to be used ($null for
|
||||
none).]]
|
||||
}
|
||||
return: bool; [[$true on success, $false otherwise]]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue