Colour and attributes. More...
#include "config.h"
#include <stddef.h>
#include <stdint.h>
#include "mutt/lib.h"
#include "attr.h"
#include "curses2.h"
#include "debug.h"
Go to the source code of this file.
Functions | |
void | attr_color_clear (struct AttrColor *ac) |
Free the contents of an AttrColor. More... | |
void | attr_color_free (struct AttrColor **ptr) |
Free an AttrColor. More... | |
struct AttrColor * | attr_color_new (void) |
Create a new AttrColor. More... | |
void | attr_color_list_clear (struct AttrColorList *acl) |
Free the contents of an AttrColorList. More... | |
struct AttrColor * | attr_color_list_find (struct AttrColorList *acl, uint32_t fg, uint32_t bg, int attrs) |
Find an AttrColor in a list. More... | |
struct AttrColor | attr_color_copy (const struct AttrColor *ac) |
Copy a colour. More... | |
bool | attr_color_is_set (struct AttrColor *ac) |
Is the object coloured? More... | |
bool | attr_color_match (struct AttrColor *ac1, struct AttrColor *ac2) |
Do the colours match? More... | |
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.c.
void attr_color_clear | ( | struct AttrColor * | ac | ) |
Free the contents of an AttrColor.
ac | AttrColor to empty |
Definition at line 44 of file attr.c.
void attr_color_free | ( | struct AttrColor ** | ptr | ) |
Free an AttrColor.
ptr | AttrColor to free |
Definition at line 59 of file attr.c.
struct AttrColor * attr_color_new | ( | void | ) |
Create a new AttrColor.
ptr | New AttrColor |
Definition at line 80 of file attr.c.
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 97 of file attr.c.
struct AttrColor * attr_color_list_find | ( | struct AttrColorList * | acl, |
uint32_t | fg, | ||
uint32_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 119 of file attr.c.
bool attr_color_is_set | ( | struct AttrColor * | ac | ) |
Do the colours match?
ac1 | First colour |
ac2 | Second colour |
true | The colours and attributes match |
Definition at line 174 of file attr.c.