Re: [E-devel] Evas_Object_Image data colorspace convert
On Mon, May 19, 2008 at 12:03 AM, The Rasterman Carsten Haitzler [EMAIL PROTECTED] wrote: On Tue, 6 May 2008 18:03:43 -0300 Andre Magalhaes [EMAIL PROTECTED] babbled: in cvs :) I could have done it, but great thanks :) -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog: http://andrunko.blogspot.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] Evas_Object_Image data colorspace convert
Hi, I have a patch to Evas_Object_Image that's here for a long time. We even release our evas with this patch, but I never found the time to finish it (needs conversion to from YUV colorspaces). The main idea of the patch is to enable images with colorspace != to be saved to a file. It adds a method evas_object_image_data_convert that can be really useful in other cases. If you want I can commit it, tell me what you think BR Ps.: The patch is generated against a really old evas, but I believe it still applies :) -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog: http://andrunko.blogspot.com diff --git a/src/lib/Evas.h b/src/lib/Evas.h index 18864ce..a56fd92 100644 --- a/src/lib/Evas.h +++ b/src/lib/Evas.h @@ -478,6 +478,7 @@ extern C { EAPI void evas_object_image_size_get(Evas_Object *obj, int *w, int *h); EAPI int evas_object_image_stride_get (Evas_Object *obj); EAPI int evas_object_image_load_error_get (Evas_Object *obj); + EAPI void *evas_object_image_data_convert(Evas_Object *obj, Evas_Colorspace to_cspace); EAPI void evas_object_image_data_set(Evas_Object *obj, void *data); EAPI void *evas_object_image_data_get(Evas_Object *obj, Evas_Bool for_writing); EAPI void evas_object_image_data_copy_set (Evas_Object *obj, void *data); diff --git a/src/lib/canvas/evas_object_image.c b/src/lib/canvas/evas_object_image.c index 6a8df55..92b0651 100644 --- a/src/lib/canvas/evas_object_image.c +++ b/src/lib/canvas/evas_object_image.c @@ -69,6 +69,8 @@ static int evas_object_image_is_opaque(Evas_Object *obj); static int evas_object_image_was_opaque(Evas_Object *obj); static int evas_object_image_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); +static void *evas_object_image_data_convert_internal(Evas_Object_Image *o, void *data, Evas_Colorspace to_cspace); + static const Evas_Object_Func object_func = { /* methods (compulsory) */ @@ -708,6 +710,46 @@ evas_object_image_load_error_get(Evas_Object *obj) */ /** + * Converts the raw image data of the given image object to the + * specified colorspace. + * + * Note that this function does not modify the raw image data. + * If the requested colorspace is the same as the image colorspace + * nothing is done and NULL is returned. You should use + * evas_object_image_colorspace_get() to check the current image + * colorspace. + * + * See @ref evas_object_image_colorspace_get. + * + * @param obj The given image object. + * @param to_cspace The colorspace to which the image raw data will be converted. + * @return data A newly allocated data in the format specified by to_cspace. + * @ingroup Evas_Object_Image_Data + */ +EAPI void * +evas_object_image_data_convert(Evas_Object *obj, Evas_Colorspace to_cspace) +{ + Evas_Object_Image *o; + DATA32 *data; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj-object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return NULL; + MAGIC_CHECK_END(); + if (!o-engine_data) return NULL; + if (!o-cur.cspace == to_cspace) return NULL; + data = NULL; + o-engine_data = obj-layer-evas-engine.func-image_data_get(obj-layer-evas-engine.data.output, + o-engine_data, + 0, + data); + return evas_object_image_data_convert_internal(o, data, to_cspace); +} + +/** * Sets the raw image data of the given image object. * * Note that the raw data must be of the same size and colorspace @@ -1126,11 +1168,22 @@ evas_object_image_save(Evas_Object *obj, const char *file, const char *key, cons { if (o-cur.has_alpha) im-flags |= RGBA_IMAGE_HAS_ALPHA; -im-image-data = data; -im-image-w = o-cur.image.w; -im-image-h = o-cur.image.h; -im-image-no_free = 1; -ok = evas_common_save_image_to_file(im, file, key, quality, compress); + if (o-cur.cspace == EVAS_COLORSPACE_ARGB) + im-image-data = data; + else + im-image-data = evas_object_image_data_convert_internal(o, +data, +EVAS_COLORSPACE_ARGB); + if (im-image-data) + { + im-image-w = o-cur.image.w; + im-image-h = o-cur.image.h; + im-image-no_free = 1; + ok = evas_common_save_image_to_file(im, file, key, quality, compress); + + if (o-cur.cspace != EVAS_COLORSPACE_ARGB) + free(im-image-data); + } evas_cache_image_drop(im); } @@ -2376,3 +2429,36 @@ evas_object_image_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y) return (a != 0); } + +static void * +evas_object_image_data_convert_internal(Evas_Object_Image *o, void *data, Evas_Colorspace to_cspace) +{ + void *out = NULL; + + if (!data) + return NULL; + + switch (o-cur.cspace) + { +
Re: [E-devel] Evas_Object_Image data colorspace convert
Hi again, I just tried and the patch didn't apply, so here is the update patch against CVS HEAD BR -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog: http://andrunko.blogspot.com ? src/lib/engines/common/evas_convert_colorspace.c ? src/modules/engines/software_16_wince/.deps ? src/modules/engines/software_16_wince/Makefile ? src/modules/engines/software_16_wince/Makefile.in Index: src/lib/Evas.h === RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v retrieving revision 1.122 diff -u -r1.122 Evas.h --- src/lib/Evas.h 1 May 2008 06:39:26 - 1.122 +++ src/lib/Evas.h 6 May 2008 20:58:02 - @@ -532,6 +532,7 @@ EAPI int evas_object_image_stride_get (const Evas_Object *obj); EAPI int evas_object_image_load_error_get (const Evas_Object *obj); EAPI void evas_object_image_data_set(Evas_Object *obj, void *data); + EAPI void *evas_object_image_data_convert(Evas_Object *obj, Evas_Colorspace to_cspace); EAPI void *evas_object_image_data_get(const Evas_Object *obj, Evas_Bool for_writing); EAPI void evas_object_image_data_copy_set (Evas_Object *obj, void *data); EAPI void evas_object_image_data_update_add (Evas_Object *obj, int x, int y, int w, int h); Index: src/lib/canvas/evas_object_image.c === RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_image.c,v retrieving revision 1.63 diff -u -r1.63 evas_object_image.c --- src/lib/canvas/evas_object_image.c 1 May 2008 00:09:39 - 1.63 +++ src/lib/canvas/evas_object_image.c 6 May 2008 20:58:02 - @@ -67,6 +67,8 @@ static int evas_object_image_was_opaque(Evas_Object *obj); static int evas_object_image_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); +static void *evas_object_image_data_convert_internal(Evas_Object_Image *o, void *data, Evas_Colorspace to_cspace); + static const Evas_Object_Func object_func = { /* methods (compulsory) */ @@ -706,6 +708,46 @@ */ /** + * Converts the raw image data of the given image object to the + * specified colorspace. + * + * Note that this function does not modify the raw image data. + * If the requested colorspace is the same as the image colorspace + * nothing is done and NULL is returned. You should use + * evas_object_image_colorspace_get() to check the current image + * colorspace. + * + * See @ref evas_object_image_colorspace_get. + * + * @param obj The given image object. + * @param to_cspace The colorspace to which the image raw data will be converted. + * @return data A newly allocated data in the format specified by to_cspace. + * @ingroup Evas_Object_Image_Data + */ +EAPI void * +evas_object_image_data_convert(Evas_Object *obj, Evas_Colorspace to_cspace) +{ + Evas_Object_Image *o; + DATA32 *data; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *)(obj-object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return NULL; + MAGIC_CHECK_END(); + if (!o-engine_data) return NULL; + if (!o-cur.cspace == to_cspace) return NULL; + data = NULL; + o-engine_data = obj-layer-evas-engine.func-image_data_get(obj-layer-evas-engine.data.output, + o-engine_data, + 0, + data); + return evas_object_image_data_convert_internal(o, data, to_cspace); +} + +/** * Sets the raw image data of the given image object. * * Note that the raw data must be of the same size and colorspace @@ -1127,7 +1169,19 @@ EVAS_COLORSPACE_ARGB); if (im) { -ok = evas_common_save_image_to_file(im, file, key, quality, compress); + if (o-cur.cspace == EVAS_COLORSPACE_ARGB) + im-image.data = data; + else + im-image.data = evas_object_image_data_convert_internal(o, + data, + EVAS_COLORSPACE_ARGB); + if (im-image.data) + { + ok = evas_common_save_image_to_file(im, file, key, quality, compress); + + if (o-cur.cspace != EVAS_COLORSPACE_ARGB) + free(im-image.data); + } evas_cache_image_drop(im-cache_entry); } @@ -2372,4 +2426,37 @@ } return (a != 0); +} + +static void * +evas_object_image_data_convert_internal(Evas_Object_Image *o, void *data, Evas_Colorspace to_cspace) +{ + void *out = NULL; + + if (!data) + return NULL; + + switch (o-cur.cspace) + { + case EVAS_COLORSPACE_ARGB: + out = evas_common_convert_argb_to(data, + o-cur.image.w, + o-cur.image.h, + o-cur.image.stride, + o-cur.has_alpha, + to_cspace); + break; + case EVAS_COLORSPACE_RGB565_A5P: + out = evas_common_convert_rgb565_a5p_to(data, + o-cur.image.w, +
Re: [E-devel] ecore_imf
Please check the return of ecore_imf_context_default_id_get, it seems you don't have any plugin installed BR -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [patch] typo in e_entry.c
This was already committed! On Dec 15, 2007 7:51 PM, Richard Kolkovich [EMAIL PROTECTED] wrote: Pretty self-explanatory patch... :) -- Richard Kolkovich [EMAIL PROTECTED] - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Handling Key-board events in EDC
On Nov 29, 2007 1:32 AM, Kalyan Kumar [EMAIL PROTECTED] wrote: Hi All, i have just started doing RD on Embedded Applications of E. i'm now planning to do a virtual keyboard using C-code of E and .edc. i was going through the EDC examples for this, as i could not find any solid doccument on EDC. Can anyone here help me, how to handle keyboard events in .edc, as i could find only mouse events handling. Take a look at http://staff.get-e.org/?p=users/andrunko/ilike-imf-ecore.git;a=summary It's a basic virtual keyboard that integrates with Ecore_IMF and uses Evas/Edje. BR -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Ecore + XIM working
I committed the code yesterday as Ecore_IMF as agreed on IRC. The hildon input method plugin wasn't committed cause it's LGPL. I created a garage project and uploaded the code there. If you are interested please check it from https://garage.maemo.org/projects/himf-ecore/ BR -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] Ecore_Support
Hi all, After I developed Ecore_IM I figured it out that a lot of code, macros, etc. are duplicated all around the code (EAPI definition, ECORE_MAGIC check, ...). I would like to propose a support library (Ecore_Support) that all ecore modules could use, maybe even other modules as e_dbus (to check for NULL pointer and return if fail, see http://marc.info/?l=enlightenment-develm=119536252710044w=2). Ecore_Support.h could define EAPI, some helper functions as ECORE_MAGIC_CHECK_RETURN, ECORE_MAGIC_CHECK_RETURN_VAL, etc. That would remove a lot of duplicated code. What do you think about it? Any ideas of helper functions that could be in Ecore_Support? If you are interested I can do it and provide a patch. BR -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Ecore_Support
On Nov 18, 2007 2:07 PM, Nathan Ingersoll [EMAIL PROTECTED] wrote: Rather than introducing another internal dependency that may complicate things when ecore is eventually split up, could these go in the Ecore_Data definitions? I believe everything in ecore depends on this either directly or indirectly anyways. Yeah, the idea of adding Ecore_Support is not to really have an Ecore_Support.h or anything, but to have a place where these (EAPI, ...) definitions could be added and stop duplicated code all over the place. Ecore_Data may be a good place to add these. BR -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Ecore_Support
On Nov 18, 2007 4:55 PM, Hisham Mardam Bey [EMAIL PROTECTED] wrote: Just a side note, I really think we should stop stuffing Ecore with all of this stuff. I would vote for splitting it up asap and not adding any more stuff in there. While I agree, what are the plans of a split? Will it be done soon? While we don't do it, we could add these definitions in Ecore_Data.h, or even Ecore_Support.h and include it on Ecore.h so everybody that uses Ecore.h could use them and remove the duplicated code all over the place. BR -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Ecore_Support
On Nov 18, 2007 5:16 PM, Hisham Mardam Bey [EMAIL PROTECTED] wrote: The situation is, everyone knows we should split up ecore, but everyone just keeps adding to it because no one is willing to split it up and cope with fixing the breakage. The more this keeps on being done, the harder its going to be to fix it all once its broken. We better do it now than wait for more code to creep in there. Someone has to do it, and if you guys dont mind, well, I'm personally all for it. But what is the idea of a split. Put every module in a different package? Rename them? Why is it needed, as every module already are independent in a certain way of each other. Own pkgconfig file, own library, So basically what is needed for a split? We could do it, but first we need to know what needs to be done. BR -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Ecore + XIM working
On Nov 16, 2007 10:46 AM, Stafford Horne [EMAIL PROTECTED] wrote: On Thu, 15 Nov 2007 12:06:27 -0300 Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: Yes, building XIM on top of this Ecore_IM would be a better option. shorne, could you have a look? Hi Guys, I look a closer look at Ecore_IM. Great :). Currently it provides an function called ecore_im_context_filter_event which takes a void * agument for event_info. This seems to be a bit of a problem as the application will define the event_info. It would not then be possible for an arbitrary module to handle this application specific data. What is the Idea behind this? Actually this event_info should not be defined by the application. I chose to use Evas_Event_* as event_info to not replicate the event structures already defined in Evas. As you can see the type is a Evas_Callback_Type (EVAS_CALLBACK_MOUSE_DOWN, ...). Evas already uses event_info as void * to represent the various Evas_Event_* In order for XIM to be integrated successfully we will need one more Ecore_IM_Context_Class function, void ecore_im_context_filter_keypress(Ecore_IM_Context *ctx, Ecore_IM_Event_Key_Down?? *event) This will be used to: 1. recreate the xevent using the IM key event 2. Use the Xutf8StringLookup function to translate the event by the input method Just use the filter_event method and filter for events with type EVAS_CALLBACK_KEY_DOWN/UP. It should be enough, please let me know if you need anything else. Definitely an XIM module could not be used unless the application is using the ecore_x event loop. So the implementation would have to be somewhat dependent on Ecore_X. I am still thinking about this. On my hildon_input_method create function I try to open the X display (ecore_x_display_get()), and if it fails it returns NULL. Maybe you can do the same. BR -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Ecore + XIM working
I just finished the E (e_entry actually) IM support. Patch attached. It's quite easy to integrate it with other widgets if needed. If someone wants to help please let me know BR -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com diff --git a/src/lib/etk_entry.c b/src/lib/etk_entry.c index 3c9d69e..29cc814 100644 --- a/src/lib/etk_entry.c +++ b/src/lib/etk_entry.c @@ -626,7 +626,10 @@ static Etk_Bool _etk_entry_internal_realized_cb(Etk_Object *object, void *data) if (entry-im_context etk_widget_is_focused(ETK_WIDGET(entry))) + { + ecore_im_context_reset(entry-im_context); ecore_im_context_focus_in(entry-im_context); + } return ETK_TRUE; } @@ -787,8 +790,11 @@ static Etk_Bool _etk_entry_key_down_cb(Etk_Object *object, Etk_Event_Key_Down *e _etk_entry_selection_copy(entry, ETK_SELECTION_PRIMARY, ETK_FALSE); if (entry-im_context) + { + ecore_im_context_reset(entry-im_context); ecore_im_context_cursor_position_set(entry-im_context, etk_editable_cursor_pos_get(editable)); + } return (!stop_signal); } @@ -871,8 +877,11 @@ static void _etk_entry_editable_mouse_down_cb(void *data, Evas *evas, Evas_Objec } if (entry-im_context) + { + ecore_im_context_reset(entry-im_context); ecore_im_context_cursor_position_set(entry-im_context, etk_editable_cursor_pos_get(entry-editable_object)); + } } /* Called when the entry is released by the mouse */ @@ -920,7 +929,10 @@ static void _etk_entry_editable_mouse_move_cb(void *data, Evas *evas, Evas_Objec { etk_editable_cursor_pos_set(entry-editable_object, pos); if (entry-im_context) + { +ecore_im_context_reset(entry-im_context); ecore_im_context_cursor_position_set(entry-im_context, pos); + } } } } @@ -1006,7 +1018,10 @@ static Etk_Bool _etk_entry_focused_cb(Etk_Object *object, void *data) etk_editable_selection_show(entry-editable_object); etk_widget_theme_signal_emit(entry-internal_entry, etk,state,focused, ETK_FALSE); if (entry-im_context) + { + ecore_im_context_reset(entry-im_context); ecore_im_context_focus_in(entry-im_context); + } return ETK_TRUE; } @@ -1021,14 +1036,20 @@ static Etk_Bool _etk_entry_unfocused_cb(Etk_Object *object, void *data) etk_editable_cursor_move_to_end(entry-editable_object); if (entry-im_context) + { + ecore_im_context_reset(entry-im_context); ecore_im_context_cursor_position_set(entry-im_context, etk_editable_cursor_pos_get(entry-editable_object)); + } etk_editable_selection_move_to_end(entry-editable_object); etk_editable_cursor_hide(entry-editable_object); etk_editable_selection_hide(entry-editable_object); etk_widget_theme_signal_emit(entry-internal_entry, etk,state,unfocused, ETK_FALSE); if (entry-im_context) + { + ecore_im_context_reset(entry-im_context); ecore_im_context_focus_out(entry-im_context); + } return ETK_TRUE; } - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Ecore + XIM working
Hey, I've finished a first version of the Ecore_IM (that's how I called it) and you can check it from: http://staff.get-e.org/?p=users/andrunko/ecore.git;a=commitdiff;h=d8264fed3811ef9262437b57c1c6f9e68676c822 Here is a little overview of the architecture: The module ecore_im is the responsible for loading plugins and handle them. Applications should make use of this modules through the Ecore_IM_Context interface. Plugins writers should implement some methods defined Ecore_IM_Context_Class and export the through the Ecore_IM_Context API. Attached there is a test (test_im.c) example of how to use the API. The idea is to integrate it with Etk/EWL. I should start integrating it with Etk tomorrow, if somebody is interested in integrating it with EWL it would be great. I am not sure if the API covers all various Input Methods (XIM, SCIM, ...) possibilities, but we can extend it if needed. The API is based on GtkIM and Qt input module. Issues: - In order to set a client window to the input method, I had to use a (void *), as Ecore does not abstract different Windows (Ecore_X_Window, Ecore_Win32_Window, ...). I am not sure if this a problem at all, cause plugins for windows will just be compiled on windows, Who who uses the API should take care of passing the right window to the IM. - The hildon_input_method immodule shipped with the patch is heavily based on hildon-input-method-framework and this framework is LGPL. I don't know if we will be able to ship it with ecore, but if not, I can create a separate package for it. - Documentation love. Well, that's it, I will let you comment now Hope you appreciate BR Andre On Nov 12, 2007 11:55 AM, Stafford Horne [EMAIL PROTECTED] wrote: I hope the immodules work is going well. I had started on Ecore_X XIM integration and decided I had better finish. Below is my current patch which supports callbacks XIM style. I have found several limitations with callbacks. Pitfalls: * Callbacks only provide current edit string (i.e. doesnt provide kanji choices) * IM still draws choices dialog * With Callbacks API we can not specify the location of the choices dialog * UIM does not support callbacks I think we could live we these problems but lets see how the immodules pans out. http://www.shorne-pla.net/uploads/ecore_xim-0.2.diff -Stafford On Fri, 9 Nov 2007 11:31:13 -0300 Andre Magalhaes [EMAIL PROTECTED] wrote: Hey, On Nov 8, 2007 8:13 PM, Stafford Horne [EMAIL PROTECTED] wrote: Thanks, this is a helpful document. I agree that immodules are a cleaner way to handle input. They will allow us direct access to input method API. Yeah, i believe immodules are the way to go. I would be perfect if we could have a freedesktop library that everybody could share, so one didn't need to write immodule for Gtk/Qt/Ecore. The problem I saw with this is: 1. We will have to develop more code to get off the ground 2. For every inputmethod we will have to develop a module for support I am going to start implementing the immodules support today and I believe I should have something working next week. The problem is that i need to make hildon input method working with ecore/etk, and I don't want to make a workaround to change it later. Writing modules for every new input method we want to support is the cost we have to pay to be able to support multiple input method across multiple platforms (Windows, Maemo, Macos, ...). With XIM we will be able to use existing input method bridges to take advantage of input methods right now. I say we try out XIM and find the limitations ourselves. It would be great if you could implement a XIM module when I have something working. Do you know if Hildon has an XIM bridge? Also, what is so legacy about XIM now anyway? By using callbacks only API we are basically cutting out all of the Legacy baggage of the protocol. Hildon does not have a XIM bridge and I don't think they intend to implement it anytime soon. They already have a Gtk immodule for it, and it seems they don't have interest in adding support for other toolkits. BR -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Andre Moreira Magalhaes (andrunko
Re: [E-devel] Ecore + XIM working
Hey! On Nov 15, 2007 10:52 AM, Stafford Horne [EMAIL PROTECTED] wrote: This is very cool. Tnx for the feedback. Ill need more time to look into it and read the comments. Do you think this should be integrated into ETK? I thought it might be better to support input methods directly in the ecore_x layer as I have done with XIM. This has been required as XIM ties in closely with the X event loop. Maybe this is not required if we go directly to SCIM / UIM. I will integrate it with ETK today, this is the easiest part. Regarding integrating it directly into ecore_x, IMHO this shouldn't be done, as we would loose the ability to use it on Windows, Macos, That's why we have set_client_window (see other mail). Remember that this should be an abstraction layer on top of existent IM. The hildon input method plugin is highly tied to X event loop, and it works quite well, I believe you won't have a problem implementing XIM on top of Ecore_IM. You can take a look at http://cvs.gnome.org/viewcvs/gtk%2B/modules/input/gtkimcontextxim.c?rev=1.54view=markup as the base for a Ecore_IM_XIM, as the API of GtkIMContext and Ecore_IM_Context is quite similar. BR -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Ecore + XIM working
I've changed some minor things, check the new version from: http://staff.get-e.org/?p=users/andrunko/ecore.git;a=summary -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Ecore + XIM working
On Nov 15, 2007 7:56 PM, Stafford Horne [EMAIL PROTECTED] wrote: On Thu, 15 Nov 2007 12:06:27 -0300 Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: Yes, building XIM on top of this Ecore_IM would be a better option. shorne, could you have a look? Yeah, Ill take a look. I probably wont have much time between now and the first week of december, but Ill try. Great. I just uploaded the Etk patch integrating Ecore_IM into Etk_Entry. You can check it and the updated Ecore_IM from my git tree on staff.get-e.org. Raster, if you could take a look at Ecore_IM it would be great. I would like to integrate it on Ecore asap, as we need it for canola, and don't want to be shipping a patched ecore :) Note: There was some modifications on the Ecore_IM patch but i used the same commit to make it easy to integrate it with ecore in the future if needed. So if you were using the old patch please check it out again :) BR -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Ecore + XIM working
Hey, On Nov 8, 2007 8:13 PM, Stafford Horne [EMAIL PROTECTED] wrote: Thanks, this is a helpful document. I agree that immodules are a cleaner way to handle input. They will allow us direct access to input method API. Yeah, i believe immodules are the way to go. I would be perfect if we could have a freedesktop library that everybody could share, so one didn't need to write immodule for Gtk/Qt/Ecore. The problem I saw with this is: 1. We will have to develop more code to get off the ground 2. For every inputmethod we will have to develop a module for support I am going to start implementing the immodules support today and I believe I should have something working next week. The problem is that i need to make hildon input method working with ecore/etk, and I don't want to make a workaround to change it later. Writing modules for every new input method we want to support is the cost we have to pay to be able to support multiple input method across multiple platforms (Windows, Maemo, Macos, ...). With XIM we will be able to use existing input method bridges to take advantage of input methods right now. I say we try out XIM and find the limitations ourselves. It would be great if you could implement a XIM module when I have something working. Do you know if Hildon has an XIM bridge? Also, what is so legacy about XIM now anyway? By using callbacks only API we are basically cutting out all of the Legacy baggage of the protocol. Hildon does not have a XIM bridge and I don't think they intend to implement it anytime soon. They already have a Gtk immodule for it, and it seems they don't have interest in adding support for other toolkits. BR -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Ecore + XIM working
Hi, I was studying how input methods work, as I need to integrate the hildon keyboard in ecore+etk. I believe we should use an approach similar to Gtk/Qt4. They have a similar approach to work with im modules, which IMHO should be a library independent of gtk/qt/ecore (freedesktop ^^) and everybody should use it. To take a look at details on how they do it see: http://www.kde.gr.jp/~asaki/how-to-support-input-method.html Basically they have an interface where plugins for different input methods are implemented (XIM, SCIM, hildon-input-method, ...) and a api to use in applications, such as GtkEntry, ... I believe this is more extensible, portable way to integrate im support on ecore, among other things. What do you think? BR Andre On Nov 8, 2007 11:09 AM, Stafford Horne [EMAIL PROTECTED] wrote: On Thu, 8 Nov 2007 11:12:41 +1100 Carsten Haitzler (The Rasterman) [EMAIL PROTECTED] wrote: as per IRC - lets just drop the preedit_type - lets just make it callback based (ie the ecore_x events to notify you of info from the IM and if you need to send anything - ecore_x calls to tell it stuff).otherwise looks ok to me. Thanks, One more change is that we will probably need to register some event data for the callbacks. i.e. ecore_x_window_input_context_init(win, event_data); This way if you are processing events in your event loop you can have some data to work with. The one thing left to worry about is asynchronous processing of the event queue and out of order preedit events. -Stafford - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E CVS: libs/evas raster
Hi, This patch somehow broke ETK. I just reverted it and it works fine. To test just run etk_test and select the tree test, then try to scroll the list using the scrollbar button. Nothing happens. I don't have time to work on it right now, but if somebody can take a look at it, it would be great. BR On 10/5/07, Enlightenment CVS [EMAIL PROTECTED] wrote: Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src/lib/canvas Modified Files: evas_object_gradient.c evas_object_image.c evas_object_line.c evas_object_main.c evas_object_rectangle.c evas_object_smart.c Log Message: 1. default object size to 0x0 2. remove some float numbers (were cast anyway) 3. make smart object mmove/resize only called if the obj changes === RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_gradient.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- evas_object_gradient.c 28 Jun 2007 23:22:20 - 1.18 +++ evas_object_gradient.c 5 Oct 2007 04:52:09 - 1.19 @@ -779,10 +779,10 @@ obj-cur.color.g = 255; obj-cur.color.b = 255; obj-cur.color.a = 255; - obj-cur.geometry.x = 0.0; - obj-cur.geometry.y = 0.0; - obj-cur.geometry.w = 32.0; - obj-cur.geometry.h = 32.0; + obj-cur.geometry.x = 0; + obj-cur.geometry.y = 0; + obj-cur.geometry.w = 0; + obj-cur.geometry.h = 0; obj-cur.layer = 0; obj-cur.anti_alias = 1; obj-cur.interpolation.color_space = EVAS_COLOR_SPACE_ARGB; @@ -809,8 +809,8 @@ o-cur.map.direction = 1; o-cur.fill.x = 0; o-cur.fill.y = 0; - o-cur.fill.w = 32; - o-cur.fill.h = 32; + o-cur.fill.w = 1; + o-cur.fill.h = 1; o-cur.fill.angle = 0.0; o-cur.fill.spread = EVAS_TEXTURE_REFLECT; o-cur.type.name = strdup(linear); === RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_image.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -3 -r1.57 -r1.58 --- evas_object_image.c 30 Sep 2007 15:04:51 - 1.57 +++ evas_object_image.c 5 Oct 2007 04:52:10 - 1.58 @@ -1786,10 +1786,10 @@ obj-cur.color.g = 255; obj-cur.color.b = 255; obj-cur.color.a = 255; - obj-cur.geometry.x = 0.0; - obj-cur.geometry.y = 0.0; - obj-cur.geometry.w = 32.0; - obj-cur.geometry.h = 32.0; + obj-cur.geometry.x = 0; + obj-cur.geometry.y = 0; + obj-cur.geometry.w = 0; + obj-cur.geometry.h = 0; obj-cur.layer = 0; obj-cur.anti_alias = 0; obj-cur.render_op = EVAS_RENDER_BLEND; @@ -1808,8 +1808,8 @@ /* alloc obj private data */ o = calloc(1, sizeof(Evas_Object_Image)); o-magic = MAGIC_OBJ_IMAGE; - o-cur.fill.w = 32.0; - o-cur.fill.h = 32.0; + o-cur.fill.w = 1; + o-cur.fill.h = 1; o-cur.smooth_scale = 1; o-cur.border.fill = 1; o-cur.cspace = EVAS_COLORSPACE_ARGB; === RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_line.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -3 -r1.22 -r1.23 --- evas_object_line.c 28 Jun 2007 23:22:20 - 1.22 +++ evas_object_line.c 5 Oct 2007 04:52:10 - 1.23 @@ -222,10 +222,10 @@ obj-cur.color.g = 255; obj-cur.color.b = 255; obj-cur.color.a = 255; - obj-cur.geometry.x = 0.0; - obj-cur.geometry.y = 0.0; - obj-cur.geometry.w = 32.0; - obj-cur.geometry.h = 32.0; + obj-cur.geometry.x = 0; + obj-cur.geometry.y = 0; + obj-cur.geometry.w = 0; + obj-cur.geometry.h = 0; obj-cur.layer = 0; obj-cur.anti_alias = 1; obj-cur.render_op = EVAS_RENDER_BLEND; === RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_main.c,v retrieving revision 1.60 retrieving revision 1.61 diff -u -3 -r1.60 -r1.61 --- evas_object_main.c 3 Oct 2007 04:09:36 - 1.60 +++ evas_object_main.c 5 Oct 2007 04:52:10 - 1.61 @@ -7,11 +7,11 @@ * if they are moved to the position they are already in * (e.g. if they are in 0,0 and you call evas_object_move(o, 0, 0) */ -#define FORWARD_NOOP_MOVES_TO_SMART_OBJS +//#define FORWARD_NOOP_MOVES_TO_SMART_OBJS /* likewise, for resizes */ -#define FORWARD_NOOP_RESIZES_TO_SMART_OBJS +//#define FORWARD_NOOP_RESIZES_TO_SMART_OBJS static Evas_Object_List * get_layer_objects_last(Evas_Layer *l) === RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_rectangle.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- evas_object_rectangle.c 6 May 2007 11:29:37 - 1.12 +++ evas_object_rectangle.c 5 Oct 2007 04:52:10 - 1.13 @@ -90,10
[E-devel] [PATCH] Make sure image colorspace is properly set
Hi, I found a bug when using the engine 16 bits and trying to set the image colorspace if it's different from EVAS_COLORSPACE_565_A5P. The problem is that when I call evas_object_image_colorspace_get it uses the engine func colorspace_get to return the current colorspace, so I tested if it was different from EVAS_COLORSPACE_565_A5P, and if TRUE I was setting the colorspace to EVAS_COLORSPACE_565_A5P. Then I was trying to set the data using evas_object_image_data_set and it was failing with: Unsupported colorspace 0 in eng_image_new_from_copied_data() (evas_engine.c:427) The method evas_object_image_data_set is using o-cur.cspace as the current colorspace and the evas_object_image_colorspace_get doesn't. This is inconsistent and it's causing this bug. The attached patch proper init o-cur.cspace to the engine colorspace_get and uses it on evas_object_image_colorspace_get. Ok to commit? BR -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com Index: canvas/evas_object_image.c === RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_image.c,v retrieving revision 1.56 diff -u -r1.56 evas_object_image.c --- canvas/evas_object_image.c 23 Jul 2007 14:22:56 - 1.56 +++ canvas/evas_object_image.c 28 Sep 2007 19:59:42 - @@ -175,6 +175,7 @@ evas_object_image_add(Evas *e) { Evas_Object *obj; + Evas_Object_Image *o; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; @@ -182,6 +183,9 @@ obj = evas_object_new(); evas_object_image_init(obj); evas_object_inject(obj, e); + o = (Evas_Object_Image *)(obj-object_data); + o-cur.cspace = obj-layer-evas-engine.func-image_colorspace_get(obj-layer-evas-engine.data.output, + o-engine_data); return obj; } @@ -1491,8 +1495,7 @@ MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return EVAS_COLORSPACE_ARGB; MAGIC_CHECK_END(); - return obj-layer-evas-engine.func-image_colorspace_get(obj-layer-evas-engine.data.output, - o-engine_data); + return o-cur.cspace; } /** - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [Etk] Removing etk_signal_stop()
I believe we should always return Etk_Bool in all callbacks and stop the emission when returning 0 (FALSE). Thoughts? BR -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Etk: signals improvement
On 9/14/07, Caio Marcelo [EMAIL PROTECTED] wrote: - connect() family takes callback, data and returns the identifier - disconnect() takes callback and data, removing only one specific callback|data pair for a given signal - disconnect_by_id() takes only the identifier (and no need to pass the signal_name since is embedded in the identifier). Looks fine to me. I would just change 2 things: 1) Change the @brief comment of etk_signal_disconnect_by_id to use 80 columns. 2) Change: + callbacks = NULL; + etk_object_signal_callbacks_get(object, signal, callbacks); + while (callbacks) + { + signal_callback = callbacks-data; + if (signal_callback == scb) + etk_object_signal_callback_remove(object, signal_callback); + callbacks = evas_list_remove_list(callbacks, callbacks); + } to + callbacks = NULL; + etk_object_signal_callbacks_get(object, signal, callbacks); + while (callbacks) + { + signal_callback = callbacks-data; + if (signal_callback == scb) + { + etk_object_signal_callback_remove(object, signal_callback); + break; + } + callbacks = callbacks-next; + } + evas_list_free(callbacks) on etk_signal_disconnect_by_id Also, it would be great if you could provide patches for the apps on e CVS that uses etk_signal_disconnect if any BR -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Etk: signals improvement
I can see 2 approaches here: 1) Create an id to identify every signal connection and use it on disconnect when needed (as done by the patch) 2) Change etk_signal_disconnect to receive one more param, the user_data, the same way as etk_signal_connect does, cause I can have the same callback been called with different user data, and i want to disconnect just one of them The second approach is more commonly used, for example by GTK+. If i had to choose i would go for it, as usually you have a reference to the user_data when you need to call disconnect, so you don't need to store the id anywhere. If we choose the first approach, I would vote for change etk_signal_disconnect to receive the id directly and would not introduce another function etk_signal_disconnect_one as a hack BR On 9/14/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: Kakaroto: please remember to CC the list (ie: reply-all)! On 9/13/07, Youness Alaoui [EMAIL PROTECTED] wrote: Looks good, but maybe it would be better to do a disconnect_one(etk_signal); since the etk_signal represents a unique signal, so there's no need to pass the signal name (or even the Etk_Object the signal is associated with). If that info is needed and not available with Etk_Signal_Callback, then maybe just add those two to the Etk_Signal_Callback structure. Fine, you made me look at the code and think about it, I also talked with Caio and he'll look at ETK signal internals in order to simplify and optimize it. In our opinion it can be simplified a lot by using different data structures and maybe some API changes. -- Gustavo Sverzut Barbieri -- Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] ICQ#: 17249123 Skype: gsbarbieri Mobile: +55 (81) 9927 0010 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko Blog:http://andrunko.blogspot.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Etk: signals improvement
On 9/14/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: Please, no top posts :-) I love this :) Having user data to disconnect wouldn't help that much, at least for our bindings. As I said in my email, ETK's signal implementation is far from ideal and could use some rework. Caio offered to understand it and provide required patches, let's see what he proposes. Actually it's exactly what we need. I talked to Cairo and he said it could be done this way (exactly like pygtk does). IMHO there is no point in having a id where you have to keep it anyway to disconnect instead of using a disconnection based on callback + user_data (used in Qt/Glib/...). BR - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [ETK] etk_toggle_button, bug with disable
Could you please file a bug report on http://bugs.enlightenment.org/ so it won't get lost on the ml BR On 8/16/07, Atton Jonathan [EMAIL PROTECTED] wrote: hello, I found a bug with etk_toggle_button and the disable function. - When you check a toggle button - disabled the button - enabled the button -- the button is not draw as check - if you try to check it with a mouse click or with etk_toggle_button_active_set() -- the button is not draw as check - You need check a second toggle button and then re-check the good button :/ -- powered by gnu/linux - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] {Spam?} Re: E CVS: libs/etk andrunko
On 7/25/07, Vincent Torri [EMAIL PROTECTED] wrote: On Wed, 25 Jul 2007, Chady Kassouf wrote: On 7/25/07, Vincent Torri [EMAIL PROTECTED] wrote: hmmm, make it hard to run such apps on desktops with 2 or more virtual desktops or monitors. There are other inconvenients with mdi Sure it might have inconveniences, but etk is a toolkit, and it's not up to the toolkit to decide how a GUI should be done... it's up to the interface designer, and the toolkit should provide all the facilities... but then, etk allows the designer to use bad design solutions. mdi is not a facility. It's a bad design for making ui (imho). The application i am developing is a full screen application that simulates a desktop with it's own windows (themed decorations and so). I agree that in most cases mdi is not a good solution but in this case it's, and it's was not me who decided it, it's was our usability/designer team. So I believe choice is always good, as long as it a choice BR Andrunko Vincent - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Andre Moreira Magalhaes (andrunko) Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Skype: andrunko - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Support custom click area for Evas_Object
Hi, On 7/16/07, The Rasterman Carsten Haitzler [EMAIL PROTECTED] wrote: On Mon, 9 Jul 2007 19:20:57 -0300 Andre Magalhaes [EMAIL PROTECTED] babbled: Hey Raster, On 7/9/07, The Rasterman Carsten Haitzler [EMAIL PROTECTED] wrote: On Fri, 6 Jul 2007 18:00:08 -0300 Andre Magalhaes [EMAIL PROTECTED] babbled: Hi all, As this is my first post here, let me introduce myself. I am Andre Moreira Magalhaes, aka andrunko, and I work for INdT in Brazil. hey andre :) Now let's go to the point. I am working on a project that requires that an Evas_Object to have a custom click area. This object is a non-retangular object (a circle for eg) with a transparent backgroung. When i click on the background of this object, if the click was in a transparent area this object shouldn't receive any event. I was investigating the Evas code and i found 3 ways that this could be done. currently evas doesn't do this. in theory it could - but it doesn't. 1 - Change evas_object_was_in_output_rect to always return 0 if the rect is in a transparent area of the object (not desired) 2 - Change evas_object_event_callback_call to return a boolean value indicating if the object handled the event and if not, keep sending event to the other objects in the list. If the object handled the event, stop there. This would require a lot of changes. 3 - Change evas_object_was_in_output_rect to check a for a custom in_output_rect method on the object, and if this method is set, use it to check if the rect is in output rect. This would require a new function, evas_object_is_in_output_rect_cb_set (or something similar) that could be implemented whenever is needed. If this method is not set, check the clip rectangle as it's done today. actually i already designed for this. there is an is_inside and was_inside method for objects. only line and polygon objects provide them and they just return 1 - these CAN be called if a point is inside the object rect and the code wants to determine if an event is still inside the object based on private object data (eg polygon outline, image pixel alpha channel data etc.). right now it basically isn't used - but its intent was to be used for this. the problem is this is actually relatively slow/expensive to do. you probably also want a way of enabling or disabling this level of event processing per object to save cost. so we probably need to add an object flag to use these methods, if they exist, or disable them (disabled by default), then provide methods for image objects at the least - then actually use them, if they are provided, and the flag is enabled for that object. implementing this won't be too hrd, but it won't be trivial. you need to be able to figure otu any x,y co-ord within the object and what pixel of the image that may map to based on paremeters of the object, then go check that pixel's alpha channel (if the image has an alpha channel). for polygon nd line objects you need to do some half-plane point intersection math (easy but its order(n) where n is the number of sides of the polygon). for lines its strange - you might want perfect inclusion, but that's a very small space unless its a thick line (doesn't exist currently). for text... thats hard as you need to figure out what character is in that x,y (that's easy) and then check the character glyph pixels to see if its inside... but anyway - i added this mechanism in at the very start but have never used it (or really needed it enough to implement the rest of it). hmmm, i didn't know about this is_inside method, it's similar to what not surprising. it's hidden away for one day when i might want to use it :) i wanted but with some improvements :D. Attached there is a patch to implement it on evas_object_image and edje, and a callback to enable/disable it. I didn't like the name convention but this is something easy to change. I tested it here and it seems to be working. This is my first patch to evas, so please let me know where i can improve. Any comment is welcome you seem to have only implemented the evas-side of using this method and a very simple/primitive get pixel in evas_object_image_is_inside (). This doesn't handle border scaling and any form of fills other than Scaling fills. i think you really need to implement this - you need to take the x,y in canvas-co-ordinates, then convert this to a, x,y in the pixel array for the image (remember there is a fill origin and size so the image may get scaled differently to the size of the object, also its original can be offset. also there is border scaling that removes scaling for specified edges of the image that you need to account for in converting the canvas co-ord x,y into a pixel x,y reference). hmmm, ok, i will fix this. and as gustavo mentioned - this only covers argb32 images - doesn't handle yuv (though yuv will ALWAYS
Re: [E-devel] Support custom click area for Evas_Object
Added to bugzilla: http://bugzilla.enlightenment.org/show_bug.cgi?id=105 (evas patch) http://bugzilla.enlightenment.org/show_bug.cgi?id=106 (edje patch) BR Andrunko On 7/16/07, Andre Magalhaes [EMAIL PROTECTED] wrote: Hi, On 7/16/07, The Rasterman Carsten Haitzler [EMAIL PROTECTED] wrote: On Mon, 9 Jul 2007 19:20:57 -0300 Andre Magalhaes [EMAIL PROTECTED] babbled: Hey Raster, On 7/9/07, The Rasterman Carsten Haitzler [EMAIL PROTECTED] wrote: On Fri, 6 Jul 2007 18:00:08 -0300 Andre Magalhaes [EMAIL PROTECTED] babbled: Hi all, As this is my first post here, let me introduce myself. I am Andre Moreira Magalhaes, aka andrunko, and I work for INdT in Brazil. hey andre :) Now let's go to the point. I am working on a project that requires that an Evas_Object to have a custom click area. This object is a non-retangular object (a circle for eg) with a transparent backgroung. When i click on the background of this object, if the click was in a transparent area this object shouldn't receive any event. I was investigating the Evas code and i found 3 ways that this could be done. currently evas doesn't do this. in theory it could - but it doesn't. 1 - Change evas_object_was_in_output_rect to always return 0 if the rect is in a transparent area of the object (not desired) 2 - Change evas_object_event_callback_call to return a boolean value indicating if the object handled the event and if not, keep sending event to the other objects in the list. If the object handled the event, stop there. This would require a lot of changes. 3 - Change evas_object_was_in_output_rect to check a for a custom in_output_rect method on the object, and if this method is set, use it to check if the rect is in output rect. This would require a new function, evas_object_is_in_output_rect_cb_set (or something similar) that could be implemented whenever is needed. If this method is not set, check the clip rectangle as it's done today. actually i already designed for this. there is an is_inside and was_inside method for objects. only line and polygon objects provide them and they just return 1 - these CAN be called if a point is inside the object rect and the code wants to determine if an event is still inside the object based on private object data (eg polygon outline, image pixel alpha channel data etc.). right now it basically isn't used - but its intent was to be used for this. the problem is this is actually relatively slow/expensive to do. you probably also want a way of enabling or disabling this level of event processing per object to save cost. so we probably need to add an object flag to use these methods, if they exist, or disable them (disabled by default), then provide methods for image objects at the least - then actually use them, if they are provided, and the flag is enabled for that object. implementing this won't be too hrd, but it won't be trivial. you need to be able to figure otu any x,y co-ord within the object and what pixel of the image that may map to based on paremeters of the object, then go check that pixel's alpha channel (if the image has an alpha channel). for polygon nd line objects you need to do some half-plane point intersection math (easy but its order(n) where n is the number of sides of the polygon). for lines its strange - you might want perfect inclusion, but that's a very small space unless its a thick line (doesn't exist currently). for text... thats hard as you need to figure out what character is in that x,y (that's easy) and then check the character glyph pixels to see if its inside... but anyway - i added this mechanism in at the very start but have never used it (or really needed it enough to implement the rest of it). hmmm, i didn't know about this is_inside method, it's similar to what not surprising. it's hidden away for one day when i might want to use it :) i wanted but with some improvements :D. Attached there is a patch to implement it on evas_object_image and edje, and a callback to enable/disable it. I didn't like the name convention but this is something easy to change. I tested it here and it seems to be working. This is my first patch to evas, so please let me know where i can improve. Any comment is welcome you seem to have only implemented the evas-side of using this method and a very simple/primitive get pixel in evas_object_image_is_inside (). This doesn't handle border scaling and any form of fills other than Scaling fills. i think you really need to implement this - you need to take the x,y in canvas-co-ordinates, then convert this to a, x,y in the pixel array for the image (remember there is a fill
Re: [E-devel] trying to improve optimizations with compiler help (or alternatives to autotools?)
Hi, On 7/15/07, The Rasterman Carsten Haitzler [EMAIL PROTECTED] wrote: On Sun, 1 Jul 2007 21:17:30 -0300 Gustavo Sverzut Barbieri [EMAIL PROTECTED] babbled: Hi guys, these days I was reading GCC's manual and saw that it can compile and operate on more than one file at the same time (-combine) and optimize based on this (-fwhole-program). Until GCC get link-time optimization (LTO) support, this is the only way to optimize within files, but we're unable to use this, because we use autotools and it's stupid way to generate one object (.o) per source (.c)... this is great while developing, reducing compile time, just recompiling the changed sources and then linking it again, but it sucks for the final build. kde3 build system supports this with --enable-final option on configure, so you can compile every module with one big source file. You may want to take a look at it This should shrink final source, produce more optimized code, etc. Another step to improve optimization would be use profile feedback (-fprofile-generate and -fprofile-use) , with -fprofile-arcs, -freorder-functions... AFAIK, autotools doesn't support these things, maybe CMake but I'm not sure, do you know any build infrastructure that supports this? I'd really like to have this setup so we could use GCC better, for systems like Nokia N800 and OpenMoko, this makes a big difference. personally i;'d say wait until autotools supports it. it will help - how much is a question. i don't think it will help a HUGE amount - and the cost of maintaining specialised build targets in Makefile.am's will suck. if you really want to try - write a shells script to just build everything in 1 go as you want :) try it out and see. maybe this is the best way to do this for now - write specialised build.sh's or something to compile using only gcc and very specific option sets. it will probably be less work than trying to maintain it within configure/make/make install autofoo. -- Gustavo Sverzut Barbieri -- Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] ICQ#: 17249123 Skype: gsbarbieri Mobile: +55 (81) 9927 0010 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)[EMAIL PROTECTED] 裸好多 Tokyo, Japan (東京 日本) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Support custom click area for Evas_Object
Hi again, I found a bug on the patch when using the 16 bits engine, and here is a new fixed patch. The patch also fixes the documentation as described by Gustavo. I tested it against software_x11 and software_16_x11 engines. BR Andrunko On 7/11/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/11/07, Andre Magalhaes [EMAIL PROTECTED] wrote: Hi again, So i wrote a new version of the patch supporting stride. The new patch adds a new public method evas_object_image_stride_get that returns the row stride of the image. In etk/ewl there are some places that make use of image_data directly as if it was a 32 bits ARGB data. These codes can be fixed by testing the cspace and using the row stride to get a certain pixel and the rgba component, but maybe it would be interesting to have some functions to get/set the rgba of a certain image pixel. This is not done in this patch, as i will wait for a review first. IMHO it's fine now. Just a minor notice about stride_get documentation, it's not the number of bytes, but numer of units, so you have to multiply by unit size, example in 16bpp: sizeof(DATA16) for color, sizeof(DATA8) for alpha. -- Gustavo Sverzut Barbieri -- Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] ICQ#: 17249123 Skype: gsbarbieri Mobile: +55 (81) 9927 0010 Index: src/lib/Evas.h === RCS file: /var/cvs/e/e17/libs/evas/src/lib/Evas.h,v retrieving revision 1.100 diff -u -3 -p -r1.100 Evas.h --- src/lib/Evas.h 10 Jul 2007 00:13:25 - 1.100 +++ src/lib/Evas.h 12 Jul 2007 20:40:47 - @@ -469,6 +469,7 @@ extern C { EAPI void evas_object_image_fill_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); EAPI void evas_object_image_size_set(Evas_Object *obj, int w, int h); EAPI void evas_object_image_size_get(Evas_Object *obj, int *w, int *h); + EAPI void evas_object_image_stride_get (Evas_Object *obj, int *stride); EAPI int evas_object_image_load_error_get (Evas_Object *obj); EAPI void evas_object_image_data_set(Evas_Object *obj, void *data); EAPI void *evas_object_image_data_get(Evas_Object *obj, Evas_Bool for_writing); @@ -767,6 +768,9 @@ extern C { EAPI void evas_object_propagate_events_set (Evas_Object *obj, Evas_Bool prop); EAPI Evas_Bool evas_object_propagate_events_get (Evas_Object *obj); + EAPI void evas_object_precise_is_inside_set (Evas_Object *obj, Evas_Bool precise); + EAPI Evas_Bool evas_object_precise_is_inside_get (Evas_Object *obj); + EAPI void evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info), const void *data); EAPI void *evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info)); Index: src/lib/canvas/evas_events.c === RCS file: /var/cvs/e/e17/libs/evas/src/lib/canvas/evas_events.c,v retrieving revision 1.51 diff -u -3 -p -r1.51 evas_events.c --- src/lib/canvas/evas_events.c30 Apr 2007 04:22:42 - 1.51 +++ src/lib/canvas/evas_events.c12 Jul 2007 20:40:47 - @@ -57,7 +57,9 @@ _evas_event_object_list_in_get(Evas *e, } else { - if (evas_object_is_in_output_rect(obj, x, y, 1, 1)) + if (evas_object_is_in_output_rect(obj, x, y, 1, 1) + ((!obj-precise_is_inside) || + (evas_object_is_inside(obj, x, y { in = evas_list_append(in, obj); if (!obj-repeat_events) @@ -584,7 +586,9 @@ evas_event_feed_mouse_move(Evas *e, int (evas_object_clippers_is_visible(obj)) (evas_list_find(ins, obj)) (!evas_event_passes_through(obj)) -(!obj-clip.clipees)) +(!obj-clip.clipees) +((!obj-precise_is_inside) || + (evas_object_is_inside(obj, x, y { if ((px != x) || (py != y)) { @@ -989,7 +993,11 @@ evas_object_pass_events_set(Evas_Object evas_object_smart_member_cache_invalidate(obj); if (evas_object_is_in_output_rect(obj, obj-layer-evas-pointer.x, -obj-layer-evas-pointer.y, 1, 1)) +obj-layer-evas-pointer.y, 1, 1) + ((!obj-precise_is_inside
[E-devel] [PATCH] Etk fix ecore_evas_software_x11_16
Hi, The attached patch fix a bug on ecore_evas_software_x11_16 to make it use the evas software_x11_16 engine. BR Andrunko Index: src/engines/ecore_evas_software_x11_16/ecore_evas_software_x11_16.c === RCS file: /var/cvs/e/e17/libs/etk/src/engines/ecore_evas_software_x11_16/ecore_evas_software_x11_16.c,v retrieving revision 1.2 diff -u -3 -p -r1.2 ecore_evas_software_x11_16.c --- src/engines/ecore_evas_software_x11_16/ecore_evas_software_x11_16.c 29 Jun 2007 12:00:14 - 1.2 +++ src/engines/ecore_evas_software_x11_16/ecore_evas_software_x11_16.c 12 Jul 2007 20:25:35 - @@ -95,7 +95,7 @@ Etk_Engine *engine_open(int *argc, char { engine_info.engine_data = NULL; engine_info.engine_name = strdup(ecore_evas_software_x11_16); - etk_engine_inherit_from(engine_info, ecore_evas_software_x11, argc, argv); + etk_engine_inherit_from(engine_info, ecore_evas_x11, argc, argv); return engine_info; } - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] [PATCH] Etk fix ecore_evas_software_x11_16
Hi, The attached patch fix a bug on ecore_evas_software_x11_16 to make it use the evas software_x11_16 engine. BR Andrunko Index: src/engines/ecore_evas_software_x11_16/ecore_evas_software_x11_16.c === RCS file: /var/cvs/e/e17/libs/etk/src/engines/ecore_evas_software_x11_16/ecore_evas_software_x11_16.c,v retrieving revision 1.2 diff -u -3 -p -r1.2 ecore_evas_software_x11_16.c --- src/engines/ecore_evas_software_x11_16/ecore_evas_software_x11_16.c 29 Jun 2007 12:00:14 - 1.2 +++ src/engines/ecore_evas_software_x11_16/ecore_evas_software_x11_16.c 12 Jul 2007 20:25:35 - @@ -95,7 +95,7 @@ Etk_Engine *engine_open(int *argc, char { engine_info.engine_data = NULL; engine_info.engine_name = strdup(ecore_evas_software_x11_16); - etk_engine_inherit_from(engine_info, ecore_evas_software_x11, argc, argv); + etk_engine_inherit_from(engine_info, ecore_evas_x11, argc, argv); return engine_info; } - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Support custom click area for Evas_Object
Hi Raster, Any news on this? BR Andrunko On 7/10/07, Andre Magalhaes [EMAIL PROTECTED] wrote: I was looking into etk/ewl code and i saw that they are using evas_object_image_data_get in some places and they are assuming that the data is always in RGBA format (as it was before). Probably other projects (modules) do the same. Maybe some helper functions in evas to retrieve the rgba components of an evas_object_image would be helpful. BR Andrunko On 7/10/07, Andre Magalhaes [EMAIL PROTECTED] wrote: On 7/10/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/10/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/9/07, Andre Magalhaes [EMAIL PROTECTED] wrote: Hi, On 7/9/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/9/07, Andre Magalhaes [EMAIL PROTECTED] wrote: Hey Raster, On 7/9/07, The Rasterman Carsten Haitzler [EMAIL PROTECTED] wrote: On Fri, 6 Jul 2007 18:00:08 -0300 Andre Magalhaes [EMAIL PROTECTED] + o-engine_data = obj-layer-evas-engine.func-image_data_get(obj-layer-evas-engine.data.output, + o-engine_data, + 0, + data); + data += (y * w) + x; + a = (*data 24) 0xff; this will not work for engines != 32bpp, like my 16bpp. If not existent, we need to write an engine-provided get_pixel(), that give normalized 0-255 components. I imagined that but in the documentation of evas_object_image_data_get it says: * @return A pointer to the raw data as 32 bit unsigned integer in format ARGB. I thought that all engines should convert it to 32 bits in this case, as it's stated on documentation. I am using the same method as evas_object_image_data_get uses. Please someone could clarify this. Hum... I need to update this doc since it's not true anymore (since 16bpp engine, the first non-32bpp), maybe also providing engine functions to manipulate this data. It's a no-go to convert image buffers to 32bpp for these operations, some images would take a lot of CPU and memory (800x600 = 480,000 iterations, 1440,000 bytes, to access one value of interest (alpha). talking to andré in private and also reading recent commits by raster about colorspace, we have noticed that is still impossible to get the pixel with available info, since buffer is not based on just width and height, but also on row stride, this is used (at least in 16bpp) to provide better alignment. I've fixed the evas patch to take into account the has_alpha value of the image and also the colorspace. For now i am using width instead of stride (i know it's wrong), so we need to decide whether to have a get_pixel on the engine or export the stride attr to Evas_Object_Image. I've also fixed the coding styles parentheses issue :D BR Andrunko - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Support custom click area for Evas_Object
np, take your time :-) On 7/11/07, The Rasterman Carsten Haitzler [EMAIL PROTECTED] wrote: On Wed, 11 Jul 2007 10:56:28 -0300 Andre Magalhaes [EMAIL PROTECTED] babbled: You'll need to wait until Friday :) No time right now. Hi Raster, Any news on this? BR Andrunko On 7/10/07, Andre Magalhaes [EMAIL PROTECTED] wrote: I was looking into etk/ewl code and i saw that they are using evas_object_image_data_get in some places and they are assuming that the data is always in RGBA format (as it was before). Probably other projects (modules) do the same. Maybe some helper functions in evas to retrieve the rgba components of an evas_object_image would be helpful. BR Andrunko On 7/10/07, Andre Magalhaes [EMAIL PROTECTED] wrote: On 7/10/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/10/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/9/07, Andre Magalhaes [EMAIL PROTECTED] wrote: Hi, On 7/9/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/9/07, Andre Magalhaes [EMAIL PROTECTED] wrote: Hey Raster, On 7/9/07, The Rasterman Carsten Haitzler [EMAIL PROTECTED] wrote: On Fri, 6 Jul 2007 18:00:08 -0300 Andre Magalhaes [EMAIL PROTECTED] + o-engine_data = obj-layer-evas-engine.func-image_data_get (obj-layer-evas-engine.data.output, + o-engine_data, + 0, + data); + data += (y * w) + x; + a = (*data 24) 0xff; this will not work for engines != 32bpp, like my 16bpp. If not existent, we need to write an engine-provided get_pixel(), that give normalized 0-255 components. I imagined that but in the documentation of evas_object_image_data_get it says: * @return A pointer to the raw data as 32 bit unsigned integer in format ARGB. I thought that all engines should convert it to 32 bits in this case, as it's stated on documentation. I am using the same method as evas_object_image_data_get uses. Please someone could clarify this. Hum... I need to update this doc since it's not true anymore (since 16bpp engine, the first non-32bpp), maybe also providing engine functions to manipulate this data. It's a no-go to convert image buffers to 32bpp for these operations, some images would take a lot of CPU and memory (800x600 = 480,000 iterations, 1440,000 bytes, to access one value of interest (alpha). talking to andré in private and also reading recent commits by raster about colorspace, we have noticed that is still impossible to get the pixel with available info, since buffer is not based on just width and height, but also on row stride, this is used (at least in 16bpp) to provide better alignment. I've fixed the evas patch to take into account the has_alpha value of the image and also the colorspace. For now i am using width instead of stride (i know it's wrong), so we need to decide whether to have a get_pixel on the engine or export the stride attr to Evas_Object_Image. I've also fixed the coding styles parentheses issue :D BR Andrunko -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)[EMAIL PROTECTED] 裸好多 Tokyo, Japan (�|京 日本) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Support custom click area for Evas_Object
Hi again, So i wrote a new version of the patch supporting stride. The new patch adds a new public method evas_object_image_stride_get that returns the row stride of the image. In etk/ewl there are some places that make use of image_data directly as if it was a 32 bits ARGB data. These codes can be fixed by testing the cspace and using the row stride to get a certain pixel and the rgba component, but maybe it would be interesting to have some functions to get/set the rgba of a certain image pixel. This is not done in this patch, as i will wait for a review first. BR Andrunko On 7/11/07, Andre Magalhaes [EMAIL PROTECTED] wrote: np, take your time :-) On 7/11/07, The Rasterman Carsten Haitzler [EMAIL PROTECTED] wrote: On Wed, 11 Jul 2007 10:56:28 -0300 Andre Magalhaes [EMAIL PROTECTED] babbled: You'll need to wait until Friday :) No time right now. Hi Raster, Any news on this? BR Andrunko On 7/10/07, Andre Magalhaes [EMAIL PROTECTED] wrote: I was looking into etk/ewl code and i saw that they are using evas_object_image_data_get in some places and they are assuming that the data is always in RGBA format (as it was before). Probably other projects (modules) do the same. Maybe some helper functions in evas to retrieve the rgba components of an evas_object_image would be helpful. BR Andrunko On 7/10/07, Andre Magalhaes [EMAIL PROTECTED] wrote: On 7/10/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/10/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/9/07, Andre Magalhaes [EMAIL PROTECTED] wrote: Hi, On 7/9/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/9/07, Andre Magalhaes [EMAIL PROTECTED] wrote: Hey Raster, On 7/9/07, The Rasterman Carsten Haitzler [EMAIL PROTECTED] wrote: On Fri, 6 Jul 2007 18:00:08 -0300 Andre Magalhaes [EMAIL PROTECTED] + o-engine_data = obj-layer-evas-engine.func-image_data_get (obj-layer-evas-engine.data.output, + o-engine_data, + 0, + data); + data += (y * w) + x; + a = (*data 24) 0xff; this will not work for engines != 32bpp, like my 16bpp. If not existent, we need to write an engine-provided get_pixel(), that give normalized 0-255 components. I imagined that but in the documentation of evas_object_image_data_get it says: * @return A pointer to the raw data as 32 bit unsigned integer in format ARGB. I thought that all engines should convert it to 32 bits in this case, as it's stated on documentation. I am using the same method as evas_object_image_data_get uses. Please someone could clarify this. Hum... I need to update this doc since it's not true anymore (since 16bpp engine, the first non-32bpp), maybe also providing engine functions to manipulate this data. It's a no-go to convert image buffers to 32bpp for these operations, some images would take a lot of CPU and memory (800x600 = 480,000 iterations, 1440,000 bytes, to access one value of interest (alpha). talking to andré in private and also reading recent commits by raster about colorspace, we have noticed that is still impossible to get the pixel with available info, since buffer is not based on just width and height, but also on row stride, this is used (at least in 16bpp) to provide better alignment. I've fixed the evas patch to take into account the has_alpha value of the image and also the colorspace. For now i am using width instead of stride (i know it's wrong), so we need to decide whether to have a get_pixel on the engine or export the stride attr to Evas_Object_Image. I've also fixed the coding styles parentheses issue :D BR Andrunko -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)[EMAIL PROTECTED] 裸好多 Tokyo, Japan (�|京 日本) ? src/lib/engines/common/w Index: src/lib/Evas.h === RCS file: /var/cvs/e/e17/libs/evas/src/lib/Evas.h,v retrieving revision 1.100 diff -u -3 -p -r1.100 Evas.h --- src/lib/Evas.h 10 Jul 2007 00:13:25 - 1.100 +++ src/lib/Evas.h 11 Jul 2007 19:50:16 - @@ -469,6 +469,7 @@ extern C { EAPI void evas_object_image_fill_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); EAPI void evas_object_image_size_set(Evas_Object *obj, int w, int h); EAPI void evas_object_image_size_get(Evas_Object *obj, int *w, int *h); + EAPI void evas_object_image_stride_get (Evas_Object *obj, int *stride); EAPI int
[E-devel] [PATCH] evas software_16 engine
Hi, Attached there is a patch to fix evas software 16 engine build and to add the missing image_data_get method BR Andrunko Index: src/modules/engines/software_16/evas_engine.c === RCS file: /var/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_engine.c,v retrieving revision 1.4 diff -u -r1.4 evas_engine.c --- src/modules/engines/software_16/evas_engine.c 19 Jun 2007 22:52:12 - 1.4 +++ src/modules/engines/software_16/evas_engine.c 10 Jul 2007 14:43:28 - @@ -320,12 +320,7 @@ static int eng_image_colorspace_get(void *data, void *image) { - Soft16_Image *im; - - if (!image) return EVAS_COLORSPACE_RGB565; - im = image; - if (im-have_alpha) return EVAS_COLORSPACE_RGB565_A5P; - return EVAS_COLORSPACE_RGB565; + return EVAS_COLORSPACE_RGB565_A5P; } static void * @@ -431,8 +426,31 @@ static void * eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data) { - // FIXME: implement - *image_data = NULL; + Soft16_Image *im; + + if (!image) + { + *image_data = NULL; + return NULL; + } + + im = image; + + if (to_write) + { + if (im-references 1) + { + Soft16_Image *im_new; + + im_new = soft16_image_new(im-w, im-h, im-stride, im-have_alpha, im-pixels, 1); + if (!im_new) return im; + soft16_image_free(im); + im = im_new; + } + } + + if (image_data) *image_data = (DATA32 *) im-pixels; + return image; } - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Support custom click area for Evas_Object
Hey Raster, On 7/9/07, The Rasterman Carsten Haitzler [EMAIL PROTECTED] wrote: On Fri, 6 Jul 2007 18:00:08 -0300 Andre Magalhaes [EMAIL PROTECTED] babbled: Hi all, As this is my first post here, let me introduce myself. I am Andre Moreira Magalhaes, aka andrunko, and I work for INdT in Brazil. hey andre :) Now let's go to the point. I am working on a project that requires that an Evas_Object to have a custom click area. This object is a non-retangular object (a circle for eg) with a transparent backgroung. When i click on the background of this object, if the click was in a transparent area this object shouldn't receive any event. I was investigating the Evas code and i found 3 ways that this could be done. currently evas doesn't do this. in theory it could - but it doesn't. 1 - Change evas_object_was_in_output_rect to always return 0 if the rect is in a transparent area of the object (not desired) 2 - Change evas_object_event_callback_call to return a boolean value indicating if the object handled the event and if not, keep sending event to the other objects in the list. If the object handled the event, stop there. This would require a lot of changes. 3 - Change evas_object_was_in_output_rect to check a for a custom in_output_rect method on the object, and if this method is set, use it to check if the rect is in output rect. This would require a new function, evas_object_is_in_output_rect_cb_set (or something similar) that could be implemented whenever is needed. If this method is not set, check the clip rectangle as it's done today. actually i already designed for this. there is an is_inside and was_inside method for objects. only line and polygon objects provide them and they just return 1 - these CAN be called if a point is inside the object rect and the code wants to determine if an event is still inside the object based on private object data (eg polygon outline, image pixel alpha channel data etc.). right now it basically isn't used - but its intent was to be used for this. the problem is this is actually relatively slow/expensive to do. you probably also want a way of enabling or disabling this level of event processing per object to save cost. so we probably need to add an object flag to use these methods, if they exist, or disable them (disabled by default), then provide methods for image objects at the least - then actually use them, if they are provided, and the flag is enabled for that object. implementing this won't be too hrd, but it won't be trivial. you need to be able to figure otu any x,y co-ord within the object and what pixel of the image that may map to based on paremeters of the object, then go check that pixel's alpha channel (if the image has an alpha channel). for polygon nd line objects you need to do some half-plane point intersection math (easy but its order(n) where n is the number of sides of the polygon). for lines its strange - you might want perfect inclusion, but that's a very small space unless its a thick line (doesn't exist currently). for text... thats hard as you need to figure out what character is in that x,y (that's easy) and then check the character glyph pixels to see if its inside... but anyway - i added this mechanism in at the very start but have never used it (or really needed it enough to implement the rest of it). hmmm, i didn't know about this is_inside method, it's similar to what i wanted but with some improvements :D. Attached there is a patch to implement it on evas_object_image and edje, and a callback to enable/disable it. I didn't like the name convention but this is something easy to change. I tested it here and it seems to be working. This is my first patch to evas, so please let me know where i can improve. Any comment is welcome In the current code, i could do repeat_events=1 to make both objects receive the event, and do nothing on the circle object if the clicked area is a transparent area. The problem is that this won't work for the lower widget, as it's always receive the event, even if the circle handled it. see above - also add a flag to edje to enable or disable this event processing and bingo... all done. :) Any other ideas on how to do it? I am willing to write a patch if you agree. I would vote for number 3, as it's extensible, does not require a lot of changes and does not impact on performance in the default case (no custom is_in_output_rect method). none of the above - see my suggestion :) Any help is appreciate, BR Andrunko - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists
Re: [E-devel] Support custom click area for Evas_Object
Hi, On 7/9/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/9/07, Andre Magalhaes [EMAIL PROTECTED] wrote: Hey Raster, On 7/9/07, The Rasterman Carsten Haitzler [EMAIL PROTECTED] wrote: On Fri, 6 Jul 2007 18:00:08 -0300 Andre Magalhaes [EMAIL PROTECTED] babbled: Hi all, As this is my first post here, let me introduce myself. I am Andre Moreira Magalhaes, aka andrunko, and I work for INdT in Brazil. hey andre :) Now let's go to the point. I am working on a project that requires that an Evas_Object to have a custom click area. This object is a non-retangular object (a circle for eg) with a transparent backgroung. When i click on the background of this object, if the click was in a transparent area this object shouldn't receive any event. I was investigating the Evas code and i found 3 ways that this could be done. currently evas doesn't do this. in theory it could - but it doesn't. 1 - Change evas_object_was_in_output_rect to always return 0 if the rect is in a transparent area of the object (not desired) 2 - Change evas_object_event_callback_call to return a boolean value indicating if the object handled the event and if not, keep sending event to the other objects in the list. If the object handled the event, stop there. This would require a lot of changes. 3 - Change evas_object_was_in_output_rect to check a for a custom in_output_rect method on the object, and if this method is set, use it to check if the rect is in output rect. This would require a new function, evas_object_is_in_output_rect_cb_set (or something similar) that could be implemented whenever is needed. If this method is not set, check the clip rectangle as it's done today. actually i already designed for this. there is an is_inside and was_inside method for objects. only line and polygon objects provide them and they just return 1 - these CAN be called if a point is inside the object rect and the code wants to determine if an event is still inside the object based on private object data (eg polygon outline, image pixel alpha channel data etc.). right now it basically isn't used - but its intent was to be used for this. the problem is this is actually relatively slow/expensive to do. you probably also want a way of enabling or disabling this level of event processing per object to save cost. so we probably need to add an object flag to use these methods, if they exist, or disable them (disabled by default), then provide methods for image objects at the least - then actually use them, if they are provided, and the flag is enabled for that object. implementing this won't be too hrd, but it won't be trivial. you need to be able to figure otu any x,y co-ord within the object and what pixel of the image that may map to based on paremeters of the object, then go check that pixel's alpha channel (if the image has an alpha channel). for polygon nd line objects you need to do some half-plane point intersection math (easy but its order(n) where n is the number of sides of the polygon). for lines its strange - you might want perfect inclusion, but that's a very small space unless its a thick line (doesn't exist currently). for text... thats hard as you need to figure out what character is in that x,y (that's easy) and then check the character glyph pixels to see if its inside... but anyway - i added this mechanism in at the very start but have never used it (or really needed it enough to implement the rest of it). hmmm, i didn't know about this is_inside method, it's similar to what i wanted but with some improvements :D. Attached there is a patch to implement it on evas_object_image and edje, and a callback to enable/disable it. I didn't like the name convention but this is something easy to change. I tested it here and it seems to be working. This is my first patch to evas, so please let me know where i can improve. Any comment is welcome + if (x w || y h) { + return 0; + } coding style, raster likes ((cond1) || (cond2)) Fixed. + o-engine_data = obj-layer-evas-engine.func-image_data_get(obj-layer-evas-engine.data.output, + o-engine_data, + 0, + data); + data += (y * w) + x; + a = (*data 24) 0xff; this will not work for engines != 32bpp, like my 16bpp. If not existent, we need to write an engine-provided get_pixel(), that give normalized 0-255 components. I imagined that but in the documentation of evas_object_image_data_get it says: * @return A pointer to the raw data as 32 bit unsigned integer in format ARGB. I thought
Re: [E-devel] Support custom click area for Evas_Object
Ooops, Forgot to attach the modified patch. On 7/9/07, Andre Magalhaes [EMAIL PROTECTED] wrote: Hi, On 7/9/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/9/07, Andre Magalhaes [EMAIL PROTECTED] wrote: Hey Raster, On 7/9/07, The Rasterman Carsten Haitzler [EMAIL PROTECTED] wrote: On Fri, 6 Jul 2007 18:00:08 -0300 Andre Magalhaes [EMAIL PROTECTED] babbled: Hi all, As this is my first post here, let me introduce myself. I am Andre Moreira Magalhaes, aka andrunko, and I work for INdT in Brazil. hey andre :) Now let's go to the point. I am working on a project that requires that an Evas_Object to have a custom click area. This object is a non-retangular object (a circle for eg) with a transparent backgroung. When i click on the background of this object, if the click was in a transparent area this object shouldn't receive any event. I was investigating the Evas code and i found 3 ways that this could be done. currently evas doesn't do this. in theory it could - but it doesn't. 1 - Change evas_object_was_in_output_rect to always return 0 if the rect is in a transparent area of the object (not desired) 2 - Change evas_object_event_callback_call to return a boolean value indicating if the object handled the event and if not, keep sending event to the other objects in the list. If the object handled the event, stop there. This would require a lot of changes. 3 - Change evas_object_was_in_output_rect to check a for a custom in_output_rect method on the object, and if this method is set, use it to check if the rect is in output rect. This would require a new function, evas_object_is_in_output_rect_cb_set (or something similar) that could be implemented whenever is needed. If this method is not set, check the clip rectangle as it's done today. actually i already designed for this. there is an is_inside and was_inside method for objects. only line and polygon objects provide them and they just return 1 - these CAN be called if a point is inside the object rect and the code wants to determine if an event is still inside the object based on private object data (eg polygon outline, image pixel alpha channel data etc.). right now it basically isn't used - but its intent was to be used for this. the problem is this is actually relatively slow/expensive to do. you probably also want a way of enabling or disabling this level of event processing per object to save cost. so we probably need to add an object flag to use these methods, if they exist, or disable them (disabled by default), then provide methods for image objects at the least - then actually use them, if they are provided, and the flag is enabled for that object. implementing this won't be too hrd, but it won't be trivial. you need to be able to figure otu any x,y co-ord within the object and what pixel of the image that may map to based on paremeters of the object, then go check that pixel's alpha channel (if the image has an alpha channel). for polygon nd line objects you need to do some half-plane point intersection math (easy but its order(n) where n is the number of sides of the polygon). for lines its strange - you might want perfect inclusion, but that's a very small space unless its a thick line (doesn't exist currently). for text... thats hard as you need to figure out what character is in that x,y (that's easy) and then check the character glyph pixels to see if its inside... but anyway - i added this mechanism in at the very start but have never used it (or really needed it enough to implement the rest of it). hmmm, i didn't know about this is_inside method, it's similar to what i wanted but with some improvements :D. Attached there is a patch to implement it on evas_object_image and edje, and a callback to enable/disable it. I didn't like the name convention but this is something easy to change. I tested it here and it seems to be working. This is my first patch to evas, so please let me know where i can improve. Any comment is welcome + if (x w || y h) { + return 0; + } coding style, raster likes ((cond1) || (cond2)) Fixed. + o-engine_data = obj-layer-evas-engine.func-image_data_get(obj-layer-evas-engine.data.output, + o-engine_data, + 0, + data); + data += (y * w) + x; + a = (*data 24) 0xff; this will not work for engines != 32bpp, like my 16bpp. If not existent, we need to write an engine-provided get_pixel(), that give normalized 0-255 components. I imagined that but in the documentation of evas_object_image_data_get it says: * @return A pointer to the raw data as 32 bit
[E-devel] [PATCH] etk + exhibit
Hi, I found some minor bugs in etk+exhibit while playing with them yesterday. Attached there are 2 patches to fix the bugs The etk patch fixes a bug when reparenting a widget on an etk_box, _etk_box_child_remove is freeing the newly created cell. The exhibit patch fixes a bug where comment and len are unitialized and _ex_comment_jpeg_read is returning true but without success case M_SOS:. There is still one bug when you turn on/off show comments on the preferences dialog, but i could not find it, as it does not happen all the time. BR Andrunko ? src/lib/.etk_box.c.swp Index: src/lib/etk_box.c === RCS file: /var/cvs/e/e17/libs/etk/src/lib/etk_box.c,v retrieving revision 1.24 diff -u -r1.24 etk_box.c --- src/lib/etk_box.c 25 Mar 2007 18:22:00 - 1.24 +++ src/lib/etk_box.c 10 Jul 2007 01:50:11 - @@ -1046,8 +1046,8 @@ } box-cells_count[group]++; - etk_object_data_set(ETK_OBJECT(child), _Etk_Box::Cell, cell); etk_widget_parent_set(child, ETK_WIDGET(box)); + etk_object_data_set(ETK_OBJECT(child), _Etk_Box::Cell, cell); etk_signal_emit_by_name(child-added, ETK_OBJECT(box), NULL, child); } ? exhibit.log ? exhibit.log.1 Index: src/bin/exhibit_comment.c === RCS file: /var/cvs/e/e17/apps/exhibit/src/bin/exhibit_comment.c,v retrieving revision 1.12 diff -u -r1.12 exhibit_comment.c --- src/bin/exhibit_comment.c 1 Sep 2006 23:39:22 - 1.12 +++ src/bin/exhibit_comment.c 10 Jul 2007 01:51:54 - @@ -70,8 +70,8 @@ _ex_comment_load(Exhibit *e) { char *file; - char *comment; - unsigned int len; + char *comment = NULL; + unsigned int len = 0; file = ((Ex_Tab *) e-cur_tab)-cur_file; if (_ex_file_is_jpg(file)) Index: src/bin/exhibit_main.c === RCS file: /var/cvs/e/e17/apps/exhibit/src/bin/exhibit_main.c,v retrieving revision 1.114 diff -u -r1.114 exhibit_main.c --- src/bin/exhibit_main.c 9 Jul 2007 23:50:41 - 1.114 +++ src/bin/exhibit_main.c 10 Jul 2007 01:51:57 - @@ -890,7 +890,9 @@ char *homedir; const char **dnd_types; int dnd_types_num; - + + memset(file, 0, PATH_MAX); + e = calloc(1, sizeof(Exhibit)); e-mouse.down = 0; e-menu = NULL; - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Support custom click area for Evas_Object
On 7/10/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/10/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/9/07, Andre Magalhaes [EMAIL PROTECTED] wrote: Hi, On 7/9/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/9/07, Andre Magalhaes [EMAIL PROTECTED] wrote: Hey Raster, On 7/9/07, The Rasterman Carsten Haitzler [EMAIL PROTECTED] wrote: On Fri, 6 Jul 2007 18:00:08 -0300 Andre Magalhaes [EMAIL PROTECTED] + o-engine_data = obj-layer-evas-engine.func-image_data_get(obj-layer-evas-engine.data.output, + o-engine_data, + 0, + data); + data += (y * w) + x; + a = (*data 24) 0xff; this will not work for engines != 32bpp, like my 16bpp. If not existent, we need to write an engine-provided get_pixel(), that give normalized 0-255 components. I imagined that but in the documentation of evas_object_image_data_get it says: * @return A pointer to the raw data as 32 bit unsigned integer in format ARGB. I thought that all engines should convert it to 32 bits in this case, as it's stated on documentation. I am using the same method as evas_object_image_data_get uses. Please someone could clarify this. Hum... I need to update this doc since it's not true anymore (since 16bpp engine, the first non-32bpp), maybe also providing engine functions to manipulate this data. It's a no-go to convert image buffers to 32bpp for these operations, some images would take a lot of CPU and memory (800x600 = 480,000 iterations, 1440,000 bytes, to access one value of interest (alpha). talking to andré in private and also reading recent commits by raster about colorspace, we have noticed that is still impossible to get the pixel with available info, since buffer is not based on just width and height, but also on row stride, this is used (at least in 16bpp) to provide better alignment. I've fixed the evas patch to take into account the has_alpha value of the image and also the colorspace. For now i am using width instead of stride (i know it's wrong), so we need to decide whether to have a get_pixel on the engine or export the stride attr to Evas_Object_Image. I've also fixed the coding styles parentheses issue :D BR Andrunko Index: src/lib/Evas.h === RCS file: /var/cvs/e/e17/libs/evas/src/lib/Evas.h,v retrieving revision 1.100 diff -u -r1.100 Evas.h --- src/lib/Evas.h 10 Jul 2007 00:13:25 - 1.100 +++ src/lib/Evas.h 10 Jul 2007 05:04:40 - @@ -767,6 +767,9 @@ EAPI void evas_object_propagate_events_set (Evas_Object *obj, Evas_Bool prop); EAPI Evas_Bool evas_object_propagate_events_get (Evas_Object *obj); + EAPI void evas_object_precise_is_inside_set (Evas_Object *obj, Evas_Bool precise); + EAPI Evas_Bool evas_object_precise_is_inside_get (Evas_Object *obj); + EAPI void evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info), const void *data); EAPI void *evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info)); Index: src/lib/canvas/evas_events.c === RCS file: /var/cvs/e/e17/libs/evas/src/lib/canvas/evas_events.c,v retrieving revision 1.51 diff -u -r1.51 evas_events.c --- src/lib/canvas/evas_events.c 30 Apr 2007 04:22:42 - 1.51 +++ src/lib/canvas/evas_events.c 10 Jul 2007 05:04:42 - @@ -57,7 +57,9 @@ } else { - if (evas_object_is_in_output_rect(obj, x, y, 1, 1)) + if (evas_object_is_in_output_rect(obj, x, y, 1, 1) + ((!obj-precise_is_inside) || + (evas_object_is_inside(obj, x, y { in = evas_list_append(in, obj); if (!obj-repeat_events) @@ -584,7 +586,9 @@ (evas_object_clippers_is_visible(obj)) (evas_list_find(ins, obj)) (!evas_event_passes_through(obj)) - (!obj-clip.clipees)) + (!obj-clip.clipees) + ((!obj-precise_is_inside) || + (evas_object_is_inside(obj, x, y { if ((px != x) || (py != y)) { @@ -989,7 +993,11 @@ evas_object_smart_member_cache_invalidate(obj); if (evas_object_is_in_output_rect(obj, obj-layer-evas-pointer.x, - obj-layer-evas-pointer.y, 1, 1)) + obj-layer-evas-pointer.y, 1, 1) + ((!obj-precise_is_inside) || + (evas_object_is_inside(obj, + obj-layer-evas-pointer.x, + obj-layer-evas-pointer.y evas_event_feed_mouse_move(obj-layer-evas, obj-layer-evas
Re: [E-devel] Support custom click area for Evas_Object
I was looking into etk/ewl code and i saw that they are using evas_object_image_data_get in some places and they are assuming that the data is always in RGBA format (as it was before). Probably other projects (modules) do the same. Maybe some helper functions in evas to retrieve the rgba components of an evas_object_image would be helpful. BR Andrunko On 7/10/07, Andre Magalhaes [EMAIL PROTECTED] wrote: On 7/10/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/10/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/9/07, Andre Magalhaes [EMAIL PROTECTED] wrote: Hi, On 7/9/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote: On 7/9/07, Andre Magalhaes [EMAIL PROTECTED] wrote: Hey Raster, On 7/9/07, The Rasterman Carsten Haitzler [EMAIL PROTECTED] wrote: On Fri, 6 Jul 2007 18:00:08 -0300 Andre Magalhaes [EMAIL PROTECTED] + o-engine_data = obj-layer-evas-engine.func-image_data_get(obj-layer-evas-engine.data.output, + o-engine_data, + 0, + data); + data += (y * w) + x; + a = (*data 24) 0xff; this will not work for engines != 32bpp, like my 16bpp. If not existent, we need to write an engine-provided get_pixel(), that give normalized 0-255 components. I imagined that but in the documentation of evas_object_image_data_get it says: * @return A pointer to the raw data as 32 bit unsigned integer in format ARGB. I thought that all engines should convert it to 32 bits in this case, as it's stated on documentation. I am using the same method as evas_object_image_data_get uses. Please someone could clarify this. Hum... I need to update this doc since it's not true anymore (since 16bpp engine, the first non-32bpp), maybe also providing engine functions to manipulate this data. It's a no-go to convert image buffers to 32bpp for these operations, some images would take a lot of CPU and memory (800x600 = 480,000 iterations, 1440,000 bytes, to access one value of interest (alpha). talking to andré in private and also reading recent commits by raster about colorspace, we have noticed that is still impossible to get the pixel with available info, since buffer is not based on just width and height, but also on row stride, this is used (at least in 16bpp) to provide better alignment. I've fixed the evas patch to take into account the has_alpha value of the image and also the colorspace. For now i am using width instead of stride (i know it's wrong), so we need to decide whether to have a get_pixel on the engine or export the stride attr to Evas_Object_Image. I've also fixed the coding styles parentheses issue :D BR Andrunko - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] Support custom click area for Evas_Object
Hi all, As this is my first post here, let me introduce myself. I am Andre Moreira Magalhaes, aka andrunko, and I work for INdT in Brazil. Now let's go to the point. I am working on a project that requires that an Evas_Object to have a custom click area. This object is a non-retangular object (a circle for eg) with a transparent backgroung. When i click on the background of this object, if the click was in a transparent area this object shouldn't receive any event. I was investigating the Evas code and i found 3 ways that this could be done. 1 - Change evas_object_was_in_output_rect to always return 0 if the rect is in a transparent area of the object (not desired) 2 - Change evas_object_event_callback_call to return a boolean value indicating if the object handled the event and if not, keep sending event to the other objects in the list. If the object handled the event, stop there. This would require a lot of changes. 3 - Change evas_object_was_in_output_rect to check a for a custom in_output_rect method on the object, and if this method is set, use it to check if the rect is in output rect. This would require a new function, evas_object_is_in_output_rect_cb_set (or something similar) that could be implemented whenever is needed. If this method is not set, check the clip rectangle as it's done today. In the current code, i could do repeat_events=1 to make both objects receive the event, and do nothing on the circle object if the clicked area is a transparent area. The problem is that this won't work for the lower widget, as it's always receive the event, even if the circle handled it. Any other ideas on how to do it? I am willing to write a patch if you agree. I would vote for number 3, as it's extensible, does not require a lot of changes and does not impact on performance in the default case (no custom is_in_output_rect method). Any help is appreciate, BR Andrunko - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel