Gtk2-CV

 view release on metacpan or  search on metacpan

lib/Gtk2/CV/ImageWindow.pm  view on Meta::CPAN

   my $sw = $self->{screen_width}  - ($left + $right);
   my $sh = $self->{screen_height} - ($top + $bottom);

   if ($self->{sw} != $sw || $self->{sh} != $sh) {
      ($self->{sw},  $self->{sh})  = ($sw, $sh);
      ($self->{rsw}, $self->{rsh}) = ($sw, $sh);
      $self->auto_resize if $self->{image};
   }
}

sub update_properties {
   my ($self) = @_;

   (undef, undef, my @data) = $_[0]->{window}->property_get (
      $_[0]{frame_extents_property}, 
      Gtk2::Gdk::Atom->intern ("CARDINAL", 0),
      0, 4*4, 0);
   # left, right, top, bottom
   $self->{frame_extents} = \@data;

   $self->check_screen_size;

lib/Gtk2/CV/ImageWindow.pm  view on Meta::CPAN

   my ($self, $x1, $y1, $x2, $y2) = @_;

   my $w = max ($x2 - $x1, 1);
   my $h = max ($y2 - $y1, 1);

   $self->set_subimage (
      $self->{subimage}->new_subpixbuf ($x1, $y1, $w, $h)
   );
}

sub update_mpv_window {
   my ($self) = @_;

   # force a resize of the mpv window, otherwise it doesn't receive
   # a configureevent :/
   $self->{mpv_window}->window->resize (1, 1),
   $self->{mpv_window}->window->resize ($self->{w}, $self->{h})
      if $self->{mpv_window}
         && $self->{mpv_window}->window;
}

lib/Gtk2/CV/Progress.pm  view on Meta::CPAN


   $self
}

=item $progress->update ($work)

The amount of work already done.

=cut

sub update {
   my ($self, $progress) = @_;

   my $now = time;

   if ($now > $self->{next}) {
      remove Glib::Source delete $self->{timeout}
         if $self->{timeout};

      Gtk2::CV::disable_aio;

lib/Gtk2/CV/Schnauzer.pm  view on Meta::CPAN

      $self->emit_sel_changed;
   };
}

=item $schnauzer->update_thumbnails (idx[, idx...])

Update (if needed) the thumbnails on the given entries.

=cut

sub update_thumbnails {
   my ($self, @idx) = @_;

   Gtk2::CV::Jobber::inhibit {
      for (sort { $b <=> $a } @idx) {
         my $e = $self->{entry}[$_];
         Gtk2::CV::Jobber::submit upd_thumb => "$e->[0]/$e->[1]";
         delete $self->{sel}{$_};
      }

      $self->invalidate_all;



( run in 0.252 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )