Module: FFI::NCurses::Attributes

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

Constant Summary collapse

NCURSES_ATTR_SHIFT =

The following definitions have been copied (almost verbatim) from ‘ncurses.h`.

8
WA_NORMAL =
A_NORMAL     = (1 - 1)
WA_ATTRIBUTES =
A_ATTRIBUTES = NCURSES_BITS(~(1 - 1),0)
WA_CHARTEXT =
A_CHARTEXT   = (NCURSES_BITS(1,0) - 1)
WA_COLOR =
A_COLOR      = NCURSES_BITS(((1) << 8) - 1,0)
WA_STANDOUT =

best highlighting mode available

A_STANDOUT   = NCURSES_BITS(1,8)
WA_UNDERLINE =

underlined text

A_UNDERLINE  = NCURSES_BITS(1,9)
WA_REVERSE =

reverse video

A_REVERSE    = NCURSES_BITS(1,10)
A_BLINK      = NCURSES_BITS(1,11)
WA_DIM =

half-bright text

A_DIM        = NCURSES_BITS(1,12)
WA_BOLD =

extra bright or bold text

A_BOLD       = NCURSES_BITS(1,13)
WA_ALTCHARSET =
A_ALTCHARSET = NCURSES_BITS(1,14)
WA_INVIS =
A_INVIS      = NCURSES_BITS(1,15)
WA_PROTECT =
A_PROTECT    = NCURSES_BITS(1,16)
WA_HORIZONTAL =
A_HORIZONTAL = NCURSES_BITS(1,17)
WA_LEFT =
A_LEFT       = NCURSES_BITS(1,18)
WA_LOW =
A_LOW        = NCURSES_BITS(1,19)
WA_RIGHT =
A_RIGHT      = NCURSES_BITS(1,20)
WA_TOP =
A_TOP        = NCURSES_BITS(1,21)
WA_VERTICAL =
A_VERTICAL   = NCURSES_BITS(1,22)

Class Method Summary collapse

Class Method Details

.NCURSES_BITS(mask, shift) ⇒ Object



167
168
169
# File 'lib/ffi-ncurses.rb', line 167

def self.NCURSES_BITS(mask, shift)
  ((mask) << ((shift) + NCURSES_ATTR_SHIFT))
end