• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!--
2  ****************************************************************************
3  * Copyright 2019-2023,2024 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.35 2024/04/20 21:13:27 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>adacursesw6\-config 1 2024-04-20 ncurses 6.5 User commands</TITLE>
38<link rel="author" href="mailto:bug-ncurses@gnu.org">
39
40</HEAD>
41<BODY>
42<H1 class="no-header">adacursesw6\-config 1 2024-04-20 ncurses 6.5 User commands</H1>
43<PRE>
44<STRONG><A HREF="adacursesw6-config.1.html">adacursesw6-config(1)</A></STRONG>            User commands           <STRONG><A HREF="adacursesw6-config.1.html">adacursesw6-config(1)</A></STRONG>
45
46
47
48
49</PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
50       <STRONG>adacursesw6-config</STRONG> - configuration helper for <EM>AdaCurses</EM> libraries
51
52
53</PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
54       <STRONG>adacursesw6-config</STRONG> [<STRONG>--cflags</STRONG>] [<STRONG>--libs</STRONG>]
55
56       <STRONG>adacursesw6-config</STRONG> <STRONG>--version</STRONG>
57
58       <STRONG>adacursesw6-config</STRONG> <STRONG>--help</STRONG>
59
60
61</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
62       This  program  development  aid  simplifies  the process of configuring
63       applications to use the <EM>AdaCurses</EM> library binding to <EM>ncurses</EM>.
64
65
66</PRE><H2><a name="h2-OPTIONS">OPTIONS</a></H2><PRE>
67       <STRONG>--cflags</STRONG>   reports the GNAT (Ada compiler) flags needed to compile with
68                  <EM>AdaCurses</EM>.
69
70       <STRONG>--libs</STRONG>     reports the GNAT libraries needed to link with <EM>AdaCurses</EM>.
71
72       <STRONG>--version</STRONG>  reports  the  release  and  patch  date  information  of the
73                  <EM>ncurses</EM> libraries used to configure and build <EM>AdaCurses</EM>  and
74                  exits successfully.
75
76       <STRONG>--help</STRONG>     issues a usage message and exits successfully.
77
78       Omitting options implies "<STRONG>--cflags</STRONG> <STRONG>--libs</STRONG>".
79
80
81</PRE><H2><a name="h2-EXAMPLES">EXAMPLES</a></H2><PRE>
82       Consider a program using <EM>AdaCurses</EM> to write the message "Hello, world!"
83       in the center of the screen and wait for the user to press the "q"  key
84       before exiting.  Populate a file <EM>hello.adb</EM> with the following.
85
86           with Terminal_Interface.Curses; use Terminal_Interface.Curses;
87
88           procedure Hello is
89              Visibility : Cursor_Visibility := Invisible;
90              Message : constant String := "Hello, World!";
91              done : Boolean := False;
92              c : Key_Code;
93           begin
94              Init_Screen;
95              Set_Echo_Mode (False);
96              Set_Cursor_Visibility (Visibility);
97              Set_Timeout_Mode (Standard_Window, Non_Blocking, 0);
98
99              Move_Cursor (Line =&gt; Lines / 2,
100                           Column =&gt; (Columns - Message'Length) / 2);
101              Add (Str =&gt; Message);
102
103              while not done loop
104                 c := Get_Keystroke (Standard_Window);
105
106                 case c is
107                     when Character'Pos ('q') =&gt; done := True;
108                     when others =&gt; null;
109                 end case;
110
111                 Nap_Milli_Seconds (50);
112              end loop;
113
114              End_Windows;
115
116           end Hello;
117
118       Then, using
119           gnatmake `adacursesw6-config --cflags` hello \
120               -largs `adacursesw6-config --libs`
121       or, more simply,
122           gnatmake hello `adacursesw6-config`
123       you can 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
130
131ncurses 6.5                       2024-04-20             <STRONG><A HREF="adacursesw6-config.1.html">adacursesw6-config(1)</A></STRONG>
132</PRE>
133<div class="nav">
134<ul>
135<li><a href="#h2-NAME">NAME</a></li>
136<li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
137<li><a href="#h2-DESCRIPTION">DESCRIPTION</a></li>
138<li><a href="#h2-OPTIONS">OPTIONS</a></li>
139<li><a href="#h2-EXAMPLES">EXAMPLES</a></li>
140<li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
141</ul>
142</div>
143</BODY>
144</HTML>
145