diff options
author | David Walter Seikel | 2012-04-22 09:19:23 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-04-22 09:19:23 +1000 |
commit | c963d75dfdeec11f82e79e727062fbf89afa2c04 (patch) | |
tree | 895633dbf641110be46f117c29890c49b3ffc0bd /libraries/evas/src/lib/canvas | |
parent | Adding the new extantz viewer and grid manager. (diff) | |
download | SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.zip SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.gz SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.bz2 SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.xz |
Update EFL to latest beta.
Diffstat (limited to '')
-rw-r--r-- | libraries/evas/src/lib/canvas/Makefile.am | 1 | ||||
-rw-r--r-- | libraries/evas/src/lib/canvas/Makefile.in | 15 | ||||
-rw-r--r-- | libraries/evas/src/lib/canvas/evas_callbacks.c | 9 | ||||
-rw-r--r-- | libraries/evas/src/lib/canvas/evas_events.c | 17 | ||||
-rw-r--r-- | libraries/evas/src/lib/canvas/evas_map.c | 34 | ||||
-rw-r--r-- | libraries/evas/src/lib/canvas/evas_object_image.c | 40 | ||||
-rw-r--r-- | libraries/evas/src/lib/canvas/evas_object_main.c | 19 | ||||
-rw-r--r-- | libraries/evas/src/lib/canvas/evas_object_textblock.c | 180 | ||||
-rw-r--r-- | libraries/evas/src/lib/canvas/evas_render.c | 63 |
9 files changed, 277 insertions, 101 deletions
diff --git a/libraries/evas/src/lib/canvas/Makefile.am b/libraries/evas/src/lib/canvas/Makefile.am index 79544aa..e302668 100644 --- a/libraries/evas/src/lib/canvas/Makefile.am +++ b/libraries/evas/src/lib/canvas/Makefile.am | |||
@@ -8,7 +8,6 @@ AM_CPPFLAGS = \ | |||
8 | -DPACKAGE_BIN_DIR=\"$(bindir)\" \ | 8 | -DPACKAGE_BIN_DIR=\"$(bindir)\" \ |
9 | -DPACKAGE_LIB_DIR=\"$(libdir)\" \ | 9 | -DPACKAGE_LIB_DIR=\"$(libdir)\" \ |
10 | -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ | 10 | -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ |
11 | @WIN32_CPPFLAGS@ \ | ||
12 | @FREETYPE_CFLAGS@ \ | 11 | @FREETYPE_CFLAGS@ \ |
13 | @EET_CFLAGS@ \ | 12 | @EET_CFLAGS@ \ |
14 | @FONTCONFIG_CFLAGS@ \ | 13 | @FONTCONFIG_CFLAGS@ \ |
diff --git a/libraries/evas/src/lib/canvas/Makefile.in b/libraries/evas/src/lib/canvas/Makefile.in index 75da67a..c7e48bc 100644 --- a/libraries/evas/src/lib/canvas/Makefile.in +++ b/libraries/evas/src/lib/canvas/Makefile.in | |||
@@ -161,6 +161,8 @@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ | |||
161 | EVIL_CFLAGS = @EVIL_CFLAGS@ | 161 | EVIL_CFLAGS = @EVIL_CFLAGS@ |
162 | EVIL_LIBS = @EVIL_LIBS@ | 162 | EVIL_LIBS = @EVIL_LIBS@ |
163 | EXEEXT = @EXEEXT@ | 163 | EXEEXT = @EXEEXT@ |
164 | EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ | ||
165 | EXOTIC_LIBS = @EXOTIC_LIBS@ | ||
164 | FGREP = @FGREP@ | 166 | FGREP = @FGREP@ |
165 | FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ | 167 | FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ |
166 | FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ | 168 | FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ |
@@ -211,6 +213,8 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ | |||
211 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ | 213 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ |
212 | PIXMAN_LIBS = @PIXMAN_LIBS@ | 214 | PIXMAN_LIBS = @PIXMAN_LIBS@ |
213 | PKG_CONFIG = @PKG_CONFIG@ | 215 | PKG_CONFIG = @PKG_CONFIG@ |
216 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
217 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
214 | PNG_CFLAGS = @PNG_CFLAGS@ | 218 | PNG_CFLAGS = @PNG_CFLAGS@ |
215 | PNG_LIBS = @PNG_LIBS@ | 219 | PNG_LIBS = @PNG_LIBS@ |
216 | RANLIB = @RANLIB@ | 220 | RANLIB = @RANLIB@ |
@@ -229,8 +233,6 @@ VERSION = @VERSION@ | |||
229 | VMAJ = @VMAJ@ | 233 | VMAJ = @VMAJ@ |
230 | WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ | 234 | WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ |
231 | WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ | 235 | WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ |
232 | WIN32_CFLAGS = @WIN32_CFLAGS@ | ||
233 | WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ | ||
234 | XCB_CFLAGS = @XCB_CFLAGS@ | 236 | XCB_CFLAGS = @XCB_CFLAGS@ |
235 | XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ | 237 | XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ |
236 | XCB_GL_LIBS = @XCB_GL_LIBS@ | 238 | XCB_GL_LIBS = @XCB_GL_LIBS@ |
@@ -304,8 +306,6 @@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ | |||
304 | evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ | 306 | evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ |
305 | evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ | 307 | evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ |
306 | evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ | 308 | evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ |
307 | evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ | ||
308 | evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ | ||
309 | evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ | 309 | evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ |
310 | evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ | 310 | evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ |
311 | evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ | 311 | evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ |
@@ -393,10 +393,9 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/src/lib \ | |||
393 | -I$(top_srcdir)/src/lib/include -I$(top_srcdir)/src/lib/cserve \ | 393 | -I$(top_srcdir)/src/lib/include -I$(top_srcdir)/src/lib/cserve \ |
394 | -DPACKAGE_BIN_DIR=\"$(bindir)\" \ | 394 | -DPACKAGE_BIN_DIR=\"$(bindir)\" \ |
395 | -DPACKAGE_LIB_DIR=\"$(libdir)\" \ | 395 | -DPACKAGE_LIB_DIR=\"$(libdir)\" \ |
396 | -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" @WIN32_CPPFLAGS@ \ | 396 | -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" @FREETYPE_CFLAGS@ \ |
397 | @FREETYPE_CFLAGS@ @EET_CFLAGS@ @FONTCONFIG_CFLAGS@ \ | 397 | @EET_CFLAGS@ @FONTCONFIG_CFLAGS@ @EVAS_CFLAGS@ @EINA_CFLAGS@ \ |
398 | @EVAS_CFLAGS@ @EINA_CFLAGS@ @EVIL_CFLAGS@ @PIXMAN_CFLAGS@ \ | 398 | @EVIL_CFLAGS@ @PIXMAN_CFLAGS@ $(am__append_1) |
399 | $(am__append_1) | ||
400 | noinst_LTLIBRARIES = libevas_canvas.la | 399 | noinst_LTLIBRARIES = libevas_canvas.la |
401 | libevas_canvas_la_SOURCES = \ | 400 | libevas_canvas_la_SOURCES = \ |
402 | evas_callbacks.c \ | 401 | evas_callbacks.c \ |
diff --git a/libraries/evas/src/lib/canvas/evas_callbacks.c b/libraries/evas/src/lib/canvas/evas_callbacks.c index 93f34f2..47cfb0c 100644 --- a/libraries/evas/src/lib/canvas/evas_callbacks.c +++ b/libraries/evas/src/lib/canvas/evas_callbacks.c | |||
@@ -172,6 +172,15 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void | |||
172 | if ((obj->delete_me) || (!obj->layer)) return; | 172 | if ((obj->delete_me) || (!obj->layer)) return; |
173 | if ((obj->last_event == event_id) && | 173 | if ((obj->last_event == event_id) && |
174 | (obj->last_event_type == type)) return; | 174 | (obj->last_event_type == type)) return; |
175 | if (obj->last_event > event_id) | ||
176 | { | ||
177 | if ((obj->last_event_type == EVAS_CALLBACK_MOUSE_OUT) && | ||
178 | ((type >= EVAS_CALLBACK_MOUSE_DOWN) && | ||
179 | (type <= EVAS_CALLBACK_MULTI_MOVE))) | ||
180 | { | ||
181 | return; | ||
182 | } | ||
183 | } | ||
175 | obj->last_event = event_id; | 184 | obj->last_event = event_id; |
176 | obj->last_event_type = type; | 185 | obj->last_event_type = type; |
177 | if (!(e = obj->layer->evas)) return; | 186 | if (!(e = obj->layer->evas)) return; |
diff --git a/libraries/evas/src/lib/canvas/evas_events.c b/libraries/evas/src/lib/canvas/evas_events.c index 9b7077e..1ee8388 100644 --- a/libraries/evas/src/lib/canvas/evas_events.c +++ b/libraries/evas/src/lib/canvas/evas_events.c | |||
@@ -486,8 +486,9 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t | |||
486 | } | 486 | } |
487 | if (!obj->delete_me) | 487 | if (!obj->delete_me) |
488 | { | 488 | { |
489 | if (e->events_frozen <= 0) | 489 | if ((e->events_frozen <= 0) && |
490 | evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_UP, &ev, event_id); | 490 | (!evas_event_freezes_through(obj))) |
491 | evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_UP, &ev, event_id); | ||
491 | } | 492 | } |
492 | if (e->delete_me) break; | 493 | if (e->delete_me) break; |
493 | if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) | 494 | if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) |
@@ -1668,18 +1669,6 @@ evas_object_freeze_events_set(Evas_Object *obj, Eina_Bool freeze) | |||
1668 | if (obj->freeze_events == freeze) return; | 1669 | if (obj->freeze_events == freeze) return; |
1669 | obj->freeze_events = freeze; | 1670 | obj->freeze_events = freeze; |
1670 | evas_object_smart_member_cache_invalidate(obj, EINA_FALSE, EINA_TRUE); | 1671 | evas_object_smart_member_cache_invalidate(obj, EINA_FALSE, EINA_TRUE); |
1671 | if (evas_object_is_in_output_rect(obj, | ||
1672 | obj->layer->evas->pointer.x, | ||
1673 | obj->layer->evas->pointer.y, 1, 1) && | ||
1674 | ((!obj->precise_is_inside) || | ||
1675 | (evas_object_is_inside(obj, | ||
1676 | obj->layer->evas->pointer.x, | ||
1677 | obj->layer->evas->pointer.y)))) | ||
1678 | evas_event_feed_mouse_move(obj->layer->evas, | ||
1679 | obj->layer->evas->pointer.x, | ||
1680 | obj->layer->evas->pointer.y, | ||
1681 | obj->layer->evas->last_timestamp, | ||
1682 | NULL); | ||
1683 | } | 1672 | } |
1684 | 1673 | ||
1685 | EAPI Eina_Bool | 1674 | EAPI Eina_Bool |
diff --git a/libraries/evas/src/lib/canvas/evas_map.c b/libraries/evas/src/lib/canvas/evas_map.c index 2359d5a..5dcb760 100644 --- a/libraries/evas/src/lib/canvas/evas_map.c +++ b/libraries/evas/src/lib/canvas/evas_map.c | |||
@@ -35,7 +35,7 @@ _evas_map_calc_geom_change(Evas_Object *obj) | |||
35 | static void | 35 | static void |
36 | _evas_map_calc_map_geometry(Evas_Object *obj) | 36 | _evas_map_calc_map_geometry(Evas_Object *obj) |
37 | { | 37 | { |
38 | Evas_Coord x1, x2, y1, y2; | 38 | Evas_Coord x1, x2, yy1, yy2; |
39 | const Evas_Map_Point *p, *p_end; | 39 | const Evas_Map_Point *p, *p_end; |
40 | Eina_Bool ch = EINA_FALSE; | 40 | Eina_Bool ch = EINA_FALSE; |
41 | 41 | ||
@@ -82,7 +82,7 @@ _evas_map_calc_map_geometry(Evas_Object *obj) | |||
82 | p = obj->cur.map->points; | 82 | p = obj->cur.map->points; |
83 | p_end = p + obj->cur.map->count; | 83 | p_end = p + obj->cur.map->count; |
84 | x1 = x2 = lround(p->x); | 84 | x1 = x2 = lround(p->x); |
85 | y1 = y2 = lround(p->y); | 85 | yy1 = yy2 = lround(p->y); |
86 | p++; | 86 | p++; |
87 | for (; p < p_end; p++) | 87 | for (; p < p_end; p++) |
88 | { | 88 | { |
@@ -92,21 +92,21 @@ _evas_map_calc_map_geometry(Evas_Object *obj) | |||
92 | y = lround(p->y); | 92 | y = lround(p->y); |
93 | if (x < x1) x1 = x; | 93 | if (x < x1) x1 = x; |
94 | if (x > x2) x2 = x; | 94 | if (x > x2) x2 = x; |
95 | if (y < y1) y1 = y; | 95 | if (y < yy1) yy1 = y; |
96 | if (y > y2) y2 = y; | 96 | if (y > yy2) yy2 = y; |
97 | } | 97 | } |
98 | // this causes clip-out bugs now mapped objs canbe opaque!!! | 98 | // this causes clip-out bugs now mapped objs canbe opaque!!! |
99 | // // add 1 pixel of fuzz around the map region to ensure updates are correct | 99 | // // add 1 pixel of fuzz around the map region to ensure updates are correct |
100 | // x1 -= 1; y1 -= 1; | 100 | // x1 -= 1; yy1 -= 1; |
101 | // x2 += 1; y2 += 1; | 101 | // x2 += 1; yy2 += 1; |
102 | if (obj->cur.map->normal_geometry.x != x1) ch = 1; | 102 | if (obj->cur.map->normal_geometry.x != x1) ch = 1; |
103 | if (obj->cur.map->normal_geometry.y != y1) ch = 1; | 103 | if (obj->cur.map->normal_geometry.y != yy1) ch = 1; |
104 | if (obj->cur.map->normal_geometry.w != (x2 - x1)) ch = 1; | 104 | if (obj->cur.map->normal_geometry.w != (x2 - x1)) ch = 1; |
105 | if (obj->cur.map->normal_geometry.h != (y2 - y1)) ch = 1; | 105 | if (obj->cur.map->normal_geometry.h != (yy2 - yy1)) ch = 1; |
106 | obj->cur.map->normal_geometry.x = x1; | 106 | obj->cur.map->normal_geometry.x = x1; |
107 | obj->cur.map->normal_geometry.y = y1; | 107 | obj->cur.map->normal_geometry.y = yy1; |
108 | obj->cur.map->normal_geometry.w = (x2 - x1); | 108 | obj->cur.map->normal_geometry.w = (x2 - x1); |
109 | obj->cur.map->normal_geometry.h = (y2 - y1); | 109 | obj->cur.map->normal_geometry.h = (yy2 - yy1); |
110 | if (ch) _evas_map_calc_geom_change(obj); | 110 | if (ch) _evas_map_calc_geom_change(obj); |
111 | } | 111 | } |
112 | 112 | ||
@@ -374,9 +374,11 @@ evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled) | |||
374 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | 374 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); |
375 | return; | 375 | return; |
376 | MAGIC_CHECK_END(); | 376 | MAGIC_CHECK_END(); |
377 | Eina_Bool pchange = EINA_FALSE; | ||
377 | 378 | ||
378 | enabled = !!enabled; | 379 | enabled = !!enabled; |
379 | if (obj->cur.usemap == enabled) return; | 380 | if (obj->cur.usemap == enabled) return; |
381 | pchange = obj->changed; | ||
380 | obj->cur.usemap = enabled; | 382 | obj->cur.usemap = enabled; |
381 | if (enabled) | 383 | if (enabled) |
382 | { | 384 | { |
@@ -405,6 +407,8 @@ evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled) | |||
405 | /* This is a bit heavy handed, but it fixes the case of same geometry, but | 407 | /* This is a bit heavy handed, but it fixes the case of same geometry, but |
406 | * changed colour or UV settings. */ | 408 | * changed colour or UV settings. */ |
407 | evas_object_change(obj); | 409 | evas_object_change(obj); |
410 | if (!obj->changed_pchange) obj->changed_pchange = pchange; | ||
411 | obj->changed_map = EINA_TRUE; | ||
408 | } | 412 | } |
409 | 413 | ||
410 | EAPI Eina_Bool | 414 | EAPI Eina_Bool |
@@ -896,7 +900,7 @@ evas_map_util_3d_lighting(Evas_Map *m, | |||
896 | for (i = 0; i < m->count; i++) | 900 | for (i = 0; i < m->count; i++) |
897 | { | 901 | { |
898 | double x, y, z; | 902 | double x, y, z; |
899 | double nx, ny, nz, x1, y1, z1, x2, y2, z2, ln, br; | 903 | double nx, ny, nz, x1, yy1, z1, x2, yy2, z2, ln, br; |
900 | int h, j, mr, mg, mb; | 904 | int h, j, mr, mg, mb; |
901 | 905 | ||
902 | x = m->points[i].x; | 906 | x = m->points[i].x; |
@@ -907,15 +911,15 @@ evas_map_util_3d_lighting(Evas_Map *m, | |||
907 | j = (i + 1) % 4 + (i & ~0x3); // next point | 911 | j = (i + 1) % 4 + (i & ~0x3); // next point |
908 | 912 | ||
909 | x1 = m->points[h].x - x; | 913 | x1 = m->points[h].x - x; |
910 | y1 = m->points[h].y - y; | 914 | yy1 = m->points[h].y - y; |
911 | z1 = m->points[h].z - z; | 915 | z1 = m->points[h].z - z; |
912 | 916 | ||
913 | x2 = m->points[j].x - x; | 917 | x2 = m->points[j].x - x; |
914 | y2 = m->points[j].y - y; | 918 | yy2 = m->points[j].y - y; |
915 | z2 = m->points[j].z - z; | 919 | z2 = m->points[j].z - z; |
916 | nx = (y1 * z2) - (z1 * y2); | 920 | nx = (yy1 * z2) - (z1 * yy2); |
917 | ny = (z1 * x2) - (x1 * z2); | 921 | ny = (z1 * x2) - (x1 * z2); |
918 | nz = (x1 * y2) - (y1 * x2); | 922 | nz = (x1 * yy2) - (yy1 * x2); |
919 | 923 | ||
920 | ln = (nx * nx) + (ny * ny) + (nz * nz); | 924 | ln = (nx * nx) + (ny * ny) + (nz * nz); |
921 | ln = sqrt(ln); | 925 | ln = sqrt(ln); |
diff --git a/libraries/evas/src/lib/canvas/evas_object_image.c b/libraries/evas/src/lib/canvas/evas_object_image.c index d9f6378..4ebea08 100644 --- a/libraries/evas/src/lib/canvas/evas_object_image.c +++ b/libraries/evas/src/lib/canvas/evas_object_image.c | |||
@@ -2908,11 +2908,31 @@ evas_object_image_render(Evas_Object *obj, void *output, void *context, void *su | |||
2908 | { | 2908 | { |
2909 | Evas_Coord idw, idh, idx, idy; | 2909 | Evas_Coord idw, idh, idx, idy; |
2910 | int ix, iy, iw, ih; | 2910 | int ix, iy, iw, ih; |
2911 | int img_set = 0; | ||
2911 | 2912 | ||
2912 | if (o->dirty_pixels) | 2913 | if (o->dirty_pixels) |
2913 | { | 2914 | { |
2914 | if (o->func.get_pixels) | 2915 | if (o->func.get_pixels) |
2915 | { | 2916 | { |
2917 | // Set img object for direct rendering optimization | ||
2918 | // Check for image w/h against image geometry w/h | ||
2919 | // Check for image color r,g,b,a = {255,255,255,255} | ||
2920 | // Check and make sure that there are no maps. | ||
2921 | if ( (obj->cur.geometry.w == o->cur.image.w) && | ||
2922 | (obj->cur.geometry.h == o->cur.image.h) && | ||
2923 | (obj->cur.color.r == 255) && | ||
2924 | (obj->cur.color.g == 255) && | ||
2925 | (obj->cur.color.b == 255) && | ||
2926 | (obj->cur.color.a == 255) && | ||
2927 | (!obj->cur.map) ) | ||
2928 | { | ||
2929 | if (obj->layer->evas->engine.func->gl_img_obj_set) | ||
2930 | { | ||
2931 | obj->layer->evas->engine.func->gl_img_obj_set(output, obj, o->cur.has_alpha); | ||
2932 | img_set = 1; | ||
2933 | } | ||
2934 | } | ||
2935 | |||
2916 | o->func.get_pixels(o->func.get_pixels_data, obj); | 2936 | o->func.get_pixels(o->func.get_pixels_data, obj); |
2917 | if (o->engine_data != pixels) | 2937 | if (o->engine_data != pixels) |
2918 | pixels = o->engine_data; | 2938 | pixels = o->engine_data; |
@@ -3152,7 +3172,17 @@ evas_object_image_render(Evas_Object *obj, void *output, void *context, void *su | |||
3152 | idy = ydy; | 3172 | idy = ydy; |
3153 | if (dobreak_w) break; | 3173 | if (dobreak_w) break; |
3154 | } | 3174 | } |
3155 | } | 3175 | } |
3176 | |||
3177 | // Unset img object | ||
3178 | if (img_set) | ||
3179 | { | ||
3180 | if (obj->layer->evas->engine.func->gl_img_obj_set) | ||
3181 | { | ||
3182 | obj->layer->evas->engine.func->gl_img_obj_set(output, NULL, 0); | ||
3183 | img_set = 0; | ||
3184 | } | ||
3185 | } | ||
3156 | } | 3186 | } |
3157 | } | 3187 | } |
3158 | 3188 | ||
@@ -3371,10 +3401,10 @@ evas_object_image_render_pre(Evas_Object *obj) | |||
3371 | y = idy; | 3401 | y = idy; |
3372 | h = ((int)(idy + idh)) - y; | 3402 | h = ((int)(idy + idh)) - y; |
3373 | 3403 | ||
3374 | r.x = ((rr->x - 1) * w) / o->cur.image.w; | 3404 | r.x = (rr->x * w) / o->cur.image.w; |
3375 | r.y = ((rr->y - 1) * h) / o->cur.image.h; | 3405 | r.y = (rr->y * h) / o->cur.image.h; |
3376 | r.w = ((rr->w + 2) * w) / o->cur.image.w; | 3406 | r.w = ((rr->w * w) + (o->cur.image.w * 2) - 1) / o->cur.image.w; |
3377 | r.h = ((rr->h + 2) * h) / o->cur.image.h; | 3407 | r.h = ((rr->h * h) + (o->cur.image.h * 2) - 1) / o->cur.image.h; |
3378 | r.x += obj->cur.geometry.x + x; | 3408 | r.x += obj->cur.geometry.x + x; |
3379 | r.y += obj->cur.geometry.y + y; | 3409 | r.y += obj->cur.geometry.y + y; |
3380 | RECTS_CLIP_TO_RECT(r.x, r.y, r.w, r.h, | 3410 | RECTS_CLIP_TO_RECT(r.x, r.y, r.w, r.h, |
diff --git a/libraries/evas/src/lib/canvas/evas_object_main.c b/libraries/evas/src/lib/canvas/evas_object_main.c index 86ab498..81fc858 100644 --- a/libraries/evas/src/lib/canvas/evas_object_main.c +++ b/libraries/evas/src/lib/canvas/evas_object_main.c | |||
@@ -230,7 +230,7 @@ evas_object_clip_changes_clean(Evas_Object *obj) | |||
230 | } | 230 | } |
231 | 231 | ||
232 | void | 232 | void |
233 | evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v) | 233 | evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v __UNUSED__) |
234 | { | 234 | { |
235 | Eina_Rectangle *r; | 235 | Eina_Rectangle *r; |
236 | Evas_Object *clipper; | 236 | Evas_Object *clipper; |
@@ -241,7 +241,6 @@ evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int i | |||
241 | 241 | ||
242 | if (obj->smart.smart) goto end; | 242 | if (obj->smart.smart) goto end; |
243 | /* FIXME: was_v isn't used... why? */ | 243 | /* FIXME: was_v isn't used... why? */ |
244 | was_v = 0; | ||
245 | if (!obj->clip.clipees) | 244 | if (!obj->clip.clipees) |
246 | { | 245 | { |
247 | EINA_ARRAY_ITER_NEXT(rects, i, r, it) | 246 | EINA_ARRAY_ITER_NEXT(rects, i, r, it) |
@@ -1042,6 +1041,22 @@ evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a) | |||
1042 | if (g > 255) g = 255; if (g < 0) g = 0; | 1041 | if (g > 255) g = 255; if (g < 0) g = 0; |
1043 | if (b > 255) b = 255; if (b < 0) b = 0; | 1042 | if (b > 255) b = 255; if (b < 0) b = 0; |
1044 | if (a > 255) a = 255; if (a < 0) a = 0; | 1043 | if (a > 255) a = 255; if (a < 0) a = 0; |
1044 | if (r > a) | ||
1045 | { | ||
1046 | r = a; | ||
1047 | ERR("Evas only handle pre multiplied color !"); | ||
1048 | } | ||
1049 | if (g > a) | ||
1050 | { | ||
1051 | g = a; | ||
1052 | ERR("Evas only handle pre multiplied color !"); | ||
1053 | } | ||
1054 | if (b > a) | ||
1055 | { | ||
1056 | b = a; | ||
1057 | ERR("Evas only handle pre multiplied color !"); | ||
1058 | } | ||
1059 | |||
1045 | if (evas_object_intercept_call_color_set(obj, r, g, b, a)) return; | 1060 | if (evas_object_intercept_call_color_set(obj, r, g, b, a)) return; |
1046 | if (obj->smart.smart) | 1061 | if (obj->smart.smart) |
1047 | { | 1062 | { |
diff --git a/libraries/evas/src/lib/canvas/evas_object_textblock.c b/libraries/evas/src/lib/canvas/evas_object_textblock.c index 568911c..ee07e20 100644 --- a/libraries/evas/src/lib/canvas/evas_object_textblock.c +++ b/libraries/evas/src/lib/canvas/evas_object_textblock.c | |||
@@ -430,6 +430,7 @@ struct _Evas_Object_Textblock | |||
430 | { | 430 | { |
431 | DATA32 magic; | 431 | DATA32 magic; |
432 | Evas_Textblock_Style *style; | 432 | Evas_Textblock_Style *style; |
433 | Evas_Textblock_Style *style_user; | ||
433 | Evas_Textblock_Cursor *cursor; | 434 | Evas_Textblock_Cursor *cursor; |
434 | Eina_List *cursors; | 435 | Eina_List *cursors; |
435 | Evas_Object_Textblock_Node_Text *text_nodes; | 436 | Evas_Object_Textblock_Node_Text *text_nodes; |
@@ -4185,11 +4186,27 @@ _layout(const Evas_Object *obj, int w, int h, int *w_ret, int *h_ret) | |||
4185 | 4186 | ||
4186 | /* Start of logical layout creation */ | 4187 | /* Start of logical layout creation */ |
4187 | /* setup default base style */ | 4188 | /* setup default base style */ |
4188 | if ((c->o->style) && (c->o->style->default_tag)) | ||
4189 | { | 4189 | { |
4190 | c->fmt = _layout_format_push(c, NULL, NULL); | 4190 | Eina_Bool finalize = EINA_FALSE; |
4191 | _format_fill(c->obj, c->fmt, c->o->style->default_tag); | 4191 | if ((c->o->style) && (c->o->style->default_tag)) |
4192 | _format_finalize(c->obj, c->fmt); | 4192 | { |
4193 | c->fmt = _layout_format_push(c, NULL, NULL); | ||
4194 | _format_fill(c->obj, c->fmt, c->o->style->default_tag); | ||
4195 | finalize = EINA_TRUE; | ||
4196 | } | ||
4197 | |||
4198 | if ((c->o->style_user) && (c->o->style_user->default_tag)) | ||
4199 | { | ||
4200 | if (!c->fmt) | ||
4201 | { | ||
4202 | c->fmt = _layout_format_push(c, NULL, NULL); | ||
4203 | } | ||
4204 | _format_fill(c->obj, c->fmt, c->o->style_user->default_tag); | ||
4205 | finalize = EINA_TRUE; | ||
4206 | } | ||
4207 | |||
4208 | if (finalize) | ||
4209 | _format_finalize(c->obj, c->fmt); | ||
4193 | } | 4210 | } |
4194 | if (!c->fmt) | 4211 | if (!c->fmt) |
4195 | { | 4212 | { |
@@ -4485,9 +4502,9 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) | |||
4485 | { | 4502 | { |
4486 | // format MUST be KEY='VALUE'[KEY='VALUE']... | 4503 | // format MUST be KEY='VALUE'[KEY='VALUE']... |
4487 | const char *p; | 4504 | const char *p; |
4488 | const char *key_start, *key_stop, *val_start, *val_stop; | 4505 | const char *key_start, *key_stop, *val_start; |
4489 | 4506 | ||
4490 | key_start = key_stop = val_start = val_stop = NULL; | 4507 | key_start = key_stop = val_start = NULL; |
4491 | p = ts->style_text; | 4508 | p = ts->style_text; |
4492 | while (*p) | 4509 | while (*p) |
4493 | { | 4510 | { |
@@ -4504,19 +4521,54 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) | |||
4504 | else if (!val_start) | 4521 | else if (!val_start) |
4505 | { | 4522 | { |
4506 | if (((*p) == '\'') && (*(p + 1))) | 4523 | if (((*p) == '\'') && (*(p + 1))) |
4507 | val_start = p + 1; | 4524 | { |
4508 | } | 4525 | val_start = ++p; |
4509 | else if (!val_stop) | 4526 | } |
4510 | { | ||
4511 | if (((*p) == '\'') && (p > ts->style_text) && (p[-1] != '\\')) | ||
4512 | val_stop = p; | ||
4513 | } | 4527 | } |
4514 | if ((key_start) && (key_stop) && (val_start) && (val_stop)) | 4528 | if ((key_start) && (key_stop) && (val_start)) |
4515 | { | 4529 | { |
4516 | char *tags, *replaces; | 4530 | char *tags, *replaces = NULL; |
4517 | Evas_Object_Style_Tag *tag; | 4531 | Evas_Object_Style_Tag *tag; |
4518 | size_t tag_len = key_stop - key_start; | 4532 | const char *val_stop = NULL; |
4519 | size_t replace_len = val_stop - val_start; | 4533 | size_t tag_len; |
4534 | size_t replace_len; | ||
4535 | |||
4536 | { | ||
4537 | Eina_Strbuf *buf = eina_strbuf_new(); | ||
4538 | val_stop = val_start; | ||
4539 | while(*p) | ||
4540 | { | ||
4541 | if (*p == '\'') | ||
4542 | { | ||
4543 | /* Break if we found the tag end */ | ||
4544 | if (p[-1] != '\\') | ||
4545 | { | ||
4546 | eina_strbuf_append_length(buf, val_stop, | ||
4547 | p - val_stop); | ||
4548 | break; | ||
4549 | } | ||
4550 | else | ||
4551 | { | ||
4552 | eina_strbuf_append_length(buf, val_stop, | ||
4553 | p - val_stop - 1); | ||
4554 | eina_strbuf_append_char(buf, '\''); | ||
4555 | val_stop = p + 1; | ||
4556 | } | ||
4557 | } | ||
4558 | p++; | ||
4559 | } | ||
4560 | replaces = eina_strbuf_string_steal(buf); | ||
4561 | eina_strbuf_free(buf); | ||
4562 | } | ||
4563 | /* If we didn't find an end, just aboart. */ | ||
4564 | if (!*p) | ||
4565 | { | ||
4566 | if (replaces) free(replaces); | ||
4567 | break; | ||
4568 | } | ||
4569 | |||
4570 | tag_len = key_stop - key_start; | ||
4571 | replace_len = val_stop - val_start; | ||
4520 | 4572 | ||
4521 | tags = malloc(tag_len + 1); | 4573 | tags = malloc(tag_len + 1); |
4522 | if (tags) | 4574 | if (tags) |
@@ -4525,12 +4577,6 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) | |||
4525 | tags[tag_len] = 0; | 4577 | tags[tag_len] = 0; |
4526 | } | 4578 | } |
4527 | 4579 | ||
4528 | replaces = malloc(replace_len + 1); | ||
4529 | if (replaces) | ||
4530 | { | ||
4531 | memcpy(replaces, val_start, replace_len); | ||
4532 | replaces[replace_len] = 0; | ||
4533 | } | ||
4534 | if ((tags) && (replaces)) | 4580 | if ((tags) && (replaces)) |
4535 | { | 4581 | { |
4536 | if (!strcmp(tags, "DEFAULT")) | 4582 | if (!strcmp(tags, "DEFAULT")) |
@@ -4561,7 +4607,7 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) | |||
4561 | if (tags) free(tags); | 4607 | if (tags) free(tags); |
4562 | if (replaces) free(replaces); | 4608 | if (replaces) free(replaces); |
4563 | } | 4609 | } |
4564 | key_start = key_stop = val_start = val_stop = NULL; | 4610 | key_start = key_stop = val_start = NULL; |
4565 | } | 4611 | } |
4566 | p++; | 4612 | p++; |
4567 | } | 4613 | } |
@@ -4576,13 +4622,15 @@ evas_textblock_style_get(const Evas_Textblock_Style *ts) | |||
4576 | } | 4622 | } |
4577 | 4623 | ||
4578 | /* textblock styles */ | 4624 | /* textblock styles */ |
4579 | EAPI void | 4625 | |
4580 | evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts) | 4626 | static void |
4627 | _textblock_style_generic_set(Evas_Object *obj, Evas_Textblock_Style *ts, | ||
4628 | Evas_Textblock_Style **obj_ts) | ||
4581 | { | 4629 | { |
4582 | TB_HEAD(); | 4630 | TB_HEAD(); |
4583 | if (ts == o->style) return; | 4631 | if (ts == *obj_ts) return; |
4584 | if ((ts) && (ts->delete_me)) return; | 4632 | if ((ts) && (ts->delete_me)) return; |
4585 | if (o->style) | 4633 | if (*obj_ts) |
4586 | { | 4634 | { |
4587 | Evas_Textblock_Style *old_ts; | 4635 | Evas_Textblock_Style *old_ts; |
4588 | if (o->markup_text) | 4636 | if (o->markup_text) |
@@ -4591,7 +4639,7 @@ evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts) | |||
4591 | o->markup_text = NULL; | 4639 | o->markup_text = NULL; |
4592 | } | 4640 | } |
4593 | 4641 | ||
4594 | old_ts = o->style; | 4642 | old_ts = *obj_ts; |
4595 | old_ts->objects = eina_list_remove(old_ts->objects, obj); | 4643 | old_ts->objects = eina_list_remove(old_ts->objects, obj); |
4596 | if ((old_ts->delete_me) && (!old_ts->objects)) | 4644 | if ((old_ts->delete_me) && (!old_ts->objects)) |
4597 | evas_textblock_style_free(old_ts); | 4645 | evas_textblock_style_free(old_ts); |
@@ -4600,12 +4648,19 @@ evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts) | |||
4600 | { | 4648 | { |
4601 | ts->objects = eina_list_append(ts->objects, obj); | 4649 | ts->objects = eina_list_append(ts->objects, obj); |
4602 | } | 4650 | } |
4603 | o->style = ts; | 4651 | *obj_ts = ts; |
4604 | 4652 | ||
4605 | _evas_textblock_invalidate_all(o); | 4653 | _evas_textblock_invalidate_all(o); |
4606 | _evas_textblock_changed(o, obj); | 4654 | _evas_textblock_changed(o, obj); |
4607 | } | 4655 | } |
4608 | 4656 | ||
4657 | EAPI void | ||
4658 | evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts) | ||
4659 | { | ||
4660 | TB_HEAD(); | ||
4661 | _textblock_style_generic_set(obj, ts, &(o->style)); | ||
4662 | } | ||
4663 | |||
4609 | EAPI const Evas_Textblock_Style * | 4664 | EAPI const Evas_Textblock_Style * |
4610 | evas_object_textblock_style_get(const Evas_Object *obj) | 4665 | evas_object_textblock_style_get(const Evas_Object *obj) |
4611 | { | 4666 | { |
@@ -4614,6 +4669,27 @@ evas_object_textblock_style_get(const Evas_Object *obj) | |||
4614 | } | 4669 | } |
4615 | 4670 | ||
4616 | EAPI void | 4671 | EAPI void |
4672 | evas_object_textblock_style_user_push(Evas_Object *obj, Evas_Textblock_Style *ts) | ||
4673 | { | ||
4674 | TB_HEAD(); | ||
4675 | _textblock_style_generic_set(obj, ts, &(o->style_user)); | ||
4676 | } | ||
4677 | |||
4678 | EAPI const Evas_Textblock_Style * | ||
4679 | evas_object_textblock_style_user_peek(const Evas_Object *obj) | ||
4680 | { | ||
4681 | TB_HEAD_RETURN(NULL); | ||
4682 | return o->style_user; | ||
4683 | } | ||
4684 | |||
4685 | EAPI void | ||
4686 | evas_object_textblock_style_user_pop(Evas_Object *obj) | ||
4687 | { | ||
4688 | TB_HEAD(); | ||
4689 | _textblock_style_generic_set(obj, NULL, &(o->style_user)); | ||
4690 | } | ||
4691 | |||
4692 | EAPI void | ||
4617 | evas_object_textblock_replace_char_set(Evas_Object *obj, const char *ch) | 4693 | evas_object_textblock_replace_char_set(Evas_Object *obj, const char *ch) |
4618 | { | 4694 | { |
4619 | TB_HEAD(); | 4695 | TB_HEAD(); |
@@ -4902,7 +4978,7 @@ evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text) | |||
4902 | o->markup_text = NULL; | 4978 | o->markup_text = NULL; |
4903 | } | 4979 | } |
4904 | _nodes_clear(obj); | 4980 | _nodes_clear(obj); |
4905 | if (!o->style) | 4981 | if (!o->style && !o->style_user) |
4906 | { | 4982 | { |
4907 | if (text != o->markup_text) | 4983 | if (text != o->markup_text) |
4908 | { | 4984 | { |
@@ -5244,7 +5320,7 @@ evas_textblock_text_markup_to_utf8(const Evas_Object *obj, const char *text) | |||
5244 | const char *escape; | 5320 | const char *escape; |
5245 | 5321 | ||
5246 | escape = _escaped_char_get(esc_start, esc_end + 1); | 5322 | escape = _escaped_char_get(esc_start, esc_end + 1); |
5247 | eina_strbuf_append(sbuf, escape); | 5323 | if (escape) eina_strbuf_append(sbuf, escape); |
5248 | esc_start = esc_end = NULL; | 5324 | esc_start = esc_end = NULL; |
5249 | } | 5325 | } |
5250 | else if (*p == 0) | 5326 | else if (*p == 0) |
@@ -5650,7 +5726,6 @@ EAPI Eina_Bool | |||
5650 | evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur) | 5726 | evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur) |
5651 | { | 5727 | { |
5652 | if (!cur || !cur->node) return EINA_FALSE; | 5728 | if (!cur || !cur->node) return EINA_FALSE; |
5653 | if (evas_textblock_cursor_format_is_visible_get(cur)) return EINA_TRUE; | ||
5654 | return (_evas_textblock_cursor_node_format_at_pos_get(cur)) ? | 5729 | return (_evas_textblock_cursor_node_format_at_pos_get(cur)) ? |
5655 | EINA_TRUE : EINA_FALSE; | 5730 | EINA_TRUE : EINA_FALSE; |
5656 | } | 5731 | } |
@@ -5977,9 +6052,9 @@ evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur) | |||
5977 | #else | 6052 | #else |
5978 | 6053 | ||
5979 | #define BREAK_AFTER(i) \ | 6054 | #define BREAK_AFTER(i) \ |
5980 | ((!str[i + 1]) || \ | 6055 | ((!text[i + 1]) || \ |
5981 | (_is_white(str[i]) && !_is_white(str[i + 1])) || \ | 6056 | (_is_white(text[i]) && !_is_white(text[i + 1])) || \ |
5982 | (!_is_white(str[i]) && _is_white(str[i + 1]))) | 6057 | (!_is_white(text[i]) && _is_white(text[i + 1]))) |
5983 | 6058 | ||
5984 | #endif | 6059 | #endif |
5985 | 6060 | ||
@@ -7241,7 +7316,13 @@ _evas_textblock_node_format_new(Evas_Object_Textblock *o, const char *_format) | |||
7241 | } | 7316 | } |
7242 | } | 7317 | } |
7243 | 7318 | ||
7244 | match = _style_match_tag(o->style, format, format_len, &replace_len); | 7319 | if (!o->style_user || !(match = _style_match_tag(o->style_user, format, |
7320 | format_len, &replace_len))) | ||
7321 | { | ||
7322 | match = _style_match_tag(o->style, format, format_len, | ||
7323 | &replace_len); | ||
7324 | } | ||
7325 | |||
7245 | if (match) | 7326 | if (match) |
7246 | { | 7327 | { |
7247 | if (match[0] != '-') | 7328 | if (match[0] != '-') |
@@ -7633,6 +7714,7 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C | |||
7633 | } | 7714 | } |
7634 | fnode = _evas_textblock_cursor_node_format_at_pos_get(cur1); | 7715 | fnode = _evas_textblock_cursor_node_format_at_pos_get(cur1); |
7635 | 7716 | ||
7717 | n1->dirty = n2->dirty = EINA_TRUE; | ||
7636 | if (should_merge) | 7718 | if (should_merge) |
7637 | { | 7719 | { |
7638 | /* We call this function instead of the cursor one because we already | 7720 | /* We call this function instead of the cursor one because we already |
@@ -7646,7 +7728,6 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C | |||
7646 | evas_textblock_cursor_copy(cur1, o->cursor); | 7728 | evas_textblock_cursor_copy(cur1, o->cursor); |
7647 | 7729 | ||
7648 | _evas_textblock_changed(o, cur1->obj); | 7730 | _evas_textblock_changed(o, cur1->obj); |
7649 | n1->dirty = n2->dirty = EINA_TRUE; | ||
7650 | } | 7731 | } |
7651 | 7732 | ||
7652 | 7733 | ||
@@ -8022,6 +8103,7 @@ evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur) | |||
8022 | 8103 | ||
8023 | if (!cur) return EINA_FALSE; | 8104 | if (!cur) return EINA_FALSE; |
8024 | if (!cur->node) return EINA_FALSE; | 8105 | if (!cur->node) return EINA_FALSE; |
8106 | if (!evas_textblock_cursor_is_format(cur)) return EINA_FALSE; | ||
8025 | text = eina_ustrbuf_string_get(cur->node->unicode); | 8107 | text = eina_ustrbuf_string_get(cur->node->unicode); |
8026 | return EVAS_TEXTBLOCK_IS_VISIBLE_FORMAT_CHAR(text[cur->pos]); | 8108 | return EVAS_TEXTBLOCK_IS_VISIBLE_FORMAT_CHAR(text[cur->pos]); |
8027 | } | 8109 | } |
@@ -9016,12 +9098,22 @@ _size_native_calc_line_finalize(const Evas_Object *obj, Eina_List *items, | |||
9016 | Eina_List *i; | 9098 | Eina_List *i; |
9017 | 9099 | ||
9018 | it = eina_list_data_get(items); | 9100 | it = eina_list_data_get(items); |
9019 | /* If there are no text items yet, calc ascent/descent | ||
9020 | * according to the current format. */ | ||
9021 | if (it && (*ascent + *descent == 0)) | ||
9022 | _layout_format_ascent_descent_adjust(obj, ascent, descent, it->format); | ||
9023 | |||
9024 | *w = 0; | 9101 | *w = 0; |
9102 | |||
9103 | if (it) | ||
9104 | { | ||
9105 | /* If there are no text items yet, calc ascent/descent | ||
9106 | * according to the current format. */ | ||
9107 | if (*ascent + *descent == 0) | ||
9108 | _layout_format_ascent_descent_adjust(obj, ascent, descent, | ||
9109 | it->format); | ||
9110 | |||
9111 | /* Add margins. */ | ||
9112 | if (it->format) | ||
9113 | *w = it->format->margin.l + it->format->margin.r; | ||
9114 | } | ||
9115 | |||
9116 | |||
9025 | /* Adjust all the item sizes according to the final line size, | 9117 | /* Adjust all the item sizes according to the final line size, |
9026 | * and update the x positions of all the items of the line. */ | 9118 | * and update the x positions of all the items of the line. */ |
9027 | EINA_LIST_FOREACH(items, i, it) | 9119 | EINA_LIST_FOREACH(items, i, it) |
@@ -9226,6 +9318,10 @@ evas_object_textblock_free(Evas_Object *obj) | |||
9226 | 9318 | ||
9227 | evas_object_textblock_clear(obj); | 9319 | evas_object_textblock_clear(obj); |
9228 | evas_object_textblock_style_set(obj, NULL); | 9320 | evas_object_textblock_style_set(obj, NULL); |
9321 | while (evas_object_textblock_style_user_peek(obj)) | ||
9322 | { | ||
9323 | evas_object_textblock_style_user_pop(obj); | ||
9324 | } | ||
9229 | o = (Evas_Object_Textblock *)(obj->object_data); | 9325 | o = (Evas_Object_Textblock *)(obj->object_data); |
9230 | free(o->cursor); | 9326 | free(o->cursor); |
9231 | while (o->cursors) | 9327 | while (o->cursors) |
diff --git a/libraries/evas/src/lib/canvas/evas_render.c b/libraries/evas/src/lib/canvas/evas_render.c index cdedaec..32ce988 100644 --- a/libraries/evas/src/lib/canvas/evas_render.c +++ b/libraries/evas/src/lib/canvas/evas_render.c | |||
@@ -612,6 +612,8 @@ pending_change(void *data, void *gdata __UNUSED__) | |||
612 | obj->changed_move_only = 0; | 612 | obj->changed_move_only = 0; |
613 | obj->changed_nomove = 0; | 613 | obj->changed_nomove = 0; |
614 | obj->changed_move = 0; | 614 | obj->changed_move = 0; |
615 | obj->changed_map = 0; | ||
616 | obj->changed_pchange = 0; | ||
615 | } | 617 | } |
616 | return obj->changed ? EINA_TRUE : EINA_FALSE; | 618 | return obj->changed ? EINA_TRUE : EINA_FALSE; |
617 | } | 619 | } |
@@ -984,6 +986,8 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, | |||
984 | o2->changed_move_only = 0; | 986 | o2->changed_move_only = 0; |
985 | o2->changed_nomove = 0; | 987 | o2->changed_nomove = 0; |
986 | o2->changed_move = 0; | 988 | o2->changed_move = 0; |
989 | o2->changed_map = 0; | ||
990 | o2->changed_pchange = 0; | ||
987 | continue; | 991 | continue; |
988 | } | 992 | } |
989 | if (o2->changed) | 993 | if (o2->changed) |
@@ -994,6 +998,8 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, | |||
994 | o2->changed_move_only = 0; | 998 | o2->changed_move_only = 0; |
995 | o2->changed_nomove = 0; | 999 | o2->changed_nomove = 0; |
996 | o2->changed_move = 0; | 1000 | o2->changed_move = 0; |
1001 | o2->changed_map = 0; | ||
1002 | o2->changed_pchange = 0; | ||
997 | break; | 1003 | break; |
998 | } | 1004 | } |
999 | } | 1005 | } |
@@ -1002,16 +1008,21 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, | |||
1002 | obj->changed_move_only = 0; | 1008 | obj->changed_move_only = 0; |
1003 | obj->changed_nomove = 0; | 1009 | obj->changed_nomove = 0; |
1004 | obj->changed_move = 0; | 1010 | obj->changed_move = 0; |
1011 | obj->changed_map = 0; | ||
1012 | obj->changed_pchange = 0; | ||
1005 | } | 1013 | } |
1006 | else | 1014 | else |
1007 | { | 1015 | { |
1008 | if (obj->changed) | 1016 | if (obj->changed) |
1009 | { | 1017 | { |
1010 | changed = 1; | 1018 | if ((obj->changed_pchange) && (obj->changed_map)) |
1019 | changed = 1; | ||
1011 | obj->changed = 0; | 1020 | obj->changed = 0; |
1012 | obj->changed_move_only = 0; | 1021 | obj->changed_move_only = 0; |
1013 | obj->changed_nomove = 0; | 1022 | obj->changed_nomove = 0; |
1014 | obj->changed_move = 0; | 1023 | obj->changed_move = 0; |
1024 | obj->changed_map = 0; | ||
1025 | obj->changed_pchange = 0; | ||
1015 | } | 1026 | } |
1016 | } | 1027 | } |
1017 | 1028 | ||
@@ -1144,10 +1155,12 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, | |||
1144 | e->engine.data.context, | 1155 | e->engine.data.context, |
1145 | ecx, ecy, ecw, ech); | 1156 | ecx, ecy, ecw, ech); |
1146 | if (obj->cur.cache.clip.visible) | 1157 | if (obj->cur.cache.clip.visible) |
1147 | obj->layer->evas->engine.func->image_map_draw | 1158 | { |
1148 | (e->engine.data.output, e->engine.data.context, surface, | 1159 | obj->layer->evas->engine.func->image_map_draw |
1149 | obj->cur.map->surface, obj->cur.map->count, pts, | 1160 | (e->engine.data.output, e->engine.data.context, surface, |
1150 | obj->cur.map->smooth, 0); | 1161 | obj->cur.map->surface, obj->cur.map->count, pts, |
1162 | obj->cur.map->smooth, 0); | ||
1163 | } | ||
1151 | // FIXME: needs to cache these maps and | 1164 | // FIXME: needs to cache these maps and |
1152 | // keep them only rendering updates | 1165 | // keep them only rendering updates |
1153 | // obj->layer->evas->engine.func->image_map_surface_free | 1166 | // obj->layer->evas->engine.func->image_map_surface_free |
@@ -1500,6 +1513,12 @@ evas_render_updates_internal(Evas *e, | |||
1500 | off_x = cx - ux; | 1513 | off_x = cx - ux; |
1501 | off_y = cy - uy; | 1514 | off_y = cy - uy; |
1502 | /* build obscuring objects list (in order from bottom to top) */ | 1515 | /* build obscuring objects list (in order from bottom to top) */ |
1516 | if (alpha) | ||
1517 | { | ||
1518 | e->engine.func->context_clip_set(e->engine.data.output, | ||
1519 | e->engine.data.context, | ||
1520 | ux + off_x, uy + off_y, uw, uh); | ||
1521 | } | ||
1503 | for (i = 0; i < e->obscuring_objects.count; ++i) | 1522 | for (i = 0; i < e->obscuring_objects.count; ++i) |
1504 | { | 1523 | { |
1505 | obj = (Evas_Object *)eina_array_data_get | 1524 | obj = (Evas_Object *)eina_array_data_get |
@@ -1515,9 +1534,6 @@ evas_render_updates_internal(Evas *e, | |||
1515 | } | 1534 | } |
1516 | if (alpha) | 1535 | if (alpha) |
1517 | { | 1536 | { |
1518 | e->engine.func->context_clip_set(e->engine.data.output, | ||
1519 | e->engine.data.context, | ||
1520 | ux + off_x, uy + off_y, uw, uh); | ||
1521 | e->engine.func->context_color_set(e->engine.data.output, | 1537 | e->engine.func->context_color_set(e->engine.data.output, |
1522 | e->engine.data.context, | 1538 | e->engine.data.context, |
1523 | 0, 0, 0, 0); | 1539 | 0, 0, 0, 0); |
@@ -1548,7 +1564,7 @@ evas_render_updates_internal(Evas *e, | |||
1548 | (obj->cur.visible) && | 1564 | (obj->cur.visible) && |
1549 | (!obj->delete_me) && | 1565 | (!obj->delete_me) && |
1550 | (obj->cur.cache.clip.visible) && | 1566 | (obj->cur.cache.clip.visible) && |
1551 | // (!obj->smart.smart) && | 1567 | // (!obj->smart.smart) && |
1552 | ((obj->cur.color.a > 0 || obj->cur.render_op != EVAS_RENDER_BLEND))) | 1568 | ((obj->cur.color.a > 0 || obj->cur.render_op != EVAS_RENDER_BLEND))) |
1553 | { | 1569 | { |
1554 | int x, y, w, h; | 1570 | int x, y, w, h; |
@@ -1579,6 +1595,9 @@ evas_render_updates_internal(Evas *e, | |||
1579 | else | 1595 | else |
1580 | e->engine.func->context_mask_unset(e->engine.data.output, | 1596 | e->engine.func->context_mask_unset(e->engine.data.output, |
1581 | e->engine.data.context); | 1597 | e->engine.data.context); |
1598 | e->engine.func->context_clip_set(e->engine.data.output, | ||
1599 | e->engine.data.context, | ||
1600 | x, y, w, h); | ||
1582 | #if 1 /* FIXME: this can slow things down... figure out optimum... coverage */ | 1601 | #if 1 /* FIXME: this can slow things down... figure out optimum... coverage */ |
1583 | for (j = offset; j < e->temporary_objects.count; ++j) | 1602 | for (j = offset; j < e->temporary_objects.count; ++j) |
1584 | { | 1603 | { |
@@ -1589,9 +1608,6 @@ evas_render_updates_internal(Evas *e, | |||
1589 | _evas_render_cutout_add(e, obj2, off_x, off_y); | 1608 | _evas_render_cutout_add(e, obj2, off_x, off_y); |
1590 | } | 1609 | } |
1591 | #endif | 1610 | #endif |
1592 | e->engine.func->context_clip_set(e->engine.data.output, | ||
1593 | e->engine.data.context, | ||
1594 | x, y, w, h); | ||
1595 | clean_them |= evas_render_mapped(e, obj, e->engine.data.context, | 1611 | clean_them |= evas_render_mapped(e, obj, e->engine.data.context, |
1596 | surface, off_x, off_y, 0, | 1612 | surface, off_x, off_y, 0, |
1597 | cx, cy, cw, ch | 1613 | cx, cy, cw, ch |
@@ -1637,6 +1653,8 @@ evas_render_updates_internal(Evas *e, | |||
1637 | obj->changed_move_only = 0; | 1653 | obj->changed_move_only = 0; |
1638 | obj->changed_nomove = 0; | 1654 | obj->changed_nomove = 0; |
1639 | obj->changed_move = 0; | 1655 | obj->changed_move = 0; |
1656 | obj->changed_map = 0; | ||
1657 | obj->changed_pchange = 0; | ||
1640 | } | 1658 | } |
1641 | else if ((obj->cur.map != obj->prev.map) || | 1659 | else if ((obj->cur.map != obj->prev.map) || |
1642 | (obj->cur.usemap != obj->prev.usemap)) | 1660 | (obj->cur.usemap != obj->prev.usemap)) |
@@ -1648,6 +1666,8 @@ evas_render_updates_internal(Evas *e, | |||
1648 | obj->changed_move_only = 0; | 1666 | obj->changed_move_only = 0; |
1649 | obj->changed_nomove = 0; | 1667 | obj->changed_nomove = 0; |
1650 | obj->changed_move = 0; | 1668 | obj->changed_move = 0; |
1669 | obj->changed_map = 0; | ||
1670 | obj->changed_pchange = 0; | ||
1651 | } | 1671 | } |
1652 | /* moved to other pre-process phase 1 | 1672 | /* moved to other pre-process phase 1 |
1653 | if (obj->delete_me == 2) | 1673 | if (obj->delete_me == 2) |
@@ -1684,6 +1704,7 @@ evas_render_updates_internal(Evas *e, | |||
1684 | e->framespace.changed = 0; | 1704 | e->framespace.changed = 0; |
1685 | e->invalidate = 0; | 1705 | e->invalidate = 0; |
1686 | 1706 | ||
1707 | // always clean... lots of mem waste! | ||
1687 | /* If their are some object to restack or some object to delete, | 1708 | /* If their are some object to restack or some object to delete, |
1688 | * it's useless to keep the render object list around. */ | 1709 | * it's useless to keep the render object list around. */ |
1689 | if (clean_them) | 1710 | if (clean_them) |
@@ -1693,6 +1714,17 @@ evas_render_updates_internal(Evas *e, | |||
1693 | eina_array_clean(&e->restack_objects); | 1714 | eina_array_clean(&e->restack_objects); |
1694 | eina_array_clean(&e->delete_objects); | 1715 | eina_array_clean(&e->delete_objects); |
1695 | eina_array_clean(&e->obscuring_objects); | 1716 | eina_array_clean(&e->obscuring_objects); |
1717 | eina_array_clean(&e->temporary_objects); | ||
1718 | eina_array_clean(&e->clip_changes); | ||
1719 | /* we should flush here and have a mempool system for this | ||
1720 | eina_array_flush(&e->active_objects); | ||
1721 | eina_array_flush(&e->render_objects); | ||
1722 | eina_array_flush(&e->restack_objects); | ||
1723 | eina_array_flush(&e->delete_objects); | ||
1724 | eina_array_flush(&e->obscuring_objects); | ||
1725 | eina_array_flush(&e->temporary_objects); | ||
1726 | eina_array_flush(&e->clip_changes); | ||
1727 | */ | ||
1696 | e->invalidate = 1; | 1728 | e->invalidate = 1; |
1697 | } | 1729 | } |
1698 | 1730 | ||
@@ -1768,11 +1800,14 @@ evas_render_idle_flush(Evas *e) | |||
1768 | (e->engine.data.output)) | 1800 | (e->engine.data.output)) |
1769 | e->engine.func->output_idle_flush(e->engine.data.output); | 1801 | e->engine.func->output_idle_flush(e->engine.data.output); |
1770 | 1802 | ||
1771 | eina_array_flush(&e->delete_objects); | ||
1772 | eina_array_flush(&e->active_objects); | 1803 | eina_array_flush(&e->active_objects); |
1773 | eina_array_flush(&e->restack_objects); | ||
1774 | eina_array_flush(&e->render_objects); | 1804 | eina_array_flush(&e->render_objects); |
1805 | eina_array_flush(&e->restack_objects); | ||
1806 | eina_array_flush(&e->delete_objects); | ||
1807 | eina_array_flush(&e->obscuring_objects); | ||
1808 | eina_array_flush(&e->temporary_objects); | ||
1775 | eina_array_flush(&e->clip_changes); | 1809 | eina_array_flush(&e->clip_changes); |
1810 | eina_array_flush(&e->temporary_objects); | ||
1776 | 1811 | ||
1777 | e->invalidate = 1; | 1812 | e->invalidate = 1; |
1778 | } | 1813 | } |