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 HTMLEMBEDDED_H |
---|
22 | #define HTMLEMBEDDED_H |
---|
23 | |
---|
24 | #include <gtk/gtkwidget.h> |
---|
25 | #include "htmlobject.h" |
---|
26 | |
---|
27 | #define HTML_EMBEDDED(x) ((HTMLEmbedded *)(x)) |
---|
28 | #define HTML_EMBEDDED_CLASS(x) ((HTMLEmbeddedClass *)(x)) |
---|
29 | |
---|
30 | struct _HTMLEmbedded { |
---|
31 | HTMLObject object; |
---|
32 | |
---|
33 | gchar *name; |
---|
34 | gchar *value; |
---|
35 | HTMLForm *form; |
---|
36 | GtkWidget *widget, *parent; |
---|
37 | gint width, height; |
---|
38 | |
---|
39 | gint abs_x, abs_y; |
---|
40 | guint changed_id; |
---|
41 | }; |
---|
42 | |
---|
43 | struct _HTMLEmbeddedClass { |
---|
44 | HTMLObjectClass object_class; |
---|
45 | |
---|
46 | |
---|
47 | void (*reset) (HTMLEmbedded *element); |
---|
48 | gchar *(*encode) (HTMLEmbedded *element); |
---|
49 | void (*reparent) (HTMLEmbedded *element, GtkWidget *new_parent); |
---|
50 | }; |
---|
51 | |
---|
52 | |
---|
53 | extern HTMLEmbeddedClass html_embedded_class; |
---|
54 | |
---|
55 | |
---|
56 | void html_embedded_type_init (void); |
---|
57 | void html_embedded_class_init (HTMLEmbeddedClass *klass, |
---|
58 | HTMLType type, |
---|
59 | guint object_size); |
---|
60 | void html_embedded_init (HTMLEmbedded *element, |
---|
61 | HTMLEmbeddedClass *klass, |
---|
62 | GtkWidget *parent, |
---|
63 | gchar *name, |
---|
64 | gchar *value); |
---|
65 | void html_embedded_set_widget (HTMLEmbedded *element, |
---|
66 | GtkWidget *widget); |
---|
67 | GtkWidget *html_embedded_get_widget (HTMLEmbedded *element); |
---|
68 | gchar *html_embedded_get_name (HTMLEmbedded *element); |
---|
69 | void html_embedded_set_form (HTMLEmbedded *element, |
---|
70 | HTMLForm *form); |
---|
71 | void html_embedded_reset (HTMLEmbedded *element); |
---|
72 | void html_embedded_reparent (HTMLEmbedded *element, |
---|
73 | GtkWidget *new_parent); |
---|
74 | gchar *html_embedded_encode (HTMLEmbedded *element); |
---|
75 | gchar *html_embedded_encode_string (const gchar *str); |
---|
76 | HTMLEmbedded *html_embedded_new_widget (GtkWidget *parent, |
---|
77 | GtkHTMLEmbedded *eb, |
---|
78 | HTMLEngine *engine); |
---|
79 | gboolean html_object_is_embedded (HTMLObject *o); |
---|
80 | gboolean html_object_is_frame (HTMLObject *o); |
---|
81 | #endif /* HTMLEMBEDDED_H */ |
---|