summaryrefslogtreecommitdiff
path: root/doc/edje
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2015-01-31 17:14:42 +0100
committerDave Andreoli <dave@gurumeditation.it>2015-01-31 17:14:42 +0100
commit24025e6d817299eceb6d65fe03a240e6eb538b43 (patch)
treef4508f6f6621d82d0039a02c81e6b27a89c2947d /doc/edje
parent1d8ffd1ed4b921f4526cebad2275e66546463dd6 (diff)
Restructured edje docs
Diffstat (limited to 'doc/edje')
-rw-r--r--doc/edje/class-edje.rst6
-rw-r--r--doc/edje/edje.rst98
-rw-r--r--doc/edje/module-edje.rst3
3 files changed, 106 insertions, 1 deletions
diff --git a/doc/edje/class-edje.rst b/doc/edje/class-edje.rst
new file mode 100644
index 0000000..0741320
--- /dev/null
+++ b/doc/edje/class-edje.rst
@@ -0,0 +1,6 @@
1.. currentmodule:: efl.edje
2
3:class:`efl.edje.Edje` Class
4============================
5
6.. autoclass:: efl.edje.Edje
diff --git a/doc/edje/edje.rst b/doc/edje/edje.rst
index e21c1cc..0d47bae 100644
--- a/doc/edje/edje.rst
+++ b/doc/edje/edje.rst
@@ -1,2 +1,98 @@
1 1
2.. automodule:: efl.edje 2.. _edje_main_intro:
3
4What is Edje?
5=============
6
7Edje is a complex graphical design & layout library.
8
9It doesn't intend to do containing and regular layout like a widget
10set, but it is the base for such components. Based on the requirements
11of Enlightenment 0.17, Edje should serve all the purposes of creating
12visual elements (borders of windows, buttons, scrollbars, etc.) and
13allow the designer the ability to animate, layout and control the look
14and feel of any program using Edje as its basic GUI constructor. This
15library allows for multiple collections of Layouts in one file,
16sharing the same image and font database and thus allowing a whole
17theme to be conveniently packaged into 1 file and shipped around.
18
19Edje separates the layout and behavior logic. Edje files ship with an
20image and font database, used by all the parts in all the collections
21to source graphical data. It has a directory of logical part names
22pointing to the part collection entry ID in the file (thus allowing
23for multiple logical names to point to the same part collection,
24allowing for the sharing of data between display elements). Each part
25collection consists of a list of visual parts, as well as a list of
26programs. A program is a conditionally run program that if a
27particular event occurs (a button is pressed, a mouse enters or leaves
28a part) will trigger an action that may affect other parts. In this
29way a part collection can be "programmed" via its file as to hilight
30buttons when the mouse passes over them or show hidden parts when a
31button is clicked somewhere etc. The actions performed in changing
32from one state to another are also allowed to transition over a period
33of time, allowing animation. Programs and animations can be run in
34"parallel".
35
36This separation and simplistic event driven style of programming can produce
37almost any look and feel one could want for basic visual elements. Anything
38more complex is likely the domain of an application or widget set that may
39use Edje as a convenient way of being able to configure parts of the display.
40
41
42So how does this all work?
43==========================
44
45Edje internally holds a geometry state machine and state graph of what is
46visible, not, where, at what size, with what colors etc. This is described
47to Edje from an Edje .edj file containing this information. These files can
48be produced by using edje_cc to take a text file (a .edc file) and "compile"
49an output .edj file that contains this information, images and any other
50data needed.
51
52The application using Edje will then create an object in its Evas
53canvas and set the bundle file to use, specifying the **group** name to
54use. Edje will load such information and create all the required
55children objects with the specified properties as defined in each
56**part** of the given **group**.
57
58Edje is an important EFL component because it makes easy to split logic and
59UI, usually used as theme engine but can be much more powerful than just
60changing some random images or text fonts.
61
62Edje also provides scripting through Embryo and communication can be
63done using messages and signals.
64
65.. seealso::
66 Before digging into changing or creating your own Edje source (edc)
67 files, read the `Edje Data Collection reference
68 <https://build.enlightenment.org/job/nightly_efl_gcc_x86_64/lastSuccessful
69 Buil d/artifact/doc/html/edcref.html>`_ .
70
71
72Signals from the edje object
73============================
74You can debug signals and messagges by capturing all of them, example::
75
76 def sig_dbg(obj, emission, source):
77 print(obj, emission, source)
78
79 def msg_dbg(obj, msg):
80 print(obj, msg)
81
82 my_edje.signal_callback_add("*", "*", sig_dbg)
83 my_edje.message_handler_set(msg_dbg)
84
85
86API Reference
87=============
88
89.. toctree::
90 :titlesonly:
91
92 module-edje.rst
93
94Inheritance diagram
95===================
96
97.. inheritance-diagram:: efl.edje
98 :parts: 2
diff --git a/doc/edje/module-edje.rst b/doc/edje/module-edje.rst
new file mode 100644
index 0000000..0c07bc4
--- /dev/null
+++ b/doc/edje/module-edje.rst
@@ -0,0 +1,3 @@
1
2.. automodule:: efl.edje
3 :exclude-members: Edje