Commit 6d4ea49e authored by Torsten Schönfeld's avatar Torsten Schönfeld

Add an implementation of Gtk3::StyleContext::get

parent 9aa1a85b
......@@ -1493,6 +1493,16 @@ C<set_translate_func>.
}
}
=item * A Perl reimplementation of C<Gtk3::StyleContext::get> is provided.
=cut
sub Gtk3::StyleContext::get {
my ($context, $state, @properties) = @_;
my @values = map { $context->get_property ($_, $state) } @properties;
return @values[0..$#values];
}
=item * A Perl reimplementation of C<Gtk3::TextBuffer::create_tag> is provided.
=cut
......
......@@ -7,7 +7,7 @@ use warnings;
use utf8;
use Encode;
plan tests => 214;
plan tests => 215;
note('Gtk3::CHECK_VERSION and check_version');
{
......@@ -320,6 +320,14 @@ note('Gtk3::Stock');
Gtk3::Stock::set_translate_func ('perl-domain', sub {}, 42);
}
note('Gtk3::StyleContext::get');
{
my $l = Gtk3::Label->new ('Test');
my $c = $l->get_style_context;
my @v = $c->get ('normal', Gtk3::STYLE_PROPERTY_COLOR, Gtk3::STYLE_PROPERTY_FONT);
is (scalar @v, 2, 'two items returned');
}
note('Gtk3::ToggleButton::new');
{
my $button = Gtk3::ToggleButton->new;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment