curs_termattrs.3x.html 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  2. <!--
  3. ****************************************************************************
  4. * Copyright (c) 1998-2003,2007 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: curs_termattrs.3x,v 1.10 2007/06/02 20:40:07 tom Exp @
  31. -->
  32. <HTML>
  33. <HEAD>
  34. <TITLE>curs_termattrs 3x</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>curs_termattrs 3x</H1>
  40. <HR>
  41. <PRE>
  42. <!-- Manpage converted by man2html 3.0.1 -->
  43. <STRONG><A HREF="curs_termattrs.3x.html">curs_termattrs(3x)</A></STRONG> <STRONG><A HREF="curs_termattrs.3x.html">curs_termattrs(3x)</A></STRONG>
  44. </PRE>
  45. <H2>NAME</H2><PRE>
  46. <STRONG>baudrate</STRONG>, <STRONG>erasechar</STRONG>, <STRONG>erasewchar</STRONG>, <STRONG>has_ic</STRONG>, <STRONG>has_il</STRONG>, <STRONG>killchar</STRONG>,
  47. <STRONG>killwchar</STRONG>, <STRONG>longname</STRONG>, <STRONG>term_attrs</STRONG>, <STRONG>termattrs</STRONG>, <STRONG>termname</STRONG> -
  48. <STRONG>curses</STRONG> environment query routines
  49. </PRE>
  50. <H2>SYNOPSIS</H2><PRE>
  51. <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
  52. <STRONG>int</STRONG> <STRONG>baudrate(void);</STRONG>
  53. <STRONG>char</STRONG> <STRONG>erasechar(void);</STRONG>
  54. <STRONG>int</STRONG> <STRONG>erasewchar(wchar_t</STRONG> <STRONG>*</STRONG><EM>ch</EM><STRONG>);</STRONG>
  55. <STRONG>bool</STRONG> <STRONG>has_ic(void);</STRONG>
  56. <STRONG>bool</STRONG> <STRONG>has_il(void);</STRONG>
  57. <STRONG>char</STRONG> <STRONG>killchar(void);</STRONG>
  58. <STRONG>int</STRONG> <STRONG>killwchar(wchar_t</STRONG> <STRONG>*</STRONG><EM>ch</EM><STRONG>);</STRONG>
  59. <STRONG>char</STRONG> <STRONG>*longname(void);</STRONG>
  60. <STRONG>attr_t</STRONG> <STRONG>term_attrs(void);</STRONG>
  61. <STRONG>chtype</STRONG> <STRONG>termattrs(void);</STRONG>
  62. <STRONG>char</STRONG> <STRONG>*termname(void);</STRONG>
  63. </PRE>
  64. <H2>DESCRIPTION</H2><PRE>
  65. The <STRONG>baudrate</STRONG> routine returns the output speed of the ter-
  66. minal. The number returned is in bits per second, for
  67. example <STRONG>9600</STRONG>, and is an integer.
  68. The <STRONG>erasechar</STRONG> routine returns the user's current erase
  69. character.
  70. The <STRONG>erasewchar</STRONG> routine stores the current erase character
  71. in the location referenced by <EM>ch</EM>. If no erase character
  72. has been defined, the routine fails and the location ref-
  73. erenced by <EM>ch</EM> is not changed.
  74. The <STRONG>has_ic</STRONG> routine is true if the terminal has insert- and
  75. delete- character capabilities.
  76. The <STRONG>has_il</STRONG> routine is true if the terminal has insert- and
  77. delete-line capabilities, or can simulate them using
  78. scrolling regions. This might be used to determine if it
  79. would be appropriate to turn on physical scrolling using
  80. <STRONG>scrollok</STRONG>.
  81. The <STRONG>killchar</STRONG> routine returns the user's current line kill
  82. character.
  83. The <STRONG>killwchar</STRONG> routine stores the current line-kill charac-
  84. ter in the location referenced by <EM>ch</EM>. If no line-kill
  85. character has been defined, the routine fails and the
  86. location referenced by <EM>ch</EM> is not changed.
  87. The <STRONG>longname</STRONG> routine returns a pointer to a static area
  88. containing a verbose description of the current terminal.
  89. The maximum length of a verbose description is 128 charac-
  90. ters. It is defined only after the call to <STRONG>initscr</STRONG> or
  91. <STRONG>newterm</STRONG>. The area is overwritten by each call to <STRONG>newterm</STRONG>
  92. and is not restored by <STRONG>set_term</STRONG>, so the value should be
  93. saved between calls to <STRONG>newterm</STRONG> if <STRONG>longname</STRONG> is going to be
  94. used with multiple terminals.
  95. If a given terminal does not support a video attribute
  96. that an application program is trying to use, <STRONG>curses</STRONG> may
  97. substitute a different video attribute for it. The
  98. <STRONG>termattrs</STRONG> and <STRONG>term_attrs</STRONG> functions return a logical <STRONG>OR</STRONG> of
  99. all video attributes supported by the terminal using <EM>A</EM><STRONG>_</STRONG>
  100. and <EM>WA</EM><STRONG>_</STRONG> constants respectively. This information is use-
  101. ful when a <STRONG>curses</STRONG> program needs complete control over the
  102. appearance of the screen.
  103. The <STRONG>termname</STRONG> routine returns the terminal name used by
  104. <STRONG>setupterm</STRONG>.
  105. </PRE>
  106. <H2>RETURN VALUE</H2><PRE>
  107. <STRONG>longname</STRONG> and <STRONG>termname</STRONG> return <STRONG>NULL</STRONG> on error.
  108. Routines that return an integer return <STRONG>ERR</STRONG> upon failure
  109. and <STRONG>OK</STRONG> (SVr4 only specifies "an integer value other than
  110. <STRONG>ERR</STRONG>") upon successful completion.
  111. </PRE>
  112. <H2>NOTES</H2><PRE>
  113. Note that <STRONG>termattrs</STRONG> may be a macro.
  114. </PRE>
  115. <H2>PORTABILITY</H2><PRE>
  116. The XSI Curses standard, Issue 4 describes these func-
  117. tions. It changes the return type of <STRONG>termattrs</STRONG> to the new
  118. type <STRONG>attr_t</STRONG>. Most versions of curses truncate the result
  119. returned by <STRONG>termname</STRONG> to 14 characters.
  120. </PRE>
  121. <H2>SEE ALSO</H2><PRE>
  122. <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>, <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>
  123. <STRONG><A HREF="curs_termattrs.3x.html">curs_termattrs(3x)</A></STRONG>
  124. </PRE>
  125. <HR>
  126. <ADDRESS>
  127. Man(1) output converted with
  128. <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
  129. </ADDRESS>
  130. </BODY>
  131. </HTML>