types.go

 1package clib
 2
 3// ImageConvertResult holds the output of DecodeToPNG.
 4type ImageConvertResult struct {
 5	PNGData []byte
 6	Width   int
 7	Height  int
 8}
 9
10// HTMLElementType constants mirror the C enum values in htmlconv.h.
11const (
12	HElemText       = 0
13	HElemH1         = 1
14	HElemH2         = 2
15	HElemLink       = 3
16	HElemImage      = 4
17	HElemBlockquote = 5
18	HElemTable      = 6
19)
20
21// HTMLElement represents a parsed element from an HTML document.
22type HTMLElement struct {
23	Type  int
24	Text  string // Text content
25	Attr1 string // href (link), src (image), cite (blockquote)
26	Attr2 string // alt (image), prev_text (blockquote)
27}