Colour and attributes. More...
Include dependency graph for attr.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | ColorElement |
| One element of a Colour. More... | |
| struct | AttrColor |
| A curses colour and its attributes. More... | |
Enumerations | |
| enum | ColorType { CT_SIMPLE , CT_PALETTE , CT_RGB } |
| Type of Colour. More... | |
| enum | ColorPrefix { COLOR_PREFIX_NONE , COLOR_PREFIX_ALERT , COLOR_PREFIX_BRIGHT , COLOR_PREFIX_LIGHT } |
| Constants for colour prefixes of named colours. More... | |
Functions | |
| TAILQ_HEAD (AttrColorList, AttrColor) | |
| void | attr_color_clear (struct AttrColor *ac) |
| Free the contents of an AttrColor. | |
| struct AttrColor | attr_color_copy (const struct AttrColor *ac) |
| Copy a colour. | |
| void | attr_color_free (struct AttrColor **ptr) |
| Free an AttrColor. | |
| bool | attr_color_is_set (const struct AttrColor *ac) |
| Is the object coloured? | |
| bool | attr_color_match (struct AttrColor *ac1, struct AttrColor *ac2) |
| Do the colours match? | |
| struct AttrColor * | attr_color_new (void) |
| Create a new AttrColor. | |
| void | attr_color_list_clear (struct AttrColorList *acl) |
| Free the contents of an AttrColorList. | |
| struct AttrColor * | attr_color_list_find (struct AttrColorList *acl, color_t fg, color_t bg, int attrs) |
| Find an AttrColor in a list. | |
| void | attr_color_overwrite (struct AttrColor *ac_old, const struct AttrColor *ac_new) |
| Update an AttrColor in-place. | |
Colour and attributes.
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 attr.h.
| enum ColorType |
Type of Colour.
| Enumerator | |
|---|---|
| CT_SIMPLE | Simple colour, e.g. "Red". |
| CT_PALETTE | Palette colour, e.g. "color207". |
| CT_RGB | True colour, e.g. "#11AAFF". |
| enum ColorPrefix |
| TAILQ_HEAD | ( | AttrColorList | , |
| AttrColor | ) |
Here is the call graph for this function:| void attr_color_clear | ( | struct AttrColor * | ac | ) |
Free the contents of an AttrColor.
| ac | AttrColor to empty |
Definition at line 47 of file attr.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void attr_color_free | ( | struct AttrColor ** | ptr | ) |
Free an AttrColor.
| ptr | AttrColor to free |
Definition at line 68 of file attr.c.
Here is the call graph for this function:
Here is the caller graph for this function:| bool attr_color_is_set | ( | const struct AttrColor * | ac | ) |
Do the colours match?
| ac1 | First colour |
| ac2 | Second colour |
| true | The colours and attributes match |
Definition at line 192 of file attr.c.
Here is the caller graph for this function:| struct AttrColor * attr_color_new | ( | void | ) |
| void attr_color_list_clear | ( | struct AttrColorList * | acl | ) |
Free the contents of an AttrColorList.
| acl | List to clear |
Free each of the AttrColors in a list.
Definition at line 116 of file attr.c.
Here is the call graph for this function:
Here is the caller graph for this function:| struct AttrColor * attr_color_list_find | ( | struct AttrColorList * | acl, |
| color_t | fg, | ||
| color_t | bg, | ||
| int | attrs ) |
Find an AttrColor in a list.
| acl | List to search |
| fg | Foreground colour |
| bg | Background colour |
| attrs | Attributes, e.g. A_UNDERLINE |
| ptr | Matching AttrColor |
Definition at line 138 of file attr.c.
Here is the caller graph for this function:Update an AttrColor in-place.
Definition at line 394 of file attr.c.
Here is the call graph for this function:
Here is the caller graph for this function: