elm_mapbuf: remove all legacy usage from eo files

this takes the current generated output from eolian for legacy code in
efl and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8182
This commit is contained in:
Mike Blumenkrantz 2019-03-05 17:00:37 -05:00 committed by Cedric BAIL
parent 3448b7933f
commit 3bedd6ba55
9 changed files with 668 additions and 133 deletions

View File

@ -220,7 +220,6 @@ elm_legacy_eolian_files = \
lib/elementary/elm_actionslider_part.eo \
lib/elementary/elm_bubble_part.eo \
lib/elementary/elm_fileselector_part.eo \
lib/elementary/elm_mapbuf.eo \
lib/elementary/elm_naviframe.eo \
lib/elementary/elm_naviframe_item.eo \
lib/elementary/elm_photo.eo \
@ -366,6 +365,8 @@ lib/elementary/elm_list_eo.c \
lib/elementary/elm_list_eo.legacy.c \
lib/elementary/elm_list_item_eo.c \
lib/elementary/elm_list_item_eo.legacy.c \
lib/elementary/elm_mapbuf_eo.c \
lib/elementary/elm_mapbuf_eo.legacy.c \
$(NULL)
elm_legacy_eo_headers = \
@ -501,6 +502,8 @@ lib/elementary/elm_list_eo.h \
lib/elementary/elm_list_eo.legacy.h \
lib/elementary/elm_list_item_eo.h \
lib/elementary/elm_list_item_eo.legacy.h \
lib/elementary/elm_mapbuf_eo.h \
lib/elementary/elm_mapbuf_eo.legacy.h \
$(NULL)

View File

@ -10,7 +10,7 @@
#include "elm_priv.h"
#include "elm_widget_mapbuf.h"
#include "elm_widget_container.h"
#include "elm_mapbuf.eo.h"
#include "elm_mapbuf_eo.h"
#include "elm_mapbuf_part.eo.h"
#include "elm_part_helper.h"
@ -456,4 +456,4 @@ ELM_PART_CONTENT_DEFAULT_GET(elm_mapbuf, "default")
ELM_PART_CONTENT_DEFAULT_OPS(elm_mapbuf), \
EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_mapbuf)
#include "elm_mapbuf.eo.c"
#include "elm_mapbuf_eo.c"

View File

@ -1,128 +0,0 @@
class Elm.Mapbuf extends Efl.Ui.Widget implements Efl.Content, Efl.Ui.Legacy
{
[[Elementary mapbuf class]]
legacy_prefix: elm_mapbuf;
eo_prefix: elm_private_mapbuf;
methods {
@property auto {
set {
[[Set or unset auto flag for map rendering.
When a ampbuf object has "auto mode" enabled, then it will
enable and disable map mode based on current visibility.
Mapbuf will track if you show or hide it AND if the object
is inside the canvas viewport or not when it is moved or
resized. Note that if you turn automode off, then map mode
will be in a disabled state at this point. When you turn it
on for the first time, the current state will be evaluated
base on current properties of the mapbuf object.
Auto mode is disabled by default.
]]
}
get {
[[Get a value whether auto mode is enabled or not.]]
}
values {
on: bool; [[The auto mode state.]]
}
}
@property smooth {
set {
[[Enable or disable smooth map rendering.
This sets smoothing for map rendering. If the object is a
type that has its own smoothing settings, then both the
smooth settings for this object and the map must be turned off.
By default smooth maps are enabled.
]]
}
get {
[[Get a value whether smooth map rendering is enabled or not.]]
}
values {
smooth: bool; [[The smooth mode state.]]
}
}
@property alpha {
set {
[[Set or unset alpha flag for map rendering.
This sets alpha flag for map rendering. If the object is a
type that has its own alpha settings, then this will take
precedence. Only image objects have this currently. It stops
alpha blending of the map area, and is useful if you know the
object and/or all sub-objects is 100% solid.
Alpha is enabled by default.
]]
}
get {
[[Get a value whether alpha blending is enabled or not.]]
}
values {
alpha: bool; [[The alpha state.]]
}
}
@property enabled {
set {
[[Enable or disable the map.
This enables the map that is set or disables it. On enable,
the object geometry will be saved, and the new geometry will
change (position and size) to reflect the map geometry set.
Also, when enabled, alpha and smooth states will be used, so
if the content isn't solid, alpha should be enabled, for
example, otherwise a black rectangle will fill the content.
When disabled, the stored map will be freed and geometry prior
to enabling the map will be restored.
It's disabled by default.
]]
}
get {
[[Get a value whether map is enabled or not.]]
}
values {
enabled: bool; [[The enabled state.]]
}
}
@property point_color {
[[The color of a point (vertex) in the mapbuf.
This represents the color of the vertex in the mapbuf. Colors will
be linearly interpolated between vertex points through the mapbuf.
Color will multiply the "texture" pixels (like GL_MODULATE in
OpenGL). The default color of a vertex in a mapbuf is white
solid (255, 255, 255, 255) which means it will have no effect on
modifying the texture pixels.
@since 1.9
]]
keys {
idx: int; [[Index of point to change, from 0 to 3.]]
}
values {
r: int; [[Red (0 - 255)]]
g: int; [[Green (0 - 255)]]
b: int; [[Blue (0 - 255)]]
a: int; [[Alpha (0 - 255)]]
}
}
}
implements {
class.constructor;
Efl.Object.constructor;
Efl.Gfx.Entity.visible { set; }
Efl.Gfx.Entity.position { set; }
Efl.Gfx.Entity.size { set; }
Efl.Ui.Widget.theme_apply;
Efl.Ui.Widget.widget_sub_object_del;
Efl.Content.content { get; set; }
Efl.Content.content_unset;
Efl.Part.part_get;
}
}

View File

@ -0,0 +1,230 @@
void _elm_mapbuf_auto_set(Eo *obj, Elm_Mapbuf_Data *pd, Eina_Bool on);
static Eina_Error
__eolian_elm_mapbuf_auto_set_reflect(Eo *obj, Eina_Value val)
{
Eina_Error r = 0; Eina_Bool cval;
if (!eina_value_bool_convert(&val, &cval))
{
r = EINA_ERROR_VALUE_FAILED;
goto end;
}
elm_private_mapbuf_auto_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_private_mapbuf_auto_set, EFL_FUNC_CALL(on), Eina_Bool on);
Eina_Bool _elm_mapbuf_auto_get(const Eo *obj, Elm_Mapbuf_Data *pd);
static Eina_Value
__eolian_elm_mapbuf_auto_get_reflect(Eo *obj)
{
Eina_Bool val = elm_private_mapbuf_auto_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_private_mapbuf_auto_get, Eina_Bool, 0);
void _elm_mapbuf_smooth_set(Eo *obj, Elm_Mapbuf_Data *pd, Eina_Bool smooth);
static Eina_Error
__eolian_elm_mapbuf_smooth_set_reflect(Eo *obj, Eina_Value val)
{
Eina_Error r = 0; Eina_Bool cval;
if (!eina_value_bool_convert(&val, &cval))
{
r = EINA_ERROR_VALUE_FAILED;
goto end;
}
elm_private_mapbuf_smooth_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_private_mapbuf_smooth_set, EFL_FUNC_CALL(smooth), Eina_Bool smooth);
Eina_Bool _elm_mapbuf_smooth_get(const Eo *obj, Elm_Mapbuf_Data *pd);
static Eina_Value
__eolian_elm_mapbuf_smooth_get_reflect(Eo *obj)
{
Eina_Bool val = elm_private_mapbuf_smooth_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_private_mapbuf_smooth_get, Eina_Bool, 0);
void _elm_mapbuf_alpha_set(Eo *obj, Elm_Mapbuf_Data *pd, Eina_Bool alpha);
static Eina_Error
__eolian_elm_mapbuf_alpha_set_reflect(Eo *obj, Eina_Value val)
{
Eina_Error r = 0; Eina_Bool cval;
if (!eina_value_bool_convert(&val, &cval))
{
r = EINA_ERROR_VALUE_FAILED;
goto end;
}
elm_private_mapbuf_alpha_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_private_mapbuf_alpha_set, EFL_FUNC_CALL(alpha), Eina_Bool alpha);
Eina_Bool _elm_mapbuf_alpha_get(const Eo *obj, Elm_Mapbuf_Data *pd);
static Eina_Value
__eolian_elm_mapbuf_alpha_get_reflect(Eo *obj)
{
Eina_Bool val = elm_private_mapbuf_alpha_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_private_mapbuf_alpha_get, Eina_Bool, 0);
void _elm_mapbuf_enabled_set(Eo *obj, Elm_Mapbuf_Data *pd, Eina_Bool enabled);
static Eina_Error
__eolian_elm_mapbuf_enabled_set_reflect(Eo *obj, Eina_Value val)
{
Eina_Error r = 0; Eina_Bool cval;
if (!eina_value_bool_convert(&val, &cval))
{
r = EINA_ERROR_VALUE_FAILED;
goto end;
}
elm_private_mapbuf_enabled_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_private_mapbuf_enabled_set, EFL_FUNC_CALL(enabled), Eina_Bool enabled);
Eina_Bool _elm_mapbuf_enabled_get(const Eo *obj, Elm_Mapbuf_Data *pd);
static Eina_Value
__eolian_elm_mapbuf_enabled_get_reflect(Eo *obj)
{
Eina_Bool val = elm_private_mapbuf_enabled_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_private_mapbuf_enabled_get, Eina_Bool, 0);
void _elm_mapbuf_point_color_set(Eo *obj, Elm_Mapbuf_Data *pd, int idx, int r, int g, int b, int a);
EOAPI EFL_VOID_FUNC_BODYV(elm_private_mapbuf_point_color_set, EFL_FUNC_CALL(idx, r, g, b, a), int idx, int r, int g, int b, int a);
void _elm_mapbuf_point_color_get(const Eo *obj, Elm_Mapbuf_Data *pd, int idx, int *r, int *g, int *b, int *a);
EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_private_mapbuf_point_color_get, EFL_FUNC_CALL(idx, r, g, b, a), int idx, int *r, int *g, int *b, int *a);
Efl_Object *_elm_mapbuf_efl_object_constructor(Eo *obj, Elm_Mapbuf_Data *pd);
void _elm_mapbuf_efl_gfx_entity_visible_set(Eo *obj, Elm_Mapbuf_Data *pd, Eina_Bool v);
void _elm_mapbuf_efl_gfx_entity_position_set(Eo *obj, Elm_Mapbuf_Data *pd, Eina_Position2D pos);
void _elm_mapbuf_efl_gfx_entity_size_set(Eo *obj, Elm_Mapbuf_Data *pd, Eina_Size2D size);
Eina_Error _elm_mapbuf_efl_ui_widget_theme_apply(Eo *obj, Elm_Mapbuf_Data *pd);
Eina_Bool _elm_mapbuf_efl_ui_widget_widget_sub_object_del(Eo *obj, Elm_Mapbuf_Data *pd, Efl_Canvas_Object *sub_obj);
Eina_Bool _elm_mapbuf_efl_content_content_set(Eo *obj, Elm_Mapbuf_Data *pd, Efl_Gfx_Entity *content);
Efl_Gfx_Entity *_elm_mapbuf_efl_content_content_get(const Eo *obj, Elm_Mapbuf_Data *pd);
Efl_Gfx_Entity *_elm_mapbuf_efl_content_content_unset(Eo *obj, Elm_Mapbuf_Data *pd);
Efl_Object *_elm_mapbuf_efl_part_part_get(const Eo *obj, Elm_Mapbuf_Data *pd, const char *name);
static Eina_Bool
_elm_mapbuf_class_initializer(Efl_Class *klass)
{
const Efl_Object_Ops *opsp = NULL;
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
#ifndef ELM_MAPBUF_EXTRA_OPS
#define ELM_MAPBUF_EXTRA_OPS
#endif
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(elm_private_mapbuf_auto_set, _elm_mapbuf_auto_set),
EFL_OBJECT_OP_FUNC(elm_private_mapbuf_auto_get, _elm_mapbuf_auto_get),
EFL_OBJECT_OP_FUNC(elm_private_mapbuf_smooth_set, _elm_mapbuf_smooth_set),
EFL_OBJECT_OP_FUNC(elm_private_mapbuf_smooth_get, _elm_mapbuf_smooth_get),
EFL_OBJECT_OP_FUNC(elm_private_mapbuf_alpha_set, _elm_mapbuf_alpha_set),
EFL_OBJECT_OP_FUNC(elm_private_mapbuf_alpha_get, _elm_mapbuf_alpha_get),
EFL_OBJECT_OP_FUNC(elm_private_mapbuf_enabled_set, _elm_mapbuf_enabled_set),
EFL_OBJECT_OP_FUNC(elm_private_mapbuf_enabled_get, _elm_mapbuf_enabled_get),
EFL_OBJECT_OP_FUNC(elm_private_mapbuf_point_color_set, _elm_mapbuf_point_color_set),
EFL_OBJECT_OP_FUNC(elm_private_mapbuf_point_color_get, _elm_mapbuf_point_color_get),
EFL_OBJECT_OP_FUNC(efl_constructor, _elm_mapbuf_efl_object_constructor),
EFL_OBJECT_OP_FUNC(efl_gfx_entity_visible_set, _elm_mapbuf_efl_gfx_entity_visible_set),
EFL_OBJECT_OP_FUNC(efl_gfx_entity_position_set, _elm_mapbuf_efl_gfx_entity_position_set),
EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _elm_mapbuf_efl_gfx_entity_size_set),
EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_mapbuf_efl_ui_widget_theme_apply),
EFL_OBJECT_OP_FUNC(efl_ui_widget_sub_object_del, _elm_mapbuf_efl_ui_widget_widget_sub_object_del),
EFL_OBJECT_OP_FUNC(efl_content_set, _elm_mapbuf_efl_content_content_set),
EFL_OBJECT_OP_FUNC(efl_content_get, _elm_mapbuf_efl_content_content_get),
EFL_OBJECT_OP_FUNC(efl_content_unset, _elm_mapbuf_efl_content_content_unset),
EFL_OBJECT_OP_FUNC(efl_part_get, _elm_mapbuf_efl_part_part_get),
ELM_MAPBUF_EXTRA_OPS
);
opsp = &ops;
static const Efl_Object_Property_Reflection refl_table[] = {
{"auto", __eolian_elm_mapbuf_auto_set_reflect, __eolian_elm_mapbuf_auto_get_reflect},
{"smooth", __eolian_elm_mapbuf_smooth_set_reflect, __eolian_elm_mapbuf_smooth_get_reflect},
{"alpha", __eolian_elm_mapbuf_alpha_set_reflect, __eolian_elm_mapbuf_alpha_get_reflect},
{"enabled", __eolian_elm_mapbuf_enabled_set_reflect, __eolian_elm_mapbuf_enabled_get_reflect},
};
static const Efl_Object_Property_Reflection_Ops rops = {
refl_table, EINA_C_ARRAY_LENGTH(refl_table)
};
ropsp = &rops;
return efl_class_functions_set(klass, opsp, ropsp);
}
static const Efl_Class_Description _elm_mapbuf_class_desc = {
EO_VERSION,
"Elm.Mapbuf",
EFL_CLASS_TYPE_REGULAR,
sizeof(Elm_Mapbuf_Data),
_elm_mapbuf_class_initializer,
_elm_mapbuf_class_constructor,
NULL
};
EFL_DEFINE_CLASS(elm_mapbuf_class_get, &_elm_mapbuf_class_desc, EFL_UI_WIDGET_CLASS, EFL_CONTENT_INTERFACE, EFL_UI_LEGACY_INTERFACE, NULL);
#include "elm_mapbuf_eo.legacy.c"

View File

@ -0,0 +1,188 @@
#ifndef _ELM_MAPBUF_EO_H_
#define _ELM_MAPBUF_EO_H_
#ifndef _ELM_MAPBUF_EO_CLASS_TYPE
#define _ELM_MAPBUF_EO_CLASS_TYPE
typedef Eo Elm_Mapbuf;
#endif
#ifndef _ELM_MAPBUF_EO_TYPES
#define _ELM_MAPBUF_EO_TYPES
#endif
/** Elementary mapbuf class
*
* @ingroup Elm_Mapbuf
*/
#define ELM_MAPBUF_CLASS elm_mapbuf_class_get()
EWAPI const Efl_Class *elm_mapbuf_class_get(void);
/**
* @brief Set or unset auto flag for map rendering.
*
* When a ampbuf object has "auto mode" enabled, then it will enable and
* disable map mode based on current visibility. Mapbuf will track if you show
* or hide it AND if the object is inside the canvas viewport or not when it is
* moved or resized. Note that if you turn automode off, then map mode will be
* in a disabled state at this point. When you turn it on for the first time,
* the current state will be evaluated base on current properties of the mapbuf
* object.
*
* Auto mode is disabled by default.
*
* @param[in] obj The object.
* @param[in] on The auto mode state.
*
* @ingroup Elm_Mapbuf
*/
EOAPI void elm_private_mapbuf_auto_set(Eo *obj, Eina_Bool on);
/**
* @brief Get a value whether auto mode is enabled or not.
*
* @param[in] obj The object.
*
* @return The auto mode state.
*
* @ingroup Elm_Mapbuf
*/
EOAPI Eina_Bool elm_private_mapbuf_auto_get(const Eo *obj);
/**
* @brief Enable or disable smooth map rendering.
*
* This sets smoothing for map rendering. If the object is a type that has its
* own smoothing settings, then both the smooth settings for this object and
* the map must be turned off.
*
* By default smooth maps are enabled.
*
* @param[in] obj The object.
* @param[in] smooth The smooth mode state.
*
* @ingroup Elm_Mapbuf
*/
EOAPI void elm_private_mapbuf_smooth_set(Eo *obj, Eina_Bool smooth);
/**
* @brief Get a value whether smooth map rendering is enabled or not.
*
* @param[in] obj The object.
*
* @return The smooth mode state.
*
* @ingroup Elm_Mapbuf
*/
EOAPI Eina_Bool elm_private_mapbuf_smooth_get(const Eo *obj);
/**
* @brief Set or unset alpha flag for map rendering.
*
* This sets alpha flag for map rendering. If the object is a type that has its
* own alpha settings, then this will take precedence. Only image objects have
* this currently. It stops alpha blending of the map area, and is useful if
* you know the object and/or all sub-objects is 100% solid.
*
* Alpha is enabled by default.
*
* @param[in] obj The object.
* @param[in] alpha The alpha state.
*
* @ingroup Elm_Mapbuf
*/
EOAPI void elm_private_mapbuf_alpha_set(Eo *obj, Eina_Bool alpha);
/**
* @brief Get a value whether alpha blending is enabled or not.
*
* @param[in] obj The object.
*
* @return The alpha state.
*
* @ingroup Elm_Mapbuf
*/
EOAPI Eina_Bool elm_private_mapbuf_alpha_get(const Eo *obj);
/**
* @brief Enable or disable the map.
*
* This enables the map that is set or disables it. On enable, the object
* geometry will be saved, and the new geometry will change (position and size)
* to reflect the map geometry set.
*
* Also, when enabled, alpha and smooth states will be used, so if the content
* isn't solid, alpha should be enabled, for example, otherwise a black
* rectangle will fill the content.
*
* When disabled, the stored map will be freed and geometry prior to enabling
* the map will be restored.
*
* It's disabled by default.
*
* @param[in] obj The object.
* @param[in] enabled The enabled state.
*
* @ingroup Elm_Mapbuf
*/
EOAPI void elm_private_mapbuf_enabled_set(Eo *obj, Eina_Bool enabled);
/**
* @brief Get a value whether map is enabled or not.
*
* @param[in] obj The object.
*
* @return The enabled state.
*
* @ingroup Elm_Mapbuf
*/
EOAPI Eina_Bool elm_private_mapbuf_enabled_get(const Eo *obj);
/**
* @brief The color of a point (vertex) in the mapbuf.
*
* This represents the color of the vertex in the mapbuf. Colors will be
* linearly interpolated between vertex points through the mapbuf. Color will
* multiply the "texture" pixels (like GL_MODULATE in OpenGL). The default
* color of a vertex in a mapbuf is white solid (255, 255, 255, 255) which
* means it will have no effect on modifying the texture pixels.
*
* @param[in] obj The object.
* @param[in] idx Index of point to change, from 0 to 3.
* @param[in] r Red (0 - 255)
* @param[in] g Green (0 - 255)
* @param[in] b Blue (0 - 255)
* @param[in] a Alpha (0 - 255)
*
* @since 1.9
*
* @ingroup Elm_Mapbuf
*/
EOAPI void elm_private_mapbuf_point_color_set(Eo *obj, int idx, int r, int g, int b, int a);
/**
* @brief The color of a point (vertex) in the mapbuf.
*
* This represents the color of the vertex in the mapbuf. Colors will be
* linearly interpolated between vertex points through the mapbuf. Color will
* multiply the "texture" pixels (like GL_MODULATE in OpenGL). The default
* color of a vertex in a mapbuf is white solid (255, 255, 255, 255) which
* means it will have no effect on modifying the texture pixels.
*
* @param[in] obj The object.
* @param[in] idx Index of point to change, from 0 to 3.
* @param[out] r Red (0 - 255)
* @param[out] g Green (0 - 255)
* @param[out] b Blue (0 - 255)
* @param[out] a Alpha (0 - 255)
*
* @since 1.9
*
* @ingroup Elm_Mapbuf
*/
EOAPI void elm_private_mapbuf_point_color_get(const Eo *obj, int idx, int *r, int *g, int *b, int *a);
#endif

View File

@ -0,0 +1,60 @@
EAPI void
elm_mapbuf_auto_set(Elm_Mapbuf *obj, Eina_Bool on)
{
elm_private_mapbuf_auto_set(obj, on);
}
EAPI Eina_Bool
elm_mapbuf_auto_get(const Elm_Mapbuf *obj)
{
return elm_private_mapbuf_auto_get(obj);
}
EAPI void
elm_mapbuf_smooth_set(Elm_Mapbuf *obj, Eina_Bool smooth)
{
elm_private_mapbuf_smooth_set(obj, smooth);
}
EAPI Eina_Bool
elm_mapbuf_smooth_get(const Elm_Mapbuf *obj)
{
return elm_private_mapbuf_smooth_get(obj);
}
EAPI void
elm_mapbuf_alpha_set(Elm_Mapbuf *obj, Eina_Bool alpha)
{
elm_private_mapbuf_alpha_set(obj, alpha);
}
EAPI Eina_Bool
elm_mapbuf_alpha_get(const Elm_Mapbuf *obj)
{
return elm_private_mapbuf_alpha_get(obj);
}
EAPI void
elm_mapbuf_enabled_set(Elm_Mapbuf *obj, Eina_Bool enabled)
{
elm_private_mapbuf_enabled_set(obj, enabled);
}
EAPI Eina_Bool
elm_mapbuf_enabled_get(const Elm_Mapbuf *obj)
{
return elm_private_mapbuf_enabled_get(obj);
}
EAPI void
elm_mapbuf_point_color_set(Elm_Mapbuf *obj, int idx, int r, int g, int b, int a)
{
elm_private_mapbuf_point_color_set(obj, idx, r, g, b, a);
}
EAPI void
elm_mapbuf_point_color_get(const Elm_Mapbuf *obj, int idx, int *r, int *g, int *b, int *a)
{
elm_private_mapbuf_point_color_get(obj, idx, r, g, b, a);
}

View File

@ -0,0 +1,181 @@
#ifndef _ELM_MAPBUF_EO_LEGACY_H_
#define _ELM_MAPBUF_EO_LEGACY_H_
#ifndef _ELM_MAPBUF_EO_CLASS_TYPE
#define _ELM_MAPBUF_EO_CLASS_TYPE
typedef Eo Elm_Mapbuf;
#endif
#ifndef _ELM_MAPBUF_EO_TYPES
#define _ELM_MAPBUF_EO_TYPES
#endif
/**
* @brief Set or unset auto flag for map rendering.
*
* When a ampbuf object has "auto mode" enabled, then it will enable and
* disable map mode based on current visibility. Mapbuf will track if you show
* or hide it AND if the object is inside the canvas viewport or not when it is
* moved or resized. Note that if you turn automode off, then map mode will be
* in a disabled state at this point. When you turn it on for the first time,
* the current state will be evaluated base on current properties of the mapbuf
* object.
*
* Auto mode is disabled by default.
*
* @param[in] obj The object.
* @param[in] on The auto mode state.
*
* @ingroup Elm_Mapbuf_Group
*/
EAPI void elm_mapbuf_auto_set(Elm_Mapbuf *obj, Eina_Bool on);
/**
* @brief Get a value whether auto mode is enabled or not.
*
* @param[in] obj The object.
*
* @return The auto mode state.
*
* @ingroup Elm_Mapbuf_Group
*/
EAPI Eina_Bool elm_mapbuf_auto_get(const Elm_Mapbuf *obj);
/**
* @brief Enable or disable smooth map rendering.
*
* This sets smoothing for map rendering. If the object is a type that has its
* own smoothing settings, then both the smooth settings for this object and
* the map must be turned off.
*
* By default smooth maps are enabled.
*
* @param[in] obj The object.
* @param[in] smooth The smooth mode state.
*
* @ingroup Elm_Mapbuf_Group
*/
EAPI void elm_mapbuf_smooth_set(Elm_Mapbuf *obj, Eina_Bool smooth);
/**
* @brief Get a value whether smooth map rendering is enabled or not.
*
* @param[in] obj The object.
*
* @return The smooth mode state.
*
* @ingroup Elm_Mapbuf_Group
*/
EAPI Eina_Bool elm_mapbuf_smooth_get(const Elm_Mapbuf *obj);
/**
* @brief Set or unset alpha flag for map rendering.
*
* This sets alpha flag for map rendering. If the object is a type that has its
* own alpha settings, then this will take precedence. Only image objects have
* this currently. It stops alpha blending of the map area, and is useful if
* you know the object and/or all sub-objects is 100% solid.
*
* Alpha is enabled by default.
*
* @param[in] obj The object.
* @param[in] alpha The alpha state.
*
* @ingroup Elm_Mapbuf_Group
*/
EAPI void elm_mapbuf_alpha_set(Elm_Mapbuf *obj, Eina_Bool alpha);
/**
* @brief Get a value whether alpha blending is enabled or not.
*
* @param[in] obj The object.
*
* @return The alpha state.
*
* @ingroup Elm_Mapbuf_Group
*/
EAPI Eina_Bool elm_mapbuf_alpha_get(const Elm_Mapbuf *obj);
/**
* @brief Enable or disable the map.
*
* This enables the map that is set or disables it. On enable, the object
* geometry will be saved, and the new geometry will change (position and size)
* to reflect the map geometry set.
*
* Also, when enabled, alpha and smooth states will be used, so if the content
* isn't solid, alpha should be enabled, for example, otherwise a black
* rectangle will fill the content.
*
* When disabled, the stored map will be freed and geometry prior to enabling
* the map will be restored.
*
* It's disabled by default.
*
* @param[in] obj The object.
* @param[in] enabled The enabled state.
*
* @ingroup Elm_Mapbuf_Group
*/
EAPI void elm_mapbuf_enabled_set(Elm_Mapbuf *obj, Eina_Bool enabled);
/**
* @brief Get a value whether map is enabled or not.
*
* @param[in] obj The object.
*
* @return The enabled state.
*
* @ingroup Elm_Mapbuf_Group
*/
EAPI Eina_Bool elm_mapbuf_enabled_get(const Elm_Mapbuf *obj);
/**
* @brief The color of a point (vertex) in the mapbuf.
*
* This represents the color of the vertex in the mapbuf. Colors will be
* linearly interpolated between vertex points through the mapbuf. Color will
* multiply the "texture" pixels (like GL_MODULATE in OpenGL). The default
* color of a vertex in a mapbuf is white solid (255, 255, 255, 255) which
* means it will have no effect on modifying the texture pixels.
*
* @param[in] obj The object.
* @param[in] idx Index of point to change, from 0 to 3.
* @param[in] r Red (0 - 255)
* @param[in] g Green (0 - 255)
* @param[in] b Blue (0 - 255)
* @param[in] a Alpha (0 - 255)
*
* @since 1.9
*
* @ingroup Elm_Mapbuf_Group
*/
EAPI void elm_mapbuf_point_color_set(Elm_Mapbuf *obj, int idx, int r, int g, int b, int a);
/**
* @brief The color of a point (vertex) in the mapbuf.
*
* This represents the color of the vertex in the mapbuf. Colors will be
* linearly interpolated between vertex points through the mapbuf. Color will
* multiply the "texture" pixels (like GL_MODULATE in OpenGL). The default
* color of a vertex in a mapbuf is white solid (255, 255, 255, 255) which
* means it will have no effect on modifying the texture pixels.
*
* @param[in] obj The object.
* @param[in] idx Index of point to change, from 0 to 3.
* @param[out] r Red (0 - 255)
* @param[out] g Green (0 - 255)
* @param[out] b Blue (0 - 255)
* @param[out] a Alpha (0 - 255)
*
* @since 1.9
*
* @ingroup Elm_Mapbuf_Group
*/
EAPI void elm_mapbuf_point_color_get(const Elm_Mapbuf *obj, int idx, int *r, int *g, int *b, int *a);
#endif

View File

@ -11,4 +11,4 @@
*/
EAPI Evas_Object *elm_mapbuf_add(Evas_Object *parent);
#include "elm_mapbuf.eo.legacy.h"
#include "elm_mapbuf_eo.legacy.h"

View File

@ -34,7 +34,6 @@ pub_legacy_eo_files = [
'elm_actionslider_part.eo',
'elm_bubble_part.eo',
'elm_fileselector_part.eo',
'elm_mapbuf.eo',
'elm_naviframe.eo',
'elm_naviframe_item.eo',
'elm_photo.eo',
@ -768,6 +767,8 @@ elementary_pub_headers = [
'elm_list_eo.legacy.h',
'elm_list_item_eo.h',
'elm_list_item_eo.legacy.h',
'elm_mapbuf_eo.h',
'elm_mapbuf_eo.legacy.h',
]
elementary_header_src = [