Module: FFI::NCurses::WinStruct
- Included in:
- FFI::NCurses, Darwin
- Defined in:
- lib/ffi-ncurses/winstruct.rb
Defined Under Namespace
Constant Summary collapse
- NCURSES_SIZE_T =
:short
- NCURSES_ATTR_T =
:int
- NCURSES_COLOR_T =
:short
- NCURSES_CH_T =
:short
- BOOLEAN =
sizeof(bool) == 1
:uchar
- WCHAR_T =
:ushort
- CHTYPE =
:ulong
- CCHARW_MAX =
5
Instance Method Summary collapse
-
#is_cleared(win) ⇒ Object
consider all data in the window invalid?.
-
#is_idcok(win) ⇒ Object
OK to use insert/delete char?.
-
#is_idlok(win) ⇒ Object
OK to use insert/delete line?.
-
#is_immedok(win) ⇒ Object
window in immed mode? (not yet used).
-
#is_keypad(win) ⇒ Object
process function keys into KEY_ symbols?.
-
#is_leaveok(win) ⇒ Object
OK to not reset cursor on exit?.
-
#is_nodelay(win) ⇒ Object
0 = nodelay, <0 = blocking, >0 = delay.
-
#is_notimeout(win) ⇒ Object
no time out on function-key entry?.
-
#is_scrollok(win) ⇒ Object
OK to scroll this window?.
-
#is_syncok(win) ⇒ Object
window in sync mode?.
- #wgetparent(win) ⇒ Object
- #wgetscrreg(win, t, b) ⇒ Object
Instance Method Details
#is_cleared(win) ⇒ Object
consider all data in the window invalid?
78 79 80 |
# File 'lib/ffi-ncurses/winstruct.rb', line 78 def is_cleared(win) _win(win, :_clear) != 0 end |
#is_idcok(win) ⇒ Object
OK to use insert/delete char?
83 84 85 |
# File 'lib/ffi-ncurses/winstruct.rb', line 83 def is_idcok(win) _win(win, :_idcok) != 0 end |
#is_idlok(win) ⇒ Object
OK to use insert/delete line?
88 89 90 |
# File 'lib/ffi-ncurses/winstruct.rb', line 88 def is_idlok(win) _win(:win, :_idlok) != 0 end |
#is_immedok(win) ⇒ Object
window in immed mode? (not yet used)
93 94 95 |
# File 'lib/ffi-ncurses/winstruct.rb', line 93 def is_immedok(win) _win(win, :_immed) != 0 end |
#is_keypad(win) ⇒ Object
process function keys into KEY_ symbols?
98 99 100 |
# File 'lib/ffi-ncurses/winstruct.rb', line 98 def is_keypad(win) _win(win, :_use_keypad) != 0 end |
#is_leaveok(win) ⇒ Object
OK to not reset cursor on exit?
103 104 105 106 107 |
# File 'lib/ffi-ncurses/winstruct.rb', line 103 def is_leaveok(win) # I've changed this to return true or false - ncurses returns ERR if not true # (_win(win, :_leaveok) != 0) || ERR # why ERR - why not false? _win(win, :_leaveok) != 0 end |
#is_nodelay(win) ⇒ Object
0 = nodelay, <0 = blocking, >0 = delay
110 111 112 |
# File 'lib/ffi-ncurses/winstruct.rb', line 110 def is_nodelay(win) _win(win, :_delay) == 0 end |
#is_notimeout(win) ⇒ Object
no time out on function-key entry?
115 116 117 |
# File 'lib/ffi-ncurses/winstruct.rb', line 115 def is_notimeout(win) _win(win, :_notimeout) != 0 end |
#is_scrollok(win) ⇒ Object
OK to scroll this window?
120 121 122 |
# File 'lib/ffi-ncurses/winstruct.rb', line 120 def is_scrollok(win) _win(win, :_scroll) != 0 end |
#is_syncok(win) ⇒ Object
window in sync mode?
125 126 127 |
# File 'lib/ffi-ncurses/winstruct.rb', line 125 def is_syncok(win) _win(win, :_sync) != 0 end |
#wgetparent(win) ⇒ Object
129 130 131 |
# File 'lib/ffi-ncurses/winstruct.rb', line 129 def wgetparent(win) _win(win, :_parent) end |
#wgetscrreg(win, t, b) ⇒ Object
133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/ffi-ncurses/winstruct.rb', line 133 def wgetscrreg(win, t, b) # ((win) ? (*(t) = (win)->_regtop, *(b) = (win)->_regbottom, OK) : ERR) # not entirely satisfactory - no error return # should I raise an exception? if win win_st = WinSt.new(win) [win_st[:_regtop], win_st[:_regbottom]] else #raise ArgumentError, "win is nil" nil end end |