The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

EFL - Perl bindings for the Enlightenment Foundation Libraries

VERSION

version 0.501

SYNOPSIS

Import all EFL functions from EFL::*:

    use EFL qw(:all);

Or only a subset:

    use EFL qw(:evas :elementary);

DESCRIPTION

Perl bindings for the Enlightenment Foundation Libraries (EFL) Elementary library. The API was deliberatly kept as close to 1-to-1 mapping of the Elementary API as possible. Function parameters types and position are the same as you would in C (deviations are documented), Evas_Object pointers are just scalars, #defines are Perl constants, etc.

For example, the C way:

    elm_win_screen_position_get(Evas_Object *obj, int *x, int *y);

This will be translated into the Perlish-C way as:

    elm_win_screen_position_get($obj, \$x, \$y);

As opposed to the Perl way:

    my ($x, $y) = elm_win_screen_position_get($obj);

This was intentional as the desired goal will to aid in porting to pure-C. But with the power of Perl and CPAN, it will be easier for rapid development and prototyping.

WARNING

With regards to passing data between Perl and C, the API is not set in stone and may change in future releases.

EVEN MORE WARNINGS

Due to the complexity of EFL and XS, it is very easy to segfault. For instance,

    elm_win_add(undef, "main", ELM_WIN_BASIC);

    ...

Without a leading elm_init(); causes a segfault. You've been warned. Although if you compiled Elementary, Evas, etc with symbols (-g in gcc), you can easily see where the segfault occured with gdb -c core `which perl`.

REQUIRES

  • Perl 5.10.0+ (I haven't tried 5.8.x yet)

  • Linux (untested on non-Linux platforms)

  • gcc

  • pkg-config can find the evas.pc and elementary.pm files (if not set PKG_CONFIG_PATH)

  • evas and elmentary compiled successfully

  • linkable with -levas and -lelementary

SUPPORTED

Currently only the following are supported.

  • evas

  • elementary

PARTIALLY SUPPORTED

Currently only the following are partially supported. With more support coming in the future.

  • ecore

  • eina

NOT SUPPORTED

What I consider very low priority/no priority. Although I am fully open to patches.

  • non-Linux/Windows compatiability

  • Perl threads

EXPORT

Nothing by default. You can either import the entire API with :all, or only a subset with the tag name being the EFL group, e.g. :elementary.

Check the EFL API documentation for how to correctly call functions.

To see what functions can be export run misc/supported.pl -api <efl-subset> and misc/supported.pl -tags <efl-subset> for the Exporter tags available.

ACKNOWLEDGEMENTS

Some thanks for helping me out.

  • Everyone that worked on EFL. The API makes sense and was easy to Perl-ize.

  • Audio::XMMSClient for showing me some XS tricks.

  • Dist::Zilla and Pod::Weaver for making it easier to manage releases/POD.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc EFL

You can also look for information at:

SEE ALSO

AUTHOR

  Adam Flott <adam@npjh.com>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2010 by Adam Flott.

This is free software, licensed under:

  The GNU Lesser General Public License, Version 2.1, February 1999