1
0
Fork 0
tinmop/src/gui/server/public-api-gemini-tour-link...

39 lines
1.4 KiB
Common Lisp

;; tinmop: an humble gemini and pleroma client
;; Copyright (C) 2022 cage
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program.
;; If not, see [[http://www.gnu.org/licenses/][http://www.gnu.org/licenses/]].
(in-package :json-rpc-communication)
(defun tour-shuffle ()
(shuffle-tour *gemini-window*))
(defun tour-add-link (link-value link-label)
(add-tour-link *gemini-window*
(make-instance 'gemini-parser:gemini-link
:name link-label
:target link-value)))
(defun tour-pop-link ()
(a:when-let ((link (pop-tour-link *gemini-window*)))
(list :link-value (gemini-parser:target link)
:link-label (gemini-parser:name link))))
(defun tour-delete-link (url)
(delete-tour-link-element *gemini-window* url))
(defun clear-tour ()
(clear-tour-link *gemini-window*))