update structs in curses
parent
5e15da2b42
commit
433c065729
|
@ -3,7 +3,7 @@
|
||||||
USING: accessors alien.c-types alien.strings assocs byte-arrays
|
USING: accessors alien.c-types alien.strings assocs byte-arrays
|
||||||
combinators continuations destructors fry io.encodings.8-bit
|
combinators continuations destructors fry io.encodings.8-bit
|
||||||
io io.encodings.string io.encodings.utf8 kernel math
|
io io.encodings.string io.encodings.utf8 kernel math
|
||||||
namespaces prettyprint sequences
|
namespaces prettyprint sequences classes.struct
|
||||||
strings threads curses.ffi ;
|
strings threads curses.ffi ;
|
||||||
IN: curses
|
IN: curses
|
||||||
|
|
||||||
|
@ -133,12 +133,12 @@ PRIVATE>
|
||||||
|
|
||||||
: move-cursor ( window-name y x -- )
|
: move-cursor ( window-name y x -- )
|
||||||
[
|
[
|
||||||
window-ptr
|
window-ptr c-window memory>struct
|
||||||
{
|
{
|
||||||
[ ]
|
[ ]
|
||||||
[ (curses-window-refresh) ]
|
[ (curses-window-refresh) ]
|
||||||
[ c-window-_curx ]
|
[ _curx>> ]
|
||||||
[ c-window-_cury ]
|
[ _cury>> ]
|
||||||
} cleave
|
} cleave
|
||||||
] 2dip mvcur curses-error (curses-window-refresh) ;
|
] 2dip mvcur curses-error (curses-window-refresh) ;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2008 Doug Coleman.
|
! Copyright (C) 2008 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors alien alien.syntax combinators kernel system
|
USING: accessors alien alien.syntax combinators kernel system
|
||||||
alien.libraries ;
|
alien.libraries classes.struct ;
|
||||||
IN: curses.ffi
|
IN: curses.ffi
|
||||||
|
|
||||||
<< "curses" {
|
<< "curses" {
|
||||||
|
@ -21,56 +21,56 @@ TYPEDEF: ushort wchar_t
|
||||||
|
|
||||||
CONSTANT: CCHARW_MAX 5
|
CONSTANT: CCHARW_MAX 5
|
||||||
|
|
||||||
C-STRUCT: cchar_t
|
STRUCT: cchar_t
|
||||||
{ "attr_t" "attr" }
|
{ attr attr_t }
|
||||||
{ { "wchar_t" CCHARW_MAX } "chars" } ;
|
{ chars { wchar_t CCHARW_MAX } } ;
|
||||||
|
|
||||||
C-STRUCT: pdat
|
STRUCT: pdat
|
||||||
{ "NCURSES_SIZE_T" "_pad_y" }
|
{ _pad_y NCURSES_SIZE_T }
|
||||||
{ "NCURSES_SIZE_T" "_pad_x" }
|
{ _pad_x NCURSES_SIZE_T }
|
||||||
{ "NCURSES_SIZE_T" "_pad_top" }
|
{ _pad_top NCURSES_SIZE_T }
|
||||||
{ "NCURSES_SIZE_T" "_pad_left" }
|
{ _pad_left NCURSES_SIZE_T }
|
||||||
{ "NCURSES_SIZE_T" "_pad_bottom" }
|
{ _pad_bottom NCURSES_SIZE_T }
|
||||||
{ "NCURSES_SIZE_T" "_pad_right" } ;
|
{ _pad_right NCURSES_SIZE_T } ;
|
||||||
|
|
||||||
C-STRUCT: c-window
|
STRUCT: c-window
|
||||||
{ "NCURSES_SIZE_T" "_cury" }
|
{ _cury NCURSES_SIZE_T }
|
||||||
{ "NCURSES_SIZE_T" "_curx" }
|
{ _curx NCURSES_SIZE_T }
|
||||||
|
|
||||||
{ "NCURSES_SIZE_T" "_maxy" }
|
{ _maxy NCURSES_SIZE_T }
|
||||||
{ "NCURSES_SIZE_T" "_maxx" }
|
{ _maxx NCURSES_SIZE_T }
|
||||||
{ "NCURSES_SIZE_T" "_begy" }
|
{ _begy NCURSES_SIZE_T }
|
||||||
{ "NCURSES_SIZE_T" "_begx" }
|
{ _begx NCURSES_SIZE_T }
|
||||||
|
|
||||||
{ "short" " _flags" }
|
{ _flags short }
|
||||||
|
|
||||||
{ "attr_t" "_attrs" }
|
{ _attrs attr_t }
|
||||||
{ "chtype" "_bkgd" }
|
{ _bkgd chtype }
|
||||||
|
|
||||||
{ "bool" "_notimeout" }
|
{ _notimeout bool }
|
||||||
{ "bool" "_clear" }
|
{ _clear bool }
|
||||||
{ "bool" "_leaveok" }
|
{ _leaveok bool }
|
||||||
{ "bool" "_scroll" }
|
{ _scroll bool }
|
||||||
{ "bool" "_idlok" }
|
{ _idlok bool }
|
||||||
{ "bool" "_idcok" }
|
{ _idcok bool }
|
||||||
{ "bool" "_immed" }
|
{ _immed bool }
|
||||||
{ "bool" "_sync" }
|
{ _sync bool }
|
||||||
{ "bool" "_use_keypad" }
|
{ _use_keypad bool }
|
||||||
{ "int" "_delay" }
|
{ _delay int }
|
||||||
|
|
||||||
{ "char*" "_line" }
|
{ _line char* }
|
||||||
{ "NCURSES_SIZE_T" "_regtop" }
|
{ _regtop NCURSES_SIZE_T }
|
||||||
{ "NCURSES_SIZE_T" "_regbottom" }
|
{ _regbottom NCURSES_SIZE_T }
|
||||||
|
|
||||||
{ "int" "_parx" }
|
{ _parx int }
|
||||||
{ "int" "_pary" }
|
{ _pary int }
|
||||||
{ "WINDOW*" "_parent" }
|
{ _parent WINDOW* }
|
||||||
|
|
||||||
{ "pdat" "_pad" }
|
{ _pad pdat }
|
||||||
|
|
||||||
{ "NCURSES_SIZE_T" "_yoffset" }
|
{ _yoffset NCURSES_SIZE_T }
|
||||||
|
|
||||||
{ "cchar_t" "_bkgrnd" } ;
|
{ _bkgrnd cchar_t } ;
|
||||||
|
|
||||||
LIBRARY: curses
|
LIBRARY: curses
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue