diff --git a/src/colours.cc b/src/colours.cc index acd00b59..495c4647 100644 --- a/src/colours.cc +++ b/src/colours.cc @@ -189,4 +189,7 @@ long get_x11_color(const char *name) return (long) color.pixel; } + +long get_x11_color(const std::string &colour) +{ return get_x11_color(colour.c_str()); } #endif diff --git a/src/colours.h b/src/colours.h index 298e9507..9748122b 100644 --- a/src/colours.h +++ b/src/colours.h @@ -33,6 +33,8 @@ unsigned int adjust_colours(unsigned int); unsigned long *do_gradient(int, unsigned long, unsigned long); +long get_x11_color(const std::string &colour); +// XXX: when everyone uses C++ strings, remove this C version long get_x11_color(const char *); #endif /* _COLOURS_H */