aboutsummaryrefslogtreecommitdiff
path: root/src/renderers/gophermaprenderer.hpp
diff options
context:
space:
mode:
authorFelix (xq) Queißner <git@mq32.de>2020-06-22 21:10:04 +0200
committerFelix (xq) Queißner <git@mq32.de>2020-06-22 21:10:04 +0200
commit75ec461eeaa851cb5c53f4cfffc434e3e529ed1d (patch)
tree3944737340718ca3675381aa06636045d397e780 /src/renderers/gophermaprenderer.hpp
parent8dbfb0890560fd1cd698d06fa05ac868c4db8576 (diff)
downloadkristall-75ec461eeaa851cb5c53f4cfffc434e3e529ed1d.tar.gz
Restructures the project source and cleans up a bit
Diffstat (limited to 'src/renderers/gophermaprenderer.hpp')
-rw-r--r--src/renderers/gophermaprenderer.hpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/renderers/gophermaprenderer.hpp b/src/renderers/gophermaprenderer.hpp
new file mode 100644
index 0000000..3835cec
--- /dev/null
+++ b/src/renderers/gophermaprenderer.hpp
@@ -0,0 +1,26 @@
+#ifndef GOPHERMAPRENDERER_HPP
+#define GOPHERMAPRENDERER_HPP
+
+#include "documentstyle.hpp"
+
+#include <memory>
+#include <QTextDocument>
+
+struct GophermapRenderer
+{
+ GophermapRenderer() = delete;
+
+
+ //! Renders the given byte sequence into a GeminiDocument.
+ //! @param input The utf8 encoded input string
+ //! @param root_url The url that is used to resolve relative links
+ //! @param style The style which is used to render the document
+ //! @param outline The extracted outline from the document
+ static std::unique_ptr<QTextDocument> render(
+ QByteArray const & input,
+ QUrl const & root_url,
+ DocumentStyle const & style
+ );
+};
+
+#endif // GOPHERMAPRENDERER_HPP