Carsten Haitzler
011b2ce822
brutally evil... internally.. but it works. map perspective correct
...
now in gl engine. hooray for that. one complaint less.
SVN revision: 52566
2010-09-22 06:52:28 +00:00
Tom Hacohen
2d3b0200af
Evas textblock: merged changes.
...
SVN revision: 52544
2010-09-21 15:39:26 +00:00
Iván Briano
68f1a20306
Adding callback for box to be called when a child is added or removed.
...
Also sets the children_changed flag when changing children list.
by Otavio Pontes <otavio@profusion.mobi>
SVN revision: 52541
2010-09-21 14:04:28 +00:00
Tom Hacohen
ae51c0e16f
Evas textblock: Fixed deleting the last visual format in a row of visual formats, for example in '<b>ab</b><tab>cd' the tab wouldn't have gotten erased correctly.
...
SVN revision: 52540
2010-09-21 13:05:30 +00:00
Lucas De Marchi
71cba7da35
Fix typos
...
"he->the" where appropriate
SVN revision: 52493
2010-09-20 17:09:13 +00:00
Tom Hacohen
5ba2cc9c6b
Evas textblock: Removed the usuned type field from the textblock item.
...
SVN revision: 52489
2010-09-20 14:14:52 +00:00
Tom Hacohen
b98670ab36
Evas textblock: Updated docs.
...
SVN revision: 52488
2010-09-20 13:04:37 +00:00
Lucas De Marchi
9af1273517
Remove unused field from Evas_Object
...
Previous commits removed the use of havemap_parent. So, remove the
field as well.
Fix some trailing whitespaces too.
SVN revision: 52486
2010-09-20 10:54:09 +00:00
Tom Hacohen
1f8553de01
Evas textblock: Fixed the mixed usage of a replacement char (e.g * on password textblocks) with formats.
...
SVN revision: 52485
2010-09-20 10:06:01 +00:00
Tom Hacohen
e8c10dbce7
Evas textblock: Added evas_textblock_node_format_remove_pair to remove formats.
...
SVN revision: 52484
2010-09-20 09:44:48 +00:00
Carsten Haitzler
4b73f639d2
fix booboo
...
SVN revision: 52482
2010-09-20 01:32:05 +00:00
Gustavo Sverzut Barbieri
200fd80f4e
warnings-- on 16bpp and 8bpp
...
SVN revision: 52472
2010-09-19 20:11:42 +00:00
Carsten Haitzler
1a72827555
warnings--
...
warnings = 0.
SVN revision: 52449
2010-09-19 02:43:08 +00:00
Carsten Haitzler
c54bd4052c
warning--
...
SVN revision: 52448
2010-09-19 02:33:19 +00:00
Carsten Haitzler
ca722c0c6a
fix clip in simple img obj case
...
SVN revision: 52446
2010-09-19 02:28:09 +00:00
Carsten Haitzler
2f08e231e5
warning--
...
SVN revision: 52445
2010-09-19 02:10:09 +00:00
Carsten Haitzler
4faa8c38ca
warning--
...
SVN revision: 52444
2010-09-19 02:04:12 +00:00
Carsten Haitzler
1ca42eee39
warning--
...
SVN revision: 52443
2010-09-19 02:02:09 +00:00
Carsten Haitzler
a8c72076d4
warnings--
...
SVN revision: 52442
2010-09-19 01:57:19 +00:00
Carsten Haitzler
9cb35948bc
warning--
...
SVN revision: 52441
2010-09-19 01:46:13 +00:00
Carsten Haitzler
16c3803a71
warning--
...
SVN revision: 52440
2010-09-19 01:42:45 +00:00
Carsten Haitzler
c3870d27c0
warning--
...
SVN revision: 52439
2010-09-19 01:41:46 +00:00
Carsten Haitzler
649509a9c2
warning--
...
SVN revision: 52438
2010-09-19 01:33:51 +00:00
Carsten Haitzler
857119a1c2
maybe actually fix things correctly eh? -> images load again.
...
SVN revision: 52435
2010-09-19 01:14:56 +00:00
Carsten Haitzler
ccb4dbd91b
fix gl stride
...
SVN revision: 52432
2010-09-19 00:28:58 +00:00
Carsten Haitzler
f07a07855a
warning--
...
SVN revision: 52431
2010-09-18 23:45:42 +00:00
Carsten Haitzler
5d15f41500
warning--
...
SVN revision: 52430
2010-09-18 23:39:30 +00:00
Vincent Torri
89038e3b0c
free the main region (leak--)
...
SVN revision: 52429
2010-09-18 23:17:27 +00:00
Gustavo Sverzut Barbieri
d89ebf341b
cleanup: internal image information is now unsigned.
...
There is no meaning in negative values for image loading, marking as
dirty or size, so image internals (cache, entry) were changed to
unsigned, reducing possible errors, particularly with overflow.
engines were converted to the new way, but any 3rd party modules will
still work as they should be using values >= 0 only anyway.
please review.
new cases introduced by "comparison between signed and unsigned" were
fixed in the modules that used cache_entry or Image_Entry dimensions.
SVN revision: 52428
2010-09-18 23:16:25 +00:00
Gustavo Sverzut Barbieri
5dd0eeb7ab
cleanup: fb uses unsigned to match linux/fb.h
...
this removes warnings and keep consistency between system and evas
value signs.
SVN revision: 52427
2010-09-18 23:11:01 +00:00
Gustavo Sverzut Barbieri
19f0eebd27
cleanup: simple clean of "comparison between signed and unsigned errors"
...
not much to see here, please review but these are simple changes.
SVN revision: 52426
2010-09-18 23:07:31 +00:00
Gustavo Sverzut Barbieri
2640984384
cleanup: evas_macros.h - less comparison between signed and unsigned errors
...
update macro to do fine with unsigned integers (avoids width and
height getting below 0) and force casts.
SVN revision: 52425
2010-09-18 23:06:22 +00:00
Gustavo Sverzut Barbieri
e37c1c7a0a
cleanup: fix some "unused" errors from -Wextra.
...
As we're heading for a release we better remove as much errors as
possible and as the first step I'm removing warnings due unused
parameters, variables and functions. These tend to pollute real errors
spotted by -Wall and clang/llvm.
This does not fixes all, just the clear that could be set to
__UNUSED__, particularly to do (and I'd like some help from the
authors):
* src/lib/engines/common/evas_font_{draw,query}.c (tasn):
intl_props is just used while doing BIDI, but also used in other
#ifdef blocks :-/
* evas_map_* (raster):
huge amount of warnings, code is quite confusing and thus I'm not
touching it. I have no idea whenever the commented blocks or extra
parameters are intended to be used or no.
* src/modules/engines/fbevas_fb_main.c (raster?):
is fb_setvt() to be used? If not do you mind removing it?
* src/modules/engines/gl_{common,x11} (raster):
huge amount of warnings, code is quite nested and full of #ifdefs
that does not help to give a clear picture of what's going on.
* src/bin/evas_cserve_main.c (raster):
I could have ignored most of the errors, but is the code correct? I
mean, there is no unload of images being applied. If you confirm
none of those warnings are harmful I can flag them as unused.
* src/lib/engines/common_8 (dottedmag):
lots of unused functions that were acquired from common_16, they
are unused and if they will not, then they should be removed.
SVN revision: 52421
2010-09-18 19:17:41 +00:00
Gustavo Sverzut Barbieri
a22dac6ea3
Add missing evas_common prefix, avoid symbol redefinition.
...
soft16 was written as a single engine, thus it was all static/global
and had no EAPI in its functions, but then it was moved into
"src/lib/common_16" and got that, but got no prefix! That could cause
clash with other libraries, so adding such prefix.
soft8 was a copy of 16, thus had the same problems.
the engines were all based on software_x11, thus they defined the same
methods to deal with Xlib, however if you link them all in the same
binary (--enable-MODULE=static), the symbol would be redefined. Rename
symbols according to their module.
SVN revision: 52420
2010-09-18 17:43:13 +00:00
Vincent Torri
d128fb54a0
remove debug messages
...
SVN revision: 52419
2010-09-18 17:31:00 +00:00
Vincent Torri
9acfb01811
Fix shaped windows on Windows. It uses regions.
...
Advantages:
* it is the simplest method to implement
Disadvantages:
* it's slow
* it does not take into account transparency
* it does not work with the composite manager (Windows >= Vista)
Layered windows should be used (all the disadvantaged above are
fixed), but i've never succeeded in making them work.
SVN revision: 52416
2010-09-18 17:19:11 +00:00
Carsten Haitzler
6f4d152810
fix actually supporting clip for maps in gl.
...
SVN revision: 52415
2010-09-18 14:23:20 +00:00
Carsten Haitzler
8df657a51a
be less agressive performance-wise but clear up some gl sync issues
...
that have been lurking.
SVN revision: 52414
2010-09-18 13:49:56 +00:00
Lucas De Marchi
4dcae856ea
Fix function call after previous change
...
Forgot one function call.
SVN revision: 52408
2010-09-18 06:41:04 +00:00
Lucas De Marchi
4db4b59b02
Make _evas_event_havemap_adjust() recursive
...
Make this function recursive, so it can adjust the coords for all
parent objects. It starts with the grand-grand-grand-...-parent and goes
down until the same object.
SVN revision: 52407
2010-09-18 06:31:41 +00:00
Lucas De Marchi
1a0a9b68f6
Use also map of current object
...
Do not use only the map of the parent. Apply the obj's map first and
then go to the parent.
+ simple formatting
SVN revision: 52406
2010-09-18 06:31:12 +00:00
Lucas De Marchi
a1a69cae0f
Remove havemap_parent shortcut
...
SVN revision: 52405
2010-09-18 06:31:05 +00:00
Lucas De Marchi
e478d25f34
Clean unneeded check
...
SVN revision: 52404
2010-09-18 06:30:59 +00:00
Lucas De Marchi
6f1e1a950e
Don't set parmap for the other objects
...
We are iterating EINA_INLIST_REVERSE_FOREACH(list, obj) in a recursive
function. Don't mark the other objects as havemap_parent if the first
in the list has it.
SVN revision: 52403
2010-09-18 06:30:51 +00:00
Lucas De Marchi
bcc9b853ed
formatting
...
SVN revision: 52402
2010-09-18 06:30:45 +00:00
Lucas De Marchi
fcd5f99652
clean a bit more
...
SVN revision: 52401
2010-09-18 06:30:37 +00:00
Lucas De Marchi
69ffdd1b93
Clean it a bit to be easier to understand
...
SVN revision: 52400
2010-09-18 06:30:30 +00:00
Lucas De Marchi
a7fcb37a7f
Revert r52345
...
This function is not needed at all, and as of now it's borken. Coming patches
will properly fix coords on events.
SVN revision: 52398
2010-09-18 06:29:47 +00:00
Lucas De Marchi
251a60ab09
Add function to check if point is inside an object
...
Add evas_object_inside_get() to check if a certain (x,y) point is inside
an evas_object. This is needed because there's no simple way to
determine it outside of evas when map transformations are used.
For instance, edje uses evas_object_geometry_get() and checks if point is
whithin the rectangle. This is wrong because the object might be
rotated, scaled. Below is a test program:
/**
* Simple Evas test
*
* Compile with: gcc -O0 -g -o evas_hello_world evas_hello_world.c $(pkg-config --cflags --libs eina evas ecore ecore-evas)
*/
#include <Eina.h>
#include <Evas.h>
#include <Ecore_Evas.h>
#include <Ecore.h>
#include <stdio.h>
#define WIDTH (320)
#define HEIGHT (240)
Eina_Bool main_signal_exit(void *data, int ev_type, void *ev)
{
ecore_main_loop_quit();
return EINA_FALSE;
}
static void
_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Evas_Event_Mouse_Up *ev = event_info;
Eina_Bool b;
b = evas_object_inside_get(obj, ev->canvas.x, ev->canvas.y);
fprintf(stderr, "mouse_up: x=%d, y=%d inside=%d\n", ev->canvas.x,
ev->canvas.y, b);
}
static void
_cb_move(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Evas_Event_Mouse_Move *ev = event_info;
const char *id = data;
Eina_Bool b;
b = evas_object_inside_get(obj, ev->cur.canvas.x, ev->cur.canvas.y);
fprintf(stderr, "[%s] mouse_move: x=%d, y=%d inside=%d\n", id,
ev->cur.canvas.x, ev->cur.canvas.y, b);
}
int main(void)
{
Evas *evas;
Ecore_Evas *window;
Evas_Object *bg, *r1, *r2;
Evas_Map *m;
evas_init();
ecore_init();
ecore_evas_init();
window = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
if (!evas)
return -1;
evas = ecore_evas_get(window);
bg = evas_object_rectangle_add(evas);
evas_object_color_set(bg, 255, 255, 255, 255); // white bg
evas_object_move(bg, 0, 0); // at origin
evas_object_resize(bg, WIDTH, HEIGHT); // covers full evas
evas_object_show(bg);
r1 = evas_object_rectangle_add(evas);
evas_object_color_set(r1, 255, 0, 0, 255); // 100% opaque red
evas_object_move(r1, 50, 50);
evas_object_resize(r1, 100, 100);
m = evas_map_new(4);
evas_map_util_points_populate_from_object(m, r1);
evas_map_util_rotate(m, 45.0, 100, 100);
evas_map_alpha_set(m, 0);
evas_map_smooth_set(m, 1);
evas_object_map_set(r1, m);
evas_object_map_enable_set(r1, 1);
evas_map_free(m);
evas_object_show(r1);
evas_object_event_callback_add(r1, EVAS_CALLBACK_MOUSE_UP, _cb, NULL);
evas_object_event_callback_add(r1, EVAS_CALLBACK_MOUSE_MOVE, _cb_move, "r1");
r2 = evas_object_rectangle_add(evas);
evas_object_color_set(r2, 0, 255, 0, 255);
evas_object_move(r2, 210, 150);
evas_object_resize(r2, 50, 50);
evas_object_show(r2);
evas_object_event_callback_add(r2, EVAS_CALLBACK_MOUSE_MOVE, _cb_move, "r2");
ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, main_signal_exit, evas);
ecore_evas_show(window);
ecore_main_loop_begin();
ecore_evas_free(window);
ecore_evas_shutdown();
ecore_shutdown();
evas_shutdown();
return 0;
}
SVN revision: 52345
2010-09-16 13:59:46 +00:00
Tom Hacohen
12b55be8af
Evas textblock: Added a lot of fixes to evas_textblock_cursor_geometry_get in the case where ctype = EVAS_TEXTBLOCK_CURSOR_BEFORE
...
SVN revision: 52341
2010-09-16 09:59:39 +00:00