/*
 * Gnophone: A client for the Asterisk PBX
 *
 * Copyright (C) 2000, Linux Support Services, Inc.
 *
 * Written by Mark Spencer
 *
 * Linux/UNIX version distributed under the terms of
 * the GNU General Public License
 *
 * htmlengine.h: Definitions for the back-end html engine
 *
 */

#ifndef _GNOPHONE_HTMLENGINE_H
#define _GNOPHONE_HTMLENGINE_H

#include <gtk/gtk.h>

#ifndef DONT_DEFINE_BROWSER
struct html_pvt;

struct browser {
	struct html_pvt *pvt;
};
#endif

struct html_engine {
	char name[80];
	GtkWidget* (*new_engine)(struct browser *b);	/* Return a new engine widget */
	int (*can_go_back)(struct browser *b);
	int (*can_go_forward)(struct browser *b);
	void (*go_back)(struct browser *b);
	void (*go_forward)(struct browser *b);
	void (*reload)(struct browser *b, int force);
	void (*loadurl)(struct browser *b, char *uri);
	void (*stop)(struct browser *b);
	struct html_engine *next;
};

extern struct html_engine *engine, *engines;

extern int html_register_engine(struct html_engine *e);
extern int html_select(struct html_engine *e);
extern void html_display_new_location(struct browser *b, char *s);
extern void html_display_new_title(struct browser *b, char *s);
extern void html_display_load_started(struct browser *b);
extern void html_display_load_finished(struct browser *b);
extern void html_setstatus(struct browser *b, char *s);
extern void html_update_progress(struct browser *b, int cur, int max);
extern void html_display_link(struct browser *b, char *s);

extern int mozilla_html_init(void);
extern int html_select_engine(struct html_engine *e);
#endif
