1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
---|
2 | /* This file is part of the KDE libraries |
---|
3 | Copyright (C) 1997 Martin Jones (mjones@kde.org) |
---|
4 | (C) 1997 Torben Weis (weis@kde.org) |
---|
5 | |
---|
6 | This library is free software; you can redistribute it and/or |
---|
7 | modify it under the terms of the GNU Library General Public |
---|
8 | License as published by the Free Software Foundation; either |
---|
9 | version 2 of the License, or (at your option) any later version. |
---|
10 | |
---|
11 | This library is distributed in the hope that it will be useful, |
---|
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
14 | Library General Public License for more details. |
---|
15 | |
---|
16 | You should have received a copy of the GNU Library General Public License |
---|
17 | along with this library; see the file COPYING.LIB. If not, write to |
---|
18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
19 | Boston, MA 02111-1307, USA. |
---|
20 | */ |
---|
21 | #ifndef _HTMLTEXTSLAVE_H_ |
---|
22 | #define _HTMLTEXTSLAVE_H_ |
---|
23 | |
---|
24 | #include "htmlobject.h" |
---|
25 | #include "htmltext.h" |
---|
26 | |
---|
27 | #define HTML_TEXT_SLAVE(x) ((HTMLTextSlave *) (x)) |
---|
28 | #define HTML_TEXT_SLAVE_CLASS(x) ((HTMLTextSlaveClass *) (x)) |
---|
29 | #define HTML_IS_TEXT_SLAVE(x) (HTML_CHECK_TYPE ((x), HTML_TYPE_TEXTSLAVE)) |
---|
30 | |
---|
31 | struct _HTMLTextSlave { |
---|
32 | HTMLObject object; |
---|
33 | |
---|
34 | HTMLText *owner; |
---|
35 | guint posStart; |
---|
36 | guint posLen; |
---|
37 | gchar *charStart; |
---|
38 | |
---|
39 | HTMLTextPangoInfo *pi; |
---|
40 | GList *glyphs; |
---|
41 | }; |
---|
42 | |
---|
43 | struct _HTMLTextSlaveClass { |
---|
44 | HTMLObjectClass object_class; |
---|
45 | }; |
---|
46 | |
---|
47 | void html_text_slave_type_init (void); |
---|
48 | void html_text_slave_class_init (HTMLTextSlaveClass *klass, |
---|
49 | HTMLType type, |
---|
50 | guint object_size); |
---|
51 | void html_text_slave_init (HTMLTextSlave *slave, |
---|
52 | HTMLTextSlaveClass *klass, |
---|
53 | HTMLText *owner, |
---|
54 | guint posStart, |
---|
55 | guint posLen); |
---|
56 | HTMLObject *html_text_slave_new (HTMLText *owner, |
---|
57 | guint posStart, |
---|
58 | guint posLen); |
---|
59 | gint html_text_slave_get_line_offset (HTMLTextSlave *slave, |
---|
60 | gint offset, |
---|
61 | HTMLPainter *p); |
---|
62 | char *html_text_slave_get_text (HTMLTextSlave *slave); |
---|
63 | gint html_text_slave_nb_width (HTMLTextSlave *slave, |
---|
64 | HTMLPainter *painter, |
---|
65 | gint words); |
---|
66 | gchar *html_text_slave_remove_leading_space (HTMLTextSlave *slave, |
---|
67 | HTMLPainter *painter, |
---|
68 | gboolean lineBegin); |
---|
69 | gint html_text_slave_get_nb_width (HTMLTextSlave *slave, |
---|
70 | HTMLPainter *painter, |
---|
71 | gboolean lineBegin); |
---|
72 | GList *html_get_glyphs_non_tab (GList *glyphs, |
---|
73 | PangoItem *item, |
---|
74 | gint ii, |
---|
75 | const gchar *text, |
---|
76 | gint bytes, |
---|
77 | gint len); |
---|
78 | #endif /* _HTMLTEXTSLAVE_H_ */ |
---|