[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:
Tobias Boege 2014-02-04 19:42:05 +00:00
parent b598d4d94a
commit f4c1e52c6d

View file

@ -78,6 +78,33 @@ BEGIN_METHOD_VOID(Screen_init)
END_METHOD 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 #if 0
BEGIN_METHOD(Screen_new, GB_STRING termpath) BEGIN_METHOD(Screen_new, GB_STRING termpath)
@ -155,16 +182,6 @@ GB_DESC CCursorDesc[] = {
GB_END_DECLARE 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) BEGIN_PROPERTY(Screen_Cursor)
if (READ_PROPERTY) { if (READ_PROPERTY) {
@ -177,15 +194,6 @@ BEGIN_PROPERTY(Screen_Cursor)
END_PROPERTY END_PROPERTY
static void CSCREEN_echo(CSCREEN *scr, int mode)
{
if (mode)
echo();
else
noecho();
scr->echo = mode;
}
BEGIN_PROPERTY(Screen_Echo) BEGIN_PROPERTY(Screen_Echo)
if (READ_PROPERTY) { if (READ_PROPERTY) {