more namespacing with Rr*
This commit is contained in:
parent
ae9aed8545
commit
33ec08ea22
5 changed files with 20 additions and 20 deletions
|
@ -7,7 +7,7 @@
|
||||||
XColor *pseudo_colors;
|
XColor *pseudo_colors;
|
||||||
int pseudo_bpc;
|
int pseudo_bpc;
|
||||||
|
|
||||||
void color_allocate_gc(RrColor *in)
|
void RrColorAllocateGC(RrColor *in)
|
||||||
{
|
{
|
||||||
XGCValues gcv;
|
XGCValues gcv;
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ void RrColorFree(RrColor *c)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void reduce_depth(const RrInstance *inst, RrPixel32 *data, XImage *im)
|
void RrReduceDepth(const RrInstance *inst, RrPixel32 *data, XImage *im)
|
||||||
{
|
{
|
||||||
int r, g, b;
|
int r, g, b;
|
||||||
int x,y;
|
int x,y;
|
||||||
|
@ -113,10 +113,10 @@ void reduce_depth(const RrInstance *inst, RrPixel32 *data, XImage *im)
|
||||||
g_assert(RrVisual(inst)->class != TrueColor);
|
g_assert(RrVisual(inst)->class != TrueColor);
|
||||||
for (y = 0; y < im->height; y++) {
|
for (y = 0; y < im->height; y++) {
|
||||||
for (x = 0; x < im->width; x++) {
|
for (x = 0; x < im->width; x++) {
|
||||||
p8[x] = pickColor(inst,
|
p8[x] = RrPickColor(inst,
|
||||||
data[x] >> RrDefaultRedOffset,
|
data[x] >> RrDefaultRedOffset,
|
||||||
data[x] >> RrDefaultGreenOffset,
|
data[x] >> RrDefaultGreenOffset,
|
||||||
data[x] >> RrDefaultBlueOffset)->pixel;
|
data[x] >> RrDefaultBlueOffset)->pixel;
|
||||||
}
|
}
|
||||||
data += im->width;
|
data += im->width;
|
||||||
p8 += im->bytes_per_line;
|
p8 += im->bytes_per_line;
|
||||||
|
@ -128,7 +128,7 @@ void reduce_depth(const RrInstance *inst, RrPixel32 *data, XImage *im)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
XColor *pickColor(const RrInstance *inst, gint r, gint g, gint b)
|
XColor *RrPickColor(const RrInstance *inst, gint r, gint g, gint b)
|
||||||
{
|
{
|
||||||
r = (r & 0xff) >> (8-pseudo_bpc);
|
r = (r & 0xff) >> (8-pseudo_bpc);
|
||||||
g = (g & 0xff) >> (8-pseudo_bpc);
|
g = (g & 0xff) >> (8-pseudo_bpc);
|
||||||
|
@ -174,7 +174,7 @@ static void swap_byte_order(XImage *im)
|
||||||
im->byte_order = LSBFirst;
|
im->byte_order = LSBFirst;
|
||||||
}
|
}
|
||||||
|
|
||||||
void increase_depth(const RrInstance *inst, RrPixel32 *data, XImage *im)
|
void RrIncreaseDepth(const RrInstance *inst, RrPixel32 *data, XImage *im)
|
||||||
{
|
{
|
||||||
int r, g, b;
|
int r, g, b;
|
||||||
int x,y;
|
int x,y;
|
||||||
|
|
|
@ -17,9 +17,9 @@ struct _RrColor {
|
||||||
GC gc;
|
GC gc;
|
||||||
};
|
};
|
||||||
|
|
||||||
void color_allocate_gc(RrColor *in);
|
void RrColorAllocateGC(RrColor *in);
|
||||||
XColor *pickColor(const RrInstance *inst, gint r, gint g, gint b);
|
XColor *RrPickColor(const RrInstance *inst, gint r, gint g, gint b);
|
||||||
void reduce_depth(const RrInstance *inst, RrPixel32 *data, XImage *im);
|
void RrReduceDepth(const RrInstance *inst, RrPixel32 *data, XImage *im);
|
||||||
void increase_depth(const RrInstance *inst, RrPixel32 *data, XImage *im);
|
void RrIncreaseDepth(const RrInstance *inst, RrPixel32 *data, XImage *im);
|
||||||
|
|
||||||
#endif /* __color_h */
|
#endif /* __color_h */
|
||||||
|
|
|
@ -267,7 +267,7 @@ static void create_bevel_colors(RrAppearance *l)
|
||||||
if (b > 0xFF) b = 0xFF;
|
if (b > 0xFF) b = 0xFF;
|
||||||
g_assert(!l->surface.bevel_light);
|
g_assert(!l->surface.bevel_light);
|
||||||
l->surface.bevel_light = RrColorNew(l->inst, r, g, b);
|
l->surface.bevel_light = RrColorNew(l->inst, r, g, b);
|
||||||
color_allocate_gc(l->surface.bevel_light);
|
RrColorAllocateGC(l->surface.bevel_light);
|
||||||
|
|
||||||
/* dark color */
|
/* dark color */
|
||||||
r = l->surface.primary->r;
|
r = l->surface.primary->r;
|
||||||
|
@ -278,7 +278,7 @@ static void create_bevel_colors(RrAppearance *l)
|
||||||
b = (b >> 1) + (b >> 2);
|
b = (b >> 1) + (b >> 2);
|
||||||
g_assert(!l->surface.bevel_dark);
|
g_assert(!l->surface.bevel_dark);
|
||||||
l->surface.bevel_dark = RrColorNew(l->inst, r, g, b);
|
l->surface.bevel_dark = RrColorNew(l->inst, r, g, b);
|
||||||
color_allocate_gc(l->surface.bevel_dark);
|
RrColorAllocateGC(l->surface.bevel_dark);
|
||||||
}
|
}
|
||||||
|
|
||||||
void gradient_solid(RrAppearance *l, int x, int y, int w, int h)
|
void gradient_solid(RrAppearance *l, int x, int y, int w, int h)
|
||||||
|
@ -289,7 +289,7 @@ void gradient_solid(RrAppearance *l, int x, int y, int w, int h)
|
||||||
int left = x, top = y, right = x + w - 1, bottom = y + h - 1;
|
int left = x, top = y, right = x + w - 1, bottom = y + h - 1;
|
||||||
|
|
||||||
if (sp->primary->gc == None)
|
if (sp->primary->gc == None)
|
||||||
color_allocate_gc(sp->primary);
|
RrColorAllocateGC(sp->primary);
|
||||||
pix = (sp->primary->r << RrDefaultRedOffset)
|
pix = (sp->primary->r << RrDefaultRedOffset)
|
||||||
+ (sp->primary->g << RrDefaultGreenOffset)
|
+ (sp->primary->g << RrDefaultGreenOffset)
|
||||||
+ (sp->primary->b << RrDefaultBlueOffset);
|
+ (sp->primary->b << RrDefaultBlueOffset);
|
||||||
|
@ -303,7 +303,7 @@ void gradient_solid(RrAppearance *l, int x, int y, int w, int h)
|
||||||
|
|
||||||
if (sp->interlaced) {
|
if (sp->interlaced) {
|
||||||
if (sp->secondary->gc == None)
|
if (sp->secondary->gc == None)
|
||||||
color_allocate_gc(sp->secondary);
|
RrColorAllocateGC(sp->secondary);
|
||||||
for (i = y; i < h; i += 2)
|
for (i = y; i < h; i += 2)
|
||||||
XDrawLine(RrDisplay(l->inst), l->pixmap, sp->secondary->gc,
|
XDrawLine(RrDisplay(l->inst), l->pixmap, sp->secondary->gc,
|
||||||
x, i, w, i);
|
x, i, w, i);
|
||||||
|
@ -380,7 +380,7 @@ void gradient_solid(RrAppearance *l, int x, int y, int w, int h)
|
||||||
case RR_RELIEF_FLAT:
|
case RR_RELIEF_FLAT:
|
||||||
if (sp->border) {
|
if (sp->border) {
|
||||||
if (sp->border_color->gc == None)
|
if (sp->border_color->gc == None)
|
||||||
color_allocate_gc(sp->border_color);
|
RrColorAllocateGC(sp->border_color);
|
||||||
XDrawRectangle(RrDisplay(l->inst), l->pixmap, sp->border_color->gc,
|
XDrawRectangle(RrDisplay(l->inst), l->pixmap, sp->border_color->gc,
|
||||||
left, top, right, bottom);
|
left, top, right, bottom);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
void image_draw(RrPixel32 *target, RrTextureRGBA *rgba, Rect *area)
|
void RrImageDraw(RrPixel32 *target, RrTextureRGBA *rgba, Rect *area)
|
||||||
{
|
{
|
||||||
RrPixel32 *draw = rgba->data;
|
RrPixel32 *draw = rgba->data;
|
||||||
gint c, i, e, t, sfw, sfh;
|
gint c, i, e, t, sfw, sfh;
|
||||||
|
|
|
@ -113,8 +113,8 @@ void RrPaint(RrAppearance *l, Window win, gint w, gint h)
|
||||||
RrPixmapMaskDraw(l->pixmap, &l->texture[i].data.mask, &tarea);
|
RrPixmapMaskDraw(l->pixmap, &l->texture[i].data.mask, &tarea);
|
||||||
break;
|
break;
|
||||||
case RR_TEXTURE_RGBA:
|
case RR_TEXTURE_RGBA:
|
||||||
image_draw(l->surface.RrPixel_data,
|
RrImageDraw(l->surface.RrPixel_data,
|
||||||
&l->texture[i].data.rgba, &tarea);
|
&l->texture[i].data.rgba, &tarea);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue