2005-09-15 09:58:31 -04:00
|
|
|
#ifndef EL__BOOKMARKS_BOOKMARKS_H
|
|
|
|
#define EL__BOOKMARKS_BOOKMARKS_H
|
|
|
|
|
|
|
|
#include "main/module.h"
|
|
|
|
#include "main/object.h"
|
|
|
|
#include "util/lists.h"
|
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
struct listbox_item;
|
|
|
|
struct terminal;
|
|
|
|
|
|
|
|
/* Bookmark record structure */
|
|
|
|
|
|
|
|
struct bookmark {
|
|
|
|
OBJECT_HEAD(struct bookmark);
|
|
|
|
|
|
|
|
struct bookmark *root;
|
|
|
|
|
|
|
|
struct listbox_item *box_item;
|
|
|
|
|
2012-11-18 13:06:13 -05:00
|
|
|
/** @todo Bug 1066: The bookmark::url string should be in UTF-8 too,
|
2009-01-24 07:38:26 -05:00
|
|
|
* but this has not yet been fully implemented. */
|
2021-01-02 10:20:27 -05:00
|
|
|
char *title; /* UTF-8 title of bookmark */
|
|
|
|
char *url; /* Location of bookmarked item */
|
2005-09-15 09:58:31 -04:00
|
|
|
|
2007-07-26 15:39:08 -04:00
|
|
|
LIST_OF(struct bookmark) child;
|
2005-09-15 09:58:31 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Bookmark lists */
|
|
|
|
|
2007-07-26 12:04:35 -04:00
|
|
|
extern LIST_OF(struct bookmark) bookmarks;
|
2005-09-15 09:58:31 -04:00
|
|
|
|
|
|
|
/* The bookmarks module */
|
|
|
|
|
|
|
|
extern struct module bookmarks_module;
|
|
|
|
|
|
|
|
/* Read/write bookmarks functions */
|
|
|
|
|
|
|
|
void read_bookmarks(void);
|
|
|
|
void write_bookmarks(void);
|
|
|
|
|
|
|
|
/* Bookmarks manipulation */
|
|
|
|
void bookmarks_set_dirty(void);
|
|
|
|
void bookmarks_unset_dirty(void);
|
|
|
|
int bookmarks_are_dirty(void);
|
|
|
|
|
|
|
|
void delete_bookmark(struct bookmark *);
|
2022-01-31 09:38:17 -05:00
|
|
|
struct bookmark *add_bookmark(struct bookmark *, int, const char *, const char *);
|
2008-10-19 18:08:20 -04:00
|
|
|
struct bookmark *add_bookmark_cp(struct bookmark *, int, int,
|
2022-01-31 09:46:05 -05:00
|
|
|
const char *, const char *);
|
2005-12-29 02:05:31 -05:00
|
|
|
struct bookmark *get_bookmark_by_name(struct bookmark *folder,
|
2021-01-02 10:20:27 -05:00
|
|
|
char *title);
|
|
|
|
struct bookmark *get_bookmark(char *url);
|
|
|
|
void bookmark_terminal_tabs(struct terminal *term, char *foldername);
|
|
|
|
char *get_auto_save_bookmark_foldername_utf8(void);
|
2005-09-15 09:58:31 -04:00
|
|
|
void bookmark_auto_save_tabs(struct terminal *term);
|
2008-11-16 17:56:18 -05:00
|
|
|
int update_bookmark(struct bookmark *, int,
|
2021-01-02 10:20:27 -05:00
|
|
|
char *, char *);
|
|
|
|
void open_bookmark_folder(struct session *ses, char *foldername);
|
2005-09-15 09:58:31 -04:00
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
#endif
|