X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=render%2Frender.h;h=3fbf324958df65d20cbf6ccdfba5883f7ce3dbb8;hb=993fc6226d06f25513756251283e70054082ee8a;hp=8363dd9095ded90a14d25d0bb1b950de11c9cf5c;hpb=de307661b6ce96e61e20a123b00297dbc57d5d85;p=chaz%2Fopenbox diff --git a/render/render.h b/render/render.h index 8363dd90..3fbf3249 100644 --- a/render/render.h +++ b/render/render.h @@ -6,6 +6,7 @@ #include #include #include "color.h" +#include "kernel/geom.h" typedef enum { Surface_Planar, @@ -39,9 +40,12 @@ typedef enum { typedef enum { Bitmask, Text, - RGBA + RGBA, + NoTexture } TextureType; +struct Appearance; + typedef struct PlanarSurface { SurfaceColorType grad; ReliefType relief; @@ -51,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; @@ -72,6 +79,7 @@ typedef struct Surface { typedef struct { XftFont *xftfont; int height; + int elipses_length; } ObFont; typedef enum { @@ -84,7 +92,7 @@ typedef struct TextureText { ObFont *font; Justify justify; int shadow; - unsigned char tint; + char tint; unsigned char offset; color_rgb *color; char *string; @@ -93,6 +101,7 @@ typedef struct TextureText { typedef struct { Pixmap mask; guint w, h; + char *data; } pixmap_mask; typedef struct TextureMask { @@ -101,7 +110,13 @@ typedef struct TextureMask { } TextureMask; typedef struct TextureRGBA { - int poo; + guint width; + guint height; + unsigned long *data; +/* cached scaled so we don't have to scale often */ + guint cwidth; + guint cheight; + unsigned long *cache; } TextureRGBA; typedef union { @@ -111,12 +126,14 @@ typedef union { } TextureData; typedef struct Texture { + Rect position; TextureType type; TextureData data; } Texture; typedef struct Appearance { Surface surface; + Rect area; int textures; Texture *texture; Pixmap pixmap; @@ -127,14 +144,22 @@ 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 pseudocolor_startup(void); +void pixel32_to_pixmap(pixel32 *in, Pixmap out, int x, int y, int w, int h); + +void appearance_minsize(Appearance *l, int *w, int *h); + +void render_pixmap_to_rgba(Pixmap pmap, Pixmap mask, + int *w, int *h, gulong **data); + #endif /*__render_h*/