Evas: tabs --> spaces

SVN revision: 75632
This commit is contained in:
Vincent Torri 2012-08-23 15:48:37 +00:00
parent cf03cc1c7b
commit 681fdbc351
7 changed files with 714 additions and 714 deletions

View File

@ -39,27 +39,27 @@ struct _Evas_Object_Grid_Accessor
const Evas_Object *grid; 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) Evas_Object_Grid_Data *ptr = evas_object_smart_data_get(o)
#define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, ptr) \ #define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, ptr) \
EVAS_OBJECT_GRID_DATA_GET(o, ptr); \ EVAS_OBJECT_GRID_DATA_GET(o, ptr); \
if (!ptr) \ if (!ptr) \
{ \ { \
CRIT("no widget data for object %p (%s)", \ CRIT("no widget data for object %p (%s)", \
o, evas_object_type_get(o)); \ o, evas_object_type_get(o)); \
abort(); \ abort(); \
return; \ return; \
} }
#define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, ptr, val) \ #define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
EVAS_OBJECT_GRID_DATA_GET(o, ptr); \ EVAS_OBJECT_GRID_DATA_GET(o, ptr); \
if (!ptr) \ if (!ptr) \
{ \ { \
CRIT("No widget data for object %p (%s)", \ CRIT("No widget data for object %p (%s)", \
o, evas_object_type_get(o)); \ o, evas_object_type_get(o)); \
abort(); \ abort(); \
return val; \ return val; \
} }
static const char EVAS_OBJECT_GRID_OPTION_KEY[] = "|EvGd"; 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_SUBCLASS_NEW("Evas_Object_Grid", _evas_object_grid,
Evas_Smart_Class, Evas_Smart_Class, Evas_Smart_Class, Evas_Smart_Class,
evas_object_smart_clipped_class_get, NULL) evas_object_smart_clipped_class_get, NULL)
static void static void
_evas_object_grid_smart_add(Evas_Object *o) _evas_object_grid_smart_add(Evas_Object *o)
@ -175,11 +175,11 @@ _evas_object_grid_smart_del(Evas_Object *o)
l = priv->children; l = priv->children;
while (l) while (l)
{ {
Evas_Object_Grid_Option *opt = l->data; Evas_Object_Grid_Option *opt = l->data;
_evas_object_grid_child_disconnect(o, opt->obj); _evas_object_grid_child_disconnect(o, opt->obj);
_evas_object_grid_option_del(opt->obj); _evas_object_grid_option_del(opt->obj);
free(opt); free(opt);
l = eina_list_remove_list(l, l); l = eina_list_remove_list(l, l);
} }
_evas_object_grid_parent_sc->del(o); _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)) if (o != evas_object_smart_parent_get(child))
{ {
ERR("cannot unpack child from incorrect grid!"); ERR("cannot unpack child from incorrect grid!");
return EINA_FALSE; return EINA_FALSE;
} }
opt = _evas_object_grid_option_del(child); opt = _evas_object_grid_option_del(child);
if (!opt) if (!opt)
{ {
ERR("cannot unpack child with no packing option!"); ERR("cannot unpack child with no packing option!");
return EINA_FALSE; return EINA_FALSE;
} }
_evas_object_grid_child_disconnect(o, child); _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) EINA_LIST_FREE(priv->children, opt)
{ {
_evas_object_grid_child_disconnect(o, opt->obj); _evas_object_grid_child_disconnect(o, opt->obj);
_evas_object_grid_option_del(opt->obj); _evas_object_grid_option_del(opt->obj);
evas_object_smart_member_del(opt->obj); evas_object_smart_member_del(opt->obj);
if (clear) if (clear)
evas_object_del(opt->obj); evas_object_del(opt->obj);
free(opt); free(opt);
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -175,10 +175,10 @@ evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj)
obj->cur.geometry.y, obj->cur.geometry.y,
obj->cur.geometry.w, obj->cur.geometry.w,
obj->cur.geometry.h, obj->cur.geometry.h,
//// rl = evas_rects_return_difference_rects(obj->cur.cache.geometry.x, //// rl = evas_rects_return_difference_rects(obj->cur.cache.geometry.x,
//// obj->cur.cache.geometry.y, //// obj->cur.cache.geometry.y,
//// obj->cur.cache.geometry.w, //// obj->cur.cache.geometry.w,
//// obj->cur.cache.geometry.h, //// obj->cur.cache.geometry.h,
obj->cur.clipper->cur.cache.clip.x, obj->cur.clipper->cur.cache.clip.x,
obj->cur.clipper->cur.cache.clip.y, obj->cur.clipper->cur.cache.clip.y,
obj->cur.clipper->cur.cache.clip.w, obj->cur.clipper->cur.cache.clip.w,
@ -191,10 +191,10 @@ evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj)
obj->prev.geometry.y, obj->prev.geometry.y,
obj->prev.geometry.w, obj->prev.geometry.w,
obj->prev.geometry.h, obj->prev.geometry.h,
//// rl = evas_rects_return_difference_rects(obj->prev.cache.geometry.x, //// rl = evas_rects_return_difference_rects(obj->prev.cache.geometry.x,
//// obj->prev.cache.geometry.y, //// obj->prev.cache.geometry.y,
//// obj->prev.cache.geometry.w, //// obj->prev.cache.geometry.w,
//// obj->prev.cache.geometry.h, //// obj->prev.cache.geometry.h,
obj->prev.clipper->prev.cache.clip.x, obj->prev.clipper->prev.cache.clip.x,
obj->prev.clipper->prev.cache.clip.y, obj->prev.clipper->prev.cache.clip.y,
obj->prev.clipper->prev.cache.clip.w, obj->prev.clipper->prev.cache.clip.w,
@ -221,19 +221,19 @@ evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj)
obj->cur.geometry.y, obj->cur.geometry.y,
obj->cur.geometry.w, obj->cur.geometry.w,
obj->cur.geometry.h); obj->cur.geometry.h);
//// obj->cur.cache.geometry.x, //// obj->cur.cache.geometry.x,
//// obj->cur.cache.geometry.y, //// obj->cur.cache.geometry.y,
//// obj->cur.cache.geometry.w, //// obj->cur.cache.geometry.w,
//// obj->cur.cache.geometry.h); //// obj->cur.cache.geometry.h);
evas_add_rect(rects, evas_add_rect(rects,
obj->prev.geometry.x, obj->prev.geometry.x,
obj->prev.geometry.y, obj->prev.geometry.y,
obj->prev.geometry.w, obj->prev.geometry.w,
obj->prev.geometry.h); obj->prev.geometry.h);
//// obj->prev.cache.geometry.x, //// obj->prev.cache.geometry.x,
//// obj->prev.cache.geometry.y, //// obj->prev.cache.geometry.y,
//// obj->prev.cache.geometry.w, //// obj->prev.cache.geometry.w,
//// obj->prev.cache.geometry.h); //// obj->prev.cache.geometry.h);
*/ */
} }
@ -562,7 +562,7 @@ evas_object_update_bounding_box(Evas_Object *obj)
computeminmax = EINA_TRUE; computeminmax = EINA_TRUE;
} }
if (computeminmax) if (computeminmax)
{ {
evas_object_smart_need_bounding_box_update(obj->smart.parent); evas_object_smart_need_bounding_box_update(obj->smart.parent);
} }

View File

@ -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 */ /* render object to surface with context, and offxet by x,y */
obj->layer->evas->engine.func->context_color_set(output, obj->layer->evas->engine.func->context_color_set(output,
context, context,
obj->cur.cache.clip.r, obj->cur.cache.clip.r,
obj->cur.cache.clip.g, obj->cur.cache.clip.g,
obj->cur.cache.clip.b, obj->cur.cache.clip.b,
obj->cur.cache.clip.a); obj->cur.cache.clip.a);
obj->layer->evas->engine.func->context_multiplier_unset(output, obj->layer->evas->engine.func->context_multiplier_unset(output,
context); context);
obj->layer->evas->engine.func->context_render_op_set(output, 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, obj->layer->evas->engine.func->rectangle_draw(output,
context, context,
surface, surface,
obj->cur.geometry.x + x, obj->cur.geometry.x + x,
obj->cur.geometry.y + y, obj->cur.geometry.y + y,
obj->cur.geometry.w, obj->cur.geometry.w,
obj->cur.geometry.h); obj->cur.geometry.h);
//// obj->cur.cache.geometry.x + x, //// obj->cur.cache.geometry.x + x,
//// obj->cur.cache.geometry.y + y, //// obj->cur.cache.geometry.y + y,
//// obj->cur.cache.geometry.w, //// obj->cur.cache.geometry.w,
//// obj->cur.cache.geometry.h); //// obj->cur.cache.geometry.h);
} }
static void 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 someone is clipping this obj - go calculate the clipper */
if (obj->cur.clipper) if (obj->cur.clipper)
{ {
if (obj->cur.cache.clip.dirty) if (obj->cur.cache.clip.dirty)
evas_object_clip_recalc(obj->cur.clipper); evas_object_clip_recalc(obj->cur.clipper);
obj->cur.clipper->func->render_pre(obj->cur.clipper); obj->cur.clipper->func->render_pre(obj->cur.clipper);
} }
/* now figure what changed and add draw rects */ /* now figure what changed and add draw rects */
/* if it just became visible or invisible */ /* 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)) goto done;
if (is_v != was_v) if (is_v != was_v)
{ {
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
goto done; goto done;
} }
if (obj->changed_map) 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 we restacked (layer or just within a layer) and don't clip anyone */
if ((obj->restack) && (!obj->clip.clipees)) if ((obj->restack) && (!obj->clip.clipees))
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
goto done; goto done;
} }
/* if it changed render op */ /* if it changed render op */
if (obj->cur.render_op != obj->prev.render_op) if (obj->cur.render_op != obj->prev.render_op)
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
goto done; goto done;
} }
/* if it changed color */ /* if it changed color */
if ((obj->cur.color.r != obj->prev.color.r) || 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.b != obj->prev.color.b) ||
(obj->cur.color.a != obj->prev.color.a)) (obj->cur.color.a != obj->prev.color.a))
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
goto done; goto done;
} }
/* if it changed geometry - and obviously not visibility or color */ /* if it changed geometry - and obviously not visibility or color */
/* calculate differences since we have a constant color fill */ /* 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.w != obj->prev.geometry.w) ||
(obj->cur.geometry.h != obj->prev.geometry.h)) (obj->cur.geometry.h != obj->prev.geometry.h))
{ {
evas_rects_return_difference_rects(&obj->layer->evas->clip_changes, evas_rects_return_difference_rects(&obj->layer->evas->clip_changes,
obj->cur.geometry.x, obj->cur.geometry.x,
obj->cur.geometry.y, obj->cur.geometry.y,
obj->cur.geometry.w, obj->cur.geometry.w,
obj->cur.geometry.h, obj->cur.geometry.h,
obj->prev.geometry.x, obj->prev.geometry.x,
obj->prev.geometry.y, obj->prev.geometry.y,
obj->prev.geometry.w, obj->prev.geometry.w,
obj->prev.geometry.h); obj->prev.geometry.h);
//// rl = evas_rects_return_difference_rects(obj->cur.cache.geometry.x, //// rl = evas_rects_return_difference_rects(obj->cur.cache.geometry.x,
//// obj->cur.cache.geometry.y, //// obj->cur.cache.geometry.y,
//// obj->cur.cache.geometry.w, //// obj->cur.cache.geometry.w,
//// obj->cur.cache.geometry.h, //// obj->cur.cache.geometry.h,
//// obj->prev.cache.geometry.x, //// obj->prev.cache.geometry.x,
//// obj->prev.cache.geometry.y, //// obj->prev.cache.geometry.y,
//// obj->prev.cache.geometry.w, //// obj->prev.cache.geometry.w,
//// obj->prev.cache.geometry.h); //// obj->prev.cache.geometry.h);
goto done; goto done;
} }
/* it obviously didn't change - add a NO obscure - this "unupdates" this */ /* 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 */ /* 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) && evas_object_is_opaque(obj) &&
(!obj->clip.clipees)) (!obj->clip.clipees))
obj->layer->evas->engine.func->output_redraws_rect_del(obj->layer->evas->engine.data.output, obj->layer->evas->engine.func->output_redraws_rect_del(obj->layer->evas->engine.data.output,
obj->cur.cache.clip.x, obj->cur.cache.clip.x,
obj->cur.cache.clip.y, obj->cur.cache.clip.y,
obj->cur.cache.clip.w, obj->cur.cache.clip.w,
obj->cur.cache.clip.h); obj->cur.cache.clip.h);
*/ */
done: done:
evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v); 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 */ /* currently fully opaque over the entire rectangle it occupies */
if ((obj->cur.map) && (obj->cur.usemap)) return 0; if ((obj->cur.map) && (obj->cur.usemap)) return 0;
if (obj->cur.render_op == EVAS_RENDER_COPY) if (obj->cur.render_op == EVAS_RENDER_COPY)
return 1; return 1;
if (obj->cur.render_op != EVAS_RENDER_BLEND) if (obj->cur.render_op != EVAS_RENDER_BLEND)
return 0; return 0;
return 1; 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 */ /* this returns 1 if the internal object data implies that the object was */
/* previously fully opaque over the entire rectangle it occupies */ /* previously fully opaque over the entire rectangle it occupies */
if (obj->prev.render_op == EVAS_RENDER_COPY) if (obj->prev.render_op == EVAS_RENDER_COPY)
return 1; return 1;
if (obj->prev.render_op != EVAS_RENDER_BLEND) if (obj->prev.render_op != EVAS_RENDER_BLEND)
return 0; return 0;
return 1; return 1;
} }

View File

@ -23,7 +23,7 @@ struct _Evas_Object_Text
const char *source; const char *source;
Evas_Font_Size size; Evas_Font_Size size;
struct { struct {
unsigned char r, g, b, a; unsigned char r, g, b, a;
} outline, shadow, glow, glow2; } outline, shadow, glow, glow2;
unsigned char style; 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); if (!text) text = eina_unicode_strdup(EINA_UNICODE_EMPTY_STRING);
was = evas_object_is_in_output_rect(obj, was = evas_object_is_in_output_rect(obj,
obj->layer->evas->pointer.x, obj->layer->evas->pointer.x,
obj->layer->evas->pointer.y, 1, 1); obj->layer->evas->pointer.y, 1, 1);
/* DO II */ /* DO II */
/*Update bidi_props*/ /*Update bidi_props*/
@ -619,12 +619,12 @@ evas_object_text_text_set(Evas_Object *obj, const char *_text)
if ((text) && (*text)) if ((text) && (*text))
{ {
_evas_object_text_layout(obj, o, 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; o->prev.utf8_text = NULL;
} }
else else
{ {
eina_stringshare_replace(&o->cur.utf8_text, NULL); eina_stringshare_replace(&o->cur.utf8_text, NULL);
} }
if (text) if (text)
{ {
@ -637,14 +637,14 @@ evas_object_text_text_set(Evas_Object *obj, const char *_text)
evas_object_clip_dirty(obj); evas_object_clip_dirty(obj);
evas_object_coords_recalc(obj); evas_object_coords_recalc(obj);
is = evas_object_is_in_output_rect(obj, is = evas_object_is_in_output_rect(obj,
obj->layer->evas->pointer.x, obj->layer->evas->pointer.x,
obj->layer->evas->pointer.y, 1, 1); obj->layer->evas->pointer.y, 1, 1);
if ((is || was) && obj->cur.visible) if ((is || was) && obj->cur.visible)
evas_event_feed_mouse_move(obj->layer->evas, evas_event_feed_mouse_move(obj->layer->evas,
obj->layer->evas->pointer.x, obj->layer->evas->pointer.x,
obj->layer->evas->pointer.y, obj->layer->evas->pointer.y,
obj->layer->evas->last_timestamp, obj->layer->evas->last_timestamp,
NULL); NULL);
evas_object_inform_call_resize(obj); evas_object_inform_call_resize(obj);
if (text) free(text); 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; x -= l;
if (x < 0) if (x < 0)
{ {
w += x; w += x;
x = 0; x = 0;
} }
if ((x + w) > obj->cur.geometry.w) w = obj->cur.geometry.w - x; if ((x + w) > obj->cur.geometry.w) w = obj->cur.geometry.w - x;
if (w < 0) w = 0; if (w < 0) w = 0;
if (y < 0) if (y < 0)
{ {
h += y; h += y;
y = 0; y = 0;
} }
if ((y + h) > obj->cur.geometry.h) h = obj->cur.geometry.h - y; if ((y + h) > obj->cur.geometry.h) h = obj->cur.geometry.h - y;
if (h < 0) h = 0; 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; rx -= l;
if (rx < 0) if (rx < 0)
{ {
rw += rx; rw += rx;
rx = 0; rx = 0;
} }
if ((rx + rw) > obj->cur.geometry.w) rw = obj->cur.geometry.w - rx; if ((rx + rw) > obj->cur.geometry.w) rw = obj->cur.geometry.w - rx;
if (rw < 0) rw = 0; if (rw < 0) rw = 0;
if (ry < 0) if (ry < 0)
{ {
rh += ry; rh += ry;
ry = 0; ry = 0;
} }
if ((ry + rh) > obj->cur.geometry.h) rh = obj->cur.geometry.h - ry; if ((ry + rh) > obj->cur.geometry.h) rh = obj->cur.geometry.h - ry;
if (rh < 0) rh = 0; 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; Evas_Object_Text_Item *it;
const char vals[5][5] = const char vals[5][5] =
{ {
{0, 1, 2, 1, 0}, {0, 1, 2, 1, 0},
{1, 3, 4, 3, 1}, {1, 3, 4, 3, 1},
{2, 4, 5, 4, 2}, {2, 4, 5, 4, 2},
{1, 3, 4, 3, 1}, {1, 3, 4, 3, 1},
{0, 1, 2, 1, 0} {0, 1, 2, 1, 0}
}; };
int sl = 0, st = 0; int sl = 0, st = 0;
int shad_dst, shad_sz, dx, dy, haveshad; 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); obj->cur.geometry.h);
*/ */
#define COLOR_ONLY_SET(object, sub, col) \ #define COLOR_ONLY_SET(object, sub, col) \
ENFN->context_color_set(output, context, \ ENFN->context_color_set(output, context, \
object->sub.col.r, \ object->sub.col.r, \
object->sub.col.g, \ object->sub.col.g, \
object->sub.col.b, \ object->sub.col.b, \
object->sub.col.a); object->sub.col.a);
#define COLOR_SET(object, sub, col) \ #define COLOR_SET(object, sub, col) \
if (obj->cur.clipper)\ if (obj->cur.clipper)\
ENFN->context_color_set(output, context, \ 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.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.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.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); \ ((int)object->sub.col.a * ((int)obj->cur.clipper->cur.cache.clip.a + 1)) >> 8); \
else\ else\
ENFN->context_color_set(output, context, \ ENFN->context_color_set(output, context, \
object->sub.col.r, \ object->sub.col.r, \
object->sub.col.g, \ object->sub.col.g, \
object->sub.col.b, \ object->sub.col.b, \
object->sub.col.a); object->sub.col.a);
#define COLOR_SET_AMUL(object, sub, col, amul) \ #define COLOR_SET_AMUL(object, sub, col, amul) \
if (obj->cur.clipper) \ if (obj->cur.clipper) \
ENFN->context_color_set(output, context, \ 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.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.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.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); \ (((int)object->sub.col.a) * ((int)obj->cur.clipper->cur.cache.clip.a) * (amul)) / 65025); \
else \ else \
ENFN->context_color_set(output, context, \ ENFN->context_color_set(output, context, \
(((int)object->sub.col.r) * (amul)) / 255, \ (((int)object->sub.col.r) * (amul)) / 255, \
(((int)object->sub.col.g) * (amul)) / 255, \ (((int)object->sub.col.g) * (amul)) / 255, \
(((int)object->sub.col.b) * (amul)) / 255, \ (((int)object->sub.col.b) * (amul)) / 255, \
(((int)object->sub.col.a) * (amul)) / 255); (((int)object->sub.col.a) * (amul)) / 255);
#define DRAW_TEXT(ox, oy) \ #define DRAW_TEXT(ox, oy) \
if ((o->font) && (it->text_props.len > 0)) \ if ((o->font) && (it->text_props.len > 0)) \
ENFN->font_draw(output, \ ENFN->font_draw(output, \
context, \ context, \
surface, \ surface, \
o->font, \ o->font, \
obj->cur.geometry.x + x + sl + ox + it->x, \ obj->cur.geometry.x + x + sl + ox + it->x, \
obj->cur.geometry.y + y + st + oy + \ obj->cur.geometry.y + y + st + oy + \
(int) \ (int) \
(((o->max_ascent * obj->cur.geometry.h) / obj->cur.geometry.h)), \ (((o->max_ascent * obj->cur.geometry.h) / obj->cur.geometry.h)), \
obj->cur.geometry.w, \ obj->cur.geometry.w, \
obj->cur.geometry.h, \ obj->cur.geometry.h, \
obj->cur.geometry.w, \ obj->cur.geometry.w, \
obj->cur.geometry.h, \ obj->cur.geometry.h, \
&it->text_props); &it->text_props);
/* shadows */ /* shadows */
shad_dst = shad_sz = dx = dy = haveshad = 0; 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 someone is clipping this obj - go calculate the clipper */
if (obj->cur.clipper) if (obj->cur.clipper)
{ {
if (obj->cur.cache.clip.dirty) if (obj->cur.cache.clip.dirty)
evas_object_clip_recalc(obj->cur.clipper); evas_object_clip_recalc(obj->cur.clipper);
obj->cur.clipper->func->render_pre(obj->cur.clipper); obj->cur.clipper->func->render_pre(obj->cur.clipper);
} }
/* now figure what changed and add draw rects /* now figure what changed and add draw rects
if it just became visible or invisible */ 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); was_v = evas_object_was_visible(obj);
if (is_v != was_v) if (is_v != was_v)
{ {
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes,
obj, is_v, was_v); obj, is_v, was_v);
goto done; goto done;
} }
if (obj->changed_map) 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 we restacked (layer or just within a layer) and dont clip anyone */
if (obj->restack) if (obj->restack)
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
obj); obj);
goto done; goto done;
} }
/* if it changed color */ /* if it changed color */
if ((obj->cur.color.r != obj->prev.color.r) || 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.b != obj->prev.color.b) ||
(obj->cur.color.a != obj->prev.color.a)) (obj->cur.color.a != obj->prev.color.a))
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
obj); obj);
goto done; goto done;
} }
/* if it changed geometry - and obviously not visibility or color /* if it changed geometry - and obviously not visibility or color
calculate differences since we have a constant color fill 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.w != obj->prev.geometry.w) ||
(obj->cur.geometry.h != obj->prev.geometry.h)) (obj->cur.geometry.h != obj->prev.geometry.h))
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
obj); obj);
goto done; goto done;
} }
if (obj->cur.render_op != obj->prev.render_op) if (obj->cur.render_op != obj->prev.render_op)
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
obj); obj);
goto done; goto done;
} }
if (obj->cur.scale != obj->prev.scale) if (obj->cur.scale != obj->prev.scale)
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
obj); obj);
goto done; goto done;
} }
if (o->changed) if (o->changed)
{ {
if ((o->cur.size != o->prev.size) || if ((o->cur.size != o->prev.size) ||
((o->cur.font != o->prev.font)) || ((o->cur.font != o->prev.font)) ||
((o->cur.utf8_text != o->prev.utf8_text)) || ((o->cur.utf8_text != o->prev.utf8_text)) ||
((o->cur.style != o->prev.style)) || ((o->cur.style != o->prev.style)) ||
((o->cur.shadow.r != o->prev.shadow.r)) || ((o->cur.shadow.r != o->prev.shadow.r)) ||
((o->cur.shadow.g != o->prev.shadow.g)) || ((o->cur.shadow.g != o->prev.shadow.g)) ||
((o->cur.shadow.b != o->prev.shadow.b)) || ((o->cur.shadow.b != o->prev.shadow.b)) ||
((o->cur.shadow.a != o->prev.shadow.a)) || ((o->cur.shadow.a != o->prev.shadow.a)) ||
((o->cur.outline.r != o->prev.outline.r)) || ((o->cur.outline.r != o->prev.outline.r)) ||
((o->cur.outline.g != o->prev.outline.g)) || ((o->cur.outline.g != o->prev.outline.g)) ||
((o->cur.outline.b != o->prev.outline.b)) || ((o->cur.outline.b != o->prev.outline.b)) ||
((o->cur.outline.a != o->prev.outline.a)) || ((o->cur.outline.a != o->prev.outline.a)) ||
((o->cur.glow.r != o->prev.glow.r)) || ((o->cur.glow.r != o->prev.glow.r)) ||
((o->cur.glow.g != o->prev.glow.g)) || ((o->cur.glow.g != o->prev.glow.g)) ||
((o->cur.glow.b != o->prev.glow.b)) || ((o->cur.glow.b != o->prev.glow.b)) ||
((o->cur.glow.a != o->prev.glow.a)) || ((o->cur.glow.a != o->prev.glow.a)) ||
((o->cur.glow2.r != o->prev.glow2.r)) || ((o->cur.glow2.r != o->prev.glow2.r)) ||
((o->cur.glow2.g != o->prev.glow2.g)) || ((o->cur.glow2.g != o->prev.glow2.g)) ||
((o->cur.glow2.b != o->prev.glow2.b)) || ((o->cur.glow2.b != o->prev.glow2.b)) ||
((o->cur.glow2.a != o->prev.glow2.a))) ((o->cur.glow2.a != o->prev.glow2.a)))
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
obj); obj);
goto done; goto done;
} }
} }
done: done:
evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes,
obj, is_v, was_v); obj, is_v, was_v);
} }
static void static void
@ -1873,10 +1873,10 @@ _evas_object_text_rehint(Evas_Object *obj)
o = (Evas_Object_Text *)(obj->object_data); o = (Evas_Object_Text *)(obj->object_data);
if (!o->font) return; if (!o->font) return;
evas_font_load_hinting_set(obj->layer->evas, o->font, 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, was = evas_object_is_in_output_rect(obj,
obj->layer->evas->pointer.x, obj->layer->evas->pointer.x,
obj->layer->evas->pointer.y, 1, 1); obj->layer->evas->pointer.y, 1, 1);
/* DO II */ /* DO II */
_evas_object_text_recalc(obj); _evas_object_text_recalc(obj);
o->changed = 1; o->changed = 1;
@ -1884,14 +1884,14 @@ _evas_object_text_rehint(Evas_Object *obj)
evas_object_clip_dirty(obj); evas_object_clip_dirty(obj);
evas_object_coords_recalc(obj); evas_object_coords_recalc(obj);
is = evas_object_is_in_output_rect(obj, is = evas_object_is_in_output_rect(obj,
obj->layer->evas->pointer.x, obj->layer->evas->pointer.x,
obj->layer->evas->pointer.y, 1, 1); obj->layer->evas->pointer.y, 1, 1);
if ((is || was) && obj->cur.visible) if ((is || was) && obj->cur.visible)
evas_event_feed_mouse_move(obj->layer->evas, evas_event_feed_mouse_move(obj->layer->evas,
obj->layer->evas->pointer.x, obj->layer->evas->pointer.x,
obj->layer->evas->pointer.y, obj->layer->evas->pointer.y,
obj->layer->evas->last_timestamp, obj->layer->evas->last_timestamp,
NULL); NULL);
evas_object_inform_call_resize(obj); evas_object_inform_call_resize(obj);
} }
@ -1915,22 +1915,22 @@ _evas_object_text_recalc(Evas_Object *obj)
if ((o->font) && (o->items)) if ((o->font) && (o->items))
{ {
int w, h; int w, h;
int l = 0, r = 0, t = 0, b = 0; int l = 0, r = 0, t = 0, b = 0;
w = _evas_object_text_horiz_advance_get(obj, o); w = _evas_object_text_horiz_advance_get(obj, o);
h = _evas_object_text_vert_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); evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b);
obj->cur.geometry.w = w + l + r; obj->cur.geometry.w = w + l + r;
obj->cur.geometry.h = h + t + b; obj->cur.geometry.h = h + t + b;
//// obj->cur.cache.geometry.validity = 0; //// obj->cur.cache.geometry.validity = 0;
} }
else else
{ {
int t = 0, b = 0; int t = 0, b = 0;
evas_text_style_pad_get(o->cur.style, NULL, NULL, &t, &b); evas_text_style_pad_get(o->cur.style, NULL, NULL, &t, &b);
obj->cur.geometry.w = 0; obj->cur.geometry.w = 0;
obj->cur.geometry.h = o->max_ascent + o->max_descent + t + b; obj->cur.geometry.h = o->max_ascent + o->max_descent + t + b;
//// obj->cur.cache.geometry.validity = 0; //// obj->cur.cache.geometry.validity = 0;
} }

View File

@ -414,9 +414,9 @@ struct _Evas_Object_Textblock_Format
} font; } font;
struct { struct {
struct { struct {
unsigned char r, g, b, a; unsigned char r, g, b, a;
} normal, underline, underline2, underline_dash, outline, shadow, glow, glow2, backing, } normal, underline, underline2, underline_dash, outline, shadow, glow, glow2, backing,
strikethrough; strikethrough;
} color; } color;
struct { struct {
int l, r; 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); if (ts->default_tag) free(ts->default_tag);
while (ts->tags) while (ts->tags)
{ {
Evas_Object_Style_Tag *tag; Evas_Object_Style_Tag *tag;
tag = (Evas_Object_Style_Tag *)ts->tags; 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)); 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.tag);
free(tag->tag.replace); free(tag->tag.replace);
free(tag); free(tag);
} }
ts->default_tag = NULL; ts->default_tag = NULL;
ts->tags = 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 */ /* Try the style tags */
EINA_INLIST_FOREACH(ts->tags, tag) EINA_INLIST_FOREACH(ts->tags, tag)
{ {
if (tag->tag.tag_len != tag_len) continue; if (tag->tag.tag_len != tag_len) continue;
if (!strncmp(tag->tag.tag, s, tag_len)) if (!strncmp(tag->tag.tag, s, tag_len))
{ {
*replace_len = tag->tag.replace_len; *replace_len = tag->tag.replace_len;
return tag->tag.replace; return tag->tag.replace;
} }
} }
/* Try the default tags */ /* Try the default tags */
@ -677,9 +677,9 @@ _nodes_clear(const Evas_Object *obj)
o = (Evas_Object_Textblock *)(obj->object_data); o = (Evas_Object_Textblock *)(obj->object_data);
while (o->text_nodes) 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( o->text_nodes = _NODE_TEXT(eina_inlist_remove(
EINA_INLIST_GET(o->text_nodes), EINA_INLIST_GET(n))); EINA_INLIST_GET(o->text_nodes), EINA_INLIST_GET(n)));
_evas_textblock_node_text_free(n); _evas_textblock_node_text_free(n);
@ -1876,8 +1876,8 @@ _layout_format_ascent_descent_adjust(const Evas_Object *obj,
if (fmt->font.font) if (fmt->font.font)
{ {
// ascent = c->ENFN->font_max_ascent_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); // descent = c->ENFN->font_max_descent_get(c->ENDT, fmt->font.font);
ascent = ENFN->font_ascent_get(ENDT, fmt->font.font); ascent = ENFN->font_ascent_get(ENDT, fmt->font.font);
descent = ENFN->font_descent_get(ENDT, fmt->font.font); descent = ENFN->font_descent_get(ENDT, fmt->font.font);
if (fmt->linesize > 0) if (fmt->linesize > 0)
@ -3599,7 +3599,7 @@ _layout_paragraph_reorder_lines(Evas_Object_Textblock_Paragraph *par)
static void static void
_layout_paragraph_render(Evas_Object_Textblock *o, _layout_paragraph_render(Evas_Object_Textblock *o,
Evas_Object_Textblock_Paragraph *par) Evas_Object_Textblock_Paragraph *par)
{ {
if (par->rendered) if (par->rendered)
return; return;
@ -4548,12 +4548,12 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text)
{ {
if (!key_start) if (!key_start)
{ {
if (!isspace((unsigned char)(*p))) if (!isspace((unsigned char)(*p)))
key_start = p; key_start = p;
} }
else if (!key_stop) else if (!key_stop)
{ {
if ((*p == '=') || (isspace((unsigned char)(*p)))) if ((*p == '=') || (isspace((unsigned char)(*p))))
key_stop = p; key_stop = p;
} }
else if (!val_start) 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); node = _NODE_TEXT(EINA_INLIST_GET(node)->last);
cur->node = node; cur->node = node;
cur->pos = 0; cur->pos = 0;
evas_textblock_cursor_paragraph_char_last(cur); evas_textblock_cursor_paragraph_char_last(cur);
} }
else else
{ {
cur->node = NULL; cur->node = NULL;
cur->pos = 0; cur->pos = 0;
} }
} }
@ -6300,8 +6300,8 @@ evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur)
} }
if (it) if (it)
{ {
cur->pos = it->text_pos; cur->pos = it->text_pos;
cur->node = it->text_node; cur->node = it->text_node;
} }
} }
@ -6336,8 +6336,8 @@ evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur)
{ {
size_t ind; size_t ind;
cur->node = it->text_node; cur->node = it->text_node;
cur->pos = it->text_pos; cur->pos = it->text_pos;
if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
{ {
ind = _ITEM_TEXT(it)->text_props.text_len - 1; 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; it = (Evas_Object_Textblock_Item *)ln->items;
if (it) if (it)
{ {
cur->pos = it->text_pos; cur->pos = it->text_pos;
cur->node = it->text_node; cur->node = it->text_node;
} }
else 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)) return 0;
if (cur1->node == cur2->node) if (cur1->node == cur2->node)
{ {
if (cur1->pos < cur2->pos) return -1; /* cur1 < cur2 */ if (cur1->pos < cur2->pos) return -1; /* cur1 < cur2 */
else if (cur1->pos > cur2->pos) return 1; /* cur2 < cur1 */ else if (cur1->pos > cur2->pos) return 1; /* cur2 < cur1 */
return 0; return 0;
} }
for (l1 = EINA_INLIST_GET(cur1->node), for (l1 = EINA_INLIST_GET(cur1->node),
l2 = EINA_INLIST_GET(cur1->node); (l1) || (l2);) l2 = EINA_INLIST_GET(cur1->node); (l1) || (l2);)
{ {
if (l1 == EINA_INLIST_GET(cur2->node)) return 1; /* cur2 < cur 1 */ 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 (l2 == EINA_INLIST_GET(cur2->node)) return -1; /* cur1 < cur 2 */
else if (!l1) return -1; /* cur1 < cur 2 */ else if (!l1) return -1; /* cur1 < cur 2 */
else if (!l2) return 1; /* cur2 < cur 1 */ else if (!l2) return 1; /* cur2 < cur 1 */
l1 = l1->prev; l1 = l1->prev;
l2 = l2->next; l2 = l2->next;
} }
return 0; return 0;
} }
@ -7146,8 +7146,8 @@ _evas_textblock_changed(Evas_Object_Textblock *o, Evas_Object *obj)
o->content_changed = 1; o->content_changed = 1;
if (o->markup_text) if (o->markup_text)
{ {
free(o->markup_text); free(o->markup_text);
o->markup_text = NULL; o->markup_text = NULL;
} }
evas_object_change(obj); evas_object_change(obj);
@ -7424,14 +7424,14 @@ evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *form
format = n->format; format = n->format;
if (!cur->node) 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(o->format_nodes),
EINA_INLIST_GET(n))); EINA_INLIST_GET(n)));
cur->pos = 0; cur->pos = 0;
n->text_node = (EINA_INLIST_GET(n)->prev) ? n->text_node = (EINA_INLIST_GET(n)->prev) ?
_NODE_FORMAT(EINA_INLIST_GET(n)->prev)->text_node : _NODE_FORMAT(EINA_INLIST_GET(n)->prev)->text_node :
o->text_nodes; o->text_nodes;
cur->node = n->text_node; cur->node = n->text_node;
} }
else else
{ {
@ -7616,12 +7616,12 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur)
if (cur->pos == eina_ustrbuf_length_get(n->unicode)) if (cur->pos == eina_ustrbuf_length_get(n->unicode))
{ {
n2 = _NODE_TEXT(EINA_INLIST_GET(n)->next); n2 = _NODE_TEXT(EINA_INLIST_GET(n)->next);
if (n2) if (n2)
{ {
cur->node = n2; cur->node = n2;
cur->pos = 0; cur->pos = 0;
} }
} }
_evas_textblock_cursors_update_offset(cur, n, ppos, -(ind - ppos)); _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); o = (Evas_Object_Textblock *)(cur1->obj->object_data);
if (evas_textblock_cursor_compare(cur1, cur2) > 0) if (evas_textblock_cursor_compare(cur1, cur2) > 0)
{ {
Evas_Textblock_Cursor *tc; Evas_Textblock_Cursor *tc;
tc = cur1; tc = cur1;
cur1 = cur2; cur1 = cur2;
cur2 = tc; cur2 = tc;
} }
n1 = cur1->node; n1 = cur1->node;
n2 = cur2->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 (cur1->obj != _cur2->obj) return NULL;
if (evas_textblock_cursor_compare(cur1, _cur2) > 0) if (evas_textblock_cursor_compare(cur1, _cur2) > 0)
{ {
const Evas_Textblock_Cursor *tc; const Evas_Textblock_Cursor *tc;
tc = cur1; tc = cur1;
cur1 = _cur2; cur1 = _cur2;
_cur2 = tc; _cur2 = tc;
} }
/* Work on a local copy of the cur */ /* Work on a local copy of the cur */
cur2 = alloca(sizeof(Evas_Textblock_Cursor)); 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 (cur1->obj != _cur2->obj) return NULL;
if (evas_textblock_cursor_compare(cur1, _cur2) > 0) if (evas_textblock_cursor_compare(cur1, _cur2) > 0)
{ {
const Evas_Textblock_Cursor *tc; const Evas_Textblock_Cursor *tc;
tc = cur1; tc = cur1;
cur1 = _cur2; cur1 = _cur2;
_cur2 = tc; _cur2 = tc;
} }
n1 = cur1->node; n1 = cur1->node;
n2 = _cur2->node; n2 = _cur2->node;
@ -8364,8 +8364,8 @@ _evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *dat
{ {
x = ln->x; x = ln->x;
} }
y = ln->par->y + ln->y; y = ln->par->y + ln->y;
h = ln->h; h = ln->h;
} }
else if (ln && fi) else if (ln && fi)
{ {
@ -8403,7 +8403,7 @@ _evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *dat
} }
else else
{ {
return -1; return -1;
} }
if (cx) *cx = x; if (cx) *cx = x;
if (cy) *cy = y; 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 (!o->formatted.valid) _relayout(cur1->obj);
if (evas_textblock_cursor_compare(cur1, cur2) > 0) if (evas_textblock_cursor_compare(cur1, cur2) > 0)
{ {
const Evas_Textblock_Cursor *tc; const Evas_Textblock_Cursor *tc;
tc = cur1; tc = cur1;
cur1 = cur2; cur1 = cur2;
cur2 = tc; cur2 = tc;
} }
ln1 = ln2 = NULL; ln1 = ln2 = NULL;
@ -9017,12 +9017,12 @@ evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, cons
} }
while (lni && (lni != ln2)) while (lni && (lni != ln2))
{ {
tr = calloc(1, sizeof(Evas_Textblock_Rectangle)); tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
rects = eina_list_append(rects, tr); rects = eina_list_append(rects, tr);
tr->x = lni->x; tr->x = lni->x;
tr->y = lni->par->y + lni->y; tr->y = lni->par->y + lni->y;
tr->h = lni->h; tr->h = lni->h;
tr->w = lni->w; tr->w = lni->w;
plni = lni; plni = lni;
lni = (Evas_Object_Textblock_Line *) EINA_INLIST_GET(lni)->next; lni = (Evas_Object_Textblock_Line *) EINA_INLIST_GET(lni)->next;
if (!lni && (plni->par != ln2->par)) if (!lni && (plni->par != ln2->par))
@ -9107,8 +9107,8 @@ _evas_object_textblock_clear_all(Evas_Object *obj)
TB_HEAD(); TB_HEAD();
if (o->paragraphs) if (o->paragraphs)
{ {
_paragraphs_free(obj, o->paragraphs); _paragraphs_free(obj, o->paragraphs);
o->paragraphs = NULL; o->paragraphs = NULL;
} }
_nodes_clear(obj); _nodes_clear(obj);
@ -9116,8 +9116,8 @@ _evas_object_textblock_clear_all(Evas_Object *obj)
o->cursor->pos = 0; o->cursor->pos = 0;
EINA_LIST_FOREACH(o->cursors, l, cur) EINA_LIST_FOREACH(o->cursors, l, cur)
{ {
cur->node = NULL; cur->node = NULL;
cur->pos = 0; 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.w = wmax;
o->native.h = hmax; o->native.h = hmax;
o->native.valid = 1; o->native.valid = 1;
o->content_changed = 0; o->content_changed = 0;
o->format_changed = EINA_FALSE; o->format_changed = EINA_FALSE;
} }
@ -9383,11 +9383,11 @@ evas_object_textblock_free(Evas_Object *obj)
free(o->cursor); free(o->cursor);
while (o->cursors) while (o->cursors)
{ {
Evas_Textblock_Cursor *cur; Evas_Textblock_Cursor *cur;
cur = (Evas_Textblock_Cursor *)o->cursors->data; cur = (Evas_Textblock_Cursor *)o->cursors->data;
o->cursors = eina_list_remove_list(o->cursors, o->cursors); o->cursors = eina_list_remove_list(o->cursors, o->cursors);
free(cur); free(cur);
} }
if (o->repch) eina_stringshare_del(o->repch); if (o->repch) eina_stringshare_del(o->repch);
if (o->ellip_ti) _item_free(obj, NULL, _ITEM(o->ellip_ti)); 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; int cx, cy, cw, ch, clip;
const char vals[5][5] = const char vals[5][5] =
{ {
{0, 1, 2, 1, 0}, {0, 1, 2, 1, 0},
{1, 3, 4, 3, 1}, {1, 3, 4, 3, 1},
{2, 4, 5, 4, 2}, {2, 4, 5, 4, 2},
{1, 3, 4, 3, 1}, {1, 3, 4, 3, 1},
{0, 1, 2, 1, 0} {0, 1, 2, 1, 0}
}; };
/* render object to surface with context, and offxet by x,y */ /* render object to surface with context, and offxet by x,y */
o = (Evas_Object_Textblock *)(obj->object_data); o = (Evas_Object_Textblock *)(obj->object_data);
obj->layer->evas->engine.func->context_multiplier_unset(output, obj->layer->evas->engine.func->context_multiplier_unset(output,
context); context);
/* FIXME: This clipping is just until we fix inset handling correctly. */ /* FIXME: This clipping is just until we fix inset handling correctly. */
ENFN->context_clip_clip(output, context, ENFN->context_clip_clip(output, context,
obj->cur.geometry.x + x, obj->cur.geometry.x + x,
@ -9813,26 +9813,26 @@ evas_object_textblock_render_pre(Evas_Object *obj)
(obj->cur.geometry.h != o->last_h)))) (obj->cur.geometry.h != o->last_h))))
{ {
_relayout(obj); _relayout(obj);
o->redraw = 0; o->redraw = 0;
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
is_v = evas_object_is_visible(obj); is_v = evas_object_is_visible(obj);
was_v = evas_object_was_visible(obj); was_v = evas_object_was_visible(obj);
goto done; goto done;
} }
if (o->redraw) if (o->redraw)
{ {
o->redraw = 0; o->redraw = 0;
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
is_v = evas_object_is_visible(obj); is_v = evas_object_is_visible(obj);
was_v = evas_object_was_visible(obj); was_v = evas_object_was_visible(obj);
goto done; goto done;
} }
/* if someone is clipping this obj - go calculate the clipper */ /* if someone is clipping this obj - go calculate the clipper */
if (obj->cur.clipper) if (obj->cur.clipper)
{ {
if (obj->cur.cache.clip.dirty) if (obj->cur.cache.clip.dirty)
evas_object_clip_recalc(obj->cur.clipper); evas_object_clip_recalc(obj->cur.clipper);
obj->cur.clipper->func->render_pre(obj->cur.clipper); obj->cur.clipper->func->render_pre(obj->cur.clipper);
} }
/* now figure what changed and add draw rects */ /* now figure what changed and add draw rects */
/* if it just became visible or invisible */ /* 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); was_v = evas_object_was_visible(obj);
if (is_v != was_v) if (is_v != was_v)
{ {
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
goto done; goto done;
} }
if (obj->changed_map) 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 we restacked (layer or just within a layer) and don't clip anyone */
if (obj->restack) if (obj->restack)
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
goto done; goto done;
} }
/* if it changed color */ /* if it changed color */
if ((obj->cur.color.r != obj->prev.color.r) || 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.b != obj->prev.color.b) ||
(obj->cur.color.a != obj->prev.color.a)) (obj->cur.color.a != obj->prev.color.a))
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
goto done; goto done;
} }
/* if it changed geometry - and obviously not visibility or color */ /* if it changed geometry - and obviously not visibility or color */
/* calculate differences since we have a constant color fill */ /* 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.w != obj->prev.geometry.w) ||
(obj->cur.geometry.h != obj->prev.geometry.h)) (obj->cur.geometry.h != obj->prev.geometry.h))
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
goto done; goto done;
} }
done: done:
evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v); 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)) && (((o->valign != 0.0) || (o->have_ellipsis)) &&
(obj->cur.geometry.h != o->last_h))) (obj->cur.geometry.h != o->last_h)))
{ {
o->formatted.valid = 0; o->formatted.valid = 0;
o->changed = 1; o->changed = 1;
} }
} }

View File

@ -721,9 +721,9 @@ evas_object_textgrid_render_pre(Evas_Object *obj)
/* if someone is clipping this obj - go calculate the clipper */ /* if someone is clipping this obj - go calculate the clipper */
if (obj->cur.clipper) if (obj->cur.clipper)
{ {
if (obj->cur.cache.clip.dirty) if (obj->cur.cache.clip.dirty)
evas_object_clip_recalc(obj->cur.clipper); evas_object_clip_recalc(obj->cur.clipper);
obj->cur.clipper->func->render_pre(obj->cur.clipper); obj->cur.clipper->func->render_pre(obj->cur.clipper);
} }
/* now figure what changed and add draw rects */ /* now figure what changed and add draw rects */
/* if it just became visible or invisible */ /* 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); was_v = evas_object_was_visible(obj);
if (is_v != was_v) if (is_v != was_v)
{ {
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
goto done; goto done;
} }
if (obj->changed_map) 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 we restacked (layer or just within a layer) and dont clip anyone */
if (obj->restack) if (obj->restack)
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
goto done; goto done;
} }
/* if it changed color */ /* if it changed color */
if ((obj->cur.color.r != obj->prev.color.r) || 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.b != obj->prev.color.b) ||
(obj->cur.color.a != obj->prev.color.a)) (obj->cur.color.a != obj->prev.color.a))
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
goto done; goto done;
} }
/* if it changed geometry - and obviously not visibility or color */ /* if it changed geometry - and obviously not visibility or color */
/* calculate differences since we have a constant color fill */ /* 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.w != obj->prev.geometry.w) ||
(obj->cur.geometry.h != obj->prev.geometry.h)) (obj->cur.geometry.h != obj->prev.geometry.h))
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
goto done; goto done;
} }
if (obj->cur.render_op != obj->prev.render_op) if (obj->cur.render_op != obj->prev.render_op)
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
goto done; goto done;
} }
if (obj->cur.scale != obj->prev.scale) if (obj->cur.scale != obj->prev.scale)
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
goto done; goto done;
} }
if (o->changed) if (o->changed)