diff options
author | QC <qball@gmpclient.org> | 2015-09-27 11:46:19 +0200 |
---|---|---|
committer | QC <qball@gmpclient.org> | 2015-09-27 11:46:19 +0200 |
commit | 6061e046def31b96e727c44d90cd370489f22c1d (patch) | |
tree | 67e6a53867c020d889511cac3da43eb5ba8bf0be /source/x11-helper.c | |
parent | eba217024132c70a2d5c2b493dc30a38c52f5548 (diff) |
Get color type.
Diffstat (limited to 'source/x11-helper.c')
-rw-r--r-- | source/x11-helper.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/x11-helper.c b/source/x11-helper.c index a311528b..a7a1bb37 100644 --- a/source/x11-helper.c +++ b/source/x11-helper.c @@ -32,6 +32,7 @@ #include <unistd.h> #include <stdint.h> #include <glib.h> +#include <cairo.h> #include <X11/X.h> #include <X11/Xatom.h> @@ -487,6 +488,16 @@ void create_visual_and_colormap ( Display *display ) map = DefaultColormap ( display, screen ); } } + + +cairo_format_t get_format(void) +{ + if(truecolor){ + return CAIRO_FORMAT_ARGB32; + } + return CAIRO_FORMAT_RGB24; +} + unsigned int color_get ( Display *display, const char *const name, const char * const defn ) { XColor color = { 0, 0, 0, 0, 0, 0 }; |