]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/adacurses6-config.1.html
ncurses 6.2 - patch 20201219
[ncurses.git] / doc / html / man / adacurses6-config.1.html
1 <!-- 
2   ****************************************************************************
3   * Copyright 2019,2020 Thomas E. Dickey                                     *
4   * Copyright 2010-2014,2016 Free Software Foundation, Inc.                  *
5   *                                                                          *
6   * Permission is hereby granted, free of charge, to any person obtaining a  *
7   * copy of this software and associated documentation files (the            *
8   * "Software"), to deal in the Software without restriction, including      *
9   * without limitation the rights to use, copy, modify, merge, publish,      *
10   * distribute, distribute with modifications, sublicense, and/or sell       *
11   * copies of the Software, and to permit persons to whom the Software is    *
12   * furnished to do so, subject to the following conditions:                 *
13   *                                                                          *
14   * The above copyright notice and this permission notice shall be included  *
15   * in all copies or substantial portions of the Software.                   *
16   *                                                                          *
17   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
18   * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
19   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
20   * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
21   * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
22   * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
23   * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
24   *                                                                          *
25   * Except as contained in this notice, the name(s) of the above copyright   *
26   * holders shall not be used in advertising or otherwise to promote the     *
27   * sale, use or other dealings in this Software without prior written       *
28   * authorization.                                                           *
29   ****************************************************************************
30   * @Id: MKada_config.in,v 1.12 2020/02/02 23:34:34 tom Exp @
31 -->
32 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
33 <HTML>
34 <HEAD>
35 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
36 <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
37 <TITLE>ADACURSES 1   User Commands</TITLE>
38 <link rel="author" href="mailto:bug-ncurses@gnu.org">
39 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
40 </HEAD>
41 <BODY>
42 <H1 class="no-header">ADACURSES 1   User Commands</H1>
43 <PRE>
44 <STRONG>ADACURSES(1)</STRONG>                     User Commands                    <STRONG>ADACURSES(1)</STRONG>
45
46
47
48
49 </PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
50        adacurses6-config - helper script for AdaCurses libraries
51
52
53 </PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
54        <STRONG>adacurses6-config</STRONG> [<EM>options</EM>]
55
56
57 </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
58        This  is  a shell script which simplifies configuring an application to
59        use the AdaCurses library binding to ncurses.
60
61
62 </PRE><H2><a name="h2-OPTIONS">OPTIONS</a></H2><PRE>
63        <STRONG>--cflags</STRONG>
64               echos the gnat (Ada  compiler)  flags  needed  to  compile  with
65               AdaCurses.
66
67        <STRONG>--libs</STRONG> echos the gnat libraries needed to link with AdaCurses.
68
69        <STRONG>--version</STRONG>
70               echos  the  release+patchdate  version  of the ncurses libraries
71               used to configure and build AdaCurses.
72
73        <STRONG>--help</STRONG> prints a list of the <STRONG>adacurses6-config</STRONG> script's options.
74
75        If no options are given, <STRONG>adacurses6-config</STRONG> prints  the  combination  of
76        <STRONG>--cflags</STRONG> and <STRONG>--libs</STRONG> that <STRONG>gnatmake</STRONG> expects (see example).
77
78
79 </PRE><H2><a name="h2-EXAMPLE">EXAMPLE</a></H2><PRE>
80        For  example,  supposing  that  you  want to compile the "Hello World!"
81        program for AdaCurses.  Make a file named "hello.adb":
82               with Terminal_Interface.Curses; use Terminal_Interface.Curses;
83
84               procedure Hello is
85
86                  Visibility : Cursor_Visibility := Invisible;
87                  done : Boolean := False;
88                  c : Key_Code;
89
90               begin
91
92                  Init_Screen;
93                  Set_Echo_Mode (False);
94
95                  Set_Cursor_Visibility (Visibility);
96                  Set_Timeout_Mode (Standard_Window, Non_Blocking, 0);
97
98                  Move_Cursor (Line =&gt; Lines / 2, Column =&gt; (Columns - 12) / 2);
99                  Add (Str =&gt; "Hello World!");
100
101                  while not done loop
102
103                     c := Get_Keystroke (Standard_Window);
104                     case c is
105                     when Character'Pos ('q') =&gt; done := True;
106                     when others =&gt; null;
107                     end case;
108
109                     Nap_Milli_Seconds (50);
110                  end loop;
111
112                  End_Windows;
113
114               end Hello;
115
116        Then, using
117               gnatmake `adacurses-config --cflags`  hello  -largs  `adacurses-
118               config --libs`
119
120        or (simpler):
121               gnatmake hello `adacurses-config`
122
123        you will compile and link the program.
124
125
126 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
127        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
128
129        This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20201219).
130
131
132
133                                                                   <STRONG>ADACURSES(1)</STRONG>
134 </PRE>
135 <div class="nav">
136 <ul>
137 <li><a href="#h2-NAME">NAME</a></li>
138 <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
139 <li><a href="#h2-DESCRIPTION">DESCRIPTION</a></li>
140 <li><a href="#h2-OPTIONS">OPTIONS</a></li>
141 <li><a href="#h2-EXAMPLE">EXAMPLE</a></li>
142 <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
143 </ul>
144 </div>
145 </BODY>
146 </HTML>