]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/adacurses6-config.1.html
ncurses 6.4 - patch 20231001
[ncurses.git] / doc / html / man / adacurses6-config.1.html
1 <!--
2   ****************************************************************************
3   * Copyright 2019-2021,2023 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.28 2023/09/30 23:55:34 tom Exp @
31   * Start example.
32   * End example.
33 -->
34 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
35 <HTML>
36 <HEAD>
37 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
38 <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
39 <TITLE>adacurses6\-config 1 2023-09-30 ncurses 6.4 User commands</TITLE>
40 <link rel="author" href="mailto:bug-ncurses@gnu.org">
41
42 </HEAD>
43 <BODY>
44 <H1 class="no-header">adacurses6\-config 1 2023-09-30 ncurses 6.4 User commands</H1>
45 <PRE>
46 <STRONG><A HREF="adacurses6-config.1.html">adacurses6-config(1)</A></STRONG>             User commands            <STRONG><A HREF="adacurses6-config.1.html">adacurses6-config(1)</A></STRONG>
47
48
49
50
51 </PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
52        <STRONG>adacurses6-config</STRONG> - configuration helper for <EM>AdaCurses</EM> libraries
53
54
55 </PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
56        <STRONG>adacurses6-config</STRONG> [<STRONG>--cflags</STRONG>] [<STRONG>--libs</STRONG>]
57
58        <STRONG>adacurses6-config</STRONG> <STRONG>--version</STRONG>
59
60        <STRONG>adacurses6-config</STRONG> <STRONG>--help</STRONG>
61
62
63 </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
64        This  program  development  aid  simplifies  the process of configuring
65        applications to use the <EM>AdaCurses</EM> library binding to <EM>ncurses</EM>.
66
67
68 </PRE><H2><a name="h2-OPTIONS">OPTIONS</a></H2><PRE>
69        <STRONG>--cflags</STRONG>   reports the GNAT (Ada compiler) flags needed to compile with
70                   <EM>AdaCurses</EM>.
71
72        <STRONG>--libs</STRONG>     reports the GNAT libraries needed to link with <EM>AdaCurses</EM>.
73
74        <STRONG>--version</STRONG>  reports  the  release  and  patch  date  information  of the
75                   <EM>ncurses</EM> libraries used to configure and build <EM>AdaCurses</EM>  and
76                   exits successfully.
77
78        <STRONG>--help</STRONG>     issues a usage message and exits successfully.
79
80        Omitting options implies "<STRONG>--cflags</STRONG> <STRONG>--libs</STRONG>".
81
82
83 </PRE><H2><a name="h2-EXAMPLE">EXAMPLE</a></H2><PRE>
84        Consider a program using <EM>AdaCurses</EM> to write the message "Hello, world!"
85        in the center of the screen and wait for the user to press the "q"  key
86        before exiting.  Populate a file <EM>hello.adb</EM> with the following.
87
88            with Terminal_Interface.Curses; use Terminal_Interface.Curses;
89
90            procedure Hello is
91               Visibility : Cursor_Visibility := Invisible;
92               Message : constant String := "Hello, World!";
93               done : Boolean := False;
94               c : Key_Code;
95            begin
96               Init_Screen;
97               Set_Echo_Mode (False);
98               Set_Cursor_Visibility (Visibility);
99               Set_Timeout_Mode (Standard_Window, Non_Blocking, 0);
100
101               Move_Cursor (Line =&gt; Lines / 2,
102                            Column =&gt; (Columns - Message'Length) / 2);
103               Add (Str =&gt; Message);
104
105               while not done loop
106                  c := Get_Keystroke (Standard_Window);
107
108                  case c is
109                      when Character'Pos ('q') =&gt; done := True;
110                      when others =&gt; null;
111                  end case;
112
113                  Nap_Milli_Seconds (50);
114               end loop;
115
116               End_Windows;
117
118            end Hello;
119
120        Then, using
121            gnatmake `adacurses6-config --cflags` hello \
122                -largs `adacurses6-config --libs`
123        or, more simply,
124            gnatmake hello `adacurses6-config`
125        you can compile and link the program.
126
127
128 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
129        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
130
131
132
133 ncurses 6.4                       2023-09-30              <STRONG><A HREF="adacurses6-config.1.html">adacurses6-config(1)</A></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>