[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=98a78edea12c9b2816cc23ab6241e700ad9eefc0 commit 98a78edea12c9b2816cc23ab6241e700ad9eefc0 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Fri Jan 5 08:01:55 2018 -0800 Wiki page start.md changed with summary [] by Gareth Halfacree --- pages/develop/tutorials/c/start.md.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/develop/tutorials/c/start.md.txt b/pages/develop/tutorials/c/start.md.txt index 7025a9005..cd5ccb617 100644 --- a/pages/develop/tutorials/c/start.md.txt +++ b/pages/develop/tutorials/c/start.md.txt @@ -17,4 +17,5 @@ The following tutorials are designed to build on each other, introducing concept * [Reference Counting in Eo](eo-refcount.md) * [Creating New Classes with Eolian](eo-classes.md) * [Class Inheritance with Eolian](eo-inherit.md) - * [Multiple Class Inheritance with Eolian](eo-multiinherit.md) \ No newline at end of file + * [Multiple Class Inheritance with Eolian](eo-multiinherit.md) +* [Lifecycle Management](lifecycle.md) \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=74ae1e3dc627895301921337a6f35636daefa932 commit 74ae1e3dc627895301921337a6f35636daefa932 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Fri Jan 5 08:00:48 2018 -0800 Wiki page start.md changed with summary [] by Gareth Halfacree --- pages/develop/guides/start.md.txt | 12 1 file changed, 12 insertions(+) diff --git a/pages/develop/guides/start.md.txt b/pages/develop/guides/start.md.txt index 3619bcac3..9b8ac1f10 100644 --- a/pages/develop/guides/start.md.txt +++ b/pages/develop/guides/start.md.txt @@ -21,9 +21,21 @@ The documentation of EFL and its infrastructure is an ongoing effort, taking pla [The Main Loop Programming Guide](https://www.enlightenment.org/develop/guides/c/core/main-loop.md) provides a reference to the internal EFL Main Loop, in which execution takes place, and the timers, monitors, idlers, and polling capabilities it offers. +## IO Programming Guide ## + +[The IO Programming Guide](https://www.enlightenment.org/develop/guides/c/core/io.md) details the use of EFL's input-output handling facilities for reading and writing files, Unix file descriptors and networks sockets. + +## Events Programming Guide ## + +[The Events Programming Guide](https://www.enlightenment.org/develop/guides/c/core/events.md) provides a reference for EFL's event-driven nature, detailing methods for handling events. + ## User Interface Sizing Programming Guide ## [The User Interface Sizing Programming Guide](https://www.enlightenment.org/develop/guides/c/ui/sizing.md) provides a reference to the controls offered by EFL for controlling the minimum and maximum size of a widget when default values are inappropriate. +## User Interface Focus Programming Guide ## + +[The User Interface Focus Programming Guide](https://www.enlightenment.org/develop/guides/c/ui/focus.md) details how to handle focus, the graphical indicator of the widget currently selected, in EFL. + ## EFL C Porting Guide ## [The EFL C Porting Guide](https://www.enlightenment.org/develop/guides/c/porting-guide.md) is designed for developers looking to transition from the current EFL API to the beta release, known as the Unified API. This document is a work in progress. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page navigation changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=e82262fccf801561b0c2b30d2abd867d825d3596 commit e82262fccf801561b0c2b30d2abd867d825d3596 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Fri Jan 5 07:52:39 2018 -0800 Wiki page navigation changed with summary [] by Gareth Halfacree --- pages/develop/navigation.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/navigation.txt b/pages/develop/navigation.txt index ae2ebb402..bc2145e7f 100644 --- a/pages/develop/navigation.txt +++ b/pages/develop/navigation.txt @@ -3,7 +3,7 @@ * [[/develop/setup/start.md | Setting Up EFL]] * [[/develop/setup/c/start.md | C Dev Environment]] * [[/develop/legacy/tutorial/ | Stable API Tutorials]] - * [[/develop/tutorials/c/start.md | Beta API Tutorials [C]]] + * [[/develop/tutorials/c/start.md | Beta API Tutorials]] * [[/develop/tutorials/c/hello-world.md | Hello World]] * [[/develop/tutorials/c/hello-world-gui.md | Hello World GUI]] * [[/develop/tutorials/c/eo-intro.md | EO Objects]] --
[EGIT] [website/www-content] master 01/01: Wiki page navigation changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=a8cdcad5a4c680e4ab760af95222965a69339de3 commit a8cdcad5a4c680e4ab760af95222965a69339de3 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Fri Jan 5 07:47:47 2018 -0800 Wiki page navigation changed with summary [] by Gareth Halfacree --- pages/develop/navigation.txt | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pages/develop/navigation.txt b/pages/develop/navigation.txt index a6b991032..ae2ebb402 100644 --- a/pages/develop/navigation.txt +++ b/pages/develop/navigation.txt @@ -2,16 +2,16 @@ * [[/develop/unified-and-legacy.md | Using Stable and Beta together]] * [[/develop/setup/start.md | Setting Up EFL]] * [[/develop/setup/c/start.md | C Dev Environment]] -* [[/develop/legacy/tutorial/ | Stable API Tutorials]] -* [[/develop/tutorials/c/start.md | Beta API Tutorials [C]]] - * [[/develop/tutorials/c/hello-world.md | Hello World]] - * [[/develop/tutorials/c/hello-world-gui.md | Hello World GUI]] - * [[/develop/tutorials/c/eo-intro.md | EO Objects]] - * [[/develop/tutorials/c/eo-refcount.md | EO Reference Counting]] - * [[/develop/tutorials/c/eo-classes.md | EO Classes]] - * [[/develop/tutorials/c/eo-inherit.md | EO Inheritance]] - * [[/develop/tutorials/c/eo-multiinherit.md | EO Multiple Inheritance]] - * [[/develop/tutorials/c/lifecycle.md | Lifecycle Management]] + * [[/develop/legacy/tutorial/ | Stable API Tutorials]] + * [[/develop/tutorials/c/start.md | Beta API Tutorials [C]]] +* [[/develop/tutorials/c/hello-world.md | Hello World]] +* [[/develop/tutorials/c/hello-world-gui.md | Hello World GUI]] +* [[/develop/tutorials/c/eo-intro.md | EO Objects]] +* [[/develop/tutorials/c/eo-refcount.md | EO Reference Counting]] +* [[/develop/tutorials/c/eo-classes.md | EO Classes]] +* [[/develop/tutorials/c/eo-inherit.md | EO Inheritance]] +* [[/develop/tutorials/c/eo-multiinherit.md | EO Multiple Inheritance]] +* [[/develop/tutorials/c/lifecycle.md | Lifecycle Management]] * [[/develop/legacy/program_guide/start | Stable API Programming Guides]] * [[develop/guides/start.md | Beta API Programming Guides]] * [[/develop/guides/c/eina/start.md | Eina]] --
[EGIT] [website/www-content] master 01/01: Wiki page navigation changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=cf1e5a88856f401f618e305dfc11cf3f02fcce52 commit cf1e5a88856f401f618e305dfc11cf3f02fcce52 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Fri Jan 5 07:43:40 2018 -0800 Wiki page navigation changed with summary [] by Gareth Halfacree --- pages/develop/navigation.txt | 10 +- pages/develop/setup/c/arch.md.txt | 235 -- 2 files changed, 1 insertion(+), 244 deletions(-) diff --git a/pages/develop/navigation.txt b/pages/develop/navigation.txt index f350b7640..e55dddc5e 100644 --- a/pages/develop/navigation.txt +++ b/pages/develop/navigation.txt @@ -1,15 +1,7 @@ * [[/develop/start.md] | Developing with EFL]] * [[/develop/unified-and-legacy.md | Using Stable and Beta together]] * [[/develop/setup/start.md | Setting Up EFL]] -* [[/develop/setup/c/start.md | Installing EFL for C Dev]] - *[[/develop/setup/c/ubuntu.md | Installing on Ubuntu]] - *[[/develop/setup/c/arch.md | Installing on Arch]] - *[[/develop/setup/c/debian.md | Installing on Debian]] - *[[/develop/setup/c/fedora.md | Installing on Fedora]] - *[[/develop/setup/c/freebsd.md | Installing on FreeBSD]] - *[[/develop/setup/c/opensuse.md | Installing on openSUSE]] - *[[/develop/setup/c/macos.md | Installing on macOS]] - * [[/develop/tutorials/ | Tutorials]] +* [[/develop/setup/c/start.md | Setting up a C Dev Environment]] * [[/develop/legacy/tutorial/ | Stable API Tutorials]] * [[/develop/tutorials/c/start.md | Beta API Tutorials [C]]] * [[/develop/tutorials/c/hello-world.md | Hello World]] diff --git a/pages/develop/setup/c/arch.md.txt b/pages/develop/setup/c/arch.md.txt deleted file mode 100644 index 309724938..0 --- a/pages/develop/setup/c/arch.md.txt +++ /dev/null @@ -1,235 +0,0 @@ -~~Title: Installing EFL on Arch~~ -~~NOCACHE~~ - -# Installing EFL on Arch # - -[The *Enlightenment Foundation Libraries (EFL)*](/about-efl.md) power millions of systems from mobile phones to set-top boxes, desktops, laptops, game systems and more. You'll need EFL if you want to develop apps for Enlightenment and for any of the devices that use Enlightenment for its visual interface. - -This tutorial describes several ways to install EFL on your system. You will only need to use one of these. Select your chosen method using the index on the right. - -Many distributions offer EFL as an installable package from their default repositories. In this case you only need to use your distribution's software management system to install. However most versions of EFL in default repositories are out of date and will not support more recent Enlightenment applications. If this is not an issue for you, read through the ["From Distribution Repositories"](#From_Distribution_Repositories) section below. - -Distributions often provide a special repository maintained by users or a method of integrating a bleeding edge version of EFL with your software management system. This means that once installed you can keep EFL current just by running system updates. If your distribution offers this, take a look at the section ["Installing from a Special Repository"](#Installing_from_a_Special_Repository). - -The Enlightenment developers provide a pre-packaged source of EFL. Although not bleeding edge it is up to date and considered stable for production environments. You can download, compile and install it yourself by following the instructions in ["Installing from Packaged Source"](#Installing_from_Packaged_Source). - -You can also download the source code for the most recent version from the EFL git repositories. This will provide you with the latest code, which is usually of stable quality. To get started, read the section ["Installing from Git"](#Installing_from_Git). - -Whichever installation method you use, visit ["Compiling EFL Applications"](#Compiling_EFL_Applications) to discover how to compile your Enlightenment applications. - -## From Distribution Repositories ## - -Arch contains an instance of the EFL package in its official repositories. To install, run the following command as root: - -```bash -pacman -S efl -``` - -This will give you a working EFL installation. - -The version in Arch's official repositories may lag behind the latest version of EFL. This may cause problems when trying to compile examples from tutorials in this guide. If this happens, install a more recent version of EFL using one of the methods listed below. - -## Installing from a Special Repository ## - -You can use Arch's package management system to install an up-to-date version of EFL from the *Arch User Repository (AUR)* named *elf-git*. Using the *elf-git* AUR is relatively simple and makes your EFL package easey to maintain using Arch's package ma
[EGIT] [website/www-content] master 01/01: Wiki page navigation changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=1a361d9a51a3d39ac472f8fd41090fb36384edb5 commit 1a361d9a51a3d39ac472f8fd41090fb36384edb5 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Fri Jan 5 06:14:58 2018 -0800 Wiki page navigation changed with summary [] by Gareth Halfacree --- pages/docs/navigation.txt | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pages/docs/navigation.txt b/pages/docs/navigation.txt index 906060331..209ba430d 100644 --- a/pages/docs/navigation.txt +++ b/pages/docs/navigation.txt @@ -10,8 +10,10 @@ * [[/docs/c/start]] * [[/develop/efl/|Getting started with EFL Development]] * [[/develop/legacy/api/c/|EFL API (C language)]] - * [[/docs/themes/start|Themeing EFL apps]] -* [[/about-eflete|Eflete - GUI Theme design tool]] -* [[/about-enventor|Enventor - GUI Edje file design tool]] -* [[/docs/themes/knob_example|Edje theme example]] + * [[/docs/apps/start.md | EFL Apps]] +* [[/docs/apps/terminology.md]] + * [[/docs/themes/start|Themeing EFL Apps]] +* [[/about-eflete|Eflete - GUI Theme Design Tool]] +* [[/about-enventor|Enventor - GUI Edje File Design Tool]] +* [[/docs/themes/knob_example|Edje Theme Example]] --
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [created] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=b2f427dca0af2907966fd70007cd4312a2d44c47 commit b2f427dca0af2907966fd70007cd4312a2d44c47 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Fri Jan 5 06:17:10 2018 -0800 Wiki page start.md changed with summary [created] by Gareth Halfacree --- pages/docs/apps/start.md.txt | 11 +++ 1 file changed, 11 insertions(+) diff --git a/pages/docs/apps/start.md.txt b/pages/docs/apps/start.md.txt new file mode 100644 index 0..89606a344 --- /dev/null +++ b/pages/docs/apps/start.md.txt @@ -0,0 +1,11 @@ +--- +~~EFL Applications~~ +--- + +# EFL Applications # + +The following documents detail applications written using the Enlightenment Foundation Libraries (EFL). + +## Terminology ## + +[Terminology](terminology.md) is a terminal emulator designed to offer features for developers and system administrators which are not available from alternative terminals. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page terminology.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=261338b09f3e97146ee601f3089cf7c07df07707 commit 261338b09f3e97146ee601f3089cf7c07df07707 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Fri Jan 5 06:09:17 2018 -0800 Wiki page terminology.md changed with summary [] by Gareth Halfacree --- pages/docs/apps/terminology.md.txt | 92 ++ 1 file changed, 92 insertions(+) diff --git a/pages/docs/apps/terminology.md.txt b/pages/docs/apps/terminology.md.txt new file mode 100644 index 0..4043b2f5f --- /dev/null +++ b/pages/docs/apps/terminology.md.txt @@ -0,0 +1,92 @@ +--- +~~Title: Terminology~~ +--- + +# Terminology # + +Terminology is a terminal emulator especially developed for the Enlightenment desktop environment, although it will also work in other graphical environments and on multiple platforms including Linux, BSD and UNIX. Terminal emulators are a common fixture of graphical desktops, but Terminology offers some features which make it especially helpful for developers and system administrators. + +[You can download Terminology from here](/download). + +![Terminology Icon](/_media/icon-terminology.png) + +# Using Terminology # + +Terminology makes working with multiple shell sessions simultaneously easy. It is also highly configurable, lets you define multiple keyboard shortcuts and comes with two different ways to copy and paste. + +## Mouse and Keyboard Controls ## + +You can scroll up and down a through the terminal output with the mouse wheel, but you can also use the wheel to change the size of the font within the terminal: hover your cursor over the pane showing the terminal output, hold down Ctrl and scroll the mouse wheel. Scroll backwards to make the font smaller and forwards to make it bigger. + +You can select anything that appears within the terminal pane by clicking with the left mouse button, holding and dragging. A blue area will appear and show exactly what you are selecting, including blank spaces. You can then copy the selection to Terminology's primary internal buffer or Enlightenment's clipboard buffer. + +To copy into the primary buffer use Alt + w. What you copy into this buffer can only be pasted (using Alt + Return) into another Terminology tab or pane, it cannot be pasted into any other application. + +You can also copy from Terminology into Enlightenment's clipboard. Use Ctrl + Shift + c to copy from your selection in Terminology onto the clipboard. Once copied, you can paste from the clipboard into Terminology with Ctrl + Shift + v, or into any other Enlightenment application with Ctrl + v. + +![Selecting text.](https://www.enlightenment.org/_media/playground/Tools/Terminology/select.png) + +The best way to make the most of Terminology's double-buffer feature is to think of the primary buffer as an auxiliary. For example, if you have a complex network command copied into the primary buffer (Alt + w) and the URL you want to apply it to copied from your web browser in the clipboard buffer, you can create a compound command by pasting first the contents of the primary buffer (Alt + Return) and then the contents of the clipboard ( [...] + +## Pop-up Menu ## + +Right-clicking anywhere within the Terminology workspace brings up a pop-up menu on the right of the window. The pop-up menu allows you to copy and paste (to the clipboard, NOT to the primary buffer) using the buttons in the menu, as well as manage tabs and panes. + +![Terminology's pop-up menu.](https://www.enlightenment.org/_media/playground/Tools/Terminology/menu.png) + +### Tabs ### + +*New* opens a new tab, an independent shell terminal stacked behind your current tab. You can move between tabs by clicking the tabs labels you will see across the top of the pane. To better identify a tab, you can give it a name. Use the *Set title* option from pop-up menu to do this. + +When you have several tabs open, in the upper right corner you will see a small icon that looks like a window with four panes. That is your tab pager and it will tell you which tab you are on. If you have three tabs open and it says *2/3*, it means you are on the second tab. Click the icon and you will see a preview of the panes you currently have open. Move your cursor towards the top of the view, and the previews will scroll up, allowing you to select a tab you opened earlier on. Move [...] + +![Scrolling through tabs.](https://www.enlightenment.org/_media/playground/Tools/Terminology/scrollthroughtabs.png) + +### Splitting Panes ### + +Splitting the Terminology window vertically or horizontally (use *Split V* or *Split H* from the pop-up menu) will allow you to run two processes concurrently and monitor both from within the same window, as opposed to having to switch from one to the other if you were using tabs. In the example shown below, we are running *F
[EGIT] [website/www-content] master 01/01: Wiki page hello-world-gui.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=53e883a836f4178357d5ea9e6dfa7165de3deeed commit 53e883a836f4178357d5ea9e6dfa7165de3deeed Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Jan 4 07:38:37 2018 -0800 Wiki page hello-world-gui.md changed with summary [] by Gareth Halfacree --- pages/develop/tutorials/c/hello-world-gui.md.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/develop/tutorials/c/hello-world-gui.md.txt b/pages/develop/tutorials/c/hello-world-gui.md.txt index da8aadfdd..59bcbd577 100644 --- a/pages/develop/tutorials/c/hello-world-gui.md.txt +++ b/pages/develop/tutorials/c/hello-world-gui.md.txt @@ -70,7 +70,7 @@ Instead of printing to the command line, this time your message will be displaye Technically you could put all the code for opening the window, text boxes, buttons and so on into the main function which previously contained the lines you just deleted but that's messy. In general it's much better and cleaner to use the main function to call other functions. -Create a function to set up your window and name it ``_gui_setup()``. Insert a call to the function from within the mani EFL loop. Your program should look like this: +Create a function to set up your window and name it ``_gui_setup()``. Insert a call to the function from within the main EFL loop. Your program should look like this: ```c #define EFL_EO_API_SUPPORT 1 @@ -112,11 +112,11 @@ So far ``_gui_setup`` is empty. Create a window by adding the following lines wi As far as EFL is concerned, a window is just another object. You can declare it with ``Eo *win;``. The ``Eo`` type is the base object system for EFL. Most graphical elements such as windows, text boxes, buttons, sliders, etc. are ``Eo`` objects. You can give your window any name you wish but for now call it ``win``for simplicity's sake. -The next part of the code defines the window itself. The ``efl_add()`` method creates a new object of the class specified in the first parameter and puts it inside the already existing object specified in the second parameter. In an EFL graphical application widgets are inserted inside other objects. For example, you can place a text object inside a text box inside a window and so on. In this case we want to create a window (``EFL_UI_WIN _CLASS``) and don't need to put it inside any othe [...] +The next part of the code defines the window itself. The ``efl_add()`` method creates a new object of the class specified in the first parameter and puts it inside the already existing object specified in the second parameter. In an EFL graphical application widgets are inserted inside other objects. For example, you can place a text object inside a text box inside a window and so on. In this case we want to create a window (``EFL_UI_WIN _CLASS``) and don't need to put it inside any othe [...] The rest of the parameters of ``efl_add()`` are a list of methods that will be called in order, normally to configure the object we have just created. You can add as many configuration methods as you want in this list and can use the special symbol ``efl_added`` to refer to the created object if you need to. -The ``efl_ui_win_type_set()`` function does what it says on the box. There are several types of window types (basic, dialog, popup menus, etc.) : here we want the most basic type. You can see the other types of windows you can choose by [visiting the list of macros](macros.md). The ``efl_text_set()`` function sets the text of the window's title bar, in this case, to "Hello World". The ``efl_ui_win_autodel_set()`` procedure tells the program to automatically make the window disappear if i [...] +The ``efl_ui_win_type_set()`` function does what it says on the box. There are several types of window types (basic, dialog, popup menus, etc.) : here we want the most basic type. The ``efl_text_set()`` function sets the text of the window's title bar, in this case, to "Hello World". The ``efl_ui_win_autodel_set()`` procedure tells the program to automatically make the window disappear if it's closed. You can look up the exact meaning of these calls in the [API Reference Guide](link to / [...] Your program will now look like this: --
[EGIT] [website/www-content] master 01/01: Wiki page navigation changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=e6def9873d5a1ee184e65ab1ea4a957ca31e8c81 commit e6def9873d5a1ee184e65ab1ea4a957ca31e8c81 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Jan 4 06:20:56 2018 -0800 Wiki page navigation changed with summary [] by Gareth Halfacree --- pages/develop/navigation.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/develop/navigation.txt b/pages/develop/navigation.txt index 78c19bcaa..f350b7640 100644 --- a/pages/develop/navigation.txt +++ b/pages/develop/navigation.txt @@ -8,6 +8,7 @@ *[[/develop/setup/c/fedora.md | Installing on Fedora]] *[[/develop/setup/c/freebsd.md | Installing on FreeBSD]] *[[/develop/setup/c/opensuse.md | Installing on openSUSE]] + *[[/develop/setup/c/macos.md | Installing on macOS]] * [[/develop/tutorials/ | Tutorials]] * [[/develop/legacy/tutorial/ | Stable API Tutorials]] * [[/develop/tutorials/c/start.md | Beta API Tutorials [C]]] --
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=9661efcee68b0bd1e8425fa366bb821f1cfc751a commit 9661efcee68b0bd1e8425fa366bb821f1cfc751a Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Jan 4 06:20:24 2018 -0800 Wiki page start.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/start.md.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/develop/setup/c/start.md.txt b/pages/develop/setup/c/start.md.txt index b62336145..ded3a877c 100644 --- a/pages/develop/setup/c/start.md.txt +++ b/pages/develop/setup/c/start.md.txt @@ -13,4 +13,5 @@ Installing the Enlightenment Foundation Libraries for C development is a simple * [Debian](debian.md) * [Fedora](fedora.md) * [FreeBSD](freebsd.md) -* [openSUSE](opensuse.md) \ No newline at end of file +* [openSUSE](opensuse.md) +* [macOS](macos.md) \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page hello-world-gui.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=59f60ff3bb0c73e17789a4593ae309f49483f762 commit 59f60ff3bb0c73e17789a4593ae309f49483f762 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Jan 4 05:36:30 2018 -0800 Wiki page hello-world-gui.md changed with summary [] by Gareth Halfacree --- pages/develop/tutorials/c/hello-world-gui.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/tutorials/c/hello-world-gui.md.txt b/pages/develop/tutorials/c/hello-world-gui.md.txt index 62ccddac3..da8aadfdd 100644 --- a/pages/develop/tutorials/c/hello-world-gui.md.txt +++ b/pages/develop/tutorials/c/hello-world-gui.md.txt @@ -3,7 +3,7 @@ ~~NOCACHE~~ --- -# "Hello World" in a EFL Window # +# Graphical "Hello World" # In this guide you will learn how to build a complete graphical application, with a window and typical elements like a text box and button. After following this guide your application should look something like this: --
[EGIT] [website/www-content] master 01/01: Wiki page hello-world-gui.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=c4410818bb3bd331f26107289ee00b7e4e6c586f commit c4410818bb3bd331f26107289ee00b7e4e6c586f Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Jan 4 05:36:03 2018 -0800 Wiki page hello-world-gui.md changed with summary [] by Gareth Halfacree --- pages/develop/tutorials/c/hello-world-gui.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/tutorials/c/hello-world-gui.md.txt b/pages/develop/tutorials/c/hello-world-gui.md.txt index c628ebefd..62ccddac3 100644 --- a/pages/develop/tutorials/c/hello-world-gui.md.txt +++ b/pages/develop/tutorials/c/hello-world-gui.md.txt @@ -435,7 +435,7 @@ In this tutorial you have learned: ## Troubleshooting ## -Apart from typos that may cause problems compiling or running, there is not much that can go wrong with this application. If it fails to compile check that you have installed all the EFL libraries and development files and that they are up to date. [Learn more about installing the EFL files here](). +Apart from typos that may cause problems compiling or running, there is not much that can go wrong with this application. If it fails to compile check that you have installed all the EFL libraries and development files and that they are up to date. [Learn more about installing the EFL files here](https://www.enlightenment.org/develop/setup/c/start.md). ## Resources ## --
[EGIT] [website/www-content] master 01/01: Wiki page hello-world-gui.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=f42e9aa3b617958c90987585ec8ffe0021c2b886 commit f42e9aa3b617958c90987585ec8ffe0021c2b886 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Jan 4 05:34:25 2018 -0800 Wiki page hello-world-gui.md changed with summary [] by Gareth Halfacree --- pages/develop/tutorials/c/hello-world-gui.md.txt | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pages/develop/tutorials/c/hello-world-gui.md.txt b/pages/develop/tutorials/c/hello-world-gui.md.txt index 95ec8a9d2..c628ebefd 100644 --- a/pages/develop/tutorials/c/hello-world-gui.md.txt +++ b/pages/develop/tutorials/c/hello-world-gui.md.txt @@ -150,7 +150,7 @@ EFL_MAIN() Save this program to a file named ``hello-world-gui.c``. -You can compile this program following the instructions in our [*Compile and Run* section in the EFL Installation Guide](eflinstallationguide.md#Compiling). The compile will produce a file named "hello-world-gui" which you can execute, although at this stage you won't see much. The window opens but it is empty and of minimal size. You may be able to see it in the upper left corner of your screen as a thin sliver. You can try to drag its edges with your mouse to enlarge it if you wish. +You can compile this program following the instructions in the [*Compile and Run* sections of the EFL Installation Guides](/develop/setup/c/start.md). The compile will produce a file named "hello-world-gui" which you can execute, although at this stage you won't see much. The window opens but it is empty and of minimal size. You may be able to see it in the upper left corner of your screen as a thin sliver. You can try to drag its edges with your mouse to enlarge it if you wish. You also must quit your application manually by pressing Ctrl + C from the terminal since the application won't stop even when the window's closed. @@ -406,7 +406,7 @@ EFL_MAIN() ## Compiling and Running ## -Follow the instructions in the [*Compile and Run* section in the EFL Installation Guide](efl-installation-guide.md#Compiling) to create an executable file called *hello-world-gui*. Run this with: +Follow the instructions in the [*Compile and Run* section of the EFL Installation Guide](/develop/setup/c/start.md) for your operating system to create an executable file called "hello-world-gui". Run this with: ``` ./hello-world-gui @@ -439,5 +439,8 @@ Apart from typos that may cause problems compiling or running, there is not much ## Resources ## -1. [Download EFL from here](https://download.enlightenment.org/rel/libs/efl/efl-1.20.6.tar.xz) -2. [Download more examples of code from here](https://git.enlightenment.org/tools/examples.git/tree/tutorial/c) \ No newline at end of file +[EFL Installation Guide](/develop/setup/c/start.md) +:Instructions for installating and using EFL on a variety of operating systems. + +[Tutorial Code Examples](https://git.enlightenment.org/tools/examples.git/tree/tutorial/c) +:Source code for programs included in this and other tutorials. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page navigation changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=34d180154d67057385b1dc84a5e5f8c98d4c33f1 commit 34d180154d67057385b1dc84a5e5f8c98d4c33f1 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Jan 3 08:32:02 2018 -0800 Wiki page navigation changed with summary [] by Gareth Halfacree --- pages/contrib/navigation.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/contrib/navigation.txt b/pages/contrib/navigation.txt index dfd5e2dd6..e988d6a8a 100644 --- a/pages/contrib/navigation.txt +++ b/pages/contrib/navigation.txt @@ -1,7 +1,7 @@ * [[/contrib/start]] * [[/contrib/report-bug.md]] - * [[/contrib/efl-debug]] - * [[/contrib/enlightenment_debugging]] + * [[/contrib/efl-debug.md | Debugging EFL]] + * [[/contrib/enlightenment-debug.md | Debugging Enlightenment]] * [[/contrib/devs/start.md ]] * [[/contrib/devs/coding-conventions.md]] * [[/contrib/devs/git-guide.md]] --
[EGIT] [website/www-content] master 01/01: Wiki page navigation changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=268fbe74590748eebc901f667eecf1f3b9c6121e commit 268fbe74590748eebc901f667eecf1f3b9c6121e Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Jan 3 08:28:01 2018 -0800 Wiki page navigation changed with summary [] by Gareth Halfacree --- pages/contrib/navigation.txt | 4 +-- pages/contrib/reporting_bugs.txt | 67 2 files changed, 2 insertions(+), 69 deletions(-) diff --git a/pages/contrib/navigation.txt b/pages/contrib/navigation.txt index 450e61172..26b1ed3bb 100644 --- a/pages/contrib/navigation.txt +++ b/pages/contrib/navigation.txt @@ -1,5 +1,5 @@ - * [[/contrib/start]] - * [[/contrib/reporting_bugs]] + * [[/contrib/start.md]] + * [[/contrib/report-bug.md]] * [[/contrib/efl-debug]] * [[/contrib/enlightenment_debugging]] * [[/contrib/devs/start.md ]] diff --git a/pages/contrib/reporting_bugs.txt b/pages/contrib/reporting_bugs.txt deleted file mode 100644 index c15f62c2b..0 --- a/pages/contrib/reporting_bugs.txt +++ /dev/null @@ -1,67 +0,0 @@ -~~Title: Reporting Bugs~~ - -# Reporting Bugs ## - -If you think you have found a bug with the Enlightenment Foundation Libraries, Enlightenment, or an official Enlightenment application, please submit a bug report so that it can be investigated and fixed. Before doing so, however, please read through this document to ensure your report arrives at the correct place and with enough information to be acted upon. - -Please remember these key guidelines for a good bug report: - -* Be precise. -* Be clear. -* Only detail one bug per report. -* Only report a bug [on the Phabricator ticketing system](https://phab.enlightenment.org/maniphest/task/edit/form/2/). -* Re-read the report prior to submission. - -## Before Reporting a Bug ## - -If you believe you have found a bug, run through the following steps to make sure you have all the information ready to file a bug report. - -### Reproducing the Bug ### - -Try to reproduce the bug with the latest version of the software. If you are running an older version, particularly one provided by your operating system's package manager rather than compiled from source, it is possible the bug you have encountered has already been resolved. If the issue still exists in the latest version, make sure the bug is reproducible. Double-check that the issue you have encountered is not caused by any custom settings or changes you have made. - -### Checking for Existing Reports ### - -Check the [Phabricator ticketing system](https://phab.enlightenment.org/maniphest/query/all) to see if your bug has already been reported. If you find no existing report, please create one. - -### Notes on Visual Bugs ### - -If reporting a visual bug please make absolutely sure you test under the default theme. EFL developers do not support other themes, and bugs related to other themes must be sent directly to that theme's author for investigation. - -### Debugging Tool Output ### - -If you have gathered a large quantity of output traces during debugging, please attach them to your ticket as file uploads rather than by pasting them into the comment itself. For more information on debugging, please consult [Debugging EFL Applications](/develop/debug/start.md), [EFL Debugging](https://www.enlightenment.org/contrib/efl-debug) and [Enlightenment Debugging](https://www.enlightenment.org/contrib/enlightenment_debugging). - -## Reporting a Bug via Phabricator ## - -Only report bugs in the [Phabricator ticketing system](https://phab.enlightenment.org/maniphest/task/edit/form/2/). Please don't send bug reports and patches to the Enlightenment mailing list, as there is a good chance your report will be lost. If there is more discussion needed around the issue, add a bug report to Phabricator before or after carrying out a discussion on the mailing list. - -The workflow for reporting a bug is as follows: go to the [Phabricator ticketing system](https://phab.enlightenment.org/maniphest/task/edit/form/2/), and fill out at least the following fields: - -* Title - A short one-sentence summary that explains the problem clearly and precisely. -* Assigned To - Leave blank, as the developers will set an assignee. -* CC - Either leave blank or, if you know of interested users, add them here. -* Priority - Leave blank, as this will be set by the developers. -* Select the project(s) in which you found the bug. -* Description - Include in this section: -* Step-by-step instructions for recreating the bug; -* The expected results; -* The actual results; -* Any program errors; -* Short and notable log or trace extracts; -* Any additional information that may assist the developers. -* To attach a log or screenshot click on the Upload File button in the toolbar of the description field. -* Re-read your report to
[EGIT] [website/www-content] master 01/01: Wiki page navigation changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=046bfb865cca253d66b4ceb09113656e242cc96f commit 046bfb865cca253d66b4ceb09113656e242cc96f Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Jan 3 08:28:15 2018 -0800 Wiki page navigation changed with summary [] by Gareth Halfacree --- pages/contrib/navigation.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/contrib/navigation.txt b/pages/contrib/navigation.txt index 26b1ed3bb..dfd5e2dd6 100644 --- a/pages/contrib/navigation.txt +++ b/pages/contrib/navigation.txt @@ -1,4 +1,4 @@ - * [[/contrib/start.md]] + * [[/contrib/start]] * [[/contrib/report-bug.md]] * [[/contrib/efl-debug]] * [[/contrib/enlightenment_debugging]] --
[EGIT] [website/www-content] master 01/01: Wiki page reporting_bugs changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=de9e83aaa0436ff233e1903df4e48a57f2d6f082 commit de9e83aaa0436ff233e1903df4e48a57f2d6f082 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Jan 3 08:24:58 2018 -0800 Wiki page reporting_bugs changed with summary [] by Gareth Halfacree --- pages/contrib/reporting_bugs.txt | 86 +--- 1 file changed, 53 insertions(+), 33 deletions(-) diff --git a/pages/contrib/reporting_bugs.txt b/pages/contrib/reporting_bugs.txt index 883b932f2..c15f62c2b 100644 --- a/pages/contrib/reporting_bugs.txt +++ b/pages/contrib/reporting_bugs.txt @@ -1,47 +1,67 @@ -~~Title: Report bugs~~ - Report Bugs on Phabricator +--- +~~Title: Reporting Bugs~~ +--- -* Be precise -* Be clear -* Only one bug a report -* Only report a bug [[https://phab.enlightenment.org/maniphest/task/edit/form/2/|here]] -* Read what you wrote +# Reporting Bugs ## -=== Before reporting === +If you think you have found a bug with the Enlightenment Foundation Libraries, Enlightenment, or an official Enlightenment application, please submit a bug report so that it can be investigated and fixed. Before doing so, however, please read through this document to ensure your report arrives at the correct place and with enough information to be acted upon. -//**__Can you reproduce the bug?__**// +Please remember these key guidelines for a good bug report: -> Try to reproduce the bug with the latest version of the software, it could already be fixed. If it is not the case, make sure the bug is reproducible, make sure you have not changed a setting somewhere and know the way to get it. +* Be precise. +* Be clear. +* Only detail one bug per report. +* Only report a bug [on the Phabricator ticketing system](https://phab.enlightenment.org/maniphest/task/edit/form/2/). +* Re-read the report prior to submission. -//**__Has someone else already reported the issue?__**// +## Before Reporting a Bug ## -> Check [[https://phab.enlightenment.org/maniphest/query/all|here]] if your bug has already been reported, if not you can report it. +If you believe you have found a bug, run through the following steps to make sure you have all the information ready to file a bug report. -//**__Where to report the bug?__**// +### Reproducing the Bug ### -> Only report bugs [[https://phab.enlightenment.org/maniphest/task/edit/form/2/|here]]. Don't send bug reports and patches to the Enlightenment mailing list, bugs will be lost. If there is more discussion needed add a bug report before or after the discussion on the mailing list. +Try to reproduce the bug with the latest version of the software. If you are running an older version, particularly one provided by your operating system's package manager rather than compiled from source, it is possible the bug you have encountered has already been resolved. If the issue still exists in the latest version, make sure the bug is reproducible. Double-check that the issue you have encountered is not caused by any custom settings or changes you have made. -//**__Is it a visual bug?__**// +### Checking for Existing Reports ### -> If reporting a visual bug, make absolutely sure you test with the default theme. EFL developers do not support other themes, and bug related to other themes must be sent directly to the theme's author. +Check the [Phabricator ticketing system](https://phab.enlightenment.org/maniphest/query/all) to see if your bug has already been reported. If you find no existing report, please create one. -//**__Are there a lot of traces of Valgrind, GDB, etc. for your bug?__**// +### Notes on Visual Bugs ### -> If there is a ton of output traces, please attach them as file uploads. And go check in [[/develop/apps_efl_debugging|Application EFL Debugging]] and [[enlightenment_debugging|Enlightenment Debugging]] sections to get information. +If reporting a visual bug please make absolutely sure you test under the default theme. EFL developers do not support other themes, and bugs related to other themes must be sent directly to that theme's author for investigation. -=== Reporting bugs === +### Debugging Tool Output ### -- Go [[https://phab.enlightenment.org/maniphest/task/edit/form/2/|here]] -- Fill out at least the following fields: -* Title: A short one-sentence summary that explains the problem clearly and precisely -* Assigned to: Ignore it, developers will set an assignee -* CC: Ignore it or if you know interested users you can add them -* Priority: Ignore it, set by developers -* Select the project(s) in which you find the bug -* Description : -- The way for reproducing the bug step by step: Minimized, easy-to-follow steps that will trigger the described problem -- Actual results: Wh
[EGIT] [website/www-content] master 01/01: Wiki page enlightenment-debug.md changed with summary [created] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=53bc68b29177d72b4b172fa211312b8fe0770566 commit 53bc68b29177d72b4b172fa211312b8fe0770566 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Jan 3 07:40:03 2018 -0800 Wiki page enlightenment-debug.md changed with summary [created] by Gareth Halfacree --- pages/contrib/enlightenment-debug.md.txt | 232 +++ 1 file changed, 232 insertions(+) diff --git a/pages/contrib/enlightenment-debug.md.txt b/pages/contrib/enlightenment-debug.md.txt new file mode 100644 index 0..563d54bef --- /dev/null +++ b/pages/contrib/enlightenment-debug.md.txt @@ -0,0 +1,232 @@ +--- +~~Title: Debugging Enlightenment~~ +--- + +# Enlightenment Debugging # + +This tutorial provides information on debugging Enlightenment, and is aimed at developers with prior debugging experience.. It is divided in two sections: + +Before debugging make sure your debug symbols are enabled. If they are not consult the [Get Source documentation](/docs/distros/#Enable_debug_symbols_Optional) for further instructions. + +## Debugging Enlightenment with GDB ## + +In order to use the GNU Debugger (GDB), first simulate a crash in Enlightenment. + +Start by running Enlightenment, then switch to another terminal using CTRL+ALT+F1 for ``tty1``. + +Two processes are of interes: ``enlightenment`` and ``enlightenment_start``. In fact, ``enlightenment`` is traced by ``enlightenment_start``. + +Next send a ``SEGV`` signal to "segfault" Enlightenment. + +```c +kill -SIGSEGV $(pidof enlightenment) +``` + +``enlightenment_start`` will open a pop-up named Enlightenment Error. This pop-up indicates that Enlightenment "segfaulted" and gives the option to recover or log out, but also detaches from the child process (Enlightenment) which allows advanced users to use GDB to debug it. + +Attach GDB to Enlightenment as follows: + +```bash +gdb enlightenment $(pidof enlightenment) +``` + +To save the traces in a log file: + +```bash +#save the traces in log.txt +set logging file log.txt +set logging on +``` + +### Backtracing ### + +Use the backtrace command to get information about frames to know where the segfault is coming from. + +```bash +(gdb) bt +#0 0xb7d539f8 in select () from /lib/tls/libc.so.6 +#1 0xb7dff66a in _XEnq () from /usr/X11R6/lib/libX11.so.6 +#2 0xb7dffa7e in _XRead () from /usr/X11R6/lib/libX11.so.6 +#3 0xb7e01795 in _XReadEvents () from /usr/X11R6/lib/libX11.so.6 +#4 0xb7defa88 in XNextEvent () from /usr/X11R6/lib/libX11.so.6 +#5 0x0809b698 in e_alert_show ( +text=0x80a34f0 "This is very bad. Enlightenment has segfaulted.\nThis +is not meant to happen and is likely a +sign of a\nbug in Enlightenment +or the libraries it relies on.\n\nYou can gdb attach to this process +now to try"...) +at e_alert.c:136 +#6 0x0808f706 in e_sigseg_act (x=11, info=0x80a9fb0, data=0x80aa030) +at e_signals.c:54 +#7 +#8 0xb7d539f8 in select () from /lib/tls/libc.so.6 +#9 0xb7f814ee in _ecore_main_select (timeout=0) +at ecore_main.c:338 +#10 0xb7f819ba in _ecore_main_loop_iterate_internal (once_only=0) +at ecore_main.c:575 +#11 xb7f81a2b in ecore_main_loop_begin () at ecore_main.c:79 +#12 0x08059bb3 in main (argc=1, argv=0xb144) at e_main.c:551 +``` + +As you can see in the stack trace, GDB finds the segfault in ``libc`` and pops to the main function in ``e_main``. But it doesn't seem credible to have a bug in ``libc`` or ``x``; the important thing is Enlightenment has its own segfault handler which is very explicit on frame 5. + +The ``e_sigseg_act()`` function at frame 6 is called directly from the kernel when the program segfaults, meaning Enlightenment causes the segfault. So, the segfault comes from the ``select()`` function (a ``libc`` function) at frame 8 called in ``_e_core_main_select_function()`` at frame 9. + +### Entering a Frame ### + +So, the reason of segfault seems to be at frame 9, when the ``select()`` function is called. Go to frame 9: + +```bash +fr 9 +#9 0xb7f814ee in _ecore_main_select (timeout=0) at ecore_main.c:338 +338ret = select(max_fd + 1, , , , t); +(gdb) l +333 } +334 } +335 #ifndef WIN32 +336if (_ecore_signal_count_get()) return -1; +337 #endif +338ret = select(max_fd + 1, , , , t); +339if (ret < 0) +340 { +341 if (errno ### EINTR) return -1; +342 } +``` + +The first command, ``fr 9``, gives useful information: name of the file, number of the line, the function called, and so on. The second command, ``l``, lists the code around the called function. Another useful command allows to print the variables, the parameters, helping you to find out the problem, a wrong parameter, a null pointer and so on: + +```bash +(gdb) p ret +$1 = -4 +(gdb) p rfds +$2 = {__fds_bits = {128
[EGIT] [website/www-content] master 01/01: Wiki page efl-debug.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=e80b539630cbb86e3d53c6391df6ba8323854d79 commit e80b539630cbb86e3d53c6391df6ba8323854d79 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Jan 3 07:21:00 2018 -0800 Wiki page efl-debug.md changed with summary [] by Gareth Halfacree --- pages/contrib/efl-debug.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/contrib/efl-debug.md.txt b/pages/contrib/efl-debug.md.txt index f841c84f0..cbd35f887 100644 --- a/pages/contrib/efl-debug.md.txt +++ b/pages/contrib/efl-debug.md.txt @@ -1,5 +1,5 @@ --- -~~Title: Debugging~~ +~~Title: Debugging EFL~~ --- # Debugging EFL # --
[EGIT] [website/www-content] master 01/01: Wiki page efl-debug.md changed with summary [created] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=04c68a69795bc8ffad27da540961b3bc8bfc71bd commit 04c68a69795bc8ffad27da540961b3bc8bfc71bd Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Jan 3 07:19:20 2018 -0800 Wiki page efl-debug.md changed with summary [created] by Gareth Halfacree --- pages/contrib/efl-debug.md.txt | 688 + 1 file changed, 688 insertions(+) diff --git a/pages/contrib/efl-debug.md.txt b/pages/contrib/efl-debug.md.txt new file mode 100644 index 0..f841c84f0 --- /dev/null +++ b/pages/contrib/efl-debug.md.txt @@ -0,0 +1,688 @@ +--- +~~Title: Debugging~~ +--- + +# Debugging EFL # + +The following is designed as a quick reference guide for debugging the Enlightenment Foundation Libraries (EFL); it is not exhaustive, and will require previous knowledge of programming and debugging tools. + +## Compilation ## + +You will need to build EFL, Enlightenment and any othe related software to be tested with debugging compile flags. [The Get Source documentation](/docs/distros/start) will have section on this for your build environment. Remember to have ``-g`` as a ``CFLAGS`` option to ensure binaries and libraries have all the debug information required. If you didn't build with debugging, simply build again with these flags correctly set and debugging can begin. + +## EFL Logs ## + +Sometimes you will see logs as follows: + +```bash +CRI<10094>:elementary elm_toolbar.c:1453 _elm_toolbar_elm_widget_theme_apply() Failed to set layout! +*** Backtrace *** +/usr/local/lib/libeina.so.1 0x7f8c2fc0be86 0x7f8c2fbea000 +/usr/local/lib/libeina.so.1 0x7f8c2fc0d1a9 0x7f8c2fbea000 +/usr/local/lib/libelementary.so.1 0x7f8c3028c87d 0x7f8c30072000 +/usr/local/lib/libelementary.so.1 0x7f8c302aa086 0x7f8c30072000 +/usr/local/lib/libelementary.so.1 0x7f8c30288d58 0x7f8c30072000 +/usr/local/lib/libelementary.so.1 0x7f8c3028618c 0x7f8c30072000 +/usr/local/lib/libelementary.so.1 0x7f8c3028f087 0x7f8c30072000 +/usr/local/bin/terminology 0x416d58 0x40 +/usr/local/lib/libevas.so.1 0x7f8c2f3daca6 0x7f8c2f34a000 +/usr/local/lib/libeo.so.1 0x7f8c2e5ed37b 0x7f8c2e5e +/usr/local/lib/libeo.so.1 0x7f8c2e5ebbcb 0x7f8c2e5e +/usr/local/lib/libevas.so.1 0x7f8c2f3dceaa 0x7f8c2f34a000 +/usr/local/lib/libedje.so.1 0x7f8c2e87d5e1 0x7f8c2e7f8000 +/usr/local/lib/libedje.so.1 0x7f8c2e8837a7 0x7f8c2e7f8000 +/usr/local/lib/libedje.so.1 0x7f8c2e87e90f 0x7f8c2e7f8000 +/usr/local/lib/libedje.so.1 0x7f8c2e87eab7 0x7f8c2e7f8000 +/usr/local/lib/libecore.so.10x7f8c2f122d0b 0x7f8c2f11 +/usr/local/lib/libecore.so.10x7f8c2f11d775 0x7f8c2f11 +/usr/local/lib/libecore.so.10x7f8c2f1251f8 0x7f8c2f11 +/usr/local/lib/libecore.so.10x7f8c2f1253d7 0x7f8c2f11 +/usr/local/bin/terminology 0x4138b7 0x40 +/usr/local/bin/terminology 0x40c74c 0x40 +/usr/lib/libc.so.6 0x7f8c2c675800 0x7f8c2c655000 +``` + +This log shows EFL logging a critical error. There are various levels of error: critical, error, warning and debug are the main ones, but by default you should normally only see ``CRI`` (critical) and ``ERR`` error levels. + +Following the error, which includes the name of the source file and the line number on which the error was encountered, is a full backtrace. This is not generally human readable, because making it so is relatively costly so is not done at runtime. A utility to parse the backtrace for readability is provided: ``eina_btlog``. Simply do the following: + +```bash +cat > mybacktrace.txt +# copy and paste the above lines following *** Backtrace *** that start with file paths +# now hit CTRL+D to end input +cat mybacktrace.txt | eina_btlog +``` + +This tool will output a colorized log, as below, that humans can easily read. This is the log a developer needs in order to identify the full path used to trigger the issue, with functions called from the bottom to the top of the stack - so the newest functions called are at the top of this log - and with file paths,line numbers, and even binary files listed. + +```bash +/usr/local/lib/libeina.so.1 |/efl/src/lib/eina/eina_log.c : 1875 @ eina_log_print_cb_stderr() +/usr/local/lib/libeina.so.1 |/efl/src/lib/eina/eina_log.c : 1272 @ eina_log_print_unlocked() +/usr/local/lib/libelementary.so.1 | /elementary/src/lib/elm_toolbar.c : 1453 @ _elm_toolbar_elm_widget_theme_apply() +/usr/local/lib/libelementary.so.1 | /elementary/src/lib/elm_widget.eo.c : 451 @ elm_obj_widget_theme_apply() +/usr/local/lib/libelementary.so.1 | /elementary/src/lib/elm_toolbar.c : 2949 @ _elm_toolbar_icon_size_set() +/usr/local/lib/libelementary.so.1 | /elementary/src/lib/elm_toolbar.eo.c : 56 @ elm_obj_toolbar_icon_s
[EGIT] [website/www-content] master 01/01: Wiki page report-bug.md changed with summary [created] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=0fdeb9e11179f89c45424227d9d48cbe531a37ba commit 0fdeb9e11179f89c45424227d9d48cbe531a37ba Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Jan 3 06:41:07 2018 -0800 Wiki page report-bug.md changed with summary [created] by Gareth Halfacree --- pages/contrib/report-bug.md.txt | 67 + 1 file changed, 67 insertions(+) diff --git a/pages/contrib/report-bug.md.txt b/pages/contrib/report-bug.md.txt new file mode 100644 index 0..c15f62c2b --- /dev/null +++ b/pages/contrib/report-bug.md.txt @@ -0,0 +1,67 @@ +--- +~~Title: Reporting Bugs~~ +--- + +# Reporting Bugs ## + +If you think you have found a bug with the Enlightenment Foundation Libraries, Enlightenment, or an official Enlightenment application, please submit a bug report so that it can be investigated and fixed. Before doing so, however, please read through this document to ensure your report arrives at the correct place and with enough information to be acted upon. + +Please remember these key guidelines for a good bug report: + +* Be precise. +* Be clear. +* Only detail one bug per report. +* Only report a bug [on the Phabricator ticketing system](https://phab.enlightenment.org/maniphest/task/edit/form/2/). +* Re-read the report prior to submission. + +## Before Reporting a Bug ## + +If you believe you have found a bug, run through the following steps to make sure you have all the information ready to file a bug report. + +### Reproducing the Bug ### + +Try to reproduce the bug with the latest version of the software. If you are running an older version, particularly one provided by your operating system's package manager rather than compiled from source, it is possible the bug you have encountered has already been resolved. If the issue still exists in the latest version, make sure the bug is reproducible. Double-check that the issue you have encountered is not caused by any custom settings or changes you have made. + +### Checking for Existing Reports ### + +Check the [Phabricator ticketing system](https://phab.enlightenment.org/maniphest/query/all) to see if your bug has already been reported. If you find no existing report, please create one. + +### Notes on Visual Bugs ### + +If reporting a visual bug please make absolutely sure you test under the default theme. EFL developers do not support other themes, and bugs related to other themes must be sent directly to that theme's author for investigation. + +### Debugging Tool Output ### + +If you have gathered a large quantity of output traces during debugging, please attach them to your ticket as file uploads rather than by pasting them into the comment itself. For more information on debugging, please consult [Debugging EFL Applications](/develop/debug/start.md), [EFL Debugging](https://www.enlightenment.org/contrib/efl-debug) and [Enlightenment Debugging](https://www.enlightenment.org/contrib/enlightenment_debugging). + +## Reporting a Bug via Phabricator ## + +Only report bugs in the [Phabricator ticketing system](https://phab.enlightenment.org/maniphest/task/edit/form/2/). Please don't send bug reports and patches to the Enlightenment mailing list, as there is a good chance your report will be lost. If there is more discussion needed around the issue, add a bug report to Phabricator before or after carrying out a discussion on the mailing list. + +The workflow for reporting a bug is as follows: go to the [Phabricator ticketing system](https://phab.enlightenment.org/maniphest/task/edit/form/2/), and fill out at least the following fields: + +* Title - A short one-sentence summary that explains the problem clearly and precisely. +* Assigned To - Leave blank, as the developers will set an assignee. +* CC - Either leave blank or, if you know of interested users, add them here. +* Priority - Leave blank, as this will be set by the developers. +* Select the project(s) in which you found the bug. +* Description - Include in this section: +* Step-by-step instructions for recreating the bug; +* The expected results; +* The actual results; +* Any program errors; +* Short and notable log or trace extracts; +* Any additional information that may assist the developers. +* To attach a log or screenshot click on the Upload File button in the toolbar of the description field. +* Re-read your report to check for clarity, then click Create Task. + +## Further Reading ## + +[Debugging EFL Applications](/develop/debug/start.md) +:A guide to debugging applications written with EFL. + +[EFL Debugging](https://www.enlightenment.org/contrib/efl-debug) +:A guide to debugging EFL itself. + +[Enlightenment Debugging](https://www.enlightenment.org/contrib/enlightenment_debugging) +:A guide to debugging Enlightenment. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=d23a1cc10d5cb1166060b45c31c27a252a67af6c commit d23a1cc10d5cb1166060b45c31c27a252a67af6c Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Jan 3 05:37:23 2018 -0800 Wiki page start.md changed with summary [] by Gareth Halfacree --- pages/develop/start.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/start.md.txt b/pages/develop/start.md.txt index 3df6b3072..6a2bb5d76 100644 --- a/pages/develop/start.md.txt +++ b/pages/develop/start.md.txt @@ -25,7 +25,7 @@ In all cases, the language to which a particular document applies will be indica A full list of the languages available is available on the landing page for each section. -## Setting up the Development Environment [TODO] ## +## Setting up the Development Environment ## Information on downloading EFL and configuring a development environment can be found in the [Setup section](setup/). --
[EGIT] [website/www-content] master 01/01: Wiki page fedora.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=ad132351d212d6c783ca4d76d9c4b15e8eaa504e commit ad132351d212d6c783ca4d76d9c4b15e8eaa504e Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 07:18:00 2018 -0800 Wiki page fedora.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/fedora.md.txt | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/pages/develop/setup/c/fedora.md.txt b/pages/develop/setup/c/fedora.md.txt index f7cfadd32..a909f2a16 100644 --- a/pages/develop/setup/c/fedora.md.txt +++ b/pages/develop/setup/c/fedora.md.txt @@ -187,21 +187,6 @@ If you get errors when you compile the examples in this guide you may be using a If you are having problems compiling and installing EFL, you can come and seek advice on any of [our IRC channels](https://www.enlightenment.org/contact) or [post a ticket to our Phabricator](https://phab.enlightenment.org). -## Installing on Other Distros ## +## Installing on Other Operating Systems ## -If you would like to install EFL on a different version of Linux, visit the link for your chosen distro: - -[Arch]() -:Arch derivatives such as Manjaro, Antergos, etc. - -[Debian]() -:And derivatives. - -[openSUSE]() -:Includes Tumbleweed and Leap. - -[Fedora]() -:Includes other Red Hat derivatives such as CentOS, Scientific, etc. - -[Ubuntu]() -:Also Mint, KDE Neon and other Ubuntu derivatives. \ No newline at end of file +If you would like to install EFL on a different operating system visit the [Setting up a C Development Environment page](start.md). \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page navigation changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=6befe6028ee2ab690a1a9f87a26ce44a6f748f24 commit 6befe6028ee2ab690a1a9f87a26ce44a6f748f24 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:41:47 2018 -0800 Wiki page navigation changed with summary [] by Gareth Halfacree --- pages/develop/navigation.txt | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pages/develop/navigation.txt b/pages/develop/navigation.txt index 079e978f7..d8183eec9 100644 --- a/pages/develop/navigation.txt +++ b/pages/develop/navigation.txt @@ -1,6 +1,12 @@ * [[/develop/start.md] | Developing with EFL]] * [[/develop/setup/start.md | Setting Up EFL]] -* [[/develop/setup/c/start.md | EFL for C Development [TODO]]] +* [[/develop/setup/c/start.md | Installing EFL for C Dev]] + *[[/develop/setup/c/ubuntu.md | Installing on Ubuntu]] + *[[/develop/setup/c/arch.md | Installing on Arch]] + *[[/develop/setup/c/debian.md | Installing on Debian]] + *[[/develop/setup/c/fedora.md | Installing on Fedora]] + *[[/develop/setup/c/freebsd.md | Installing on FreeBSD]] + *[[/develop/setup/c/opensuse.md | Installing on openSUSE]] * [[/develop/tutorials/ | Tutorials]] * [[/develop/legacy/tutorial/ | Stable API Tutorials]] * [[/develop/tutorials/c/start.md | Beta API Tutorials [C]]] --
[EGIT] [website/www-content] master 01/01: Wiki page arch.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=81fafda6f1260fcf2ef85fdf4902970ee2ce11c8 commit 81fafda6f1260fcf2ef85fdf4902970ee2ce11c8 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:38:49 2018 -0800 Wiki page arch.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/arch.md.txt | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/pages/develop/setup/c/arch.md.txt b/pages/develop/setup/c/arch.md.txt index 153beab05..309724938 100644 --- a/pages/develop/setup/c/arch.md.txt +++ b/pages/develop/setup/c/arch.md.txt @@ -230,21 +230,6 @@ If you see errors when you compile the examples in this guide you may be using a If you are having problems compiling and installing EFL you can find help on [our IRC channels](https://www.enlightenment.org/contact) or [post a ticket to our Phabricator](https://phab.enlightenment.org). -## Installing on Other Distros ## +## Installing on Other Operating Systems ## -If you would like to install EFL on a different version of Linux, click the link for your chosen distro: - -[Arch]() -:Arch derivatives such as Manjaro, Antergos, etc. - -[Debian]() -:And derivatives. - -[openSUSE]() -:Includes Tumbleweed and Leap. - -[Fedora]() -:Includes other Red Hat derivatives such as CentOS, Scientific, etc. - -[Ubuntu]() -:Also Mint, neon and other Ubuntu derivatives. +If you would like to install EFL on a different operating system visit the [Setting up a C Development Environment page](start.md). \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page debian.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=8a35863d83287ee7be9191ec909b7fbcbd9f7427 commit 8a35863d83287ee7be9191ec909b7fbcbd9f7427 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:38:36 2018 -0800 Wiki page debian.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/debian.md.txt | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/pages/develop/setup/c/debian.md.txt b/pages/develop/setup/c/debian.md.txt index 1400d38d2..b2a378a5e 100644 --- a/pages/develop/setup/c/debian.md.txt +++ b/pages/develop/setup/c/debian.md.txt @@ -164,21 +164,6 @@ If you see any errors when you compile the examples in this guide you may be usi If you're having problems compiling and installing EFL, you can find help on any of [our IRC channels](https://www.enlightenment.org/contact) or [post a ticket to our Phabricator](https://phab.enlightenment.org). -## Installing on Other Distros ## +## Installing on Other Operating Systems ## -If you would like to install EFL on a different version of Linux, visit the link for your chosen distro: - -[Arch]() -:Arch derivatives such as Manjaro, Antergos, etc. - -[Debian]() -:And derivatives. - -[openSUSE]() -:Includes Tumbleweed and Leap. - -[Fedora]() -:Includes other Red Hat derivatives such as CentOS, Scientific, etc. - -[Ubuntu]() -:Also Mint, neon and other Ubuntu derivatives. \ No newline at end of file +If you would like to install EFL on a different operating system visit the [Setting up a C Development Environment page](start.md). \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page macos.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=672f0f515097f9316d3f3222da675b632a380afc commit 672f0f515097f9316d3f3222da675b632a380afc Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:39:23 2018 -0800 Wiki page macos.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/macos.md.txt | 4 1 file changed, 4 insertions(+) diff --git a/pages/develop/setup/c/macos.md.txt b/pages/develop/setup/c/macos.md.txt index 8a283a70b..59acc8dcb 100644 --- a/pages/develop/setup/c/macos.md.txt +++ b/pages/develop/setup/c/macos.md.txt @@ -169,3 +169,7 @@ If the compilation is successful this will create an executable application call If you get errors when you compile the examples in this guide, you may be using an out of date version of EFL. Update your libraries installing from [EFL's git repository](#Installing_From_Git). If you are having problems compiling with installing EFL, you can also find help on any of [our IRC channels](https://www.enlightenment.org/contact) or [post a ticket to our Phabricator](https://phab.enlightenment.org). + +## Installing on Other Operating Systems ## + +If you would like to install EFL on a different operating system visit the [Setting up a C Development Environment page](start.md). --
[EGIT] [website/www-content] master 01/01: Wiki page freebsd.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=8a6769295001c40d408df0a3ec9e475e1a145ecf commit 8a6769295001c40d408df0a3ec9e475e1a145ecf Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:38:22 2018 -0800 Wiki page freebsd.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/freebsd.md.txt | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/pages/develop/setup/c/freebsd.md.txt b/pages/develop/setup/c/freebsd.md.txt index b3667e504..d6de63a88 100644 --- a/pages/develop/setup/c/freebsd.md.txt +++ b/pages/develop/setup/c/freebsd.md.txt @@ -183,21 +183,6 @@ If you get errors when you compile the examples in this guide, you may be using If you are having problems compiling and installing EFL you can find help on any of [our IRC channels](https://www.enlightenment.org/contact) or [post a ticket to our Phabricator](https://phab.enlightenment.org). -## Installing on Other Distros ## +## Installing on Other Operating Systems ## -If you would like to install EFL on Linux, visit the link for your chosen distro: - -[Arch]() -:Arch derivatives such as Manjaro, Antergos, etc. - -[Debian]() -:And derivatives. - -[openSUSE]() -:Includes Tumbleweed and Leap. - -[Fedora]() -:Includes other Red Hat derivatives such as CentOS, Scientific, etc. - -[Ubuntu]() -:Also Mint, neon and other Ubuntu derivatives. +If you would like to install EFL on a different operating system visit the [Setting up a C Development Environment page](start.md). \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page ubuntu.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=5fdfa08d69aa8b6b63c8bf44dc0597a0b636ad10 commit 5fdfa08d69aa8b6b63c8bf44dc0597a0b636ad10 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:38:05 2018 -0800 Wiki page ubuntu.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/ubuntu.md.txt | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/pages/develop/setup/c/ubuntu.md.txt b/pages/develop/setup/c/ubuntu.md.txt index 1355d4541..e69ad28af 100644 --- a/pages/develop/setup/c/ubuntu.md.txt +++ b/pages/develop/setup/c/ubuntu.md.txt @@ -189,21 +189,6 @@ If you get errors when you compile the examples in this guide, you may be using If you are having problems compiling and installing EFL, you can come and seek advice on the [any of our IRC channels](https://www.enlightenment.org/contact) or [post a ticket to our Phabricator](https://phab.enlightenment.org). -## Installing on Other Distros ## +## Installing on Other Operating Systems ## -If you would like to install EFL on a different distro, visit the link for the distro you want: - -[Arch]() -:Arch derivatives such as Manjaro, Antergos, etc. - -[Debian]() -:And derivatives. - -[openSUSE]() -:Includes Tumbleweed and Leap. - -[Fedora]() -:Includes other Red Hat derivatives such as CentOS, Scientific, etc. - -[Ubuntu]() -:Also Mint, neon and other Ubuntu derivatives. +If you would like to install EFL on a different operating system visit the [Setting up a C Development Environment page](start.md). \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page opensuse.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=a4f9df3c77cea55ff8fb6ef672a6c3b93777aa14 commit a4f9df3c77cea55ff8fb6ef672a6c3b93777aa14 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:37:52 2018 -0800 Wiki page opensuse.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/opensuse.md.txt | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/pages/develop/setup/c/opensuse.md.txt b/pages/develop/setup/c/opensuse.md.txt index b58541430..5cb4e020c 100644 --- a/pages/develop/setup/c/opensuse.md.txt +++ b/pages/develop/setup/c/opensuse.md.txt @@ -191,21 +191,6 @@ If you get errors when you compile the examples in this guide, you may be using If you are having problems compiling and installing EFL, you can come and seek advice on any of [our IRC channels](https://www.enlightenment.org/contact) or [post a ticket to our Phabricator](https://phab.enlightenment.org). -## Installing on Other Distros ## +## Installing on Other Operating Systems ## -If you would like to install EFL on a different distro, visit the link for the distro you want: - -[Arch]() -:Arch derivatives such as Manjaro, Antergos, etc. - -[Debian]() -:And derivatives. - -[openSUSE]() -:Includes Tumbleweed and Leap. - -[Fedora]() -:Includes other Red Hat derivatives such as CentOS, Scientific, etc. - -[Ubuntu]() -:Includes Mint, neon and other Ubuntu derivatives. +If you would like to install EFL on a different operating system visit the [Setting up a C Development Environment page](start.md). \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=a4a81c50b6fbfaf5fd33ac387f917e0d8a1c6a67 commit a4a81c50b6fbfaf5fd33ac387f917e0d8a1c6a67 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:36:48 2018 -0800 Wiki page start.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/start.md.txt | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pages/develop/setup/c/start.md.txt b/pages/develop/setup/c/start.md.txt index 5e12c425f..b62336145 100644 --- a/pages/develop/setup/c/start.md.txt +++ b/pages/develop/setup/c/start.md.txt @@ -8,11 +8,9 @@ Installing the Enlightenment Foundation Libraries for C development is a simple ## Operating Systems ## -* Ubuntu -* Arch Linux -* Debian -* Fedora -* FreeBSD -* openSUSE -* Yocto -* Mac OS X +* [Ubuntu](ubuntu.md) +* [Arch Linux](arch.md) +* [Debian](debian.md) +* [Fedora](fedora.md) +* [FreeBSD](freebsd.md) +* [openSUSE](opensuse.md) \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page opensuse.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=8da7ab082b07a539ce11cf88a6dabb3a3cbd028b commit 8da7ab082b07a539ce11cf88a6dabb3a3cbd028b Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:35:44 2018 -0800 Wiki page opensuse.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/opensuse.md.txt | 211 ++ 1 file changed, 211 insertions(+) diff --git a/pages/develop/setup/c/opensuse.md.txt b/pages/develop/setup/c/opensuse.md.txt new file mode 100644 index 0..b58541430 --- /dev/null +++ b/pages/develop/setup/c/opensuse.md.txt @@ -0,0 +1,211 @@ +--- +~~Title: Installing EFL on openSUSE ~~ +--- + +# Installing EFL on openSUSE # + +[The *Enlightenment Foundation Libraries (EFL)*](/about-efl.md) power millions of systems from mobile phones to set-top boxes, desktops, laptops, game systems and more. You'll need EFL if you want to develop apps for Enlightenment and for any of the devices that use Enlightenment for its visual interface. + +This tutorial describes several ways to install EFL on your system. You will only need to use one of these. Select your chosen method using the index on the right. + +Many distributions offer EFL as an installable package from their default repositories. In this case you only need to use your distribution's software management system to install. However most versions of EFL in default repositories are out of date and will not compile more recent Enlightenment applications. If this is not an issue for you, read through the ["From Distribution Repositories"](#From_Distribution_Repositories) section below. + +Distributions often provide a special repository maintained by users or a method of integrating a bleeding edge version of EFL with your software management system. This means that once installed you can keep EFL current just by running system updates. If your distribution offers this, take a look at the section ["Installing from a Special Repository"](#Installing_from_a_Special_Repository). + +The Enlightenment developers provide a pre-packaged source of EFL. Although not bleeding edge it is up to date and considered stable for production environments. You can download, compile and install it yourself by following the instructions in ["Installing from Packaged Source"](#Installing_from_Packaged_Source). + +You can also download the source code for the most recent version from the EFL git repositories. This will provide you with the latest code, which is updated on a nightly basis. To get started, read the section ["Installing from Git"](#Installing_from_Git). + +Whichever installation method you use, visit ["Compiling EFL Applications"](#Compiling_EFL_Applications) to discover how to compile your Enlightenment applications. + +## From Distribution Repositories ## + +openSUSE happens to have quite a good support for EFL and you can install all the items you need from openSUSE's official repository: + +```bash +sudo zypper efl +``` + +This will give you a working EFL installation. + +However, the version in openSUSE's official repositories may lag behind the latest version of EFL and give you problems when trying to compile examples from tutorials in this documentation. If this is the case, it is advised you install a more recent version of EFL following one of the methods below. + +## Installing from a Special Repository ## + +You can also install the latest EFL using a special repository. Add it to your regular repositories with: + +```bash +sudo zypper ar https://download.opensuse.org/repositories/X11:/Enlightenment:/Nightly/openSUSE_Tumbleweed/x86_64/ Enlightenment_Nightly +``` +Refresh your repositories: + +```bash +sudo zypper ref +``` + +And then install EFL and its development libraries: + +```bash +sudo zypper in efl efl-devel +``` +Note that the version in the Nightly repositories may lag behind the official Nightly by about 24 hours. This shouldn't be a big deal in most circumstances. + +## Installing from Packaged Source ## + +There are two versions available form the Enlightenment website. One is a packaged and available from the [EFL's download site](https://download.enlightenment.org/rel/libs/efl/). The other is the nightly bleeding edge version which you can [download using git](#Installing_from_Git). This section deals with installing with the packaged version available from the [EFL's download site](https://download.enlightenment.org/rel/libs/efl/). + +### Step 1: Downloading Stable Version ### + +[Download the latest version of EFL](https://download.enlightenment.org/rel/libs/efl/) and check it against its SHA256 hash: + +```bash +wget https://download.enlightenment.org/rel/libs/efl/efl-X.XX.X.tar.xz +wget https://download.enlightenment.org/rel/libs/efl/efl-X.XX.X.tar.xz.sha256 +cat efl-X.XX.X
[EGIT] [website/www-content] master 01/01: Wiki page macos.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=0388c588e8bfb07e3f50f4cca31efd1bdc922d3e commit 0388c588e8bfb07e3f50f4cca31efd1bdc922d3e Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:34:33 2018 -0800 Wiki page macos.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/macos.md.txt | 171 + 1 file changed, 171 insertions(+) diff --git a/pages/develop/setup/c/macos.md.txt b/pages/develop/setup/c/macos.md.txt new file mode 100644 index 0..8a283a70b --- /dev/null +++ b/pages/develop/setup/c/macos.md.txt @@ -0,0 +1,171 @@ +--- +~~Title: Installing EFL on macOS~~ +~~NOCACHE~~ +--- + +# Installing EFL on macOS # + +> **NOTE:** +> The Enlightenment (Desktop Manager) is not supported on macOS and there are no plans to do so in the near future. Please [contact us](https://www.enlightenment.org/contrib/start) if you'd like to help with this. + +[The *Enlightenment Foundation Libraries (EFL)*](/about-efl.md) power millions of systems from mobile phones to set-top boxes, desktops, laptops, game systems and more. You will need EFL if you want to develop apps for Enlightenment and for any of the devices that use Enlightenment for its visual interface. + +This tutorial describes two ways of installing EFL on your system. You will only need one so use the index on the right to navigate to the most useful method for you. + +The Enlightenment Foundation's projects mostly targets Linux platforms therefore not everything work on macOS works the first time. This is due to the specific requirements of macOS (kernel+userland) and the fact that there are very few 'Englightened' macOS users. + +This document explains how to install EFL using either the [Homebrew package manager](https://brew.sh/) or by building from source via git. + +Whichever installation method you use, read through the section on [Compiling EFL Applications](#Compiling_EFL_Applications) to find out more about building apps. + +## Install EFL with Homebrew ## + +Homebrew is an unofficial package manager for macOS which you can install a number of programs that aren't available in macOS by default. + +To install Homebrew open Terminal in macOS and run: + +```bash +/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +``` + +The script will prompt you through the install process. Feel free to visit the [Homebrew website](https://docs.brew.sh/Installation.html) for more information on fine tuning the installation. + +Homebrew should run an update prior to installing any new software but double check this by running: + +```bash +brew update +``` + +Next install EFL with: + +```bash +brew install efl +``` + +The distributed version of EFL is [1.20.6](http://braumeister.org/formula/efl). + +## Installing from Git ## + +Installing EFL manually is broadly a three step process. Firstly you need to have the macOS *Command Line Tools (CLT)* installed on your system, then install the necessary software dependencies. You can then configure and compile the EFL source code. + +### Step 1: Install Command Line Tools ### + +If you've already installed [XCode](https://developer.apple.com/xcode/) via the Mac App Store, the command line tools are already embedded in the *Integrated Development Environment (IDE)*. Failing this, install the CLT by opening Terminal then run: + +```bash +xcode-select --install +``` + +### Step 2: Installing Dependencies ### + +The easiest way to install the necessary software dependencies is to use a package manager like Homebrew. If you haven't already installed it do so now by opening Terminal and running: + +```bash +/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +``` + +The script will prompt you through the install process. Feel free to visit the [Homebrew website](https://docs.brew.sh/Installation.html) for more information on fine tuning the installation. + +Homebrew should run an update prior to installing any new software but double check this by running: + +```bash +brew update +``` + +Next install the dependencies with: + +```bash +brew install autoconf automake libtool autoconf-archive gettext check pkg-config luajit jpeg freetype fribidi fontconfig giflib libtiff glib dbus libsndfile bullet libspectre libraw librsvg poppler gstreamer gst-plugins-good pulseaudio +brew migrate dbus +``` +If you're using a fresh install of macOS, create a 'LaunchAgents' folder for your own account if it doesn't exist already: + +```bash +mkdir -p ~/Library/LaunchAgents +``` + +Next use ``launchctl`` to automatically start and stop ``dbus``: + +```bash +ln -sfv /usr/local/opt/dbus/*.plist ~/Library/LaunchAgents +launchctl load ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist +``` + +If you want to
[EGIT] [website/www-content] master 01/01: Wiki page ubuntu.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=92aa73e2d3d37f4483b9c38788bf88270a080f3a commit 92aa73e2d3d37f4483b9c38788bf88270a080f3a Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:33:37 2018 -0800 Wiki page ubuntu.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/ubuntu.md.txt | 209 1 file changed, 209 insertions(+) diff --git a/pages/develop/setup/c/ubuntu.md.txt b/pages/develop/setup/c/ubuntu.md.txt new file mode 100644 index 0..1355d4541 --- /dev/null +++ b/pages/develop/setup/c/ubuntu.md.txt @@ -0,0 +1,209 @@ +--- +~~Title: Installing EFL on Ubuntu ~~ +--- + +# Installing EFL on Ubuntu # +[The *Enlightenment Foundation Libraries (EFL)*](/about-efl.md) power millions of systems from mobile phones to set-top boxes, desktops, laptops, game systems and more. You'll need EFL if you want to develop apps for Enlightenment and for any of the devices that use Enlightenment for its visual interface. + +This tutorial describes several ways to install EFL on your system. You will only need to use one of these. Select your chosen method using the index on the right. + +Many distributions offer EFL as an installable package from their default repositories. In this case you only need to use your distribution's software management system to install. However most versions of EFL in default repositories are out of date and will not compile more recent Enlightenment applications. If this is not an issue for you, read through the ["From Distribution Repositories"](#From_Distribution_Repositories) section below. + +Distributions often provide a special repository maintained by users or a method of integrating a bleeding edge version of EFL with your software management system. This means that once installed you can keep EFL current just by running system updates. If your distribution offers this, take a look at the section ["Installing from a Special Repository"](#Installing_from_a_Special_Repository). + +The Enlightenment developers provide a pre-packaged source of EFL. Although not bleeding edge it is up to date and considered stable for production environments. You can download, compile and install it yourself by following the instructions in ["Installing from Packaged Source"](#Installing_from_Packaged_Source). + +You can also download the source code for the most recent version from the EFL git repositories. This will provide you with the latest code, which is updated on a nightly basis. To get started, read the section ["Installing from Git"](#Installing_from_Git). + +Whichever installation method you use, visit ["Compiling EFL Applications"](#Compiling_EFL_Applications) to discover how to compile your Enlightenment applications. + +## From Distribution repos ## + +EFL is not available in Ubuntu's official repositories, but you can install all the items you need from a special PPA repository. [See below for instructions on how to do that](#Installing_from_a_Special_Repository). + +## Installing from a Special Repository ## + +To install the latest EFL available from a special Ubuntu PPA repository, add the new repository with: + +```bash +sudo add-apt-repository ppa:niko2040/e19 +``` +Refresh your repositories: + +```bash +sudo apt-get update +``` + +And then install EFL and its development libraries: + +```bash +sudo apt-get install libefl-dev +``` + +Ubuntu does not install by default the *gcc* compiler, so, before you can [compile any apps](#Compiling_EFL_Applications), you will need to install that too: + +```bash +sudo apt-get install gcc +``` + +Also note that, due to EFL's fast development rate, it is unlikely the PPA will provide by default the latest version of EFL. This means that many of the examples in this documentation will probably need tweaking to work. If you would like to install an up to date version of EFL, see the [Installing from Source](#Installing_from_Source) section below or the instructions for [Installing from Git](#Installing_from_Git), also available below. + +## Installing from Packaged Source ## + +There are two versions available form the Enlightenment website. One is a packaged and available from the [EFL's download site](https://download.enlightenment.org/rel/libs/efl/). The other is the nightly bleeding edge version which you can [download using git](#Installing_from_Git). This section deals with installing with the packaged version available from the [EFL's download site](https://download.enlightenment.org/rel/libs/efl/). + +### Step 1: Downloading Stable Version ### + +[Download the latest version of EFL](https://download.enlightenment.org/rel/libs/efl/) and check it against its SHA256 hash: + +```bash +wget https://download.enlightenment.org/rel/libs/efl/efl-X.XX.X.tar.xz +wget https://download
[EGIT] [website/www-content] master 01/01: Wiki page freebsd.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=c88791951b67af691e1f7dec85c22fc6882176c3 commit c88791951b67af691e1f7dec85c22fc6882176c3 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:33:01 2018 -0800 Wiki page freebsd.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/freebsd.md.txt | 203 +++ 1 file changed, 203 insertions(+) diff --git a/pages/develop/setup/c/freebsd.md.txt b/pages/develop/setup/c/freebsd.md.txt new file mode 100644 index 0..b3667e504 --- /dev/null +++ b/pages/develop/setup/c/freebsd.md.txt @@ -0,0 +1,203 @@ +--- +~~Title: Installing EFL on FreeBSD~~ +~~NOCACHE~~ +--- + +# Installing EFL on FreeBSD # + +[The *Enlightenment Foundation Libraries (EFL)*](/about-efl.md) power millions of systems from mobile phones to set-top boxes, desktops, laptops, game systems and more. You'll need EFL if you want to develop apps for Enlightenment and for any of the devices that use Enlightenment for its visual interface. + +This tutorial describes several ways to install EFL on your system. You will only need to use one of these. Select your chosen method using the index on the right. + +Many distributions offer EFL as an installable package from their default repositories. In this case you only need to use your distribution's software management system to install. However most versions of EFL in default repositories are out of date and will not compile more recent Enlightenment applications. If this is not an issue for you read through the ["From Distribution Repositories"](#From_Distribution_Repositories) section below. + +The Enlightenment developers provide a pre-packaged source of EFL. Although not bleeding edge it is up to date and considered stable for production environments. You can download, compile and install it yourself by following the instructions in ["Installing from Packaged Source"](#Installing_from_Packaged_Source). + +You can also download the source code for the most recent version from the EFL git repositories. This will provide you with the latest code, which is updated on a nightly basis. To get started, read the section ["Installing from Git"](#Installing_from_Git). + +Whichever installation method you use, visit ["Compiling EFL Applications"](#Compiling_EFL_Applications) to discover how to compile your Enlightenment applications. + +## From Distribution Repositories ## + +FreeBSD contains an instance of the EFL package in its official repositories. To install it run the following command as root: + +```bash +pkg install efl +``` + +This will give you a working EFL installation. + +The version in FreeBSD's official repositories may lag behind the latest version of EFL and give you problems when trying to compile examples from tutorials in this documentation. If this is the case, install a more recent version of EFL using one of the methods below. + +## Installing from Packaged Source ## + +There are two versions of EFL available from the Enlightenment website. One is the nightly bleeding edge version which you can [download using git](#Installing_from_Git). The other is packaged and available from the [EFL download page](https://download.enlightenment.org/rel/libs/efl/), which is the focus of this section. + +### Step 1: Downloading Stable Version ### + +[Download the latest version of EFL](https://download.enlightenment.org/rel/libs/efl/) and check it against its SHA256 hash: + +```bash +wget --no-check-certificate https://download.enlightenment.org/rel/libs/efl/efl-X.XX.X.tar.xz +wget --no-check-certificate https://download.enlightenment.org/rel/libs/efl/efl-X.XX.X.tar.xz.sha256 +cat efl-X.XX.X.tar.xz.sha256; sha256sum efl-X.XX.X.tar.xz +``` + +Note that you'll need to change ``X.XX.X`` to the actual version of EFL e.g. efl-1.20.6.tar.xz + +### Step 2: Unpacking ### + +Once you've downloaded the archive file containing EFL to your hard drive unpack it with: + +```bash +tar xvf efl-X.XX.X.tar.xz +``` + +This will produce a folder named *efl-X.XX.X*. + +### Step 3: Installing Dependencies ### + +To compile from source you'll need *gcc* and few more GNU tools: + +```bash +su +pkg install gcc automake gmake pkgconf +``` + +Next install the software packages required by EFL: + +```bash +su +pkg install check pkgconfig doxygen openssl jpeg gstreamer1 luajit fribidi tiff poppler libspectre libraw librsvg2 pulseaudio libXcursor libXcomposite libXinerama libXrandr libXScrnSaver bullet gstreamer1-plugins +``` + +### Step 4: Building and Installing ### + +Once you have installed all the required packages ``cd`` into the *efl-X.XX.X* folder and run + +```bash +./configure +gmake +su +gmake install +``` + +This will configure the files needed for compiling, compile the software itself and then install it. + +### Step 5: Carr
[EGIT] [website/www-content] master 01/01: Wiki page debian.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=cef9a3719cc519e1c1dec1e940cbf5895cffb09e commit cef9a3719cc519e1c1dec1e940cbf5895cffb09e Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:32:38 2018 -0800 Wiki page debian.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/debian.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/setup/c/debian.md.txt b/pages/develop/setup/c/debian.md.txt index 3b18f23b5..1400d38d2 100644 --- a/pages/develop/setup/c/debian.md.txt +++ b/pages/develop/setup/c/debian.md.txt @@ -5,7 +5,7 @@ # Installing EFL on Debian # -[The *Enlightenment Foundation Libraries (EFL)*](about-efl.md) power millions of systems from mobile phones to set-top boxes, desktops, laptops, game systems and more. You'll need EFL if you want to develop apps for Enlightenment and for any of the devices that use Enlightenment for its visual interface. +[The *Enlightenment Foundation Libraries (EFL)*](/about-efl.md) power millions of systems from mobile phones to set-top boxes, desktops, laptops, game systems and more. You'll need EFL if you want to develop apps for Enlightenment and for any of the devices that use Enlightenment for its visual interface. This tutorial describes several ways to install EFL on your system. You will only need to use one of these. Select your chosen method using the index on the right. --
[EGIT] [website/www-content] master 01/01: Wiki page arch.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=2c8fbfb05b9590b8a73267e4870b3e6e725db24d commit 2c8fbfb05b9590b8a73267e4870b3e6e725db24d Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:32:42 2018 -0800 Wiki page arch.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/arch.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/setup/c/arch.md.txt b/pages/develop/setup/c/arch.md.txt index 9caab2068..153beab05 100644 --- a/pages/develop/setup/c/arch.md.txt +++ b/pages/develop/setup/c/arch.md.txt @@ -5,7 +5,7 @@ # Installing EFL on Arch # -[The *Enlightenment Foundation Libraries (EFL)*](about-efl.md) power millions of systems from mobile phones to set-top boxes, desktops, laptops, game systems and more. You'll need EFL if you want to develop apps for Enlightenment and for any of the devices that use Enlightenment for its visual interface. +[The *Enlightenment Foundation Libraries (EFL)*](/about-efl.md) power millions of systems from mobile phones to set-top boxes, desktops, laptops, game systems and more. You'll need EFL if you want to develop apps for Enlightenment and for any of the devices that use Enlightenment for its visual interface. This tutorial describes several ways to install EFL on your system. You will only need to use one of these. Select your chosen method using the index on the right. --
[EGIT] [website/www-content] master 01/01: Wiki page fedora.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=70cb92e6b3a55cd11f092a8e936b0fe6a07d26a4 commit 70cb92e6b3a55cd11f092a8e936b0fe6a07d26a4 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:31:46 2018 -0800 Wiki page fedora.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/fedora.md.txt | 207 1 file changed, 207 insertions(+) diff --git a/pages/develop/setup/c/fedora.md.txt b/pages/develop/setup/c/fedora.md.txt new file mode 100644 index 0..f7cfadd32 --- /dev/null +++ b/pages/develop/setup/c/fedora.md.txt @@ -0,0 +1,207 @@ +--- +~~Title: Installing EFL on Fedora~~ +~~NOCACHE~~ +--- + +# Installing EFL on Fedora # +[The *Enlightenment Foundation Libraries (EFL)*](about-efl.md) power millions of systems from mobile phones to set-top boxes, desktops, laptops, game systems and more. You'll need EFL if you want to develop apps for Enlightenment and for any of the devices that use Enlightenment for its visual interface. + +This tutorial describes several ways to install EFL on your system. You will only need to use one of these. Select your chosen method using the index on the right. + +Many distributions offer EFL as an installable package from their default repositories. In this case you only need to use your distribution's software management system to install. However most versions of EFL in default repositories are out of date and will not compile more recent Enlightenment applications. If this is not an issue for you, read through the ["From Distribution Repositories"](#From_Distribution_Repositories) section below. + +Distributions often provide a special repository maintained by users or a method of integrating a bleeding edge version of EFL with your software management system. This means that once installed you can keep EFL current just by running system updates. If your distribution offers this, take a look at the section ["Installing from a Special Repository"](#Installing_from_a_Special_Repository). + +The Enlightenment developers provide a pre-packaged source of EFL. Although not bleeding edge it is up to date and considered stable for production environments. You can download, compile and install it yourself by following the instructions in ["Installing from Packaged Source"](#Installing_from_Packaged_Source). + +You can also download the source code for the most recent version from the EFL git repositories. This will provide you with the latest code, which is updated on a nightly basis. To get started, read the section ["Installing from Git"](#Installing_from_Git). + +Whichever installation method you use, visit ["Compiling EFL Applications"](#Compiling_EFL_Applications) to discover how to compile your Enlightenment applications. + +## From Distribution Repositories ## + +Fedora includes an *efl* packge in its default repositories. This makes installing EFL a simple task: + +```bash +sudo dnf install efl +``` + +Fedora does not come with *gcc* or *cpp* preinstalled. You'll need to install these to compile EFL-based applications: + +```bash +sudo dnf install gcc cpp +``` + +Note that the version of EFL in Fedoras's official repositories may not be the most recent release. This can cause problems when trying to compile examples from tutorials in this documentation. If this is the case, install a more recent version of EFL using one of the following methods: + +## Installing from a Special Repository ## + +Fedora does not maintain a repository with a nightly, up to date, version of EFL. There is a [user-maintained repository containing a nightly version of Enlightenment](http://download.opensuse.org/repositories/X11:/Enlightenment:/Nightly/Fedora_Rawhide/). Unfortunately installing packages with duplicate names from user-maintained repository is very complex. It's much easier to install and maintain EFL installing it from Enlightenments official packages and git repository, so this should [...] + +## Installing from Packaged Source ## + +There are two versions of EFL available from the Enlightenment website. One is the nightly bleeding edge version which you can [download using git](#Installing_from_Git). The other is packaged and available from the [EFL's download site](https://download.enlightenment.org/rel/libs/efl/) which is the focus of this section. + +### Step 1: Downloading Stable Version ### + +[Download the latest version of EFL](https://download.enlightenment.org/rel/libs/efl/) and check it against its SHA256 hash: + +```bash +wget https://download.enlightenment.org/rel/libs/efl/efl-X.XX.X.tar.xz +wget https://download.enlightenment.org/rel/libs/efl/efl-X.XX.X.tar.xz.sha256 +cat efl-X.XX.X.tar.xz.sha256; sha256sum efl-X.XX.X.tar.xz +``` + +Note that you will have to change ``X.XX.X`` to the current versi
[EGIT] [website/www-content] master 01/01: Wiki page debian.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=c757dedfba7237165041cff5baa878a71d514665 commit c757dedfba7237165041cff5baa878a71d514665 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:31:05 2018 -0800 Wiki page debian.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/debian.md.txt | 184 1 file changed, 184 insertions(+) diff --git a/pages/develop/setup/c/debian.md.txt b/pages/develop/setup/c/debian.md.txt new file mode 100644 index 0..3b18f23b5 --- /dev/null +++ b/pages/develop/setup/c/debian.md.txt @@ -0,0 +1,184 @@ +--- +~~Title: Installing EFL on Debian~~ +~~NOCACHE~~ +--- + +# Installing EFL on Debian # + +[The *Enlightenment Foundation Libraries (EFL)*](about-efl.md) power millions of systems from mobile phones to set-top boxes, desktops, laptops, game systems and more. You'll need EFL if you want to develop apps for Enlightenment and for any of the devices that use Enlightenment for its visual interface. + +This tutorial describes several ways to install EFL on your system. You will only need to use one of these. Select your chosen method using the index on the right. + +Many distributions offer EFL as an installable package from their default repositories. In this case you only need to use your distribution's software management system to install. However most versions of EFL in default repositories are out of date and will not compile more recent Enlightenment applications. If this is not an issue for you, read through the ["From Distribution Repositories"](#From_Distribution_Repositories) section below. + +Distributions often provide a special repository maintained by users or a method of integrating a bleeding edge version of EFL with your software management system. This means that once installed you can keep EFL current just by running system updates. If your distribution offers this, take a look at the section ["Installing from a Special Repository"](#Installing_from_a_Special_Repository). + +The Enlightenment developers provide a pre-packaged source of EFL. Although not bleeding edge it is up to date and considered stable for production environments. You can download, compile and install it yourself by following the instructions in ["Installing from Packaged Source"](#Installing_from_Packaged_Source). + +You can also download the source code for the most recent version from the EFL git repositories. This will provide you with the latest code, which is updated on a nightly basis. To get started, read the section ["Installing from Git"](#Installing_from_Git). + +Whichever installation method you use, visit ["Compiling EFL Applications"](#Compiling_EFL_Applications) to discover how to compile your Enlightenment applications. + +## From Distribution Repositories ## + +There's no EFL package in the official Debian repositories nor in any of the working user-maintained repositories. In light of this either [install EFL from the packaged source](#Installing_from Packaged_Source) or [download and install the most recent source code from the git repository](Installing_from_Git) as described below. + +## Installing from Packaged Source ## + +There are two versions of EFL available from the Enlightenment website. One is the nightly bleeding edge version which you can [download using git](#Installing_from_Git). The other comes already packaged and is available from the [EFL's download site](https://download.enlightenment.org/rel/libs/efl/), which is the focus of this section. + +### Step 1: Downloading Stable Version ### + +[Download the latest version of EFL](https://download.enlightenment.org/rel/libs/efl/) and check it against its SHA256 hash: + +```bash +wget https://download.enlightenment.orgtar /rel/libs/efl/efl-X.XX.X.tar.xz +wget https://download.enlightenment.org/rel/libs/efl/efl-X.XX.X.tar.xz.sha256 +cat efl-X.XX.X.tar.xz.sha256; sha256sum efl-X.XX.X.tar.xz +``` + +Note that you will have to change ``X.XX.X`` to the actual version of EFL. + +### Step 2: Unpacking ### + +Once you have the archive file containing EFL on your hard disk unpack it with: + +```bash +tar xvf efl-X.XX.X.tar.xz +``` + +This will create a folder named *efl-X.XX.X*. + +### Step 3: Installing Dependencies ### + +In order to compile and install EFL, first download the necessary software: + +```bash +su -c "apt install gcc g++ check libssl-dev libsystemd-dev libjpeg-dev libglib2.0-dev libgstreamer1.0-dev libluajit-5.1-dev libfreetype6-dev libfontconfig1-dev libfribidi-dev libx11-dev libxext-dev libxrender-dev libgl1-mesa-dev libgif-dev libtiff5-dev libpoppler-dev libpoppler-cpp-dev libspectre-dev libraw-dev librsvg2-dev libudev-dev libmount-dev libdbus-1-dev libpulse-dev libsndfile1-dev libxcursor-dev libxcomposite-dev libxi
[EGIT] [website/www-content] master 01/01: Wiki page arch.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=33a6367705f5cce5b5b47e081f5e678249b057f7 commit 33a6367705f5cce5b5b47e081f5e678249b057f7 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:28:43 2018 -0800 Wiki page arch.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/arch.md.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/develop/setup/c/arch.md.txt b/pages/develop/setup/c/arch.md.txt index a597b6cfc..9caab2068 100644 --- a/pages/develop/setup/c/arch.md.txt +++ b/pages/develop/setup/c/arch.md.txt @@ -1,11 +1,11 @@ --- -~~Title: Tutorial 0: Installing EFL on Arch~~ +~~Title: Installing EFL on Arch~~ ~~NOCACHE~~ --- # Installing EFL on Arch # -[EFL](about-efl.md) or the *Enlightenment Foundation Libraries* powers millions of systems from mobile phones to set-top boxes, desktops, laptops, game systems and more. You'll need EFL if you want to develop apps for Enlightenment and for any of the devices that use Enlightenment for its visual interface. +[The *Enlightenment Foundation Libraries (EFL)*](about-efl.md) power millions of systems from mobile phones to set-top boxes, desktops, laptops, game systems and more. You'll need EFL if you want to develop apps for Enlightenment and for any of the devices that use Enlightenment for its visual interface. This tutorial describes several ways to install EFL on your system. You will only need to use one of these. Select your chosen method using the index on the right. --
[EGIT] [website/www-content] master 01/01: Wiki page arch.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=f475ab4380aaac6d3745033dabd0265bd8d4895d commit f475ab4380aaac6d3745033dabd0265bd8d4895d Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:27:57 2018 -0800 Wiki page arch.md changed with summary [] by Gareth Halfacree --- pages/develop/setup/c/arch.md.txt | 250 ++ 1 file changed, 250 insertions(+) diff --git a/pages/develop/setup/c/arch.md.txt b/pages/develop/setup/c/arch.md.txt new file mode 100644 index 0..a597b6cfc --- /dev/null +++ b/pages/develop/setup/c/arch.md.txt @@ -0,0 +1,250 @@ +--- +~~Title: Tutorial 0: Installing EFL on Arch~~ +~~NOCACHE~~ +--- + +# Installing EFL on Arch # + +[EFL](about-efl.md) or the *Enlightenment Foundation Libraries* powers millions of systems from mobile phones to set-top boxes, desktops, laptops, game systems and more. You'll need EFL if you want to develop apps for Enlightenment and for any of the devices that use Enlightenment for its visual interface. + +This tutorial describes several ways to install EFL on your system. You will only need to use one of these. Select your chosen method using the index on the right. + +Many distributions offer EFL as an installable package from their default repositories. In this case you only need to use your distribution's software management system to install. However most versions of EFL in default repositories are out of date and will not support more recent Enlightenment applications. If this is not an issue for you, read through the ["From Distribution Repositories"](#From_Distribution_Repositories) section below. + +Distributions often provide a special repository maintained by users or a method of integrating a bleeding edge version of EFL with your software management system. This means that once installed you can keep EFL current just by running system updates. If your distribution offers this, take a look at the section ["Installing from a Special Repository"](#Installing_from_a_Special_Repository). + +The Enlightenment developers provide a pre-packaged source of EFL. Although not bleeding edge it is up to date and considered stable for production environments. You can download, compile and install it yourself by following the instructions in ["Installing from Packaged Source"](#Installing_from_Packaged_Source). + +You can also download the source code for the most recent version from the EFL git repositories. This will provide you with the latest code, which is usually of stable quality. To get started, read the section ["Installing from Git"](#Installing_from_Git). + +Whichever installation method you use, visit ["Compiling EFL Applications"](#Compiling_EFL_Applications) to discover how to compile your Enlightenment applications. + +## From Distribution Repositories ## + +Arch contains an instance of the EFL package in its official repositories. To install, run the following command as root: + +```bash +pacman -S efl +``` + +This will give you a working EFL installation. + +The version in Arch's official repositories may lag behind the latest version of EFL. This may cause problems when trying to compile examples from tutorials in this guide. If this happens, install a more recent version of EFL using one of the methods listed below. + +## Installing from a Special Repository ## + +You can use Arch's package management system to install an up-to-date version of EFL from the *Arch User Repository (AUR)* named *elf-git*. Using the *elf-git* AUR is relatively simple and makes your EFL package easey to maintain using Arch's package management system, *pacman*. + +### Step 1: Download Meta Package ### + +Download the files containing the required meta-information to install EFL from the AUR: + +```bash +wget https://aur.archlinux.org/cgit/aur.git/snapshot/efl-git.tar.gz +``` + +### Step 2: Install Build Tools and Dependencies ### + +In order to build EFL from source, you'll need some tools: + +```bash +pacman -S gcc fakeroot binutils autoconf automake pkg-config make +``` + +The *makepkg* script in the following step will handle most dependencies however you need to install *wayland-protocols* manually too: + +```bash +pacman -S wayland-protocols +``` + +### Step 3: Make Package ### + +Unpack the file you downloaded in Step 1 with ``tar xvf efl-git.tar.gz``. Next, ``cd`` into the new *efl-git/* directory and build the package with: + +```bash +makepkg -s +``` + +This process will download EFL from the Enlightenment git repositories, run the configuration and download and install the remaining dependencies. It will also compile and install the software (locally) then build a viable and installable package for your system. None of these steps need to be run as root. + +### Step 4: Install the package ### + +When *makepkg* is f
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=dd04ee0b9a084cd03a13a19457751fe50b3f17ef commit dd04ee0b9a084cd03a13a19457751fe50b3f17ef Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:10:35 2018 -0800 Wiki page start.md changed with summary [] by Gareth Halfacree --- pages/develop/tutorials/c/start.md.txt | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pages/develop/tutorials/c/start.md.txt b/pages/develop/tutorials/c/start.md.txt index f23150d56..7025a9005 100644 --- a/pages/develop/tutorials/c/start.md.txt +++ b/pages/develop/tutorials/c/start.md.txt @@ -10,10 +10,11 @@ The following tutorials are designed to build on each other, introducing concept > **NOTE:** > The tutorials in this section use the latest beta release of the API, as > noted in [Developing with the Enlightenment Foundation > Libraries](https://www.enlightenment.org/develop/start.md#Current_vs._Beta). > Versions of these tutorials written for the current release can be found in > the [Legacy section of the > website](https://www.enlightenment.org/develop/legacy/tutorial/start). -* [Hello World](https://www.enlightenment.org/develop/tutorials/c/hello-world.md) +* [Hello World](hello-world.md) +* [Hello World GUI](hello-world-gui.md) * Eo and Eolian - * [Creating and Destroying Objects with Eo](https://www.enlightenment.org/develop/tutorials/c/eo-intro.md) - * [Reference Counting in Eo](https://www.enlightenment.org/develop/tutorials/c/eo-refcount.md) - * [Creating New Classes with Eolian](https://www.enlightenment.org/develop/tutorials/c/eo-classes.md) - * [Class Inheritance with Eolian](https://www.enlightenment.org/develop/tutorials/c/eo-inherit.md) - * [Multiple Class Inheritance with Eolian](https://www.enlightenment.org/develop/tutorials/c/eo-multiinherit.md) \ No newline at end of file + * [Creating and Destroying Objects with Eo](eo-intro.md) + * [Reference Counting in Eo](eo-refcount.md) + * [Creating New Classes with Eolian](eo-classes.md) + * [Class Inheritance with Eolian](eo-inherit.md) + * [Multiple Class Inheritance with Eolian](eo-multiinherit.md) \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page hello-world-gui.md changed with summary [Missed the s!] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=eec3ee28442039694f63e88d8cd0ec788154a1a0 commit eec3ee28442039694f63e88d8cd0ec788154a1a0 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:09:20 2018 -0800 Wiki page hello-world-gui.md changed with summary [Missed the s!] by Gareth Halfacree --- pages/develop/tutorial/c/hello-world-gui.md.txt | 444 +--- 1 file changed, 1 insertion(+), 443 deletions(-) diff --git a/pages/develop/tutorial/c/hello-world-gui.md.txt b/pages/develop/tutorial/c/hello-world-gui.md.txt index 01ae80036..5aa457d51 100644 --- a/pages/develop/tutorial/c/hello-world-gui.md.txt +++ b/pages/develop/tutorial/c/hello-world-gui.md.txt @@ -1,443 +1 @@ -~~Title: Tutorial 3: Graphical "Hello World"~~ -~~NOCACHE~~ - -# Tutorial 3: "Hello World" in a EFL Window # - -In this guide you will learn how to build a complete graphical application, with a window and typical elements like a text box and button. After following this guide your application should look something like this: - -![Full application with text box and button](https://www.enlightenment.org/_media/playground/03-hello-world-gui/image01.png) - -## Prerequisites ## - -If you haven't already done so take a look at our [previous guide](https://www.enlightenment.org/develop/tutorial/c/hello-world.md) on how to write a "Hello World" command line program for a terminal window. This guide shows you how to include [EFL libraries](https://www.enlightenment.org/develop/setup/c/start.md) in your applications. - -As you'll be building on the code from the prior tutorial, take a look at the program below to refresh your memory: - -```c -#define EFL_EO_API_SUPPORT 1 -#define EFL_BETA_API_SUPPORT 1 - -#include -#include - -EAPI_MAIN void -efl_main(void *data EINA_UNUSED, const Efl_Event *ev) -{ - Efl_Loop_Arguments *args = ev->info; - - if (eina_array_count(args->argv) == 0) - { -printf("Hello World!\n"); - } - else - { -printf("Hello %s!\n", (char *) eina_array_data_get(args->argv, 0)); - } - - efl_exit(0); -} -EFL_MAIN() -``` - -Let's get started. - -## Step 1: Displaying a Window ## - -Instead of printing to the command line, this time your message will be displayed in a window. The first thing to do is to delete the lines within the main EFL loop: in other words, get rid of lines 10 through 21: - -```c -[...] - Efl_Loop_Arguments *args = ev->info; - - if (eina_array_count(args->argv) == 0) - { -printf("Hello World!\n"); - } - else - { -printf("Hello %s!\n", (char *) eina_array_data_get(args->argv, 0)); - } - - efl_exit(0); -[...] -``` - -> **NOTE:** -> ``[...]`` in a Code Block indicates existing code which has been excluded for the sake of brevity. There is no need to type ``[...]`` into your program. - - -Technically you could put all the code for opening the window, text boxes, buttons and so on into the main function which previously contained the lines you just deleted but that's messy. In general it's much better and cleaner to use the main function to call other functions. - -Create a function to set up your window and name it ``_gui_setup()``. Insert a call to the function from within the mani EFL loop. Your program should look like this: - -```c -#define EFL_EO_API_SUPPORT 1 -#define EFL_BETA_API_SUPPORT 1 - -#include -#include -#include - - -static void -_gui_setup() -{ - // Build Graphical User Interface here -} - -EAPI_MAIN void -efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) -{ - _gui_setup(); -} -EFL_MAIN() -``` - -Your function is set up on lines 9 to 13. As it's not meant to return anything to the main function you can declare it as ``void``. You also don't need to pass anything on to this function as it will show only static text. This means there are no parameters either. You call ``_gui_setup()`` from line 18, within the main EFL loop. - -So far ``_gui_setup`` is empty. Create a window by adding the following lines within your ``_gui_setup()`` function: - -```c -[...] - Eo *win; - - win = efl_add(EFL_UI_WIN_CLASS, NULL, - efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), - efl_text_set(efl_added, "Hello World"), - efl_ui_win_autodel_set(efl_added, EINA_TRUE)); -[...] -``` - -As far as EFL is concerned, a window is just another object. You can declare it with ``Eo *win;``. The ``Eo`` type is the base object system for EFL. Most graphical elements such as windows, text boxes, buttons, sliders, etc. are ``Eo`` objects. You can give your window any name you wish but for now call it ``win``for simplicity's sake. - -The next part of the code defines the window itself. The ``efl_add()`` method crea
[EGIT] [website/www-content] master 01/01: Wiki page hello-world-gui.md changed with summary [Missed the s!] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=7b361ab090583b23c90eb414035da8975afa8cf0 commit 7b361ab090583b23c90eb414035da8975afa8cf0 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:09:19 2018 -0800 Wiki page hello-world-gui.md changed with summary [Missed the s!] by Gareth Halfacree --- pages/develop/tutorials/c/hello-world-gui.md.txt | 443 +++ 1 file changed, 443 insertions(+) diff --git a/pages/develop/tutorials/c/hello-world-gui.md.txt b/pages/develop/tutorials/c/hello-world-gui.md.txt new file mode 100644 index 0..01ae80036 --- /dev/null +++ b/pages/develop/tutorials/c/hello-world-gui.md.txt @@ -0,0 +1,443 @@ +--- +~~Title: Tutorial 3: Graphical "Hello World"~~ +~~NOCACHE~~ +--- + +# Tutorial 3: "Hello World" in a EFL Window # + +In this guide you will learn how to build a complete graphical application, with a window and typical elements like a text box and button. After following this guide your application should look something like this: + +![Full application with text box and button](https://www.enlightenment.org/_media/playground/03-hello-world-gui/image01.png) + +## Prerequisites ## + +If you haven't already done so take a look at our [previous guide](https://www.enlightenment.org/develop/tutorial/c/hello-world.md) on how to write a "Hello World" command line program for a terminal window. This guide shows you how to include [EFL libraries](https://www.enlightenment.org/develop/setup/c/start.md) in your applications. + +As you'll be building on the code from the prior tutorial, take a look at the program below to refresh your memory: + +```c +#define EFL_EO_API_SUPPORT 1 +#define EFL_BETA_API_SUPPORT 1 + +#include +#include + +EAPI_MAIN void +efl_main(void *data EINA_UNUSED, const Efl_Event *ev) +{ + Efl_Loop_Arguments *args = ev->info; + + if (eina_array_count(args->argv) == 0) + { +printf("Hello World!\n"); + } + else + { +printf("Hello %s!\n", (char *) eina_array_data_get(args->argv, 0)); + } + + efl_exit(0); +} +EFL_MAIN() +``` + +Let's get started. + +## Step 1: Displaying a Window ## + +Instead of printing to the command line, this time your message will be displayed in a window. The first thing to do is to delete the lines within the main EFL loop: in other words, get rid of lines 10 through 21: + +```c +[...] + Efl_Loop_Arguments *args = ev->info; + + if (eina_array_count(args->argv) == 0) + { +printf("Hello World!\n"); + } + else + { +printf("Hello %s!\n", (char *) eina_array_data_get(args->argv, 0)); + } + + efl_exit(0); +[...] +``` + +> **NOTE:** +> ``[...]`` in a Code Block indicates existing code which has been excluded for the sake of brevity. There is no need to type ``[...]`` into your program. + + +Technically you could put all the code for opening the window, text boxes, buttons and so on into the main function which previously contained the lines you just deleted but that's messy. In general it's much better and cleaner to use the main function to call other functions. + +Create a function to set up your window and name it ``_gui_setup()``. Insert a call to the function from within the mani EFL loop. Your program should look like this: + +```c +#define EFL_EO_API_SUPPORT 1 +#define EFL_BETA_API_SUPPORT 1 + +#include +#include +#include + + +static void +_gui_setup() +{ + // Build Graphical User Interface here +} + +EAPI_MAIN void +efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) +{ + _gui_setup(); +} +EFL_MAIN() +``` + +Your function is set up on lines 9 to 13. As it's not meant to return anything to the main function you can declare it as ``void``. You also don't need to pass anything on to this function as it will show only static text. This means there are no parameters either. You call ``_gui_setup()`` from line 18, within the main EFL loop. + +So far ``_gui_setup`` is empty. Create a window by adding the following lines within your ``_gui_setup()`` function: + +```c +[...] + Eo *win; + + win = efl_add(EFL_UI_WIN_CLASS, NULL, + efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), + efl_text_set(efl_added, "Hello World"), + efl_ui_win_autodel_set(efl_added, EINA_TRUE)); +[...] +``` + +As far as EFL is concerned, a window is just another object. You can declare it with ``Eo *win;``. The ``Eo`` type is the base object system for EFL. Most graphical elements such as windows, text boxes, buttons, sliders, etc. are ``Eo`` objects. You can give your window any name you wish but for now call it ``win``for simplicity's sake. + +The next part of the code defines the window itself. The ``efl_add()`` method creates a new object of the class spec
[EGIT] [website/www-content] master 01/01: Wiki page navigation changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=d0643b5ee961133fb745cb1cf58e92ad9e7b66fc commit d0643b5ee961133fb745cb1cf58e92ad9e7b66fc Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:06:08 2018 -0800 Wiki page navigation changed with summary [] by Gareth Halfacree --- pages/develop/navigation.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/develop/navigation.txt b/pages/develop/navigation.txt index 3ff13976e..079e978f7 100644 --- a/pages/develop/navigation.txt +++ b/pages/develop/navigation.txt @@ -5,6 +5,7 @@ * [[/develop/legacy/tutorial/ | Stable API Tutorials]] * [[/develop/tutorials/c/start.md | Beta API Tutorials [C]]] * [[/develop/tutorials/c/hello-world.md | Hello World]] + * [[/develop/tutorials/c/hello-world-gui.md | Hello World GUI]] * [[/develop/tutorials/c/eo-intro.md | EO Objects]] * [[/develop/tutorials/c/eo-refcount.md | EO Reference Counting]] * [[/develop/tutorials/c/eo-classes.md | EO Classes]] --
[EGIT] [website/www-content] master 02/02: Wiki page hello-world-gui.md changed with summary [Moving to permanent home.] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=2a90aa4c13001bc1f227f6376f1fe88b0a247d53 commit 2a90aa4c13001bc1f227f6376f1fe88b0a247d53 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Jan 2 06:04:35 2018 -0800 Wiki page hello-world-gui.md changed with summary [Moving to permanent home.] by Gareth Halfacree --- pages/develop/tutorial/c/hello-world-gui.md.txt | 443 1 file changed, 443 insertions(+) diff --git a/pages/develop/tutorial/c/hello-world-gui.md.txt b/pages/develop/tutorial/c/hello-world-gui.md.txt new file mode 100644 index 0..01ae80036 --- /dev/null +++ b/pages/develop/tutorial/c/hello-world-gui.md.txt @@ -0,0 +1,443 @@ +--- +~~Title: Tutorial 3: Graphical "Hello World"~~ +~~NOCACHE~~ +--- + +# Tutorial 3: "Hello World" in a EFL Window # + +In this guide you will learn how to build a complete graphical application, with a window and typical elements like a text box and button. After following this guide your application should look something like this: + +![Full application with text box and button](https://www.enlightenment.org/_media/playground/03-hello-world-gui/image01.png) + +## Prerequisites ## + +If you haven't already done so take a look at our [previous guide](https://www.enlightenment.org/develop/tutorial/c/hello-world.md) on how to write a "Hello World" command line program for a terminal window. This guide shows you how to include [EFL libraries](https://www.enlightenment.org/develop/setup/c/start.md) in your applications. + +As you'll be building on the code from the prior tutorial, take a look at the program below to refresh your memory: + +```c +#define EFL_EO_API_SUPPORT 1 +#define EFL_BETA_API_SUPPORT 1 + +#include +#include + +EAPI_MAIN void +efl_main(void *data EINA_UNUSED, const Efl_Event *ev) +{ + Efl_Loop_Arguments *args = ev->info; + + if (eina_array_count(args->argv) == 0) + { +printf("Hello World!\n"); + } + else + { +printf("Hello %s!\n", (char *) eina_array_data_get(args->argv, 0)); + } + + efl_exit(0); +} +EFL_MAIN() +``` + +Let's get started. + +## Step 1: Displaying a Window ## + +Instead of printing to the command line, this time your message will be displayed in a window. The first thing to do is to delete the lines within the main EFL loop: in other words, get rid of lines 10 through 21: + +```c +[...] + Efl_Loop_Arguments *args = ev->info; + + if (eina_array_count(args->argv) == 0) + { +printf("Hello World!\n"); + } + else + { +printf("Hello %s!\n", (char *) eina_array_data_get(args->argv, 0)); + } + + efl_exit(0); +[...] +``` + +> **NOTE:** +> ``[...]`` in a Code Block indicates existing code which has been excluded for the sake of brevity. There is no need to type ``[...]`` into your program. + + +Technically you could put all the code for opening the window, text boxes, buttons and so on into the main function which previously contained the lines you just deleted but that's messy. In general it's much better and cleaner to use the main function to call other functions. + +Create a function to set up your window and name it ``_gui_setup()``. Insert a call to the function from within the mani EFL loop. Your program should look like this: + +```c +#define EFL_EO_API_SUPPORT 1 +#define EFL_BETA_API_SUPPORT 1 + +#include +#include +#include + + +static void +_gui_setup() +{ + // Build Graphical User Interface here +} + +EAPI_MAIN void +efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) +{ + _gui_setup(); +} +EFL_MAIN() +``` + +Your function is set up on lines 9 to 13. As it's not meant to return anything to the main function you can declare it as ``void``. You also don't need to pass anything on to this function as it will show only static text. This means there are no parameters either. You call ``_gui_setup()`` from line 18, within the main EFL loop. + +So far ``_gui_setup`` is empty. Create a window by adding the following lines within your ``_gui_setup()`` function: + +```c +[...] + Eo *win; + + win = efl_add(EFL_UI_WIN_CLASS, NULL, + efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), + efl_text_set(efl_added, "Hello World"), + efl_ui_win_autodel_set(efl_added, EINA_TRUE)); +[...] +``` + +As far as EFL is concerned, a window is just another object. You can declare it with ``Eo *win;``. The ``Eo`` type is the base object system for EFL. Most graphical elements such as windows, text boxes, buttons, sliders, etc. are ``Eo`` objects. You can give your window any name you wish but for now call it ``win``for simplicity's sake. + +The next part of the code defines the window itself. The ``efl_add()`` method creates a new object of the class spec
[EGIT] [website/www-content] master 01/01: Wiki page red-black-tree.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=5bf084018c71a8195e64b4c4c4ed22ac235c82aa commit 5bf084018c71a8195e64b4c4c4ed22ac235c82aa Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Mon Dec 18 07:17:33 2017 -0800 Wiki page red-black-tree.md changed with summary [] by Gareth Halfacree --- pages/develop/guides/c/eina/red-black-tree.md.txt | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pages/develop/guides/c/eina/red-black-tree.md.txt b/pages/develop/guides/c/eina/red-black-tree.md.txt index f2776cefb..6d6369f52 100644 --- a/pages/develop/guides/c/eina/red-black-tree.md.txt +++ b/pages/develop/guides/c/eina/red-black-tree.md.txt @@ -79,4 +79,9 @@ Eina_Iterator * eina_rbtree_iterator_postfix(const Eina_Rbtree * root) Where ``root`` ins the root of a valid red-black tree. If ``root`` is ``NULL``, a valid iterator will be provided but one which will always return ``false`` to the function ``eina_iterator_next()``. If memory for the iterator cannot be allocated, the function returns ``NULL`` and sets ``EINA_ERROR_OUT_OF_MEMORY``. > **WARNING:** -> If the structure of the red-black tree changes through the addition or removal of nodes the iterator will become invalid, and attempts to use the iterator may result in program crashes. \ No newline at end of file +> If the structure of the red-black tree changes through the addition or removal of nodes the iterator will become invalid, and attempts to use the iterator may result in program crashes. + +## Further Reading ## + +[Eina Red-Black Tree Doxygen Documentation](https://docs.enlightenment.org/api/eina/doc/html/group__Eina__Rbtree__Group.html) +:A technical reference for the red-black tree API functions. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page about-efl.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=f86fa8462a7b1bde1a60dd9b9426fbf80246d600 commit f86fa8462a7b1bde1a60dd9b9426fbf80246d600 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Dec 13 07:01:26 2017 -0800 Wiki page about-efl.md changed with summary [] by Gareth Halfacree --- pages/about-efl.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/about-efl.md.txt b/pages/about-efl.md.txt index 355e4966e..933fbca1b 100644 --- a/pages/about-efl.md.txt +++ b/pages/about-efl.md.txt @@ -17,7 +17,7 @@ You can [download EFL from here](/download). ## How to Use EFL ## -EFL covers a wide range of functions including inter-process communication (IPC), graphics, audio and even location services. Other powerful features include file handling utilities, widgets and user interface controls, thumbnailing and rendering via scene graph. You can discover more of EFL's capabilities by visiting the [About EFL](https://www.enlightenment.org/about-efl) page. +EFL covers a wide range of functions including inter-process communication (IPC), graphics, audio and even location services. Other powerful features include file handling utilities, widgets and user interface controls, thumbnailing and rendering via scene graph. ## Parts of EFL ### --
[EGIT] [website/www-content] master 01/01: Wiki page lifecycle.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=4fde6bcdc1865b5a8d897fa6df2438e7a71d0f84 commit 4fde6bcdc1865b5a8d897fa6df2438e7a71d0f84 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Dec 13 05:37:26 2017 -0800 Wiki page lifecycle.md changed with summary [] by Gareth Halfacree --- pages/develop/tutorials/c/lifecycle.md.txt | 43 +++--- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/pages/develop/tutorials/c/lifecycle.md.txt b/pages/develop/tutorials/c/lifecycle.md.txt index 4438594c3..d8d40f5cb 100644 --- a/pages/develop/tutorials/c/lifecycle.md.txt +++ b/pages/develop/tutorials/c/lifecycle.md.txt @@ -4,19 +4,19 @@ # Lifecycle Management # -The [Hello World](/develop/tutorials/c/hello-world) tutorial explained how to create a desktop-like application using the ``EFL_MAIN()`` macro. Applications targeted at mobile or embedded devices, though, often have additional lifecycle constrains, which are explained in this tutorial. +The [Hello World](/develop/tutorials/c/hello-world) tutorial explained how to create a desktop-like application using the ``EFL_MAIN()`` macro. Applications targeted at mobile or embedded devices often have additional lifecycle constrains which are explored in this tutorial. ## Prerequisites ## -* Finish the [Hello World](/develop/tutorials/c/hello-world) tutorial to know the basics of EFL application creation. +You should have completed the [Hello World](/develop/tutorials/c/hello-world) tutorial in order to understand the basics of EFL application creation before proceeding with this tutorial. ## Application Management Events ## -EFL will call some special methods in your application to inform you of events related to the application lifecycle, like it being paused, resumed or about to be closed. +EFL will call some special methods in your application to inform you of events related to the application lifecycle such as being paused, resumed or when it is about to be closed. -If you use the ``EFL_MAIN()`` macro as explained in the [Hello World](/develop/tutorials/c/hello-world) tutorial, though, these methods are hidden from you. While this is usually convenient for desktop applications, you will probably need to use them in mobile or embedded applications. To do this, use the ``EFL_MAIN_EX()`` macro instead. +If you use the ``EFL_MAIN()`` macro, as in the [Hello World](/develop/tutorials/c/hello-world) tutorial, these methods are hidden from you. While this is usually convenient for desktop applications, you will likely need to use them when developing mobile or embedded applications. To do this you should use the ``EFL_MAIN_EX()`` macro instead. -Create a ``lifecycle_main.c`` file and write this: +Begin by creating a ``lifecycle_main.c`` file: ```c #define EFL_EO_API_SUPPORT 1 @@ -33,7 +33,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev) EFL_MAIN_EX() ``` -This looks like the Hello World tutorial, but using ``EFL_MAIN_EX()`` instead. If you try to compile it, though, it will complain (admittedly in a rather convoluted way) about missing symbols. +This is based on the Hello World tutorial but rewritten to use ``EFL_MAIN_EX()``. If you try to compile it, however, it will complain - admittedly in a rather convoluted way - about missing symbols. These are the new methods that you need to add. All of them have the same signature as ``efl_main()``: @@ -43,7 +43,7 @@ These are the new methods that you need to add. All of them have the same signat | ``efl_resume()``| Application is leaving the paused state | | ``efl_terminate()`` | Application is about to be terminated| -Add them with a simple ``printf()`` so we can keep track of the application state changes: +Add them with a simple ``printf()`` so you can more easily keep track of the application state changes: ```c EAPI_MAIN void @@ -65,17 +65,17 @@ efl_terminate(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) } ``` -The system will typically put your application in the paused state when it leaves the foreground, therefore, you should free as many resources as you can in ``efl_pause()`` so they are available to other applications. In ``efl_resume()`` you can then reload them. +The system will typically put your application in the paused state when it leaves the foreground. You should free as many resources as you can in ``efl_pause()`` so they are available to other applications. You may then reload them in ``efl_resume()``. -In ``efl_terminate()`` you normally will commit to permanent storage (like a disk file) the application state, so it can be retrieved next time the application is started. +In ``efl_terminate()`` you will usually commit the application state to permanent storage, such as a file on disk, so it can be retrieved next time the application is started. ## Simu
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=7dd88611a2938001370bdbac9b72b4a25854a2d0 commit 7dd88611a2938001370bdbac9b72b4a25854a2d0 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Mon Dec 11 08:29:49 2017 -0800 Wiki page start.md changed with summary [] by Gareth Halfacree --- pages/develop/guides/c/eina/tools/start.md.txt | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pages/develop/guides/c/eina/tools/start.md.txt b/pages/develop/guides/c/eina/tools/start.md.txt index ebf378d0e..0abb8e16d 100644 --- a/pages/develop/guides/c/eina/tools/start.md.txt +++ b/pages/develop/guides/c/eina/tools/start.md.txt @@ -6,14 +6,18 @@ The ``Eina`` library provides a range of tools for handling common tasks. The following tools are documented: +## Eina Logging ## + +[The ``Eina_Log`` Tool](logging.md) provides control over logging facilities for libraries and application, offering colored logging, basic logging levels (error, warning, debug, info, critical) and logging domains. + ## String Tool ## -[The String Tool](https://www.enlightenment.org/develop/guides/c/eina/tools/eina-string-tool.md) offers a range of string-handling capabilities from conversion to or from upper or lower case, splitting, joining, and matching strings. +[The String Tool](eina-string-tool.md) offers a range of string-handling capabilities from conversion to or from upper or lower case, splitting, joining, and matching strings. ## Memory Pools ## -[The Memory Pool Tool](https://www.enlightenment.org/develop/guides/c/eina/tools/eina-mempool.md) provides simple handling of memory pools, designed to preallocate fixed-size memory spaces and simplify memory management tasks. +[The Memory Pool Tool](eina-mempool.md) provides simple handling of memory pools, designed to preallocate fixed-size memory spaces and simplify memory management tasks. ## Safety Checks ## -[The Safety Checks](https://www.enlightenment.org/develop/guides/c/eina/tools/eina-safety-checks.md) are a collection of macros designed to check for parameters or values which must never occur, in a similar manner to the ``assert()`` function but with logging and returning capabilities rather than outright abortion. \ No newline at end of file +[The Safety Checks](eina-safety-checks.md) are a collection of macros designed to check for parameters or values which must never occur, in a similar manner to the ``assert()`` function but with logging and returning capabilities rather than outright abortion. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=0132e41bc5592de9167bae06fe502335d139332f commit 0132e41bc5592de9167bae06fe502335d139332f Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Mon Dec 11 08:27:53 2017 -0800 Wiki page start.md changed with summary [] by Gareth Halfacree --- pages/develop/guides/c/eina/start.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/guides/c/eina/start.md.txt b/pages/develop/guides/c/eina/start.md.txt index 08acde7a4..da805a0fe 100644 --- a/pages/develop/guides/c/eina/start.md.txt +++ b/pages/develop/guides/c/eina/start.md.txt @@ -20,7 +20,7 @@ The ``Eina`` library implements an *application programming interface (API)* for * [Lists](lists.md) * [Generic Value](generic-value.md) * **Eina Tools** - * [Logging](logging.md) + * [Logging](tools/logging.md) * [String Tool](tools/eina-string-tool.md) * [Memory Pools](tools/eina-mempool.md) * [Safety Checks](tools/eina-safety-checks.md) \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page navigation changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=e457cf6d4d40a63c264d0db32fc4ac3a5b8dcdda commit e457cf6d4d40a63c264d0db32fc4ac3a5b8dcdda Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Mon Dec 11 08:27:34 2017 -0800 Wiki page navigation changed with summary [] by Gareth Halfacree --- pages/develop/navigation.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/navigation.txt b/pages/develop/navigation.txt index 09509082a..0247371b7 100644 --- a/pages/develop/navigation.txt +++ b/pages/develop/navigation.txt @@ -20,7 +20,7 @@ * [[/develop/guides/c/eina/lists.md]] * [[/develop/guides/c/eina/generic-value.md]] * [[/develop/guides/c/eina/tools/ | Tools]] -* [[/develop/guides/c/eina/logging.md]] +* [[/develop/guides/c/eina/tools/logging.md]] * [[/develop/guides/c/eina/tools/eina-string-tool.md]] * [[/develop/guides/c/eina/tools/eina-mempool.md]] * [[/develop/guides/c/eina/tools/eina-safety-checks.md]] --
[EGIT] [website/www-content] master 01/01: Wiki page logging.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=c95c516da897ab1b0ff7949f1761f28ec3fbf7e9 commit c95c516da897ab1b0ff7949f1761f28ec3fbf7e9 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Mon Dec 11 08:27:00 2017 -0800 Wiki page logging.md changed with summary [] by Gareth Halfacree --- pages/develop/guides/c/eina/logging.md.txt | 135 + 1 file changed, 1 insertion(+), 134 deletions(-) diff --git a/pages/develop/guides/c/eina/logging.md.txt b/pages/develop/guides/c/eina/logging.md.txt index e58fbfb08..8176e2ba1 100644 --- a/pages/develop/guides/c/eina/logging.md.txt +++ b/pages/develop/guides/c/eina/logging.md.txt @@ -1,134 +1 @@ -~~Title: Eina Logging~~ - -# Eina Logging # - -EFL uses a common method to log error messages, called ``Eina_Log``, which allows you to adjust the verbosity of the logs using environment variables. - -The ``Eina_Log`` module provides logging facilities for libraries and applications. It provides colored logging, basic logging levels (error, warning, debug, info, critical) and *logging domains*, or *loggers*. For those unfamiliar with this term, it offers a way to separate a set of log messages into a specific context (e.g. a module) and provides a way of controlling this set as a whole. - -## Available Log Levels ## - -| Level | Number | Macro | -|-||-| -|Critical | 0 | ``EINA_LOG_CRIT()`` | -|Error| 1 | ``EINA_LOG_ERR()`` | -|Warning | 2 | ``EINA_LOG_WARN()`` | -|Info | 3 | ``EINA_LOG_INFO()`` | -|Debug| 4 | ``EINA_LOG_DBG()`` | - - -The log level is used to control which messages should appear. It specifies the lowest level that should be displayed, i.e. a message with level 2 being logged on a domain with level set to 3 would be displayed while a message with level 4 wouldn't. - -## Setting the Log Level ## - -``Eina`` provides ``eina_log_print()``, a standard function to manage all logging messages. This function may be called directly or using helper macros including ``EINA_LOG_DBG()``, ``EINA_LOG_ERR()`` or those that take a specific domain as an argument as with ``EINA_LOG_DOM_DBG()`` and ``EINA_LOG_DOM_ERR()``. Internally, ``eina_log_print()`` will call the function defined with ``eina_log_print_cb_set()``, which defaults to ``eina_log_print_cb_stderr()`` but may be changed to do whatever [...] - -The logging system is thread-safe once initialized with ``eina_log_threads_enable()``. The thread that calls this function first is considered "main thread" and other threads will have their thread ID (``pthread_self()``) printed in the log message so it is easy to detect from where the messages are coming. - -The different logging levels serve to customize the amount of debugging information and may be used to automatically call ``abort()`` once a message of a given level is printed. This is controlled by the environment variable ``EINA_LOG_ABORT`` and the level to be considered critical with ``EINA_LOG_ABORT_LEVEL``. These can be changed with ``eina_log_abort_on_critical_set()`` and ``eina_log_abort_on_critical_level_set()``. - -The default maximum level to print is defined by the environment variable ``EINA_LOG_LEVEL`` but may be set per-domain with ``EINA_LOG_LEVELS``. It will default to ``EINA_LOG_ERR``. This can be changed with ``eina_log_level_set()``. - -To use the log system ``Eina`` must be initialized with ``eina_init()`` and later shut down with ``eina_shutdown()``. - -### Controlling Print Callbacks ### - -The log module allows the user to change the way ``eina_log_print()`` displays messages. It suffices to pass to ``eina_log_print_cb_set()`` the function used to display the message. That function must be of type ``#Eina_Log_Print_Cb``. As custom data can be passed to that callback, customized messages can be displayed. - -It is suggested to not use ``__FILE__``, ``__FUNCTION__`` or ``__LINE__`` when writing that callback, but when defining macros like ``EINA_LOG_ERR()`` and others. - -## Logging Example ## - -The following example, available for download from the [Enlightenment Project git repository](https://git.enlightenment.org/tools/examples.git/tree/reference/c/eina/src/eina_log.c), demonstrates the control of logging from within an application. - -```c -#define EFL_EO_API_SUPPORT 1 -#define EFL_BETA_API_SUPPORT 1 - -#include - -#include -#include - -/* - * Efl Core Log examples. - * - * This demo shows how to log at various levels and to change what log is shown. - * You can also use a custom log printer in your app as shown in _log_custom. - */ - -static double -_divide(int num, int denom) -{ - if (denom == 0) - EINA_LOG_CRIT("Attempt to divide by 0\n"); - else - { -if (denom < 0) - EINA_LOG_WARN("Possible undesirable
[EGIT] [website/www-content] master 01/01: Wiki page logging.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=6611be936467feabc7edbf80c9d1959d803013fe commit 6611be936467feabc7edbf80c9d1959d803013fe Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Mon Dec 11 08:27:00 2017 -0800 Wiki page logging.md changed with summary [] by Gareth Halfacree --- pages/develop/guides/c/eina/tools/logging.md.txt | 134 +++ 1 file changed, 134 insertions(+) diff --git a/pages/develop/guides/c/eina/tools/logging.md.txt b/pages/develop/guides/c/eina/tools/logging.md.txt new file mode 100644 index 0..e58fbfb08 --- /dev/null +++ b/pages/develop/guides/c/eina/tools/logging.md.txt @@ -0,0 +1,134 @@ +--- +~~Title: Eina Logging~~ +--- + +# Eina Logging # + +EFL uses a common method to log error messages, called ``Eina_Log``, which allows you to adjust the verbosity of the logs using environment variables. + +The ``Eina_Log`` module provides logging facilities for libraries and applications. It provides colored logging, basic logging levels (error, warning, debug, info, critical) and *logging domains*, or *loggers*. For those unfamiliar with this term, it offers a way to separate a set of log messages into a specific context (e.g. a module) and provides a way of controlling this set as a whole. + +## Available Log Levels ## + +| Level | Number | Macro | +|-||-| +|Critical | 0 | ``EINA_LOG_CRIT()`` | +|Error| 1 | ``EINA_LOG_ERR()`` | +|Warning | 2 | ``EINA_LOG_WARN()`` | +|Info | 3 | ``EINA_LOG_INFO()`` | +|Debug| 4 | ``EINA_LOG_DBG()`` | + + +The log level is used to control which messages should appear. It specifies the lowest level that should be displayed, i.e. a message with level 2 being logged on a domain with level set to 3 would be displayed while a message with level 4 wouldn't. + +## Setting the Log Level ## + +``Eina`` provides ``eina_log_print()``, a standard function to manage all logging messages. This function may be called directly or using helper macros including ``EINA_LOG_DBG()``, ``EINA_LOG_ERR()`` or those that take a specific domain as an argument as with ``EINA_LOG_DOM_DBG()`` and ``EINA_LOG_DOM_ERR()``. Internally, ``eina_log_print()`` will call the function defined with ``eina_log_print_cb_set()``, which defaults to ``eina_log_print_cb_stderr()`` but may be changed to do whatever [...] + +The logging system is thread-safe once initialized with ``eina_log_threads_enable()``. The thread that calls this function first is considered "main thread" and other threads will have their thread ID (``pthread_self()``) printed in the log message so it is easy to detect from where the messages are coming. + +The different logging levels serve to customize the amount of debugging information and may be used to automatically call ``abort()`` once a message of a given level is printed. This is controlled by the environment variable ``EINA_LOG_ABORT`` and the level to be considered critical with ``EINA_LOG_ABORT_LEVEL``. These can be changed with ``eina_log_abort_on_critical_set()`` and ``eina_log_abort_on_critical_level_set()``. + +The default maximum level to print is defined by the environment variable ``EINA_LOG_LEVEL`` but may be set per-domain with ``EINA_LOG_LEVELS``. It will default to ``EINA_LOG_ERR``. This can be changed with ``eina_log_level_set()``. + +To use the log system ``Eina`` must be initialized with ``eina_init()`` and later shut down with ``eina_shutdown()``. + +### Controlling Print Callbacks ### + +The log module allows the user to change the way ``eina_log_print()`` displays messages. It suffices to pass to ``eina_log_print_cb_set()`` the function used to display the message. That function must be of type ``#Eina_Log_Print_Cb``. As custom data can be passed to that callback, customized messages can be displayed. + +It is suggested to not use ``__FILE__``, ``__FUNCTION__`` or ``__LINE__`` when writing that callback, but when defining macros like ``EINA_LOG_ERR()`` and others. + +## Logging Example ## + +The following example, available for download from the [Enlightenment Project git repository](https://git.enlightenment.org/tools/examples.git/tree/reference/c/eina/src/eina_log.c), demonstrates the control of logging from within an application. + +```c +#define EFL_EO_API_SUPPORT 1 +#define EFL_BETA_API_SUPPORT 1 + +#include + +#include +#include + +/* + * Efl Core Log examples. + * + * This demo shows how to log at various levels and to change what log is shown. + * You can also use a custom log printer in your app as shown in _log_custom. + */ + +static double +_divide(int num, int denom) +{ + if (denom == 0) + EINA_LOG_CRIT("Attempt to divide by 0\n"); + else + { +if (denom < 0) + EINA_LOG_WARN("Possible undesirable effect, divide by negativ
[EGIT] [website/www-content] master 01/01: Wiki page navigation changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=f3d94c539fcaec80c6acabe5e181915b863d4599 commit f3d94c539fcaec80c6acabe5e181915b863d4599 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Mon Dec 11 08:22:58 2017 -0800 Wiki page navigation changed with summary [] by Gareth Halfacree --- pages/develop/navigation.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/develop/navigation.txt b/pages/develop/navigation.txt index 1f10df237..09509082a 100644 --- a/pages/develop/navigation.txt +++ b/pages/develop/navigation.txt @@ -19,7 +19,8 @@ * [[/develop/guides/c/eina/hash-tables.md]] * [[/develop/guides/c/eina/lists.md]] * [[/develop/guides/c/eina/generic-value.md]] - * [[/develop/guides/c/eina/tools/]] + * [[/develop/guides/c/eina/tools/ | Tools]] +* [[/develop/guides/c/eina/logging.md]] * [[/develop/guides/c/eina/tools/eina-string-tool.md]] * [[/develop/guides/c/eina/tools/eina-mempool.md]] * [[/develop/guides/c/eina/tools/eina-safety-checks.md]] --
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=6364bf0e5094fdc0354d4e9336783dbfb3c2dcf8 commit 6364bf0e5094fdc0354d4e9336783dbfb3c2dcf8 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Mon Dec 11 08:21:17 2017 -0800 Wiki page start.md changed with summary [] by Gareth Halfacree --- pages/develop/c/eina/logging.md.txt | 134 --- pages/develop/guides/c/eina/start.md.txt | 1 + 2 files changed, 1 insertion(+), 134 deletions(-) diff --git a/pages/develop/c/eina/logging.md.txt b/pages/develop/c/eina/logging.md.txt deleted file mode 100644 index a6010c1e6..0 --- a/pages/develop/c/eina/logging.md.txt +++ /dev/null @@ -1,134 +0,0 @@ -~~Title: Log Levels~~ - -# Eina Logging # - -EFL uses a common method to log error messages, called ``Eina_Log``, which allows you to adjust the verbosity of the logs using environment variables. - -The ``Eina_Log`` module provides logging facilities for libraries and applications. It provides colored logging, basic logging levels (error, warning, debug, info, critical) and *logging domains*, or *loggers*. For those unfamiliar with this term, it offers a way to separate a set of log messages into a specific context (e.g. a module) and provides a way of controlling this set as a whole. - -## Available Log Levels ## - -| Level | Number | Macro | -|-||-| -|Critical | 0 | ``EINA_LOG_CRIT()`` | -|Error| 1 | ``EINA_LOG_ERR()`` | -|Warning | 2 | ``EINA_LOG_WARN()`` | -|Info | 3 | ``EINA_LOG_INFO()`` | -|Debug| 4 | ``EINA_LOG_DBG()`` | - - -The log level is used to control which messages should appear. It specifies the lowest level that should be displayed, i.e. a message with level 2 being logged on a domain with level set to 3 would be displayed while a message with level 4 wouldn't. - -## Setting the Log Level ## - -``Eina`` provides ``eina_log_print()``, a standard function to manage all logging messages. This function may be called directly or using helper macros including ``EINA_LOG_DBG()``, ``EINA_LOG_ERR()`` or those that take a specific domain as an argument as with ``EINA_LOG_DOM_DBG()`` and ``EINA_LOG_DOM_ERR()``. Internally, ``eina_log_print()`` will call the function defined with ``eina_log_print_cb_set()``, which defaults to ``eina_log_print_cb_stderr()`` but may be changed to do whatever [...] - -The logging system is thread-safe once initialized with ``eina_log_threads_enable()``. The thread that calls this function first is considered "main thread" and other threads will have their thread ID (``pthread_self()``) printed in the log message so it is easy to detect from where the messages are coming. - -The different logging levels serve to customize the amount of debugging information and may be used to automatically call ``abort()`` once a message of a given level is printed. This is controlled by the environment variable ``EINA_LOG_ABORT`` and the level to be considered critical with ``EINA_LOG_ABORT_LEVEL``. These can be changed with ``eina_log_abort_on_critical_set()`` and ``eina_log_abort_on_critical_level_set()``. - -The default maximum level to print is defined by the environment variable ``EINA_LOG_LEVEL`` but may be set per-domain with ``EINA_LOG_LEVELS``. It will default to ``EINA_LOG_ERR``. This can be changed with ``eina_log_level_set()``. - -To use the log system ``Eina`` must be initialized with ``eina_init()`` and later shut down with ``eina_shutdown()``. - -### Controlling Print Callbacks ### - -The log module allows the user to change the way ``eina_log_print()`` displays messages. It suffices to pass to ``eina_log_print_cb_set()`` the function used to display the message. That function must be of type ``#Eina_Log_Print_Cb``. As custom data can be passed to that callback, customized messages can be displayed. - -It is suggested to not use ``__FILE__``, ``__FUNCTION__`` or ``__LINE__`` when writing that callback, but when defining macros like ``EINA_LOG_ERR()`` and others. - -## Logging Example ## - -The following example, available for download from the [Enlightenment Project git repository](https://git.enlightenment.org/tools/examples.git/tree/reference/c/eina/src/eina_log.c), demonstrates the control of logging from within an application. - -```c -#define EFL_EO_API_SUPPORT 1 -#define EFL_BETA_API_SUPPORT 1 - -#include - -#include -#include - -/* - * Efl Core Log examples. - * - * This demo shows how to log at various levels and to change what log is shown. - * You can also use a custom log printer in your app as shown in _log_custom. - */ - -static double -_divide(int num, int denom) -{ - if (denom == 0) - EINA_LOG_CRIT("Attempt to divide by 0\n"); - else - { -if (denom < 0) - EINA_LOG_WARN("Possible undesirable
[EGIT] [website/www-content] master 01/01: Wiki page logging.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=81ecab3a0af17f156994e6a92556a55d509a5d49 commit 81ecab3a0af17f156994e6a92556a55d509a5d49 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Mon Dec 11 08:19:38 2017 -0800 Wiki page logging.md changed with summary [] by Gareth Halfacree --- pages/develop/guides/c/eina/logging.md.txt | 165 ++--- 1 file changed, 106 insertions(+), 59 deletions(-) diff --git a/pages/develop/guides/c/eina/logging.md.txt b/pages/develop/guides/c/eina/logging.md.txt index 620983055..e58fbfb08 100644 --- a/pages/develop/guides/c/eina/logging.md.txt +++ b/pages/develop/guides/c/eina/logging.md.txt @@ -1,8 +1,8 @@ --- -~~Title: Error Logging~~ +~~Title: Eina Logging~~ --- -# Error Logging # +# Eina Logging # EFL uses a common method to log error messages, called ``Eina_Log``, which allows you to adjust the verbosity of the logs using environment variables. @@ -18,70 +18,117 @@ The ``Eina_Log`` module provides logging facilities for libraries and applicatio |Info | 3 | ``EINA_LOG_INFO()`` | |Debug| 4 | ``EINA_LOG_DBG()`` | -## Logging Domains ## - -Logging domains are a way to separate a set of log messages into a context (e.g. a module) and provide a way of controlling this set as a whole. - -Suppose you have three different modules in your application and you want to get logging only from one of them (i.e. to create some sort of filter). To achieve that all you need to do is create a logging domain for each module so that all logging inside a module can be considered as a whole. - -Logging domains are specified by a name, color applied to the name and the level. The first two (log name and log color) are set through code inside your application, module or library. The log level is used to control which messages should appear. It specifies the lowest level that should be displayed, i.e. a message with level 2 being logged on a domain with level set to 3 would be displayed while a message with level 4 wouldn't. ## Setting the Log Level ## -Logging of domain and global messages can be controlled at runtime using the following environment variables. - -### Domain Logging ### - -Domain level logging is set during runtime, in contrast with the name and color, through the environment variable ``EINA_LOG_LEVELS``. - -```bash -EINA_LOG_LEVELS=module1:4,module2:2,module3:0 ./{application} -``` - -In this example the command would set the log level of ``module1`` to 4, ``module2`` to 2, and ``module3`` to 0. - -### General Logging ### - -The global logger to which ``EINA_LOG_{ERR, DBG, INFO, CRIT, WARN}`` macros log is created internally by ``Eina_Log`` with an empty name and can be used for general logging, where logging domains do not apply. - -Since this global logger doesn't have a name, you can't set its level through the ``EINA_LOG_LEVELS`` variable. Instead, it is controlled via the ``EINA_LOG_LEVEL`` variable. - -To set the general log level use the ``EINA_LOG_LEVEL`` environment variable: - -```bash -EINA_LOG_LEVEL={N} ./{application} -``` - -Where ``{N}`` is the log level number and ``{application}`` the binary you are currently debugging. - -> **NOTE:** -> The global ``EINA_LOG_LEVEL`` can also be set within your code using the ``eina_log_level_set()`` function. - - Disabling Internal Eina Logging - -While developing your libraries or applications, you may notice that the ``EINA_LOG_DOM_{ERR, DBG, INFO, CRIT, WARN}`` macros also print out messages from ``Eina`` itself. To tidy up the logging output use the following command to disable the logging of intenal ``Eina`` code: - -```bash -EINA_LOG_LEVEL={N} EINA_LOG_LEVELS_GLOB=eina_*:0 ./{application} -``` - -Where ``{N}`` is the log level number and ``{application}`` the binary you are currently debugging. Removing these internal logs from the output makes it easier for you to see your own domain messages. - -### Aborting on Selected Log Level ## - -As well as controlling the logs themselves, the respective log levels can be used to close a program - calling ``abort()`` - once a message of a given level is logged, allowing you to automatically terminate execution. This is toggled through the environment variable ``EINA_LOG_ABORT``, while the level to be considered critical - and thus terminate execution - through the environment variable ``EINA_LOG_ABORT_LEVEL``. - -> **NOTE:** -> Aborting at a particular log level can also be controlled from within the application itself using the ``eina_log_abort_on_critical_set()`` and ``eina_log_abort_on_critical_level_set()`` functions. +``Eina`` provides ``eina_log_print()``, a standard function to manage all logging messages. This function may be called directly or using helper macros including ``EINA_LOG_DBG()``, ``EINA_LOG_ERR()`` or those that take a specific dom
[EGIT] [website/www-content] master 01/01: Wiki page log-levels.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=eb118b7bbeec28f43f97eda55c7b5acd4ca13197 commit eb118b7bbeec28f43f97eda55c7b5acd4ca13197 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Mon Dec 11 08:19:53 2017 -0800 Wiki page log-levels.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/log-levels.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/debug/log-levels.md.txt b/pages/develop/debug/log-levels.md.txt index 620983055..72eb0c641 100644 --- a/pages/develop/debug/log-levels.md.txt +++ b/pages/develop/debug/log-levels.md.txt @@ -83,5 +83,5 @@ Where ``{N}`` is the log level number and ``{application}`` the binary you are c ## Further Reading ## -[Eina Programming Guide: Logging](/develop/c/eina/logging.md) +[Eina Programming Guide: Logging](/develop/guides/c/eina/logging.md) :A reference, including example, for the Eina_Log module. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page logging.md changed with summary [created] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=c48fdbe00fbb29fee39c56df6349a6b431f7e252 commit c48fdbe00fbb29fee39c56df6349a6b431f7e252 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Mon Dec 11 08:19:05 2017 -0800 Wiki page logging.md changed with summary [created] by Gareth Halfacree --- pages/develop/guides/c/eina/logging.md.txt | 87 ++ 1 file changed, 87 insertions(+) diff --git a/pages/develop/guides/c/eina/logging.md.txt b/pages/develop/guides/c/eina/logging.md.txt new file mode 100644 index 0..620983055 --- /dev/null +++ b/pages/develop/guides/c/eina/logging.md.txt @@ -0,0 +1,87 @@ +--- +~~Title: Error Logging~~ +--- + +# Error Logging # + +EFL uses a common method to log error messages, called ``Eina_Log``, which allows you to adjust the verbosity of the logs using environment variables. + +The ``Eina_Log`` module provides logging facilities for libraries and applications. It provides colored logging, basic logging levels (error, warning, debug, info, critical) and *logging domains*, or *loggers*. For those unfamiliar with this term, it offers a way to separate a set of log messages into a specific context (e.g. a module) and provides a way of controlling this set as a whole. + +## Available Log Levels ## + +| Level | Number | Macro | +|-||-| +|Critical | 0 | ``EINA_LOG_CRIT()`` | +|Error| 1 | ``EINA_LOG_ERR()`` | +|Warning | 2 | ``EINA_LOG_WARN()`` | +|Info | 3 | ``EINA_LOG_INFO()`` | +|Debug| 4 | ``EINA_LOG_DBG()`` | + +## Logging Domains ## + +Logging domains are a way to separate a set of log messages into a context (e.g. a module) and provide a way of controlling this set as a whole. + +Suppose you have three different modules in your application and you want to get logging only from one of them (i.e. to create some sort of filter). To achieve that all you need to do is create a logging domain for each module so that all logging inside a module can be considered as a whole. + +Logging domains are specified by a name, color applied to the name and the level. The first two (log name and log color) are set through code inside your application, module or library. + +The log level is used to control which messages should appear. It specifies the lowest level that should be displayed, i.e. a message with level 2 being logged on a domain with level set to 3 would be displayed while a message with level 4 wouldn't. + +## Setting the Log Level ## + +Logging of domain and global messages can be controlled at runtime using the following environment variables. + +### Domain Logging ### + +Domain level logging is set during runtime, in contrast with the name and color, through the environment variable ``EINA_LOG_LEVELS``. + +```bash +EINA_LOG_LEVELS=module1:4,module2:2,module3:0 ./{application} +``` + +In this example the command would set the log level of ``module1`` to 4, ``module2`` to 2, and ``module3`` to 0. + +### General Logging ### + +The global logger to which ``EINA_LOG_{ERR, DBG, INFO, CRIT, WARN}`` macros log is created internally by ``Eina_Log`` with an empty name and can be used for general logging, where logging domains do not apply. + +Since this global logger doesn't have a name, you can't set its level through the ``EINA_LOG_LEVELS`` variable. Instead, it is controlled via the ``EINA_LOG_LEVEL`` variable. + +To set the general log level use the ``EINA_LOG_LEVEL`` environment variable: + +```bash +EINA_LOG_LEVEL={N} ./{application} +``` + +Where ``{N}`` is the log level number and ``{application}`` the binary you are currently debugging. + +> **NOTE:** +> The global ``EINA_LOG_LEVEL`` can also be set within your code using the ``eina_log_level_set()`` function. + + Disabling Internal Eina Logging + +While developing your libraries or applications, you may notice that the ``EINA_LOG_DOM_{ERR, DBG, INFO, CRIT, WARN}`` macros also print out messages from ``Eina`` itself. To tidy up the logging output use the following command to disable the logging of intenal ``Eina`` code: + +```bash +EINA_LOG_LEVEL={N} EINA_LOG_LEVELS_GLOB=eina_*:0 ./{application} +``` + +Where ``{N}`` is the log level number and ``{application}`` the binary you are currently debugging. Removing these internal logs from the output makes it easier for you to see your own domain messages. + +### Aborting on Selected Log Level ## + +As well as controlling the logs themselves, the respective log levels can be used to close a program - calling ``abort()`` - once a message of a given level is logged, allowing you to automatically terminate execution. This is toggled through the environment variable ``EINA_LOG_ABORT``, while the level to be considered critical - and thus terminate execution - through the environment variable ``EINA_LOG_ABORT_LEVEL``.
[EGIT] [website/www-content] master 01/01: Wiki page logging.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=d8b2ffbd25dc42addd96b529df28c845984ddb9d commit d8b2ffbd25dc42addd96b529df28c845984ddb9d Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Mon Dec 11 08:01:04 2017 -0800 Wiki page logging.md changed with summary [] by Gareth Halfacree --- pages/develop/c/eina/logging.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/c/eina/logging.md.txt b/pages/develop/c/eina/logging.md.txt index 2b84b5469..a6010c1e6 100644 --- a/pages/develop/c/eina/logging.md.txt +++ b/pages/develop/c/eina/logging.md.txt @@ -25,7 +25,7 @@ The log level is used to control which messages should appear. It specifies the ``Eina`` provides ``eina_log_print()``, a standard function to manage all logging messages. This function may be called directly or using helper macros including ``EINA_LOG_DBG()``, ``EINA_LOG_ERR()`` or those that take a specific domain as an argument as with ``EINA_LOG_DOM_DBG()`` and ``EINA_LOG_DOM_ERR()``. Internally, ``eina_log_print()`` will call the function defined with ``eina_log_print_cb_set()``, which defaults to ``eina_log_print_cb_stderr()`` but may be changed to do whatever [...] -The logging system is thread-safe once initialized with ``eina_log_threads_enable()``. The thread that calls this function first is considered "main thread" and other threads will have their thread id (``pthread_self()``) printed in the log message so it is easy to detect from where the messages are coming. +The logging system is thread-safe once initialized with ``eina_log_threads_enable()``. The thread that calls this function first is considered "main thread" and other threads will have their thread ID (``pthread_self()``) printed in the log message so it is easy to detect from where the messages are coming. The different logging levels serve to customize the amount of debugging information and may be used to automatically call ``abort()`` once a message of a given level is printed. This is controlled by the environment variable ``EINA_LOG_ABORT`` and the level to be considered critical with ``EINA_LOG_ABORT_LEVEL``. These can be changed with ``eina_log_abort_on_critical_set()`` and ``eina_log_abort_on_critical_level_set()``. --
[EGIT] [website/www-content] master 01/01: Wiki page logging.md changed with summary [created] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=fd4c0ebecb3bc73ad9c86a426dfbd59da5649773 commit fd4c0ebecb3bc73ad9c86a426dfbd59da5649773 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Mon Dec 11 07:49:25 2017 -0800 Wiki page logging.md changed with summary [created] by Gareth Halfacree --- pages/develop/c/eina/logging.md.txt | 134 1 file changed, 134 insertions(+) diff --git a/pages/develop/c/eina/logging.md.txt b/pages/develop/c/eina/logging.md.txt new file mode 100644 index 0..2b84b5469 --- /dev/null +++ b/pages/develop/c/eina/logging.md.txt @@ -0,0 +1,134 @@ +--- +~~Title: Log Levels~~ +--- + +# Eina Logging # + +EFL uses a common method to log error messages, called ``Eina_Log``, which allows you to adjust the verbosity of the logs using environment variables. + +The ``Eina_Log`` module provides logging facilities for libraries and applications. It provides colored logging, basic logging levels (error, warning, debug, info, critical) and *logging domains*, or *loggers*. For those unfamiliar with this term, it offers a way to separate a set of log messages into a specific context (e.g. a module) and provides a way of controlling this set as a whole. + +## Available Log Levels ## + +| Level | Number | Macro | +|-||-| +|Critical | 0 | ``EINA_LOG_CRIT()`` | +|Error| 1 | ``EINA_LOG_ERR()`` | +|Warning | 2 | ``EINA_LOG_WARN()`` | +|Info | 3 | ``EINA_LOG_INFO()`` | +|Debug| 4 | ``EINA_LOG_DBG()`` | + + +The log level is used to control which messages should appear. It specifies the lowest level that should be displayed, i.e. a message with level 2 being logged on a domain with level set to 3 would be displayed while a message with level 4 wouldn't. + +## Setting the Log Level ## + +``Eina`` provides ``eina_log_print()``, a standard function to manage all logging messages. This function may be called directly or using helper macros including ``EINA_LOG_DBG()``, ``EINA_LOG_ERR()`` or those that take a specific domain as an argument as with ``EINA_LOG_DOM_DBG()`` and ``EINA_LOG_DOM_ERR()``. Internally, ``eina_log_print()`` will call the function defined with ``eina_log_print_cb_set()``, which defaults to ``eina_log_print_cb_stderr()`` but may be changed to do whatever [...] + +The logging system is thread-safe once initialized with ``eina_log_threads_enable()``. The thread that calls this function first is considered "main thread" and other threads will have their thread id (``pthread_self()``) printed in the log message so it is easy to detect from where the messages are coming. + +The different logging levels serve to customize the amount of debugging information and may be used to automatically call ``abort()`` once a message of a given level is printed. This is controlled by the environment variable ``EINA_LOG_ABORT`` and the level to be considered critical with ``EINA_LOG_ABORT_LEVEL``. These can be changed with ``eina_log_abort_on_critical_set()`` and ``eina_log_abort_on_critical_level_set()``. + +The default maximum level to print is defined by the environment variable ``EINA_LOG_LEVEL`` but may be set per-domain with ``EINA_LOG_LEVELS``. It will default to ``EINA_LOG_ERR``. This can be changed with ``eina_log_level_set()``. + +To use the log system ``Eina`` must be initialized with ``eina_init()`` and later shut down with ``eina_shutdown()``. + +### Controlling Print Callbacks ### + +The log module allows the user to change the way ``eina_log_print()`` displays messages. It suffices to pass to ``eina_log_print_cb_set()`` the function used to display the message. That function must be of type ``#Eina_Log_Print_Cb``. As custom data can be passed to that callback, customized messages can be displayed. + +It is suggested to not use ``__FILE__``, ``__FUNCTION__`` or ``__LINE__`` when writing that callback, but when defining macros like ``EINA_LOG_ERR()`` and others. + +## Logging Example ## + +The following example, available for download from the [Enlightenment Project git repository](https://git.enlightenment.org/tools/examples.git/tree/reference/c/eina/src/eina_log.c), demonstrates the control of logging from within an application. + +```c +#define EFL_EO_API_SUPPORT 1 +#define EFL_BETA_API_SUPPORT 1 + +#include + +#include +#include + +/* + * Efl Core Log examples. + * + * This demo shows how to log at various levels and to change what log is shown. + * You can also use a custom log printer in your app as shown in _log_custom. + */ + +static double +_divide(int num, int denom) +{ + if (denom == 0) + EINA_LOG_CRIT("Attempt to divide by 0\n"); + else + { +if (denom < 0) + EINA_LOG_WARN("Possible undesirable effect, divide by negative number"); + +
[EGIT] [website/www-content] master 01/01: Wiki page log-levels.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=1ce8121e3a1a51ad8b5e417292caf34a6e97947f commit 1ce8121e3a1a51ad8b5e417292caf34a6e97947f Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Mon Dec 11 06:58:25 2017 -0800 Wiki page log-levels.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/log-levels.md.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/develop/debug/log-levels.md.txt b/pages/develop/debug/log-levels.md.txt index 01d2f6555..20261861c 100644 --- a/pages/develop/debug/log-levels.md.txt +++ b/pages/develop/debug/log-levels.md.txt @@ -65,8 +65,7 @@ While developing your libraries or applications, you may notice that the ``EINA_ ```bash EINA_LOG_LEVEL={N} EINA_LOG_LEVELS_GLOB=eina_*:0 ./{application} ``` - -Removing these internal logs from the output makes it easier for you to see your own domain messages. +Where ``{N}`` is the log level number and ``{application}`` the binary you are currently debugging. Removing these internal logs from the output makes it easier for you to see your own domain messages. ### Aborting on Selected Log Level ## @@ -76,8 +75,9 @@ As well as controlling the logs themselves, the respective log levels can be use > Aborting at a particular log level can also be controlled from within the > application itself using the ``eina_log_abort_on_critical_set()`` and > ``eina_log_abort_on_critical_level_set()`` functions. ```bash -EINA_LOG_ABORT_LEVEL={N} EINA_LOG_ABORT ./{application} +EINA_LOG_ABORT=1 EINA_LOG_ABORT_LEVEL={N} ./{application} ``` +Where ``{N}`` is the log level number and ``{application}`` the binary you are currently debugging. ## Further Reading ## --
[EGIT] [website/www-content] master 01/01: Wiki page log-levels.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=49ee869a22fc2914ac94e344e9b98c6e70d3fe8f commit 49ee869a22fc2914ac94e344e9b98c6e70d3fe8f Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Mon Dec 11 06:57:36 2017 -0800 Wiki page log-levels.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/log-levels.md.txt | 115 -- 1 file changed, 12 insertions(+), 103 deletions(-) diff --git a/pages/develop/debug/log-levels.md.txt b/pages/develop/debug/log-levels.md.txt index 1a16a6014..01d2f6555 100644 --- a/pages/develop/debug/log-levels.md.txt +++ b/pages/develop/debug/log-levels.md.txt @@ -1,8 +1,8 @@ --- -~~Title: Log Levels~~ +~~Title: Error Logging~~ --- -# Log Levels # +# Error Logging # EFL uses a common method to log error messages, called ``Eina_Log``, which allows you to adjust the verbosity of the logs using environment variables. @@ -68,109 +68,18 @@ EINA_LOG_LEVEL={N} EINA_LOG_LEVELS_GLOB=eina_*:0 ./{application} Removing these internal logs from the output makes it easier for you to see your own domain messages. -## Eina_Log_Print() ## +### Aborting on Selected Log Level ## -``Eina`` provides ``eina_log_print()``, a standard function to manage all logging messages. This function may be called directly or using helper macros including ``EINA_LOG_DBG()``, ``EINA_LOG_ERR()`` or those that take a specific domain as an argument as with ``EINA_LOG_DOM_DBG()`` and ``EINA_LOG_DOM_ERR()``. Internally, ``eina_log_print()`` will call the function defined with ``eina_log_print_cb_set()``, which defaults to ``eina_log_print_cb_stderr()`` but may be changed to do whatever [...] +As well as controlling the logs themselves, the respective log levels can be used to close a program - calling ``abort()`` - once a message of a given level is logged, allowing you to automatically terminate execution. This is toggled through the environment variable ``EINA_LOG_ABORT``, while the level to be considered critical - and thus terminate execution - through the environment variable ``EINA_LOG_ABORT_LEVEL``. -The logging system is thread-safe once initialized with ``eina_log_threads_enable()``. The thread that calls this function first is considered "main thread" and other threads will have their thread id (``pthread_self()``) printed in the log message so it is easy to detect from where the messages are coming. +> **NOTE:** +> Aborting at a particular log level can also be controlled from within the application itself using the ``eina_log_abort_on_critical_set()`` and ``eina_log_abort_on_critical_level_set()`` functions. -The different logging levels serve to customize the amount of debugging information and may be used to automatically call ``abort()`` once a message of a given level is printed. This is controlled by the environment variable ``EINA_LOG_ABORT`` and the level to be considered critical with ``EINA_LOG_ABORT_LEVEL``. These can be changed with ``eina_log_abort_on_critical_set()`` and ``eina_log_abort_on_critical_level_set()``. - -The default maximum level to print is defined by the environment variable ``EINA_LOG_LEVEL`` but may be set per-domain with ``EINA_LOG_LEVELS``. It will default to ``EINA_LOG_ERR``. This can be changed with ``eina_log_level_set()``. - -To use the log system ``Eina`` must be initialized with ``eina_init()`` and later shut down with ``eina_shutdown()``. - -### Controlling Print Callbacks ### - -The log module allows the user to change the way ``eina_log_print()`` displays messages. It suffices to pass to ``eina_log_print_cb_set()`` the function used to display the message. That function must be of type ``#Eina_Log_Print_Cb``. As custom data can be passed to that callback, customized messages can be displayed. - -It is suggested to not use ``__FILE__``, ``__FUNCTION__`` or ``__LINE__`` when writing that callback, but when defining macros like ``EINA_LOG_ERR()`` and others. - -## Logging from an Application ## - -The following example, available for download from the [Enlightenment Project git repository](https://git.enlightenment.org/tools/examples.git/tree/reference/c/eina/src/eina_log.c), demonstrates the control of logging from within an application. - -```c -#define EFL_EO_API_SUPPORT 1 -#define EFL_BETA_API_SUPPORT 1 - -#include - -#include -#include - -/* - * Efl Core Log examples. - * - * This demo shows how to log at various levels and to change what log is shown. - * You can also use a custom log printer in your app as shown in _log_custom. - */ - -static double -_divide(int num, int denom) -{ - if (denom == 0) - EINA_LOG_CRIT("Attempt to divide by 0\n"); - else - { -if (denom < 0) - EINA_LOG_WARN("Possible undesirable effect, divide by negative number"); - -double ret = ((double) num / denom);
[EGIT] [website/www-content] master 01/01: Wiki page generic-value.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=04c033fb899d4111bc47ae4f7fd32675fb028c6a commit 04c033fb899d4111bc47ae4f7fd32675fb028c6a Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Fri Dec 8 07:15:26 2017 -0800 Wiki page generic-value.md changed with summary [] by Gareth Halfacree --- pages/develop/guides/c/eina/generic-value.md.txt | 134 +-- 1 file changed, 77 insertions(+), 57 deletions(-) diff --git a/pages/develop/guides/c/eina/generic-value.md.txt b/pages/develop/guides/c/eina/generic-value.md.txt index 5a94bdd17..0bc11ed60 100644 --- a/pages/develop/guides/c/eina/generic-value.md.txt +++ b/pages/develop/guides/c/eina/generic-value.md.txt @@ -4,38 +4,57 @@ # Generic Value # -The ``Eina_Value`` object provides generic data storage and access, allowing you to store what you want in one single type of ``Eina_Value``. It is meant for simple data types, providing uniform access and release functions useful to exchange data while preserving their types. ``Eina_Value`` supports a number of predefined types, can be extended with additional user-provided types, and it can convert between data types, including strings. +The ``Eina_Value`` object provides storage of and access to generic data, allowing you to store whatever you want in a single ``Eina_Value`` type. It is meant for simple data types, providing uniform access and release functions for the exchange of data while preserving their types. ``Eina_Value`` supports a number of predefined types, can be extended with additional user-provided types and can convert between differing data types including strings. -You can find many usage example in the [EFL examples repository](https://git.enlightenment.org/tools/examples.git/) in [reference/c/eina/src/eina_value.c](https://git.enlightenment.org/tools/examples.git/tree/reference/c/eina/src/eina_value.c). +Examples of ``Eina_Value`` usage can be found in the [EFL examples git repository](https://git.enlightenment.org/tools/examples.git/) in the file [reference/c/eina/src/eina_value.c](https://git.enlightenment.org/tools/examples.git/tree/reference/c/eina/src/eina_value.c). ## Value Types ## -``Eina_Value`` can handle the common **simple** types: ``EINA_VALUE_TYPE_UCHAR`` (unsigned char), ``EINA_VALUE_TYPE_USHORT`` (unsigned short), ``EINA_VALUE_TYPE_UINT`` (unsigned int), ``EINA_VALUE_TYPE_ULONG`` (unsigned long), ``EINA_VALUE_TYPE_TIMESTAMP`` (unsigned long, used for timestamps), ``EINA_VALUE_TYPE_UINT64`` (unsigned integer of 64 bits), ``EINA_VALUE_TYPE_CHAR`` (char), ``EINA_VALUE_TYPE_SHORT`` (short), ``EINA_VALUE_TYPE_INT`` (int), ``EINA_VALUE_TYPE_LONG`` (long), ``EINA_ [...] - -In addition, a number of specializations of ``Eina_Value`` exist to handle **aggregate** types: - -* ``EINA_VALUE_TYPE_ARRAY``: Manages arrays of elements through the ``Eina_Value_Array`` object. -* ``EINA_VALUE_TYPE_LIST``: Manages lists of elements through the ``Eina_Value_List`` object. -* ``EINA_VALUE_TYPE_HASH``: Manages hash tables through the ``Eina_Value_Hash`` object. -* ``EINA_VALUE_TYPE_BLOB``: Manages blobs of bytes (memory buffers) through the ``Eina_Value_Blob`` object. -* ``EINA_VALUE_TYPE_STRUCT``: Manages user-defined compound types (structures) through the ``Eina_Value_Struct`` object. +``Eina_Value`` can handle the following common *simple* types: + +* ``EINA_VALUE_TYPE_UCHAR`` - Unsigned char +* ``EINA_VALUE_TYPE_USHORT`` - Unsigned short +* ``EINA_VALUE_TYPE_UINT`` - Unsigned int +* ``EINA_VALUE_TYPE_ULONG`` - Unsigned long +* ``EINA_VALUE_TYPE_TIMESTAMP`` An unsigned long variant used for timestamps +* ``EINA_VALUE_TYPE_UINT64`` - Unsigned 64-bit integer +* ``EINA_VALUE_TYPE_CHAR`` - Char +* ``EINA_VALUE_TYPE_SHORT`` - Short +* ``EINA_VALUE_TYPE_INT`` - Int +* ``EINA_VALUE_TYPE_LONG`` - Long +* ``EINA_VALUE_TYPE_INT64`` - 64-bit integer +* ``EINA_VALUE_TYPE_FLOAT`` - Float +* ``EINA_VALUE_TYPE_DOUBLE`` - Double +* ``EINA_VALUE_TYPE_STRINGSHARE`` - Stringshared string +* ``EINA_VALUE_TYPE_STRING`` - String +* ``EINA_VALUE_TYPE_TIMEVAL`` - 'Struct timeval' + +In addition ``Eina_Value`` has a number of specializations to handle the following *aggregate* types: + +* ``EINA_VALUE_TYPE_ARRAY`` - Manages arrays of elements through the ``Eina_Value_Array`` object +* ``EINA_VALUE_TYPE_LIST`` - Manages lists of elements through the ``Eina_Value_List`` object +* ``EINA_VALUE_TYPE_HASH`` - Manages hash tables through the ``Eina_Value_Hash`` object +* ``EINA_VALUE_TYPE_BLOB`` - Manages blobs of bytes (memory buffers) through the ``Eina_Value_Blob`` object +* ``EINA_VALUE_TYPE_STRUCT``: Manages user-defined compound types (structures) through the ``Eina_Value_Struct`` object ## Simple Values ## ### Creating and Destroying Simple Values ### -New values can be allocated with ``eina_value_new()`` and disposed of with ``eina_value_free()``. The
[EGIT] [website/www-content] master 01/01: Wiki page valgrind.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=8ee272a68c4f115bf7bf361d4d0d09f7d30f2f41 commit 8ee272a68c4f115bf7bf361d4d0d09f7d30f2f41 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Dec 7 06:42:29 2017 -0800 Wiki page valgrind.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/c/valgrind.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/debug/c/valgrind.md.txt b/pages/develop/debug/c/valgrind.md.txt index 868e07bb5..c330a0df0 100644 --- a/pages/develop/debug/c/valgrind.md.txt +++ b/pages/develop/debug/c/valgrind.md.txt @@ -96,7 +96,7 @@ valgrind --leak-check=full --track-origins=yes ./hello [...] ``` -All the memory accesses pass through Valgrind, so it shows you a backtrace when an allocation is made and not freed. +All the memory accesses pass through Valgrind, so it is able to produce a backtrace when an allocation is made and not freed. > **NOTE:** > There can be other traces in the ``HEAD SUMMARY``, but this example focuses > on the memory leak within the application. As a result you may have to > ignore things not relevant to that code. --
[EGIT] [website/www-content] master 01/01: Wiki page gdb.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=6991e959355b384de9eb98e75a107900de144118 commit 6991e959355b384de9eb98e75a107900de144118 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Dec 7 06:34:52 2017 -0800 Wiki page gdb.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/c/gdb.md.txt | 31 ++- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/pages/develop/debug/c/gdb.md.txt b/pages/develop/debug/c/gdb.md.txt index 1d2dbcb63..0bd6f0e68 100644 --- a/pages/develop/debug/c/gdb.md.txt +++ b/pages/develop/debug/c/gdb.md.txt @@ -1,5 +1,3 @@ -## Wrong function on an object ## - --- ~~Title: Debugging with GDB~~ --- @@ -12,7 +10,7 @@ The GNU Debugger (GDB) is an invaluable tool for tracking down the precise cause ## Debugging an Incorrect Object ## -The code below creates three Elementary objects: ``win``, ``box`` and an anonymous button. It displays a window with an "Quit" button which closes the window when it is clicked. Enter the following and save it as "hello.c": +The code below creates three Elementary objects: ``win``, ``box`` and an anonymous button. It displays a window with a "Quit" button, which closes the window when it is clicked. Enter the following and save it as "hello.c": ```c #define EFL_EO_API_SUPPORT 1 @@ -74,13 +72,13 @@ Then execute the program: ERR<12993>:eo lib/eo/eo.c:605 _efl_object_call_resolve() in ../src/lib/efl/interfaces/efl_pack.eo.c:6: func 'efl_pack' (1656) could not be resolved for class 'Efl.Ui.Win'. ``` -The cause of this error is that the ``efl_pack()`` function is called on the incorrect object, ``win``. The error log says that the ``efl_pack`` is not in the ``Efl.Ui.Win`` API, and so that the error is coming from the application and not from EFL itself. +This error is caused by the ``efl_pack()`` function being called on an incorrect object, ``win``. The error log explains that the ``efl_pack`` is not in the ``Efl.Ui.Win`` API, and so that the error is coming from the application and not from EFL itself. For a more complicated application, this basic trace is not enough to track down the precise location of the error. Fortunately, EFL provides a macro for backtraces: ``EINA_LOG_ABORT``. -A message generated by CRI macro can automatically call ``abort()`` once a message of a given log level is printed. This is controlled by the environment variable ``EINA_LOG_ABORT`` and the level to be considered critical with ``EINA_LOG_ABORT_LEVEL``. This means the program will stop at the first error which meets these two requirements. +A message generated by the ``EINA_LOG_CRI()`` macro can automatically call ``abort()`` once a message of a given log level is printed. This is controlled by the environment variable ``EINA_LOG_ABORT``, and the level to be considered critical by the environment variable ``EINA_LOG_ABORT_LEVEL``. When enabled the program will stop at the first error which meets both of the two requirements. -Run GDB over your application to receive the following backtrace: +Run GDB over the application with ``EINA_LOG_ABORT_LEVEL=4`` and ``EINA_LOG_ABORT=1`` set to receive the following backtrace: ```gdb EINA_LOG_ABORT_LEVEL=4 EINA_LOG_ABORT=1 gdb hello @@ -98,7 +96,7 @@ ERR<13088>:eo lib/eo/eo.c:605 _efl_object_call_resolve() in ../src/lib/efl/inter Thread 1 "debugging" received signal SIGABRT, Aborted. 0x73e998a0 in raise () from /usr/lib/libc.so.6 -(gdb) bt +(gdb) backgrace #0 0x73e998a0 in raise () from /usr/lib/libc.so.6 #1 0x73e9af09 in abort () from /usr/lib/libc.so.6 #2 0x7739ee25 in eina_log_print_unlocked (domain=, level=EINA_LOG_LEVEL_ERR, @@ -136,16 +134,15 @@ Thread 1 "debugging" received signal SIGABRT, Aborted. The ``efl_pack()`` function is in frame five, so is called from frame six. -Go to frame seven: +Go to frame six: ```gdb -(gdb) fr 6 +(gdb) frame 6 #6 0x53d1 in efl_main (data=, ev=) at gdb.c:37 37 efl_add(EFL_UI_BUTTON_CLASS, box, // win instead of box ``` -This frame shows that the button constructor (line 37) contains the cause of the issue, and we can see the error at line 40 of "hello.c". - +This frame shows that the button constructor which begins on line 37 (``at gdb.c:37``) is responsible for the problem. Looking at the source code for the application, walk down from line 37 until you find the line in which ``win`` is used instead of ``box`` - which is line 40. This is the line which contains the error, and which must be corrected for the program to function correctly. ## Debugging a Callback Function ## @@ -201,7 +198,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) EFL_MAIN() ``` -Save the program as "helloworld.c&quo
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [created] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=4ad7a3a5c8dfa0acf7ff932c892727b8e7bd8fc3 commit 4ad7a3a5c8dfa0acf7ff932c892727b8e7bd8fc3 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Dec 6 08:29:41 2017 -0800 Wiki page start.md changed with summary [created] by Gareth Halfacree --- pages/develop/guides/c/eina/tools/start.md.txt | 19 +++ 1 file changed, 19 insertions(+) diff --git a/pages/develop/guides/c/eina/tools/start.md.txt b/pages/develop/guides/c/eina/tools/start.md.txt new file mode 100644 index 0..ebf378d0e --- /dev/null +++ b/pages/develop/guides/c/eina/tools/start.md.txt @@ -0,0 +1,19 @@ +--- +~~Title: Eina Programming Guide - Tools~~ +--- + +# Eina Programming Guide - Tools # + +The ``Eina`` library provides a range of tools for handling common tasks. The following tools are documented: + +## String Tool ## + +[The String Tool](https://www.enlightenment.org/develop/guides/c/eina/tools/eina-string-tool.md) offers a range of string-handling capabilities from conversion to or from upper or lower case, splitting, joining, and matching strings. + +## Memory Pools ## + +[The Memory Pool Tool](https://www.enlightenment.org/develop/guides/c/eina/tools/eina-mempool.md) provides simple handling of memory pools, designed to preallocate fixed-size memory spaces and simplify memory management tasks. + +## Safety Checks ## + +[The Safety Checks](https://www.enlightenment.org/develop/guides/c/eina/tools/eina-safety-checks.md) are a collection of macros designed to check for parameters or values which must never occur, in a similar manner to the ``assert()`` function but with logging and returning capabilities rather than outright abortion. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=a6fcde8cd7c1903037f32fd50efb31ab762ce925 commit a6fcde8cd7c1903037f32fd50efb31ab762ce925 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Dec 6 08:23:23 2017 -0800 Wiki page start.md changed with summary [] by Gareth Halfacree --- pages/develop/guides/start.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/guides/start.md.txt b/pages/develop/guides/start.md.txt index aab6ce4fc..3619bcac3 100644 --- a/pages/develop/guides/start.md.txt +++ b/pages/develop/guides/start.md.txt @@ -26,4 +26,4 @@ The documentation of EFL and its infrastructure is an ongoing effort, taking pla [The User Interface Sizing Programming Guide](https://www.enlightenment.org/develop/guides/c/ui/sizing.md) provides a reference to the controls offered by EFL for controlling the minimum and maximum size of a widget when default values are inappropriate. ## EFL C Porting Guide ## -[The EFL C Porting Guide](https://www.enlightenment.org/develop/guides/c/porting-guide.md) is designed for developers looking to tranisation from the current EFL API to the beta release, known as the Unified API. This document is a work in progress. \ No newline at end of file +[The EFL C Porting Guide](https://www.enlightenment.org/develop/guides/c/porting-guide.md) is designed for developers looking to transition from the current EFL API to the beta release, known as the Unified API. This document is a work in progress. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=357019741faa09f5e102410ff8cbc0afba6159c9 commit 357019741faa09f5e102410ff8cbc0afba6159c9 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Dec 6 08:22:48 2017 -0800 Wiki page start.md changed with summary [] by Gareth Halfacree --- pages/develop/guides/start.md.txt | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/develop/guides/start.md.txt b/pages/develop/guides/start.md.txt index 0a83f36ad..aab6ce4fc 100644 --- a/pages/develop/guides/start.md.txt +++ b/pages/develop/guides/start.md.txt @@ -13,17 +13,17 @@ The documentation in this section is split by language. At present, only C docum The documentation of EFL and its infrastructure is an ongoing effort, taking place alongside the roll-out of a new version of the application programming interface (API). The documentation in this section is verified as applicable to the new API, currently in beta; for guidance on the current API release consult the [Legacy Programming Guide](https://www.enlightenment.org/develop/legacy/program_guide/start). -### Eina Programming Guide ### +## Eina Programming Guide ## [The Eina Programming Guide](https://www.enlightenment.org/develop/guides/c/eina/start.md) provides a quick reference and code examples for the ``Eina`` library, which is designed to implement an API for data types in an efficient manner and which comes with tools for common tasks. -### Main Loop Programming Guide ### +## Main Loop Programming Guide ## [The Main Loop Programming Guide](https://www.enlightenment.org/develop/guides/c/core/main-loop.md) provides a reference to the internal EFL Main Loop, in which execution takes place, and the timers, monitors, idlers, and polling capabilities it offers. -### User Interface Sizing Programming Guide ### +## User Interface Sizing Programming Guide ## [The User Interface Sizing Programming Guide](https://www.enlightenment.org/develop/guides/c/ui/sizing.md) provides a reference to the controls offered by EFL for controlling the minimum and maximum size of a widget when default values are inappropriate. -### EFL C Porting Guide ### +## EFL C Porting Guide ## [The EFL C Porting Guide](https://www.enlightenment.org/develop/guides/c/porting-guide.md) is designed for developers looking to tranisation from the current EFL API to the beta release, known as the Unified API. This document is a work in progress. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=6a6d6bbe9b4eb0236e9b19b40ed0ec07a3f75d17 commit 6a6d6bbe9b4eb0236e9b19b40ed0ec07a3f75d17 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Dec 6 08:22:13 2017 -0800 Wiki page start.md changed with summary [] by Gareth Halfacree --- pages/develop/guides/start.md.txt | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pages/develop/guides/start.md.txt b/pages/develop/guides/start.md.txt index 84b06c3a2..0a83f36ad 100644 --- a/pages/develop/guides/start.md.txt +++ b/pages/develop/guides/start.md.txt @@ -13,6 +13,17 @@ The documentation in this section is split by language. At present, only C docum The documentation of EFL and its infrastructure is an ongoing effort, taking place alongside the roll-out of a new version of the application programming interface (API). The documentation in this section is verified as applicable to the new API, currently in beta; for guidance on the current API release consult the [Legacy Programming Guide](https://www.enlightenment.org/develop/legacy/program_guide/start). -## Eina Programming Guide ## +### Eina Programming Guide ### -[The Eina Programming Guide](https://www.enlightenment.org/develop/guides/c/eina/start.md) provides a quick reference and code examples for the ``Eina`` library, which is designed to implement an API for data types in an efficient manner and which comes with tools for common tasks. \ No newline at end of file +[The Eina Programming Guide](https://www.enlightenment.org/develop/guides/c/eina/start.md) provides a quick reference and code examples for the ``Eina`` library, which is designed to implement an API for data types in an efficient manner and which comes with tools for common tasks. + +### Main Loop Programming Guide ### + +[The Main Loop Programming Guide](https://www.enlightenment.org/develop/guides/c/core/main-loop.md) provides a reference to the internal EFL Main Loop, in which execution takes place, and the timers, monitors, idlers, and polling capabilities it offers. + +### User Interface Sizing Programming Guide ### + +[The User Interface Sizing Programming Guide](https://www.enlightenment.org/develop/guides/c/ui/sizing.md) provides a reference to the controls offered by EFL for controlling the minimum and maximum size of a widget when default values are inappropriate. + +### EFL C Porting Guide ### +[The EFL C Porting Guide](https://www.enlightenment.org/develop/guides/c/porting-guide.md) is designed for developers looking to tranisation from the current EFL API to the beta release, known as the Unified API. This document is a work in progress. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page log-levels.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=d6943d8795a3a0bb4f5336a19a50bb10d59a2ff1 commit d6943d8795a3a0bb4f5336a19a50bb10d59a2ff1 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Dec 6 07:42:46 2017 -0800 Wiki page log-levels.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/log-levels.md.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/pages/develop/debug/log-levels.md.txt b/pages/develop/debug/log-levels.md.txt index c88857de8..1a16a6014 100644 --- a/pages/develop/debug/log-levels.md.txt +++ b/pages/develop/debug/log-levels.md.txt @@ -32,9 +32,6 @@ The log level is used to control which messages should appear. It specifies the Logging of domain and global messages can be controlled at runtime using the following environment variables. -> **NOTE:** -> If you compiled Eina without debug mode, execution will yield only one log message: "argument is negative". - ### Domain Logging ### Domain level logging is set during runtime, in contrast with the name and color, through the environment variable ``EINA_LOG_LEVELS``. --
[EGIT] [website/www-content] master 01/01: Wiki page log-levels.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=533e7bf7ed86a21ecbd7d36163976b5239bdf374 commit 533e7bf7ed86a21ecbd7d36163976b5239bdf374 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Dec 6 07:14:42 2017 -0800 Wiki page log-levels.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/log-levels.md.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/develop/debug/log-levels.md.txt b/pages/develop/debug/log-levels.md.txt index ec2421b4c..c88857de8 100644 --- a/pages/develop/debug/log-levels.md.txt +++ b/pages/develop/debug/log-levels.md.txt @@ -61,7 +61,9 @@ Where ``{N}`` is the log level number and ``{application}`` the binary you are c The global ``EINA_LOG_LEVEL`` can also be set within your code using the ``eina_log_level_set()`` function. -While developing your libraries or applications, you may notice that ``EINA_LOG_DOM_{ERR, DBG, INFO, CRIT, WARN}`` macros also print out messages from ``eina`` itself. To tidy up the logging output use the following command to disable logging of intenal ``eina`` code: + Disabling Internal Eina Logging + +While developing your libraries or applications, you may notice that the ``EINA_LOG_DOM_{ERR, DBG, INFO, CRIT, WARN}`` macros also print out messages from ``Eina`` itself. To tidy up the logging output use the following command to disable the logging of intenal ``Eina`` code: ```bash EINA_LOG_LEVEL={N} EINA_LOG_LEVELS_GLOB=eina_*:0 ./{application} --
[EGIT] [website/www-content] master 01/01: Wiki page log-levels.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=2be7fc7c4acf32b3ab0a6de28a2da601ba96c487 commit 2be7fc7c4acf32b3ab0a6de28a2da601ba96c487 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Dec 6 06:17:09 2017 -0800 Wiki page log-levels.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/log-levels.md.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/pages/develop/debug/log-levels.md.txt b/pages/develop/debug/log-levels.md.txt index f60e33c15..ec2421b4c 100644 --- a/pages/develop/debug/log-levels.md.txt +++ b/pages/develop/debug/log-levels.md.txt @@ -39,8 +39,6 @@ Logging of domain and global messages can be controlled at runtime using the fol Domain level logging is set during runtime, in contrast with the name and color, through the environment variable ``EINA_LOG_LEVELS``. -You can also use finer-grained control via the ``EINA_LOG_LEVELS`` environment variable: - ```bash EINA_LOG_LEVELS=module1:4,module2:2,module3:0 ./{application} ``` --
[EGIT] [website/www-content] master 01/01: Wiki page log-levels.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=6dda772ef050b1d893ed7cd455564850fda73951 commit 6dda772ef050b1d893ed7cd455564850fda73951 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Dec 6 05:54:04 2017 -0800 Wiki page log-levels.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/log-levels.md.txt | 105 +++--- 1 file changed, 97 insertions(+), 8 deletions(-) diff --git a/pages/develop/debug/log-levels.md.txt b/pages/develop/debug/log-levels.md.txt index 36c8de396..f60e33c15 100644 --- a/pages/develop/debug/log-levels.md.txt +++ b/pages/develop/debug/log-levels.md.txt @@ -10,13 +10,13 @@ The ``Eina_Log`` module provides logging facilities for libraries and applicatio ## Available Log Levels ## -| Level | Number | Macro | -|-||---| -|Critical | 0 | ``EINA_LOG_CRIT()`` | -|Error| 1 | ``EINA_LOG_ERR()``| -|Warning | 2 | ``EINA_LOG_WARN()`` | -|Info | 3 | ``EINA_LOG_INFO()`` | -|Debug| 4 | ``EINA_LOG_DBG()``| +| Level | Number | Macro | +|-||-| +|Critical | 0 | ``EINA_LOG_CRIT()`` | +|Error| 1 | ``EINA_LOG_ERR()`` | +|Warning | 2 | ``EINA_LOG_WARN()`` | +|Info | 3 | ``EINA_LOG_INFO()`` | +|Debug| 4 | ``EINA_LOG_DBG()`` | ## Logging Domains ## @@ -87,4 +87,93 @@ To use the log system ``Eina`` must be initialized with ``eina_init()`` and late The log module allows the user to change the way ``eina_log_print()`` displays messages. It suffices to pass to ``eina_log_print_cb_set()`` the function used to display the message. That function must be of type ``#Eina_Log_Print_Cb``. As custom data can be passed to that callback, customized messages can be displayed. -It is suggested to not use ``__FILE__``, ``__FUNCTION__`` or ``__LINE__`` when writing that callback, but when defining macros like ``EINA_LOG_ERR()`` and others. \ No newline at end of file +It is suggested to not use ``__FILE__``, ``__FUNCTION__`` or ``__LINE__`` when writing that callback, but when defining macros like ``EINA_LOG_ERR()`` and others. + +## Logging from an Application ## + +The following example, available for download from the [Enlightenment Project git repository](https://git.enlightenment.org/tools/examples.git/tree/reference/c/eina/src/eina_log.c), demonstrates the control of logging from within an application. + +```c +#define EFL_EO_API_SUPPORT 1 +#define EFL_BETA_API_SUPPORT 1 + +#include + +#include +#include + +/* + * Efl Core Log examples. + * + * This demo shows how to log at various levels and to change what log is shown. + * You can also use a custom log printer in your app as shown in _log_custom. + */ + +static double +_divide(int num, int denom) +{ + if (denom == 0) + EINA_LOG_CRIT("Attempt to divide by 0\n"); + else + { +if (denom < 0) + EINA_LOG_WARN("Possible undesirable effect, divide by negative number"); + +double ret = ((double) num / denom); +EINA_LOG_INFO("%d / %d = %f\n", num, denom, ret); +return ret; + } + + return -1; +} + +static void +_divides() +{ + _divide(5, 1); + _divide(5, -1); + _divide(5, 0); +} + +static void +_log_levels() +{ + printf("Executing with default logging\n"); + _divides(); + + eina_log_level_set(EINA_LOG_LEVEL_WARN); + printf("Executing with WARN level\n"); // same as EINA_LOG_LEVEL = 2 + _divides(); + + eina_log_level_set(EINA_LOG_LEVEL_INFO); + printf("Executing with INFO on\n"); // same as EINA_LOG_LEVEL = 3 + _divides(); +} + +void _print_cb(const Eina_Log_Domain *domain EINA_UNUSED, Eina_Log_Level level, + const char *file, const char *fnc, int line, + const char *fmt, void *data EINA_UNUSED, va_list args) +{ + fprintf(stdout, "LOG %d <%s (%s:%d)> ", level, fnc, file, line); + vfprintf(stdout, fmt, args); + putc('\n', stdout); +} + +static void +_log_custom() +{ + printf("Executing with custom log printer\n"); + eina_log_print_cb_set(_print_cb, NULL); + _divides(); +} + +EAPI_MAIN void +efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) +{ + _log_levels(); + _log_custom(); + + efl_exit(0); +} +EFL_MAIN() +``` \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page log-levels.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=5be83be2930faa222c137e4cd8b3ab89ff8172eb commit 5be83be2930faa222c137e4cd8b3ab89ff8172eb Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Dec 5 08:41:46 2017 -0800 Wiki page log-levels.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/log-levels.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/debug/log-levels.md.txt b/pages/develop/debug/log-levels.md.txt index b6aeb2f03..36c8de396 100644 --- a/pages/develop/debug/log-levels.md.txt +++ b/pages/develop/debug/log-levels.md.txt @@ -12,7 +12,7 @@ The ``Eina_Log`` module provides logging facilities for libraries and applicatio | Level | Number | Macro | |-||---| -|Critical | 0 | ``EINA_LOG_LEVEL_CRIT()`` | +|Critical | 0 | ``EINA_LOG_CRIT()`` | |Error| 1 | ``EINA_LOG_ERR()``| |Warning | 2 | ``EINA_LOG_WARN()`` | |Info | 3 | ``EINA_LOG_INFO()`` | --
[EGIT] [website/www-content] master 01/01: Wiki page log-levels.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=3c6fb2d10c3c5dddfd0311b7044636b95fcb9bc0 commit 3c6fb2d10c3c5dddfd0311b7044636b95fcb9bc0 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Dec 5 08:41:09 2017 -0800 Wiki page log-levels.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/log-levels.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/debug/log-levels.md.txt b/pages/develop/debug/log-levels.md.txt index eef613a31..b6aeb2f03 100644 --- a/pages/develop/debug/log-levels.md.txt +++ b/pages/develop/debug/log-levels.md.txt @@ -12,7 +12,7 @@ The ``Eina_Log`` module provides logging facilities for libraries and applicatio | Level | Number | Macro | |-||---| -|Critical | 0 | ``EINA_LOG_LEVEL_CRITICAL()`` | +|Critical | 0 | ``EINA_LOG_LEVEL_CRIT()`` | |Error| 1 | ``EINA_LOG_ERR()``| |Warning | 2 | ``EINA_LOG_WARN()`` | |Info | 3 | ``EINA_LOG_INFO()`` | --
[EGIT] [website/www-content] master 01/01: Wiki page log-levels.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=ea954ba0a5dc61c7797648b3c80da5a4f05aecff commit ea954ba0a5dc61c7797648b3c80da5a4f05aecff Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Dec 5 08:22:17 2017 -0800 Wiki page log-levels.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/log-levels.md.txt | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pages/develop/debug/log-levels.md.txt b/pages/develop/debug/log-levels.md.txt index 3d57cbbc5..eef613a31 100644 --- a/pages/develop/debug/log-levels.md.txt +++ b/pages/develop/debug/log-levels.md.txt @@ -10,13 +10,13 @@ The ``Eina_Log`` module provides logging facilities for libraries and applicatio ## Available Log Levels ## -| Level | Macro| -|-|--| -|Critical |``EINA_LOG_LEVEL_CRITICAL()`` | -|Error|``EINA_LOG_ERR()``| -|Warning |``EINA_LOG_WARN()`` | -|Info |``EINA_LOG_INFO()`` | -|Debug|``EINA_LOG_DBG()``| +| Level | Number | Macro | +|-||---| +|Critical | 0 | ``EINA_LOG_LEVEL_CRITICAL()`` | +|Error| 1 | ``EINA_LOG_ERR()``| +|Warning | 2 | ``EINA_LOG_WARN()`` | +|Info | 3 | ``EINA_LOG_INFO()`` | +|Debug| 4 | ``EINA_LOG_DBG()``| ## Logging Domains ## @@ -26,7 +26,7 @@ Suppose you have three different modules in your application and you want to get Logging domains are specified by a name, color applied to the name and the level. The first two (log name and log color) are set through code inside your application, module or library. -The log level is used to control which messages should appear. It specifies the lowest level that should be displayed, i.e. a message with level 11 being logged on a domain with level set to 10 would be displayed while a message with level 9 wouldn't. +The log level is used to control which messages should appear. It specifies the lowest level that should be displayed, i.e. a message with level 2 being logged on a domain with level set to 3 would be displayed while a message with level 4 wouldn't. ## Setting the Log Level ## @@ -42,10 +42,10 @@ Domain level logging is set during runtime, in contrast with the name and color, You can also use finer-grained control via the ``EINA_LOG_LEVELS`` environment variable: ```bash -EINA_LOG_LEVELS=module1:5,module2:2,module3:0 ./{application} +EINA_LOG_LEVELS=module1:4,module2:2,module3:0 ./{application} ``` -In this example the command would set the log level of ``module1`` to 5, ``module2`` to 2, and ``module3`` to 0. +In this example the command would set the log level of ``module1`` to 4, ``module2`` to 2, and ``module3`` to 0. ### General Logging ### --
[EGIT] [website/www-content] master 01/01: Wiki page log-levels.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=8b1ea983580f51045d99d40b88c56aba631dfc6f commit 8b1ea983580f51045d99d40b88c56aba631dfc6f Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Dec 5 07:34:13 2017 -0800 Wiki page log-levels.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/log-levels.md.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/develop/debug/log-levels.md.txt b/pages/develop/debug/log-levels.md.txt index 31bdc8cba..3d57cbbc5 100644 --- a/pages/develop/debug/log-levels.md.txt +++ b/pages/develop/debug/log-levels.md.txt @@ -71,7 +71,7 @@ EINA_LOG_LEVEL={N} EINA_LOG_LEVELS_GLOB=eina_*:0 ./{application} Removing these internal logs from the output makes it easier for you to see your own domain messages. -## Eina_Log_Group Log ## +## Eina_Log_Print() ## ``Eina`` provides ``eina_log_print()``, a standard function to manage all logging messages. This function may be called directly or using helper macros including ``EINA_LOG_DBG()``, ``EINA_LOG_ERR()`` or those that take a specific domain as an argument as with ``EINA_LOG_DOM_DBG()`` and ``EINA_LOG_DOM_ERR()``. Internally, ``eina_log_print()`` will call the function defined with ``eina_log_print_cb_set()``, which defaults to ``eina_log_print_cb_stderr()`` but may be changed to do whatever [...] @@ -83,7 +83,7 @@ The default maximum level to print is defined by the environment variable ``EINA To use the log system ``Eina`` must be initialized with ``eina_init()`` and later shut down with ``eina_shutdown()``. -## Controlling Print Callbacks ## +### Controlling Print Callbacks ### The log module allows the user to change the way ``eina_log_print()`` displays messages. It suffices to pass to ``eina_log_print_cb_set()`` the function used to display the message. That function must be of type ``#Eina_Log_Print_Cb``. As custom data can be passed to that callback, customized messages can be displayed. --
[EGIT] [website/www-content] master 01/01: Wiki page log-levels.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=c05a1139ba3147a8645c7e1bc01bbdc49fd4b42f commit c05a1139ba3147a8645c7e1bc01bbdc49fd4b42f Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Dec 5 07:33:23 2017 -0800 Wiki page log-levels.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/log-levels.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/debug/log-levels.md.txt b/pages/develop/debug/log-levels.md.txt index fb6e29158..31bdc8cba 100644 --- a/pages/develop/debug/log-levels.md.txt +++ b/pages/develop/debug/log-levels.md.txt @@ -85,6 +85,6 @@ To use the log system ``Eina`` must be initialized with ``eina_init()`` and late ## Controlling Print Callbacks ## -The log module allows the user to change the way ``eina_log_print()`` displays messages. It suffices to pass to ``eina_log_print_cb_set()`` the function used to display the message. That function must be of type ``#Eina_Log_Print_Cb``. As custom data can be passed to that callback, customised messages can be displayed. +The log module allows the user to change the way ``eina_log_print()`` displays messages. It suffices to pass to ``eina_log_print_cb_set()`` the function used to display the message. That function must be of type ``#Eina_Log_Print_Cb``. As custom data can be passed to that callback, customized messages can be displayed. It is suggested to not use ``__FILE__``, ``__FUNCTION__`` or ``__LINE__`` when writing that callback, but when defining macros like ``EINA_LOG_ERR()`` and others. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page log-levels.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=f3f1bb9545167287b86079e971bb477b06ff6916 commit f3f1bb9545167287b86079e971bb477b06ff6916 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Dec 5 07:32:53 2017 -0800 Wiki page log-levels.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/log-levels.md.txt | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/pages/develop/debug/log-levels.md.txt b/pages/develop/debug/log-levels.md.txt index 64b7e93af..fb6e29158 100644 --- a/pages/develop/debug/log-levels.md.txt +++ b/pages/develop/debug/log-levels.md.txt @@ -69,4 +69,22 @@ While developing your libraries or applications, you may notice that ``EINA_LOG_ EINA_LOG_LEVEL={N} EINA_LOG_LEVELS_GLOB=eina_*:0 ./{application} ``` -Removing these internal logs from the output makes it easier for you to see your own domain messages. \ No newline at end of file +Removing these internal logs from the output makes it easier for you to see your own domain messages. + +## Eina_Log_Group Log ## + +``Eina`` provides ``eina_log_print()``, a standard function to manage all logging messages. This function may be called directly or using helper macros including ``EINA_LOG_DBG()``, ``EINA_LOG_ERR()`` or those that take a specific domain as an argument as with ``EINA_LOG_DOM_DBG()`` and ``EINA_LOG_DOM_ERR()``. Internally, ``eina_log_print()`` will call the function defined with ``eina_log_print_cb_set()``, which defaults to ``eina_log_print_cb_stderr()`` but may be changed to do whatever [...] + +The logging system is thread-safe once initialized with ``eina_log_threads_enable()``. The thread that calls this function first is considered "main thread" and other threads will have their thread id (``pthread_self()``) printed in the log message so it is easy to detect from where the messages are coming. + +The different logging levels serve to customize the amount of debugging information and may be used to automatically call ``abort()`` once a message of a given level is printed. This is controlled by the environment variable ``EINA_LOG_ABORT`` and the level to be considered critical with ``EINA_LOG_ABORT_LEVEL``. These can be changed with ``eina_log_abort_on_critical_set()`` and ``eina_log_abort_on_critical_level_set()``. + +The default maximum level to print is defined by the environment variable ``EINA_LOG_LEVEL`` but may be set per-domain with ``EINA_LOG_LEVELS``. It will default to ``EINA_LOG_ERR``. This can be changed with ``eina_log_level_set()``. + +To use the log system ``Eina`` must be initialized with ``eina_init()`` and later shut down with ``eina_shutdown()``. + +## Controlling Print Callbacks ## + +The log module allows the user to change the way ``eina_log_print()`` displays messages. It suffices to pass to ``eina_log_print_cb_set()`` the function used to display the message. That function must be of type ``#Eina_Log_Print_Cb``. As custom data can be passed to that callback, customised messages can be displayed. + +It is suggested to not use ``__FILE__``, ``__FUNCTION__`` or ``__LINE__`` when writing that callback, but when defining macros like ``EINA_LOG_ERR()`` and others. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page log-levels.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=38aed2a9332e3dcb8cd8e154ed30e985254f23be commit 38aed2a9332e3dcb8cd8e154ed30e985254f23be Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Dec 5 07:26:31 2017 -0800 Wiki page log-levels.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/log-levels.md.txt | 43 +++ 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/pages/develop/debug/log-levels.md.txt b/pages/develop/debug/log-levels.md.txt index d0c58d53a..64b7e93af 100644 --- a/pages/develop/debug/log-levels.md.txt +++ b/pages/develop/debug/log-levels.md.txt @@ -6,9 +6,7 @@ EFL uses a common method to log error messages, called ``Eina_Log``, which allows you to adjust the verbosity of the logs using environment variables. -``Eina_Log`` introduces the concept of *logging domains*, or *loggers*. For those unfamiliar with this term, it offers a way to separate a set of log messages into a specific context (e.g. a module) and provides a way of controlling this set as a whole. - -The log level is used to control which messages should appear. It specifies the lowest level that should be displayed, i.e. a message with level 11 being logged on a domain with level set to 10 would be displayed while a message with level 9 wouldn't. +The ``Eina_Log`` module provides logging facilities for libraries and applications. It provides colored logging, basic logging levels (error, warning, debug, info, critical) and *logging domains*, or *loggers*. For those unfamiliar with this term, it offers a way to separate a set of log messages into a specific context (e.g. a module) and provides a way of controlling this set as a whole. ## Available Log Levels ## @@ -20,15 +18,26 @@ The log level is used to control which messages should appear. It specifies the |Info |``EINA_LOG_INFO()`` | |Debug|``EINA_LOG_DBG()``| +## Logging Domains ## + +Logging domains are a way to separate a set of log messages into a context (e.g. a module) and provide a way of controlling this set as a whole. + +Suppose you have three different modules in your application and you want to get logging only from one of them (i.e. to create some sort of filter). To achieve that all you need to do is create a logging domain for each module so that all logging inside a module can be considered as a whole. + +Logging domains are specified by a name, color applied to the name and the level. The first two (log name and log color) are set through code inside your application, module or library. + +The log level is used to control which messages should appear. It specifies the lowest level that should be displayed, i.e. a message with level 11 being logged on a domain with level set to 10 would be displayed while a message with level 9 wouldn't. + ## Setting the Log Level ## -To set the general log level use the ``EINA_LOG_LEVEL`` environment variable: +Logging of domain and global messages can be controlled at runtime using the following environment variables. -```bash -EINA_LOG_LEVEL={N} ./{application} -``` +> **NOTE:** +> If you compiled Eina without debug mode, execution will yield only one log message: "argument is negative". -Where ``{N}`` is the log level number and ``{application}`` the binary you are currently debugging. +### Domain Logging ### + +Domain level logging is set during runtime, in contrast with the name and color, through the environment variable ``EINA_LOG_LEVELS``. You can also use finer-grained control via the ``EINA_LOG_LEVELS`` environment variable: @@ -38,7 +47,23 @@ EINA_LOG_LEVELS=module1:5,module2:2,module3:0 ./{application} In this example the command would set the log level of ``module1`` to 5, ``module2`` to 2, and ``module3`` to 0. -To tidy up the logging output use the following command to disable logging of internal ``eina`` code: +### General Logging ### + +The global logger to which ``EINA_LOG_{ERR, DBG, INFO, CRIT, WARN}`` macros log is created internally by ``Eina_Log`` with an empty name and can be used for general logging, where logging domains do not apply. + +Since this global logger doesn't have a name, you can't set its level through the ``EINA_LOG_LEVELS`` variable. Instead, it is controlled via the ``EINA_LOG_LEVEL`` variable. + +To set the general log level use the ``EINA_LOG_LEVEL`` environment variable: + +```bash +EINA_LOG_LEVEL={N} ./{application} +``` + +Where ``{N}`` is the log level number and ``{application}`` the binary you are currently debugging. + +The global ``EINA_LOG_LEVEL`` can also be set within your code using the ``eina_log_level_set()`` function. + +While developing your libraries or applications, you may notice that ``EINA_LOG_DOM_{ERR, DBG, INFO, CRIT, WARN}`` macros also print out messages from ``eina`` itself. To tidy
[EGIT] [website/www-content] master 01/01: Wiki page log-levels.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=9dc3394b1acc194f63f3d4941baabb14c4ebd3e3 commit 9dc3394b1acc194f63f3d4941baabb14c4ebd3e3 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Tue Dec 5 06:22:01 2017 -0800 Wiki page log-levels.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/log-levels.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/debug/log-levels.md.txt b/pages/develop/debug/log-levels.md.txt index 1d237bfd5..d0c58d53a 100644 --- a/pages/develop/debug/log-levels.md.txt +++ b/pages/develop/debug/log-levels.md.txt @@ -41,7 +41,7 @@ In this example the command would set the log level of ``module1`` to 5, ``modul To tidy up the logging output use the following command to disable logging of internal ``eina`` code: ```bash -EINA_LOG_LEVEL{N} EINA_LOG_LEVELS_GLOB=eina_*:0 ./{application} +EINA_LOG_LEVEL={N} EINA_LOG_LEVELS_GLOB=eina_*:0 ./{application} ``` Removing these internal logs from the output makes it easier for you to see your own domain messages. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page log-levels.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=f701551721320eb8a88252312c1fd52741599fe8 commit f701551721320eb8a88252312c1fd52741599fe8 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Fri Dec 1 06:50:53 2017 -0800 Wiki page log-levels.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/log-levels.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/debug/log-levels.md.txt b/pages/develop/debug/log-levels.md.txt index ff6600862..1d237bfd5 100644 --- a/pages/develop/debug/log-levels.md.txt +++ b/pages/develop/debug/log-levels.md.txt @@ -38,7 +38,7 @@ EINA_LOG_LEVELS=module1:5,module2:2,module3:0 ./{application} In this example the command would set the log level of ``module1`` to 5, ``module2`` to 2, and ``module3`` to 0. -To tidy up the logging output use the following command to disable logging of intenal ``eina`` code: +To tidy up the logging output use the following command to disable logging of internal ``eina`` code: ```bash EINA_LOG_LEVEL{N} EINA_LOG_LEVELS_GLOB=eina_*:0 ./{application} --
[EGIT] [website/www-content] master 01/01: Wiki page debug-symbols.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=f98572d363aae19f7ffe0e5992fa4cabbd743241 commit f98572d363aae19f7ffe0e5992fa4cabbd743241 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Fri Dec 1 06:04:12 2017 -0800 Wiki page debug-symbols.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/debug-symbols.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/debug/debug-symbols.md.txt b/pages/develop/debug/debug-symbols.md.txt index 7d345a064..534f77140 100644 --- a/pages/develop/debug/debug-symbols.md.txt +++ b/pages/develop/debug/debug-symbols.md.txt @@ -4,7 +4,7 @@ # Recompiling with Debug Symbols # -A standard installation of Enlightenment or EFL is compiled without *debug symbols*, meaning that debugging tools are unable to extract much information. In order that a backtrace, ``valgrind`` or any any other collection method provides good-quality information the program must be recompiled with debugging symbols activated. +A standard installation of Enlightenment or EFL is compiled without *debug symbols*, meaning that debugging tools are unable to extract much information. In order that a backtrace, Valgrind or any any other collection method provides good-quality information the program must be recompiled with debugging symbols activated. Debugging symbols can be added using the ``-g`` flag during compilation. If you have already configured your own custom compiler flags you will need to add ``-g`` to them. If you do not use any custom compiler flags you can set sensible defaults for debugging with the following command: --
[EGIT] [website/www-content] master 01/01: Wiki page navigation changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=c3300119e2f8d28993b06d7f2cceee3569afd0db commit c3300119e2f8d28993b06d7f2cceee3569afd0db Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Fri Dec 1 05:29:36 2017 -0800 Wiki page navigation changed with summary [] by Gareth Halfacree --- pages/develop/navigation.txt | 8 1 file changed, 8 insertions(+) diff --git a/pages/develop/navigation.txt b/pages/develop/navigation.txt index a68cb4196..90b7531fc 100644 --- a/pages/develop/navigation.txt +++ b/pages/develop/navigation.txt @@ -24,5 +24,13 @@ * [[/develop/guides/c/eina/tools/eina-mempool.md]] * [[/develop/guides/c/eina/tools/eina-safety-checks.md]] * [[/develop/guides/c/core/main-loop.md | Main Loop]] + * [[/develop/debug/start.md | Debugging EFL Apps]] +* [[/develop/debug/debug-symbols.md | Recompiling with Debug Symbols]] +* [[/develop/debug/log-levels.md | Log Levels]] +* [[/develop/debug/c/start.md | Debugging EFL C Apps]] + * [[/develop/debug/c/gdb.md | Debugging with GDB]] + * [[/develop/debug/c/valgrind.md | Debugging with Valgrind]] + * [[/develop/debug/c/clouseau.md | Debugging with Clouseau]] + * [[/develop/debug/c/remote-debug.md | Remote Debugging]] * [[/develop/legacy/api/c/ | C API [Stable]]] * [[/develop/api/ | C API [Beta]]] --
[EGIT] [website/www-content] master 01/01: Wiki page start changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=8a5877d684b2e801033f095d18385d3b45db7460 commit 8a5877d684b2e801033f095d18385d3b45db7460 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Nov 30 08:28:00 2017 -0800 Wiki page start changed with summary [] by Gareth Halfacree --- pages/contrib/start.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/contrib/start.txt b/pages/contrib/start.txt index 3f32c8546..575177300 100644 --- a/pages/contrib/start.txt +++ b/pages/contrib/start.txt @@ -6,7 +6,7 @@ Whether you're an end-user or a developer there are ways to get involved in the However you want to contribute, know that your contribution will always be warmly received and go towards making the Enlightenment Project the best it can possibly be. -Information on the current status of Enlightenment Project development, along with a list of open issues requiring attention, can be found on the [Phabricator Ticketing System](https://phab.enlightenment.org/). Assistance with any and all of the listed tickets is always welcome. +Information on the current status of Enlightenment Project development, along with a list of open issues requiring attention, can be found on the [[https://phab.enlightenment.org/|Phabricator Ticket System]]. Assistance with any and all of the listed tickets is always welcome. = Contributing Time = --
[EGIT] [website/www-content] master 01/01: Wiki page start changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=05a0c6a06fbf8419ef4df4fccea2dcc7269868a5 commit 05a0c6a06fbf8419ef4df4fccea2dcc7269868a5 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Nov 30 08:27:32 2017 -0800 Wiki page start changed with summary [] by Gareth Halfacree --- pages/contrib/start.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pages/contrib/start.txt b/pages/contrib/start.txt index b206c6968..3f32c8546 100644 --- a/pages/contrib/start.txt +++ b/pages/contrib/start.txt @@ -6,6 +6,8 @@ Whether you're an end-user or a developer there are ways to get involved in the However you want to contribute, know that your contribution will always be warmly received and go towards making the Enlightenment Project the best it can possibly be. +Information on the current status of Enlightenment Project development, along with a list of open issues requiring attention, can be found on the [Phabricator Ticketing System](https://phab.enlightenment.org/). Assistance with any and all of the listed tickets is always welcome. + = Contributing Time = If you have free time help is always welcome, with a variety of areas suited to different skill sets. --
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=414d255946dad0e3f4346ae3d2886a6df1d4b3ec commit 414d255946dad0e3f4346ae3d2886a6df1d4b3ec Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Nov 30 07:51:59 2017 -0800 Wiki page start.md changed with summary [] by Gareth Halfacree --- pages/develop/start.md.txt | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/pages/develop/start.md.txt b/pages/develop/start.md.txt index 61b21fa78..3df6b3072 100644 --- a/pages/develop/start.md.txt +++ b/pages/develop/start.md.txt @@ -7,13 +7,13 @@ The Enlightenment Foundation Libraries (EFL) are designed to build on top of each other in layers, steadily becoming higher level yet allowing access to each individual level as they go. Whether you're looking for the types of low-level helpers contained in the ``Eina`` library or the high-level abstractions of Elemetary you'll find a wealth of assistance within EFL. -More information on EFL can be found on the [About EFL page](https://www.enlightenment.org/about-efl), including a breakdown of its various features and components. +More information on EFL can be found on the [About EFL page](/about-efl), including a breakdown of its various features and components. ## Current vs. Beta ## The documentation on this section of the website is written with a focus on the next-generation release, currently in beta. While this means that the documentation is only partial in places, it will get you started with the very latest revision of EFL and all the new and improved features it brings. -Documentation on the current version of EFL can be found in the [Legacy section](https://www.enlightenment.org/develop/legacy/). When working through the documentation on the site, keep in mind that if a document is located in ``/develop/legacy`` it is referring to the current release of EFL; if it is located in any other section of ``/develop`` it is referring to the beta release. +Documentation on the current version of EFL can be found in the [Legacy section](legacy/). When working through the documentation on the site, keep in mind that if a document is located in ``/develop/legacy`` it is referring to the current release of EFL; if it is located in any other section of ``/develop`` it is referring to the beta release. Information on porting software between the current and beta releases of EFL can be found as part of the [Programming Guides](#Programming_Guides) section. @@ -27,30 +27,33 @@ A full list of the languages available is available on the landing page for each ## Setting up the Development Environment [TODO] ## -Information on downloading EFL and configuring a development environment can be found in the [Setup section](https://www.enlightenment.org/develop/setup/). +Information on downloading EFL and configuring a development environment can be found in the [Setup section](setup/). ## Tutorials ## -The [EFL Tutorials](https://www.enlightenment.org/develop/tutorials/) are designed to introduce the functions and features of EFL to those who already have programming experience. Each tutorial walks through the implementation of a particular EFL feature or function, building upon previous tutorials to offer a step-by-step guide to getting comfortable with developing using EFL. +The [EFL Tutorials](tutorials/start.md) are designed to introduce the functions and features of EFL to those who already have programming experience. Each tutorial walks through the implementation of a particular EFL feature or function, building upon previous tutorials to offer a step-by-step guide to getting comfortable with developing using EFL. Although you do not need previous experience with EFL to work through the tutorials, general programming knowledge is required. - ## Programming Guides ## -The [Programming Guides](https://www.enlightenment.org/develop/guides/start.md) are designed to provide informative material to developers working with EFL, including code snippets demonstrating the use of various features. They are provided both as a reference guide for experienced EFL developers and as an alternative or extension to the tutorials for those who prefer less guided experimentation. +The [Programming Guides](guides/start.md) are designed to provide informative material to developers working with EFL, including code snippets demonstrating the use of various features. They are provided both as a reference guide for experienced EFL developers and as an alternative or extension to the tutorials for those who prefer less guided experimentation. ## API Reference Documentation ## -A reference to the features and functions of the beta-release API can be found in the [API Reference section](https://www.enlightenment.org/develop/api/). +A reference to the features and functions of the beta-r
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [created] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=15176be6e803987a25112e13f1fa4434410711cf commit 15176be6e803987a25112e13f1fa4434410711cf Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Nov 30 07:47:01 2017 -0800 Wiki page start.md changed with summary [created] by Gareth Halfacree --- pages/develop/debug/c/start.md.txt | 23 +++ 1 file changed, 23 insertions(+) diff --git a/pages/develop/debug/c/start.md.txt b/pages/develop/debug/c/start.md.txt new file mode 100644 index 0..46eb78f88 --- /dev/null +++ b/pages/develop/debug/c/start.md.txt @@ -0,0 +1,23 @@ +--- +~~Title: Debugging EFL C Applications~~ +--- + +# Debugging EFL C Applications # + +The following documentation contains guides demonstrating tool-based debugging based on examples written in the C language. Language-agnostic debugging documentation and links to examples for other languages, where available, can be found in [Debugging EFL Applications](/develop/debug/start.md). + +## Debugging with GDB ## + +[Debugging with GDB](gdb.md) demonstrates the use of the GNU Debugger to handle common issues encountered when programming with the Enlightenment Foundation Libraries (EFL). + +## Debugging with Valgrind ## + +[Debugging with Valgrind](valgrind.md) demonstrates how to track down memory issues, such as memory leaks, using the Valgrind debugger. + +## Debugging with Clouseau ## + +[Debugging with Clouseau](valgrind.md) demonstrates how to install and use Clouseau, the EFL user interface inspection tool, to explore and debug a basic graphical application written with EFL. + +## Remote Debugging ## + +[Remote Debugging](remote-debug.md) explains how GDB and Clouseau can be used to debug a remote device over serial or network connections, allowing for easier diagnosis of issues on esoteric platforms or which result in graphical corruption or loss of user control when executed on the local system. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [created] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=c2b9402cf94b33b49153202fd3fb05439fa4ca17 commit c2b9402cf94b33b49153202fd3fb05439fa4ca17 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Nov 30 07:40:27 2017 -0800 Wiki page start.md changed with summary [created] by Gareth Halfacree --- pages/develop/debug/start.md.txt | 29 + 1 file changed, 29 insertions(+) diff --git a/pages/develop/debug/start.md.txt b/pages/develop/debug/start.md.txt new file mode 100644 index 0..01c48c49b --- /dev/null +++ b/pages/develop/debug/start.md.txt @@ -0,0 +1,29 @@ +--- +~~Title: Debugging EFL Applications~~ +--- + +# Debugging EFL Applications # + +While the process of developing with the Enlightenment Foundation Libraries should be a smooth one, bugs are an inevitability of the programming process. The following documentation will provide you with tools and resources that will allow you to track down the source of these bugs quickly and easily, getting your development back on track with a minimum of fuss. + +## Recompiling with Debug Symbols ## + +[Recompiling with Debug Symbols](debug-symbols.md) demonstrates how to get the most out of the available debugging tools by compiling your application and the EFL with debugging symbols activated. + +## Log Levels ## + +[Log Levels](log-levels.md) explains the different verbosity levels of EFL's ``Eina_Log`` method, allowing you to control the amount of information recorded and better document the issue you have encountered. + +## Language Specific Debugging ## + +EFL applications can be written in a variety of languages. These sections provide hands-on examples using the GNU Debugger, Valgrind, and Clouseau tools using code from the following programming languages: + +* [C](c/start.md) + +## Reporting EFL Bugs ## + +If you believe a bug lies in EFL itself, rather than in your application, then please report the issue via the [Phabricator ticketing system](​https://phab.enlightenment.org/maniphest/task/create). Don't send bug reports and patches to the Enlightenment mailing list; the list system strips most patches and bug reports can get lost if they're only discussed on the mailing list. If more discussion is needed then add a Phabricator bug report before or after the discussion on the mailing lis [...] + +Always test multiple times to make sure there really is a reproducible bug before making a ticket, in order to avoid unnecessary tickets. Please ensure that issues aren't related to modified system settings, as per [Ticket T1145](https://phab.enlightenment.org/T1145). Please draft and check your ticket thoroughly before submitting it; the ticket system tracks and alerts on every edit, so a constant stream of modifications as per [Ticket T1143](https://phab.enlightenment.org/T1143) create [...] + +If the debugging process produces large log files, please attach these as file uploads rather than by copying and pasting their content directly into the ticket body. If reporting a visual bug, please test with the default theme; support is not provided for third-party themes, and bugs related to these themes must be sent directly to the theme's author. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page remote-debug.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=18a5f7943eefdde0a2690c725d8be296c4e5bc1d commit 18a5f7943eefdde0a2690c725d8be296c4e5bc1d Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Nov 30 07:02:23 2017 -0800 Wiki page remote-debug.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/c/remote-debug.md.txt | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/pages/develop/debug/c/remote-debug.md.txt b/pages/develop/debug/c/remote-debug.md.txt index e1fd663f2..ac9085b82 100644 --- a/pages/develop/debug/c/remote-debug.md.txt +++ b/pages/develop/debug/c/remote-debug.md.txt @@ -28,8 +28,7 @@ Run the "helloworld" binary through ``gdbserver``: ```bash #target gdbserver localhost:2000 helloworld - -$ Process hello created; pid = 2763 +$ Process helloworld created; pid = 2763 $ Listening on port 2000 ``` @@ -38,19 +37,7 @@ At this point ``gdbserver`` is waiting for a connection on port 2000 of the targ > **NOTE:** > The GNU Debugger can be launched as multiple processes using ``gdbserver > --multi localhost:2000``. -On the client side, with a run ``gdb``: - -```gdb -#client -gdb hello -``` -```bash -... -$ Type "apropos word" to search for commands related to "word"... -$ Reading symbols from test...(no debugging symbols found)...done. -``` - -Use ``target remote`` to connect to the target system, replacing ``[target-ip]`` with the IP address of the target system. +Run ``gdb`` on your local client machine and use ``target remote`` to connect to the target system, replacing ``[target-ip]`` with the IP address of the target system. ```gdb #client --
[EGIT] [website/www-content] master 01/01: Wiki page remote-debug.md changed with summary [created] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=9d9cb47292b32e91eca3e04e358919ed7f912e89 commit 9d9cb47292b32e91eca3e04e358919ed7f912e89 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Nov 30 07:00:31 2017 -0800 Wiki page remote-debug.md changed with summary [created] by Gareth Halfacree --- pages/develop/debug/c/remote-debug.md.txt | 134 ++ 1 file changed, 134 insertions(+) diff --git a/pages/develop/debug/c/remote-debug.md.txt b/pages/develop/debug/c/remote-debug.md.txt new file mode 100644 index 0..e1fd663f2 --- /dev/null +++ b/pages/develop/debug/c/remote-debug.md.txt @@ -0,0 +1,134 @@ +--- +~~Title: Remote Debugging~~ +--- + +# Remote Debugging # + +The debugging tools [GDB](gdb.md) and [Clouseau](clouseau.md) are most commonly used to debug an application locally, but can also be used remotely in order to debug a program running on one system using a different system entirely. This can be vital for debugging issues which result in display corruption or loss of user input capabilities on the host device. + +This document aims to provide a brief overview of the server capabilities available for remote debugging using these two tools. You will need an SSH server running on the system to be debugged, and an SSH client on the system you are controlling. + +## GDB Server ## + +Information on debugging local programs with the GNU Debugger (GDB) can be found in [Debugging with GDB](gdb.md). The GNU Debugger Server ``gdbserver`` is a control program for Unix-like systems which allows you to connect your program with a remote ``gdb`` via ``target remote`` but without linking in the usual debugging stub. + +``gdbserver`` is not a complete replacement for the debugging stubs because it requires essentially the same operating-system facilities that ``gdb`` itself does. In fact, a system that can run ``gdbserver`` to connect to a remote ``gdb`` could also run ``gdb`` locally. ``gdbserver`` is nevertheless sometimes useful because it is a much smaller program than ``gdb`` itself. It is also easier to port than all of ``gdb``, so you may be able to get started more quickly on a new system by usi [...] + +``gdb`` and ``gdbserver`` communicate via either a serial line or a TCP connection, using the standard GDB remote serial protocol. + +> **NOTE:** +> ``gdbserver`` does not have any security built-in. Do not run ``gdbserver`` while connected to any public network. A ``gdb`` connection to ``gdbserver`` provides access to the target system with the same privileges as the user running ``gdbserver``. + +### Remote Debugging with GDB ### + +Install ``gdbserver`` on your target system, then create and compile the "helloworld.c" program from [Debugging with GDB](gdb.md#Debugging_a_Callback_Function). + +Run the "helloworld" binary through ``gdbserver``: + +```bash +#target +gdbserver localhost:2000 helloworld + +$ Process hello created; pid = 2763 +$ Listening on port 2000 +``` + +At this point ``gdbserver`` is waiting for a connection on port 2000 of the target system. + +> **NOTE:** +> The GNU Debugger can be launched as multiple processes using ``gdbserver --multi localhost:2000``. + +On the client side, with a run ``gdb``: + +```gdb +#client +gdb hello +``` +```bash +... +$ Type "apropos word" to search for commands related to "word"... +$ Reading symbols from test...(no debugging symbols found)...done. +``` + +Use ``target remote`` to connect to the target system, replacing ``[target-ip]`` with the IP address of the target system. + +```gdb +#client +gdb +(gdb) target remote [target-ip]:2000 +$ Remote debugging using [target-ip]:2000 +$ Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from +$ /usr/lib/debug//lib/x86_64-linux-gnu/ld-2.19.so...done. +$ done. +$ Loaded symbols for /lib64/ld-linux-x86-64.so.2 +$ 0x77ddb2d0 in _start () from /lib64/ld-linux-x86-64.so.2 +``` + +At this point you can add breakpoints or carry out other debugging tasks. Note, however, that if you continue the program's execution the output will display on the target system, not your local client. + +```gdb +#client +(gdb) continue +``` + +Return to the target system and click the "seg" button to trigger the segmentation fault condition. When the program crashes, the traces will appear on the local client system: + +```gdb +$ Program received signal SIGSEGV, Segmentation fault. +$ 0x00400b71 in ?? () +``` + +You can now use ``gdb`` as it is explaines in [[apps_efl_debugging#Segfault in +callback function]], for example print the backtrace: + +```gdb +(gdb) bt +$ 0 0x00400b71 in ?? () +$ 1 0x0073a9a0 in ?? () +$ 2 0x774e4f6c in _eo_evas_smart_cb (data=, eo_obj=, desc=, event_info=) at lib/evas/canvas/evas_object_smart.c:65 +$ 3 0x7561
[EGIT] [website/www-content] master 01/01: Wiki page clouseau.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=16ae53e9c45c21ad7f1146207eaed17d2bb41371 commit 16ae53e9c45c21ad7f1146207eaed17d2bb41371 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Nov 30 06:54:53 2017 -0800 Wiki page clouseau.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/c/clouseau.md.txt | 4 +- pages/develop/debug/clouseau.md.txt | 137 -- 2 files changed, 2 insertions(+), 139 deletions(-) diff --git a/pages/develop/debug/c/clouseau.md.txt b/pages/develop/debug/c/clouseau.md.txt index 56ea1838e..b261d1f3f 100644 --- a/pages/develop/debug/c/clouseau.md.txt +++ b/pages/develop/debug/c/clouseau.md.txt @@ -1,8 +1,8 @@ --- -~~Title: Clouseau~~ +~~Title: Debugging with Clouseau~~ --- -# Clouseau # +# Debugging with Clouseau # Clouseau is the EFL user interface inspection tool. It is designed to make it easy to query UI components and structure. It supports remote debugging and works with GDB. Clouseau can also provide information about different widgets along with their properties. diff --git a/pages/develop/debug/clouseau.md.txt b/pages/develop/debug/clouseau.md.txt deleted file mode 100644 index 56ea1838e..0 --- a/pages/develop/debug/clouseau.md.txt +++ /dev/null @@ -1,137 +0,0 @@ -~~Title: Clouseau~~ - -# Clouseau # - -Clouseau is the EFL user interface inspection tool. It is designed to make it easy to query UI components and structure. It supports remote debugging and works with GDB. Clouseau can also provide information about different widgets along with their properties. - -## Installing Clouseau ## - -Clouseau is available from the Enlightenment git repository using the following command: - -```bash -git clone https://git.enlightenment.org/tools/clouseau.git -``` - -## Debugging with Clouseau ## - -The following sections will demonstrate the use of Clouseau to debug a simple "Hello World" program. - -### A Hello World Example ### - -Create the following program in your development environment or text editor: - -```c -#include - -static void -on_done(void *data, Evas_Object *obj, void *event_info) -{ - `` quit the mainloop (elm_run function will return) - elm_exit(); -} - -EAPI_MAIN int -elm_main(int argc, char **argv) -{ - Evas_Object *win, *box, *lab, *btn; - - `` new window - new background - win = elm_win_util_standard_add("hello", "Hello"); - `` when the user clicks "close" on a window there is a request to delete - evas_object_smart_callback_add(win, "delete,request", on_done, NULL); - `` add a box object - default is vertical. a box holds children in a row, - `` either horizontally or vertically. nothing more. - box = elm_box_add(win); - `` make the box horizontal - elm_box_horizontal_set(box, EINA_TRUE); - `` add object as a resize object for the window (controls window minimum - `` size as well as gets resized if window is resized) - elm_win_resize_object_add(win, box); - evas_object_show(box); - `` add a label widget, set the text and put it in the pad frame - lab = elm_label_add(win); - `` set default text of the label - elm_object_text_set(lab, "Hello out there world!"); - `` pack the label at the end of the box - elm_box_pack_end(box, lab); - evas_object_show(lab); - `` add an ok button - btn = elm_button_add(win); - `` set default text of button to "OK" - elm_object_text_set(btn, "OK"); - `` pack the button at the end of the box - elm_box_pack_end(box, btn); - evas_object_show(btn); - `` call on_done when button is clicked - evas_object_smart_callback_add(btn, "clicked", on_done, NULL); - `` now we are done, show the window - evas_object_show(win); - - `` run the mainloop and process events and callbacks - elm_run(); - return 0; -} -ELM_MAIN() -``` - -Save and compile the program as "helloworld". - -### Debugging Hello World with Clouseau ### - -Run the "helloworld" program through Clouseau with the following command: - -```bash -clouseau ./helloworld -``` - -The following screenshot demonstrates Clouseau's output: - -![Clouseau](/_media/clouseau.png) - -* Yellow - The "helloworld" application -* Red - the composition of the "helloworld" application -* Blue - the characteristic of ``Elm`` and ``Evas_object`` - -### Exploring Hello World ### - -The application is composed of three main widgets : ``Elm_win``, ``Elm_bg``, and ``Elm_box``. - -```c -win = elm_win_util_standard_add("hello", "Hello"); -[...] -box = elm_box_add(win); -``` - -The ``elm_win_util_standard_add()`` function creates the window widget, ``win``, which is the root widget often used in an application. It also adds a standard background (``Elm_bg``). Then the ``elm_box_add`` function creates a ``box`` widget. - -```c -elm_box_
[EGIT] [website/www-content] master 01/01: Wiki page clouseau.md changed with summary [created] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=a702506f0fecc08f82a562ae38ad323c17fde578 commit a702506f0fecc08f82a562ae38ad323c17fde578 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Nov 30 06:53:02 2017 -0800 Wiki page clouseau.md changed with summary [created] by Gareth Halfacree --- pages/develop/debug/c/clouseau.md.txt | 137 ++ 1 file changed, 137 insertions(+) diff --git a/pages/develop/debug/c/clouseau.md.txt b/pages/develop/debug/c/clouseau.md.txt new file mode 100644 index 0..56ea1838e --- /dev/null +++ b/pages/develop/debug/c/clouseau.md.txt @@ -0,0 +1,137 @@ +--- +~~Title: Clouseau~~ +--- + +# Clouseau # + +Clouseau is the EFL user interface inspection tool. It is designed to make it easy to query UI components and structure. It supports remote debugging and works with GDB. Clouseau can also provide information about different widgets along with their properties. + +## Installing Clouseau ## + +Clouseau is available from the Enlightenment git repository using the following command: + +```bash +git clone https://git.enlightenment.org/tools/clouseau.git +``` + +## Debugging with Clouseau ## + +The following sections will demonstrate the use of Clouseau to debug a simple "Hello World" program. + +### A Hello World Example ### + +Create the following program in your development environment or text editor: + +```c +#include + +static void +on_done(void *data, Evas_Object *obj, void *event_info) +{ + `` quit the mainloop (elm_run function will return) + elm_exit(); +} + +EAPI_MAIN int +elm_main(int argc, char **argv) +{ + Evas_Object *win, *box, *lab, *btn; + + `` new window - new background + win = elm_win_util_standard_add("hello", "Hello"); + `` when the user clicks "close" on a window there is a request to delete + evas_object_smart_callback_add(win, "delete,request", on_done, NULL); + `` add a box object - default is vertical. a box holds children in a row, + `` either horizontally or vertically. nothing more. + box = elm_box_add(win); + `` make the box horizontal + elm_box_horizontal_set(box, EINA_TRUE); + `` add object as a resize object for the window (controls window minimum + `` size as well as gets resized if window is resized) + elm_win_resize_object_add(win, box); + evas_object_show(box); + `` add a label widget, set the text and put it in the pad frame + lab = elm_label_add(win); + `` set default text of the label + elm_object_text_set(lab, "Hello out there world!"); + `` pack the label at the end of the box + elm_box_pack_end(box, lab); + evas_object_show(lab); + `` add an ok button + btn = elm_button_add(win); + `` set default text of button to "OK" + elm_object_text_set(btn, "OK"); + `` pack the button at the end of the box + elm_box_pack_end(box, btn); + evas_object_show(btn); + `` call on_done when button is clicked + evas_object_smart_callback_add(btn, "clicked", on_done, NULL); + `` now we are done, show the window + evas_object_show(win); + + `` run the mainloop and process events and callbacks + elm_run(); + return 0; +} +ELM_MAIN() +``` + +Save and compile the program as "helloworld". + +### Debugging Hello World with Clouseau ### + +Run the "helloworld" program through Clouseau with the following command: + +```bash +clouseau ./helloworld +``` + +The following screenshot demonstrates Clouseau's output: + +![Clouseau](/_media/clouseau.png) + +* Yellow - The "helloworld" application +* Red - the composition of the "helloworld" application +* Blue - the characteristic of ``Elm`` and ``Evas_object`` + +### Exploring Hello World ### + +The application is composed of three main widgets : ``Elm_win``, ``Elm_bg``, and ``Elm_box``. + +```c +win = elm_win_util_standard_add("hello", "Hello"); +[...] +box = elm_box_add(win); +``` + +The ``elm_win_util_standard_add()`` function creates the window widget, ``win``, which is the root widget often used in an application. It also adds a standard background (``Elm_bg``). Then the ``elm_box_add`` function creates a ``box`` widget. + +```c +elm_box_pack_end(box, lab); +[...] +elm_box_pack_end(box, btn); +``` + +The ``elm_box_pack_end()`` functions add ``lab`` and ``btn`` widgets at the end of the pack list, so the ``lab`` and ``btn`` widgets appear inside the ``box`` widget. + +The blue section of the screenshot shows certain characteristics of the object and widget: their position, size, color and so on. Some of these characteristics are dynamic and can be updated with the reload button in Clouseau. + +```c +elm_win_resize_object_add(win, box); +``` + +The ``elm_win_resize_object_add()`` function controls the size of the window such that it takes up the minimum of space. You can see in the b
[EGIT] [website/www-content] master 01/01: Wiki page valgrind.md changed with summary [created] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=06ec72372964661c8acae8883e27cf81abd20220 commit 06ec72372964661c8acae8883e27cf81abd20220 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Nov 30 05:26:40 2017 -0800 Wiki page valgrind.md changed with summary [created] by Gareth Halfacree --- pages/develop/debug/c/valgrind.md.txt | 102 ++ 1 file changed, 102 insertions(+) diff --git a/pages/develop/debug/c/valgrind.md.txt b/pages/develop/debug/c/valgrind.md.txt new file mode 100644 index 0..ac61f051b --- /dev/null +++ b/pages/develop/debug/c/valgrind.md.txt @@ -0,0 +1,102 @@ +--- +~~Title: Debugging with Valgrind~~ +--- + +# Debugging with Valgrind # + +Valgrind is a collection of tools for tracking down memory-related issues, from memory leaks through to uninitialized variables. While more information on Valgrind is available on the [Valgrind website](http://valgrind.org/docs/manual/manual.html), this document introduces its use specifically for debugging applications written with the Enlightenment Foundation Libraries (EFL). + +## Debugging a Memory Leak ## + +In this example an ``Eina`` array is created in a callback function but it is never freed. This generates a memory leak. Begin by creating the following program: + +```c +#include + +static void +on_done(void *data, Evas_Object *obj, void *event_info) +{ + Eina_Array *array; + unsigned int i; + + eina_init(); + array = eina_array_new(100); + eina_array_step_set(array, sizeof(*array), 20); + for (i = 0; i < 20; i++) eina_array_push(array, strdup("hello")); + + /To free array/ + //while (eina_array_count(array)) + //free(eina_array_pop(array)); + //eina_array_free(array); + + //eina_shutdown(); + + // quit the mainloop (elm_run function will return) + elm_exit(); +} + +EAPI_MAIN int +elm_main(int argc, char **argv) +{ + Evas_Object *win, *box, *btn; + + // new window + win = elm_win_util_standard_add("hello", "Hello"); + // add a box object + box = elm_box_add(win); + // add object as a resize object for the window (controls window minimum + // size as well as gets resized if window is resized) + elm_win_resize_object_add(win, box); + evas_object_show(box); + // add a button + btn = elm_button_add(win); + // set default text of button to "SEG" + elm_object_text_set(btn, "SEG"); + // pack the button at the end of the box + elm_box_pack_end(box, btn); + evas_object_show(btn); + // call on_done when button is clicked + evas_object_smart_callback_add(btn, "clicked", on_done, NULL); + //show the window + evas_object_show(win); + + // run the mainloop and process events and callbacks + elm_run(); + return 0; +} +ELM_MAIN() +``` + +Save the program as "hello.", compile it, and run it through Valgrind: + +```bash +valgrind --leak-check=full --track-origins=yes ./hello +[...] +==22370== 312 (32 direct, 280 indirect) bytes in 1 blocks are definitely lost +in loss record 349 of 417 +==22370==at 0x4C28C20: malloc (vg_replace_malloc.c:296) +==22370==by 0x55A585D: eina_array_new (eina_array.c:279) +==22370==by 0x400E4C: on_done (hello.c:7) +==22370==by 0x5CD1B83: _eo_evas_smart_cb (evas_object_smart.c:65) +==22370==by 0x6BCFD21: _eo_base_event_callback_call (eo_base_class.c:716) +==22370==by 0x6BCEA96: eo_event_callback_call (in +/usr/local/lib/libeo.so.1.14.99) +==22370==by 0x5CD3BAC: evas_object_smart_callback_call +(evas_object_smart.c:791) +==22370==by 0x4F34B8B: _activate (elm_button.c:69) +==22370==by 0x4F34BC1: _on_clicked_signal (elm_button.c:191) +==22370==by 0x6970424: edje_match_callback_exec_check_finals +(edje_match.c:556) +==22370==by 0x6970424: edje_match_callback_exec (edje_match.c:712) +==22370==by 0x697673C: _edje_emit_cb (edje_program.c:1392) +==22370==by 0x697673C: _edje_emit_handle (edje_program.c:1345) +==22370==by 0x6971295: _edje_message_process (edje_message_queue.c:651) +[...] +``` + +All the memory accesses pass through Valgrind, so it shows you a backtrace when an allocation is made and not freed. + +> **NOTE:** +> There can be other traces in the ``HEAD SUMMARY``, but this example focuses on the memory leak within the application. As a result you may have to ignore things not relevant to that code. + +This backtrace demonstrates that an allocation took place in the ``eina_array_new()`` function. This function is called from the ``on_done()`` function. You can go further up the backtrace, but remember that a callback function is called from ``Evas`` so there is a good chance that the allocation is made in your specific callback function. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page gdb.md changed with summary [created] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=7bd74a834d75ecf510334b242cb603c445aa5a7f commit 7bd74a834d75ecf510334b242cb603c445aa5a7f Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Thu Nov 30 05:07:07 2017 -0800 Wiki page gdb.md changed with summary [created] by Gareth Halfacree --- pages/develop/debug/c/gdb.md.txt | 231 +++ 1 file changed, 231 insertions(+) diff --git a/pages/develop/debug/c/gdb.md.txt b/pages/develop/debug/c/gdb.md.txt new file mode 100644 index 0..b00c5e259 --- /dev/null +++ b/pages/develop/debug/c/gdb.md.txt @@ -0,0 +1,231 @@ +## Wrong function on an object ## + +--- +~~Title: Debugging with GDB~~ +--- + +# Debugging with GDB # + +The GNU Debugger (GDB) is an invaluable tool for tracking down the precise cause of a crash or other error. While more information on GDB is available on the [GNU website](https://www.gnu.org/software/gdb/documentation/), this document introduces its use specifically for debugging applications written with the Enlightenment Foundation Libraries (EFL). + +> **NOTE:** Always begin by running the problem application and walking through the steps needed to reproduce the crash. GDB is of most use when you have a reliable reproduction for your issue. + +## Debugging an Incorrect Object ## + +The code below creates three Elementary objects: ``win``, ``box`` and ``btn``. It displays a window with an "OK" button which closes the window when it is clicked. Enter the following and save it as "hello.c": + +```c +#include + +static void +on_done(void *data, Evas_Object *obj, void *event_info) +{ + `` quit the mainloop (elm_run function will return) + elm_exit(); +} + +EAPI_MAIN int +elm_main(int argc, char **argv) +{ + Evas_Object *win, *box, *btn; + + `` new window + win = elm_win_util_standard_add("hello", "Hello"); + `` add a box object + box = elm_box_add(win); + `` add object as a resize object for the window (controls window minimum + `` size as well as gets resized if window is resized) + elm_win_resize_object_add(win, box); + evas_object_show(box); + `` add a button + btn = elm_button_add(win); + `` set default text of button to "OK" + elm_object_text_set(btn, "OK"); + `` pack the button at the end of the box + /ERROR/ + elm_box_pack_end(win, btn); ``win instead of box + evas_object_show(btn); + `` call on_done when button is clicked + evas_object_smart_callback_add(win, "clicked", on_done, NULL); + ``show the window + evas_object_show(win); + + `` run the mainloop and process events and callbacks + elm_run(); + return 0; +} +ELM_MAIN() +``` + +Compile with the ``-g`` flag to enable debugging symbols: + +```bash +gcc -Wall -O1 -march=native -g -ggdb3 -o hello hello.c `pkg-config --cflags --libs elementary` +``` + +Then execute the program: + +```bash +./hello +ERR<13670>:eo lib/eo/eo.c:780 _eo_api_op_id_get() in elm_box.eo.c:48: unable to resolve regular api func 'elm_obj_box_pack_end' 0x7f1128f50faf in class 'Elm_Win'. +``` + +The cause of this error is that the ``elm_box_pack_end()`` function is called on the incorrect object, ``win``. The error log says that the ``elm_obj_box_pack_end`` is not in the ``Elm_win`` API, and so that the error is coming from the application and not from EFL itself. + +For a more complicated application, this basic trace is not enough to track down the precise location of the error. Fortunately, EFL provides a macro for backtraces: ``EINA_LOG_ABORT``. + +A message generated by CRI macro can automatically call ``abort()`` once a message of a given log level is printed. This is controlled by the environment variable ``EINA_LOG_ABORT`` and the level to be considered critical with ``EINA_LOG_ABORT_LEVEL``. This means the program will stop at the first error which meets these two requirements. + +Run GDB over your application to receive the following backtrace: + +```gdb +EINA_LOG_ABORT_LEVEL=4 EINA_LOG_ABORT=1 gdb hello +(gdb) run +Starting program: /home/efl/test/hello +[Thread debugging using libthread_db enabled] +Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". +[New Thread 0x7fffea2da700 (LWP 13679)] +ERR<13675>:eo lib/eo/eo.c:780 _eo_api_op_id_get() in elm_box.eo.c:48: unable +to resolve regular api func 'elm_obj_box_pack_end' 0x77991faf in class +'Elm_Win'. + +Program received signal SIGABRT, Aborted. +0x76c76cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 +56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. +(gdb) bt +#0 0x76c76cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 +#1 0x76c7a0d8 in __GI_abort () at abort.c:89 +#2 0x76387919 in eina_log_print_unlocked (args=0x7fff
[EGIT] [website/www-content] master 01/01: Wiki page clouseau.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=336738d4ea7df3c2b191ba1821508c717fd08892 commit 336738d4ea7df3c2b191ba1821508c717fd08892 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Nov 29 08:37:11 2017 -0800 Wiki page clouseau.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/clouseau.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/debug/clouseau.md.txt b/pages/develop/debug/clouseau.md.txt index 2db771de3..56ea1838e 100644 --- a/pages/develop/debug/clouseau.md.txt +++ b/pages/develop/debug/clouseau.md.txt @@ -11,7 +11,7 @@ Clouseau is the EFL user interface inspection tool. It is designed to make it ea Clouseau is available from the Enlightenment git repository using the following command: ```bash -git clone https:``git.enlightenment.org/tools/clouseau.git +git clone https://git.enlightenment.org/tools/clouseau.git ``` ## Debugging with Clouseau ## --
[EGIT] [website/www-content] master 01/01: Wiki page clouseau.md changed with summary [] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=f33ac79ee2d01eda27f2cff629c5a589118128a3 commit f33ac79ee2d01eda27f2cff629c5a589118128a3 Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Nov 29 08:36:21 2017 -0800 Wiki page clouseau.md changed with summary [] by Gareth Halfacree --- pages/develop/debug/clouseau.md.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/develop/debug/clouseau.md.txt b/pages/develop/debug/clouseau.md.txt index 523c456f3..2db771de3 100644 --- a/pages/develop/debug/clouseau.md.txt +++ b/pages/develop/debug/clouseau.md.txt @@ -128,10 +128,10 @@ To control the objects that are displayed, click on the "Settings" button and de ![Clouseau Settings](/_media/settings_clouseau.png) -This will display all the program's ojbects, desmontrating that widgets are just gathered specific objects. +This will display all the program's objects, demonstrating that widgets are just gathered specific objects. ![Clouseau Objects](/_media/clouseau_object.png) -Highlightend in yellow is the ``Elm_box``, which is an ``Evas_box`` composed of an ``Evas_rectangle``, an ``Elm_Label`` and an ``Elm_Button``. +Highlighted in yellow is the ``Elm_box``, which is an ``Evas_box`` composed of an ``Evas_rectangle``, an ``Elm_Label`` and an ``Elm_Button``. A Button widget is an Edje_Object which is composed of four ``Evas_rectangle``, one ``Evas_image`` and two ``Evas_text``. \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page clouseau.md changed with summary [created] by Gareth Halfacree
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=27598b4cab15ec4993675737eb112872a39ccbaf commit 27598b4cab15ec4993675737eb112872a39ccbaf Author: Gareth Halfacree <freela...@halfacree.co.uk> Date: Wed Nov 29 08:34:18 2017 -0800 Wiki page clouseau.md changed with summary [created] by Gareth Halfacree --- pages/develop/debug/clouseau.md.txt | 137 1 file changed, 137 insertions(+) diff --git a/pages/develop/debug/clouseau.md.txt b/pages/develop/debug/clouseau.md.txt new file mode 100644 index 0..523c456f3 --- /dev/null +++ b/pages/develop/debug/clouseau.md.txt @@ -0,0 +1,137 @@ +--- +~~Title: Clouseau~~ +--- + +# Clouseau # + +Clouseau is the EFL user interface inspection tool. It is designed to make it easy to query UI components and structure. It supports remote debugging and works with GDB. Clouseau can also provide information about different widgets along with their properties. + +## Installing Clouseau ## + +Clouseau is available from the Enlightenment git repository using the following command: + +```bash +git clone https:``git.enlightenment.org/tools/clouseau.git +``` + +## Debugging with Clouseau ## + +The following sections will demonstrate the use of Clouseau to debug a simple "Hello World" program. + +### A Hello World Example ### + +Create the following program in your development environment or text editor: + +```c +#include + +static void +on_done(void *data, Evas_Object *obj, void *event_info) +{ + `` quit the mainloop (elm_run function will return) + elm_exit(); +} + +EAPI_MAIN int +elm_main(int argc, char **argv) +{ + Evas_Object *win, *box, *lab, *btn; + + `` new window - new background + win = elm_win_util_standard_add("hello", "Hello"); + `` when the user clicks "close" on a window there is a request to delete + evas_object_smart_callback_add(win, "delete,request", on_done, NULL); + `` add a box object - default is vertical. a box holds children in a row, + `` either horizontally or vertically. nothing more. + box = elm_box_add(win); + `` make the box horizontal + elm_box_horizontal_set(box, EINA_TRUE); + `` add object as a resize object for the window (controls window minimum + `` size as well as gets resized if window is resized) + elm_win_resize_object_add(win, box); + evas_object_show(box); + `` add a label widget, set the text and put it in the pad frame + lab = elm_label_add(win); + `` set default text of the label + elm_object_text_set(lab, "Hello out there world!"); + `` pack the label at the end of the box + elm_box_pack_end(box, lab); + evas_object_show(lab); + `` add an ok button + btn = elm_button_add(win); + `` set default text of button to "OK" + elm_object_text_set(btn, "OK"); + `` pack the button at the end of the box + elm_box_pack_end(box, btn); + evas_object_show(btn); + `` call on_done when button is clicked + evas_object_smart_callback_add(btn, "clicked", on_done, NULL); + `` now we are done, show the window + evas_object_show(win); + + `` run the mainloop and process events and callbacks + elm_run(); + return 0; +} +ELM_MAIN() +``` + +Save and compile the program as "helloworld". + +### Debugging Hello World with Clouseau ### + +Run the "helloworld" program through Clouseau with the following command: + +```bash +clouseau ./helloworld +``` + +The following screenshot demonstrates Clouseau's output: + +![Clouseau](/_media/clouseau.png) + +* Yellow - The "helloworld" application +* Red - the composition of the "helloworld" application +* Blue - the characteristic of ``Elm`` and ``Evas_object`` + +### Exploring Hello World ### + +The application is composed of three main widgets : ``Elm_win``, ``Elm_bg``, and ``Elm_box``. + +```c +win = elm_win_util_standard_add("hello", "Hello"); +[...] +box = elm_box_add(win); +``` + +The ``elm_win_util_standard_add()`` function creates the window widget, ``win``, which is the root widget often used in an application. It also adds a standard background (``Elm_bg``). Then the ``elm_box_add`` function creates a ``box`` widget. + +```c +elm_box_pack_end(box, lab); +[...] +elm_box_pack_end(box, btn); +``` + +The ``elm_box_pack_end()`` functions add ``lab`` and ``btn`` widgets at the end of the pack list, so the ``lab`` and ``btn`` widgets appear inside the ``box`` widget. + +The blue section of the screenshot shows certain characteristics of the object and widget: their position, size, color and so on. Some of these characteristics are dynamic and can be updated with the reload button in Clouseau. + +```c +elm_win_resize_object_add(win, box); +``` + +The ``elm_win_resize_object_add()`` function controls the size of the window such that it takes up the minimum of space. You can see in the b