[GB.NCURSES]
* BUG: Initialise the Screen singleton's properties. git-svn-id: svn://localhost/gambas/trunk@6132 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
b598d4d94a
commit
f4c1e52c6d
1 changed files with 27 additions and 19 deletions
|
@ -78,6 +78,33 @@ BEGIN_METHOD_VOID(Screen_init)
|
|||
|
||||
END_METHOD
|
||||
|
||||
static int CSCREEN_cursor(CSCREEN *scr, int mode)
|
||||
{
|
||||
if (mode >= 0 && mode <= 2)
|
||||
curs_set(mode);
|
||||
else
|
||||
return -1;
|
||||
scr->cursor = mode;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void CSCREEN_echo(CSCREEN *scr, int mode)
|
||||
{
|
||||
if (mode)
|
||||
echo();
|
||||
else
|
||||
noecho();
|
||||
scr->echo = mode;
|
||||
}
|
||||
|
||||
BEGIN_METHOD_VOID(Screen_new)
|
||||
|
||||
CSCREEN_cursor(THIS, 1);
|
||||
CSCREEN_echo(THIS, 1);
|
||||
INPUT_mode(THIS, INPUT_CBREAK);
|
||||
|
||||
END_METHOD
|
||||
|
||||
#if 0
|
||||
BEGIN_METHOD(Screen_new, GB_STRING termpath)
|
||||
|
||||
|
@ -155,16 +182,6 @@ GB_DESC CCursorDesc[] = {
|
|||
GB_END_DECLARE
|
||||
};
|
||||
|
||||
static int CSCREEN_cursor(CSCREEN *scr, int mode)
|
||||
{
|
||||
if (mode >= 0 && mode <= 2)
|
||||
curs_set(mode);
|
||||
else
|
||||
return -1;
|
||||
scr->cursor = mode;
|
||||
return 0;
|
||||
}
|
||||
|
||||
BEGIN_PROPERTY(Screen_Cursor)
|
||||
|
||||
if (READ_PROPERTY) {
|
||||
|
@ -177,15 +194,6 @@ BEGIN_PROPERTY(Screen_Cursor)
|
|||
|
||||
END_PROPERTY
|
||||
|
||||
static void CSCREEN_echo(CSCREEN *scr, int mode)
|
||||
{
|
||||
if (mode)
|
||||
echo();
|
||||
else
|
||||
noecho();
|
||||
scr->echo = mode;
|
||||
}
|
||||
|
||||
BEGIN_PROPERTY(Screen_Echo)
|
||||
|
||||
if (READ_PROPERTY) {
|
||||
|
|
Loading…
Reference in a new issue