### ----------------------------------------------------
### -- Gnome::Gdk3
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: t/Display.rakutest
### ----------------------------------------------------
use v6;
use NativeCall;
use Test;

use Gnome::N::N-GObject:api<1>;
use Gnome::Gdk3::Display:api<1>;

#use Gnome::N::X:api<1>;
#Gnome::N::debug(:on);

#-------------------------------------------------------------------------------
my Gnome::Gdk3::Display $d;
#-------------------------------------------------------------------------------
subtest 'ISA test', {
  $d .= new;
  isa-ok $d, Gnome::Gdk3::Display, '.new()';
}

#-------------------------------------------------------------------------------
subtest 'Manipulations', {

  $d .= new;
  my Str $d-name = $d.get-name();
  ok ?$d-name, ".get-name\(): '$d-name'";
  #like $d-name, /\: \d+/, '.get-name(): ' ~ $d-name;

  $d .= new( :open, :display-name($d-name));
  $d-name = $d.get-name();
  ok ?$d-name, ":.new\( :open, :display-name): '$d-name'";
  #like $d-name, /\: \d+/, '.new( :open, :display-name): ' ~ $d-name;


  nok $d.is-closed, '.is-closed()';

#(Display.t:14631): Gdk-CRITICAL **: 16:41:06.574: gdk_display_is_closed: assertion 'GDK_IS_DISPLAY (display)' failed
  #$d.gdk-display-close;
  #ok $d.is-closed, '.is-closed()';

}

#`{{
#-------------------------------------------------------------------------------
subtest 'Inherit ...', {
}

#-------------------------------------------------------------------------------
subtest 'Interface ...', {
}

#-------------------------------------------------------------------------------
subtest 'Properties ...', {
}

#-------------------------------------------------------------------------------
subtest 'Themes ...', {
}

#-------------------------------------------------------------------------------
subtest 'Signals ...', {
}
}}

#-------------------------------------------------------------------------------
done-testing;


