aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/Draw.h80
1 files changed, 74 insertions, 6 deletions
diff --git a/generic/Draw.h b/generic/Draw.h
index 99e1b48..1161273 100644
--- a/generic/Draw.h
+++ b/generic/Draw.h
@@ -44,11 +44,11 @@
#define STRAIGHT_POINTS 2
#define LINE_SHAPE_POINTS 4 /* Maximum of all above */
-
struct _WidgetInfo;
+struct _ImageBits;
-void SetLineStyle(Display *display, GC gc, LineStyle line_style);
+void SetLineStyle(struct _WidgetInfo *wi, LineStyle line_style);
void GetLineShape(ZnPoint *p1, ZnPoint *p2, unsigned int line_width,
LineShape shape, ZnBBox *bbox, ZnList to_points);
void DrawLineShape(struct _WidgetInfo *wi, ZnPoint *points, int num_points,
@@ -66,11 +66,79 @@ void DrawRectangleRelief(struct _WidgetInfo *wi,
void DrawPolygonRelief(struct _WidgetInfo *wi, ReliefStyle relief,
ZnGradient *gradient, ZnPoint *points,
int num_points, int line_width);
-void DrawRectangleGradient(struct _WidgetInfo *wi, ZnGradient *gradient,
- XRectangle *bbox);
-void DrawPolygonGradient(struct _WidgetInfo *wi, ZnGradient *gradient,
- ZnPoly *poly, ZnBBox *bbox);
+#ifdef GLX
+void RenderPolygonRelief(struct _WidgetInfo *wi, ReliefStyle relief,
+ ZnGradient *gradient, int alpha, ZnBool smooth,
+ ZnPoint *points, int num_points, int line_width);
+void RenderGradient(struct _WidgetInfo *wi, ZnGradient *gradient,
+ void cb(void *), void *closure, ZnPoint *quad);
+void RenderTile(struct _WidgetInfo *wi, struct _ImageBits *tile,
+ ZnGradient *gradient, void cb(void *), void *closure,
+ ZnPoint *quad);
+void RenderImage(struct _WidgetInfo *wi, struct _ImageBits *image,
+ XColor *color, int alpha, ZnPoint *origin);
+void RenderHollowDot(struct _WidgetInfo *wi, ZnPoint *p, ZnReal size);
+#endif
+
+#ifdef GLX
+/* Copyright (c) Mark J. Kilgard, 1997. */
+
+/* This program is freely distributable without licensing fees and is
+ provided without guarantee or warrantee expressed or implied. This
+ program is -not- in the public domain. */
+
+#include <GL/gl.h>
+
+typedef struct {
+ unsigned short c; /* Potentially support 16-bit glyphs. */
+ unsigned char width;
+ unsigned char height;
+ signed char xoffset;
+ signed char yoffset;
+ signed char advance;
+ char dummy; /* Space holder for alignment reasons. */
+ short x;
+ short y;
+} TexGlyphInfo;
+
+typedef struct {
+ GLfloat t0[2];
+ GLshort v0[2];
+ GLfloat t1[2];
+ GLshort v1[2];
+ GLfloat t2[2];
+ GLshort v2[2];
+ GLfloat t3[2];
+ GLshort v3[2];
+ GLfloat advance;
+} TexGlyphVertexInfo;
+
+typedef struct {
+ GLuint texobj;
+ int tex_width;
+ int tex_height;
+ int max_ascent;
+ int max_descent;
+ int num_glyphs;
+ int min_glyph;
+ int range;
+ unsigned char *teximage;
+ TexGlyphInfo *tgi;
+ TexGlyphVertexInfo *tgvi;
+ TexGlyphVertexInfo **lut;
+} TexFont;
+
+extern void txfRenderGlyph(TexFont */* txf */,
+ int /* c */);
+
+extern void txfRenderString(TexFont */* txf */,
+ unsigned char */* string */,
+ int /* len */);
+extern void txfRenderFancyString(TexFont */* txf */,
+ unsigned char */* string */,
+ int /* len */);
+#endif
#endif /* _Draw_h */