diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-02-21 00:59:16 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-02-21 01:32:59 -0600 |
commit | 8e7f8c02a1c6f1a916376f43cbce1271225c2ec7 (patch) | |
tree | 6b86ca3e365991327af78054370976c4903488ba /dzen.h | |
parent | 2077fd91caaa678de78e7b599def61f89306f2b8 (diff) | |
download | dzen-8e7f8c02a1c6f1a916376f43cbce1271225c2ec7.tar.gz dzen-8e7f8c02a1c6f1a916376f43cbce1271225c2ec7.zip |
cache return values of XAllocNamedColor
round trip to the server on every color lookup is pretty bad
Diffstat (limited to 'dzen.h')
-rw-r--r-- | dzen.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -178,3 +178,6 @@ extern void *emalloc(unsigned int size); /* allocates memory, exits on error */ extern void eprint(const char *errstr, ...); /* prints errstr and exits with 1 */ extern char *estrdup(const char *str); /* duplicates str, exits on allocation error */ extern void spawn(const char *arg); /* execute arg */ + +extern long colorcache_get(const char *name); /* gets a cached color */ +extern void colorcache_set(const char *name, long value); /* sets a cached color */ |