summaryrefslogtreecommitdiff
path: root/src/gmdocument.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gmdocument.h')
-rw-r--r--src/gmdocument.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/gmdocument.h b/src/gmdocument.h
new file mode 100644
index 00000000..dfad1d46
--- /dev/null
+++ b/src/gmdocument.h
@@ -0,0 +1,28 @@
1#pragma once
2
3#include "gemini.h"
4#include <the_Foundation/object.h>
5#include <the_Foundation/rect.h>
6#include <the_Foundation/string.h>
7
8iDeclareType(GmRun)
9
10struct Impl_GmRun {
11 iRangecc text;
12 iRect bounds; /* advance metrics */
13 uint8_t font;
14 uint8_t color;
15 uint16_t linkId;
16};
17
18iDeclareType(GmDocument)
19iDeclareClass(GmDocument)
20
21iDeclareObjectConstruction(GmDocument)
22
23void setWidth_GmDocument (iGmDocument *, int width);
24void setSource_GmDocument (iGmDocument *, const iString *source, int width);
25
26typedef void (*iGmDocumentRenderFunc)(void *, const iGmRun *);
27
28void render_GmDocument (const iGmDocument *, iRangei visRangeY, iGmDocumentRenderFunc render, void *);