mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-24 15:55:14 +00:00
Removed the long-obsolete PDC_cursor_on(), PDC_cursor_off() and
PDC_set_cursor_mode(). Use the standard curs_set() instead.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* See the file maintain.er for details of the current maintainer. *
|
||||
************************************************************************/
|
||||
|
||||
/* $Id: curspriv.h,v 1.100 2006/07/23 13:45:52 wmcbrine Exp $ */
|
||||
/* $Id: curspriv.h,v 1.101 2006/07/23 19:10:32 wmcbrine Exp $ */
|
||||
|
||||
/* CURSPRIV.H
|
||||
|
||||
@@ -86,8 +86,6 @@ void PDC_beep(void);
|
||||
bool PDC_check_bios_key(void);
|
||||
int PDC_copy_win(const WINDOW *, WINDOW *, int, int, int,
|
||||
int, int, int, bool);
|
||||
int PDC_cursor_off(void);
|
||||
int PDC_cursor_on(void);
|
||||
int PDC_curs_set(int);
|
||||
void PDC_flushinp(void);
|
||||
int PDC_get_bios_key(void);
|
||||
@@ -112,7 +110,6 @@ int PDC_resize_screen(int, int);
|
||||
int PDC_scr_close(void);
|
||||
int PDC_scr_open(int, char **);
|
||||
int PDC_set_ctrl_break(bool);
|
||||
int PDC_set_cursor_mode(int, int);
|
||||
int PDC_set_font(int);
|
||||
void PDC_sync(WINDOW *);
|
||||
int PDC_sysgetch(void);
|
||||
|
||||
@@ -528,8 +528,6 @@ FUNCTIONS
|
||||
PDC_check_bios_key pdckbd
|
||||
PDC_chins pdcdisp
|
||||
PDC_copy_win pdcwin
|
||||
PDC_cursor_off pdcdisp
|
||||
PDC_cursor_on pdcdisp
|
||||
PDC_debug pdcdebug
|
||||
PDC_flushinp pdckbd
|
||||
PDC_getch getch
|
||||
@@ -554,7 +552,6 @@ FUNCTIONS
|
||||
PDC_scr_close pdcscrn
|
||||
PDC_scr_open pdcscrn
|
||||
PDC_set_ctrl_break pdckbd
|
||||
PDC_set_cursor_mode pdcsetsc
|
||||
PDC_set_font pdcsetsc
|
||||
PDC_set_scrn_mode pdcsetsc
|
||||
PDC_set_title pdcsetsc
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
RCSID("$Id: pdcdisp.c,v 1.37 2006/07/18 23:11:53 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcdisp.c,v 1.38 2006/07/23 19:10:32 wmcbrine Exp $");
|
||||
|
||||
extern unsigned char atrtab[MAX_ATRTAB];
|
||||
|
||||
@@ -37,86 +37,6 @@ void movedata(unsigned sseg, unsigned soff, unsigned dseg,
|
||||
}
|
||||
#endif
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
PDC_cursor_on() - Turns on the hardware cursor.
|
||||
|
||||
PDCurses Description:
|
||||
Turns on the hardware cursor; does nothing if it is already on.
|
||||
|
||||
PDCurses Return Value:
|
||||
Returns OK upon success, ERR upon failure.
|
||||
|
||||
Portability:
|
||||
PDCurses int PDC_cursor_on(void);
|
||||
|
||||
**man-end****************************************************************/
|
||||
|
||||
int PDC_cursor_on(void)
|
||||
{
|
||||
PDC_LOG(("PDC_cursor_on() - called\n"));
|
||||
|
||||
if (!SP->visible_cursor)
|
||||
{
|
||||
SP->visible_cursor = TRUE;
|
||||
/* PDC_fix_cursor(SP->orig_emulation);*/
|
||||
|
||||
if (SP->bogus_adapter)
|
||||
PDC_set_cursor_mode((SP->cursor & 0xff00) >> 8,
|
||||
(SP->cursor & 0x00ff));
|
||||
else
|
||||
{
|
||||
switch (SP->adapter) {
|
||||
case _MDA:
|
||||
case _CGA:
|
||||
case _EGACOLOR:
|
||||
case _EGAMONO:
|
||||
case _VGACOLOR:
|
||||
case _VGAMONO:
|
||||
case _MDS_GENIUS:
|
||||
case _MCGACOLOR:
|
||||
case _MCGAMONO:
|
||||
PDC_set_cursor_mode((SP->cursor & 0xff00) >> 8,
|
||||
(SP->cursor & 0x00ff));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
PDC_cursor_off() - Turns off the hardware cursor.
|
||||
|
||||
PDCurses Description:
|
||||
Turns off the hardware curses, it does nothing if it is already
|
||||
off.
|
||||
|
||||
PDCurses Return Value:
|
||||
Returns OK upon success, ERR upon failure.
|
||||
|
||||
PDCurses Errors:
|
||||
ERR will be returned if the hardware cursor can not be disabled.
|
||||
|
||||
Portability:
|
||||
PDCurses int PDC_cursor_off(void);
|
||||
|
||||
**man-end****************************************************************/
|
||||
|
||||
int PDC_cursor_off(void)
|
||||
{
|
||||
PDC_LOG(("PDC_cursor_off() - called\n"));
|
||||
|
||||
if (SP->visible_cursor)
|
||||
{
|
||||
SP->visible_cursor = FALSE;
|
||||
PDC_set_cursor_mode(32, 33); /* turn it off */
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
PDC_fix_cursor() - Fix the cursor start and stop scan lines
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include "pdcdos.h"
|
||||
|
||||
RCSID("$Id: pdcsetsc.c,v 1.20 2006/07/23 13:45:52 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcsetsc.c,v 1.21 2006/07/23 19:10:32 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -62,35 +62,6 @@ int PDC_set_80x25(void)
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
PDC_set_cursor_mode() - Set the cursor start and stop scan lines.
|
||||
|
||||
PDCurses Description:
|
||||
Sets the cursor type to begin in scan line startrow and end in
|
||||
scan line endrow. Both values should be 0-31.
|
||||
|
||||
PDCurses Return Value:
|
||||
This function returns OK on success and ERR on error.
|
||||
|
||||
Portability:
|
||||
PDCurses int PDC_set_cursor_mode(int startrow, int endrow);
|
||||
|
||||
**man-end****************************************************************/
|
||||
|
||||
int PDC_set_cursor_mode(int startrow, int endrow)
|
||||
{
|
||||
PDC_LOG(("PDC_set_cursor_mode() - called: startrow %d endrow %d\n",
|
||||
startrow, endrow));
|
||||
|
||||
regs.h.ah = 0x01;
|
||||
regs.h.ch = (unsigned char) startrow;
|
||||
regs.h.cl = (unsigned char) endrow;
|
||||
int86(0x10, ®s, ®s);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
PDC_set_font() - sets the current font size
|
||||
@@ -179,10 +150,7 @@ int PDC_set_font(int size)
|
||||
}
|
||||
}
|
||||
|
||||
if (SP->visible_cursor)
|
||||
PDC_cursor_on();
|
||||
else
|
||||
PDC_cursor_off();
|
||||
curs_set(SP->visibility);
|
||||
|
||||
SP->font = PDC_get_font();
|
||||
|
||||
|
||||
@@ -19,70 +19,10 @@
|
||||
#include <curses.h>
|
||||
#include <string.h>
|
||||
|
||||
RCSID("$Id: pdcdisp.c,v 1.28 2006/07/17 21:45:15 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcdisp.c,v 1.29 2006/07/23 19:10:32 wmcbrine Exp $");
|
||||
|
||||
extern unsigned char atrtab[MAX_ATRTAB];
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
PDC_cursor_on() - Turns on the hardware cursor.
|
||||
|
||||
PDCurses Description:
|
||||
Turns on the hardware cursor; does nothing if it is already on.
|
||||
|
||||
PDCurses Return Value:
|
||||
Returns OK upon success, ERR upon failure.
|
||||
|
||||
Portability:
|
||||
PDCurses int PDC_cursor_on(void);
|
||||
|
||||
**man-end****************************************************************/
|
||||
|
||||
int PDC_cursor_on(void)
|
||||
{
|
||||
PDC_LOG(("PDC_cursor_on() - called\n"));
|
||||
|
||||
if (!SP->visible_cursor)
|
||||
{
|
||||
SP->visible_cursor = TRUE;
|
||||
PDC_set_cursor_mode((SP->cursor & 0xff00) >> 8,
|
||||
(SP->cursor & 0x00ff));
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
PDC_cursor_off() - Turns off the hardware cursor.
|
||||
|
||||
PDCurses Description:
|
||||
Turns off the hardware cursor; does nothing if it is already off.
|
||||
|
||||
PDCurses Return Value:
|
||||
Returns OK upon success, ERR upon failure.
|
||||
|
||||
PDCurses Errors:
|
||||
ERR will be returned if the hardware cursor can not be disabled.
|
||||
|
||||
Portability:
|
||||
PDCurses int PDC_cursor_off(void);
|
||||
|
||||
**man-end****************************************************************/
|
||||
|
||||
int PDC_cursor_off(void)
|
||||
{
|
||||
PDC_LOG(("PDC_cursor_off() - called\n"));
|
||||
|
||||
if (SP->visible_cursor)
|
||||
{
|
||||
SP->visible_cursor = FALSE;
|
||||
PDC_set_cursor_mode(32, 33); /* turn it off */
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
PDC_gotoyx() - position hardware cursor at (y, x)
|
||||
|
||||
@@ -19,48 +19,7 @@
|
||||
#include <curses.h>
|
||||
#include <string.h>
|
||||
|
||||
RCSID("$Id: pdcsetsc.c,v 1.22 2006/07/23 13:45:52 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
PDC_set_cursor_mode() - Set the cursor start and stop scan lines.
|
||||
|
||||
PDCurses Description:
|
||||
Sets the cursor type to begin in scan line startrow and end in
|
||||
scan line endrow. Both values should be 0-31.
|
||||
|
||||
PDCurses Return Value:
|
||||
This function returns OK on success and ERR on error.
|
||||
|
||||
Portability:
|
||||
PDCurses int PDC_set_cursor_mode(int startrow, int endrow);
|
||||
|
||||
**man-end****************************************************************/
|
||||
|
||||
int PDC_set_cursor_mode(int startrow, int endrow)
|
||||
{
|
||||
#ifndef EMXVIDEO
|
||||
VIOCURSORINFO cursorInfo = {0};
|
||||
#endif
|
||||
PDC_LOG(("PDC_set_cursor_mode() - called: startrow %d endrow %d\n",
|
||||
startrow, endrow));
|
||||
|
||||
#ifdef EMXVIDEO
|
||||
if (endrow <= startrow)
|
||||
v_hidecursor();
|
||||
else
|
||||
v_ctype(startrow, endrow);
|
||||
|
||||
return OK;
|
||||
#else
|
||||
cursorInfo.yStart = startrow;
|
||||
cursorInfo.cEnd = endrow;
|
||||
cursorInfo.cx = 1;
|
||||
cursorInfo.attr = 0;
|
||||
|
||||
return (VioSetCurType(&cursorInfo, 0) == 0);
|
||||
#endif
|
||||
}
|
||||
RCSID("$Id: pdcsetsc.c,v 1.23 2006/07/23 19:10:32 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -106,10 +65,7 @@ int PDC_set_font(int size)
|
||||
VioSetMode(&modeInfo, 0);
|
||||
}
|
||||
|
||||
if (SP->visible_cursor)
|
||||
PDC_cursor_on();
|
||||
else
|
||||
PDC_cursor_off();
|
||||
curs_set(SP->visibility);
|
||||
|
||||
SP->font = PDC_get_font();
|
||||
#endif
|
||||
|
||||
@@ -272,8 +272,6 @@ EXPORTS PDC_chadd
|
||||
EXPORTS PDC_check_bios_key
|
||||
EXPORTS PDC_chins
|
||||
EXPORTS PDC_copy_win
|
||||
EXPORTS PDC_cursor_off
|
||||
EXPORTS PDC_cursor_on
|
||||
EXPORTS PDC_debug
|
||||
EXPORTS PDC_getch
|
||||
EXPORTS PDC_getclipboard
|
||||
|
||||
@@ -265,8 +265,6 @@ PDC_chadd
|
||||
PDC_check_bios_key
|
||||
PDC_chins
|
||||
PDC_copy_win
|
||||
PDC_cursor_off
|
||||
PDC_cursor_on
|
||||
PDC_debug
|
||||
PDC_getch
|
||||
PDC_getclipboard
|
||||
|
||||
@@ -24,74 +24,7 @@
|
||||
extern HANDLE hConOut;
|
||||
extern unsigned char atrtab[MAX_ATRTAB];
|
||||
|
||||
RCSID("$Id: pdcdisp.c,v 1.27 2006/07/17 21:45:16 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
PDC_cursor_on() - Turns on the hardware cursor.
|
||||
|
||||
PDCurses Description:
|
||||
Turns on the hardware cursor; does nothing if it is already on.
|
||||
|
||||
PDCurses Return Value:
|
||||
Returns OK upon success, ERR upon failure.
|
||||
|
||||
Portability:
|
||||
PDCurses int PDC_cursor_on(void);
|
||||
|
||||
**man-end****************************************************************/
|
||||
|
||||
int PDC_cursor_on(void)
|
||||
{
|
||||
CONSOLE_CURSOR_INFO cci;
|
||||
|
||||
PDC_LOG(("PDC_cursor_on() - called\n"));
|
||||
|
||||
if (!SP->visible_cursor)
|
||||
{
|
||||
SP->visible_cursor = TRUE;
|
||||
GetConsoleCursorInfo(hConOut, &cci);
|
||||
cci.bVisible = TRUE;
|
||||
SetConsoleCursorInfo(hConOut, &cci);
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
PDC_cursor_off() - Turns off the hardware cursor.
|
||||
|
||||
PDCurses Description:
|
||||
Turns off the hardware cursor; does nothing if it is already off.
|
||||
|
||||
PDCurses Return Value:
|
||||
Returns OK upon success, ERR upon failure.
|
||||
|
||||
PDCurses Errors:
|
||||
ERR will be returned if the hardware cursor can not be disabled.
|
||||
|
||||
Portability:
|
||||
PDCurses int PDC_cursor_off(void);
|
||||
|
||||
**man-end****************************************************************/
|
||||
|
||||
int PDC_cursor_off(void)
|
||||
{
|
||||
CONSOLE_CURSOR_INFO cci;
|
||||
|
||||
PDC_LOG(("PDC_cursor_off() - called\n"));
|
||||
|
||||
if (SP->visible_cursor)
|
||||
{
|
||||
SP->visible_cursor = FALSE;
|
||||
GetConsoleCursorInfo(hConOut, &cci);
|
||||
cci.bVisible = FALSE;
|
||||
SetConsoleCursorInfo(hConOut, &cci);
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
RCSID("$Id: pdcdisp.c,v 1.28 2006/07/23 19:10:32 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
RCSID("$Id: pdcdisp.c,v 1.29 2006/07/21 04:07:05 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcdisp.c,v 1.30 2006/07/23 19:10:32 wmcbrine Exp $");
|
||||
|
||||
int PDC_display_cursor(int oldrow, int oldcol, int newrow, int newcol,
|
||||
int visibility)
|
||||
@@ -62,53 +62,6 @@ int PDC_display_cursor(int oldrow, int oldcol, int newrow, int newcol,
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
PDC_cursor_on() - Turns on the hardware cursor.
|
||||
|
||||
PDCurses Description:
|
||||
Turns on the hardware curses, it does nothing if it is already on.
|
||||
|
||||
PDCurses Return Value:
|
||||
Returns OK upon success, ERR upon failure.
|
||||
|
||||
Portability:
|
||||
PDCurses int PDC_cursor_on(void);
|
||||
|
||||
**man-end****************************************************************/
|
||||
|
||||
int PDC_cursor_on(void)
|
||||
{
|
||||
PDC_LOG(("PDC_cursor_on() - called\n"));
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
PDC_cursor_off() - Turns off the hardware cursor.
|
||||
|
||||
PDCurses Description:
|
||||
Turns off the hardware curses, it does nothing if it is already off.
|
||||
|
||||
PDCurses Return Value:
|
||||
Returns OK upon success, ERR upon failure.
|
||||
|
||||
PDCurses Errors:
|
||||
ERR will be returned if the hardware cursor can not be disabled.
|
||||
|
||||
Portability:
|
||||
PDCurses int PDC_cursor_off(void);
|
||||
|
||||
**man-end****************************************************************/
|
||||
|
||||
int PDC_cursor_off(void)
|
||||
{
|
||||
PDC_LOG(("PDC_cursor_off() - called\n"));
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
PDC_gotoyx() - position hardware cursor at (y, x)
|
||||
|
||||
Reference in New Issue
Block a user