2004-06-22 22:48:33 +04:00
|
|
|
/*
|
|
|
|
* This file is part of NetSurf, http://netsurf.sourceforge.net/
|
|
|
|
* Licensed under the GNU General Public License,
|
|
|
|
* http://www.opensource.org/licenses/gpl-license
|
|
|
|
* Copyright 2004 James Bursa <bursa@users.sourceforge.net>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <gdk/gdkkeysyms.h>
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#include "netsurf/content/content.h"
|
2004-08-15 23:10:08 +04:00
|
|
|
#include "netsurf/desktop/401login.h"
|
2004-06-22 22:48:33 +04:00
|
|
|
#include "netsurf/desktop/browser.h"
|
2004-07-22 16:03:37 +04:00
|
|
|
#include "netsurf/desktop/gui.h"
|
2004-06-22 22:48:33 +04:00
|
|
|
#include "netsurf/desktop/netsurf.h"
|
|
|
|
#include "netsurf/render/box.h"
|
|
|
|
#include "netsurf/render/form.h"
|
|
|
|
#include "netsurf/utils/messages.h"
|
|
|
|
#include "netsurf/utils/utils.h"
|
|
|
|
|
|
|
|
|
|
|
|
bool gui_in_multitask = false;
|
|
|
|
|
|
|
|
|
|
|
|
void gui_init(int argc, char** argv)
|
|
|
|
{
|
|
|
|
gtk_init(&argc, &argv);
|
|
|
|
messages_load("messages");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-09-27 09:21:00 +04:00
|
|
|
void gui_init2(int argc, char** argv)
|
2004-06-22 22:48:33 +04:00
|
|
|
{
|
2004-10-02 01:31:55 +04:00
|
|
|
browser_window_create("http://netsurf.sourceforge.net/", 0, 0);
|
2004-07-29 03:14:04 +04:00
|
|
|
}
|
|
|
|
|
2004-06-22 22:48:33 +04:00
|
|
|
|
2004-07-29 03:14:04 +04:00
|
|
|
void gui_poll(bool active)
|
|
|
|
{
|
2004-10-18 01:51:06 +04:00
|
|
|
gtk_main_iteration_do(!active);
|
2004-06-22 22:48:33 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void gui_multitask(void)
|
|
|
|
{
|
|
|
|
gui_in_multitask = true;
|
|
|
|
while (gtk_events_pending())
|
2004-10-18 01:51:06 +04:00
|
|
|
gtk_main_iteration();
|
2004-06-22 22:48:33 +04:00
|
|
|
gui_in_multitask = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void gui_quit(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-07-22 16:03:37 +04:00
|
|
|
struct gui_download_window *gui_download_window_create(const char *url,
|
|
|
|
const char *mime_type, struct fetch *fetch,
|
|
|
|
unsigned int total_size)
|
2004-06-22 22:48:33 +04:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-07-22 16:03:37 +04:00
|
|
|
void gui_download_window_data(struct gui_download_window *dw, const char *data,
|
|
|
|
unsigned int size)
|
2004-06-22 22:48:33 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-07-22 16:03:37 +04:00
|
|
|
void gui_download_window_error(struct gui_download_window *dw,
|
|
|
|
const char *error_msg)
|
2004-06-22 22:48:33 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-07-22 16:03:37 +04:00
|
|
|
void gui_download_window_done(struct gui_download_window *dw)
|
2004-06-22 22:48:33 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-07-22 16:03:37 +04:00
|
|
|
void gui_create_form_select_menu(struct browser_window *bw,
|
|
|
|
struct form_control *control)
|
2004-06-22 22:48:33 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void gui_launch_url(const char *url)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void warn_user(const char *warning, const char *detail)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void die(const char * const error)
|
|
|
|
{
|
|
|
|
fprintf(stderr, error);
|
|
|
|
exit(EXIT_FAILURE);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-07-22 16:03:37 +04:00
|
|
|
void hotlist_visited(struct content *content)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-06-22 22:48:33 +04:00
|
|
|
struct history *history_create(void) { return 0; }
|
2004-08-15 23:10:08 +04:00
|
|
|
void history_add(struct history *history, struct content *content,
|
|
|
|
char *frag_id) {}
|
2004-06-22 22:48:33 +04:00
|
|
|
void history_update(struct history *history, struct content *content) {}
|
|
|
|
void history_destroy(struct history *history) {}
|
|
|
|
void history_back(struct browser_window *bw, struct history *history) {}
|
|
|
|
void history_forward(struct browser_window *bw, struct history *history) {}
|
|
|
|
|
|
|
|
void gui_401login_open(struct browser_window *bw, struct content *c,
|
|
|
|
char *realm) {}
|
2004-09-04 02:44:48 +04:00
|
|
|
|
|
|
|
void schedule(int t, void (*callback)(void *p), void *p) {}
|
|
|
|
void schedule_remove(void (*callback)(void *p), void *p) {}
|
|
|
|
void schedule_run(void) {}
|