introduction and motivation
At ProFUSION a common topic is how to optimze the system. Not just the speed, but also what and how it is done. Not just for our embedded systems, but also our desktops and laptops.
These discussions led us to be involved in projects that consider this goal, such as Enlightenment, ConnMan, oFono and systemd. With great projects, come great people and thus enlightening discussions on how to improve things. From these discussions Lennart Poettering and Kay Sievers put together a A Plumber’s Wish List for Linux, with one of the items being of special interest for ProFUSION as it had the potential of also helping embedded systems and speeding up or boots:
* module-init-tools: provide a proper libmodprobe.so from
module-init-tools:
Early boot tools, installers, driver install disks want to
access information about available modules to optimize
bootup handling.
One of the reasons for this is that udev will search /sys/devices for all “modalias” files and call “/sbin/modprobe -bv $ALIAS“, however many of these calls evaluate to an empty list, thus an useless execution of program that will open /lib/modules/`uname -r`/modules.*, load resources, search for something that is not there and return. This could be way cheaper if done inside udev workers. [note: Lucas did measure and noticed 2.5x speedups, stay tuned for benchmarks]
kmod
Then our developer Lucas De Marchi proposed to do the libmodprobe and we funded it. After some discussions with Lennart and Kay, it was decided to rename it to kmod for shortness and good namespace. The initial goal was to achive a 1:1 replacement of module-init-tools as a library to be used by udev and systemd-modules-load and we are close to it with our second release done today! While we miss depmod tool (planned for v3), our kmod-modprobe should be fully functional and if this proves to be true, the logic will move to libkmod to be used by udev.
we need your testing!
To ensure kmod-modprobe does what it is supposed to do, we need extensive testing, there is where we need you! Try it on as many systems as possibles and let us know. To do this we recommend:
$ git clone git://git.profusion.mobi/kmod.git
$ cd kmod
$ ./autogen.sh
$ ./configure --enable-logging \
--enable-debug --enable-tools \
--enable-zlib # if you have module.ko.gz
$ make all
$ sudo make install
$ sudo mv /sbin/modprobe /sbin/modprobe-bkp
$ sudo ln -s /usr/bin/kmod-modprobe /sbin/modprobe
$ ls -1 /sys/module/ > ~/original-modules
$ reboot
$ ls -1 /sys/module/ > ~/kmod-modules
$ diff ~/original-modules ~/kmod-modules
current users and feedback
Being a new project in a critical area of Linux system, we expected lots of criticism and rejection by people, but interestingly enough after Lucas’ announcement and LWN article the feedback was highly positive! We even had some testers and people to help with ideas and experience.
Among the people that joined the project is the current maintainer of module-init-tools package Jon Masters, which announced that kmod replaces module-init-tools. He is helping a lot with his knowledge and cases from Red Hat Enterprise Linux, also providing modules from non-trivial platforms such as s390. Last but not least he provided insights to improve module handling on Linux, particularly replacing modules with better alternative as required in enterprise systems.
With Jon’s blessing we’ll use the same mailing list linux-modules@vger.kernel.org and our git will move to kernel.org soon.
People from ARCH and Debian were also interested and even created packages for it! These guys were extremely helpful to test cases such as gzip modules, 64bits modules with i386 user space and so on. They are: Tom Gundersen (tomegun), Dave Reisner (falconindy) and Marco d’Itri (Md).
next steps
Based on our TODO, we have the following ideas for next steps:
- Finish libkmod-elf.c to provide information required by depmod. I’m working on this in my depmod branch;
- tools/kmod-depmod.c: create a 1:1 compatible tool to generate /lib/modules/`uname -r`/modules.*;
- libkmod should export parsed configuration to be used by kmod-modprobe.c –dumpconfig;
- create kmodmock library to be LD_PRELOAD’ed to redirect some syscalls such as init_module(), delete_module() and open() of /sys and /proc. I’ve started a branch for this some time ago as “unittest” branch but stopped due lack of ELF support at the time;
- create unittests and measure coverage. Given kernel modules are user-input they may be broken files and libkmod-elf.c needs to be extensively tested to avoid segmentation fault due out-of-boundaries access. This mean not trusting null terminated string in .strtab section and so on.
- create optimized modules.archive that would contain optimized search index and all modules compressed independently, but in the same file. This would save file access and could provide information we don’t have today, like the uncompressed size of gzipped modules.
by Gustavo Barbieri at December 21, 2011 06:24 PM
After many months, I have decided to branch e-tiling v0.9. You can find it on
github or directly on
the enlightenment.org svn.
If you wonder what e-tiling is, I've done a presentation in a previous
article.
New Features
The major change in this release is to be able to tile vertically or
horizontally.
It is now possible to use figures or a different set of characters to identify
windows and transitions.
While talking about settings, the window title is hidden or not as configured.
In order to improve the user experience, the original border and maximized
state are restored when untiling a window.
I've also added animations when compositing is disabled.
It has been reported that the module was working with dual-screens
configuration.
December 11, 2011 03:00 PM
We'd like to announce a new release of several Enlightenment components.
- Eina 1.1.0 -
[GZ]
[BZ2]
- Eet 1.5.0 -
[GZ]
[BZ2]
- Evas 1.1.0 -
[GZ]
[BZ2]
- Ecore 1.1.0 -
[GZ]
[BZ2]
- Embryo 1.1.0 -
[GZ]
[BZ2]
- Edje 1.1.0 -
[GZ]
[BZ2]
- Efreet 1.1.0 -
[GZ]
[BZ2]
- E_dbus 1.1.0 -
[GZ]
[BZ2]
- Eeze 1.1.0 -
[GZ]
[BZ2]
- Expedite 1.1.0 -
[GZ]
[BZ2]
- Evas Generic Loaders 1.1.0 -
[GZ]
[BZ2]
All of these components come from revision 65800, if you prefer to
fetch from SVN.
[ GZ]
[ BZ2]
Additions
- eina_unicode_strndup API
- EINA_INLIST_FOREACH_SAFE API
- eina unicode UTF8 convenience calls API
- eina_list_move functions to move list nodes from list to list directly
- simple SAX XML parser API added
- inlist sort and sorted insert API
- mempool repack API
- eina_file API for portable file memory-mapping with IO saffety traps
- thread locks, conditions etc. wrapper API for portability
- prefix API for apps or libs to find their runtime prefix location
- refcount macro API
- binbuf for binary extendable buffers API
- eina_hash_free_cb_set API
- eina_main_loop_is API
- eina_strbuf_manage_new and eina_ustrbuf_manage_new APIs
- eina_xattr API's
- eina_hash_murmur3 API
Fixes
- compilation problems with some configure options
- stat issue if file size is in bytes and serial number overran 32bits
- uninstall of mempool modules
- static build of buddy mempool
- stringshare multi-init bug
- windows port of eina_sched_prio_drop
- eina_hash_set to handle data being NULL like eina_hash_del
- static linking to eina (iconv can be avoided)
- eina_share_common_del and eina_share_common_ref unlock bug
Improvements
- scalability/speed improvements in Chained Mempool
- stringshare as storage for eina error strings now
[ GZ]
[ BZ2]
Additions
- EET_DATA_DESCRIPTOR_ADD_LIST_STRING API for string lists
- eet_node API's to manipulate nodes
- eet_alias_get API
- eet_data_xattr_cipher_get and eet_data_xattr_cipher_set APIs
- EET_DATA_DESCRIPTOR_ADD_BASIC_ARRAY API
Fixes
- eet shutdown on windows
- test case to init eet
- compilation against libjpeg 8 on windows
- binary open on windows
- unopenable empty eet file for read/write
Improvements
- better speed and memory footprint of EET_G_UNION and EET_G_ARRAY
- use stringshare for mmaped file names
- use eina locking wrappers
- use eina_file for file IO
- jpeg encode and decode quality improved at expense of speed
[ GZ]
[ BZ2]
Additions
- auto-align feature to textblock
- mixedwrap wrap mode to textblock
- harfbuzzsupport for shaping
- WBMP loader
- mirror mode for tables
- proxy abilities to image objects to choose source ro mirror
- speculative texture cache to the OpenGL engine to avoid texture uploads
- newline policy setting API to textblock
- evas_object_ref and evas_object_unref to defer object deletions
- ICO loader
- evas_object_image_memfile_set to load images from memory
- vertical alignment to textblock
- more shadow directions for text rendering
- runtime italicizing and boldening of fonts that don't have their own
- more bidi API support
- PSD loader
- generic external-process loader for thins like xcf, pdf, video, ps
- password mode to textblock
- GL shader disk cache to avoid re-compilng on start
- evas_textblock_node_format_list_get. API
- smart class usage count get API
- grid layout smart object and API
- evas_event_thaw_eval to help evaluate state and events on event thaw
- textblock support for numeric escapes like "<" in markup
- evas_object_image_extension_can_load_get API
- evas_object_image_extension_can_load_fast_get API
- evas_object_image_load_orientation_get API
- evas_object_image_load_orientation_set API
- feature to allow tables to repack the same object without error
- API to get child packing from table
- is_inside implementation for polygon objects
- out-of-order open/close tag support in textblock markup
- support for quoted parameters in tags in textblock markup
- font_weight and font_style formats
- font_width font format
- markup tag to specify language
- evas_textblock_cursor_range_formats_get API
- evas_textblock_cursor_visible_range_get API
- callback prioritization support
- YUV 601 input support for evas_object_image_data_convert
- NV12 colorspace for evas image objects
- MT12 colorspace for evas image objects
- underline dashing suport to textblock
- API to get largest image size
- GL Cocoa engine
Fixes
- cursor and selection handling with bidi text
- many general bid issues with text
- free bug in key grabs
- bug when images are scaled to massive sizes (like 1 billion pixels)
- BMP decode for have more pixels per line than the image does
- font string parsing bug if font element is too long
- crash bug in argb8888 to a8 conversion
- textblock bug with cursors in empty textblocks
- bug in smart calc array where some objects would be skipped
- static linking of BMP and TGA loaders
- bug when GL viewport was set with a NULL context
- bug when looking for vsync API due to SGI vs EXT differences
- bug in evas_object_del where DEL callback happened before HIDE
- yinversion bug on some GL surfaces
- BMP loader to handle alpha BMPS as solid where all alpha values are 0
- clipping with evas map issues
- bug where wrong call was used for freeing a mempool object
- static linking of GL engine
- GL engine to handle if someone uses GL contexts outside of evas
- bug in evas_object_textblock_text_markup_prepend that broke cursors
- lack of calling pre/post swap callbacks when using OpenGL-ES2
- some crashes with load options scaling of SVGs in 2nd pass decode
- segfault with evas_textblock_cursor_content_get
- libjpeg 8 compilation support on windows
- evas table to handle weighting correctly and expansion
- evas table to allow fractional weights, not just 0/1
- glyph search bug causing inconsitent return values in some cases
- compile when --disable-async-preload is used
- callback counter bug
- grab count and hide bug
- infintie loop bug when re-inserting objects during pre-render calc
- evas_object_image_data_convert
- TGA loader detects false positives less and handles alpha TGAs better
- repeat event flag not inherited from parent smart like pass events
Improvements
- pre-render speed for rectangles if they are invisible
- code of textblock and font engine
- textblock layout speed
- speed and memory usage of textblock
- cache handler to also use file size, mode and sub-second timestamp
- textblock to re-layout only paragraphs that have changed
- homogenous table layout alignment and sizing
- textblock linebreaking by using liblinebreak
- image loader to drop out instantly if image file is a directory
- object allocation to use mempools
- font engine to use string objects not strings for caching purposes
- text to display missing unicode char instead of missing glyphs
- internal file code to use eina_file more
- jpeg loader to use eina_file
- jpeg encode and decode quality improved at expense of speed
Removals
- removed quartz, cairo, qtopia and xrender engines. dead.
[ GZ]
[ BZ2]
Additions
- ecore:
-
- ecore_thread_reschedule()
- ecore_exe_data_set()
- ecore_animator_timeline_add()
- ecore_timer_dump()
- custom ecore animator tick mode and support
- ecore_pipe_freeze/thaw()
- ecore_pipe_wait()
- ecore_throttle()
- ecore_main_loop_thread_safe_call_async()
- ecore_main_loop_thread_safe_call_sync()
- ecore_thread_main_loop_begin()
- ecore_thread_main_loop_end()
- ecore_con:
-
- ECORE_CON_EVENT_CLIENT_ERROR, ECORE_CON_EVENT_SERVER_ERROR events
- Ecore_Con_Event_Server_Error, Ecore_Con_Event_Client_Error types
- ecore_con_client_port_get()
- ecore_con_url_ssl_verify_peer_set()
- ecore_con_url_ssl_ca_set()
- ecore_con_url_pipeline_set()
- ecore_con_url_pipeline_get()
- ecore_con_ssl_client/server_upgrade()
- ECORE_CON_CLIENT/SERVER_UPGRADE events
- ecore_con_server_timeout_get/set()
- ecore_con_ssl_server_verify_basic()
- ecore_con_url_url_get()
- ecore_con_server_fd_get()
- ecore_con_client_fd_get()
- ECORE_CON_EVENT_CLIENT_WRITE, ECORE_CON_EVENT_SERVER_WRITE events
- ecore_evas:
-
-
- ecore_evas_screen_geometry_get()
- ecore_cocoa_evas support
- ecore_file:
-
-
- ecore_file_download_full()
- ecore_imf:
-
-
- ecore_imf_context_canvas_get()
- ecore_imf_context_window_get()
- ecore_imf_context_preedit_string_with_attributes_get()
- added controls for auto-capitalization and prediction controls
- ecore_imf_context_input_panel_enabled_set/get()
- ecore_imf_context_cursor_location_set()
- ecore_x:
-
-
- ecore_x_randr_edid_*()
- ecore_x_randr_screen_backlight_*()
- more ecore_x_sync api controls to support ecore_evas
- shape input setting support added
- ecore_x_screen_size_get()
Fixes
- https failing via curl
- removed SIGRT handling as it was broken anyway and unused
- space key handling in ecore_wince/ecore_win32 support
- wince background erasing
- 300 second timeout to handle slow or large downloads in ecore_con
- ecore_file intoify fd's to not be inherited by forked children
- ecore_file compilation if ecore_con and curl disabled
- crash in ecore_con_ssl when attempting connections on dead socket
- ecore-evas intereptor not handling override-redirect
- ecore_con_url_ftp_upload to complete uploads always
- window removal from ignore_list in ecore_x
- bug in ecore_evas when setting modifiers for sub buffer canvases
- NULL pointer dereference in ecore_x selection notification code
- sync GNUTLS thread activation with eina changes
- ecore_ipc compilation on Windows
- fix Shift, Control, Alt and AltGr keys detection on Windows XP
- "mouse-down inside and mouse-up outside" issue on Windows
- ecore_x shadow tree search fixed to respect shape input of windows
- fd handlers fixed when idler callbacks add jobs or events
- ecore_x_selection_convert takes length into account
- security issue in openssl certificate verification
- gnutls server client certificate verification
- epoll delete of fd handling in forked child
- grouping of timers that go off very close to eachother go off together
- generic event buffer handling in ecore_x fixed
- use current size not requested size when getting geom in ecore-evas
- ecore_cocoa now handles windows correctly
- ecore_file_download error handling when ecore_con_url_get fails
- focus and mouse-in ininital siate on some ecore-evas back-ends
Improvements
- reduced memory needed for list of fd's in ecore by using inlist
- ecore_evas now is able to send render-done even if not syncing to comp
- more safety checks in ecore_con ares support
- ecore timer monotonic clock now supported on OSX
- make ecore_con work on Windows
- improve resize/move on Windows
- improve keyboard management on Windows XP
- refactored _ecore_main_loop_iterate_internal
- better safety with ecore_evas_ecore_evas_get
- ecore-evas produces more errors on stderr when errors happen now
- ecore-con works on IPv6 now
- inet_ntop instead of getnameinfo for ecore_con_client_get_ip
- ecore-con unit tests added
- ecore-evas fb uses ecore_input_evas now instead of going direct
- fix ecore-evas x changing of override support if window not shown yet
Removals
- xrender evas engine support removed from ecore_evas (api still there)
[ GZ]
[ BZ2]
Fixes
- on windows use fseek instead of rewind as rewind doesn't exist on wince
- delete tmp files on windows
Improvements
- make embryo_cc use eina_prefix to determine installation location
[ GZ]
[ BZ2]
Additions
- "UNDER" entry cursor mode
- auto alignment of TEXT parts with text.alignment set to -1
- mirroring support
- edje_object_part_text_cursor_pos_set/get()
- size_range propert to TEXT parts
- proxy parts so part can source other parts including swallows
- suport explicit shadow direction with added effect param
- edje_object_part_text_append()
- new interpolations: ACCEL_FAC, DECEL_FAC, SIN_FAC, DIVIS, BOUNCE, SPRING
- "entry,paste,request,1" signal (primary)
- "entry,paste,request,3" signal (clipboard)
- "entry,selection,all,request" signal
- "entry,selection,none,request" signal
- "entry,paste,request*" signals afte cursor change
- "entry,changed,user" signal
- collection.group.limits.horizontal/vertical
- input panel layout setting API's
- edje_object_signal_callback_extra_data_get()
- group inheritance and part re-ordering with inheritance
- add change information to "entry,changed,user"
- add "CURRENT" option for transitions to transition from current state
- lua color/text class, map, text, image, line, polygon and edje object API's
Fixes
- invalid memory access in edje alias code
- recusive aliases fixed
- cursor didn't change on backspace signal
- propagation of recursive events on existing part
- box/table signal not including name correctly
- clicked signal on entry
- propagation of recursive events between existing and non-existing parts
- textblock handling in size_min_restricted_calc fixed
- stop emitting "cursor,changed" on text set
- external usage in sub groups now have proper parents
- ellipsis fixed with small text parts
- edje_shutdown() fixed if called before all edje objects are gone
- allow -1 for description.max
Improvements
- built-in epp (from e16) to replace cpp/gcc pre-processor on all platforms
- edje_decc only uses edje_cc as compiler for security paranoia
- use smart clipper more from evas
- text.align now works for textblock too
- creation/deletion of edje objects should be faster with freeze and thaws
- don't walk eina_list when deleting member classes - faster
- part.description.max now can define just 1 axis
- signal and message propagation is more consistent and simpler now
[ GZ]
[ BZ2]
Fixes
- when you have an empty in a menu
- tests don't do clearenv when it is not available
- memory leak fixed in cache icon retrieval
- check for NULL dirs in caches
- check for theme change when rebuilding cache
- leak in efreet_mime_type_icon_get
- reset log domain to -1 on unregister
- clear memory cache when closing eet file
- fixed documentation
- remove EAPI from efreet_home_dir_get as it wasn't exported in .h's
- don't leak hashes on init error
- no more memleak in desktop cache creation
- fixed uri encoding when opening files
Improvements
- added temporary memory cache for eet file data
- always use icon cache
- faster string comapre with poter equality for strings
- local log domains per file
- remove exess init functions for xml
- stop creating cache dir multiple times
- change ownership of cache files to calling user
- fast path for "*" pattern match
- delay cache creation with a timer to avoid storms
- always rebuild cache from 0 when needed and be more correct
- store cache change flags in update file and propagate to update event
[ GZ]
[ BZ2]
Additions
- more disk-related detection/info functions
- disk mounting API
- eeze_scanner utility for applications to hook for drive detection
Fixes
- bugs with device detection related to newer kernel versions
- device filtering to be more accurate in some cases
[ GZ]
[ BZ2]
Additions
- e_notification_action_id_get
- e_notification_action_name_get
- e_notification_image_init
- e_connman: sync api with connman-0.7x
Fixes
- DSO linking issues fixed
- crash on e-notify-send with invalid session bus set
- when app has no idle time, e_dbus's idlers dont process anything
- error when trying to add duplicate fd handler for dbus fd
Improvements
- notification protocol 1.2 support
- e_connman supports connman-0.7x api, warns that it is unstable.
[ GZ]
[ BZ2]
First release.
[ GZ]
[ BZ2]
First release.
by raster@rasterman.com
(Carsten Haitzler
) at December 02, 2011 06:00 PM
Past week, I’ve attended LinuxCon Brazil as speaker. It took place in São Paulo, 17 and 18 November 2011. Despite not having a huge number of attendees, it was definitelly great in presentations quality.
Keynotes were interesting, relating the 20 years of Linux under many point of views, and previewing Linux’s future for the next 10 months . Linus Torvalds confidence about Secure Boot failure drawn my attention. He defends his point considering users need, and want freedom, even in a unconscious way.
The event was plenty of good talks, as the given by Lennart Poettering, about systemd, a system and service manager, which I only had heard about previoulsy, so it was nice as an opportunity to learn a lot about it, and GNOME 3 presentation, given by Tobias Muller. It always worth to see what competitors are doing =D.
I’ve presented “Application Development using Enlightenment Foundation (EFL)” together with my co-worker Rafael Antognolli. We’ve made an overview of the libraries, webkit, gave some development tips, and talked about some products done at ProFUSION using EFL, as Electrolux’s I-Kitchen softwares, and Endeavour, a browser under development, sponsored by FINEP. Below you can see slides of our presentation, also available as PDF:
Other 3 talks were given by ProFUSION guys. Demarchi explained how to become a Free Software developer, focused on students and other newcomers. Gustavo Barbieri presented “Tips and Tricks to Develop Software for CE product on Low-End Hardware”, and “Demystifying HTML5″ with Sulamita Garcia (Intel). By the way, when the event started, was announced that ProFUSION became a member of Linux Foundation. Congrats!
Another nice point about attending this conference was the opportunity of knowing some guys from IBM, INDT, Samsung, and talking to some University colleagues I didn’t meet by the last 4 years or so.
by bdilly at November 23, 2011 09:01 PM
The long overdue introduction to Elm_Web is finally here, thanks in part to
this little blog being back, and in part to me being reminded for the sixth
time that I had still to put it up. But those are unimportant details, what
matters is what follows.
What
Elm_Web is a new Elementary widget that provides a way to display Web content
in your Elementary applications. It uses WebKit's EFL port, wrapped around to
integrate properly within Elementary's infrastructure and to provide a simpler
API, so it can be used without having to worry about needing to write the
boilerplate code required to get things up and running.
Why
WebKit-EFL provides two main classes that developers can interact with to
control how their documents will be shown. Ewk_View and Ewk_Frame.
Ewk_Frame is a lower level object and there's one for each frame as the loaded
document contains. As such, they are created by WebKit as needed, but things
like key or mouse events and scrolling the frame contents need all be fed by
someone else to be processed.
Ewk_View is the higher level object the developer will actually interact with.
It always contains at least one Ewk_Frame in it and it abstracts almost every
part of the frame API, so that developers need only work with specific
Ewk_Frame objects when it's absolutely required.
Still, the Ewk_View class demands that a lot of boilerplate code be provided
to get something more than the bare basics. It's implemented as a Smart Object
with its class being public, so applications have to define most of it to
handle things like JavaScript dialogs, mouse events for touchscreen style
scrolling and requests to open a new window.
Elm_Web simplifies this. It provides default implementations for the items
mentioned above, while allowing the user to override them by giving their own
callback functions to handle each event. It takes care of finding and setting
the theme path for WebKit to use when rendering its internal widgets and
attempts to provide an API similar to those of other Elementary widgets.
However, Elm_Web is meant to be a simple layer on top of WebKit-EFL, intended
to provide a simple way for applications to have a Web widget where to display
simple pages, online help or simple markup content. It is not meant to write a
full featured browser, at least in its current state.
The API provided is the most common subset of functions that the Ewk_View
object supports, but if something more advanced is needed, it's always
possible to get the internal Ewk_View object and operate on it directly. Note
must be taken though, that not everything can be changed, and some things may
enter in direct conflict with how Elementary handles the object internally.
How
So how do we get this new toy you ask? Assuming you already know how to build
the EFL (here's some help),
you would now need to get and build WebKit before Elementary.
Detailed instructions on how to get WebKit can be found in its own wiki,
right here.
Once WebKit is built (it can take a long time, depending on the computer),
it's time to build Elementary. If everything's right, it should auto-detect
the WebKit installation and inform that Web support will be built in its
configure output. If it doesn't find it, make sure that the PKG_CONFIG_PATH
environment variable contains the path where ewebkit.pc can be found, usually
something like "/usr/local/lib/pkgconfig".
When the build finishes, check out the Web test in elementary_test and the
example in src/examples/web_example.c to see it in action.
To start using it in your own programs, refer to the documentation that can be
found here.
And if you want to help improve the widget, refer to the next point.
Pending
There's always work to do and there are always ways to improve things, so here
are a few pending items, in no particular order.
- Each Ewk_View object requires a theme to be set to it so it can render the
internal objects like buttons, textarea, scrollbars, etc. Elm_Web will do
this for you by looking in the list of themes set for the program (in
order, going from overlays to main theme and then extensions) looking for
one that provides the "webkit/base" group. Once it finds one, it will set
it as the theme for its internal view object. If no theme contains this
group, it will fall back to WebKits default theme, using the path to its
data directory found at built time.
The default theme for Elementary currently has no theme for WebKit, so it
will be always using the default, which doesn't exactly match the looks of
the rest of the toolkit. It would be nice to have a theme using the same
graphics as the rest of the toolkit, to make things a bit more integrated.
- Panning, scrolling, thumb dragging... all of these are implemented by
handling the events coming from the Ewk_View object, and not integrating
with the scroller widget in Elementary. The reason being that the view
object is not just one simple object with a defined size that can be freely
moved around, but a container for an unknown number of elements that can be
scrollable themselves.
- JavaScript dialogs have their default implementation and users can
override them by providing function callbacks to handle the creation and
managing of said dialogs. However, to completely disable them, an
implementation of them returning NULL for the object is needed. Maybe it
would be a good thing to have a flag to have the widget ignore their
requests entirely.
by Sachiel at October 31, 2011 04:58 AM
Last week from 29-Sep to 01-Oct we had the amazing 7th PythonBrasil conference, for the first time in São Paulo.
Since I’ve start to use Python in 2002 I loved the language, but after getting introduced to the PythonBrasil community in 2004 I’ve boosted my development skills, got some friends and even my first job (INdT-Recife) was a kind recommendation from Osvaldo Santana in 2005.
By 2005 we had the 1st PythonBrasil Conference, then called PyConBrasil, here in Campinas with the help of UNICAMP and our amazing non-stop contributor Rodrigo Senra. It was very cool, I even presented a talk there… and it motivated me to go to following conferences in 2006 and 2007 as well.
However if starting to work at INdT reduced my spare time since late 2006, after ProFUSION was born in 2008 I had no time to participate in the lists or even go to conferences. What a shame!
I couldn’t see how shameful it was until I did this PythonBrasil in 2011. I’ m yet to see a conference with so kind people. People still remembered me and I was ashamed when I couldn’t remind their names… although they did remember mine (NOTE TO CONFERENCE: bigger names next year!) Some would even let me know they still use Eagle-Py, something that I already forgot about. And people I had closer contact before were willing to talk as if we had met last week. Amazing.
During these talks I’ve catch up with Rodrigo Senra, Luciano, Osvaldo, Erico, Marco André, Sidnei, Fernando and many more I couldn’t remember. However one of the talks was very special: talked to Gustavo Niemeyer about Go programming language. That’s right, people were so kind and open we had a keynote about Go, and we talked a lot afterwards without problems! Gustavo showed me some nice details about the language and my mind is now burning! I must do Enlightenment Foundation Libraries (EFL) + Go = EGO, a perfect GUI tool.
But I was of use… not just a leecher! I went there to present 3 talks (slides in Portuguese!):
Last but not least, I’d like to thank everyone that did this amazing conference possible!
by Gustavo Barbieri at October 06, 2011 01:25 AM
Lots of systems do not support multi-window on their own, consider standard Linux Frame Buffer (FB) or the PlayStation3. This makes it cumbersome as you’re restricted to a single window, likely you’ll have to rewrite your apps to behave well in this scenario.
Traditionally this problem is worked around by toolkits like Qt that provides QWS, a great help for developers. Considering QWS I decided to help our PS3 friends with something similar which I shamelessly called EWS (Ecore + Evas Single Process Windowing System).
Ecore and Evas already made 99% of this work: they abstract rendering, abstract windowing and so on. There is even support for “inlined windows” in Elementary, these are rendered to buffers that are visible inside other windows. Actually the first version of EWS was a 30min hack in Elementary called “eland” (making fun of wayland). But as not everyone would use Elementary it was better to move it lower in the stack: Ecore_Evas.
Ecore_Evas is a glue layer between Ecore and Evas that takes care to configure actual windows and setup Evas on them, to capture events from various sources and feed them to canvas, etc. If you cope with its API you’ll work with most EFL libraries and applications out-of-the-box.
Ecore_Evas_EWS was created as a new engine that builds on top of others. It will use a backing-store engine like X11, FB, DirectFB, WinCE or PS3 to create an internal Ecore_Evas. Every new window created with ecore_evas_ews_new() is rendered to an Evas using the buffer engine and its pixels end as the image source in the backing-store engine, displaying it. This is very similar to existing ecore_evas_buffer feature ecore_evas_object_image_new(), however it will handle more things automatically.
Among the new features are events to allow window management. Things like “window created”, “window moved” and “window resized” are placed in the main loop for interested peers, they may handle these and decorate the windows, offer window management (close, maximize, …). To exemplify that I’ve added support in Elementary with basic controls such as move, maximize, restore and close. Unfortunately it looks ugly like hell and then I’m not posting any screenshot or screencast Let’s wait for people doing themes to make a great work.
The work is far from complete, bugs remain, optimizations could be applied for OpenGL… if you consider the rules “20/80″, 80% of the code was written in 20% of the time, now we’ll take 80% to make it work for sure But it’s not bad considering it took me 2 days, 1421 lines in ecore_evas_ews.c, 543 in elu_ews_wm.c and 317 in ews.edc…
That’s why I keep saying that EFL is an amazing technology to build products. It runs fast, it’s slick and it does not get in the way. Give it a try!
by Gustavo Barbieri at October 06, 2011 12:51 AM
Eina_Simple_XML is a library that should make it easy to handle XML files while
consuming very little (or no) memory. Before we start I've got to mention the caveat: to preserve simplicity Eina_Simple_XML does not implement a few XML features such as namespaces, encoding and entities, it's however capable of parsing simple XML files.
Eina_Simple_XML provides a SAX like API, you give it a string and a callback function to be called every time it finds a relevant token. This is all a lot easier to understand by looking at an example, so let's do that. We are first going to parse and then add to this XML file:
<phonebook>
<contact>
<name>John Doe</name>
<phone>+55(19)5555-7777</phone>
<email>john.doe@email.com</email>
<dob>1968-09-19</dob>
</contact>
<contact>
<name>Jane Doe</name>
<phone>+55(19)6666-7777</phone>
<email>jane.doe@email.com</email>
<dob>1968-09-21</dob>
</contact>
<contact>
<name>Bill</name>
<phone>+55(19)7777-7777</phone>
<email>bill@cool_emails.com</email>
<dob>1968-09-23</dob>
</contact>
</phonebook>
In the parsing stage we're going to not just look at the data but actually populate a list of contacts:
typedef struct _contact
{
char *name;
char *phone;
char *email;
char *dob;
} contact;
Now that we've defined the data structure to be used we need to create the function that we'll use as a callback to the parser. This function treats 4 situations, the first is the contact open tag, the second is the open tag of name, phone, email or dob, the third is for data elements and finally the contact close tag. In the first case we create a new contact, in the second we set a state variable so that we know where to put the data we receive next, and the final situation is when the contact is fully created and we add it to the list.
typedef enum _State
{
NAME,
PHONE,
EMAIL,
DOB
} State;
static Eina_List *contacts;
static Eina_Bool _parse(void *data, Eina_Simple_XML_Type type, const char *content, unsigned offset, unsigned length)
{
static contact *cur = NULL;
static State s;
if(type == EINA_SIMPLE_XML_OPEN && !strncmp("contact", content, length))
cur = malloc(sizeof(contact));
else if(cur && type == EINA_SIMPLE_XML_OPEN) {
if(!strncmp("name", content, length))
s = NAME;
else if(!strncmp("phone", content, length))
s = PHONE;
else if(!strncmp("email", content, length))
s = EMAIL;
else if(!strncmp("dob", content, length))
s = DOB;
} else if(cur && type == EINA_SIMPLE_XML_DATA) {
char *ptr = strndup(content, length);
switch(s) {
case NAME:
cur->name = ptr;
break;
case PHONE:
cur->phone = ptr;
break;
case EMAIL:
cur->email = ptr;
break;
case DOB:
cur->dob = ptr;
break;
}
} else if(cur && type == EINA_SIMPLE_XML_CLOSE && !strncmp("contact", content, length)) {
contacts = eina_list_append(contacts, cur);
cur = NULL;
}
return EINA_TRUE;
}
Creating a new contact is even simpler, as you can see the function creates a contact tag, and a name, phone, email and dob tag. When creating each tag we specify the parent and after the tag is created we add a data node as it's child:
void create_contact(Eina_Simple_XML_Node_Tag *phonebook, const char *n, const char *p, const char *e, const char *d) {
Eina_Simple_XML_Node_Tag *c, *n_tag, *p_tag, *e_tag, *d_tag;
c = eina_simple_xml_node_tag_new(phonebook, "contact");
n_tag = eina_simple_xml_node_tag_new(c, "name");
eina_simple_xml_node_data_new(n_tag, n, strlen(n));
p_tag = eina_simple_xml_node_tag_new(c, "phone");
eina_simple_xml_node_data_new(p_tag, p, strlen(p));
e_tag = eina_simple_xml_node_tag_new(c, "email");
eina_simple_xml_node_data_new(e_tag, e, strlen(e));
d_tag = eina_simple_xml_node_tag_new(c, "dob");
eina_simple_xml_node_data_new(d_tag, d, strlen(d));
}
So we've seen a function to use as a callback in parsing the phonebook and a function to create contacts in the phonebook, now we look at how we tie all of this together. Our main function does a quite a bit of boiler plate stuff that I'll leave as an exercise to the reader to figure out.
int main(int argc, char **argv)
{
//Just declaring and initializing some variables
Eina_List *l;
char *buf, ch;
int i;
FILE *f = fopen("phonebook.xml", "r");
Eina_Simple_XML_Node_Root *root;
Eina_Simple_XML_Node *phonebook;
contact *cur;
eina_init(); //Always initialize eina before using it
//Here we read the contents of the file into a variable and then close the file
fseek(f, 0, SEEK_END);
buf = malloc(sizeof(char) * ftell(f)); //We don't care about the EOF char
fseek(f, 0, SEEK_SET);
for(i = 0; (ch = fgetc(f)) != EOF; i++)
buf[i] = ch;
fclose(f); //Free resources as soon as we're done with done
eina_simple_xml_parse(buf, i, EINA_TRUE, _parse, NULL);
EINA_LIST_FOREACH(contacts, l, cur)
printf("%s: %s\n%s - %s\n\n", cur->name, cur->phone, cur->email, cur->dob);
EINA_LIST_FREE(contacts, cur) {
free(cur->name);
free(cur->phone);
free(cur->email);
free(cur->dob);
free(cur);
}
root = eina_simple_xml_node_load(buf, i, EINA_TRUE);
free(buf); //We won't need this anymore so free
phonebook = EINA_INLIST_CONTAINER_GET(root->children, Eina_Simple_XML_Node);
create_contact((Eina_Simple_XML_Node_Tag*)phonebook, "greg", "0000-1111", "greg@good-guy.com", "1988-02-30");
buf = eina_simple_xml_node_dump((Eina_Simple_XML_Node*)root, "\t");
//Now that we have the new XML in a variable let's put it back in the file
f = fopen("phonebook.xml", "w");
fputs(buf, f);
fclose(f);
free(buf);
eina_simple_xml_node_root_free(root);
eina_shutdown();
return 0;
}
The first bit here that we should look at is the eina_simple_xml_parse() call, this is what is doing all the work and calling our _parse() function, the first parameter we give it is the content of the phonebook.xml file, the second the size(in chars/bytes), the third is an EINA_BOOL telling it to trim whitespace, finally we give it the callback function and a NULL since we don't need to receive anything on it. Just to make sure the parsing worked we then print the list of contacts and free it.
That's all for the parsing, let's now talk about the creation of another contact. The first thing to do is to have Eina_Simple_XML create a tree of the document for us and get the root element, which is a single call to eina_simple_xml_node_load(). Once we have the root node we get it's first(and only) child, which, since we know the structure of the document, we know is the "phonebook" node, from then on it's a simple matter of calling the previously discussed(and shown) function and eina_simple_xml_node_dump() to get the resulting XML. The rest of the code is just file and memory handling, which should be very straitghforward and easy to understand.
Now that I've thrown all this code at you I need to give another warning, DON'T use this as is. If you're wandering why I showed you all of this if you shouldn't use, it's a simple matter, to avoid polluting the code with a lot of stuff that isn't directly relevant I removed all error checking. If you want to parse your own XML files feel free to use this code as a base and modify as needed(e.g.: add error checking =) ).
by gastal at September 23, 2011 09:09 PM
As I think that the release is not that far, I built another Windows installer:
http://www.maths.univ-evry.fr/pages_perso/vtorri/files/Efl-1.1.0.exe
It can install the EFL up to Edje, plus Elementary and Expedite. It's not an "official" 1.1.0 release contrary to the name of the file. I just took the code in the svn the 18th September 2011. But I don't think that there will be a lot more features for 1.1.0 release.
If you have some time, feel free to try it.
There are some bugs, and elm tests that are not all working (factory test, images which path is hardcoded, ...)
I tested it on Win XP 32 bits. So on Win > XP, there could be some problems. Especially, try to enable the XP compatibility mode, it shoud help a bit.
Main improvements compared to 1.0 :
- ecore_con, which should work (hence ecore_ipc too)
- resize of the windows, which is faaaaar smoother than in the 1.0 release.
by vtorri at September 19, 2011 06:27 AM
While most projects praises portability with fancy things like “gchar” (Gtk), fancy names like “LightHouse” (Qt) or completely new abstraction concepts, The Enlightenment Project always choose a simple approach to use POSIX and fill the gaps as required. This requires much less work and yields the same or better results, as we could see in the past and now being the first toolkit to be ported to PlayStation3 (native, no Linux)!
As announced by the the developer, KaKaRoTo, in our official news the port was done on top of our existing SDL backend in a couple of days, then being migrated to native PlayStation3 using unofficial SDK PSL1GHT for jailbroken systems. There is still no hardware acceleration, yet it runs fine a physics game at Full HD.
Right now we have port to MacOS and Windows, including WinCE. Given our scarce resources we do not lag behind Qt or Gtk in portability front. Basically what we have is one brave developer called Vincent Torri that is a Math professor and do it on his spare time!
Vincent could do it by keeping our approach: use POSIX and fill the gaps. He created “Evil”, a library to provide missing functions to Windows. Kakaroto then created “Escape” to do the same for PSL1GHT. Seems this approach works fine
by Gustavo Barbieri at September 16, 2011 07:22 PM
Dear Enlightened people of the world,
We are happy to announce that we have started working on a native port
of the EFL for the Playstation 3 system.
This port comes as great news for the ps3 homebrew community which has
been strugling with a complete lack of tools for easily developing
application. With PSL1GHT (The unofficial PS3 SDK) and a port of the
SDL as pretty much the only available libraries for the PS3, not much
could be done without a huge waste of time in order to reimplement all
the basic things.
The initial port of the EFL was done in just a couple of days, where
eina, eet, evas, ecore, embryo and edje were made available and a port
of expedite and eskiss were successfully running on the PS3.The port
was made using the SDL engine for evas, and while it worked, the
performance wasn't great.
Work has continued since then and a new psl1ght engine was added to
evas which makes use of PSL1GHT's capabilities for setting up the
display. For now, it is still a work in progress and the rendering is
still done in software, but we plan on making the engine fully
hardware accelerated to take advantage of the powerful capabilities of
the Playstation 3 console. The engine now has mouse and keyboard
support as well as mouse emulation using the PS3 controller.
Elementary, the EFL widget toolkit has also been partially ported and
this means that all of the widgets that elementary provides can be
used in applications, this should make development of any kind of
homebrew application much easier, whether it be for an alternative PS
Store, or for in game menus. Edje, the powerful layout engine, will
also allow developers to write themeable applications, or games, with
nice animations and all the eye candy they need.
On a side note, this work also means that the EFL will soon have
joystick support added into evas, ecore and ecore-input, and this will
hopefully bring us tons of new EFL-based games and apps for the PC as
well.
A thank you goes to KaKaRoTo, zerkman and gzorin for their work in
making this possible.
And here is the mandatory video showing Expedite running a few tests on a PS3 :
http://www.youtube.com/watch?v=f39YDDEQGyw
As well as Eskiss running beautifully in full HD :
http://www.youtube.com/watch?v=j2kuxyzY7IU
We will keep you informed of any progress on this area, for now here
is a quick TODO list for what's to come :
- hardware accelerated rendering
- full joystick support
- support for the Move controller
- full support of Elementary and all of its widgets
- More apps and games ported
by kakaroto@kakaroto.homelinux.net
(Youness Alaoui
) at September 16, 2011 06:10 PM
Over the past couple weeks I finished projects. Eeze mounting. Pulseaudio integration. Other things that I don't remember doing. One thing that I did, mainly over the last couple days, is get some time to work on everyone's favorite XMPP client. Add/remove contacts is implemented, status icons are in, there's toolbars, and everything just looks much nicer overall. Also I finally fixed the big shutdown crash (fingers crossed).
by noreply@blogger.com (discomfitor) at September 12, 2011 02:30 AM
I keep putting off the giant advanced Azy tutorial entry that I've been writing off and on for the past few months, mainly because I hate how code looks on a blog. It'll be up sometime, but probably not today. Or tomorrow.
Shotgun has gotten a lot of updates and features over the past few weeks. Crashes only occur "sometimes" now, and copying links is possible with right clicking. There's probably other things of import, but it seems to be fairly usable overall. I know there are people out there who have already switched from Pidgin, which is pretty neat for a small hobby project. With some luck, I will get more time to continue work on it soon.
Esskyuehl now compiles with recent versions of MySQL. Hooray!
I have spent the past week working on small bits and tests related to eeze mounting in EFM. All in all, I would say that I have accomplished a net of zero improvements. The main issue is the whackamole-like style of the bugs and my own inability to reproduce them regularly. Frequently, mounts will occur with no issues. Other times nothing will happen. Sometimes I get a crash. I'm getting closer, but the project is very demoralizing since there are no milestones.
Pulseaudio integration is still untouched since my last headaches in July. Once I sit down with it and take some painkillers I can probably bang it out in a few more days of awfulness, though no doubt Lennart has left me plenty more "features" which will hamstring my efforts.
Another project that I will probably use as a "relaxing" item is libarchive integration of lrzip. I have been reviewing the required API, and it seems fairly sane - what a delightful surprise! The downside is that I will likely use the command version of the API instead of directly integrating using liblrzip, meaning that my work there will continue to be unused. The upside is that libarchive will be able to build lrzip support without needing to check for a valid lrzip installation.
In closing, fuck everything about cnp in ELM.
by noreply@blogger.com (discomfitor) at August 26, 2011 08:14 AM
There is something annoying with the Illume profile, you can’t switch from a window to another easily. Well you can, but you need to use the illume soft key module, and cycle between windows. This module works great but it takes too much place on the screen, specially for small devices.
On a regular desktop, you can use the so beautiful jefdameth’s comp-scale module, and the exposé mode. But it doesn’t works well on illume profile, so i decided to add this windows list directly in Elfe. It uses the composite module (in gl/gles of software mode). So if you are not running a composite desktop you can not use this effect. to use it you have to bind an Enlightenment action to it. In the demo below, i choose to bind the Edje Top screen bindings to launch this effect.
And here the demo :
www.youtube.com/watch?v=jKn4VyEFUQs
by captainigloo at August 25, 2011 08:58 PM
I had the pleasure to attend the DesktopSummit 2011, a great event that happened in Berlin from 5-12 of August 2011. As I’ve mentioned in an earlier blogpost my focus was to highlight Enlightenment’s opinion that performance matters and that we need broader standards in freedesktop.org. Of course I explained a bit about our history and the current status of E17. The presentation file can be downloaded here.

All in all the event was great, not just due the talks but mostly due the friends and side-talks. Being at these events for a few years I managed to know lots of people from different projects. Not being in a major side (read: KDE or GNOME) I have the gift of free-transit among these fields… which is pleasant as I can gather ideas from both. [There is no hard or official barriers between them, but the psychological blocks peers from talking to each other and this is quite bad]
I came there sponsored by my company (ProFUSION embedded systems) to represent the system that provides a big bucket of our consulting, training and development services: Enlightenment. I had the pleasure to engage into endless conversations with Enlightenment developers and community leaders (Cedric, Boris, Michael, Philippe…) We discussed a lot how we could broader EFL usage, bring more users, lower the barrier to new developers with easier to use tools and languages and of course how we could get Raster to release E17.
I also tried to learn from other people of technologies as well. Before I was an Enlightenment hacker I did use and develop with Qt/KDE and already knew some icons such as Aaron Seigo, Thiago Macieira, Helio Castro and Sebastian Kügler, which I managed to meet again. Of course my ex-coworkers at INdT and KDE fanatics Artur Duque de Souza, Renato Chencarek were there. And I was introduced to Daker Fernandes Pinheiro, from INdT. We discussed QML, Qt, MeeGo and lots of optimization and API designs. Quite productive!
Being part of Maemo since 2006, attended some GUADEC and hacked Gtk/GNOME for fun and work I got to know some icons there as well. I’ve talked to Lennart Poettering, Marcel Holtmann and Marc-André Lueau, people that I’ve worked together in a way or another and that are always open minded to discussions. I’ve also touched base with some people like Lucas Rocha and Zeeshan Ali. It is interesting to know what these guys are doing for Linux Desktop (and mobile) infrastructure and their vision for GNOME.
My presentation went quite well, I was bit anxious and nervous in such a huge room that held it, but I guess people understood the history of Enlightenment, why we created the “Foundation Libraries” (instead of using Gtk or Qt), our special care with performance and why it will always pay off. I did some heavy critics to FreeDesktop.Org that generated positive feedback from Thiago Macieira (Qt/KDE) and people from other desktops (XFCE/LXDE). Last but not least I’ve made it clear Enlightenment has serious problems to manage community, we’re quite bully, and did thank the guys like Philippe Caseiro and other french dudes that are trying to solve this issue.
All in all a great event, with great people! Looking forward to be in next desktopsummit as well!
by Gustavo Barbieri at August 23, 2011 06:39 PM
The first Embedded Systems Conference Brazil was held at São Paulo on 24 to May 25 2011 and ProFUSION was there to do a technical talk.
Our contributor Lucas De Marchi proposed the talk “Usando Linux como Sistema de Tempo Real” (Using Linux as an Real Time Operating System). He did his master thesis on that topic for 2 years at Politecnico di Milano, so he knows a lot about the topic.
Unfortunately Lucas is one of those geeks that try to live a real-world life and plays football (soccer for americans) and in the week before he broke his foot… Ouch!
So yours truly was elected to present the talk for him. I already did play with realtime Linux in the past and I knew the concepts from past experiences, thus I accepted the challenge and did the talk. According to the attendees it was a good talk!
People got amazed with Linux’s Real Time capabilities and the ability to mix it with regular (“fair”) tasks, being able to change a process from FAIR to RT during runtime, no recompile was needed! This was demonstrated in a Freescale’s i.MX31 running music player running with regular priority and ping flood and a heavy CPU task, the music skipped and it was clear the deadlines were not being met. Running chrt and raising the priority above Kernel Threads that handle interruptions immediately fixed the skips. We also ran a software oscilloscope at desktop that plotted the achieved deadlines and it confirmed what we were listening.
If you’re not aware, RT_PREEMPT is a patchset (from pre-git days, not a git tree called -rt) that Ingo Molnar and Thomas Gleixner run to improve Real-Time behavior for the Linux kernel. As concepts are tested and patches mature they are moved into mainline tree, benefiting everyone using it, even your desktop running PulseAudio now! The major trick of this work was to handle interruptions in Kernel Threads instead of immediately as it used to be. These threads are RT themselves at priority 50 and if you want you can have a regular user process thread at a higher priority and it will run before the kernel. This was the case with the pingflood, with a regular kernel the music could skip due kernel stopping the playback process to handle the network interruption.
Last but not least, if you’re not familiar with RT have something clear in your mind. Real Time doesn’t mean Real Fast. It just mean you have guarantees to execute things when they should and this is mainly done by means of a preemptive kernel. In some cases RT will turn things slower, as you may switch contexts more often due preemption, but you’ll know you’ll be on time (as opposed to batch processing). Linux being a General Purpose Operating System (GPOS) was not designed with such thing in mind, but it was successfully converted into one!
by Gustavo Barbieri at August 23, 2011 05:47 PM
I’m proud to announce LightMediaScanner 0.4.4 was released and I’d like to take some time to remind you of this awesome project
While 0.4.4 is no big leap ahead of 0.4.3 I’m doing this post more to make clear people that the project is still alive and it may be the right tool for you, particularly if you need fast media scanning on your desktop or embedded device.
Introduction (History)
LightMediaScanner (LMS) was born in 2007 during the development of Canola2 media player for Nokia N800 Maemo device. We did a previous try at media scanners for Canola1 and did learn a lot, that would be the foundation of LMS.
We had two major problems to solve:
- scan large amounts of media as fast as possible
- don’t mess with interactivity.
The first problem had more qualifiers, like the media being unreliable (broken files), be removed without prior notification (mmc removed when system was off), slow discs (sd/mmc), small amount of available RAM, low-end CPU and so on.
Traditional approaches were slow and would bring your device to unusable state for minutes, even after the scan process finished as they consumed too much memory that would swap your applications and services. They would also be naive with file scanning and would trash filesystem’s cache with useless data.
Existing Solutions Problems
At that time we had Maemo’s media scanner that was awful and Tracker was being developed to solve its problems. However Tracker was immature and had other focus, more like being fancy with new standards and trying to solve all the diseases of the world… while we need to be fast in some specific cases.
To highlight technical problems, let’s consider JPEG scanners. Everything one Media Player application would need is the title, author/artist, date, width, height, orientation and maybe geolocation. These are few bytes, particularly because Title and Author are missing in most cases. We should open the file, get these bytes, register these and close the file. Every system at the time used libexif to do so, however it would copy all the header to memory prior to scanning. Given that most files contain thumbnails in the header, it would mean useless malloc + read of around 10-50kb, to get dozen bytes and exit. This trashes the VM and disc. Moreover, some libraries would open the file themselves and would not fadvise as POSIX_FADV_DONTNEED, thus the filesystem would keep it in cache for further access that never happen! Similar situations existed for PNG, Mp3 and others.
LightMediaScanner Solution
We decided to go with a 2 process solution to avoid crashes and hang-ups on the main process. This would be safe and we could kill the slave process if it took too long to report on a given file. Later on we introduced threaded and single process scanning that would be useful in some cases.
We also had dynamic loadable plugins (shared objects) with the media parsers to be used given matching extensions. The plugins can be selected by the user at runtime. Yes, we would not scan every file with every parser, we did trust the extension as a way to save work and it worked fine, and fast.
The main process just scans the filesystem and pipes the files to the slave (thread or process). This slave would open the file, get the data to populate a structure to be written to database, then close the file and report back the progress. If the slave takes too long to reply or dies, it’s respawned with the next file in the queue.
The database uses SQLite3 and a configurable number of files are processed in one SQL transaction, thus we’d not hit the filesystem with writes that often. The database access is provided with helper functions that uses pre-compiled statements. However we only provide the insert/update methods, as the fetch (select) are up to the application to use (maybe using their own ORM framework).
Some metadata formats did not specify encoding (ASCII was assumed) and fallbacks can be applied with the charsets. It will use iconv in a priority list to figure out what works.
Just the Indexer!
LightMediaScanner is not a daemon-service, it does not talk DBus neither requires you to speak RDF or SPARQL. If you want, you can create one with it, but it does not provide this stuff out of the box. Basically you call it to check for media and then access the database yourself, using the SQLite3 directly or using some ORM, doing caches or not, it’s up to you.
The database tables are quite simple and try to provide common useful relations. It’s not designed to cover all weird cases in the world (like multiple artists per song or which lens did you use with your camera).
Using it!
Get the code from our GIT or use the release tarball, see http://people.profusion.mobi/cgit.cgi/lightmediascanner.git/. It uses standard autoconf/automake to build, so should be familiar to most developers.
It hard-depends only on SQLite3 and iconv (most libC ships with it). Optional dependencies are libvorbis, libmp4v2 and libflac.
You can call the scanner from C, C++ or Python using our bindings. Comprehensive example can be found at src/bin/test.c
References: previous post about lightmediascanner 0.2.0 release
by Gustavo Barbieri at August 19, 2011 10:19 PM
And Enna come back to Enlightenment SVN …. in a different way, with a different goal.
Enna was intented to be a mediacenter for home theater pc, with support of audio, video and music files. For a while it was hosted on Geexbox server, and it will stay there.
But this version is completely different. It’s named enna-explorer, the source code is based on enna mediacenter, as it took me a long time to have a good implementation of the virtual file mechanism (in my point of view) and I like my theme (almost).
So this version is intented to be a file explorer for phones and embedded devices, to be used with a touchscreen and use EFL of course. For now the theme is phones oriented, and doesn’t fit well on tablets.
But well it’s a first shoot, so please, be kind
Currently, enna-explorer is able to browse your hard drive and it uses Eio for that. You can remove files selected on the user interface. You can’t copy/paste yet but i planned to add this features soon.
There is still some issues in eio to have a full user experience, like displaying a progress bar during copying/deleting files. But it’s planned. (Cedricccccccc )
When you select a file, it takes the default program viewer to display it.
Enna-explorer is able to browse upnp devices, and uses gupnp for this purpose. For now you can’t display files of upnp shares.
NFS shares are automatically detected if they are already mounted, but you can’t yet browse them.
If your samba shares are mounted with fstab it should also detect them but you can’t browse them.
I know there is a lot of people that are using EFL tehcnos on embedded devices , i think about SHR guys, Bodhilinux guys … Please report bugs, and features you would like to see in it. And patches are always accepted !
And as people like screenshots, here it is :  Enna-Explorer
by captainigloo at August 17, 2011 12:45 PM
About 6 years ago I wrote a post about Evoak, reading it I noticed how bad my posting abilities are (not that Im good now either) because there was no exaplanation on what my goal was, it was a post of about the status of something and I suppose is difficult to valorate a milestone whenever you dont know the final goal. On that time I was really fascinated about the evoak concept but was scared of the amount of work it was needed given the Evas unstability and Edje emerge. How to code such a great idea when you know your work will be uselss two months later?
I used Evoak on my final project on the univserity, it was a real success and for me it was enviosining a different approach to the classic server-client we had on that time (and still now), X11. This topic might be taken care off on another post.
Six years later and a complete different set of libraries and tools I'm able to code again that idea. The responsible of such possibility is Ender. When I started creating Enesim, Emage and several other libraries my main goal was to actually replace some of the bits of the current EFL stack specially Evas, to be able to improve and advance with new and good technical ideas. From the current state of EFL I would say that both projects are riding its own road for now, who knows later ... The situation was that I was trying to create some kind of object system or better, a description system which will allow me to serialize properties and values easily, if I were able to create a toolkit/canvas library using only properties and values then the next step, that is, send those properties through the network, would be easy and the Evoak concept could rise again.
That moment has arrived. Everything is still on an alpha status (everything is just a proof of concept) but the idea is working. Right now, with Eon being a toolkit system with objects I can create and manipulate on a generic way (through properties, values and events) I was able to create such network bridge to serialize the widgets data through the network and create a server which shows those applications without any change. If you take a look on the ecore_remote backend of Eon and the eon_server application on the Enesim repository you'll see the actual implementation. This is a very good milestone on the idea I wanted to accomplish: bring Evoak back! :)
by turran (noreply@blogger.com) at August 14, 2011 07:00 PM
Another day, another project done. Liblrzip is the latest, a full API for the excellent LRZIP for which I wrote a build system way back in March. Straight to the code, here's a VERY simple example of a decompression app using the library: #include #include #include #include #include static const char *suffix_me(const char *file) { const char *p; static char buf[4096]; p = strrchr(file, '.'); if (p && (strlen(p + 1) < 4)) strncat(buf, file, p - file); else strcat(buf, file); return &buf[0]; } int main(int argc, char *argv[]) { Lrzip *lr; if ((argc != 2) && (argc != 3)) { fprintf(stderr, "Usage: %s file [outfile]\n", argv[0]); exit(1); } lr = lrzip_new(LRZIP_MODE_DECOMPRESS); assert(lr); lrzip_config_env(lr); assert(lrzip_filename_add(lr, argv[1])); if (argc == 2) lrzip_outfilename_set(lr, suffix_me(argv[1])); else lrzip_outfilename_set(lr, argv[2]); assert(lrzip_run(lr)); return 0; } Yes, I am too lazy to figure out the CSS to preserve whitespaces for indentation.
by noreply@blogger.com (discomfitor) at August 13, 2011 08:45 AM
Two months passed, and with them the documentation project sponsored by Samsung
came to an end. During this time, ProFUSION guys Jonas Gastal, Rafael
Antognolli, Gustavo Lima, Bruno Dilly, Flávio Ceolin and yours truly, covered
several aspects of the EFL adding documentation where it was missing, expanding
when it was not enough and writing examples of each component to help make
sense out of them.
A summary of what was done:
- Eina
- List and Inlist
- Hash
- Array
- Stringshare, strbuf and str
- Log, Magic and Error
- Iterator and Accessor
- File
- Tiler
- Eet
- Basic file operations
- Serialization of user structures
- Image saving and loading
- Evas
- Canvas functions, creation and basic handling
- General manipulation of Evas_Object's
- Functions specific to each type of object: Image, Text, Box, Table
- Smart Objects
- Map
- Size hints
- Ecore
- The main loop
- Timers, animators and pollers
- Threads pool
- Pipe
- File handlers
- Events, jobs and idlers
- Ecore_Con and Ecore_Con_Url
- Ecore_Evas
- Edje
- The entire C API (sorry, no Edc tutorials this time around)
- Emotion (Yes! It is documented now!)
- Creation, play and seek controls
- Audio controls
- Other media info
- Elementary
- Errr... a lot really.
- There's a widget list now in the docs with a preview screenshot of each.
A lot of good work has been done, but in no way this means it's perfect. It's
up to users and developers now to use these weird new things we were not used
to before (the docs, get it?).
Read them when you know what you want but are not sure of how to
use it. Browse them when you don't know what to use and discover a world of
possibilities (I'm getting a bit cheesy here).
And report back any problems. Things are not entirely clear? Something
documented doesn't match the program's result? Is that a bug in the
documentation or in the code? Just like any other piece of code written,
it will improve as people uses it and the rough edges get polished. The
project may have ended, but the work itself goes on.
by Sachiel at August 06, 2011 06:53 PM
It has been a while since my last post, and I have been extremely busy. There are no shortage of projects to waste time on, and today I'll be talking about one of them. Since a screenshot is best, let's start off with one:  This is a chat client that has been co-developed by Iván Briano (Sachiel) and me over the past month or so. It is still in the very early stages of work in terms of its UI, but it is very usable. Above you can see a screenshot of the client's contact list window and an empty chat window. The open menu is an early implementation of the status menu, and it allows the user to set the status of the account. The other component of the status menu is the status entry, which allows the user to set status messages; it can be seen at the bottom of the contacts list window.  This is another feature in development which uses a very unfinished Elementary widget called "gengrid." This widget allows a developer to autogenerate a grid view of objects. This view is toggled from a menu, and can be switched to at any time. As I mentioned, this widget is not very polished, and so it does not look as good as the list view :)  Here we see a shot of the chat window, where I am in a deep conversation with Leif Middelshulte (T_UNIX). Since XMPP allows its clients to connect multiple "resources" (devices) to the same account, this client allows for users to determine exactly which resource, or all of them, will receive messages. By default, it will abide by the priority value set by other users' clients, but if I click on this radio button in the menu, Leif will suddenly be receiving a lot of SMS on his phone! One of the biggest strengths of the EFL is its integration with media. This next shot showcases what is, IMO, the best feature that this client offers:  Any time an image is linked in conversation, its URL is automatically parsed. This URL is then downloaded and cached to be made available as a tooltip on mouseover of the address, as seen above. Any images downloaded using this mechanism are automatically saved to disk using their SHA1 hash, preventing them from being downloaded again in the future and saving bandwidth. We hope to provide similar effects for other types of media as well! One might ask what libraries I have used to power this client. The following is a list of all components involved: Non-EFL technologiesThe insanely fast PugiXML parser. I use this in all of my projects involving XML because of its amazing speed, concise API, and very friendly+helpful author :)LibB64. If it uses base64 encoding, you'd better be using this or you're just wasting memory and CPU cycles.EFLECORE: The networking API here makes connecting to XMPP servers a snap, and it also handles the STARTTLS mechanism of the protocol with ease.Elementary: The EFL widget toolkit. Despite being under heavy development and containing lots of potentially unwanted "features," ELM still packs a punch and gives the developer a lot of freedom and control over how an app looks, feels, and acts.This client is not yet available in the public E svn repository, but it is LGPL licensed and will be moved there once it is ready for public use. Keep your eyes peeled!
by noreply@blogger.com (discomfitor) at August 01, 2011 12:21 PM
I've branched e-tiling v0.5 on github.
What is it?
It's a tiling module for enlightenment.
I've done a quick video to introduce it:
Presentation of E-Tiling
On the video, you may have noticed that windows are added on the right (not on left as is wrongly written).
Features
- tiling :)
- swap windows
- "Go To" feature
- moving windows around
- moving transitions to resize windows
As you may have seen, it's possible to add a column by moving a window on the right border of the screen.
Keybindings are currently set to use the home row of your keyboard as much as
possible, hence a, s, d, …
Quick technical note
I use compositing in order to have transparency support for the animations. I
also disabled shadows on popups.
TODO
It's not finished yet.
Here's what I plan on adding:
- choice whether to display window titles; currently it's hidden.
- stack on rows or on columns
- make sure it works fine on many screens since I haven't tested it
- have different animations whether transparency is available
- improve ICCCM support
- choice on how to identify windows
- remove bugs :)
Edit
There are still some bugs when reloading enligthenment or when changing
configuration.
I hope to fix them soon. I will update this post when done.
Edit #2
Those bugs are now hopefully fixed.
July 17, 2011 10:00 PM
While browsing levitated.net which
is an interesting site with lots of original flash animations, I stumbled
across Invader.fractal.
I wanted to make the same as a wallpaper for enlightenment.
A bit of code
I've put all the code on
github.
In order for the wallpaper to be fast and use low ressources, I decided to
have an evas smart object used inside an edje external module.
That module is then used in a very small edc file making it a background
usable by enlightenment.
In order to draw a 7x7 random eenvader, here's the code:
| #define FG 0xff839496
uint16_t u = rand();
int *mem = calloc(7 * 7, sizeof(int));
for (int i = 0; i < 15; i++) {
if (u & (1 << i)) {
mem[7 + 7*(i/3) + 1 + i%3] = FG;
mem[7 + 7*(i/3) + 5 - i%3] = FG;
}
}
|
I let my C compiler unroll the loop and optimise the code for me.
What does it look like?
I use colors from solarized.

And if you click and kill the big one on the left, here's what you get:

The wallpaper is refreshed every 30 seconds.
June 14, 2011 06:49 PM
I've implemented the qlocktwo for use as an
enlightenment wallpaper.
I've committed it on the enlightenment svn.
It looks like that:

As you can see in that screenshot, the letters do not have the same size. I
hope to fix that bug soon.
Ps: If you want to buy me a qlocktwo, feel free to contact me :)
June 14, 2011 06:49 PM
The Enlightenment Foundation Libraries has several bindings for other languages in order to ease the creation of end-user applications, speeding up its development. Among them, there’s a binding for Javascript using the Spidermonkey engine. The questions are: is it fast enough? Does it slowdown your application? Is Spidermonkey the best JS engine to be used? [...]
by Lucas De Marchi at June 14, 2011 05:25 PM
Hi all,
After a while not even opening my blog, yesterday I did two posts. While the administrator interface seemed fine, readers quickly notified that it was showing lots of spam in the regular view which I confirmed using Chromium’s private browsing. Investigations led to dozen administrator accounts in WordPress database, then I decided to reinstall from scratch. Unfortunately yesterday was a busy day and I could barely stay at the computer to do so.
Anyway, this morning I restored my blog and I’ll try to keep it updated I also changed the comments rule, instead of requiring people to register, I instead opted to close comments after 14 days, since most spammers seems to look for pages with reasonable pagerank and new pages do not have them that soon.
by Gustavo Barbieri at June 03, 2011 04:32 PM
Hi all,
After I started on twitter and facebook the blog posts reduced a lot… anyways I’d like to mention I’ll attend DesktopSummit 2011 in Berlin to represent the Enlightenment (aka E17) team and thus an alternative view to the traditional GNOME x KDE.

Fortunately I have couple of friends in both GNOME and KDE so I can express our E17 voice without being ignored (at least immediately ;-P). Dunno if it’s me or E17 being the underdog, but people don’t feel afraid to listen to our ideas and they even try to incorporate those that make sense, like Enlightenment’s Edje that resulted in QEdje that in turn resulted into QML that boosts Qt development these days.
My focus will be:
- performance matters: even if you have a fast hardware today and an even faster hardware tomorrow, you should care about performance. I’m not talking about neat picking premature optimizations, but to design platforms and standards considering performance. It’s often not harder, just need to be considered from the beginning. What bugs us most is the stupid freedesktop.org thumbnail standard, that forces use of PNG even if most of our pictures are in JPEG, causing slower thumbnailing time, bigger disk footprint and slower load times. Second in the list is the traditional abuse of XML, praised years ago and suddenly GNOME realized it was a bad idea (given GSetting/DConf), but it’s deeply inside our desktops with fontconfig and others (want faster application load times? Don’t use XML.);
- Broader Standards: A standard must be thought outside the “I’m implementing it for myself” scope. Similar to above, we should consider broader standards and not get a piece of GNOME or KDE and say it’s a standard. Freedesktop.org fails to get standards because of this stupid approach. See the last flamewars around simple topics as the systray replacement. Actually the systray standard is a well known bad example, people wrote it like if GNOME was the only way to do this. Enlightenment officially ignored this standard due stupid bugs with XEmbed specification and approach (as EFL uses the “windowless widgets” for a while, the XEmbed made no sense and caused user experience problems);
- Embedded is the future. Okay, it will be a DesktopSummit, but as Rasterman predicted in 2002 the desktop game is unlike to be changed from Microsoft dominance and we better look for new fields where we can compete equally. Given Android, WebOS, Maemo, MeeGo and others, it’s clear that Linux does dominated the mobile world. With appliances (from TVs to DVR to Refrigerators) being dominated for a while (after the embedded cpus got more powerful, most embedded OS got replaced with Linux). Thus together with performance we must not restrict ourselves to the keyboard-mouse-X11-big-screens approach that we used before. This is not just about scalable (as in multiplication) GUI as people believed SVG would help, but we need different GUI for different environments and our toolkits and infrastructure have to help with that… something that Apple is currently doing quite well with their iOS UI toolkit providing universal applications that run optimized on both iPad and iPhone/iPod.
If you’re also attending this summit, let’s meet there and have some beers.
by Gustavo Barbieri at June 02, 2011 03:36 PM
After a few months, we are pleased to announce the 1.0.1 release of the
core EFL libraries (With the exception of Eet at 1.4.1). This is a bug
fixes only release on top of the previous 1.0 release. Only libraries
that require bug fix are being released (Embryo stay in 1.0.0 as no bug
where reported on it). For new shiny feature, you will have to wait a
little bit more.
The following libraries have been released:
You can download the respective libraries from our
Download Page.
Or checkout the 1.0 branch with subversion revision r59661.
For applications and bindings compatible with this release, take a look at
this snapshot.
by cedric.bail@free.fr
(Cedric Bail
) at May 25, 2011 07:11 PM
I’m migrating the game Nines Time from github to our beloved svn repository. Tonight, finally, I had time to fix the last 2 known bugs and substitute an image for something a bit less fugly. My hope is that, being there, more people will notice its existence, using it like an example of python bindings usage, will play it, and (who knows) maybe contribute to make it better.
Nines Time is a game about digit 9 tyranny over the other digits. You are a 6 undercovered for years studying the 9s and providing information for your HQ so you could stop them, but your arms fail after years of handplant and you need to survive for 9 minutes until your pals rescue you. What’s your weapon? Math, dude! You need to operate the number trying to get you.
It started as an entry for last month PyWeek, as jprvita already mentioned on his blog, when I “worked” with him, acidx and antognolli. Actually, it was more about fun than anything else. Using efl python bindings is really straight-forward. If you’re interested on the development process during the challenge, there’s a diary.
Some people complained about the chosen music. It’s Priya’s Journey fault for not recording anything so far
Check out right now and enjoy:
svn co http://svn.enlightenment.org/svn/e/trunk/GAMES/ninestime

by bdilly at May 13, 2011 02:17 AM
I was recently informed that Azy has competition as a web service framework in C. The initial announcement for the other project seems to be here and the source on github here. For those too lazy to click, it's called "Raphters" and stands for: Resources include things served up to clients like a database or API.- Actions provide ways to interact with a Resource.
- Processors transform data.
- Handlers provide the entry point for a request.
- Templates render data.
Upon examination, it seems that RAPHT is a library which allows you to take small bits of pseudo-code and turn them into regex handlers for http requests. If a match is found for a request, it gets passed off to a handler which creates linked lists of both headers and response text which eventually get printfed to stdout and are then picked up by fastcgi for all the socket and network handling. In a word, "neat." Assuming you have fcgi running, your web services get scaled down to a series of macros with corresponding add() calls for each one. This reduces planning/coding time considerably and allows you to easily implement a simple web/rpc server. There do seem to be a number of features still missing: - No general callbacks for client connect/disconnect
- No way to set HTTP response codes other than 200
- Inability to support binary data transmission
Additionally, RAPHT requires synchronous execution around the fcgi loop, preventing use with any kind of main loop to handle events/jobs. As it uses CGI, it must spawn processes to handle requests even if the number of such processes is greatly reduced through the use of fcgi. Perhaps the biggest downfall of RAPHT is its naive O(n) regex matching system. For each type of method (GET, POST, etc), it tries to regex match against every single service of that type. This means that every URL has its own regex and every RPC method has its own regex. For a server with very few services that is not a problem, but it is definitely not scalable. Azy has none of these shortcomings, but the biggest benefit that it has over RAPHT (imo) is the ability to simultaneously generate client bindings (in C) for all of your server web services. This means that for zero additional effort, you get conversion functions for the structs that you use and functions to send those structs to your server, allowing you to save considerable time implementing a client. I don't really have a closing to this, so instead I will post this picture:
by noreply@blogger.com (discomfitor) at April 15, 2011 03:27 AM
I have documented the installation of e17 and several EFL apps on MacOSX, using XQuartz (Apple's X11 implementation) and a standard OS environment without Fink or Mac Ports installed. It is built with svn source code of March 2011 with no OS-specific patches needed. The instructions also describe minor patches needed to compile the very latest svn source code. Requires MacOSX Leopard (10.5) or Snow Leopard (10.6), the latest XQuartz distribution, and the latest XCode development package from Apple.
The page is here: http://trac.enlightenment.org/e/wiki/MACOSX
Please test and report any problems.
Click on the Comments link to see a screenshot.
The installed EFLs are: eina, eet, evas, ecore, embryo, edje, efreet, e_dbus, elementary, ethumb, epdf, eio, enlil, libeweather, emotion
Working EFL apps include: e17, ephoto, enki, enjoy, envision, eyelight, e_phys_demo, econcentration
Known issues:
I am investigating problems with the compilation of enna
I am investigating a MacOS-compatible hardware abstraction layer to use with eeze (hal, udev don't work with Darwin)
I am investigating very minor runtime issues in e17
Of course any help is welcome.
If there is sufficient interest I will create a binary installation packages for MacOSX.
by daveray at April 04, 2011 07:12 AM
“There is no better tool to debug than printf()”
– Latin proverb from an old Chinese man.
That’s what every programmer knows. Despite interesting tools like profilers, debuggers and other tracing tool, for a reason or another we often resort to good old printf(). The logic behind this is quite simple: it’s available everywhere and have no impact on performace (mostly, on both cases — don’t be picky!), yet it allows you to check out if your program flow is as you expected and if not, what’s happening. The bad part, of course, is that it’s invasive and cumbersome to type, often introduces errors by itself (come on, raise your hand if you never ever wasted hours debugging to notice that the bug was in the debug message!)
GDB and some tools like ltrace or GLibC’s latrace are not always available, particularly on embededd systems they may be available but almost unusable. I hit that in the past weeks during some debugging on an old MIPS where I had to investigate why my supposedly correct program did not work, but a proprietary one did. Documentation is almost inexistent and makes you more clueless than not, thus I had to compare what we were doing differently.
At first I started doing an old trick to create a shared library to be $LD_PRELOADed on my own that would log what was being called, then dlopen()/dlsym() the actual symbol, call it, then log again, then return. I did it for a handful functions, some I even printed out structure members and although it worked, soon I got bored and hit by the laziness that most programmers have: I must make this automatic. Liblogger was born.
Liblogger is Python program that will parse a C header file and generate a source file that does exactly what I described above: log entrance, call the actual function and keep its return value, then log exit, then return the value. That’s the basics this single-file without external dependencies do. This source file can then be compiled into a shared object or into the final application.
Of course I wanted it to be as helpful as possible, so this first version already includes some nifty features:
- source file can be compile-time configured using CPP defines to produce colored, thread-safe, timestamped (gettimeofday, clock_gettime), indented (nesting level) output. This output can go to stderr or some given file;
- generates makefile for you, creating most of aforementioned variations by default. Just pick the one you want to use and LD_PRELOAD it;
- generate types file with all parsed enums, structs, unions and typedefs;
- generate formatters file with custom functions to print out known enums, structs and unions. No more copy + sed on the original structs to produce
printf() statements manually!
- will keep
errno intact so functions that rely on it will work as it will not be reset by fprintf() calls;
- can be compiled in a thread-safe way, doing locks around
dlopen(), dlsym() and the log FILE* to keep messages atomic. It will also keep the indentation level per-thread and print out thread ids (if not main thread);
- Behavior is completely controlled with a INI-style configuration file. It can (check for more at README.txt):
- tell the parser tokens to ignore;
- filter (positively/negatively) functions to log;
- specify type formatters you want to use. Couple are provided for basic C types, and you can request it to generate custom formatters for parsed types as mentioned above;
- specify return value checkers you want to use. Couple are provided, including one that checks for errno and logs the value as a string;
- if types of parameters and return are safe to be used by formatters, this can be used at various levels to provide black-white lists for these and keep it useful and safe;
- special handling of return (output) parameters, their values can be dereferenced and printed out after the actual function is called;
Usage should be pretty straightforward but I distribute two examples, one for dbus and another for jpeglib. Part of the dbus example is reproduced below:
[global]
headers = dbus/dbus.h
overrides = formatters-%(header_name)s.c
# regular expression for all defines in dbus-macros.h
ignore-tokens-regexp = (DBUS_MACROS_H|DBUS_BEGIN_DECLS|DBUS_END_DECLS|DBUS_BEGIN_DECLS|DBUS_END_DECLS|DBUS_DEPRECATED|DBUS_DEPRECATED|DBUS_DEPRECATED|DBUS_EXPORT|DBUS_EXPORT|DBUS_EXPORT|DBUS_EXPORT)
[type-formatters]
DBusHandleMessageFunction = %(prefix)s_log_fmt_pointer
DBusFreeFunction = %(prefix)s_log_fmt_pointer
DBusHandleMessageFunction = %(prefix)s_log_fmt_pointer
[safe-formatters]
DBusHandleMessageFunction = true
DBusFreeFunction = true
DBusHandleMessageFunction = true
# be pedantic about safety, let's specify all strings independently
[func-dbus_message_new_method_call]
parameter-bus_name-safe = true
parameter-path-safe = true
parameter-interface-safe = true
parameter-method-safe = true
call:
liblogger.py \
--config dbus.cfg \
--makefile Makefile.dbus-connection \
--makefile-cflags "\`pkg-config --cflags dbus-1\` -I." \
--custom-formatters formatters-connection.c \
/usr/include/dbus-1.0/dbus/dbus-connection.h \
libdbus-1.so \
log-dbus-connection.c
make -f Makefile.dbus-connection
LD_PRELOAD=./log-dbus-connection-color-timestamp.so d-feet
by Gustavo Barbieri at March 09, 2011 09:38 PM
I received some very positive comments on my Mountain Angel piece and some people asked me how I did it, how I approached the complexity of the piece. It is indeed my most complex piece to date – I considered everything very carefully, asked a lot of professional artists for advice and opinion, really did my best. And it was my first piece to do “the right way” – with initial value, composition and color studies and all that.
Ideation and reference photographs
A lot of my ideas hit me when I least expect them – in the shower, when I go for a walk or when I’m just daydreaming in a coffee shop. This one was no different. It was maybe a week or two since I got the news of my friend’s death and I remember I was still working on my portrait of her. I was browsing through the photographs of her I have on my computer and when I saw these two, the idea just got in my mind.
 
The photographs were not taken by me, but by another friend of her’s named Sasho. I don’t know the guy personally, but the credit here goes to him.
At first my idea was a bit different – I was thinking about classical angel wings (with white feathers), I didn’t consider to paint a bird (or anything else but her and an environment) and wasn’t sure about the background – if it’s going to be night or day, or sunset. I even thought about a more sci-fi/fantasy environment with two moons and a purple sky with bright stars.
Defining the idea
Having a rough vision/idea of what I want is what is most important, I think. As long as I got that, I’m fine, I can just sit down and define it in my sketchbook. So how and why did I come up with the idea of the wings? Well, my main inspiration was actually a character from the Diablo video game, an angel called Tyrael:

One reason to go with this wings is… well, they are cool and different. I like different (sometimes). The other reason is much more pragmatic: lighting.
I had to go with the lighting on this picture – first, because I liked it – it defined the facial features of the model quite well (in contrast with the second photo, where flash was used, flash always makes photos look flat). Second… well, I’m not good enough to change the lighting on a photo and keep a good likeness with the model. I think very few people can actually do this well. So I needed a way to explain this particular lighting in the piece. If I went with the classic bird wings idea, they would put shadow all over her face. While with this fancy and glowing wings I can: 1) explain the light source on the left part of her head; 2) paint waving hair on her right – that would explain both the shadow on her face and the rim/bouncing light on her features and the edge of the face – hair is transparent and soft, so light would come through it.
So all of a sudden the thing started “working” and I got encouraged to continue.
Value and color studies
I think this is the first time I actually did real value and color studies for a piece – I wanted to clear the idea as perfectly as possible. I knew things will change eventually, but I didn’t want to just paint stuff randomly, then erase what wasn’t working, then repaint. I really wanted this piece to be perfect. Eventually, I did maybe about twenty value studies and about twenty in color.
With value studies I tried to see how I’m going to make the viewer first see the girl, tried to see whether the wings are too overpowering, to see how I’m going to “guide” the eye of the observer through the painting.
 
As you can see, this studies are very rough – all I need at this point is to know where to place what, the pose of the model and most important of all – the values in the picture. What value should be the dress, and if it is say, the lightes value (a white dress), would it fit with the skin (which is also a light value) and the rest of the environment? What’s the value of the foreground hilltop she’s sitting on compared to the hilltops on the background? I didn’t need any details in here – that’s just pure design. It also helped me to define my idea even further – I had this crazy vision of the eagle to be all made of light/magic and to emerge from her wings. And the reason why I chose this horizontal format is because i wanted to give the painting a more cinematic, epic feeling.
Eventually I went with a more down to Earth picture with a real eagle. The red color is usually a middle value and fitted nicely with the rest of the image (against the very bright value of the wings and the dark of the rocks the angel is sitting on). It’s also the color of passion and always manages to attract attention – just like what my friend was. A truly passionate person.

The painting process
So after I’ve done all this preparations and design decisions, I started painting. The biggest problem I faced was the anatomy of the model, since I had to do the stretched arm and her leg/foot from imagination. I took photos of myself and asked friends to take pictures of themselves posing in similar poses.

Here’s my ex girlfriend posing for me on her webcam while I’m doing quick sketches.
Eventually I ended up with arm from my ex girlfriend, hand from another good friend and a foot from on of my flatmates. I had to adjust them to fit the angel and make them her’s. A hard task for my skill level, indeed… so I made some horrible mistakes, like a way too long arm, huge foot, etc. When you look at a painting for a very long time you just don’t see the mistakes… Now I just laugh at myself for not seeing them, they’re so obvious. See for yourself:

At some point I also made another crucial mistake: I stopped looking at the reference images… Somehow. I just got so much into it. So i lost the likeness a little bit.

The shape of the hair against the shape of her face is quite wrong. Also her cheeks are way too big.
Another funny thing is the arm – a lot of people, including some pro artists somehow didn’t notice it was too long… I don’t know how that happened. So I had to change this when the piece was near complete.
Finally, I had to also change the position of the eagle – it’s initial pose suggested it would land on her arm… Which considering the size of the bird doesn’t make much sense (it would literary crash her arm). So the eagle was repainted from scratch.
 
Finishing touches
After I made those critical changes, all I needed to work on was the wings, add more detail, work a more on color mixing around the image and make everything fit. Here’s the almost-final image without the finishing touches:

And again, the final picture:

Final Thoughts:
I really did my best with this piece. I wanted it to have a little bit of drama, I wanted it to have a certain feeling to it, and I’m glad that in the comments I got people have notice just this – the emotion.
As far as symbolism goes – the golden Ankh on her neck- an ancient symbol of eternal life, for I will do my best in the future to make her immortal through my work, with all the abilities I posses. Again, the striking red dress symbolizes her passion, the flame in her eyes. The eagle symbolizes freedom, while pose of her hand and fingers are very much inspired by The Creation of Adam by Michelangelo – just a suggestion for her divinity. The mountain environment is because the Mountain was where she felt alive the most and where she died (in an accident while climbing).
I hope you enjoyed the piece and reading about it’s creation process.

by admin at March 03, 2011 02:28 PM

(click on the image for larger version)
It’s been one year since the world lost Radi – the girl who had more than everything I could ever want.
She died in the mountains – her greatest passion, the place she felt alive the most.
Now she’s my Mountain Angel. Rest in peace, baby.

by admin at March 01, 2011 05:14 AM
There are no translations available.
Listen events on a object which is in a container
| test.edr |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
externals { external: "elm"; }
collections {
group {
name: "main";
parts {
//here we have a box with a button inside
part {
name: "box";
type: BOX;
description {
state : "default" 0.0;
rel1.relative: 0.0 0.0;
rel2.relative: 1.0 0.1;
}
box {
items {
item {
type: GROUP;
source: "bt_in_bx";
name: "bt_bx";
align: -1 -1;
}
}
}
}
//here we have a group with a button inside
part {
name: "group";
type: GROUP;
source: "bt_in_group";
description {
state: "default" 0.0;
rel1.relative: 0.0 0.9;
rel2.relative: 1.0 1.0;
}
}
// A red rectangle.
// When we click on the button which is in the box
// we hide the rectangle.
part {
name: "red_rect";
type: RECT;
source: "bt_in_group";
description {
state: "default" 0.0;
color: 255 0 0 255;
rel1.relative: 0.0 0.7;
rel2.relative: 0.5 0.8;
}
description {
state: "hide" 0.0;
visible: 0;
}
}
// A green rectangle.
// When we click on the button which is in the group
// we hide the rectangle.
part {
name: "green_rect";
type: RECT;
source: "bt_in_group";
description {
state: "default" 0.0;
color: 0 255 0 255;
rel1.relative: 0.5 0.7;
rel2.relative: 1.0 0.8;
}
description {
state: "hide" 0.0;
visible: 0;
}
}
}
programs {
//listen "clicked" on the button which is in the box
program {
name: "in box";
signal: "clicked";
//we need te use '\\' before '[]' because we can
//use regular expression in a source
source: "box\\[bt_bx\\]:bt_in_bx";
action: STATE_SET "hide" 0.0;
target: "red_rect";
}
//listen "clicked" on the button which is in the group
program {
name: "in group";
signal: "clicked";
source: "group:bt_in_group";
action: STATE_SET "hide" 0.0;
target: "green_rect";
}
}
}
//macro to create a button
#define button(_name, text, icon) \
group { \
name: _name; \
parts { \
part { \
name: _name; \
type: EXTERNAL; \
repeat_events: 0; \
source: "elm/button"; \
description { \
params { \
string: "label" text; \
string: "icon" icon; \
} \
} \
} \
} \
}
//both buttons
button("bt_in_bx", "bt in box hide rect red", "close");
button("bt_in_group", "bt in group hide rect green", "close");
}
|
by jonathan.atton@gmail.com (ATTON Jonathan) at February 26, 2011 12:25 PM
There are no translations available. Azy and esskyuehl are two libraries written by the company http://www.zentific.com/. The aim of azy is to easily create a communication process between a client and a server like a webservice by using a RPC. The job of esskyuehl is to execute a sql query asynchronously.

Azy and esskyuehl are not really a part of the EFL project but use and are used by the EFL and are available in the official e-svn and from the zentific svn (only Azy currently) : http://svn.zentific.com/branches/azy
Generally in a webservice the server part will have to save or data data to/from a database. A SQL query can be slow for many reasons:
- the query is complicate
- the database is overloaded
- the database is located at the center of the world
- You use sleep() because you like joke
See a bad webservice call:
- client send a request, example : "save this message"
- the server receive the request
- the server execute the sql query "insert into ...". This part can be slow
- the server respond to the client
If between the step 2 and 4, a second client ask something to the server, the client will have to wait during the server process the request of the first client. This is very bad.
One solution can be to use a thread by client but you can have some problems with this solution :
- data corruption between threads
- server overloaded by threads
- EFL are not thread safe, you will have to use hacks
The solution is simple: execute our query in a asynchronous way. All EFL are built on this method. During a query is executed, the server will process request from others clients. When the query will be finished, the server will respond to the client.
To do this we have two parts :
- we can suspend and resume a azy module. We suspend it during the sql query is processed.
- esskyuehl: this library is important because:
- it is a framework to access at many databases manager : MySQL, Postgress, SQLite and others.
- you can connect and execute a query asynchronously
Example
In this example the webservice will
- client will send a message to the server
- [Asynchronous] the server will connect to the database
- [Asynchronous] and then save the message (Insert Into ...)
- and then respond to the client
- finally the client will be closed
source file: azy_mysql.tar.gz
The database
We use MySQL.
- Database: tests
- Table: messages
1 2 3
|
CREATE TABLE `tests`.`messages` ( `message` varchar(255) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
Do not forget to set the USER and the PASSWORD in the file services.azy.
The client
The client source code is simple :
| client.c |
1 2 3 4 5 6 7
|
//send the message // msg=Demo_Message_new(); msg->msg = eina_stringshare_add("I love Dogs !!!!!"); ret = Demo_Message_Get(cli, msg, content, NULL); CALL_CHECK(_Demo_Message_Get_Ret); //
|
The server
The azy part
| services.azy |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
//This method is used by the server to save a message sent by the client //use a asynchronous call. This way the server is not blocked during the execution of the query ! Message Get(Message msg) <% printf("Store in database: %s\n", msg->msg); //create our data Test_Data *data = calloc(1,sizeof(Test_Data)); data->msg = msg; data->m = module; // //Esskyuehl Esql *e; e = esql_new(ESQL_TYPE_MYSQL); data->e = e; esql_database_set(e, "tests"); //connect to the mysql database esql_connect_callback_set(e, _connect, data); esql_connect(e, "127.0.0.1:" ESQL_DEFAULT_PORT_MYSQL, "USER", "PASSWORD); // //suspend azy (only the current call) during the treatment of the sql query //consequently azy can treat others client demand //when the query will be done, we will resume this instance azy_server_module_events_suspend(module); %>
|
Connect and execute the query
| server_code.c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
static void _callback(Esql_Res *res, void *data) { Test_Data *d = data; Azy_Value *v; Azy_Content *content; printf("Message saved!\n"); //disconnect from the mysql db esql_disconnect(d->e); //set the return value of the azy call //we return a copy of the message sent by the client v = Demo_Message_to_azy_value(d->msg); content = azy_server_module_content_get(d->m); azy_content_retval_set(content, v); // //resume the azy call instance azy_server_module_events_resume(d->m); //free our data free(d); } void _connect(Esql *e, void *data) { Test_Data *d = data; Esql_Query_Id id; //execute the query //the second argument is a data you can set and then retrieve it in _callabck() id = esql_query_args(e, d, "INSERT INTO messages values('%s');", d->msg->msg); if (!id) /**< queue up a simple query */ { fprintf(stderr, "Could not create query!\n"); ecore_main_loop_quit(); } esql_query_callback_set(id, _callback); }
|
by jonathan.atton@gmail.com (ATTON Jonathan) at February 15, 2011 06:53 PM
Hello people, as most of open source lovers I’m still trying to digest Nokia’s move to WP7. But although many are worried about the future of Meego or the Linux on mobiles, I’m quite confident.
First, as said before MeeGo is not just about Nokia or phones, it’s also being pushed as In-Vehicle Infotainment (IVI) and is already adopted by BMW, which you can see daily contributions on projects such as ConnMan. So let’s not assume it is the end of the world given Nokia’s action.
Second, although Android and WebOS are indeed Linux since they use this kernel, we often want more traditional user-space stack, like MeeGo would be. For those, don’t loose hope! Today (Feb14, 2011) we got a major announcement at MWC by LiMo: LiMo Foundation Unveils LiMo 4. It’s based on X11, WebKit, GNOME and… EFL!
Wait? Where do you see EFL in that announcement? You’ll have to check What is the LiMo 4 Platform? block diagram and see EFL is now a first class component at it, together with GNOME that was there since first release. Yeah, we surely could use better publicity at EFL side
The release is still just text and no code, which should be available by July2011, however you can get code straight from EFL SVN.
ProFUSION team is happy due our contributions to make this possible, after all we help with EFL and WebKit-EFL developments!
by Gustavo Barbieri at February 14, 2011 08:53 PM
My previous blog post about installing Enna on an Ubunu seems to interrest a lot of people if I refer at the website stats.
So I decide to write a new short tutorial about how to install Enna on Ubuntu, 10.10 this time.
An Enna package is present the 10.04 release of Ubuntu. But as you should already know Enna depends intensively on EFL’s. These libraries have not yet been released. I hope that we will have a good news in the comming week(s), but before distributions like ubuntu integrates EFL, they may be a while, and thus this kind of tutorial is not a waste of time in my opinion.
Enna is not yet ready for a new release, so if you want to give it a try, you have to build it from scratch. You have been warned  And as usual if you find bugs, you can send me patches. It’s more than welcome !
How to proceed :
Before compiling anything we will installed all the packages needed for the compilation of all these libs. I have update this list since the last time.
sudo apt-get install xterm make gcc bison flex subversion automake autoconf autotools-dev \
autoconf-archive libtool gettext \
libpam0g-dev libfreetype6-dev libpng12-dev zlib1g-dev libjpeg62-dev \
libtiff4-dev libungif4-dev librsvg2-dev libx11-dev libxcursor-dev \
libxrender-dev libxrandr-dev libxfixes-dev libxdamage-dev \
libxcomposite-dev libxss-dev libxp-dev libxext-dev libxinerama-dev \
libxft-dev libxfont-dev libxi-dev libxv-dev libxkbfile-dev \
libxres-dev libxtst-dev libltdl7-dev libglu1-xorg-dev \
libglut3-dev xserver-xephyr libdbus-1-dev cvs subversion mercurial \
liblua5.1-dev libavformat-dev mplayer libxine-dev libxml2-dev \
libcurl4-openssl-dev wget libexif-dev libsqlite3-dev libxine1-all-plugins libxine1-ffmpeg \
autopoint libudev-dev
I just added autopoint for the autogen.sh of ecore and enna and the udev developpement package for eeze.
EFL libraries :
For EFL’s compilation we will use Brian ‘morlenxus’ Miculcy script : easy_e17.sh
wget http://omicron.homeip.net/projects/easy_e17/easy_e17.sh
chmod +x easy_e17.sh
We need to change a bit this script to suit our needs.
edit this script with the editor of your choice and change :
line 28:
efl_basic="eina eet evas ecore efreet eio eeze e_dbus embryo edje emotion ethumb elementary"
And line 30 :
bin_basic=""
Save your changes.
This script will download, build and install EFL in /opt/e17 and set all environnement variable you need to execute an EFL binary.
Sources will be download in $HOME/e17_src.
execute the script with :
./easy_e17.sh -i
Compilation begins. Later if you want to update EFL you just have to execute
./easy_e17.sh -u
And only changes since the last check out will be compiled.
Gb libs
You need the HEAD version of GeexBoX libs. In the previous post the 1.0.0 version was enough but Mat has made interresting changes in these libs, and Enna depends on them.
create a new directory :
mkdir gb_src && cd gb_src
hg clone http://hg.geexbox.org/libplayer
hg clone http://hg.geexbox.org/libnfo
hg clone http://hg.geexbox.org/libvalhalla
hg clone http://hg.geexbox.org/enna
When EFL compilation is finished and succesfull, you can verify if all is working fine by executing : elementary_test
If something happens, congrats, EFL are correctly installed 
Ok, now GB libs. We will installed all libs in /opt/e17 as easy_e17 script do for EFLs.
cd libplayer
./configure --prefix=/opt/e17
make
sudo make install
cd .. && cd libnfo
./configure --prefix=/opt/e17
make
sudo make install
cd .. && cd libvalhalla
./configure --prefix=/opt/e17
make
sudo make install
cd .. && cd enna
./autogen.sh --prefix=/opt/e17
make
sudo make install
At this point you should launch enna.
You can run it with :
enna
The default theme is currently completly broke, so if you want to have something usable, you have to launch enna with the stb theme.
enna -t stb
Configuration
In previous version of Enna the configuration file was created in $HOME/.enna/enna.cfg. We try to follow freedesktop guidelines, and so are now using the $XDG_CONFIG_DIRS $XDG_DATA_DIRS.
The configuration is now saved in $HOME/.config/enna/enna.cfg
The libvalhalla database, fanarts, covers and all informations grabbed by libvalhlla are saved in $HOME/.local/share/enna/
The configuration is still created at enna startup.
To use the stb thme by default you can change the theme=default line in enna configuration by theme=stb in the [enna] section
Enjoy!
by captainigloo at January 23, 2011 10:03 PM
So, the second trimester just began and every student in my university had to choose one module – it could be basically anything, related to graphic design or not. Most of the students in my class chose illustration – that was the default one. I chose video development. Some people asked me why and I here I will explain.
The first reason is, I already have some decent skills in drawing and illustration, I’m already educating myself online in the arts. The skill level expected in the illustration module is below my own, so I expect that I wont learn a lot of new things and will be too easy. On the other hand I don’t have much experience with video editing in general and its a subject I find interesting. I will be challenged and probably will struggle to create things I (and my tutors) like. But that’s fine – if you’re struggling, failing and having a hard time, you’re doing it right.
The second reason is, I am a person interested in pretty much everything, and I have no intention at all at this point to go in one certain direction, to put myself in a box, so to speak. Some people are like this and that’s fine – “I want to be a logo designer, so logo design is what I do 90% of the time”. They become really good at the only thing they do and make a lot of money. But that’s not me – I want more than this, I want to explore, learn and become better in as many fields as possible. I learn new things even if I have no reason to do so. And well, one never knows – maybe video will really attract me and will choose to concentrate on it and make a career out of it later on.
The third reason for me not to choose the illustration module is… the illustration module itself. I believe the tutor went in the wrongest direction possible with this one. To understand why, just ask yourself the question “what is illustration”. I’ll answer it for you – it is essentially a drawing or a painting (very stylized, very realistic and everything in between), sometimes a photograph that tells some kind of a visual story. So yeah, Rembrandt and Caravaggio were also illustrators in a way, when they painted their religious paintings – they told people stories from the Bible.
Anyway, there will be no photographs in this particular module, it’s all drawings and paintings. Now, the problem is – there are no drawing classes. Last year we had something called a drawing class, but it was a joke and not even a funny one. Most people in the class can’t draw and paint. Even worse, some of them have no interested in this. That’s fine – I’m not saying that they should – but to illustrate things beautifully, to really do it well you have to have many hours of classical life drawing behind your back. To my surprise some people disagree with this – they think one can do good illustration with no drawing skills. And this is so wrong…
I challenge you to find me a professional illustrator, a really good one, dead or alive who doesn’t draw on a regular basis, who never did a classical life drawing. I dare you to find one. Or better yet – look at this illustration portfolio. And if you don’t have good drawing skills, just try to copy the illustrations there. Or to do something as good as the them. If you don’t have excellent drawing skills, there is no way in hell you can do it. The artists who made them are professionals and they draw every single day to get to this level. They know color theory, they understand lighting, proportion, spaces, anatomy, composition and they have worked very had for many years to achieve this, and they are still learning. Art and design are not things you learn for a few years – you never, ever stop to learn and study.
Now, of course sometimes some people can get some mediocre or decent results in illustration without being able to draw well. Sometimes it’s even “good enough” to get a one time illustration job. Some good icon designers have no drawing skills at all, but that’s different – a good icon is a good idea, aesthetics and a lot of psychology. Software nowadays is powerful enough to compensate if you can’t draw a perfect circle. But even then you have to have at the very least some understanding of perspective and lighting – otherwise it won’t work.
Also, some people might say that the goal of an illustration class in a graphic design course is different, is not to teach students to draw correctly, is to make students draw in some “illustrative style” that doesn’t require good drawing skills. I say this is nonsense.
Why? Because you either do things right or don’t do them at all. Otherwise you end up in a sea of mediocrity. And that’s certainly not something I want.

by admin at January 20, 2011 04:01 PM
I have not post for a while, busy by my work. But I continue working hard on Enna.
In the current 0.4.0 release, I’m not satisfied by the theme. Some people complained about the backgrounds transitions in the main menu when you select a new item. It’s slow on some hardware, especially on embedded card like the Beagle Board, where CPU and RAM ressources are low.
So I have decided to rewrite a new theme from scratch. You can find it in the source code, in the mercurial repository, in data/themes/stb. I called it STB, as I would like it fits well on Settop Boxes and on HD screens from 720p to 1080p resolutions.
Here some Screenshots of the current theme.
 Stb theme mainmenu
 Stb theme video infos
Stb theme disk infos
 stb theme music info
For the fonst, I’m using the Comfortaa font : http://aajohan.deviantart.com/art/Comfortaa-font-105395949. And icons comes from the Faenza gnome icons theme : http://tiheum.deviantart.com/art/Faenza-Icons-173323228
I Add some cool effects between mediaplayer and informations panel, thanks to the more and more powerfull Elementary library. And I plan to add more.
More work, is need to polish the UI, All infos are not yet well placed. But as you can see there is more informations than in the previous release. I had have to change a lot of code in the core, to achieve this goal, and for informations, libvahalla helps more than ever.The Informations retrieval is as usual entirely asynchronous, and on demand. So the database is created while you browse you disks.
I hope that you like this new UI.
See you soon.
by captainigloo at January 18, 2011 07:42 AM
There are no translations available. Azy is a library written by the company http://www.zentific.com/. The aim is to easily create a communication process between a client and a server like a webservice by using a RPC. Zentific need a asynchronous and scalable library, they was using libzxr (fork from libxr) but the library is synchronous and use Glib.

Azy is not really a part of the EFL project but use and is used by the EFL and is available in the official e-svn and from the zentific svn : http://svn.zentific.com/branches/azy (both are the same version)
Azy can works like a classic HTTP server and client. We will use it to create a client which will download a image from the server and then sent it to the server.
- Original file : initial.jpg
- Downloaded file : FILE_GET.jpg
- uploaded file : FILE_PUT.jpg
The source file : azy_dl_up.tar.gz
How to download a file from the server
We use the special method __download__. You can have only one __download__method, the namespace where you describe it is not important.
| services.azy |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
__download__
<%
const char *namespace = NULL, *action = NULL;
const char *p, *p2;
const char *path;
Eina_Bool ret = EINA_FALSE;
int iid = 0;
//retrieve a copy of the path, we will work on it
path = eina_stringshare_add(azy_net_uri_get(net_));
//first char of the path must be '/'
EINA_SAFETY_ON_TRUE_GOTO(*path != '/', error);
//then we retrieve the namespace, the action and the id
p = strchr(path + 1, '/');
EINA_SAFETY_ON_NULL_GOTO(p, error);
/* grab namespace */
namespace = eina_stringshare_add_length(path + 1, p - path - 1);
EINA_SAFETY_ON_TRUE_GOTO((!namespace) || (!namespace[0]), error);
p2 = strchr(p + 1, '/');
EINA_SAFETY_ON_NULL_GOTO(p2, error);
action = eina_stringshare_add_length(p + 1, p2 - p - 1);
EINA_SAFETY_ON_TRUE_GOTO((!action) || (!action[0]), error);
errno = 0;
iid = strtol(p2 + 1, NULL, 10);
//If we have no ID, the path id is invalid
EINA_SAFETY_ON_TRUE_GOTO((errno == ERANGE && (iid == LONG_MAX || iid == LONG_MIN))
|| (errno && (!iid)), error);
//print the result
printf("namespace=%s, action=%s, id=%d\n", namespace, action, iid);
//create the response, here we set the HTTP code 200 because everything is ok
azy_net_code_set(net_, 200);
azy_net_header_set(net_, "Content-Type", "image/jpg");
//
if(!strcmp(namespace, "Photo")
&& !strcmp(action, "Get"))
{
//here we should use the iid to retrieve the image
//in this example we always return the same image
const char *file = "./initial.jpg";
/*
we are gonna use mmap to set the image as content
*/
//copy the file content and sent it
int fd = open(file, O_RDONLY);
struct stat st;
fstat(fd, &st); /* use fstat to get the size */
unsigned char *content_file = mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
Azy_Net_Data azy_data;
azy_data.data = content_file;
azy_data.size = st.st_size;
azy_server_module_send(module, net_, &azy_data);
munmap(content_file, st.st_size); /* unmap mmapped data */
close(fd);
ret = EINA_TRUE;
//
}
eina_stringshare_del(path);
eina_stringshare_del(namespace);
eina_stringshare_del(action);
return ret;
error:
eina_stringshare_del(namespace);
eina_stringshare_del(action);
azy_net_code_set(net_, 404);
azy_server_module_send(module, net_, NULL);
return EINA_TRUE;
%>
|
The client is a bit more easy because we do not have to parse a url.
| client.c |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/**
* Yes we are connected !
*/
static Eina_Bool
connected(void *data, int type, Azy_Client *cli)
{
Azy_Client_Call_Id id;
//we ask the photo id to the server
azy_net_uri_set(azy_client_net_get(cli), "/Photo/Get/4");
azy_net_version_set(azy_client_net_get(cli), 0); /* disconnect after sending */
id = azy_client_blank(cli, AZY_NET_TYPE_GET, NULL, NULL);
azy_client_callback_set(cli, id, _get);
return ECORE_CALLBACK_RENEW;
}
|
| client.c |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/**
* This method is called when we have received the photo
*/
static Eina_Error
_get(Azy_Client *cli, Azy_Content *content, void *ret)
{
const char *FILEPATH = "./FILE_GET.jpg";
int fd;
int *map;
if (azy_content_error_is_set(content))
{
printf("Error encountered: %s\n", azy_content_error_message_get(content));
azy_client_close(cli);
ecore_main_loop_quit();
return azy_content_error_code_get(content);
}
//retrieve the size and the content
int size = azy_content_return_size_get(content);
unsigned char* data = (unsigned char*)azy_content_return_get(content);
printf("FILE RECEIVED\n");
printf("Write file in %s\n", FILEPATH);
printf("File size : %d\n", size);
//open the output file
fd = open(FILEPATH, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
//write at the end of the file in order to really create it.
lseek(fd, size-1, SEEK_SET);
write(fd, "", 1);
map = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
//copy the content into the output file
memcpy(map, data, size);
munmap(map, size);
close(fd);
//upload the received file to the server
_upload(cli);
return AZY_ERROR_NONE;
}
|
Now run the server and the client:
1
2
3
4
|
- watchwolf::19:38:26 [64] -> ./server
__Download__
namespace=Photo, action=Get, id=4
|
1
2
3
4
|
- watchwolf::19:37:51 [26] -> ./client
FILE RECEIVED
Write file in ./FILE_GET.jpg
File size : 92722
|
Finally we can use diff to compare both file
1
2
3
4
5
|
- /home/Watchwolf/Projects/test/azy_dl_up -
- watchwolf::21:49:35 [20] -> diff FILE_GET.jpg initial.jpg
- /home/Watchwolf/Projects/test/azy_dl_up -
- watchwolf::21:50:23 [21] ->
|
Nothing is returned, both file are identical !
How to upload a file to the server
We use the special method __upload__. As for the __download__ method, the namespace where you describe the method is not important.
| services.azy |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
/*
Methods called when azy receive a PUT HTTP request.
*/
__upload__
<%
const char *namespace = NULL, *action = NULL;
const char *p, *p2;
const char *path;
Eina_Bool ret = EINA_FALSE;
int iid = 0;
printf("__Upload__\n");
//retrieve a copy of the path, we will work on it
path = eina_stringshare_add(azy_net_uri_get(net_));
//first char of the path must be '/'
EINA_SAFETY_ON_TRUE_GOTO(*path != '/', error);
//then we retrieve the namespace, the action and the id
p = strchr(path + 1, '/');
EINA_SAFETY_ON_NULL_GOTO(p, error);
/* grab namespace */
namespace = eina_stringshare_add_length(path + 1, p - path - 1);
EINA_SAFETY_ON_TRUE_GOTO((!namespace) || (!namespace[0]), error);
p2 = strchr(p + 1, '/');
EINA_SAFETY_ON_NULL_GOTO(p2, error);
action = eina_stringshare_add_length(p + 1, p2 - p - 1);
EINA_SAFETY_ON_TRUE_GOTO((!action) || (!action[0]), error);
errno = 0;
iid = strtol(p2 + 1, NULL, 10);
//If we have no ID, the path id is invalid
EINA_SAFETY_ON_TRUE_GOTO((errno == ERANGE && (iid == LONG_MAX || iid == LONG_MIN))
|| (errno && (!iid)), error);
//print the result
printf("namespace=%s, action=%s, id=%d\n", namespace, action, iid);
//create the response, here we set the HTTP code 200 because everything is ok
azy_net_code_set(net_, 200);
azy_net_header_set(net_, "Content-Type", "image/jpg");
//
if(!strcmp(namespace, "Photo")
&& !strcmp(action, "Put"))
{
//save the image received
const char *FILEPATH = "./FILE_PUT.jpg";
//retrieve the size and the content
Azy_Net_Data *data = azy_server_module_recv_get(module);
printf("FILE RECEIVED\n");
printf("Write file in %s\n", FILEPATH);
printf("File size : %d\n", (int)data->size);
//open the output file
int fd = open(FILEPATH, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
//write at the end of the file in order to really create it.
lseek(fd, data->size-1, SEEK_SET);
write(fd, "", 1);
int *map = mmap(0, data->size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
//copy the content into the output file
memcpy(map, data->data, data->size);
munmap(map, data->size);
close(fd);
}
eina_stringshare_del(path);
eina_stringshare_del(namespace);
eina_stringshare_del(action);
return ret;
error:
eina_stringshare_del(namespace);
eina_stringshare_del(action);
azy_net_code_set(net_, 404);
azy_server_module_send(module, net_, NULL);
return EINA_TRUE;
%>
|
The client send the file
| client.c |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
//this code is closed to the code of __download__
const char *file = "./FILE_GET.jpg";
printf("Sending the file %s\n", file);
/*
we are gonna use mmap to set the image as content
*/
//copy the file content and sent it
int fd = open(file, O_RDONLY);
struct stat st;
fstat(fd, &st); /* use fstat to get the size */
unsigned char *content_file = mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
Azy_Net_Data azy_data;
azy_data.data = content_file;
azy_data.size = st.st_size;
//upload
azy_net_uri_set(azy_client_net_get(cli), "/Photo/Put/4");
Azy_Client_Call_Id id = azy_client_put(cli, &azy_data, NULL);
azy_client_callback_set(cli, id, _put);
//
munmap(content_file, st.st_size); /* unmap mmapped data */
close(fd);
|
Execute the server and the client. The result is the file FILE_PUT.jpg.
by jonathan.atton@gmail.com (ATTON Jonathan) at January 10, 2011 09:51 PM
There are no translations available. The propertie "tween" in Edje allows to easily create a animation with a list of images. We will create the animation of a explosion.
source : explode.tar.gz
We are doing all the work in edje.
| explode.edc |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
collections {
group {
name: "explode";
images {
image: "explode1_1.png" COMP;
image: "explode1_2.png" COMP;
image: "explode1_3.png" COMP;
image: "explode1_4.png" COMP;
image: "explode1_5.png" COMP;
image: "explode1_6.png" COMP;
image: "explode1_7.png" COMP;
image: "explode1_8.png" COMP;
}
parts {
part {
name: "explode1";
type: IMAGE;
mouse_events: 0;
description {
state: "default" 0.0;
//the part is not visible
visible: 0;
aspect: 1.0 1.0;
//the animation start and end with the image "normal"
//in our case this image is empty.
image {
tween: "explode1_1.png";
tween: "explode1_2.png";
tween: "explode1_3.png";
tween: "explode1_4.png";
tween: "explode1_5.png";
tween: "explode1_6.png";
tween: "explode1_7.png";
normal: "explode1_8.png";
}
}
description {
//the part is visible
state: "explode" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
}
program {
name: "start_explode";
//the signal "show" is sent by evas_object_show()
//consequently when the objet is show, this program is called
signal: "show";
//we set the part to the state "explode"
//when the part will be set the animation will
//automaticaly start
action: STATE_SET "explode" 0.0;
transition: LINEAR 0.5;
target: "explode1";
after: "end_explode";
}
//when the animation is finished we send the signal
//"end_explode" to the program
program {
name: "end_explode";
action: SIGNAL_EMIT "end_explode" "";
}
}
}
|
Use edje_player to display the animation. This program is available in the svn of enlightenment or maybe in your packages.
1
|
edje_player explode.edj
|
by jonathan.atton@gmail.com (ATTON Jonathan) at January 07, 2011 02:54 PM
There are no translations available.
Eet allow to save and load data easily.
File: eet.tar.gz
How to use EET to save data
Creating our data
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
//Describe a dog
typedef struct
{
const char *name;
const char *race;
} Dog;
//describe 2 list of dogs
typedef struct
{
Eina_List *dogs_I_have;
Eina_List *dogs_I_add;
} Dogs;
// Add a dog in the list
Eina_List *dog_add(Eina_List *l, const char* name, const char* race)
{
Dog *dog = calloc(1, sizeof(Dog));
dog->name = eina_stringshare_add(name);
dog->race = eina_stringshare_add(race);
l = eina_list_append(l, dog);
return l;
}
//Free a dog
void dog_free(Dog *dog)
{
eina_stringshare_del(dog->name);
eina_stringshare_del(dog->race);
free(dog);
}
//print a dog
void dog_print(Dog *dog)
{
printf("\tDog : %s, Race : %s\n", dog->name, dog->race);
}
|
Create the eet descriptor
Eet need to know what we which to save, the descriptor does this job.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
//create the eet descriptor of the struct Dog
static Eet_Data_Descriptor * dog_edd_new()
{
Eet_Data_Descriptor *edd;
Eet_Data_Descriptor_Class eddc;
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Dog);
//set to null because wu use eina_stringshare
eddc.func.str_direct_alloc = NULL;
eddc.func.str_direct_free = NULL;
edd = eet_data_descriptor_file_new(&eddc);
EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Dog, "name", name, EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Dog, "race", race, EET_T_STRING);
return edd;
}
//create the eet descriptor of the struct Dogs
static Eet_Data_Descriptor * dogs_edd_new()
{
Eet_Data_Descriptor *edd;
Eet_Data_Descriptor_Class eddc;
Eet_Data_Descriptor *edd_dog = dog_edd_new();
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Dogs);
//set to null because wu use eina_stringshare
eddc.func.str_direct_alloc = NULL;
eddc.func.str_direct_free = NULL;
edd = eet_data_descriptor_file_new(&eddc);
EET_DATA_DESCRIPTOR_ADD_LIST(edd, Dogs, "dog_I_have", dogs_I_have, edd_dog);
EET_DATA_DESCRIPTOR_ADD_LIST(edd, Dogs, "dog_I_add", dogs_I_add, edd_dog);
return edd;
}
|
Then we create our data
1
2
3
4
5
6
7
8
9
10
11
12
13
|
//create
Dogs *dogs = calloc(1, sizeof(Dogs));
dogs->dogs_I_have = NULL;
dogs->dogs_I_add = NULL;
dogs->dogs_I_have = dog_add(dogs->dogs_I_have, "Mystrale", "Shepherd german");
dogs->dogs_I_have = dog_add(dogs->dogs_I_have, "fiona", "Malinois");
dogs->dogs_I_add = dog_add(dogs->dogs_I_add, "Effy", "Czechoslovakian Wolfdogs");
dogs->dogs_I_add = dog_add(dogs->dogs_I_add, "Sai", "No race");
//
|
Saving data
1
2
3
4
5
6
7
8
|
Eet_Data_Descriptor *edd = dogs_edd_new();
Eet_File *f = eet_open("./dogs.eet", EET_FILE_MODE_WRITE);
eet_data_write(f, edd, "key/dogs", dogs, 0);
eet_close(f);
eet_data_descriptor_free(edd);
|
Loading data
1
2
3
4
5
6
7
8
|
edd = dogs_edd_new();
f = eet_open("./dogs.eet", EET_FILE_MODE_READ);
dogs = eet_data_read(f, edd, "key/dogs");
eet_close(f);
eet_data_descriptor_free(edd);
|
by jonathan.atton@gmail.com (ATTON Jonathan) at January 05, 2011 12:57 PM
There are no translations available.
Azy is a library written by the company http://www.zentific.com/. The aim is to easily create a communication process between a client and a server like a webservice by using a RPC. Zentific need a asynchronous and scalable library, they was using libzxr (fork from libxr) but the library is synchronous and use Glib.

Azy is not really a part of the EFL project but use and is used by the EFL and is available in the official e-svn and from the zentific svn : http://svn.zentific.com/branches/azy (both are the same version)
How it works ?
Azy is really powerful and easy to use !
- Create a .azy file
- Compile the .azy file with azy_parser
- You get a list of server and client C sources files. Sources files are named : *.azy_client.c, *.azy_server_stubs.c, *.azy_server.c
- Use the generated code to create your server and client. For example to call a method on the server, the client have to call a simple C method
1
2
3
4
|
method(arg1, arg2, ...)
//we wait the response and when we get it print_response() is called
//Azy is asynchronous !
wait_response(print_response)
|
How to create a simple demo
In this demo we will send a question (simple string) and receive a response (simple string). The question will be HowAreYou? with a dog as parameter and the server will respond.
Note : In azy a string is a eina_stringshAre !.
source file : azy.tar.gz
Step 1 - The .azy file
The azy file describes the service. We have one question with one parameter and a response.
| services.azy |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
//The namespace is added before each method and file
Azy_Namespace Demo;
//struct send by the server with the response
//Azy will create a new and free methods
//Demo_HowAreYouResponse_new() and Demo_HowAreYouResponse_free()
struct HowAreYouResponse
{
string response;
};
//struct send by the client to the server, this is the question
struct HowAreYouQuestion
{
string question;
};
//Our module, a module contains a list of methods
Azy_Module HowAreYou
{
//code between <% %> is C-code
<%
#include <stdio.h>
#include <string.h>
%>
//This method is used by the server to construct the response from the question
HowAreYouResponse Get(HowAreYouQuestion question)
<%
retval = Demo_HowAreYouResponse_new();
if(!strcmp(question->question, "How is Mystrale ?"))
retval->response = eina_stringshare_add("A little ill !");
else if(!strcmp(question->question, "How is Fiona ?"))
retval->response = eina_stringshare_add("Very fine, she jump like a rabbit !");
else
retval->response = eina_stringshare_add("Unknown dog :/ !");
return retval;
%>
}
|
Then compile the file with
1
|
azy_parser services.azy
|
We obtain a list of C sources files and headers:
| Common files |
Demo_Common.c |
| Demo_Common.h |
| Client files |
Demo_HowAreYou.azy_client.c |
| Demo_HowAreYou.azy_client.h |
| Server files |
Demo_HowAreYou.azy_server.c |
| Demo_HowAreYou.azy_server.h |
| Demo_HowAreYou.azy_server_stubs.c |
| Demo_HowAreYou.azy_server_stubs.h |
Step 2 - The server
The server is very easy, we listen questions on a specific port and we respond. The reception of the question and the creation of the respond is described in the file service.azy. We have nothing to do in the server.
| server.c |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include <Azy.h>
#include "Demo_HowAreYou.azy_server.h"
int main(int argc, char *argv[])
{
azy_init();
//Define the list of module used by the server.
Azy_Server_Module_Def *modules[] = {
Demo_HowAreYou_module_def(),
NULL
};
//launch the server
azy_server_basic_run(3412, AZY_SERVER_LOCAL, NULL, modules);
azy_shutdown();
return 0;
}
|
Step 3 - the client
The client will ask 3 questions to the server :
- How is Mystrale ?
- How is Fiona ?
- How is Sai ?
| client.c |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
#include <Azy.h>
#include "Demo_HowAreYou.azy_client.h"
#define CALL_CHECK(X) \
do \
{ \
if (!azy_client_call_checker(cli, err, ret, X, __PRETTY_FUNCTION__)) \
{ \
printf("%s\n", azy_content_error_message_get(err)); \
exit(1); \
} \
} while (0)
/**
* Here we receive the response and print it
*/
static Eina_Error
_Demo_HowAreYou_Get_Ret(Azy_Client *client, Azy_Content *content, void *_response)
{
Demo_HowAreYouResponse *response = _response;
//retrieve the question, last argument passed to Demo_HowAreYou_Get()
Demo_HowAreYouQuestion *question = azy_content_data_get(content);
if (azy_content_error_is_set(content))
{
printf("Error encountered: %s\n", azy_content_error_message_get(content));
azy_client_close(client);
ecore_main_loop_quit();
return azy_content_error_code_get(content);
}
//printf("%s: Success? %s!\n", __PRETTY_FUNCTION__, ret ? "YES" : "NO");
printf("Question : %s\n", question->question);
printf("Response : %s\n", response->response);
Demo_HowAreYouQuestion_free(question);
//response is automaticaly free
return AZY_ERROR_NONE;
}
/**
* Bad we have been disconnected
*/
static Eina_Bool _disconnected(void *data, int type, void *data2)
{
ecore_main_loop_quit();
return ECORE_CALLBACK_RENEW;
}
/**
* Yes we are connected ! Now we can send our question
*/
static Eina_Bool
connected(void *data, int type, Azy_Client *cli)
{
unsigned int ret;
Azy_Content *content;
Azy_Net *net;
Azy_Content *err;
Demo_HowAreYouQuestion *question;
net = azy_client_net_get(cli);
content = azy_content_new(NULL);
err = azy_content_new(NULL);
//send 3 questions
//
question=Demo_HowAreYouQuestion_new();
question->question = eina_stringshare_add("How is Mystrale ?");
ret = Demo_HowAreYou_Get(cli, question, content, question);
CALL_CHECK(_Demo_HowAreYou_Get_Ret);
//
//
question=Demo_HowAreYouQuestion_new();
question->question = eina_stringshare_add("How is Fiona ?");
ret = Demo_HowAreYou_Get(cli, question, content, question);
CALL_CHECK(_Demo_HowAreYou_Get_Ret);
//
//
question=Demo_HowAreYouQuestion_new();
question->question = eina_stringshare_add("How is Sai ?");
ret = Demo_HowAreYou_Get(cli, question, content, question);
CALL_CHECK(_Demo_HowAreYou_Get_Ret);
//
azy_content_free(content);
return ECORE_CALLBACK_RENEW;
}
int main(int argc, char *argv[])
{
Ecore_Event_Handler *handler;
Azy_Client *cli;
azy_init();
/* create object for performing client connections */
cli = azy_client_new();
if (!azy_client_host_set(cli, "localhost", 3412))
return 1;
handler = ecore_event_handler_add(AZY_CLIENT_CONNECTED, (Ecore_Event_Handler_Cb)connected, cli);
handler = ecore_event_handler_add(AZY_CLIENT_DISCONNECTED, (Ecore_Event_Handler_Cb)_disconnected, cli);
/* connect to the servlet on the server specified by uri */
if (!azy_client_connect(cli, EINA_FALSE))
return 1;
ecore_main_loop_begin();
azy_client_free(cli);
azy_shutdown();
return 0;
}
|
The result:
1
2
3
4
5
6
7
|
Question : How is Mystrale ?
Response : A little ill !
Question : How is Fiona ?
Response : Very fine, she jump like a rabbit !
Question : How is Sai ?
Response : Unknown dog :/ !
|
Conclusion
Azy is a crazy library ! Everyone run to get it !

by jonathan.atton@gmail.com (ATTON Jonathan) at January 01, 2011 09:03 AM
This week's report begins with some sad news for everyone. Elm_Toolbar was causing Efreet to call stat(2) a bit too much and instead of killing the widget, an icon cache for Efreet was implemented. So if you build Efreet with --enable-icon-cache, we are faster. This option will be turned on by default after the 1.0 release.
Speaking of releases, there's a beta3 yet to be announced, but you can find the tarballs here and some snapshots to go along here.
And now, the happenings of the last seven days:
- We jumped into December, it's almost Christmas already.
- Efreet not only got its new cache, but it now follows the Freedesktop's specifications about it more closely, storing its files in the right place (that would be ~/.cache) or whatever XDG_CACHE_HOME is pointing at.
- Not only Efreet got faster, but also Eet, who got some of its internals redone to make better use of memory and improve overall performance.
- Ecore's handling of file handlers saw a revamp as well. Normal users won't notice much of an improvement here, but if you have an application using it to manage around 25k file descriptors, we are glad to tell you that you won't see your speed get massively hit anymore.
- Lots of fixes here and there to build cleanly on OpenBSD and MacOS X.
- Elementary Entry's item system to insert emoticons can now reference image files in your harddrive, by using the same ol' file:// syntax everyone knows.
- Hoverlist and Magnetslider in Elementary got renamed to Ctxpopup and Actionslider, respectively.
- Editje saw some work to support key modifiers in its mouse handling of object edition. You can play with Ctrl, Alt and Shift while dragging parts around.
- Edje_Edit is now capable of keeping your Embryo scripts in the generated source, if the Edje file edited was built with a recent enough edje_cc. It can also recompile the script and update the running VM with the new bytecode.
And to close, some Azy news from discomfitor:
- Spec file added (thanks to Rui Miguel Silva Seabra)
- distcheck now passes!
- 100% documentation coverage
- Client helper function added to make error checking and callback setting one call
- XML support is now OPTIONAL
- openssl dependency dropped
- Server module data is now correctly exposed for use in .azy code
- MYSQL example added to test code
by Sachiel at December 06, 2010 10:05 PM
We're excited to announce the third beta release of the Enlightenment Foundation Libraries. The focus of this release is portability and build issues. We'd like to thank all the people who helped us by packaging all this libraries on so many different systems. The libraries run better now, especially on OpenBSD and Mac OS X systems. It's really the right time to help us package it for more targets and rock on all of them!
The APIs and ABIs of all beta3 libraries are considered stable, but please test your apps with them and report back any issues you may encounter. Thanks to the last beta, a small number of bugs have been identified. Once they are fixed we will jump into the release candidate cycle.
As the end of the beta cycle get closer, we still need a lot of help to write documentation, tutorials, and examples; if you have time to contribute, this is a good area to help with! As you may have noticed (or not) our documentation situation is already improving. If you take a look at our daily updated documentation or our wiki, you will see progress.
Testing is pretty easy: if you're using the EFL from our Subversion repository you can test with revision 55246, but to ensure a smooth release later on, please consider testing with the tarballs provided here.
The list of libraries that are being considered part of this release are:
There are also snapshots being made available for the following projects (as well as bindings for Python and Javascript), and we would really appreciate feedback on all of them. Please notice, however, that they are still considered work in progress and may have bugs, lack certain features, and ABI/API may be broken in the future:
If you want to join and help us, join on our irc channel #edevelop on the FreeNode server, or ask your questions on the mailing list.
by cedric.bail@free.fr
(Cedric BAIL
) at December 03, 2010 10:00 PM
Hello Monday,
ProFUSION already writes internal progress reports and some developers, including Rasterman, found it could be useful for the community as a whole. If you want your news to be published, you can always contribute it or even help with the weekly news as we used to have before.
Highlights from the last couple of weeks (since I've been putting this off longer than I was supposed to)
- Elementary began to support textclasses. This means it's possible to change font and style for the widgets that support them. What widgets they are takes us to...
- elementary_config has received some more love and it can now change the cache settings for Elementary, as well as the textclasses for those widgets that support them, provided the chosen theme uses them.
- Following on the config thing, choosing the Standard profile, as opposed to default, will use a desktop oriented theme. As of now, the only difference to it is the scroller (and related widgets) having clickable scrollbars, which in turn are now affected by fingersize.
- Other changes in the scroller were made in the way it treats the contained object. This was done mostly so items in gengrid would be properly aligned, even when they are bigger than the shown area.
- The usual assorted fixes here and there include clearing the set image from elm_bg when calling elm_bg_file_set() with a NULL file argument; more hooks for more widgets, specifically signal_hooks to interact with the internal Edje objects; lists can now be disabled; and more.
- k-s (barbieri) added 2 new programs in Edje: edje_inspector and edje_external_inspector. These tools help developers see what is described in compiled edje files (edj) and external modules respectively. The first tool (edje_inspector) is useful to list groups and their parts, being able to filter based on name globs or even just those with 'api:' property, making easier for theme makers and application developers to establish a contract of what should be accessed. The second tool (edje_external_inspector) will list known modules (emotion, elementary...) and their registered types and parameters expected by these types, aiding those writing EDC files that use "type: EXTERNAL". Both tools have human or machine-readable output, helping tools to parse the output and produce some easier interaction or automation of processes (like tab-completion).
And in the not-core EFL front, contributed by acidx and abgrilo, respectively:
Enjoy
The past few weeks were pretty busy on the Enjoy front. The simple media
player is almost ready for public consumption. Some highlights of what
happened in november, in chronological order:
- MPRIS support has been added; MPRIS is a DBUS interface that lets a media player be controlled remotely.
- Elm_Toolbar is being used instead of our homecooked one. This means Enjoy won't look alien with a theme other than Efenniht.
- Shuffling now uses a better algorithm. Songs now won't repeat whenever the current playlist is in shuffle mode, and it'll be possible to go back to a previously-played song.
- Cover art is now downloaded from LastFM whenever they're not available locally. These images are cached locally so bandwidth won't be wasted.
- Resized cover art is now cached locally -- no more resizing them every time they're requested from the disk.
- Some themes were moved from Enjoy to the Black&White and Efenniht Elementary themes, mainly the list item stuff.
- Some bugfixes and small optimizations were performed as well.
There are more things on the works, like a user interface for the Library
Manager -- so no more fiddling around with the command line just to add some
songs to the database.
WebKit-EFL
Last week we had Tiled Backing Store for EFL port of WebKit upstreamed. With
it, instead of rendering a single image buffer that is later displayed, it does
in a matrix of image buffers. Then, with EFL Tiled Backing Store
implementation, scroll and zoom operations can be done faster.
For more info, please take a look at this Changelog entry
http://trac.webkit.org/changeset/72579.
We also test daily if WebKit-EFL upstream with EFL-SDK latest versions and
correct the problems caused by API changes.
That's all for this week.
Coming up next: More Elementary stuff and Edje_Edit will know what scripts are.
Stay tuned.
by Sachiel at November 29, 2010 06:56 PM
You probably know that EFL is reaching version 1.0, consequently more people will be interested on them, and we’ll need a nice documentation. Documenting the libraries and softwares that we maintain is one of our priorities now. As I was writing about Editje on enlightenment wiki I decided to blog a bit about it.
Editje is a tool for designing and building graphical user interfaces quickly and easily. It’s an WYSIWYG (What You See Is What You Get) editor for Edje files, making possible to create very rich GUI using Edje parts, including external objects, like Elementary widgets and Emotion. But it’s much more than a tool to simple set parts positions and their properties, you can create animations and define the interaction via signals.
It provides three edition modes:
- part mode: where you can compose your interface: adding, removing and changing parts and their states;
- animations mode: enable you to set frames in a timeline and to define frame and part state details;
- signals mode: make it possible to manage signals, that in Editje is the way of interact easier with the UI using messages exchange.
And when you may want to test what you have done so far, you can just click the Run button and interact with your interface
If you are interested, you can look at Editje user’s manual made from some developers at Profusion: glima, Sachiel, masaki and tiago – nice work, guys. It’s provided as pdf or html and it’s source is kept on project’s repository.
Editje is written in python, it’s a free software released under GPLv3 and it can be checked out from enlightenment project repository.
by bdilly at November 24, 2010 05:49 AM
|
|