/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1996-2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _CURSES_H
#define _CURSES_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* curses.h
*
* XCurses Library
*
* Copyright 1990, 1995 by Mortice Kern Systems Inc. All rights reserved.
*
*/
#include <sys/isa_defs.h>
#include <stdio.h>
#include <term.h>
#include <wchar.h>
#ifdef __cplusplus
extern "C" {
#endif
#define _XOPEN_CURSES
#ifndef EOF
#endif
#ifndef WEOF
#endif
#define OK 0
#if !(defined(__cplusplus) && defined(_BOOL))
#ifndef _BOOL_DEFINED
typedef short bool;
#define _BOOL_DEFINED
#endif
#endif
#define FALSE 0
typedef unsigned short attr_t;
/*
* These attributes and masks can be applied to an attr_t.
* These are ordered according to the <no_color_video> mask,
* which has been extended to include additional attributes.
*/
/*
* Internal attribute used to support <ceol_standout_glitch>.
*/
/*
* Color names.
*/
#define COLOR_BLACK 0
/*
* A cchar_t details the attributes, color, and a string of wide characters
* composing a complex character (p12). The wide character string consists
* of a spacing character (wcwidth() > 0) and zero or more non-spacing
* characters. Xcurses (p17) states that the minimum number of non-spacing
* characters associated with a spacing character must be at least 5, if a
* limit is imposed.
*/
/*
* Opaque data type.
*/
typedef struct {
} cchar_t;
/*
* Opaque data type.
*/
typedef struct window_t {
} WINDOW;
/*
* Opaque data type.
*/
typedef struct {
#if defined(_LP64)
#else
#endif /* defined(_LP64) */
struct {
} _unget;
struct {
} _slk;
} SCREEN;
/*
* Backwards compatiblity with historical Curses applications.
*/
#ifndef _CHTYPE
#define _CHTYPE
#if defined(_LP64)
typedef unsigned int chtype;
#else
typedef unsigned long chtype;
#endif
#endif
/*
* These attributes and masks can be applied to a chtype.
* They are order according to the <no_color_video> mask.
*/
#if defined(_LP64)
#else /* defined(_LP64) */
#endif /* defined(_LP64) */
/*
* Color atttribute support for chtype.
*/
/*
* Characters constants used with a chtype.
* Mapping defined in Xcurses Section 6.2.12 (p260).
*/
/*
* Wide characters constants for a cchar_t.
*/
extern const cchar_t __WACS_VLINE;
extern const cchar_t __WACS_HLINE;
extern const cchar_t __WACS_ULCORNER;
extern const cchar_t __WACS_URCORNER;
extern const cchar_t __WACS_LLCORNER;
extern const cchar_t __WACS_LRCORNER;
extern const cchar_t __WACS_RTEE;
extern const cchar_t __WACS_LTEE;
extern const cchar_t __WACS_BTEE;
extern const cchar_t __WACS_TTEE;
extern const cchar_t __WACS_PLUS;
extern const cchar_t __WACS_DIAMOND;
extern const cchar_t __WACS_CKBOARD;
extern const cchar_t __WACS_DEGREE;
extern const cchar_t __WACS_PLMINUS;
extern const cchar_t __WACS_BULLET;
extern const cchar_t __WACS_LARROW;
extern const cchar_t __WACS_RARROW;
extern const cchar_t __WACS_DARROW;
extern const cchar_t __WACS_UARROW;
extern const cchar_t __WACS_BOARD;
extern const cchar_t __WACS_LANTERN;
extern const cchar_t __WACS_BLOCK;
/*
* Internal macros.
*/
/*
* Global Window Macros
*/
/*
* Global variables
*/
extern int COLORS, COLOR_PAIRS;
extern int addnstr(const char *, int);
extern int addstr(const char *);
extern int add_wchnstr(const cchar_t *, int);
extern int add_wchstr(const cchar_t *);
extern int attroff(int);
extern int attron(int);
extern int attrset(int);
extern int baudrate(void);
extern int beep(void);
extern int border(
extern int border_set(
extern bool can_change_color(void);
extern int cbreak(void);
extern int clear(void);
extern int clrtobot(void);
extern int clrtoeol(void);
extern int color_content(short, short *, short *, short *);
extern int COLOR_PAIR(int);
extern int color_set(short, void *);
int, int, int, int, int, int, int);
extern int curs_set(int);
extern int def_prog_mode(void);
extern int def_shell_mode(void);
extern int delay_output(int);
extern int delch(void);
extern int deleteln(void);
extern int doupdate(void);
extern int echo(void);
extern int echo_wchar(const cchar_t *);
extern int endwin(void);
extern char erasechar(void);
extern int erase(void);
extern int erasewchar(wchar_t *);
extern void filter(void);
extern int flash(void);
extern int flushinp(void);
extern int getch(void);
extern int getnstr(char *, int);
extern int getstr(char *);
extern int halfdelay(int);
extern bool has_colors(void);
extern bool has_ic(void);
extern bool has_il(void);
extern int init_color(short, short, short, short);
extern int init_pair(short, short, short);
extern int innstr(char *, int);
extern int insdelln(int);
extern int insertln(void);
extern int insnstr(const char *, int);
extern int insstr(const char *);
extern int instr(char *);
extern int in_wchnstr(cchar_t *, int);
extern bool isendwin(void);
extern bool is_linetouched(WINDOW *, int);
extern bool is_wintouched(WINDOW *);
extern char *keyname(int);
extern char killchar(void);
extern char *longname(void);
extern int move(int, int);
extern int mvaddchnstr(int, int, const chtype *, int);
extern int mvaddchstr(int, int, const chtype *);
extern int mvaddnstr(int, int, const char *, int);
extern int mvaddnwstr(int, int, const wchar_t *, int);
extern int mvaddstr(int, int, const char *);
extern int mvadd_wchnstr(int, int, const cchar_t *, int);
extern int mvadd_wchstr(int, int, const cchar_t *);
extern int mvcur(int, int, int, int);
extern int mvdelch(int, int);
extern int mvgetch(int, int);
extern int mvgetnstr(int, int, char *, int);
extern int mvgetn_wstr(int, int, wint_t *, int);
extern int mvgetstr(int, int, char *);
extern int mvget_wstr(int, int, wint_t *);
extern int mvhline_set(int, int, const cchar_t *, int);
extern int mvinchnstr(int, int, chtype *, int);
extern int mvinnstr(int, int, char *, int);
extern int mvinsnstr(int, int, const char *, int);
extern int mvins_nwstr(int, int, const wchar_t *, int);
extern int mvinsstr(int, int, const char *);
extern int mvinstr(int, int, char *);
extern int mvins_wstr(int, int, const wchar_t *);
extern int mvin_wchnstr(int, int, cchar_t *, int);
extern int mvin_wchstr(int, int, cchar_t *);
extern int mvprintw(int, int, char *, ...);
extern int mvscanw(int, int, char *, ...);
extern int mvvline_set(int, int, const cchar_t *, int);
extern int mvwaddnstr(WINDOW *, int, int, const char *, int);
extern int mvwgetnstr(WINDOW *, int, int, char *, int);
extern int mvwinsnstr(WINDOW *, int, int, const char *, int);
extern int napms(int);
extern int nl(void);
extern int nocbreak(void);
extern int noecho(void);
extern int nonl(void);
extern void noqiflush(void);
extern int noraw(void);
extern int pair_content(short, short *, short *);
extern int PAIR_NUMBER(int);
extern int pnoutrefresh(WINDOW *, int, int, int, int, int, int);
extern int printw(char *, ...);
extern void qiflush(void);
extern int raw(void);
extern int refresh(void);
extern int reset_prog_mode(void);
extern int reset_shell_mode(void);
extern int resetty(void);
extern int ripoffline(int, int (*)(WINDOW *, int));
extern int savetty(void);
extern int scanw(char *, ...);
extern int scr_dump(const char *);
extern int scr_init(const char *);
extern int scrl(int);
extern int scr_restore(const char *);
extern int scr_set(const char *);
short, const void *);
extern int setscrreg(int, int);
extern int slk_attr_off(const attr_t, void *);
extern int slk_attroff(const chtype);
extern int slk_attr_on(const attr_t, void *);
extern int slk_attron(const chtype);
extern int slk_attr_set(const attr_t, short, void *);
extern int slk_attrset(const chtype);
extern int slk_clear(void);
extern int slk_color(short);
extern int slk_init(int);
extern char *slk_label(int);
extern int slk_noutrefresh(void);
extern int slk_refresh(void);
extern int slk_restore(void);
extern int slk_set(int, const char *, int);
extern int slk_touch(void);
extern int standend(void);
extern int standout(void);
extern int start_color(void);
extern attr_t term_attrs(void);
extern char *termname(void);
extern void timeout(int);
extern int typeahead(int);
extern int ungetch(int);
extern int untouchwin(WINDOW *);
extern void use_env(bool);
extern int wborder_set(WINDOW *,
extern void wcursyncup(WINDOW *);
extern int wcolor_set(WINDOW *, short, void *);
extern int wnoutrefresh(WINDOW *);
extern int wsetscrreg(WINDOW *, int, int);
#if !defined(__lint)
/*
* These macros can improve speed and size of an application.
*/
#define mvaddnstr(y, x, s, n) \
#define mvaddstr(y, x, s) \
#define mvwaddnstr(w, y, x, s, n) \
#define mvwaddstr(w, y, x, s) \
#define box(w, v, h) \
#define box_set(w, v, h) \
0, 0, 0, 0)
#define can_change_color() \
#define wclear(w) \
#define werase(w) \
#define mvwdelch(w, y, x) \
#define mvwgetch(w, y, x) \
#define mvgetnstr(y, x, s, n) \
#define mvgetstr(y, x, s) \
#define mvwgetnstr(w, y, x, s, n) \
#define mvwgetstr(w, y, x, s) \
#define has_ic() \
#define has_il() \
#define mvwinch(w, y, x) \
#define mvinnstr(y, x, s, n) \
#define mvinstr(y, x, s) \
#define mvwinnstr(w, y, x, s, n) \
#define mvwinstr(w, y, x, s) \
#define mvwinsnstr(w, y, x, s, n) \
#define mvwinsstr(w, y, x, s) \
#endif /* !defined(__lint) */
/*
* Special Keys
*
* Keypad layout
* A1 up A3
* left B2 right
* C1 down C3
*
* Chossing negative values for KEY_ constants means that they can
* be safely returned in either an int or long type.
*/
#ifdef __cplusplus
}
#endif
#endif /* _CURSES_H */