]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/samples/ncurses2-attr_test.adb
ncurses 5.6 - patch 20080112
[ncurses.git] / Ada95 / samples / ncurses2-attr_test.adb
index bb7769194e2ccc2e492adb2234894105567fb2c8..c5fbc2c15b1bcd9aa467e321d2a465e934e96349 100644 (file)
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 2000,2001,2004 Free Software Foundation, Inc.              --
+-- Copyright (c) 2000-2006,2007 Free Software Foundation, Inc.              --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,8 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
 --  Version Control
---  $Revision: 1.5 $
---  $Date: 2004/08/21 21:37:00 $
+--  $Revision: 1.8 $
+--  $Date: 2007/05/05 21:28:18 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with ncurses2.util; use ncurses2.util;
@@ -56,11 +56,10 @@ procedure ncurses2.attr_test is
                         attr : Character_Attribute_Set;
                         name : String;
                         once : Boolean) return Line_Position;
-   procedure attr_getc (skip : out Integer;
+   procedure attr_getc (skip : in out Integer;
                         fg, bg : in out Color_Number;
                         result : out Boolean);
 
-
    function subset (super, sub : Character_Attribute_Set) return Boolean is
    begin
       if
@@ -86,7 +85,6 @@ procedure ncurses2.attr_test is
       end if;
    end subset;
 
-
    function intersect (b, a : Character_Attribute_Set) return Boolean is
    begin
       if
@@ -235,20 +233,18 @@ procedure ncurses2.attr_test is
       return row + 2;
    end show_attr;
 
-   procedure attr_getc (skip : out Integer; fg, bg : in out Color_Number;
-                                            result : out Boolean) is
+   procedure attr_getc (skip : in out Integer;
+                        fg, bg : in out Color_Number;
+                        result : out Boolean) is
       ch : constant Key_Code := Getchar;
       nc : constant Color_Number := Color_Number (Number_Of_Colors);
-      curscr : Window;
-      pragma Import (C, curscr, "curscr");
-      --  curscr is not implemented in the Ada binding
    begin
       result := True;
       if Ada.Characters.Handling.Is_Digit (Character'Val (ch)) then
          skip := ctoi (Code_To_Char (ch));
       elsif ch = CTRL ('L') then
          Touch;
-         Touch (curscr);
+         Touch (Current_Window);
          Refresh;
       elsif Has_Colors then
          case ch is
@@ -265,8 +261,6 @@ procedure ncurses2.attr_test is
       end if;
    end attr_getc;
 
-
-
    --      pairs could be defined as array ( Color_Number(0) .. colors - 1) of
    --      array (Color_Number(0).. colors - 1) of Boolean;
    pairs : array (Color_Pair'Range) of Boolean := (others => False);