1 | /* |
---|
2 | * Copyright (C) 2000 Helix Code Inc. |
---|
3 | * |
---|
4 | * Authors: Michael Zucchi <notzed@helixcode.com> |
---|
5 | * |
---|
6 | * An embedded html widget. |
---|
7 | * |
---|
8 | * This program is free software; you can redistribute it and/or |
---|
9 | * modify it under the terms of the GNU Library General Public License |
---|
10 | * as published by the Free Software Foundation; either version 2 of |
---|
11 | * the License, or (at your option) any later version. |
---|
12 | * |
---|
13 | * This program is distributed in the hope that it will be useful, |
---|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | * GNU Library General Public License for more details. |
---|
17 | * |
---|
18 | * You should have received a copy of the GNU Library General Public |
---|
19 | * License along with this program; if not, write to the Free Software |
---|
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
21 | */ |
---|
22 | |
---|
23 | #ifndef _GTK_HTML_EMBEDDED_H |
---|
24 | #define _GTK_HTML_EMBEDDED_H |
---|
25 | |
---|
26 | #include <gtk/gtkbin.h> |
---|
27 | #include <libgnome/gnome-defs.h> |
---|
28 | |
---|
29 | #include "gtkhtml-types.h" |
---|
30 | |
---|
31 | #define GTK_HTML_EMBEDDED(obj) GTK_CHECK_CAST (obj, gtk_html_embedded_get_type (), GtkHTMLEmbedded) |
---|
32 | #define GTK_HTML_EMBEDDED_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_html_embedded_get_type (), GtkHTMLEmbeddedClass) |
---|
33 | #define GTK_IS_HTML_EMBEDDED(obj) GTK_CHECK_TYPE (obj, gtk_html_embedded_get_type ()) |
---|
34 | |
---|
35 | struct _GtkHTMLEmbedded { |
---|
36 | GtkBin bin; |
---|
37 | |
---|
38 | /* class id of this object */ |
---|
39 | char *classid; |
---|
40 | char *name; |
---|
41 | char *type; |
---|
42 | char *data; |
---|
43 | |
---|
44 | /* parameters to class */ |
---|
45 | int width, height; |
---|
46 | GHashTable *params; |
---|
47 | |
---|
48 | GtkHTMLEmbeddedPrivate *priv; |
---|
49 | |
---|
50 | int descent; |
---|
51 | }; |
---|
52 | |
---|
53 | struct _GtkHTMLEmbeddedClass { |
---|
54 | GtkBinClass parent_class; |
---|
55 | |
---|
56 | void (*changed)(GtkHTMLEmbedded *); |
---|
57 | void (*draw_gdk)(GtkHTMLEmbedded *, GdkPixmap *, GdkGC *, |
---|
58 | gint, gint); |
---|
59 | void (*draw_print)(GtkHTMLEmbedded *, GnomePrintContext *); |
---|
60 | }; |
---|
61 | |
---|
62 | /* FIXME: There needs to be a way for embedded objects in forms to encode |
---|
63 | themselves for a form */ |
---|
64 | |
---|
65 | guint gtk_html_embedded_get_type (void); |
---|
66 | GtkWidget *gtk_html_embedded_new (char *classid, char *name, char *type, char *data, int width, int height); |
---|
67 | |
---|
68 | void gtk_html_embedded_set_parameter (GtkHTMLEmbedded *ge, char *param, char *value); |
---|
69 | char *gtk_html_embedded_get_parameter (GtkHTMLEmbedded *ge, char *param); |
---|
70 | void gtk_html_embedded_set_descent (GtkHTMLEmbedded *ge, int descent); |
---|
71 | |
---|
72 | #endif /* ! _GTK_HTML_EMBEDDED_H */ |
---|