├── Ada95.org ├── NCURSES-Programming-HOWTO-es.html ├── NCURSES-Programming-HOWTO-es.org ├── NCURSES-Programming-HOWTO.html ├── NCURSES-Programming-HOWTO.org ├── ada ├── files.htm ├── files │ └── T.htm ├── funcs.htm ├── funcs │ ├── A.htm │ ├── B.htm │ ├── C.htm │ ├── D.htm │ ├── E.htm │ ├── F.htm │ ├── G.htm │ ├── H.htm │ ├── I.htm │ ├── K.htm │ ├── L.htm │ ├── M.htm │ ├── N.htm │ ├── O.htm │ ├── P.htm │ ├── Q.htm │ ├── R.htm │ ├── S.htm │ ├── T.htm │ ├── U.htm │ ├── V.htm │ └── W.htm ├── index.htm ├── main.htm ├── table.html ├── terminal_interface-curses-aux__adb.htm ├── terminal_interface-curses-aux__ads.htm ├── terminal_interface-curses-forms-field_types-alpha__adb.htm ├── terminal_interface-curses-forms-field_types-alpha__ads.htm ├── terminal_interface-curses-forms-field_types-alphanumeric__adb.htm ├── terminal_interface-curses-forms-field_types-alphanumeric__ads.htm ├── terminal_interface-curses-forms-field_types-enumeration-ada__adb.htm ├── terminal_interface-curses-forms-field_types-enumeration-ada__ads.htm ├── terminal_interface-curses-forms-field_types-enumeration__adb.htm ├── terminal_interface-curses-forms-field_types-enumeration__ads.htm ├── terminal_interface-curses-forms-field_types-intfield__adb.htm ├── terminal_interface-curses-forms-field_types-intfield__ads.htm ├── terminal_interface-curses-forms-field_types-ipv4_address__adb.htm ├── terminal_interface-curses-forms-field_types-ipv4_address__ads.htm ├── terminal_interface-curses-forms-field_types-numeric__adb.htm ├── terminal_interface-curses-forms-field_types-numeric__ads.htm ├── terminal_interface-curses-forms-field_types-regexp__adb.htm ├── terminal_interface-curses-forms-field_types-regexp__ads.htm ├── terminal_interface-curses-forms-field_types-user-choice__adb.htm ├── terminal_interface-curses-forms-field_types-user-choice__ads.htm ├── terminal_interface-curses-forms-field_types-user__adb.htm ├── terminal_interface-curses-forms-field_types-user__ads.htm ├── terminal_interface-curses-forms-field_types__adb.htm ├── terminal_interface-curses-forms-field_types__ads.htm ├── terminal_interface-curses-forms-field_user_data__adb.htm ├── terminal_interface-curses-forms-field_user_data__ads.htm ├── terminal_interface-curses-forms-form_user_data__adb.htm ├── terminal_interface-curses-forms-form_user_data__ads.htm ├── terminal_interface-curses-forms__adb.htm ├── terminal_interface-curses-forms__ads.htm ├── terminal_interface-curses-menus-item_user_data__adb.htm ├── terminal_interface-curses-menus-item_user_data__ads.htm ├── terminal_interface-curses-menus-menu_user_data__adb.htm ├── terminal_interface-curses-menus-menu_user_data__ads.htm ├── terminal_interface-curses-menus__adb.htm ├── terminal_interface-curses-menus__ads.htm ├── terminal_interface-curses-mouse__adb.htm ├── terminal_interface-curses-mouse__ads.htm ├── terminal_interface-curses-panels-user_data__adb.htm ├── terminal_interface-curses-panels-user_data__ads.htm ├── terminal_interface-curses-panels__adb.htm ├── terminal_interface-curses-panels__ads.htm ├── terminal_interface-curses-putwin__adb.htm ├── terminal_interface-curses-putwin__ads.htm ├── terminal_interface-curses-termcap__adb.htm ├── terminal_interface-curses-termcap__ads.htm ├── terminal_interface-curses-terminfo__adb.htm ├── terminal_interface-curses-terminfo__ads.htm ├── terminal_interface-curses-text_io-aux__adb.htm ├── terminal_interface-curses-text_io-aux__ads.htm ├── terminal_interface-curses-text_io-complex_io__adb.htm ├── terminal_interface-curses-text_io-complex_io__ads.htm ├── terminal_interface-curses-text_io-decimal_io__adb.htm ├── terminal_interface-curses-text_io-decimal_io__ads.htm ├── terminal_interface-curses-text_io-enumeration_io__adb.htm ├── terminal_interface-curses-text_io-enumeration_io__ads.htm ├── terminal_interface-curses-text_io-fixed_io__adb.htm ├── terminal_interface-curses-text_io-fixed_io__ads.htm ├── terminal_interface-curses-text_io-float_io__adb.htm ├── terminal_interface-curses-text_io-float_io__ads.htm ├── terminal_interface-curses-text_io-integer_io__adb.htm ├── terminal_interface-curses-text_io-integer_io__ads.htm ├── terminal_interface-curses-text_io-modular_io__adb.htm ├── terminal_interface-curses-text_io-modular_io__ads.htm ├── terminal_interface-curses-text_io__adb.htm ├── terminal_interface-curses-text_io__ads.htm ├── terminal_interface-curses-trace__adb.htm ├── terminal_interface-curses-trace__ads.htm ├── terminal_interface-curses__adb.htm ├── terminal_interface-curses__ads.htm ├── terminal_interface-curses_constants__ads.htm └── terminal_interface__ads.htm ├── announce.org ├── hackguide.org ├── index.org ├── man ├── adacurses-config.1.org ├── captoinfo.1m.org ├── clear.1.org ├── curs_add_wch.3x.org ├── curs_add_wchstr.3x.org ├── curs_addch.3x.org ├── curs_addchstr.3x.org ├── curs_addstr.3x.org ├── curs_addwstr.3x.org ├── curs_attr.3x.org ├── curs_beep.3x.org ├── curs_bkgd.3x.org ├── curs_bkgrnd.3x.org ├── curs_border.3x.org ├── curs_border_set.3x.org ├── curs_clear.3x.org ├── curs_color.3x.org ├── curs_delch.3x.org ├── curs_deleteln.3x.org ├── curs_extend.3x.org ├── curs_get_wch.3x.org ├── curs_get_wstr.3x.org ├── curs_getcchar.3x.org ├── curs_getch.3x.org ├── curs_getstr.3x.org ├── curs_getyx.3x.org ├── curs_in_wch.3x.org ├── curs_in_wchstr.3x.org ├── curs_inch.3x.org ├── curs_inchstr.3x.org ├── curs_initscr.3x.org ├── curs_inopts.3x.org ├── curs_ins_wch.3x.org ├── curs_ins_wstr.3x.org ├── curs_insch.3x.org ├── curs_insstr.3x.org ├── curs_instr.3x.org ├── curs_inwstr.3x.org ├── curs_kernel.3x.org ├── curs_legacy.3x.org ├── curs_memleaks.3x.org ├── curs_mouse.3x.org ├── curs_move.3x.org ├── curs_opaque.3x.org ├── curs_outopts.3x.org ├── curs_overlay.3x.org ├── curs_pad.3x.org ├── curs_print.3x.org ├── curs_printw.3x.org ├── curs_refresh.3x.org ├── curs_scanw.3x.org ├── curs_scr_dump.3x.org ├── curs_scroll.3x.org ├── curs_slk.3x.org ├── curs_sp_funcs.3x.org ├── curs_termattrs.3x.org ├── curs_termcap.3x.org ├── curs_terminfo.3x.org ├── curs_threads.3x.org ├── curs_touch.3x.org ├── curs_trace.3x.org ├── curs_util.3x.org ├── curs_variables.3x.org ├── curs_window.3x.org ├── default_colors.3x.org ├── define_key.3x.org ├── form.3x.org ├── form_cursor.3x.org ├── form_data.3x.org ├── form_driver.3x.org ├── form_field.3x.org ├── form_field_attributes.3x.org ├── form_field_buffer.3x.org ├── form_field_info.3x.org ├── form_field_just.3x.org ├── form_field_new.3x.org ├── form_field_opts.3x.org ├── form_field_userptr.3x.org ├── form_field_validation.3x.org ├── form_fieldtype.3x.org ├── form_hook.3x.org ├── form_new.3x.org ├── form_new_page.3x.org ├── form_opts.3x.org ├── form_page.3x.org ├── form_post.3x.org ├── form_requestname.3x.org ├── form_userptr.3x.org ├── form_variables.3x.org ├── form_win.3x.org ├── index.org ├── infocmp.1m.org ├── infotocap.1m.org ├── key_defined.3x.org ├── keybound.3x.org ├── keyok.3x.org ├── legacy_coding.3x.org ├── menu.3x.org ├── menu_attributes.3x.org ├── menu_cursor.3x.org ├── menu_driver.3x.org ├── menu_format.3x.org ├── menu_hook.3x.org ├── menu_items.3x.org ├── menu_mark.3x.org ├── menu_new.3x.org ├── menu_opts.3x.org ├── menu_pattern.3x.org ├── menu_post.3x.org ├── menu_requestname.3x.org ├── menu_spacing.3x.org ├── menu_userptr.3x.org ├── menu_win.3x.org ├── mitem_current.3x.org ├── mitem_name.3x.org ├── mitem_new.3x.org ├── mitem_opts.3x.org ├── mitem_userptr.3x.org ├── mitem_value.3x.org ├── mitem_visible.3x.org ├── ncurses.3x.org ├── ncurses5-config.1.org ├── panel.3x.org ├── resizeterm.3x.org ├── tabs.1.org ├── term.5.org ├── term.7.org ├── term_variables.3x.org ├── terminfo.5.org ├── tic.1m.org ├── toe.1m.org ├── tput.1.org ├── tset.1.org └── wresize.3x.org ├── ncurses-intro.org ├── ncurses_programs ├── COPYING ├── JustForFun │ ├── Makefile │ ├── README │ ├── hanoi.c │ ├── life.c │ ├── magic.c │ ├── queens.c │ ├── shuffle.c │ └── tt.c ├── Makefile ├── README ├── basics │ ├── Makefile │ ├── README │ ├── acs_vars.c │ ├── hello_world.c │ ├── init_func_example.c │ ├── key_code.c │ ├── mouse_menu.c │ ├── other_border.c │ ├── printw_example.c │ ├── scanw_example.c │ ├── simple_attr.c │ ├── simple_color.c │ ├── simple_key.c │ ├── temp_leave.c │ ├── win_border.c │ └── with_chgat.c ├── forms │ ├── Makefile │ ├── README │ ├── form_attrib.c │ ├── form_options.c │ ├── form_simple.c │ └── form_win.c ├── menus │ ├── Makefile │ ├── README │ ├── menu_attrib.c │ ├── menu_item_data.c │ ├── menu_multi_column.c │ ├── menu_scroll.c │ ├── menu_simple.c │ ├── menu_toggle.c │ ├── menu_userptr.c │ └── menu_win.c ├── panels │ ├── Makefile │ ├── README │ ├── panel_browse.c │ ├── panel_hide.c │ ├── panel_resize.c │ └── panel_simple.c └── perl │ ├── 01.pl │ ├── 02.pl │ ├── 03.pl │ ├── 04.pl │ ├── 05.pl │ ├── 06.pl │ ├── 07.pl │ ├── 08.pl │ ├── 09.pl │ ├── 10.pl │ ├── COPYING │ └── README └── worg-data ├── fonts ├── dejavu │ ├── dejavu-sans │ │ ├── DejaVuSans-Bold.ttf │ │ ├── DejaVuSans-BoldOblique.ttf │ │ ├── DejaVuSans-ExtraLight.ttf │ │ ├── DejaVuSans-Oblique.ttf │ │ ├── DejaVuSans.ttf │ │ ├── DejaVuSansCondensed-Bold.ttf │ │ ├── DejaVuSansCondensed-BoldOblique.ttf │ │ ├── DejaVuSansCondensed-Oblique.ttf │ │ └── DejaVuSansCondensed.ttf │ └── dejavu-serif │ │ ├── DejaVuSerif-Bold.ttf │ │ ├── DejaVuSerif-BoldItalic.ttf │ │ ├── DejaVuSerif-Italic.ttf │ │ ├── DejaVuSerif.ttf │ │ ├── DejaVuSerifCondensed-Bold.ttf │ │ ├── DejaVuSerifCondensed-BoldItalic.ttf │ │ ├── DejaVuSerifCondensed-Italic.ttf │ │ └── DejaVuSerifCondensed.ttf ├── fira │ ├── FiraMonoOT-Bold.otf │ ├── FiraSansOT-LightItalic.otf │ ├── FiraSansOT-Medium.otf │ ├── FiraSansOT-MediumItalic.otf │ └── FiraSansOT-Regular.otf ├── larabiefont-free │ ├── larabiefont rg.ttf │ └── read-this.html ├── monospace │ ├── Monospace.ttf │ ├── MonospaceBold.ttf │ └── MonospaceOblique.ttf ├── noto-serif │ ├── NotoSerif-Bold.ttf │ ├── NotoSerif-BoldItalic.ttf │ ├── NotoSerif-Italic.ttf │ └── NotoSerif-Regular.ttf ├── resamitz │ ├── ResamitzBold_0048.otf │ ├── ResamitzItalic_0048.otf │ └── Resamitz_0048.otf └── roboto │ ├── Roboto-Black.ttf │ ├── Roboto-BlackItalic.ttf │ ├── Roboto-Bold.ttf │ ├── Roboto-BoldItalic.ttf │ ├── Roboto-Italic.ttf │ ├── Roboto-Light.ttf │ ├── Roboto-LightItalic.ttf │ ├── Roboto-Medium.ttf │ ├── Roboto-MediumItalic.ttf │ ├── Roboto-Regular.ttf │ ├── Roboto-Thin.ttf │ └── Roboto-ThinItalic.ttf ├── img └── icon-nba-tv.jpg └── worg.css /ada/files.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 14 | 15 | 16 |

Files

17 | [T] 18 | 19 | -------------------------------------------------------------------------------- /ada/funcs.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 14 | 15 | 16 |

Functions/Procedures

17 | [A] 18 | [B] 19 | [C] 20 | [D] 21 | [E] 22 | [F] 23 | [G] 24 | [H] 25 | [I] 26 | [K] 27 | [L] 28 | [M] 29 | [N] 30 | [O] 31 | [P] 32 | [Q] 33 | [R] 34 | [S] 35 | [T] 36 | [U] 37 | [V] 38 | [W] 39 | 40 | -------------------------------------------------------------------------------- /ada/funcs/A.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | A 5 | 6 | 7 | 8 |

Functions - A

9 | [index] 10 | 30 | -------------------------------------------------------------------------------- /ada/funcs/B.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | B 5 | 6 | 7 | 8 |

Functions - B

9 | [index] 10 | 26 | -------------------------------------------------------------------------------- /ada/funcs/E.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | E 5 | 6 | 7 | 8 |

Functions - E

9 | [index] 10 | 23 | -------------------------------------------------------------------------------- /ada/funcs/H.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | H 5 | 6 | 7 | 8 |

Functions - H

9 | [index] 10 | 27 | -------------------------------------------------------------------------------- /ada/funcs/K.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | K 5 | 6 | 7 | 8 |

Functions - K

9 | [index] 10 | 19 | -------------------------------------------------------------------------------- /ada/funcs/L.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | L 5 | 6 | 7 | 8 |

Functions - L

9 | [index] 10 | 26 | -------------------------------------------------------------------------------- /ada/funcs/O.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | O 5 | 6 | 7 | 8 |

Functions - O

9 | [index] 10 | 17 | -------------------------------------------------------------------------------- /ada/funcs/Q.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Q 5 | 6 | 7 | 8 |

Functions - Q

9 | [index] 10 | 13 | -------------------------------------------------------------------------------- /ada/funcs/U.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | U 5 | 6 | 7 | 8 |

Functions - U

9 | [index] 10 | 28 | -------------------------------------------------------------------------------- /ada/funcs/V.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | V 5 | 6 | 7 | 8 |

Functions - V

9 | [index] 10 | 16 | -------------------------------------------------------------------------------- /ada/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Source Browser 5 | 6 | 7 | 8 | 9 | <H2 ALIGN=CENTER>Files</H2> 10 | <A HREF="files/T.htm">[T]</A> 11 | <HR> 12 | <H2 ALIGN=CENTER>Functions/Procedures</H2> 13 | <A HREF="funcs/A.htm">[A]</A> 14 | <A HREF="funcs/B.htm">[B]</A> 15 | <A HREF="funcs/C.htm">[C]</A> 16 | <A HREF="funcs/D.htm">[D]</A> 17 | <A HREF="funcs/E.htm">[E]</A> 18 | <A HREF="funcs/F.htm">[F]</A> 19 | <A HREF="funcs/G.htm">[G]</A> 20 | <A HREF="funcs/H.htm">[H]</A> 21 | <A HREF="funcs/I.htm">[I]</A> 22 | <A HREF="funcs/K.htm">[K]</A> 23 | <A HREF="funcs/L.htm">[L]</A> 24 | <A HREF="funcs/M.htm">[M]</A> 25 | <A HREF="funcs/N.htm">[N]</A> 26 | <A HREF="funcs/O.htm">[O]</A> 27 | <A HREF="funcs/P.htm">[P]</A> 28 | <A HREF="funcs/Q.htm">[Q]</A> 29 | <A HREF="funcs/R.htm">[R]</A> 30 | <A HREF="funcs/S.htm">[S]</A> 31 | <A HREF="funcs/T.htm">[T]</A> 32 | <A HREF="funcs/U.htm">[U]</A> 33 | <A HREF="funcs/V.htm">[V]</A> 34 | <A HREF="funcs/W.htm">[W]</A> 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /index.org: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/index.org -------------------------------------------------------------------------------- /man/clear.1.org: -------------------------------------------------------------------------------- 1 | #+TITLE: clear 1 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =clear= - clear the terminal screen 9 | 10 | * SYNOPSIS 11 | 12 | =clear= 13 | 14 | * DESCRIPTION 15 | 16 | =clear= clears your screen if this is possible, including its 17 | scrollback buffer (if the extended "E3" capability is defined). 18 | =clear= looks in the environment for the terminal type and then in 19 | the terminfo database to determine how to clear the screen. 20 | 21 | =clear= ignores any command-line parameters that may be present. 22 | 23 | * SEE ALSO 24 | 25 | [[file:tput.1.org][tput(1)]], [[file:terminfo.5.org][terminfo(5)]] 26 | 27 | This describes =ncurses= version 6.0 (patch 20160130). 28 | -------------------------------------------------------------------------------- /man/curs_addstr.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_addstr 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =addstr=, =addnstr=, =waddstr=, =waddnstr=, =mvaddstr=, =mvaddnstr=, 9 | =mvwaddstr=, =mvwaddnstr= - add a string of characters to a curses 10 | window and advance cursor 11 | 12 | * SYNOPSIS 13 | 14 | #+BEGIN_SRC c 15 | #include 16 | 17 | int addstr(const char *str); 18 | int addnstr(const char *str, int n); 19 | int waddstr(WINDOW *win, const char *str); 20 | int waddnstr(WINDOW *win, const char *str, int n); 21 | int mvaddstr(int y, int x, const char *str); 22 | int mvaddnstr(int y, int x, const char *str, int n); 23 | int mvwaddstr(WINDOW *win, int y, int x, const char *str); 24 | int mvwaddnstr(WINDOW *win, int y, int x, const char *str, int n); 25 | #+END_SRC 26 | 27 | * DESCRIPTION 28 | 29 | These functions write the (null-terminated) character string str on 30 | the given window. It is similar to calling =waddch= once for each 31 | character in the string. 32 | 33 | The /mv/ functions perform cursor movement once, before writing any 34 | characters. Thereafter, the cursor is advanced as a side-effect of 35 | writing to the window. 36 | 37 | The four functions with n as the last argument write at most n 38 | characters, or until a terminating null is reached. If /n/ is -1, 39 | then the entire string will be added. 40 | 41 | * RETURN VALUE 42 | 43 | All functions return the integer =ERR= upon failure and =OK= on 44 | success. 45 | 46 | X/Open does not define any error conditions. This implementation 47 | returns an error 48 | 49 | * if the window pointer is null or 50 | 51 | * if the string pointer is null or 52 | 53 | * if the corresponding calls to =waddch= return an error. 54 | 55 | 56 | Functions with a "mv" prefix first perform a cursor movement using 57 | =wmove=, and return an error if the position is outside the window, 58 | or if the window pointer is null. 59 | 60 | * NOTES 61 | 62 | All of these functions except =waddnstr= may be macros. 63 | 64 | * PORTABILITY 65 | 66 | These functions are described in the XSI Curses standard, Issue 4. 67 | 68 | * SEE ALSO 69 | 70 | [[file:ncurses.3x.org][curses(3x)]], [[file:curs_addch.3x.org][curs_addch(3x)]]. 71 | -------------------------------------------------------------------------------- /man/curs_addwstr.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_addwstr 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =addwstr=, =addnwstr=, =waddwstr=, =waddnwstr=, =mvaddwstr=, 9 | =mvaddnwstr=, =mvwaddwstr=, =mvwaddnwstr= - add a string of wide 10 | characters to a =curses= window and advance cursor 11 | 12 | * SYNOPSIS 13 | 14 | #+BEGIN_SRC c 15 | #include 16 | 17 | int addwstr(const wchar_t *wstr); 18 | int addnwstr(const wchar_t *wstr, int n); 19 | int waddwstr(WINDOW *win, const wchar_t *wstr); 20 | int waddnwstr(WINDOW *win, const wchar_t *wstr, int n); 21 | int mvaddwstr(int y, int x, const wchar_t *wstr); 22 | int mvaddnwstr(int y, int x, const wchar_t *wstr, int n); 23 | int mvwaddwstr(WINDOW *win, int y, int x, const wchar_t *wstr); 24 | int mvwaddnwstr(WINDOW *win, int y, int x, const wchar_t *wstr, int n); 25 | #+END_SRC 26 | 27 | * DESCRIPTION 28 | 29 | These functions write the characters of the (null-terminated) 30 | =wchar_t= character string /wstr/ on the given window. It is 31 | similar to constructing a =cchar_t= for each =wchar_t= in the 32 | string, then calling =wadd_wch= for the resulting =cchar_t=. 33 | 34 | The /mv/ functions perform cursor movement once, before writing any 35 | characters. Thereafter, the cursor is advanced as a side-effect of 36 | writing to the window. 37 | 38 | The four functions with /n/ as the last argument write at most /n/ 39 | =wchar_t= characters, or until a terminating null is reached. If 40 | /n/ is -1, then the entire string will be added. 41 | 42 | * RETURN VALUE 43 | 44 | All functions return the integer =ERR= upon failure and =OK= on 45 | success. 46 | 47 | X/Open does not define any error conditions. This implementation 48 | returns an error 49 | 50 | * if the window pointer is null or 51 | 52 | * if the string pointer is null or 53 | 54 | * if the corresponding calls to =wadd_wch= return an error. 55 | 56 | 57 | Functions with a "mv" prefix first perform a cursor movement using 58 | =wmove=, and return an error if the position is outside the window, 59 | or if the window pointer is null. 60 | 61 | * NOTES 62 | 63 | All of these functions except =waddnwstr= may be macros. 64 | 65 | * PORTABILITY 66 | 67 | These functions are described in the XSI Curses standard, Issue 4. 68 | 69 | * SEE ALSO 70 | 71 | [[file:ncurses.3x.org][curses(3x)]], [[file:curs_add_wch.3x.org][curs_add_wch(3x)]] 72 | -------------------------------------------------------------------------------- /man/curs_beep.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_beep 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =beep=, =flash= - =curses= bell and screen flash routines 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | 15 | int beep(void); 16 | int flash(void); 17 | #+END_SRC 18 | 19 | * DESCRIPTION 20 | 21 | The =beep= and =flash= routines are used to alert the terminal user. 22 | The routine =beep= sounds an audible alarm on the terminal, if 23 | possible; otherwise it flashes the screen (visible bell). The 24 | routine =flash= flashes the screen, and if that is not possible, 25 | sounds the alert. If neither alert is possible, nothing happens. 26 | Nearly all terminals have an audible alert (bell or beep), but only 27 | some can flash the screen. 28 | 29 | * RETURN VALUE 30 | 31 | These routines return =OK= if they succeed in beeping or flashing, 32 | =ERR= otherwise. 33 | 34 | * EXTENSIONS 35 | 36 | SVr4's =beep= and =flash= routines always returned =OK=, so it was 37 | not possible to tell when the beep or flash failed. 38 | 39 | * PORTABILITY 40 | 41 | These functions are described in the XSI Curses standard, Issue 4. 42 | Like SVr4, it specifies that they always return =OK=. 43 | 44 | * SEE ALSO 45 | 46 | [[file:ncurses.3x.org][curses(3x)]] 47 | -------------------------------------------------------------------------------- /man/curs_bkgd.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_bkgd 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =bkgdset=, =wbkgdset=, =bkgd=, =wbkgd=, =getbkgd= - =curses= window 9 | background manipulation routines 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | 16 | void bkgdset(chtype ch); 17 | void wbkgdset(WINDOW *win, chtype ch); 18 | int bkgd(chtype ch); 19 | int wbkgd(WINDOW *win, chtype ch); 20 | chtype getbkgd(WINDOW *win); 21 | #+END_SRC 22 | 23 | * DESCRIPTION 24 | 25 | ** bkgdset 26 | 27 | The =bkgdset= and =wbkgdset= routines manipulate the background of 28 | the named window. The window background is a chtype consisting of 29 | any combination of attributes (i.e., rendition) and a character. 30 | The attribute part of the background is combined (OR'ed) with all 31 | non-blank characters that are written into the window with 32 | =waddch=. Both the character and attribute parts of the background 33 | are combined with the blank characters. The background becomes a 34 | property of the character and moves with the character through any 35 | scrolling and insert/delete line/character operations. 36 | 37 | To the extent possible on a particular terminal, the attribute part 38 | of the background is displayed as the graphic rendition of the 39 | character put on the screen. 40 | 41 | ** bkgd 42 | 43 | The =bkgd= and =wbkgd= functions set the background property of the 44 | current or specified window and then apply this setting to every 45 | character position in that window: 46 | 47 | * The rendition of every character on the screen is changed to the 48 | new background rendition. 49 | 50 | * Wherever the former background character appears, it is changed 51 | to the new background character. 52 | 53 | ** getbkgd 54 | 55 | The =getbkgd= function returns the given window's current 56 | background character/attribute pair. 57 | 58 | * RETURN VALUE 59 | 60 | The routines =bkgd= and =wbkgd= return the integer =OK=. The SVr4.0 61 | manual says "or a non-negative integer if =immedok= is set", but 62 | this appears to be an error. 63 | 64 | * NOTES 65 | 66 | Note that =bkgdset= and =bkgd= may be macros. 67 | 68 | * PORTABILITY 69 | 70 | These functions are described in the XSI Curses standard, Issue 4. 71 | It specifies that =bkgd= and =wbkgd= return =ERR= on failure, but 72 | gives no failure conditions. 73 | 74 | * SEE ALSO 75 | 76 | [[file:ncurses.3x.org][curses(3x)]], [[file:curs_addch.3x.org][curs_addch(3x)]], [[file:curs_attr.3x.org][curs_attr(3x)]], [[file:curs_outopts.3x.org][curs_outopts(3x)]] 77 | -------------------------------------------------------------------------------- /man/curs_bkgrnd.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_bkgrnd 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =bkgrnd=, =wbkgrnd=, =bkgrndset=, =wbkgrndset=, =getbkgrnd=, 9 | =wgetbkgrnd= - =curses= window complex background manipulation 10 | routines 11 | 12 | * SYNOPSIS 13 | 14 | #+BEGIN_SRC c 15 | #include 16 | 17 | int bkgrnd( const cchar_t *wch); 18 | int wbkgrnd( WINDOW *win, const cchar_t *wch); 19 | void bkgrndset(const cchar_t *wch ); 20 | void wbkgrndset(WINDOW *win, const cchar_t *wch); 21 | int getbkgrnd(cchar_t *wch); 22 | int wgetbkgrnd(WINDOW *win, cchar_t *wch); 23 | #+END_SRC 24 | 25 | * DESCRIPTION 26 | 27 | ** bkgrndset 28 | 29 | The =bkgrndset= and =wbkgrndset= routines manipulate the background 30 | of the named window. The window background is a =cchar_t= 31 | consisting of any combination of attributes (i.e., rendition) and a 32 | complex character. The attribute part of the background is 33 | combined (OR'ed) with all non-blank characters that are written 34 | into the window with =waddch=. Both the character and attribute 35 | parts of the background are combined with the blank characters. 36 | The background becomes a property of the character and moves with 37 | the character through any scrolling and insert/delete 38 | line/character operations. 39 | 40 | To the extent possible on a particular terminal, the attribute part 41 | of the background is displayed as the graphic rendition of the 42 | character put on the screen. 43 | 44 | ** bkgrnd 45 | 46 | The =bkgrnd= and =wbkgrnd= functions set the background property of 47 | the current or specified window and then apply this setting to 48 | every character position in that window: 49 | 50 | * The rendition of every character on the screen is changed to the 51 | new background rendition. 52 | 53 | * Wherever the former background character appears, it is changed 54 | to the new background character. 55 | 56 | ** getbkgrnd 57 | 58 | The =getbkgrnd= function returns the given window's current 59 | background character/attribute pair via the /wch/ pointer. 60 | 61 | * NOTES 62 | 63 | Note that =bkgrnd=, =bkgrndset=, and =getbkgrnd= may be macros. 64 | 65 | * RETURN VALUE 66 | 67 | The =bkgrndset= and =wbkgrndset= routines do not return a value. 68 | 69 | Upon successful completion, the other functions return =OK=. 70 | Otherwise, they return =ERR=. A null window pointer is treated as 71 | an error. 72 | 73 | * SEE ALSO 74 | 75 | [[file:ncurses.3x.org][curses(3x)]], [[file:curs_bkgd.3x.org][curs_bkgd(3x)]] 76 | -------------------------------------------------------------------------------- /man/curs_delch.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_delch 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =delch=, =wdelch=, =mvdelch=, =mvwdelch= - delete character under 9 | the cursor in a =curses= window 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | 16 | int delch(void); 17 | int wdelch(WINDOW *win); 18 | int mvdelch(int y, int x); 19 | int mvwdelch(WINDOW *win, int y, int x); 20 | #+END_SRC 21 | 22 | * DESCRIPTION 23 | 24 | These routines delete the character under the cursor; all characters 25 | to the right of the cursor on the same line are moved to the left 26 | one position and the last character on the line is filled with a 27 | blank. The cursor position does not change (after moving to y, x, 28 | if specified). (This does not imply use of the hardware delete 29 | character feature.) 30 | 31 | * RETURN VALUE 32 | 33 | All routines return the integer =ERR= upon failure and an =OK= (SVr4 34 | specifies only "an integer value other than =ERR=") upon successful 35 | completion. 36 | 37 | Functions with a "mv" prefix first perform a cursor movement using 38 | =wmove=, and return an error if the position is outside the window, 39 | or if the window pointer is null. 40 | 41 | * NOTES 42 | 43 | Note that =delch=, =mvdelch=, and =mvwdelch= may be macros. 44 | 45 | * PORTABILITY 46 | 47 | These functions are described in the XSI Curses standard, Issue 4. 48 | The standard specifies that they return =ERR= on failure, but 49 | specifies no error conditions. 50 | 51 | * SEE ALSO 52 | 53 | [[file:ncurses.3x.org][curses(3x)]] 54 | -------------------------------------------------------------------------------- /man/curs_deleteln.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_deleteln 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =deleteln=, =wdeleteln=, =insdelln=, =winsdelln=, =insertln=, 9 | =winsertln= - delete and insert lines in a =curses= window 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | 16 | int deleteln(void); 17 | int wdeleteln(WINDOW *win); 18 | int insdelln(int n); 19 | int winsdelln(WINDOW *win, int n); 20 | int insertln(void); 21 | int winsertln(WINDOW *win); 22 | #+END_SRC 23 | 24 | * DESCRIPTION 25 | 26 | The =deleteln= and =wdeleteln= routines delete the line under the 27 | cursor in the window; all lines below the current line are moved up 28 | one line. The bottom line of the window is cleared. The cursor 29 | position does not change. 30 | 31 | The =insdelln= and =winsdelln= routines, for positive n, insert /n/ 32 | lines into the specified window above the current line. The /n/ 33 | bottom lines are lost. For negative n, delete /n/ lines (starting 34 | with the one under the cursor), and move the remaining lines up. 35 | The bottom /n/ lines are cleared. The current cursor position 36 | remains the same. 37 | 38 | The =insertln= and =winsertln= routines insert a blank line above 39 | the current line and the bottom line is lost. 40 | 41 | * RETURN VALUE 42 | 43 | All routines return the integer =ERR= upon failure and an =OK= (SVr4 44 | specifies only "an integer value other than =ERR=") upon successful 45 | completion. 46 | 47 | X/Open defines no error conditions. In this implementation, if the 48 | window parameter is null, an error is returned. 49 | 50 | * PORTABILITY 51 | 52 | These functions are described in the XSI Curses standard, Issue 4. 53 | The standard specifies that they return =ERR= on failure, but 54 | specifies no error conditions. 55 | 56 | * NOTES 57 | 58 | Note that all but =winsdelln= may be macros. 59 | 60 | These routines do not require a hardware line delete or insert 61 | feature in the terminal. In fact, they will not use hardware line 62 | delete/insert unless =idlok(..., TRUE)= has been set on the current 63 | window. 64 | 65 | * SEE ALSO 66 | 67 | [[file:ncurses.3x.org][curses(3x)]] 68 | -------------------------------------------------------------------------------- /man/curs_extend.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_extend 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =curses_version=, =use_extended_names= - miscellaneous =curses= 9 | extensions 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | 16 | const char * curses_version(void); 17 | int use_extended_names(bool enable); 18 | #+END_SRC 19 | 20 | * DESCRIPTION 21 | 22 | These functions are extensions to the =curses= library which do not 23 | fit easily into other categories. 24 | 25 | Use =curses_version()= to get the version number, including patch 26 | level of the library, e.g., *5.0.19991023* 27 | 28 | The =use_extended_names()= function controls whether the calling 29 | application is able to use user-defined or nonstandard names which 30 | may be compiled into the terminfo description, i.e., via the 31 | terminfo or termcap interfaces. Normally these names are available 32 | for use, since the essential decision is made by using the =-x= 33 | option of =tic= to compile extended terminal definitions. However 34 | you can disable this feature to ensure compatibility with other 35 | implementations of =curses=. 36 | 37 | * PORTABILITY 38 | 39 | These routines are specific to ncurses. They were not supported on 40 | Version 7, BSD or System V implementations. It is recommended that 41 | any code depending on them be conditioned using NCURSES_VERSION. 42 | 43 | * SEE ALSO 44 | 45 | [[file:curs_getch.3x.org][curs_getch(3x)]], [[file:curs_mouse.3x.org][curs_mouse(3x)]], [[file:curs_print.3x.org][curs_print(3x)]], [[file:curs_util.3x.org][curs_util(3x)]], 46 | [[file:default_colors.3x.org][default_colors(3x)]], [[file:define_key.3x.org][define_key(3x)]], [[file:keybound.3x.org][keybound(3x)]], [[file:keyok.3x.org][keyok(3x)]], 47 | [[file:resizeterm.3x.org][resizeterm(3x)]], [[file:wresize.3x.org][wresize(3x)]]. 48 | 49 | * AUTHOR 50 | 51 | Thomas Dickey. 52 | -------------------------------------------------------------------------------- /man/curs_getyx.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_getyx 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =getyx=, =getparyx=, =getbegyx=, =getmaxyx= - get =curses= cursor 9 | and window coordinates 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | 16 | void getyx(WINDOW *win, int y, int x); 17 | void getparyx(WINDOW *win, int y, int x); 18 | void getbegyx(WINDOW *win, int y, int x); 19 | void getmaxyx(WINDOW *win, int y, int x); 20 | #+END_SRC 21 | 22 | * DESCRIPTION 23 | 24 | The =getyx= macro places the current cursor position of the given 25 | window in the two integer variables y and x. 26 | 27 | If /win/ is a subwindow, the =getparyx= macro places the beginning 28 | coordinates of the subwindow relative to the parent window into two 29 | integer variables =y= and =x=. Otherwise, =-1= is placed into y and 30 | =x=. 31 | 32 | Like =getyx=, the =getbegyx= and =getmaxyx= macros store the current 33 | beginning coordinates and size of the specified window. 34 | 35 | * RETURN VALUE 36 | 37 | The return values of these macros are undefined (i.e., they should 38 | not be used as the right-hand side of assignment statements). 39 | 40 | * NOTES 41 | 42 | All of these interfaces are macros. A "=&=" is not necessary before 43 | the variables =y= and =x=. 44 | 45 | * PORTABILITY 46 | 47 | The =getyx=, =getparyx=, =getbegyx= and =getmaxyx= macros are 48 | described in the XSI Curses standard, Issue 4. 49 | 50 | This implementation also provides functions =getbegx=, =getbegy=, 51 | =getcurx=, =getcury=, =getmaxx=, =getmaxy=, =getparx= and =getpary= 52 | for compatibility with older versions of curses. 53 | 54 | Although X/Open Curses does not address this, many implementations 55 | provide members of the =WINDOW= structure containing values 56 | corresponding to these macros. For best portability, do not rely on 57 | using the data in =WINDOW=, since some implementations make =WINDOW= 58 | opaque (do not allow direct use of its members). 59 | 60 | Besides the problem of opaque structures, the data stored in 61 | like-named members may not have like-values in different 62 | implementations. For example, the =WINDOW._maxx= and =WINDOW._maxy= 63 | values in =ncurses= have (at least since release 1.8.1) differed by 64 | one from some other implementations. The difference is hidden by 65 | means of the macro =getmaxyx=. 66 | 67 | * SEE ALSO 68 | 69 | [[file:ncurses.3x.org][curses(3x)]], [[file:curs_legacy.3x.org][curs_legacy(3x)]], [[file:curs_opaque.3x.org][curs_opaque(3x)]] 70 | -------------------------------------------------------------------------------- /man/curs_in_wch.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_in_wch 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =in_wch=, =mvin_wch=, =mvwin_wch=, =win_wch= - extract a complex 9 | character and rendition from a window 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | 16 | int in_wch(cchar_t *wcval); 17 | int mvin_wch(int y, int x, cchar_t *wcval); 18 | int mvwin_wch(WINDOW *win, int y, int x, cchar_t *wcval); 19 | int win_wch(WINDOW *win, cchar_t *wcval); 20 | #+END_SRC 21 | 22 | * DESCRIPTION 23 | 24 | These functions extract the complex character and rendition from the 25 | current position in the named window into the =cchar_t= object 26 | referenced by /wcval/. 27 | 28 | * RETURN VALUE 29 | 30 | No errors are defined in the XSI Curses standard. This 31 | implementation checks for null pointers, returns =ERR= in that case. 32 | Also, the /mv/ routines check for error moving the cursor, returning 33 | =ERR= in that case. Otherwise they return =OK= 34 | 35 | Functions with a "mv" prefix first perform a cursor movement using 36 | =wmove=, and return an error if the position is outside the window, 37 | or if the window pointer is null. 38 | 39 | * NOTES 40 | 41 | Note that all of these routines may be macros. 42 | 43 | * PORTABILITY 44 | 45 | These functions are described in the XSI Curses standard, Issue 4. 46 | 47 | * SEE ALSO 48 | 49 | [[file:ncurses.3x.org][curses(3x)]], [[file:curs_inch.3x.org][curs_inch(3x)]]. 50 | -------------------------------------------------------------------------------- /man/curs_in_wchstr.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_in_wchstr 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =in_wchstr=, =in_wchnstr=, =win_wchstr=, =win_wchnstr=, 9 | =mvin_wchstr=, =mvin_wchnstr=, =mvwin_wchstr=, =mvwin_wchnstr= - get 10 | an array of complex characters and renditions from a =curses= window 11 | 12 | * SYNOPSIS 13 | 14 | #+BEGIN_SRC c 15 | #include 16 | 17 | int in_wchstr(cchar_t *wchstr); 18 | int in_wchnstr(cchar_t *wchstr, int n); 19 | int win_wchstr(WINDOW *win, cchar_t *wchstr); 20 | int win_wchnstr(WINDOW *win, cchar_t *wchstr, int n); 21 | int mvin_wchstr(int y, int x, cchar_t *wchstr); 22 | int mvin_wchnstr(int y, int x, cchar_t *wchstr, int n); 23 | int mvwin_wchstr(WINDOW *win, int y, int x, cchar_t *wchstr); 24 | int mvwin_wchnstr(WINDOW *win, int y, int x, cchar_t *wchstr, int n); 25 | #+END_SRC 26 | 27 | * DESCRIPTION 28 | 29 | These functions return an array of complex characters in /wchstr/, 30 | starting at the current cursor position in the named window. 31 | Attributes (rendition) are stored with the characters. 32 | 33 | The =in_wchnstr=, =mvin_wchnstr=, =mvwin_wchnstr= and =win_wchnstr= 34 | fill the array with at most /n/ =cchar_t= elements. 35 | 36 | * NOTES 37 | 38 | Note that all routines except =win_wchnstr= may be macros. 39 | 40 | Reading a line that overflows the array pointed to by /wchstr/ with 41 | =in_wchstr=, =mvin_wchstr=, =mvwin_wchstr= or =win_wchstr= causes 42 | undefined results. Therefore, the use of =in_wchnstr=, 43 | =mvin_wchnstr=, =mvwin_wchnstr=, or =win_wchnstr= is recommended. 44 | 45 | * RETURN VALUE 46 | 47 | Upon successful completion, these functions return =OK=. Otherwise, 48 | they return =ERR=. 49 | 50 | Functions with a "mv" prefix first perform a cursor movement using 51 | =wmove=, and return an error if the position is outside the window, 52 | or if the window pointer is null. 53 | 54 | * PORTABILITY 55 | 56 | The XSI Curses defines no error conditions. This implementation 57 | checks for null pointers, returning =ERR= in that case. 58 | 59 | * SEE ALSO 60 | 61 | Functions: [[file:ncurses.3x.org][curses(3x)]], [[file:curs_in_wch.3x.org][curs_in_wch(3x)]], [[file:curs_instr.3x.org][curs_instr(3x)]], 62 | [[file:curs_inwstr.3x.org][curs_inwstr(3x)]] [[file:curs_inchstr.3x.org][curs_inchstr(3x)]] 63 | -------------------------------------------------------------------------------- /man/curs_inch.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_inch 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =inch=, =winch=, =mvinch=, =mvwinch= - get a character and 9 | attributes from a =curses= window 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | 16 | chtype inch(void); 17 | chtype winch(WINDOW *win); 18 | chtype mvinch(int y, int x); 19 | chtype mvwinch(WINDOW *win, int y, int x); 20 | #+END_SRC 21 | 22 | * DESCRIPTION 23 | 24 | These routines return the character, of type =chtype=, at the 25 | current position in the named window. If any attributes are set for 26 | that position, their values are OR'ed into the value returned. 27 | Constants defined in == can be used with the =&= (logical 28 | AND) operator to extract the character or attributes alone. 29 | 30 | ** Attributes 31 | 32 | The following bit-masks may be AND-ed with characters returned by 33 | =winch=. 34 | 35 | - =A_CHARTEXT= :: Bit-mask to extract character 36 | 37 | - =A_ATTRIBUTES= :: Bit-mask to extract attributes 38 | 39 | - =A_COLOR= :: Bit-mask to extract color-pair field 40 | information 41 | 42 | * RETURN VALUE 43 | 44 | Functions with a "mv" prefix first perform a cursor movement using 45 | =wmove=, and return an error if the position is outside the window, 46 | or if the window pointer is null. 47 | 48 | * NOTES 49 | 50 | Note that all of these routines may be macros. 51 | 52 | * PORTABILITY 53 | 54 | These functions are described in the XSI Curses standard, Issue 4. 55 | 56 | * SEE ALSO 57 | 58 | [[file:ncurses.3x.org][curses(3x)]]. 59 | 60 | Comparable functions in the wide-character (ncursesw) library are 61 | described in [[file:curs_in_wch.3x.org][curs_in_wch(3x)]]. 62 | -------------------------------------------------------------------------------- /man/curs_ins_wch.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_ins_wch 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =ins_wch=, =mvins_wch=, =mvwins_wch=, =wins_wch= - insert a complex 9 | character and rendition into a window 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | 16 | int ins_wch(const cchar_t *wch); 17 | int wins_wch(WINDOW *win, const cchar_t *wch); 18 | int mvins_wch(int y, int x, const cchar_t *wch); 19 | int mvwins_wch(WINDOW *win, int y, int x, const cchar_t *wch); 20 | #+END_SRC 21 | 22 | * DESCRIPTION 23 | 24 | These routines, insert the complex character /wch/ with rendition 25 | before the character under the cursor. All characters to the right 26 | of the cursor are moved one space to the right, with the possibility 27 | of the rightmost character on the line being lost. The insertion 28 | operation does not change the cursor position. 29 | 30 | * RETURN VALUE 31 | 32 | If successful, these functions return =OK=. If not, they return 33 | =ERR=. 34 | 35 | Functions with a "mv" prefix first perform a cursor movement using 36 | =wmove=, and return an error if the position is outside the window, 37 | or if the window pointer is null. 38 | 39 | * ERRORS 40 | 41 | No errors are defined. 42 | 43 | * SEE ALSO 44 | 45 | [[file:ncurses.3x.org][curses(3x)]], [[file:curs_insch.3x.org][curs_insch(3x)]]. 46 | -------------------------------------------------------------------------------- /man/curs_insch.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_insch 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =insch=, =winsch=, =mvinsch=, =mvwinsch= - insert a character before 9 | cursor in a =curses= window 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | 16 | int insch(chtype ch); 17 | int winsch(WINDOW *win, chtype ch); 18 | int mvinsch(int y, int x, chtype ch); 19 | int mvwinsch(WINDOW *win, int y, int x, chtype ch); 20 | #+END_SRC 21 | 22 | * DESCRIPTION 23 | 24 | These routines insert the character =ch= before the character under 25 | the cursor. All characters to the right of the cursor are moved one 26 | space to the right, with the possibility of the rightmost character 27 | on the line being lost. The insertion operation does not change the 28 | cursor position. 29 | 30 | * RETURN VALUE 31 | 32 | All routines that return an integer return =ERR= upon failure and 33 | =OK= (SVr4 specifies only "an integer value other than =ERR=") upon 34 | successful completion, unless otherwise noted in the preceding 35 | routine descriptions. 36 | 37 | Functions with a "mv" prefix first perform a cursor movement using 38 | =wmove=, and return an error if the position is outside the window, 39 | or if the window pointer is null. 40 | 41 | * NOTES 42 | 43 | These routines do not necessarily imply use of a hardware insert 44 | character feature. 45 | 46 | Note that =insch=, =mvinsch=, and =mvwinsch= may be macros. 47 | 48 | * PORTABILITY 49 | 50 | These functions are described in the XSI Curses standard, Issue 4. 51 | 52 | * SEE ALSO 53 | 54 | [[file:ncurses.3x.org][curses(3x)]]. 55 | 56 | Comparable functions in the wide-character (ncursesw) library are 57 | described in [[file:curs_ins_wch.3x.org][curs_ins_wch(3x)]]. 58 | -------------------------------------------------------------------------------- /man/curs_instr.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_instr 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =instr=, =innstr=, =winstr=, =winnstr=, =mvinstr=, =mvinnstr=, 9 | =mvwinstr=, =mvwinnstr= - get a string of characters from a =curses= 10 | window 11 | 12 | * SYNOPSIS 13 | 14 | #+BEGIN_SRC c 15 | #include 16 | 17 | int instr(char *str); 18 | int innstr(char *str, int n); 19 | int winstr(WINDOW *win, char *str); 20 | int winnstr(WINDOW *win, char *str, int n); 21 | int mvinstr(int y, int x, char *str); 22 | int mvinnstr(int y, int x, char *str, int n); 23 | int mvwinstr(WINDOW *win, int y, int x, char *str); 24 | int mvwinnstr(WINDOW *win, int y, int x, char *str, int 25 | n); 26 | #+END_SRC 27 | 28 | * DESCRIPTION 29 | 30 | These routines return a string of characters in str, extracted 31 | starting at the current cursor position in the named window. 32 | Attributes are stripped from the characters. The four functions 33 | with /n/ as the last argument return a leading substring at most /n/ 34 | characters long (exclusive of the trailing =NUL=). 35 | 36 | * RETURN VALUE 37 | 38 | All of the functions return =ERR= upon failure, or the number of 39 | characters actually read into the string. 40 | 41 | X/Open defines no error conditions. In this implementation, if the 42 | window parameter is null or the str parameter is null, a zero is 43 | returned. 44 | 45 | Functions with a "mv" prefix first perform a cursor movement using 46 | =wmove=, and return an error if the position is outside the window, 47 | or if the window pointer is null. 48 | 49 | * NOTES 50 | 51 | Note that all routines except =winnstr= may be macros. 52 | 53 | * PORTABILITY 54 | 55 | SVr4 does not document whether a length limit includes or excludes 56 | the trailing NUL. 57 | 58 | The ncurses library extends the XSI description by allowing a 59 | negative value for n. In this case, the functions return the string 60 | ending at the right margin. 61 | 62 | * SEE ALSO 63 | 64 | [[file:ncurses.3x.org][curses(3x)]]. 65 | -------------------------------------------------------------------------------- /man/curs_inwstr.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_inwstr 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =inwstr=, =innwstr=, =winwstr=, =winnwstr=, =mvinwstr=, =mvinnwstr=, 9 | =mvwinwstr=, =mvwinnwstr= - get a string of =wchar_t= characters 10 | from a =curses= window 11 | 12 | * SYNOPSIS 13 | 14 | #+BEGIN_SRC c 15 | #include 16 | 17 | int inwstr(wchar_t *str); 18 | int innwstr(wchar_t *str, int n); 19 | int winwstr(WINDOW *win, wchar_t *str); 20 | int winnwstr(WINDOW *win, wchar_t *str, int n); 21 | int mvinwstr(int y, int x, wchar_t *str); 22 | int mvinnwstr(int y, int x, wchar_t *str, int n); 23 | int mvwinwstr(WINDOW *win, int y, int x, wchar_t *str); 24 | int mvwinnwstr(WINDOW *win, int y, int x, wchar_t *str, int n); 25 | #+END_SRC 26 | 27 | * DESCRIPTION 28 | 29 | These routines return a string of =wchar_t= characters in /wstr/, 30 | extracted starting at the current cursor position in the named 31 | window. Attributes are stripped from the characters. The four 32 | functions with /n/ as the last argument return a leading substring 33 | at most /n/ bytes long (exclusive of the trailing NUL). Transfer 34 | stops at the end of the current line, or when /n/ bytes have been 35 | stored at the location referenced by /wstr/. 36 | 37 | If the size /n/ is not large enough to store a complete character, 38 | an error is generated. 39 | 40 | * NOTES 41 | 42 | Note that all routines except winnwstr may be macros. 43 | 44 | * RETURN VALUE 45 | 46 | All routines return =ERR= upon failure. Upon successful completion, 47 | the *inwstr routines return =OK=, and the =*innwstr= routines return 48 | the number of characters read into the string. 49 | 50 | Functions with a "mv" prefix first perform a cursor movement using 51 | =wmove=, and return an error if the position is outside the window, 52 | or if the window pointer is null. 53 | 54 | * SEE ALSO 55 | 56 | [[file:ncurses.3x.org][curses(3x)]], [[file:curs_instr.3x.org][curs_instr(3x)]], [[file:curs_in_wchstr.3x.org][curs_in_wchstr(3x)]] 57 | -------------------------------------------------------------------------------- /man/curs_legacy.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_legacy 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =curs_legacy= - get =curses= cursor and window coordinates, 9 | attributes 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include == 15 | 16 | int getattrs(WINDOW *win); 17 | int getbegx(WINDOW *win); 18 | int getbegy(WINDOW *win); 19 | int getcurx(WINDOW *win); 20 | int getcury(WINDOW *win); 21 | int getmaxx(WINDOW *win); 22 | int getmaxy(WINDOW *win); 23 | int getparx(WINDOW *win); 24 | int getpary(WINDOW *win); 25 | #+END_SRC 26 | 27 | * DESCRIPTION 28 | 29 | The getbegy and =getbegx= functions return the same data as 30 | =getbegyx=. 31 | 32 | The =getcury= and =getcurx= functions return the same data as =getyx=. 33 | 34 | The =getmaxy= and =getmaxx= functions return the same data as 35 | =getmaxyx=. 36 | 37 | The =getpary= and =getparx= functions return the same data as 38 | =getparyx=. 39 | 40 | * RETURN VALUE 41 | 42 | These functions return an integer, or =ERR= if the window parameter 43 | is null. 44 | 45 | * NOTES 46 | 47 | All of these interfaces are provided as macros and functions. The 48 | macros are suppressed (and only the functions provided) when 49 | =NCURSES_OPAQUE= is defined. The standard forms such as =getyx= 50 | must be implemented as macros, and (in this implementation) are 51 | defined in terms of the functions described here, to avoid reliance 52 | on internal details of the =WINDOW= structure. 53 | 54 | * PORTABILITY 55 | 56 | These functions were supported on Version 7, BSD or System V 57 | implementations. 58 | 59 | * SEE ALSO 60 | 61 | [[file:ncurses.3x.org][curses(3x)]], [[file:curs_getyx.3x.org][curs_getyx(3x)]], [[file:curs_opaque.3x.org][curs_opaque(3x)]] 62 | -------------------------------------------------------------------------------- /man/curs_memleaks.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_memleaks 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =_nc_freeall=, =_nc_free_and_exit= - =curses= memory-leak checking 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | 15 | void _nc_freeall(void); 16 | void _nc_free_and_exit(int); 17 | #+END_SRC 18 | 19 | * DESCRIPTION 20 | 21 | These functions are used to simplify analysis of memory leaks in the 22 | ncurses library. They are normally not available; they must be 23 | configured into the library at build time using the 24 | =--disable-leaks= option. That compiles-in code that frees memory 25 | that normally would not be freed. 26 | 27 | Any implementation of curses must not free the memory associated 28 | with a screen, since (even after calling =endwin=), it must be 29 | available for use in the next call to =refresh=. There are also 30 | chunks of memory held for performance reasons. That makes it hard 31 | to analyze curses applications for memory leaks. To work around 32 | this, one can build a debugging version of the ncurses library which 33 | frees those chunks which it can, and provides these functions to 34 | free all of the memory allocated by the ncurses library. 35 | 36 | The =_nc_free_and_exit= function is the preferred one since some of 37 | the memory which is freed may be required for the application to 38 | continue running. Its parameter is the code to pass to the exit 39 | routine. 40 | 41 | * RETURN VALUE 42 | 43 | These functions do not return a value. 44 | 45 | * PORTABILITY 46 | 47 | These functions are not part of the XSI interface. 48 | 49 | * SEE ALSO 50 | 51 | [[file:ncurses.3x.org][curses(3x)]]. 52 | -------------------------------------------------------------------------------- /man/curs_move.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_move 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =move=, =wmove= - move =curses= window cursor 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | 15 | int move(int y, int x); 16 | int wmove(WINDOW *win, int y, int x); 17 | #+END_SRC 18 | 19 | * DESCRIPTION 20 | 21 | These routines move the cursor associated with the window to line y 22 | and column x. This routine does not move the physical cursor of the 23 | terminal until =refresh= is called. The position specified is 24 | relative to the upper left-hand corner of the window, which is 25 | (0,0). 26 | 27 | * RETURN VALUE 28 | 29 | These routines return =ERR= upon failure and =OK= (SVr4 specifies 30 | only "an integer value other than =ERR=") upon successful 31 | completion. 32 | 33 | Specifically, they return an error if the window pointer is null, or 34 | if the position is outside the window. 35 | 36 | * NOTES 37 | 38 | Note that =move= may be a macro. 39 | 40 | * PORTABILITY 41 | 42 | These functions are described in the XSI Curses standard, Issue 4. 43 | 44 | * SEE ALSO 45 | 46 | [[file:ncurses.3x.org][curses(3x)]], [[file:curs_refresh.3x.org][curs_refresh(3x)]] 47 | -------------------------------------------------------------------------------- /man/curs_overlay.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_overlay 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =overlay=, =overwrite=, =copywin= - overlay and manipulate 9 | overlapped =curses= windows 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | 16 | int overlay(const WINDOW *srcwin, WINDOW *dstwin); 17 | int overwrite(const WINDOW *srcwin, WINDOW *dstwin); 18 | int copywin(const WINDOW *srcwin, WINDOW *dstwin, int sminrow, 19 | int smincol, int dminrow, int dmincol, int dmaxrow, 20 | int dmaxcol, int overlay); 21 | #+END_SRC 22 | 23 | * DESCRIPTION 24 | 25 | ** =overlay=, =overwrite= 26 | 27 | The =overlay= and =overwrite= routines overlay srcwin on top of 28 | dstwin. scrwin and dstwin are not required to be the same size; 29 | only text where the two windows overlap is copied. The difference 30 | is that =overlay= is non-destructive (blanks are not copied) 31 | whereas =overwrite= is destructive. 32 | 33 | ** =copywin= 34 | 35 | The =copywin= routine provides a finer granularity of control over 36 | the =overlay= and =overwrite= routines. As in the =prefresh= 37 | routine, a rectangle is specified in the destination window, 38 | (dminrow, dmincol) and (dmaxrow, dmaxcol), and the 39 | upper-left-corner coordinates of the source window, (sminrow, 40 | smincol). If the argument =overlay= is true, then copying is 41 | non-destructive, as in =overlay=. 42 | 43 | * RETURN VALUE 44 | 45 | Routines that return an integer return =ERR= upon failure, and =OK= 46 | (SVr4 only specifies "an integer value other than =ERR=") upon 47 | successful completion. 48 | 49 | X/Open defines no error conditions. In this implementation, 50 | =copywin=, =overlay= and =overwrite= return an error if either of 51 | the window pointers are null, or if some part of the window would be 52 | placed off-screen. 53 | 54 | * NOTES 55 | 56 | Note that =overlay= and =overwrite= may be macros. 57 | 58 | * PORTABILITY 59 | 60 | The XSI Curses standard, Issue 4 describes these functions (adding 61 | the const qualifiers). It further specifies their behavior in the 62 | presence of characters with multibyte renditions (not yet supported 63 | in this implementation). 64 | 65 | * SEE ALSO 66 | 67 | [[file:ncurses.3x.org][curses(3x)]], [[file:curs_pad.3x.org][curs_pad(3x)]], [[file:curs_refresh.3x.org][curs_refresh(3x)]] 68 | -------------------------------------------------------------------------------- /man/curs_print.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_print 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =mcprint= - ship binary data to printer 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | 15 | int mcprint(char *data, int len); 16 | #+END_SRC 17 | 18 | * DESCRIPTION 19 | 20 | This function uses the =mc5p= or =mc4= and =mc5= capabilities, if 21 | they are present, to ship given data to a printer attached to the 22 | terminal. 23 | 24 | Note that the =mcprint= code has no way to do flow control with the 25 | printer or to know how much buffering it has. Your application is 26 | responsible for keeping the rate of writes to the printer below its 27 | continuous throughput rate (typically about half of its nominal cps 28 | rating). Dotmatrix printers and 6-page-per-minute lasers can 29 | typically handle 80cps, so a good conservative rule of thumb is to 30 | sleep for a second after shipping each 80-character line. 31 | 32 | * RETURN VALUE 33 | 34 | The =mcprint= function returns =ERR= if the write operation aborted 35 | for some reason. In this case, =errno= will contain either an error 36 | associated with =write(2)= or one of the following: 37 | 38 | - =ENODEV= :: Capabilities for printer redirection do not exist. 39 | 40 | - =ENOMEM= :: Couldn't allocate sufficient memory to buffer the 41 | printer write. 42 | 43 | 44 | When =mcprint= succeeds, it returns the number of characters 45 | actually sent to the printer. 46 | 47 | * PORTABILITY 48 | 49 | The =mcprint= call was designed for [[file:ncurses.3x.org][ncurses(3x)]], and is not found in 50 | SVr4 curses, 4.4BSD curses, or any other previous version of curses. 51 | 52 | * BUGS 53 | 54 | Padding in the =mc5p=, =mc4= and =mc5= capabilities will not be 55 | interpreted. 56 | 57 | * SEE ALSO 58 | 59 | [[file:ncurses.3x.org][curses(3x)]] 60 | -------------------------------------------------------------------------------- /man/curs_printw.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_printw 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =printw=, =wprintw=, =mvprintw=, =mvwprintw=, =vwprintw=, 9 | =vw_printw= - print formatted output in =curses= windows 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | 16 | int printw(const char *fmt, ...); 17 | int wprintw(WINDOW *win, const char *fmt, ...); 18 | int mvprintw(int y, int x, const char *fmt, ...); 19 | int mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...); 20 | int vwprintw(WINDOW *win, const char *fmt, va_list varglist); 21 | int vw_printw(WINDOW *win, const char *fmt, va_list varglist); 22 | #+END_SRC 23 | 24 | * DESCRIPTION 25 | 26 | The =printw=, =wprintw=, =mvprintw= and =mvwprintw= routines are 27 | analogous to printf [see [[man:printf][printf(3)]]]. In effect, the string that 28 | would be output by =printf= is output instead as though =waddstr= 29 | were used on the given window. 30 | 31 | The =vwprintw= and =wv_printw= routines are analogous to =vprintf= 32 | [see [[man:printf][printf(3)]]] and perform a =wprintw= using a variable argument 33 | list. The third argument is a =va_list=, a pointer to a list of 34 | arguments, as defined in ==. 35 | 36 | * RETURN VALUE 37 | 38 | Routines that return an integer return =ERR= upon failure and =OK= 39 | (SVr4 only specifies "an integer value other than =ERR=") upon 40 | successful completion. 41 | 42 | X/Open defines no error conditions. In this implementation, an 43 | error may be returned if it cannot allocate enough memory for the 44 | buffer used to format the results. It will return an error if the 45 | window pointer is null. 46 | 47 | Functions with a "mv" prefix first perform a cursor movement using 48 | =wmove=, and return an error if the position is outside the window, 49 | or if the window pointer is null. 50 | 51 | * PORTABILITY 52 | 53 | The XSI Curses standard, Issue 4 describes these functions. The 54 | function =vwprintw= is marked TO BE =WITHDRAWN=, and is to be 55 | replaced by a function =vw_printw= using the == interface. 56 | The Single Unix Specification, Version 2 states that =vw_printw= is 57 | preferred to =vwprintw= since the latter requires including 58 | ==, which cannot be used in the same file as 59 | ==. This implementation uses == for both, 60 | because that header is included in ==. 61 | 62 | * SEE ALSO 63 | 64 | [[file:ncurses.3x.org][curses(3x)]], [[man:printf][printf(3)]], [[man:vprintf][vprintf(3)]] 65 | -------------------------------------------------------------------------------- /man/curs_scroll.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: curs_scroll 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =scroll=, =scrl=, =wscrl= - scroll a =curses= window 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | 15 | int scroll(WINDOW *win); 16 | int scrl(int n); 17 | int wscrl(WINDOW *win, int n); 18 | #+END_SRC 19 | 20 | * DESCRIPTION 21 | 22 | The =scroll= routine scrolls the window up one line. This involves 23 | moving the lines in the window data structure. As an optimization, 24 | if the scrolling region of the window is the entire screen, the 25 | physical screen may be scrolled at the same time. 26 | 27 | For positive /n/, the =scrl= and =wscrl= routines scroll the window 28 | up /n/ lines (line /i+n/ becomes /i/); otherwise scroll the window 29 | down /n/ lines. This involves moving the lines in the window 30 | character image structure. The current cursor position is not 31 | changed. 32 | 33 | For these functions to work, scrolling must be enabled via 34 | =scrollok=. 35 | 36 | * RETURN VALUE 37 | 38 | These routines return =ERR= upon failure, and =OK= (SVr4 only 39 | specifies "an integer value other than =ERR=") upon successful 40 | completion. 41 | 42 | X/Open defines no error conditions. 43 | 44 | This implementation returns an error if the window pointer is null, 45 | or if scrolling is not enabled in the window, e.g., with =scrollok=. 46 | 47 | * NOTES 48 | 49 | Note that =scrl= and =scroll= may be macros. 50 | 51 | The SVr4 documentation says that the optimization of physically 52 | scrolling immediately if the scroll region is the entire screen "is" 53 | performed, not "may be" performed. This implementation deliberately 54 | does not guarantee that this will occur, to leave open the 55 | possibility of smarter optimization of multiple scroll actions on 56 | the next update. 57 | 58 | Neither the SVr4 nor the XSI documentation specify whether the 59 | current attribute or current color-pair of blanks generated by the 60 | scroll function is zeroed. Under this implementation it is. 61 | 62 | * PORTABILITY 63 | 64 | The XSI Curses standard, Issue 4 describes these functions. 65 | 66 | * SEE ALSO 67 | 68 | [[file:ncurses.3x.org][curses(3x)]], [[file:curs_outopts.3x.org][curs_outopts(3x)]] 69 | -------------------------------------------------------------------------------- /man/define_key.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: define_key 3x 2 | #+AUTHOR: Thomas Dickey 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =define_key= - define a keycode 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | 15 | int define_key(const char *definition, int keycode); 16 | #+END_SRC 17 | 18 | * DESCRIPTION 19 | 20 | This is an extension to the curses library. It permits an 21 | application to define keycodes with their corresponding control 22 | strings, so that the ncurses library will interpret them just as it 23 | would the predefined codes in the terminfo database. 24 | 25 | If the given string is null, any existing definition for the keycode 26 | is removed. Similarly, if the given keycode is negative or zero, 27 | any existing string for the given definition is removed. 28 | 29 | * RETURN VALUE 30 | 31 | The keycode must be greater than zero, and the string nonnull, 32 | otherwise =ERR= is returned. =ERR= may also be returned if there is 33 | insufficient memory to allocate the data to store the definition. 34 | If no error is detected, =OK= is returned. 35 | 36 | * PORTABILITY 37 | 38 | These routines are specific to ncurses. They were not supported on 39 | Version 7, BSD or System V implementations. It is recommended that 40 | any code depending on them be conditioned using =NCURSES_VERSION=. 41 | 42 | * SEE ALSO 43 | 44 | [[file:keyok.3x.org][keyok(3x)]], [[file:key_defined.3x.org][key_defined(3x)]]. 45 | 46 | * AUTHOR 47 | 48 | Thomas Dickey. 49 | -------------------------------------------------------------------------------- /man/form_cursor.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: form_cursor 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =pos_form_cursor= - position a form window cursor 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | int pos_form_cursor(FORM *form); 15 | #+END_SRC 16 | 17 | * DESCRIPTION 18 | 19 | The function =pos_form_cursor= restores the cursor to the position 20 | required for the forms driver to continue processing requests. This 21 | is useful after =curses= routines have been called to do 22 | screen-painting in response to a form operation. 23 | 24 | * RETURN VALUE 25 | 26 | This routine returns one of the following: 27 | 28 | * =E_OK= :: The routine succeeded. 29 | 30 | * =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 31 | argument. 32 | 33 | * =E_NOT_POSTED= :: The form has not been posted. 34 | 35 | * =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 36 | 37 | * SEE ALSO 38 | 39 | [[file:ncurses.3x.org][curses(3x)]], [[file:form.3x.org][form(3x)]]. 40 | 41 | * NOTES 42 | 43 | The header file == automatically includes the header file 44 | ==. 45 | 46 | * PORTABILITY 47 | 48 | These routines emulate the System V forms library. They were not 49 | supported on Version 7 or BSD versions. 50 | 51 | * AUTHORS 52 | 53 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 54 | S. Raymond. 55 | -------------------------------------------------------------------------------- /man/form_data.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: form_data 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =data_ahead=, =data_behind= - test for off-screen data in given 9 | forms 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | bool data_ahead(const FORM *form); 16 | bool data_behind(const FORM *form); 17 | #+END_SRC 18 | 19 | * DESCRIPTION 20 | 21 | The function =data_ahead= tests whether there is off-screen data 22 | ahead in the given form. It returns =TRUE= (1) or =FALSE= (0). 23 | 24 | The function =data_behind= tests whether there is off-screen data 25 | behind in the given form. It returns =TRUE= (1) or =FALSE= (0). 26 | 27 | * SEE ALSO 28 | 29 | [[file:ncurses.3x.org][curses(3x)]], [[file:form.3x.org][form(3x)]]. 30 | 31 | * NOTES 32 | 33 | The header file == automatically includes the header file 34 | ==. 35 | 36 | * PORTABILITY 37 | 38 | These routines emulate the System V forms library. They were not 39 | supported on Version 7 or BSD versions. 40 | 41 | * AUTHORS 42 | 43 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 44 | S. Raymond. 45 | -------------------------------------------------------------------------------- /man/form_field.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: form_field 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =form_field= - make and break connections between fields and forms 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | int set_form_fields(FORM *form, FIELD **fields); 15 | FIELD **form_fields(const FORM *form); 16 | int field_count(const FORM *form); 17 | int move_field(FIELD *field, int frow, int fcol); 18 | #+END_SRC 19 | 20 | * DESCRIPTION 21 | 22 | The function =set_form_fields= changes the field pointer array of 23 | the given form. The array must be terminated by a =NULL=. 24 | 25 | The function =form_fields= returns the field array of the given 26 | form. 27 | 28 | The function =field_count= returns the count of fields in form. 29 | 30 | The function =move_field= moves the given field (which must be 31 | disconnected) to a specified location on the screen. 32 | 33 | * RETURN VALUE 34 | 35 | The function =form_fields= returns a pointer (which may be =NULL=). 36 | It does not set =errno=. 37 | 38 | The function =field_count= returns =ERR= if the form parameter is 39 | =NULL=. 40 | 41 | The functions =set_form_fields= and =move_field= return one of the 42 | following codes on error: 43 | 44 | * =E_OK= :: The routine succeeded. 45 | 46 | * =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 47 | argument. 48 | 49 | * =E_CONNECTED= :: The field is already connected to a form. 50 | 51 | * =E_POSTED= :: The form is already posted. 52 | 53 | * =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 54 | 55 | * SEE ALSO 56 | 57 | [[file:ncurses.3x.org][curses(3x)]], [[file:form.3x.org][form(3x)]]. 58 | 59 | * NOTES 60 | 61 | The header file == automatically includes the header file 62 | ==. 63 | 64 | * PORTABILITY 65 | 66 | These routines emulate the System V forms library. They were not 67 | supported on Version 7 or BSD versions. 68 | 69 | The SVr4 forms library documentation specifies the =field_count= 70 | error value as =-1= (which is the value of =ERR=). 71 | 72 | * AUTHORS 73 | 74 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 75 | S. Raymond. 76 | -------------------------------------------------------------------------------- /man/form_field_attributes.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: form_field_attributes 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =form_field_attributes= - color and attribute control for form 9 | fields 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | int set_field_fore(FIELD *field, chtype attr); 16 | chtype field_fore(const FIELD *field); 17 | int set_field_back(FIELD *field, chtype attr); 18 | chtype field_back(const FIELD *field); 19 | int set_field_pad(FIELD *field, int pad); 20 | int field_pad(const FIELD *field); 21 | #+END_SRC 22 | 23 | * DESCRIPTION 24 | 25 | The function =set_field_fore= sets the foreground attribute of 26 | /field/. This is the highlight used to display the field contents. 27 | The function =field_fore= returns the foreground attribute. The 28 | default is =A_STANDOUT=. 29 | 30 | The function =set_field_back= sets the background attribute of 31 | form. This is the highlight used to display the extent fields in the 32 | form. The function =field_back= returns the background attribute. 33 | The default is =A_NORMAL=. 34 | 35 | The function =set_field_pad= sets the character used to fill the 36 | field. The function =field_pad= returns the given form's pad 37 | character. The default is a blank. 38 | 39 | * RETURN VALUE 40 | 41 | These routines return one of the following: 42 | 43 | * =E_OK= :: The routine succeeded. 44 | 45 | * =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 46 | argument. 47 | 48 | * =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 49 | 50 | * SEE ALSO 51 | 52 | [[file:ncurses.3x.org][curses(3x)]] and related pages whose names begin "form_" for detailed 53 | descriptions of the entry points. 54 | 55 | * NOTES 56 | 57 | The header file == automatically includes the header file 58 | ==. 59 | 60 | * PORTABILITY 61 | 62 | These routines emulate the System V forms library. They were not 63 | supported on Version 7 or BSD versions. 64 | 65 | * AUTHORS 66 | 67 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 68 | S. Raymond. 69 | -------------------------------------------------------------------------------- /man/form_field_info.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: form_field_info 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =dynamic_field_info=, =form_field_info= - retrieve field 9 | characteristics 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | int field_info(const FIELD *field, int *rows, int *cols, 16 | int *frow, int *fcol, int *nrow, int *nbuf); 17 | int dynamic_field_info(const FIELD *field, int *rows, 18 | int *cols, int *max); 19 | #+END_SRC 20 | 21 | * DESCRIPTION 22 | 23 | The function =field_info= returns the sizes and other attributes 24 | passed in to the field at its creation time. The attributes are: 25 | height, width, row of upper-left corner, column of upper-left 26 | corner, number off-screen rows, and number of working buffers. 27 | 28 | The function =dynamic_field_info= returns the actual size of the 29 | field, and its maximum possible size. If the field has no size 30 | limit, the location addressed by the third argument will be set 31 | to 0. A field can be made dynamic by turning off the =O_STATIC= 32 | option with =field_opts_off= . 33 | 34 | * RETURN VALUE 35 | 36 | These routines return one of the following: 37 | 38 | * =E_OK= :: The routine succeeded. 39 | 40 | * =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 41 | 42 | * =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 43 | argument. 44 | 45 | * SEE ALSO 46 | 47 | [[file:ncurses.3x.org][curses(3x)]] and related pages whose names begin "form_" for detailed 48 | descriptions of the entry points. 49 | 50 | * NOTES 51 | 52 | The header file == automatically includes the header file 53 | ==. 54 | 55 | * PORTABILITY 56 | 57 | These routines emulate the System V forms library. They were not 58 | supported on Version 7 or BSD versions. 59 | 60 | A null (zero pointer) is accepted for any of the return values, to 61 | ignore that value. Not all implementations allow this, e.g., 62 | Solaris 2.7 does not. 63 | 64 | * AUTHORS 65 | 66 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 67 | S. Raymond. 68 | -------------------------------------------------------------------------------- /man/form_field_just.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: form_field_just 3x 2 | #+AUTHOR: Juergen Pfeifer & Eric S. Raymond. 3 | 4 | #+LANGUAGE: en 5 | #+STARTUP: showall 6 | 7 | * NAME 8 | 9 | =set_field_just=, =field_just= - retrieve field characteristics 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | int set_field_just(FIELD *field, int justification); 16 | int field_just(const FIELD *field); 17 | #+END_SRC 18 | 19 | * DESCRIPTION 20 | 21 | The function =set_field_just= sets the justification attribute of a 22 | field; =field_just= returns a field's justification attribute. The 23 | attribute may be one of =NO_JUSTIFICATION=, =JUSTIFY_RIGHT=, 24 | =JUSTIFY_LEFT=, or =JUSTIFY_CENTER=. 25 | 26 | * RETURN VALUE 27 | 28 | The function field_just returns one of: =NO_JUSTIFICATION=, 29 | =JUSTIFY_RIGHT=, =JUSTIFY_LEFT=, or =JUSTIFY_CENTER=. 30 | 31 | The function set_field_just returns one of the following: 32 | 33 | * =E_OK= :: The routine succeeded. 34 | 35 | * =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 36 | 37 | * =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 38 | argument. 39 | 40 | * SEE ALSO 41 | 42 | [[file:ncurses.3x.org][curses(3x)]] and related pages whose names begin "form_" for detailed 43 | descriptions of the entry points. 44 | 45 | * NOTES 46 | 47 | The header file == automatically includes the header file 48 | ==. 49 | 50 | * PORTABILITY 51 | 52 | These routines emulate the System V forms library. They were not 53 | supported on Version 7 or BSD versions. 54 | 55 | * AUTHORS 56 | 57 | Juergen Pfeifer. Manual pages and adaptation for new 58 | curses by Eric S. Raymond. 59 | -------------------------------------------------------------------------------- /man/form_field_userptr.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: form_field_userptr 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =set_field_userptr=, =field_userptr= - associate application data 9 | with a form field 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | int set_field_userptr(FIELD *field, void*userptr); 16 | void *field_userptr(const FIELD *field); 17 | #+END_SRC 18 | 19 | * DESCRIPTION 20 | 21 | Every form field has a field that can be used to hold 22 | application-specific data (that is, the form-driver code leaves it 23 | alone). These functions get and set that field. 24 | 25 | * RETURN VALUE 26 | 27 | The function =field_userptr= returns a pointer (which may be 28 | =NULL=). It does not set =errno=. 29 | 30 | The function =set_field_userptr= returns =E_OK= (success). 31 | 32 | * SEE ALSO 33 | 34 | [[file:ncurses.3x.org][curses(3x)]], [[file:form.3x.org][form(3x)]]. 35 | 36 | * NOTES 37 | 38 | The header file == automatically includes the header file 39 | ==. 40 | 41 | * PORTABILITY 42 | 43 | These routines emulate the System V forms library. They were not 44 | supported on Version 7 or BSD versions. 45 | 46 | The user pointer is a void pointer. We chose not to leave it as a 47 | char pointer for SVr4 compatibility. 48 | 49 | * AUTHORS 50 | 51 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 52 | S. Raymond. 53 | -------------------------------------------------------------------------------- /man/form_hook.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: form_hook 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =form_hook= - set hooks for automatic invocation by applications 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | int set_field_init(FORM *form, Form_Hook func); 15 | Form_Hook field_init(const FORM *form); 16 | int set_field_term(FORM *form, Form_Hook func); 17 | Form_Hook field_term(const FORM *form); 18 | int set_form_init(FORM *form, Form_Hook func); 19 | Form_Hook form_init(const FORM *form); 20 | int set_form_term(FORM *form, Form_Hook func); 21 | Form_Hook form_term(const FORM *form); 22 | #+END_SRC 23 | 24 | * DESCRIPTION 25 | 26 | These functions make it possible to set hook functions to be called 27 | at various points in the automatic processing of input event codes 28 | by =form_driver=. 29 | 30 | The function =set_field_init= sets a hook to be called at form-post 31 | time and each time the selected field changes (after the change). 32 | =field_init= returns the current field =init= hook, if any (=NULL= 33 | if there is no such hook). 34 | 35 | The function =set_field_term= sets a hook to be called at 36 | form-unpost time and each time the selected field changes (before 37 | the change). =field_term= returns the current field term hook, if 38 | any (=NULL= if there is no such hook). 39 | 40 | The function =set_form_init= sets a hook to be called at form-post 41 | time and just after a page change once it is posted. =form_init= 42 | returns the current form init hook, if any (=NULL= if there is no 43 | such hook). 44 | 45 | The function =set_form_term= sets a hook to be called at form-unpost 46 | time and just before a page change once it is posted. =form_init= 47 | returns the current form term hook, if any (=NULL= if there is no 48 | such hook). 49 | 50 | * RETURN VALUE 51 | 52 | Routines that return pointers return =NULL= on error. Other 53 | routines return one of the following: 54 | 55 | - =E_OK= :: The routine succeeded. 56 | 57 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 58 | 59 | * SEE ALSO 60 | 61 | [[file:ncurses.3x.org][curses(3x)]], [[file:form.3x.org][form(3x)]]. 62 | 63 | * NOTES 64 | 65 | The header file == automatically includes the header file 66 | ==. 67 | 68 | * PORTABILITY 69 | 70 | These routines emulate the System V forms library. They were not 71 | supported on Version 7 or BSD versions. 72 | 73 | * AUTHORS 74 | 75 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 76 | S. Raymond. 77 | -------------------------------------------------------------------------------- /man/form_new.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: form_new 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =new_form=, =free_form= - create and destroy forms 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | FORM *new_form(FIELD **fields); 15 | int free_form(FORM *form); 16 | #+END_SRC 17 | 18 | * DESCRIPTION 19 | 20 | The function =new_form= creates a new form connected to a specified 21 | field pointer array (which must be =NULL=-terminated). 22 | 23 | The function =free_form= disconnects form from its field array and 24 | frees the storage allocated for the form. 25 | 26 | * RETURN VALUE 27 | 28 | The function =new_form= returns =NULL= on error. It sets =errno= 29 | according to the function's success: 30 | 31 | - =E_OK= :: The routine succeeded. 32 | 33 | - =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 34 | argument. 35 | 36 | - =E_CONNECTED= :: The field is already connected to a form. 37 | 38 | - =E_SYSTEM_ERROR= :: System error occurred, e.g., malloc failure. 39 | 40 | 41 | The function =free_form= returns one of the following: 42 | 43 | - =E_OK= :: The routine succeeded. 44 | 45 | - =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 46 | argument. 47 | 48 | - =E_POSTED= :: The form has already been posted. 49 | 50 | * SEE ALSO 51 | 52 | [[file:ncurses.3x.org][curses(3x)]], [[file:form.3x.org][form(3x)]]. 53 | 54 | * NOTES 55 | 56 | The header file == automatically includes the header file 57 | ==. 58 | 59 | * PORTABILITY 60 | 61 | These routines emulate the System V forms library. They 62 | were not supported on Version 7 or BSD versions. 63 | 64 | * AUTHORS 65 | 66 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 67 | S. Raymond. 68 | -------------------------------------------------------------------------------- /man/form_new_page.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: form_new_page 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =set_new_page=, =new_page= - form pagination functions 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | int set_new_page(FIELD *field, bool new_page_flag); 15 | bool new_page(const FIELD *field); 16 | #+END_SRC 17 | 18 | * DESCRIPTION 19 | 20 | The function =set_new_page= sets or resets a flag marking the given 21 | field as the beginning of a new page on its form. 22 | 23 | The function =new_page= is a predicate which tests if a given field 24 | marks a page beginning on its form. 25 | 26 | * RETURN VALUE 27 | 28 | The function =new_page= returns =TRUE= or =FALSE=. 29 | 30 | The function =set_new_page= return one of the following: 31 | 32 | - =E_OK= :: The routine succeeded. 33 | 34 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 35 | 36 | - =E_CONNECTED= :: The given field is already connected to a 37 | form. 38 | 39 | * SEE ALSO 40 | 41 | [[file:ncurses.3x.org][curses(3x)]] and related pages whose names begin "form_" for detailed 42 | descriptions of the entry points. 43 | 44 | * NOTES 45 | 46 | The header file == automatically includes the header file 47 | ==. 48 | 49 | * PORTABILITY 50 | 51 | These routines emulate the System V forms library. They were not 52 | supported on Version 7 or BSD versions. 53 | 54 | * AUTHORS 55 | 56 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 57 | S. Raymond. 58 | -------------------------------------------------------------------------------- /man/form_opts.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: form_opts 3x 2 | #+AUTHOR: Juergen Pfeifer & Eric S. Raymond. 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =set_form_opts=, =form_opts_on=, =form_opts_off=, =form_opts= - set 9 | and get form options 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | int set_form_opts(FORM *form, Field_Options opts); 16 | int form_opts_on(FORM *form, Field_Options opts); 17 | int form_opts_off(FORM *form, Field_Options opts); 18 | Field_Options form_opts(const FORM *form); 19 | #+END_SRC 20 | 21 | * DESCRIPTION 22 | 23 | The function =set_form_opts= sets all the given form's option bits 24 | (form option bits may be logically-OR'ed together). 25 | 26 | The function =form_opts_on= turns on the given option bits, and 27 | leaves others alone. 28 | 29 | The function =form_opts_off= turns off the given option bits, and 30 | leaves others alone. 31 | 32 | The function =form_opts= returns the form's current option bits. 33 | 34 | The following options are defined (all are on by default): 35 | 36 | - =O_NL_OVERLOAD= :: 37 | 38 | Overload the =REQ_NEW_LINE= forms driver request so that calling 39 | it at the end of a field goes to the next field. 40 | 41 | - =O_BS_OVERLOAD= :: 42 | 43 | Overload the =REQ_DEL_PREV= forms driver request so that calling 44 | it at the beginning of a field goes to the previous field. 45 | 46 | * RETURN VALUE 47 | 48 | Except for =form_opts=, each routine returns one of the following: 49 | 50 | - =E_OK= :: The routine succeeded. 51 | 52 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 53 | 54 | * SEE ALSO 55 | 56 | [[file:ncurses.3x.org][curses(3x)]], [[file:form.3x.org][form(3x)]]. 57 | 58 | * NOTES 59 | 60 | The header file == automatically includes the header file 61 | ==. 62 | 63 | * PORTABILITY 64 | 65 | These routines emulate the System V forms library. They were not 66 | supported on Version 7 or BSD versions. 67 | 68 | * AUTHORS 69 | 70 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 71 | S. Raymond. 72 | -------------------------------------------------------------------------------- /man/form_page.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: form_page 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =form_page= - set and get form page number 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | int set_current_field(FORM *form, FIELD *field); 15 | FIELD *current_field(const FORM *); 16 | int set_form_page(FORM *form, int n); 17 | int form_page(const FORM *form); 18 | int field_index(const FIELD *field); 19 | #+END_SRC 20 | 21 | * DESCRIPTION 22 | 23 | The function =set_current= field sets the current field of the given 24 | form; =current_field= returns the current field of the given form. 25 | 26 | The function =set_form_page= sets the form's page number (goes to 27 | page /n/ of the form). 28 | 29 | The function =form_page= returns the form's current page number. 30 | 31 | The function =field_index= returns the index of the field in the 32 | field array of the form it is connected to. It returns =ERR= if the 33 | argument is the null pointer or the field is not connected. 34 | 35 | * RETURN VALUE 36 | 37 | Except for =form_page=, each routine returns one of the following: 38 | 39 | - =E_OK= :: The routine succeeded. 40 | 41 | - =E_BAD_ARGUMENT= :: Routine detected an incorrect or 42 | out-of-range argument. 43 | 44 | - =E_BAD_STATE= :: Routine was called from an initialization or 45 | termination function. 46 | 47 | - =E_INVALID_FIELD= :: Contents of a field are not valid. 48 | 49 | - =E_REQUEST_DENIED= :: The form driver could not process the 50 | request. 51 | 52 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 53 | 54 | * SEE ALSO 55 | 56 | [[file:ncurses.3x.org][curses(3x)]], [[file:form.3x.org][form(3x)]]. 57 | 58 | * NOTES 59 | 60 | The header file == automatically includes the header file 61 | ==. 62 | 63 | * PORTABILITY 64 | 65 | These routines emulate the System V forms library. They were not 66 | supported on Version 7 or BSD versions. 67 | 68 | * AUTHORS 69 | 70 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 71 | S. Raymond. 72 | -------------------------------------------------------------------------------- /man/form_post.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: form_post 3x 2 | #+AUTHOR: Juergen Pfeifer & Eric S. Raymond. 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =post_form=, =unpost_form= - write or erase forms from associated 9 | subwindows 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | int post_form(FORM *form); 16 | int unpost_form(FORM *form); 17 | #+END_SRC 18 | 19 | * DESCRIPTION 20 | 21 | The function =post_form= displays a form to its associated 22 | subwindow. To trigger physical display of the subwindow, use 23 | =refresh= or some equivalent =curses= routine (the implicit 24 | =doupdate= triggered by an =curses= input request will do). 25 | 26 | The function =unpost_form= erases form from its associated 27 | subwindow. 28 | 29 | * RETURN VALUE 30 | 31 | These routines return one of the following: 32 | 33 | - =E_OK= :: The routine succeeded. 34 | 35 | - =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 36 | argument. 37 | 38 | - =E_BAD_STATE= :: Routine was called from an initialization or 39 | termination function. 40 | 41 | - =E_NOT_POSTED= :: The form has not been posted. 42 | 43 | - =E_NOT_CONNECTED= :: No items are connected to the form. 44 | 45 | - =E_NO_ROOM= :: Form is too large for its window. 46 | 47 | - =E_POSTED= :: The form has already been posted. 48 | 49 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 50 | 51 | * SEE ALSO 52 | 53 | [[file:ncurses.3x.org][curses(3x)]], [[file:form.3x.org][form(3x)]]. 54 | 55 | * NOTES 56 | 57 | The header file == automatically includes the header file 58 | ==. 59 | 60 | * PORTABILITY 61 | 62 | These routines emulate the System V forms library. They were not 63 | supported on Version 7 or BSD versions. 64 | 65 | * AUTHORS 66 | 67 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 68 | S. Raymond. 69 | -------------------------------------------------------------------------------- /man/form_requestname.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: form_requestname 3x 2 | #+AUTHOR: Juergen Pfeifer & Eric S. Raymond. 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =form_request_by_ name=, =form_request_name= - handle printable form 9 | request names 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | const char *form_request_name(int request); 16 | int form_request_by_name(const char *name); 17 | #+END_SRC 18 | 19 | * DESCRIPTION 20 | 21 | The function =form_request_name= returns the printable name of a 22 | form request code. The function =form_request_by_name= searches in 23 | the name-table for a request with the given name and returns its 24 | request code. Otherwise =E_NO_MATCH= is returned. 25 | 26 | * RETURN VALUE 27 | 28 | =form_request_name= returns =NULL= on error and sets =errno= to 29 | =E_BAD_ARGUMENT=. 30 | 31 | =form_request_by_name= returns =E_NO_MATCH= on error. It does not 32 | set =errno=. 33 | 34 | * SEE ALSO 35 | 36 | [[file:ncurses.3x.org][curses(3x)]], [[file:form.3x.org][form(3x)]]. 37 | 38 | * NOTES 39 | 40 | The header file == automatically includes the header file 41 | ==. 42 | 43 | * PORTABILITY 44 | 45 | These routines are specific to ncurses. They were not supported on 46 | Version 7, BSD or System V implementations. It is recommended that 47 | any code depending on them be conditioned using =NCURSES_VERSION=. 48 | 49 | * AUTHORS 50 | 51 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 52 | S. Raymond. 53 | -------------------------------------------------------------------------------- /man/form_userptr.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: form_userptr 3x 2 | #+AUTHOR: Juergen Pfeifer & Eric S. Raymond. 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =set_form_userptr=, =form_userptr= - associate application data with 9 | a form item 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | int set_form_userptr(FORM *form, void *userptr); 16 | void* form_userptr(const FORM *form); 17 | #+END_SRC 18 | 19 | * DESCRIPTION 20 | 21 | Every form and every form item has a field that can be used to hold 22 | application-specific data (that is, the formdriver code leaves it 23 | alone). These functions get and set the form user pointer field. 24 | 25 | * RETURN VALUE 26 | 27 | The function =form_userptr= returns a pointer (which may be =NULL=). 28 | It does not set =errno=. 29 | 30 | The function =set_form_userptr= returns =E_OK= (success). 31 | 32 | * SEE ALSO 33 | 34 | [[file:ncurses.3x.org][curses(3x)]], [[file:form.3x.org][form(3x)]]. 35 | 36 | * NOTES 37 | 38 | The header file == automatically includes the header file 39 | ==. 40 | 41 | * PORTABILITY 42 | 43 | These routines emulate the System V forms library. They were not 44 | supported on Version 7 or BSD versions. 45 | 46 | The user pointer is a void pointer. We chose not to leave it as a 47 | char pointer for SVr4 compatibility. 48 | 49 | * AUTHORS 50 | 51 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 52 | S. Raymond. 53 | -------------------------------------------------------------------------------- /man/form_variables.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: form_variables 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =TYPE_ALNUM=, =TYPE_ALPHA=, =TYPE_ENUM=, =TYPE_INTEGER=, 9 | =TYPE_IPV4=, =TYPE_NUMERIC=, =TYPE_REGEXP= - form system global 10 | variables 11 | 12 | * SYNOPSIS 13 | 14 | #+BEGIN_SRC c 15 | #include 16 | 17 | FIELDTYPE * TYPE_ALNUM; 18 | FIELDTYPE * TYPE_ALPHA; 19 | FIELDTYPE * TYPE_ENUM; 20 | FIELDTYPE * TYPE_INTEGER; 21 | FIELDTYPE * TYPE_IPV4; 22 | FIELDTYPE * TYPE_NUMERIC; 23 | FIELDTYPE * TYPE_REGEXP; 24 | #+END_SRC 25 | 26 | * DESCRIPTION 27 | 28 | These are building blocks for the form library, defining fields that 29 | can be created using [[file:form_fieldtype.3x.org][form_fieldtype(3x)]]. Each provides functions 30 | for field- and character-validation, according to the given 31 | datatype. 32 | 33 | - =TYPE_ALNUM= :: This holds alphanumeric data. 34 | 35 | - =TYPE_ALPHA= :: This holds alphabetic data. 36 | 37 | - =TYPE_ENUM= :: This holds an enumerated type. 38 | 39 | - =TYPE_INTEGER= :: This holds a decimal integer. 40 | 41 | - =TYPE_IPV4= :: This holds an IPv4 internet address, e.g., 42 | "127.0.0.1". 43 | 44 | - =TYPE_NUMERIC= :: This holds a decimal number, with optional sign 45 | and decimal point. 46 | 47 | - =TYPE_REGEXP= :: This holds a regular expression. 48 | 49 | * PORTABILITY 50 | 51 | The =TYPE_IPV4= variable is an extension not provided by older 52 | implementations of the form library. 53 | 54 | * SEE ALSO 55 | 56 | [[file:form.3x.org][form(3x)]]. 57 | -------------------------------------------------------------------------------- /man/form_win.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: form_win 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =form_win= - make and break form window and subwindow associations 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | int set_form_win(FORM *form, WINDOW *win); 15 | WINDOW *form_win(const FORM *form); 16 | int set_form_sub(FORM *form, WINDOW *sub); 17 | WINDOW *form_sub(const FORM *form); 18 | int scale_form(const FORM *form, int *rows, int *columns); 19 | #+END_SRC 20 | 21 | * DESCRIPTION 22 | 23 | Every form has an associated pair of =curses= windows. The form 24 | window displays any title and border associated with the window; the 25 | form subwindow displays the items of the form that are currently 26 | available for selection. 27 | 28 | The first four functions get and set those windows. It is not 29 | necessary to set either window; by default, the driver code uses 30 | =stdscr= for both. 31 | 32 | In the =set_= functions, window argument of =NULL= is treated as 33 | though it were =stsdcr=. A form argument of =NULL= is treated as a 34 | request to change the system default form window or subwindow. 35 | 36 | The function =scale_form= returns the minimum size required for the 37 | subwindow of form. 38 | 39 | * RETURN VALUE 40 | 41 | Routines that return pointers return =NULL= on error. Routines that 42 | return an integer return one of the following error codes: 43 | 44 | - =E_OK= :: The routine succeeded. 45 | 46 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 47 | 48 | - =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 49 | argument. 50 | 51 | - =E_POSTED= :: The form has already been posted. 52 | 53 | - =E_NOT_CONNECTED= :: No items are connected to the form. 54 | 55 | * SEE ALSO 56 | 57 | [[file:ncurses.3x.org][curses(3x)]], [[file:curs_variables.3x.org][curs_variables(3x)]], [[file:form.3x.org][form(3x)]]. 58 | 59 | * NOTES 60 | 61 | The header file == automatically includes the header file 62 | ==. 63 | 64 | * PORTABILITY 65 | 66 | These routines emulate the System V forms library. They were not 67 | supported on Version 7 or BSD versions. 68 | 69 | * AUTHORS 70 | 71 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 72 | S. Raymond. 73 | -------------------------------------------------------------------------------- /man/index.org: -------------------------------------------------------------------------------- 1 | #+TITLE: NCURSES – Manual Pages 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * Programs: 7 | 8 | * [[file:captoinfo.1m.org][captoinfo – convert a termcap description into a terminfo 9 | description]] 10 | 11 | * [[file:clear.1.org][clear – clear the terminal screen]] 12 | 13 | * [[file:infocmp.1m.org][infocmp – compare or print out terminfo descriptions]] 14 | 15 | * [[file:infotocap.1m.org][infotocap – convert a terminfo description into a termcap 16 | description]] 17 | 18 | * [[file:tabs.1.org][tabs – set tabs on a terminal]] 19 | 20 | * [[file:tic.1m.org][tic – the terminfo entry-description compiler]] 21 | 22 | * [[file:toe.1m.org][toe – table of (terminfo) entries]] 23 | 24 | * [[file:tput.1.org][tput – initialize a terminal or query terminfo database]] 25 | 26 | * [[file:tset.1.org][tset – terminal initialization]] 27 | 28 | * Libraries: 29 | 30 | * [[file:ncurses.3x.org][ncurses – CRT screen handling and optimization package]] 31 | 32 | * [[file:panel.3x.org][panel – panel stack extension for curses]] 33 | 34 | * [[file:form.3x.org][form – curses extension for programming forms]] 35 | 36 | * [[file:menu.3x.org][menu – curses extension for programming menus]] 37 | 38 | * File formats: 39 | 40 | * [[file:terminfo.5.org][terminfo – terminal capability data base]] 41 | 42 | * [[file:term.5.org][term – format of compiled term file.]] 43 | 44 | * [[file:term.7.org][term – conventions for naming terminal types]] 45 | -------------------------------------------------------------------------------- /man/infotocap.1m.org: -------------------------------------------------------------------------------- 1 | #+TITLE: infotocap 1m 2 | #+AUTHOR: Eric S. Raymond and Thomas E. Dickey 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =infotocap= - convert a =terminfo= description into a termcap 9 | description 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_EXAMPLE 14 | infotocap [-vn width] [-V] [-1] [-w width] file . . . 15 | #+END_EXAMPLE 16 | 17 | * DESCRIPTION 18 | 19 | =infotocap= looks in each given text file for =terminfo= 20 | descriptions. For each =terminfo= description found, an equivalent 21 | =termcap= description is written to standard output. Terminfo =use= 22 | capabilities are translated directly to termcap =tc= capabilities. 23 | 24 | * =-v= :: print out tracing information on standard error as the 25 | program runs. 26 | 27 | * =-V= :: print out the version of the program in use on standard 28 | error and exit. 29 | 30 | * =-1= :: cause the fields to print out one to a line. Otherwise, 31 | the fields will be printed several to a line to a maximum 32 | width of 60 characters. 33 | 34 | * =-w= :: change the output to width characters. 35 | 36 | * FILES 37 | 38 | /usr/share/terminfo Compiled terminal description database. 39 | 40 | * NOTES 41 | 42 | This utility is actually a link to tic, running in =-C= mode. You 43 | can use other tic options such as =-f= and =-x=. 44 | 45 | * SEE ALSO 46 | 47 | [[file:ncurses.3x.org][curses(3x)]], [[file:tic.1m.org][tic(1m)]], [[file:infocmp.1m.org][infocmp(1m)]], [[file:terminfo.5.org][terminfo(5)]] 48 | 49 | This describes =ncurses= version 6.0 (patch 20160130). 50 | 51 | * AUTHOR 52 | 53 | Eric S. Raymond and Thomas E. Dickey 54 | 55 | -------------------------------------------------------------------------------- /man/key_defined.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: key_defined 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =key_defined= - check if a keycode is defined 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | 15 | int key_defined(const char *definition); 16 | #+END_SRC 17 | 18 | * DESCRIPTION 19 | 20 | This is an extension to the =curses= library. It permits an 21 | application to determine if a string is currently bound to any 22 | keycode. 23 | 24 | * RETURN VALUE 25 | 26 | If the string is bound to a keycode, its value (greater than zero) 27 | is returned. If no keycode is bound, zero is returned. If the 28 | string conflicts with longer strings which are bound to keys, -1 is 29 | returned. 30 | 31 | * PORTABILITY 32 | 33 | These routines are specific to ncurses. They were not supported on 34 | Version 7, BSD or System V implementations. It is recommended that 35 | any code depending on them be conditioned using =NCURSES_VERSION=. 36 | 37 | * SEE ALSO 38 | 39 | [[file:define_key.3x.org][define_key(3x)]]. 40 | 41 | * AUTHOR 42 | 43 | Thomas Dickey. 44 | -------------------------------------------------------------------------------- /man/keybound.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: keybound 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =keybound= - return definition of keycode 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | 15 | char * keybound(int keycode, int count); 16 | #+END_SRC 17 | 18 | * DESCRIPTION 19 | 20 | This is an extension to the =curses= library. It permits an 21 | application to determine the string which is defined in the 22 | =terminfo= for specific keycodes. 23 | 24 | * RETURN VALUE 25 | 26 | The /keycode/ parameter must be greater than zero, else =NULL= is 27 | returned. If it does not correspond to a defined key, then =NULL= 28 | is returned. The count parameter is used to allow the application 29 | to iterate through multiple definitions, counting from zero. When 30 | successful, the function returns a string which must be freed by the 31 | caller. 32 | 33 | * PORTABILITY 34 | 35 | These routines are specific to ncurses. They were not supported on 36 | Version 7, BSD or System V implementations. It is recommended that 37 | any code depending on them be conditioned using =NCURSES_VERSION=. 38 | 39 | * SEE ALSO 40 | 41 | [[file:define_key.3x.org][define_key(3x)]], [[file:keyok.3x.org][keyok(3x)]]. 42 | 43 | * AUTHOR 44 | 45 | Thomas Dickey. 46 | -------------------------------------------------------------------------------- /man/keyok.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: keyok 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =keyok= - enable or disable a keycode 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | 15 | int keyok(int keycode, bool enable); 16 | #+END_SRC 17 | 18 | * DESCRIPTION 19 | 20 | This is an extension to the =curses= library. It permits an 21 | application to disable specific keycodes, rather than use the 22 | =keypad= function to disable all keycodes. Keys that have been 23 | disabled can be re-enabled. 24 | 25 | * RETURN VALUE 26 | 27 | The keycode must be greater than zero, else =ERR= is returned. If 28 | it does not correspond to a defined key, then =ERR= is returned. If 29 | the /enable/ parameter is true, then the key must have been 30 | disabled, and vice versa. Otherwise, the function returns =OK=. 31 | 32 | * PORTABILITY 33 | 34 | These routines are specific to ncurses. They were not supported on 35 | Version 7, BSD or System V implementations. It is recommended that 36 | any code depending on them be conditioned using =NCURSES_VERSION=. 37 | 38 | * SEE ALSO 39 | 40 | [[file:define_key.3x.org][define_key(3x)]]. 41 | 42 | * AUTHOR 43 | 44 | Thomas Dickey. 45 | -------------------------------------------------------------------------------- /man/legacy_coding.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: legacy_coding 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =use_legacy_coding= - use terminal's default colors 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | 15 | int use_legacy_coding(int level); 16 | #+END_SRC 17 | 18 | * DESCRIPTION 19 | 20 | The =use_legacy_coding()= function is an extension to the curses 21 | library. It allows the caller to change the result of =unctrl=, and 22 | suppress related checks within the library that would normally cause 23 | nonprinting characters to be rendered in visible form. This affects 24 | only 8-bit characters. 25 | 26 | The level parameter controls the result: 27 | 28 | - 0 :: 29 | 30 | the library functions normally, rendering nonprinting characters 31 | as described in =unctrl=. 32 | 33 | - 1 :: 34 | 35 | the library ignores =isprintf= for codes in the range 160-255. 36 | 37 | - 2 :: 38 | 39 | the library ignores =isprintf= for codes in the range 128-255. It 40 | also modifies the output of =unctrl=, showing codes in the range 41 | 128-159 as is. 42 | 43 | * RETURN VALUE 44 | 45 | If the screen has not been initialized, or the level parameter is 46 | out of range, the function returns =ERR=. Otherwise, it returns the 47 | previous level: =0=, =1= or =2=. 48 | 49 | * PORTABILITY 50 | 51 | This routine is specific to ncurses. It was not supported on 52 | Version 7, BSD or System V implementations. It is recommended that 53 | any code depending on =ncurses= extensions be conditioned using 54 | =NCURSES_VERSION=. 55 | 56 | * SEE ALSO 57 | 58 | [[file:curs_util.3x.org][unctrl]] 59 | 60 | * AUTHOR 61 | 62 | Thomas Dickey (to support lynx's font-switching feature). 63 | -------------------------------------------------------------------------------- /man/menu_attributes.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: menu_attributes 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =menu_back=, =menu_fore=, =menu_grey=, =menu_pad=, =set_menu_back=, 9 | =set_menu_fore=, =set_menu_grey=, =set_menu_pad= - color and 10 | attribute control for menus 11 | 12 | * SYNOPSIS 13 | 14 | #+BEGIN_SRC c 15 | #include 16 | int set_menu_fore(MENU *menu, chtype attr); 17 | chtype menu_fore(const MENU *menu); 18 | int set_menu_back(MENU *menu, chtype attr); 19 | chtype menu_back(const MENU *menu); 20 | int set_menu_grey(MENU *menu, chtype attr); 21 | chtype menu_grey(const MENU *menu); 22 | int set_menu_pad(MENU *menu, int pad); 23 | int menu_pad(const MENU *menu); 24 | #+END_SRC 25 | 26 | * DESCRIPTION 27 | 28 | The function =set_menu_fore= sets the foreground attribute of 29 | menu. This is the highlight used for selected menu items. 30 | =menu_fore= returns the foreground attribute. The default is 31 | =A_REVERSE=. 32 | 33 | The function =set_menu_back= sets the background attribute of menu. 34 | This is the highlight used for selectable (but not currently 35 | selected) menu items. The function =menu_back= returns the 36 | background attribute. The default is =A_NORMAL=. 37 | 38 | The function =set_menu_grey= sets the grey attribute of menu. This 39 | is the highlight used for un-selectable menu items in menus that 40 | permit more than one selection. The function =menu_grey= returns 41 | the grey attribute. The default is =A_UNDERLINE=. 42 | 43 | The function =set_menu_pad= sets the character used to fill the 44 | space between the name and description parts of a menu item. 45 | =menu_pad= returns the given menu's pad character. The default is a 46 | blank. 47 | 48 | * RETURN VALUE 49 | 50 | These routines return one of the following: 51 | 52 | - =E_OK= :: The routine succeeded. 53 | 54 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 55 | 56 | - =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 57 | argument. 58 | 59 | * SEE ALSO 60 | 61 | [[file:ncurses.3x.org][curses(3x)]] and related pages whose names begin "menu_" for detailed 62 | descriptions of the entry points. 63 | 64 | * NOTES 65 | 66 | The header file == automatically includes the header file 67 | ==. 68 | 69 | * PORTABILITY 70 | 71 | These routines emulate the System V menu library. They were not 72 | supported on Version 7 or BSD versions. 73 | 74 | * AUTHORS 75 | 76 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 77 | S. Raymond. 78 | -------------------------------------------------------------------------------- /man/menu_cursor.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: menu_cursor 3x 2 | #+AUTHOR: Juergen Pfeifer & Eric S. Raymond. 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =pos_menu_cursor= - position a menu's cursor 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | int pos_menu_cursor(const MENU *menu); 15 | #+END_SRC 16 | 17 | * DESCRIPTION 18 | 19 | The function =pos_menu_cursor= restores the cursor to the current 20 | position associated with the menu's selected item. This is useful 21 | after =curses= routines have been called to do screen-painting in 22 | response to a menu select. 23 | 24 | * RETURN VALUE 25 | 26 | This routine returns one of the following: 27 | 28 | - =E_OK= :: The routine succeeded. 29 | 30 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 31 | 32 | - =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 33 | argument. 34 | 35 | - =E_NOT_POSTED= :: The menu has not been posted. 36 | 37 | * SEE ALSO 38 | 39 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 40 | 41 | * NOTES 42 | 43 | The header file == automatically includes the header file 44 | ==. 45 | 46 | * PORTABILITY 47 | 48 | These routines emulate the System V menu library. They were not 49 | supported on Version 7 or BSD versions. 50 | 51 | * AUTHORS 52 | 53 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 54 | S. Raymond. 55 | -------------------------------------------------------------------------------- /man/menu_format.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: menu_format 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =set_menu_format=, =menu_format= - set and get menu sizes 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | int set_menu_format(MENU *menu, int rows, int cols); 15 | void menu_format(const MENU *menu, int *rows, int *cols); 16 | #+END_SRC 17 | 18 | * DESCRIPTION 19 | 20 | The function =set_menu_format= sets the maximum display size of the 21 | given menu. If this size is too small to display all menu items, 22 | the menu will be made scrollable. If this size is larger than the 23 | menus subwindow and the subwindow is too small to display all menu 24 | items, =post_menu()= will fail. 25 | 26 | The default format is 16 rows, 1 column. Calling =set_menu_format= 27 | with a null menu pointer will change this default. A zero row or 28 | column argument to =set_menu_format= is interpreted as a request not 29 | to change the current value. 30 | 31 | The function =menu_format= returns the maximum-size constraints for 32 | the given menu into the storage addressed by =rows= and =cols=. 33 | 34 | * RETURN VALUE 35 | 36 | These routines returns one of the following: 37 | 38 | - =E_OK= :: The routine succeeded. 39 | 40 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 41 | 42 | - =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 43 | argument. 44 | 45 | - =E_POSTED= :: The menu is already posted. 46 | 47 | - =E_NOT_CONNECTED= :: No items are connected to the menu. 48 | 49 | * SEE ALSO 50 | 51 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 52 | 53 | * NOTES 54 | 55 | The header file == automatically includes the header file 56 | ==. 57 | 58 | * PORTABILITY 59 | 60 | These routines emulate the System V menu library. They were not 61 | supported on Version 7 or BSD versions. 62 | 63 | * AUTHORS 64 | 65 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 66 | S. Raymond. 67 | -------------------------------------------------------------------------------- /man/menu_hook.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: menu_hook 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =menu_hook= - set hooks for automatic invocation by applications 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | int set_item_init(MENU *menu, Menu_Hook func); 15 | Menu_Hook item_init(const MENU *menu); 16 | int set_item_term(MENU *menu, Menu_Hook func); 17 | Menu_Hook item_term(const MENU *menu); 18 | int set_menu_init(MENU *menu, Menu_Hook func); 19 | Menu_Hook menu_init(const MENU *menu); 20 | int set_menu_term(MENU *menu, Menu_Hook func); 21 | Menu_Hook menu_term(const MENU *menu); 22 | #+END_SRC 23 | 24 | * DESCRIPTION 25 | 26 | These functions make it possible to set hook functions to be called 27 | at various points in the automatic processing of input event codes 28 | by =menu_driver=. 29 | 30 | The function =set_item_init= sets a hook to be called at menu-post 31 | time and each time the selected item changes (after the change). 32 | =item_init= returns the current item init hook, if any (=NULL= if 33 | there is no such hook). 34 | 35 | The function =set_item_term= sets a hook to be called at menu-unpost 36 | time and each time the selected item changes (before the change). 37 | =item_term= returns the current item term hook, if any (=NULL= if 38 | there is no such hook). 39 | 40 | The function =set_menu_init= sets a hook to be called at menu-post 41 | time and just after the top row on the menu changes once it is 42 | posted. =menu_init= returns the current menu init hook, if any 43 | (=NULL= if there is no such hook). 44 | 45 | The function =set_menu_term= sets a hook to be called at menu-unpost 46 | time and just before the top row on the menu changes once it is 47 | posted. =menu_term= returns the current menu term hook, if any 48 | (=NULL= if there is no such hook). 49 | 50 | * RETURN VALUE 51 | 52 | Routines that return pointers return =NULL= on error. Other 53 | routines return one of the following: 54 | 55 | - =E_OK= :: The routine succeeded. 56 | 57 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 58 | 59 | * SEE ALSO 60 | 61 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 62 | 63 | * NOTES 64 | 65 | The header file == automatically includes the header file 66 | ==. 67 | 68 | * PORTABILITY 69 | 70 | These routines emulate the System V menu library. They were not 71 | supported on Version 7 or BSD versions. 72 | 73 | * AUTHORS 74 | 75 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 76 | S. Raymond. 77 | -------------------------------------------------------------------------------- /man/menu_items.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: menu_items 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =set_menu_items=, =menu_items=, =item_count= - make and break 9 | connections between items and menus 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | int set_menu_items(MENU *menu, ITEM **items); 16 | ITEM **menu_items(const MENU *menu); 17 | int item_count(const MENU *menu); 18 | #+END_SRC 19 | 20 | * DESCRIPTION 21 | 22 | The function =set_menu_items= changes the item pointer array of the 23 | given menu. The array must be terminated by a =NULL=. 24 | 25 | The function =menu_items= returns the item array of the given 26 | /menu/. 27 | 28 | The function =item_count= returns the count of items in /menu/. 29 | 30 | * RETURN VALUE 31 | 32 | The function =menu_items= returns a pointer (which may be =NULL=). 33 | It does not set =errno=. 34 | 35 | The function =item_count= returns =ERR= (the general =curses= error 36 | return value) if its menu parameter is =NULL=. 37 | 38 | The function =set_menu_items= returns one of the following codes on 39 | error: 40 | 41 | - =E_OK= :: The routine succeeded. 42 | 43 | - =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 44 | argument. 45 | 46 | - =E_NOT_CONNECTED= :: No items are connected to the menu. 47 | 48 | - =E_POSTED= :: The menu is already posted. 49 | 50 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 51 | 52 | * SEE ALSO 53 | 54 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 55 | 56 | * NOTES 57 | 58 | The header file == automatically includes the header file 59 | ==. 60 | 61 | * PORTABILITY 62 | 63 | These routines emulate the System V menu library. They were not 64 | supported on Version 7 or BSD versions. 65 | 66 | The SVr4 menu library documentation specifies the =item_count= error 67 | value as =-1= (which is the value of =ERR=). 68 | 69 | * AUTHORS 70 | 71 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 72 | S. Raymond. 73 | -------------------------------------------------------------------------------- /man/menu_mark.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: menu_mark 3x 2 | #+AUTHOR: Juergen Pfeifer & Eric S. Raymond. 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =set_menu_mark=, =menu_mark= - get and set the menu mark string 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | int set_menu_mark(MENU *menu, const char *mark); 15 | const char *menu_mark(const MENU *menu); 16 | #+END_SRC 17 | 18 | * DESCRIPTION 19 | 20 | In order to make menu selections visible on older terminals without 21 | highlighting or color capability, the menu library marks selected 22 | items in a menu with a prefix string. 23 | 24 | The function =set_menu_mark= sets the mark string for the given 25 | menu. Calling =set_menu_mark= with a null menu item will abolish 26 | the mark string. Note that changing the length of the mark string 27 | for a menu while the menu is posted is likely to produce unhelpful 28 | behavior. 29 | 30 | The default string is "-" (a dash). Calling =set_menu_mark= with a 31 | non-=NULL= menu argument will change this default. 32 | 33 | The function =menu_mark= returns the menu's mark string (or =NULL= 34 | if there is none). 35 | 36 | * RETURN VALUE 37 | 38 | The function =menu_mark= returns a pointer (which may be =NULL=). 39 | It does not set =errno=. 40 | 41 | The function =set_menu_mark= may return the following error codes: 42 | 43 | - =E_OK= :: The routine succeeded. 44 | 45 | - =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 46 | argument. 47 | 48 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 49 | 50 | * SEE ALSO 51 | 52 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 53 | 54 | * NOTES 55 | 56 | The header file == automatically includes the header file 57 | ==. 58 | 59 | * PORTABILITY 60 | 61 | These routines emulate the System V menu library. They were not 62 | supported on Version 7 or BSD versions. 63 | 64 | * AUTHORS 65 | 66 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 67 | S. Raymond. 68 | -------------------------------------------------------------------------------- /man/menu_new.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: menu_new 3x 2 | #+AUTHOR: Juergen Pfeifer & Eric S. Raymond. 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =new_menu=, =free_menu= - create and destroy menus 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | MENU *new_menu(ITEM **items); 15 | int free_menu(MENU *menu); 16 | #+END_SRC 17 | 18 | * DESCRIPTION 19 | 20 | The function =new_menu= creates a new menu connected to a specified 21 | item pointer array (which must be =NULL=-terminated). 22 | 23 | The function =free_menu= disconnects /menu/ from its item array and 24 | frees the storage allocated for the menu. 25 | 26 | * RETURN VALUE 27 | 28 | The function =new_menu= returns =NULL= on error. It sets =errno= 29 | according to the function's failure: 30 | 31 | - =E_NOT_CONNECTED= :: No items are connected to the menu. 32 | 33 | - =E_SYSTEM_ERROR= :: System error occurred, e.g., malloc failure. 34 | 35 | 36 | The function =free_menu= returns one of the following: 37 | 38 | - =E_OK= :: The routine succeeded. 39 | 40 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 41 | 42 | - =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 43 | argument. 44 | 45 | - =E_POSTED= :: The menu has already been posted. 46 | 47 | * SEE ALSO 48 | 49 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 50 | 51 | * NOTES 52 | 53 | The header file == automatically includes the header file 54 | ==. 55 | 56 | * PORTABILITY 57 | 58 | These routines emulate the System V menu library. They were not 59 | supported on Version 7 or BSD versions. 60 | 61 | * AUTHORS 62 | 63 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 64 | S. Raymond. 65 | -------------------------------------------------------------------------------- /man/menu_opts.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: menu_opts 3x 2 | #+AUTHOR: Juergen Pfeifer & Eric S. Raymond. 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =set_menu_opts=, =menu_opts_on=, =menu_opts_off=, =menu_opts= - set 9 | and get menu options 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | int set_menu_opts(MENU *menu, Menu_Options opts); 16 | int menu_opts_on(MENU *menu, Menu_Options opts); 17 | int menu_opts_off(MENU *menu, Menu_Options opts); 18 | Menu_Options menu_opts(const MENU *menu); 19 | #+END_SRC 20 | 21 | * DESCRIPTION 22 | 23 | The function =set_menu_opts= sets all the given menu's option bits 24 | (menu option bits may be logically-OR'ed together). 25 | 26 | The function =menu_opts_on= turns on the given option bits, and 27 | leaves others alone. 28 | 29 | The function =menu_opts_off= turns off the given option bits, and 30 | leaves others alone. 31 | 32 | The function =menu_opts= returns the menu's current option bits. 33 | 34 | The following options are defined (all are on by default): 35 | 36 | - =O_ONEVALUE= :: Only one item can be selected for this menu. 37 | 38 | - =O_SHOWDESC= :: Display the item descriptions when the menu is 39 | posted. 40 | 41 | - =O_ROWMAJOR= :: Display the menu in row-major order. 42 | 43 | - =O_IGNORECASE= :: Ignore the case when pattern-matching. 44 | 45 | - =O_SHOWMATCH= :: Move the cursor to within the item name while 46 | pattern-matching. 47 | 48 | - =O_NONCYCLIC= :: Don't wrap around next-item and previous-item, 49 | requests to the other end of the menu. 50 | 51 | * RETURN VALUE 52 | 53 | Except for =menu_opts=, each routine returns one of the following: 54 | 55 | - =E_OK= :: The routine succeeded. 56 | 57 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 58 | 59 | - =E_POSTED= :: The menu is already posted. 60 | 61 | * SEE ALSO 62 | 63 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 64 | 65 | * NOTES 66 | 67 | The header file == automatically includes the header file 68 | ==. 69 | 70 | * PORTABILITY 71 | 72 | These routines emulate the System V menu library. They were not 73 | supported on Version 7 or BSD versions. 74 | 75 | * AUTHORS 76 | 77 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 78 | S. Raymond. 79 | -------------------------------------------------------------------------------- /man/menu_pattern.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: menu_pattern 3x 2 | #+AUTHOR: Juergen Pfeifer & Eric S. Raymond. 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =set_menu_pattern=, =menu_pattern= - get and set a menu's pattern 9 | buffer 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | int set_menu_pattern(MENU *menu, const char *pattern); 16 | char *menu_pattern(const MENU *menu); 17 | #+END_SRC 18 | 19 | * DESCRIPTION 20 | 21 | Every menu has an associated pattern match buffer. As input events 22 | that are printable characters come in, they are appended to this 23 | match buffer and tested for a match, as described in 24 | [[file:menu_driver.3x.org][menu_driver(3x)]]. 25 | 26 | The function =set_menu_pattern= sets the pattern buffer for the 27 | given menu and tries to find the first matching item. If it 28 | succeeds, that item becomes current; if not, the current item does 29 | not change. 30 | 31 | The function =menu_pattern= returns the pattern buffer of the given 32 | /menu/. 33 | 34 | * RETURN VALUE 35 | 36 | The function =menu_pattern= returns a pointer, which is =NULL= if 37 | the menu parameter is =NULL=. Otherwise, it is a pointer to a 38 | string which is empty if no pattern has been set. It does not set 39 | =errno=. 40 | 41 | The function =set_menu_pattern= may return the following error 42 | codes: 43 | 44 | - =E_OK= :: The routine succeeded. 45 | 46 | - =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 47 | argument. 48 | 49 | - =E_BAD_STATE= :: Routine was called from an initialization or 50 | termination function. 51 | 52 | - =E_NOT_CONNECTED= :: No items are connected to menu. 53 | 54 | - =E_NO_MATCH= :: Character failed to match. 55 | 56 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 57 | 58 | * SEE ALSO 59 | 60 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 61 | 62 | * NOTES 63 | 64 | The header file == automatically includes the header file 65 | ==. 66 | 67 | * PORTABILITY 68 | 69 | These routines emulate the System V menu library. They were not 70 | supported on Version 7 or BSD versions. 71 | 72 | * AUTHORS 73 | 74 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 75 | S. Raymond. 76 | -------------------------------------------------------------------------------- /man/menu_post.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: menu_post 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =post_menu=, =unpost_menu= - write or erase menus from associated 9 | subwindows 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | int post_menu(MENU *menu); 16 | int unpost_menu(MENU *menu); 17 | #+END_SRC 18 | 19 | * DESCRIPTION 20 | 21 | The function =post_menu= displays a menu to its associated 22 | subwindow. To trigger physical display of the subwindow, use 23 | =refresh= or some equivalent =curses= routine (the implicit 24 | =doupdate= triggered by an =curses= input request will 25 | do). post_menu resets the selection status of all items. 26 | 27 | The function =unpost_menu= erases menu from its associated 28 | subwindow. 29 | 30 | * RETURN VALUE 31 | 32 | These routines return one of the following: 33 | 34 | - =E_OK= :: The routine succeeded. 35 | 36 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 37 | 38 | - =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 39 | argument. 40 | 41 | - =E_POSTED= :: The menu has already been posted. 42 | 43 | - =E_BAD_STATE= :: Routine was called from an initialization or 44 | termination function. 45 | 46 | - =E_NO_ROOM= :: Menu is too large for its window. You should 47 | consider to use =set_menu_format()= to solve 48 | the problem. 49 | 50 | - =E_NOT_POSTED= :: The menu has not been posted. 51 | 52 | - =E_NOT_CONNECTED= :: No items are connected to the menu. 53 | 54 | * SEE ALSO 55 | 56 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 57 | 58 | * NOTES 59 | 60 | The header file == automatically includes the header file 61 | ==. 62 | 63 | * PORTABILITY 64 | 65 | These routines emulate the System V menu library. They were not 66 | supported on Version 7 or BSD versions. 67 | 68 | * AUTHORS 69 | 70 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 71 | S. Raymond. 72 | -------------------------------------------------------------------------------- /man/menu_requestname.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: menu_requestname 3x 2 | #+AUTHOR: Juergen Pfeifer & Eric S. Raymond. 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =menu_request_by_name=, =menu_request_by_name= - handle printable 9 | menu request names 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | const char *menu_request_name(int request); 16 | int menu_request_by_name(const char *name); 17 | #+END_SRC 18 | 19 | * DESCRIPTION 20 | 21 | The function =menu_request_name= returns the printable name of a 22 | menu request code. 23 | 24 | The function =menu_request_by_name= searches in the name-table for a 25 | request with the given name and returns its request code. Otherwise 26 | =E_NO_MATCH= is returned. 27 | 28 | * RETURN VALUE 29 | 30 | =menu_request_name= returns =NULL= on error and sets =errno= to 31 | =E_BAD_ARGUMENT=. 32 | 33 | =menu_request_by_name= returns =E_NO_MATCH= on error. It does not 34 | set =errno=. 35 | 36 | * SEE ALSO 37 | 38 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 39 | 40 | * NOTES 41 | 42 | The header file == automatically includes the header file 43 | ==. 44 | 45 | * PORTABILITY 46 | 47 | These routines are specific to ncurses. They were not supported on 48 | Version 7, BSD or System V implementations. It is recommended that 49 | any code depending on them be conditioned using =NCURSES_VERSION=. 50 | 51 | * AUTHORS 52 | 53 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 54 | S. Raymond. 55 | -------------------------------------------------------------------------------- /man/menu_spacing.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: menu_spacing 3x 2 | #+AUTHOR: Juergen Pfeifer & Eric S. Raymond. 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =set_menu_spacing=, =menu_spacing= - Control spacing between menu 9 | items. 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | int set_menu_spacing(MENU *menu, 16 | int spc_description, 17 | int spc_rows, 18 | int spc_columns); 19 | int menu_spacing(const MENU *menu, 20 | int* spc_description, 21 | int* spc_rows, 22 | int* spc_columns); 23 | #+END_SRC 24 | 25 | * DESCRIPTION 26 | 27 | The function =set_menu_spacing= sets the spacing information for the 28 | menu. Its parameter =spc_description= controls the number of spaces 29 | between an item name and an item description. It must not be larger 30 | than =TABSIZE=. The menu system puts in the middle of this spacing 31 | area the pad character. The remaining parts are filled with spaces. 32 | The =spc_rows= parameter controls the number of rows that are used 33 | for an item. It must not be larger than 3. The menu system inserts 34 | the blank lines between item rows, these lines will contain the pad 35 | character in the appropriate positions. The =spc_columns= parameter 36 | controls the number of blanks between columns of items. It must not 37 | be larger than =TABSIZE=. A value of 0 for all the spacing values 38 | resets them to the default, which is 1 for all of them. The 39 | function =menu_spacing= passes back the spacing info for the menu. 40 | If a pointer is =NULL=, this specific info is simply not returned. 41 | 42 | * RETURN VALUE 43 | 44 | Both routines return =E_OK= on success. set_menu_spacing may return 45 | =E_POSTED= if the menu is posted, or =E_BAD_ARGUMENT= if one of the 46 | spacing values is out of range. 47 | 48 | * SEE ALSO 49 | 50 | [[file:ncurses.3x.org][curses(3x)]], [[file:curs_variables.3x.org][curs_variables(3x)]], [[file:menu.3x.org][menu(3x)]]. 51 | 52 | * NOTES 53 | 54 | The header file == automatically includes the header file 55 | ==. 56 | 57 | * PORTABILITY 58 | 59 | These routines are specific to ncurses. They were not supported on 60 | Version 7, BSD or System V implementations. It is recommended that 61 | any code depending on them be conditioned using =NCURSES_VERSION=. 62 | 63 | * AUTHORS 64 | 65 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 66 | S. Raymond. 67 | -------------------------------------------------------------------------------- /man/menu_userptr.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: menu_userptr 3x 2 | #+AUTHOR: Juergen Pfeifer & Eric S. Raymond. 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =set_menu_userptr=, =menu_userptr= - associate application data with 9 | a menu item 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | int set_menu_userptr(MENU *menu, void *userptr); 16 | void *menu_userptr(const MENU *menu); 17 | #+END_SRC 18 | 19 | * DESCRIPTION 20 | 21 | Every menu and every menu item has a field that can be used to hold 22 | application-specific data (that is, the menudriver code leaves it 23 | alone). These functions get and set the menu user pointer field. 24 | 25 | * RETURN VALUE 26 | 27 | =menu_userptr= returns a pointer (which may be =NULL=). It does not 28 | set =errno=. 29 | 30 | =set_menu_userptr= returns =E_OK= (success). 31 | 32 | * SEE ALSO 33 | 34 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 35 | 36 | * NOTES 37 | 38 | The header file == automatically includes the header file 39 | ==. 40 | 41 | * PORTABILITY 42 | 43 | These routines emulate the System V menu library. They were not 44 | supported on Version 7 or BSD versions. 45 | 46 | The user pointer is a void pointer. We chose not to leave it as a 47 | char pointer for SVr4 compatibility. 48 | 49 | * AUTHORS 50 | 51 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 52 | S. Raymond. 53 | -------------------------------------------------------------------------------- /man/menu_win.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: menu_win 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =menu_win= - make and break menu window and subwindow associations 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | int set_menu_win(MENU *menu, WINDOW *win); 15 | WINDOW *menu_win(const MENU *menu); 16 | int set_menu_sub(MENU *menu, WINDOW *sub); 17 | WINDOW *menu_sub(const MENU *menu); 18 | int scale_menu(const MENU *menu, int *rows, int *columns); 19 | #+END_SRC 20 | 21 | * DESCRIPTION 22 | 23 | Every menu has an associated pair of =curses= windows. The menu 24 | window displays any title and border associated with the window; the 25 | menu subwindow displays the items of the menu that are currently 26 | available for selection. 27 | 28 | The first four functions get and set those windows. It is not 29 | necessary to set either window; by default, the driver code uses 30 | =stdscr= for both. 31 | 32 | In the =set_= functions, window argument of =NULL= is treated as 33 | though it were =stsdcr=. A menu argument of =NULL= is treated as a 34 | request to change the system default menu window or subwindow. 35 | 36 | The function =scale_menu= returns the minimum size required for the 37 | subwindow of /menu/. 38 | 39 | * RETURN VALUE 40 | 41 | Routines that return pointers return =NULL= on error. Routines that 42 | return an integer return one of the following error codes: 43 | 44 | - =E_OK= :: The routine succeeded. 45 | 46 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 47 | 48 | - =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 49 | argument. 50 | 51 | - =E_POSTED= :: The menu has already been posted. 52 | 53 | - =E_NOT_CONNECTED= :: No items are connected to the menu. 54 | 55 | * SEE ALSO 56 | 57 | [[file:ncurses.3x.org][curses(3x)]], [[file:curs_variables.3x.org][curs_variables(3x)]], [[file:menu.3x.org][menu(3x)]]. 58 | 59 | * NOTES 60 | 61 | The header file == automatically includes the header file 62 | ==. 63 | 64 | * PORTABILITY 65 | 66 | These routines emulate the System V menu library. They were not 67 | supported on Version 7 or BSD versions. 68 | 69 | * AUTHORS 70 | 71 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 72 | S. Raymond. 73 | -------------------------------------------------------------------------------- /man/mitem_current.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: mitem_current 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =mitem_current= - set and get =current_menu_item= 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | int set_current_item(MENU *menu, const ITEM *item); 15 | ITEM *current_item(const MENU *menu); 16 | int set_top_row(MENU *menu, int row); 17 | int top_row(const MENU *menu); 18 | int item_index(const ITEM *item); 19 | #+END_SRC 20 | 21 | * DESCRIPTION 22 | 23 | The function =set_current_item= sets the current item (the item on 24 | which the menu cursor is positioned). =current_item= returns a 25 | pointer to the current item in the given menu. 26 | 27 | The function =set_top_row= sets the top row of the menu to show the 28 | given row (the top row is initially 0, and is reset to this value 29 | whenever the =O_ROWMAJOR= option is toggled). The item leftmost on 30 | the given row becomes current. The function =top_row= returns the 31 | number of the top menu row being displayed. 32 | 33 | The function =item_index= returns the (zero-origin) index of item in 34 | the menu's item pointer list. 35 | 36 | * RETURN VALUE 37 | 38 | =current_item= returns a pointer (which may be =NULL=). It does not 39 | set =errno=. 40 | 41 | =top_row= and =item_index= return =ERR= (the general =curses= error 42 | value) if their /menu/ parameter is =NULL=. 43 | 44 | =set_current_item= and =set_top_row= return one of the following: 45 | 46 | - =E_OK= :: The routine succeeded. 47 | 48 | - =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 49 | argument. 50 | 51 | - =E_BAD_STATE= :: Routine was called from an initialization or 52 | termination function. 53 | 54 | - =E_NOT_CONNECTED= :: No items are connected to the menu. 55 | 56 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 57 | 58 | * SEE ALSO 59 | 60 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 61 | 62 | * NOTES 63 | 64 | The header file == automatically includes the header file 65 | ==. 66 | 67 | * PORTABILITY 68 | 69 | These routines emulate the System V menu library. They were not 70 | supported on Version 7 or BSD versions. 71 | 72 | The SVr4 menu library documentation specifies the top_row and 73 | =index_item= error value as -1 (which is the value of =ERR=). 74 | 75 | * AUTHORS 76 | 77 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 78 | S. Raymond. 79 | -------------------------------------------------------------------------------- /man/mitem_name.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: mitem_name 3x 2 | #+AUTHOR: Juergen Pfeifer and Eric S. Raymond. 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =item_name=, =item_description= - get menu item name and description 9 | fields 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | const char *item_name(const ITEM *item); 16 | const char *item_description(const ITEM *item); 17 | #+END_SRC 18 | 19 | * DESCRIPTION 20 | 21 | The function =item_name= returns the name part of the given item. 22 | 23 | The function =item_description= returns the description part of the 24 | given item. 25 | 26 | * RETURN VALUE 27 | 28 | These routines return a pointer (which may be =NULL=). They do not 29 | set =errno=. 30 | 31 | * SEE ALSO 32 | 33 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 34 | 35 | * NOTES 36 | 37 | The header file == automatically includes the header file 38 | ==. 39 | 40 | * PORTABILITY 41 | 42 | These routines emulate the System V menu library. They were not 43 | supported on Version 7 or BSD versions. 44 | 45 | * AUTHORS 46 | 47 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 48 | S. Raymond. 49 | -------------------------------------------------------------------------------- /man/mitem_new.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: mitem_new 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =new_item=, =free_item= - create and destroy menu items 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | ITEM *new_item(const char *name, const char *description); 15 | int free_item(ITEM *item); 16 | #+END_SRC 17 | 18 | * DESCRIPTION 19 | 20 | The function =new_item= allocates a new item and initializes it from 21 | the =name= and =description= pointers. Please notice that the item 22 | stores only the pointers to the name and description. Those pointers 23 | must be valid during the lifetime of the item. So you should be very 24 | careful with names or descriptions allocated on the stack of some 25 | routines. The function =free_item= de-allocates an item. Please 26 | notice that it is the responsibility of the application to release 27 | the memory for the name or the description of the item. 28 | 29 | * RETURN VALUE 30 | 31 | The function =new_item= returns =NULL= on error. It sets =errno= 32 | according to the function's failure: 33 | 34 | - =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 35 | argument. 36 | 37 | - =E_SYSTEM_ERROR= :: System error occurred, e.g., malloc failure. 38 | 39 | 40 | The function =free_item= returns one of the following: 41 | 42 | - =E_OK= :: The routine succeeded. 43 | 44 | - =E_BAD_ARGUMENT= :: Routine detected an incorrect or out-of-range 45 | argument. 46 | 47 | - =E_CONNECTED= :: Item is connected to a menu. 48 | 49 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 50 | 51 | * SEE ALSO 52 | 53 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 54 | 55 | * NOTES 56 | 57 | The header file == automatically includes the header file 58 | ==. 59 | 60 | * PORTABILITY 61 | 62 | These routines emulate the System V menu library. They were not 63 | supported on Version 7 or BSD versions. 64 | 65 | * AUTHORS 66 | 67 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 68 | S. Raymond. 69 | -------------------------------------------------------------------------------- /man/mitem_opts.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: mitem_opts 3x 2 | #+AUTHOR: Juergen Pfeifer and Eric S. Raymond. 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =set_item_opts=, =item_opts_on=, =item_opts_off=, =item_opts= - set 9 | and get menu item options 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | int set_item_opts(ITEM *item, Item_Options opts); 16 | int item_opts_on(ITEM *item, Item_Options opts); 17 | int item_opts_off(ITEM *item, Item_Options opts); 18 | Item_Options item_opts(const ITEM *item); 19 | #+END_SRC 20 | 21 | * DESCRIPTION 22 | 23 | The function =set_item_opts= sets all the given item's option bits 24 | (menu option bits may be logically-OR'ed together). 25 | 26 | The function =item_opts_on= turns on the given option bits, and 27 | leaves others alone. 28 | 29 | The function =item_opts_off= turns off the given option bits, and 30 | leaves others alone. 31 | 32 | The function =item_opts= returns the item's current option bits. 33 | 34 | There is only one defined option bit mask, =O_SELECTABLE=. When 35 | this is on, the item may be selected during menu processing. This 36 | option defaults to on. 37 | 38 | * RETURN VALUE 39 | 40 | Except for =item_opts=, each routine returns one of the following: 41 | 42 | - =E_OK= :: The routine succeeded. 43 | 44 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 45 | 46 | * SEE ALSO 47 | 48 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 49 | 50 | * NOTES 51 | 52 | The header file == automatically includes the header file 53 | ==. 54 | 55 | * PORTABILITY 56 | 57 | These routines emulate the System V menu library. They were not 58 | supported on Version 7 or BSD versions. 59 | 60 | * AUTHORS 61 | 62 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 63 | S. Raymond. 64 | -------------------------------------------------------------------------------- /man/mitem_userptr.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: mitem_userptr 3x 2 | #+AUTHOR: Juergen Pfeifer and Eric S. Raymond. 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =set_item_userptr=, =item_userptr= - associate application data with 9 | a menu item 10 | 11 | * SYNOPSIS 12 | 13 | #+BEGIN_SRC c 14 | #include 15 | int set_item_userptr(ITEM *item, void *userptr); 16 | void *item_userptr(const ITEM *item); 17 | #+END_SRC 18 | 19 | * DESCRIPTION 20 | 21 | Every menu item has a field that can be used to hold 22 | application-specific data (that is, the menu-driver code leaves it 23 | alone). These functions get and set that field. 24 | 25 | * RETURN VALUE 26 | 27 | The function =item_userptr= returns a pointer (possibly =NULL=). It 28 | does not set =errno=. 29 | 30 | The =set_item_userptr= always returns =E_OK= (success). 31 | 32 | * SEE ALSO 33 | 34 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 35 | 36 | * NOTES 37 | 38 | The header file == automatically includes the header file 39 | ==. 40 | 41 | * PORTABILITY 42 | 43 | These routines emulate the System V menu library. They were not 44 | supported on Version 7 or BSD versions. 45 | 46 | The user pointer is a void pointer. We chose not to leave it as a 47 | char pointer for SVr4 compatibility. 48 | 49 | * AUTHORS 50 | 51 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 52 | S. Raymond. 53 | -------------------------------------------------------------------------------- /man/mitem_value.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: mitem_value 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =set_item_value=, =item_value= - set and get menu item values 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | int set_item_value(ITEM *item, bool value); 15 | bool item_value(const ITEM *item); 16 | #+END_SRC 17 | 18 | * DESCRIPTION 19 | 20 | If you turn off the menu option =O_ONEVALUE= (e.g., with 21 | =set_menu_opts= or =menu_opts_off=; see [[file:menu_opts.3x.org][menu_opts(3x)]]), the menu 22 | becomes multi-valued; that is, more than one item may simultaneously 23 | be selected. 24 | 25 | In a multi_valued menu, you can used =set_item_value= to select the 26 | given menu item (second argument =TRUE=) or deselect it (second 27 | argument =FALSE=). 28 | 29 | * RETURN VALUE 30 | 31 | The function =set_item_value= returns one of the following: 32 | 33 | - =E_OK= :: The routine succeeded. 34 | 35 | - =E_SYSTEM_ERROR= :: System error occurred (see =errno=). 36 | 37 | - =E_REQUEST_DENIED= :: The menu driver could not process the 38 | request. 39 | 40 | * SEE ALSO 41 | 42 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 43 | 44 | * NOTES 45 | 46 | The header file == automatically includes the header file 47 | ==. 48 | 49 | * PORTABILITY 50 | 51 | These routines emulate the System V menu library. They were not 52 | supported on Version 7 or BSD versions. 53 | 54 | * AUTHORS 55 | 56 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 57 | S. Raymond. 58 | -------------------------------------------------------------------------------- /man/mitem_visible.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: mitem_visible 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =mitem_visible= - check visibility of a menu item 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | bool item_visible(const ITEM *item); 15 | #+END_SRC 16 | 17 | * DESCRIPTION 18 | 19 | A menu item is visible when it is in the portion of a posted menu 20 | that is mapped onto the screen (if the menu is scrollable, in 21 | particular, this portion will be smaller than the whole menu). 22 | 23 | * SEE ALSO 24 | 25 | [[file:ncurses.3x.org][curses(3x)]], [[file:menu.3x.org][menu(3x)]]. 26 | 27 | * NOTES 28 | 29 | The header file == automatically includes the header file 30 | ==. 31 | 32 | * PORTABILITY 33 | 34 | These routines emulate the System V menu library. They were not 35 | supported on Version 7 or BSD versions. 36 | 37 | * AUTHORS 38 | 39 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric 40 | S. Raymond. 41 | -------------------------------------------------------------------------------- /man/ncurses5-config.1.org: -------------------------------------------------------------------------------- 1 | #+TITLE: ncurses5-config 1 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =ncurses5-config= - helper script for =ncurses= libraries 9 | 10 | * SYNOPSIS 11 | 12 | =ncurses5-config= [options] 13 | 14 | * DESCRIPTION 15 | 16 | This is a shell script which simplifies configuring applications 17 | against a particular set of =ncurses= libraries. 18 | 19 | * OPTIONS 20 | 21 | * =--prefix= :: echos the package-prefix of ncurses 22 | 23 | * =--exec-prefix= :: echos the executable-prefix of ncurses 24 | 25 | * =--cflags= :: echos the C compiler flags needed to compile 26 | with ncurses 27 | 28 | * =--libs= :: echos the libraries needed to link with ncurses 29 | 30 | * =--version= :: echos the release+patchdate version of ncurses 31 | 32 | * =--abi-version= :: echos the ABI version of ncurses 33 | 34 | * =--mouse-version= :: echos the mouse-interface version of ncurses 35 | 36 | * =--bindir= :: echos the directory containing =ncurses= 37 | programs 38 | 39 | * =--datadir= :: echos the directory containing =ncurses= data 40 | 41 | * =--includedir= :: echos the directory containing =ncurses= 42 | header files 43 | 44 | * =--libdir= :: echos the directory containing =ncurses= 45 | libraries 46 | 47 | * =--mandir= :: echos the directory containing =ncurses= 48 | manpages 49 | 50 | * =--terminfo= :: echos the =$TERMINFO= terminfo database path, 51 | e.g., /usr/share/terminfo 52 | 53 | * =--terminfo-dirs= :: echos the =$TERMINFO_DIRS= directory list, e.g., 54 | /usr/local/ncurses/share/terminfo:/usr/share/terminfo 55 | 56 | * =--termpath= :: echos the =$TERMPATH= termcap list, if support 57 | for termcap is configured. 58 | 59 | * =--help= :: prints this message 60 | 61 | * SEE ALSO 62 | 63 | [[file:ncurses.3x.org][curses(3x)]] 64 | 65 | This describes =ncurses= version 5.9 (patch 20150523). 66 | -------------------------------------------------------------------------------- /man/wresize.3x.org: -------------------------------------------------------------------------------- 1 | #+TITLE: wresize 3x 2 | #+AUTHOR: 3 | #+LANGUAGE: en 4 | #+STARTUP: showall 5 | 6 | * NAME 7 | 8 | =wresize= - resize a =curses= window 9 | 10 | * SYNOPSIS 11 | 12 | #+BEGIN_SRC c 13 | #include 14 | 15 | int wresize(WINDOW *win, int lines, int columns); 16 | #+END_SRC 17 | 18 | * DESCRIPTION 19 | 20 | This is an extension to the curses library. It reallocates storage 21 | for an =ncurses= window to adjust its dimensions to the specified 22 | values. If either dimension is larger than the current values, the 23 | window's data is filled with blanks that have the current background 24 | rendition (as set by =wbkgdset=) merged into them. 25 | 26 | * RETURN VALUE 27 | 28 | The function returns the integer =ERR= upon failure and =OK= on 29 | success. It will fail if either of the dimensions less than or 30 | equal to zero, or if an error occurs while (re)allocating memory for 31 | the window. 32 | 33 | * NOTES 34 | 35 | The only restriction placed on the dimensions is that they be 36 | greater than zero. The dimensions are not compared to =curses= 37 | screen dimensions to simplify the logic of =resizeterm=. The caller 38 | must ensure that the window's dimensions fit within the actual 39 | screen dimensions. 40 | 41 | * PORTABILITY 42 | 43 | It is not possible to resize windows with SVr4 curses. 44 | 45 | This extension of ncurses was introduced in mid-1995. It was 46 | adopted in NetBSD curses (2001) and PDCurses (2003). 47 | 48 | * SEE ALSO 49 | 50 | [[file:resizeterm.3x.org][resizeterm(3x)]]. 51 | 52 | * AUTHOR 53 | 54 | Thomas Dickey (from an equivalent function written in 1988 for BSD 55 | =curses=). 56 | -------------------------------------------------------------------------------- /ncurses_programs/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2001, Pradeep Padala (ppadala@gmail.com) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, distribute with 7 | modifications, sublicense, and/or sell copies of the Software, and to permit 8 | persons to whom the Software is furnished to do so, subject to the following 9 | conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 18 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 19 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | 21 | Except as contained in this notice, the name(s) of the above copyright holders 22 | shall not be used in advertising or otherwise to promote the sale, use or 23 | other dealings in this Software without prior written authorization. 24 | -------------------------------------------------------------------------------- /ncurses_programs/JustForFun/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for JustForFun Files 2 | 3 | # A few variables 4 | 5 | CC=gcc 6 | LIBS=-lncurses 7 | 8 | SRC_DIR=. 9 | EXE_DIR=../demo/exe 10 | 11 | EXES = \ 12 | ${EXE_DIR}/hanoi \ 13 | ${EXE_DIR}/life\ 14 | ${EXE_DIR}/magic \ 15 | ${EXE_DIR}/queens \ 16 | ${EXE_DIR}/shuffle \ 17 | ${EXE_DIR}/tt 18 | 19 | ${EXE_DIR}/%: %.o 20 | ${CC} -o $@ $< ${LIBS} 21 | 22 | %.o: ${SRC_DIR}/%.c 23 | ${CC} -o $@ -c $< 24 | 25 | all: ${EXES} 26 | 27 | clean: 28 | @rm -f ${EXES} 29 | -------------------------------------------------------------------------------- /ncurses_programs/JustForFun/README: -------------------------------------------------------------------------------- 1 | Description of files 2 | -------------------- 3 | JustForFun 4 | | 5 | |----> hanoi.c -- The Towers of Hanoi Solver 6 | |----> life.c -- The Game of Life demo 7 | |----> magic.c -- An Odd Order Magic Square builder 8 | |----> queens.c -- The famous N-Queens Solver 9 | |----> shuffle.c -- A fun game, if you have time to kill 10 | |----> tt.c -- A very trivial typing tutor 11 | -------------------------------------------------------------------------------- /ncurses_programs/Makefile: -------------------------------------------------------------------------------- 1 | # The top level Makefile 2 | 3 | all: 4 | cd JustForFun && $(MAKE) 5 | cd basics && $(MAKE) 6 | cd forms && $(MAKE) 7 | cd menus && $(MAKE) 8 | cd panels && $(MAKE) 9 | @echo 10 | @echo "*********************************************" 11 | @echo "All files Built" 12 | @echo "Please move to demo/exe directory" 13 | @echo "Execute each file to see examples in action" 14 | @echo "*********************************************" 15 | @echo 16 | clean: 17 | cd JustForFun && $(MAKE) clean 18 | cd basics && $(MAKE) clean 19 | cd forms && $(MAKE) clean 20 | cd menus && $(MAKE) clean 21 | cd panels && $(MAKE) clean 22 | -------------------------------------------------------------------------------- /ncurses_programs/basics/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for JustForFun Files 2 | 3 | # A few variables 4 | 5 | CC=gcc 6 | LIBS=-lncurses 7 | 8 | SRC_DIR=. 9 | EXE_DIR=../demo/exe 10 | 11 | EXES = \ 12 | ${EXE_DIR}/hello_world \ 13 | ${EXE_DIR}/init_func_example \ 14 | ${EXE_DIR}/key_code \ 15 | ${EXE_DIR}/mouse_menu \ 16 | ${EXE_DIR}/other_border \ 17 | ${EXE_DIR}/printw_example \ 18 | ${EXE_DIR}/scanw_example \ 19 | ${EXE_DIR}/simple_attr \ 20 | ${EXE_DIR}/simple_color \ 21 | ${EXE_DIR}/simple_key \ 22 | ${EXE_DIR}/temp_leave \ 23 | ${EXE_DIR}/win_border \ 24 | ${EXE_DIR}/with_chgat 25 | 26 | ${EXE_DIR}/%: %.o 27 | ${CC} -o $@ $< ${LIBS} 28 | 29 | %.o: ${SRC_DIR}/%.c 30 | ${CC} -o $@ -c $< 31 | 32 | all: ${EXES} 33 | 34 | clean: 35 | @rm -f ${EXES} 36 | -------------------------------------------------------------------------------- /ncurses_programs/basics/README: -------------------------------------------------------------------------------- 1 | Description of files 2 | -------------------- 3 | basics 4 | | 5 | |----> acs_vars.c -- ACS_ variables example 6 | |----> hello_world.c -- Simple "Hello World" Program 7 | |----> init_func_example.c -- Initialization functions example 8 | |----> key_code.c -- Shows the scan code of the key pressed 9 | |----> mouse_menu.c -- A menu accessible by mouse 10 | |----> other_border.c -- Shows usage of other border functions apart 11 | | -- box() 12 | |----> printw_example.c -- A very simple printw() example 13 | |----> scanw_example.c -- A very simple getstr() example 14 | |----> simple_attr.c -- A program that can print a c file with comments 15 | | -- in attribute 16 | |----> simple_color.c -- A simple example demonstrating colors 17 | |----> simple_key.c -- A menu accessible with keyboard UP, DOWN arrows 18 | |----> temp_leave.c -- Demonstrates temporarily leaving curses mode 19 | |----> win_border.c -- Shows Creation of windows and borders 20 | |----> with_chgat.c -- chgat() usage example 21 | -------------------------------------------------------------------------------- /ncurses_programs/basics/acs_vars.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | initscr(); /* Start curses mode */ 7 | printw("Hello World !!!\n"); /* Print Hello World */ 8 | refresh(); /* Print it on to the real screen */ 9 | getch(); /* Wait */ 10 | def_prog_mode(); /* Save the tty modes */ 11 | endwin(); /* End curses mode temporarily */ 12 | system("/bin/sh"); /* Do whatever you like in cooked mode */ 13 | reset_prog_mode(); /* Return to the previous tty mode */ 14 | /* stored by def_prog_mode() */ 15 | refresh(); /* Do refresh() to restore the */ 16 | /* Screen contents */ 17 | printw("Another String\n"); /* Back to curses use the full */ 18 | refresh(); /* capabilities of curses */ 19 | getch(); /* Wait */ 20 | endwin(); /* End curses mode */ 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /ncurses_programs/basics/hello_world.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | initscr(); /* Start curses mode */ 6 | printw("Hello World !!!"); /* Print Hello World */ 7 | refresh(); /* Print it on to the real screen */ 8 | getch(); /* Wait for user input */ 9 | endwin(); /* End curses mode */ 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /ncurses_programs/basics/init_func_example.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { int ch; 5 | 6 | initscr(); /* Start curses mode */ 7 | raw(); /* Line buffering disabled */ 8 | keypad(stdscr, TRUE); /* We get F1, F2 etc.. */ 9 | noecho(); /* Don't echo() while we do getch */ 10 | 11 | printw("Type any character to see it in bold\n"); 12 | ch = getch(); /* If raw() hadn't been called 13 | * we have to press enter before it 14 | * gets to the program */ 15 | if(ch == KEY_F(1)) /* Without keypad enabled this will */ 16 | printw("F1 Key pressed");/* not get to us either */ 17 | /* Without noecho() some ugly escape 18 | * charachters might have been printed 19 | * on screen */ 20 | else 21 | { printw("The pressed key is "); 22 | attron(A_BOLD); 23 | printw("%c", ch); 24 | attroff(A_BOLD); 25 | } 26 | refresh(); /* Print it on to the real screen */ 27 | getch(); /* Wait for user input */ 28 | endwin(); /* End curses mode */ 29 | 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /ncurses_programs/basics/key_code.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { int ch; 5 | 6 | initscr(); 7 | cbreak(); 8 | noecho(); 9 | keypad(stdscr, TRUE); 10 | 11 | ch = getch(); 12 | endwin(); 13 | printf("The key pressed is %d\n", ch); 14 | } 15 | -------------------------------------------------------------------------------- /ncurses_programs/basics/printw_example.c: -------------------------------------------------------------------------------- 1 | #include /* ncurses.h includes stdio.h */ 2 | #include 3 | 4 | int main() 5 | { 6 | char mesg[]="Just a string"; /* message to be appeared on the screen */ 7 | int row,col; /* to store the number of rows and * 8 | * the number of colums of the screen */ 9 | initscr(); /* start the curses mode */ 10 | getmaxyx(stdscr,row,col); /* get the number of rows and columns */ 11 | mvprintw(row/2,(col-strlen(mesg))/2,"%s",mesg); 12 | /* print the message at the center of the screen */ 13 | mvprintw(row-2,0,"This screen has %d rows and %d columns\n",row,col); 14 | printw("Try resizing your window(if possible) and then run this program again"); 15 | refresh(); 16 | getch(); 17 | endwin(); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /ncurses_programs/basics/scanw_example.c: -------------------------------------------------------------------------------- 1 | #include /* ncurses.h includes stdio.h */ 2 | #include 3 | 4 | int main() 5 | { 6 | char mesg[]="Enter a string: "; /* message to be appeared on the screen */ 7 | char str[80]; 8 | int row,col; /* to store the number of rows and * 9 | * the number of colums of the screen */ 10 | initscr(); /* start the curses mode */ 11 | getmaxyx(stdscr,row,col); /* get the number of rows and columns */ 12 | mvprintw(row/2,(col-strlen(mesg))/2,"%s",mesg); 13 | /* print the message at the center of the screen */ 14 | getstr(str); 15 | mvprintw(LINES - 2, 0, "You Entered: %s", str); 16 | getch(); 17 | endwin(); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /ncurses_programs/basics/simple_attr.c: -------------------------------------------------------------------------------- 1 | /* pager functionality by Joseph Spainhour" */ 2 | #include 3 | #include 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | int ch, prev, row, col; 8 | prev = EOF; 9 | FILE *fp; 10 | int y, x; 11 | 12 | if(argc != 2) 13 | { 14 | printf("Usage: %s \n", argv[0]); 15 | exit(1); 16 | } 17 | fp = fopen(argv[1], "r"); 18 | if(fp == NULL) 19 | { 20 | perror("Cannot open input file"); 21 | exit(1); 22 | } 23 | initscr(); /* Start curses mode */ 24 | getmaxyx(stdscr, row, col); /* find the boundaries of the screeen */ 25 | while((ch = fgetc(fp)) != EOF) /* read the file till we reach the end */ 26 | { 27 | getyx(stdscr, y, x); /* get the current curser position */ 28 | if(y == (row - 1)) /* are we are at the end of the screen */ 29 | { 30 | printw("<-Press Any Key->"); /* tell the user to press a key */ 31 | getch(); 32 | clear(); /* clear the screen */ 33 | move(0, 0); /* start at the beginning of the screen */ 34 | } 35 | if(prev == '/' && ch == '*') /* If it is / and * then only 36 | * switch bold on */ 37 | { 38 | attron(A_BOLD); /* cut bold on */ 39 | getyx(stdscr, y, x); /* get the current curser position */ 40 | move(y, x - 1); /* back up one space */ 41 | printw("%c%c", '/', ch); /* The actual printing is done here */ 42 | } 43 | else 44 | printw("%c", ch); 45 | refresh(); 46 | if(prev == '*' && ch == '/') 47 | attroff(A_BOLD); /* Switch it off once we got * 48 | * and then / */ 49 | prev = ch; 50 | } 51 | 52 | printw("<-Press Any Key->"); /* tell the user to press a key */ 53 | getch(); 54 | 55 | endwin(); /* End curses mode */ 56 | fclose(fp); 57 | return 0; 58 | } 59 | -------------------------------------------------------------------------------- /ncurses_programs/basics/simple_color.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string); 6 | int main(int argc, char *argv[]) 7 | { initscr(); /* Start curses mode */ 8 | if(has_colors() == FALSE) 9 | { endwin(); 10 | printf("Your terminal does not support color\n"); 11 | exit(1); 12 | } 13 | start_color(); /* Start color */ 14 | init_pair(1, COLOR_RED, COLOR_BLACK); 15 | 16 | attron(COLOR_PAIR(1)); 17 | print_in_middle(stdscr, LINES / 2, 0, 0, "Viola !!! In color ..."); 18 | attroff(COLOR_PAIR(1)); 19 | getch(); 20 | endwin(); 21 | } 22 | void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string) 23 | { int length, x, y; 24 | float temp; 25 | 26 | if(win == NULL) 27 | win = stdscr; 28 | getyx(win, y, x); 29 | if(startx != 0) 30 | x = startx; 31 | if(starty != 0) 32 | y = starty; 33 | if(width == 0) 34 | width = 80; 35 | 36 | length = strlen(string); 37 | temp = (width - length)/ 2; 38 | x = startx + (int)temp; 39 | mvwprintw(win, y, x, "%s", string); 40 | refresh(); 41 | } 42 | -------------------------------------------------------------------------------- /ncurses_programs/basics/simple_key.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define WIDTH 30 5 | #define HEIGHT 10 6 | 7 | int startx = 0; 8 | int starty = 0; 9 | 10 | char *choices[] = { 11 | "Choice 1", 12 | "Choice 2", 13 | "Choice 3", 14 | "Choice 4", 15 | "Exit", 16 | }; 17 | int n_choices = sizeof(choices) / sizeof(char *); 18 | void print_menu(WINDOW *menu_win, int highlight); 19 | 20 | int main() 21 | { WINDOW *menu_win; 22 | int highlight = 1; 23 | int choice = 0; 24 | int c; 25 | 26 | initscr(); 27 | clear(); 28 | noecho(); 29 | cbreak(); /* Line buffering disabled. pass on everything */ 30 | startx = (80 - WIDTH) / 2; 31 | starty = (24 - HEIGHT) / 2; 32 | 33 | menu_win = newwin(HEIGHT, WIDTH, starty, startx); 34 | keypad(menu_win, TRUE); 35 | mvprintw(0, 0, "Use arrow keys to go up and down, Press enter to select a choice"); 36 | refresh(); 37 | print_menu(menu_win, highlight); 38 | while(1) 39 | { c = wgetch(menu_win); 40 | switch(c) 41 | { case KEY_UP: 42 | if(highlight == 1) 43 | highlight = n_choices; 44 | else 45 | --highlight; 46 | break; 47 | case KEY_DOWN: 48 | if(highlight == n_choices) 49 | highlight = 1; 50 | else 51 | ++highlight; 52 | break; 53 | case 10: 54 | choice = highlight; 55 | break; 56 | default: 57 | mvprintw(24, 0, "Charcter pressed is = %3d Hopefully it can be printed as '%c'", c, c); 58 | refresh(); 59 | break; 60 | } 61 | print_menu(menu_win, highlight); 62 | if(choice != 0) /* User did a choice come out of the infinite loop */ 63 | break; 64 | } 65 | mvprintw(23, 0, "You chose choice %d with choice string %s\n", choice, choices[choice - 1]); 66 | clrtoeol(); 67 | getch(); 68 | refresh(); 69 | endwin(); 70 | return 0; 71 | } 72 | 73 | 74 | void print_menu(WINDOW *menu_win, int highlight) 75 | { 76 | int x, y, i; 77 | 78 | x = 2; 79 | y = 2; 80 | box(menu_win, 0, 0); 81 | for(i = 0; i < n_choices; ++i) 82 | { if(highlight == i + 1) /* High light the present choice */ 83 | { wattron(menu_win, A_REVERSE); 84 | mvwprintw(menu_win, y, x, "%s", choices[i]); 85 | wattroff(menu_win, A_REVERSE); 86 | } 87 | else 88 | mvwprintw(menu_win, y, x, "%s", choices[i]); 89 | ++y; 90 | } 91 | wrefresh(menu_win); 92 | } 93 | -------------------------------------------------------------------------------- /ncurses_programs/basics/temp_leave.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | initscr(); /* Start curses mode */ 7 | printw("Hello World !!!\n"); /* Print Hello World */ 8 | refresh(); /* Print it on to the real screen */ 9 | def_prog_mode(); /* Save the tty modes */ 10 | endwin(); /* End curses mode temporarily */ 11 | system("/bin/sh"); /* Do whatever you like in cooked mode */ 12 | reset_prog_mode(); /* Return to the previous tty mode*/ 13 | /* stored by def_prog_mode() */ 14 | refresh(); /* Do refresh() to restore the */ 15 | /* Screen contents */ 16 | printw("Another String\n"); /* Back to curses use the full */ 17 | refresh(); /* capabilities of curses */ 18 | endwin(); /* End curses mode */ 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /ncurses_programs/basics/with_chgat.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { initscr(); /* Start curses mode */ 5 | start_color(); /* Start color functionality */ 6 | 7 | init_pair(1, COLOR_CYAN, COLOR_BLACK); 8 | printw("A Big string which i didn't care to type fully "); 9 | mvchgat(0, 0, -1, A_BLINK, 1, NULL); 10 | /* 11 | * First two parameters specify the position at which to start 12 | * Third parameter number of characters to update. -1 means till 13 | * end of line 14 | * Forth parameter is the normal attribute you wanted to give 15 | * to the charcter 16 | * Fifth is the color index. It is the index given during init_pair() 17 | * use 0 if you didn't want color 18 | * Sixth one is always NULL 19 | */ 20 | refresh(); 21 | getch(); 22 | endwin(); /* End curses mode */ 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /ncurses_programs/forms/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for JustForFun Files 2 | 3 | # A few variables 4 | 5 | CC=gcc 6 | LIBS=-lform -lncurses 7 | 8 | SRC_DIR=. 9 | EXE_DIR=../demo/exe 10 | 11 | EXES = \ 12 | ${EXE_DIR}/form_attrib\ 13 | ${EXE_DIR}/form_options\ 14 | ${EXE_DIR}/form_simple\ 15 | ${EXE_DIR}/form_win \ 16 | 17 | ${EXE_DIR}/%: %.o 18 | ${CC} -o $@ $< ${LIBS} 19 | 20 | %.o: ${SRC_DIR}/%.c 21 | ${CC} -o $@ -c $< 22 | 23 | all: ${EXES} 24 | 25 | 26 | clean: 27 | @rm -f ${EXES} 28 | -------------------------------------------------------------------------------- /ncurses_programs/forms/README: -------------------------------------------------------------------------------- 1 | Description of files 2 | -------------------- 3 | forms 4 | | 5 | |----> form_attrib.c -- Usage of field attributes 6 | |----> form_options.c -- Usage of field options 7 | |----> form_simple.c -- A simple form example 8 | |----> form_win.c -- Demo of windows associated with forms 9 | 10 | -------------------------------------------------------------------------------- /ncurses_programs/forms/form_attrib.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { FIELD *field[3]; 5 | FORM *my_form; 6 | int ch; 7 | 8 | /* Initialize curses */ 9 | initscr(); 10 | start_color(); 11 | cbreak(); 12 | noecho(); 13 | keypad(stdscr, TRUE); 14 | 15 | /* Initialize few color pairs */ 16 | init_pair(1, COLOR_WHITE, COLOR_BLUE); 17 | init_pair(2, COLOR_WHITE, COLOR_BLUE); 18 | 19 | /* Initialize the fields */ 20 | field[0] = new_field(1, 10, 4, 18, 0, 0); 21 | field[1] = new_field(1, 10, 6, 18, 0, 0); 22 | field[2] = NULL; 23 | 24 | /* Set field options */ 25 | set_field_fore(field[0], COLOR_PAIR(1));/* Put the field with blue background */ 26 | set_field_back(field[0], COLOR_PAIR(2));/* and white foreground (characters */ 27 | /* are printed in white */ 28 | field_opts_off(field[0], O_AUTOSKIP); /* Don't go to next field when this */ 29 | /* Field is filled up */ 30 | set_field_back(field[1], A_UNDERLINE); 31 | field_opts_off(field[1], O_AUTOSKIP); 32 | 33 | /* Create the form and post it */ 34 | my_form = new_form(field); 35 | post_form(my_form); 36 | refresh(); 37 | 38 | set_current_field(my_form, field[0]); /* Set focus to the colored field */ 39 | mvprintw(4, 10, "Value 1:"); 40 | mvprintw(6, 10, "Value 2:"); 41 | mvprintw(LINES - 2, 0, "Use UP, DOWN arrow keys to switch between fields"); 42 | refresh(); 43 | 44 | /* Loop through to get user requests */ 45 | while((ch = getch()) != KEY_F(1)) 46 | { switch(ch) 47 | { case KEY_DOWN: 48 | /* Go to next field */ 49 | form_driver(my_form, REQ_NEXT_FIELD); 50 | /* Go to the end of the present buffer */ 51 | /* Leaves nicely at the last character */ 52 | form_driver(my_form, REQ_END_LINE); 53 | break; 54 | case KEY_UP: 55 | /* Go to previous field */ 56 | form_driver(my_form, REQ_PREV_FIELD); 57 | form_driver(my_form, REQ_END_LINE); 58 | break; 59 | default: 60 | /* If this is a normal character, it gets */ 61 | /* Printed */ 62 | form_driver(my_form, ch); 63 | break; 64 | } 65 | } 66 | 67 | /* Un post form and free the memory */ 68 | unpost_form(my_form); 69 | free_form(my_form); 70 | free_field(field[0]); 71 | free_field(field[1]); 72 | 73 | endwin(); 74 | return 0; 75 | } 76 | -------------------------------------------------------------------------------- /ncurses_programs/forms/form_options.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define STARTX 15 4 | #define STARTY 4 5 | #define WIDTH 25 6 | 7 | #define N_FIELDS 3 8 | 9 | int main() 10 | { FIELD *field[N_FIELDS]; 11 | FORM *my_form; 12 | int ch, i; 13 | 14 | /* Initialize curses */ 15 | initscr(); 16 | cbreak(); 17 | noecho(); 18 | keypad(stdscr, TRUE); 19 | 20 | /* Initialize the fields */ 21 | for(i = 0; i < N_FIELDS - 1; ++i) 22 | field[i] = new_field(1, WIDTH, STARTY + i * 2, STARTX, 0, 0); 23 | field[N_FIELDS - 1] = NULL; 24 | 25 | /* Set field options */ 26 | set_field_back(field[1], A_UNDERLINE); /* Print a line for the option */ 27 | 28 | field_opts_off(field[0], O_ACTIVE); /* This field is a static label */ 29 | field_opts_off(field[1], O_PUBLIC); /* This filed is like a password field*/ 30 | field_opts_off(field[1], O_AUTOSKIP); /* To avoid entering the same field */ 31 | /* after last character is entered */ 32 | 33 | /* Create the form and post it */ 34 | my_form = new_form(field); 35 | post_form(my_form); 36 | refresh(); 37 | 38 | set_field_just(field[0], JUSTIFY_CENTER); /* Center Justification */ 39 | set_field_buffer(field[0], 0, "This is a static Field"); 40 | /* Initialize the field */ 41 | mvprintw(STARTY, STARTX - 10, "Field 1:"); 42 | mvprintw(STARTY + 2, STARTX - 10, "Field 2:"); 43 | refresh(); 44 | 45 | /* Loop through to get user requests */ 46 | while((ch = getch()) != KEY_F(1)) 47 | { switch(ch) 48 | { case KEY_DOWN: 49 | /* Go to next field */ 50 | form_driver(my_form, REQ_NEXT_FIELD); 51 | /* Go to the end of the present buffer */ 52 | /* Leaves nicely at the last character */ 53 | form_driver(my_form, REQ_END_LINE); 54 | break; 55 | case KEY_UP: 56 | /* Go to previous field */ 57 | form_driver(my_form, REQ_PREV_FIELD); 58 | form_driver(my_form, REQ_END_LINE); 59 | break; 60 | default: 61 | /* If this is a normal character, it gets */ 62 | /* Printed */ 63 | form_driver(my_form, ch); 64 | break; 65 | } 66 | } 67 | 68 | /* Un post form and free the memory */ 69 | unpost_form(my_form); 70 | free_form(my_form); 71 | free_field(field[0]); 72 | free_field(field[1]); 73 | 74 | endwin(); 75 | return 0; 76 | } 77 | -------------------------------------------------------------------------------- /ncurses_programs/forms/form_simple.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { FIELD *field[3]; 5 | FORM *my_form; 6 | int ch; 7 | 8 | /* Initialize curses */ 9 | initscr(); 10 | cbreak(); 11 | noecho(); 12 | keypad(stdscr, TRUE); 13 | 14 | /* Initialize the fields */ 15 | field[0] = new_field(1, 10, 4, 18, 0, 0); 16 | field[1] = new_field(1, 10, 6, 18, 0, 0); 17 | field[2] = NULL; 18 | 19 | /* Set field options */ 20 | set_field_back(field[0], A_UNDERLINE); /* Print a line for the option */ 21 | field_opts_off(field[0], O_AUTOSKIP); /* Don't go to next field when this */ 22 | /* Field is filled up */ 23 | set_field_back(field[1], A_UNDERLINE); 24 | field_opts_off(field[1], O_AUTOSKIP); 25 | 26 | /* Create the form and post it */ 27 | my_form = new_form(field); 28 | post_form(my_form); 29 | refresh(); 30 | 31 | mvprintw(4, 10, "Value 1:"); 32 | mvprintw(6, 10, "Value 2:"); 33 | refresh(); 34 | 35 | /* Loop through to get user requests */ 36 | while((ch = getch()) != KEY_F(1)) 37 | { switch(ch) 38 | { case KEY_DOWN: 39 | /* Go to next field */ 40 | form_driver(my_form, REQ_NEXT_FIELD); 41 | /* Go to the end of the present buffer */ 42 | /* Leaves nicely at the last character */ 43 | form_driver(my_form, REQ_END_LINE); 44 | break; 45 | case KEY_UP: 46 | /* Go to previous field */ 47 | form_driver(my_form, REQ_PREV_FIELD); 48 | form_driver(my_form, REQ_END_LINE); 49 | break; 50 | default: 51 | /* If this is a normal character, it gets */ 52 | /* Printed */ 53 | form_driver(my_form, ch); 54 | break; 55 | } 56 | } 57 | 58 | /* Un post form and free the memory */ 59 | unpost_form(my_form); 60 | free_form(my_form); 61 | free_field(field[0]); 62 | free_field(field[1]); 63 | 64 | endwin(); 65 | return 0; 66 | } 67 | -------------------------------------------------------------------------------- /ncurses_programs/menus/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for JustForFun Files 2 | 3 | # A few variables 4 | 5 | CC=gcc 6 | LIBS=-lmenu -lncurses 7 | 8 | SRC_DIR=. 9 | EXE_DIR=../demo/exe 10 | 11 | EXES = \ 12 | ${EXE_DIR}/menu_attrib\ 13 | ${EXE_DIR}/menu_item_data\ 14 | ${EXE_DIR}/menu_multi_column \ 15 | ${EXE_DIR}/menu_scroll \ 16 | ${EXE_DIR}/menu_simple \ 17 | ${EXE_DIR}/menu_toggle \ 18 | ${EXE_DIR}/menu_userptr \ 19 | ${EXE_DIR}/menu_win 20 | 21 | ${EXE_DIR}/%: %.o 22 | ${CC} -o $@ $< ${LIBS} 23 | 24 | %.o: ${SRC_DIR}/%.c 25 | ${CC} -o $@ -c $< 26 | 27 | all: ${EXES} 28 | 29 | 30 | clean: 31 | @rm -f ${EXES} 32 | -------------------------------------------------------------------------------- /ncurses_programs/menus/README: -------------------------------------------------------------------------------- 1 | Description of files 2 | -------------------- 3 | menus 4 | | 5 | |----> menu_attrib.c -- Usage of menu attributes 6 | |----> menu_item_data.c -- Usage of item_name() etc.. functions 7 | |----> menu_multi_column.c -- Creates multi columnar menus 8 | |----> menu_scroll.c -- Demonstrates scrolling capability of menus 9 | |----> menu_simple.c -- A simple menu accessed by arrow keys 10 | |----> menu_toggle.c -- Creates multi valued menus and explains 11 | | -- REQ_TOGGLE_ITEM 12 | |----> menu_userptr.c -- Usage of user pointer 13 | |----> menu_win.c -- Demo of windows associated with menus 14 | -------------------------------------------------------------------------------- /ncurses_programs/menus/menu_attrib.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) 5 | #define CTRLD 4 6 | 7 | char *choices[] = { 8 | "Choice 1", 9 | "Choice 2", 10 | "Choice 3", 11 | "Choice 4", 12 | "Choice 5", 13 | "Choice 6", 14 | "Choice 7", 15 | "Exit", 16 | }; 17 | 18 | int main() 19 | { ITEM **my_items; 20 | int c; 21 | MENU *my_menu; 22 | int n_choices, i; 23 | ITEM *cur_item; 24 | 25 | /* Initialize curses */ 26 | initscr(); 27 | start_color(); 28 | cbreak(); 29 | noecho(); 30 | keypad(stdscr, TRUE); 31 | init_pair(1, COLOR_RED, COLOR_BLACK); 32 | init_pair(2, COLOR_GREEN, COLOR_BLACK); 33 | init_pair(3, COLOR_MAGENTA, COLOR_BLACK); 34 | 35 | /* Initialize items */ 36 | n_choices = ARRAY_SIZE(choices); 37 | my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); 38 | for(i = 0; i < n_choices; ++i) 39 | my_items[i] = new_item(choices[i], choices[i]); 40 | my_items[n_choices] = (ITEM *)NULL; 41 | item_opts_off(my_items[3], O_SELECTABLE); 42 | item_opts_off(my_items[6], O_SELECTABLE); 43 | 44 | /* Create menu */ 45 | my_menu = new_menu((ITEM **)my_items); 46 | 47 | /* Set fore ground and back ground of the menu */ 48 | set_menu_fore(my_menu, COLOR_PAIR(1) | A_REVERSE); 49 | set_menu_back(my_menu, COLOR_PAIR(2)); 50 | set_menu_grey(my_menu, COLOR_PAIR(3)); 51 | 52 | /* Post the menu */ 53 | mvprintw(LINES - 3, 0, "Press to see the option selected"); 54 | mvprintw(LINES - 2, 0, "Up and Down arrow keys to naviage (F1 to Exit)"); 55 | post_menu(my_menu); 56 | refresh(); 57 | 58 | while((c = getch()) != KEY_F(1)) 59 | { switch(c) 60 | { case KEY_DOWN: 61 | menu_driver(my_menu, REQ_DOWN_ITEM); 62 | break; 63 | case KEY_UP: 64 | menu_driver(my_menu, REQ_UP_ITEM); 65 | break; 66 | case 10: /* Enter */ 67 | move(20, 0); 68 | clrtoeol(); 69 | mvprintw(20, 0, "Item selected is : %s", 70 | item_name(current_item(my_menu))); 71 | pos_menu_cursor(my_menu); 72 | break; 73 | } 74 | } 75 | unpost_menu(my_menu); 76 | for(i = 0; i < n_choices; ++i) 77 | free_item(my_items[i]); 78 | free_menu(my_menu); 79 | endwin(); 80 | } 81 | -------------------------------------------------------------------------------- /ncurses_programs/menus/menu_item_data.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) 6 | #define CTRLD 4 7 | 8 | char *choices[] = { 9 | "Choice 1", 10 | "Choice 2", 11 | "Choice 3", 12 | "Choice 4", 13 | "Exit", 14 | }; 15 | 16 | int main() 17 | { ITEM **my_items; 18 | int c; 19 | MENU *my_menu; 20 | int n_choices, i; 21 | ITEM *cur_item; 22 | 23 | 24 | initscr(); 25 | cbreak(); 26 | noecho(); 27 | keypad(stdscr, TRUE); 28 | 29 | n_choices = ARRAY_SIZE(choices); 30 | my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); 31 | 32 | for(i = 0; i < n_choices; ++i) 33 | my_items[i] = new_item(choices[i], choices[i]); 34 | my_items[n_choices] = (ITEM *)NULL; 35 | 36 | my_menu = new_menu((ITEM **)my_items); 37 | post_menu(my_menu); 38 | refresh(); 39 | 40 | while((c = getch()) != KEY_F(1)) 41 | { switch(c) 42 | { case KEY_DOWN: 43 | menu_driver(my_menu, REQ_DOWN_ITEM); 44 | break; 45 | case KEY_UP: 46 | menu_driver(my_menu, REQ_UP_ITEM); 47 | break; 48 | case 10: /* Enter */ 49 | cur_item = current_item(my_menu); 50 | move(LINES - 2, 0); 51 | clrtoeol(); 52 | mvprintw(LINES - 2, 0, "You have chosen %d item with name %s and description %s", 53 | item_index(cur_item) + 1, item_name(cur_item), 54 | item_description(cur_item)); 55 | 56 | refresh(); 57 | pos_menu_cursor(my_menu); 58 | break; 59 | } 60 | } 61 | 62 | free_item(my_items[0]); 63 | free_item(my_items[1]); 64 | free_menu(my_menu); 65 | endwin(); 66 | } 67 | -------------------------------------------------------------------------------- /ncurses_programs/menus/menu_simple.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) 6 | #define CTRLD 4 7 | 8 | char *choices[] = { 9 | "Choice 1", 10 | "Choice 2", 11 | "Choice 3", 12 | "Choice 4", 13 | "Exit", 14 | }; 15 | 16 | int main() 17 | { ITEM **my_items; 18 | int c; 19 | MENU *my_menu; 20 | int n_choices, i; 21 | ITEM *cur_item; 22 | 23 | 24 | initscr(); 25 | cbreak(); 26 | noecho(); 27 | keypad(stdscr, TRUE); 28 | 29 | n_choices = ARRAY_SIZE(choices); 30 | my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); 31 | 32 | for(i = 0; i < n_choices; ++i) 33 | my_items[i] = new_item(choices[i], choices[i]); 34 | my_items[n_choices] = (ITEM *)NULL; 35 | 36 | my_menu = new_menu((ITEM **)my_items); 37 | mvprintw(LINES - 2, 0, "F1 to Exit"); 38 | post_menu(my_menu); 39 | refresh(); 40 | 41 | while((c = getch()) != KEY_F(1)) 42 | { switch(c) 43 | { case KEY_DOWN: 44 | menu_driver(my_menu, REQ_DOWN_ITEM); 45 | break; 46 | case KEY_UP: 47 | menu_driver(my_menu, REQ_UP_ITEM); 48 | break; 49 | } 50 | } 51 | 52 | free_item(my_items[0]); 53 | free_item(my_items[1]); 54 | free_menu(my_menu); 55 | endwin(); 56 | } 57 | -------------------------------------------------------------------------------- /ncurses_programs/menus/menu_toggle.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) 7 | #define CTRLD 4 8 | 9 | char *choices[] = { 10 | "Choice 1", 11 | "Choice 2", 12 | "Choice 3", 13 | "Choice 4", 14 | "Choice 5", 15 | "Choice 6", 16 | "Choice 7", 17 | "Exit", 18 | }; 19 | 20 | int main() 21 | { ITEM **my_items; 22 | int c; 23 | MENU *my_menu; 24 | int n_choices, i; 25 | ITEM *cur_item; 26 | 27 | /* Initialize curses */ 28 | initscr(); 29 | cbreak(); 30 | noecho(); 31 | keypad(stdscr, TRUE); 32 | 33 | /* Initialize items */ 34 | n_choices = ARRAY_SIZE(choices); 35 | my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); 36 | for(i = 0; i < n_choices; ++i) 37 | my_items[i] = new_item(choices[i], choices[i]); 38 | my_items[n_choices] = (ITEM *)NULL; 39 | 40 | my_menu = new_menu((ITEM **)my_items); 41 | 42 | /* Make the menu multi valued */ 43 | menu_opts_off(my_menu, O_ONEVALUE); 44 | 45 | mvprintw(LINES - 3, 0, "Use to select or unselect an item."); 46 | mvprintw(LINES - 2, 0, " to see presently selected items(F1 to Exit)"); 47 | post_menu(my_menu); 48 | refresh(); 49 | 50 | while((c = getch()) != KEY_F(1)) 51 | { switch(c) 52 | { case KEY_DOWN: 53 | menu_driver(my_menu, REQ_DOWN_ITEM); 54 | break; 55 | case KEY_UP: 56 | menu_driver(my_menu, REQ_UP_ITEM); 57 | break; 58 | case ' ': 59 | menu_driver(my_menu, REQ_TOGGLE_ITEM); 60 | break; 61 | case 10: /* Enter */ 62 | { char temp[200]; 63 | ITEM **items; 64 | 65 | items = menu_items(my_menu); 66 | temp[0] = '\0'; 67 | for(i = 0; i < item_count(my_menu); ++i) 68 | if(item_value(items[i]) == TRUE) 69 | { strcat(temp, item_name(items[i])); 70 | strcat(temp, " "); 71 | } 72 | move(20, 0); 73 | clrtoeol(); 74 | mvprintw(20, 0, temp); 75 | refresh(); 76 | } 77 | break; 78 | } 79 | } 80 | 81 | free_item(my_items[0]); 82 | free_item(my_items[1]); 83 | free_menu(my_menu); 84 | endwin(); 85 | } 86 | -------------------------------------------------------------------------------- /ncurses_programs/menus/menu_userptr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) 6 | #define CTRLD 4 7 | 8 | char *choices[] = { 9 | "Choice 1", 10 | "Choice 2", 11 | "Choice 3", 12 | "Choice 4", 13 | "Choice 5", 14 | "Choice 6", 15 | "Choice 7", 16 | "Exit", 17 | }; 18 | void func(char *name); 19 | 20 | int main() 21 | { ITEM **my_items; 22 | int c; 23 | MENU *my_menu; 24 | int n_choices, i; 25 | ITEM *cur_item; 26 | 27 | /* Initialize curses */ 28 | initscr(); 29 | start_color(); 30 | cbreak(); 31 | noecho(); 32 | keypad(stdscr, TRUE); 33 | init_pair(1, COLOR_RED, COLOR_BLACK); 34 | init_pair(2, COLOR_GREEN, COLOR_BLACK); 35 | init_pair(3, COLOR_MAGENTA, COLOR_BLACK); 36 | 37 | /* Initialize items */ 38 | n_choices = ARRAY_SIZE(choices); 39 | my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); 40 | for(i = 0; i < n_choices; ++i) 41 | { my_items[i] = new_item(choices[i], choices[i]); 42 | /* Set the user pointer */ 43 | set_item_userptr(my_items[i], func); 44 | } 45 | my_items[n_choices] = (ITEM *)NULL; 46 | 47 | /* Create menu */ 48 | my_menu = new_menu((ITEM **)my_items); 49 | 50 | /* Post the menu */ 51 | mvprintw(LINES - 3, 0, "Press to see the option selected"); 52 | mvprintw(LINES - 2, 0, "Up and Down arrow keys to naviage (F1 to Exit)"); 53 | post_menu(my_menu); 54 | refresh(); 55 | 56 | while((c = getch()) != KEY_F(1)) 57 | { switch(c) 58 | { case KEY_DOWN: 59 | menu_driver(my_menu, REQ_DOWN_ITEM); 60 | break; 61 | case KEY_UP: 62 | menu_driver(my_menu, REQ_UP_ITEM); 63 | break; 64 | case 10: /* Enter */ 65 | { ITEM *cur; 66 | void (*p)(char *); 67 | 68 | cur = current_item(my_menu); 69 | p = item_userptr(cur); 70 | p((char *)item_name(cur)); 71 | pos_menu_cursor(my_menu); 72 | break; 73 | } 74 | break; 75 | } 76 | } 77 | unpost_menu(my_menu); 78 | for(i = 0; i < n_choices; ++i) 79 | free_item(my_items[i]); 80 | free_menu(my_menu); 81 | endwin(); 82 | } 83 | 84 | void func(char *name) 85 | { move(20, 0); 86 | clrtoeol(); 87 | mvprintw(20, 0, "Item selected is : %s", name); 88 | } 89 | -------------------------------------------------------------------------------- /ncurses_programs/panels/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for JustForFun Files 2 | 3 | # A few variables 4 | 5 | CC=gcc 6 | LIBS=-lpanel -lncurses 7 | 8 | SRC_DIR=. 9 | EXE_DIR=../demo/exe 10 | 11 | EXES = \ 12 | ${EXE_DIR}/panel_browse \ 13 | ${EXE_DIR}/panel_hide \ 14 | ${EXE_DIR}/panel_resize \ 15 | ${EXE_DIR}/panel_simple 16 | 17 | ${EXE_DIR}/%: %.o 18 | ${CC} -o $@ $< ${LIBS} 19 | 20 | %.o: ${SRC_DIR}/%.c 21 | ${CC} -o $@ -c $< 22 | 23 | all: ${EXES} 24 | 25 | 26 | clean: 27 | @rm -f ${EXES} 28 | -------------------------------------------------------------------------------- /ncurses_programs/panels/README: -------------------------------------------------------------------------------- 1 | Description of files 2 | -------------------- 3 | panels 4 | | 5 | |----> panel_browse.c -- Panel browsing through tab. Usage of user pointer 6 | |----> panel_hide.c -- Hiding and Un hiding of panels 7 | |----> panel_resize.c -- Moving and resizing of panels 8 | |----> panel_simple.c -- A simple panel example 9 | -------------------------------------------------------------------------------- /ncurses_programs/panels/panel_simple.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { WINDOW *my_wins[3]; 5 | PANEL *my_panels[3]; 6 | int lines = 10, cols = 40, y = 2, x = 4, i; 7 | 8 | initscr(); 9 | cbreak(); 10 | noecho(); 11 | 12 | /* Create windows for the panels */ 13 | my_wins[0] = newwin(lines, cols, y, x); 14 | my_wins[1] = newwin(lines, cols, y + 1, x + 5); 15 | my_wins[2] = newwin(lines, cols, y + 2, x + 10); 16 | 17 | /* 18 | * Create borders around the windows so that you can see the effect 19 | * of panels 20 | */ 21 | for(i = 0; i < 3; ++i) 22 | box(my_wins[i], 0, 0); 23 | 24 | /* Attach a panel to each window */ /* Order is bottom up */ 25 | my_panels[0] = new_panel(my_wins[0]); /* Push 0, order: stdscr-0 */ 26 | my_panels[1] = new_panel(my_wins[1]); /* Push 1, order: stdscr-0-1 */ 27 | my_panels[2] = new_panel(my_wins[2]); /* Push 2, order: stdscr-0-1-2 */ 28 | 29 | /* Update the stacking order. 2nd panel will be on top */ 30 | update_panels(); 31 | 32 | /* Show it on the screen */ 33 | doupdate(); 34 | 35 | getch(); 36 | endwin(); 37 | } 38 | 39 | -------------------------------------------------------------------------------- /ncurses_programs/perl/01.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | # Copyright (C) 2003 by Virtusa Corporation 4 | # http://www.virtusa.com 5 | # 6 | # Anuradha Ratnaweera 7 | # http://www.linux.lk/~anuradha/ 8 | # 9 | 10 | use Curses; 11 | 12 | initscr(); 13 | printw("Hello world!"); 14 | refresh(); 15 | getch(); 16 | endwin(); 17 | 18 | -------------------------------------------------------------------------------- /ncurses_programs/perl/02.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | # Copyright (C) 2003 by Virtusa Corporation 4 | # http://www.virtusa.com 5 | # 6 | # Anuradha Ratnaweera 7 | # http://www.linux.lk/~anuradha/ 8 | # 9 | 10 | use Curses; 11 | 12 | initscr(); 13 | raw(); 14 | keypad(1); 15 | noecho(); 16 | 17 | printw("Type any character to see it in bold\n"); 18 | $ch = getch(); 19 | 20 | if ($ch == KEY_F(1)) { 21 | printw("F1 Key pressed"); 22 | } 23 | else { 24 | printw("The pressed key is "); 25 | attron(A_BOLD); 26 | printw($ch); 27 | attroff(A_BOLD); 28 | } 29 | 30 | refresh(); 31 | getch(); 32 | endwin(); 33 | 34 | -------------------------------------------------------------------------------- /ncurses_programs/perl/03.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | # Copyright (C) 2003 by Virtusa Corporation 4 | # http://www.virtusa.com 5 | # 6 | # Anuradha Ratnaweera 7 | # http://www.linux.lk/~anuradha/ 8 | # 9 | 10 | # We use addstr() instead of printw() 11 | 12 | use Curses; 13 | 14 | $mesg = "Just a string"; 15 | 16 | initscr(); 17 | getmaxyx($row, $col); 18 | addstr($row / 2, ($col - length($mesg)) / 2, $mesg); 19 | addstr($row - 2, 0, "This screen has $row rows and $col columns\n"); 20 | refresh(); 21 | getch(); 22 | endwin(); 23 | 24 | -------------------------------------------------------------------------------- /ncurses_programs/perl/04.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | # Copyright (C) 2003 by Virtusa Corporation 4 | # http://www.virtusa.com 5 | # 6 | # Anuradha Ratnaweera 7 | # http://www.linux.lk/~anuradha/ 8 | # 9 | 10 | # We use addstr() instead of printw() 11 | 12 | use Curses; 13 | 14 | $mesg = "Enter a string: "; 15 | 16 | initscr(); 17 | getmaxyx($row, $col); 18 | addstr($row / 2, ($col - length($mesg)) / 2, $mesg); 19 | getstr($str); 20 | addstr($LINES - 2, 0, "You Entered: $str"); 21 | getch(); 22 | endwin(); 23 | 24 | -------------------------------------------------------------------------------- /ncurses_programs/perl/05.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | # Copyright (C) 2003 by Virtusa Corporation 4 | # http://www.virtusa.com 5 | # 6 | # Anuradha Ratnaweera 7 | # http://www.linux.lk/~anuradha/ 8 | # 9 | 10 | # We first read all the input into an array and join 11 | # it to a single string with newlines. 12 | 13 | use Curses; 14 | 15 | initscr(); 16 | 17 | @lines = <>; 18 | $lines = join "", @lines; 19 | 20 | while ($lines =~ /\G(.*?)(\/\*.*?\*\/)?/gs) { 21 | addstr($1); 22 | if ($2) { 23 | attron(A_BOLD); 24 | addstr($2); 25 | attroff(A_BOLD); 26 | } 27 | } 28 | 29 | refresh(); 30 | getch(); 31 | endwin(); 32 | 33 | -------------------------------------------------------------------------------- /ncurses_programs/perl/06.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | # Copyright (C) 2003 by Virtusa Corporation 4 | # http://www.virtusa.com 5 | # 6 | # Anuradha Ratnaweera 7 | # http://www.linux.lk/~anuradha/ 8 | # 9 | 10 | use Curses; 11 | 12 | initscr(); 13 | start_color(); 14 | 15 | init_pair(1, COLOR_CYAN, COLOR_BLACK); 16 | printw("A Big string which i didn't care to type fully "); 17 | chgat(0, 0, -1, A_BLINK, 1, NULL); 18 | 19 | refresh(); 20 | getch(); 21 | endwin(); 22 | 23 | -------------------------------------------------------------------------------- /ncurses_programs/perl/07.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | # Copyright (C) 2003 by Virtusa Corporation 4 | # http://www.virtusa.com 5 | # 6 | # Anuradha Ratnaweera 7 | # http://www.linux.lk/~anuradha/ 8 | # 9 | 10 | use Curses; 11 | 12 | initscr(); 13 | cbreak(); 14 | keypad(1); 15 | 16 | $height = 3; 17 | $width = 10; 18 | $starty = ($LINES - $height) / 2; 19 | $startx = ($COLS - $width) / 2; 20 | printw("Press F1 to exit"); 21 | refresh(); 22 | $my_win = create_newwin($height, $width, $starty, $startx); 23 | 24 | while (($ch = getch()) != KEY_F(1)) { 25 | if ($ch == KEY_LEFT) { 26 | destroy_win($my_win); 27 | $my_win = create_newwin($height, $width, $starty, --$startx); 28 | } 29 | elsif ($ch == KEY_RIGHT) { 30 | destroy_win($my_win); 31 | $my_win = create_newwin($height, $width, $starty, ++$startx); 32 | } 33 | elsif ($ch == KEY_UP) { 34 | destroy_win($my_win); 35 | $my_win = create_newwin($height, $width, --$starty, $startx); 36 | } 37 | elsif ($ch == KEY_DOWN) { 38 | destroy_win($my_win); 39 | $my_win = create_newwin($height, $width, ++$starty, $startx); 40 | } 41 | } 42 | 43 | endwin(); 44 | 45 | sub create_newwin { 46 | $local_win = newwin(shift, shift, shift, shift); 47 | box($local_win, 0, 0); 48 | refresh($local_win); 49 | return $local_win; 50 | } 51 | 52 | sub destroy_win { 53 | $local_win = shift; 54 | border($local_win, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '); 55 | refresh($local_win); 56 | delwin($local_win); 57 | } 58 | 59 | -------------------------------------------------------------------------------- /ncurses_programs/perl/09.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | # Copyright (C) 2003 by Virtusa Corporation 4 | # http://www.virtusa.com 5 | # 6 | # Anuradha Ratnaweera 7 | # http://www.linux.lk/~anuradha/ 8 | # 9 | 10 | use Curses; 11 | 12 | initscr(); 13 | unless (has_colors()) { 14 | endwin(); 15 | print "Your terminal does not support color\n"; 16 | exit 1; 17 | } 18 | start_color(); 19 | init_pair(1, COLOR_RED, COLOR_BLACK); 20 | 21 | attron(COLOR_PAIR(1)); 22 | print_in_middle(stdscr, $LINES / 2, 0, 0, "Viola !!! In color ..."); 23 | attroff(COLOR_PAIR(1)); 24 | getch(); 25 | endwin(); 26 | 27 | sub print_in_middle { 28 | $win = shift; 29 | $starty = shift; 30 | $startx = shift; 31 | $width = shift; 32 | $string = shift; 33 | 34 | $win = stdscr unless ($win); 35 | 36 | getyx($win, $y, $x); 37 | 38 | $x = $startx if ($startx); 39 | $y = $starty if ($starty); 40 | $width = $COLS unless ($width); 41 | $length = length($string); 42 | $temp = ($width - $length) / 2; 43 | $x = $startx + $temp; 44 | addstr($y, $x, $string); 45 | refresh(); 46 | } 47 | 48 | -------------------------------------------------------------------------------- /ncurses_programs/perl/10.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | # Copyright (C) 2003 by Virtusa Corporation 4 | # http://www.virtusa.com 5 | # 6 | # Anuradha Ratnaweera 7 | # http://www.linux.lk/~anuradha/ 8 | # 9 | 10 | use Curses; 11 | 12 | $width = 30; 13 | $height = 10; 14 | $startx = 0; 15 | $starty = 0; 16 | 17 | @choices = ( 18 | "Choice 1", 19 | "Choice 2", 20 | "Choice 3", 21 | "Choice 4", 22 | "Exit" 23 | ); 24 | 25 | $n_choices = @choices; 26 | 27 | $highlight = 1; 28 | $choice = 0; 29 | 30 | initscr(); 31 | clear(); 32 | noecho(); 33 | cbreak(); 34 | $startx = ($COLS - $width) / 2; 35 | $starty = ($LINES - $height) / 2; 36 | 37 | $menu_win = newwin($height, $width, $starty, $startx); 38 | keypad(1); 39 | keypad($menu_win, 1); 40 | addstr(0, 0, "Use arrow keys to go up and down, Press enter to select a choice"); 41 | refresh(); 42 | print_menu($menu_win, $highlight); 43 | 44 | while (1) { 45 | $c = getch($menu_win); 46 | if ($c == KEY_UP) { 47 | if ($highlight == 1) { 48 | $highlight = $n_choices; 49 | } 50 | else { 51 | $highlight--; 52 | } 53 | } 54 | elsif ($c == KEY_DOWN) { 55 | if ($highlight == $n_choices) { 56 | $highlight = 1; 57 | } 58 | else { 59 | $highlight++; 60 | } 61 | } 62 | elsif ($c == '\n') { 63 | $choice = $highlight; 64 | } 65 | else { 66 | addstr($LINES - 2, 0, "Character pressed is $c"); 67 | refresh(); 68 | } 69 | print_menu($menu_win, $highlight); 70 | last if ($choice); 71 | } 72 | 73 | addstr($LINES - 2, 0, "You chose choice $choice with choice string $choices[$choice-1]"); 74 | clrtoeol(); 75 | refresh(); 76 | endwin(); 77 | 78 | sub print_menu { 79 | $menu_win = shift; 80 | $highlight = shift; 81 | 82 | $x = 2; 83 | $y = 2; 84 | box($menu_win, 0, 0); 85 | for ($i = 0; $i < $n_choices; $i++) { 86 | if ($highlight == $i + 1) { 87 | attron($menu_win, A_REVERSE); 88 | addstr($menu_win, $y, $x, $choices[$i]); 89 | attroff($menu_win, A_REVERSE); 90 | } 91 | else { 92 | addstr($menu_win, $y, $x, $choices[$i]); 93 | } 94 | $y++; 95 | } 96 | refresh($menu_win); 97 | } 98 | 99 | -------------------------------------------------------------------------------- /ncurses_programs/perl/COPYING: -------------------------------------------------------------------------------- 1 | These programmes can be distributed under the same terms as 2 | ncurses (MIT style license). 3 | -------------------------------------------------------------------------------- /ncurses_programs/perl/README: -------------------------------------------------------------------------------- 1 | The license was changed from GNU/GPL to MIT style license 2 | which is of course compatible with GPL, in order to include 3 | them in the official ncurses-HOWTO. 4 | 5 | Anuradha Ratnaweera (anuradha at gnu org OR gnu.slash.linux at 6 | gmail com OR anuradha at linux lk). 7 | -------------------------------------------------------------------------------- /worg-data/fonts/dejavu/dejavu-sans/DejaVuSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/dejavu/dejavu-sans/DejaVuSans-Bold.ttf -------------------------------------------------------------------------------- /worg-data/fonts/dejavu/dejavu-sans/DejaVuSans-BoldOblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/dejavu/dejavu-sans/DejaVuSans-BoldOblique.ttf -------------------------------------------------------------------------------- /worg-data/fonts/dejavu/dejavu-sans/DejaVuSans-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/dejavu/dejavu-sans/DejaVuSans-ExtraLight.ttf -------------------------------------------------------------------------------- /worg-data/fonts/dejavu/dejavu-sans/DejaVuSans-Oblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/dejavu/dejavu-sans/DejaVuSans-Oblique.ttf -------------------------------------------------------------------------------- /worg-data/fonts/dejavu/dejavu-sans/DejaVuSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/dejavu/dejavu-sans/DejaVuSans.ttf -------------------------------------------------------------------------------- /worg-data/fonts/dejavu/dejavu-sans/DejaVuSansCondensed-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/dejavu/dejavu-sans/DejaVuSansCondensed-Bold.ttf -------------------------------------------------------------------------------- /worg-data/fonts/dejavu/dejavu-sans/DejaVuSansCondensed-BoldOblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/dejavu/dejavu-sans/DejaVuSansCondensed-BoldOblique.ttf -------------------------------------------------------------------------------- /worg-data/fonts/dejavu/dejavu-sans/DejaVuSansCondensed-Oblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/dejavu/dejavu-sans/DejaVuSansCondensed-Oblique.ttf -------------------------------------------------------------------------------- /worg-data/fonts/dejavu/dejavu-sans/DejaVuSansCondensed.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/dejavu/dejavu-sans/DejaVuSansCondensed.ttf -------------------------------------------------------------------------------- /worg-data/fonts/dejavu/dejavu-serif/DejaVuSerif-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/dejavu/dejavu-serif/DejaVuSerif-Bold.ttf -------------------------------------------------------------------------------- /worg-data/fonts/dejavu/dejavu-serif/DejaVuSerif-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/dejavu/dejavu-serif/DejaVuSerif-BoldItalic.ttf -------------------------------------------------------------------------------- /worg-data/fonts/dejavu/dejavu-serif/DejaVuSerif-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/dejavu/dejavu-serif/DejaVuSerif-Italic.ttf -------------------------------------------------------------------------------- /worg-data/fonts/dejavu/dejavu-serif/DejaVuSerif.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/dejavu/dejavu-serif/DejaVuSerif.ttf -------------------------------------------------------------------------------- /worg-data/fonts/dejavu/dejavu-serif/DejaVuSerifCondensed-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/dejavu/dejavu-serif/DejaVuSerifCondensed-Bold.ttf -------------------------------------------------------------------------------- /worg-data/fonts/dejavu/dejavu-serif/DejaVuSerifCondensed-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/dejavu/dejavu-serif/DejaVuSerifCondensed-BoldItalic.ttf -------------------------------------------------------------------------------- /worg-data/fonts/dejavu/dejavu-serif/DejaVuSerifCondensed-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/dejavu/dejavu-serif/DejaVuSerifCondensed-Italic.ttf -------------------------------------------------------------------------------- /worg-data/fonts/dejavu/dejavu-serif/DejaVuSerifCondensed.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/dejavu/dejavu-serif/DejaVuSerifCondensed.ttf -------------------------------------------------------------------------------- /worg-data/fonts/fira/FiraMonoOT-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/fira/FiraMonoOT-Bold.otf -------------------------------------------------------------------------------- /worg-data/fonts/fira/FiraSansOT-LightItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/fira/FiraSansOT-LightItalic.otf -------------------------------------------------------------------------------- /worg-data/fonts/fira/FiraSansOT-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/fira/FiraSansOT-Medium.otf -------------------------------------------------------------------------------- /worg-data/fonts/fira/FiraSansOT-MediumItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/fira/FiraSansOT-MediumItalic.otf -------------------------------------------------------------------------------- /worg-data/fonts/fira/FiraSansOT-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/fira/FiraSansOT-Regular.otf -------------------------------------------------------------------------------- /worg-data/fonts/larabiefont-free/larabiefont rg.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/larabiefont-free/larabiefont rg.ttf -------------------------------------------------------------------------------- /worg-data/fonts/monospace/Monospace.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/monospace/Monospace.ttf -------------------------------------------------------------------------------- /worg-data/fonts/monospace/MonospaceBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/monospace/MonospaceBold.ttf -------------------------------------------------------------------------------- /worg-data/fonts/monospace/MonospaceOblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/monospace/MonospaceOblique.ttf -------------------------------------------------------------------------------- /worg-data/fonts/noto-serif/NotoSerif-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/noto-serif/NotoSerif-Bold.ttf -------------------------------------------------------------------------------- /worg-data/fonts/noto-serif/NotoSerif-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/noto-serif/NotoSerif-BoldItalic.ttf -------------------------------------------------------------------------------- /worg-data/fonts/noto-serif/NotoSerif-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/noto-serif/NotoSerif-Italic.ttf -------------------------------------------------------------------------------- /worg-data/fonts/noto-serif/NotoSerif-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/noto-serif/NotoSerif-Regular.ttf -------------------------------------------------------------------------------- /worg-data/fonts/resamitz/ResamitzBold_0048.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/resamitz/ResamitzBold_0048.otf -------------------------------------------------------------------------------- /worg-data/fonts/resamitz/ResamitzItalic_0048.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/resamitz/ResamitzItalic_0048.otf -------------------------------------------------------------------------------- /worg-data/fonts/resamitz/Resamitz_0048.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/resamitz/Resamitz_0048.otf -------------------------------------------------------------------------------- /worg-data/fonts/roboto/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/roboto/Roboto-Black.ttf -------------------------------------------------------------------------------- /worg-data/fonts/roboto/Roboto-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/roboto/Roboto-BlackItalic.ttf -------------------------------------------------------------------------------- /worg-data/fonts/roboto/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/roboto/Roboto-Bold.ttf -------------------------------------------------------------------------------- /worg-data/fonts/roboto/Roboto-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/roboto/Roboto-BoldItalic.ttf -------------------------------------------------------------------------------- /worg-data/fonts/roboto/Roboto-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/roboto/Roboto-Italic.ttf -------------------------------------------------------------------------------- /worg-data/fonts/roboto/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/roboto/Roboto-Light.ttf -------------------------------------------------------------------------------- /worg-data/fonts/roboto/Roboto-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/roboto/Roboto-LightItalic.ttf -------------------------------------------------------------------------------- /worg-data/fonts/roboto/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/roboto/Roboto-Medium.ttf -------------------------------------------------------------------------------- /worg-data/fonts/roboto/Roboto-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/roboto/Roboto-MediumItalic.ttf -------------------------------------------------------------------------------- /worg-data/fonts/roboto/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/roboto/Roboto-Regular.ttf -------------------------------------------------------------------------------- /worg-data/fonts/roboto/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/roboto/Roboto-Thin.ttf -------------------------------------------------------------------------------- /worg-data/fonts/roboto/Roboto-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/fonts/roboto/Roboto-ThinItalic.ttf -------------------------------------------------------------------------------- /worg-data/img/icon-nba-tv.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasciiboy/NCURSES-Programming-HOWTO/cfeca3740617e98fb0eb0d4ee184d55a4dc58e77/worg-data/img/icon-nba-tv.jpg --------------------------------------------------------------------------------