Module: FFI::NCurses::Darwin

Includes:
WinStruct
Included in:
FFI::NCurses
Defined in:
lib/ffi-ncurses/darwin.rb

Constant Summary

Constants included from WinStruct

WinStruct::BOOLEAN, WinStruct::CCHARW_MAX, WinStruct::CHTYPE, WinStruct::NCURSES_ATTR_T, WinStruct::NCURSES_CH_T, WinStruct::NCURSES_COLOR_T, WinStruct::NCURSES_SIZE_T, WinStruct::WCHAR_T

Instance Method Summary collapse

Methods included from WinStruct

#is_cleared, #is_idcok, #is_idlok, #is_immedok, #is_keypad, #is_leaveok, #is_nodelay, #is_notimeout, #is_scrollok, #is_syncok, #wgetparent, #wgetscrreg

Instance Method Details

#getattrs(win) ⇒ Object

translated from Mac OSX 10.4 (‘Tiger’) /usr/include/ncurses.h



7
8
9
10
# File 'lib/ffi-ncurses/darwin.rb', line 7

def getattrs(win)
  win_st = WinSt.new(win)
  win ? win_st[:_attrs] : A_NORMAL
end

#getbegx(win) ⇒ Object



19
20
21
22
# File 'lib/ffi-ncurses/darwin.rb', line 19

def getbegx(win)
  win_st = WinSt.new(win)
  win ? win_st[:_begx] : ERR
end

#getbegy(win) ⇒ Object



23
24
25
26
# File 'lib/ffi-ncurses/darwin.rb', line 23

def getbegy(win)
  win_st = WinSt.new(win)
  win ? win_st[:_begy] : ERR
end

#getcurx(win) ⇒ Object



11
12
13
14
# File 'lib/ffi-ncurses/darwin.rb', line 11

def getcurx(win)
  win_st = WinSt.new(win)
  win ? win_st[:_curx] : ERR
end

#getcury(win) ⇒ Object



15
16
17
18
# File 'lib/ffi-ncurses/darwin.rb', line 15

def getcury(win)
  win_st = WinSt.new(win)
  win ? win_st[:_cury] : ERR
end

#getmaxx(win) ⇒ Object



27
28
29
30
# File 'lib/ffi-ncurses/darwin.rb', line 27

def getmaxx(win)
  win_st = WinSt.new(win)
  win ? win_st[:_maxx] + 1 : ERR
end

#getmaxy(win) ⇒ Object



31
32
33
34
# File 'lib/ffi-ncurses/darwin.rb', line 31

def getmaxy(win)
  win_st = WinSt.new(win)
  win ? win_st[:_maxy] + 1 : ERR
end

#getparx(win) ⇒ Object



35
36
37
38
# File 'lib/ffi-ncurses/darwin.rb', line 35

def getparx(win)
  win_st = WinSt.new(win)
  win ? win_st[:_parx] : ERR
end

#getpary(win) ⇒ Object



39
40
41
42
# File 'lib/ffi-ncurses/darwin.rb', line 39

def getpary(win)
  win_st = WinSt.new(win)
  win ? win_st[:_pary] : ERR
end