X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fcurs_inch.3x.html;h=0c5295818336eb30bfbe20d0805de143896c4477;hp=2d69e2cf7c21040e6b89f45956d450c9f1634db1;hb=HEAD;hpb=71c0306f0824ef2b10c4c5813fb003db48f3012e diff --git a/doc/html/man/curs_inch.3x.html b/doc/html/man/curs_inch.3x.html index 2d69e2cf..35af0bbc 100644 --- a/doc/html/man/curs_inch.3x.html +++ b/doc/html/man/curs_inch.3x.html @@ -1,8 +1,8 @@ - - + -curs_inch 3x - - + + +curs_inch 3x 2024-05-18 ncurses 6.5 Library calls + + -

curs_inch 3x

-
+

curs_inch 3x 2024-05-18 ncurses 6.5 Library calls

-
-curs_inch(3x)                                             curs_inch(3x)
+curs_inch(3x)                    Library calls                   curs_inch(3x)
 
 
 
 
-
-

NAME

-       inch,  winch,  mvinch,  mvwinch  -  get  a  character  and
-       attributes from a curses window
+

NAME

+       inch, winch, mvinch, mvwinch - get a curses character from a window
 
 
-
-

SYNOPSIS

+

SYNOPSIS

        #include <curses.h>
 
        chtype inch(void);
-       chtype winch(WINDOW *win);
-       chtype mvinch(int y, int x);
-       chtype mvwinch(WINDOW *win, int y, int x);
+       chtype winch(WINDOW * win);
+       chtype mvinch(int y, int x);
+       chtype mvwinch(WINDOW * win, int y, int x);
 
 
-
-

DESCRIPTION

-       These routines return the character, of  type  chtype,  at
-       the   current  position  in  the  named  window.   If  any
-       attributes are set for that  position,  their  values  are
-       OR'ed  into  the  value  returned.   Constants  defined in
-       <curses.h> can be used with the & (logical  AND)  operator
-       to extract the character or attributes alone.
+

DESCRIPTION

+       winch  returns the curses character, including its attributes and color
+       pair identifier, at the cursor position in the window win.   Subsection
+       "Video  Attributes"  of  attron(3x)  explains how to extract these data
+       from a chtype.  ncurses(3x) describes the variants of this function.
 
-   Attributes
-       The  following  bit-masks  may  be  AND-ed with characters
-       returned by winch.
 
-       A_CHARTEXT     Bit-mask to extract character
-       A_ATTRIBUTES   Bit-mask to extract attributes
-       A_COLOR        Bit-mask to extract color-pair field information
+

RETURN VALUE

+       These functions return OK on success and ERR on failure.
 
+       In ncurses, winch returns ERR if win is NULL.
 
-
-

NOTES

-       Note that all of these routines may be macros.
+       Functions prefixed with "mv" first perform cursor movement and fail  if
+       the position (y, x) is outside the window boundaries.
 
 
-
-

PORTABILITY

-       These functions are described in the XSI Curses  standard,
-       Issue 4.
+

NOTES

+       inch, mvinch, and mvwinch may be implemented as macros.
 
+       These  functions do not return an error if the window contains cells of
+       curses complex characters; that is, if  they  contain  characters  with
+       codes wider than eight bits (or greater than 255 as an unsigned decimal
+       integer).  They instead extract only the low-order eight  bits  of  the
+       character code from the cell.
 
-
-

SEE ALSO

-       curses(3x).
 
-       Comparable  functions  in  the  wide-character  (ncursesw)
-       library are described in curs_in_wch(3x).
+

PORTABILITY

+       X/Open  Curses,  Issue  4  describes  these functions.  It specifies no
+       error conditions for them.
+
+
+

HISTORY

+       The original curses in 4BSD (1980) defined winch as a  macro  accessing
+       the  WINDOW  structure member representing character cell data, at that
+       time a char, containing  only  a  7-bit  ASCII  character  code  and  a
+       "standout" attribute bit, the only one the library supported.
+
+       SVr2  curses (1984) extended this approach, widening the character code
+       to eight bits and permitting several attributes to be combined with  it
+       by  storing  them  together  in  a  chtype, an alias of unsigned short.
+       Because a macro was used, its value was not type-checked as a  function
+       return  value  could have been.  Goodheart documented SVr3 (1987) winch
+       as returning an  int.   SVr3.1's  (1987)  chtype  became  an  alias  of
+       unsigned  long,  using  16 bits for the character code and widening the
+       type in practical terms to 32 bits, as 64-bit Unix systems were not yet
+       in wide use, and fixed-width integral types would not be standard until
+       ISO C99.  SVr3.2 (1988) added a 6-bit color pair  identifier  alongside
+       the attributes.
+
+       X/Open Curses does not specify the sizes of the character code or color
+       pair identifier, nor the quantity of attribute bits, in  chtype;  these
+       are   implementation-dependent.    ncurses  uses  eight  bits  for  the
+       character code.  An application requiring a wider character  type,  for
+       instance   to   represent   Unicode,   should  use  the  wide-character
+       counterparts of these functions.
+
+
+

SEE ALSO

+       curs_in_wch(3x) describes comparable functions of the  ncurses  library
+       in its wide-character configuration (ncursesw).
+
+       curses(3x), curs_instr(3x)
 
 
 
-                                                          curs_inch(3x)
+ncurses 6.5                       2024-05-18                     curs_inch(3x)
 
-
-
-Man(1) output converted with -man2html -
+