1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
---|
2 | /* |
---|
3 | * gnome-canvas-hacktext.c: Hacktext CanvasItem, used for the PrintPreview context |
---|
4 | * |
---|
5 | * This program is free software; you can redistribute it and/or |
---|
6 | * modify it under the terms of the GNU Library General Public License |
---|
7 | * as published by the Free Software Foundation; either version 2 of |
---|
8 | * the License, or (at your option) any later version. |
---|
9 | * |
---|
10 | * This program is distributed in the hope that it will be useful, |
---|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | * GNU Library General Public License for more details. |
---|
14 | * |
---|
15 | * You should have received a copy of the GNU Library General Public |
---|
16 | * License along with this program; if not, write to the Free Software |
---|
17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
18 | * |
---|
19 | * Authors: |
---|
20 | * Federico Mena <federico@nuclecu.unam.mx> |
---|
21 | * Raph Levien <raph@acm.org> |
---|
22 | * Lauris Kaplinski <lauris@helixcode.com> |
---|
23 | * |
---|
24 | * Copyright (C) 1998-1999 The Free Software Foundation |
---|
25 | * Copyright (C) 2000-2002 Ximian Inc. |
---|
26 | * |
---|
27 | */ |
---|
28 | |
---|
29 | #ifndef __GNOME_CANVAS_HACKTEXT_H__ |
---|
30 | #define __GNOME_CANVAS_HACKTEXT_H__ |
---|
31 | |
---|
32 | #include <glib.h> |
---|
33 | |
---|
34 | G_BEGIN_DECLS |
---|
35 | |
---|
36 | /* Hacktext item for the canvas. The API is totally unstable - it needs to be replaced with one |
---|
37 | * that supports Unicode and the merged GnomeText/GScript API. However, I need a text item now, |
---|
38 | * and the GnomeText/GScript integration is going to take a bit more effort. |
---|
39 | * |
---|
40 | * The following object arguments are available: |
---|
41 | * |
---|
42 | * name type read/write description |
---|
43 | * ------------------------------------------------------------------------------------------ |
---|
44 | * text char * RW The string of the text item. |
---|
45 | * glyphlist GnomeGlyphList * W Glyphlist |
---|
46 | * fill_color string W X color specification for fill color, |
---|
47 | * or NULL pointer for no color (transparent). |
---|
48 | * fill_color_gdk GdkColor* RW Allocated GdkColor for fill. |
---|
49 | */ |
---|
50 | |
---|
51 | #define GNOME_TYPE_CANVAS_HACKTEXT (gnome_canvas_hacktext_get_type ()) |
---|
52 | #define GNOME_CANVAS_HACKTEXT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNOME_TYPE_CANVAS_HACKTEXT, GnomeCanvasHacktext)) |
---|
53 | #define GNOME_CANVAS_HACKTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNOME_TYPE_CANVAS_HACKTEXT, GnomeCanvasHacktextClass)) |
---|
54 | #define GNOME_IS_CANVAS_HACKTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNOME_TYPE_CANVAS_HACKTEXT)) |
---|
55 | #define GNOME_IS_CANVAS_HACKTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNOME_TYPE_CANVAS_HACKTEXT)) |
---|
56 | |
---|
57 | typedef struct _GnomeCanvasHacktext GnomeCanvasHacktext; |
---|
58 | typedef struct _GnomeCanvasHacktextPriv GnomeCanvasHacktextPriv; |
---|
59 | typedef struct _GnomeCanvasHacktextClass GnomeCanvasHacktextClass; |
---|
60 | |
---|
61 | #include <libgnomecanvas/libgnomecanvas.h> |
---|
62 | |
---|
63 | struct _GnomeCanvasHacktext { |
---|
64 | GnomeCanvasItem item; |
---|
65 | |
---|
66 | char *text; /* String of the text item */ |
---|
67 | guint fill_color; /* Fill color, RGBA */ |
---|
68 | gulong fill_pixel; /* Color for fill */ |
---|
69 | guint fill_set : 1; /* Is fill color set? */ |
---|
70 | |
---|
71 | double size; /* size in user units */ |
---|
72 | double x, y; /* x, y coords of text origin */ |
---|
73 | |
---|
74 | /* Antialiased specific stuff follows */ |
---|
75 | guint32 fill_rgba; /* RGBA color for filling */ |
---|
76 | GnomeCanvasHacktextPriv *priv; /* Private data */ |
---|
77 | }; |
---|
78 | |
---|
79 | struct _GnomeCanvasHacktextClass { |
---|
80 | GnomeCanvasItemClass parent_class; |
---|
81 | }; |
---|
82 | |
---|
83 | GType gnome_canvas_hacktext_get_type (void); |
---|
84 | |
---|
85 | G_END_DECLS |
---|
86 | |
---|
87 | #endif /* __GNOME_CANVAS_HACKTEXT_H__ */ |
---|