summaryrefslogtreecommitdiffstats
path: root/source/x11-helper.c
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-01-09 08:32:16 +0100
committerDave Davenport <qball@gmpclient.org>2017-01-09 08:32:16 +0100
commitf42e4ffbd7b19723eb2ffeab744ed3b6724b056c (patch)
tree81202f6ec9913ed5d0e305cb5c0e3e172502c1de /source/x11-helper.c
parent78916c6a94a7496376b683fa9bf8dbb60d2cdc34 (diff)
Remove old cairo color set functions
Diffstat (limited to 'source/x11-helper.c')
-rw-r--r--source/x11-helper.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/source/x11-helper.c b/source/x11-helper.c
index 7121b2df..3723e883 100644
--- a/source/x11-helper.c
+++ b/source/x11-helper.c
@@ -851,76 +851,6 @@ Color color_get ( const char *const name )
return ret;
}
-void x11_helper_set_cairo_rgba ( cairo_t *d, Color col )
-{
- cairo_set_source_rgba ( d, col.red, col.green, col.blue, col.alpha );
-}
-
-/**
- * Type of colors stored
- */
-enum
-{
- BACKGROUND,
- BORDER,
- SEPARATOR
-};
-/**
- * Color cache.
- *
- * This stores the current color until
- */
-static struct
-{
- /** The color */
- Color color;
- /** Flag indicating it is set. */
- unsigned int set;
-} color_cache[3];
-
-void color_background ( cairo_t *d )
-{
- if ( !color_cache[BACKGROUND].set ) {
- gchar **vals = g_strsplit ( config.color_window, ",", 3 );
- if ( vals != NULL && vals[0] != NULL ) {
- color_cache[BACKGROUND].color = color_get ( vals[0] );
- }
- g_strfreev ( vals );
- color_cache[BACKGROUND].set = TRUE;
- }
-
- x11_helper_set_cairo_rgba ( d, color_cache[BACKGROUND].color );
-}
-
-void color_border ( cairo_t *d )
-{
- if ( !color_cache[BORDER].set ) {
- gchar **vals = g_strsplit ( config.color_window, ",", 3 );
- if ( vals != NULL && vals[0] != NULL && vals[1] != NULL ) {
- color_cache[BORDER].color = color_get ( vals[1] );
- }
- g_strfreev ( vals );
- color_cache[BORDER].set = TRUE;
- }
- x11_helper_set_cairo_rgba ( d, color_cache[BORDER].color );
-}
-
-void color_separator ( cairo_t *d )
-{
- if ( !color_cache[SEPARATOR].set ) {
- gchar **vals = g_strsplit ( config.color_window, ",", 3 );
- if ( vals != NULL && vals[0] != NULL && vals[1] != NULL && vals[2] != NULL ) {
- color_cache[SEPARATOR].color = color_get ( vals[2] );
- }
- else if ( vals != NULL && vals[0] != NULL && vals[1] != NULL ) {
- color_cache[SEPARATOR].color = color_get ( vals[1] );
- }
- g_strfreev ( vals );
- color_cache[SEPARATOR].set = TRUE;
- }
- x11_helper_set_cairo_rgba ( d, color_cache[SEPARATOR].color );
-}
-
xcb_window_t xcb_stuff_get_root_window ( xcb_stuff *xcb )
{
return xcb->screen->root;