Efl: add class interfaces (color/text/size)

Summary: implement Efl.Gfx.Class interface

Reviewers: jpeg, cedric

Subscribers: taxi2se, herdsman

Differential Revision: https://phab.enlightenment.org/D4403
This commit is contained in:
Jee-Yong Um 2017-11-08 19:04:26 +09:00 committed by Jean-Philippe Andre
parent d5dbcdabd1
commit 2f838acd4e
18 changed files with 545 additions and 294 deletions

View File

@ -5,6 +5,7 @@ edje_eolian_files = \
lib/edje/efl_canvas_layout_calc.eo \
lib/edje/efl_canvas_layout_signal.eo \
lib/edje/efl_canvas_layout_group.eo \
lib/edje/edje_global.eo \
lib/edje/edje_object.eo \
lib/edje/efl_canvas_layout_part.eo \
lib/edje/efl_canvas_layout_part_box.eo \

View File

@ -76,6 +76,9 @@ efl_eolian_files = \
lib/efl/interfaces/efl_ui_menu.eo \
lib/efl/interfaces/efl_ui_autorepeat.eo \
lib/efl/interfaces/efl_ui_format.eo \
lib/efl/interfaces/efl_gfx_color_class.eo \
lib/efl/interfaces/efl_gfx_text_class.eo \
lib/efl/interfaces/efl_gfx_size_class.eo \
$(efl_eolian_legacy_files) \
$(NULL)

View File

@ -3,6 +3,7 @@
#include "efl_canvas_layout_calc.eo.h"
#include "efl_canvas_layout_signal.eo.h"
#include "efl_canvas_layout_group.eo.h"
#include "edje_global.eo.h"
#include "edje_object.eo.h"
#include "edje_edit.eo.h"

View File

@ -1212,6 +1212,147 @@ EAPI Eina_Bool edje_object_color_class_set(Evas_Object *obj, const char * color_
*/
EAPI Eina_Bool edje_object_color_class_get(const Evas_Object *obj, const char * color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3);
/**
* @brief Delete the object color class.
*
* This function deletes any values at the object level for the specified
* object and color class.
*
* Deleting the color class will revert it to the values defined by
* edje_color_class_set() or the color class defined in the theme file.
*
* Deleting the color class will emit the signal "color_class,del" for the
* given Edje object.
*
* @param[in] color_class The color class to be deleted.
*
* @ingroup Edje_Object
*/
EAPI void edje_object_color_class_del(Evas_Object *obj, const char *color_class);
/**
* @brief Delete all color classes defined in object level.
*
* This function deletes any color classes defined in object level.
* Clearing color classes will revert the color of all edje parts to
* the values defined in global level or theme file.
*
* @return @c true, on success or @c false, on error
*
* @since 1.17.0
*
* @ingroup Edje_Object
*/
EAPI Eina_Bool edje_object_color_class_clear(const Evas_Object *obj);
/**
* @brief Sets Edje text class.
*
* This function sets the text class for the Edje.
*
* @param[in] text_class The text class name
* @param[in] font Font name
* @param[in] size Font Size
*
* @return @c true, on success or @c false, on error
*
* @ingroup Edje_Object
*/
EAPI Eina_Bool edje_object_text_class_set(Evas_Object *obj, const char * text_class, const char *font, Evas_Font_Size size);
/**
* @brief Gets font and font size from edje text class.
*
* This function gets the font and the font size from the object text class.
* The font string will only be valid until the text class is changed or the
* edje object is deleted.
*
* @param[in] text_class The text class name
* @param[out] font Font name
* @param[out] size Font Size
*
* @return @c true, on success or @c false, on error
*
* @ingroup Edje_Object
*/
EAPI Eina_Bool edje_object_text_class_get(const Evas_Object *obj, const char * text_class, const char **font, Evas_Font_Size *size);
/**
* @brief Delete the object text class.
*
* This function deletes any values at the object level for the specified
* object and text class.
*
* Deleting the text class will revert it to the values defined by
* edje_text_class_set() or the text class defined in the theme file.
*
* @param[in] text_class The color class to be deleted.
*
* @since 1.17
*
* @ingroup Edje_Object
*/
EAPI void edje_object_text_class_del(Evas_Object *obj, const char *text_class);
/**
* @brief Sets the object size class.
*
* This function sets the min and max values for an object level size class.
* This will make all edje parts in the specified object that have the
* specified size class update their min and max size with given values.
*
* @param[in] size_class The size class name
* @param[in] minw The min width
* @param[in] minh The min height
* @param[in] maxw The max width
* @param[in] maxh The max height
*
* @return @c true, on success or @c false, on error
*
* @since 1.17
*
* @ingroup Edje_Object
*/
EAPI Eina_Bool edje_object_size_class_set(Evas_Object *obj, const char * size_class, int minw, int minh, int maxw, int maxh);
/**
* @brief Gets the object size class.
*
* This function gets the min and max values for an object level size class.
* These values will only be valid until the size class is changed or the edje
* object is deleted.
*
* @param[in] size_class The size class name
* @param[out] minw The min width
* @param[out] minh The min height
* @param[out] maxw The max width
* @param[out] maxh The max height
*
* @return @c true, on success or @c false, on error
*
* @since 1.17
*
* @ingroup Edje_Object
*/
EAPI Eina_Bool edje_object_size_class_get(const Evas_Object *obj, const char * size_class, int *minw, int *minh, int *maxw, int *maxh);
/**
* @brief Delete the object size class.
*
* This function deletes any values at the object level for the specified
* object and size class.
*
* Deleting the size class will revert it to the values defined by
* edje_size_class_set() or the color class defined in the theme file.
*
* @param[in] size_class Size class name
*
* @since 1.17
*
* @ingroup Edje_Object
*/
EAPI void edje_object_size_class_del(Evas_Object *obj, const char *size_class);
/**
* @brief Enables selection if the entry is an EXPLICIT selection mode type.
*
@ -1224,7 +1365,7 @@ EAPI Eina_Bool edje_object_color_class_get(const Evas_Object *obj, const char *
*
* @ingroup Edje_Object
*/
EAPI void edje_object_part_text_select_allow_set(const Edje_Object *obj, const char *part, Eina_Bool allow);
EAPI void edje_object_part_text_select_allow_set(const Evas_Object *obj, const char *part, Eina_Bool allow);
/**
* @brief Sets the RTL orientation for this object.

View File

@ -0,0 +1,12 @@
class Edje.Global (Efl.Object, Efl.Gfx.Color_Class, Efl.Gfx.Text_Class, Efl.Gfx.Size_Class)
{
data: null;
implements {
Efl.Gfx.Color_Class.color_class { get; set; }
Efl.Gfx.Color_Class.color_class_del;
Efl.Gfx.Text_Class.text_class { get; set; }
Efl.Gfx.Text_Class.text_class_del;
Efl.Gfx.Size_Class.size_class { get; set; }
Efl.Gfx.Size_Class.size_class_del;
}
}

View File

@ -81,6 +81,7 @@ edje_init(void)
}
_edje_scale = FROM_DOUBLE(1.0);
_edje_global_obj = efl_add(EDJE_GLOBAL_CLASS, NULL);
_edje_edd_init();
_edje_text_init();
@ -140,6 +141,8 @@ shutdown_all:
_edje_text_class_hash_free();
_edje_size_class_hash_free();
_edje_edd_shutdown();
efl_del(_edje_global_obj);
_edje_global_obj = NULL;
efreet_shutdown();
shutdown_evas:
evas_shutdown();
@ -192,6 +195,8 @@ _edje_shutdown_core(void)
_edje_text_class_hash_free();
_edje_size_class_hash_free();
_edje_edd_shutdown();
efl_del(_edje_global_obj);
_edje_global_obj = NULL;
eina_cow_del(_edje_calc_params_map_cow);
eina_cow_del(_edje_calc_params_physics_cow);

View File

@ -5,7 +5,8 @@ import edje_types;
class Edje.Object (Efl.Canvas.Group, Efl.File, Efl.Container, Efl.Part,
Efl.Observer, Efl.Ui.Base, Efl.Canvas.Layout_Calc,
Efl.Canvas.Layout_Signal, Efl.Canvas.Layout_Group,
Efl.Player)
Efl.Player, Efl.Gfx.Color_Class, Efl.Gfx.Text_Class,
Efl.Gfx.Size_Class)
{
[[Edje object class]]
legacy_prefix: edje_object;
@ -101,221 +102,6 @@ class Edje.Object (Efl.Canvas.Group, Efl.File, Efl.Container, Efl.Part,
}
}
/* CLASS APIS BEGIN -------------------------------------------------- */
@property global_color_class @class {
set {
[[Sets Edje color class.
This function sets the color values for a process level color
class. This will cause all edje parts in the current process that
have the specified color class to have their colors multiplied by
these values. (Object level color classes set by
edje_object_color_class_set() will override the values set by this
function).
Setting color emits a signal "color_class,set" with source being
the given color class in all objects.
Note: unlike Evas, Edje colors are not pre-multiplied. That is,
half-transparent white is 255 255 255 128.]]
legacy: null;
return: bool; [[$true on success, $false otherwise]]
}
get {
[[Gets Edje color class.
This function gets the color values for a process level color
class. This value is the globally set and not per-object, that is,
the value that would be used by objects if they did not override with
@.color_class.set().
See also, @.global_color_class.set()
Note: unlike Evas, Edje colors are not pre-multiplied. That is,
half-transparent white is 255 255 255 128.]]
legacy: null;
return: bool; [[$true if found or $false if not found and all values
are zeored.]]
}
keys {
color_class: string; [[The name of color class]]
mode: Edje.Color_Class.Mode; [[Edje color class mode]]
}
values {
r: int; [[Object Red value]]
g: int; [[Object Green value]]
b: int; [[Object Blue value]]
a: int; [[Object Alpha value]]
}
}
@property color_class {
set {
[[Sets the object color class.
This function sets the color values for an object level color
class. This will cause all edje parts in the specified object that
have the specified color class to have their colors multiplied by
these values.
The first color is the object, the second is the text outline, and
the third is the text shadow. (Note that the second two only apply
to text parts).
Setting color emits a signal "color_class,set" with source being
the given color.
Note: unlike Evas, Edje colors are not pre-multiplied. That is,
half-transparent white is 255 255 255 128.]]
legacy: null;
return: bool; [[$true on success, $false otherwise]]
}
get {
[[Gets the object color class.
This function gets the color values for an object level color
class. If no explicit object color is set, then global values will
be used.
The first color is the object, the second is the text outline, and
the third is the text shadow. (Note that the second two only apply
to text parts).
Note: unlike Evas, Edje colors are not pre-multiplied. That is,
half-transparent white is 255 255 255 128.]]
legacy: null;
return: bool; [[$true if found or $false if not found and all
values are zeroed.]]
}
keys {
color_class: string; [[The name of color class]]
mode: Edje.Color_Class.Mode; [[Edje color class mode]]
}
values {
r: int; [[Object Red value]]
g: int; [[Object Green value]]
b: int; [[Object Blue value]]
a: int; [[Object Alpha value]]
}
}
@property color_class_description {
get {
[[Gets the description of an object color class.
This function gets the description of a color class in use by an object.]]
return: string; [[The description of the target color class or $null if not found]]
}
keys {
color_class: string; [[Color class description]]
}
}
color_class_clear @const {
[[Clears object color classes.
@since 1.17.0]]
return: bool; [[$true on success, or $false on error]]
}
color_class_del {
[[Deletes the object color class.
This function deletes any values at the object level for the
specified object and color class.
Deleting the color class will revert it to the values
defined by edje_color_class_set() or the color class
defined in the theme file.
Deleting the color class will emit the signal "color_class,del"
for the given Edje object.]]
params {
@in color_class: string; [[The color class to be deleted.]]
}
}
@property text_class {
set {
[[Sets Edje text class.
This function sets the text class for the Edje.]]
return: bool; [[$true on success, or $false on error]]
}
get {
[[Gets font and font size from edje text class.
This function gets the font and the font size from the object
text class. The font string will only be valid until the text
class is changed or the edje object is deleted.]]
return: bool; [[$true on success, or $false on error]]
}
keys {
text_class: string; [[The text class name]]
}
values {
font: string; [[Font name]]
size: int; [[Font Size]]
}
}
text_class_del {
[[Deletes the object text class.
This function deletes any values at the object level for the
specified object and text class.
Deleting the text class will revert it to the values
defined by edje_text_class_set() or the text class
defined in the theme file.
@since 1.17]]
params {
@in text_class: string; [[The color class to be deleted.]]
}
}
@property size_class {
set {
[[Sets the object size class.
This function sets the min and max values for an object level size
class. This will make all edje parts in the specified object that
have the specified size class update their min and max size with given values.
@since 1.17]]
return: bool; [[$true on success, or $false on error]]
}
get {
[[Gets the object size class.
This function gets the min and max values for an object level size
class. These values will only be valid until the size class is changed
or the edje object is deleted.
@since 1.17]]
return: bool; [[$true on success, or $false on error]]
}
keys {
size_class: string; [[The size class name]]
}
values {
minw: int; [[The min width]]
minh: int; [[The min height]]
maxw: int; [[The max width]]
maxh: int; [[The max height]]
}
}
size_class_del {
[[Deletes the object size class.
This function deletes any values at the object level for the
specified object and size class.
Deleting the size class will revert it to the values
defined by edje_size_class_set() or the color class
defined in the theme file.
@since 1.17]]
params {
@in size_class: string; [[Size class name]]
}
}
/* CLASS APIS END ---------------------------------------------------- */
access_part_iterate @beta {
[[Iterates over all accessibility-enabled part names.]]
legacy: null;
@ -391,6 +177,14 @@ class Edje.Object (Efl.Canvas.Group, Efl.File, Efl.Container, Efl.Part,
Efl.Object.debug_name_override;
Efl.Canvas.Object.no_render { set; }
Efl.Canvas.Object.paragraph_direction { set; }
Efl.Gfx.Color_Class.color_class { get; set; }
Efl.Gfx.Color_Class.color_class_description { get; }
Efl.Gfx.Color_Class.color_class_del;
Efl.Gfx.Color_Class.color_class_clear;
Efl.Gfx.Text_Class.text_class { get; set; }
Efl.Gfx.Text_Class.text_class_del;
Efl.Gfx.Size_Class.size_class { get; set; }
Efl.Gfx.Size_Class.size_class_del;
Efl.Canvas.Group.group_calculate;
Efl.Canvas.Layout_Calc.calc_auto_update_hints { get; set; }
Efl.Canvas.Layout_Calc.calc_size_min;

View File

@ -2348,6 +2348,8 @@ const Eina_Inarray *edje_match_signal_source_hash_get(const char *signal,
void edje_match_signal_source_free(Edje_Signal_Source_Char *key, void *data);
void _edje_signal_callback_matches_unref(Edje_Signal_Callback_Matches *m);
extern Edje_Global *_edje_global_obj;
// FIXME remove below 3 eapi decls when edje_convert goes
EAPI void _edje_edd_init(void);
EAPI void _edje_data_font_list_desc_make(Eet_Data_Descriptor **_font_list_edd, Eet_Data_Descriptor **_font_edd);

View File

@ -536,6 +536,15 @@ _edje_object_efl_player_play_speed_get(Eo *obj EINA_UNUSED, Edje *pd)
return 1.0/pd->duration_scale;
}
EOLIAN static Efl_Object *
_edje_object_efl_object_provider_find(Eo *obj, Edje *ed EINA_UNUSED, const Efl_Class *klass)
{
if (klass == EDJE_GLOBAL_CLASS)
return _edje_global_obj;
return efl_provider_find(efl_super(obj, EDJE_OBJECT_CLASS), klass);
}
/* Internal EO APIs and hidden overrides */
#define EDJE_OBJECT_EXTRA_OPS \
@ -543,6 +552,7 @@ _edje_object_efl_player_play_speed_get(Eo *obj EINA_UNUSED, Edje *pd)
EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _edje_object_efl_object_dbg_info_get)
#include "edje_object.eo.c"
#include "edje_global.eo.c"
#include "efl_canvas_layout_calc.eo.c"
#include "efl_canvas_layout_signal.eo.c"
#include "efl_canvas_layout_group.eo.c"

View File

@ -134,15 +134,6 @@ enum Edje.Input_Panel.Layout {
struct Edje.Perspective; [[Perspective info for maps inside edje objects]]
enum Edje.Color_Class.Mode {
[[Selector to access one color among the colors belonging to a color class.
@since 1.18]]
color = 0, [[The default color. For instance, the color of the text itself.]]
color2, [[The 2nd color. For instance, the outline of the text.]]
color3 [[The 3rd color. For instance, the shadow of the text.]]
}
/* FIXME-cb: Ignore cb types that should be fixed. */
type Edje.Signal_Cb: __undefined_type; [[Edje signal callback type]]
type Edje.Markup_Filter_Cb: __undefined_type; [[Edje markup filter callback type]]

View File

@ -16,6 +16,8 @@ struct _Edje_Box_Layout
char name[];
};
Edje_Global *_edje_global_obj = NULL;
static Eina_Hash *_edje_color_class_hash = NULL;
static Eina_Hash *_edje_text_class_hash = NULL;
static Eina_Hash *_edje_size_class_hash = NULL;
@ -500,7 +502,7 @@ _edje_object_efl_canvas_layout_calc_calc_thaw(Eo *obj EINA_UNUSED, Edje *ed)
}
static Eina_Bool
_edje_color_class_set_internal(Eina_Hash *hash, const char *color_class, Edje_Color_Class_Mode mode, int r, int g, int b, int a, Eina_Bool *need_update)
_edje_color_class_set_internal(Eina_Hash *hash, const char *color_class, Efl_Gfx_Color_Class_Layer layer, int r, int g, int b, int a, Eina_Bool *need_update)
{
Edje_Color_Class *cc;
@ -523,9 +525,9 @@ _edje_color_class_set_internal(Eina_Hash *hash, const char *color_class, Edje_Co
cc = eina_hash_find(hash, color_class);
if (cc)
{
switch (mode)
switch (layer)
{
case EDJE_COLOR_CLASS_MODE_COLOR:
case EFL_GFX_COLOR_CLASS_LAYER_NORMAL:
if ((cc->r == r) && (cc->g == g) &&
(cc->b == b) && (cc->a == a))
{
@ -534,7 +536,7 @@ _edje_color_class_set_internal(Eina_Hash *hash, const char *color_class, Edje_Co
}
break;
case EDJE_COLOR_CLASS_MODE_COLOR2:
case EFL_GFX_COLOR_CLASS_LAYER_OUTLINE:
if ((cc->r2 == r) && (cc->g2 == g) &&
(cc->b2 == b) && (cc->a2 == a))
{
@ -543,7 +545,7 @@ _edje_color_class_set_internal(Eina_Hash *hash, const char *color_class, Edje_Co
}
break;
case EDJE_COLOR_CLASS_MODE_COLOR3:
case EFL_GFX_COLOR_CLASS_LAYER_SHADOW:
if ((cc->r3 == r) && (cc->g3 == g) &&
(cc->b3 == b) && (cc->a3 == a))
{
@ -571,23 +573,23 @@ _edje_color_class_set_internal(Eina_Hash *hash, const char *color_class, Edje_Co
eina_hash_direct_add(hash, cc->name, cc);
}
switch (mode)
switch (layer)
{
case EDJE_COLOR_CLASS_MODE_COLOR:
case EFL_GFX_COLOR_CLASS_LAYER_NORMAL:
cc->r = r;
cc->g = g;
cc->b = b;
cc->a = a;
break;
case EDJE_COLOR_CLASS_MODE_COLOR2:
case EFL_GFX_COLOR_CLASS_LAYER_OUTLINE:
cc->r2 = r;
cc->g2 = g;
cc->b2 = b;
cc->a2 = a;
break;
case EDJE_COLOR_CLASS_MODE_COLOR3:
case EFL_GFX_COLOR_CLASS_LAYER_SHADOW:
cc->r3 = r;
cc->g3 = g;
cc->b3 = b;
@ -601,27 +603,27 @@ _edje_color_class_set_internal(Eina_Hash *hash, const char *color_class, Edje_Co
}
static Eina_Bool
_edje_color_class_get_internal(Edje_Color_Class *cc, Edje_Color_Class_Mode mode, int *r, int *g, int *b, int *a)
_edje_color_class_get_internal(Edje_Color_Class *cc, Efl_Gfx_Color_Class_Layer layer, int *r, int *g, int *b, int *a)
{
if (cc)
{
switch (mode)
switch (layer)
{
case EDJE_COLOR_CLASS_MODE_COLOR:
case EFL_GFX_COLOR_CLASS_LAYER_NORMAL:
if (r) *r = cc->r;
if (g) *g = cc->g;
if (b) *b = cc->b;
if (a) *a = cc->a;
break;
case EDJE_COLOR_CLASS_MODE_COLOR2:
case EFL_GFX_COLOR_CLASS_LAYER_OUTLINE:
if (r) *r = cc->r2;
if (g) *g = cc->g2;
if (b) *b = cc->b2;
if (a) *a = cc->a2;
break;
case EDJE_COLOR_CLASS_MODE_COLOR3:
case EFL_GFX_COLOR_CLASS_LAYER_SHADOW:
if (r) *r = cc->r3;
if (g) *g = cc->g3;
if (b) *b = cc->b3;
@ -644,18 +646,18 @@ _edje_color_class_get_internal(Edje_Color_Class *cc, Edje_Color_Class_Mode mode,
EAPI Eina_Bool
edje_color_class_set(const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3)
{
Eina_Bool int_ret;
Eina_Bool int_ret = EINA_TRUE;
int_ret = edje_obj_global_color_class_set(EDJE_OBJECT_CLASS, color_class, EDJE_COLOR_CLASS_MODE_COLOR, r, g, b, a);
int_ret &= edje_obj_global_color_class_set(EDJE_OBJECT_CLASS, color_class, EDJE_COLOR_CLASS_MODE_COLOR2, r2, g2, b2, a2);
int_ret &= edje_obj_global_color_class_set(EDJE_OBJECT_CLASS, color_class, EDJE_COLOR_CLASS_MODE_COLOR3, r3, g3, b3, a3);
int_ret &= efl_gfx_color_class_set(_edje_global_obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_NORMAL, r, g, b, a);
int_ret &= efl_gfx_color_class_set(_edje_global_obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_OUTLINE, r2, g2, b2, a2);
int_ret &= efl_gfx_color_class_set(_edje_global_obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_SHADOW, r3, g3, b3, a3);
return int_ret;
}
EOLIAN Eina_Bool
_edje_object_global_color_class_set(Efl_Class *klass EINA_UNUSED, void *pd EINA_UNUSED,
const char *color_class, Edje_Color_Class_Mode mode, int r, int g, int b, int a)
_edje_global_efl_gfx_color_class_color_class_set(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED,
const char *color_class, Efl_Gfx_Color_Class_Layer layer, int r, int g, int b, int a)
{
Eina_Bool int_ret;
Eina_Bool need_update = EINA_FALSE;
@ -663,7 +665,7 @@ _edje_object_global_color_class_set(Efl_Class *klass EINA_UNUSED, void *pd EINA_
if (!_edje_color_class_hash)
_edje_color_class_hash = eina_hash_string_superfast_new(NULL);
int_ret = _edje_color_class_set_internal(_edje_color_class_hash, color_class, mode, r, g, b, a, &need_update);
int_ret = _edje_color_class_set_internal(_edje_color_class_hash, color_class, layer, r, g, b, a, &need_update);
if ((int_ret) && (need_update))
efl_observable_observers_update(_edje_color_class_member, color_class, "color_class,set");
@ -674,18 +676,18 @@ _edje_object_global_color_class_set(Efl_Class *klass EINA_UNUSED, void *pd EINA_
EAPI Eina_Bool
edje_color_class_get(const char *color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3)
{
Eina_Bool int_ret;
Eina_Bool int_ret = EINA_TRUE;
int_ret = edje_obj_global_color_class_get(EDJE_OBJECT_CLASS, color_class, EDJE_COLOR_CLASS_MODE_COLOR, r, g, b, a);
int_ret &= edje_obj_global_color_class_get(EDJE_OBJECT_CLASS, color_class, EDJE_COLOR_CLASS_MODE_COLOR2, r2, g2, b2, a2);
int_ret &= edje_obj_global_color_class_get(EDJE_OBJECT_CLASS, color_class, EDJE_COLOR_CLASS_MODE_COLOR3, r3, g3, b3, a3);
int_ret &= efl_gfx_color_class_get(_edje_global_obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_NORMAL, r, g, b, a);
int_ret &= efl_gfx_color_class_get(_edje_global_obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_OUTLINE, r2, g2, b2, a2);
int_ret &= efl_gfx_color_class_get(_edje_global_obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_SHADOW, r3, g3, b3, a3);
return int_ret;
}
EOLIAN Eina_Bool
_edje_object_global_color_class_get(Efl_Class *klass EINA_UNUSED, void *pd EINA_UNUSED,
const char *color_class, Edje_Color_Class_Mode mode, int *r, int *g, int *b, int *a)
_edje_global_efl_gfx_color_class_color_class_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED,
const char *color_class, Efl_Gfx_Color_Class_Layer layer, int *r, int *g, int *b, int *a)
{
Edje_Color_Class *cc;
@ -694,11 +696,17 @@ _edje_object_global_color_class_get(Efl_Class *klass EINA_UNUSED, void *pd EINA_
else
cc = eina_hash_find(_edje_color_class_hash, color_class);
return _edje_color_class_get_internal(cc, mode, r, g, b, a);
return _edje_color_class_get_internal(cc, layer, r, g, b, a);
}
EAPI void
edje_color_class_del(const char *color_class)
{
efl_gfx_color_class_del(_edje_global_obj, color_class);
}
EOLIAN void
_edje_global_efl_gfx_color_class_color_class_del(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, const char *color_class)
{
Edje_Color_Class *cc;
@ -826,22 +834,22 @@ _edje_color_class_list_foreach(const Eina_Hash *hash EINA_UNUSED, const void *ke
EAPI Eina_Bool
edje_object_color_class_set(Evas_Object *obj, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3)
{
Eina_Bool int_ret;
Eina_Bool int_ret = EINA_TRUE;
int_ret = edje_obj_color_class_set(obj, color_class, EDJE_COLOR_CLASS_MODE_COLOR, r, g, b, a);
int_ret &= edje_obj_color_class_set(obj, color_class, EDJE_COLOR_CLASS_MODE_COLOR2, r2, g2, b2, a2);
int_ret &= edje_obj_color_class_set(obj, color_class, EDJE_COLOR_CLASS_MODE_COLOR3, r3, g3, b3, a3);
int_ret &= efl_gfx_color_class_set(obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_NORMAL, r, g, b, a);
int_ret &= efl_gfx_color_class_set(obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_OUTLINE, r2, g2, b2, a2);
int_ret &= efl_gfx_color_class_set(obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_SHADOW, r3, g3, b3, a3);
return int_ret;
}
EOLIAN Eina_Bool
_edje_object_color_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *color_class, Edje_Color_Class_Mode mode, int r, int g, int b, int a)
_edje_object_efl_gfx_color_class_color_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *color_class, Efl_Gfx_Color_Class_Layer layer, int r, int g, int b, int a)
{
Eina_Bool int_ret;
Eina_Bool need_update;
int_ret = _edje_color_class_set_internal(ed->color_classes, color_class, mode, r, g, b, a, &need_update);
int_ret = _edje_color_class_set_internal(ed->color_classes, color_class, layer, r, g, b, a, &need_update);
if ((int_ret) && (need_update))
{
@ -860,8 +868,8 @@ _edje_object_color_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *color_cl
((rp->type == EDJE_RP_TYPE_SWALLOW) &&
(rp->typedata.swallow)) &&
(rp->typedata.swallow->swallowed_object))
edje_obj_color_class_set(rp->typedata.swallow->swallowed_object,
color_class, mode, r, g, b, a);
efl_gfx_color_class_set(rp->typedata.swallow->swallowed_object,
color_class, layer, r, g, b, a);
}
_edje_recalc(ed);
@ -874,17 +882,17 @@ _edje_object_color_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *color_cl
EAPI Eina_Bool
edje_object_color_class_get(const Evas_Object *obj, const char *color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3)
{
Eina_Bool int_ret;
Eina_Bool int_ret = EINA_TRUE;
int_ret = edje_obj_color_class_get(obj, color_class, EDJE_COLOR_CLASS_MODE_COLOR, r, g, b, a);
int_ret &= edje_obj_color_class_get(obj, color_class, EDJE_COLOR_CLASS_MODE_COLOR2, r2, g2, b2, a2);
int_ret &= edje_obj_color_class_get(obj, color_class, EDJE_COLOR_CLASS_MODE_COLOR3, r3, g3, b3, a3);
int_ret &= efl_gfx_color_class_get(obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_NORMAL, r, g, b, a);
int_ret &= efl_gfx_color_class_get(obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_OUTLINE, r2, g2, b2, a2);
int_ret &= efl_gfx_color_class_get(obj, color_class, EFL_GFX_COLOR_CLASS_LAYER_SHADOW, r3, g3, b3, a3);
return int_ret;
}
EOLIAN Eina_Bool
_edje_object_color_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *color_class, Edje_Color_Class_Mode mode, int *r, int *g, int *b, int *a)
_edje_object_efl_gfx_color_class_color_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *color_class, Efl_Gfx_Color_Class_Layer layer, int *r, int *g, int *b, int *a)
{
Edje_Color_Class *cc;
@ -893,18 +901,30 @@ _edje_object_color_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *color_cl
else
cc = _edje_color_class_find(ed, color_class);
return _edje_color_class_get_internal(cc, mode, r, g, b, a);
return _edje_color_class_get_internal(cc, layer, r, g, b, a);
}
EOLIAN Eina_Stringshare *
_edje_object_color_class_description_get(Eo *obj EINA_UNUSED, Edje *ed, const char *color_class)
EAPI const char *
edje_objcet_color_class_description_get(const Evas_Object *obj, const char *color_class)
{
return efl_gfx_color_class_description_get(obj, color_class);
}
EOLIAN const char *
_edje_object_efl_gfx_color_class_color_class_description_get(Eo *obj EINA_UNUSED, Edje *ed, const char *color_class)
{
Edje_Color_Class *cc = _edje_color_class_find(ed, color_class);
return cc ? cc->desc : NULL;
}
EAPI void
edje_object_color_class_del(Evas_Object *obj, const char *color_class)
{
efl_gfx_color_class_del(obj, color_class);
}
EOLIAN void
_edje_object_color_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *color_class)
_edje_object_efl_gfx_color_class_color_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *color_class)
{
Edje_Color_Class *cc = NULL;
unsigned short i;
@ -922,7 +942,7 @@ _edje_object_color_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *color_cl
((rp->type == EDJE_RP_TYPE_SWALLOW) &&
(rp->typedata.swallow)) &&
(rp->typedata.swallow->swallowed_object))
edje_object_color_class_del(rp->typedata.swallow->swallowed_object, color_class);
efl_gfx_color_class_del(rp->typedata.swallow->swallowed_object, color_class);
}
ed->dirty = EINA_TRUE;
@ -934,17 +954,22 @@ _edje_object_color_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *color_cl
_edje_emit(ed, "color_class,del", color_class);
}
EOLIAN Eina_Bool
_edje_object_color_class_clear(const Eo *obj EINA_UNUSED, Edje *ed)
EAPI Eina_Bool
edje_object_color_class_clear(const Evas_Object *obj)
{
efl_gfx_color_class_clear((Eo *)obj);
return EINA_TRUE;
}
EOLIAN void
_edje_object_efl_gfx_color_class_color_class_clear(Eo *obj EINA_UNUSED, Edje *ed)
{
Edje_List_Foreach_Data fdata;
Edje_Color_Class *cc = NULL;
Eina_List *l;
char *color_class;
unsigned short i;
Eina_Bool int_ret = EINA_TRUE;
if (!ed) return EINA_FALSE;
memset(&fdata, 0, sizeof(Edje_List_Foreach_Data));
eina_hash_foreach(ed->color_classes, _edje_color_class_list_foreach, &fdata);
@ -961,7 +986,7 @@ _edje_object_color_class_clear(const Eo *obj EINA_UNUSED, Edje *ed)
((rp->type == EDJE_RP_TYPE_SWALLOW) &&
(rp->typedata.swallow)) &&
(rp->typedata.swallow->swallowed_object))
int_ret &= edje_object_color_class_clear(rp->typedata.swallow->swallowed_object);
efl_gfx_color_class_clear(rp->typedata.swallow->swallowed_object);
}
ed->dirty = EINA_TRUE;
@ -976,8 +1001,6 @@ _edje_object_color_class_clear(const Eo *obj EINA_UNUSED, Edje *ed)
_edje_emit(ed, "color_class,del", color_class);
free(color_class);
}
return int_ret;
}
typedef struct _Edje_File_Color_Class_Iterator Edje_File_Color_Class_Iterator;
@ -1056,6 +1079,13 @@ on_error:
EAPI Eina_Bool
edje_text_class_set(const char *text_class, const char *font, Evas_Font_Size size)
{
return efl_gfx_text_class_set(_edje_global_obj, text_class, font, (Efl_Font_Size)size);
}
EOLIAN Eina_Bool
_edje_global_efl_gfx_text_class_text_class_set(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED,
const char *text_class, const char *font, Efl_Font_Size size)
{
Edje_Text_Class *tc;
@ -1100,6 +1130,13 @@ edje_text_class_set(const char *text_class, const char *font, Evas_Font_Size siz
EAPI Eina_Bool
edje_text_class_get(const char *text_class, const char **font, Evas_Font_Size *size)
{
return efl_gfx_text_class_get(_edje_global_obj, text_class, font, (Efl_Font_Size *)size);
}
EOLIAN Eina_Bool
_edje_global_efl_gfx_text_class_text_class_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED,
const char *text_class, const char **font, Efl_Font_Size *size)
{
Edje_Text_Class *tc;
@ -1124,6 +1161,12 @@ edje_text_class_get(const char *text_class, const char **font, Evas_Font_Size *s
EAPI void
edje_text_class_del(const char *text_class)
{
efl_gfx_text_class_del(_edje_global_obj, text_class);
}
EOLIAN void
_edje_global_efl_gfx_text_class_text_class_del(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, const char *text_class)
{
Edje_Text_Class *tc;
@ -1237,8 +1280,14 @@ _edje_text_class_list_foreach(const Eina_Hash *hash EINA_UNUSED, const void *key
return EINA_TRUE;
}
EAPI Eina_Bool
edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size)
{
return efl_gfx_text_class_set(obj, text_class, font, (Efl_Font_Size)size);
}
EOLIAN Eina_Bool
_edje_object_text_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *text_class, const char *font, Evas_Font_Size size)
_edje_object_efl_gfx_text_class_text_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *text_class, const char *font, Efl_Font_Size size)
{
Edje_Text_Class *tc = NULL;
unsigned short i;
@ -1292,8 +1341,8 @@ _edje_object_text_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *text_clas
((rp->type == EDJE_RP_TYPE_SWALLOW) &&
(rp->typedata.swallow)) &&
(rp->typedata.swallow->swallowed_object))
edje_object_text_class_set(rp->typedata.swallow->swallowed_object,
text_class, font, size);
efl_gfx_text_class_set(rp->typedata.swallow->swallowed_object,
text_class, font, size);
}
efl_observer_update(obj, _edje_text_class_member, text_class, NULL);
@ -1301,8 +1350,14 @@ _edje_object_text_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *text_clas
return EINA_TRUE;
}
EAPI Eina_Bool
edje_object_text_class_get(const Evas_Object *obj, const char *text_class, const char **font, Evas_Font_Size *size)
{
return efl_gfx_text_class_get(obj, text_class, font, (Efl_Font_Size *)size);
}
EOLIAN Eina_Bool
_edje_object_text_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *text_class, const char **font, Evas_Font_Size *size)
_edje_object_efl_gfx_text_class_text_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *text_class, const char **font, Efl_Font_Size *size)
{
Edje_Text_Class *tc = _edje_text_class_find(ed, text_class);
@ -1321,8 +1376,14 @@ _edje_object_text_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *text_clas
return EINA_TRUE;
}
EAPI void
edje_object_text_class_del(Evas_Object *obj, const char *text_class)
{
efl_gfx_text_class_del(obj, text_class);
}
EOLIAN void
_edje_object_text_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *text_class)
_edje_object_efl_gfx_text_class_text_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *text_class)
{
Edje_Text_Class *tc = NULL;
unsigned short i;
@ -1340,7 +1401,7 @@ _edje_object_text_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *text_clas
((rp->type == EDJE_RP_TYPE_SWALLOW) &&
(rp->typedata.swallow)) &&
(rp->typedata.swallow->swallowed_object))
edje_object_text_class_del(rp->typedata.swallow->swallowed_object, text_class);
efl_gfx_text_class_del(rp->typedata.swallow->swallowed_object, text_class);
}
efl_observer_update(obj, _edje_text_class_member, text_class, NULL);
@ -1422,6 +1483,13 @@ on_error:
EAPI Eina_Bool
edje_size_class_set(const char *size_class, Evas_Coord minw, Evas_Coord minh, Evas_Coord maxw, Evas_Coord maxh)
{
return efl_gfx_size_class_set(_edje_global_obj, size_class, minw, minh, maxw, maxh);
}
EOLIAN Eina_Bool
_edje_global_efl_gfx_size_class_size_class_set(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, const char *size_class,
Evas_Coord minw, Evas_Coord minh, Evas_Coord maxw, Evas_Coord maxh)
{
Edje_Size_Class *sc;
@ -1469,6 +1537,13 @@ edje_size_class_set(const char *size_class, Evas_Coord minw, Evas_Coord minh, Ev
EAPI Eina_Bool
edje_size_class_get(const char *size_class, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord *maxw, Evas_Coord *maxh)
{
return efl_gfx_size_class_get(_edje_global_obj, size_class, minw, minh, maxw, maxh);
}
EOLIAN Eina_Bool
_edje_global_efl_gfx_size_class_size_class_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, const char *size_class,
Evas_Coord *minw, Evas_Coord *minh, Evas_Coord *maxw, Evas_Coord *maxh)
{
Edje_Size_Class *sc;
@ -1497,6 +1572,12 @@ edje_size_class_get(const char *size_class, Evas_Coord *minw, Evas_Coord *minh,
EAPI void
edje_size_class_del(const char *size_class)
{
efl_gfx_size_class_del(_edje_global_obj, size_class);
}
EOLIAN void
_edje_global_efl_gfx_size_class_size_class_del(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, const char *size_class)
{
Edje_Size_Class *sc;
@ -1609,8 +1690,14 @@ _edje_size_class_list_foreach(const Eina_Hash *hash EINA_UNUSED, const void *key
return EINA_TRUE;
}
EAPI Eina_Bool
edje_object_size_class_set(Evas_Object *obj, const char *size_class, Evas_Coord minw, Evas_Coord minh, Evas_Coord maxw, Evas_Coord maxh)
{
return efl_gfx_size_class_set(obj, size_class, minw, minh, maxw, maxh);
}
EOLIAN Eina_Bool
_edje_object_size_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *size_class, Evas_Coord minw, Evas_Coord minh, Evas_Coord maxw, Evas_Coord maxh)
_edje_object_efl_gfx_size_class_size_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *size_class, Evas_Coord minw, Evas_Coord minh, Evas_Coord maxw, Evas_Coord maxh)
{
Edje_Size_Class *sc = NULL;
unsigned short i;
@ -1662,8 +1749,8 @@ _edje_object_size_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *size_clas
((rp->type == EDJE_RP_TYPE_SWALLOW) &&
(rp->typedata.swallow)) &&
(rp->typedata.swallow->swallowed_object))
edje_object_size_class_set(rp->typedata.swallow->swallowed_object,
size_class, minw, minh, maxw, maxh);
efl_gfx_size_class_set(rp->typedata.swallow->swallowed_object,
size_class, minw, minh, maxw, maxh);
}
efl_observable_observers_update(_edje_size_class_member, size_class, NULL);
@ -1671,8 +1758,14 @@ _edje_object_size_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *size_clas
return EINA_TRUE;
}
EAPI Eina_Bool
edje_object_size_class_get(const Evas_Object *obj, const char *size_class, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord *maxw, Evas_Coord *maxh)
{
return efl_gfx_size_class_get(obj, size_class, minw, minh, maxw, maxh);
}
EOLIAN Eina_Bool
_edje_object_size_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *size_class, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord *maxw, Evas_Coord *maxh)
_edje_object_efl_gfx_size_class_size_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *size_class, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord *maxw, Evas_Coord *maxh)
{
Edje_Size_Class *sc = _edje_size_class_find(ed, size_class);
@ -1695,8 +1788,14 @@ _edje_object_size_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *size_clas
return EINA_TRUE;
}
EAPI void
edje_object_size_class_del(Evas_Object *obj, const char *size_class)
{
efl_gfx_size_class_del(obj, size_class);
}
EOLIAN void
_edje_object_size_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *size_class)
_edje_object_efl_gfx_size_class_size_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *size_class)
{
Edje_Size_Class *sc = NULL;
unsigned short i;
@ -1714,7 +1813,7 @@ _edje_object_size_class_del(Eo *obj EINA_UNUSED, Edje *ed, const char *size_clas
((rp->type == EDJE_RP_TYPE_SWALLOW) &&
(rp->typedata.swallow)) &&
(rp->typedata.swallow->swallowed_object))
edje_object_size_class_del(rp->typedata.swallow->swallowed_object, size_class);
efl_gfx_size_class_del(rp->typedata.swallow->swallowed_object, size_class);
}
efl_observable_observers_update(_edje_size_class_member, size_class, NULL);

View File

@ -124,6 +124,9 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
#include "interfaces/efl_gfx_gradient_radial.eo.h"
#include "interfaces/efl_gfx_filter.eo.h"
#include "interfaces/efl_gfx_size_hint.eo.h"
#include "interfaces/efl_gfx_color_class.eo.h"
#include "interfaces/efl_gfx_text_class.eo.h"
#include "interfaces/efl_gfx_size_class.eo.h"
/* Input events */
#include "interfaces/efl_input_types.eot.h"

View File

@ -0,0 +1,85 @@
import efl_gfx_types;
interface Efl.Gfx.Color_Class
{
methods {
@property color_class {
set {
[[Set the color of color class.
This function sets the color values for a color class. This will
cause all edje parts in the specified object that have the specified
color class to have their colors multiplied by these values.
The first color is the object, the second is the text outline, and
the third is the text shadow. (Note that the second two only apply
to text parts).
Setting color emits a signal "color_class,set" with source being
the given color.
Note: These color values are expected to be premultiplied by \@p a.]]
return: bool;
}
get {
[[Get the color of color class.
This function gets the color values for a color class. If no explicit
object color is set, then global values will be used.
The first color is the object, the second is the text outline, and
the third is the text shadow. (Note that the second two only apply
to text parts).
Note: These color values are expected to be premultiplied by \@p a.]]
return: bool;
}
keys {
color_class: string; [[The name of color class]]
layer: Efl.Gfx.Color_Class.Layer @optional; [[The layer to set the color]]
}
values {
r: int; [[The intensity of the red color]]
g: int; [[The intensity of the green color]]
b: int; [[The intensity of the blue color]]
a: int; [[The alpha value]]
}
}
@property color_class_description {
get {
[[Get the description of a color class.
This function gets the description of a color class in use by an object.]]
}
keys {
color_class: string; [[The name of color class]]
}
values {
description: string; [[The description of the target color class or $null if not found]]
}
}
color_class_del {
[[Delete the color class.
This function deletes any values for the specified color class.
Deleting the color class will revert it to the values defined
by @.color_class.set() or the color class defined in the theme file.
Deleting the color class will emit the signal "color_class,del"
for the given Edje object.]]
params {
@in color_class: string; [[The name of color_class]]
}
}
color_class_clear {
[[Delete all color classes defined in object level.
This function deletes any color classes defined in object level.
Clearing color classes will revert the color of all edje parts to
the values defined in global level or theme file.
@since 1.17.0]]
}
}
}

View File

@ -0,0 +1,49 @@
interface Efl.Gfx.Size_Class
{
methods {
@property size_class {
set {
[[Set width and height of size class.
This function sets width and height for a size class.
This will make all edje parts in the specified object that have
the specified size class update their size with given values.
@since 1.17]]
return: bool; [[$true, on success or $false, on error]]
}
get {
[[Get width and height of size class.
This function gets width and height for a size class.
These values will only be valid until the size class is changed
or the edje object is deleted.
@since 1.17]]
return: bool; [[$true, on success or $false, on error]]
}
keys {
size_class: string; [[The name of size class]]
}
values {
minw: int; [[minimum width]]
minh: int; [[minimum height]]
maxw: int; [[maximum width]]
maxh: int; [[maximum height]]
}
}
size_class_del {
[[Delete the size class.
This function deletes any values for the specified size class.
Deleting the size class will revert it to the values defined
by @.size_class.set() or the size class defined in the theme file.
@since 1.17]]
params {
@in size_class: string; [[The size class to be deleted.]]
}
}
}
}

View File

@ -0,0 +1,43 @@
import efl_gfx_types;
interface Efl.Gfx.Text_Class
{
methods {
@property text_class {
set {
[[Set Edje text class.
This function sets the text class for the Edje.]]
return: bool; [[$true, on success or $false, on error]]
}
get {
[[Get font and font size from edje text class.
This function gets the font and the font size from text class.
The font string will only be valid until the text class is changed
or the edje object is deleted.]]
return: bool; [[$true, on success or $false, on error]]
}
keys {
text_class: string; [[The text class name]]
}
values {
font: string; [[Font name]]
size: Efl.Font.Size; [[Font Size]]
}
}
text_class_del {
[[Delete the text class.
This function deletes any values for the specified text class.
Deleting the text class will revert it to the values defined
by @.text_class.set() or the text class defined in the theme file.
@since 1.17]]
params {
@in text_class: string; [[The text class to be deleted.]]
}
}
}
}

View File

@ -196,3 +196,11 @@ enum Efl.Image.Load.Error
unknown_collection = 9, [[(Edje only) The group/collection set to load from was not found in the file]]
recursive_reference = 10 [[(Edje only) The group/collection set to load from had recursive references on its components]]
}
enum Efl.Gfx.Color_Class.Layer {
normal = 0, [[Default color]]
outline, [[Outline color]]
shadow [[Shadow color]]
}
type Efl.Font.Size: int; [[Efl font size type]]

View File

@ -26,6 +26,10 @@
#include "interfaces/efl_gfx_fill.eo.c"
#include "interfaces/efl_gfx_view.eo.c"
#include "interfaces/efl_gfx_color_class.eo.c"
#include "interfaces/efl_gfx_text_class.eo.c"
#include "interfaces/efl_gfx_size_class.eo.c"
#include "interfaces/efl_gfx_gradient.eo.c"
#include "interfaces/efl_gfx_gradient_linear.eo.c"
#include "interfaces/efl_gfx_gradient_radial.eo.c"

View File

@ -1,4 +1,4 @@
type Efl_Font_Size: int; [[Efl font size type]]
import efl_gfx_types;
interface Efl.Text.Properties
{
@ -31,7 +31,7 @@ interface Efl.Text.Properties
}
values {
font: string; [[The font family name or filename.]]
size: Efl_Font_Size; [[The font size, in points.]]
size: Efl.Font.Size; [[The font size, in points.]]
}
}
@property font_source {