2003-06-30 16:44:03 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2003 Phil Mellor <monkeyson@users.sourceforge.net>
|
2006-03-25 23:30:35 +03:00
|
|
|
* Copyright 2006 James Bursa <bursa@users.sourceforge.net>
|
2007-08-08 20:16:03 +04:00
|
|
|
*
|
|
|
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
|
|
|
*
|
|
|
|
* NetSurf is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* NetSurf is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2004-02-25 18:12:58 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
/** \file
|
|
|
|
* Browser window creation and manipulation (interface).
|
2002-09-11 18:24:02 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _NETSURF_DESKTOP_BROWSER_H_
|
|
|
|
#define _NETSURF_DESKTOP_BROWSER_H_
|
|
|
|
|
2008-05-16 13:37:22 +04:00
|
|
|
#include <inttypes.h>
|
2003-11-15 03:26:42 +03:00
|
|
|
#include <stdbool.h>
|
2003-02-28 14:49:13 +03:00
|
|
|
#include <time.h>
|
2009-08-14 14:37:33 +04:00
|
|
|
|
2011-06-15 00:00:18 +04:00
|
|
|
#include "content/content.h"
|
2010-06-04 13:35:08 +04:00
|
|
|
#include "desktop/gui.h"
|
|
|
|
#include "desktop/mouse.h"
|
2007-05-31 02:39:54 +04:00
|
|
|
#include "render/html.h"
|
2011-06-28 19:18:48 +04:00
|
|
|
#include "utils/types.h"
|
2002-09-11 18:24:02 +04:00
|
|
|
|
2004-02-25 18:12:58 +03:00
|
|
|
struct box;
|
2010-03-28 16:56:39 +04:00
|
|
|
struct hlcache_handle;
|
2005-04-15 22:00:21 +04:00
|
|
|
struct form;
|
2004-07-18 21:38:01 +04:00
|
|
|
struct form_control;
|
2004-07-17 17:00:38 +04:00
|
|
|
struct gui_window;
|
|
|
|
struct history;
|
2005-04-15 09:52:25 +04:00
|
|
|
struct selection;
|
2005-04-20 16:24:41 +04:00
|
|
|
struct browser_window;
|
2006-04-10 03:21:13 +04:00
|
|
|
struct url_data;
|
|
|
|
struct bitmap;
|
2009-08-14 14:37:33 +04:00
|
|
|
struct scroll_msg_data;
|
2010-06-04 13:35:08 +04:00
|
|
|
struct fetch_multipart_data;
|
2005-04-20 16:24:41 +04:00
|
|
|
|
2011-07-07 21:50:04 +04:00
|
|
|
typedef bool (*browser_caret_callback)(struct browser_window *bw, uint32_t key,
|
|
|
|
void *p1, void *p2);
|
2006-08-13 07:05:55 +04:00
|
|
|
typedef void (*browser_move_callback)(struct browser_window *bw,
|
2011-07-07 21:50:04 +04:00
|
|
|
void *p1, void *p2);
|
|
|
|
typedef bool (*browser_paste_callback)(struct browser_window *bw,
|
|
|
|
const char *utf8, unsigned utf8_len, bool last,
|
|
|
|
void *p1, void *p2);
|
2002-09-11 18:24:02 +04:00
|
|
|
|
2006-09-02 19:52:41 +04:00
|
|
|
|
2011-06-27 21:29:49 +04:00
|
|
|
typedef enum {
|
|
|
|
DRAGGING_NONE,
|
|
|
|
DRAGGING_SELECTION,
|
|
|
|
DRAGGING_PAGE_SCROLL,
|
|
|
|
DRAGGING_FRAME,
|
2011-07-06 00:13:28 +04:00
|
|
|
DRAGGING_SCR_X,
|
|
|
|
DRAGGING_SCR_Y,
|
2011-06-27 21:29:49 +04:00
|
|
|
DRAGGING_OTHER
|
|
|
|
} browser_drag_type;
|
|
|
|
|
|
|
|
|
2006-09-02 19:52:41 +04:00
|
|
|
|
2004-02-25 18:12:58 +03:00
|
|
|
/** Browser window data. */
|
2004-10-18 01:11:29 +04:00
|
|
|
struct browser_window {
|
2004-02-25 18:12:58 +03:00
|
|
|
/** Page currently displayed, or 0. Must have status READY or DONE. */
|
2010-03-28 16:56:39 +04:00
|
|
|
struct hlcache_handle *current_content;
|
2004-02-25 18:12:58 +03:00
|
|
|
/** Page being loaded, or 0. */
|
2010-03-28 16:56:39 +04:00
|
|
|
struct hlcache_handle *loading_content;
|
2002-09-11 18:24:02 +04:00
|
|
|
|
2004-02-25 18:12:58 +03:00
|
|
|
/** Window history structure. */
|
|
|
|
struct history *history;
|
2006-11-27 18:35:18 +03:00
|
|
|
|
2004-02-25 18:12:58 +03:00
|
|
|
/** Handler for keyboard input, or 0. */
|
2005-04-20 16:24:41 +04:00
|
|
|
browser_caret_callback caret_callback;
|
|
|
|
/** Handler for pasting text, or 0. */
|
|
|
|
browser_paste_callback paste_callback;
|
2006-08-13 07:05:55 +04:00
|
|
|
/** Handler for repositioning caret, or 0. */
|
|
|
|
browser_move_callback move_callback;
|
2005-04-20 16:24:41 +04:00
|
|
|
|
2011-07-07 21:50:04 +04:00
|
|
|
/** User parameters for caret_callback, paste_callback, and
|
|
|
|
* move_callback */
|
|
|
|
void *caret_p1;
|
|
|
|
void *caret_p2;
|
2002-09-11 18:24:02 +04:00
|
|
|
|
2004-07-17 17:00:38 +04:00
|
|
|
/** Platform specific window data. */
|
|
|
|
struct gui_window *window;
|
2004-02-25 18:12:58 +03:00
|
|
|
|
|
|
|
/** Busy indicator is active. */
|
|
|
|
bool throbbing;
|
|
|
|
/** Add loading_content to the window history when it loads. */
|
2009-04-05 23:17:24 +04:00
|
|
|
bool history_add;
|
2004-08-07 02:19:13 +04:00
|
|
|
|
2004-10-18 01:11:29 +04:00
|
|
|
/** Fragment identifier for current_content. */
|
2004-08-07 02:19:13 +04:00
|
|
|
char *frag_id;
|
2004-08-26 03:56:49 +04:00
|
|
|
|
2004-10-18 01:11:29 +04:00
|
|
|
/** Current drag status. */
|
2011-06-27 21:29:49 +04:00
|
|
|
browser_drag_type drag_type;
|
2004-10-18 01:11:29 +04:00
|
|
|
|
2011-08-24 22:22:22 +04:00
|
|
|
/** Current drag's browser window, when not in root bw. */
|
|
|
|
struct browser_window *drag_window;
|
|
|
|
|
2004-11-20 03:02:56 +03:00
|
|
|
/** Mouse position at start of current scroll drag. */
|
2006-09-02 19:52:41 +04:00
|
|
|
int drag_start_x;
|
|
|
|
int drag_start_y;
|
2004-11-20 03:02:56 +03:00
|
|
|
/** Scroll offsets at start of current scroll draw. */
|
2006-09-02 19:52:41 +04:00
|
|
|
int drag_start_scroll_x;
|
|
|
|
int drag_start_scroll_y;
|
|
|
|
/** Frame resize directions for current frame resize drag. */
|
|
|
|
unsigned int drag_resize_left : 1;
|
|
|
|
unsigned int drag_resize_right : 1;
|
|
|
|
unsigned int drag_resize_up : 1;
|
|
|
|
unsigned int drag_resize_down : 1;
|
2010-02-11 13:58:26 +03:00
|
|
|
|
2005-01-03 05:09:20 +03:00
|
|
|
/** Current fetch is download */
|
|
|
|
bool download;
|
2006-04-10 03:21:13 +04:00
|
|
|
|
2006-03-27 04:19:19 +04:00
|
|
|
/** Refresh interval (-1 if undefined) */
|
|
|
|
int refresh_interval;
|
2006-11-27 18:35:18 +03:00
|
|
|
|
2007-08-07 07:55:18 +04:00
|
|
|
/** Window has been resized, and content needs reformatting. */
|
|
|
|
bool reformat_pending;
|
|
|
|
|
2011-06-24 13:30:33 +04:00
|
|
|
/** Window dimensions */
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
|
2011-07-06 00:13:28 +04:00
|
|
|
struct scrollbar *scroll_x; /**< Horizontal scroll. */
|
|
|
|
struct scrollbar *scroll_y; /**< Vertical scroll. */
|
|
|
|
|
2007-08-07 07:55:18 +04:00
|
|
|
/** scale of window contents */
|
|
|
|
float scale;
|
|
|
|
|
2006-09-02 19:52:41 +04:00
|
|
|
/** Window characteristics */
|
|
|
|
enum {
|
2007-01-27 23:58:20 +03:00
|
|
|
BROWSER_WINDOW_NORMAL,
|
|
|
|
BROWSER_WINDOW_IFRAME,
|
|
|
|
BROWSER_WINDOW_FRAME,
|
|
|
|
BROWSER_WINDOW_FRAMESET,
|
|
|
|
} browser_window_type;
|
2006-11-27 18:35:18 +03:00
|
|
|
|
2006-09-02 19:52:41 +04:00
|
|
|
/** frameset characteristics */
|
|
|
|
int rows;
|
|
|
|
int cols;
|
2006-11-27 18:35:18 +03:00
|
|
|
|
2006-09-02 19:52:41 +04:00
|
|
|
/** frame dimensions */
|
|
|
|
struct frame_dimension frame_width;
|
|
|
|
struct frame_dimension frame_height;
|
|
|
|
int margin_width;
|
|
|
|
int margin_height;
|
2006-11-27 18:35:18 +03:00
|
|
|
|
2006-09-02 19:52:41 +04:00
|
|
|
/** frame name for targetting */
|
|
|
|
char *name;
|
2006-11-27 18:35:18 +03:00
|
|
|
|
2006-09-02 19:52:41 +04:00
|
|
|
/** frame characteristics */
|
|
|
|
bool no_resize;
|
|
|
|
frame_scrolling scrolling;
|
|
|
|
bool border;
|
|
|
|
colour border_colour;
|
2006-11-27 18:35:18 +03:00
|
|
|
|
2006-09-02 19:52:41 +04:00
|
|
|
/** iframe parent box */
|
|
|
|
struct box *box;
|
|
|
|
|
|
|
|
/** [cols * rows] children */
|
|
|
|
struct browser_window *children;
|
|
|
|
struct browser_window *parent;
|
2006-11-27 18:35:18 +03:00
|
|
|
|
2006-09-02 19:52:41 +04:00
|
|
|
/** [iframe_count] iframes */
|
|
|
|
int iframe_count;
|
|
|
|
struct browser_window *iframes;
|
2009-07-14 19:53:12 +04:00
|
|
|
|
2011-06-15 00:00:18 +04:00
|
|
|
/** browser window child of root browser window which has input focus */
|
|
|
|
struct browser_window *focus;
|
|
|
|
|
2009-07-14 19:53:12 +04:00
|
|
|
/** Last time a link was followed in this window */
|
|
|
|
unsigned int last_action;
|
2009-12-18 02:55:02 +03:00
|
|
|
|
2011-08-24 16:29:30 +04:00
|
|
|
/** Current selection, or NULL if none */
|
2011-07-13 17:20:26 +04:00
|
|
|
struct selection *cur_sel;
|
|
|
|
|
2011-08-24 16:29:30 +04:00
|
|
|
/** Current context for free text search, or NULL if none */
|
|
|
|
struct search_context *cur_search;
|
|
|
|
|
2010-02-11 13:58:26 +03:00
|
|
|
/** cache of the currently displayed status text. */
|
|
|
|
char *status_text; /**< Current status bar text. */
|
|
|
|
int status_text_len; /**< Length of the ::status_text buffer. */
|
|
|
|
int status_match; /**< Number of times an idempotent status-set operation was performed. */
|
|
|
|
int status_miss; /**< Number of times status was really updated. */
|
2002-09-11 18:24:02 +04:00
|
|
|
};
|
|
|
|
|
2007-08-07 07:55:18 +04:00
|
|
|
extern bool browser_reformat_pending;
|
2005-04-15 09:52:25 +04:00
|
|
|
|
2006-07-05 05:23:25 +04:00
|
|
|
struct browser_window * browser_window_create(const char *url,
|
2010-03-28 16:56:39 +04:00
|
|
|
struct browser_window *clone, const char *referrer,
|
|
|
|
bool history_add, bool new_tab);
|
2007-08-07 11:58:04 +04:00
|
|
|
void browser_window_initialise_common(struct browser_window *bw,
|
2010-03-28 16:56:39 +04:00
|
|
|
struct browser_window *clone);
|
2004-10-01 04:06:49 +04:00
|
|
|
void browser_window_go(struct browser_window *bw, const char *url,
|
2010-03-28 16:56:39 +04:00
|
|
|
const char *referrer, bool history_add);
|
2010-06-04 13:35:08 +04:00
|
|
|
void browser_window_go_post(struct browser_window *bw,
|
|
|
|
const char *url, char *post_urlenc,
|
|
|
|
struct fetch_multipart_data *post_multipart,
|
|
|
|
bool add_to_history, const char *referer, bool download,
|
|
|
|
bool verifiable, struct hlcache_handle *parent);
|
2007-01-27 23:58:20 +03:00
|
|
|
void browser_window_go_unverifiable(struct browser_window *bw,
|
2010-03-28 16:56:39 +04:00
|
|
|
const char *url, const char *referrer, bool history_add,
|
|
|
|
struct hlcache_handle *parent);
|
2011-06-15 00:00:18 +04:00
|
|
|
void browser_window_get_dimensions(struct browser_window *bw,
|
|
|
|
int *width, int *height, bool scaled);
|
2011-06-24 13:30:33 +04:00
|
|
|
void browser_window_set_dimensions(struct browser_window *bw,
|
|
|
|
int width, int height);
|
2009-01-30 08:07:07 +03:00
|
|
|
void browser_window_download(struct browser_window *bw,
|
2010-03-28 16:56:39 +04:00
|
|
|
const char *url, const char *referrer);
|
2009-04-05 23:17:24 +04:00
|
|
|
void browser_window_update(struct browser_window *bw, bool scroll_to_top);
|
2011-07-06 19:34:49 +04:00
|
|
|
void browser_window_update_box(struct browser_window *bw, struct rect *rect);
|
2004-02-25 18:12:58 +03:00
|
|
|
void browser_window_stop(struct browser_window *bw);
|
2004-06-29 23:08:19 +04:00
|
|
|
void browser_window_reload(struct browser_window *bw, bool all);
|
2004-02-25 18:12:58 +03:00
|
|
|
void browser_window_destroy(struct browser_window *bw);
|
2011-06-24 13:30:33 +04:00
|
|
|
void browser_window_reformat(struct browser_window *bw, bool background,
|
|
|
|
int width, int height);
|
2006-09-08 20:57:26 +04:00
|
|
|
void browser_window_set_scale(struct browser_window *bw, float scale, bool all);
|
2002-09-11 18:24:02 +04:00
|
|
|
|
2011-09-06 22:11:10 +04:00
|
|
|
/**
|
|
|
|
* Get access to any content, link URLs and objects (images) currently
|
|
|
|
* at the given (x, y) coordinates.
|
|
|
|
*
|
|
|
|
* \param bw browser window to look inside
|
|
|
|
* \param x x-coordinate of point of interest
|
|
|
|
* \param y y-coordinate of point of interest
|
|
|
|
* \param data pointer to contextual_content struct. Its fields are updated
|
|
|
|
* with pointers to any relevent content, or set to NULL if none.
|
|
|
|
*/
|
|
|
|
void browser_window_get_contextual_content(struct browser_window *bw,
|
|
|
|
int x, int y, struct contextual_content *data);
|
|
|
|
|
2009-03-30 19:46:26 +04:00
|
|
|
void browser_window_refresh_url_bar(struct browser_window *bw, const char *url,
|
2010-03-28 16:56:39 +04:00
|
|
|
const char *frag);
|
2009-03-30 19:46:26 +04:00
|
|
|
|
2004-07-18 03:32:09 +04:00
|
|
|
void browser_window_mouse_click(struct browser_window *bw,
|
2010-03-28 16:56:39 +04:00
|
|
|
browser_mouse_state mouse, int x, int y);
|
2005-04-15 09:52:25 +04:00
|
|
|
void browser_window_mouse_track(struct browser_window *bw,
|
2010-03-28 16:56:39 +04:00
|
|
|
browser_mouse_state mouse, int x, int y);
|
2010-06-04 13:35:08 +04:00
|
|
|
struct browser_window *browser_window_find_target(
|
|
|
|
struct browser_window *bw, const char *target,
|
|
|
|
browser_mouse_state mouse);
|
2005-04-15 09:52:25 +04:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
void browser_redraw_box(struct hlcache_handle *c, struct box *box);
|
2004-02-25 18:12:58 +03:00
|
|
|
|
2009-08-14 14:37:33 +04:00
|
|
|
void browser_select_menu_callback(void *client_data,
|
2010-03-28 16:56:39 +04:00
|
|
|
int x, int y, int width, int height);
|
2010-02-11 13:58:26 +03:00
|
|
|
|
2005-04-15 09:52:25 +04:00
|
|
|
void browser_window_redraw_rect(struct browser_window *bw, int x, int y,
|
2010-03-28 16:56:39 +04:00
|
|
|
int width, int height);
|
2005-04-15 09:52:25 +04:00
|
|
|
|
2010-06-04 13:35:08 +04:00
|
|
|
void browser_window_set_status(struct browser_window *bw, const char *text);
|
2011-06-15 00:00:18 +04:00
|
|
|
void browser_window_set_pointer(struct browser_window *bw,
|
|
|
|
gui_pointer_shape shape);
|
2010-06-04 13:35:08 +04:00
|
|
|
void browser_window_page_drag_start(struct browser_window *bw, int x, int y);
|
|
|
|
|
2009-03-24 01:22:30 +03:00
|
|
|
bool browser_window_back_available(struct browser_window *bw);
|
|
|
|
bool browser_window_forward_available(struct browser_window *bw);
|
|
|
|
bool browser_window_reload_available(struct browser_window *bw);
|
|
|
|
bool browser_window_stop_available(struct browser_window *bw);
|
|
|
|
|
2011-07-07 21:50:04 +04:00
|
|
|
|
|
|
|
/* In desktop/textinput.c */
|
|
|
|
void browser_window_place_caret(struct browser_window *bw,
|
|
|
|
int x, int y, int height,
|
|
|
|
browser_caret_callback caret_cb,
|
|
|
|
browser_paste_callback paste_cb,
|
|
|
|
browser_move_callback move_cb,
|
|
|
|
void *p1, void *p2);
|
|
|
|
void browser_window_remove_caret(struct browser_window *bw);
|
|
|
|
bool browser_window_key_press(struct browser_window *bw, uint32_t key);
|
|
|
|
bool browser_window_paste_text(struct browser_window *bw, const char *utf8,
|
|
|
|
unsigned utf8_len, bool last);
|
|
|
|
|
|
|
|
|
2011-02-11 01:35:41 +03:00
|
|
|
/**
|
|
|
|
* Redraw an area of a window
|
|
|
|
*
|
|
|
|
* Calls the redraw function for the content,
|
|
|
|
*
|
2011-02-11 22:36:33 +03:00
|
|
|
* \param bw The window to redraw
|
|
|
|
* \param x coordinate for top-left of redraw
|
|
|
|
* \param y coordinate for top-left of redraw
|
|
|
|
* \param clip clip rectangle coordinates
|
2011-06-30 19:48:07 +04:00
|
|
|
* \param ctx redraw context
|
2011-02-11 01:35:41 +03:00
|
|
|
* \return true if successful, false otherwise
|
|
|
|
*
|
2011-02-13 20:06:40 +03:00
|
|
|
* The clip rectangle is guaranteed to be filled to its extents, so there is
|
|
|
|
* no need to render a solid background first.
|
2011-02-11 01:35:41 +03:00
|
|
|
*
|
2011-02-13 20:06:40 +03:00
|
|
|
* x, y and clip are coordinates from the top left of the canvas area.
|
|
|
|
*
|
|
|
|
* The top left corner of the clip rectangle is (x0, y0) and
|
|
|
|
* the bottom right corner of the clip rectangle is (x1, y1).
|
|
|
|
* Units for x, y and clip are pixels.
|
2011-02-11 01:35:41 +03:00
|
|
|
*/
|
2011-02-11 22:36:33 +03:00
|
|
|
bool browser_window_redraw(struct browser_window *bw, int x, int y,
|
2011-06-30 19:48:07 +04:00
|
|
|
const struct rect *clip, const struct redraw_context *ctx);
|
2011-02-11 01:35:41 +03:00
|
|
|
|
2011-02-13 19:44:32 +03:00
|
|
|
/**
|
|
|
|
* Check whether browser window is ready for redraw
|
|
|
|
*
|
|
|
|
* \param bw The window to redraw
|
|
|
|
* \return true if browser window is ready for redraw
|
|
|
|
*/
|
|
|
|
bool browser_window_redraw_ready(struct browser_window *bw);
|
|
|
|
|
2011-06-15 00:00:18 +04:00
|
|
|
/*
|
|
|
|
* Update the extent of the inside of a browser window to that of the current
|
|
|
|
* content
|
|
|
|
*
|
|
|
|
* \param bw browser_window to update the extent of
|
|
|
|
*/
|
|
|
|
void browser_window_update_extent(struct browser_window *bw);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Get the position of the current browser window with respect to the root or
|
|
|
|
* parent browser window
|
|
|
|
*
|
|
|
|
* \param bw browser window to get the position of
|
|
|
|
* \param root true if we want position wrt root bw, false if wrt parent bw
|
|
|
|
* \param pos_x updated to x position of bw
|
|
|
|
* \param pos_y updated to y position of bw
|
|
|
|
*/
|
|
|
|
void browser_window_get_position(struct browser_window *bw, bool root,
|
|
|
|
int *pos_x, int *pos_y);
|
|
|
|
|
2011-06-24 13:30:33 +04:00
|
|
|
/*
|
|
|
|
* Set the position of the current browser window with respect to the parent
|
|
|
|
* browser window
|
|
|
|
*
|
2011-06-27 21:29:49 +04:00
|
|
|
* \param bw browser window to set the position of
|
2011-06-24 13:30:33 +04:00
|
|
|
* \param x x position of bw
|
|
|
|
* \param y y position of bw
|
|
|
|
*/
|
|
|
|
void browser_window_set_position(struct browser_window *bw, int x, int y);
|
|
|
|
|
2011-07-14 14:27:24 +04:00
|
|
|
/*
|
|
|
|
* Scroll the browser window to display the passed area
|
|
|
|
*
|
|
|
|
* \param bw browser window to scroll
|
|
|
|
* \param rect area to display
|
|
|
|
*/
|
|
|
|
void browser_window_scroll_visible(struct browser_window *bw,
|
|
|
|
const struct rect *rect);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set scroll offsets for a browser window.
|
|
|
|
*
|
|
|
|
* \param bw The browser window
|
|
|
|
* \param x The x scroll offset to set
|
|
|
|
* \param y The y scroll offset to set
|
|
|
|
*
|
|
|
|
* TODO -- Do we really need this and browser_window_scroll_visible?
|
|
|
|
* Ditto for gui_window_* variants.
|
|
|
|
*/
|
|
|
|
void browser_window_set_scroll(struct browser_window *bw, int x, int y);
|
|
|
|
|
2011-06-27 21:29:49 +04:00
|
|
|
/*
|
|
|
|
* Set the position of the current browser window with respect to the parent
|
|
|
|
* browser window
|
|
|
|
*
|
|
|
|
* \param bw browser window to set the type of the current drag for
|
|
|
|
* \param type drag type
|
|
|
|
*/
|
|
|
|
void browser_window_set_drag_type(struct browser_window *bw,
|
|
|
|
browser_drag_type type);
|
|
|
|
|
2011-06-29 01:09:57 +04:00
|
|
|
/*
|
|
|
|
* Get the root level browser window
|
|
|
|
*
|
|
|
|
* \param bw browser window to set the type of the current drag for
|
|
|
|
* \return root browser window
|
|
|
|
*/
|
|
|
|
struct browser_window * browser_window_get_root(struct browser_window *bw);
|
|
|
|
|
2011-07-02 20:43:20 +04:00
|
|
|
/**
|
|
|
|
* Check whether browser window contains a selection
|
|
|
|
*
|
|
|
|
* \param bw The browser window
|
|
|
|
* \return true if browser window contains a selection
|
|
|
|
*/
|
|
|
|
bool browser_window_has_selection(struct browser_window *bw);
|
|
|
|
|
2011-07-13 17:20:26 +04:00
|
|
|
/**
|
|
|
|
* Set pointer to current selection. Clears any existing selection.
|
|
|
|
*
|
|
|
|
* \param bw The browser window
|
|
|
|
* \param s The new selection
|
|
|
|
*/
|
|
|
|
void browser_window_set_selection(struct browser_window *bw,
|
|
|
|
struct selection *s);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the current selection context from a root browser window
|
|
|
|
*
|
|
|
|
* \param bw The browser window
|
|
|
|
* \return the selection context, or NULL
|
|
|
|
*/
|
|
|
|
struct selection *browser_window_get_selection(struct browser_window *bw);
|
|
|
|
|
2011-06-15 00:00:18 +04:00
|
|
|
|
2004-07-03 21:30:28 +04:00
|
|
|
/* In platform specific hotlist.c. */
|
2010-04-07 16:09:38 +04:00
|
|
|
void hotlist_visited(struct hlcache_handle *c);
|
2004-07-03 21:30:28 +04:00
|
|
|
|
2005-02-07 17:28:43 +03:00
|
|
|
/* In platform specific global_history.c. */
|
2006-04-10 03:21:13 +04:00
|
|
|
void global_history_add(const char *url);
|
2005-02-07 17:28:43 +03:00
|
|
|
void global_history_add_recent(const char *url);
|
|
|
|
char **global_history_get_recent(int *count);
|
|
|
|
|
2005-01-14 01:42:39 +03:00
|
|
|
/* In platform specific theme_install.c. */
|
|
|
|
#ifdef WITH_THEME_INSTALL
|
2010-03-28 16:56:39 +04:00
|
|
|
void theme_install_start(struct hlcache_handle *c);
|
2005-01-14 01:42:39 +03:00
|
|
|
#endif
|
|
|
|
|
2002-09-11 18:24:02 +04:00
|
|
|
#endif
|