From 3f32dfa87e08556d7f6a58efab9b7479e515be26 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 20 Jun 2003 07:58:51 +0000 Subject: this is going to break the kernel/ building. lots of modifications to the render API, prefixing everything, making proper names for everything. the structures are not hidden/opaque yet, but the naming scheme of the public API works much better now. --- render/color.h | 49 +++++++++---------------------------------------- 1 file changed, 9 insertions(+), 40 deletions(-) (limited to 'render/color.h') diff --git a/render/color.h b/render/color.h index fb669fb5..2ed23ddd 100644 --- a/render/color.h +++ b/render/color.h @@ -1,25 +1,11 @@ #ifndef __color_h #define __color_h +#include "render.h" + #include #include - -#ifdef HAVE_STDINT_H -# include -#else -# ifdef HAVE_SYS_TYPES_H -# include -# endif -#endif - - -#ifdef HAVE_STDINT_H -typedef uint32_t pixel32; -typedef uint16_t pixel16; -#else -typedef u_int32_t pixel32; -typedef u_int16_t pixel16; -#endif /* HAVE_STDINT_H */ +#include #if (G_BYTE_ORDER == G_BIG_ENDIAN) #define default_red_offset 0 @@ -35,36 +21,19 @@ typedef u_int16_t pixel16; #define render_endian LSBFirst #endif /* G_BYTE_ORDER == G_BIG_ENDIAN */ +struct _RrColor { + const RrInstance *inst; -typedef struct color_rgb { int r; int g; int b; unsigned long pixel; GC gc; -} color_rgb; +}; void color_allocate_gc(color_rgb *in); -XColor *pickColor(int r, int g, int b); -color_rgb *color_parse(char *colorname); -color_rgb *color_new(int r, int g, int b); -void color_free(color_rgb *in); -void reduce_depth(pixel32 *data, XImage *im); -void increase_depth(pixel32 *data, XImage *im); - -extern int render_red_offset; -extern int render_green_offset; -extern int render_blue_offset; - -extern int render_red_shift; -extern int render_green_shift; -extern int render_blue_shift; - -extern int render_red_mask; -extern int render_green_mask; -extern int render_blue_mask; +XColor *pickColor(const RrInstance *inst, gint r, gint g, gint b); +void reduce_depth(const RrInstance *inst, pixel32 *data, XImage *im); +void increase_depth(const RrInstance *inst, pixel32 *data, XImage *im); -extern int pseudo_bpc; -#define pseudo_ncolors() (1 << (pseudo_bpc * 3)) -extern XColor *pseudo_colors; #endif /* __color_h */ -- cgit v1.2.3