diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2017-09-20 18:58:19 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2017-09-23 14:55:52 +0100 |
commit | a43d0cec7a1ab98c5264d7881c8d2752f21dc812 (patch) | |
tree | 5028620be84d175420fdca21f9da5f4d1716cee3 /desktop/browser_private.h | |
parent | f86e9e505dea633a893b3d2d3b73d4bb8cc3d02b (diff) | |
download | netsurf-a43d0cec7a1ab98c5264d7881c8d2752f21dc812.tar.gz netsurf-a43d0cec7a1ab98c5264d7881c8d2752f21dc812.tar.bz2 |
Add concept of browser scroll offset saving in local history
Diffstat (limited to 'desktop/browser_private.h')
-rw-r--r-- | desktop/browser_private.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/desktop/browser_private.h b/desktop/browser_private.h index 3cdef5c89..192d22bf0 100644 --- a/desktop/browser_private.h +++ b/desktop/browser_private.h @@ -46,6 +46,8 @@ struct history_page { lwc_string *frag_id; /** Fragment identifier, or NULL. */ char *title; /**< Page title, never NULL. */ struct bitmap *bitmap; /**< Thumbnail bitmap, or NULL. */ + float scroll_x; /**< Scroll X offset when visited */ + float scroll_y; /**< Scroll Y offset when visited */ }; /** @@ -325,7 +327,7 @@ nserror browser_window_history_add(struct browser_window *bw, struct hlcache_handle *content, lwc_string *frag_id); /** - * Update the thumbnail for the current entry. + * Update the thumbnail and scroll offsets for the current entry. * * \param bw The browser window to update the history within. * \param content content for current entry @@ -335,6 +337,17 @@ nserror browser_window_history_update(struct browser_window *bw, struct hlcache_handle *content); /** + * Retrieve the stored scroll offsets for the current history entry + * + * \param bw The browser window to retrieve scroll offsets for. + * \param sx Pointer to a float for the X scroll offset + * \param sy Pointer to a float for the Y scroll offset + * \return NSERROR_OK or error code on failure. + */ +nserror browser_window_history_get_scroll(struct browser_window *bw, + float *sx, float *sy); + +/** * Free a history structure. * * \param bw The browser window to destroy the history within. |