Revision history for ExtLibcurses


Revision [17466]

Last edited on 2015-03-27 10:36:45 by DkLwikki [Update for new bindings in Git]
Additions:
Header versions: pdcurses 3.4, ncurses 5.9
Deletions:
Header versions: pdcurses 3.4, ncurses from 2005


Revision [16750]

Edited on 2013-05-01 12:05:59 by DkLwikki [Update examples path]
Additions:
Examples: yes, in examples/console/curses/


Revision [16113]

Edited on 2012-02-07 11:04:10 by DkLwikki [Shorten example, correct version typo]
Additions:
Header versions: pdcurses 3.4, ncurses from 2005
start_color()
'' The default pair 0 will have the console's default colors
'' Set pair 1 to be white/blue
init_pair(1, COLOR_WHITE, COLOR_BLUE)
'' Select pair 1, so from now on output will be white text on blue background
attrset(COLOR_PAIR(1))
printw(!"Hello, world!\n")
'' Reset to pair 0
attrset(COLOR_PAIR(0))
'' Sleep
printw(!"Waiting for keypress...\n")
getch()
Deletions:
Header versions: pdcurses 3.4, curses from 2005
if (has_colors( )) then
dim as short f, b
start_color()
pair_content( 0, @f, @b )
printw(!"pair 0 contains (%d,%d)\n", f, b)
getch()
printw(!"Initializing pair 1 to red/black\n")
init_pair(1, COLOR_RED, COLOR_BLACK)
attrset(COLOR_PAIR(1))
printw(!"RED/BLACK\n")
getch()
printw(!"Initializing pair 2 to white/blue\n")
init_pair(2, COLOR_WHITE, COLOR_BLUE)
attrset(COLOR_PAIR(2))
printw(!"WHITE/BLUE\n")
getch()
printw(!"Resetting colors to pair 0\n")
attrset(COLOR_PAIR(0))
printw(!"Default Colors\n")
getch()
printw(!"Resetting colors to pair 1\n")
attrset(COLOR_PAIR(1))
printw(!"RED/BLACK\n")
getch()
else
printw("This demo requires a color terminal")
getch()
end if


Revision [15932]

Edited on 2012-02-02 10:41:46 by DkLwikki [Add version]
Additions:
Header versions: pdcurses 3.4, curses from 2005


Revision [15773]

Edited on 2012-01-23 04:09:25 by SirMud [Add version]
Additions:
Platforms supported: DOS, ""Win32"", Linux
Deletions:
Platforms supported: ""Win32"", Linux


Revision [15401]

Edited on 2011-10-11 11:11:16 by CountingPine [Remove CamelCase link]
Additions:
Platforms supported: ""Win32"", Linux
Note: On ""Win32"" systems pdcurses is used, on Linux it uses the standard ncurses library.
Deletions:
Platforms supported: Win32, Linux
Note: On Win32 systems pdcurses is used, on Linux it uses the standard ncurses library.


Revision [15365]

Edited on 2011-10-05 08:47:12 by DkLwikki [Add example]
Additions:
{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/libraries/curses.bas"}}%%(freebasic)
#include once "curses.bi"
initscr()
cbreak()
noecho()
if (has_colors( )) then
dim as short f, b
start_color()
pair_content( 0, @f, @b )
printw(!"pair 0 contains (%d,%d)\n", f, b)
getch()
printw(!"Initializing pair 1 to red/black\n")
init_pair(1, COLOR_RED, COLOR_BLACK)
attrset(COLOR_PAIR(1))
printw(!"RED/BLACK\n")
getch()
printw(!"Initializing pair 2 to white/blue\n")
init_pair(2, COLOR_WHITE, COLOR_BLUE)
attrset(COLOR_PAIR(2))
printw(!"WHITE/BLUE\n")
getch()
printw(!"Resetting colors to pair 0\n")
attrset(COLOR_PAIR(0))
printw(!"Default Colors\n")
getch()
printw(!"Resetting colors to pair 1\n")
attrset(COLOR_PAIR(1))
printw(!"RED/BLACK\n")
getch()
else
printw("This demo requires a color terminal")
getch()
end if
endwin()
%%
Deletions:
Example Usage: yes, in examples/libraries/curses/


Revision [10953]

The oldest known version of this page was created on 2007-09-02 05:24:14 by JeffMarshall [Add example]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode