OCaml EFL

This is the homepage of the OCaml EFL. An OCaml interface to the Enlightenment Foundation Libraries (EFL).

Github page

Old Homepage

Download

What is OCaml ?

OCaml, originally known as Objective Caml, is the main implementation of the Caml programming language, created by Xavier Leroy, Jérôme Vouillon, Damien Doligez, Didier Rémy and others in 1996. OCaml extends the core Caml language with object-oriented constructs.

OCaml's toolset includes an interactive top level interpreter, a bytecode compiler, and an optimizing native code compiler. It has a large standard library that makes it useful for many of the same applications as Python or Perl, as well as robust modular and object-oriented programming constructs that make it applicable for large-scale software engineering. OCaml is the successor to Caml Light. The acronym CAML originally stood for Categorical Abstract Machine Language, although OCaml abandons this abstract machine.

OCaml is a free open source project managed and principally maintained by INRIA.

OCaml Homepage

What are the Enlightenment Foundation Libraries (EFL) ?

The Enlightenment Foundation Libraries (EFL) are a set of free and open source graphics libraries that grew out of the development of the Enlightenment window manager and Wayland compositor. EFL is developed by Enlightenment.org with some sponsorship from Samsung, ProFUSION and Free.fr. The project's focus is to make the EFL a flexible yet powerful and easy to use set of tools to extend the capabilities of both the Enlightenment window manager and other software projects based on the EFL. The libraries were created for version 0.17 of the window manager. The libraries are meant to be portable and optimized to be functional even on mobile devices such as smart phones and tablets.

Enlightenment Homepage

Elementary is a widget set based on the EFL that makes heavy use of Evas and Edje to provide a fast, stable, and scalable library that can be used to create both rich and fast applications that can be used on anything from every day desktop computers to small PDA's and set-top boxes. It is designed to fully expose the capability of the EFL.

Installing

This package uses a configure script created with autoconf/automake (although ocamlbuild is used in the backstage). You can find more detailed instructions in the INSTALL file.

License

This is a free software licensed under the LGPLv2.1+ with Ocaml linking exception. More information is available in the COPYING file. Most of the examples are directly inspired by the official examples distributed with the EFL and Elementary.

Current state of the interface

Currently the interfacing of Elementary (the high-level widget part of the EFL) is more or less complete. However, lots of functions have not been tested.

Only a small portion of the rest of the EFL (ecore, evas, edje, ...) has been interfaced : only the minimum necessary to develop an Elementary application has been done.

The next priority is interfacing Evas (canvas library).

It is already possible to write some GUI applications. However, ocaml-efl is still in alpha stage and some (minor) API breaks may occured.

The last version can be obtained here:

Official releases

Official git repo

You may also want to contribute by adding missing functions that you want. The following pages might give you information about how to do it:

Florent Monnier's tutorial

Official description about interfacing C and OCaml

Using this library

This library can easily be used with the findlib (ocamlfind) package 'efl'.

For example, if you have a single-file program main.ml, you can build it by entering:

'ocamlbuild -use-ocamlfind -pkg efl main.byte'

And then, you can execute it by entering:

'./main.byte'

If you want to compile to native code, just replace 'main.byte' by 'main.native'.

Findlib Homepage

Ocamlbuild Homepage

Lots of examples are available in the directory "example". In particular, you might want to look at getting_started_01.ml and getting_started_02.ml.

Download

The last version should work if you have EFL version 1.21 or newer installed.

Last version

Older versions (starting 1.19)

Older versions (until 1.20)

Documentation

The INSTALL file indicates how to generate the documentation.

However, it is possible to access the documentation online:

OCaml EFL API Documentation

Getting started

Online documentation for specific versions of the EFL are also available:

Version 1.21

Version 1.22

Version 1.23

Version 1.24