diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-09-24 07:36:08 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-09-24 07:36:08 +0300 |
commit | 446df26adb969dcb4dd9cf5e171fbb9453a8e27c (patch) | |
tree | 562c647f7c9dc907d34e263d44c9a414a80a8017 /src/bookmarks.h | |
parent | 27ebfc904b9b3eac3ef5479ed0d0ba166fac1543 (diff) |
SidebarWidget: Reordering bookmarks manually
One can now drag and drop bookmarks to change their order in the list.
Diffstat (limited to 'src/bookmarks.h')
-rw-r--r-- | src/bookmarks.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/bookmarks.h b/src/bookmarks.h index dc7eca9a..0de930d7 100644 --- a/src/bookmarks.h +++ b/src/bookmarks.h | |||
@@ -32,6 +32,8 @@ iDeclareType(GmRequest) | |||
32 | iDeclareType(Bookmark) | 32 | iDeclareType(Bookmark) |
33 | iDeclareTypeConstruction(Bookmark) | 33 | iDeclareTypeConstruction(Bookmark) |
34 | 34 | ||
35 | /* TODO: Make the special internal tags a bitfield, separate from user's tags. */ | ||
36 | |||
35 | #define headings_BookmarkTag "headings" | 37 | #define headings_BookmarkTag "headings" |
36 | #define homepage_BookmarkTag "homepage" | 38 | #define homepage_BookmarkTag "homepage" |
37 | #define linkSplit_BookmarkTag "linksplit" | 39 | #define linkSplit_BookmarkTag "linksplit" |
@@ -78,16 +80,18 @@ iDeclareTypeConstruction(Bookmarks) | |||
78 | 80 | ||
79 | void clear_Bookmarks (iBookmarks *); | 81 | void clear_Bookmarks (iBookmarks *); |
80 | void load_Bookmarks (iBookmarks *, const char *dirPath); | 82 | void load_Bookmarks (iBookmarks *, const char *dirPath); |
83 | void save_Bookmarks (const iBookmarks *, const char *dirPath); | ||
84 | |||
81 | uint32_t add_Bookmarks (iBookmarks *, const iString *url, const iString *title, | 85 | uint32_t add_Bookmarks (iBookmarks *, const iString *url, const iString *title, |
82 | const iString *tags, iChar icon); | 86 | const iString *tags, iChar icon); |
83 | iBool remove_Bookmarks (iBookmarks *, uint32_t id); | 87 | iBool remove_Bookmarks (iBookmarks *, uint32_t id); |
84 | iBookmark * get_Bookmarks (iBookmarks *, uint32_t id); | 88 | iBookmark * get_Bookmarks (iBookmarks *, uint32_t id); |
89 | void reorder_Bookmarks (iBookmarks *, uint32_t id, int newOrder); | ||
90 | iBool updateBookmarkIcon_Bookmarks(iBookmarks *, const iString *url, iChar icon); | ||
85 | void fetchRemote_Bookmarks (iBookmarks *); | 91 | void fetchRemote_Bookmarks (iBookmarks *); |
86 | void requestFinished_Bookmarks (iBookmarks *, iGmRequest *req); | 92 | void requestFinished_Bookmarks (iBookmarks *, iGmRequest *req); |
87 | iBool updateBookmarkIcon_Bookmarks(iBookmarks *, const iString *url, iChar icon); | ||
88 | iChar siteIcon_Bookmarks (const iBookmarks *, const iString *url); | ||
89 | 93 | ||
90 | void save_Bookmarks (const iBookmarks *, const char *dirPath); | 94 | iChar siteIcon_Bookmarks (const iBookmarks *, const iString *url); |
91 | uint32_t findUrl_Bookmarks (const iBookmarks *, const iString *url); /* O(n) */ | 95 | uint32_t findUrl_Bookmarks (const iBookmarks *, const iString *url); /* O(n) */ |
92 | 96 | ||
93 | typedef iBool (*iBookmarksFilterFunc) (void *context, const iBookmark *); | 97 | typedef iBool (*iBookmarksFilterFunc) (void *context, const iBookmark *); |