]> Dogcows Code - chaz/openbox/commitdiff
rename pixel32/16 to RrPixel32/16
authorDana Jansens <danakj@orodu.net>
Sat, 21 Jun 2003 02:00:42 +0000 (02:00 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 21 Jun 2003 02:00:42 +0000 (02:00 +0000)
openbox/client.c
openbox/client.h
render/color.c
render/color.h
render/gradient.c
render/gradient.h
render/image.c
render/image.h
render/render.c
render/render.h

index d7a99def5c6d125fe9b1109cbd0c180ffa96fee6..24d771277ac5baa3a1e1bd40a883611caef4f736 100644 (file)
@@ -1333,7 +1333,7 @@ void client_update_icons(Client *self)
 
             if (w*h == 0) continue;
 
-           self->icons[j].data = g_new(pixel32, w * h);
+           self->icons[j].data = g_new(RrPixel32, w * h);
             for (x = 0, y = 0, t = 0; t < w * h; ++t, ++x, ++i) {
                 if (x >= w) {
                     x = 0;
index e45b37713beec04aa1db89f450e2b59578c0b84b..ff7f67c7fcdf3f73f13bf0eb4e45aca5b4358fd6 100644 (file)
@@ -18,7 +18,7 @@ struct Group;
 /*! Holds an icon in ARGB format */
 typedef struct Icon {
     int width, height;
-    pixel32 *data;
+    RrPixel32 *data;
 } Icon;
      
 /*! The MWM Hints as retrieved from the window property
index 345736a310f42c09004f09d2e42d6389a4bb8b7a..73e25769c09c011485ea405b931007a2faffdd80 100644 (file)
@@ -66,12 +66,12 @@ void RrColorFree(RrColor *c)
     }
 }
 
-void reduce_depth(const RrInstance *inst, pixel32 *data, XImage *im)
+void reduce_depth(const RrInstance *inst, RrPixel32 *data, XImage *im)
 {
     int r, g, b;
     int x,y;
-    pixel32 *p32 = (pixel32 *) im->data;
-    pixel16 *p16 = (pixel16 *) im->data;
+    RrPixel32 *p32 = (RrPixel32 *) im->data;
+    RrPixel16 *p16 = (RrPixel16 *) im->data;
     unsigned char *p8 = (unsigned char *)im->data;
     switch (im->bits_per_pixel) {
     case 32:
@@ -174,12 +174,12 @@ static void swap_byte_order(XImage *im)
         im->byte_order = LSBFirst;
 }
 
-void increase_depth(const RrInstance *inst, pixel32 *data, XImage *im)
+void increase_depth(const RrInstance *inst, RrPixel32 *data, XImage *im)
 {
     int r, g, b;
     int x,y;
-    pixel32 *p32 = (pixel32 *) im->data;
-    pixel16 *p16 = (pixel16 *) im->data;
+    RrPixel32 *p32 = (RrPixel32 *) im->data;
+    RrPixel16 *p16 = (RrPixel16 *) im->data;
     unsigned char *p8 = (unsigned char *)im->data;
 
     if (im->byte_order != render_endian)
index ba9fb22b4e7eb41b4fca4a42600d4e8cdd88d222..8768d83a0c61e301d005ea79982a4d59d133217f 100644 (file)
@@ -33,7 +33,7 @@ struct _RrColor {
 
 void color_allocate_gc(RrColor *in);
 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);
+void reduce_depth(const RrInstance *inst, RrPixel32 *data, XImage *im);
+void increase_depth(const RrInstance *inst, RrPixel32 *data, XImage *im);
 
 #endif /* __color_h */
index feb4ad08466c97f2e5c02a7c1dc1c32c89704d47..fc4c46c7b26a4600e3591a0eeab3f34fa3e85bd7 100644 (file)
@@ -5,8 +5,8 @@
 
 void gradient_render(RrSurface *sf, int w, int h)
 {
-    pixel32 *data = sf->pixel_data;
-    pixel32 current;
+    RrPixel32 *data = sf->RrPixel_data;
+    RrPixel32 current;
     unsigned int r,g,b;
     int off, x;
 
@@ -85,8 +85,8 @@ void gradient_render(RrSurface *sf, int w, int h)
 
 void gradient_vertical(RrSurface *sf, int w, int h)
 {
-    pixel32 *data = sf->pixel_data;
-    pixel32 current;
+    RrPixel32 *data = sf->RrPixel_data;
+    RrPixel32 current;
     float dr, dg, db;
     unsigned int r,g,b;
     int x, y;
@@ -114,8 +114,8 @@ void gradient_vertical(RrSurface *sf, int w, int h)
 
 void gradient_horizontal(RrSurface *sf, int w, int h)
 {
-    pixel32 *data = sf->pixel_data;
-    pixel32 current;
+    RrPixel32 *data = sf->RrPixel_data;
+    RrPixel32 current;
     float dr, dg, db;
     unsigned int r,g,b;
     int x, y;
@@ -143,8 +143,8 @@ void gradient_horizontal(RrSurface *sf, int w, int h)
 
 void gradient_diagonal(RrSurface *sf, int w, int h)
 {
-    pixel32 *data = sf->pixel_data;
-    pixel32 current;
+    RrPixel32 *data = sf->RrPixel_data;
+    RrPixel32 current;
     float drx, dgx, dbx, dry, dgy, dby;
     unsigned int r,g,b;
     int x, y;
@@ -181,8 +181,8 @@ void gradient_diagonal(RrSurface *sf, int w, int h)
 
 void gradient_crossdiagonal(RrSurface *sf, int w, int h)
 {
-    pixel32 *data = sf->pixel_data;
-    pixel32 current;
+    RrPixel32 *data = sf->RrPixel_data;
+    RrPixel32 current;
     float drx, dgx, dbx, dry, dgy, dby;
     unsigned int r,g,b;
     int x, y;
@@ -217,11 +217,11 @@ void gradient_crossdiagonal(RrSurface *sf, int w, int h)
     }
 }
 
-void highlight(pixel32 *x, pixel32 *y, gboolean raised)
+void highlight(RrPixel32 *x, RrPixel32 *y, gboolean raised)
 {
     int r, g, b;
 
-    pixel32 *up, *down;
+    RrPixel32 *up, *down;
     if (raised) {
         up = x;
         down = y;
@@ -283,7 +283,7 @@ static void create_bevel_colors(RrAppearance *l)
 
 void gradient_solid(RrAppearance *l, int x, int y, int w, int h) 
 {
-    pixel32 pix;
+    RrPixel32 pix;
     int i, a, b;
     RrSurface *sp = &l->surface;
     int left = x, top = y, right = x + w - 1, bottom = y + h - 1;
@@ -296,7 +296,7 @@ void gradient_solid(RrAppearance *l, int x, int y, int w, int h)
 
     for (a = 0; a < w; a++)
         for (b = 0; b < h; b++)
-            sp->pixel_data[a + b * w] = pix;
+            sp->RrPixel_data[a + b * w] = pix;
 
     XFillRectangle(RrDisplay(l->inst), l->pixmap, sp->primary->gc,
                    x, y, w, h);
@@ -392,9 +392,9 @@ void gradient_solid(RrAppearance *l, int x, int y, int w, int h)
 
 void gradient_pyramid(RrSurface *sf, int inw, int inh)
 {
-    pixel32 *data = sf->pixel_data;
-    pixel32 *end = data + inw*inh - 1;
-    pixel32 current;
+    RrPixel32 *data = sf->RrPixel_data;
+    RrPixel32 *end = data + inw*inh - 1;
+    RrPixel32 current;
     float drx, dgx, dbx, dry, dgy, dby;
     unsigned int r,g,b;
     int x, y, h=(inh/2) + 1, w=(inw/2) + 1;
@@ -437,9 +437,9 @@ void gradient_pyramid(RrSurface *sf, int inw, int inh)
 
 void gradient_rectangle(RrSurface *sf, int inw, int inh)
 {
-    pixel32 *data = sf->pixel_data;
-    pixel32 *end = data + inw*inh - 1;
-    pixel32 current;
+    RrPixel32 *data = sf->RrPixel_data;
+    RrPixel32 *end = data + inw*inh - 1;
+    RrPixel32 current;
     float drx, dgx, dbx, dry, dgy, dby;
     unsigned int r,g,b;
     int x, y, h=(inh/2) + 1, w=(inw/2) + 1;
@@ -485,9 +485,9 @@ void gradient_rectangle(RrSurface *sf, int inw, int inh)
 
 void gradient_pipecross(RrSurface *sf, int inw, int inh)
 {
-    pixel32 *data = sf->pixel_data;
-    pixel32 *end = data + inw*inh - 1;
-    pixel32 current;
+    RrPixel32 *data = sf->RrPixel_data;
+    RrPixel32 *end = data + inw*inh - 1;
+    RrPixel32 current;
     float drx, dgx, dbx, dry, dgy, dby;
     unsigned int r,g,b;
     int x, y, h=(inh/2) + 1, w=(inw/2) + 1;
index 9487ce7f7e5f57211a59013e1640b35040299e02..0c523816f16d5492099bd13fa22826c19ff662e9 100644 (file)
@@ -12,7 +12,7 @@ void gradient_pyramid(RrSurface *sf, int w, int h);
 void gradient_pipecross(RrSurface *sf, int w, int h);
 void gradient_rectangle(RrSurface *sf, int w, int h);
 void gradient_solid(RrAppearance *l, int x, int y, int w, int h);
-void highlight(pixel32 *x, pixel32 *y, gboolean raised);
+void highlight(RrPixel32 *x, RrPixel32 *y, gboolean raised);
 
 void render_gl_gradient(RrSurface *sf, int x, int y, int w, int h);
 
index 5209d1207c42a40949f526245cc35a2ddc336200..6667abf7829dbdfb4a1ba571ea9c32b899496443 100644 (file)
@@ -4,9 +4,9 @@
 
 #include <glib.h>
 
-void image_draw(pixel32 *target, RrTextureRGBA *rgba, Rect *area)
+void image_draw(RrPixel32 *target, RrTextureRGBA *rgba, Rect *area)
 {
-    pixel32 *draw = rgba->data;
+    RrPixel32 *draw = rgba->data;
     gint c, i, e, t, sfw, sfh;
     sfw = area->width;
     sfh = area->height;
@@ -24,7 +24,7 @@ void image_draw(pixel32 *target, RrTextureRGBA *rgba, Rect *area)
         /* scale it and cache it */
         if (rgba->cache != NULL)
             g_free(rgba->cache);
-        rgba->cache = g_new(pixel32, sfw * sfh);
+        rgba->cache = g_new(RrPixel32, sfw * sfh);
         rgba->cwidth = sfw;
         rgba->cheight = sfh;
         for (i = 0, c = 0, e = sfw*sfh; i < e; ++i) {
index 65c2ad5c36d9cf7dfe528914d74bbfb1f2352f0c..e92ce0f694a02eeb50a4efe638d2f1db1169e409 100644 (file)
@@ -4,6 +4,6 @@
 #include "render.h"
 #include "../kernel/geom.h"
 
-void image_draw(pixel32 *target, RrTextureRGBA *rgba, Rect *area);
+void image_draw(RrPixel32 *target, RrTextureRGBA *rgba, Rect *area);
 
 #endif
index f2a0572fb6be06f1874690207e37e542f22179a5..82c9e26fe9b39bb382c9bb460c83710b0b2211f6 100644 (file)
 #  include <stdlib.h>
 #endif
 
-static void pixel32_to_pixmap(RrAppearance *l, gint x, gint y, gint w, gint h);
+static void RrPixel32_to_pixmap(RrAppearance *l, gint x, gint y, gint w, gint h);
 
 void RrPaint(RrAppearance *l, Window win, gint w, gint h)
 {
     int i, transferred = 0, sw;
-    pixel32 *source, *dest;
+    RrPixel32 *source, *dest;
     Pixmap oldp;
     Rect tarea; /* area in which to draw textures */
     gboolean resized;
@@ -47,19 +47,19 @@ void RrPaint(RrAppearance *l, Window win, gint w, gint h)
                                RrVisual(l->inst), RrColormap(l->inst));
     g_assert(l->xftdraw != NULL);
 
-    g_free(l->surface.pixel_data);
-    l->surface.pixel_data = g_new(pixel32, w * h);
+    g_free(l->surface.RrPixel_data);
+    l->surface.RrPixel_data = g_new(RrPixel32, w * h);
 
     if (l->surface.grad == RR_SURFACE_PARENTREL) {
         g_assert (l->surface.parent);
         g_assert (l->surface.parent->w);
 
         sw = l->surface.parent->w;
-        source = (l->surface.parent->surface.pixel_data + l->surface.parentx +
+        source = (l->surface.parent->surface.RrPixel_data + l->surface.parentx +
                   sw * l->surface.parenty);
-        dest = l->surface.pixel_data;
+        dest = l->surface.RrPixel_data;
         for (i = 0; i < h; i++, source += sw, dest += w) {
-            memcpy(dest, source, w * sizeof(pixel32));
+            memcpy(dest, source, w * sizeof(RrPixel32));
         }
     } else if (l->surface.grad == RR_SURFACE_SOLID)
         gradient_solid(l, 0, 0, w, h);
@@ -93,7 +93,7 @@ void RrPaint(RrAppearance *l, Window win, gint w, gint h)
             if (!transferred) {
                 transferred = 1;
                 if (l->surface.grad != RR_SURFACE_SOLID)
-                    pixel32_to_pixmap(l, 0, 0, w, h);
+                    RrPixel32_to_pixmap(l, 0, 0, w, h);
             }
             if (l->xftdraw == NULL) {
                 l->xftdraw = XftDrawCreate(RrDisplay(l->inst), l->pixmap, 
@@ -106,14 +106,14 @@ void RrPaint(RrAppearance *l, Window win, gint w, gint h)
             if (!transferred) {
                 transferred = 1;
                 if (l->surface.grad != RR_SURFACE_SOLID)
-                    pixel32_to_pixmap(l, 0, 0, w, h);
+                    RrPixel32_to_pixmap(l, 0, 0, w, h);
             }
             if (l->texture[i].data.mask.color->gc == None)
                 color_allocate_gc(l->texture[i].data.mask.color);
             RrPixmapMaskDraw(l->pixmap, &l->texture[i].data.mask, &tarea);
         break;
         case RR_TEXTURE_RGBA:
-            image_draw(l->surface.pixel_data,
+            image_draw(l->surface.RrPixel_data,
                        &l->texture[i].data.rgba, &tarea);
         break;
         }
@@ -122,7 +122,7 @@ void RrPaint(RrAppearance *l, Window win, gint w, gint h)
     if (!transferred) {
         transferred = 1;
         if (l->surface.grad != RR_SURFACE_SOLID)
-            pixel32_to_pixmap(l, 0, 0, w, h);
+            RrPixel32_to_pixmap(l, 0, 0, w, h);
     }
 
 
@@ -192,7 +192,7 @@ RrAppearance *RrAppearanceCopy(RrAppearance *orig)
 
     spc->interlaced = spo->interlaced;
     spc->border = spo->border;
-    spc->pixel_data = NULL;
+    spc->RrPixel_data = NULL;
 
     copy->textures = orig->textures;
     copy->texture = g_memdup(orig->texture,
@@ -217,30 +217,30 @@ void RrAppearanceFree(RrAppearance *a)
         RrColorFree(p->border_color);
         RrColorFree(p->bevel_dark);
         RrColorFree(p->bevel_light);
-        g_free(p->pixel_data);
+        g_free(p->RrPixel_data);
 
         g_free(a);
     }
 }
 
 
-static void pixel32_to_pixmap(RrAppearance *l, gint x, gint y, gint w, gint h)
+static void RrPixel32_to_pixmap(RrAppearance *l, gint x, gint y, gint w, gint h)
 {
-    pixel32 *in, *scratch;
+    RrPixel32 *in, *scratch;
     Pixmap out;
     XImage *im = NULL;
     im = XCreateImage(RrDisplay(l->inst), RrVisual(l->inst), RrDepth(l->inst),
                       ZPixmap, 0, NULL, w, h, 32, 0);
     g_assert(im != NULL);
 
-    in = l->surface.pixel_data;
+    in = l->surface.RrPixel_data;
     out = l->pixmap;
 
     im->byte_order = render_endian;
 /* this malloc is a complete waste of time on normal 32bpp
    as reduce_depth just sets im->data = data and returns
 */
-    scratch = g_new(pixel32, im->width * im->height);
+    scratch = g_new(RrPixel32, im->width * im->height);
     im->data = (char*) scratch;
     reduce_depth(l->inst, in, im);
     XPutImage(RrDisplay(l->inst), out,
@@ -305,7 +305,7 @@ void RrMinsize(RrAppearance *l, gint *w, gint *h)
 
 gboolean RrPixmapToRGBA(const RrInstance *inst,
                         Pixmap pmap, Pixmap mask,
-                        gint *w, gint *h, pixel32 **data)
+                        gint *w, gint *h, RrPixel32 **data)
 {
     Window xr;
     gint xx, xy;
@@ -335,7 +335,7 @@ gboolean RrPixmapToRGBA(const RrInstance *inst,
             return FALSE;
     }
 
-    *data = g_new(pixel32, pw * ph);
+    *data = g_new(RrPixel32, pw * ph);
     increase_depth(inst, *data, xi);
 
     if (mask) {
index fb48bd5fd183ee8982c873e19eab507053f538fb..30bf484698e8ae3cc021f0cd4c002b891926c36c 100644 (file)
@@ -18,8 +18,8 @@ typedef struct _RrPixmapMask       RrPixmapMask;
 typedef struct _RrInstance         RrInstance;
 typedef struct _RrColor            RrColor;
 
-typedef guint32 pixel32; /* XXX prefix */
-typedef guint16 pixel16;
+typedef guint32 RrPixel32;
+typedef guint16 RrPixel16;
 
 typedef enum {
     RR_RELIEF_FLAT,
@@ -72,7 +72,7 @@ struct _RrSurface {
     RrAppearance *parent;
     gint parentx;
     gint parenty;
-    pixel32 *pixel_data;
+    RrPixel32 *RrPixel_data;
 };
 
 struct _RrTextureText {
@@ -101,11 +101,11 @@ struct _RrTextureMask {
 struct _RrTextureRGBA {
     gint width;
     gint height;
-    pixel32 *data;
+    RrPixel32 *data;
 /* cached scaled so we don't have to scale often */
     gint cwidth;
     gint cheight;
-    pixel32 *cache;
+    RrPixel32 *cache;
 };
 
 union _RrTextureData {
@@ -166,6 +166,6 @@ void RrMinsize (RrAppearance *l, gint *w, gint *h);
 
 gboolean RrPixmapToRGBA(const RrInstance *inst,
                         Pixmap pmap, Pixmap mask,
-                        gint *w, gint *h, pixel32 **data);
+                        gint *w, gint *h, RrPixel32 **data);
 
 #endif /*__render_h*/
This page took 0.04192 seconds and 4 git commands to generate.