Edje

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Example: changing wallpaper: Fix typo "sep_a_rate")
(Edje: Rewrite intro)
Line 1: Line 1:
 
= Edje =
 
= Edje =
Is a configuration-file format which origins of [http://www.enlightenment.org/ Enlightenment 17]. It is used by Openmoko and [[Illume]] for configuring a lot of the look of Openmoko and its applications. It allows you, for example, to change the background image but is much more powerful then that.
 
  
Please note, however, that for [[CustomizeApplicationIcons|changing application icons]] it is not necessary to compile theme files.
+
This page is about changing windows decoration and behavior. For [[CustomizeApplicationIcons|changing application icons]] on the home screen, simply change ''.desktop'' files ''/usr/share/applications'' directory. The theme is defined in the ''.edj'' file, which is a collection of possibly several files, including images and even fonts in some cases.
  
Edje uses *.edj Files as binary-configuration files and *.edc as the source of such an *.edj file.
+
Edje themes are stored at ''/usr/share/enlightenment/data/themes''. Which theme gets loaded by default, is defined via the symlink ''/usr/share/enlightenment/data/themes/illume.edj''. To change the illume theme, simply put the .edj file to ''~/.e/e/themes/illume.edj''.
  
For compiling an *.edc file to an *.edj file you need: edje_cc
+
Edge is a part of [http://www.enlightenment.org/ Enlightenment 17]. This file format is used by Openmoko and [[Illume]] for configuring a lot of the look of Openmoko and its applications. It allows you, for example, to change the background image but is much more powerful then that. Along with the visual definitions and elements, it includes programmatic statements controlling interaction between GUI elements and between GUI and application.  For instance, the dialer may have three 'program' triggers written into the edje for each button - change GUI to 'pressed', change GUI to 'released', and add digit to number.  Unlike traditional ideas about theming, this interaction is defined in the 'theme' instead of the application itself.  This allows for unprecedented flexibility insofar as 'theming' - you can change button layouts, graphics, even add some features like 'delete last digit' all within the .edj instead of having to burrow into sourcecode.
For decompiling an *.edj file to an *.edc file you need: edje_decc (you might want to do this to learn about how such a file has to look like)
+
  
Edje themes are stored at ''/usr/share/enlightenment/data/themes''.
+
If you want to play around with edje themes there's two approaches AFAIK:
Which theme gets loaded by default, is defined via the symlink ''/usr/share/enlightenment/data/themes/illume.edj''
+
 
 +
1. Use ''edje-editor''.  Keep in mind that the editor works, quite nicely in some regards, but has some flaws and some distinctly missing features like it can't remove a no-longer-used background image from the .edj file. See [http://lists.openmoko.org/pipermail/community/2008-October/034477.html this message].
 +
 
 +
2. Alternatively, as explained below, use ''edje-decc'' to decompile the theme back to config files and images and what-not, manually edit the aforementioned parts, and recompile with ''edje-cc''.  These two tools should be available in your friendly package feed for your Freerunner as ''edje-tools'', and possibly for your desktop linux.
 +
 
 +
Edje uses *.edj Files as binary-configuration files and *.edc as the source of such an *.edj file.
  
 
= Installation =  
 
= Installation =  

Revision as of 09:27, 27 October 2008

Contents

Edje

This page is about changing windows decoration and behavior. For changing application icons on the home screen, simply change .desktop files /usr/share/applications directory. The theme is defined in the .edj file, which is a collection of possibly several files, including images and even fonts in some cases.

Edje themes are stored at /usr/share/enlightenment/data/themes. Which theme gets loaded by default, is defined via the symlink /usr/share/enlightenment/data/themes/illume.edj. To change the illume theme, simply put the .edj file to ~/.e/e/themes/illume.edj.

Edge is a part of Enlightenment 17. This file format is used by Openmoko and Illume for configuring a lot of the look of Openmoko and its applications. It allows you, for example, to change the background image but is much more powerful then that. Along with the visual definitions and elements, it includes programmatic statements controlling interaction between GUI elements and between GUI and application.  For instance, the dialer may have three 'program' triggers written into the edje for each button - change GUI to 'pressed', change GUI to 'released', and add digit to number.  Unlike traditional ideas about theming, this interaction is defined in the 'theme' instead of the application itself.  This allows for unprecedented flexibility insofar as 'theming' - you can change button layouts, graphics, even add some features like 'delete last digit' all within the .edj instead of having to burrow into sourcecode.

If you want to play around with edje themes there's two approaches AFAIK:

1. Use edje-editor. Keep in mind that the editor works, quite nicely in some regards, but has some flaws and some distinctly missing features like it can't remove a no-longer-used background image from the .edj file. See this message.

2. Alternatively, as explained below, use edje-decc to decompile the theme back to config files and images and what-not, manually edit the aforementioned parts, and recompile with edje-cc.  These two tools should be available in your friendly package feed for your Freerunner as edje-tools, and possibly for your desktop linux.

Edje uses *.edj Files as binary-configuration files and *.edc as the source of such an *.edj file.

Installation

Installation on Ubuntu

You can install edje_cc and edje_decc for Ubuntu by adding this source to your /etc/apt/sources.lst:

deb http://e17.dunnewind.net/ubuntu hardy e17

or

deb http://e17.dunnewind.net/ubuntu gutsy e17

or

deb http://e17.dunnewind.net/ubuntu feisty e17

After that you can install the needed tools with:

sudo apt-get update && sudo apt-get install libedje-bin

Note: It appears only packages for hardy exist there at this point.

Installation on Debian

The packages for Ubuntu look like they are compatible with debian. Verified is: feisty<->lenny

Unfortunately, something seems to be broken in recompiling the edjefiles. edje_cc reports syntax errors in fso.edj file; but that comes maybe from the file itself. Maybe edje_cc from ubuntu is just outdated?


It looks like edje is available in debian unstable.

Installation on Freerunner

To compile/decompile Edje files directly at your freerunner, you first need to install several packages. You need at least edje-utils which provides the compiler and decompiler tools. Depending on the contents of the theme, you need additional modules which are provided by libevas-* packages. For example, to be able to load and save JPG files, you need both the libevas-loader-jpeg and libevas-saver-jpg packages.

To successfully compile .edj files, you also need a C++ compiler and the embryo_cc scripting language compiler installed.

This line should get you started:

opkg install edje-utils libevas-loader-jpeg libevas-loader-png libevas-saver-jpeg libevas-saver-png


To decompile an theme, just type:

 root@om-gta02:/usr/share/enlightenment/data/themes# edje_decc illume.edj

To recompile, you can use edje_cc, but most theme files have a build.sh bundled that provides the neccessary parameters:

 root@om-gta02:/usr/share/enlightenment/data/themes/illume# ./build.sh

Example: changing wallpaper

This is discussed in a separate wiki article: Changing wallpaper

Example: hiding the "Install" Bar

>>   I have removed the assassin installer so it doesn't show up any more
>>   (I do everything command line while ssh'd in) and I want to get rid
>>   of the bottom thing with the little pluses.  Is this a possibility?
>>
> It should be quite easy. Just decompile the edj file, edit the
> proper section (compare to the tango freerunner.edc file) and recompile
> it back.
>
Not so simple, but it seems to be the right place... check for "*" or
"+", they are in the .edc In place, I've added the value "Bar;" in the Categories of
"qtopia-clock.desktop" and "qtopia-ringtones.desktop" to get these two
appli accessible from the bottom bar.

Reference: http://lists.openmoko.org/pipermail/community/2008-September/031188.html

Troubleshooting

If something goes wrong at compiling time, there is most certainly something wrong in your freerunner.edc file. The problem is, that edjecc will complain with cryptical text. Check if all files referenced are really there and if no syntax errors are present.

In order to install the new theme, it must be referenced (see above) and illume must be restarted.

Links

Personal tools

Edje

This page is about changing windows decoration and behavior. For changing application icons on the home screen, simply change .desktop files /usr/share/applications directory. The theme is defined in the .edj file, which is a collection of possibly several files, including images and even fonts in some cases.

Edje themes are stored at /usr/share/enlightenment/data/themes. Which theme gets loaded by default, is defined via the symlink /usr/share/enlightenment/data/themes/illume.edj. To change the illume theme, simply put the .edj file to ~/.e/e/themes/illume.edj.

Edge is a part of Enlightenment 17. This file format is used by Openmoko and Illume for configuring a lot of the look of Openmoko and its applications. It allows you, for example, to change the background image but is much more powerful then that. Along with the visual definitions and elements, it includes programmatic statements controlling interaction between GUI elements and between GUI and application.  For instance, the dialer may have three 'program' triggers written into the edje for each button - change GUI to 'pressed', change GUI to 'released', and add digit to number.  Unlike traditional ideas about theming, this interaction is defined in the 'theme' instead of the application itself.  This allows for unprecedented flexibility insofar as 'theming' - you can change button layouts, graphics, even add some features like 'delete last digit' all within the .edj instead of having to burrow into sourcecode.

If you want to play around with edje themes there's two approaches AFAIK:

1. Use edje-editor. Keep in mind that the editor works, quite nicely in some regards, but has some flaws and some distinctly missing features like it can't remove a no-longer-used background image from the .edj file. See this message.

2. Alternatively, as explained below, use edje-decc to decompile the theme back to config files and images and what-not, manually edit the aforementioned parts, and recompile with edje-cc.  These two tools should be available in your friendly package feed for your Freerunner as edje-tools, and possibly for your desktop linux.

Edje uses *.edj Files as binary-configuration files and *.edc as the source of such an *.edj file.

Installation

Installation on Ubuntu

You can install edje_cc and edje_decc for Ubuntu by adding this source to your /etc/apt/sources.lst:

deb http://e17.dunnewind.net/ubuntu hardy e17

or

deb http://e17.dunnewind.net/ubuntu gutsy e17

or

deb http://e17.dunnewind.net/ubuntu feisty e17

After that you can install the needed tools with:

sudo apt-get update && sudo apt-get install libedje-bin

Note: It appears only packages for hardy exist there at this point.

Installation on Debian

The packages for Ubuntu look like they are compatible with debian. Verified is: feisty<->lenny

Unfortunately, something seems to be broken in recompiling the edjefiles. edje_cc reports syntax errors in fso.edj file; but that comes maybe from the file itself. Maybe edje_cc from ubuntu is just outdated?


It looks like edje is available in debian unstable.

Installation on Freerunner

To compile/decompile Edje files directly at your freerunner, you first need to install several packages. You need at least edje-utils which provides the compiler and decompiler tools. Depending on the contents of the theme, you need additional modules which are provided by libevas-* packages. For example, to be able to load and save JPG files, you need both the libevas-loader-jpeg and libevas-saver-jpg packages.

To successfully compile .edj files, you also need a C++ compiler and the embryo_cc scripting language compiler installed.

This line should get you started:

opkg install edje-utils libevas-loader-jpeg libevas-loader-png libevas-saver-jpeg libevas-saver-png


To decompile an theme, just type:

 root@om-gta02:/usr/share/enlightenment/data/themes# edje_decc illume.edj

To recompile, you can use edje_cc, but most theme files have a build.sh bundled that provides the neccessary parameters:

 root@om-gta02:/usr/share/enlightenment/data/themes/illume# ./build.sh

Example: changing wallpaper

This is discussed in a separate wiki article: Changing wallpaper

Example: hiding the "Install" Bar

>>   I have removed the assassin installer so it doesn't show up any more
>>   (I do everything command line while ssh'd in) and I want to get rid
>>   of the bottom thing with the little pluses.  Is this a possibility?
>>
> It should be quite easy. Just decompile the edj file, edit the
> proper section (compare to the tango freerunner.edc file) and recompile
> it back.
>
Not so simple, but it seems to be the right place... check for "*" or
"+", they are in the .edc In place, I've added the value "Bar;" in the Categories of
"qtopia-clock.desktop" and "qtopia-ringtones.desktop" to get these two
appli accessible from the bottom bar.

Reference: http://lists.openmoko.org/pipermail/community/2008-September/031188.html

Troubleshooting

If something goes wrong at compiling time, there is most certainly something wrong in your freerunner.edc file. The problem is, that edjecc will complain with cryptical text. Check if all files referenced are really there and if no syntax errors are present.

In order to install the new theme, it must be referenced (see above) and illume must be restarted.

Links