2005-09-15 15:58:31 +02: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 20:14:55 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 15:58:31 +02: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 20:06:13 +02:00
|
|
|
/** @todo Bug 1066: The bookmark::url string should be in UTF-8 too,
|
2009-01-24 14:38:26 +02:00
|
|
|
* but this has not yet been fully implemented. */
|
2021-01-02 16:20:27 +01:00
|
|
|
char *title; /* UTF-8 title of bookmark */
|
|
|
|
char *url; /* Location of bookmarked item */
|
2005-09-15 15:58:31 +02:00
|
|
|
|
2007-07-26 22:39:08 +03:00
|
|
|
LIST_OF(struct bookmark) child;
|
2005-09-15 15:58:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Bookmark lists */
|
|
|
|
|
2007-07-26 19:04:35 +03:00
|
|
|
extern LIST_OF(struct bookmark) bookmarks;
|
2005-09-15 15:58:31 +02: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 *);
|
2021-01-02 16:20:27 +01:00
|
|
|
struct bookmark *add_bookmark(struct bookmark *, int, char *, char *);
|
2008-10-20 01:08:20 +03:00
|
|
|
struct bookmark *add_bookmark_cp(struct bookmark *, int, int,
|
2021-01-02 16:20:27 +01:00
|
|
|
char *, char *);
|
2005-12-29 07:05:31 +00:00
|
|
|
struct bookmark *get_bookmark_by_name(struct bookmark *folder,
|
2021-01-02 16:20:27 +01: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 15:58:31 +02:00
|
|
|
void bookmark_auto_save_tabs(struct terminal *term);
|
2008-11-17 00:56:18 +02:00
|
|
|
int update_bookmark(struct bookmark *, int,
|
2021-01-02 16:20:27 +01:00
|
|
|
char *, char *);
|
|
|
|
void open_bookmark_folder(struct session *ses, char *foldername);
|
2005-09-15 15:58:31 +02:00
|
|
|
|
2020-10-05 20:14:55 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 15:58:31 +02:00
|
|
|
#endif
|