Enlightenment CVS committal Author : leviathan Project : e17 Module : proto
Dir : e17/proto/etk-perl/lib/Etk Modified Files: Image.pm Widget.pm Log Message: - todo-- - some more simplifactions and cleanups - start of test suite =================================================================== RCS file: /cvs/e/e17/proto/etk-perl/lib/Etk/Image.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- Image.pm 15 Jul 2006 19:19:05 -0000 1.2 +++ Image.pm 17 Jul 2006 23:26:17 -0000 1.3 @@ -7,12 +7,13 @@ { my $class = shift; my $self = $class->SUPER::new(); - if(@_ == 1) - { + if(@_ == 2) { + my ($arg1, $arg2) = @_; + $self->{WIDGET} = -e $arg1 ? Etk::etk_image_new_from_edje($arg1, $arg2): + Etk::etk_image_new_from_stock($arg1, $arg2); + } elsif (@_ == 1) { $self->{WIDGET} = Etk::etk_image_new_from_file(shift); - } - else - { + } else { $self->{WIDGET} = Etk::etk_image_new(); } bless($self, $class); @@ -24,29 +25,6 @@ my $class = shift; my $self = $class->SUPER::new(); $self->{WIDGET} = undef; - bless($self, $class); - return $self; -} - -sub new_from_edje -{ - my $class = shift; - my $self = $class->SUPER::new(); - my $edje_filename = shift; - my $edje_group = shift; - $self->{WIDGET} = Etk::etk_image_new_from_edje($edje_filename, - $edje_group); - bless($self, $class); - return $self; -} - -sub new_from_stock -{ - my $class = shift; - my $self = $class->SUPER::new(); - my $stock_id = shift; - my $stock_size = shift; - $self->{WIDGET} = Etk::etk_image_new_from_stock($stock_id, $stock_size); bless($self, $class); return $self; } =================================================================== RCS file: /cvs/e/e17/proto/etk-perl/lib/Etk/Widget.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- Widget.pm 15 Jul 2006 19:19:05 -0000 1.6 +++ Widget.pm 17 Jul 2006 23:26:17 -0000 1.7 @@ -15,6 +15,43 @@ return $self; } +sub NameSet +{ + my $self = shift; + my $name = shift; + Etk::etk_widget_name_set($self->{WIDGET}, $name); +} + +sub NameGet +{ + my $self = shift; + return Etk::etk_widget_name_get($self->{WIDGET}); +} + +sub ToplevelParentGet +{ + my $self = shift; + use Etk::ToplevelWidget; + my $return = Etk::ToplevelWidget->new(); + $return->{WIDGET} = Etk::etk_widget_toplevel_parent_get($self->{WIDGET}); + return $return; +} + +sub ParentSet +{ + my $self = shift; + my $parent = shift; + Etk::etk_widget_parent_set($self->{WIDGET}, $parent->{WIDGET}); +} + +sub ParentGet +{ + my $self = shift; + my $parent = Etk::Widget->new(); + $parent->{WIDGET} = Etk::etk_widget_parent_get($self->{WIDGET}); + return $parent; +} + sub Show { my $self = shift; @@ -89,6 +126,13 @@ Etk::etk_widget_size_request_set($self->{WIDGET}, $width, $height); } +sub SizeAllocate +{ + my $self = shift; + my $geometry = shift; # hashref + Etk::etk_widget_size_allocate($self->{WIDGET}, $geometry); +} + sub Enter { my $self = shift; @@ -214,7 +258,44 @@ Etk::etk_widget_dnd_internal_set($self->{WIDGET}, $on); } -# TODO drag_* +sub DragDrop +{ + my $self = shift; + my $type = shift; + my $data = shift; + # TODO check what dnd has to offer and fix this +# Etk::etk_widget_drag_drop($self->{WIDGET}, $type, $data); +} + +sub DragMotion +{ + my $self = shift; + Etk::etk_widget_drag_motion($self->{WIDGET}); +} + +sub DragEnter +{ + my $self = shift; + Etk::etk_widget_drag_enter($self->{WIDGET}); +} + +sub DragLeave +{ + my $self = shift; + Etk::etk_widget_drag_leave($self->{WIDGET}); +} + +sub DragBegin +{ + my $self = shift; + Etk::etk_widget_drag_begin($self->{WIDGET}); +} + +sub DragEnd +{ + my $self = shift; + Etk::etk_widget_drag_end($self->{WIDGET}); +} sub ThemeFileSet { ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs