Module: FFI::NCurses::WinStruct

Included in:
FFI::NCurses
Defined in:
lib/ffi-ncurses/winstruct.rb

Defined Under Namespace

Classes: PDat, WinSt

Constant Summary collapse

NCURSES_SIZE_T =
:short
NCURSES_ATTR_T =
:int
NCURSES_COLOR_T =
:short
NCURSES_CH_T =
:short
CHTYPE =
:ulong
CCHARW_MAX =
5
BOOLEAN =

sizeof(bool) == 1

:uchar
WCHAR_T =
:ushort

Instance Method Summary collapse

Instance Method Details

#is_cleared(win) ⇒ Object

extensions - not in X/Open



78
79
80
# File 'lib/ffi-ncurses/winstruct.rb', line 78

def is_cleared(win)
  _win(win, :_clear)
end

#is_idcok(win) ⇒ Object



81
82
83
# File 'lib/ffi-ncurses/winstruct.rb', line 81

def is_idcok(win)
  _win(win, :_idcok)
end

#is_idlok(win) ⇒ Object



84
85
86
# File 'lib/ffi-ncurses/winstruct.rb', line 84

def is_idlok(win)
  _win(:win, :_idlok)
end

#is_immedok(win) ⇒ Object



87
88
89
# File 'lib/ffi-ncurses/winstruct.rb', line 87

def is_immedok(win)
  _win(win, :_immed)
end

#is_keypad(win) ⇒ Object



90
91
92
# File 'lib/ffi-ncurses/winstruct.rb', line 90

def is_keypad(win)
  _win(win, :_use_keypad)
end

#is_leaveok(win) ⇒ Object



93
94
95
# File 'lib/ffi-ncurses/winstruct.rb', line 93

def is_leaveok(win)
  _win(win, :_leaveok) || ERR
end

#is_nodelay(win) ⇒ Object



96
97
98
# File 'lib/ffi-ncurses/winstruct.rb', line 96

def is_nodelay(win)
  _win(win, :_delay) == 0 ? FFI::NCurses::TRUE : FFI::NCurses::FALSE
end

#is_notimeout(win) ⇒ Object



99
100
101
# File 'lib/ffi-ncurses/winstruct.rb', line 99

def is_notimeout(win)
  _win(win, :_notimeout)
end

#is_scrollok(win) ⇒ Object



102
103
104
# File 'lib/ffi-ncurses/winstruct.rb', line 102

def is_scrollok(win)
  _win(win, :_scroll)
end

#is_syncok(win) ⇒ Object



105
106
107
# File 'lib/ffi-ncurses/winstruct.rb', line 105

def is_syncok(win)
  _win(win, :_sync)
end

#wgetparent(win) ⇒ Object



108
109
110
# File 'lib/ffi-ncurses/winstruct.rb', line 108

def wgetparent(win)
  _win(win, :_parent)
end

#wgetscrreg(win, t, b) ⇒ Object



111
112
113
114
115
116
117
118
119
120
121
122
# File 'lib/ffi-ncurses/winstruct.rb', line 111

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