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)
19
20// HTMLElement represents a parsed element from an HTML document.
21type HTMLElement struct {
22	Type  int
23	Text  string // Text content
24	Attr1 string // href (link), src (image), cite (blockquote)
25	Attr2 string // alt (image), prev_text (blockquote)
26}