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