Commit Graph

261 Commits

Author SHA1 Message Date
Sung Park 9afd5b3f3f Added Direct Rendering to Evas' window instead of an FBO in Evas_GL.
This optimization is significant for rendering to a large surface 
because it'l save an extra copy overhead as well as an extra rendering pass.

To enable it, you can give EVAS_GL_OPTIONS_DIRECT hint in the surface
config options_bits. The following conditions have to be met in order
for evas to render directly into the Evas' window. If they are not met, the 
engine will fallback to rendering to an FBO as it normally does. 

conditions: 
1.) All the GL calls have to be called using the pixel_get_callback function.
This is necessary for the evas object order to be maintained.
2.) Alpha must be disabled on the image ojbect that renders evas_gl.
3.) No rotation allowed.

One way to override above condition is to set EVAS_GL_DIRECT_OVERRIDE=1 but 
there is no guarantee in its behavior.

Currently, this optimization is added for gl_x11 engine only. 




SVN revision: 67388
2012-01-20 12:29:14 +00:00
Carsten Haitzler 4ae6816486 add EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN for accessibility
:)



SVN revision: 67264
2012-01-17 08:35:32 +00:00
Christopher Michael 0740555698 Evas: Add 'is_frame' property for objects (used in wayland engines).
SVN revision: 66534
2011-12-26 23:07:52 +00:00
Carsten Haitzler 34581d0300 Add new api to set and get default event flags.
SVN revision: 66275
2011-12-16 09:24:18 +00:00
Jiyoun Park 36e658e20a bug fix related with evas event counter
currently evas_object_event_callback_call checks _evas_event_counter 
for preventing object's callback called several times in one evas event.

but it use global variable(_evas_event_counter), it can be changed while
procssing same event. 

for example , evas_event_feed_mouse_up. 
If there are several object in e->pointer.object.in and object 1's callback
create new evas event, object 2 cannot now event id.
so I change callback call api, and object callbacks can decide wheather it deal with that event.


SVN revision: 66234
2011-12-15 06:23:53 +00:00
Christopher Michael 0fccea0dee Evas: Add a Wayland Shared Memory engine (similar to the buffer &
framebuffer engines). Add Evas framespace set/get functions.



SVN revision: 66223
2011-12-14 18:44:20 +00:00
Michael BOUCHAUD 33eb1e5e79 evas: Add api to know if an evas_object_image could support region
SVN revision: 66170
2011-12-13 16:58:20 +00:00
Carsten Haitzler 0434ce6574 * Fix grab count negative values if you do weird combinations of
press and release with multiple fingers or multiple mouse
        buttons.
        


SVN revision: 66134
2011-12-13 05:59:36 +00:00
Mike McCormack 997a3aa756 [evas] Always clear recalc count of items that have been on calc list
Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 65326
2011-11-17 04:31:43 +00:00
ChunEon Park 0bc308dcd7 evas/evas_events - modified unsigned char -> Eina_Bool for some fields in the Evas_Key_Grab structure.
removed white spaces and fixed indent also



SVN revision: 65092
2011-11-12 08:06:30 +00:00
ChunEon Park 000aed92b8 evas - added new API evas_object_freeze_events_set/get
and will handle for the key events also soon. 



SVN revision: 64432
2011-10-27 10:36:09 +00:00
EunMi Lee 8b5d185038 From: EunMi Lee <eunmi15.lee@samsung.com>
Subject: [E-devel] [Patch] [Evas] Patch to provide information of
touched points

Hello,
I made a new patch to get information of current touched point instead
of Touch Event.

I added touch_points (Eina_List) to the Evas structure and it maintains touched points on the evas.
New touched point is added to the touch_points when we get Mouse_Down and Multi_Down,
touched point is updated when we get Mouse_Move and Mult_Move,
and touched point is removed when we get Mouse_Up and Multi_Up.

The each touch point has coordinate, id and state information as follows:
id - identifier. 0 for Mouse Event and device id for Multi Event. coordinate - (x, y) coordinate of point.
state - state of point. type is Evas_Touch_Point_State enum.
(EVAS_TOUCH_POINT_DOWN, EVAS_TOUCH_POINT_UP, EVAS_TOUCH_POINT_MOVE,
EVAS_TOUCH_POINT_STILL, EVAS_TOUCH_POINT_CANCEL)

There are 4 new APIs to get touch point's information as follows:
unsigned int evas_touch_point_list_count(Evas *e);
void evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y);
int evas_touch_point_list_nth_id_get(Evas *e, unsigned int n);
Evas_Touch_Point_State evas_touch_point_list_nth_state_get(Evas *e, unsigned int n);

I added APIs to get each information instead of exposing whole
structure to make it easy to expand in the future as you mentioned in
the below e-mail :)



SVN revision: 64373
2011-10-25 05:03:50 +00:00
ChunEon Park 8658d955ce Evas - Modified field names in Evas structure to be more clear.
SVN revision: 64371
2011-10-25 02:26:51 +00:00
Carsten Haitzler 1541b0e97e add call to get maximum image size (eg max texture size)
SVN revision: 64244
2011-10-21 08:17:14 +00:00
Carsten Haitzler f1bdb3a902 for now - revers eumni touch events patch until we get press state
"getter" api patch. :)



SVN revision: 64140
2011-10-18 08:32:03 +00:00
Sung W. Park c1cc0a7ed2 From: "Sung W. Park" <sungwoo@gmail.com>
Subject: Re: [E-devel] [E-Devel][Review][Patch] Evas GL Extensions + a
bug fix


Here's an initial attempt at the GL extensions issue for Evas GL.

I have been in discussion with a few EFL developers regarding how we should
provide extensions.  Essentially, there are two ways to go about doing this.

1. provide evas_gl_proc_address_get() function as it is done in other
glue layers

2. provide all the extension functions in the EVAS_GL_API struct.

#1 approach is how it's done in other glue layers and the driver implementor can
provide new extensions easily.  It is however pretty annoying to get the
function prototypes right and use the function pointers and etc.

#2 approach provides all the extension functions in the struct so it's
definitely easier to use.  Adding new extensions can be a pain as people may
have to wait for new version releases.

For now, we thought it was OK to just throw them in the struct as in
#2 and try it out.  So, I've implemented this approach.  As for the extensions,
I've basically included all the extensions in gl2ext.h as EvasGL currently
provides all the GLES 2.0 functions.   In order to display the right
information, I had to override glGetString() with GL_EXTENSIONS as parameter to properly
display the supported extensions.

Also, I've added a few EGL extensions that have been
modified for EvasGL use.  For example, eglCreateImage/eglDestroyImage has been
defined as folllows.

   EvasGLImage  (*evasglCreateImage) (int target, void* buffer, int*
                                         attrib_list); void
                                            (*evasglDestroyImage)
(EvasGLImage image);

const char *evas_gl_string_query() function was added to return a string of
supported EvasGL extensions.  So essentially, a user can search this string to see
if the desired extension is supported.  if it is, he can use the functions.  He can
always check if the function pointers are NULL as well.

Take a look at the pach and let me know what you think.

______________

While I was adding the extension code, I've added a few fixes/ changes
to the EvasGL.

1. glDeletBuffers bug
- When I wad destroying evasgl context, I was deleting the context FBO with
glDeleteBuffers instead of glDeleteFramebuffers. This code in effect was
deleting BOs in other contexts and we had some funky behaviors as a
result.  The
bug has been fixed.

2. make_current
- I've made some changes to the make current code and also added a resource
context to the engine data.  the resource context is used for creating surface
texture/ fbos when surface/ context is created.  Before, i was using evas'
context but thought it'd be a good idea to use a separate context.



SVN revision: 64139
2011-10-18 08:13:23 +00:00
Mike McCormack ee5446fb13 evas: Use clists to store the render recalculation list
Rather than trying to avoid removing the list element that is
currently being processed, keep two lists and move elements
to the processed list before recalculating them.

Remove items from the list head only, and always append them
to the tail.

Use the fact that an item can be removed from a clist without
needing to know which list it is in.

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 64030
2011-10-13 02:22:29 +00:00
EunMi Lee c6681aa189 From: EunMi Lee <eunmi15.lee@samsung.com>
Subject: [E-devel] [Patch] Evas touch event patch.

Nice to meet you.
I'm Eunmi Lee, developing mobile web browser and working on WebKit EFL port.
I need new type of event for touch, so I've made patch to add
EVAS_CALLBACK_TOUCH event to the evas.

I will explain history of this patch.
Currently, many web applications and sites use TouchEvent and they can
do everything(scrolling, zooming and so on) like native application
using TouchEvent.
So, I'm also want to provide TouchEvent for web in the WebKit EFL port,
but I got a problem during making TouchEvent because EFL's touch
event's structure (Mouse, Multi Event) is different from Web
TouchEvent's one.

Let me explain about Web TouchEvent firstly.
Web TouchEvent is consist of type and touch points list simply.
There are 3 kinds of type.
TouchStart: Happens every time a finger is placed on the screen.
TouchEnd: Happens every time a finger is removed from the screen.
TouchMove: Happens as a finger already placed on the screen is moved
across the screen.
for example, we can make (1 finger starts to touch), (2 fingers are
moving), (1 finger is released duirng 3 fingers are moving) and so on.
You can see the detailed information in the following url:
http://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone

However, EFL's touch event is consist of six kinds of type :
MOUSE_DOWN, MOUSE_UP, MOUSE_MOVE, MULTI_DOWN, MULTI_UP, MULTI_MOVE.
So, I have to make a converter to make web touch event from EFL's
touch event.
You can reference attatched image file : evas_touch_event.png.

To tell the truth, converting code is not a big one.
But, I want to reduce this additional job and make code simple.
In the WebKit QT port, they don't have to make converting code for
TouchEvent,
because they have QTouchEvent, it has type and touchPoints list and
they can be mapped to Web TouchEvent one by one.
I think iPhone and Android also have such kind of event.

That's all why I want to add new touch event type to the evas.

about my patch:
- EVAS_CALLBACK_TOUCH event is added
- touch_points Eina_List is added to the Evas structure to maintain
current touch lists.
- process MOUSE/MULTI UP, DOWN, MOVE to make TOUCH event.

It is my first time to modify eves codes and actually I don't know too
much about evas.
So, I will be grateful if you send any feedback and comments.




SVN revision: 63796
2011-10-04 07:30:22 +00:00
Cedric BAIL d724205a6e evas: add basic support for video support.
SVN revision: 63758
2011-10-03 03:28:52 +00:00
Cedric BAIL 3171f01b00 evas: remove a fixme by making the engine list dynamic.
SVN revision: 63481
2011-09-19 14:20:18 +00:00
Tom Hacohen 9182147b5f Evas font: Fixed compilation with g++.
Patch by cnook

SVN revision: 63196
2011-09-05 12:48:02 +00:00
Tom Hacohen 54ebd93cde Evas font: Fix compilation with C++ compilers.
Thanks to cnook for pointing that out.

SVN revision: 63186
2011-09-05 07:13:23 +00:00
Carsten Haitzler 27ebb83c4e put generic loaders in libdir/evas/utils/
SVN revision: 63103
2011-09-03 03:48:39 +00:00
Carsten Haitzler 8833075666 lets do that again. recalc list instead of recalc array. why? fixes
nasty ordering issues where recalc items dont get pushed later into
the recalc queue after the things they depend on.



SVN revision: 62977
2011-08-29 23:45:24 +00:00
Vincent Torri 93ded6d380 revert rev. 62944
SVN revision: 62963
2011-08-29 19:05:03 +00:00
Carsten Haitzler e7c63bd333 i've found a subtle issue with how we queue recalcs of smart objs. if
an obj is already queued we dont push it FURTHEr down the queue if
smart recalc is enabled. now at least we keep order of operation/calc
correctly!



SVN revision: 62944
2011-08-29 12:14:55 +00:00
Carsten Haitzler 3c456311b3 add a call to get the number of smart caluclation counts. very useful
for one evil situation in elementary factory.



SVN revision: 62856
2011-08-26 12:26:45 +00:00
Carsten Haitzler db56e7b36f fix proxy rendering!!!! ugh. i dont like the way i did it.. but its
quick and does the job.



SVN revision: 62631
2011-08-20 14:40:28 +00:00
Tom Hacohen ef8476152d Evas callbacks: Added priority to evas callbacks.
This includes evas_event, evas_object_event and evas_object_smart
callbacks.
See the added docs for more info.

SVN revision: 62533
2011-08-17 11:55:29 +00:00
Jiyoun Park dae46003e7 From: Jiyoun Park <jy0703.park@samsung.com>
Subject: RE: [E-devel] [Patch] Animation gif feature patch

Animated gif suport in evas and api's to handle animated images and
frame flipping. from jy.



SVN revision: 62331
2011-08-11 06:04:08 +00:00
Tom Hacohen f3e76c661d Evas font: added support for ':lang=' and fixed a possibly mem leak.
SVN revision: 61941
2011-08-01 08:21:12 +00:00
Tom Hacohen bd556d9c14 Evas textblock+font: Fixed the font fallbacks support.
SVN revision: 61940
2011-08-01 08:21:09 +00:00
Tom Hacohen 9ba3e192a5 Evas font+textblock: Stopped using FcNameParse, parse ourselves.
FcNameParse is pretty bad, not only that it's pretty bad, it doesn't
work well in some cases. Also this makes our lives a lot easier since
we want to allow overriding style/weight/width and etc from markup.
We now parse the "font" markup ourselves, populating a font description
structure that we created, and then override values in it as needed.

SVN revision: 61936
2011-08-01 08:20:52 +00:00
Cedric BAIL f13f92ce15 evas: forgotten header.
SVN revision: 61522
2011-07-20 09:23:47 +00:00
Hyoyoung Chang 24a3c5a092 From: Hyoyoung Chang <hyoyoung.chang@samsung.com>
Subject: [E-devel] [patch] evas - add checking event type

Dear developers.

I found a bug about evas event handling.
In some situation, evas blocks some events by checking _evas_event_counter.
So I made a patch that is checking event type also event counter.

Reproduce steps:
1. make a window
2. show window before adding a elementary/genlist widget

--- codes ---
void _gl_mousedown_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
{
  printf("_gl_mousedown_cb !! \n");
}

static Eina_Bool create_main_win(App *app)
{
  app->win = elm_win_add(NULL, "genlist-win", ELM_WIN_BASIC);
  evas_object_show(app->win);          <-- position 1
              
  Evas_Object *genlist = elm_genlist_add(app->win);
  elm_win_resize_object_add(app->win, genlist);
  evas_object_event_callback_add(genlist, EVAS_CALLBACK_MOUSE_DOWN, _gl_mousedown_cb, NULL);
  evas_object_show(genlist);
  
  evas_object_resize(app->win, 320, 240);
//evas_object_show(app->win);          <-- position 2
        
  return EINA_TRUE;
}
--- codes ---

In common use case, apps don't show main window at position 1.
However to reproduce, it can be at position 1. Then, focus is at just on main window.
In that situation, if a user clicks a genlist, its event is dropped by evas.
Because in mouse down callback, it give focus to genlist.

Then two events is made. First is mouse down, second is focus handling.
In event callback, evas processes mouse down after focus handling.
But evas found that mouse event is retarded event than focus handling.
So it ignores it.

This patch is introduce event handling type checking to
evas_object_event_callback_call.




SVN revision: 61026
2011-07-05 01:33:59 +00:00
ChunEon Park 81672eac1c evas/evas_map - added magic check
SVN revision: 60390
2011-06-16 12:08:46 +00:00
ChunEon Park def0aed32f evas/evas_private.h - just removed white spaces and fixed indentation.
SVN revision: 60388
2011-06-16 11:19:30 +00:00
Carsten Haitzler 5d2bd283c3 disable evas filter code. buggy. doesn't work right.
SVN revision: 59898
2011-06-02 10:40:43 +00:00
Tom Hacohen 60aa86a0ef Evas font-engine: Added two font opaque types.
Added Evas_Font_Instance and Evas_Font_Set which correspond to
RGBA_Font_Int and RGBA_Font. This is very important for strict type
checking which we now finally have.

This commit does not include logic changes, only casting and changing
types of pointers to the opaque pointer types.

SVN revision: 59782
2011-05-29 13:00:54 +00:00
Tom Hacohen 81b217f8c4 Evas font-engine: Fixed font fallback in the same script run.
SVN revision: 59777
2011-05-29 09:20:18 +00:00
Carsten Haitzler 4dd1d5cf62 fix load of data to ACTUALLY set the load error in evas's image
objects. including preload.



SVN revision: 59529
2011-05-19 11:19:22 +00:00
Carsten Haitzler 57e07025d4 if you preload the same image more than once.. it may/will cause
problems as target is inserter in cache image target list multiple
times. fix by only alloding preload request to go in once.



SVN revision: 59140
2011-05-03 03:20:02 +00:00
Tom Hacohen e93f10b8aa Evas font-engine: Remove passing of strings to font_draw.
This is not needed anymore because we have working string objects.

SVN revision: 59133
2011-05-02 15:33:46 +00:00
Sung W. Park bc8af94bfa From: "Sung W. Park" <sungwoo@gmail.com>
Subject: evas_gl_api_get patch.

Here's a patch that simply overrides the GL functions for Evas_GL
except for two functions that I provide on my own.  It may have some symbol
resolving warnings but that'll all go away eventually when we do everything
via dlsym or getProcAddress.
 
You can apply the patch to the latest revision of evas.  (I've just
updated them) I'm also attaching a sample GLES program that uses
evas_gl_api_get. You don't need to link it to -lGL.



SVN revision: 59092
2011-05-02 02:14:00 +00:00
Carsten Haitzler 6720d96208 and fix more filter messups. o->fitler will be leaked on obj deletion
as there was no cleanup.. and the method of exposing
evas_filter_key_get() was so out of step with any other code i have
ever seen.. letalong evas... fix.



SVN revision: 58747
2011-04-20 08:06:59 +00:00
Vincent Torri c00b418345 Evas: export evas_filter_software_get() (used in software_generic engine)
SVN revision: 58736
2011-04-19 21:37:32 +00:00
Brett Nash 9eaea94252 Evas: Filters:
More work, proudly supported by Samsung.  Filters!

So now you can apply a whole host of cheesy visual effects to objects at
runtime.  This is the first commit, there are a couple of more to come as I
tweak the filters, and fix blur with GL[1].

Please direct bugs to me nash@nash.id.au.

[1] You'd think shaders would be good at this.. but no, generic blur and GL
are like trying to get an apple product to work with Linux.

SVN revision: 58726
2011-04-19 05:47:56 +00:00
Tom Hacohen 682c7dcdc5 Evas font-engine: Fixed *props_info_create to accept a const string.
We don't want to have to alloc just for the engine. We want to be able to
pass our own const copy.

SVN revision: 58618
2011-04-13 08:36:54 +00:00
Tom Hacohen ad3b167e88 Evas font-engine: Added support for runtime-italic/bold.
Now when setting :style=Oblique/Italic/Cursiva/Bold and etc and there's
no matching font found in the system, adjustments will be done on
runtime to support that feature.

Patch by Myoungwoon Roy Kim (roy_kim).

SVN revision: 58584
2011-04-12 09:05:47 +00:00
Tom Hacohen 6560dc9a05 Evas: Add EVAS_API_RESET that overrides API with NULL.
SVN revision: 58541
2011-04-11 10:18:06 +00:00