1vidattr(3XCURSES)       X/Open Curses Library Functions      vidattr(3XCURSES)
2
3
4

NAME

6       vidattr,  vid_attr, vidputs, vid_puts - output attributes to the termi‐
7       nal
8

SYNOPSIS

10       cc [ flag... ] file... -I /usr/xpg4/include  -L  /usr/xpg4/lib \
11        -R  /usr/xpg4/lib  -lcurses  [ library... ]
12
13       c89 [ flag... ] file... -lcurses [ library... ]
14
15       #include <curses.h>
16
17       int vidattr(chtype attr);
18
19
20       int vid_attr(attr_t attr, short color_pair_number, void *opt);
21
22
23       int vidputs(chtype attr, int (*putfunc) (int));
24
25
26       int vid_puts(attr_t attr, short color_pair_number, void *opt,
27            int (*putfunc) (int));
28
29

PARAMETERS

31       attr                 Is the rendition of the foreground window.
32
33
34       color_pair_number    Is a color pair.
35
36
37       opt                  Is reserved for future use.  Currently, this  must
38                            be a null pointer.
39
40
41       putfunc              Is a user-supplied output function.
42
43

DESCRIPTION

45       These  functions output commands to the terminal that change the termi‐
46       nal's attributes.
47
48
49       If the terminfo database indicates that the terminal in use can display
50       characters  in  the rendition specified by attr, then vidattr() outputs
51       one or more commands to request that the  terminal  display  subsequent
52       characters   in   that  rendition.  The  function  outputs  by  calling
53       putchar(3C). The vidattr() function neither relies on your updates  the
54       model which Curses maintains of the prior rendition mode.
55
56
57       The  vidputs()  function  computes  the  terminal  output  string  that
58       vidattr() does, based on attr, but vidputs()  outputs  by  calling  the
59       user-supplied function putfunc. The vid_attr() and vid_puts() functions
60       correspond to vidattr() and vidputs() respectively, but take a  set  of
61       arguments, one of type attr_t for the attributes, one of type short for
62       the color pair number, and a void *, and  thus  support  the  attribute
63       constants with the WA_ prefix.
64
65
66       The  opts argument is reserved for definition in a future release. Cur‐
67       rently, it is implemented as a null pointer.
68
69
70       The user-supplied function putfunc (which can be specified as an  argu‐
71       ment  to  either  vidputs()  or vid_puts()) is either putchar() or some
72       other function  with  the  same  prototype.   Both  the  vidputs()  and
73       vid_puts() functions ignore the return value of putfunc.
74

RETURN VALUES

76       Upon  successful completion, these functions return OK. Otherwise, they
77       return ERR.
78

ERRORS

80       No errors are defined.
81

USAGE

83       After use of any of these functions, the model Curses maintains of  the
84       state of the terminal might not match the actual state of the terminal.
85       The application should touch and refresh  the  window  before  resuming
86       conventional use of Curses.
87
88
89       Of these functions requires that the application contain so much infor‐
90       mation about a particular class of terminal that it defeats the purpose
91       of using Curses.
92
93
94       On  some terminals, a command to change rendition conceptually occupies
95       space in the screen buffer (with or without width). Thus, a command  to
96       set  the terminal to a new rendition would change the rendition of some
97       characters already displayed.
98

ATTRIBUTES

100       See attributes(5) for descriptions of the following attributes:
101
102
103
104
105       ┌─────────────────────────────┬─────────────────────────────┐
106       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
107       ├─────────────────────────────┼─────────────────────────────┤
108       │Interface Stability          │Standard                     │
109       ├─────────────────────────────┼─────────────────────────────┤
110       │MT-Level                     │Unsafe                       │
111       └─────────────────────────────┴─────────────────────────────┘
112

SEE ALSO

114       doupdate(3XCURSES),   is_linetouched(3XCURSES),    libcurses(3XCURSES),
115       putchar(3C), tigetflag(3XCURSES), attributes(5), standards(5)
116
117
118
119SunOS 5.11                        5 Jun 2002                 vidattr(3XCURSES)
Impressum