Re: [E-devel] [Edje] fit the size of an object to his text

2008-09-09 Thread Atton Jonathan
wouha it works ! ty :)

2008/9/8 Gustavo Sverzut Barbieri [EMAIL PROTECTED]

 On Mon, Sep 8, 2008 at 3:39 PM, Atton Jonathan [EMAIL PROTECTED]
 wrote:
  hello,
 
  Currently with edje we can fit the text in his evas_object but we can't
 fit
  the object size to the text - we can't display a border around a text,
 we
  can only display a border around his area. An other example: display a
 text
  below a dynamic text, we don't know how many lines the top text will need
 so
  we can't place the second text :/
 
  Why not give the possibility to resize the object after the text is
 render ?
 
  keep the edc size during the render of a text and then resize the object
  around the text and use this new size to calculate the position of others
  relatives part.

 have you tried:

 description {
   text {
  min: 1 1;  ///
   }
 }

 --
 Gustavo Sverzut Barbieri
 http://profusion.mobi embedded systems
 --
 MSN: [EMAIL PROTECTED]
 Skype: gsbarbieri
 Mobile: +55 (19) 9225-2202




-- 
Regards.
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Fwd: [Edje] rel2 relative to 2 parts

2008-09-09 Thread Atton Jonathan
-- Forwarded message --
From: Atton Jonathan [EMAIL PROTECTED]
Date: 2008/9/9
Subject: [Edje] rel2 relative to 2 parts
To: [EMAIL PROTECTED]


hey,

I need to do something like:

part1{}
part2{}

part3
{
rel1
{
 relative 0.0 0.0;
 to: part1;
}
rel2
{
 relative: rel1 + 0.5*part2 .. ;
  or: relative: 0.0 to part1 + 0.5 to part2;
}
}

the position part3 is relative to part1 and the size (size != rel2) is
relative to part2.

Is there a way to do this ?

-- 
Regards.



-- 
Regards.
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Fwd: [Edje] rel2 relative to 2 parts

2008-09-09 Thread Nicolas Aguirre
2008/9/9 Atton Jonathan [EMAIL PROTECTED]

 -- Forwarded message --
 From: Atton Jonathan [EMAIL PROTECTED]
 Date: 2008/9/9
 Subject: [Edje] rel2 relative to 2 parts
 To: [EMAIL PROTECTED]


 hey,

 I need to do something like:

 part1{}
 part2{}

 part3
 {
rel1
{
 relative 0.0 0.0;
 to: part1;
}
rel2
{
 relative: rel1 + 0.5*part2 .. ;
  or: relative: 0.0 to part1 + 0.5 to part2;
}
 }

 the position part3 is relative to part1 and the size (size != rel2) is
 relative to part2.

 Is there a way to do this ?


You can maybe look at to_x and to_y properties


-- 
Nicolas Aguirre
Mail: [EMAIL PROTECTED]
Web: http://www.digital-corner.org
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E SVN: toma trunk/THEMES/b_and_w

2008-09-09 Thread Dave Andreoli

- [EMAIL PROTECTED] ha scritto:

 Author:   toma
 Date: 2008-09-09 07:12:31 -0700 (Tue, 09 Sep 2008)
 New Revision: 35894
 
 Modified:
   trunk/THEMES/b_and_w/theme.edc 
 Log:
 
 ibar and ibox sort of in. requires gadman stuff to complete. also
 going in, is a repeat_events to make the pager drag work.


Hi toma!
I suggest you to wait a week for the gadman stuff, as i will probably change it 
slightly

Dave

 
 Modified: trunk/THEMES/b_and_w/theme.edc
 ===
 --- trunk/THEMES/b_and_w/theme.edc2008-09-09 12:37:56 UTC (rev
 35893)
 +++ trunk/THEMES/b_and_w/theme.edc2008-09-09 14:12:31 UTC (rev
 35894)
 @@ -1,22 +1,19 @@
  // TODO: Items that need some revision
  // 
  // textblock (done - review)
 -// transition (done - review) - Could possibly have some day light
 and moon light photos.
  // battery popup (done - review - see 'code' for notes)
  // fileman (list mode)
  // desklock (done - review - see 'code' for notes)
  // exebuf (done - review)
 +// ibar - ibox (Merged with alias... see FIXME for bugs. Requires
 gadman graphics to finish)
  //
  // note: make these (and menu) use a common image with a logical
 name. 
 -// sys (done - review - see 'code' for notes), Move, Resize
 +// sys (done - review - see 'code' for notes), Move, Resize, Exebuf,
 Winlist
  //
  // TODO: Working order
 -// Theme Preview widget has gone all whacky!
 +// tlist (needs code to be the same as ilist with raising)
  // fileman (icon mode etc.)
 -// tlist
  // slidesel (i know. no examples of this around).
 -// ibar
 -// ibox
  // gadman control
  // gadman popup
  // gadman frame
 @@ -37,6 +34,9 @@
  // TODO Code: - allow sys (shutdown, reboot etc.) to indicated
 borderless
  //- make battery module text translatable and set by E,
 not in the theme. 
  //- desklock login_box doesnt centre correctly. looks
 like a code problem.
 +//- Theme Preview selector. Doesnt reszie well. See
 wallpaper for correct behaviour.
 +// - ilist e.swallow.icon should use e_ilist_icon_size_set to
 make a dummy box 
 +//   to compensate when there is no icon there.
  
  /*
   * So how do themes work? 
 @@ -6732,6 +6732,7 @@
}
part { name: mouse_over;
   mouse_events: 1;
 + repeat_events: 1;
   type: RECT;
   description { state: default 0.0;
  color: 0 0 0 0;
 @@ -8417,15 +8418,1037 @@
 }
  
 
 /
 -   /*** MOD: IBAR ***/
 -// NOTE: can be same as current default
 -// FIXME: DO
 +   /*** MOD: IBOX / IBAR ***/
  
 -/
 -   /*** MOD: IBOX ***/
 -// NOTE: can be same as current default
 -// FIXME: DO
 +   group { name: e/modules/ibox/icon;
 +  alias: e/modules/ibar/icon;
 +  data {
 +  // FIXME: Explain these a little better
 +  item: raise_on_hilight 0; // 1 or 0 if u want an icon holder to
 raise when the mouse (or keyboard) hilights it
 +  //  item: item_list item item2 item3;
 +  }
 +  parts {
 +  part { name: item_clip;
 + type: RECT;
 + mouse_events:  0;
 + description { state: default 0.0;
 +color: 255 255 255 255;
 + }
 +  }
 +  part { name: e.swallow.content;
 + type: SWALLOW;
 + clip_to: item_clip;
 + description { state: default 0.0;
 +rel1.offset:   2   2;
 +rel2.offset:   -3   -3;
 + }
 + description { state: bigger 0.0; }
 +  }
 +  part { name: over;
 + type: RECT;
 + repeat_events: 0;
 + description { state: default 0.0;
 +color: 0 0 0 0;
 + }
 +  }
 +  }
 +  programs {
 +  program { name: hover_in;
 + signal:  mouse,in;
 + source:  over;
 + action:  STATE_SET bigger 0.0;
 + transition: LINEAR 0.1;
 + target:  e.swallow.content;
 +  }
 +  program { name: hover_out;
 + signal:  mouse,out;
 + source:  over;
 + action:  STATE_SET default 0.0;
 + transition: LINEAR 0.2;
 + target:  e.swallow.content;
 +  }
 +  }
 +   }
  
 +// FIXME: Urgent doesnt seem to work. Doesnt work in bling either.
 (Only tested with xchat)
 +// FIXME: Use urgent effect from Pager.
 +
 +   group { name: e/modules/ibox/icon_overlay;
 +  alias: e/modules/ibar/icon_overlay;
 +  data {
 +  //  item: item_list, item item2 item3;
 +  }
 +  script {
 +  public urgent;
 +  }
 +  parts {
 +  part { name: base;
 + type: RECT;
 + mouse_events:  0;
 + description { state: default 0.0;
 +color: 255 255 255 0;
 + }
 +  }
 +  part { name: background;
 + type: RECT;
 + mouse_events:  0;
 + description { 

Re: [E-devel] E SVN: toma trunk/THEMES/b_and_w

2008-09-09 Thread Toma
2008/9/9 Dave Andreoli [EMAIL PROTECTED]:

 - [EMAIL PROTECTED] ha scritto:

 Author:   toma
 Date: 2008-09-09 07:12:31 -0700 (Tue, 09 Sep 2008)
 New Revision: 35894

 Modified:
   trunk/THEMES/b_and_w/theme.edc
 Log:

 ibar and ibox sort of in. requires gadman stuff to complete. also
 going in, is a repeat_events to make the pager drag work.


 Hi toma!
 I suggest you to wait a week for the gadman stuff, as i will probably change 
 it slightly

 Dave


With pleasure! No rush at all. */me wanders off to the beach*
Toma


 Modified: trunk/THEMES/b_and_w/theme.edc
 ===
 --- trunk/THEMES/b_and_w/theme.edc2008-09-09 12:37:56 UTC (rev
 35893)
 +++ trunk/THEMES/b_and_w/theme.edc2008-09-09 14:12:31 UTC (rev
 35894)
 @@ -1,22 +1,19 @@
  // TODO: Items that need some revision
  //
  // textblock (done - review)
 -// transition (done - review) - Could possibly have some day light
 and moon light photos.
  // battery popup (done - review - see 'code' for notes)
  // fileman (list mode)
  // desklock (done - review - see 'code' for notes)
  // exebuf (done - review)
 +// ibar - ibox (Merged with alias... see FIXME for bugs. Requires
 gadman graphics to finish)
  //

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [E-Trac] #22: problem with emotion_object_position_set

2008-09-09 Thread Rafael Antognolli
On Tue, Sep 9, 2008 at 5:55 AM, E-Trac [EMAIL PROTECTED] wrote:
 #22: problem with emotion_object_position_set
 +---
  Reporter:  antognolli  |Owner:  vtorri
 Type:  Bug |   Status:  closed
  Priority:  Critical|Milestone:  Emotion 1.0
 Component:  emotion |   Resolution:  Fixed
  Keywords:  | Blocking:
 Blockedby:  |
 +---
 Changes (by vtorri):

  * status:  new = closed
  * resolution:  = Fixed


 Comment:

  i've fixed your test case (based on my comments above) and put a fix in
  emotion based on your remark. It works for me.

  If it does not work for you, reopen the bug.

Ok, it's working now, thank you!

Just for information, same problem occurs with the xine plugin, but
only on the first time I do emotion_object_position_set(o, 0.0).

[]'s

-- 
Rafael Antognolli
ProFUSION embedded systems
http://profusion.mobi

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Bug in edje programs using mouse events and scripts

2008-09-09 Thread thomasg
Hi list,

I just wrote some program parts in edje which contain scripts and react to
mouse events.
Then I experienced some problems when using this combination with mouse
events that are _not_ mouse,down,*.
Every time a program is executed that contains a script and reacts on
mouse,in; mouse,out and mouse,up,* the whole edje gui hangs (the programm
itself is still running fine).

What works:
program {
name: test;
signal: mouse,down,*;
source: test_part;
script { }
}
What doesn't:
program {
name: test;
signal: mouse,up,*;
source: test_part;
script { }
}
The script {} part can contain functions or not, doesn't matter.
Can anyone confirm this?
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Bug in edje programs using mouse events and scripts

2008-09-09 Thread Gustavo Sverzut Barbieri
On Tue, Sep 9, 2008 at 6:19 PM, thomasg [EMAIL PROTECTED] wrote:
 Hi list,

 I just wrote some program parts in edje which contain scripts and react to
 mouse events.
 Then I experienced some problems when using this combination with mouse
 events that are _not_ mouse,down,*.
 Every time a program is executed that contains a script and reacts on
 mouse,in; mouse,out and mouse,up,* the whole edje gui hangs (the programm
 itself is still running fine).

 What works:
program {
name: test;
signal: mouse,down,*;
source: test_part;
script { }
}
 What doesn't:
program {
name: test;
signal: mouse,up,*;
source: test_part;
script { }
}
 The script {} part can contain functions or not, doesn't matter.
 Can anyone confirm this?

We just figured out that drag based events also hang it. I suspect
it's due my last patch to Edje to postpone recalc, so I'm looking at
this. Thanks for your test case, it will help as well.

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Evas DirectFB engine

2008-09-09 Thread Gustavo Sverzut Barbieri
Hi guys,

ProFUSION just finished the DirectFB (http://directfb.org/) engine to
a point where it's usable. Thanks to Denis Oliver Kropp for review and
patches.

Please do your testing and report problems. You might be interested to
uncomment some defines in evas_engine.c or use CFLAGS=-DXXX,
replacing XXX with the names:

//#define DFB_USE_EVAS_IMAGE_DRAW 1
//#define DFB_USE_EVAS_RECT_DRAW 1
//#define DFB_USE_EVAS_POLYGON_DRAW 1

These will use Evas software engine to draw the primitives.
Surprisingly (?) enough, Evas is faster, or should I say much faster,
in some cases, it depends on your hardware setup. For instance, if you
have no gpu hardware acceleration support but you have a multi-core
cpu, Evas will use multiple render threads, being much faster. This is
also the case for MMX/SSE enabled machines, Evas software blits are
faster.

//#define DFB_UPDATE_INDIVIDUAL_RECTS 1

This will force DirectFB to issue one Flip() per dirty
rectangle/region. The default behavior is to calculate the bounding
box and issue just one Flip() call.

Regards,

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Bug in edje programs using mouse events and scripts

2008-09-09 Thread Gustavo Sverzut Barbieri
On Tue, Sep 9, 2008 at 6:24 PM, Gustavo Sverzut Barbieri
[EMAIL PROTECTED] wrote:
 On Tue, Sep 9, 2008 at 6:19 PM, thomasg [EMAIL PROTECTED] wrote:
 Hi list,

 I just wrote some program parts in edje which contain scripts and react to
 mouse events.
 Then I experienced some problems when using this combination with mouse
 events that are _not_ mouse,down,*.
 Every time a program is executed that contains a script and reacts on
 mouse,in; mouse,out and mouse,up,* the whole edje gui hangs (the programm
 itself is still running fine).

 What works:
program {
name: test;
signal: mouse,down,*;
source: test_part;
script { }
}
 What doesn't:
program {
name: test;
signal: mouse,up,*;
source: test_part;
script { }
}
 The script {} part can contain functions or not, doesn't matter.
 Can anyone confirm this?

 We just figured out that drag based events also hang it. I suspect
 it's due my last patch to Edje to postpone recalc, so I'm looking at
 this. Thanks for your test case, it will help as well.

Thomas,

Attached are the files with a test case similar to what you said. It
is fine here, no bugs. Could you modify those so they produce your
bug?

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202
#include Evas.h
#include Ecore.h
#include Ecore_Evas.h
#include Edje.h
#include string.h
#include stdio.h
#include stdlib.h

static const int W = 320;
static const int H = 240;


void
dbg(void *d, Evas_Object *o, const char *emission, const char *source)
{
printf(dbg: [%s] [%s]\n, emission, source);
}

int
main(int argc, char *argv[])
{
Ecore_Evas *ee;
Evas *e;
Evas_Object *o;

evas_init();
ecore_init();
ecore_evas_init();
edje_init();

ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, W, H);

e = ecore_evas_get(ee);

o = evas_object_rectangle_add(e);
evas_object_resize(o, W, H);
evas_object_color_set(o, 255, 255, 255, 255);
evas_object_show(o);

o = edje_object_add(e);
edje_object_file_set(o, t-edje.edj, main);
evas_object_resize(o, W, H);
evas_object_show(o);

edje_object_signal_callback_add(o, *, *, dbg, NULL);

ecore_evas_show(ee);
ecore_main_loop_begin();

edje_shutdown();
ecore_evas_shutdown();
ecore_shutdown();
evas_shutdown();

return 0;
}
collections {
   group {
  name: main;

  parts {
 part {
name: p;
type: RECT;
description {
   state: default 0.0;
   color: 255 0 0 255;
   rel1 {
  relative: 0.0 0.0;
  offset: 10 10;
   }
   rel2 {
  relative: 1.0 1.0;
  offset: -11 -11;
   }
}
 }

 programs {
program {
   name: test;
   signal: mouse,up,*;
   source: p;
   script {
   }
}
 }

  }
   }
}
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E SVN: barbieri trunk/edje/src/lib

2008-09-09 Thread Gustavo Sverzut Barbieri
On Tue, Sep 9, 2008 at 8:41 PM,  [EMAIL PROTECTED] wrote:
 Author:   barbieri
 Date: 2008-09-09 16:41:42 -0700 (Tue, 09 Sep 2008)
 New Revision: 35908

 Modified:
  trunk/edje/src/lib/edje_calc.c trunk/edje/src/lib/edje_private.h 
 trunk/edje/src/lib/edje_smart.c trunk/edje/src/lib/edje_util.c
 Log:

 Revert edje calculate optimizations.

 Edje is tricky, it's event processing is too weird and Cedric's
 changes to make it work are not working as expected. Edje freezes
 itself while processing signals, but in mouse down cb it forces
 recalculate, which seems was previously ignored, but now they are not.

 We should look at how to fix this and then re-apply this patch.

Attached is a patch to attempt to fix the issues. It will not look for
postponed flag before recalculate (postpone does not force it anymore)
and for input event callbacks it will force recalculation with
_edje_recalc_do().

I grep'ed for other _edje_recalc() code, there are some suspicious
cases in edje_program(), it would be great if people with
embryo-intensive applications could apply this patch and report if
there are problems.

If nobody replies in 1 week I'll commit this patch.

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202
Index: src/lib/edje_util.c
===
--- src/lib/edje_util.c (revision 35908)
+++ src/lib/edje_util.c (working copy)
@@ -735,6 +735,10 @@ edje_object_part_object_get(const Evas_Object *obj
 
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return NULL;
+
+   /* Need to recalc before providing the object. */
+   _edje_recalc_do(ed);
+
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp) return NULL;
return rp-object;
@@ -768,6 +772,10 @@ edje_object_part_geometry_get(const Evas_Object *o
if (h) *h = 0;
return;
  }
+
+   /* Need to recalc before providing the object. */
+   _edje_recalc_do(ed);
+
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp)
  {
@@ -848,6 +856,10 @@ edje_object_part_text_get(const Evas_Object *obj,
 
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return NULL;
+
+   /* Need to recalc before providing the object. */
+   _edje_recalc_do(ed);
+
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp) return NULL;
if (rp-part-type == EDJE_PART_TYPE_TEXT)
@@ -875,6 +887,10 @@ edje_object_part_swallow(Evas_Object *obj, const c
 
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return;
+
+   /* Need to recalc before providing the object. */
+   _edje_recalc_do(ed);
+
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp) return;
if (rp-part-type != EDJE_PART_TYPE_SWALLOW) return;
@@ -1041,7 +1057,7 @@ edje_object_part_unswallow(Evas_Object *obj, Evas_
rp-swallow_params.max.w = 0;
rp-swallow_params.max.h = 0;
rp-edje-dirty = 1;
-   _edje_recalc(rp-edje);
+   _edje_recalc_do(rp-edje);
return;
  }
 }
@@ -1059,6 +1075,10 @@ edje_object_part_swallow_get(const Evas_Object *ob
 
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return NULL;
+
+   /* Need to recalc before providing the object. */
+   _edje_recalc_do(ed);
+
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp) return NULL;
return rp-swallowed_object;
@@ -1108,6 +1128,10 @@ edje_object_size_max_get(const Evas_Object *obj, E
if (maxh) *maxh = 0;
return;
  }
+
+   /* Need to recalc before providing the object. */
+   _edje_recalc_do(ed);
+
if (ed-collection-prop.max.w == 0)
  {
/* XXX TODO: convert maxw to 0, fix things that break. */
@@ -1145,7 +1169,7 @@ edje_object_calc_force(Evas_Object *obj)
ed-dirty = 1;
pf = ed-freeze;
ed-freeze = 0;
-   _edje_recalc(ed);
+   _edje_recalc_do(ed);
ed-freeze = pf;
 }
 
@@ -1207,7 +1231,7 @@ edje_object_size_min_restricted_calc(Evas_Object *
 
ok = 0;
ed-dirty = 1;
-   _edje_recalc(ed);
+   _edje_recalc_do(ed);
if (reset_maxwh)
  {
 maxw = 0;
@@ -1311,6 +1335,10 @@ edje_object_part_state_get(const Evas_Object *obj,
if (val_ret) *val_ret = 0;
return ;
  }
+
+   /* Need to recalc before providing the object. */
+   _edje_recalc_do(ed);
+
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp)
  {
@@ -1355,6 +1383,10 @@ edje_object_part_drag_dir_get(const Evas_Object *o
 
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return EDJE_DRAG_DIR_NONE;
+
+   /* Need to recalc before providing the object. */
+   _edje_recalc_do(ed);
+
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp) return EDJE_DRAG_DIR_NONE;
if ((rp-part-dragable.x)  (rp-part-dragable.y)) return 
EDJE_DRAG_DIR_XY;
@@ -1419,6 +1451,10 @@ edje_object_part_drag_value_get(const Evas_Object
if (dy) *dy 

Re: [E-devel] Bug in edje programs using mouse events and scripts

2008-09-09 Thread Gustavo Sverzut Barbieri
On Tue, Sep 9, 2008 at 8:02 PM, Gustavo Sverzut Barbieri
[EMAIL PROTECTED] wrote:
 On Tue, Sep 9, 2008 at 6:24 PM, Gustavo Sverzut Barbieri
 [EMAIL PROTECTED] wrote:
 On Tue, Sep 9, 2008 at 6:19 PM, thomasg [EMAIL PROTECTED] wrote:
 Hi list,

 I just wrote some program parts in edje which contain scripts and react to
 mouse events.
 Then I experienced some problems when using this combination with mouse
 events that are _not_ mouse,down,*.
 Every time a program is executed that contains a script and reacts on
 mouse,in; mouse,out and mouse,up,* the whole edje gui hangs (the programm
 itself is still running fine).

 What works:
program {
name: test;
signal: mouse,down,*;
source: test_part;
script { }
}
 What doesn't:
program {
name: test;
signal: mouse,up,*;
source: test_part;
script { }
}
 The script {} part can contain functions or not, doesn't matter.
 Can anyone confirm this?

 We just figured out that drag based events also hang it. I suspect
 it's due my last patch to Edje to postpone recalc, so I'm looking at
 this. Thanks for your test case, it will help as well.

 Thomas,

 Attached are the files with a test case similar to what you said. It
 is fine here, no bugs. Could you modify those so they produce your
 bug?

This is, indeed, caused by my patch to postpone edje_recalc(). I
reverted it to the old behavior and provided a patch (another mail, in
reply to the revert patch), please try it out and confirm if it works.

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E SVN: barbieri trunk/edje/src/lib

2008-09-09 Thread Gustavo Sverzut Barbieri
On Tue, Sep 9, 2008 at 9:14 PM, Gustavo Sverzut Barbieri
[EMAIL PROTECTED] wrote:
 On Tue, Sep 9, 2008 at 8:41 PM,  [EMAIL PROTECTED] wrote:
 Author:   barbieri
 Date: 2008-09-09 16:41:42 -0700 (Tue, 09 Sep 2008)
 New Revision: 35908

 Modified:
  trunk/edje/src/lib/edje_calc.c trunk/edje/src/lib/edje_private.h 
 trunk/edje/src/lib/edje_smart.c trunk/edje/src/lib/edje_util.c
 Log:

 Revert edje calculate optimizations.

 Edje is tricky, it's event processing is too weird and Cedric's
 changes to make it work are not working as expected. Edje freezes
 itself while processing signals, but in mouse down cb it forces
 recalculate, which seems was previously ignored, but now they are not.

 We should look at how to fix this and then re-apply this patch.

 Attached is a patch to attempt to fix the issues. It will not look for
 postponed flag before recalculate (postpone does not force it anymore)
 and for input event callbacks it will force recalculation with
 _edje_recalc_do().

 I grep'ed for other _edje_recalc() code, there are some suspicious
 cases in edje_program(), it would be great if people with
 embryo-intensive applications could apply this patch and report if
 there are problems.

As  I suspected, edje_program.c code does need to forcelly call
_edje_recalc_do(). Attached are two patches, the preferred one that
just forces recalc after scripts (embryo) run and another that forces
it after all kind of programs run. Please try the preferred and if it
does not work try alternative. Please report which one worked or
failed.

thanks

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202
Index: src/lib/edje_program.c
===
--- src/lib/edje_program.c  (revision 35905)
+++ src/lib/edje_program.c  (working copy)
@@ -409,7 +409,7 @@ _edje_program_run_iterate(Edje_Running_Program *ru
}
   }
  }
-   _edje_recalc(ed);
+   _edje_recalc_do(ed);
runp-delete_me = 1;
if (!ed-walking_actions)
  {
@@ -447,7 +447,7 @@ _edje_program_run_iterate(Edje_Running_Program *ru
return  0;
  }
break_prog:
-   _edje_recalc(ed);
+   _edje_recalc_do(ed);
_edje_thaw(ed);
_edje_unref(ed);
_edje_unblock(ed);
@@ -486,7 +486,7 @@ _edje_program_end(Edje *ed, Edje_Running_Program *
   }
  }
  }
-   _edje_recalc(ed);
+   _edje_recalc_do(ed);
runp-delete_me = 1;
pname = runp-program-name;
if (!ed-walking_actions)
@@ -632,7 +632,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int
   if (_edje_block_break(ed)) goto break_prog;
}
   }
-_edje_recalc(ed);
+_edje_recalc_do(ed);
  }
  }
else if (pr-action == EDJE_ACTION_TYPE_ACTION_STOP)
@@ -783,7 +783,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int
_edje_embryo_test_run(ed, fname, ssig, ssrc);
_edje_emit(ed, program,stop, pr-name);
if (_edje_block_break(ed)) goto break_prog;
-   _edje_recalc(ed);
+   _edje_recalc_do(ed);
  }
else
  {
Index: src/lib/edje_util.c
===
--- src/lib/edje_util.c (revision 35908)
+++ src/lib/edje_util.c (working copy)
@@ -735,6 +735,10 @@ edje_object_part_object_get(const Evas_Object *obj
 
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return NULL;
+
+   /* Need to recalc before providing the object. */
+   _edje_recalc_do(ed);
+
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp) return NULL;
return rp-object;
@@ -768,6 +772,10 @@ edje_object_part_geometry_get(const Evas_Object *o
if (h) *h = 0;
return;
  }
+
+   /* Need to recalc before providing the object. */
+   _edje_recalc_do(ed);
+
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp)
  {
@@ -848,6 +856,10 @@ edje_object_part_text_get(const Evas_Object *obj,
 
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return NULL;
+
+   /* Need to recalc before providing the object. */
+   _edje_recalc_do(ed);
+
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp) return NULL;
if (rp-part-type == EDJE_PART_TYPE_TEXT)
@@ -875,6 +887,10 @@ edje_object_part_swallow(Evas_Object *obj, const c
 
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return;
+
+   /* Need to recalc before providing the object. */
+   _edje_recalc_do(ed);
+
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp) return;
if (rp-part-type != EDJE_PART_TYPE_SWALLOW) return;
@@ -1041,7 +1057,7 @@ edje_object_part_unswallow(Evas_Object *obj, Evas_
rp-swallow_params.max.w = 0;
rp-swallow_params.max.h = 0;
rp-edje-dirty = 1;
-   _edje_recalc(rp-edje);
+   

Re: [E-devel] E SVN: barbieri trunk/edje/src/lib

2008-09-09 Thread thomasg
Preferred patch looks good, fixes my problems.

On Wed, Sep 10, 2008 at 2:34 AM, Gustavo Sverzut Barbieri
[EMAIL PROTECTED] wrote:

 On Tue, Sep 9, 2008 at 9:14 PM, Gustavo Sverzut Barbieri
 [EMAIL PROTECTED] wrote:
  On Tue, Sep 9, 2008 at 8:41 PM,  [EMAIL PROTECTED] wrote:
  Author:   barbieri
  Date: 2008-09-09 16:41:42 -0700 (Tue, 09 Sep 2008)
  New Revision: 35908
 
  Modified:
   trunk/edje/src/lib/edje_calc.c trunk/edje/src/lib/edje_private.h
 trunk/edje/src/lib/edje_smart.c trunk/edje/src/lib/edje_util.c
  Log:
 
  Revert edje calculate optimizations.
 
  Edje is tricky, it's event processing is too weird and Cedric's
  changes to make it work are not working as expected. Edje freezes
  itself while processing signals, but in mouse down cb it forces
  recalculate, which seems was previously ignored, but now they are not.
 
  We should look at how to fix this and then re-apply this patch.
 
  Attached is a patch to attempt to fix the issues. It will not look for
  postponed flag before recalculate (postpone does not force it anymore)
  and for input event callbacks it will force recalculation with
  _edje_recalc_do().
 
  I grep'ed for other _edje_recalc() code, there are some suspicious
  cases in edje_program(), it would be great if people with
  embryo-intensive applications could apply this patch and report if
  there are problems.

 As  I suspected, edje_program.c code does need to forcelly call
 _edje_recalc_do(). Attached are two patches, the preferred one that
 just forces recalc after scripts (embryo) run and another that forces
 it after all kind of programs run. Please try the preferred and if it
 does not work try alternative. Please report which one worked or
 failed.

 thanks

 --
 Gustavo Sverzut Barbieri
 http://profusion.mobi embedded systems
 --
 MSN: [EMAIL PROTECTED]
 Skype: gsbarbieri
 Mobile: +55 (19) 9225-2202

 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
 Build the coolest Linux based applications with Moblin SDK  win great
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel