The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

pEFL::Elm:Entry

SYNOPSIS

  #! /usr/bin/perl
  use strict;
  use warnings;

  use pEFL::Evas;
  use pEFL::Elm;

  pEFL::Elm::init($#ARGV, \@ARGV);

  pEFL::Elm::policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
  my $win = pEFL::Elm::Win->util_standard_add("hello", "Hello, World!");
  $win->autodel_set(1);

  my $box = pEFL::Elm::Box->add($win);
  $box->size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
  $win->resize_object_add($box);
  $box->show();

  my $en = pEFL::Elm::Entry->add($win);
  $en->autosave_set(0);
  $en->file_set("./da_test.txt", ELM_TEXT_FORMAT_MARKUP_UTF8);
  $en->size_hint_weight_set(EVAS_HINT_EXPAND,EVAS_HINT_EXPAND);
  $en->size_hint_align_set(EVAS_HINT_FILL,EVAS_HINT_FILL);
  $en->markup_filter_append(\&filter_user, undef);
  $en->markup_filter_prepend("limit_size", {max_char_count => 5, max_byte_count => 0});
  $en->markup_filter_append("accept_set", {accepted=> "ABCE",rejected => "0123456789"});
  $box->pack_end($en);
  $en->show();

  $win->resize(300,780);


  $win->show();

  pEFL::Elm::run();
  pEFL::Elm::shutdown();

  sub filter_user {
          my ($data, $entry, $text) = @_;
          print "TEXT $text\n";
          return "B";
  }

DESCRIPTION

This module is a perl binding to the Elementary Entry widget.

For more informations see https://www.enlightenment.org/develop/legacy/api/c/start#group__Elm__Entry.html

For instructions, how to use pEFL::Elm::Entry, please study this API reference for now. A perl-specific documentation will perhaps come in later versions. But applying the C documentation should be no problem. pEFL::Elm::Entry gives you a nice object-oriented interface that is kept close to the C API. Please note, that the perl method names remove the "elm_entry_" at the beginning of the c functions.

EXPORT

None by default.

LIMITATIONS

The following functions are at the moment missing:

  • elm_entry_imf_context_get()

  • elm_entry_item_provider_prepend()

  • elm_entry_item_provider_append()

  • elm_entry_item_provider_remove()

  • elm_entry_input_panel_imdata_set()

  • elm_entry_input_panel_imdata_get()

  • elm_entry_context_menu_item_add()

SEE ALSO

https://www.enlightenment.org/develop/legacy/api/c/start#group__Elm__Entry.html

AUTHOR

Maximilian Lika

COPYRIGHT AND LICENSE

Copyright (C) 2022 by Maximilian Lika

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.28.1 or, at your option, any later version of Perl 5 you may have available.