X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=c%2B%2B%2Fcursesw.cc;h=16438770d47aaf178a92b0d52ddbb956efb7d407;hp=f2e7e94858aa4b16077a10412ae699ebe390cb90;hb=1713400c1c9b80cb7cb9d204acb0525dc592b07d;hpb=f3eb40315f9e5eff503a172aed6d325b4e1f20c6 diff --git a/c++/cursesw.cc b/c++/cursesw.cc index f2e7e948..16438770 100644 --- a/c++/cursesw.cc +++ b/c++/cursesw.cc @@ -1,6 +1,6 @@ // * this is for making emacs happy: -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 2007-2009,2011 Free Software Foundation, Inc. * + * Copyright (c) 2007-2012,2014 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -42,7 +42,7 @@ #include "internal.h" #include "cursesw.h" -MODULE_ID("$Id: cursesw.cc,v 1.52 2011/09/17 22:12:10 tom Exp $") +MODULE_ID("$Id: cursesw.cc,v 1.54 2014/02/01 22:10:42 tom Exp $") #define COLORS_NEED_INITIALIZATION -1 #define COLORS_NOT_INITIALIZED 0 @@ -192,7 +192,6 @@ NCursesWindow::NCursesWindow() constructing(); w = static_cast(0); - set_keyboard(); } NCursesWindow::NCursesWindow(int nlines, int ncols, int begin_y, int begin_x) @@ -402,16 +401,16 @@ NCursesWindow::useColors(void) } } -short +NCURSES_PAIRS_T NCursesWindow::getPair() const { - return static_cast(PAIR_NUMBER(getattrs(w))); + return static_cast(PAIR_NUMBER(getattrs(w))); } -short +NCURSES_COLOR_T NCursesWindow::getcolor(int getback) const { - short fore, back; + NCURSES_COLOR_T fore, back; if (HaveColors()) { if (::pair_content(getPair(), &fore, &back) == ERR) @@ -429,27 +428,27 @@ int NCursesWindow::NumberOfColors() return (HaveColors()) ? COLORS : 1; } -short +NCURSES_PAIRS_T NCursesWindow::getcolor() const { return (HaveColors()) ? getPair() : 0; } int -NCursesWindow::setpalette(short fore, short back, short pair) +NCursesWindow::setpalette(NCURSES_COLOR_T fore, NCURSES_COLOR_T back, NCURSES_PAIRS_T pair) { return (HaveColors()) ? ::init_pair(pair, fore, back) : OK; } int -NCursesWindow::setpalette(short fore, short back) +NCursesWindow::setpalette(NCURSES_COLOR_T fore, NCURSES_COLOR_T back) { return setpalette(fore, back, getPair()); } int -NCursesWindow::setcolor(short pair) +NCursesWindow::setcolor(NCURSES_PAIRS_T pair) { if (HaveColors()) { if ((pair < 1) || (pair > COLOR_PAIRS))