32 #include <glib-object.h>
36 #define GNC_TYPE_HTML (gnc_html_get_type())
37 #define GNC_HTML(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_HTML, GncHtml))
38 #define GNC_HTML_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GNC_TYPE_HTML, GncHtmlClass))
39 #define GNC_IS_HTML(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GNC_TYPE_HTML))
40 #define GNC_IS_HTML_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((o), GNC_TYPE_HTML))
41 #define GNC_HTML_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GNC_TYPE_HTML, GncHtmlClass))
43 GType gnc_html_get_type(
void);
49 #include "gnc-html-extras.h"
57 gboolean load_to_stream;
74 typedef gboolean (* GncHTMLObjectCB)(
GncHtml* html, gpointer eb,
76 typedef gboolean (* GncHTMLStreamCB)(
const gchar* location, gchar** data,
int* datalen);
77 typedef gboolean (* GncHTMLUrlCB)(
const gchar* location,
const gchar* label,
88 gboolean gnc_html_register_urltype( URLType type,
const gchar* protocol );
93 void gnc_html_initialize(
void );
95 gchar* gnc_html_encode_string(
const gchar* in );
96 gchar* gnc_html_decode_string(
const gchar* in );
97 gchar* gnc_html_escape_newlines(
const gchar* in );
98 gchar* gnc_html_unescape_newlines(
const gchar* in );
102 void gnc_html_register_object_handler(
const gchar* classid, GncHTMLObjectCB hand );
103 void gnc_html_unregister_object_handler(
const gchar* classid );
106 void gnc_html_register_stream_handler( URLType url_type, GncHTMLStreamCB hand );
107 void gnc_html_unregister_stream_handler( URLType url_type );
110 void gnc_html_register_url_handler( URLType url_type, GncHTMLUrlCB hand );
111 void gnc_html_unregister_url_handler( URLType url_type );
113 #include "gnc-html-history.h"
115 typedef int (* GncHTMLUrltypeCB)(URLType ut);
116 typedef void (* GncHTMLFlyoverCB)(
GncHtml* html,
const gchar* url,
118 typedef void (* GncHTMLLoadCB)(
GncHtml* html, URLType type,
119 const gchar* location,
const gchar* label,
121 typedef int (* GncHTMLButtonCB)(
GncHtml* html, GdkEventButton* event,
126 GtkBinClass parent_class;
129 void (*show_url)(
GncHtml* html,
131 const gchar* location,
133 gboolean new_window_hint );
134 void (*show_data)(
GncHtml* html,
const gchar* data,
int datalen );
135 void (*reload)(
GncHtml* html );
136 void (*copy_to_clipboard)(
GncHtml* html );
137 gboolean (*export_to_file)(
GncHtml* html,
const gchar* file );
138 void (*print)(
GncHtml* html,
const gchar* jobname, gboolean export_pdf );
139 void (*cancel)(
GncHtml* html );
140 URLType (*parse_url)(
GncHtml* html,
const gchar* url,
141 gchar** url_location, gchar** url_label );
142 void (*set_parent)(
GncHtml* html, GtkWindow* parent );
147 GtkBin parent_instance;
158 void gnc_html_destroy(
GncHtml* html );
165 void gnc_html_show_url(
GncHtml* html, URLType type,
const gchar* location,
166 const gchar* label, gboolean new_window_hint );
173 void gnc_html_show_data(
GncHtml* html,
const gchar* data,
int datalen );
180 void gnc_html_reload(
GncHtml* html );
187 void gnc_html_copy_to_clipboard(
GncHtml* html );
196 gboolean gnc_html_export_to_file(
GncHtml* html,
const gchar* filename );
206 void gnc_html_print(
GncHtml* html,
const gchar* jobname, gboolean export_pdf );
213 void gnc_html_cancel(
GncHtml* html );
223 URLType gnc_html_parse_url(
GncHtml* html,
const gchar* url,
224 gchar** url_location, gchar** url_label );
240 GtkWidget* gnc_html_get_widget(
GncHtml* html );
248 void gnc_html_set_parent(
GncHtml* html, GtkWindow* parent );
251 void gnc_html_set_urltype_cb(
GncHtml* html, GncHTMLUrltypeCB urltype_cb );
252 void gnc_html_set_load_cb(
GncHtml* html, GncHTMLLoadCB load_cb, gpointer data );
253 void gnc_html_set_flyover_cb(
GncHtml* html, GncHTMLFlyoverCB newwin_cb, gpointer data );
254 void gnc_html_set_button_cb(
GncHtml* html, GncHTMLButtonCB button_cb, gpointer data );
258 void gnc_html_register_object_handler(
const gchar* classid, GncHTMLObjectCB hand );
259 void gnc_html_unregister_object_handler(
const gchar* classid );
262 void gnc_html_register_stream_handler( URLType url_type, GncHTMLStreamCB hand );
263 void gnc_html_unregister_stream_handler( URLType url_type );
266 void gnc_html_register_url_handler( URLType url_type, GncHTMLUrlCB hand );
267 void gnc_html_unregister_url_handler( URLType url_type );
269 const gchar* gnc_html_get_embedded_param( gpointer eb,
const gchar* param_name );