#include <curses.h>
#include "mucurses.h"
#include "cursor.h"
Go to the source code of this file.
Functions | |
| FILE_LICENCE (GPL2_OR_LATER) | |
| int | wclrtobot (WINDOW *win) |
| Clear a window to the bottom from current cursor position. | |
| int | wclrtoeol (WINDOW *win) |
| Clear a window to the end of the current line. | |
| int | wdelch (WINDOW *win) |
| Delete character under the cursor in a window. | |
| int | wdeleteln (WINDOW *win) |
| Delete line under a window's cursor. | |
| int | werase (WINDOW *win) |
| Completely clear a window. | |
Definition in file clear.c.
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
| int wclrtobot | ( | WINDOW * | win | ) |
Clear a window to the bottom from current cursor position.
| *win | subject window |
| rc | return status code |
Definition at line 19 of file clear.c.
References _restore_curs_pos(), _store_curs_pos(), _wputc(), _curses_window::curs_x, _curses_window::curs_y, OK, and WRAP.
Referenced by clrtobot(), and werase().
00019 { 00020 struct cursor_pos pos; 00021 00022 _store_curs_pos( win, &pos ); 00023 do { 00024 _wputc( win, ' ', WRAP ); 00025 } while ( win->curs_y + win->curs_x ); 00026 _restore_curs_pos( win, &pos ); 00027 00028 return OK; 00029 }
| int wclrtoeol | ( | WINDOW * | win | ) |
Clear a window to the end of the current line.
| *win | subject window |
| rc | return status code |
Definition at line 37 of file clear.c.
References _restore_curs_pos(), _store_curs_pos(), _wputc(), _curses_window::curs_y, OK, WRAP, and cursor_pos::y.
Referenced by clrtoeol(), slk_clear(), and wdeleteln().
00037 { 00038 struct cursor_pos pos; 00039 00040 _store_curs_pos( win, &pos ); 00041 while ( ( win->curs_y - pos.y ) == 0 ) { 00042 _wputc( win, ' ', WRAP ); 00043 } 00044 _restore_curs_pos( win, &pos ); 00045 00046 return OK; 00047 }
| int wdelch | ( | WINDOW * | win | ) |
Delete character under the cursor in a window.
| *win | subject window |
| rc | return status code |
Definition at line 55 of file clear.c.
References _wcursback(), _wputc(), NOWRAP, and OK.
Referenced by delch(), mvdelch(), mvwdelch(), wgetch(), and wgetnstr().
00055 { 00056 _wputc( win, ' ', NOWRAP ); 00057 _wcursback( win ); 00058 00059 return OK; 00060 }
| int wdeleteln | ( | WINDOW * | win | ) |
Delete line under a window's cursor.
| *win | subject window |
| rc | return status code |
Definition at line 68 of file clear.c.
References _restore_curs_pos(), _store_curs_pos(), _curses_window::curs_y, OK, wclrtoeol(), and wmove().
Referenced by deleteln().
00068 { 00069 struct cursor_pos pos; 00070 00071 _store_curs_pos( win, &pos ); 00072 /* let's just set the cursor to the beginning of the line and 00073 let wclrtoeol do the work :) */ 00074 wmove( win, win->curs_y, 0 ); 00075 wclrtoeol( win ); 00076 _restore_curs_pos( win, &pos ); 00077 return OK; 00078 }
| int werase | ( | WINDOW * | win | ) |
1.5.7.1