Re: [E-devel] E SVN: barbieri trunk/e/src/bin

2008-11-13 Thread Gustavo Sverzut Barbieri
On Thu, Nov 13, 2008 at 7:32 PM, Enlightenment SVN
<[EMAIL PROTECTED]> wrote:
> Log:
>  powersave todo: reduce timer precision.
>
> Author:   barbieri
> Date: 2008-11-13 13:32:05 -0800 (Thu, 13 Nov 2008)
> New Revision: 37613
>
> Modified:
>  trunk/e/src/bin/e_powersave.h
>
> Modified: trunk/e/src/bin/e_powersave.h
> ===
> --- trunk/e/src/bin/e_powersave.h   2008-11-13 21:09:15 UTC (rev 37612)
> +++ trunk/e/src/bin/e_powersave.h   2008-11-13 21:32:05 UTC (rev 37613)
> @@ -37,6 +37,9 @@
>  /* FIXME: in powersave mode also add the ability to reduce framerate when
>  * at a particular powersave mode */
>
> +/* FIXME: in powersave mode also reduce ecore timer precision, so timers
> + * will be dispatched together and system will wakeup less. */
> +
>  /* FIXME: in powersave mode also add the ability to change screenblanker
>  * preferences when in powersave mode as well as check in the screensaver
>  * has kicked in */

most of the listed items should be fairly easy to do, do you have any
specific requirements for them, do you want config dialogs to select
parameters? IOW: why are they todo and not done?

-- 
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=100&url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] ecore timer precision

2008-11-13 Thread Gustavo Sverzut Barbieri
On Thu, Nov 13, 2008 at 10:10 AM, Iván Briano (Sachiel)
<[EMAIL PROTECTED]> wrote:
> On Thu, Nov 13, 2008 at 9:22 AM, Gustavo Sverzut Barbieri
> <[EMAIL PROTECTED]> wrote:
>> Hi guys,
>>
>> Attached is a patch to add configurable precision for ecore timers, an
>> idea that I got at ELC-E from various power saving talks and also
>> after looking at my machine's powertop results with some effects
>> running.
>>
>> Since timers can be delayed by the system itself, for example under
>> heavy load, the idea here is to dispatch as much as possible the
>> timers at the same time. If we have timers that abs(t1 - t2) <=
>> precision, then have the timer to expire in max(t1, t2) and then
>> min(t1, t2) will be delayed up to precision amount. Maybe i was not
>> too clear, attached is also a test case.
>>
>> I still don't have any code using it, but possible I'll add to some products.
>>
>> Please comment and I'll commit it to SVN this weekend.
>>
>
> Only the test made it, it almost looks as if you've screwed up your mime 
> types.
>
>> --
>> 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=100&url=/
>> ___
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>>
>



-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202
Index: src/lib/ecore/Ecore.h
===
--- src/lib/ecore/Ecore.h	(revision 37472)
+++ src/lib/ecore/Ecore.h	(working copy)
@@ -302,6 +302,9 @@
EAPI void ecore_timer_delay(Ecore_Timer *timer, double add);
EAPI double   ecore_timer_pending_get(Ecore_Timer *timer);
 
+   EAPI double   ecore_timer_precision_get(void);
+   EAPI void ecore_timer_precision_set(double precision);
+
EAPI Ecore_Animator *ecore_animator_add(int (*func) (void *data), const void *data);
EAPI void   *ecore_animator_del(Ecore_Animator *animator);
EAPI voidecore_animator_frametime_set(double frametime);
Index: src/lib/ecore/ecore_private.h
===
--- src/lib/ecore/ecore_private.h	(revision 37472)
+++ src/lib/ecore/ecore_private.h	(working copy)
@@ -385,19 +385,19 @@
 {
Ecore_List2   __list_data;
ECORE_MAGIC;
-   signed char  delete_me : 1;
-   int(*func) (void *data);
-   void*data;
+   unsigned char delete_me : 1;
+   int   (*func) (void *data);
+   void  *data;
 };
 
 struct _Ecore_Poller
 {
Ecore_List2   __list_data;
ECORE_MAGIC;
-   int  ibit;
-   signed char  delete_me : 1;
-   int(*func) (void *data);
-   void*data;
+   int   ibit;
+   unsigned char delete_me : 1;
+   int   (*func) (void *data);
+   void  *data;
 };
 
 #endif
Index: src/lib/ecore/ecore_timer.c
===
--- src/lib/ecore/ecore_timer.c	(revision 37472)
+++ src/lib/ecore/ecore_timer.c	(working copy)
@@ -8,6 +8,7 @@
 static Ecore_Timer *timers = NULL;
 static Ecore_Timer *suspended = NULL;
 static double   last_check = 0.0;
+static double   precision = 10.0 / 100.0;
 
 /**
  * @defgroup Ecore_Time_Group Ecore Time Functions
@@ -17,6 +18,52 @@
  */
 
 /**
+ * Retrieves the current precision used by timer infrastructure.
+ *
+ * @see ecore_timer_precision_set()
+ */
+EAPI double
+ecore_timer_precision_get(void)
+{
+   return precision;
+}
+
+/**
+ * Sets the precision to be used by timer infrastructure.
+ *
+ * When system calculates time to expire the next timer we'll be able
+ * to delay the timer by the given amount so more timers will fit in
+ * the same dispatch, waking up the system less often and thus being
+ * able to save power.
+ *
+ * Be aware that kernel may delay delivery even further, these delays
+ * are always possible due other tasks having higher priorities or
+ * other scheduler policies.
+ *
+ * Example:
+ *  We have 2 timers, one that expires in a 2.0s and another that
+ *  expires in 2.1s, if precision is 0.1s, then the Ecore will request
+ *  for the next expire to happen in 2.1s and not 2.0s and another one
+ *  of 0.1 as it would before.
+ *
+ * @note Ecore is smart enough to see if there are timers in the
+ * precision range, if it does not

Re: [E-devel] RFC: enlightenment_start -locked

2008-11-13 Thread Gustavo Sverzut Barbieri
Sorry, my machine lost *.patch mime type from /etc/mime.types

On Thu, Nov 13, 2008 at 10:07 AM, Iván Briano (Sachiel)
<[EMAIL PROTECTED]> wrote:
> On Thu, Nov 13, 2008 at 8:41 AM, Gustavo Sverzut Barbieri
> <[EMAIL PROTECTED]> wrote:
>> On Wed, Nov 12, 2008 at 6:41 AM, The Rasterman Carsten Haitzler
>> <[EMAIL PROTECTED]> wrote:
>>> On Tue, 11 Nov 2008 17:28:42 -0200 "Gustavo Sverzut Barbieri"
>>> <[EMAIL PROTECTED]> babbled:
>>>
 On Tue, Nov 11, 2008 at 7:05 AM, The Rasterman Carsten Haitzler
 <[EMAIL PROTECTED]> wrote:
 > On Sat, 8 Nov 2008 06:19:46 -0200 "Gustavo Sverzut Barbieri"
 > <[EMAIL PROTECTED]> babbled:
 >
 > (sorry - travelling...)
 >
 > um - i think it's a great idea. makes sense for auto-logins like with gsm
 > (or if enrance gets one) or even more so for embedded devices - like
 > phone/pda's etc. where the thing boots straight into x and e.. and you 
 > want
 > to lock it with a pin # (desklock needs a way of adding some way to 
 > enter a
 > password/pin number other than via a keyboard - a pin #, a virtual
 > keyboard, or maybe some special shape you draw... main point is to make 
 > it
 > flexible).

 Yes, for that I guess it's easier to abstract desklock or use an
 external desklock app (already supported, but I never tried). The
 former is better as it's faster and lower on resources. A virtual
 number keyboard would do for most devices.


 > as such user-switching i think is best left to whatever launches e. leave
 > that out of e. nb - i would say that this is best done as a config option
 > in e_config
 >
 > "lock_on_start" and that should do quite nicely :) add to the desklock
 > config

 yes, it's easy doable, but I guess fixing the show wallpaper is a
 worse problem ATM.
>>>
>>> yeah. the problem is - the desktop container is created and shown and filled
>>> with a bg pixmap - before the pin window can do anything, so it's a matter 
>>> of
>>> either deferring the draw of the desktop until later, or creating, or 
>>> having an
>>> "early show" hook. that forces something to be shown before anything else.
>>
>> let's draw desklock earlier, the faster the response the better!
>>
>> attached is a new patch with config dialog.
>>
> Nope, nothing is attached.
>
>> --
>> 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=100&url=/
>> ___
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>>
>



-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202
Index: src/bin/e_config.c
===
--- src/bin/e_config.c	(revision 37472)
+++ src/bin/e_config.c	(working copy)
@@ -538,6 +538,7 @@
E_CONFIG_VAL(D, T, desklock_background, STR);
E_CONFIG_VAL(D, T, desklock_auth_method, INT);
E_CONFIG_VAL(D, T, desklock_login_box_zone, INT);
+   E_CONFIG_VAL(D, T, desklock_start_locked, INT);
E_CONFIG_VAL(D, T, desklock_autolock_screensaver, INT);
E_CONFIG_VAL(D, T, desklock_autolock_idle, INT);
E_CONFIG_VAL(D, T, desklock_autolock_idle_timeout, DOUBLE);
@@ -838,6 +839,7 @@
e_config->desklock_background = NULL;
e_config->desklock_auth_method = 0;
e_config->desklock_login_box_zone = -1;
+   e_config->desklock_start_locked = 0;
e_config->desklock_autolock_screensaver = 0;
e_config->desklock_autolock_idle = 0;
e_config->desklock_autolock_idle_timeout = 300.0;
@@ -1201,6 +1203,10 @@
IFCFG(0x0129);
e_config->default_system_menu = NULL;
IFCFGEND;
+
+   IFCFG(0x012a);
+   e_config->desklock_start_locked = 0;
+   IFCFGEND;

e_config->config_version = E_CONFIG_FILE_VERSION;   
  
Index: src/bin/e_config.h
===
--- src/bin/e_config.h	(revision 37472)
+++ src/bin/e_config.h	(working copy)
@@ -33,7 +33,7 @@
 /* increment this whenever a new set of config values are added but the users
  * config doesn't need to be wiped - simply new values need to be put in
  */
-#define E_CONFIG_FILE_GENERATION 0x0129
+#define E_CONFIG_FILE_GENERATION 0x012a
 #define E_CONFIG_FILE_VERSION((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
 
 #defi

Re: [E-devel] ecore timer precision

2008-11-13 Thread Iván Briano (Sachiel)
On Thu, Nov 13, 2008 at 9:22 AM, Gustavo Sverzut Barbieri
<[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> Attached is a patch to add configurable precision for ecore timers, an
> idea that I got at ELC-E from various power saving talks and also
> after looking at my machine's powertop results with some effects
> running.
>
> Since timers can be delayed by the system itself, for example under
> heavy load, the idea here is to dispatch as much as possible the
> timers at the same time. If we have timers that abs(t1 - t2) <=
> precision, then have the timer to expire in max(t1, t2) and then
> min(t1, t2) will be delayed up to precision amount. Maybe i was not
> too clear, attached is also a test case.
>
> I still don't have any code using it, but possible I'll add to some products.
>
> Please comment and I'll commit it to SVN this weekend.
>

Only the test made it, it almost looks as if you've screwed up your mime types.

> --
> 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=100&url=/
> ___
> 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=100&url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] RFC: enlightenment_start -locked

2008-11-13 Thread Iván Briano (Sachiel)
On Thu, Nov 13, 2008 at 8:41 AM, Gustavo Sverzut Barbieri
<[EMAIL PROTECTED]> wrote:
> On Wed, Nov 12, 2008 at 6:41 AM, The Rasterman Carsten Haitzler
> <[EMAIL PROTECTED]> wrote:
>> On Tue, 11 Nov 2008 17:28:42 -0200 "Gustavo Sverzut Barbieri"
>> <[EMAIL PROTECTED]> babbled:
>>
>>> On Tue, Nov 11, 2008 at 7:05 AM, The Rasterman Carsten Haitzler
>>> <[EMAIL PROTECTED]> wrote:
>>> > On Sat, 8 Nov 2008 06:19:46 -0200 "Gustavo Sverzut Barbieri"
>>> > <[EMAIL PROTECTED]> babbled:
>>> >
>>> > (sorry - travelling...)
>>> >
>>> > um - i think it's a great idea. makes sense for auto-logins like with gsm
>>> > (or if enrance gets one) or even more so for embedded devices - like
>>> > phone/pda's etc. where the thing boots straight into x and e.. and you 
>>> > want
>>> > to lock it with a pin # (desklock needs a way of adding some way to enter 
>>> > a
>>> > password/pin number other than via a keyboard - a pin #, a virtual
>>> > keyboard, or maybe some special shape you draw... main point is to make it
>>> > flexible).
>>>
>>> Yes, for that I guess it's easier to abstract desklock or use an
>>> external desklock app (already supported, but I never tried). The
>>> former is better as it's faster and lower on resources. A virtual
>>> number keyboard would do for most devices.
>>>
>>>
>>> > as such user-switching i think is best left to whatever launches e. leave
>>> > that out of e. nb - i would say that this is best done as a config option
>>> > in e_config
>>> >
>>> > "lock_on_start" and that should do quite nicely :) add to the desklock
>>> > config
>>>
>>> yes, it's easy doable, but I guess fixing the show wallpaper is a
>>> worse problem ATM.
>>
>> yeah. the problem is - the desktop container is created and shown and filled
>> with a bg pixmap - before the pin window can do anything, so it's a matter of
>> either deferring the draw of the desktop until later, or creating, or having 
>> an
>> "early show" hook. that forces something to be shown before anything else.
>
> let's draw desklock earlier, the faster the response the better!
>
> attached is a new patch with config dialog.
>
Nope, nothing is attached.

> --
> 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=100&url=/
> ___
> 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=100&url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] evas_smart_class_new usage

2008-11-13 Thread Gustavo Sverzut Barbieri
On Wed, Nov 12, 2008 at 4:39 PM, Tim Felgentreff
<[EMAIL PROTECTED]> wrote:
> Hi, could anybody enlighten me on how to properly use
> evas_smart_class_new?
> A week ago I send in a patch for Rage which replaced evas_smart_new
> calls. I simply created an evas_smart_class with the fields filled so
> that it just copies the call to evas_smart_new. Then I used
> evas_smart_class_new instead of evas_smart_new. The code didn't work at
> first, but then I simply made my evas_smart_class static and it worked
> fine on revision 37448.
> I updated E yesterday and my simple solution stopped working, giving me
> the same bug I encountered before I declared the evas_smart_classes in
> my patch as static. So I guess I must have misunderstood how
> evas_smart_class_new is supposed to be used. Can anybody give me some
> hints as to what I have to consider here?
> Thanks in advance

Possible it's something else, Evas_Smart_Class should be alive during
class lifetime, so you either allocate it or you make it static as you
did, so I suppose your code is correct, just make sure problem is not
elsewhere, check with valgrind.

-- 
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=100&url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] ecore timer precision

2008-11-13 Thread Gustavo Sverzut Barbieri
Hi guys,

Attached is a patch to add configurable precision for ecore timers, an
idea that I got at ELC-E from various power saving talks and also
after looking at my machine's powertop results with some effects
running.

Since timers can be delayed by the system itself, for example under
heavy load, the idea here is to dispatch as much as possible the
timers at the same time. If we have timers that abs(t1 - t2) <=
precision, then have the timer to expire in max(t1, t2) and then
min(t1, t2) will be delayed up to precision amount. Maybe i was not
too clear, attached is also a test case.

I still don't have any code using it, but possible I'll add to some products.

Please comment and I'll commit it to SVN this weekend.

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

static double t0;
static const double t1 = 0.6;
static const double t2 = 1.0;
static const double precision = 0.5;

struct test_data
{
struct {
double f1, f2;
} last;
struct {
double f1, f2;
} count;
};

static int
idle(void *data)
{
struct test_data *d = data;

printf("idle: f1: %8.2f (%2.2f %2.2f), f2: %8.2f (%2.2f %2.2f), "
   "dif=%+1.2f\n",
   d->last.f1, d->count.f1 * t1, d->last.f1 - t0,
   d->last.f2, d->count.f2 * t2, d->last.f2 - t0,
   d->last.f2 - d->last.f1);

return 1;
}

static int
f1(void *data)
{
struct test_data *d = data;
d->last.f1 = ecore_loop_time_get();
d->count.f1++;
printf("  f1: %8.2f (%2.2f)\n", d->last.f1, d->count.f1 * t1);
return 1;
}

static int
f2(void *data)
{
struct test_data *d = data;
d->last.f2 = ecore_loop_time_get();
d->count.f2++;
printf("  f2: %8.2f (%2.2f)\n", d->last.f2, d->count.f2 * t2);
return 1;
}

static int
quit(void *data)
{
ecore_main_loop_quit();
return 1;
}

int main(void)
{
struct test_data d;

ecore_init();

ecore_timer_precision_set(0.5);

t0 = ecore_loop_time_get();
d.last.f1 = ecore_loop_time_get();
d.last.f2 = ecore_loop_time_get();
d.count.f1 = 0;
d.count.f2 = 0;

ecore_timer_add(0.6, f1, &d);
ecore_timer_add(1.0, f2, &d);
ecore_idle_enterer_add(idle, &d);

ecore_timer_add(5.0, quit, NULL);

ecore_main_loop_begin();
ecore_shutdown();

return 0;
}
-
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=100&url=/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] Show more color classes in the color conf dialog

2008-11-13 Thread Viktor Kojouharov
This patch makes the color conf dialog show more color classes, than the
"default" ones. Unfortunately, it doesn't list all available classes,
since edje_color_class_list() doesn't list all color classes used by a
theme (I think it lists only the classes that are so far encountered).
Index: src/modules/conf_colors/e_int_config_color_classes.c
===
--- src/modules/conf_colors/e_int_config_color_classes.c	(revision 37556)
+++ src/modules/conf_colors/e_int_config_color_classes.c	(working copy)
@@ -1,3 +1,6 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
 #include "e.h"
 
 typedef struct _CFColor_Class CFColor_Class;
@@ -85,6 +88,8 @@
  {NULL, NULL}
 };
 
+Eina_List *color_classes;
+
 static void*_create_data  (E_Config_Dialog *cfd);
 static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
 static int  _basic_apply_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
@@ -93,6 +98,7 @@
 static Evas_Object *_adv_create_widgets   (E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
 
 static void _fill_data_hash   (E_Config_Dialog_Data *cfdata, const CFColor_Hash *cfhash);
+static void _fill_data_list   (E_Config_Dialog_Data *cfdata);
 static void _fill_data_basic  (E_Config_Dialog_Data *cfdata);
 
 static void _load_color_classes   (Evas_Object *obj, E_Config_Dialog_Data *cfdata);
@@ -149,10 +155,14 @@
e_color_update_rgb(cfdata->color1);
e_color_update_rgb(cfdata->color2);
e_color_update_rgb(cfdata->color3);
-   
+
+   color_classes = edje_color_class_list();
+
_fill_data_hash(cfdata, _wm_hash);
_fill_data_hash(cfdata, _wid_hash);
_fill_data_hash(cfdata, _mod_hash);
+
+   _fill_data_list(cfdata);
 }
 
 static void 
@@ -171,6 +181,17 @@
 
 	if (cfhash[i].key) 
 	  {
+	 Eina_List *l;
+
+	 for (l = color_classes; l; l = l->next)
+	   {
+		  if (!strncmp(cfhash[i].key, l->data, strlen(cfhash[i].key)))
+		{
+		   color_classes = eina_list_remove_list(color_classes, l);
+		   E_FREE(l->data);
+		}
+	   }
+
 	 cfc->key = eina_stringshare_add(cfhash[i].key);
 	 cfc->name = eina_stringshare_add(_(cfhash[i].name));
 	 cc = e_color_class_find(cfc->key);
@@ -214,6 +235,70 @@
 }
 
 static void 
+_fill_data_list(E_Config_Dialog_Data *cfdata) 
+{
+Eina_List *l;
+CFColor_Class *cfc;
+E_Color_Class *cc;
+
+if (eina_list_count(color_classes))
+  {
+	 cfc = E_NEW(CFColor_Class, 1);
+	 cfc->enabled = 0;
+	 cfc->key = NULL;
+	 cfc->name = eina_stringshare_add(_("Other"));
+
+	 cfdata->classes = eina_list_append(cfdata->classes, cfc);
+  }
+
+for (l = color_classes; l; l = l->next)
+  {
+	 cfc = E_NEW(CFColor_Class, 1);
+	 cfc->enabled = 0;
+	 cfc->key = eina_stringshare_add((char *) l->data);
+	 cfc->name = eina_stringshare_add((char *) l->data);
+
+	 cc = e_color_class_find(cfc->key);
+	 if (cc) 
+	   {
+	  cfc->enabled = 1;
+	  cfc->r = cc->r;
+	  cfc->g = cc->g;
+	  cfc->b = cc->b;
+	  cfc->a = cc->a;
+	  cfc->r2 = cc->r2;
+	  cfc->g2 = cc->g2;
+	  cfc->b2 = cc->b2;
+	  cfc->a2 = cc->a2;
+	  cfc->r3 = cc->r3;
+	  cfc->g3 = cc->g3;
+	  cfc->b3 = cc->b3;
+	  cfc->a3 = cc->a3;
+	   }
+	 else 
+	   {
+	  cfc->r = 255;
+	  cfc->g = 255;
+	  cfc->b = 255;
+	  cfc->a = 255;
+	  cfc->r2 = 0;
+	  cfc->g2 = 0;
+	  cfc->b2 = 0;
+	  cfc->a2 = 255;
+	  cfc->r3 = 0;
+	  cfc->g3 = 0;
+	  cfc->b3 = 0;
+	  cfc->a3 = 255;
+	   }
+
+	 cfdata->classes = eina_list_append(cfdata->classes, cfc);
+	 E_FREE(l->data);
+  }
+
+color_classes = eina_list_free(color_classes);
+}
+
+static void 
 _fill_data_basic(E_Config_Dialog_Data *cfdata) 
 {
Eina_List *l;
-
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=100&url=/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] More color classes for the default theme

2008-11-13 Thread Viktor Kojouharov
This patch adds a few more color classes to the default e17 theme.
Index: data/themes/default.edc
===
--- data/themes/default.edc	(revision 37601)
+++ data/themes/default.edc	(working copy)
@@ -206,6 +206,7 @@
    * rest is relative to the whole object
    * (because its not specified) */
 	   }
+   color_class: "border_top";
 	   image { /* define the image to use */
 		  normal: "bd_top.png"; /* the image */
 		  border: 2 2 2 2; /* border scaling attributes. this is the
@@ -230,6 +231,7 @@
 		  relative: 1.0 1.0;
 		  offset: -1 -1;
 	   }
+   color_class: "border_bottom";
 	   image {
 		  normal: "bd_bottom.png";
 		  border: 2 2 0 0; /* the left and right pixels are not to
@@ -601,6 +603,7 @@
 		  offset: -1 0;
 		  to: "top";
 	   }
+   color_class: "border_top_hilight";
 	   image {
 		  normal: "bd_top_hilight.png";
 	   }
@@ -1455,6 +1458,7 @@
 		  offset: -1 -1;
 		  to_y: "title_base";
 	   }
+   color_class: "border_top";
 	   image {
 		  normal: "bd_top.png";
 		  border: 2 2 2 2;
@@ -1472,6 +1476,7 @@
 		  relative: 1.0 1.0;
 		  offset: -1 -1;
 	   }
+   color_class: "border_bottom";
 	   image {
 		  normal: "bd_bottom.png";
 		  border: 2 2 0 0;
@@ -1756,6 +1761,7 @@
 		  offset: -1 0;
 		  to: "top";
 	   }
+   color_class: "border_top_hilight";
 	   image {
 		  normal: "bd_top_hilight.png";
 	   }
@@ -2535,6 +2541,7 @@
 		  offset: -1 -1;
 		  to_y: "title_base";
 	   }
+   color_class: "border_top";
 	   image {
 		  normal: "bd_top.png";
 		  border: 2 2 2 2;
@@ -2811,6 +2818,7 @@
 		  offset: -1 0;
 		  to: "top";
 	   }
+   color_class: "border_top_hilight";
 	   image {
 		  normal: "bd_top_hilight.png";
 	   }
@@ -3384,6 +3392,7 @@
 		  offset: -1 -1;
 		  to_y: "title_base";
 	   }
+   color_class: "border_top";
 	   image {
 		  normal: "bd_top.png";
 		  border: 2 2 2 2;
@@ -3401,6 +3410,7 @@
 		  relative: 1.0 1.0;
 		  offset: -1 -1;
 	   }
+   color_class: "border_bottom";
 	   image {
 		  normal: "bd_bottom.png";
 		  border: 2 2 0 0;
@@ -3639,6 +3649,7 @@
 		  offset: -1 0;
 		  to: "top";
 	   }
+   color_class: "border_top_hilight";
 	   image {
 		  normal: "bd_top_hilight.png";
 	   }
@@ -4308,6 +4319,7 @@
 		  offset: -1 -1;
 		  to_y: "title_base";
 	   }
+   color_class: "border_top";
 	   image {
 		  normal: "bd_top.png";
 		  border: 2 2 2 2;
@@ -4538,6 +4550,7 @@
 		  offset: -1 0;
 		  to: "top";
 	   }
+   color_class: "border_top_hilight";
 	   image {
 		  normal: "bd_top_hilight.png";
 	   }
@@ -5374,6 +5387,7 @@
 	mouse_events:  0;
 	description { state: "default" 0.0;
 	   align: 0.5 0.0;
+   color_class: "menu_base";
 	   image {
 		  normal: "base_bg.png";
 		  border: 2 2 2 2;
@@ -5969,6 +5983,7 @@
 	 part { name: "base";
 	mouse_events: 0;
 	description { state: "default" 0.0;
+   color_class: "shelf_base";
 	   image.normal: "base_bg.png";
 	   image.border: 2 2 2 2;
 	   fill.smooth: 0;
@@ -6304,6 +6319,7 @@
 	 part { name: "base";
 	mouse_events: 0;
 	description { state: "default" 0.0;
+   color_class: "shelf_base";
 	   image.normal: "shelf_alt_bg.png";
 	   fill.smooth: 0;
 	}
@@ -10306,6 +10322,7 @@
 	 part { name: "base";
 	mouse_events: 0;
 	description { state: "default" 0.0;
+   color_class: "fileman_base";
 	   image.normal: "dia_grad.png";
 	   fill {
 		  smooth: 0;
@@ -15549,6 +15566,7 @@
 	 part { name: "base";
 	mouse_events:  0;
 	description { state: "default" 0.0;
+   color_class: "dialog_base";
 	   image.normal: "dia_grad.png";
 	   fill {
 		  smooth: 0;
@@ -15701,6 +15719,7 @@
 	 part { name: "base";
 	mouse_events:  0;
 	description { state: "default" 0.0;
+   color_class: "configure_base";
 	   image.normal: "dia_grad.png";
 	   fill {
 		  smooth: 0;
@@ -19421,6 +19440,7 @@
  part { name: "base0";
 	mouse_events:  0;
 	description { state: "default" 0.0;
+   color_class: "frame_base";
 	   image.normal: "dia_grad.png";
 	   rel1.to: "over";
 	   rel2.to: "over";
-
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=100&url=/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sour

Re: [E-devel] RFC: enlightenment_start -locked

2008-11-13 Thread Gustavo Sverzut Barbieri
On Wed, Nov 12, 2008 at 6:41 AM, The Rasterman Carsten Haitzler
<[EMAIL PROTECTED]> wrote:
> On Tue, 11 Nov 2008 17:28:42 -0200 "Gustavo Sverzut Barbieri"
> <[EMAIL PROTECTED]> babbled:
>
>> On Tue, Nov 11, 2008 at 7:05 AM, The Rasterman Carsten Haitzler
>> <[EMAIL PROTECTED]> wrote:
>> > On Sat, 8 Nov 2008 06:19:46 -0200 "Gustavo Sverzut Barbieri"
>> > <[EMAIL PROTECTED]> babbled:
>> >
>> > (sorry - travelling...)
>> >
>> > um - i think it's a great idea. makes sense for auto-logins like with gsm
>> > (or if enrance gets one) or even more so for embedded devices - like
>> > phone/pda's etc. where the thing boots straight into x and e.. and you want
>> > to lock it with a pin # (desklock needs a way of adding some way to enter a
>> > password/pin number other than via a keyboard - a pin #, a virtual
>> > keyboard, or maybe some special shape you draw... main point is to make it
>> > flexible).
>>
>> Yes, for that I guess it's easier to abstract desklock or use an
>> external desklock app (already supported, but I never tried). The
>> former is better as it's faster and lower on resources. A virtual
>> number keyboard would do for most devices.
>>
>>
>> > as such user-switching i think is best left to whatever launches e. leave
>> > that out of e. nb - i would say that this is best done as a config option
>> > in e_config
>> >
>> > "lock_on_start" and that should do quite nicely :) add to the desklock
>> > config
>>
>> yes, it's easy doable, but I guess fixing the show wallpaper is a
>> worse problem ATM.
>
> yeah. the problem is - the desktop container is created and shown and filled
> with a bg pixmap - before the pin window can do anything, so it's a matter of
> either deferring the draw of the desktop until later, or creating, or having 
> an
> "early show" hook. that forces something to be shown before anything else.

let's draw desklock earlier, the faster the response the better!

attached is a new patch with config dialog.

-- 
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=100&url=/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] use ecore_evas_alpha_set every time composite is in use

2008-11-13 Thread Viktor Kojouharov
On Thu, 2008-11-13 at 10:09 +1100, Carsten Haitzler wrote:
> On Wed, 12 Nov 2008 12:34:22 +0100 Viktor Kojouharov <[EMAIL PROTECTED]>
> babbled:
> 
> > the current policy within E code is that ecore_evas_alpha_set is only
> > called when the window is shaped. The usual practice for figuring this
> > out is to look at the edje data for a "shaped" key. But what if the
> > theme does not specify a shaped key, but specifies a color_class? With a
> > color class and a composite manager, specifying an alpha value,
> > different from 255 will not be destructive, as long as the
> > above-mentioned function is called.
> 
> a very bad idea for performance reasons. it is a key for a specific reason :)

Yeah, that and I also found out that at least bling doesn't draw shadows
for such windows. So I'm gonna leave it at that :)
> 
> > I propose that we always call ecore_evas_alpha_set(ee, 1) if
> > use_composite is true, regardless of whether the theme group has a
> > "shaped" key.
> > 
> > 
> > -
> > 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=100&url=/
> > ___
> > 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=100&url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel