summaryrefslogtreecommitdiff
path: root/desktop/browser_private.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-03-03 09:28:54 +0000
committerVincent Sanders <vince@kyllikki.org>2017-03-03 14:45:39 +0000
commit855721282c01a0cd0c94c87e03ac8229da077372 (patch)
tree3c5c07bbbc8dde7539d8a391c028e609728490ed /desktop/browser_private.h
parent028c4e2860a5cf75ce8a3b97c04d12adaee7ef1b (diff)
downloadnetsurf-855721282c01a0cd0c94c87e03ac8229da077372.tar.gz
netsurf-855721282c01a0cd0c94c87e03ac8229da077372.tar.bz2
split out status bar text cache into separate struct
Diffstat (limited to 'desktop/browser_private.h')
-rw-r--r--desktop/browser_private.h37
1 files changed, 26 insertions, 11 deletions
diff --git a/desktop/browser_private.h b/desktop/browser_private.h
index 072a894d6..0234cce0b 100644
--- a/desktop/browser_private.h
+++ b/desktop/browser_private.h
@@ -37,24 +37,34 @@ struct gui_window;
struct history;
struct selection;
-/** Browser window data. */
+/**
+ * Browser window data.
+ */
struct browser_window {
- /** Page currently displayed, or 0. Must have status READY or DONE. */
+ /**
+ * Content handle of page currently displayed which must have
+ * READY or DONE status or NULL for no content.
+ */
struct hlcache_handle *current_content;
- /** Page being loaded, or 0. */
+ /** Page being loaded, or NULL. */
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 */
+ /**
+ * flag to indicate favicon fetch already failed which
+ * prevents infinite error looping.
+ */
bool failed_favicon;
- /** Window history structure. */
+ /** local history handle. */
struct history *history;
- /** Platform specific window data. */
+ /**
+ * Platform specific window data only valid at top level.
+ */
struct gui_window *window;
/** Busy indicator is active. */
@@ -156,14 +166,15 @@ struct browser_window {
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. */
+ struct {
+ char *text; /**< Current status bar text. */
+ int text_len; /**< Length of the status::text buffer. */
+ int match; /**< Number of times an idempotent status-set operation was performed. */
+ int miss; /**< Number of times status was really updated. */
+ } status;
};
-
/**
* Initialise common parts of a browser window
*
@@ -174,6 +185,7 @@ struct browser_window {
nserror browser_window_initialise_common(enum browser_window_create_flags flags,
struct browser_window *bw, struct browser_window *existing);
+
/**
* Get the dimensions of the area a browser window occupies
*
@@ -185,6 +197,7 @@ nserror browser_window_initialise_common(enum browser_window_create_flags flags,
void browser_window_get_dimensions(struct browser_window *bw,
int *width, int *height, bool scaled);
+
/**
* Update the extent of the inside of a browser window to that of the current
* content
@@ -193,6 +206,7 @@ void browser_window_get_dimensions(struct browser_window *bw,
*/
void browser_window_update_extent(struct browser_window *bw);
+
/**
* Change the status bar of a browser window.
*
@@ -201,6 +215,7 @@ void browser_window_update_extent(struct browser_window *bw);
*/
void browser_window_set_status(struct browser_window *bw, const char *text);
+
/**
* Get the root level browser window
*