forked from enlightenment/efl
Evas: Revert "Evas: tabs --> spaces"
Lets wait until after the code freeze is over and people apply their patches, otherwise it'll be hellish. This reverts commit 75632 SVN revision: 75704
This commit is contained in:
parent
6e08ab829e
commit
77997affda
|
@ -39,27 +39,27 @@ struct _Evas_Object_Grid_Accessor
|
|||
const Evas_Object *grid;
|
||||
};
|
||||
|
||||
#define EVAS_OBJECT_GRID_DATA_GET(o, ptr) \
|
||||
#define EVAS_OBJECT_GRID_DATA_GET(o, ptr) \
|
||||
Evas_Object_Grid_Data *ptr = evas_object_smart_data_get(o)
|
||||
|
||||
#define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, ptr) \
|
||||
EVAS_OBJECT_GRID_DATA_GET(o, ptr); \
|
||||
if (!ptr) \
|
||||
{ \
|
||||
CRIT("no widget data for object %p (%s)", \
|
||||
o, evas_object_type_get(o)); \
|
||||
abort(); \
|
||||
return; \
|
||||
#define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, ptr) \
|
||||
EVAS_OBJECT_GRID_DATA_GET(o, ptr); \
|
||||
if (!ptr) \
|
||||
{ \
|
||||
CRIT("no widget data for object %p (%s)", \
|
||||
o, evas_object_type_get(o)); \
|
||||
abort(); \
|
||||
return; \
|
||||
}
|
||||
|
||||
#define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
|
||||
EVAS_OBJECT_GRID_DATA_GET(o, ptr); \
|
||||
if (!ptr) \
|
||||
{ \
|
||||
CRIT("No widget data for object %p (%s)", \
|
||||
o, evas_object_type_get(o)); \
|
||||
abort(); \
|
||||
return val; \
|
||||
#define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
|
||||
EVAS_OBJECT_GRID_DATA_GET(o, ptr); \
|
||||
if (!ptr) \
|
||||
{ \
|
||||
CRIT("No widget data for object %p (%s)", \
|
||||
o, evas_object_type_get(o)); \
|
||||
abort(); \
|
||||
return val; \
|
||||
}
|
||||
|
||||
static const char EVAS_OBJECT_GRID_OPTION_KEY[] = "|EvGd";
|
||||
|
@ -152,8 +152,8 @@ _evas_object_grid_child_disconnect(Evas_Object *o, Evas_Object *child)
|
|||
}
|
||||
|
||||
EVAS_SMART_SUBCLASS_NEW("Evas_Object_Grid", _evas_object_grid,
|
||||
Evas_Smart_Class, Evas_Smart_Class,
|
||||
evas_object_smart_clipped_class_get, NULL)
|
||||
Evas_Smart_Class, Evas_Smart_Class,
|
||||
evas_object_smart_clipped_class_get, NULL)
|
||||
|
||||
static void
|
||||
_evas_object_grid_smart_add(Evas_Object *o)
|
||||
|
@ -175,11 +175,11 @@ _evas_object_grid_smart_del(Evas_Object *o)
|
|||
l = priv->children;
|
||||
while (l)
|
||||
{
|
||||
Evas_Object_Grid_Option *opt = l->data;
|
||||
_evas_object_grid_child_disconnect(o, opt->obj);
|
||||
_evas_object_grid_option_del(opt->obj);
|
||||
free(opt);
|
||||
l = eina_list_remove_list(l, l);
|
||||
Evas_Object_Grid_Option *opt = l->data;
|
||||
_evas_object_grid_child_disconnect(o, opt->obj);
|
||||
_evas_object_grid_option_del(opt->obj);
|
||||
free(opt);
|
||||
l = eina_list_remove_list(l, l);
|
||||
}
|
||||
_evas_object_grid_parent_sc->del(o);
|
||||
}
|
||||
|
@ -328,15 +328,15 @@ evas_object_grid_unpack(Evas_Object *o, Evas_Object *child)
|
|||
|
||||
if (o != evas_object_smart_parent_get(child))
|
||||
{
|
||||
ERR("cannot unpack child from incorrect grid!");
|
||||
return EINA_FALSE;
|
||||
ERR("cannot unpack child from incorrect grid!");
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
opt = _evas_object_grid_option_del(child);
|
||||
if (!opt)
|
||||
{
|
||||
ERR("cannot unpack child with no packing option!");
|
||||
return EINA_FALSE;
|
||||
ERR("cannot unpack child with no packing option!");
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
_evas_object_grid_child_disconnect(o, child);
|
||||
|
@ -355,12 +355,12 @@ evas_object_grid_clear(Evas_Object *o, Eina_Bool clear)
|
|||
|
||||
EINA_LIST_FREE(priv->children, opt)
|
||||
{
|
||||
_evas_object_grid_child_disconnect(o, opt->obj);
|
||||
_evas_object_grid_option_del(opt->obj);
|
||||
evas_object_smart_member_del(opt->obj);
|
||||
if (clear)
|
||||
evas_object_del(opt->obj);
|
||||
free(opt);
|
||||
_evas_object_grid_child_disconnect(o, opt->obj);
|
||||
_evas_object_grid_option_del(opt->obj);
|
||||
evas_object_smart_member_del(opt->obj);
|
||||
if (clear)
|
||||
evas_object_del(opt->obj);
|
||||
free(opt);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -178,10 +178,10 @@ evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj)
|
|||
obj->cur.geometry.y,
|
||||
obj->cur.geometry.w,
|
||||
obj->cur.geometry.h,
|
||||
//// rl = evas_rects_return_difference_rects(obj->cur.cache.geometry.x,
|
||||
//// obj->cur.cache.geometry.y,
|
||||
//// obj->cur.cache.geometry.w,
|
||||
//// obj->cur.cache.geometry.h,
|
||||
//// rl = evas_rects_return_difference_rects(obj->cur.cache.geometry.x,
|
||||
//// obj->cur.cache.geometry.y,
|
||||
//// obj->cur.cache.geometry.w,
|
||||
//// obj->cur.cache.geometry.h,
|
||||
obj->cur.clipper->cur.cache.clip.x,
|
||||
obj->cur.clipper->cur.cache.clip.y,
|
||||
obj->cur.clipper->cur.cache.clip.w,
|
||||
|
@ -194,10 +194,10 @@ evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj)
|
|||
obj->prev.geometry.y,
|
||||
obj->prev.geometry.w,
|
||||
obj->prev.geometry.h,
|
||||
//// rl = evas_rects_return_difference_rects(obj->prev.cache.geometry.x,
|
||||
//// obj->prev.cache.geometry.y,
|
||||
//// obj->prev.cache.geometry.w,
|
||||
//// obj->prev.cache.geometry.h,
|
||||
//// rl = evas_rects_return_difference_rects(obj->prev.cache.geometry.x,
|
||||
//// obj->prev.cache.geometry.y,
|
||||
//// obj->prev.cache.geometry.w,
|
||||
//// obj->prev.cache.geometry.h,
|
||||
obj->prev.clipper->prev.cache.clip.x,
|
||||
obj->prev.clipper->prev.cache.clip.y,
|
||||
obj->prev.clipper->prev.cache.clip.w,
|
||||
|
@ -224,19 +224,19 @@ evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj)
|
|||
obj->cur.geometry.y,
|
||||
obj->cur.geometry.w,
|
||||
obj->cur.geometry.h);
|
||||
//// obj->cur.cache.geometry.x,
|
||||
//// obj->cur.cache.geometry.y,
|
||||
//// obj->cur.cache.geometry.w,
|
||||
//// obj->cur.cache.geometry.h);
|
||||
//// obj->cur.cache.geometry.x,
|
||||
//// obj->cur.cache.geometry.y,
|
||||
//// obj->cur.cache.geometry.w,
|
||||
//// obj->cur.cache.geometry.h);
|
||||
evas_add_rect(rects,
|
||||
obj->prev.geometry.x,
|
||||
obj->prev.geometry.y,
|
||||
obj->prev.geometry.w,
|
||||
obj->prev.geometry.h);
|
||||
//// obj->prev.cache.geometry.x,
|
||||
//// obj->prev.cache.geometry.y,
|
||||
//// obj->prev.cache.geometry.w,
|
||||
//// obj->prev.cache.geometry.h);
|
||||
//// obj->prev.cache.geometry.x,
|
||||
//// obj->prev.cache.geometry.y,
|
||||
//// obj->prev.cache.geometry.w,
|
||||
//// obj->prev.cache.geometry.h);
|
||||
*/
|
||||
}
|
||||
|
||||
|
@ -565,7 +565,7 @@ evas_object_update_bounding_box(Evas_Object *obj)
|
|||
computeminmax = EINA_TRUE;
|
||||
}
|
||||
|
||||
if (computeminmax)
|
||||
if (computeminmax)
|
||||
{
|
||||
evas_object_smart_need_bounding_box_update(obj->smart.parent);
|
||||
}
|
||||
|
|
|
@ -142,26 +142,26 @@ evas_object_rectangle_render(Evas_Object *obj, void *output, void *context, void
|
|||
{
|
||||
/* render object to surface with context, and offxet by x,y */
|
||||
obj->layer->evas->engine.func->context_color_set(output,
|
||||
context,
|
||||
obj->cur.cache.clip.r,
|
||||
obj->cur.cache.clip.g,
|
||||
obj->cur.cache.clip.b,
|
||||
obj->cur.cache.clip.a);
|
||||
context,
|
||||
obj->cur.cache.clip.r,
|
||||
obj->cur.cache.clip.g,
|
||||
obj->cur.cache.clip.b,
|
||||
obj->cur.cache.clip.a);
|
||||
obj->layer->evas->engine.func->context_multiplier_unset(output,
|
||||
context);
|
||||
context);
|
||||
obj->layer->evas->engine.func->context_render_op_set(output, context,
|
||||
obj->cur.render_op);
|
||||
obj->cur.render_op);
|
||||
obj->layer->evas->engine.func->rectangle_draw(output,
|
||||
context,
|
||||
surface,
|
||||
obj->cur.geometry.x + x,
|
||||
obj->cur.geometry.y + y,
|
||||
obj->cur.geometry.w,
|
||||
obj->cur.geometry.h);
|
||||
//// obj->cur.cache.geometry.x + x,
|
||||
//// obj->cur.cache.geometry.y + y,
|
||||
//// obj->cur.cache.geometry.w,
|
||||
//// obj->cur.cache.geometry.h);
|
||||
context,
|
||||
surface,
|
||||
obj->cur.geometry.x + x,
|
||||
obj->cur.geometry.y + y,
|
||||
obj->cur.geometry.w,
|
||||
obj->cur.geometry.h);
|
||||
//// obj->cur.cache.geometry.x + x,
|
||||
//// obj->cur.cache.geometry.y + y,
|
||||
//// obj->cur.cache.geometry.w,
|
||||
//// obj->cur.cache.geometry.h);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -180,9 +180,9 @@ evas_object_rectangle_render_pre(Evas_Object *obj)
|
|||
/* if someone is clipping this obj - go calculate the clipper */
|
||||
if (obj->cur.clipper)
|
||||
{
|
||||
if (obj->cur.cache.clip.dirty)
|
||||
evas_object_clip_recalc(obj->cur.clipper);
|
||||
obj->cur.clipper->func->render_pre(obj->cur.clipper);
|
||||
if (obj->cur.cache.clip.dirty)
|
||||
evas_object_clip_recalc(obj->cur.clipper);
|
||||
obj->cur.clipper->func->render_pre(obj->cur.clipper);
|
||||
}
|
||||
/* now figure what changed and add draw rects */
|
||||
/* if it just became visible or invisible */
|
||||
|
@ -191,8 +191,8 @@ evas_object_rectangle_render_pre(Evas_Object *obj)
|
|||
if (!(is_v | was_v)) goto done;
|
||||
if (is_v != was_v)
|
||||
{
|
||||
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
|
||||
goto done;
|
||||
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
|
||||
goto done;
|
||||
}
|
||||
if (obj->changed_map)
|
||||
{
|
||||
|
@ -207,14 +207,14 @@ evas_object_rectangle_render_pre(Evas_Object *obj)
|
|||
/* if we restacked (layer or just within a layer) and don't clip anyone */
|
||||
if ((obj->restack) && (!obj->clip.clipees))
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
}
|
||||
/* if it changed render op */
|
||||
if (obj->cur.render_op != obj->prev.render_op)
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
}
|
||||
/* if it changed color */
|
||||
if ((obj->cur.color.r != obj->prev.color.r) ||
|
||||
|
@ -222,8 +222,8 @@ evas_object_rectangle_render_pre(Evas_Object *obj)
|
|||
(obj->cur.color.b != obj->prev.color.b) ||
|
||||
(obj->cur.color.a != obj->prev.color.a))
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
}
|
||||
/* if it changed geometry - and obviously not visibility or color */
|
||||
/* calculate differences since we have a constant color fill */
|
||||
|
@ -233,24 +233,24 @@ evas_object_rectangle_render_pre(Evas_Object *obj)
|
|||
(obj->cur.geometry.w != obj->prev.geometry.w) ||
|
||||
(obj->cur.geometry.h != obj->prev.geometry.h))
|
||||
{
|
||||
evas_rects_return_difference_rects(&obj->layer->evas->clip_changes,
|
||||
obj->cur.geometry.x,
|
||||
obj->cur.geometry.y,
|
||||
obj->cur.geometry.w,
|
||||
obj->cur.geometry.h,
|
||||
obj->prev.geometry.x,
|
||||
obj->prev.geometry.y,
|
||||
obj->prev.geometry.w,
|
||||
obj->prev.geometry.h);
|
||||
//// rl = evas_rects_return_difference_rects(obj->cur.cache.geometry.x,
|
||||
//// obj->cur.cache.geometry.y,
|
||||
//// obj->cur.cache.geometry.w,
|
||||
//// obj->cur.cache.geometry.h,
|
||||
//// obj->prev.cache.geometry.x,
|
||||
//// obj->prev.cache.geometry.y,
|
||||
//// obj->prev.cache.geometry.w,
|
||||
//// obj->prev.cache.geometry.h);
|
||||
goto done;
|
||||
evas_rects_return_difference_rects(&obj->layer->evas->clip_changes,
|
||||
obj->cur.geometry.x,
|
||||
obj->cur.geometry.y,
|
||||
obj->cur.geometry.w,
|
||||
obj->cur.geometry.h,
|
||||
obj->prev.geometry.x,
|
||||
obj->prev.geometry.y,
|
||||
obj->prev.geometry.w,
|
||||
obj->prev.geometry.h);
|
||||
//// rl = evas_rects_return_difference_rects(obj->cur.cache.geometry.x,
|
||||
//// obj->cur.cache.geometry.y,
|
||||
//// obj->cur.cache.geometry.w,
|
||||
//// obj->cur.cache.geometry.h,
|
||||
//// obj->prev.cache.geometry.x,
|
||||
//// obj->prev.cache.geometry.y,
|
||||
//// obj->prev.cache.geometry.w,
|
||||
//// obj->prev.cache.geometry.h);
|
||||
goto done;
|
||||
}
|
||||
/* it obviously didn't change - add a NO obscure - this "unupdates" this */
|
||||
/* area so if there were updates for it they get wiped. don't do it if we */
|
||||
|
@ -260,10 +260,10 @@ evas_object_rectangle_render_pre(Evas_Object *obj)
|
|||
evas_object_is_opaque(obj) &&
|
||||
(!obj->clip.clipees))
|
||||
obj->layer->evas->engine.func->output_redraws_rect_del(obj->layer->evas->engine.data.output,
|
||||
obj->cur.cache.clip.x,
|
||||
obj->cur.cache.clip.y,
|
||||
obj->cur.cache.clip.w,
|
||||
obj->cur.cache.clip.h);
|
||||
obj->cur.cache.clip.x,
|
||||
obj->cur.cache.clip.y,
|
||||
obj->cur.cache.clip.w,
|
||||
obj->cur.cache.clip.h);
|
||||
*/
|
||||
done:
|
||||
evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v);
|
||||
|
@ -289,9 +289,9 @@ evas_object_rectangle_is_opaque(Evas_Object *obj)
|
|||
/* currently fully opaque over the entire rectangle it occupies */
|
||||
if ((obj->cur.map) && (obj->cur.usemap)) return 0;
|
||||
if (obj->cur.render_op == EVAS_RENDER_COPY)
|
||||
return 1;
|
||||
return 1;
|
||||
if (obj->cur.render_op != EVAS_RENDER_BLEND)
|
||||
return 0;
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -301,9 +301,9 @@ evas_object_rectangle_was_opaque(Evas_Object *obj)
|
|||
/* this returns 1 if the internal object data implies that the object was */
|
||||
/* previously fully opaque over the entire rectangle it occupies */
|
||||
if (obj->prev.render_op == EVAS_RENDER_COPY)
|
||||
return 1;
|
||||
return 1;
|
||||
if (obj->prev.render_op != EVAS_RENDER_BLEND)
|
||||
return 0;
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ struct _Evas_Object_Text
|
|||
const char *source;
|
||||
Evas_Font_Size size;
|
||||
struct {
|
||||
unsigned char r, g, b, a;
|
||||
unsigned char r, g, b, a;
|
||||
} outline, shadow, glow, glow2;
|
||||
|
||||
unsigned char style;
|
||||
|
@ -609,8 +609,8 @@ evas_object_text_text_set(Evas_Object *obj, const char *_text)
|
|||
|
||||
if (!text) text = eina_unicode_strdup(EINA_UNICODE_EMPTY_STRING);
|
||||
was = evas_object_is_in_output_rect(obj,
|
||||
obj->layer->evas->pointer.x,
|
||||
obj->layer->evas->pointer.y, 1, 1);
|
||||
obj->layer->evas->pointer.x,
|
||||
obj->layer->evas->pointer.y, 1, 1);
|
||||
/* DO II */
|
||||
/*Update bidi_props*/
|
||||
|
||||
|
@ -619,12 +619,12 @@ evas_object_text_text_set(Evas_Object *obj, const char *_text)
|
|||
if ((text) && (*text))
|
||||
{
|
||||
_evas_object_text_layout(obj, o, text);
|
||||
eina_stringshare_replace(&o->cur.utf8_text, _text);
|
||||
eina_stringshare_replace(&o->cur.utf8_text, _text);
|
||||
o->prev.utf8_text = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
eina_stringshare_replace(&o->cur.utf8_text, NULL);
|
||||
eina_stringshare_replace(&o->cur.utf8_text, NULL);
|
||||
}
|
||||
if (text)
|
||||
{
|
||||
|
@ -637,14 +637,14 @@ evas_object_text_text_set(Evas_Object *obj, const char *_text)
|
|||
evas_object_clip_dirty(obj);
|
||||
evas_object_coords_recalc(obj);
|
||||
is = evas_object_is_in_output_rect(obj,
|
||||
obj->layer->evas->pointer.x,
|
||||
obj->layer->evas->pointer.y, 1, 1);
|
||||
obj->layer->evas->pointer.x,
|
||||
obj->layer->evas->pointer.y, 1, 1);
|
||||
if ((is || was) && obj->cur.visible)
|
||||
evas_event_feed_mouse_move(obj->layer->evas,
|
||||
obj->layer->evas->pointer.x,
|
||||
obj->layer->evas->pointer.y,
|
||||
obj->layer->evas->last_timestamp,
|
||||
NULL);
|
||||
obj->layer->evas->pointer.x,
|
||||
obj->layer->evas->pointer.y,
|
||||
obj->layer->evas->last_timestamp,
|
||||
NULL);
|
||||
evas_object_inform_call_resize(obj);
|
||||
if (text) free(text);
|
||||
}
|
||||
|
@ -850,15 +850,15 @@ evas_object_text_char_pos_get(const Evas_Object *obj, int pos, Evas_Coord *cx, E
|
|||
x -= l;
|
||||
if (x < 0)
|
||||
{
|
||||
w += x;
|
||||
x = 0;
|
||||
w += x;
|
||||
x = 0;
|
||||
}
|
||||
if ((x + w) > obj->cur.geometry.w) w = obj->cur.geometry.w - x;
|
||||
if (w < 0) w = 0;
|
||||
if (y < 0)
|
||||
{
|
||||
h += y;
|
||||
y = 0;
|
||||
h += y;
|
||||
y = 0;
|
||||
}
|
||||
if ((y + h) > obj->cur.geometry.h) h = obj->cur.geometry.h - y;
|
||||
if (h < 0) h = 0;
|
||||
|
@ -910,15 +910,15 @@ evas_object_text_char_coords_get(const Evas_Object *obj, Evas_Coord x, Evas_Coor
|
|||
rx -= l;
|
||||
if (rx < 0)
|
||||
{
|
||||
rw += rx;
|
||||
rx = 0;
|
||||
rw += rx;
|
||||
rx = 0;
|
||||
}
|
||||
if ((rx + rw) > obj->cur.geometry.w) rw = obj->cur.geometry.w - rx;
|
||||
if (rw < 0) rw = 0;
|
||||
if (ry < 0)
|
||||
{
|
||||
rh += ry;
|
||||
ry = 0;
|
||||
rh += ry;
|
||||
ry = 0;
|
||||
}
|
||||
if ((ry + rh) > obj->cur.geometry.h) rh = obj->cur.geometry.h - ry;
|
||||
if (rh < 0) rh = 0;
|
||||
|
@ -1431,11 +1431,11 @@ evas_object_text_render(Evas_Object *obj, void *output, void *context, void *sur
|
|||
Evas_Object_Text_Item *it;
|
||||
const char vals[5][5] =
|
||||
{
|
||||
{0, 1, 2, 1, 0},
|
||||
{1, 3, 4, 3, 1},
|
||||
{2, 4, 5, 4, 2},
|
||||
{1, 3, 4, 3, 1},
|
||||
{0, 1, 2, 1, 0}
|
||||
{0, 1, 2, 1, 0},
|
||||
{1, 3, 4, 3, 1},
|
||||
{2, 4, 5, 4, 2},
|
||||
{1, 3, 4, 3, 1},
|
||||
{0, 1, 2, 1, 0}
|
||||
};
|
||||
int sl = 0, st = 0;
|
||||
int shad_dst, shad_sz, dx, dy, haveshad;
|
||||
|
@ -1464,55 +1464,55 @@ evas_object_text_render(Evas_Object *obj, void *output, void *context, void *sur
|
|||
obj->cur.geometry.h);
|
||||
*/
|
||||
#define COLOR_ONLY_SET(object, sub, col) \
|
||||
ENFN->context_color_set(output, context, \
|
||||
object->sub.col.r, \
|
||||
object->sub.col.g, \
|
||||
object->sub.col.b, \
|
||||
object->sub.col.a);
|
||||
ENFN->context_color_set(output, context, \
|
||||
object->sub.col.r, \
|
||||
object->sub.col.g, \
|
||||
object->sub.col.b, \
|
||||
object->sub.col.a);
|
||||
|
||||
#define COLOR_SET(object, sub, col) \
|
||||
if (obj->cur.clipper)\
|
||||
ENFN->context_color_set(output, context, \
|
||||
((int)object->sub.col.r * ((int)obj->cur.clipper->cur.cache.clip.r + 1)) >> 8, \
|
||||
((int)object->sub.col.g * ((int)obj->cur.clipper->cur.cache.clip.g + 1)) >> 8, \
|
||||
((int)object->sub.col.b * ((int)obj->cur.clipper->cur.cache.clip.b + 1)) >> 8, \
|
||||
((int)object->sub.col.a * ((int)obj->cur.clipper->cur.cache.clip.a + 1)) >> 8); \
|
||||
ENFN->context_color_set(output, context, \
|
||||
((int)object->sub.col.r * ((int)obj->cur.clipper->cur.cache.clip.r + 1)) >> 8, \
|
||||
((int)object->sub.col.g * ((int)obj->cur.clipper->cur.cache.clip.g + 1)) >> 8, \
|
||||
((int)object->sub.col.b * ((int)obj->cur.clipper->cur.cache.clip.b + 1)) >> 8, \
|
||||
((int)object->sub.col.a * ((int)obj->cur.clipper->cur.cache.clip.a + 1)) >> 8); \
|
||||
else\
|
||||
ENFN->context_color_set(output, context, \
|
||||
object->sub.col.r, \
|
||||
object->sub.col.g, \
|
||||
object->sub.col.b, \
|
||||
object->sub.col.a);
|
||||
ENFN->context_color_set(output, context, \
|
||||
object->sub.col.r, \
|
||||
object->sub.col.g, \
|
||||
object->sub.col.b, \
|
||||
object->sub.col.a);
|
||||
|
||||
#define COLOR_SET_AMUL(object, sub, col, amul) \
|
||||
if (obj->cur.clipper) \
|
||||
ENFN->context_color_set(output, context, \
|
||||
(((int)object->sub.col.r) * ((int)obj->cur.clipper->cur.cache.clip.r) * (amul)) / 65025, \
|
||||
(((int)object->sub.col.g) * ((int)obj->cur.clipper->cur.cache.clip.g) * (amul)) / 65025, \
|
||||
(((int)object->sub.col.b) * ((int)obj->cur.clipper->cur.cache.clip.b) * (amul)) / 65025, \
|
||||
(((int)object->sub.col.a) * ((int)obj->cur.clipper->cur.cache.clip.a) * (amul)) / 65025); \
|
||||
ENFN->context_color_set(output, context, \
|
||||
(((int)object->sub.col.r) * ((int)obj->cur.clipper->cur.cache.clip.r) * (amul)) / 65025, \
|
||||
(((int)object->sub.col.g) * ((int)obj->cur.clipper->cur.cache.clip.g) * (amul)) / 65025, \
|
||||
(((int)object->sub.col.b) * ((int)obj->cur.clipper->cur.cache.clip.b) * (amul)) / 65025, \
|
||||
(((int)object->sub.col.a) * ((int)obj->cur.clipper->cur.cache.clip.a) * (amul)) / 65025); \
|
||||
else \
|
||||
ENFN->context_color_set(output, context, \
|
||||
(((int)object->sub.col.r) * (amul)) / 255, \
|
||||
(((int)object->sub.col.g) * (amul)) / 255, \
|
||||
(((int)object->sub.col.b) * (amul)) / 255, \
|
||||
(((int)object->sub.col.a) * (amul)) / 255);
|
||||
ENFN->context_color_set(output, context, \
|
||||
(((int)object->sub.col.r) * (amul)) / 255, \
|
||||
(((int)object->sub.col.g) * (amul)) / 255, \
|
||||
(((int)object->sub.col.b) * (amul)) / 255, \
|
||||
(((int)object->sub.col.a) * (amul)) / 255);
|
||||
|
||||
#define DRAW_TEXT(ox, oy) \
|
||||
if ((o->font) && (it->text_props.len > 0)) \
|
||||
ENFN->font_draw(output, \
|
||||
context, \
|
||||
surface, \
|
||||
o->font, \
|
||||
obj->cur.geometry.x + x + sl + ox + it->x, \
|
||||
obj->cur.geometry.y + y + st + oy + \
|
||||
(int) \
|
||||
(((o->max_ascent * obj->cur.geometry.h) / obj->cur.geometry.h)), \
|
||||
obj->cur.geometry.w, \
|
||||
obj->cur.geometry.h, \
|
||||
obj->cur.geometry.w, \
|
||||
obj->cur.geometry.h, \
|
||||
&it->text_props);
|
||||
context, \
|
||||
surface, \
|
||||
o->font, \
|
||||
obj->cur.geometry.x + x + sl + ox + it->x, \
|
||||
obj->cur.geometry.y + y + st + oy + \
|
||||
(int) \
|
||||
(((o->max_ascent * obj->cur.geometry.h) / obj->cur.geometry.h)), \
|
||||
obj->cur.geometry.w, \
|
||||
obj->cur.geometry.h, \
|
||||
obj->cur.geometry.w, \
|
||||
obj->cur.geometry.h, \
|
||||
&it->text_props);
|
||||
|
||||
/* shadows */
|
||||
shad_dst = shad_sz = dx = dy = haveshad = 0;
|
||||
|
@ -1685,9 +1685,9 @@ evas_object_text_render_pre(Evas_Object *obj)
|
|||
/* if someone is clipping this obj - go calculate the clipper */
|
||||
if (obj->cur.clipper)
|
||||
{
|
||||
if (obj->cur.cache.clip.dirty)
|
||||
evas_object_clip_recalc(obj->cur.clipper);
|
||||
obj->cur.clipper->func->render_pre(obj->cur.clipper);
|
||||
if (obj->cur.cache.clip.dirty)
|
||||
evas_object_clip_recalc(obj->cur.clipper);
|
||||
obj->cur.clipper->func->render_pre(obj->cur.clipper);
|
||||
}
|
||||
/* now figure what changed and add draw rects
|
||||
if it just became visible or invisible */
|
||||
|
@ -1695,9 +1695,9 @@ evas_object_text_render_pre(Evas_Object *obj)
|
|||
was_v = evas_object_was_visible(obj);
|
||||
if (is_v != was_v)
|
||||
{
|
||||
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes,
|
||||
obj, is_v, was_v);
|
||||
goto done;
|
||||
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes,
|
||||
obj, is_v, was_v);
|
||||
goto done;
|
||||
}
|
||||
if (obj->changed_map)
|
||||
{
|
||||
|
@ -1712,9 +1712,9 @@ evas_object_text_render_pre(Evas_Object *obj)
|
|||
/* if we restacked (layer or just within a layer) and dont clip anyone */
|
||||
if (obj->restack)
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
||||
obj);
|
||||
goto done;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
||||
obj);
|
||||
goto done;
|
||||
}
|
||||
/* if it changed color */
|
||||
if ((obj->cur.color.r != obj->prev.color.r) ||
|
||||
|
@ -1722,9 +1722,9 @@ evas_object_text_render_pre(Evas_Object *obj)
|
|||
(obj->cur.color.b != obj->prev.color.b) ||
|
||||
(obj->cur.color.a != obj->prev.color.a))
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
||||
obj);
|
||||
goto done;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
||||
obj);
|
||||
goto done;
|
||||
}
|
||||
/* if it changed geometry - and obviously not visibility or color
|
||||
calculate differences since we have a constant color fill
|
||||
|
@ -1734,53 +1734,53 @@ evas_object_text_render_pre(Evas_Object *obj)
|
|||
(obj->cur.geometry.w != obj->prev.geometry.w) ||
|
||||
(obj->cur.geometry.h != obj->prev.geometry.h))
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
||||
obj);
|
||||
goto done;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
||||
obj);
|
||||
goto done;
|
||||
}
|
||||
if (obj->cur.render_op != obj->prev.render_op)
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
||||
obj);
|
||||
goto done;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
||||
obj);
|
||||
goto done;
|
||||
}
|
||||
if (obj->cur.scale != obj->prev.scale)
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
||||
obj);
|
||||
goto done;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
||||
obj);
|
||||
goto done;
|
||||
}
|
||||
if (o->changed)
|
||||
{
|
||||
if ((o->cur.size != o->prev.size) ||
|
||||
((o->cur.font != o->prev.font)) ||
|
||||
((o->cur.utf8_text != o->prev.utf8_text)) ||
|
||||
((o->cur.style != o->prev.style)) ||
|
||||
((o->cur.shadow.r != o->prev.shadow.r)) ||
|
||||
((o->cur.shadow.g != o->prev.shadow.g)) ||
|
||||
((o->cur.shadow.b != o->prev.shadow.b)) ||
|
||||
((o->cur.shadow.a != o->prev.shadow.a)) ||
|
||||
((o->cur.outline.r != o->prev.outline.r)) ||
|
||||
((o->cur.outline.g != o->prev.outline.g)) ||
|
||||
((o->cur.outline.b != o->prev.outline.b)) ||
|
||||
((o->cur.outline.a != o->prev.outline.a)) ||
|
||||
((o->cur.glow.r != o->prev.glow.r)) ||
|
||||
((o->cur.glow.g != o->prev.glow.g)) ||
|
||||
((o->cur.glow.b != o->prev.glow.b)) ||
|
||||
((o->cur.glow.a != o->prev.glow.a)) ||
|
||||
((o->cur.glow2.r != o->prev.glow2.r)) ||
|
||||
((o->cur.glow2.g != o->prev.glow2.g)) ||
|
||||
((o->cur.glow2.b != o->prev.glow2.b)) ||
|
||||
((o->cur.glow2.a != o->prev.glow2.a)))
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
||||
obj);
|
||||
goto done;
|
||||
}
|
||||
if ((o->cur.size != o->prev.size) ||
|
||||
((o->cur.font != o->prev.font)) ||
|
||||
((o->cur.utf8_text != o->prev.utf8_text)) ||
|
||||
((o->cur.style != o->prev.style)) ||
|
||||
((o->cur.shadow.r != o->prev.shadow.r)) ||
|
||||
((o->cur.shadow.g != o->prev.shadow.g)) ||
|
||||
((o->cur.shadow.b != o->prev.shadow.b)) ||
|
||||
((o->cur.shadow.a != o->prev.shadow.a)) ||
|
||||
((o->cur.outline.r != o->prev.outline.r)) ||
|
||||
((o->cur.outline.g != o->prev.outline.g)) ||
|
||||
((o->cur.outline.b != o->prev.outline.b)) ||
|
||||
((o->cur.outline.a != o->prev.outline.a)) ||
|
||||
((o->cur.glow.r != o->prev.glow.r)) ||
|
||||
((o->cur.glow.g != o->prev.glow.g)) ||
|
||||
((o->cur.glow.b != o->prev.glow.b)) ||
|
||||
((o->cur.glow.a != o->prev.glow.a)) ||
|
||||
((o->cur.glow2.r != o->prev.glow2.r)) ||
|
||||
((o->cur.glow2.g != o->prev.glow2.g)) ||
|
||||
((o->cur.glow2.b != o->prev.glow2.b)) ||
|
||||
((o->cur.glow2.a != o->prev.glow2.a)))
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
||||
obj);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
done:
|
||||
evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes,
|
||||
obj, is_v, was_v);
|
||||
obj, is_v, was_v);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1873,10 +1873,10 @@ _evas_object_text_rehint(Evas_Object *obj)
|
|||
o = (Evas_Object_Text *)(obj->object_data);
|
||||
if (!o->font) return;
|
||||
evas_font_load_hinting_set(obj->layer->evas, o->font,
|
||||
obj->layer->evas->hinting);
|
||||
obj->layer->evas->hinting);
|
||||
was = evas_object_is_in_output_rect(obj,
|
||||
obj->layer->evas->pointer.x,
|
||||
obj->layer->evas->pointer.y, 1, 1);
|
||||
obj->layer->evas->pointer.x,
|
||||
obj->layer->evas->pointer.y, 1, 1);
|
||||
/* DO II */
|
||||
_evas_object_text_recalc(obj);
|
||||
o->changed = 1;
|
||||
|
@ -1884,14 +1884,14 @@ _evas_object_text_rehint(Evas_Object *obj)
|
|||
evas_object_clip_dirty(obj);
|
||||
evas_object_coords_recalc(obj);
|
||||
is = evas_object_is_in_output_rect(obj,
|
||||
obj->layer->evas->pointer.x,
|
||||
obj->layer->evas->pointer.y, 1, 1);
|
||||
obj->layer->evas->pointer.x,
|
||||
obj->layer->evas->pointer.y, 1, 1);
|
||||
if ((is || was) && obj->cur.visible)
|
||||
evas_event_feed_mouse_move(obj->layer->evas,
|
||||
obj->layer->evas->pointer.x,
|
||||
obj->layer->evas->pointer.y,
|
||||
obj->layer->evas->last_timestamp,
|
||||
NULL);
|
||||
obj->layer->evas->pointer.x,
|
||||
obj->layer->evas->pointer.y,
|
||||
obj->layer->evas->last_timestamp,
|
||||
NULL);
|
||||
evas_object_inform_call_resize(obj);
|
||||
}
|
||||
|
||||
|
@ -1915,22 +1915,22 @@ _evas_object_text_recalc(Evas_Object *obj)
|
|||
|
||||
if ((o->font) && (o->items))
|
||||
{
|
||||
int w, h;
|
||||
int l = 0, r = 0, t = 0, b = 0;
|
||||
int w, h;
|
||||
int l = 0, r = 0, t = 0, b = 0;
|
||||
|
||||
w = _evas_object_text_horiz_advance_get(obj, o);
|
||||
h = _evas_object_text_vert_advance_get(obj, o);
|
||||
evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b);
|
||||
obj->cur.geometry.w = w + l + r;
|
||||
evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b);
|
||||
obj->cur.geometry.w = w + l + r;
|
||||
obj->cur.geometry.h = h + t + b;
|
||||
//// obj->cur.cache.geometry.validity = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
int t = 0, b = 0;
|
||||
int t = 0, b = 0;
|
||||
|
||||
evas_text_style_pad_get(o->cur.style, NULL, NULL, &t, &b);
|
||||
obj->cur.geometry.w = 0;
|
||||
evas_text_style_pad_get(o->cur.style, NULL, NULL, &t, &b);
|
||||
obj->cur.geometry.w = 0;
|
||||
obj->cur.geometry.h = o->max_ascent + o->max_descent + t + b;
|
||||
//// obj->cur.cache.geometry.validity = 0;
|
||||
}
|
||||
|
|
|
@ -414,9 +414,9 @@ struct _Evas_Object_Textblock_Format
|
|||
} font;
|
||||
struct {
|
||||
struct {
|
||||
unsigned char r, g, b, a;
|
||||
unsigned char r, g, b, a;
|
||||
} normal, underline, underline2, underline_dash, outline, shadow, glow, glow2, backing,
|
||||
strikethrough;
|
||||
strikethrough;
|
||||
} color;
|
||||
struct {
|
||||
int l, r;
|
||||
|
@ -595,13 +595,13 @@ _style_replace(Evas_Textblock_Style *ts, const char *style_text)
|
|||
if (ts->default_tag) free(ts->default_tag);
|
||||
while (ts->tags)
|
||||
{
|
||||
Evas_Object_Style_Tag *tag;
|
||||
Evas_Object_Style_Tag *tag;
|
||||
|
||||
tag = (Evas_Object_Style_Tag *)ts->tags;
|
||||
ts->tags = (Evas_Object_Style_Tag *)eina_inlist_remove(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag));
|
||||
free(tag->tag.tag);
|
||||
free(tag->tag.replace);
|
||||
free(tag);
|
||||
tag = (Evas_Object_Style_Tag *)ts->tags;
|
||||
ts->tags = (Evas_Object_Style_Tag *)eina_inlist_remove(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag));
|
||||
free(tag->tag.tag);
|
||||
free(tag->tag.replace);
|
||||
free(tag);
|
||||
}
|
||||
ts->default_tag = NULL;
|
||||
ts->tags = NULL;
|
||||
|
@ -635,12 +635,12 @@ _style_match_tag(const Evas_Textblock_Style *ts, const char *s, size_t tag_len,
|
|||
/* Try the style tags */
|
||||
EINA_INLIST_FOREACH(ts->tags, tag)
|
||||
{
|
||||
if (tag->tag.tag_len != tag_len) continue;
|
||||
if (!strncmp(tag->tag.tag, s, tag_len))
|
||||
{
|
||||
*replace_len = tag->tag.replace_len;
|
||||
return tag->tag.replace;
|
||||
}
|
||||
if (tag->tag.tag_len != tag_len) continue;
|
||||
if (!strncmp(tag->tag.tag, s, tag_len))
|
||||
{
|
||||
*replace_len = tag->tag.replace_len;
|
||||
return tag->tag.replace;
|
||||
}
|
||||
}
|
||||
|
||||
/* Try the default tags */
|
||||
|
@ -677,9 +677,9 @@ _nodes_clear(const Evas_Object *obj)
|
|||
o = (Evas_Object_Textblock *)(obj->object_data);
|
||||
while (o->text_nodes)
|
||||
{
|
||||
Evas_Object_Textblock_Node_Text *n;
|
||||
Evas_Object_Textblock_Node_Text *n;
|
||||
|
||||
n = o->text_nodes;
|
||||
n = o->text_nodes;
|
||||
o->text_nodes = _NODE_TEXT(eina_inlist_remove(
|
||||
EINA_INLIST_GET(o->text_nodes), EINA_INLIST_GET(n)));
|
||||
_evas_textblock_node_text_free(n);
|
||||
|
@ -1876,8 +1876,8 @@ _layout_format_ascent_descent_adjust(const Evas_Object *obj,
|
|||
|
||||
if (fmt->font.font)
|
||||
{
|
||||
// ascent = c->ENFN->font_max_ascent_get(c->ENDT, fmt->font.font);
|
||||
// descent = c->ENFN->font_max_descent_get(c->ENDT, fmt->font.font);
|
||||
// ascent = c->ENFN->font_max_ascent_get(c->ENDT, fmt->font.font);
|
||||
// descent = c->ENFN->font_max_descent_get(c->ENDT, fmt->font.font);
|
||||
ascent = ENFN->font_ascent_get(ENDT, fmt->font.font);
|
||||
descent = ENFN->font_descent_get(ENDT, fmt->font.font);
|
||||
if (fmt->linesize > 0)
|
||||
|
@ -3599,7 +3599,7 @@ _layout_paragraph_reorder_lines(Evas_Object_Textblock_Paragraph *par)
|
|||
|
||||
static void
|
||||
_layout_paragraph_render(Evas_Object_Textblock *o,
|
||||
Evas_Object_Textblock_Paragraph *par)
|
||||
Evas_Object_Textblock_Paragraph *par)
|
||||
{
|
||||
if (par->rendered)
|
||||
return;
|
||||
|
@ -4548,12 +4548,12 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text)
|
|||
{
|
||||
if (!key_start)
|
||||
{
|
||||
if (!isspace((unsigned char)(*p)))
|
||||
if (!isspace((unsigned char)(*p)))
|
||||
key_start = p;
|
||||
}
|
||||
else if (!key_stop)
|
||||
{
|
||||
if ((*p == '=') || (isspace((unsigned char)(*p))))
|
||||
if ((*p == '=') || (isspace((unsigned char)(*p))))
|
||||
key_stop = p;
|
||||
}
|
||||
else if (!val_start)
|
||||
|
@ -5954,14 +5954,14 @@ evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur)
|
|||
{
|
||||
node = _NODE_TEXT(EINA_INLIST_GET(node)->last);
|
||||
cur->node = node;
|
||||
cur->pos = 0;
|
||||
cur->pos = 0;
|
||||
|
||||
evas_textblock_cursor_paragraph_char_last(cur);
|
||||
evas_textblock_cursor_paragraph_char_last(cur);
|
||||
}
|
||||
else
|
||||
{
|
||||
cur->node = NULL;
|
||||
cur->pos = 0;
|
||||
cur->node = NULL;
|
||||
cur->pos = 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -6300,8 +6300,8 @@ evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur)
|
|||
}
|
||||
if (it)
|
||||
{
|
||||
cur->pos = it->text_pos;
|
||||
cur->node = it->text_node;
|
||||
cur->pos = it->text_pos;
|
||||
cur->node = it->text_node;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6336,8 +6336,8 @@ evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur)
|
|||
{
|
||||
size_t ind;
|
||||
|
||||
cur->node = it->text_node;
|
||||
cur->pos = it->text_pos;
|
||||
cur->node = it->text_node;
|
||||
cur->pos = it->text_pos;
|
||||
if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
|
||||
{
|
||||
ind = _ITEM_TEXT(it)->text_props.text_len - 1;
|
||||
|
@ -6874,8 +6874,8 @@ evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line)
|
|||
it = (Evas_Object_Textblock_Item *)ln->items;
|
||||
if (it)
|
||||
{
|
||||
cur->pos = it->text_pos;
|
||||
cur->node = it->text_node;
|
||||
cur->pos = it->text_pos;
|
||||
cur->node = it->text_node;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -6897,19 +6897,19 @@ evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Text
|
|||
if ((!cur1->node) || (!cur2->node)) return 0;
|
||||
if (cur1->node == cur2->node)
|
||||
{
|
||||
if (cur1->pos < cur2->pos) return -1; /* cur1 < cur2 */
|
||||
else if (cur1->pos > cur2->pos) return 1; /* cur2 < cur1 */
|
||||
return 0;
|
||||
if (cur1->pos < cur2->pos) return -1; /* cur1 < cur2 */
|
||||
else if (cur1->pos > cur2->pos) return 1; /* cur2 < cur1 */
|
||||
return 0;
|
||||
}
|
||||
for (l1 = EINA_INLIST_GET(cur1->node),
|
||||
l2 = EINA_INLIST_GET(cur1->node); (l1) || (l2);)
|
||||
{
|
||||
if (l1 == EINA_INLIST_GET(cur2->node)) return 1; /* cur2 < cur 1 */
|
||||
else if (l2 == EINA_INLIST_GET(cur2->node)) return -1; /* cur1 < cur 2 */
|
||||
else if (!l1) return -1; /* cur1 < cur 2 */
|
||||
else if (!l2) return 1; /* cur2 < cur 1 */
|
||||
l1 = l1->prev;
|
||||
l2 = l2->next;
|
||||
if (l1 == EINA_INLIST_GET(cur2->node)) return 1; /* cur2 < cur 1 */
|
||||
else if (l2 == EINA_INLIST_GET(cur2->node)) return -1; /* cur1 < cur 2 */
|
||||
else if (!l1) return -1; /* cur1 < cur 2 */
|
||||
else if (!l2) return 1; /* cur2 < cur 1 */
|
||||
l1 = l1->prev;
|
||||
l2 = l2->next;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -7146,8 +7146,8 @@ _evas_textblock_changed(Evas_Object_Textblock *o, Evas_Object *obj)
|
|||
o->content_changed = 1;
|
||||
if (o->markup_text)
|
||||
{
|
||||
free(o->markup_text);
|
||||
o->markup_text = NULL;
|
||||
free(o->markup_text);
|
||||
o->markup_text = NULL;
|
||||
}
|
||||
|
||||
evas_object_change(obj);
|
||||
|
@ -7424,14 +7424,14 @@ evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *form
|
|||
format = n->format;
|
||||
if (!cur->node)
|
||||
{
|
||||
o->format_nodes = _NODE_FORMAT(eina_inlist_append(
|
||||
o->format_nodes = _NODE_FORMAT(eina_inlist_append(
|
||||
EINA_INLIST_GET(o->format_nodes),
|
||||
EINA_INLIST_GET(n)));
|
||||
cur->pos = 0;
|
||||
cur->pos = 0;
|
||||
n->text_node = (EINA_INLIST_GET(n)->prev) ?
|
||||
_NODE_FORMAT(EINA_INLIST_GET(n)->prev)->text_node :
|
||||
o->text_nodes;
|
||||
cur->node = n->text_node;
|
||||
cur->node = n->text_node;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -7616,12 +7616,12 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur)
|
|||
|
||||
if (cur->pos == eina_ustrbuf_length_get(n->unicode))
|
||||
{
|
||||
n2 = _NODE_TEXT(EINA_INLIST_GET(n)->next);
|
||||
if (n2)
|
||||
{
|
||||
cur->node = n2;
|
||||
cur->pos = 0;
|
||||
}
|
||||
n2 = _NODE_TEXT(EINA_INLIST_GET(n)->next);
|
||||
if (n2)
|
||||
{
|
||||
cur->node = n2;
|
||||
cur->pos = 0;
|
||||
}
|
||||
}
|
||||
|
||||
_evas_textblock_cursors_update_offset(cur, n, ppos, -(ind - ppos));
|
||||
|
@ -7643,11 +7643,11 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
|
|||
o = (Evas_Object_Textblock *)(cur1->obj->object_data);
|
||||
if (evas_textblock_cursor_compare(cur1, cur2) > 0)
|
||||
{
|
||||
Evas_Textblock_Cursor *tc;
|
||||
Evas_Textblock_Cursor *tc;
|
||||
|
||||
tc = cur1;
|
||||
cur1 = cur2;
|
||||
cur2 = tc;
|
||||
tc = cur1;
|
||||
cur1 = cur2;
|
||||
cur2 = tc;
|
||||
}
|
||||
n1 = cur1->node;
|
||||
n2 = cur2->node;
|
||||
|
@ -7789,11 +7789,11 @@ _evas_textblock_cursor_range_text_markup_get(const Evas_Textblock_Cursor *cur1,
|
|||
if (cur1->obj != _cur2->obj) return NULL;
|
||||
if (evas_textblock_cursor_compare(cur1, _cur2) > 0)
|
||||
{
|
||||
const Evas_Textblock_Cursor *tc;
|
||||
const Evas_Textblock_Cursor *tc;
|
||||
|
||||
tc = cur1;
|
||||
cur1 = _cur2;
|
||||
_cur2 = tc;
|
||||
tc = cur1;
|
||||
cur1 = _cur2;
|
||||
_cur2 = tc;
|
||||
}
|
||||
/* Work on a local copy of the cur */
|
||||
cur2 = alloca(sizeof(Evas_Textblock_Cursor));
|
||||
|
@ -7908,11 +7908,11 @@ _evas_textblock_cursor_range_text_plain_get(const Evas_Textblock_Cursor *cur1, c
|
|||
if (cur1->obj != _cur2->obj) return NULL;
|
||||
if (evas_textblock_cursor_compare(cur1, _cur2) > 0)
|
||||
{
|
||||
const Evas_Textblock_Cursor *tc;
|
||||
const Evas_Textblock_Cursor *tc;
|
||||
|
||||
tc = cur1;
|
||||
cur1 = _cur2;
|
||||
_cur2 = tc;
|
||||
tc = cur1;
|
||||
cur1 = _cur2;
|
||||
_cur2 = tc;
|
||||
}
|
||||
n1 = cur1->node;
|
||||
n2 = _cur2->node;
|
||||
|
@ -8364,8 +8364,8 @@ _evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *dat
|
|||
{
|
||||
x = ln->x;
|
||||
}
|
||||
y = ln->par->y + ln->y;
|
||||
h = ln->h;
|
||||
y = ln->par->y + ln->y;
|
||||
h = ln->h;
|
||||
}
|
||||
else if (ln && fi)
|
||||
{
|
||||
|
@ -8403,7 +8403,7 @@ _evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *dat
|
|||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
return -1;
|
||||
}
|
||||
if (cx) *cx = x;
|
||||
if (cy) *cy = y;
|
||||
|
@ -8981,11 +8981,11 @@ evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, cons
|
|||
if (!o->formatted.valid) _relayout(cur1->obj);
|
||||
if (evas_textblock_cursor_compare(cur1, cur2) > 0)
|
||||
{
|
||||
const Evas_Textblock_Cursor *tc;
|
||||
const Evas_Textblock_Cursor *tc;
|
||||
|
||||
tc = cur1;
|
||||
cur1 = cur2;
|
||||
cur2 = tc;
|
||||
tc = cur1;
|
||||
cur1 = cur2;
|
||||
cur2 = tc;
|
||||
}
|
||||
|
||||
ln1 = ln2 = NULL;
|
||||
|
@ -9017,12 +9017,12 @@ evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, cons
|
|||
}
|
||||
while (lni && (lni != ln2))
|
||||
{
|
||||
tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
|
||||
rects = eina_list_append(rects, tr);
|
||||
tr->x = lni->x;
|
||||
tr->y = lni->par->y + lni->y;
|
||||
tr->h = lni->h;
|
||||
tr->w = lni->w;
|
||||
tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
|
||||
rects = eina_list_append(rects, tr);
|
||||
tr->x = lni->x;
|
||||
tr->y = lni->par->y + lni->y;
|
||||
tr->h = lni->h;
|
||||
tr->w = lni->w;
|
||||
plni = lni;
|
||||
lni = (Evas_Object_Textblock_Line *) EINA_INLIST_GET(lni)->next;
|
||||
if (!lni && (plni->par != ln2->par))
|
||||
|
@ -9107,8 +9107,8 @@ _evas_object_textblock_clear_all(Evas_Object *obj)
|
|||
TB_HEAD();
|
||||
if (o->paragraphs)
|
||||
{
|
||||
_paragraphs_free(obj, o->paragraphs);
|
||||
o->paragraphs = NULL;
|
||||
_paragraphs_free(obj, o->paragraphs);
|
||||
o->paragraphs = NULL;
|
||||
}
|
||||
|
||||
_nodes_clear(obj);
|
||||
|
@ -9116,8 +9116,8 @@ _evas_object_textblock_clear_all(Evas_Object *obj)
|
|||
o->cursor->pos = 0;
|
||||
EINA_LIST_FOREACH(o->cursors, l, cur)
|
||||
{
|
||||
cur->node = NULL;
|
||||
cur->pos = 0;
|
||||
cur->node = NULL;
|
||||
cur->pos = 0;
|
||||
|
||||
}
|
||||
|
||||
|
@ -9280,7 +9280,7 @@ evas_object_textblock_size_native_get(const Evas_Object *obj, Evas_Coord *w, Eva
|
|||
o->native.w = wmax;
|
||||
o->native.h = hmax;
|
||||
|
||||
o->native.valid = 1;
|
||||
o->native.valid = 1;
|
||||
o->content_changed = 0;
|
||||
o->format_changed = EINA_FALSE;
|
||||
}
|
||||
|
@ -9383,11 +9383,11 @@ evas_object_textblock_free(Evas_Object *obj)
|
|||
free(o->cursor);
|
||||
while (o->cursors)
|
||||
{
|
||||
Evas_Textblock_Cursor *cur;
|
||||
Evas_Textblock_Cursor *cur;
|
||||
|
||||
cur = (Evas_Textblock_Cursor *)o->cursors->data;
|
||||
o->cursors = eina_list_remove_list(o->cursors, o->cursors);
|
||||
free(cur);
|
||||
cur = (Evas_Textblock_Cursor *)o->cursors->data;
|
||||
o->cursors = eina_list_remove_list(o->cursors, o->cursors);
|
||||
free(cur);
|
||||
}
|
||||
if (o->repch) eina_stringshare_del(o->repch);
|
||||
if (o->ellip_ti) _item_free(obj, NULL, _ITEM(o->ellip_ti));
|
||||
|
@ -9407,17 +9407,17 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
|
|||
int cx, cy, cw, ch, clip;
|
||||
const char vals[5][5] =
|
||||
{
|
||||
{0, 1, 2, 1, 0},
|
||||
{1, 3, 4, 3, 1},
|
||||
{2, 4, 5, 4, 2},
|
||||
{1, 3, 4, 3, 1},
|
||||
{0, 1, 2, 1, 0}
|
||||
{0, 1, 2, 1, 0},
|
||||
{1, 3, 4, 3, 1},
|
||||
{2, 4, 5, 4, 2},
|
||||
{1, 3, 4, 3, 1},
|
||||
{0, 1, 2, 1, 0}
|
||||
};
|
||||
|
||||
/* render object to surface with context, and offxet by x,y */
|
||||
o = (Evas_Object_Textblock *)(obj->object_data);
|
||||
obj->layer->evas->engine.func->context_multiplier_unset(output,
|
||||
context);
|
||||
context);
|
||||
/* FIXME: This clipping is just until we fix inset handling correctly. */
|
||||
ENFN->context_clip_clip(output, context,
|
||||
obj->cur.geometry.x + x,
|
||||
|
@ -9813,26 +9813,26 @@ evas_object_textblock_render_pre(Evas_Object *obj)
|
|||
(obj->cur.geometry.h != o->last_h))))
|
||||
{
|
||||
_relayout(obj);
|
||||
o->redraw = 0;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
is_v = evas_object_is_visible(obj);
|
||||
was_v = evas_object_was_visible(obj);
|
||||
goto done;
|
||||
o->redraw = 0;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
is_v = evas_object_is_visible(obj);
|
||||
was_v = evas_object_was_visible(obj);
|
||||
goto done;
|
||||
}
|
||||
if (o->redraw)
|
||||
{
|
||||
o->redraw = 0;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
is_v = evas_object_is_visible(obj);
|
||||
was_v = evas_object_was_visible(obj);
|
||||
goto done;
|
||||
o->redraw = 0;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
is_v = evas_object_is_visible(obj);
|
||||
was_v = evas_object_was_visible(obj);
|
||||
goto done;
|
||||
}
|
||||
/* if someone is clipping this obj - go calculate the clipper */
|
||||
if (obj->cur.clipper)
|
||||
{
|
||||
if (obj->cur.cache.clip.dirty)
|
||||
evas_object_clip_recalc(obj->cur.clipper);
|
||||
obj->cur.clipper->func->render_pre(obj->cur.clipper);
|
||||
if (obj->cur.cache.clip.dirty)
|
||||
evas_object_clip_recalc(obj->cur.clipper);
|
||||
obj->cur.clipper->func->render_pre(obj->cur.clipper);
|
||||
}
|
||||
/* now figure what changed and add draw rects */
|
||||
/* if it just became visible or invisible */
|
||||
|
@ -9840,8 +9840,8 @@ evas_object_textblock_render_pre(Evas_Object *obj)
|
|||
was_v = evas_object_was_visible(obj);
|
||||
if (is_v != was_v)
|
||||
{
|
||||
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
|
||||
goto done;
|
||||
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
|
||||
goto done;
|
||||
}
|
||||
if (obj->changed_map)
|
||||
{
|
||||
|
@ -9856,8 +9856,8 @@ evas_object_textblock_render_pre(Evas_Object *obj)
|
|||
/* if we restacked (layer or just within a layer) and don't clip anyone */
|
||||
if (obj->restack)
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
}
|
||||
/* if it changed color */
|
||||
if ((obj->cur.color.r != obj->prev.color.r) ||
|
||||
|
@ -9865,8 +9865,8 @@ evas_object_textblock_render_pre(Evas_Object *obj)
|
|||
(obj->cur.color.b != obj->prev.color.b) ||
|
||||
(obj->cur.color.a != obj->prev.color.a))
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
}
|
||||
/* if it changed geometry - and obviously not visibility or color */
|
||||
/* calculate differences since we have a constant color fill */
|
||||
|
@ -9876,8 +9876,8 @@ evas_object_textblock_render_pre(Evas_Object *obj)
|
|||
(obj->cur.geometry.w != obj->prev.geometry.w) ||
|
||||
(obj->cur.geometry.h != obj->prev.geometry.h))
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
}
|
||||
done:
|
||||
evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v);
|
||||
|
@ -9953,8 +9953,8 @@ evas_object_textblock_coords_recalc(Evas_Object *obj)
|
|||
(((o->valign != 0.0) || (o->have_ellipsis)) &&
|
||||
(obj->cur.geometry.h != o->last_h)))
|
||||
{
|
||||
o->formatted.valid = 0;
|
||||
o->changed = 1;
|
||||
o->formatted.valid = 0;
|
||||
o->changed = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -721,9 +721,9 @@ evas_object_textgrid_render_pre(Evas_Object *obj)
|
|||
/* if someone is clipping this obj - go calculate the clipper */
|
||||
if (obj->cur.clipper)
|
||||
{
|
||||
if (obj->cur.cache.clip.dirty)
|
||||
evas_object_clip_recalc(obj->cur.clipper);
|
||||
obj->cur.clipper->func->render_pre(obj->cur.clipper);
|
||||
if (obj->cur.cache.clip.dirty)
|
||||
evas_object_clip_recalc(obj->cur.clipper);
|
||||
obj->cur.clipper->func->render_pre(obj->cur.clipper);
|
||||
}
|
||||
/* now figure what changed and add draw rects */
|
||||
/* if it just became visible or invisible */
|
||||
|
@ -731,8 +731,8 @@ evas_object_textgrid_render_pre(Evas_Object *obj)
|
|||
was_v = evas_object_was_visible(obj);
|
||||
if (is_v != was_v)
|
||||
{
|
||||
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
|
||||
goto done;
|
||||
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
|
||||
goto done;
|
||||
}
|
||||
if (obj->changed_map)
|
||||
{
|
||||
|
@ -747,8 +747,8 @@ evas_object_textgrid_render_pre(Evas_Object *obj)
|
|||
/* if we restacked (layer or just within a layer) and dont clip anyone */
|
||||
if (obj->restack)
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
}
|
||||
/* if it changed color */
|
||||
if ((obj->cur.color.r != obj->prev.color.r) ||
|
||||
|
@ -756,8 +756,8 @@ evas_object_textgrid_render_pre(Evas_Object *obj)
|
|||
(obj->cur.color.b != obj->prev.color.b) ||
|
||||
(obj->cur.color.a != obj->prev.color.a))
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
}
|
||||
/* if it changed geometry - and obviously not visibility or color */
|
||||
/* calculate differences since we have a constant color fill */
|
||||
|
@ -767,18 +767,18 @@ evas_object_textgrid_render_pre(Evas_Object *obj)
|
|||
(obj->cur.geometry.w != obj->prev.geometry.w) ||
|
||||
(obj->cur.geometry.h != obj->prev.geometry.h))
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
}
|
||||
if (obj->cur.render_op != obj->prev.render_op)
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
}
|
||||
if (obj->cur.scale != obj->prev.scale)
|
||||
{
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (o->changed)
|
||||
|
|
Loading…
Reference in New Issue