File: Window.pm

package info (click to toggle)
shutter 0.99.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,880 kB
  • sloc: perl: 19,514; sh: 204; makefile: 52; xml: 40
file content (24 lines) | stat: -rw-r--r-- 438 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package Test::Window;

use 5.010;
use strict;
use warnings;

use Gtk3;

sub simple_window {
    Gtk3::init;

    my $w = Gtk3::Window->new('toplevel');
    $w->set_title("Foo");
    $w->set_position('center');
    $w->set_modal(1);
    $w->signal_connect( 'delete_event', sub { Gtk3->main_quit } );
    $w->set_default_size( 640, 480 );
    $w->show_all;
    $w->get_window->focus( Gtk3::get_current_event_time() );

    return $w;
}

1;