GtkPerlPruebas/gtk_prueba.pl

37 lines
967 B
Perl
Raw Permalink Normal View History

2021-07-19 22:41:01 +02:00
use v5.30.0;
2021-07-16 04:44:55 +02:00
use strict;
use warnings;
2021-07-19 22:41:01 +02:00
use MangaReader;
2021-07-16 04:44:55 +02:00
my $application =
Gtk4::Application->new( 'me.sergiotarxz.manga', 'G_APPLICATION_FLAGS_NONE' );
2021-07-19 22:41:01 +02:00
say $application->signal_connect(
2021-07-16 04:44:55 +02:00
activate => sub {
2021-07-19 22:41:01 +02:00
MangaReader::ApplicationStart($application);
2021-07-16 04:44:55 +02:00
}
);
$application->run( \@ARGV );
2021-07-19 22:41:01 +02:00
# sub ShowImage {
# my $scroll_image = Gtk4::Viewport->new();
# $scroll->set_child($grid);
# my $image = Gtk4::Picture->new_for_file(
# G::File::new_for_path(
# '/home/sergio/2020-05-06-235314_636x1023_scrot.png')
# );
# $image->set_can_shrink(1);
# $image->set_keep_aspect_ratio(1);
# $scroll_image->set_child($image);
#
# $grid->attach( $scroll_image, 1, 1, 1, 1 );
# $window->signal_connect(
# 'state-flags-changed' => sub {
# WindowResize( $window, $image, $scroll_image, $grid );
# }
# );
# $window->show;
# }