Gtk2

 view release on metacpan or  search on metacpan

ChangeLog.pre-git  view on Meta::CPAN


2008-06-22  Torsten Schoenfeld  <kaffeetisch@gmx.de>

	* xs/GtkGC.xs: Refer to release 1.200 (instead of 1.180) in the
	compatibility paragraph about Gtk2::GC->release.

2008-06-22  Torsten Schoenfeld  <kaffeetisch@gmx.de>

	* t/GtkClipboard.t: Fix test failure that's presumably due to
	get_func being run more often than expected.  Also use
	Gtk2::TestHelper's run_main to replace equivalent Glib::Timeout
	constructs.

2008-06-22  Torsten Schoenfeld  <kaffeetisch@gmx.de>

	* CodeGen.pm (generate_constants_wrappers): Also allow more than
	one tab as a separator between constant name and converter.

2008-06-22  Torsten Schoenfeld  <kaffeetisch@gmx.de>

	* CodeGen.pm: Add Gtk2::CodeGen->generate_constants_wrappers which

examples/assistant.pl  view on Meta::CPAN


sub prepare_callback {
  my ($assistant, $page) = @_;

  if ($page->isa ('Gtk2::Label')) {
    print "prepare: ".$page->get_text."\n";
  } elsif ($assistant->get_page_type ($page) eq 'progress') {
    my $progress = $page->child;
    $assistant->set_page_complete ($page, FALSE);
    $progress->set_fraction (0.0);
    Glib::Timeout->add (300, \&progress_timeout, $assistant);
  } else {
    print "prepare: ".$assistant->get_current_page,"\n";
  }
}

sub create_simple_assistant {
  my $widget = shift;

  my $assistant = $widget->{assistant};

examples/cairo-clock.pl  view on Meta::CPAN

	my $cr = Gtk2::Gdk::Cairo::Context->create($self->window);
	$cr->rectangle ($event->area->x,
			$event->area->y,
			$event->area->width,
			$event->area->height);
	$cr->clip;
	$self->{cr} = $cr;
	
	$self->draw;

	$self->{timeout} = Glib::Timeout->add(1000, sub {
			my $self = shift;
			
			my $alloc = $self->allocation;
			my $rect = Gtk2::Gdk::Rectangle->new(0, 0, $alloc->width, $alloc->height);
			$self->window->invalidate_rect($rect, FALSE);

			return TRUE;
		}, $self) unless $self->{timeout};

	return FALSE;

examples/cellrenderer_progress.pl  view on Meta::CPAN

  $col->set_title ("Progress");
  $view->append_column ($col);

  $renderer = Mup::CellRendererProgress->new;
  $col = Gtk2::TreeViewColumn->new;
  $col->pack_start ($renderer, TRUE);
  $col->add_attribute ($renderer, percentage => COL_PERCENTAGE);
  $col->set_title ("Progress");
  $view->append_column ($col);

  Glib::Timeout->add (50, \&increase_progress_timeout);

  return $view;
}


my $window = Gtk2::Window->new;
$window->set_default_size (150, 100);
$window->signal_connect (delete_event => sub {Gtk2->main_quit});

my $view = create_view_and_model();

examples/testdnd.pl  view on Meta::CPAN

}

sub  popup_leave {
  my ($widget, $context, $time) = @_;
  if ($in_popup)
    {
      $in_popup = 0;
      if ($popdown_timer)
	{
	  print ("added popdown\n");
	  $popdown_timer = Gtk2::Timeout->add (500, \&popdown_cb);
	}
    }
}

sub popup_cb {
  if (!$popped_up)
    {
      if (!$popup_window)
	{
	  my ($button, $table, $i, $j);

examples/timeouttest.pl  view on Meta::CPAN

use Gtk2;
use Data::Dumper;

Gtk2->init;

my $str = 'aaa0';


my $window = Gtk2::Window->new ('toplevel');
$window->signal_connect (delete_event => sub { Gtk2->main_quit; 1 });
$window->set_title ('Timeout Test');
$window->set_border_width (6);
$window->set_default_size (200, 200);

my $vbox = Gtk2::VBox->new (0,0);
$window->add ($vbox);

my $label = Gtk2::Label->new ($str);
$vbox->pack_start ($label, 1, 1, 0);

my $button = Gtk2::ToggleButton->new ('Go');

gtk-demo/assistant.pl  view on Meta::CPAN

  }
  Gtk2::Gdk::Threads->enter();
  return $cont;
}


sub on_assistant_apply($$)
{
  my ($widget, $data) = @_;
  # Start a timer to simulate changes taking a few seconds to apply.
  Glib::Timeout->add(100, \&apply_changes_gradually, undef);
}


sub on_assistant_close_cancel($$)
{
  my ($widget, $assistant) = @_;
  $$assistant->destroy();
  undef $$assistant;
}

gtk-demo/images.pl  view on Meta::CPAN

sub start_progressive_loading {
  my $image = shift;
  #
  # This is obviously totally contrived (we slow down loading
  # on purpose to show how incremental loading works).
  # The real purpose of incremental loading is the case where
  # you are reading data from a slow source such as the network.
  # The timeout simply simulates a slow data source by inserting
  # pauses in the reading process.
  #
  $load_timeout = Glib::Timeout->add (150, \&progressive_timeout, $image);
}

sub cleanup_callback {
  my ($object, $data) = @_;

  if ($load_timeout) {
      Glib::Source->remove ($load_timeout);
      $load_timeout = 0;
  }
  

gtk-demo/pixbufs.pl  view on Meta::CPAN

}

use constant CYCLE_LEN => 60;
use constant G_PI => 3.141529;
use POSIX;
sub MAX { $_[0] > $_[1] ? $_[0] : $_[1] }
sub MIN { $_[0] < $_[1] ? $_[0] : $_[1] }

my $frame_num = 0;

# Timeout handler to regenerate the frame
sub timeout {
  $background->copy_area (0, 0, $back_width, $back_height, $frame, 0, 0);

  my $f = ($frame_num % CYCLE_LEN) / CYCLE_LEN;

  my $xmid = $back_width / 2.0;
  my $ymid = $back_height / 2.0;

  my $radius = MIN ($xmid, $ymid) / 2.0;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.241 second using v1.00-cache-1.14-grep-28634ff-cpan-dcd492863ad )