2 * Copyright (c) 2021 Omar Polo <op@omarpolo.com>
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 #include "telescope.h"
24 char uri[GEMINI_URL_LEN];
25 char title[TITLE_MAX];
30 struct session_tab_hist {
31 char uri[GEMINI_URL_LEN];
37 char uri[GEMINI_URL_LEN];
46 #define HISTORY_CAP 1000
48 struct history_item items[HISTORY_CAP];
52 extern struct history history;
54 void switch_to_tab(struct tab *);
55 unsigned int tab_new_id(void);
56 struct tab *new_tab(const char *, const char *base, struct tab *);
57 void kill_tab(struct tab *, int);
58 struct tab *unkill_tab(void);
59 void free_tab(struct tab *);
60 void stop_tab(struct tab*);
62 void save_session(void);
64 void history_push(struct histitem *);
65 void history_sort(void);
66 void history_add(const char *);
68 void autosave_init(void);
69 void autosave_timer(int, short, void *);
70 void autosave_hook(void);