Etk - Perl bindings for the Enlightened ToolKit (Etk)


Etk-Perl documentation Contained in the Etk-Perl distribution.

Index


Code Index:

NAME

Top

Etk - Perl bindings for the Enlightened ToolKit (Etk)

SYNOPSIS

Top

  use Etk;

  my $win = Etk::Window->new();
  my $button = Etk::Button->new();
  $button->LabelSet("Click me!");
  $win->Add($button);
  $win->ShowAll();

  $button->SignalConnect("clicked", \&clicked_cb);

  Etk::Main::Run();

  sub clicked_cb
  {
     print "button clicked!\n";
  }

DESCRIPTION

Top

This module allows the use of Etk from within Perl. You can use them in one of two ways, either by using the object oriented approach or directly by calling the functions (although this is not recommended).

EXPORT

Top

None by default.

SEE ALSO

Top

Etk::Constants

Etk documentation is available as Doxygen or in the Etk Explained book: http://hisham.cc/etk_explained.pdf

http://www.enlightenment.org

AUTHOR

Top

Chady 'Leviathan' Kassouf, <chady.kassouf@gmail.com> - Hisham Mardam Bey, <hisham.mardambey@gmail.com>

COPYRIGHT AND LICENSE

Top


Etk-Perl documentation Contained in the Etk-Perl distribution.

package Etk;

use 5.008004;
use strict;
use warnings;
use Carp;

our $VERSION = '0.09';

require XSLoader;
XSLoader::load('Etk', $VERSION);

# initialize Etk
Etk::Init();

END {
	Etk::Shutdown();
}


package Etk::Tree::Col;

sub model_add { &ModelAdd; }

sub ModelAdd {
	my ($col, $model) = @_;
	XS_etk_tree_col_model_add($col, $model);
	push @{$col->{_models}}, $model->{_model};
}

package Etk::Combobox;

sub ItemAppend {
	my $self = shift;
	my $item = $self->ItemAppendEmpty();
	$item->FieldsSet(@_) if @_;
	return $item;
}

sub ItemPrepend {
	my $self = shift;
	my $item = $self->ItemPrependEmpty();
	$item->FieldsSet(@_) if @_;
	return $item;
}

sub ItemInsert {
	my $self = shift;
	my $after = shift;
	my $item = $self->ItemInsert($after);
	$item->FieldsSet(@_) if @_;
	return $item;
}

package Etk::Combobox::Entry;

sub ItemAppend {
	my $self = shift;
	my $item = $self->ItemAppendEmpty();
	$item->FieldsSet(@_) if @_;
	return $item;
}

sub ItemPrepend {
	my $self = shift;
	my $item = $self->ItemPrependEmpty();
	$item->FieldsSet(@_) if @_;
	return $item;
}

sub ItemInsert {
	my $self = shift;
	my $after = shift;
	my $item = $self->ItemInsert($after);
	$item->FieldsSet(@_) if @_;
	return $item;
}

1;
__END__