2003-06-30 12:44:03 +00: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 2003 Phil Mellor <monkeyson@users.sourceforge.net>
|
2004-02-25 15:12:58 +00:00
|
|
|
* Copyright 2004 James Bursa <bursa@users.sourceforge.net>
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** \file
|
|
|
|
* Interface to platform-specific gui functions.
|
2002-09-11 14:24:02 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _NETSURF_DESKTOP_GUI_H_
|
|
|
|
#define _NETSURF_DESKTOP_GUI_H_
|
|
|
|
|
2003-08-28 19:21:27 +00:00
|
|
|
struct gui_window;
|
2004-06-27 23:24:11 +00:00
|
|
|
struct gui_download_window;
|
2003-08-28 19:21:27 +00:00
|
|
|
typedef struct gui_window gui_window;
|
2004-04-01 00:26:05 +00:00
|
|
|
typedef enum { GUI_POINTER_DEFAULT, GUI_POINTER_POINT, GUI_POINTER_CARET,
|
2004-04-02 23:12:26 +00:00
|
|
|
GUI_POINTER_MENU, GUI_POINTER_UD, GUI_POINTER_LR,
|
|
|
|
GUI_POINTER_LD, GUI_POINTER_RD, GUI_POINTER_CROSS,
|
|
|
|
GUI_POINTER_MOVE } gui_pointer_shape;
|
2003-07-17 23:01:02 +00:00
|
|
|
|
2003-11-06 19:41:41 +00:00
|
|
|
#include <stdbool.h>
|
2004-04-24 23:42:32 +00:00
|
|
|
#include "netsurf/content/content.h"
|
2002-09-11 14:24:02 +00:00
|
|
|
#include "netsurf/desktop/browser.h"
|
|
|
|
|
2004-05-25 10:42:28 +00:00
|
|
|
gui_window *gui_create_browser_window(struct browser_window *bw,
|
|
|
|
struct browser_window *clone);
|
2002-09-11 14:24:02 +00:00
|
|
|
void gui_window_destroy(gui_window* g);
|
2003-03-03 22:40:39 +00:00
|
|
|
void gui_window_redraw(gui_window* g, unsigned long x0, unsigned long y0,
|
|
|
|
unsigned long x1, unsigned long y1);
|
2002-09-11 14:24:02 +00:00
|
|
|
void gui_window_redraw_window(gui_window* g);
|
2004-04-24 23:42:32 +00:00
|
|
|
void gui_window_update_box(gui_window *g, const union content_msg_data *data);
|
2003-03-04 11:59:36 +00:00
|
|
|
void gui_window_set_scroll(gui_window* g, unsigned long sx, unsigned long sy);
|
2003-03-03 22:40:39 +00:00
|
|
|
unsigned long gui_window_get_width(gui_window* g);
|
|
|
|
void gui_window_set_extent(gui_window* g, unsigned long width, unsigned long height);
|
|
|
|
void gui_window_set_status(gui_window* g, const char* text);
|
2004-04-01 00:26:05 +00:00
|
|
|
void gui_window_set_pointer(gui_pointer_shape shape);
|
2003-01-11 17:33:31 +00:00
|
|
|
void gui_window_set_title(gui_window* g, char* title);
|
2003-12-26 00:17:55 +00:00
|
|
|
void gui_window_set_url(gui_window *g, char *url);
|
2002-09-11 14:24:02 +00:00
|
|
|
|
2004-06-27 23:24:11 +00:00
|
|
|
struct gui_download_window *gui_download_window_create(const char *url,
|
|
|
|
const char *mime_type, struct fetch *fetch,
|
|
|
|
unsigned int total_size);
|
|
|
|
void gui_download_window_data(struct gui_download_window *dw, const char *data,
|
|
|
|
unsigned int size);
|
|
|
|
void gui_download_window_error(struct gui_download_window *dw,
|
|
|
|
const char *error_msg);
|
|
|
|
void gui_download_window_done(struct gui_download_window *dw);
|
2003-08-28 19:21:27 +00:00
|
|
|
|
2002-09-11 14:24:02 +00:00
|
|
|
void gui_init(int argc, char** argv);
|
2004-05-04 22:23:44 +00:00
|
|
|
void gui_window_clone_options(struct browser_window *new_bw, struct browser_window *old_bw);
|
|
|
|
void gui_window_default_options(struct browser_window *bw);
|
2002-09-11 14:24:02 +00:00
|
|
|
void gui_multitask(void);
|
2003-11-06 19:41:41 +00:00
|
|
|
void gui_poll(bool active);
|
2003-11-07 23:51:13 +00:00
|
|
|
void gui_quit(void);
|
2002-09-11 14:24:02 +00:00
|
|
|
|
2002-10-15 10:41:12 +00:00
|
|
|
void gui_window_start_throbber(gui_window* g);
|
|
|
|
void gui_window_stop_throbber(gui_window* g);
|
|
|
|
|
2003-10-25 00:35:49 +00:00
|
|
|
void gui_gadget_combo(struct browser_window* bw, struct form_control* g, unsigned long mx, unsigned long my);
|
2003-06-01 23:02:56 +00:00
|
|
|
|
2003-09-22 21:55:08 +00:00
|
|
|
void gui_window_place_caret(gui_window *g, int x, int y, int height);
|
|
|
|
|
2004-05-13 14:39:43 +00:00
|
|
|
void gui_launch_url(const char *url);
|
2004-04-02 00:41:10 +00:00
|
|
|
|
2002-09-11 14:24:02 +00:00
|
|
|
#endif
|