Curses Colour. More...
#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include "mutt/lib.h"
#include "gui/lib.h"
#include "color.h"
#include "curses2.h"
#include "debug.h"
Go to the source code of this file.
Functions | |
void | curses_colors_init (void) |
Initialise the Curses colours. | |
struct CursesColor * | curses_colors_find (color_t fg, color_t bg) |
Find a Curses colour by foreground/background. | |
static int | curses_color_init (color_t fg, color_t bg) |
Initialise a new Curses colour. | |
void | curses_color_free (struct CursesColor **ptr) |
Free a CursesColor. | |
struct CursesColor * | curses_color_new (color_t fg, color_t bg) |
Create a new CursesColor. | |
Variables | |
struct CursesColorList | CursesColors |
List of all Curses colours. | |
int | NumCursesColors |
Number of ncurses colours left to allocate. | |
Curses Colour.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file curses.c.
void curses_colors_init | ( | void | ) |
Initialise the Curses colours.
Definition at line 44 of file curses.c.
struct CursesColor * curses_colors_find | ( | color_t | fg, |
color_t | bg | ||
) |
Find a Curses colour by foreground/background.
fg | Foreground colour |
bg | Background colour |
ptr | Curses colour |
Definition at line 57 of file curses.c.
Initialise a new Curses colour.
fg | Foreground colour |
bg | Background colour |
num | Index of Curses colour |
Definition at line 78 of file curses.c.
void curses_color_free | ( | struct CursesColor ** | ptr | ) |
Free a CursesColor.
ptr | CursesColor to be freed |
Definition at line 120 of file curses.c.
struct CursesColor * curses_color_new | ( | color_t | fg, |
color_t | bg | ||
) |
Create a new CursesColor.
fg | Foreground colour |
bg | Background colour |
ptr | New CursesColor |
If the colour already exists, this function will return a pointer to the object (and increase its ref-count).
Definition at line 151 of file curses.c.
struct CursesColorList CursesColors |