diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-06-25 16:26:53 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-06-25 16:26:53 +0300 |
commit | 5dbc85eaaa1bd0a0fc11dd76a75ece2efe763df5 (patch) | |
tree | 9721fb7aced603adb10b9bb3f3beb3f8d5fba973 /src/history.h | |
parent | 95c527db1484f7758a180c6de051d0182c3b2e81 (diff) | |
parent | f99a9111170f2ff28383fd3172fdaf4b9a1ba069 (diff) |
Merge branch 'work/v1.6' into work/serious-unicode
# Conflicts:
# res/fonts/SmolEmoji-Regular.ttf
Diffstat (limited to 'src/history.h')
-rw-r--r-- | src/history.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/history.h b/src/history.h index 164a61d6..7dad72df 100644 --- a/src/history.h +++ b/src/history.h | |||
@@ -22,6 +22,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ | |||
22 | 22 | ||
23 | #pragma once | 23 | #pragma once |
24 | 24 | ||
25 | #include "gmdocument.h" | ||
25 | #include "gmrequest.h" | 26 | #include "gmrequest.h" |
26 | 27 | ||
27 | #include <the_Foundation/ptrarray.h> | 28 | #include <the_Foundation/ptrarray.h> |
@@ -37,6 +38,17 @@ struct Impl_RecentUrl { | |||
37 | iString url; | 38 | iString url; |
38 | float normScrollY; /* normalized to document height */ | 39 | float normScrollY; /* normalized to document height */ |
39 | iGmResponse *cachedResponse; /* kept in memory for quicker back navigation */ | 40 | iGmResponse *cachedResponse; /* kept in memory for quicker back navigation */ |
41 | iGmDocument *cachedDoc; /* cached copy of the presentation: layout and media (not serialized) */ | ||
42 | struct { | ||
43 | uint8_t openedFromSidebar : 1; | ||
44 | } flags; | ||
45 | }; | ||
46 | |||
47 | iDeclareType(MemInfo) | ||
48 | |||
49 | struct Impl_MemInfo { | ||
50 | size_t cacheSize; /* number of bytes stored persistently */ | ||
51 | size_t memorySize; /* number of bytes stored in RAM */ | ||
40 | }; | 52 | }; |
41 | 53 | ||
42 | /*----------------------------------------------------------------------------------------------*/ | 54 | /*----------------------------------------------------------------------------------------------*/ |
@@ -51,13 +63,19 @@ void clear_History (iHistory *); | |||
51 | void add_History (iHistory *, const iString *url); | 63 | void add_History (iHistory *, const iString *url); |
52 | void replace_History (iHistory *, const iString *url); | 64 | void replace_History (iHistory *, const iString *url); |
53 | void setCachedResponse_History (iHistory *, const iGmResponse *response); | 65 | void setCachedResponse_History (iHistory *, const iGmResponse *response); |
66 | void setCachedDocument_History (iHistory *, iGmDocument *doc, iBool openedFromSidebar); | ||
54 | iBool goBack_History (iHistory *); | 67 | iBool goBack_History (iHistory *); |
55 | iBool goForward_History (iHistory *); | 68 | iBool goForward_History (iHistory *); |
69 | iBool preceding_History (iHistory *d, iRecentUrl *recent_out); | ||
70 | //iBool following_History (iHistory *d, iRecentUrl *recent_out); | ||
56 | iRecentUrl *recentUrl_History (iHistory *, size_t pos); | 71 | iRecentUrl *recentUrl_History (iHistory *, size_t pos); |
57 | iRecentUrl *mostRecentUrl_History (iHistory *); | 72 | iRecentUrl *mostRecentUrl_History (iHistory *); |
58 | iRecentUrl *findUrl_History (iHistory *, const iString *url); | 73 | iRecentUrl *findUrl_History (iHistory *, const iString *url); |
59 | void clearCache_History (iHistory *); | 74 | |
60 | size_t pruneLeastImportant_History (iHistory *); | 75 | void clearCache_History (iHistory *); |
76 | size_t pruneLeastImportant_History (iHistory *); | ||
77 | size_t pruneLeastImportantMemory_History (iHistory *); | ||
78 | void invalidateTheme_History (iHistory *); /* theme has changed, cached contents need updating */ | ||
61 | 79 | ||
62 | iBool atLatest_History (const iHistory *); | 80 | iBool atLatest_History (const iHistory *); |
63 | iBool atOldest_History (const iHistory *); | 81 | iBool atOldest_History (const iHistory *); |
@@ -73,6 +91,7 @@ const iRecentUrl * | |||
73 | const iGmResponse * | 91 | const iGmResponse * |
74 | cachedResponse_History (const iHistory *); | 92 | cachedResponse_History (const iHistory *); |
75 | size_t cacheSize_History (const iHistory *); | 93 | size_t cacheSize_History (const iHistory *); |
94 | size_t memorySize_History (const iHistory *); | ||
76 | 95 | ||
77 | iString * debugInfo_History (const iHistory *); | 96 | iString * debugInfo_History (const iHistory *); |
78 | 97 | iMemInfo memoryUsage_History (const iHistory *); | |