[EGIT] [core/elementary] master 01/01: test_hover.c: added hover test case to move hover object as we wish.

2013-09-23 Thread Daniel Juyung Seo
seoz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=c31bbe51139160048c18f3dc81bd3f5b1f901c6e

commit c31bbe51139160048c18f3dc81bd3f5b1f901c6e
Author: Daniel Juyung Seo 
Date:   Mon Sep 23 16:14:56 2013 +0900

test_hover.c: added hover test case to move hover object as we wish.

hover acts like elm_menu but it has all the hover features such as:
1. positioning: left, top-left, top, top-right, right, bottom-right, 
bottom, bottom-left, middle
2. content: one can set any object object as hover content

"transparent" style is added to dark theme.
---
 src/bin/test.c   |  2 ++
 src/bin/test_hover.c | 86 +---
 2 files changed, 84 insertions(+), 4 deletions(-)

diff --git a/src/bin/test.c b/src/bin/test.c
index ad63798..33cff15 100644
--- a/src/bin/test.c
+++ b/src/bin/test.c
@@ -47,6 +47,7 @@ void test_layout(void *data, Evas_Object *obj, void 
*event_info);
 void test_layout2(void *data, Evas_Object *obj, void *event_info);
 void test_hover(void *data, Evas_Object *obj, void *event_info);
 void test_hover2(void *data, Evas_Object *obj, void *event_info);
+void test_hover3(void *data, Evas_Object *obj, void *event_info);
 void test_entry(void *data, Evas_Object *obj, void *event_info);
 void test_entry_style_user(void *data, Evas_Object *obj, void *event_info);
 void test_entry_scrolled(void *data, Evas_Object *obj, void *event_info);
@@ -729,6 +730,7 @@ add_tests:
ADD_TEST(NULL, "Popups", "Ctxpopup", test_ctxpopup);
ADD_TEST(NULL, "Popups", "Hover", test_hover);
ADD_TEST(NULL, "Popups", "Hover 2", test_hover2);
+   ADD_TEST(NULL, "Popups", "Hover 3", test_hover3);
ADD_TEST(NULL, "Popups", "Notify", test_notify);
ADD_TEST(NULL, "Popups", "Tooltip", test_tooltip);
ADD_TEST(NULL, "Popups", "Tooltip 2", test_tooltip2);
diff --git a/src/bin/test_hover.c b/src/bin/test_hover.c
index 61d4f52..876f61b 100644
--- a/src/bin/test_hover.c
+++ b/src/bin/test_hover.c
@@ -18,10 +18,11 @@ my_hover_bt(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUS
 }
 
 static void
-_top_bt_clicked(void *data, Evas_Object *obj EINA_UNUSED,
-void *event_info EINA_UNUSED)
+_dismiss_hover(void *data, Evas_Object *obj EINA_UNUSED,
+   void *event_info EINA_UNUSED)
 {
-   Evas_Object *hv = (Evas_Object *)data;
+   Evas_Object *hv = data;
+
elm_hover_dismiss(hv);
 }
 
@@ -68,7 +69,7 @@ test_hover(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_inf
 
bt = elm_button_add(win);
elm_object_text_set(bt, "Top 1");
-   evas_object_smart_callback_add(bt, "clicked", _top_bt_clicked, hv);
+   evas_object_smart_callback_add(bt, "clicked", _dismiss_hover, hv);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
@@ -169,4 +170,81 @@ test_hover2(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_in
elm_object_part_content_set(hv, "right", bt);
evas_object_show(bt);
 }
+
+static void
+_hover_show_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj,
+   void *event_info)
+{
+   Evas_Object *fake_obj = evas_object_data_get(obj, "fake_obj");
+   if (!fake_obj) return;
+
+   Evas_Event_Mouse_Down *ev = event_info;
+   printf("position x: %d, y: %d \n", ev->canvas.x, ev->canvas.y);
+
+   evas_object_move(fake_obj, ev->canvas.x, ev->canvas.y);
+   evas_object_show(data);
+}
+
+/*
+ * hover acts like elm_menu but it has all the hover features such as:
+ * 1. positioning: left, top-left, top, top-right, right, bottom-right, bottom,
+ * bottom-left, middle
+ * 2. content: one can set any object object as hover content
+ */
+void
+test_hover3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+void *event_info EINA_UNUSED)
+{
+   Evas_Object *win, *fake_obj, *bx, *bt, *hv, *ic, *rect;
+   char buf[PATH_MAX];
+
+   win = elm_win_util_standard_add("hover3", "Hover 3");
+   elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
+   elm_win_autodel_set(win, EINA_TRUE);
+   evas_object_resize(win, 440, 440);
+   evas_object_show(win);
+
+   rect = evas_object_rectangle_add(evas_object_evas_get(win));
+   evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   elm_win_resize_object_add(win, rect);
+   evas_object_color_set(rect, 0, 0, 0, 0);
+   evas_object_show(rect);
+
+   // fake object to move hover object as we wish
+   fake_obj = elm_box_add(win);
+   evas_object_data_set(rect, "fake_obj", fake_obj);
+
+   hv = elm_hover_add(win);
+   elm_hover_parent_set(hv, win);
+   elm_hover_target_set(hv, fake_obj);
+   elm_object_style_set(hv, "transparent");
+
+   evas_object_event_callback_add(rect, EVAS_CALLBACK_MOUSE_DOWN,
+  _hover_show_cb, hv);
+
+   bx = elm_box_add(win);
+   elm_object_part_content_set(hv, "bottom-right", bx);
+   evas_object_show(bx);
+
+   bt = elm_button_add(win);
+   elm_obj

[E-devel] Weekly news from the automated build and QA front

2013-09-23 Thread Stefan Schmidt
Hello.

This should give everyone an overview over what has happened in the last
week regarding our continuous integration builds, unit tests and
coverage as well as all static analyser runs and things like
address-sanitizer.

The numbers in parentheses reflect the values from last week to give you
a trend.

CI:
o Overall build statistic: 4.44% (4.44%) failed and 95.56% (95.56%)
succeeded.
https://build.enlightenment.org/

clang scan-build:
o EFL scan-build reports 517 (517) issues.
https://build.enlightenment.org/job/nightly_efl_clang_x86_64/lastSuccessfu
lBuild/artifact/scan-build/build/

Exactness:
o The edje exactness builds are working now. Elm exactness still failing.
o Problems with icons and paths (file selector widget)
o Still waiting for the first successful run on jenkins

Unit tests:
o 271 (271) unit tests for efl and none failing

Coverage:
o EFL total coverage is at 25.7% (25.7%) lines and 28.5% (28.5%) functions
https://build.enlightenment.org/view/Test%20Coverage/

Coverity:
o EFL: Outstanding defects 449 (449) with a density of 0.85 (0.85). 0
defects fixed since last build and 0 added.
o Elm: Outstanding defects 21 (20) with a density of 0.09 (0.10). 2
defects fixed since last build and 1 added.
o E: Outstanding defects 198 (198) with a density of 0.71 (0.71). 0
defects fixed since last build and 0 added.

If anybody wants to see something added here let me know and be my guest.

regards
Stefan Schmidt

--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: eo: fix EO_DEBUG compilation

2013-09-23 Thread Jérémy Zurcher
jeyzu pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2041e995fc75a8943f4592afb6076a56710861ed

commit 2041e995fc75a8943f4592afb6076a56710861ed
Author: Jérémy Zurcher 
Date:   Mon Sep 23 11:07:07 2013 +0200

eo: fix EO_DEBUG compilation
---
 src/lib/eo/eo.c | 12 ++--
 src/lib/eo/eo_private.h |  8 
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 44895b6..67ab2d5 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -1251,14 +1251,6 @@ fail:
return NULL;
 }
 
-typedef struct
-{
-   EINA_INLIST;
-   const Eo *ref_obj;
-   const char *file;
-   int line;
-} Eo_Xref_Node;
-
 EAPI Eo *
 eo_xref_internal(const char *file, int line, Eo *obj_id, const Eo *ref_obj_id)
 {
@@ -1430,8 +1422,8 @@ _eo_data_xunref_internal(_Eo *obj, void *data, const _Eo 
*ref_obj)
 {
 #ifdef EO_DEBUG
const _Eo_Class *klass = obj->klass;
-   Eina_Bool in_range = (((char *)data >= (((char *) obj) + _eo_sz) &&
-  ((char *)data < (((char *) obj) + klass->obj_size)))
+   Eina_Bool in_range = (((char *)data >= (((char *) obj) + _eo_sz)) &&
+ ((char *)data < (((char *) obj) + klass->obj_size)));
if (!in_range)
  {
 ERR("Data %p is not in the data range of the object %p (%s).", data, 
(Eo *)obj->obj_id, obj->klass->desc->name);
diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h
index 0553c7b..da067d9 100644
--- a/src/lib/eo/eo_private.h
+++ b/src/lib/eo/eo_private.h
@@ -164,6 +164,14 @@ struct _Eo_Class
/* [extensions data offset] + NULL */
 };
 
+typedef struct
+{
+   EINA_INLIST;
+   const Eo *ref_obj;
+   const char *file;
+   int line;
+} Eo_Xref_Node;
+
 static inline void
 _eo_condtor_reset(_Eo *obj)
 {

-- 




Re: [E-devel] crashdump 0.17.99.17108

2013-09-23 Thread rob
On 23/09/13 03:29, Cedric BAIL wrote:
> Hello,
>
> This backtrace is not really useful at all. It doesn't have enough
> information (all the things that may be usefull are ).
> Either that or start Enlightenment with -valgrind to get more useful
> information.
>
> Thanks for your help,
>Cedric
>

I use  ./autogen.sh, make, make install to build E after git pull 
--rebase, i.e. I haven't modified any files to optimise the build.

Debian version gcc-4.8

This crash happened while the PC was idle. All the cats were in the 
garden at the time so it's not a case of feline tampering:) I'll run 
valgrind.

rob

> On Sat, Sep 21, 2013 at 5:42 PM, rob  wrote:
>> Thread 1 (Thread 0x7f1153626880 (LWP 4433)):
>> #0  0x7f1151d80b8d in pause () at ../sysdeps/unix/syscall-template.S:81
>> No locals.
>> #1  
>> No locals.
>> #2  eina_list_data_get (list=) at
>> /usr/local/include/eina-1/eina/eina_inline_list.x:47
>> No locals.
>> #3  _e_exe_instance_watchers_call (inst=0x260a3f0,
>> type=E_EXEC_WATCH_STOPPED) at e_exec.c:321
>>   iw = 
>>   l = 
>> #4  0x00499809 in _e_exec_cb_exit (event=,
>> type=, data=) at e_exec.c:773
>>   inst = 0x260a3f0
>> #5  0x0049a0e8 in _e_exec_cb_exit (data=,
>> type=, event=0x22aa490) at e_exec.c:703
>>   ev = 0x22aa490
>>   inst = 0x21
>> #6  0x7f11515ac630 in _ecore_call_handler_cb (event=,
>> type=, data=, func=) at
>> lib/ecore/ecore_private.h:357
>>   r = 
>> #7  _ecore_event_call () at lib/ecore/ecore_events.c:562
>>   ret = 33 '!'
>>   e = 0x2849610
>>   handle_count = 4
>>   l = 
>>   eh = 0xb14c90
>> #8  0x7f11515b25b5 in _ecore_main_loop_iterate_internal
>> (once_only=0) at lib/ecore/ecore_main.c:2013
>>   next_time = 
>> #9  0x7f11515b27b7 in ecore_main_loop_begin () at
>> lib/ecore/ecore_main.c:1035
>> No locals.
>> #10 0x00439821 in main (argc=, argv=> out>) at e_main.c:1076
>>   safe_mode = 0 '\000'
>>   after_restart = 0 '\000'
>>   waslocked = 
>>   t = 1379751149.3183601
>>   tstart = 1379751149.3183601
>>   s = 
>>   buff = "1379751149.3", '\000' ,
>> "\357\003C\000\000\000\000"
>>   action = {__sigaction_handler = {sa_handler = 0x502a30
>> , sa_sigaction = 0x502a30 }, sa_mask =
>> {__val = {0 }}, sa_flags = -1073741820, sa_restorer =
>> 0x7f114f17c120}
>>   __FUNCTION__ = "main"
>> Detaching from program: /usr/local/bin/enlightenment, process 4433
>>
>>
>> --
>> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
>> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
>> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack 
>> includes
>> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13.
>> http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
>> ___
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>
>
>



--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] crashdump 0.17.99.17108

2013-09-23 Thread Cedric BAIL
On Mon, Sep 23, 2013 at 7:21 PM, rob  wrote:
> On 23/09/13 03:29, Cedric BAIL wrote:
>> Hello,
>>
>> This backtrace is not really useful at all. It doesn't have enough
>> information (all the things that may be usefull are ).
>> Either that or start Enlightenment with -valgrind to get more useful
>> information.
>>
>> Thanks for your help,
>>Cedric
>>
>
> I use  ./autogen.sh, make, make install to build E after git pull
> --rebase, i.e. I haven't modified any files to optimise the build.

You need to specially turn on debug symbol to get them. For that you
need to set the environment variable CFLAGS to something that at least
include : "-g -ggdb3".

> Debian version gcc-4.8
>
> This crash happened while the PC was idle. All the cats were in the
> garden at the time so it's not a case of feline tampering:) I'll run
> valgrind.

Thanks,
-- 
Cedric BAIL

--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/01: Evas textblock: Use max ascent/descent at the edges of the textblock.

2013-09-23 Thread Tom Hacohen
On 23/09/13 07:09, ChunEon Park wrote:
> Thanks. i've expected the day you fix this.
>
> in the end!
>
> Nice! :)

Blame everyone who has distracted me. :)

--
Tom.


--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] git enlightenment error

2013-09-23 Thread rob
Just tried git pull --rebase for enlightenment and got 

fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not
set).

rob


--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] git enlightenment error

2013-09-23 Thread Stefan Schmidt
Hello.

On 09/23/2013 01:22 PM, rob wrote:
> Just tried git pull --rebase for enlightenment and got 
> 
> fatal: Not a git repository (or any parent up to mount point /home)
> Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not
> set).

Did you actually read the error message before posting it here?

It clearly states that it is not a git repository you are in. It even
tried to go up some parents to look at them.

Solution would be to go into the actual enlightenment repo path before
executing the command. :)

regards
Stefan Schmidt


--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] git enlightenment error

2013-09-23 Thread rob
On Mon, 23 Sep 2013 13:28:32 +0100
Stefan Schmidt  wrote:

> Hello.
> 
> On 09/23/2013 01:22 PM, rob wrote:
> > Just tried git pull --rebase for enlightenment and got 
> > 
> > fatal: Not a git repository (or any parent up to mount point /home)
> > Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not
> > set).
> 
> Did you actually read the error message before posting it here?
> 
> It clearly states that it is not a git repository you are in. It even
> tried to go up some parents to look at them.
> 
> Solution would be to go into the actual enlightenment repo path before
> executing the command. :)
> 
> regards
> Stefan Schmidt
> 

Hi

I am in the path.
cd ~/E-git/

ls  :  elementary  enlightenment efl emotion_generic_players

git pull works in efl, elementary, emotion_generic_players but not in
enlightenment 

rob





--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] git enlightenment error

2013-09-23 Thread Stefan Schmidt
Hello.

On 09/23/2013 01:42 PM, rob wrote:
> On Mon, 23 Sep 2013 13:28:32 +0100
> Stefan Schmidt  wrote:
> 
>> Hello.
>>
>> On 09/23/2013 01:22 PM, rob wrote:
>>> Just tried git pull --rebase for enlightenment and got 
>>>
>>> fatal: Not a git repository (or any parent up to mount point /home)
>>> Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not
>>> set).
>>
>> Did you actually read the error message before posting it here?
>>
>> It clearly states that it is not a git repository you are in. It even
>> tried to go up some parents to look at them.
>>
>> Solution would be to go into the actual enlightenment repo path before
>> executing the command. :)
>>
>> regards
>> Stefan Schmidt
>>
> 
> Hi
> 
> I am in the path.
> cd ~/E-git/
> 
> ls  :  elementary  enlightenment efl emotion_generic_players
> 
> git pull works in efl, elementary, emotion_generic_players but not in
> enlightenment 

Seems you ruined your enlightenment checkout. I bet there is no .git
folder in it while you will find it in the other checkouts.

I have no idea about your local setup or what you did to it. Most likely
you have to clone the enlightenment repo again if you removed the .git
folder.

regards
Stefan Schmidt

--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] git enlightenment error

2013-09-23 Thread rob
Re-cloned

thanks

rob


--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Migration of Enlightenment GIT Commits Mailing List

2013-09-23 Thread Tom Hacohen
On 21/09/13 10:13, Daniel Juyung Seo wrote:
> On Wed, Sep 18, 2013 at 6:03 PM, Tom Hacohen wrote:
>
>> On 13/09/13 01:20, Bertrand Jacquin wrote:
>>> Hi,
>>>
>>> Tommorrow at 13:00 UTC, the Enlightenment GIT Commits Mailing List will
>>> be moved from Sourceforge to own servers. This to avoid the moderation
>>> madness.
>>>
>>> All subscribed people will be moved to the new list and unsubscribed from
>>> the old one. This means no user action will be required.
>>>
>>> Then, you will be notified about your subscription and get info on
>>> how to use it.
>>>
>>> This only concern the list enlightenment-...@lists.sourceforge.net.
>>> Other lists will stay on SF for the moment.
>>>
>>> The new list will be g...@lists.enlightenment.org, and List-Id
>>> git.lists.enlightenment.org.
>>>
>>
>> FYI:
>> We changed the ML (now that we have more control over it) to spoof the
>> "From" field to be as if the mail was sent from the git committer email.
>> This means, that now if you reply to all, you also reply to the
>> committer, not just the ML, among other advantages.
>>
>>
> This is awesome!
> Btw is it working well? I just tested with
> http://git.enlightenment.org/admin/devs.git/commit/?id=5a0a1aaa2dccc91baad8c940bcab97fc63ec7745
> but I have only two mailing list recipients not the committer.
>
> 1. Enlightenment developer list 
> 2. g...@lists.enlightenment.org
>

Yeah, I guess the reply-to completely overrides the from, so it doesn't 
even show. Well, whatever, even without this advantage it's better.

--
Tom.


--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] eo Eo_Class RIP

2013-09-23 Thread Tom Hacohen
On 21/09/13 00:41, Jérémy Zurcher wrote:
> Hi,
>
> I've just finished the removal of Eo_Class
> and the related eo_class_do(), eo_class_super_do() and …internal…()
>
> you'll find the stuff in efl and elementary branches devs/jeyzu/eo--Eo_Class
>
> Eo * holds objects or classes references silently
>
> eo_do(), eo_super_do() take care of the internal routing for you
>
> obviously make check works with or without HAVE_EO_ID defined
>
> might be some room for improvement, benchmarks (~64bits arch) are here:
>
> http://asynk.ch/efl/eo_do-master.png
> http://asynk.ch/efl/eo_add-master.png
> http://asynk.ch/efl/eo_do-master-HAVE_EO_ID.png
> http://asynk.ch/efl/eo_add-master-HAVE_EO_ID.png
> http://asynk.ch/efl/eo_do-jeyzu.png
> http://asynk.ch/efl/eo_add-jeyzu.png
> http://asynk.ch/efl/eo_do-jeyzu-HAVE_EO_ID.png
> http://asynk.ch/efl/eo_add-jeyzu-HAVE_EO_ID.png
> http://asynk.ch/photos/sidecar/wheels_fest_2013/WheelsFest2013_005.jpg (easy 
> landing dad, that's not a jet fighter !!)
>
> having to periodically type reset to see my cursor again is …
> but many thanks terminology (more precisely the guys behind it) for the 
> previews
>
> I still don't understand http://asynk.ch/efl/eo_do-jeyzu.png ??? (what the 
> fuck may I say)
> did a few runs, all the same, it's very late though, who is tired me or the 
> machine ?
>
> awaiting thoughts

Hard to compare without having the data on the same graphs. :) Could you 
also share the raw data so we'd be able to plot our own? What are the 
conclusions? Is it faster? The same?

As already talked in private: great job doing it, it's something that 
was needed for a while.

--
Tom.



--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 02/06: Evas textblock: Fixed ascent/descent calculation a bit more.

2013-09-23 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=72167b9cc3db0a28a6be53de676662d93cd820b5

commit 72167b9cc3db0a28a6be53de676662d93cd820b5
Author: Tom Hacohen 
Date:   Fri Sep 20 15:53:08 2013 +0100

Evas textblock: Fixed ascent/descent calculation a bit more.

Separated maxascent/descent from ascent/descent even further.
Fix calculation to be based on font instance and not the font group.
---
 src/lib/evas/canvas/evas_object_textblock.c | 146 +---
 1 file changed, 110 insertions(+), 36 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 924ef75..086cc15 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -2558,18 +2558,75 @@ _layout_format_ascent_descent_adjust(const Evas_Object 
*eo_obj,
  }
 }
 
+static void
+_layout_item_max_ascent_descent_calc(const Evas_Object *eo_obj,
+  Evas_Coord *maxascent, Evas_Coord *maxdescent,
+  Evas_Object_Textblock_Item *it, Textblock_Position position)
+{
+   void *fi = NULL;
+   *maxascent = *maxdescent = 0;
+
+   if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
+ {
+fi = _ITEM_TEXT(it)->text_props.font_instance;
+ }
+
+   if ((position == TEXTBLOCK_POSITION_START) ||
+ (position == TEXTBLOCK_POSITION_SINGLE))
+ {
+Evas_Coord asc = 0;
+
+if (fi)
+  {
+ asc = evas_common_font_instance_max_ascent_get(fi);
+  }
+else
+  {
+ Evas_Object_Protected_Data *obj =
+eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS);
+ asc = ENFN->font_max_ascent_get(ENDT,
+   it->format->font.font);
+  }
+
+if (asc > *maxascent)
+   *maxascent = asc;
+ }
+
+   if ((position == TEXTBLOCK_POSITION_END) ||
+ (position == TEXTBLOCK_POSITION_SINGLE))
+ {
+/* Calculate max descent. */
+Evas_Coord desc = 0;
+
+if (fi)
+  {
+ desc = evas_common_font_instance_max_descent_get(fi);
+  }
+else
+  {
+ Evas_Object_Protected_Data *obj =
+eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS);
+ desc = ENFN->font_max_descent_get(ENDT,
+   it->format->font.font);
+  }
+
+if (desc > *maxdescent)
+   *maxdescent = desc;
+ }
+}
+
 /**
  * @internal
  * Adjust the ascent/descent of the item and context.
  *
- * @param maxascent The ascent to update - Not NUL.
- * @param maxdescent The descent to update - Not NUL.
+ * @param ascent The ascent to update - Not NUL.
+ * @param descent The descent to update - Not NUL.
  * @param it The format to adjust - NOT NULL.
  * @param position The position inside the textblock
  */
 static void
 _layout_item_ascent_descent_adjust(const Evas_Object *eo_obj,
-  Evas_Coord *maxascent, Evas_Coord *maxdescent,
+  Evas_Coord *ascent, Evas_Coord *descent,
   Evas_Object_Textblock_Item *it, Textblock_Position position)
 {
if (!it->format || !it->format->font.font)
@@ -2577,51 +2634,33 @@ _layout_item_ascent_descent_adjust(const Evas_Object 
*eo_obj,
 return;
  }
 
-   _layout_format_ascent_descent_adjust(eo_obj, maxascent, maxdescent, 
it->format);
+   _layout_format_ascent_descent_adjust(eo_obj, ascent, descent, it->format);
 
if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
  {
-void *fi = _ITEM_TEXT(it)->text_props.font_instance;
-
-if ((position == TEXTBLOCK_POSITION_START) ||
-  (position == TEXTBLOCK_POSITION_SINGLE))
-  {
- int asc = 0;
-
- if (fi)
-   {
-  asc = evas_common_font_instance_max_ascent_get(fi);
-   }
- else
-   {
-  Evas_Object_Protected_Data *obj =
- eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS);
-  asc = ENFN->font_max_ascent_get(ENDT, it->format->font.font);
-   }
-
- if (maxascent && (asc > *maxascent))
-*maxascent = asc;
-  }
-
-if ((position == TEXTBLOCK_POSITION_END) ||
-  (position == TEXTBLOCK_POSITION_SINGLE))
   {
- int desc = 0;
+ void *fi = _ITEM_TEXT(it)->text_props.font_instance;
+ int asc = 0, desc = 0;
 
  if (fi)
{
-  desc = evas_common_font_instance_max_descent_get(fi);
+  asc = evas_common_font_instance_ascent_get(fi);
+  desc = evas_common_font_instance_descent_get(fi);
}
  else
{
   Evas_Object_Protected_Data *obj =
  eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS);
+  asc =
+ ENFN->font_ascent_get(ENDT, it->format->font.font);

[EGIT] [core/efl] master 01/06: Evas textblock: rename maxascent/descent->ascent/descent.

2013-09-23 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5adffd54e5f2e6490ef5c4aff4c932f625a83f68

commit 5adffd54e5f2e6490ef5c4aff4c932f625a83f68
Author: Tom Hacohen 
Date:   Fri Sep 20 14:47:32 2013 +0100

Evas textblock: rename maxascent/descent->ascent/descent.

Although we kinda use them as max in some situations, they are actually
just the regular ascent and descent. Following commits will make this
separation even stronger.
---
 src/lib/evas/canvas/evas_object_textblock.c | 53 +++--
 1 file changed, 28 insertions(+), 25 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 533deaa..924ef75 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -2489,6 +2489,7 @@ struct _Ctxt
int x, y;
int w, h;
int wmax, hmax;
+   int ascent, descent;
int maxascent, maxdescent;
int marginl, marginr;
int line_no;
@@ -2643,6 +2644,7 @@ _layout_line_new(Ctxt *c, Evas_Object_Textblock_Format 
*fmt)
c->marginr = fmt->margin.r;
c->par->lines = (Evas_Object_Textblock_Line 
*)eina_inlist_append(EINA_INLIST_GET(c->par->lines), EINA_INLIST_GET(c->ln));
c->x = 0;
+   c->ascent = c->descent = 0;
c->maxascent = c->maxdescent = 0;
c->ln->line_no = -1;
c->ln->par = c->par;
@@ -3268,9 +3270,9 @@ _layout_line_finalize(Ctxt *c, 
Evas_Object_Textblock_Format *fmt)
 
/* If there are no text items yet, calc ascent/descent
 * according to the current format. */
-   if (c->maxascent + c->maxdescent == 0)
-  _layout_format_ascent_descent_adjust(c->obj, &c->maxascent,
-&c->maxdescent, fmt);
+   if (c->ascent + c->descent == 0)
+  _layout_format_ascent_descent_adjust(c->obj, &c->ascent,
+&c->descent, fmt);
 
/* Adjust all the item sizes according to the final line size,
 * and update the x positions of all the items of the line. */
@@ -3280,8 +3282,8 @@ _layout_line_finalize(Ctxt *c, 
Evas_Object_Textblock_Format *fmt)
   {
  Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it);
  if (!fi->formatme) goto loop_advance;
- _layout_calculate_format_item_size(c->obj, fi, &c->maxascent,
-   &c->maxdescent, &fi->y, &fi->parent.w, &fi->parent.h);
+ _layout_calculate_format_item_size(c->obj, fi, &c->ascent,
+   &c->descent, &fi->y, &fi->parent.w, &fi->parent.h);
  fi->parent.adv = fi->parent.w;
   }
 else
@@ -3290,10 +3292,10 @@ _layout_line_finalize(Ctxt *c, 
Evas_Object_Textblock_Format *fmt)
  _layout_item_ascent_descent_adjust(c->obj, &asc, &desc,
it, c->position);
 
- if (asc > c->maxascent)
-c->maxascent = asc;
- if (desc > c->maxdescent)
-c->maxdescent = desc;
+ if (asc > c->ascent)
+c->ascent = asc;
+ if (desc > c->descent)
+c->descent = desc;
   }
 
 loop_advance:
@@ -3304,19 +3306,19 @@ loop_advance:
  }
 
c->ln->y = (c->y - c->par->y) + c->o->style_pad.t;
-   c->ln->h = c->maxascent + c->maxdescent;
-   c->ln->baseline = c->maxascent;
+   c->ln->h = c->ascent + c->descent;
+   c->ln->baseline = c->ascent;
if (c->have_underline2)
  {
-if (c->maxdescent < 4) c->underline_extend = 4 - c->maxdescent;
+if (c->descent < 4) c->underline_extend = 4 - c->descent;
  }
else if (c->have_underline)
  {
-if (c->maxdescent < 2) c->underline_extend = 2 - c->maxdescent;
+if (c->descent < 2) c->underline_extend = 2 - c->descent;
  }
c->ln->line_no = c->line_no - c->ln->par->line_no;
c->line_no++;
-   c->y += c->maxascent + c->maxdescent;
+   c->y += c->ascent + c->descent;
if (c->w >= 0)
  {
 c->ln->x = c->marginl + c->o->style_pad.l +
@@ -4441,24 +4443,24 @@ _layout_par(Ctxt *c)
 
 if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
   {
- _layout_item_ascent_descent_adjust(c->obj, &c->maxascent,
-   &c->maxdescent, it, c->position);
+ _layout_item_ascent_descent_adjust(c->obj, &c->ascent,
+   &c->descent, it, c->position);
   }
 else
   {
  Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it);
  if (fi->formatme)
{
-  prevdescent = c->maxdescent;
-  prevascent = c->maxascent;
+  prevdescent = c->descent;
+  prevascent = c->ascent;
   /* If there are no text items yet, calc ascent/descent
* according to the current format. */
-  if (c->maxascent + c->maxdescent == 0)
- _layout_item_ascent_descent_adjust(c->obj, &c->maxascent,
-

[EGIT] [core/efl] master 03/06: Evas textblock: Fixed max descent adjustment and a related bug.

2013-09-23 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cbde2bef69bebbdce496303365a8c5cd0fa49b79

commit cbde2bef69bebbdce496303365a8c5cd0fa49b79
Author: Tom Hacohen 
Date:   Fri Sep 20 16:09:21 2013 +0100

Evas textblock: Fixed max descent adjustment and a related bug.

The bug caused wrong line sizing in some situations (appending new
paragraphs to a textblock).
---
 src/lib/evas/canvas/evas_object_textblock.c | 56 ++---
 1 file changed, 43 insertions(+), 13 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 086cc15..99a1ad3 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -2566,6 +2566,9 @@ _layout_item_max_ascent_descent_calc(const Evas_Object 
*eo_obj,
void *fi = NULL;
*maxascent = *maxdescent = 0;
 
+   if (!it || !it->format || !it->format->font.font)
+  return;
+
if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
  {
 fi = _ITEM_TEXT(it)->text_props.font_instance;
@@ -3289,6 +3292,42 @@ _layout_calculate_format_item_size(const Evas_Object 
*eo_obj,
*_h = h;
 }
 
+static Evas_Coord
+_layout_last_line_max_descent_adjust_calc(Ctxt *c, const 
Evas_Object_Textblock_Paragraph *last_vis_par)
+{
+   if (last_vis_par->lines)
+ {
+Evas_Object_Textblock_Line *ln = (Evas_Object_Textblock_Line *)
+   EINA_INLIST_GET(last_vis_par->lines)->last;
+Evas_Object_Textblock_Item *it;
+
+EINA_INLIST_FOREACH(ln->items, it)
+  {
+ if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
+   {
+  Evas_Coord asc = 0, desc = 0;
+  Evas_Coord maxasc = 0, maxdesc = 0;
+  _layout_item_ascent_descent_adjust(c->obj, &asc, &desc,
+it, c->position);
+  _layout_item_max_ascent_descent_calc(c->obj, &maxasc, 
&maxdesc,
+it, c->position);
+
+  if (desc > c->descent)
+ c->descent = desc;
+  if (maxdesc > c->maxdescent)
+ c->maxdescent = maxdesc;
+   }
+  }
+
+if (c->maxdescent > c->descent)
+  {
+ return c->maxdescent - c->descent;
+  }
+ }
+
+   return 0;
+}
+
 /**
  * @internal
  * Order the items in the line, update it's properties and update it's
@@ -3364,18 +3403,6 @@ loop_advance:
  c->ln->y += ascdiff;
  c->y += ascdiff;
   }
-
-/* If it's the end, add the adjustment to the line height. */
-if (((c->position == TEXTBLOCK_POSITION_END) ||
- (c->position == TEXTBLOCK_POSITION_SINGLE))
-  && (c->maxdescent > c->descent))
-  {
- Evas_Coord descdiff;
-
- descdiff = c->maxdescent - c->descent;
- c->ln->h += descdiff;
- c->y += descdiff;
-  }
  }
 
c->ln->baseline = c->ascent;
@@ -5153,7 +5180,10 @@ _layout(const Evas_Object *eo_obj, int w, int h, int 
*w_ret, int *h_ret)
 EINA_INLIST_GET(c->paragraphs)->last;
 
   if (last_vis_par)
- c->hmax = last_vis_par->y + last_vis_par->h;
+{
+   c->hmax = last_vis_par->y + last_vis_par->h +
+  _layout_last_line_max_descent_adjust_calc(c, last_vis_par);
+}
}
 
/* Clean the rest of the format stack */

-- 




[EGIT] [core/efl] master 05/06: Evas textblock: Fixed native size calculation.

2013-09-23 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2ab088aeea4a306899f442a2aba8fcea63c951dc

commit 2ab088aeea4a306899f442a2aba8fcea63c951dc
Author: Tom Hacohen 
Date:   Fri Sep 20 17:59:44 2013 +0100

Evas textblock: Fixed native size calculation.
---
 src/lib/evas/canvas/evas_object_textblock.c | 18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 376647a..13944fa 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -10355,8 +10355,16 @@ _size_native_calc_line_finalize(const Evas_Object 
*eo_obj, Eina_List *items,
   }
 else
   {
+ Evas_Coord maxasc = 0, maxdesc = 0;
  _layout_item_ascent_descent_adjust(eo_obj, ascent, descent,
it, it->format);
+ _layout_item_max_ascent_descent_calc(eo_obj, &maxasc, &maxdesc,
+   it, position);
+
+ if (maxasc > *ascent)
+*ascent = maxasc;
+ if (maxdesc > *descent)
+*descent = maxdesc;
   }
 
 loop_advance:
@@ -10420,10 +10428,16 @@ _size_native_calc_paragraph_size(const Evas_Object 
*eo_obj,
   }
  }
 
-   *position = (*position == TEXTBLOCK_POSITION_START) ?
-  TEXTBLOCK_POSITION_SINGLE : TEXTBLOCK_POSITION_END;
+   if (!EINA_INLIST_GET(par)->next)
+ {
+*position = (*position == TEXTBLOCK_POSITION_START) ?
+   TEXTBLOCK_POSITION_SINGLE : TEXTBLOCK_POSITION_END;
+ }
_size_native_calc_line_finalize(eo_obj, line_items, &ascent, &descent, &w, 
*position);
 
+   if (*position == TEXTBLOCK_POSITION_START)
+  *position = TEXTBLOCK_POSITION_ELSE;
+
line_items = eina_list_free(line_items);
 
/* Do the last addition */

-- 




[EGIT] [core/efl] master 06/06: Evas textblock: Fixed broken test.

2013-09-23 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4850c4660f226f1d58f3e877d0b8ddbd6a6c77d4

commit 4850c4660f226f1d58f3e877d0b8ddbd6a6c77d4
Author: Tom Hacohen 
Date:   Fri Sep 20 17:59:12 2013 +0100

Evas textblock: Fixed broken test.

Item is not meant to take the size of the max ascent, just the ascent.
---
 src/tests/evas/evas_test_textblock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index 54865bb..fa08800 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -1451,7 +1451,7 @@ START_TEST(evas_textblock_items)
fail_if((w >= 93) || (h >= 153));
evas_textblock_cursor_pos_set(cur, 11);
evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &ih);
-   fail_if((w > 108) || (h != ih));
+   fail_if((w > 108) || (h <= ih));
 
buf = "This is an .";
evas_object_textblock_text_markup_set(tb, buf);

-- 




[EGIT] [core/efl] master 04/06: Evas textblock: Fix format based line size calculation.

2013-09-23 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2173652b4d0144b6172b74537ad3ad799a1d5468

commit 2173652b4d0144b6172b74537ad3ad799a1d5468
Author: Tom Hacohen 
Date:   Fri Sep 20 16:55:22 2013 +0100

Evas textblock: Fix format based line size calculation.

Format based line size modifiers were not applied.
---
 src/lib/evas/canvas/evas_object_textblock.c | 86 +++--
 1 file changed, 45 insertions(+), 41 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 99a1ad3..376647a 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -2523,10 +2523,8 @@ _layout_format_ascent_descent_adjust(const Evas_Object 
*eo_obj,
 
if (fmt->font.font)
  {
-// ascent = c->ENFN->font_max_ascent_get(c->ENDT, fmt->font.font);
-// descent = c->ENFN->font_max_descent_get(c->ENDT, 
fmt->font.font);
-ascent = ENFN->font_ascent_get(ENDT, fmt->font.font);
-descent = ENFN->font_descent_get(ENDT, fmt->font.font);
+ascent = *maxascent;
+descent = *maxdescent;
 if (fmt->linesize > 0)
   {
  if ((ascent + descent) < fmt->linesize)
@@ -2630,42 +2628,48 @@ _layout_item_max_ascent_descent_calc(const Evas_Object 
*eo_obj,
 static void
 _layout_item_ascent_descent_adjust(const Evas_Object *eo_obj,
   Evas_Coord *ascent, Evas_Coord *descent,
-  Evas_Object_Textblock_Item *it, Textblock_Position position)
+  Evas_Object_Textblock_Item *it, Evas_Object_Textblock_Format *fmt)
 {
-   if (!it->format || !it->format->font.font)
+   void *fi = NULL;
+   int asc = 0, desc = 0;
+
+   if ((!it || !it->format || !it->format->font.font) &&
+ (!fmt || !fmt->font.font))
  {
 return;
  }
 
-   _layout_format_ascent_descent_adjust(eo_obj, ascent, descent, it->format);
-
-   if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
+   if (it)
  {
-  {
- void *fi = _ITEM_TEXT(it)->text_props.font_instance;
- int asc = 0, desc = 0;
-
- if (fi)
-   {
-  asc = evas_common_font_instance_ascent_get(fi);
-  desc = evas_common_font_instance_descent_get(fi);
-   }
- else
-   {
-  Evas_Object_Protected_Data *obj =
- eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS);
-  asc =
- ENFN->font_ascent_get(ENDT, it->format->font.font);
-  desc =
- ENFN->font_descent_get(ENDT, it->format->font.font);
-   }
+fmt = it->format;
 
- if (ascent && (asc > *ascent))
-*ascent = asc;
- if (descent && (desc > *descent))
-*descent = desc;
+if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
+  {
+ fi = _ITEM_TEXT(it)->text_props.font_instance;
   }
  }
+
+   if (fi)
+ {
+asc = evas_common_font_instance_ascent_get(fi);
+desc = evas_common_font_instance_descent_get(fi);
+ }
+   else
+ {
+Evas_Object_Protected_Data *obj =
+   eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS);
+asc =
+   ENFN->font_ascent_get(ENDT, fmt->font.font);
+desc =
+   ENFN->font_descent_get(ENDT, fmt->font.font);
+ }
+
+   if (ascent && (asc > *ascent))
+  *ascent = asc;
+   if (descent && (desc > *descent))
+  *descent = desc;
+
+   _layout_format_ascent_descent_adjust(eo_obj, ascent, descent, fmt);
 }
 
 /**
@@ -3308,7 +3312,7 @@ _layout_last_line_max_descent_adjust_calc(Ctxt *c, const 
Evas_Object_Textblock_P
   Evas_Coord asc = 0, desc = 0;
   Evas_Coord maxasc = 0, maxdesc = 0;
   _layout_item_ascent_descent_adjust(c->obj, &asc, &desc,
-it, c->position);
+it, it->format);
   _layout_item_max_ascent_descent_calc(c->obj, &maxasc, 
&maxdesc,
 it, c->position);
 
@@ -3346,8 +3350,8 @@ _layout_line_finalize(Ctxt *c, 
Evas_Object_Textblock_Format *fmt)
/* If there are no text items yet, calc ascent/descent
 * according to the current format. */
if (c->ascent + c->descent == 0)
-  _layout_format_ascent_descent_adjust(c->obj, &c->ascent,
-&c->descent, fmt);
+  _layout_item_ascent_descent_adjust(c->obj, &c->ascent, &c->descent,
+NULL, fmt);
 
/* Adjust all the item sizes according to the final line size,
 * and update the x positions of all the items of the line. */
@@ -3366,7 +3370,7 @@ _layout_line_finalize(Ctxt *c, 
Evas_Object_Textblock_Format *fmt)
  Evas_Coord asc = 0, desc = 0;
  Evas_Coord maxasc = 0, maxdesc = 0;
  _layout_item_ascent_descent_adjust(c->obj, &asc, &desc,
-

[EGIT] [legacy/evas] evas-1.7 01/02: Evas textblock: Fix wrong line spacing when appending lines.

2013-09-23 Thread Tom Hacohen
tasn pushed a commit to branch evas-1.7.

http://git.enlightenment.org/legacy/evas.git/commit/?id=4f995ed37ca59f083d10bb4cd4bd5e283e825e51

commit 4f995ed37ca59f083d10bb4cd4bd5e283e825e51
Author: Tom Hacohen 
Date:   Fri Sep 20 13:52:40 2013 +0100

Evas textblock: Fix wrong line spacing when appending lines.

This fixes T397 which was introduced by commit: 731929b0ad2ce86694ca.
This also fixes the issues with enventor.
---
 src/lib/canvas/evas_object_textblock.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/canvas/evas_object_textblock.c 
b/src/lib/canvas/evas_object_textblock.c
index 2971ed1..2ecbf5c 100644
--- a/src/lib/canvas/evas_object_textblock.c
+++ b/src/lib/canvas/evas_object_textblock.c
@@ -4370,6 +4370,12 @@ _layout_par(Ctxt *c)
 EINA_INLIST_GET(c->par->lines)->last;
  if (ln)
 c->line_no = c->par->line_no + ln->line_no + 1;
+
+ /* After this par we are no longer at the beginning, as there
+  * must be some text in the par. */
+ if (c->position == TEXTBLOCK_POSITION_START)
+c->position = TEXTBLOCK_POSITION_ELSE;
+
  return 0;
   }
 c->par->text_node->dirty = EINA_FALSE;

-- 




[EGIT] [legacy/evas] evas-1.7 02/02: Evas textblock: Fixed max descent calculation.

2013-09-23 Thread Tom Hacohen
tasn pushed a commit to branch evas-1.7.

http://git.enlightenment.org/legacy/evas.git/commit/?id=50b1a88f857c8c038c43a1d7d6eb4fbf69121333

commit 50b1a88f857c8c038c43a1d7d6eb4fbf69121333
Author: Tom Hacohen 
Date:   Mon Sep 23 15:03:45 2013 +0100

Evas textblock: Fixed max descent calculation.

This is not a direct backport, but an alternative fix to the same thing
that was fixed in 1.8.

This is kind of in continutation of: 
4f995ed37ca59f083d10bb4cd4bd5e283e825e51
---
 src/lib/canvas/evas_object_textblock.c | 78 +-
 1 file changed, 58 insertions(+), 20 deletions(-)

diff --git a/src/lib/canvas/evas_object_textblock.c 
b/src/lib/canvas/evas_object_textblock.c
index 2ecbf5c..52adaf7 100644
--- a/src/lib/canvas/evas_object_textblock.c
+++ b/src/lib/canvas/evas_object_textblock.c
@@ -2585,25 +2585,6 @@ _layout_item_ascent_descent_adjust(const Evas_Object 
*obj,
  if (maxascent && (asc > *maxascent))
 *maxascent = asc;
   }
-
-if ((position == TEXTBLOCK_POSITION_END) ||
-  (position == TEXTBLOCK_POSITION_SINGLE))
-  {
- int desc = 0;
-
- if (fi)
-   {
-  desc = evas_common_font_instance_max_descent_get(fi);
-   }
- else
-   {
-  desc =
- ENFN->font_max_descent_get(ENDT, it->format->font.font);
-   }
-
- if (maxdescent && (desc > *maxdescent))
-*maxdescent = desc;
-  }
  }
 }
 
@@ -3225,6 +3206,59 @@ _layout_calculate_format_item_size(const Evas_Object 
*obj,
*_h = h;
 }
 
+static Evas_Coord
+_layout_last_line_max_descent_adjust_calc(Ctxt *c, const 
Evas_Object_Textblock_Paragraph *last_vis_par)
+{
+   if (last_vis_par->lines)
+ {
+Evas_Coord maxdescent = 0, descent = 0;
+Evas_Object_Textblock_Line *ln = (Evas_Object_Textblock_Line *)
+   EINA_INLIST_GET(last_vis_par->lines)->last;
+Evas_Object_Textblock_Item *it;
+
+EINA_INLIST_FOREACH(ln->items, it)
+  {
+ if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
+   {
+  Evas_Coord asc = 0, desc = 0;
+  _layout_item_ascent_descent_adjust(c->obj, &asc, &desc,
+it, c->position);
+
+  if ((c->position == TEXTBLOCK_POSITION_END) ||
+(c->position == TEXTBLOCK_POSITION_SINGLE))
+{
+   Evas_Coord mdesc = 0;
+   void *fi = _ITEM_TEXT(it)->text_props.font_instance;
+
+   if (fi)
+ {
+mdesc = 
evas_common_font_instance_max_descent_get(fi);
+ }
+   else
+ {
+Evas_Object *obj = c->obj;
+mdesc =
+   ENFN->font_max_descent_get(ENDT, 
it->format->font.font);
+ }
+
+   if (mdesc > maxdescent)
+  maxdescent = mdesc;
+}
+
+  if (desc > descent)
+ descent = desc;
+   }
+  }
+
+if (maxdescent > descent)
+  {
+ return maxdescent - descent;
+  }
+ }
+
+   return 0;
+}
+
 /**
  * @internal
  * Order the items in the line, update it's properties and update it's
@@ -5064,7 +5098,11 @@ _layout(const Evas_Object *obj, int w, int h, int 
*w_ret, int *h_ret)
 EINA_INLIST_GET(c->paragraphs)->last;
 
   if (last_vis_par)
- c->hmax = last_vis_par->y + last_vis_par->h;
+{
+   c->hmax = last_vis_par->y + last_vis_par->h +
+  _layout_last_line_max_descent_adjust_calc(c, last_vis_par);
+}
+
}
 
/* Clean the rest of the format stack */

-- 




[EGIT] [legacy/evas] evas-1.7 02/04: Evas textblock: Fix native size calculation.

2013-09-23 Thread Tom Hacohen
tasn pushed a commit to branch evas-1.7.

http://git.enlightenment.org/legacy/evas.git/commit/?id=3fb176a59bbfc33eab57ea8c2bba0038f55771c1

commit 3fb176a59bbfc33eab57ea8c2bba0038f55771c1
Author: Tom Hacohen 
Date:   Mon Sep 23 17:05:00 2013 +0100

Evas textblock: Fix native size calculation.
---
 src/lib/canvas/evas_object_textblock.c | 20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/lib/canvas/evas_object_textblock.c 
b/src/lib/canvas/evas_object_textblock.c
index 6d43d48..a3de8e5 100644
--- a/src/lib/canvas/evas_object_textblock.c
+++ b/src/lib/canvas/evas_object_textblock.c
@@ -9917,8 +9917,18 @@ _size_native_calc_line_finalize(const Evas_Object *obj, 
Eina_List *items,
   }
 else
   {
+ Evas_Coord maxasc = 0, maxdesc = 0;
+ /* We are passing else because we don't want anything to be
+  * done wrt position. */
  _layout_item_ascent_descent_adjust(obj, ascent, descent,
+   it, TEXTBLOCK_POSITION_ELSE);
+ _layout_item_max_ascent_descent_calc(obj, &maxasc, &maxdesc,
it, position);
+
+ if (maxasc > *ascent)
+*ascent = maxasc;
+ if (maxdesc > *descent)
+*descent = maxdesc;
   }
 
 loop_advance:
@@ -9982,10 +9992,16 @@ _size_native_calc_paragraph_size(const Evas_Object *obj,
   }
  }
 
-   *position = (*position == TEXTBLOCK_POSITION_START) ?
-  TEXTBLOCK_POSITION_SINGLE : TEXTBLOCK_POSITION_END;
+   if (!EINA_INLIST_GET(par)->next)
+ {
+*position = (*position == TEXTBLOCK_POSITION_START) ?
+   TEXTBLOCK_POSITION_SINGLE : TEXTBLOCK_POSITION_END;
+ }
_size_native_calc_line_finalize(obj, line_items, &ascent, &descent, &w, 
*position);
 
+   if (*position == TEXTBLOCK_POSITION_START)
+  *position = TEXTBLOCK_POSITION_ELSE;
+
line_items = eina_list_free(line_items);
 
/* Do the last addition */

-- 




[EGIT] [legacy/evas] evas-1.7 01/04: Evas textblock: Added _layout_item_max_ascent_descent_calc.

2013-09-23 Thread Tom Hacohen
tasn pushed a commit to branch evas-1.7.

http://git.enlightenment.org/legacy/evas.git/commit/?id=44253af2372ec05d1bbd2effdaead326172b8913

commit 44253af2372ec05d1bbd2effdaead326172b8913
Author: Tom Hacohen 
Date:   Mon Sep 23 17:04:43 2013 +0100

Evas textblock: Added _layout_item_max_ascent_descent_calc.

Cleaner way of fixing the issues fixed in the previous commit
(4f995ed37ca59f083d10b). This is just the first step.
---
 src/lib/canvas/evas_object_textblock.c | 56 ++
 1 file changed, 56 insertions(+)

diff --git a/src/lib/canvas/evas_object_textblock.c 
b/src/lib/canvas/evas_object_textblock.c
index 52adaf7..6d43d48 100644
--- a/src/lib/canvas/evas_object_textblock.c
+++ b/src/lib/canvas/evas_object_textblock.c
@@ -2549,6 +2549,62 @@ _layout_format_ascent_descent_adjust(const Evas_Object 
*obj,
  }
 }
 
+static void
+_layout_item_max_ascent_descent_calc(const Evas_Object *obj,
+  Evas_Coord *maxascent, Evas_Coord *maxdescent,
+  Evas_Object_Textblock_Item *it, Textblock_Position position)
+{
+   void *fi = NULL;
+   *maxascent = *maxdescent = 0;
+
+   if (!it || !it->format || !it->format->font.font)
+  return;
+
+   if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
+ {
+fi = _ITEM_TEXT(it)->text_props.font_instance;
+ }
+
+   if ((position == TEXTBLOCK_POSITION_START) ||
+ (position == TEXTBLOCK_POSITION_SINGLE))
+ {
+Evas_Coord asc = 0;
+
+if (fi)
+  {
+ asc = evas_common_font_instance_max_ascent_get(fi);
+  }
+else
+  {
+ asc = ENFN->font_max_ascent_get(ENDT,
+   it->format->font.font);
+  }
+
+if (asc > *maxascent)
+   *maxascent = asc;
+ }
+
+   if ((position == TEXTBLOCK_POSITION_END) ||
+ (position == TEXTBLOCK_POSITION_SINGLE))
+ {
+/* Calculate max descent. */
+Evas_Coord desc = 0;
+
+if (fi)
+  {
+ desc = evas_common_font_instance_max_descent_get(fi);
+  }
+else
+  {
+ desc = ENFN->font_max_descent_get(ENDT,
+   it->format->font.font);
+  }
+
+if (desc > *maxdescent)
+   *maxdescent = desc;
+ }
+}
+
 /**
  * @internal
  * Adjust the ascent/descent of the item and context.

-- 




[EGIT] [legacy/evas] evas-1.7 04/04: Evas textblock: Fixed broken test.

2013-09-23 Thread Tom Hacohen
tasn pushed a commit to branch evas-1.7.

http://git.enlightenment.org/legacy/evas.git/commit/?id=f987406cb151ac4cb8134df86d95887b9e30d08c

commit f987406cb151ac4cb8134df86d95887b9e30d08c
Author: Tom Hacohen 
Date:   Mon Sep 23 17:10:05 2013 +0100

Evas textblock: Fixed broken test.

Item is not meant to take the size of the max ascent, just the ascent.
---
 src/tests/evas_test_textblock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tests/evas_test_textblock.c b/src/tests/evas_test_textblock.c
index 6d2c3b3..ab74a68 100644
--- a/src/tests/evas_test_textblock.c
+++ b/src/tests/evas_test_textblock.c
@@ -1083,7 +1083,7 @@ START_TEST(evas_textblock_items)
fail_if((w >= 93) || (h >= 153));
evas_textblock_cursor_pos_set(cur, 11);
evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &ih);
-   fail_if((w > 90) || (h != ih));
+   fail_if((w > 90) || (h <= ih));
 
buf = "This is an .";
evas_object_textblock_text_markup_set(tb, buf);

-- 




[EGIT] [legacy/evas] evas-1.7 03/04: Evas textblock: Cleaned up descent calculation.

2013-09-23 Thread Tom Hacohen
tasn pushed a commit to branch evas-1.7.

http://git.enlightenment.org/legacy/evas.git/commit/?id=fcaa64214a22c01065053b507759c01d67713ffc

commit fcaa64214a22c01065053b507759c01d67713ffc
Author: Tom Hacohen 
Date:   Mon Sep 23 17:09:57 2013 +0100

Evas textblock: Cleaned up descent calculation.

Fix up of 50b1a88f857c8c038c43a1d7d6eb4fbf69121333.
---
 src/lib/canvas/evas_object_textblock.c | 26 +-
 1 file changed, 5 insertions(+), 21 deletions(-)

diff --git a/src/lib/canvas/evas_object_textblock.c 
b/src/lib/canvas/evas_object_textblock.c
index a3de8e5..3ccb098 100644
--- a/src/lib/canvas/evas_object_textblock.c
+++ b/src/lib/canvas/evas_object_textblock.c
@@ -3277,32 +3277,16 @@ _layout_last_line_max_descent_adjust_calc(Ctxt *c, 
const Evas_Object_Textblock_P
  if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
{
   Evas_Coord asc = 0, desc = 0;
+  Evas_Coord masc = 0, mdesc = 0;
   _layout_item_ascent_descent_adjust(c->obj, &asc, &desc,
 it, c->position);
-
-  if ((c->position == TEXTBLOCK_POSITION_END) ||
-(c->position == TEXTBLOCK_POSITION_SINGLE))
-{
-   Evas_Coord mdesc = 0;
-   void *fi = _ITEM_TEXT(it)->text_props.font_instance;
-
-   if (fi)
- {
-mdesc = 
evas_common_font_instance_max_descent_get(fi);
- }
-   else
- {
-Evas_Object *obj = c->obj;
-mdesc =
-   ENFN->font_max_descent_get(ENDT, 
it->format->font.font);
- }
-
-   if (mdesc > maxdescent)
-  maxdescent = mdesc;
-}
+  _layout_item_max_ascent_descent_calc(c->obj, &masc, &mdesc,
+it, c->position);
 
   if (desc > descent)
  descent = desc;
+  if (mdesc > maxdescent)
+ maxdescent = mdesc;
}
   }
 

-- 




[EGIT] [core/elementary] master 01/02: focus: Added glow effect example on a button.

2013-09-23 Thread Amitesh Singh
seoz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=2ea1d908810ddc25aacbe450a57739dd9a0c58c5

commit 2ea1d908810ddc25aacbe450a57739dd9a0c58c5
Author: Amitesh Singh 
Date:   Tue Sep 24 02:39:26 2013 +0900

focus: Added glow effect example on a button.
---
 data/objects/Makefile.am   |   8 +-
 data/objects/border.png| Bin 0 -> 2606 bytes
 data/objects/border2.png   | Bin 0 -> 2865 bytes
 data/objects/border3.png   | Bin 0 -> 3162 bytes
 data/objects/border4.png   | Bin 0 -> 3131 bytes
 data/objects/border5.png   | Bin 0 -> 4420 bytes
 data/objects/border6.png   | Bin 0 -> 5707 bytes
 data/objects/test_focus_custom.edc | 389 +
 src/bin/test.c |   2 +
 src/bin/test_focus3.c  | 112 +++
 10 files changed, 510 insertions(+), 1 deletion(-)

diff --git a/data/objects/Makefile.am b/data/objects/Makefile.am
index bfb699f..5ed7f91 100644
--- a/data/objects/Makefile.am
+++ b/data/objects/Makefile.am
@@ -9,7 +9,7 @@ EDJE_FLAGS = $(EDJE_FLAGS_VERBOSE_$(V)) -id 
$(top_srcdir)/data/objects -fd $(top
 
 filesdir = $(datadir)/elementary/objects
 
-files_DATA = test.edj test_external.edj multip.edj cursors.edj 
font_preview.edj postit_ent.edj multibuttonentry.edj test_prefs.edj 
test_prefs.epb
+files_DATA = test.edj test_external.edj multip.edj cursors.edj 
font_preview.edj postit_ent.edj multibuttonentry.edj test_prefs.edj 
test_prefs.epb test_focus_custom.edj
 
 ELM_PREFS_CC = $(top_builddir)/src/bin/@ELM_PREFS_CC_PRG@
 
@@ -23,6 +23,7 @@ cursors.edc \
 font_preview.edc \
 postit_ent.edc \
 multibuttonentry.edc \
+test_focus_custom.edc \
 over.png \
 under.png \
 sky.jpg \
@@ -78,6 +79,11 @@ test_prefs.epb: Makefile test_prefs.epc
$(top_srcdir)/data/objects/test_prefs.epc \
$(top_builddir)/data/objects/test_prefs.epb
 
+test_focus_custom.edj: Makefile test_focus_custom.edc
+   $(EDJE_CC) $(EDJE_FLAGS) \
+   $(top_srcdir)/data/objects/test_focus_custom.edc \
+   $(top_builddir)/data/objects/test_focus_custom.edj
+
 clean-local:
rm -f *.edj
rm -f test_prefs.epb
diff --git a/data/objects/border.png b/data/objects/border.png
new file mode 100644
index 000..07ee9f8
Binary files /dev/null and b/data/objects/border.png differ
diff --git a/data/objects/border2.png b/data/objects/border2.png
new file mode 100644
index 000..cdf499d
Binary files /dev/null and b/data/objects/border2.png differ
diff --git a/data/objects/border3.png b/data/objects/border3.png
new file mode 100644
index 000..b9219c2
Binary files /dev/null and b/data/objects/border3.png differ
diff --git a/data/objects/border4.png b/data/objects/border4.png
new file mode 100644
index 000..ca4115c
Binary files /dev/null and b/data/objects/border4.png differ
diff --git a/data/objects/border5.png b/data/objects/border5.png
new file mode 100644
index 000..07e1991
Binary files /dev/null and b/data/objects/border5.png differ
diff --git a/data/objects/border6.png b/data/objects/border6.png
new file mode 100644
index 000..df6320b
Binary files /dev/null and b/data/objects/border6.png differ
diff --git a/data/objects/test_focus_custom.edc 
b/data/objects/test_focus_custom.edc
new file mode 100644
index 000..caa4d9c
--- /dev/null
+++ b/data/objects/test_focus_custom.edc
@@ -0,0 +1,389 @@
+//  c1 - c4
+//  |base|
+//  ||
+//  c3 - c2
+#define OUTER_BASE_PARTS(w, h)   \
+   part { name: "base"; type: SPACER;\
+  description {  \
+ state: "default" 0.0; } }   \
+   part { name: "c1"; type: SPACER;  \
+  description { state: "default" 0.0;\
+ rel1.to: "base";\
+ rel2.to: "base";\
+ rel2.relative: 0 0; \
+ align: 1 1; \
+ min: w h;   \
+ max: w h; } }   \
+   part { name: "c3"; type: SPACER;  \
+  description { state: "default" 0.0;\
+ rel1.to: "base";\
+ rel2.to: "base";\
+ rel1.relative: 0 1; \
+ rel2.relative: 0 1; \
+ align: 1 0; \
+ min: w h;   \
+ max: w h; } }   \
+   part { name: "c4"; type: SPACER;  \
+  description { state: "default" 0.0;\
+ rel1.to: "base";\
+ rel2.to: "base";\
+ rel1.relative: 1 0; \
+ rel2.relative: 1 0; \
+ min: w h;   \
+ max: w h; } }   \
+   part { name: "c2"; type: SPACER;  \
+  mouse_events: 0;   \
+  description { state: "defa

[E-devel] Legacy eina pull request

2013-09-23 Thread Jorge Luis Zapata Muga
The following changes since commit 80ad0a6c48479cecc0933e488aa1c853e15015c6:

  1.7.8 release (2013-08-01 18:32:08 -0300)

are available in the git repository at:

  https://github.com/turran/eina eina-extra

for you to fetch changes up to bceb578eeb266345cbae488938448db73945c0c5:

  Add a substraction in rectangles and more helpers (2013-09-23 21:13:52
+0200)


Jorge Zapata (3):
  Add double_from/to and helper defines in f16p16
  Add functions to alloc strings from a printf fmt
  Add a substraction in rectangles and more helpers

 src/include/eina_fp.h   |6 ++
 src/include/eina_inline_fp.x|   17 +
 src/include/eina_inline_rectangle.x |  138
++
 src/include/eina_rectangle.h|   10 ++
 src/include/eina_str.h  |   33
+
 src/lib/eina_str.c  |   41
+
 6 files changed, 245 insertions(+)
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Legacy eina pull request

2013-09-23 Thread Eduardo Lima (Etrunko)
Hi Turran,

Since these patches are adding new API, shoudn't they be pushed to the
1.8 tree? We are holding ourselves from pushing any new features the
1.7 series, and should drop the support for them as soon as the new
version is released (which I was told it should still happen this
year).

Regards, Etrunko

2013/9/23 Jorge Luis Zapata Muga :
> The following changes since commit 80ad0a6c48479cecc0933e488aa1c853e15015c6:
>
>   1.7.8 release (2013-08-01 18:32:08 -0300)
>
> are available in the git repository at:
>
>   https://github.com/turran/eina eina-extra
>
> for you to fetch changes up to bceb578eeb266345cbae488938448db73945c0c5:
>
>   Add a substraction in rectangles and more helpers (2013-09-23 21:13:52
> +0200)
>
> 
> Jorge Zapata (3):
>   Add double_from/to and helper defines in f16p16
>   Add functions to alloc strings from a printf fmt
>   Add a substraction in rectangles and more helpers
>
>  src/include/eina_fp.h   |6 ++
>  src/include/eina_inline_fp.x|   17 +
>  src/include/eina_inline_rectangle.x |  138
> ++
>  src/include/eina_rectangle.h|   10 ++
>  src/include/eina_str.h  |   33
> +
>  src/lib/eina_str.c  |   41
> +
>  6 files changed, 245 insertions(+)
> --
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel



-- 
Eduardo de Barros Lima ◤✠◢
ebl...@gmail.com

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Legacy eina pull request

2013-09-23 Thread Jorge Luis Zapata Muga
On Mon, Sep 23, 2013 at 9:56 PM, Eduardo Lima (Etrunko) wrote:

> Hi Turran,
>
> Since these patches are adding new API, shoudn't they be pushed to the
> 1.8 tree? We are holding ourselves from pushing any new features the
> 1.7 series, and should drop the support for them as soon as the new
> version is released (which I was told it should still happen this
> year).
>

Hi,
I already asked about this in another thread (Legacy libraries and efl
repos) but I had no answer :-/
Don't know what is the process here ... at the end this patches can go to
efl's tree one too


>
> Regards, Etrunko
>
> 2013/9/23 Jorge Luis Zapata Muga :
> > The following changes since commit
> 80ad0a6c48479cecc0933e488aa1c853e15015c6:
> >
> >   1.7.8 release (2013-08-01 18:32:08 -0300)
> >
> > are available in the git repository at:
> >
> >   https://github.com/turran/eina eina-extra
> >
> > for you to fetch changes up to bceb578eeb266345cbae488938448db73945c0c5:
> >
> >   Add a substraction in rectangles and more helpers (2013-09-23 21:13:52
> > +0200)
> >
> > 
> > Jorge Zapata (3):
> >   Add double_from/to and helper defines in f16p16
> >   Add functions to alloc strings from a printf fmt
> >   Add a substraction in rectangles and more helpers
> >
> >  src/include/eina_fp.h   |6 ++
> >  src/include/eina_inline_fp.x|   17 +
> >  src/include/eina_inline_rectangle.x |  138
> >
> ++
> >  src/include/eina_rectangle.h|   10 ++
> >  src/include/eina_str.h  |   33
> > +
> >  src/lib/eina_str.c  |   41
> > +
> >  6 files changed, 245 insertions(+)
> >
> --
> > October Webinars: Code for Performance
> > Free Intel webinars can help you accelerate application performance.
> > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> > the latest Intel processors and coprocessors. See abstracts and register
> >
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
>
> --
> Eduardo de Barros Lima ◤✠◢
> ebl...@gmail.com
>
>
> --
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Legacy eina pull request

2013-09-23 Thread Stefan Schmidt
Hello.

On Mon, 2013-09-23 at 22:01, Jorge Luis Zapata Muga wrote:
> On Mon, Sep 23, 2013 at 9:56 PM, Eduardo Lima (Etrunko) 
> wrote:
> 
> > Hi Turran,
> >
> > Since these patches are adding new API, shoudn't they be pushed to the
> > 1.8 tree? We are holding ourselves from pushing any new features the
> > 1.7 series, and should drop the support for them as soon as the new
> > version is released (which I was told it should still happen this
> > year).
> >
> 
> Hi,
> I already asked about this in another thread (Legacy libraries and efl
> repos) but I had no answer :-/
> Don't know what is the process here ... at the end this patches can go to
> efl's tree one too

I would not go as far as saying we have a process for this. :)

But as a rule of thumb:

1) All patches (fixes, features, etc) should go into master (for 1.8)
first. Only exception would be fixes that are only valid for the 1.7.x
branch. Feature on the other hand should never have any exception.

2) Once they are in master and don't cause trouble fixes can be
backported to the legacy branches. (Its a bit annoying right now as we
can't cherry-pick due to the efl merge but that will be better for the
1.8 and 1.9 cycle)
Backports of features, which is want you want here, is a bit more
unclear. Personally I feel not really comfortable with still
backporting features into the 1.7 cycle but people still do it. And
have plenty of good arguments to do so.

I guess the best way for you would be to put your changes into master,
wait for people to complain, fix up things if needed and once the
storm tuned down backport it to eina legacy. :)

regards
Stefan Schmidt

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Enlightenment-release] Releases pending

2013-09-23 Thread Eduardo Lima (Etrunko)
I have just uploaded new Evas tarballs which include latest texblock
fixes from Tom.

ae00f5eda9d9d2c7fc287b12babfc87b  evas-1.7.9.tar.bz2
38f5add4539d8494807b17bfa6930977  evas-1.7.9.tar.gz

83b23239b46fa0c349a48dc6146927136578fa413530d084f5d1c269e6d4c63c
evas-1.7.9.tar.bz2
e12f92acd344d5854f0b215cbc8740f1feef7e822ef87bfa8419fe012a25b164
evas-1.7.9.tar.gz

Regards, Eduardo.

2013/9/18 Eduardo Lima (Etrunko) :
> 2013/9/18 Thomas Sachau :
>> Carsten Haitzler (The Rasterman) schrieb:
>>> On Fri, 13 Sep 2013 14:57:33 -0300 "Eduardo Lima (Etrunko)" 
>>> 
>>> said:
>>>
 It is already Friday the 13th, and I have not yet heard any feedbacks.
 Can we get this official release out of the doors by Tuesday?
>>>
>>> no. give it a few weeks. last release left people with systems that couldnt
>>> even stat e and had a blank screen. let's not do that again.
>>
>> Current status:
>>
>> fixed:
>>
>> -opengl+gles support with >=mesa-9.1 (Gentoo Bug 462732)
>> -e hanging prior to splash screen (Gentoo Bug 483194)
>> -black screen on startup with multiscreen setup (might be the a
>> duplicate of the previous one) (Gentoo Bug 484996)
>>
>> Still open:
>>
>> -black screen, when starting with an older config from before 0.17.4,
>> while startup is fine with a new, clean config (Gentoo Bug 485268)
>>
>
> Thanks for the report. :) I have updated the elementary tarballs with
> a couple of commits that went in today.
>
> md5sum
> 59b495e9a5f1736bb0e69d4f9e4acfc5  elementary-1.7.9.tar.bz2
> ef8074cc3feca6fc5978984accffbbb2  elementary-1.7.9.tar.gz
>
> sha256sum
> fe5d673d7687e31862d6728de362fdb9bca5c5a660c2aa6c47e663ad92ae6dbd
> elementary-1.7.9.tar.bz2
> 89846ee721a23d9dd01cf18eff186ce5680cafe8fbe760a6869dd909c296c4d1
> elementary-1.7.9.tar.gz
>
> Regards, Eduardo
>
> --
> Eduardo de Barros Lima ◤✠◢
> ebl...@gmail.com



-- 
Eduardo de Barros Lima ◤✠◢
ebl...@gmail.com

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [bindings/python/python-efl] master 01/01: Elementary: Add more missing signals/functions.

2013-09-23 Thread Kai Huuhko
kuuko pushed a commit to branch master.

http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=f40afed56a2e8be7b1b96035597f84335ead5215

commit f40afed56a2e8be7b1b96035597f84335ead5215
Author: Kai Huuhko 
Date:   Tue Sep 24 01:02:01 2013 +0300

Elementary: Add more missing signals/functions.
---
 efl/elementary/enums.pxd|   5 ++
 efl/elementary/index.pyx|  21 +++
 efl/elementary/label.pyx|   9 ++-
 efl/elementary/layout.pyx   |   3 +-
 efl/elementary/layout_class.pyx |   7 +++
 efl/elementary/list.pyx |  77 ---
 efl/elementary/map.pyx  |  21 +++
 efl/elementary/menu.pyx |  13 +++-
 efl/elementary/multibuttonentry.pyx |  19 ++
 efl/elementary/naviframe.pyx|  25 +++-
 efl/elementary/panel.pyx|  25 
 efl/elementary/photocam.pyx |  21 +++
 efl/elementary/plug.pyx |  48 +++
 efl/elementary/popup.pyx|  39 +++-
 efl/elementary/progressbar.pyx  |  23 ++-
 efl/elementary/radio.pyx|  23 ++-
 efl/elementary/scroller.pxd |   9 ++-
 efl/elementary/scroller.pyx | 118 
 efl/elementary/slider.pyx   |  29 +++--
 efl/elementary/slideshow.pyx|  21 +++
 efl/elementary/spinner.pyx  |  29 +
 efl/elementary/toolbar.pyx  |  21 +++
 efl/elementary/video.pyx|  45 ++
 efl/elementary/window.pxd   |  15 -
 efl/elementary/window.pyx   |  62 +++
 25 files changed, 699 insertions(+), 29 deletions(-)

diff --git a/efl/elementary/enums.pxd b/efl/elementary/enums.pxd
index 0c61c9f..be298f4 100644
--- a/efl/elementary/enums.pxd
+++ b/efl/elementary/enums.pxd
@@ -355,6 +355,11 @@ cdef extern from "Elementary.h":
 ELM_SCROLLER_SINGLE_DIRECTION_HARD
 ELM_SCROLLER_SINGLE_DIRECTION_LAST
 
+ctypedef enum Elm_Scroller_Movement_Block:
+ELM_SCROLLER_MOVEMENT_NO_BLOCK # Do not block movements
+ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL # Block vertical movements
+ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL # Block horizontal movements
+
 ctypedef enum Elm_Sel_Format:
 ELM_SEL_FORMAT_TARGETS
 ELM_SEL_FORMAT_NONE
diff --git a/efl/elementary/index.pyx b/efl/elementary/index.pyx
index da1a249..eda8259 100644
--- a/efl/elementary/index.pyx
+++ b/efl/elementary/index.pyx
@@ -56,6 +56,8 @@ This widget emits the following signals, besides the ones 
sent from
 - ``"level,down"`` - when the user moves a finger from the second
   level to the first level
 - ``"language,changed"`` - the program's language changed
+- ``focused`` - When the index has received focus. (since 1.8)
+- ``unfocused`` - When the index has lost focus. (since 1.8)
 
 The ``"delay,changed"`` event is so that it'll wait a small time
 before actually reporting those events and, moreover, just the
@@ -608,5 +610,24 @@ cdef class Index(LayoutClass):
 def callback_language_changed_del(self, func):
 self._callback_del("language,changed", func)
 
+def callback_focused_add(self, func, *args, **kwargs):
+"""When the index has received focus.
+
+:since: 1.8
+"""
+self._callback_add("focused", func, *args, **kwargs)
+
+def callback_focused_del(self, func):
+self._callback_del("focused", func)
+
+def callback_unfocused_add(self, func, *args, **kwargs):
+"""When the index has lost focus.
+
+:since: 1.8
+"""
+self._callback_add("unfocused", func, *args, **kwargs)
+
+def callback_unfocused_del(self, func):
+self._callback_del("unfocused", func)
 
 _object_mapping_register("elm_index", Index)
diff --git a/efl/elementary/label.pyx b/efl/elementary/label.pyx
index beaa52e..f2f4e8c 100644
--- a/efl/elementary/label.pyx
+++ b/efl/elementary/label.pyx
@@ -47,7 +47,8 @@ they like.
 This widget emits the following signals, besides the ones sent from
 :py:class:`elementary.layout.Layout`:
 
-- *"language,changed"*: The program's language changed.
+- ``language,changed`` - The program's language changed.
+- ``slide,end`` - The slide is end.
 
 
 Enumerations
@@ -264,5 +265,11 @@ cdef class Label(LayoutClass):
 def callback_language_changed_del(self, func):
 self._callback_del("language,changed", func)
 
+def callback_slide_end_add(self, func, *args, **kwargs):
+"""A slide effect has ended."""
+self._callback_add("slide,end", func, *args, **kwargs)
+
+def callback_slide_end_del(self, func):
+self._callback_del("slide,end", func)
 
 _object_mapping_register("elm_label", Label)
diff --git a/efl/elementary/layout.pyx b/efl/elementary/layout.pyx
index c08626c..e3d7374 100644
--- a/efl/elementary/layout.pyx
+++ b/efl/elementary/layout.pyx
@@ -131,7 +131,8 @@ These are available predefined theme layouts. All of them 

Re: [E-devel] Wayland and subsurfaces

2013-09-23 Thread Rafael Antognolli
Hey Raster,

I added some code to do what you proposed, but it ended up kind of
hackish IMHO. That was using the native surface API.

The problem is that subsurfaces are handled the same way as surfaces,
thus their handling code should belong to ecore_wl (similarly to X
windows code belonging to ecore_x). In order to do what you said, I
had to pass the compositor structure (and subcompositor structure),
which lived inside Ecore_Wl, to Evas engine, and create the
subsurfaces from there.

I pushed the partial code for this, there are several things that must
be done yet, but you can figure out what I've been doing if you want:

http://git.enlightenment.org/core/efl.git/commit/?h=devs/antognolli/subsurfaces2

On the other hand, I noticed that the Evas_Video_Surface struct and
code, so far used only in Emotion gstreamer backend, seems to fit this
task way better. It does make some assumptions that must be
changed/fixed/improved, like assuming that it's possible to clip or
resize the image, or that it is always in a layer below the current
canvas, but I think I can handle this. Other than that, the code to
hanlde subsurfaces with that API seems way more clean to me. Don't you
think it would be better to do this code using Video Surfaces instead
of the Native Surfaces API?

Thanks

On Wed, Aug 7, 2013 at 8:08 PM, Carsten Haitzler  wrote:
> On Wed, 7 Aug 2013 16:32:53 -0300 Rafael Antognolli  
> said:
>
>> Hey guys,
>>
>> I'm trying to add Wayland's subsurfaces support to EFL, but not sure
>> about how to expose it.
>>
>> Actually, I'm not even sure if we should expose it or not. The only
>> similar thing that I saw so far was the video overlay stuff, which I
>> don't know exactly if it's the same thing.
>>
>> If not, what would it be? A sub-canvas of the main canvas? Or should I
>> just expose something in the ecore_wayland_* namespace?
>>
>> Any thoughts?
>>
>
> i already talked with devilhorns about this... and subsurfaces should probably
> not be exposed at all. they should be silently handled inside the wayland
> engines for evas. they are basically useful for 2 things:
>
> 1. popup menus and the like...
> 2. breaking out objects that can live in their own buffer
>
> a #1 is a subset of #2 anyway.
>
> evas should be making the decisions as to what objects get broken out into
> subsurfaces frame-by-frame. it should create, destroy, reconfigure and
> re-render them as needed every time evas_render is called. of course the evas
> engine keeps track of current subsurfaces there from the previous frame.
>
> the criteria for being selected to become a subsurface depend on the 
> following:
>
> 1. does the object have a buffer? can evas generate one (map/proxy) and
> pre-render it?
> 2. if we have a buffer already, or can generate it, does the compositor 
> support
> the buffer format (yuv, rgb etc.)
> 3. does the object geometry match "transforms" and clipping etc. the 
> compositor
> supports (last status i knew is that scaling still had to go in, and there was
> no ability to clip these subsurfaces explicitly eg to a rectangle). so match 
> up
> clipping, color multiply, masking (not in evas atm, but maybe in future),
> scaling and map/transforms.
> 4. after the first 3 checks, we will have a candidate list. sort this list
> based on criteria - eg objects that may be marked to be "popups" that exceed
> canvas bounds first (no such feature right now, but in future...), then yuv
> objects, then rgba buffer ones that change content less often, BUT change
> position (eg scroll), where we may benefit from avoiding re-rendering these 
> and
> sort these ones by estimated "render cost".
> 5. we need to either assume the compositor has a limit to how many subsurfaces
> it can manage to deal with before this gets silly or just has no benefit. 
> popup
> subsurfaces that go outside window bounds are a necessity, so those always
> happen. evas must generate buffers for these no matter what (if they don't 
> have
> them already). then it's a matter of how many yuv and rgb subsurfaces to
> expose. for now a fixed configurable number (let's say an environment var) 
> will
> do, BUT this is something i think wayland needs to extend protocol-wise. the
> compositor should send over wayland events to clients indicating how many
> subsurfaces might be optimal and which formats might benefit from 
> acceleration.
> so for example. on your average desktop gpu setup you really only have 1 rgba
> layer, 1 yuv layer (and maybe a cursor) for the whole screen. that means that
> the best possible sensible # of layers to expose is 1, and just a yuv layer
> only. rgba layers wont benefit (thus only expose subsurfaces for popups that
> exceed window bounds - again a feature we don't have yet). but many arm soc's
> support 2, 3, or more layers (i have seen 5, 8 and even up to 12 layers). they
> often are highly flexible offering both yuv AND rgba and sometimes arbitrary
> mixes (a layer can be any format). if you have a mobile phone/tablet li

Re: [E-devel] Legacy eina pull request

2013-09-23 Thread Jorge Luis Zapata Muga
On Mon, Sep 23, 2013 at 10:17 PM, Stefan Schmidt
wrote:

> Hello.
>
> On Mon, 2013-09-23 at 22:01, Jorge Luis Zapata Muga wrote:
> > On Mon, Sep 23, 2013 at 9:56 PM, Eduardo Lima (Etrunko) <
> ebl...@gmail.com>wrote:
> >
> > > Hi Turran,
> > >
> > > Since these patches are adding new API, shoudn't they be pushed to the
> > > 1.8 tree? We are holding ourselves from pushing any new features the
> > > 1.7 series, and should drop the support for them as soon as the new
> > > version is released (which I was told it should still happen this
> > > year).
> > >
> >
> > Hi,
> > I already asked about this in another thread (Legacy libraries and efl
> > repos) but I had no answer :-/
> > Don't know what is the process here ... at the end this patches can go to
> > efl's tree one too
>
> I would not go as far as saying we have a process for this. :)
>
> But as a rule of thumb:
>
> 1) All patches (fixes, features, etc) should go into master (for 1.8)
> first. Only exception would be fixes that are only valid for the 1.7.x
> branch. Feature on the other hand should never have any exception.
>
> 2) Once they are in master and don't cause trouble fixes can be
> backported to the legacy branches. (Its a bit annoying right now as we
> can't cherry-pick due to the efl merge but that will be better for the
> 1.8 and 1.9 cycle)
> Backports of features, which is want you want here, is a bit more
> unclear. Personally I feel not really comfortable with still
> backporting features into the 1.7 cycle but people still do it. And
> have plenty of good arguments to do so.
>
> I guess the best way for you would be to put your changes into master,
> wait for people to complain, fix up things if needed and once the
> storm tuned down backport it to eina legacy. :)
>

Ok, thanks for the tips :)
Regards


>
> regards
> Stefan Schmidt
>
>
> --
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] EFL pull request

2013-09-23 Thread Jorge Luis Zapata Muga
I applied the patches from the legacy tree
Hope this one is good enough

The following changes since commit 4850c4660f226f1d58f3e877d0b8ddbd6a6c77d4:

  Evas textblock: Fixed broken test. (2013-09-23 14:37:19 +0100)

are available in the git repository at:

  https://github.com/turran/efl eina-extra

for you to fetch changes up to 67dc4a42d54e6533b6e72279ff54fd7a0f2091f7:

  Add a substraction in rectangles and more helpers (2013-09-24 01:10:41
+0200)


Jorge Zapata (3):
  Add double_from/to and helper defines in f16p16
  Add functions to alloc strings from a printf fmt
  Add a substraction in rectangles and more helpers

 src/lib/eina/eina_fp.h   |6 ++
 src/lib/eina/eina_inline_fp.x|   17 +
 src/lib/eina/eina_inline_rectangle.x |  138
++
 src/lib/eina/eina_rectangle.h|   10 ++
 src/lib/eina/eina_str.c  |   41
+
 src/lib/eina/eina_str.h  |   33
+
 6 files changed, 245 insertions(+)
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 02/04: efl: add Jorge change to ChangeLog and NEWS.

2013-09-23 Thread Cedric Bail
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e5231de7eb70074be7d8dfa9971202899e658528

commit e5231de7eb70074be7d8dfa9971202899e658528
Author: Cedric Bail 
Date:   Tue Sep 24 12:18:48 2013 +0900

efl: add Jorge change to ChangeLog and NEWS.
---
 ChangeLog | 6 ++
 NEWS  | 5 +
 2 files changed, 11 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index a7fd67d..9a6823b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-09-24  Jorge Zapata
+
+   * Eina: add a substraction in rectangles and more helpers,
+   add functions to alloc strings from a printf format,
+   add double_from/to and helper defines in f16p16.
+
 2013-09-12  Jihoon Kim
 
* ecore_imf: Fix memory leak in scim immodule
diff --git a/NEWS b/NEWS
index be7c068..3f9ab5e 100644
--- a/NEWS
+++ b/NEWS
@@ -36,6 +36,11 @@ Additions:
  - Add eina_tiler_empty()
  - Add eina_file_virtualize() and eina_file_virtual()
  - Add eina_file_refresh()
+ - Add eina_rectangle_is_valid(), eina_rectangle_max_x(), 
eina_rectangle_max_y(), eina_rectangle_x_cut(),
+ eina_rectangle_y_cut(), eina_rectangle_width_cut(), 
eina_rectangle_height_cut(), eina_rectangle_subtract(),
+ EINA_RECTANGLE_INIT, EINA_RECTANGLE_FORMAT, EINA_RECTANGLE_ARGS.
+ - Add eina_str_vprintf_length(), eina_str_vprintf_dup(), 
eina_str_printf_dup().
+ - Add eina_f16p16_double_from(), eina_f16p16_double_to().
 * Eet:
  - Add eet_mmap()
  - Add eet_data_descriptor_name_get()

-- 




[EGIT] [core/efl] master 03/04: eina: add a substraction in rectangles and more helpers

2013-09-23 Thread Jorge Zapata
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b98ee971f3b139b94a09c136ff2a6f709067d594

commit b98ee971f3b139b94a09c136ff2a6f709067d594
Author: Jorge Zapata 
Date:   Mon Sep 23 21:13:52 2013 +0200

eina: add a substraction in rectangles and more helpers

Also add functions to cut a rectangle in the different
lengths/coordinates.
Add helper macros to printf a rectangle
---
 src/lib/eina/eina_inline_rectangle.x | 138 +++
 src/lib/eina/eina_rectangle.h|  10 +++
 2 files changed, 148 insertions(+)

diff --git a/src/lib/eina/eina_inline_rectangle.x 
b/src/lib/eina/eina_inline_rectangle.x
index dbd7f11..42a87f8 100644
--- a/src/lib/eina/eina_inline_rectangle.x
+++ b/src/lib/eina/eina_inline_rectangle.x
@@ -247,6 +247,144 @@ eina_rectangle_rescale_out(const Eina_Rectangle *out, 
const Eina_Rectangle *in,
res->h = out->h;
 }
 
+static inline Eina_Bool
+eina_rectangle_is_valid(const Eina_Rectangle *r)
+{
+   if (r->w <= 0 || r->h <= 0)
+   return EINA_FALSE;
+   return EINA_TRUE;
+}
+
+static inline int
+eina_rectangle_max_x(Eina_Rectangle *thiz)
+{
+   return thiz->x + thiz->w;
+}
+
+static inline int
+eina_rectangle_max_y(Eina_Rectangle *thiz)
+{
+   return thiz->y + thiz->h;
+}
+
+static inline Eina_Bool
+eina_rectangle_x_cut(Eina_Rectangle *thiz, Eina_Rectangle *slice, 
Eina_Rectangle *leftover, int amount)
+{
+   Eina_Rectangle tmp1, tmp2;
+   if (amount > thiz->w)
+   return EINA_FALSE;
+   eina_rectangle_coords_from(&tmp1, thiz->x, thiz->y, amount, thiz->h);
+   eina_rectangle_coords_from(&tmp2, thiz->x + amount, thiz->y, thiz->w - 
amount, thiz->h);
+   if (slice) *slice = tmp1;
+   if (leftover) *leftover = tmp2;
+   return EINA_TRUE;
+}
+
+static inline Eina_Bool
+eina_rectangle_y_cut(Eina_Rectangle *thiz, Eina_Rectangle *slice, 
Eina_Rectangle *leftover, int amount)
+{
+   Eina_Rectangle tmp1, tmp2;
+   if (amount > thiz->h)
+   return EINA_FALSE;
+   eina_rectangle_coords_from(&tmp1, thiz->x, thiz->y, thiz->w, amount);
+   eina_rectangle_coords_from(&tmp2, thiz->x, thiz->y + amount, thiz->w, 
thiz->h - amount);
+   if (slice) *slice = tmp1;
+   if (leftover) *leftover = tmp2;
+   return EINA_TRUE;
+}
+
+static inline Eina_Bool
+eina_rectangle_width_cut(Eina_Rectangle *thiz, Eina_Rectangle *slice, 
Eina_Rectangle *leftover, int amount)
+{
+   Eina_Rectangle tmp1, tmp2;
+   if (thiz->w - amount < 0)
+   return EINA_FALSE;
+   eina_rectangle_coords_from(&tmp1, thiz->x + (thiz->w - amount), 
thiz->y, amount, thiz->h);
+   eina_rectangle_coords_from(&tmp2, thiz->x, thiz->y, thiz->w - amount, 
thiz->h);
+   if (slice) *slice = tmp1;
+   if (leftover) *leftover = tmp2;
+   return EINA_TRUE;
+}
+
+static inline Eina_Bool
+eina_rectangle_height_cut(Eina_Rectangle *thiz, Eina_Rectangle *slice, 
Eina_Rectangle *leftover, int amount)
+{
+   Eina_Rectangle tmp1, tmp2;
+   if (thiz->h - amount < 0)
+   return EINA_FALSE;
+   eina_rectangle_coords_from(&tmp1, thiz->x, thiz->y + (thiz->h - 
amount), thiz->w, amount);
+   eina_rectangle_coords_from(&tmp2, thiz->x, thiz->y, thiz->w, thiz->h - 
amount);
+   if (slice) *slice = tmp1;
+   if (leftover) *leftover = tmp2;
+   return EINA_TRUE;
+}
+
+/**
+ * @brief Subtract two rectangles.
+ *
+ * @param thiz The minuend rectangle
+ * @param src The subtrahend rectangle
+ *
+ * This function subtract two rectangles. The difference is stored on @p out
+ * There will be at most four differences, use eina_rectangle_is_valid to
+ * confirm the number of differences.
+ */
+static inline Eina_Bool
+eina_rectangle_subtract(Eina_Rectangle *thiz, Eina_Rectangle *other, 
Eina_Rectangle out[4])
+{
+   Eina_Rectangle intersection;
+   Eina_Rectangle leftover = EINA_RECTANGLE_INIT;
+   Eina_Rectangle tmp;
+   int cut = 0;
+
+   if (!eina_rectangle_is_valid(thiz))
+   return EINA_FALSE;
+
+   eina_rectangle_coords_from(&out[0], 0, 0, 0, 0);
+   eina_rectangle_coords_from(&out[1], 0, 0, 0, 0);
+   eina_rectangle_coords_from(&out[2], 0, 0, 0, 0);
+   eina_rectangle_coords_from(&out[3], 0, 0, 0, 0);
+   intersection = *thiz;
+   if (!eina_rectangle_intersection(&intersection, other))
+   {
+   out[0] = *thiz;
+   return EINA_TRUE;
+   }
+
+   /* cut in height */
+   {
+   cut = thiz->h - (intersection.y - thiz->y);
+   if (cut > thiz->h) { cut = thiz->h; }
+   eina_rectangle_height_cut(thiz, &leftover, &out[0], cut);
+   }
+   /* cut in y */
+   tmp = leftover;
+   if (eina_rectangle_intersection(&tmp, &intersection))
+   {
+   cut = leftover.h - (eina_rectangle_max_y(&leftover) - 
eina_rectangle_max_y(&tmp));
+   if (cut

[EGIT] [core/efl] master 01/04: eina: add double_from/to and helper defines in f16p16

2013-09-23 Thread Jorge Zapata
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=538821f09d4dcd71642eb7f4d782ef350b956ddf

commit 538821f09d4dcd71642eb7f4d782ef350b956ddf
Author: Jorge Zapata 
Date:   Mon Sep 23 20:48:52 2013 +0200

eina: add double_from/to and helper defines in f16p16
---
 src/lib/eina/eina_fp.h|  6 ++
 src/lib/eina/eina_inline_fp.x | 17 +
 2 files changed, 23 insertions(+)

diff --git a/src/lib/eina/eina_fp.h b/src/lib/eina/eina_fp.h
index c73dc16..bc6c78d 100644
--- a/src/lib/eina/eina_fp.h
+++ b/src/lib/eina/eina_fp.h
@@ -60,8 +60,14 @@ static inline unsigned int eina_f32p32_fracc_get(Eina_F32p32 
v);
 EAPI Eina_F32p32   eina_f32p32_cos(Eina_F32p32 a);
 EAPI Eina_F32p32   eina_f32p32_sin(Eina_F32p32 a);
 
+
+#define EINA_F16P16_ONE (1 << 16)
+#define EINA_F16P16_HALF (1 << 15)
+
 static inline Eina_F16p16  eina_f16p16_int_from(int32_t v);
 static inline int32_t  eina_f16p16_int_to(Eina_F16p16 v);
+static inline Eina_F16p16  eina_f16p16_double_from(double v);
+static inline double   eina_f16p16_double_to(Eina_F16p16 v);
 static inline Eina_F16p16  eina_f16p16_float_from(float v);
 static inline floateina_f16p16_float_to(Eina_F16p16 v);
 
diff --git a/src/lib/eina/eina_inline_fp.x b/src/lib/eina/eina_inline_fp.x
index de44123..e459f82 100644
--- a/src/lib/eina/eina_inline_fp.x
+++ b/src/lib/eina/eina_inline_fp.x
@@ -80,6 +80,23 @@ eina_f16p16_float_to(Eina_F16p16 v)
return r;
 }
 
+static inline Eina_F16p16
+eina_f16p16_double_from(double v)
+{
+   Eina_F16p16 r;
+
+   r = (Eina_F16p16)(v * 65536.0 + (v < 0 ? -0.5 : 0.5));
+   return r;
+}
+
+static inline double
+eina_f16p16_double_to(Eina_F16p16 v)
+{
+   double r;
+
+   r = v / 65536.0;
+   return r;
+}
 
 
 static inline Eina_F8p24

-- 




[EGIT] [core/efl] master 04/04: eina: add functions to alloc strings from a printf fmt

2013-09-23 Thread Jorge Zapata
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b5fce696c743c50ea0a049c4f879756b5ed231d4

commit b5fce696c743c50ea0a049c4f879756b5ed231d4
Author: Jorge Zapata 
Date:   Mon Sep 23 21:13:18 2013 +0200

eina: add functions to alloc strings from a printf fmt
---
 src/lib/eina/eina_str.c | 41 +
 src/lib/eina/eina_str.h | 33 +
 2 files changed, 74 insertions(+)

diff --git a/src/lib/eina/eina_str.c b/src/lib/eina/eina_str.c
index 11fef3c..283476b 100644
--- a/src/lib/eina/eina_str.c
+++ b/src/lib/eina/eina_str.c
@@ -652,3 +652,44 @@ eina_str_toupper(char **str)
for (p = *str; (*p); p++)
   *p = toupper((unsigned char)(*p));
 }
+
+EAPI size_t
+eina_str_vprintf_length(const char *format, va_list args)
+{
+char c;
+size_t len;
+
+len = vsnprintf(&c, 1, format, args) + 1;
+return len;
+}
+
+EAPI char *
+eina_str_vprintf_dup(const char *format, va_list args)
+{
+size_t length;
+char *ret;
+va_list copy;
+
+/* be sure to use a copy or the printf implementation will
+ * step into the args
+ */
+va_copy(copy, args);
+length = eina_str_vprintf_length(format, copy);
+va_end(copy);
+
+ret = calloc(length, sizeof(char));
+vsprintf(ret, format, args);
+return ret;
+}
+
+EAPI char *
+eina_str_printf_dup(const char *format, ...)
+{
+char *ret;
+va_list args;
+
+va_start(args, format);
+ret = eina_str_vprintf_dup(format, args);
+va_end(args);
+return ret;
+}
diff --git a/src/lib/eina/eina_str.h b/src/lib/eina/eina_str.h
index dae592b..1d8edae 100644
--- a/src/lib/eina/eina_str.h
+++ b/src/lib/eina/eina_str.h
@@ -345,6 +345,39 @@ static inline size_t eina_str_join(char *dst, size_t size, 
char sep, const char
 
 static inline size_t eina_strlen_bounded(const char *str, size_t maxlen) 
EINA_PURE EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
 
+/**
+ * @brief Gets the length needed for a string based on a printf format and args
+ * 
+ * @param format The printf format
+ * @param args The printf args
+ * @return The length needed for such format and args
+ * @since 1.7.9
+ */
+EAPI size_t eina_str_vprintf_length(const char *format, va_list args);
+
+/**
+ * @brief Gets a newly allocated string that represents the printf format and 
args
+ *
+ * @param format The printf format
+ * @param args The printf args
+ * @return A newly allocated string
+ *
+ * @see eina_str_dup_printf
+ * @since 1.7.9
+ */
+EAPI char * eina_str_vprintf_dup(const char *format, va_list args);
+
+/**
+ * @brief Gets a newly allocated string that represents the printf format and 
args
+ *
+ * @param format The printf format
+ * @return A newly allocated string
+ *
+ * @see eina_str_dup_vprintf
+ * @since 1.7.9
+ */
+EAPI char * eina_str_printf_dup(const char *format, ...);
+
 #include "eina_inline_str.x"
 
 /**

-- 




Re: [E-devel] EFL pull request

2013-09-23 Thread Cedric BAIL
Hello,

On Tue, Sep 24, 2013 at 8:28 AM, Jorge Luis Zapata Muga
 wrote:
> I applied the patches from the legacy tree
> Hope this one is good enough

Yup, I just pushed them in with a few modification. We seems to be
putting _length and dup at the end of a function name, so renamed the
printf variant accordingly. In your eina rectangle change the variable
name "remainder" was already defined on my system, I did rename it to
leftover to have a still meaningful name and no clash.

There seems to be two function eina_rectangle_max_x and
eina_rectangle_max_y that are not defined in eina_rectangle.h. Is it
voluntary ? Also, I am thinking we should maybe rename them and have
the _max as a suffix. Any opinion on that ?

Thanks for your submission, but you know that you still have a
developer access to efl git ! There is no problem if you push things
directly next time or create a branch directly on git.e.org.

Cedric

> The following changes since commit 4850c4660f226f1d58f3e877d0b8ddbd6a6c77d4:
>
>   Evas textblock: Fixed broken test. (2013-09-23 14:37:19 +0100)
>
> are available in the git repository at:
>
>   https://github.com/turran/efl eina-extra
>
> for you to fetch changes up to 67dc4a42d54e6533b6e72279ff54fd7a0f2091f7:
>
>   Add a substraction in rectangles and more helpers (2013-09-24 01:10:41
> +0200)
>
> 
> Jorge Zapata (3):
>   Add double_from/to and helper defines in f16p16
>   Add functions to alloc strings from a printf fmt
>   Add a substraction in rectangles and more helpers
>
>  src/lib/eina/eina_fp.h   |6 ++
>  src/lib/eina/eina_inline_fp.x|   17 +
>  src/lib/eina/eina_inline_rectangle.x |  138
> ++
>  src/lib/eina/eina_rectangle.h|   10 ++
>  src/lib/eina/eina_str.c  |   41
> +
>  src/lib/eina/eina_str.h  |   33
> +
>  6 files changed, 245 insertions(+)
> --
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>



-- 
Cedric BAIL

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 04/04: eina: add functions to alloc strings from a printf fmt

2013-09-23 Thread Jose Souza
s/@since 1.7.9/@since 1.8


On Tue, Sep 24, 2013 at 12:20 AM, Jorge Zapata
wrote:

> cedric pushed a commit to branch master.
>
>
> http://git.enlightenment.org/core/efl.git/commit/?id=b5fce696c743c50ea0a049c4f879756b5ed231d4
>
> commit b5fce696c743c50ea0a049c4f879756b5ed231d4
> Author: Jorge Zapata 
> Date:   Mon Sep 23 21:13:18 2013 +0200
>
> eina: add functions to alloc strings from a printf fmt
> ---
>  src/lib/eina/eina_str.c | 41 +
>  src/lib/eina/eina_str.h | 33 +
>  2 files changed, 74 insertions(+)
>
> diff --git a/src/lib/eina/eina_str.c b/src/lib/eina/eina_str.c
> index 11fef3c..283476b 100644
> --- a/src/lib/eina/eina_str.c
> +++ b/src/lib/eina/eina_str.c
> @@ -652,3 +652,44 @@ eina_str_toupper(char **str)
> for (p = *str; (*p); p++)
>*p = toupper((unsigned char)(*p));
>  }
> +
> +EAPI size_t
> +eina_str_vprintf_length(const char *format, va_list args)
> +{
> +char c;
> +size_t len;
> +
> +len = vsnprintf(&c, 1, format, args) + 1;
> +return len;
> +}
> +
> +EAPI char *
> +eina_str_vprintf_dup(const char *format, va_list args)
> +{
> +size_t length;
> +char *ret;
> +va_list copy;
> +
> +/* be sure to use a copy or the printf implementation will
> + * step into the args
> + */
> +va_copy(copy, args);
> +length = eina_str_vprintf_length(format, copy);
> +va_end(copy);
> +
> +ret = calloc(length, sizeof(char));
> +vsprintf(ret, format, args);
> +return ret;
> +}
> +
> +EAPI char *
> +eina_str_printf_dup(const char *format, ...)
> +{
> +char *ret;
> +va_list args;
> +
> +va_start(args, format);
> +ret = eina_str_vprintf_dup(format, args);
> +va_end(args);
> +return ret;
> +}
> diff --git a/src/lib/eina/eina_str.h b/src/lib/eina/eina_str.h
> index dae592b..1d8edae 100644
> --- a/src/lib/eina/eina_str.h
> +++ b/src/lib/eina/eina_str.h
> @@ -345,6 +345,39 @@ static inline size_t eina_str_join(char *dst, size_t
> size, char sep, const char
>
>  static inline size_t eina_strlen_bounded(const char *str, size_t maxlen)
> EINA_PURE EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
>
> +/**
> + * @brief Gets the length needed for a string based on a printf format
> and args
> + *
> + * @param format The printf format
> + * @param args The printf args
> + * @return The length needed for such format and args
> + * @since 1.7.9
> + */
> +EAPI size_t eina_str_vprintf_length(const char *format, va_list args);
> +
> +/**
> + * @brief Gets a newly allocated string that represents the printf format
> and args
> + *
> + * @param format The printf format
> + * @param args The printf args
> + * @return A newly allocated string
> + *
> + * @see eina_str_dup_printf
> + * @since 1.7.9
> + */
> +EAPI char * eina_str_vprintf_dup(const char *format, va_list args);
> +
> +/**
> + * @brief Gets a newly allocated string that represents the printf format
> and args
> + *
> + * @param format The printf format
> + * @return A newly allocated string
> + *
> + * @see eina_str_dup_vprintf
> + * @since 1.7.9
> + */
> +EAPI char * eina_str_printf_dup(const char *format, ...);
> +
>  #include "eina_inline_str.x"
>
>  /**
>
> --
>
>
>
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 04/04: eina: add functions to alloc strings from a printf fmt

2013-09-23 Thread Lucas De Marchi
On Tue, Sep 24, 2013 at 12:20 AM, Jorge Zapata
 wrote:
> cedric pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=b5fce696c743c50ea0a049c4f879756b5ed231d4
>
> commit b5fce696c743c50ea0a049c4f879756b5ed231d4
> Author: Jorge Zapata 
> Date:   Mon Sep 23 21:13:18 2013 +0200
>
> eina: add functions to alloc strings from a printf fmt
> ---
>  src/lib/eina/eina_str.c | 41 +
>  src/lib/eina/eina_str.h | 33 +
>  2 files changed, 74 insertions(+)
>
> diff --git a/src/lib/eina/eina_str.c b/src/lib/eina/eina_str.c
> index 11fef3c..283476b 100644
> --- a/src/lib/eina/eina_str.c
> +++ b/src/lib/eina/eina_str.c
> @@ -652,3 +652,44 @@ eina_str_toupper(char **str)
> for (p = *str; (*p); p++)
>*p = toupper((unsigned char)(*p));
>  }
> +
> +EAPI size_t
> +eina_str_vprintf_length(const char *format, va_list args)
> +{
> +char c;
> +size_t len;
> +
> +len = vsnprintf(&c, 1, format, args) + 1;
> +return len;

this is wrong if

1) vsnprintf returns an error  (for example if there's a wrong format string)
2) format is "" - return value value should be 0, but will be 1

If you change the return value to ssize_t it's better and simpler if you do:

"return vsnprintf(NULL, 0, format, args);"

If you prefer to ignore the error and continue with an unsigned type,
then you should check the return value for < 0 before returning.



> +}
> +
> +EAPI char *
> +eina_str_vprintf_dup(const char *format, va_list args)
> +{
> +size_t length;
> +char *ret;
> +va_list copy;
> +
> +/* be sure to use a copy or the printf implementation will
> + * step into the args
> + */
> +va_copy(copy, args);
> +length = eina_str_vprintf_length(format, copy);
> +va_end(copy);
> +
> +ret = calloc(length, sizeof(char));

malloc instead? you are replacing all the chars below

> +vsprintf(ret, format, args);
> +return ret;
> +}
> +
> +EAPI char *
> +eina_str_printf_dup(const char *format, ...)
> +{
> +char *ret;
> +va_list args;
> +
> +va_start(args, format);
> +ret = eina_str_vprintf_dup(format, args);
> +va_end(args);
> +return ret;
> +}

why these instead of plain (v)asprintf?


Lucas De Marchi

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: eina: fix @since to be a proper revision number.

2013-09-23 Thread Cedric Bail
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a7fe49139d608c1858515b81895be8061772df41

commit a7fe49139d608c1858515b81895be8061772df41
Author: Cedric Bail 
Date:   Tue Sep 24 15:03:24 2013 +0900

eina: fix @since to be a proper revision number.
---
 src/lib/eina/eina_str.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/eina/eina_str.h b/src/lib/eina/eina_str.h
index 1d8edae..615cc71 100644
--- a/src/lib/eina/eina_str.h
+++ b/src/lib/eina/eina_str.h
@@ -351,7 +351,7 @@ static inline size_t eina_strlen_bounded(const char *str, 
size_t maxlen) EINA_PU
  * @param format The printf format
  * @param args The printf args
  * @return The length needed for such format and args
- * @since 1.7.9
+ * @since 1.8
  */
 EAPI size_t eina_str_vprintf_length(const char *format, va_list args);
 
@@ -363,7 +363,7 @@ EAPI size_t eina_str_vprintf_length(const char *format, 
va_list args);
  * @return A newly allocated string
  *
  * @see eina_str_dup_printf
- * @since 1.7.9
+ * @since 1.8
  */
 EAPI char * eina_str_vprintf_dup(const char *format, va_list args);
 
@@ -374,7 +374,7 @@ EAPI char * eina_str_vprintf_dup(const char *format, 
va_list args);
  * @return A newly allocated string
  *
  * @see eina_str_dup_vprintf
- * @since 1.7.9
+ * @since 1.8
  */
 EAPI char * eina_str_printf_dup(const char *format, ...);
 

-- 




[EGIT] [core/efl] master 01/01: eet: added EET_DATA_DESCRIPTOR_ADD_SUB_NESTED().

2013-09-23 Thread Christophe Sadoine
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=87b17f1ce9c68de1fc2ec7d21c46a3c90ba7441a

commit 87b17f1ce9c68de1fc2ec7d21c46a3c90ba7441a
Author: Christophe Sadoine 
Date:   Fri Sep 6 11:30:37 2013 +0900

eet: added EET_DATA_DESCRIPTOR_ADD_SUB_NESTED().
---
 ChangeLog  |  4 
 NEWS   |  1 +
 src/lib/eet/Eet.h  | 29 -
 src/lib/eet/eet_data.c | 32 
 4 files changed, 57 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9a6823b..a6de7dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-09-06  Christophe Sadoine
+
+   * Eet: Added EET_DATA_DESCRIPTOR_ADD_SUB_NESTED().
+
 2013-09-24  Jorge Zapata
 
* Eina: add a substraction in rectangles and more helpers,
diff --git a/NEWS b/NEWS
index 3f9ab5e..1ac141c 100644
--- a/NEWS
+++ b/NEWS
@@ -45,6 +45,7 @@ Additions:
  - Add eet_mmap()
  - Add eet_data_descriptor_name_get()
  - Add support EET_T_VALUE
+ - Add EET_DATA_DESCRIPTOR_ADD_SUB_NESTED()
 * Eo:
  - Add generic efl object infrastructure
  - Add debugging facility
diff --git a/src/lib/eet/Eet.h b/src/lib/eet/Eet.h
index 935afea..3aeb520 100644
--- a/src/lib/eet/Eet.h
+++ b/src/lib/eet/Eet.h
@@ -2391,7 +2391,8 @@ eet_identity_certificate_print(const unsigned char 
*certificate,
 #define EET_G_HASH   104 /**< Hash table group type */
 #define EET_G_UNION  105 /**< Union group type */
 #define EET_G_VARIANT106 /**< Selectable subtype group */
-#define EET_G_LAST   107 /**< Last group type */
+#define EET_G_UNKNOWN_NESTED 107 /**< Unknown nested group type. @since 1.8 */
+#define EET_G_LAST   108 /**< Last group type */
 
 #define EET_I_LIMIT  128 /**< Other type exist but are reserved for 
internal purpose. */
 
@@ -3098,6 +3099,32 @@ eet_data_descriptor_encode(Eet_Data_Descriptor *edd,
 } while (0)
 
 /**
+ * Add a nested sub-element type to a data descriptor
+ * @param edd The data descriptor to add the type to.
+ * @param struct_type The type of the struct.
+ * @param name The string name to use to encode/decode this member
+ *(must be a constant global and never change).
+ * @param member The struct member itself to be encoded.
+ * @param subtype The type of sub-type struct to add.
+ *
+ * This macro lets you easily add a sub-type: a struct that is nested into
+ * this one. If your data is pointed by this element instead of being nested,
+ * you should use EET_DATA_DESCRIPTOR_ADD_SUB().
+ * All the parameters are the same as for EET_DATA_DESCRIPTOR_ADD_SUB().
+ *
+ * @since 1.8.0
+ * @ingroup Eet_Data_Group
+ */
+#define EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(edd, struct_type, name, member, 
subtype)   \
+  do { 
\
+   struct_type ___ett; 
\
+   eet_data_descriptor_element_add(edd, name, EET_T_UNKNOW, 
EET_G_UNKNOWN_NESTED, \
+   (char *)(& (___ett.member)) -   
\
+   (char *)(& (___ett)),   
\
+   0, /* 0,  */ NULL, subtype);
\
+} while (0)
+
+/**
  * Add a linked list type to a data descriptor
  * @param edd The data descriptor to add the type to.
  * @param struct_type The type of the struct.
diff --git a/src/lib/eet/eet_data.c b/src/lib/eet/eet_data.c
index 0a492ac..23d5504 100644
--- a/src/lib/eet/eet_data.c
+++ b/src/lib/eet/eet_data.c
@@ -548,7 +548,8 @@ static const Eet_Data_Group_Type_Codec eet_group_codec[] =
{ eet_data_get_list, eet_data_put_list },
{ eet_data_get_hash, eet_data_put_hash },
{ eet_data_get_union, eet_data_put_union },
-   { eet_data_get_variant, eet_data_put_variant }
+   { eet_data_get_variant, eet_data_put_variant },
+   { eet_data_get_unknown, eet_data_put_unknown }
 };
 
 static int _eet_data_words_bigendian = -1;
@@ -4570,8 +4571,16 @@ eet_data_get_unknown(Eet_Free_Context *context,
 
  if (edd)
{
-  ptr = (void **)(((char *)data));
-  *ptr = (void *)data_ret;
+  if (subtype && ede->group_type == EET_G_UNKNOWN_NESTED)
+{
+   memcpy(data, data_ret, subtype->size);
+   free(data_ret);
+}
+  else 
+{
+   ptr = (void **)(((char *)data));
+   *ptr = (void *)data_ret;
+}
}
  else
{
@@ -4680,11 +4689,18 @@ eet_data_put_unknown(Eet_Dictionary  *ed,
if (IS_SIMPLE_TYPE(ede->type))
  data = eet_data_put_type(ed, ede->type, data_in, &size);
else if (ede->subtype)
- if (*((char **)data_in))
-   data = _eet_data_descript

Re: [E-devel] eet serialization questions

2013-09-23 Thread Cedric BAIL
Hello,

On Fri, Sep 6, 2013 at 12:01 PM, Christophe Sadoine  wrote:
> On 4 September 2013 15:25, Cedric BAIL  wrote:
>> On Wed, Sep 4, 2013 at 5:24 AM, Christophe Sadoine  
>> wrote:
>>> On 3 September 2013 15:26, Cedric BAIL  wrote:
 On Tue, Sep 3, 2013 at 7:04 AM, Christophe Sadoine  
 wrote:
> I have some questions concerning eet :)
>
> 1) I have a struct like this:
>
> struct Vec3{
> double x;
> double y;
> double ;
> }
>
> struct Object {
> Vec3 position;
> Vec3 rotation;
> }
>
> I want to serialize Object.
>
> I have an eet descriptor for Vec3 that I want to use but
> EET_DATA_DESCRIPTOR_ADD_SUB takes a pointer, right?
> I want to avoid using EET_DATA_DESCRIPTOR_ADD_BASIC with position.x,
> position.y, position.z and use the eet descriptor for vec3.
> Is it possible to handle this use case?

 Nop, use macro. I agree it would be nice to have such a feature.
>>>
>>> Then is it ok to introduce something like:
>>> EET_DATA_DESCRIPTOR_ADD_SUB_NESTED and EET_G_UNKNOWN_NESTED?
>>
>> Could be indeed ! A patch would be welcome :-)
>
> Here it is.
> This patch is only for this feature.
> There is also an example.
> I don't know eet so I may have missed something.

I think the dump/undump is not handled here, but the rest is pretty
straight forward.

> I added EET_G_UNKNOWN_NESTED.
> I considered just adding a bool in Eet_Data_Element to say nested or
> pointed... but then I would have to change/make a new
> eet_data_descriptor_element_add function...

Yup, that prototype has turned quite hackish overtime... that's life.
One day we will do a new API there, but for the time being that's the
way of doing it. So I have pushed your patch, it would be nice to
integrate your example into the examples tree of efl and also had
tests (with dump/undump) if you have time.

Thanks,
-- 
Cedric BAIL

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 04/04: eina: add functions to alloc strings from a printf fmt

2013-09-23 Thread Cedric BAIL
On Tue, Sep 24, 2013 at 2:14 PM, Lucas De Marchi
 wrote:
> On Tue, Sep 24, 2013 at 12:20 AM, Jorge Zapata
>  wrote:
>> cedric pushed a commit to branch master.
>>
>> http://git.enlightenment.org/core/efl.git/commit/?id=b5fce696c743c50ea0a049c4f879756b5ed231d4
>>
>> commit b5fce696c743c50ea0a049c4f879756b5ed231d4
>> Author: Jorge Zapata 
>> Date:   Mon Sep 23 21:13:18 2013 +0200
>>
>> eina: add functions to alloc strings from a printf fmt
>> ---
>>  src/lib/eina/eina_str.c | 41 +
>>  src/lib/eina/eina_str.h | 33 +
>>  2 files changed, 74 insertions(+)
>>
>> diff --git a/src/lib/eina/eina_str.c b/src/lib/eina/eina_str.c
>> index 11fef3c..283476b 100644
>> --- a/src/lib/eina/eina_str.c
>> +++ b/src/lib/eina/eina_str.c
>> @@ -652,3 +652,44 @@ eina_str_toupper(char **str)
>> for (p = *str; (*p); p++)
>>*p = toupper((unsigned char)(*p));
>>  }
>> +
>> +EAPI size_t
>> +eina_str_vprintf_length(const char *format, va_list args)
>> +{
>> +char c;
>> +size_t len;
>> +
>> +len = vsnprintf(&c, 1, format, args) + 1;
>> +return len;
>
> this is wrong if
>
> 1) vsnprintf returns an error  (for example if there's a wrong format string)
> 2) format is "" - return value value should be 0, but will be 1
>
> If you change the return value to ssize_t it's better and simpler if you do:
>
> "return vsnprintf(NULL, 0, format, args);"
>
> If you prefer to ignore the error and continue with an unsigned type,
> then you should check the return value for < 0 before returning.
>
>> +}
>> +
>> +EAPI char *
>> +eina_str_vprintf_dup(const char *format, va_list args)
>> +{
>> +size_t length;
>> +char *ret;
>> +va_list copy;
>> +
>> +/* be sure to use a copy or the printf implementation will
>> + * step into the args
>> + */
>> +va_copy(copy, args);
>> +length = eina_str_vprintf_length(format, copy);
>> +va_end(copy);
>> +
>> +ret = calloc(length, sizeof(char));
>
> malloc instead? you are replacing all the chars below
>
>> +vsprintf(ret, format, args);
>> +return ret;
>> +}
>> +
>> +EAPI char *
>> +eina_str_printf_dup(const char *format, ...)
>> +{
>> +char *ret;
>> +va_list args;
>> +
>> +va_start(args, format);
>> +ret = eina_str_vprintf_dup(format, args);
>> +va_end(args);
>> +return ret;
>> +}
>
> why these instead of plain (v)asprintf?

"These functions are GNU extensions, not in C or POSIX.", straight
from the man page...
-- 
Cedric BAIL

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel