X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=render%2Frender.h;h=35522110f29bad46548365368e84b0a5e032296c;hb=a6d9be4f664cefb144e0e7ebc9c49e04bb2714e1;hp=230c7442e87bd8ef8bf94b69051ebef8c9b5512b;hpb=6401ceed2b4b86bf04eff01ca609b83ed619ed9b;p=chaz%2Fopenbox diff --git a/render/render.h b/render/render.h index 230c7442..35522110 100644 --- a/render/render.h +++ b/render/render.h @@ -40,9 +40,12 @@ typedef enum { typedef enum { Bitmask, Text, - RGBA + RGBA, + NoTexture } TextureType; +struct Appearance; + typedef struct PlanarSurface { SurfaceColorType grad; ReliefType relief; @@ -52,6 +55,9 @@ typedef struct PlanarSurface { color_rgb *border_color; gboolean interlaced; gboolean border; + struct Appearance *parent; + int parentx; + int parenty; pixel32 *pixel_data; } PlanarSurface; @@ -94,6 +100,7 @@ typedef struct TextureText { typedef struct { Pixmap mask; guint w, h; + char *data; } pixmap_mask; typedef struct TextureMask { @@ -102,7 +109,13 @@ typedef struct TextureMask { } TextureMask; typedef struct TextureRGBA { - int poo; + int width; + int height; + unsigned long *data; +/* cached scaled so we don't have to scale often */ + int cwidth; + int cheight; + unsigned long *cache; } TextureRGBA; typedef union { @@ -119,6 +132,7 @@ typedef struct Texture { typedef struct Appearance { Surface surface; + Rect area; int textures; Texture *texture; Pixmap pixmap; @@ -129,14 +143,16 @@ extern Visual *render_visual; extern int render_depth; extern Colormap render_colormap; -void (*paint)(Window win, Appearance *l, int x, int y, int w, int h); +void (*paint)(Window win, Appearance *l); void render_startup(void); void init_appearance(Appearance *l); -void x_paint(Window win, Appearance *l, int x, int y, int w, int h); +void x_paint(Window win, Appearance *l); void render_shutdown(void); Appearance *appearance_new(SurfaceType type, int numtex); Appearance *appearance_copy(Appearance *a); void appearance_free(Appearance *a); void truecolor_startup(void); +void pixel32_to_pixmap(pixel32 *in, Pixmap out, int x, int y, int w, int h); + #endif /*__render_h*/