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;
77 typedef gboolean (* GncHTMLObjectCB)(GncHtml* html, gpointer eb,
79 typedef gboolean (* GncHTMLStreamCB)(
const gchar* location, gchar** data,
int* datalen);
80 typedef gboolean (* GncHTMLUrlCB)(
const gchar* location,
const gchar* label,
91 gboolean gnc_html_register_urltype( URLType type,
const gchar* protocol );
96 void gnc_html_initialize(
void );
98 gchar* gnc_html_encode_string(
const gchar* in );
99 gchar* gnc_html_decode_string(
const gchar* in );
100 gchar* gnc_html_escape_newlines(
const gchar* in );
101 gchar* gnc_html_unescape_newlines(
const gchar* in );
105 void gnc_html_register_object_handler(
const gchar* classid, GncHTMLObjectCB hand );
106 void gnc_html_unregister_object_handler(
const gchar* classid );
109 void gnc_html_register_stream_handler( URLType url_type, GncHTMLStreamCB hand );
110 void gnc_html_unregister_stream_handler( URLType url_type );
113 void gnc_html_register_url_handler( URLType url_type, GncHTMLUrlCB hand );
114 void gnc_html_unregister_url_handler( URLType url_type );
116 #include "gnc-html-history.h" 118 typedef int (* GncHTMLUrltypeCB)(URLType ut);
119 typedef void (* GncHTMLFlyoverCB)(GncHtml* html,
const gchar* url,
121 typedef void (* GncHTMLLoadCB)(GncHtml* html, URLType type,
122 const gchar* location,
const gchar* label,
124 typedef int (* GncHTMLButtonCB)(GncHtml* html, GdkEventButton* event,
129 GtkBinClass parent_class;
132 void (*show_url)( GncHtml* html,
134 const gchar* location,
136 gboolean new_window_hint );
137 void (*show_data)( GncHtml* html,
const gchar* data,
int datalen );
138 void (*reload)( GncHtml* html, gboolean force_rebuild );
139 void (*copy_to_clipboard)( GncHtml* html );
140 gboolean (*export_to_file)( GncHtml* html,
const gchar* file );
142 void (*print) (GncHtml* html,
const gchar* jobname, gboolean export_pdf);
144 void (*print) (GncHtml* html,
const gchar* jobname);
146 void (*cancel)( GncHtml* html );
147 URLType (*parse_url)( GncHtml* html,
const gchar* url,
148 gchar** url_location, gchar** url_label );
149 void (*set_parent)( GncHtml* html, GtkWindow* parent );
154 GtkBin parent_instance;
157 GncHtmlPrivate* priv;
165 void gnc_html_destroy( GncHtml* html );
172 void gnc_html_show_url( GncHtml* html, URLType type,
const gchar* location,
173 const gchar* label, gboolean new_window_hint );
180 void gnc_html_show_data( GncHtml* html,
const gchar* data,
int datalen );
188 void gnc_html_reload( GncHtml* html, gboolean view );
195 void gnc_html_copy_to_clipboard( GncHtml* html );
204 gboolean gnc_html_export_to_file( GncHtml* html,
const gchar* filename );
216 void gnc_html_print (GncHtml* html,
const char* jobname, gboolean export_pdf);
223 void gnc_html_print (GncHtml* html,
const char* jobname);
230 void gnc_html_cancel( GncHtml* html );
240 URLType gnc_html_parse_url( GncHtml* html,
const gchar* url,
241 gchar** url_location, gchar** url_label );
249 gnc_html_history* gnc_html_get_history( GncHtml* html );
257 GtkWidget* gnc_html_get_widget( GncHtml* html );
265 GtkWidget* gnc_html_get_webview( GncHtml* html );
274 void gnc_html_set_parent( GncHtml* html, GtkWindow* parent );
277 void gnc_html_set_urltype_cb( GncHtml* html, GncHTMLUrltypeCB urltype_cb );
278 void gnc_html_set_load_cb( GncHtml* html, GncHTMLLoadCB load_cb, gpointer data );
279 void gnc_html_set_flyover_cb( GncHtml* html, GncHTMLFlyoverCB newwin_cb, gpointer data );
280 void gnc_html_set_button_cb( GncHtml* html, GncHTMLButtonCB button_cb, gpointer data );
284 void gnc_html_register_object_handler(
const gchar* classid, GncHTMLObjectCB hand );
285 void gnc_html_unregister_object_handler(
const gchar* classid );
288 void gnc_html_register_stream_handler( URLType url_type, GncHTMLStreamCB hand );
289 void gnc_html_unregister_stream_handler( URLType url_type );
292 void gnc_html_register_url_handler( URLType url_type, GncHTMLUrlCB hand );
293 void gnc_html_unregister_url_handler( URLType url_type );
295 const gchar* gnc_html_get_embedded_param( gpointer eb,
const gchar* param_name );