Gtk3

 view release on metacpan or  search on metacpan

t/overrides.t  view on Meta::CPAN

note('Gtk3::CheckButton::new');
{
  my $button = Gtk3::CheckButton->new;
  ok (!defined ($button->get_label));
  $button = Gtk3::CheckButton->new ('_Test');
  is ($button->get_label, '_Test');
}

note('Gtk3::Clipboard::set_text');
{
  my $clipboard = Gtk3::Clipboard::get (Gtk3::Gdk::Atom::intern ('PRIMARY', Glib::FALSE));
  $clipboard->set_text ('→←');
  is ($clipboard->wait_for_text, '→←');
  $clipboard->set_text ('→←', 3); # wants length in bytes
  is ($clipboard->wait_for_text, '→');
}

note('Gtk3::ColorButton::new');
{
  my $button = Gtk3::ColorButton->new;
  is ($button->get_color->red, 0);
  my $color = Gtk3::Gdk::Color->new (red => 2**16-1, green => 0, blue => 0);
  $button = Gtk3::ColorButton->new ($color);
  is ($button->get_color->red, $color->red);
}

t/zz-GtkTextBuffer.t  view on Meta::CPAN

my $tag_two = $buffer -> create_tag("bulb", indent => 2);
my $tag_three = $buffer -> create_tag(undef, indent => 2);
isa_ok($tag_two, "Gtk3::TextTag");
isa_ok($tag_three, "Gtk3::TextTag");

$buffer -> remove_tag($tag_one, $bounds->());
$buffer -> remove_tag_by_name("bulb", $bounds->());
$buffer -> remove_all_tags($bounds->());

SKIP: {
  skip 'clipboard stuff; missing annotations', 0
    unless Gtk3::CHECK_VERSION (3, 2, 0);

  my $clipboard = Gtk3::Clipboard::get(Gtk3::Gdk::Atom::intern('clipboard', Glib::FALSE));

  $buffer -> paste_clipboard($clipboard, $buffer -> get_end_iter(), TRUE);
  $buffer -> paste_clipboard($clipboard, undef, TRUE);
  $buffer -> copy_clipboard($clipboard);
  $buffer -> cut_clipboard($clipboard, TRUE);

  $buffer -> add_selection_clipboard($clipboard);
  $buffer -> remove_selection_clipboard($clipboard);
}

$buffer -> begin_user_action();
$buffer -> end_user_action();

{
  $buffer -> backspace($end->(), TRUE, TRUE);
}

{



( run in 3.324 seconds using v1.01-cache-2.11-cpan-2398b32b56e )