forked from Imagelibrary/binutils-gdb
Colors can be specified as "none" for terminal's default color, as a name of one of the eight standard colors of ISO/IEC 6429 "black", "red", "green", etc., as an RGB hexadecimal tripplet #RRGGBB for 24-bit TrueColor, or as an integer from 0 to 255. Integers 0 to 7 are the synonyms for the standard colors. Integers 8-15 are used for the so-called bright colors from the aixterm extended 16-color palette. Integers 16-255 are the indexes into xterm extended 256-color palette (usually 6x6x6 cube plus gray ramp). In general, 256-color palette is terminal dependent and sometimes can be changed with OSC 4 sequences, e.g. "\033]4;1;rgb:00/FF/00\033\\". It is the responsibility of the user to verify that the terminal supports the specified colors. PATCH v5 changes: documentation fixed. PATCH v6 changes: documentation fixed. PATCH v7 changes: rebase onto master and fixes after review. PATCH v8 changes: fixes after review.
36 lines
1.2 KiB
C
36 lines
1.2 KiB
C
/* Python interface to ui_file_style::color objects.
|
|
|
|
Copyright (C) 2009-2024 Free Software Foundation, Inc.
|
|
|
|
This file is part of GDB.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
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/>. */
|
|
|
|
#ifndef PYTHON_PY_COLOR_H
|
|
#define PYTHON_PY_COLOR_H
|
|
|
|
#include "python-internal.h"
|
|
#include "ui-style.h"
|
|
|
|
/* Create a new gdb.Color object from COLOR. */
|
|
extern gdbpy_ref<> create_color_object (const ui_file_style::color &color);
|
|
|
|
/* Check if OBJ is instance of a gdb.Color type. */
|
|
extern bool gdbpy_is_color (PyObject *obj);
|
|
|
|
/* Extracts value from OBJ object of gdb.Color type. */
|
|
extern const ui_file_style::color &gdbpy_get_color (PyObject *obj);
|
|
|
|
#endif /* PYTHON_PY_COLOR_H */
|