1 #ifndef __GL_CANVAS_HACKTEXT_H__
2 #define __GL_CANVAS_HACKTEXT_H__
4 /* Hacktext item type for GnomeCanvas widget
6 * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is
7 * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties.
9 * Copyright (C) 1998,1999 The Free Software Foundation
11 * Authors: Federico Mena <federico@nuclecu.unam.mx>
12 * Raph Levien <raph@acm.org>
19 /* Hacktext item for the canvas. The API is totally unstable - it needs to be replaced with one
20 * that supports Unicode and the merged GnomeText/GScript API. However, I need a text item now,
21 * and the GnomeText/GScript integration is going to take a bit more effort.
23 * The following object arguments are available:
25 * name type read/write description
26 * ------------------------------------------------------------------------------------------
27 * text char * RW The string of the text item.
28 * glyphlist GnomeGlyphList * W Glyphlist
29 * fill_color string W X color specification for fill color,
30 * or NULL pointer for no color (transparent).
31 * fill_color_gdk GdkColor* RW Allocated GdkColor for fill.
34 #define GL_TYPE_CANVAS_HACKTEXT (gl_canvas_hacktext_get_type ())
35 #define GL_CANVAS_HACKTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_CANVAS_HACKTEXT, glCanvasHacktext))
36 #define GL_CANVAS_HACKTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_CANVAS_HACKTEXT, glCanvasHacktextClass))
37 #define GL_IS_CANVAS_HACKTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_CANVAS_HACKTEXT))
38 #define GL_IS_CANVAS_HACKTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_CANVAS_HACKTEXT))
40 typedef struct _glCanvasHacktext glCanvasHacktext;
41 typedef struct _glCanvasHacktextPriv glCanvasHacktextPriv;
42 typedef struct _glCanvasHacktextClass glCanvasHacktextClass;
44 #include <libgnomecanvas/libgnomecanvas.h>
46 struct _glCanvasHacktext {
49 char *text; /* String of the text item */
50 guint fill_color; /* Fill color, RGBA */
51 gulong fill_pixel; /* Color for fill */
52 guint fill_set : 1; /* Is fill color set? */
54 double size; /* size in user units */
55 double x, y; /* x, y coords of text origin */
56 /* Antialiased specific stuff follows */
57 guint32 fill_rgba; /* RGBA color for filling */
58 glCanvasHacktextPriv *priv; /* Private data */
61 struct _glCanvasHacktextClass {
62 GnomeCanvasItemClass parent_class;
66 GType gl_canvas_hacktext_get_type (void);