forked from enlightenment/efl
Efl interface file: Start using the new interface.
This commit is contained in:
parent
2f9d1dc69e
commit
3a468f7ad3
|
@ -6,6 +6,7 @@ EOLIAN_FLAGS = \
|
|||
-I$(srcdir)/lib/eo \
|
||||
-I$(srcdir)/lib/evas/canvas \
|
||||
-I$(srcdir)/lib/edje \
|
||||
-I$(srcdir)/lib/efl/interfaces \
|
||||
-I$(srcdir)/lib/ecore_audio
|
||||
|
||||
ELUA_GEN_FLAGS =
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
#include <Efl.h>
|
||||
|
||||
#include "edje_object.eo.h"
|
||||
#include "edje_edit.eo.h"
|
||||
|
|
|
@ -157,5 +157,60 @@ EAPI void edje_extern_object_max_size_set (Evas_Object *obj, Evas_Coord
|
|||
*/
|
||||
EAPI void edje_extern_object_aspect_set (Evas_Object *obj, Edje_Aspect_Control aspect, Evas_Coord aw, Evas_Coord ah);
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Sets the @b EDJ file (and group within it) to load an Edje
|
||||
* object's contents from
|
||||
*
|
||||
* @return @c EINA_TRUE, on success or @c EINA_FALSE, on errors (check
|
||||
* edje_object_load_error_get() after this call to get errors causes)
|
||||
*
|
||||
* Edje expects EDJ files, which are theming objects' descriptions and
|
||||
* resources packed together in an EET file, to read Edje object
|
||||
* definitions from. They usually are created with the @c .edj
|
||||
* extension. EDJ files, in turn, are assembled from @b textual object
|
||||
* description files, where one describes Edje objects declaratively
|
||||
* -- the EDC files (see @ref edcref "the syntax" for those files).
|
||||
*
|
||||
* Those description files were designed so that many Edje object
|
||||
* definitions -- also called @b groups (or collections) -- could be
|
||||
* packed together <b>in the same EDJ file</b>, so that a whole
|
||||
* application's theme could be packed in one file only. This is the
|
||||
* reason for the @p group argument.
|
||||
*
|
||||
* Use this function after you instantiate a new Edje object, so that
|
||||
* you can "give him life", telling where to get its contents from.
|
||||
*
|
||||
* @see edje_object_add()
|
||||
* @see edje_object_file_get()
|
||||
* @see edje_object_mmap_set()
|
||||
*
|
||||
* @param[in] file The path to the EDJ file to load @p from
|
||||
* @param[in] group The name of the group, in @p file, which implements an
|
||||
Edje object
|
||||
*/
|
||||
EAPI Eina_Bool edje_object_file_set(Eo *obj, const char *file, const char *group);
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Get the file and group name that a given Edje object is bound to
|
||||
*
|
||||
* This gets the EDJ file's path, with the respective group set for
|
||||
* the given Edje object. If @a obj is either not an Edje file, or has
|
||||
* not had its file/group set previously, by edje_object_file_set(),
|
||||
* then both @p file and @p group will be set to @c NULL, indicating
|
||||
* an error.
|
||||
*
|
||||
* @see edje_object_file_set()
|
||||
*
|
||||
* @note Use @c NULL pointers on the file/group components you're not
|
||||
* interested in: they'll be ignored by the function.
|
||||
*
|
||||
* @param[out] file The path to the EDJ file to load @p from
|
||||
* @param[out] group The name of the group, in @p file, which implements an
|
||||
Edje object
|
||||
*/
|
||||
EAPI void edje_object_file_get(const Eo *obj, const char **file, const char **group);
|
||||
|
||||
#include "edje_object.eo.legacy.h"
|
||||
#include "edje_edit.eo.legacy.h"
|
||||
|
|
|
@ -169,7 +169,7 @@ _edje_edit_program_script_free(Program_Script *ps)
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_edje_edit_edje_object_file_set(Eo *obj, Edje_Edit *eed, const char *file, const char *group)
|
||||
_edje_edit_efl_interface_file_file_set(Eo *obj, Edje_Edit *eed, const char *file, const char *group)
|
||||
{
|
||||
Eina_Bool ret;
|
||||
Eet_File *ef;
|
||||
|
@ -195,7 +195,7 @@ _edje_edit_edje_object_file_set(Eo *obj, Edje_Edit *eed, const char *file, const
|
|||
* groups).
|
||||
*/
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
eo_do_super(obj, MY_CLASS, int_ret = edje_obj_file_set(file, group));
|
||||
eo_do_super(obj, MY_CLASS, int_ret = efl_interface_file_set(file, group));
|
||||
if (!int_ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -5,6 +5,6 @@ class Edje.Edit (Edje.Object)
|
|||
Eo.Base.constructor;
|
||||
Eo.Base.destructor;
|
||||
Evas.Object_Smart.del;
|
||||
Edje.Object.file.set;
|
||||
Efl.Interface.File.file.set;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ static int _sort_defined_boxes(const void *a, const void *b);
|
|||
/************************** API Routines **************************/
|
||||
|
||||
EOLIAN void
|
||||
_edje_object_file_get(Eo *obj EINA_UNUSED, Edje *ed, const char **file, const char **group)
|
||||
_edje_object_efl_interface_file_file_get(Eo *obj EINA_UNUSED, Edje *ed, const char **file, const char **group)
|
||||
{
|
||||
if (file) *file = ed->path;
|
||||
if (group) *group = ed->group;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Edje.Object (Evas.Smart_Clipped)
|
||||
class Edje.Object (Evas.Smart_Clipped, Efl.Interface.File)
|
||||
{
|
||||
legacy_prefix: edje_object;
|
||||
eo_prefix: edje_obj;
|
||||
|
@ -134,57 +134,6 @@ class Edje.Object (Evas.Smart_Clipped)
|
|||
Edje_Perspective *ps; /*@ The perspective object that will be used. */
|
||||
}
|
||||
}
|
||||
file {
|
||||
set {
|
||||
/*@
|
||||
@brief Sets the @b EDJ file (and group within it) to load an Edje
|
||||
object's contents from
|
||||
|
||||
@return @c EINA_TRUE, on success or @c EINA_FALSE, on errors (check
|
||||
edje_object_load_error_get() after this call to get errors causes)
|
||||
|
||||
Edje expects EDJ files, which are theming objects' descriptions and
|
||||
resources packed together in an EET file, to read Edje object
|
||||
definitions from. They usually are created with the @c .edj
|
||||
extension. EDJ files, in turn, are assembled from @b textual object
|
||||
description files, where one describes Edje objects declaratively
|
||||
-- the EDC files (see @ref edcref "the syntax" for those files).
|
||||
|
||||
Those description files were designed so that many Edje object
|
||||
definitions -- also called @b groups (or collections) -- could be
|
||||
packed together <b>in the same EDJ file</b>, so that a whole
|
||||
application's theme could be packed in one file only. This is the
|
||||
reason for the @p group argument.
|
||||
|
||||
Use this function after you instantiate a new Edje object, so that
|
||||
you can "give him life", telling where to get its contents from.
|
||||
|
||||
@see edje_object_add()
|
||||
@see edje_object_file_get()
|
||||
@see edje_object_mmap_set() */
|
||||
return: bool;
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
@brief Get the file and group name that a given Edje object is bound to
|
||||
|
||||
This gets the EDJ file's path, with the respective group set for
|
||||
the given Edje object. If @a obj is either not an Edje file, or has
|
||||
not had its file/group set previously, by edje_object_file_set(),
|
||||
then both @p file and @p group will be set to @c NULL, indicating
|
||||
an error.
|
||||
|
||||
@see edje_object_file_set()
|
||||
|
||||
@note Use @c NULL pointers on the file/group components you're not
|
||||
interested in: they'll be ignored by the function. */
|
||||
}
|
||||
values {
|
||||
const(char)* file; /*@ The path to the EDJ file to load @p from */
|
||||
const(char)* group; /*@ The name of the group, in @p file, which implements an
|
||||
Edje object */
|
||||
}
|
||||
}
|
||||
scale {
|
||||
set {
|
||||
/*@
|
||||
|
@ -2399,5 +2348,7 @@ class Edje.Object (Evas.Smart_Clipped)
|
|||
Evas.Object_Smart.add;
|
||||
Evas.Object_Smart.del;
|
||||
Evas.Object_Smart.resize;
|
||||
Efl.Interface.File.file.set;
|
||||
Efl.Interface.File.file.get;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ _edje_object_eo_base_dbg_info_get(Eo *eo_obj, Edje *_pd EINA_UNUSED, Eo_Dbg_Info
|
|||
Eo_Dbg_Info *group = EO_DBG_INFO_LIST_APPEND(root, MY_CLASS_NAME);
|
||||
|
||||
const char *file, *edje_group;
|
||||
eo_do(eo_obj, edje_obj_file_get(&file, &edje_group));
|
||||
eo_do(eo_obj, efl_interface_file_get(&file, &edje_group));
|
||||
EO_DBG_INFO_APPEND(group, "File", EINA_VALUE_TYPE_STRING, file);
|
||||
EO_DBG_INFO_APPEND(group, "Group", EINA_VALUE_TYPE_STRING, edje_group);
|
||||
|
||||
|
@ -332,7 +332,7 @@ _edje_object_evas_object_smart_calculate(Eo *obj EINA_UNUSED, Edje *ed)
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_edje_object_file_set(Eo *obj, Edje *_pd EINA_UNUSED, const char *file, const char *group)
|
||||
_edje_object_efl_interface_file_file_set(Eo *obj, Edje *_pd EINA_UNUSED, const char *file, const char *group)
|
||||
{
|
||||
Eina_Bool ret;
|
||||
Eina_File *f = NULL;
|
||||
|
@ -383,4 +383,19 @@ _edje_object_mmap_set(Eo *obj, Edje *_pd EINA_UNUSED, const Eina_File *f, const
|
|||
return ret;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
edje_object_file_set(Eo *obj, const char *file, const char *group)
|
||||
{
|
||||
Eina_Bool ret = 0;
|
||||
eo_do((Eo *) obj, ret = efl_interface_file_set(file, group));
|
||||
return ret;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
edje_object_file_get(const Eo *obj, const char **file, const char **group)
|
||||
{
|
||||
eo_do((Eo *) obj, efl_interface_file_get(file, group));
|
||||
}
|
||||
|
||||
#include "edje_object.eo.c"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
interface Efl_Interface_File {
|
||||
interface Efl.Interface.File {
|
||||
legacy_prefix: null;
|
||||
properties {
|
||||
file {
|
||||
|
|
Loading…
Reference in New Issue