netsurf: branch master updated. 920c8b390e2c7473bf9dd1adb4daa6fce77fcd3c
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/920c8b390e2c7473bf9dd...
...commit http://git.netsurf-browser.org/netsurf.git/commit/920c8b390e2c7473bf9dd1a...
...tree http://git.netsurf-browser.org/netsurf.git/tree/920c8b390e2c7473bf9dd1adb...
The branch, master has been updated
via 920c8b390e2c7473bf9dd1adb4daa6fce77fcd3c (commit)
from 5787323b2c37615a5d2805d6ee0b5aebf40a77bc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/920c8b390e2c7473bf9...
commit 920c8b390e2c7473bf9dd1adb4daa6fce77fcd3c
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Include browser_private.h
diff --git a/windows/drawable.c b/windows/drawable.c
index 1688fc8..8e35d30 100644
--- a/windows/drawable.c
+++ b/windows/drawable.c
@@ -23,7 +23,7 @@
#include <windows.h>
#include <windowsx.h>
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/textinput.h"
#include "utils/errors.h"
#include "utils/log.h"
diff --git a/windows/gui.c b/windows/gui.c
index 4018cc8..f7d8c4c 100644
--- a/windows/gui.c
+++ b/windows/gui.c
@@ -32,6 +32,7 @@
#include "content/urldb.h"
#include "content/fetch.h"
#include "css/utils.h"
+#include "desktop/browser_private.h"
#include "desktop/history_core.h"
#include "desktop/mouse.h"
#include "desktop/netsurf.h"
diff --git a/windows/localhistory.c b/windows/localhistory.c
index aad1aa4..f58ab81 100644
--- a/windows/localhistory.c
+++ b/windows/localhistory.c
@@ -22,7 +22,7 @@
#include <windowsx.h>
#include <commctrl.h>
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/history_core.h"
#include "desktop/plotters.h"
#include "utils/utils.h"
-----------------------------------------------------------------------
Summary of changes:
windows/drawable.c | 2 +-
windows/gui.c | 1 +
windows/localhistory.c | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/windows/drawable.c b/windows/drawable.c
index 1688fc8..8e35d30 100644
--- a/windows/drawable.c
+++ b/windows/drawable.c
@@ -23,7 +23,7 @@
#include <windows.h>
#include <windowsx.h>
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/textinput.h"
#include "utils/errors.h"
#include "utils/log.h"
diff --git a/windows/gui.c b/windows/gui.c
index 4018cc8..f7d8c4c 100644
--- a/windows/gui.c
+++ b/windows/gui.c
@@ -32,6 +32,7 @@
#include "content/urldb.h"
#include "content/fetch.h"
#include "css/utils.h"
+#include "desktop/browser_private.h"
#include "desktop/history_core.h"
#include "desktop/mouse.h"
#include "desktop/netsurf.h"
diff --git a/windows/localhistory.c b/windows/localhistory.c
index aad1aa4..f58ab81 100644
--- a/windows/localhistory.c
+++ b/windows/localhistory.c
@@ -22,7 +22,7 @@
#include <windowsx.h>
#include <commctrl.h>
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/history_core.h"
#include "desktop/plotters.h"
#include "utils/utils.h"
--
NetSurf Browser
10 years, 7 months
netsurf: branch master updated. 5787323b2c37615a5d2805d6ee0b5aebf40a77bc
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/5787323b2c37615a5d280...
...commit http://git.netsurf-browser.org/netsurf.git/commit/5787323b2c37615a5d2805d...
...tree http://git.netsurf-browser.org/netsurf.git/tree/5787323b2c37615a5d2805d6e...
The branch, master has been updated
via 5787323b2c37615a5d2805d6ee0b5aebf40a77bc (commit)
from 153c4444543411b00fc8682bd38d6e1758a63082 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/5787323b2c37615a5d2...
commit 5787323b2c37615a5d2805d6ee0b5aebf40a77bc
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Include browser_private.h.
diff --git a/cocoa/BookmarksController.m b/cocoa/BookmarksController.m
index 031af6c..e258ca8 100644
--- a/cocoa/BookmarksController.m
+++ b/cocoa/BookmarksController.m
@@ -23,6 +23,7 @@
#import "cocoa/BrowserViewController.h"
#import "cocoa/gui.h"
+#import "desktop/browser_private.h"
#import "desktop/hotlist.h"
#import "desktop/tree.h"
#import "desktop/tree_url_node.h"
diff --git a/cocoa/BrowserView.m b/cocoa/BrowserView.m
index b1fdbea..203e7b1 100644
--- a/cocoa/BrowserView.m
+++ b/cocoa/BrowserView.m
@@ -23,7 +23,7 @@
#import "cocoa/LocalHistoryController.h"
#import "cocoa/BrowserWindowController.h"
-#import "desktop/browser.h"
+#import "desktop/browser_private.h"
#import "desktop/history_core.h"
#import "desktop/plotters.h"
#import "desktop/textinput.h"
diff --git a/cocoa/BrowserViewController.m b/cocoa/BrowserViewController.m
index 3ae0210..d94b2ab 100644
--- a/cocoa/BrowserViewController.m
+++ b/cocoa/BrowserViewController.m
@@ -20,7 +20,7 @@
#import "cocoa/BrowserView.h"
#import "cocoa/BrowserWindowController.h"
-#import "desktop/browser.h"
+#import "desktop/browser_private.h"
#import "desktop/history_core.h"
#import "desktop/textinput.h"
#import "desktop/options.h"
diff --git a/cocoa/FormSelectMenu.m b/cocoa/FormSelectMenu.m
index cfa4939..3aaeae5 100644
--- a/cocoa/FormSelectMenu.m
+++ b/cocoa/FormSelectMenu.m
@@ -19,6 +19,7 @@
#import "cocoa/FormSelectMenu.h"
#import "cocoa/coordinates.h"
+#import "desktop/browser_private.h"
#import "render/form.h"
@interface FormSelectMenu ()
diff --git a/cocoa/HistoryView.m b/cocoa/HistoryView.m
index 779af5a..31a8e24 100644
--- a/cocoa/HistoryView.m
+++ b/cocoa/HistoryView.m
@@ -23,7 +23,7 @@
#import "cocoa/LocalHistoryController.h"
#import "cocoa/BrowserView.h"
-#import "desktop/browser.h"
+#import "desktop/browser_private.h"
#import "desktop/history_core.h"
#import "desktop/plotters.h"
diff --git a/cocoa/PreferencesWindowController.m b/cocoa/PreferencesWindowController.m
index 7038647..2dbc5e0 100644
--- a/cocoa/PreferencesWindowController.m
+++ b/cocoa/PreferencesWindowController.m
@@ -22,7 +22,7 @@
#import "cocoa/gui.h"
#import "cocoa/BrowserViewController.h"
-#import "desktop/browser.h"
+#import "desktop/browser_private.h"
#import "content/content.h"
#import "desktop/options.h"
diff --git a/cocoa/coordinates.h b/cocoa/coordinates.h
index 5d044b0..d137f15 100644
--- a/cocoa/coordinates.h
+++ b/cocoa/coordinates.h
@@ -19,7 +19,7 @@
#ifndef COCOA_COORDINATES_H
#define COCOA_COORDINATES_H
-#import "desktop/browser.h"
+#import "desktop/browser_private.h"
#import "render/box.h"
extern CGFloat cocoa_scale_factor;
diff --git a/cocoa/gui.m b/cocoa/gui.m
index 5d4bb01..a76924b 100644
--- a/cocoa/gui.m
+++ b/cocoa/gui.m
@@ -27,7 +27,7 @@
#import "desktop/gui.h"
#import "desktop/netsurf.h"
-#import "desktop/browser.h"
+#import "desktop/browser_private.h"
#import "desktop/options.h"
#import "desktop/textinput.h"
#import "desktop/selection.h"
diff --git a/cocoa/selection.m b/cocoa/selection.m
index 1e3fe19..6bba74d 100644
--- a/cocoa/selection.m
+++ b/cocoa/selection.m
@@ -20,6 +20,7 @@
#import "cocoa/BrowserViewController.h"
+#import "desktop/browser_private.h"
#import "desktop/selection.h"
-----------------------------------------------------------------------
Summary of changes:
cocoa/BookmarksController.m | 1 +
cocoa/BrowserView.m | 2 +-
cocoa/BrowserViewController.m | 2 +-
cocoa/FormSelectMenu.m | 1 +
cocoa/HistoryView.m | 2 +-
cocoa/PreferencesWindowController.m | 2 +-
cocoa/coordinates.h | 2 +-
cocoa/gui.m | 2 +-
cocoa/selection.m | 1 +
9 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/cocoa/BookmarksController.m b/cocoa/BookmarksController.m
index 031af6c..e258ca8 100644
--- a/cocoa/BookmarksController.m
+++ b/cocoa/BookmarksController.m
@@ -23,6 +23,7 @@
#import "cocoa/BrowserViewController.h"
#import "cocoa/gui.h"
+#import "desktop/browser_private.h"
#import "desktop/hotlist.h"
#import "desktop/tree.h"
#import "desktop/tree_url_node.h"
diff --git a/cocoa/BrowserView.m b/cocoa/BrowserView.m
index b1fdbea..203e7b1 100644
--- a/cocoa/BrowserView.m
+++ b/cocoa/BrowserView.m
@@ -23,7 +23,7 @@
#import "cocoa/LocalHistoryController.h"
#import "cocoa/BrowserWindowController.h"
-#import "desktop/browser.h"
+#import "desktop/browser_private.h"
#import "desktop/history_core.h"
#import "desktop/plotters.h"
#import "desktop/textinput.h"
diff --git a/cocoa/BrowserViewController.m b/cocoa/BrowserViewController.m
index 3ae0210..d94b2ab 100644
--- a/cocoa/BrowserViewController.m
+++ b/cocoa/BrowserViewController.m
@@ -20,7 +20,7 @@
#import "cocoa/BrowserView.h"
#import "cocoa/BrowserWindowController.h"
-#import "desktop/browser.h"
+#import "desktop/browser_private.h"
#import "desktop/history_core.h"
#import "desktop/textinput.h"
#import "desktop/options.h"
diff --git a/cocoa/FormSelectMenu.m b/cocoa/FormSelectMenu.m
index cfa4939..3aaeae5 100644
--- a/cocoa/FormSelectMenu.m
+++ b/cocoa/FormSelectMenu.m
@@ -19,6 +19,7 @@
#import "cocoa/FormSelectMenu.h"
#import "cocoa/coordinates.h"
+#import "desktop/browser_private.h"
#import "render/form.h"
@interface FormSelectMenu ()
diff --git a/cocoa/HistoryView.m b/cocoa/HistoryView.m
index 779af5a..31a8e24 100644
--- a/cocoa/HistoryView.m
+++ b/cocoa/HistoryView.m
@@ -23,7 +23,7 @@
#import "cocoa/LocalHistoryController.h"
#import "cocoa/BrowserView.h"
-#import "desktop/browser.h"
+#import "desktop/browser_private.h"
#import "desktop/history_core.h"
#import "desktop/plotters.h"
diff --git a/cocoa/PreferencesWindowController.m b/cocoa/PreferencesWindowController.m
index 7038647..2dbc5e0 100644
--- a/cocoa/PreferencesWindowController.m
+++ b/cocoa/PreferencesWindowController.m
@@ -22,7 +22,7 @@
#import "cocoa/gui.h"
#import "cocoa/BrowserViewController.h"
-#import "desktop/browser.h"
+#import "desktop/browser_private.h"
#import "content/content.h"
#import "desktop/options.h"
diff --git a/cocoa/coordinates.h b/cocoa/coordinates.h
index 5d044b0..d137f15 100644
--- a/cocoa/coordinates.h
+++ b/cocoa/coordinates.h
@@ -19,7 +19,7 @@
#ifndef COCOA_COORDINATES_H
#define COCOA_COORDINATES_H
-#import "desktop/browser.h"
+#import "desktop/browser_private.h"
#import "render/box.h"
extern CGFloat cocoa_scale_factor;
diff --git a/cocoa/gui.m b/cocoa/gui.m
index 5d4bb01..a76924b 100644
--- a/cocoa/gui.m
+++ b/cocoa/gui.m
@@ -27,7 +27,7 @@
#import "desktop/gui.h"
#import "desktop/netsurf.h"
-#import "desktop/browser.h"
+#import "desktop/browser_private.h"
#import "desktop/options.h"
#import "desktop/textinput.h"
#import "desktop/selection.h"
diff --git a/cocoa/selection.m b/cocoa/selection.m
index 1e3fe19..6bba74d 100644
--- a/cocoa/selection.m
+++ b/cocoa/selection.m
@@ -20,6 +20,7 @@
#import "cocoa/BrowserViewController.h"
+#import "desktop/browser_private.h"
#import "desktop/selection.h"
--
NetSurf Browser
10 years, 7 months
netsurf: branch master updated. 153c4444543411b00fc8682bd38d6e1758a63082
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/153c4444543411b00fc86...
...commit http://git.netsurf-browser.org/netsurf.git/commit/153c4444543411b00fc8682...
...tree http://git.netsurf-browser.org/netsurf.git/tree/153c4444543411b00fc8682bd...
The branch, master has been updated
via 153c4444543411b00fc8682bd38d6e1758a63082 (commit)
from d489908af8cda59c94ad2375e1340bad6957e64a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/153c4444543411b00fc...
commit 153c4444543411b00fc8682bd38d6e1758a63082
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Move browser_window struct to private header. Places that shouldn't include it do, such as front end code.
Frontends that have been updated to build:
framebuffer
gtk
monkey
riscos
TODO:
amiga
atari
beos
cocoa
windows
diff --git a/desktop/browser.c b/desktop/browser.c
index 42acc34..5175fc4 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -42,7 +42,7 @@
#include "content/hlcache.h"
#include "content/urldb.h"
#include "desktop/401login.h"
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/download.h"
#include "desktop/frames.h"
#include "desktop/history_core.h"
diff --git a/desktop/browser.h b/desktop/browser.h
index dda2d3e..d5ad064 100644
--- a/desktop/browser.h
+++ b/desktop/browser.h
@@ -33,17 +33,11 @@
#include "utils/types.h"
-struct box;
+struct browser_window;
struct hlcache_handle;
-struct form;
-struct form_control;
struct gui_window;
struct history;
struct selection;
-struct browser_window;
-struct url_data;
-struct bitmap;
-struct scroll_msg_data;
struct fetch_multipart_data;
typedef bool (*browser_caret_callback)(struct browser_window *bw, uint32_t key,
@@ -66,144 +60,6 @@ typedef enum {
DRAGGING_OTHER
} browser_drag_type;
-/** Browser window data. */
-struct browser_window {
- /** Page currently displayed, or 0. Must have status READY or DONE. */
- struct hlcache_handle *current_content;
- /** Page being loaded, or 0. */
- struct hlcache_handle *loading_content;
-
- /** Page Favicon */
- struct hlcache_handle *current_favicon;
- /** handle for favicon which we started loading early */
- struct hlcache_handle *loading_favicon;
- /** favicon fetch already failed - prevents infinite error looping */
- bool failed_favicon;
-
- /** Window history structure. */
- struct history *history;
-
- /** Handler for keyboard input, or 0. */
- browser_caret_callback caret_callback;
- /** Handler for pasting text, or 0. */
- browser_paste_callback paste_callback;
- /** Handler for repositioning caret, or 0. */
- browser_move_callback move_callback;
-
- /** User parameters for caret_callback, paste_callback, and
- * move_callback */
- void *caret_p1;
- void *caret_p2;
-
- /** Platform specific window data. */
- struct gui_window *window;
-
- /** Busy indicator is active. */
- bool throbbing;
- /** Add loading_content to the window history when it loads. */
- bool history_add;
-
- /** Fragment identifier for current_content. */
- lwc_string *frag_id;
-
- /** Current drag status. */
- browser_drag_type drag_type;
-
- /** Current drag's browser window, when not in root bw. */
- struct browser_window *drag_window;
-
- /** Mouse position at start of current scroll drag. */
- int drag_start_x;
- int drag_start_y;
- /** Scroll offsets at start of current scroll draw. */
- 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;
-
- /** Current fetch is download */
- bool download;
-
- /** Refresh interval (-1 if undefined) */
- int refresh_interval;
-
- /** Window has been resized, and content needs reformatting. */
- bool reformat_pending;
-
- /** Window dimensions */
- int x;
- int y;
- int width;
- int height;
-
- struct scrollbar *scroll_x; /**< Horizontal scroll. */
- struct scrollbar *scroll_y; /**< Vertical scroll. */
-
- /** scale of window contents */
- float scale;
-
- /** Window characteristics */
- enum {
- BROWSER_WINDOW_NORMAL,
- BROWSER_WINDOW_IFRAME,
- BROWSER_WINDOW_FRAME,
- BROWSER_WINDOW_FRAMESET,
- } browser_window_type;
-
- /** frameset characteristics */
- int rows;
- int cols;
-
- /** frame dimensions */
- struct frame_dimension frame_width;
- struct frame_dimension frame_height;
- int margin_width;
- int margin_height;
-
- /** frame name for targetting */
- char *name;
-
- /** frame characteristics */
- bool no_resize;
- frame_scrolling scrolling;
- bool border;
- colour border_colour;
-
- /** iframe parent box */
- struct box *box;
-
- /** [cols * rows] children */
- struct browser_window *children;
- struct browser_window *parent;
-
- /** [iframe_count] iframes */
- int iframe_count;
- struct browser_window *iframes;
-
- /** browser window child of root browser window which has input focus */
- struct browser_window *focus;
-
- /** Last time a link was followed in this window */
- unsigned int last_action;
-
- /** Current selection, or NULL if none */
- struct selection *cur_sel;
-
- /** Current context for free text search, or NULL if none */
- struct search_context *cur_search;
-
- /** current javascript context */
- struct jscontext *jsctx;
-
- /** cache of the currently displayed status text. */
- char *status_text; /**< Current status bar text. */
- int status_text_len; /**< Length of the browser_window::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. */
-};
extern bool browser_reformat_pending;
diff --git a/desktop/browser_private.h b/desktop/browser_private.h
new file mode 100644
index 0000000..91372ac
--- /dev/null
+++ b/desktop/browser_private.h
@@ -0,0 +1,177 @@
+/*
+ * Copyright 2003 Phil Mellor <monkeyson(a)users.sourceforge.net>
+ * Copyright 2006 James Bursa <bursa(a)users.sourceforge.net>
+ *
+ * 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/>.
+ */
+
+/** \file
+ * Browser window private structure.
+ */
+
+#ifndef _NETSURF_DESKTOP_BROWSER_PRIVATE_H_
+#define _NETSURF_DESKTOP_BROWSER_PRIVATE_H_
+
+#include <stdbool.h>
+
+#include "desktop/browser.h"
+
+
+struct box;
+struct hlcache_handle;
+struct gui_window;
+struct history;
+struct selection;
+
+/** Browser window data. */
+struct browser_window {
+ /** Page currently displayed, or 0. Must have status READY or DONE. */
+ struct hlcache_handle *current_content;
+ /** Page being loaded, or 0. */
+ struct hlcache_handle *loading_content;
+
+ /** Page Favicon */
+ struct hlcache_handle *current_favicon;
+ /** handle for favicon which we started loading early */
+ struct hlcache_handle *loading_favicon;
+ /** favicon fetch already failed - prevents infinite error looping */
+ bool failed_favicon;
+
+ /** Window history structure. */
+ struct history *history;
+
+ /** Handler for keyboard input, or 0. */
+ browser_caret_callback caret_callback;
+ /** Handler for pasting text, or 0. */
+ browser_paste_callback paste_callback;
+ /** Handler for repositioning caret, or 0. */
+ browser_move_callback move_callback;
+
+ /** User parameters for caret_callback, paste_callback, and
+ * move_callback */
+ void *caret_p1;
+ void *caret_p2;
+
+ /** Platform specific window data. */
+ struct gui_window *window;
+
+ /** Busy indicator is active. */
+ bool throbbing;
+ /** Add loading_content to the window history when it loads. */
+ bool history_add;
+
+ /** Fragment identifier for current_content. */
+ lwc_string *frag_id;
+
+ /** Current drag status. */
+ browser_drag_type drag_type;
+
+ /** Current drag's browser window, when not in root bw. */
+ struct browser_window *drag_window;
+
+ /** Mouse position at start of current scroll drag. */
+ int drag_start_x;
+ int drag_start_y;
+ /** Scroll offsets at start of current scroll draw. */
+ 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;
+
+ /** Current fetch is download */
+ bool download;
+
+ /** Refresh interval (-1 if undefined) */
+ int refresh_interval;
+
+ /** Window has been resized, and content needs reformatting. */
+ bool reformat_pending;
+
+ /** Window dimensions */
+ int x;
+ int y;
+ int width;
+ int height;
+
+ struct scrollbar *scroll_x; /**< Horizontal scroll. */
+ struct scrollbar *scroll_y; /**< Vertical scroll. */
+
+ /** scale of window contents */
+ float scale;
+
+ /** Window characteristics */
+ enum {
+ BROWSER_WINDOW_NORMAL,
+ BROWSER_WINDOW_IFRAME,
+ BROWSER_WINDOW_FRAME,
+ BROWSER_WINDOW_FRAMESET,
+ } browser_window_type;
+
+ /** frameset characteristics */
+ int rows;
+ int cols;
+
+ /** frame dimensions */
+ struct frame_dimension frame_width;
+ struct frame_dimension frame_height;
+ int margin_width;
+ int margin_height;
+
+ /** frame name for targetting */
+ char *name;
+
+ /** frame characteristics */
+ bool no_resize;
+ frame_scrolling scrolling;
+ bool border;
+ colour border_colour;
+
+ /** iframe parent box */
+ struct box *box;
+
+ /** [cols * rows] children */
+ struct browser_window *children;
+ struct browser_window *parent;
+
+ /** [iframe_count] iframes */
+ int iframe_count;
+ struct browser_window *iframes;
+
+ /** browser window child of root browser window which has input focus */
+ struct browser_window *focus;
+
+ /** Last time a link was followed in this window */
+ unsigned int last_action;
+
+ /** Current selection, or NULL if none */
+ struct selection *cur_sel;
+
+ /** Current context for free text search, or NULL if none */
+ struct search_context *cur_search;
+
+ /** current javascript context */
+ struct jscontext *jsctx;
+
+ /** cache of the currently displayed status text. */
+ char *status_text; /**< Current status bar text. */
+ int status_text_len; /**< Length of the browser_window::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. */
+};
+
+#endif
diff --git a/desktop/frames.c b/desktop/frames.c
index 0d67ad8..cc2cabf 100644
--- a/desktop/frames.c
+++ b/desktop/frames.c
@@ -30,7 +30,7 @@
#include <math.h>
#include "utils/config.h"
#include "content/hlcache.h"
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/frames.h"
#include "desktop/history_core.h"
#include "desktop/gui.h"
diff --git a/desktop/search.c b/desktop/search.c
index 2fe7629..29d28bd 100644
--- a/desktop/search.c
+++ b/desktop/search.c
@@ -28,7 +28,7 @@
#include <dom/dom.h>
#include "content/content.h"
#include "content/hlcache.h"
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/gui.h"
#include "desktop/options.h"
#include "desktop/search.h"
diff --git a/desktop/selection.c b/desktop/selection.c
index 15f82bf..5633b18 100644
--- a/desktop/selection.c
+++ b/desktop/selection.c
@@ -28,6 +28,7 @@
#include <string.h>
#include <dom/dom.h>
+#include "desktop/browser_private.h"
#include "desktop/gui.h"
#include "desktop/mouse.h"
#include "desktop/plotters.h"
diff --git a/desktop/selection.h b/desktop/selection.h
index 7ece4bd..aebb169 100644
--- a/desktop/selection.h
+++ b/desktop/selection.h
@@ -23,7 +23,8 @@
#ifndef _NETSURF_DESKTOP_SELECTION_H_
#define _NETSURF_DESKTOP_SELECTION_H_
-#include "desktop/browser.h"
+#include <stdbool.h>
+#include "desktop/mouse.h"
struct box;
diff --git a/desktop/textinput.c b/desktop/textinput.c
index 36011be..8efc719 100644
--- a/desktop/textinput.c
+++ b/desktop/textinput.c
@@ -29,7 +29,7 @@
#include <string.h>
#include <dom/dom.h>
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/gui.h"
#include "desktop/mouse.h"
#include "desktop/scrollbar.h"
diff --git a/desktop/tree_url_node.h b/desktop/tree_url_node.h
index 15243e9..1fa89cd 100644
--- a/desktop/tree_url_node.h
+++ b/desktop/tree_url_node.h
@@ -27,6 +27,8 @@
#include "desktop/tree.h"
+struct url_data;
+
void tree_url_node_init(const char *folder_icon_name);
void tree_url_node_cleanup(void);
struct node *tree_create_URL_node(struct tree *tree,
diff --git a/framebuffer/clipboard.c b/framebuffer/clipboard.c
index 85e6a1d..7503303 100644
--- a/framebuffer/clipboard.c
+++ b/framebuffer/clipboard.c
@@ -23,6 +23,8 @@
#include <assert.h>
#include <stdint.h>
#include <string.h>
+#include "desktop/browser.h"
+#include "desktop/gui.h"
#include "desktop/selection.h"
#include "framebuffer/gui.h"
#include "utils/log.h"
diff --git a/framebuffer/gui.c b/framebuffer/gui.c
index dfbaa26..db0a9ef 100644
--- a/framebuffer/gui.c
+++ b/framebuffer/gui.c
@@ -31,6 +31,7 @@
#include <libnsfb_plot.h>
#include <libnsfb_event.h>
+#include "desktop/browser_private.h"
#include "desktop/gui.h"
#include "desktop/mouse.h"
#include "desktop/plotters.h"
diff --git a/framebuffer/localhistory.c b/framebuffer/localhistory.c
index 4b329a8..f6c24a1 100644
--- a/framebuffer/localhistory.c
+++ b/framebuffer/localhistory.c
@@ -31,6 +31,7 @@
#include <libnsfb_plot.h>
#include <libnsfb_event.h>
+#include "desktop/browser_private.h"
#include "desktop/gui.h"
#include "desktop/plotters.h"
#include "desktop/netsurf.h"
diff --git a/gtk/dialogs/options.c b/gtk/dialogs/options.c
index 1d095af..a449e6f 100644
--- a/gtk/dialogs/options.c
+++ b/gtk/dialogs/options.c
@@ -26,6 +26,7 @@
#include <math.h>
#include <gtk/gtk.h>
+#include "desktop/browser_private.h"
#include "desktop/options.h"
#include "desktop/print.h"
#include "desktop/searchweb.h"
diff --git a/gtk/dialogs/source.c b/gtk/dialogs/source.c
index ad2ee2c..0804dff 100644
--- a/gtk/dialogs/source.c
+++ b/gtk/dialogs/source.c
@@ -30,6 +30,7 @@
#include "gtk/gui.h"
#include "gtk/print.h"
#include "gtk/selection.h"
+#include "desktop/browser_private.h"
#include "desktop/netsurf.h"
#include "desktop/print.h"
#include "desktop/options.h"
diff --git a/gtk/gui.c b/gtk/gui.c
index 4956677..222c982 100644
--- a/gtk/gui.c
+++ b/gtk/gui.c
@@ -45,7 +45,7 @@
#include "content/fetchers/resource.h"
#include "content/hlcache.h"
#include "content/urldb.h"
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/cookies.h"
#include "desktop/gui.h"
#include "desktop/history_global_core.h"
diff --git a/gtk/scaffolding.c b/gtk/scaffolding.c
index 2b00367..f6f6d98 100644
--- a/gtk/scaffolding.c
+++ b/gtk/scaffolding.c
@@ -33,7 +33,7 @@
#include "content/content.h"
#include "content/hlcache.h"
#include "css/utils.h"
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/history_core.h"
#include "desktop/hotlist.h"
#include "desktop/gui.h"
diff --git a/gtk/search.c b/gtk/search.c
index 52bf1c1..37b7397 100644
--- a/gtk/search.c
+++ b/gtk/search.c
@@ -32,7 +32,7 @@
#include "utils/config.h"
#include "content/content.h"
#include "content/hlcache.h"
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/gui.h"
#include "desktop/search.h"
#include "desktop/searchweb.h"
diff --git a/gtk/toolbar.c b/gtk/toolbar.c
index 0e5ef4e..9c89ee0 100644
--- a/gtk/toolbar.c
+++ b/gtk/toolbar.c
@@ -18,6 +18,7 @@
#include <gtk/gtk.h>
+#include "desktop/browser_private.h"
#include "desktop/searchweb.h"
#include "utils/log.h"
#include "utils/messages.h"
diff --git a/gtk/window.c b/gtk/window.c
index 89248e4..8a3a085 100644
--- a/gtk/window.c
+++ b/gtk/window.c
@@ -28,7 +28,7 @@
#include "content/hlcache.h"
#include "gtk/window.h"
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/mouse.h"
#include "desktop/options.h"
#include "desktop/searchweb.h"
diff --git a/monkey/browser.c b/monkey/browser.c
index a9cfd04..ddea086 100644
--- a/monkey/browser.c
+++ b/monkey/browser.c
@@ -21,7 +21,7 @@
#include <stdio.h>
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/gui.h"
#include "utils/ring.h"
#include "utils/log.h"
diff --git a/render/box_normalise.c b/render/box_normalise.c
index 19a1cbc..8428b84 100644
--- a/render/box_normalise.c
+++ b/render/box_normalise.c
@@ -25,6 +25,7 @@
#include <assert.h>
#include <stdbool.h>
+#include <string.h>
#include "css/css.h"
#include "css/select.h"
#include "render/box.h"
diff --git a/render/html_script.c b/render/html_script.c
index 446868b..9edd08c 100644
--- a/render/html_script.c
+++ b/render/html_script.c
@@ -35,6 +35,7 @@
#include "javascript/js.h"
#include "content/content_protected.h"
#include "content/fetch.h"
+#include "content/hlcache.h"
#include "render/html_internal.h"
typedef bool (script_handler_t)(struct jscontext *jscontext, const char *data, size_t size) ;
diff --git a/riscos/dialog.c b/riscos/dialog.c
index ab53603..1fabbcb 100644
--- a/riscos/dialog.c
+++ b/riscos/dialog.c
@@ -685,11 +685,10 @@ bool ro_gui_dialog_zoom_apply(wimp_w w) {
void ro_gui_dialog_prepare_zoom(struct gui_window *g)
{
char scale_buffer[8];
- sprintf(scale_buffer, "%.0f", g->bw->scale * 100);
+ sprintf(scale_buffer, "%.0f", browser_window_get_scale(g->bw) * 100);
ro_gui_set_icon_string(dialog_zoom, ICON_ZOOM_VALUE, scale_buffer, true);
ro_gui_set_icon_selected_state(dialog_zoom, ICON_ZOOM_FRAMES, true);
- ro_gui_set_icon_shaded_state(dialog_zoom, ICON_ZOOM_FRAMES,
- !(g->bw->parent));
+ ro_gui_set_icon_shaded_state(dialog_zoom, ICON_ZOOM_FRAMES, true);
ro_gui_current_zoom_gui = g;
ro_gui_wimp_event_memorise(dialog_zoom);
}
diff --git a/riscos/history.c b/riscos/history.c
index 00ff5d6..8a3b562 100644
--- a/riscos/history.c
+++ b/riscos/history.c
@@ -30,6 +30,7 @@
#include "desktop/history_core.h"
#include "desktop/plotters.h"
#include "riscos/dialog.h"
+#include "desktop/browser_private.h"
#include "desktop/options.h"
#include "riscos/gui.h"
#include "riscos/wimp.h"
diff --git a/riscos/print.c b/riscos/print.c
index 46ceb85..05eb8fd 100644
--- a/riscos/print.c
+++ b/riscos/print.c
@@ -32,6 +32,7 @@
#include "utils/config.h"
#include "content/content.h"
#include "content/hlcache.h"
+#include "desktop/browser_private.h"
#include "desktop/options.h"
#include "desktop/plotters.h"
#include "riscos/dialog.h"
diff --git a/riscos/search.c b/riscos/search.c
index 76d333f..db87cad 100644
--- a/riscos/search.c
+++ b/riscos/search.c
@@ -32,6 +32,7 @@
#include "content/hlcache.h"
#include "desktop/browser.h"
#include "desktop/gui.h"
+#include "desktop/browser_private.h"
#include "desktop/search.h"
#include "desktop/selection.h"
#include "riscos/dialog.h"
diff --git a/riscos/textselection.c b/riscos/textselection.c
index c5a42b5..96c3e2c 100644
--- a/riscos/textselection.c
+++ b/riscos/textselection.c
@@ -498,8 +498,6 @@ bool ro_gui_save_clipboard(const char *path)
void ro_gui_selection_dragging(wimp_message *message)
{
wimp_full_message_dragging *drag = (wimp_full_message_dragging*)message;
- struct browser_window *bw;
- hlcache_handle *h;
struct gui_window *g;
os_coord pos;
@@ -517,9 +515,6 @@ void ro_gui_selection_dragging(wimp_message *message)
if (!ro_gui_window_to_window_pos(g, drag->pos.x, drag->pos.y, &pos))
return;
- bw = g->bw;
- h = bw->current_content;
-
drag_claimed = false;
}
diff --git a/riscos/window.c b/riscos/window.c
index 085e02a..b7fffd6 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -45,7 +45,7 @@
#include "content/hlcache.h"
#include "content/urldb.h"
#include "css/css.h"
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/cookies.h"
#include "desktop/scrollbar.h"
#include "desktop/frames.h"
-----------------------------------------------------------------------
Summary of changes:
desktop/browser.c | 2 +-
desktop/browser.h | 146 +------------------------------------
desktop/browser_private.h | 177 ++++++++++++++++++++++++++++++++++++++++++++
desktop/frames.c | 2 +-
desktop/search.c | 2 +-
desktop/selection.c | 1 +
desktop/selection.h | 3 +-
desktop/textinput.c | 2 +-
desktop/tree_url_node.h | 2 +
framebuffer/clipboard.c | 2 +
framebuffer/gui.c | 1 +
framebuffer/localhistory.c | 1 +
gtk/dialogs/options.c | 1 +
gtk/dialogs/source.c | 1 +
gtk/gui.c | 2 +-
gtk/scaffolding.c | 2 +-
gtk/search.c | 2 +-
gtk/toolbar.c | 1 +
gtk/window.c | 2 +-
monkey/browser.c | 2 +-
render/box_normalise.c | 1 +
render/html_script.c | 1 +
riscos/dialog.c | 5 +-
riscos/history.c | 1 +
riscos/print.c | 1 +
riscos/search.c | 1 +
riscos/textselection.c | 5 -
riscos/window.c | 2 +-
28 files changed, 207 insertions(+), 164 deletions(-)
create mode 100644 desktop/browser_private.h
diff --git a/desktop/browser.c b/desktop/browser.c
index 42acc34..5175fc4 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -42,7 +42,7 @@
#include "content/hlcache.h"
#include "content/urldb.h"
#include "desktop/401login.h"
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/download.h"
#include "desktop/frames.h"
#include "desktop/history_core.h"
diff --git a/desktop/browser.h b/desktop/browser.h
index dda2d3e..d5ad064 100644
--- a/desktop/browser.h
+++ b/desktop/browser.h
@@ -33,17 +33,11 @@
#include "utils/types.h"
-struct box;
+struct browser_window;
struct hlcache_handle;
-struct form;
-struct form_control;
struct gui_window;
struct history;
struct selection;
-struct browser_window;
-struct url_data;
-struct bitmap;
-struct scroll_msg_data;
struct fetch_multipart_data;
typedef bool (*browser_caret_callback)(struct browser_window *bw, uint32_t key,
@@ -66,144 +60,6 @@ typedef enum {
DRAGGING_OTHER
} browser_drag_type;
-/** Browser window data. */
-struct browser_window {
- /** Page currently displayed, or 0. Must have status READY or DONE. */
- struct hlcache_handle *current_content;
- /** Page being loaded, or 0. */
- struct hlcache_handle *loading_content;
-
- /** Page Favicon */
- struct hlcache_handle *current_favicon;
- /** handle for favicon which we started loading early */
- struct hlcache_handle *loading_favicon;
- /** favicon fetch already failed - prevents infinite error looping */
- bool failed_favicon;
-
- /** Window history structure. */
- struct history *history;
-
- /** Handler for keyboard input, or 0. */
- browser_caret_callback caret_callback;
- /** Handler for pasting text, or 0. */
- browser_paste_callback paste_callback;
- /** Handler for repositioning caret, or 0. */
- browser_move_callback move_callback;
-
- /** User parameters for caret_callback, paste_callback, and
- * move_callback */
- void *caret_p1;
- void *caret_p2;
-
- /** Platform specific window data. */
- struct gui_window *window;
-
- /** Busy indicator is active. */
- bool throbbing;
- /** Add loading_content to the window history when it loads. */
- bool history_add;
-
- /** Fragment identifier for current_content. */
- lwc_string *frag_id;
-
- /** Current drag status. */
- browser_drag_type drag_type;
-
- /** Current drag's browser window, when not in root bw. */
- struct browser_window *drag_window;
-
- /** Mouse position at start of current scroll drag. */
- int drag_start_x;
- int drag_start_y;
- /** Scroll offsets at start of current scroll draw. */
- 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;
-
- /** Current fetch is download */
- bool download;
-
- /** Refresh interval (-1 if undefined) */
- int refresh_interval;
-
- /** Window has been resized, and content needs reformatting. */
- bool reformat_pending;
-
- /** Window dimensions */
- int x;
- int y;
- int width;
- int height;
-
- struct scrollbar *scroll_x; /**< Horizontal scroll. */
- struct scrollbar *scroll_y; /**< Vertical scroll. */
-
- /** scale of window contents */
- float scale;
-
- /** Window characteristics */
- enum {
- BROWSER_WINDOW_NORMAL,
- BROWSER_WINDOW_IFRAME,
- BROWSER_WINDOW_FRAME,
- BROWSER_WINDOW_FRAMESET,
- } browser_window_type;
-
- /** frameset characteristics */
- int rows;
- int cols;
-
- /** frame dimensions */
- struct frame_dimension frame_width;
- struct frame_dimension frame_height;
- int margin_width;
- int margin_height;
-
- /** frame name for targetting */
- char *name;
-
- /** frame characteristics */
- bool no_resize;
- frame_scrolling scrolling;
- bool border;
- colour border_colour;
-
- /** iframe parent box */
- struct box *box;
-
- /** [cols * rows] children */
- struct browser_window *children;
- struct browser_window *parent;
-
- /** [iframe_count] iframes */
- int iframe_count;
- struct browser_window *iframes;
-
- /** browser window child of root browser window which has input focus */
- struct browser_window *focus;
-
- /** Last time a link was followed in this window */
- unsigned int last_action;
-
- /** Current selection, or NULL if none */
- struct selection *cur_sel;
-
- /** Current context for free text search, or NULL if none */
- struct search_context *cur_search;
-
- /** current javascript context */
- struct jscontext *jsctx;
-
- /** cache of the currently displayed status text. */
- char *status_text; /**< Current status bar text. */
- int status_text_len; /**< Length of the browser_window::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. */
-};
extern bool browser_reformat_pending;
diff --git a/desktop/browser_private.h b/desktop/browser_private.h
new file mode 100644
index 0000000..91372ac
--- /dev/null
+++ b/desktop/browser_private.h
@@ -0,0 +1,177 @@
+/*
+ * Copyright 2003 Phil Mellor <monkeyson(a)users.sourceforge.net>
+ * Copyright 2006 James Bursa <bursa(a)users.sourceforge.net>
+ *
+ * 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/>.
+ */
+
+/** \file
+ * Browser window private structure.
+ */
+
+#ifndef _NETSURF_DESKTOP_BROWSER_PRIVATE_H_
+#define _NETSURF_DESKTOP_BROWSER_PRIVATE_H_
+
+#include <stdbool.h>
+
+#include "desktop/browser.h"
+
+
+struct box;
+struct hlcache_handle;
+struct gui_window;
+struct history;
+struct selection;
+
+/** Browser window data. */
+struct browser_window {
+ /** Page currently displayed, or 0. Must have status READY or DONE. */
+ struct hlcache_handle *current_content;
+ /** Page being loaded, or 0. */
+ struct hlcache_handle *loading_content;
+
+ /** Page Favicon */
+ struct hlcache_handle *current_favicon;
+ /** handle for favicon which we started loading early */
+ struct hlcache_handle *loading_favicon;
+ /** favicon fetch already failed - prevents infinite error looping */
+ bool failed_favicon;
+
+ /** Window history structure. */
+ struct history *history;
+
+ /** Handler for keyboard input, or 0. */
+ browser_caret_callback caret_callback;
+ /** Handler for pasting text, or 0. */
+ browser_paste_callback paste_callback;
+ /** Handler for repositioning caret, or 0. */
+ browser_move_callback move_callback;
+
+ /** User parameters for caret_callback, paste_callback, and
+ * move_callback */
+ void *caret_p1;
+ void *caret_p2;
+
+ /** Platform specific window data. */
+ struct gui_window *window;
+
+ /** Busy indicator is active. */
+ bool throbbing;
+ /** Add loading_content to the window history when it loads. */
+ bool history_add;
+
+ /** Fragment identifier for current_content. */
+ lwc_string *frag_id;
+
+ /** Current drag status. */
+ browser_drag_type drag_type;
+
+ /** Current drag's browser window, when not in root bw. */
+ struct browser_window *drag_window;
+
+ /** Mouse position at start of current scroll drag. */
+ int drag_start_x;
+ int drag_start_y;
+ /** Scroll offsets at start of current scroll draw. */
+ 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;
+
+ /** Current fetch is download */
+ bool download;
+
+ /** Refresh interval (-1 if undefined) */
+ int refresh_interval;
+
+ /** Window has been resized, and content needs reformatting. */
+ bool reformat_pending;
+
+ /** Window dimensions */
+ int x;
+ int y;
+ int width;
+ int height;
+
+ struct scrollbar *scroll_x; /**< Horizontal scroll. */
+ struct scrollbar *scroll_y; /**< Vertical scroll. */
+
+ /** scale of window contents */
+ float scale;
+
+ /** Window characteristics */
+ enum {
+ BROWSER_WINDOW_NORMAL,
+ BROWSER_WINDOW_IFRAME,
+ BROWSER_WINDOW_FRAME,
+ BROWSER_WINDOW_FRAMESET,
+ } browser_window_type;
+
+ /** frameset characteristics */
+ int rows;
+ int cols;
+
+ /** frame dimensions */
+ struct frame_dimension frame_width;
+ struct frame_dimension frame_height;
+ int margin_width;
+ int margin_height;
+
+ /** frame name for targetting */
+ char *name;
+
+ /** frame characteristics */
+ bool no_resize;
+ frame_scrolling scrolling;
+ bool border;
+ colour border_colour;
+
+ /** iframe parent box */
+ struct box *box;
+
+ /** [cols * rows] children */
+ struct browser_window *children;
+ struct browser_window *parent;
+
+ /** [iframe_count] iframes */
+ int iframe_count;
+ struct browser_window *iframes;
+
+ /** browser window child of root browser window which has input focus */
+ struct browser_window *focus;
+
+ /** Last time a link was followed in this window */
+ unsigned int last_action;
+
+ /** Current selection, or NULL if none */
+ struct selection *cur_sel;
+
+ /** Current context for free text search, or NULL if none */
+ struct search_context *cur_search;
+
+ /** current javascript context */
+ struct jscontext *jsctx;
+
+ /** cache of the currently displayed status text. */
+ char *status_text; /**< Current status bar text. */
+ int status_text_len; /**< Length of the browser_window::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. */
+};
+
+#endif
diff --git a/desktop/frames.c b/desktop/frames.c
index 0d67ad8..cc2cabf 100644
--- a/desktop/frames.c
+++ b/desktop/frames.c
@@ -30,7 +30,7 @@
#include <math.h>
#include "utils/config.h"
#include "content/hlcache.h"
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/frames.h"
#include "desktop/history_core.h"
#include "desktop/gui.h"
diff --git a/desktop/search.c b/desktop/search.c
index 2fe7629..29d28bd 100644
--- a/desktop/search.c
+++ b/desktop/search.c
@@ -28,7 +28,7 @@
#include <dom/dom.h>
#include "content/content.h"
#include "content/hlcache.h"
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/gui.h"
#include "desktop/options.h"
#include "desktop/search.h"
diff --git a/desktop/selection.c b/desktop/selection.c
index 15f82bf..5633b18 100644
--- a/desktop/selection.c
+++ b/desktop/selection.c
@@ -28,6 +28,7 @@
#include <string.h>
#include <dom/dom.h>
+#include "desktop/browser_private.h"
#include "desktop/gui.h"
#include "desktop/mouse.h"
#include "desktop/plotters.h"
diff --git a/desktop/selection.h b/desktop/selection.h
index 7ece4bd..aebb169 100644
--- a/desktop/selection.h
+++ b/desktop/selection.h
@@ -23,7 +23,8 @@
#ifndef _NETSURF_DESKTOP_SELECTION_H_
#define _NETSURF_DESKTOP_SELECTION_H_
-#include "desktop/browser.h"
+#include <stdbool.h>
+#include "desktop/mouse.h"
struct box;
diff --git a/desktop/textinput.c b/desktop/textinput.c
index 36011be..8efc719 100644
--- a/desktop/textinput.c
+++ b/desktop/textinput.c
@@ -29,7 +29,7 @@
#include <string.h>
#include <dom/dom.h>
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/gui.h"
#include "desktop/mouse.h"
#include "desktop/scrollbar.h"
diff --git a/desktop/tree_url_node.h b/desktop/tree_url_node.h
index 15243e9..1fa89cd 100644
--- a/desktop/tree_url_node.h
+++ b/desktop/tree_url_node.h
@@ -27,6 +27,8 @@
#include "desktop/tree.h"
+struct url_data;
+
void tree_url_node_init(const char *folder_icon_name);
void tree_url_node_cleanup(void);
struct node *tree_create_URL_node(struct tree *tree,
diff --git a/framebuffer/clipboard.c b/framebuffer/clipboard.c
index 85e6a1d..7503303 100644
--- a/framebuffer/clipboard.c
+++ b/framebuffer/clipboard.c
@@ -23,6 +23,8 @@
#include <assert.h>
#include <stdint.h>
#include <string.h>
+#include "desktop/browser.h"
+#include "desktop/gui.h"
#include "desktop/selection.h"
#include "framebuffer/gui.h"
#include "utils/log.h"
diff --git a/framebuffer/gui.c b/framebuffer/gui.c
index dfbaa26..db0a9ef 100644
--- a/framebuffer/gui.c
+++ b/framebuffer/gui.c
@@ -31,6 +31,7 @@
#include <libnsfb_plot.h>
#include <libnsfb_event.h>
+#include "desktop/browser_private.h"
#include "desktop/gui.h"
#include "desktop/mouse.h"
#include "desktop/plotters.h"
diff --git a/framebuffer/localhistory.c b/framebuffer/localhistory.c
index 4b329a8..f6c24a1 100644
--- a/framebuffer/localhistory.c
+++ b/framebuffer/localhistory.c
@@ -31,6 +31,7 @@
#include <libnsfb_plot.h>
#include <libnsfb_event.h>
+#include "desktop/browser_private.h"
#include "desktop/gui.h"
#include "desktop/plotters.h"
#include "desktop/netsurf.h"
diff --git a/gtk/dialogs/options.c b/gtk/dialogs/options.c
index 1d095af..a449e6f 100644
--- a/gtk/dialogs/options.c
+++ b/gtk/dialogs/options.c
@@ -26,6 +26,7 @@
#include <math.h>
#include <gtk/gtk.h>
+#include "desktop/browser_private.h"
#include "desktop/options.h"
#include "desktop/print.h"
#include "desktop/searchweb.h"
diff --git a/gtk/dialogs/source.c b/gtk/dialogs/source.c
index ad2ee2c..0804dff 100644
--- a/gtk/dialogs/source.c
+++ b/gtk/dialogs/source.c
@@ -30,6 +30,7 @@
#include "gtk/gui.h"
#include "gtk/print.h"
#include "gtk/selection.h"
+#include "desktop/browser_private.h"
#include "desktop/netsurf.h"
#include "desktop/print.h"
#include "desktop/options.h"
diff --git a/gtk/gui.c b/gtk/gui.c
index 4956677..222c982 100644
--- a/gtk/gui.c
+++ b/gtk/gui.c
@@ -45,7 +45,7 @@
#include "content/fetchers/resource.h"
#include "content/hlcache.h"
#include "content/urldb.h"
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/cookies.h"
#include "desktop/gui.h"
#include "desktop/history_global_core.h"
diff --git a/gtk/scaffolding.c b/gtk/scaffolding.c
index 2b00367..f6f6d98 100644
--- a/gtk/scaffolding.c
+++ b/gtk/scaffolding.c
@@ -33,7 +33,7 @@
#include "content/content.h"
#include "content/hlcache.h"
#include "css/utils.h"
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/history_core.h"
#include "desktop/hotlist.h"
#include "desktop/gui.h"
diff --git a/gtk/search.c b/gtk/search.c
index 52bf1c1..37b7397 100644
--- a/gtk/search.c
+++ b/gtk/search.c
@@ -32,7 +32,7 @@
#include "utils/config.h"
#include "content/content.h"
#include "content/hlcache.h"
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/gui.h"
#include "desktop/search.h"
#include "desktop/searchweb.h"
diff --git a/gtk/toolbar.c b/gtk/toolbar.c
index 0e5ef4e..9c89ee0 100644
--- a/gtk/toolbar.c
+++ b/gtk/toolbar.c
@@ -18,6 +18,7 @@
#include <gtk/gtk.h>
+#include "desktop/browser_private.h"
#include "desktop/searchweb.h"
#include "utils/log.h"
#include "utils/messages.h"
diff --git a/gtk/window.c b/gtk/window.c
index 89248e4..8a3a085 100644
--- a/gtk/window.c
+++ b/gtk/window.c
@@ -28,7 +28,7 @@
#include "content/hlcache.h"
#include "gtk/window.h"
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/mouse.h"
#include "desktop/options.h"
#include "desktop/searchweb.h"
diff --git a/monkey/browser.c b/monkey/browser.c
index a9cfd04..ddea086 100644
--- a/monkey/browser.c
+++ b/monkey/browser.c
@@ -21,7 +21,7 @@
#include <stdio.h>
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/gui.h"
#include "utils/ring.h"
#include "utils/log.h"
diff --git a/render/box_normalise.c b/render/box_normalise.c
index 19a1cbc..8428b84 100644
--- a/render/box_normalise.c
+++ b/render/box_normalise.c
@@ -25,6 +25,7 @@
#include <assert.h>
#include <stdbool.h>
+#include <string.h>
#include "css/css.h"
#include "css/select.h"
#include "render/box.h"
diff --git a/render/html_script.c b/render/html_script.c
index 446868b..9edd08c 100644
--- a/render/html_script.c
+++ b/render/html_script.c
@@ -35,6 +35,7 @@
#include "javascript/js.h"
#include "content/content_protected.h"
#include "content/fetch.h"
+#include "content/hlcache.h"
#include "render/html_internal.h"
typedef bool (script_handler_t)(struct jscontext *jscontext, const char *data, size_t size) ;
diff --git a/riscos/dialog.c b/riscos/dialog.c
index ab53603..1fabbcb 100644
--- a/riscos/dialog.c
+++ b/riscos/dialog.c
@@ -685,11 +685,10 @@ bool ro_gui_dialog_zoom_apply(wimp_w w) {
void ro_gui_dialog_prepare_zoom(struct gui_window *g)
{
char scale_buffer[8];
- sprintf(scale_buffer, "%.0f", g->bw->scale * 100);
+ sprintf(scale_buffer, "%.0f", browser_window_get_scale(g->bw) * 100);
ro_gui_set_icon_string(dialog_zoom, ICON_ZOOM_VALUE, scale_buffer, true);
ro_gui_set_icon_selected_state(dialog_zoom, ICON_ZOOM_FRAMES, true);
- ro_gui_set_icon_shaded_state(dialog_zoom, ICON_ZOOM_FRAMES,
- !(g->bw->parent));
+ ro_gui_set_icon_shaded_state(dialog_zoom, ICON_ZOOM_FRAMES, true);
ro_gui_current_zoom_gui = g;
ro_gui_wimp_event_memorise(dialog_zoom);
}
diff --git a/riscos/history.c b/riscos/history.c
index 00ff5d6..8a3b562 100644
--- a/riscos/history.c
+++ b/riscos/history.c
@@ -30,6 +30,7 @@
#include "desktop/history_core.h"
#include "desktop/plotters.h"
#include "riscos/dialog.h"
+#include "desktop/browser_private.h"
#include "desktop/options.h"
#include "riscos/gui.h"
#include "riscos/wimp.h"
diff --git a/riscos/print.c b/riscos/print.c
index 46ceb85..05eb8fd 100644
--- a/riscos/print.c
+++ b/riscos/print.c
@@ -32,6 +32,7 @@
#include "utils/config.h"
#include "content/content.h"
#include "content/hlcache.h"
+#include "desktop/browser_private.h"
#include "desktop/options.h"
#include "desktop/plotters.h"
#include "riscos/dialog.h"
diff --git a/riscos/search.c b/riscos/search.c
index 76d333f..db87cad 100644
--- a/riscos/search.c
+++ b/riscos/search.c
@@ -32,6 +32,7 @@
#include "content/hlcache.h"
#include "desktop/browser.h"
#include "desktop/gui.h"
+#include "desktop/browser_private.h"
#include "desktop/search.h"
#include "desktop/selection.h"
#include "riscos/dialog.h"
diff --git a/riscos/textselection.c b/riscos/textselection.c
index c5a42b5..96c3e2c 100644
--- a/riscos/textselection.c
+++ b/riscos/textselection.c
@@ -498,8 +498,6 @@ bool ro_gui_save_clipboard(const char *path)
void ro_gui_selection_dragging(wimp_message *message)
{
wimp_full_message_dragging *drag = (wimp_full_message_dragging*)message;
- struct browser_window *bw;
- hlcache_handle *h;
struct gui_window *g;
os_coord pos;
@@ -517,9 +515,6 @@ void ro_gui_selection_dragging(wimp_message *message)
if (!ro_gui_window_to_window_pos(g, drag->pos.x, drag->pos.y, &pos))
return;
- bw = g->bw;
- h = bw->current_content;
-
drag_claimed = false;
}
diff --git a/riscos/window.c b/riscos/window.c
index 085e02a..b7fffd6 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -45,7 +45,7 @@
#include "content/hlcache.h"
#include "content/urldb.h"
#include "css/css.h"
-#include "desktop/browser.h"
+#include "desktop/browser_private.h"
#include "desktop/cookies.h"
#include "desktop/scrollbar.h"
#include "desktop/frames.h"
--
NetSurf Browser
10 years, 7 months
netsurf: branch master updated. d489908af8cda59c94ad2375e1340bad6957e64a
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/d489908af8cda59c94ad2...
...commit http://git.netsurf-browser.org/netsurf.git/commit/d489908af8cda59c94ad237...
...tree http://git.netsurf-browser.org/netsurf.git/tree/d489908af8cda59c94ad2375e...
The branch, master has been updated
via d489908af8cda59c94ad2375e1340bad6957e64a (commit)
from d307a854fc7fc4a0961cf3bc0bb43df503a0d9b1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/d489908af8cda59c94a...
commit d489908af8cda59c94ad2375e1340bad6957e64a
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Move scrollbar msg data declaration.
diff --git a/desktop/frame_types.h b/desktop/frame_types.h
index a9ba0b8..f193d03 100644
--- a/desktop/frame_types.h
+++ b/desktop/frame_types.h
@@ -40,7 +40,6 @@ typedef enum {
/* Handy struct names */
struct content_html_iframe;
-struct scrollbar_msg_data;
struct content_html_frames;
#endif
diff --git a/desktop/frames.h b/desktop/frames.h
index 1499216..d5aca07 100644
--- a/desktop/frames.h
+++ b/desktop/frames.h
@@ -25,6 +25,7 @@
#include "desktop/browser.h"
+struct scrollbar_msg_data;
void browser_window_create_iframes(struct browser_window *bw,
struct content_html_iframe *iframe);
-----------------------------------------------------------------------
Summary of changes:
desktop/frame_types.h | 1 -
desktop/frames.h | 1 +
2 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/desktop/frame_types.h b/desktop/frame_types.h
index a9ba0b8..f193d03 100644
--- a/desktop/frame_types.h
+++ b/desktop/frame_types.h
@@ -40,7 +40,6 @@ typedef enum {
/* Handy struct names */
struct content_html_iframe;
-struct scrollbar_msg_data;
struct content_html_frames;
#endif
diff --git a/desktop/frames.h b/desktop/frames.h
index 1499216..d5aca07 100644
--- a/desktop/frames.h
+++ b/desktop/frames.h
@@ -25,6 +25,7 @@
#include "desktop/browser.h"
+struct scrollbar_msg_data;
void browser_window_create_iframes(struct browser_window *bw,
struct content_html_iframe *iframe);
--
NetSurf Browser
10 years, 7 months
netsurf: branch master updated. d307a854fc7fc4a0961cf3bc0bb43df503a0d9b1
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/d307a854fc7fc4a0961cf...
...commit http://git.netsurf-browser.org/netsurf.git/commit/d307a854fc7fc4a0961cf3b...
...tree http://git.netsurf-browser.org/netsurf.git/tree/d307a854fc7fc4a0961cf3bc0...
The branch, master has been updated
via d307a854fc7fc4a0961cf3bc0bb43df503a0d9b1 (commit)
from 8984bf9647e107ee5b89323cf7c48cf06fec8793 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/d307a854fc7fc4a0961...
commit d307a854fc7fc4a0961cf3bc0bb43df503a0d9b1
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Clean up includes.
diff --git a/desktop/browser.h b/desktop/browser.h
index cdf8395..dda2d3e 100644
--- a/desktop/browser.h
+++ b/desktop/browser.h
@@ -24,16 +24,14 @@
#ifndef _NETSURF_DESKTOP_BROWSER_H_
#define _NETSURF_DESKTOP_BROWSER_H_
-#include <inttypes.h>
#include <stdbool.h>
-#include <time.h>
#include "content/content.h"
+#include "desktop/frame_types.h"
#include "desktop/gui.h"
#include "desktop/mouse.h"
#include "utils/types.h"
-#include "frame_types.h"
struct box;
struct hlcache_handle;
-----------------------------------------------------------------------
Summary of changes:
desktop/browser.h | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/desktop/browser.h b/desktop/browser.h
index cdf8395..dda2d3e 100644
--- a/desktop/browser.h
+++ b/desktop/browser.h
@@ -24,16 +24,14 @@
#ifndef _NETSURF_DESKTOP_BROWSER_H_
#define _NETSURF_DESKTOP_BROWSER_H_
-#include <inttypes.h>
#include <stdbool.h>
-#include <time.h>
#include "content/content.h"
+#include "desktop/frame_types.h"
#include "desktop/gui.h"
#include "desktop/mouse.h"
#include "utils/types.h"
-#include "frame_types.h"
struct box;
struct hlcache_handle;
--
NetSurf Browser
10 years, 7 months
toolchains: branch master updated. 0a49cc676e413e0c6ab9ace97c72d82a6897e982
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/toolchains.git/shortlog/0a49cc676e413e0c6a...
...commit http://git.netsurf-browser.org/toolchains.git/commit/0a49cc676e413e0c6ab9...
...tree http://git.netsurf-browser.org/toolchains.git/tree/0a49cc676e413e0c6ab9ac...
The branch, master has been updated
via 0a49cc676e413e0c6ab9ace97c72d82a6897e982 (commit)
from 57c395a6cd921b9126243fdecc0b41c6588fb691 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/toolchains.git/commitdiff/0a49cc676e413e0c...
commit 0a49cc676e413e0c6ab9ace97c72d82a6897e982
Author: John-Mark Bell <jmb(a)netsurf-browser.org>
Commit: John-Mark Bell <jmb(a)netsurf-browser.org>
Remove bogus patch
diff --git a/sdk/recipes/patches/libpng/m68k-atari-mint/longjmp.p b/sdk/recipes/patches/libpng/m68k-atari-mint/longjmp.p
deleted file mode 100644
index bb8013c..0000000
--- a/sdk/recipes/patches/libpng/m68k-atari-mint/longjmp.p
+++ /dev/null
@@ -1,11 +0,0 @@
---- png.h.orig 2012-08-17 11:28:10.000000000 +0100
-+++ png.h 2012-08-17 11:29:27.000000000 +0100
-@@ -1040,7 +1040,7 @@
- PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structp png_ptr,
- png_longjmp_ptr longjmp_fn, size_t jmp_buf_size));
- # define png_jmpbuf(png_ptr) \
-- (*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf)))
-+ (*png_set_longjmp_fn((png_ptr), siglongjmp, sizeof (jmp_buf)))
- #else
- # define png_jmpbuf(png_ptr) \
- (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP)
-----------------------------------------------------------------------
Summary of changes:
.../patches/libpng/m68k-atari-mint/longjmp.p | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)
delete mode 100644 sdk/recipes/patches/libpng/m68k-atari-mint/longjmp.p
diff --git a/sdk/recipes/patches/libpng/m68k-atari-mint/longjmp.p b/sdk/recipes/patches/libpng/m68k-atari-mint/longjmp.p
deleted file mode 100644
index bb8013c..0000000
--- a/sdk/recipes/patches/libpng/m68k-atari-mint/longjmp.p
+++ /dev/null
@@ -1,11 +0,0 @@
---- png.h.orig 2012-08-17 11:28:10.000000000 +0100
-+++ png.h 2012-08-17 11:29:27.000000000 +0100
-@@ -1040,7 +1040,7 @@
- PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structp png_ptr,
- png_longjmp_ptr longjmp_fn, size_t jmp_buf_size));
- # define png_jmpbuf(png_ptr) \
-- (*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf)))
-+ (*png_set_longjmp_fn((png_ptr), siglongjmp, sizeof (jmp_buf)))
- #else
- # define png_jmpbuf(png_ptr) \
- (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP)
--
Cross-compilation toolchains and environments
10 years, 7 months
netsurf: branch master updated. 8984bf9647e107ee5b89323cf7c48cf06fec8793
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/8984bf9647e107ee5b893...
...commit http://git.netsurf-browser.org/netsurf.git/commit/8984bf9647e107ee5b89323...
...tree http://git.netsurf-browser.org/netsurf.git/tree/8984bf9647e107ee5b89323cf...
The branch, master has been updated
via 8984bf9647e107ee5b89323cf7c48cf06fec8793 (commit)
from 892aee8070750372c9b0c9e4b34f8a75f04ebd98 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/8984bf9647e107ee5b8...
commit 8984bf9647e107ee5b89323cf7c48cf06fec8793
Author: Vincent Sanders <vince(a)netsurf-browser.org>
Commit: Vincent Sanders <vince(a)netsurf-browser.org>
add sdk library path
diff --git a/atari/Makefile.target b/atari/Makefile.target
index fcb6a25..259f5b6 100644
--- a/atari/Makefile.target
+++ b/atari/Makefile.target
@@ -52,6 +52,7 @@ LDFLAGS += -lcflib -lcurl
LDFLAGS += -lcss -lparserutils -ldom -lwapcaplet -lhubbub
LDFLAGS += -lssl -lcrypto
LDFLAGS += -lxml2 -lz -liconv -lcares -lHermes -lwindom -lgem -lm
+LDFLAGS += -L$(GCCSDK_INSTALL_ENV)/lib
# S_ATARI are sources purely for the Atari FreeMiNT build
-----------------------------------------------------------------------
Summary of changes:
atari/Makefile.target | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/atari/Makefile.target b/atari/Makefile.target
index fcb6a25..259f5b6 100644
--- a/atari/Makefile.target
+++ b/atari/Makefile.target
@@ -52,6 +52,7 @@ LDFLAGS += -lcflib -lcurl
LDFLAGS += -lcss -lparserutils -ldom -lwapcaplet -lhubbub
LDFLAGS += -lssl -lcrypto
LDFLAGS += -lxml2 -lz -liconv -lcares -lHermes -lwindom -lgem -lm
+LDFLAGS += -L$(GCCSDK_INSTALL_ENV)/lib
# S_ATARI are sources purely for the Atari FreeMiNT build
--
NetSurf Browser
10 years, 7 months
netsurf: branch master updated. 892aee8070750372c9b0c9e4b34f8a75f04ebd98
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/892aee8070750372c9b0c...
...commit http://git.netsurf-browser.org/netsurf.git/commit/892aee8070750372c9b0c9e...
...tree http://git.netsurf-browser.org/netsurf.git/tree/892aee8070750372c9b0c9e4b...
The branch, master has been updated
via 892aee8070750372c9b0c9e4b34f8a75f04ebd98 (commit)
via 02afe314afdfa3e795117e2ade21969ad9fb9992 (commit)
from bc6087f9b60496c30c1dad488a13fd35994a69c0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/892aee8070750372c9b...
commit 892aee8070750372c9b0c9e4b34f8a75f04ebd98
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Improve interaction with html objects.
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 4a96554..2b6bc9a 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -305,6 +305,7 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
bool imagemap = false;
int box_x = 0, box_y = 0;
int gadget_box_x = 0, gadget_box_y = 0;
+ int html_object_pos_x = 0, html_object_pos_y = 0;
int text_box_x = 0;
struct box *url_box = 0;
struct box *gadget_box = 0;
@@ -312,7 +313,7 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
struct box *box;
struct form_control *gadget = 0;
hlcache_handle *object = NULL;
- hlcache_handle *html_object = NULL;
+ struct box *html_object_box = NULL;
struct browser_window *iframe = NULL;
struct box *next_box;
struct box *drag_candidate = NULL;
@@ -405,10 +406,13 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
continue;
if (box->object) {
- if (content_get_type(box->object) == CONTENT_HTML)
- html_object = box->object;
- else
+ if (content_get_type(box->object) == CONTENT_HTML) {
+ html_object_box = box;
+ html_object_pos_x = box_x;
+ html_object_pos_y = box_y;
+ } else {
object = box->object;
+ }
}
if (box->iframe)
@@ -681,22 +685,18 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
browser_window_mouse_track(iframe, mouse,
x - pos_x, y - pos_y);
}
- } else if (html_object) {
- int pos_x, pos_y;
- float scale = browser_window_get_scale(bw);
-
- browser_window_get_position(iframe, false, &pos_x, &pos_y);
-
- pos_x /= scale;
- pos_y /= scale;
-
+ } else if (html_object_box) {
if (mouse & BROWSER_MOUSE_CLICK_1 ||
mouse & BROWSER_MOUSE_CLICK_2) {
- content_mouse_action(html_object, bw, mouse,
- x - pos_x, y - pos_y);
+ content_mouse_action(html_object_box->object,
+ bw, mouse,
+ x - html_object_pos_x,
+ y - html_object_pos_y);
} else {
- content_mouse_track(html_object, bw, mouse,
- x - pos_x, y - pos_y);
+ content_mouse_track(html_object_box->object,
+ bw, mouse,
+ x - html_object_pos_x,
+ y - html_object_pos_y);
}
} else if (url) {
if (title) {
@@ -834,7 +834,7 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
}
}
- if (!iframe) {
+ if (!iframe && !html_object_box) {
msg_data.explicit_status_text = status;
content_broadcast(c, CONTENT_MSG_STATUS, msg_data);
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/02afe314afdfa3e7951...
commit 02afe314afdfa3e795117e2ade21969ad9fb9992
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Fix object box construction.
diff --git a/render/box_construct.c b/render/box_construct.c
index e103d44..fe0cc2a 100644
--- a/render/box_construct.c
+++ b/render/box_construct.c
@@ -1852,7 +1852,7 @@ bool box_object(BOX_SPECIAL_PARAMS)
err = dom_element_get_attribute(n, kstr_data, &data);
if (err == DOM_NO_ERR && data != NULL) {
if (box_extract_link(dom_string_data(data), params->codebase,
- ¶ms->data)) {
+ ¶ms->data) == false) {
dom_string_unref(data);
return false;
}
-----------------------------------------------------------------------
Summary of changes:
render/box_construct.c | 2 +-
render/html_interaction.c | 36 ++++++++++++++++++------------------
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/render/box_construct.c b/render/box_construct.c
index e103d44..fe0cc2a 100644
--- a/render/box_construct.c
+++ b/render/box_construct.c
@@ -1852,7 +1852,7 @@ bool box_object(BOX_SPECIAL_PARAMS)
err = dom_element_get_attribute(n, kstr_data, &data);
if (err == DOM_NO_ERR && data != NULL) {
if (box_extract_link(dom_string_data(data), params->codebase,
- ¶ms->data)) {
+ ¶ms->data) == false) {
dom_string_unref(data);
return false;
}
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 4a96554..2b6bc9a 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -305,6 +305,7 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
bool imagemap = false;
int box_x = 0, box_y = 0;
int gadget_box_x = 0, gadget_box_y = 0;
+ int html_object_pos_x = 0, html_object_pos_y = 0;
int text_box_x = 0;
struct box *url_box = 0;
struct box *gadget_box = 0;
@@ -312,7 +313,7 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
struct box *box;
struct form_control *gadget = 0;
hlcache_handle *object = NULL;
- hlcache_handle *html_object = NULL;
+ struct box *html_object_box = NULL;
struct browser_window *iframe = NULL;
struct box *next_box;
struct box *drag_candidate = NULL;
@@ -405,10 +406,13 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
continue;
if (box->object) {
- if (content_get_type(box->object) == CONTENT_HTML)
- html_object = box->object;
- else
+ if (content_get_type(box->object) == CONTENT_HTML) {
+ html_object_box = box;
+ html_object_pos_x = box_x;
+ html_object_pos_y = box_y;
+ } else {
object = box->object;
+ }
}
if (box->iframe)
@@ -681,22 +685,18 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
browser_window_mouse_track(iframe, mouse,
x - pos_x, y - pos_y);
}
- } else if (html_object) {
- int pos_x, pos_y;
- float scale = browser_window_get_scale(bw);
-
- browser_window_get_position(iframe, false, &pos_x, &pos_y);
-
- pos_x /= scale;
- pos_y /= scale;
-
+ } else if (html_object_box) {
if (mouse & BROWSER_MOUSE_CLICK_1 ||
mouse & BROWSER_MOUSE_CLICK_2) {
- content_mouse_action(html_object, bw, mouse,
- x - pos_x, y - pos_y);
+ content_mouse_action(html_object_box->object,
+ bw, mouse,
+ x - html_object_pos_x,
+ y - html_object_pos_y);
} else {
- content_mouse_track(html_object, bw, mouse,
- x - pos_x, y - pos_y);
+ content_mouse_track(html_object_box->object,
+ bw, mouse,
+ x - html_object_pos_x,
+ y - html_object_pos_y);
}
} else if (url) {
if (title) {
@@ -834,7 +834,7 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
}
}
- if (!iframe) {
+ if (!iframe && !html_object_box) {
msg_data.explicit_status_text = status;
content_broadcast(c, CONTENT_MSG_STATUS, msg_data);
--
NetSurf Browser
10 years, 7 months
netsurf: branch master updated. bc6087f9b60496c30c1dad488a13fd35994a69c0
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/bc6087f9b60496c30c1da...
...commit http://git.netsurf-browser.org/netsurf.git/commit/bc6087f9b60496c30c1dad4...
...tree http://git.netsurf-browser.org/netsurf.git/tree/bc6087f9b60496c30c1dad488...
The branch, master has been updated
via bc6087f9b60496c30c1dad488a13fd35994a69c0 (commit)
from d43ac4760231635960b331a7590059e55de0688c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/bc6087f9b60496c30c1...
commit bc6087f9b60496c30c1dad488a13fd35994a69c0
Author: Vincent Sanders <vince(a)netsurf-browser.org>
Commit: Vincent Sanders <vince(a)netsurf-browser.org>
remove bogus posix define and workround missing PATH_MAX directly
diff --git a/atari/osspec.c b/atari/osspec.c
index 455c284..d697f43 100644
--- a/atari/osspec.c
+++ b/atari/osspec.c
@@ -1,4 +1,20 @@
-#define __USE_POSIX
+/*
+ * Copyright 2010 <ole(a)monochrom.net>
+ *
+ * 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/>.
+ */
#include <sys/types.h>
#include <limits.h>
@@ -14,6 +30,10 @@
#include "utils/log.h"
#include "atari/osspec.h"
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
NS_ATARI_SYSINFO atari_sysinfo;
unsigned short _systype_v;
-----------------------------------------------------------------------
Summary of changes:
atari/osspec.c | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/atari/osspec.c b/atari/osspec.c
index 455c284..d697f43 100644
--- a/atari/osspec.c
+++ b/atari/osspec.c
@@ -1,4 +1,20 @@
-#define __USE_POSIX
+/*
+ * Copyright 2010 <ole(a)monochrom.net>
+ *
+ * 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/>.
+ */
#include <sys/types.h>
#include <limits.h>
@@ -14,6 +30,10 @@
#include "utils/log.h"
#include "atari/osspec.h"
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
NS_ATARI_SYSINFO atari_sysinfo;
unsigned short _systype_v;
--
NetSurf Browser
10 years, 7 months