diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-06-20 07:58:51 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-06-20 07:58:51 +0000 |
| commit | 3f32dfa87e08556d7f6a58efab9b7479e515be26 (patch) | |
| tree | 95aba7a2acfefeab50b6f98b6dcad92f4c0a53c7 /render/color.h | |
| parent | 49268650b4564def10eeb0d21d5c0dffa4972857 (diff) | |
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.
Diffstat (limited to 'render/color.h')
| -rw-r--r-- | render/color.h | 49 |
1 files changed, 9 insertions, 40 deletions
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 <X11/Xlib.h> #include <X11/Xutil.h> - -#ifdef HAVE_STDINT_H -# include <stdint.h> -#else -# ifdef HAVE_SYS_TYPES_H -# include <sys/types.h> -# 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 <glib.h> #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 */ |
