]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/adacurses-config.1.html
ncurses 5.9 - patch 20140809
[ncurses.git] / doc / html / man / adacurses-config.1.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
2 <!-- 
3   ****************************************************************************
4   * Copyright (c) 2010-2011,2014 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.8 2014/06/07 19:32:52 tom Exp @
31 -->
32 <HTML>
33 <HEAD>
34 <TITLE>ADACURSES 1   User Commands</TITLE>
35 <link rev=made href="mailto:bug-ncurses@gnu.org">
36 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
37 </HEAD>
38 <BODY>
39 <H1>ADACURSES 1   User Commands</H1>
40 <HR>
41 <PRE>
42 <!-- Manpage converted by man2html 3.0.1 -->
43 <STRONG><A HREF="ADACURSES.1.html">ADACURSES(1)</A></STRONG>                 User Commands                 <STRONG><A HREF="ADACURSES.1.html">ADACURSES(1)</A></STRONG>
44
45
46
47
48 </PRE>
49 <H2>NAME</H2><PRE>
50        adacurses-config - helper script for AdaCurses libraries
51
52
53 </PRE>
54 <H2>SYNOPSIS</H2><PRE>
55        <STRONG>adacurses-config</STRONG> [<EM>options</EM>]
56
57
58 </PRE>
59 <H2>DESCRIPTION</H2><PRE>
60        This  is  a  shell  script which simplifies configuring an
61        application  to  use  the  AdaCurses  library  binding  to
62        ncurses.
63
64
65 </PRE>
66 <H2>OPTIONS</H2><PRE>
67        <STRONG>--cflags</STRONG>
68               echos  the gnat (Ada compiler) flags needed to com-
69               pile with AdaCurses.
70
71        <STRONG>--libs</STRONG> echos  the  gnat  libraries  needed  to  link  with
72               AdaCurses.
73
74        <STRONG>--version</STRONG>
75               echos  the release+patchdate version of the ncurses
76               libraries used to configure and build AdaCurses.
77
78        <STRONG>--help</STRONG> prints a  list  of  the  <STRONG>adacurses-config</STRONG>  script's
79               options.
80
81        If  no options are given, <STRONG>adacurses-config</STRONG> prints the com-
82        bination of <STRONG>--cflags</STRONG> and <STRONG>--libs</STRONG> that <STRONG>gnatmake</STRONG> expects (see
83        example).
84
85
86 </PRE>
87 <H2>EXAMPLE</H2><PRE>
88        For example, supposing that you want to compile the "Hello
89        World!"   program  for  AdaCurses.   Make  a  file   named
90        "hello.adb":
91               with Terminal_Interface.Curses; use Terminal_Interface.Curses;
92
93               procedure Hello is
94
95                  Visibility : Cursor_Visibility := Invisible;
96                  done : Boolean := False;
97                  c : Key_Code;
98
99               begin
100
101                  Init_Screen;
102                  Set_Echo_Mode (False);
103
104                  Set_Cursor_Visibility (Visibility);
105                  Set_Timeout_Mode (Standard_Window, Non_Blocking, 0);
106
107                  Move_Cursor (Line =&gt; Lines / 2, Column =&gt; (Columns - 12) / 2);
108                  Add (Str =&gt; "Hello World!");
109
110                  while not done loop
111
112                     c := Get_Keystroke (Standard_Window);
113                     case c is
114                     when Character'Pos ('q') =&gt; done := True;
115                     when others =&gt; null;
116                     end case;
117
118                     Nap_Milli_Seconds (50);
119
120                  end loop;
121
122                  End_Windows;
123
124               end Hello;
125
126        Then, using
127               gnatmake  `adacurses-config  --cflags` hello -largs
128               `adacurses-config --libs`
129
130        or (simpler):
131               gnatmake hello `adacurses-config`
132
133        you will compile and link the program.
134
135
136 </PRE>
137 <H2>SEE ALSO</H2><PRE>
138        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
139
140        This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
141
142
143
144                                                            <STRONG><A HREF="ADACURSES.1.html">ADACURSES(1)</A></STRONG>
145 </PRE>
146 <HR>
147 <ADDRESS>
148 Man(1) output converted with
149 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
150 </ADDRESS>
151 </BODY>
152 </HTML>