Optimization: Get the colorpixels when loading configuration, make use of the new config struct

Instead of building arrays of colorpixels we can simply use a pointer
to a struct Colortriple. Furthermore, by getting the colorpixels when
loading the configuration, we save a lot of function calls in the
main code.
This commit is contained in:
Michael Stapelberg
2009-06-01 15:14:45 +02:00
parent 1fcad44f66
commit 2a67630aa6
5 changed files with 53 additions and 70 deletions

View File

@ -19,9 +19,9 @@ typedef struct Config Config;
extern Config config;
struct Colortriple {
char border[8];
char background[8];
char text[8];
uint32_t border;
uint32_t background;
uint32_t text;
};
struct Config {
@ -47,6 +47,6 @@ struct Config {
* configuration file.
*
*/
void load_configuration(const char *override_configfile);
void load_configuration(xcb_connection_t *conn, const char *override_configfile);
#endif