summaryrefslogtreecommitdiff
path: root/src/bookmarks.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-09-24 07:36:08 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-09-24 07:36:08 +0300
commit446df26adb969dcb4dd9cf5e171fbb9453a8e27c (patch)
tree562c647f7c9dc907d34e263d44c9a414a80a8017 /src/bookmarks.h
parent27ebfc904b9b3eac3ef5479ed0d0ba166fac1543 (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.h10
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)
32iDeclareType(Bookmark) 32iDeclareType(Bookmark)
33iDeclareTypeConstruction(Bookmark) 33iDeclareTypeConstruction(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
79void clear_Bookmarks (iBookmarks *); 81void clear_Bookmarks (iBookmarks *);
80void load_Bookmarks (iBookmarks *, const char *dirPath); 82void load_Bookmarks (iBookmarks *, const char *dirPath);
83void save_Bookmarks (const iBookmarks *, const char *dirPath);
84
81uint32_t add_Bookmarks (iBookmarks *, const iString *url, const iString *title, 85uint32_t add_Bookmarks (iBookmarks *, const iString *url, const iString *title,
82 const iString *tags, iChar icon); 86 const iString *tags, iChar icon);
83iBool remove_Bookmarks (iBookmarks *, uint32_t id); 87iBool remove_Bookmarks (iBookmarks *, uint32_t id);
84iBookmark * get_Bookmarks (iBookmarks *, uint32_t id); 88iBookmark * get_Bookmarks (iBookmarks *, uint32_t id);
89void reorder_Bookmarks (iBookmarks *, uint32_t id, int newOrder);
90iBool updateBookmarkIcon_Bookmarks(iBookmarks *, const iString *url, iChar icon);
85void fetchRemote_Bookmarks (iBookmarks *); 91void fetchRemote_Bookmarks (iBookmarks *);
86void requestFinished_Bookmarks (iBookmarks *, iGmRequest *req); 92void requestFinished_Bookmarks (iBookmarks *, iGmRequest *req);
87iBool updateBookmarkIcon_Bookmarks(iBookmarks *, const iString *url, iChar icon);
88iChar siteIcon_Bookmarks (const iBookmarks *, const iString *url);
89 93
90void save_Bookmarks (const iBookmarks *, const char *dirPath); 94iChar siteIcon_Bookmarks (const iBookmarks *, const iString *url);
91uint32_t findUrl_Bookmarks (const iBookmarks *, const iString *url); /* O(n) */ 95uint32_t findUrl_Bookmarks (const iBookmarks *, const iString *url); /* O(n) */
92 96
93typedef iBool (*iBookmarksFilterFunc) (void *context, const iBookmark *); 97typedef iBool (*iBookmarksFilterFunc) (void *context, const iBookmark *);