Merge branch 'master' of ssh://git.enlightenment.org/core/efl

This commit is contained in:
ChunEon Park 2014-09-03 10:57:38 +09:00
commit bf1ac534d3
23 changed files with 372 additions and 86 deletions

1
.gitignore vendored
View File

@ -65,3 +65,4 @@ tags
/config.rpath
/coverage
/src/lib/ecore_x/ecore_x_vsync
Session.vim

View File

@ -242,7 +242,7 @@ EFL_INIT
### gettext
AM_GNU_GETTEXT_VERSION([0.17])
AM_GNU_GETTEXT_VERSION([0.18])
m4_ifdef([AC_GNU_GETTEXT], [
AC_GNU_GETTEXT([external])

View File

@ -397,6 +397,7 @@ lib_evas_libevas_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \
@EVAS_CFLAGS@ \
@VALGRIND_CFLAGS@ \
@NEON_CFLAGS@ \
@ALTIVEC_CFLAGS@
# SSE3

View File

@ -2845,6 +2845,11 @@ _link_combine(void)
eina_list_move_list(&combine, (Eina_List**)&tup->data, l);
}
current_program = el->pr;
if (!el->epp->common.name)
{
ERR("A part without a name was detected.");
exit(-1);
}
_program_target_add(strdup(el->epp->common.name));
EINA_LIST_FREE(combine, ell)
{

View File

@ -38,3 +38,4 @@
/ecore_imf_example
/ecore_pipe_gstreamer_example
/ecore_getopt_example
/ecore_compose_get_example

View File

@ -26,3 +26,7 @@
/evas_3d_frustum
/evas_3d_moon_space
/evas_3d_obj
/evas_3d_cube_rotate
/evas_3d_shooter
/evas_gl
/evas_transparent

View File

@ -525,19 +525,31 @@ _impl_ecore_exe_eo_base_finalize(Eo *obj, Ecore_Exe_Data *exe)
}
Eina_Bool
_impl_ecore_exe_send(Ecore_Exe *obj,
_impl_ecore_exe_send(Ecore_Exe *obj EINA_UNUSED,
Ecore_Exe_Data *exe,
const void *data,
int size)
{
if (exe->close_stdin)
{
ERR("Ecore_Exe %p stdin is closed! Cannot send %d bytes from %p",
exe, size, data);
return EINA_FALSE;
}
void *buf;
return _impl_ecore_exe_send(obj, exe, data, size);
if (exe->child_fd_write == -1)
{
ERR("Ecore_Exe %p created without ECORE_EXE_PIPE_WRITE! "
"Cannot send %d bytes from %p", exe, size, data);
return EINA_FALSE;
}
buf = realloc(exe->write_data_buf, exe->write_data_size + size);
if (!buf) return EINA_FALSE;
exe->write_data_buf = buf;
memcpy((char *)exe->write_data_buf + exe->write_data_size, data, size);
exe->write_data_size += size;
if (exe->write_fd_handler)
ecore_main_fd_handler_active_set(exe->write_fd_handler, ECORE_FD_WRITE);
return EINA_TRUE;
}
void

View File

@ -53,13 +53,6 @@ typedef enum _Ecore_Drm_Seat_Capabilities
EVDEV_SEAT_TOUCH = (1 << 2),
} Ecore_Drm_Seat_Capabilities;
/* structure for message passing */
typedef struct _Ecore_Drm_Message
{
int opcode, size;
void *data;
} Ecore_Drm_Message;
/* structure for fb objects */
typedef struct _Ecore_Drm_Fb
{

View File

@ -217,6 +217,44 @@ typedef struct _Eolian_Value
Eolian_Value_Union value;
} Eolian_Value;
typedef enum
{
EOLIAN_BINOP_INVALID = -1,
EOLIAN_BINOP_ADD, /* + int, float */
EOLIAN_BINOP_SUB, /* - int, float */
EOLIAN_BINOP_MUL, /* * int, float */
EOLIAN_BINOP_DIV, /* / int, float */
EOLIAN_BINOP_MOD, /* % int */
EOLIAN_BINOP_EQ, /* == all types */
EOLIAN_BINOP_NQ, /* != all types */
EOLIAN_BINOP_GT, /* > int, float */
EOLIAN_BINOP_LT, /* < int, float */
EOLIAN_BINOP_GE, /* >= int, float */
EOLIAN_BINOP_LE, /* <= int, float */
EOLIAN_BINOP_AND, /* && all types */
EOLIAN_BINOP_OR, /* || all types */
EOLIAN_BINOP_BAND, /* & int */
EOLIAN_BINOP_BOR, /* | int */
EOLIAN_BINOP_BXOR, /* ^ int */
EOLIAN_BINOP_LSH, /* << int */
EOLIAN_BINOP_RSH /* >> int */
} Eolian_Binary_Operator;
typedef enum
{
EOLIAN_UNOP_INVALID = -1,
EOLIAN_UNOP_UNM, /* - sint */
EOLIAN_UNOP_UNP, /* + sint */
EOLIAN_UNOP_NOT, /* ! int, float, bool */
EOLIAN_UNOP_BNOT, /* ~ int */
} Eolian_Unary_Operator;
/*
* @brief Parse a given .eo file and fill the database.
*
@ -778,6 +816,16 @@ EAPI Eolian_Parameter_Dir eolian_parameter_direction_get(const Eolian_Function_P
*/
EAPI const Eolian_Type *eolian_parameter_type_get(const Eolian_Function_Parameter *param);
/*
* @brief Get the default value of a parameter
*
* @param[in] param_desc parameter handle
* @return the value or NULL
*
* @ingroup Eolian
*/
EAPI const Eolian_Expression *eolian_parameter_default_value_get(const Eolian_Function_Parameter *param);
/*
* @brief Get name of a parameter
*
@ -1530,6 +1578,94 @@ EAPI Eina_Stringshare *eolian_expression_value_to_literal(const Eolian_Value *v)
*/
EAPI Eina_Stringshare *eolian_expression_serialize(const Eolian_Expression *expr);
/*
* @brief Get the type of an expression.
*
* @param[in] expr the expression.
* @return the expression type.
*
* @ingroup Eolian
*/
EAPI Eolian_Expression_Type eolian_expression_type_get(const Eolian_Expression *expr);
/*
* @brief Get the binary operator of an expression.
*
* @param[in] expr the expression.
* @return the binary operator, EOLIAN_BINOP_INVALID on failure.
*
* This only works on binary expressions, otherwise it returns
* EOLIAN_BINOP_INVALID.
*
* @ingroup Eolian
*/
EAPI Eolian_Binary_Operator eolian_expression_binary_operator_get(const Eolian_Expression *expr);
/*
* @brief Get the lhs (left hand side) of a binary expression.
*
* @param[in] expr the expression.
* @return the expression or NULL.
*
* This only works on binary expressions, otherwise it returns NULL.
*
* @ingroup Eolian
*/
EAPI const Eolian_Expression *eolian_expression_binary_lhs_get(const Eolian_Expression *expr);
/*
* @brief Get the rhs (right hand side) of a binary expression.
*
* @param[in] expr the expression.
* @return the expression or NULL.
*
* This only works on binary expressions, otherwise it returns NULL.
*
* @ingroup Eolian
*/
EAPI const Eolian_Expression *eolian_expression_binary_rhs_get(const Eolian_Expression *expr);
/*
* @brief Get the unary operator of an expression.
*
* @param[in] expr the expression.
* @return the unary operator, EOLIAN_UNOP_INVALID on failure.
*
* This only works on unary expressions, otherwise it returns
* EOLIAN_UNOP_INVALID.
*
* @ingroup Eolian
*/
EAPI Eolian_Unary_Operator eolian_expression_unary_operator_get(const Eolian_Expression *expr);
/*
* @brief Get the expression of an unary expression.
*
* @param[in] expr the expression.
* @return the expression or NULL.
*
* This only works on unary expressions, otherwise it returns NULL.
*
* @ingroup Eolian
*/
EAPI const Eolian_Expression *eolian_expression_unary_expression_get(const Eolian_Expression *expr);
/*
* @brief Get the value of an expression.
*
* @param[in] expr the expression.
* @return the value.
*
* Keep in mind that this doesn't evaluate anything. That's why it only works
* on expressions that actually hold values (not unknown, not binary, not
* unary). For some types of expressions (enum, name), this stores the actual
* name (in the value.s field). Resources for this are held by the database.
* Don't attempt to free the string or anything like that.
*
* @ingroup Eolian
*/
EAPI Eolian_Value eolian_expression_value_get(const Eolian_Expression *expr);
/*
* @brief Get a global variable by name. Supports namespaces.
*

View File

@ -229,19 +229,21 @@ _expr_serialize(const Eolian_Expression *expr, Eina_Strbuf *buf, Eina_Bool outer
case EOLIAN_EXPR_DOUBLE:
case EOLIAN_EXPR_STRING:
case EOLIAN_EXPR_CHAR:
case EOLIAN_EXPR_NULL:
case EOLIAN_EXPR_BOOL:
{
Eolian_Value v = eolian_expression_eval(expr, EOLIAN_MASK_ALL);
if (!v.type)
return EINA_FALSE;
const char *x = eolian_expression_value_to_literal(&v);
Eolian_Value *v = (Eolian_Value*)&expr->type;
const char *x = eolian_expression_value_to_literal(v);
if (!x)
return EINA_FALSE;
eina_strbuf_append(buf, x);
eina_stringshare_del(x);
break;
}
case EOLIAN_EXPR_NULL:
eina_strbuf_append(buf, "null");
break;
case EOLIAN_EXPR_BOOL:
eina_strbuf_append(buf, expr->value.b ? "true" : "false");
break;
case EOLIAN_EXPR_NAME:
case EOLIAN_EXPR_ENUM:
{
@ -283,3 +285,66 @@ eolian_expression_serialize(const Eolian_Expression *expr)
eina_strbuf_free(buf);
return ret;
}
EAPI Eolian_Expression_Type
eolian_expression_type_get(const Eolian_Expression *expr)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(expr, EOLIAN_EXPR_UNKNOWN);
return expr->type;
}
EAPI Eolian_Binary_Operator
eolian_expression_binary_operator_get(const Eolian_Expression *expr)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(expr, EOLIAN_BINOP_INVALID);
EINA_SAFETY_ON_FALSE_RETURN_VAL(expr->type == EOLIAN_EXPR_BINARY,
EOLIAN_BINOP_INVALID);
return expr->binop;
}
EAPI const Eolian_Expression *
eolian_expression_binary_lhs_get(const Eolian_Expression *expr)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(expr, NULL);
EINA_SAFETY_ON_FALSE_RETURN_VAL(expr->type == EOLIAN_EXPR_BINARY, NULL);
return expr->lhs;
}
EAPI const Eolian_Expression *
eolian_expression_binary_rhs_get(const Eolian_Expression *expr)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(expr, NULL);
EINA_SAFETY_ON_FALSE_RETURN_VAL(expr->type == EOLIAN_EXPR_BINARY, NULL);
return expr->rhs;
}
EAPI Eolian_Unary_Operator
eolian_expression_unary_operator_get(const Eolian_Expression *expr)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(expr, EOLIAN_UNOP_INVALID);
EINA_SAFETY_ON_FALSE_RETURN_VAL(expr->type == EOLIAN_EXPR_UNARY,
EOLIAN_UNOP_INVALID);
return expr->unop;
}
EAPI const Eolian_Expression *
eolian_expression_unary_expression_get(const Eolian_Expression *expr)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(expr, NULL);
EINA_SAFETY_ON_FALSE_RETURN_VAL(expr->type == EOLIAN_EXPR_UNARY, NULL);
return expr->expr;
}
EAPI Eolian_Value
eolian_expression_value_get(const Eolian_Expression *expr)
{
Eolian_Value v;
v.type = EOLIAN_EXPR_UNKNOWN;
EINA_SAFETY_ON_NULL_RETURN_VAL(expr, v);
EINA_SAFETY_ON_FALSE_RETURN_VAL(expr->type != EOLIAN_EXPR_UNKNOWN
&& expr->type != EOLIAN_EXPR_BINARY
&& expr->type != EOLIAN_EXPR_UNARY, v);
v.type = expr->type;
v.value = expr->value;
return v;
}

View File

@ -4,6 +4,7 @@ static Eina_Bool
_db_fill_param(Eina_List **plist, Eo_Param_Def *param)
{
Eolian_Function_Parameter *p = database_parameter_add(param->type,
param->value,
param->name,
param->comment);
p->param_dir = param->way;

View File

@ -2,12 +2,14 @@
#include "eolian_database.h"
Eolian_Function_Parameter *
database_parameter_add(Eolian_Type *type, const char *name, const char *description)
database_parameter_add(Eolian_Type *type, Eolian_Expression *value,
const char *name, const char *description)
{
Eolian_Function_Parameter *param = NULL;
param = calloc(1, sizeof(*param));
param->name = eina_stringshare_add(name);
param->type = type;
param->value = value;
param->description = eina_stringshare_add(description);
return param;
}

View File

@ -15,6 +15,13 @@ eolian_parameter_type_get(const Eolian_Function_Parameter *param)
return param->type;
}
EAPI const Eolian_Expression *
eolian_parameter_default_value_get(const Eolian_Function_Parameter *param)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(param, NULL);
return param->value;
}
EAPI Eina_Stringshare *
eolian_parameter_name_get(const Eolian_Function_Parameter *param)
{

View File

@ -17,7 +17,10 @@ static Eina_Bool
_ef_map_cb(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED,
const Eolian_Enum_Type_Field *ef, Eina_Bool *success)
{
*success = _validate_expr(ef->value, NULL, EOLIAN_MASK_INT);
if (ef->value)
*success = _validate_expr(ef->value, NULL, EOLIAN_MASK_INT);
else
*success = EINA_TRUE;
return *success;
}

View File

@ -23,6 +23,7 @@ typedef struct _Eo_Param_Def
Eolian_Object base;
Eolian_Parameter_Dir way;
Eolian_Type *type;
Eolian_Expression *value;
Eina_Stringshare *name;
Eina_Stringshare *comment;
Eina_Bool nonull:1;

View File

@ -1124,7 +1124,7 @@ parse_return(Eo_Lexer *ls, Eina_Bool allow_void)
}
static void
parse_param(Eo_Lexer *ls, Eina_Bool allow_inout)
parse_param(Eo_Lexer *ls, Eina_Bool allow_inout, Eina_Bool is_vals)
{
Eo_Param_Def *par = calloc(1, sizeof(Eo_Param_Def));
par->base.file = eina_stringshare_ref(ls->filename);
@ -1159,6 +1159,16 @@ parse_param(Eo_Lexer *ls, Eina_Bool allow_inout)
check(ls, TOK_VALUE);
par->name = eina_stringshare_ref(ls->t.value.s);
eo_lexer_get(ls);
if ((is_vals || (par->way == EOLIAN_OUT_PARAM)) && (ls->t.token == '('))
{
int line = ls->line_number, col = ls->column;
ls->expr_mode = EINA_TRUE;
eo_lexer_get(ls);
par->value = parse_expr(ls);
ls->expr_mode = EINA_FALSE;
pop_expr(ls);
check_match(ls, ')', '(', line, col);
}
if (ls->t.kw == KW_at_nonull)
{
par->nonull = EINA_TRUE;
@ -1278,11 +1288,11 @@ end:
}
static void
parse_params(Eo_Lexer *ls, Eina_Bool allow_inout)
parse_params(Eo_Lexer *ls, Eina_Bool allow_inout, Eina_Bool is_vals)
{
PARSE_SECTION
{
parse_param(ls, allow_inout);
parse_param(ls, allow_inout, is_vals);
ls->tmp.params = eina_list_append(ls->tmp.params, ls->tmp.param);
ls->tmp.param = NULL;
}
@ -1347,13 +1357,13 @@ body:
break;
case KW_keys:
CASE_LOCK(ls, keys, "keys definition")
parse_params(ls, EINA_FALSE);
parse_params(ls, EINA_FALSE, EINA_FALSE);
prop->keys = ls->tmp.params;
ls->tmp.params = NULL;
break;
case KW_values:
CASE_LOCK(ls, values, "values definition")
parse_params(ls, EINA_FALSE);
parse_params(ls, EINA_FALSE, EINA_TRUE);
prop->values = ls->tmp.params;
ls->tmp.params = NULL;
break;
@ -1454,7 +1464,7 @@ body:
break;
case KW_params:
CASE_LOCK(ls, params, "params definition")
parse_params(ls, EINA_TRUE);
parse_params(ls, EINA_TRUE, EINA_FALSE);
meth->params = ls->tmp.params;
ls->tmp.params = NULL;
break;

View File

@ -118,6 +118,7 @@ struct _Eolian_Function_Parameter
Eolian_Object base;
Eina_Stringshare *name;
Eolian_Type *type;
Eolian_Expression *value;
Eina_Stringshare *description;
Eolian_Parameter_Dir param_dir;
Eina_Bool is_const_on_get :1; /* True if const in this the get property */
@ -200,44 +201,6 @@ struct _Eolian_Enum_Type_Field
Eina_Stringshare *comment;
};
typedef enum
{
EOLIAN_BINOP_INVALID = -1,
EOLIAN_BINOP_ADD, /* + int, float */
EOLIAN_BINOP_SUB, /* - int, float */
EOLIAN_BINOP_MUL, /* * int, float */
EOLIAN_BINOP_DIV, /* / int, float */
EOLIAN_BINOP_MOD, /* % int */
EOLIAN_BINOP_EQ, /* == all types */
EOLIAN_BINOP_NQ, /* != all types */
EOLIAN_BINOP_GT, /* > int, float */
EOLIAN_BINOP_LT, /* < int, float */
EOLIAN_BINOP_GE, /* >= int, float */
EOLIAN_BINOP_LE, /* <= int, float */
EOLIAN_BINOP_AND, /* && all types */
EOLIAN_BINOP_OR, /* || all types */
EOLIAN_BINOP_BAND, /* & int */
EOLIAN_BINOP_BOR, /* | int */
EOLIAN_BINOP_BXOR, /* ^ int */
EOLIAN_BINOP_LSH, /* << int */
EOLIAN_BINOP_RSH /* >> int */
} Eolian_Binary_Operator;
typedef enum
{
EOLIAN_UNOP_INVALID = -1,
EOLIAN_UNOP_UNM, /* - sint */
EOLIAN_UNOP_UNP, /* + sint */
EOLIAN_UNOP_NOT, /* ! int, float, bool */
EOLIAN_UNOP_BNOT, /* ~ int */
} Eolian_Unary_Operator;
struct _Eolian_Expression
{
Eolian_Object base;
@ -313,7 +276,7 @@ void database_function_del(Eolian_Function *fid);
/* func parameters */
Eolian_Function_Parameter *database_parameter_add(Eolian_Type *type, const char *name, const char *description);
Eolian_Function_Parameter *database_parameter_add(Eolian_Type *type, Eolian_Expression *value, const char *name, const char *description);
void database_parameter_del(Eolian_Function_Parameter *pdesc);
/* implements */

View File

@ -10,6 +10,7 @@ EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_OBJECT_FOCUS_IN;
EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_OBJECT_FOCUS_OUT;
EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_PRE;
EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_POST;
EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_DEVICE_CHANGED;
// Callbacks events for use with Evas canvases
#define EVAS_CANVAS_EVENT_FOCUS_IN (&(_EVAS_CANVAS_EVENT_FOCUS_IN))
@ -20,6 +21,7 @@ EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_POST;
#define EVAS_CANVAS_EVENT_OBJECT_FOCUS_OUT (&(_EVAS_CANVAS_EVENT_OBJECT_FOCUS_OUT))
#define EVAS_CANVAS_EVENT_RENDER_PRE (&(_EVAS_CANVAS_EVENT_RENDER_PRE))
#define EVAS_CANVAS_EVENT_RENDER_POST (&(_EVAS_CANVAS_EVENT_RENDER_POST))
#define EVAS_CANVAS_EVENT_DEVICE_CHANGED (&(_EVAS_CANVAS_EVENT_DEVICE_CHANGED))
#include "canvas/evas_signal_interface.eo.h"
#include "canvas/evas_draggable_interface.eo.h"

View File

@ -25,6 +25,9 @@ EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_OBJECT_FOCUS_IN =
EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_OBJECT_FOCUS_OUT =
EO_HOT_EVENT_DESCRIPTION("Canvas Object Focus Out", "Canvas object lost focus");
EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_DEVICE_CHANGED =
EO_HOT_EVENT_DESCRIPTION("Device changed",
"Devices added, removed or changed to the canvas");
/**
* Evas events descriptions for Eo.
*/
@ -63,7 +66,7 @@ static const Eo_Event_Description *_legacy_evas_callback_table[EVAS_CALLBACK_LAS
EVAS_CANVAS_EVENT_RENDER_PRE,
EVAS_CANVAS_EVENT_RENDER_POST,
EVAS_OBJECT_EVENT_IMAGE_RESIZE,
NULL
EVAS_CANVAS_EVENT_DEVICE_CHANGED
};
typedef struct

View File

@ -4375,7 +4375,7 @@ _layout_ellipsis_item_new(Ctxt *c, const Evas_Object_Textblock_Item *cur_it)
static inline void
_layout_handle_ellipsis(Ctxt *c, Evas_Object_Textblock_Item *it, Eina_List *i)
{
Evas_Object_Textblock_Text_Item *ellip_ti;
Evas_Object_Textblock_Text_Item *ti, *ellip_ti;
Evas_Object_Textblock_Item *last_it;
Evas_Coord save_cx;
int wrap;
@ -4385,26 +4385,72 @@ _layout_handle_ellipsis(Ctxt *c, Evas_Object_Textblock_Item *it, Eina_List *i)
save_cx = c->x;
c->w -= ellip_ti->parent.w;
if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
/* If there is no enough space for ellipsis item, remove all of items */
if (c->w <= 0)
{
Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it);
wrap = _layout_text_cutoff_get(c, last_it->format, ti);
if ((wrap > 0) && !IS_AT_END(ti, (size_t) wrap))
{
_layout_item_text_split_strip_white(c, ti, i, wrap);
}
else if ((wrap == 0) && (c->ln->items))
while (c->ln->items)
{
last_it = _ITEM(EINA_INLIST_GET(c->ln->items)->last);
c->ln->items = _ITEM(eina_inlist_remove(
EINA_INLIST_GET(c->ln->items),
EINA_INLIST_GET(last_it)));
}
}
else if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT)
{
/* We don't want to add this format item. */
last_it = NULL;
}
while (last_it)
{
if (last_it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
{
ti = _ITEM_TEXT(last_it);
wrap = _layout_text_cutoff_get(c, last_it->format, ti);
if ((wrap > 0) && !IS_AT_END(ti, (size_t) wrap))
{
_layout_item_text_split_strip_white(c, ti, i, wrap);
break;
}
else if (wrap < 0)
{
break;
}
}
else
{
/* We will ignore format items. ex) tab
* But, if there is <item> tag and size is acceptable, we have to insert it to line. */
if (!strncmp(_ITEM_FORMAT(last_it)->item, "item", 4) &&
((c->w - c->o->style_pad.l - c->o->style_pad.r - c->marginl - c->marginr) >= (c->x + last_it->adv)))
{
break;
}
}
if (c->ln->items && last_it != it)
{
c->ln->items = _ITEM(eina_inlist_remove(
EINA_INLIST_GET(c->ln->items),
EINA_INLIST_GET(last_it)));
}
last_it = (c->ln->items) ? _ITEM(EINA_INLIST_GET(c->ln->items)->last) : NULL;
if (last_it)
{
/* We need to renew ellipsis item.
* Because, base format is changed to last_it.
* We can't reuse it. */
c->w += ellip_ti->parent.w;
ellip_ti = _layout_ellipsis_item_new(c, last_it);
c->w -= ellip_ti->parent.w;
c->x -= last_it->adv;
if (c->x < 0)
c->x = 0;
save_cx = c->x;
}
}
c->x = save_cx;
c->w += ellip_ti->parent.w;
/* If we should add this item, do it */

View File

@ -13,7 +13,7 @@ class Class_Simple {
get {
}
values {
int value; /*@ Value description */
int value (100); /*@ Value description */
}
}
b {
@ -28,7 +28,7 @@ class Class_Simple {
params {
@in int a; /*@ a */
@inout char b;
@out double c;
@out double c (1337.6);
}
return: char * (null); /*@ comment for method return */
}

View File

@ -501,6 +501,11 @@ START_TEST(eolian_simple_parsing)
fail_if(strcmp(eolian_type_name_get(eolian_parameter_type_get(param)), "int"));
fail_if(strcmp(eolian_parameter_name_get(param), "value"));
fail_if(strcmp(eolian_parameter_description_get(param), "Value description"));
expr = eolian_parameter_default_value_get(param);
fail_if(!expr);
v = eolian_expression_eval(expr, EOLIAN_MASK_INT);
fail_if(v.type != EOLIAN_EXPR_INT);
fail_if(v.value.i != 100);
/* legacy only */
fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROPERTY)));
@ -546,6 +551,11 @@ START_TEST(eolian_simple_parsing)
fail_if(strcmp(eolian_type_name_get(eolian_parameter_type_get(param)), "double"));
fail_if(strcmp(eolian_parameter_name_get(param), "c"));
fail_if(eolian_parameter_description_get(param));
expr = eolian_parameter_default_value_get(param);
fail_if(!expr);
v = eolian_expression_eval(expr, EOLIAN_MASK_FLOAT);
fail_if(v.type != EOLIAN_EXPR_DOUBLE);
fail_if(v.value.d != 1337.6);
fail_if(eina_iterator_next(iter, &dummy));
eina_iterator_free(iter);

View File

@ -1763,6 +1763,26 @@ START_TEST(evas_textblock_wrapping)
evas_object_textblock_size_formatted_get(tb, &w, &h);
ck_assert_int_le(w, (nw / 2));
evas_object_textblock_text_markup_set(tb, "a<b>b</b>a<b>b</b>a<b>b</b>");
evas_textblock_cursor_format_prepend(cur, "+ font_size=50 ellipsis=1.0");
evas_object_textblock_size_native_get(tb, &nw, &nh);
evas_object_resize(tb, nw / 2, nh * 2);
evas_object_textblock_size_formatted_get(tb, &w, &h);
ck_assert_int_le(w, (nw / 2));
evas_object_textblock_text_markup_set(tb, "<item absize=100x100 href=item1></item><item absize=100x100 href=item2></item>");
evas_textblock_cursor_format_prepend(cur, "+ ellipsis=1.0");
evas_object_resize(tb, 101, 100);
evas_object_textblock_size_formatted_get(tb, &w, &h);
ck_assert_int_le(w, 100);
evas_object_textblock_text_markup_set(tb, "ab");
evas_textblock_cursor_format_prepend(cur, "+ ellipsis=1.0");
evas_object_textblock_size_native_get(tb, &nw, &nh);
evas_object_resize(tb, nw / 2, nh * 2);
evas_object_textblock_size_formatted_get(tb, &w, &h);
ck_assert_int_le(w, ellip_w);
{
double ellip;
for(ellip = 0.0; ellip <= 1.0; ellip = ellip + 0.1)