dom.nim 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  1. #
  2. #
  3. # Nim's Runtime Library
  4. # (c) Copyright 2012 Andreas Rumpf
  5. #
  6. # See the file "copying.txt", included in this
  7. # distribution, for details about the copyright.
  8. #
  9. ## Declaration of the Document Object Model for the `JavaScript backend
  10. ## <backends.html#the-javascript-target>`_.
  11. when not defined(js) and not defined(Nimdoc):
  12. {.error: "This module only works on the JavaScript platform".}
  13. type
  14. EventTarget* = ref EventTargetObj
  15. EventTargetObj {.importc.} = object of RootObj
  16. onabort*: proc (event: Event) {.nimcall.}
  17. onblur*: proc (event: Event) {.nimcall.}
  18. onchange*: proc (event: Event) {.nimcall.}
  19. onclick*: proc (event: Event) {.nimcall.}
  20. ondblclick*: proc (event: Event) {.nimcall.}
  21. onerror*: proc (event: Event) {.nimcall.}
  22. onfocus*: proc (event: Event) {.nimcall.}
  23. onkeydown*: proc (event: Event) {.nimcall.}
  24. onkeypress*: proc (event: Event) {.nimcall.}
  25. onkeyup*: proc (event: Event) {.nimcall.}
  26. onload*: proc (event: Event) {.nimcall.}
  27. onmousedown*: proc (event: Event) {.nimcall.}
  28. onmousemove*: proc (event: Event) {.nimcall.}
  29. onmouseout*: proc (event: Event) {.nimcall.}
  30. onmouseover*: proc (event: Event) {.nimcall.}
  31. onmouseup*: proc (event: Event) {.nimcall.}
  32. onreset*: proc (event: Event) {.nimcall.}
  33. onselect*: proc (event: Event) {.nimcall.}
  34. onsubmit*: proc (event: Event) {.nimcall.}
  35. onunload*: proc (event: Event) {.nimcall.}
  36. Window* = ref WindowObj
  37. WindowObj {.importc.} = object of EventTargetObj
  38. document*: Document
  39. event*: Event
  40. history*: History
  41. location*: Location
  42. closed*: bool
  43. defaultStatus*: cstring
  44. devicePixelRatio*: float
  45. innerHeight*, innerWidth*: int
  46. locationbar*: ref TLocationBar
  47. menubar*: ref TMenuBar
  48. name*: cstring
  49. outerHeight*, outerWidth*: int
  50. pageXOffset*, pageYOffset*: int
  51. personalbar*: ref TPersonalBar
  52. scrollbars*: ref TScrollBars
  53. scrollX*: float
  54. scrollY*: float
  55. statusbar*: ref TStatusBar
  56. status*: cstring
  57. toolbar*: ref TToolBar
  58. frames*: seq[TFrame]
  59. screen*: Screen
  60. performance*: Performance
  61. onpopstate*: proc (event: Event)
  62. Frame* = ref FrameObj
  63. FrameObj {.importc.} = object of WindowObj
  64. ClassList* = ref ClassListObj
  65. ClassListObj {.importc.} = object of RootObj
  66. NodeType* = enum
  67. ElementNode = 1,
  68. AttributeNode,
  69. TextNode,
  70. CDATANode,
  71. EntityRefNode,
  72. EntityNode,
  73. ProcessingInstructionNode,
  74. CommentNode,
  75. DocumentNode,
  76. DocumentTypeNode,
  77. DocumentFragmentNode,
  78. NotationNode
  79. Node* = ref NodeObj
  80. NodeObj {.importc.} = object of EventTargetObj
  81. attributes*: seq[Node]
  82. childNodes*: seq[Node]
  83. children*: seq[Node]
  84. data*: cstring
  85. firstChild*: Node
  86. lastChild*: Node
  87. nextSibling*: Node
  88. nodeName*: cstring
  89. nodeType*: NodeType
  90. nodeValue*: cstring
  91. parentNode*: Node
  92. previousSibling*: Node
  93. innerHTML*: cstring
  94. style*: Style
  95. Document* = ref DocumentObj
  96. DocumentObj {.importc.} = object of NodeObj
  97. alinkColor*: cstring
  98. bgColor*: cstring
  99. body*: Element
  100. charset*: cstring
  101. cookie*: cstring
  102. defaultCharset*: cstring
  103. fgColor*: cstring
  104. head*: Element
  105. lastModified*: cstring
  106. linkColor*: cstring
  107. referrer*: cstring
  108. title*: cstring
  109. URL*: cstring
  110. vlinkColor*: cstring
  111. anchors*: seq[AnchorElement]
  112. forms*: seq[FormElement]
  113. images*: seq[ImageElement]
  114. applets*: seq[Element]
  115. embeds*: seq[EmbedElement]
  116. links*: seq[LinkElement]
  117. Element* = ref ElementObj
  118. ElementObj {.importc.} = object of NodeObj
  119. classList*: Classlist
  120. checked*: bool
  121. defaultChecked*: bool
  122. defaultValue*: cstring
  123. disabled*: bool
  124. form*: FormElement
  125. name*: cstring
  126. readOnly*: bool
  127. options*: seq[OptionElement]
  128. clientWidth*, clientHeight*: int
  129. # https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
  130. HtmlElement* = ref object of Element
  131. contentEditable*: cstring
  132. isContentEditable*: bool
  133. dir*: cstring
  134. offsetHeight*: int
  135. offsetWidth*: int
  136. offsetLeft*: int
  137. offsetTop*: int
  138. LinkElement* = ref LinkObj
  139. LinkObj {.importc.} = object of ElementObj
  140. target*: cstring
  141. text*: cstring
  142. x*: int
  143. y*: int
  144. EmbedElement* = ref EmbedObj
  145. EmbedObj {.importc.} = object of ElementObj
  146. height*: int
  147. hspace*: int
  148. src*: cstring
  149. width*: int
  150. `type`*: cstring
  151. vspace*: int
  152. AnchorElement* = ref AnchorObj
  153. AnchorObj {.importc.} = object of ElementObj
  154. text*: cstring
  155. x*, y*: int
  156. OptionElement* = ref OptionObj
  157. OptionObj {.importc.} = object of ElementObj
  158. defaultSelected*: bool
  159. selected*: bool
  160. selectedIndex*: int
  161. text*: cstring
  162. value*: cstring
  163. TextAreaElement* = ref object of ElementObj
  164. value*: cstring
  165. selectionStart*, selectionEnd*: int
  166. selectionDirection*: cstring
  167. rows*, cols*: int
  168. FormElement* = ref FormObj
  169. FormObj {.importc.} = object of ElementObj
  170. action*: cstring
  171. encoding*: cstring
  172. `method`*: cstring
  173. target*: cstring
  174. elements*: seq[Element]
  175. ImageElement* = ref ImageObj
  176. ImageObj {.importc.} = object of ElementObj
  177. border*: int
  178. complete*: bool
  179. height*: int
  180. hspace*: int
  181. lowsrc*: cstring
  182. src*: cstring
  183. vspace*: int
  184. width*: int
  185. Style* = ref StyleObj
  186. StyleObj {.importc.} = object of RootObj
  187. background*: cstring
  188. backgroundAttachment*: cstring
  189. backgroundColor*: cstring
  190. backgroundImage*: cstring
  191. backgroundPosition*: cstring
  192. backgroundRepeat*: cstring
  193. border*: cstring
  194. borderBottom*: cstring
  195. borderBottomColor*: cstring
  196. borderBottomStyle*: cstring
  197. borderBottomWidth*: cstring
  198. borderColor*: cstring
  199. borderLeft*: cstring
  200. borderLeftColor*: cstring
  201. borderLeftStyle*: cstring
  202. borderLeftWidth*: cstring
  203. borderRight*: cstring
  204. borderRightColor*: cstring
  205. borderRightStyle*: cstring
  206. borderRightWidth*: cstring
  207. borderStyle*: cstring
  208. borderTop*: cstring
  209. borderTopColor*: cstring
  210. borderTopStyle*: cstring
  211. borderTopWidth*: cstring
  212. borderWidth*: cstring
  213. bottom*: cstring
  214. captionSide*: cstring
  215. clear*: cstring
  216. clip*: cstring
  217. color*: cstring
  218. cursor*: cstring
  219. direction*: cstring
  220. display*: cstring
  221. emptyCells*: cstring
  222. cssFloat*: cstring
  223. font*: cstring
  224. fontFamily*: cstring
  225. fontSize*: cstring
  226. fontStretch*: cstring
  227. fontStyle*: cstring
  228. fontVariant*: cstring
  229. fontWeight*: cstring
  230. height*: cstring
  231. left*: cstring
  232. letterSpacing*: cstring
  233. lineHeight*: cstring
  234. listStyle*: cstring
  235. listStyleImage*: cstring
  236. listStylePosition*: cstring
  237. listStyleType*: cstring
  238. margin*: cstring
  239. marginBottom*: cstring
  240. marginLeft*: cstring
  241. marginRight*: cstring
  242. marginTop*: cstring
  243. maxHeight*: cstring
  244. maxWidth*: cstring
  245. minHeight*: cstring
  246. minWidth*: cstring
  247. overflow*: cstring
  248. overflowX*: cstring
  249. overflowY*: cstring
  250. padding*: cstring
  251. paddingBottom*: cstring
  252. paddingLeft*: cstring
  253. paddingRight*: cstring
  254. paddingTop*: cstring
  255. pageBreakAfter*: cstring
  256. pageBreakBefore*: cstring
  257. position*: cstring
  258. right*: cstring
  259. scrollbar3dLightColor*: cstring
  260. scrollbarArrowColor*: cstring
  261. scrollbarBaseColor*: cstring
  262. scrollbarDarkshadowColor*: cstring
  263. scrollbarFaceColor*: cstring
  264. scrollbarHighlightColor*: cstring
  265. scrollbarShadowColor*: cstring
  266. scrollbarTrackColor*: cstring
  267. tableLayout*: cstring
  268. textAlign*: cstring
  269. textDecoration*: cstring
  270. textIndent*: cstring
  271. textTransform*: cstring
  272. top*: cstring
  273. verticalAlign*: cstring
  274. visibility*: cstring
  275. width*: cstring
  276. wordSpacing*: cstring
  277. zIndex*: int
  278. # TODO: A lot of the fields in Event belong to a more specific type of event.
  279. # TODO: Should we clean this up?
  280. Event* = ref EventObj
  281. EventObj {.importc.} = object of RootObj
  282. target*: Node
  283. altKey*, ctrlKey*, shiftKey*: bool
  284. button*: int
  285. clientX*, clientY*: int
  286. keyCode*: int
  287. layerX*, layerY*: int
  288. modifiers*: int
  289. ALT_MASK*, CONTROL_MASK*, SHIFT_MASK*, META_MASK*: int
  290. offsetX*, offsetY*: int
  291. pageX*, pageY*: int
  292. screenX*, screenY*: int
  293. which*: int
  294. `type`*: cstring
  295. x*, y*: int
  296. ABORT*: int
  297. BLUR*: int
  298. CHANGE*: int
  299. CLICK*: int
  300. DBLCLICK*: int
  301. DRAGDROP*: int
  302. ERROR*: int
  303. FOCUS*: int
  304. KEYDOWN*: int
  305. KEYPRESS*: int
  306. KEYUP*: int
  307. LOAD*: int
  308. MOUSEDOWN*: int
  309. MOUSEMOVE*: int
  310. MOUSEOUT*: int
  311. MOUSEOVER*: int
  312. MOUSEUP*: int
  313. MOVE*: int
  314. RESET*: int
  315. RESIZE*: int
  316. SELECT*: int
  317. SUBMIT*: int
  318. UNLOAD*: int
  319. TouchList* {.importc.} = ref object of RootObj
  320. length*: int
  321. TouchEvent* {.importc.} = ref object of Event
  322. changedTouches*, targetTouches*, touches*: TouchList
  323. Touch* {.importc.} = ref object of RootObj
  324. identifier*: int
  325. screenX*, screenY*, clientX*, clientY*, pageX*, pageY*: int
  326. target*: Element
  327. radiusX*, radiusY*: int
  328. rotationAngle*: int
  329. force*: float
  330. Location* = ref LocationObj
  331. LocationObj {.importc.} = object of RootObj
  332. hash*: cstring
  333. host*: cstring
  334. hostname*: cstring
  335. href*: cstring
  336. pathname*: cstring
  337. port*: cstring
  338. protocol*: cstring
  339. search*: cstring
  340. History* = ref HistoryObj
  341. HistoryObj {.importc.} = object of RootObj
  342. length*: int
  343. Navigator* = ref NavigatorObj
  344. NavigatorObj {.importc.} = object of RootObj
  345. appCodeName*: cstring
  346. appName*: cstring
  347. appVersion*: cstring
  348. cookieEnabled*: bool
  349. language*: cstring
  350. platform*: cstring
  351. userAgent*: cstring
  352. mimeTypes*: seq[ref TMimeType]
  353. TPlugin* {.importc.} = object of RootObj
  354. description*: cstring
  355. filename*: cstring
  356. name*: cstring
  357. TMimeType* {.importc.} = object of RootObj
  358. description*: cstring
  359. enabledPlugin*: ref TPlugin
  360. suffixes*: seq[cstring]
  361. `type`*: cstring
  362. TLocationBar* {.importc.} = object of RootObj
  363. visible*: bool
  364. TMenuBar* = TLocationBar
  365. TPersonalBar* = TLocationBar
  366. TScrollBars* = TLocationBar
  367. TToolBar* = TLocationBar
  368. TStatusBar* = TLocationBar
  369. Screen = ref ScreenObj
  370. ScreenObj {.importc.} = object of RootObj
  371. availHeight*: int
  372. availWidth*: int
  373. colorDepth*: int
  374. height*: int
  375. pixelDepth*: int
  376. width*: int
  377. TTimeOut* {.importc.} = object of RootObj
  378. TInterval* {.importc.} = object of RootObj
  379. AddEventListenerOptions* = object
  380. capture*: bool
  381. once*: bool
  382. passive*: bool
  383. BoundingRect* {.importc.} = ref object
  384. top*, bottom*, left*, right*, x*, y*, width*, height*: float
  385. PerformanceMemory* {.importc.} = ref object
  386. jsHeapSizeLimit*: float
  387. totalJSHeapSize*: float
  388. usedJSHeapSize*: float
  389. PerformanceTiming* {.importc.} = ref object
  390. connectStart*: float
  391. domComplete*: float
  392. domContentLoadedEventEnd*: float
  393. domContentLoadedEventStart*: float
  394. domInteractive*: float
  395. domLoading*: float
  396. domainLookupEnd*: float
  397. domainLookupStart*: float
  398. fetchStart*: float
  399. loadEventEnd*: float
  400. loadEventStart*: float
  401. navigationStart*: float
  402. redirectEnd*: float
  403. redirectStart*: float
  404. requestStart*: float
  405. responseEnd*: float
  406. responseStart*: float
  407. secureConnectionStart*: float
  408. unloadEventEnd*: float
  409. unloadEventStart*: float
  410. Performance* {.importc.} = ref object
  411. memory*: PerformanceMemory
  412. timing*: PerformanceTiming
  413. {.push importcpp.}
  414. # EventTarget "methods"
  415. proc addEventListener*(et: EventTarget, ev: cstring, cb: proc(ev: Event), useCapture: bool = false)
  416. proc addEventListener*(et: EventTarget, ev: cstring, cb: proc(ev: Event), options: AddEventListenerOptions)
  417. proc removeEventListener*(et: EventTarget, ev: cstring, cb: proc(ev: Event), useCapture: bool = false)
  418. proc dispatchEvent*(et: EventTarget, ev: Event)
  419. # Window "methods"
  420. proc alert*(w: Window, msg: cstring)
  421. proc back*(w: Window)
  422. proc blur*(w: Window)
  423. proc captureEvents*(w: Window, eventMask: int) {.deprecated.}
  424. proc clearInterval*(w: Window, interval: ref TInterval)
  425. proc clearTimeout*(w: Window, timeout: ref TTimeOut)
  426. proc close*(w: Window)
  427. proc confirm*(w: Window, msg: cstring): bool
  428. proc disableExternalCapture*(w: Window)
  429. proc enableExternalCapture*(w: Window)
  430. proc find*(w: Window, text: cstring, caseSensitive = false,
  431. backwards = false)
  432. proc focus*(w: Window)
  433. proc forward*(w: Window)
  434. proc handleEvent*(w: Window, e: Event)
  435. proc home*(w: Window)
  436. proc moveBy*(w: Window, x, y: int)
  437. proc moveTo*(w: Window, x, y: int)
  438. proc open*(w: Window, uri, windowname: cstring,
  439. properties: cstring = nil): Window
  440. proc print*(w: Window)
  441. proc prompt*(w: Window, text, default: cstring): cstring
  442. proc releaseEvents*(w: Window, eventMask: int) {.deprecated.}
  443. proc resizeBy*(w: Window, x, y: int)
  444. proc resizeTo*(w: Window, x, y: int)
  445. proc routeEvent*(w: Window, event: Event)
  446. proc scrollBy*(w: Window, x, y: int)
  447. proc scrollTo*(w: Window, x, y: int)
  448. proc setInterval*(w: Window, code: cstring, pause: int): ref TInterval
  449. proc setInterval*(w: Window, function: proc (), pause: int): ref TInterval
  450. proc setTimeout*(w: Window, code: cstring, pause: int): ref TTimeOut
  451. proc setTimeout*(w: Window, function: proc (), pause: int): ref TInterval
  452. proc stop*(w: Window)
  453. proc requestAnimationFrame*(w: Window, function: proc (time: float)): int
  454. proc cancelAnimationFrame*(w: Window, id: int)
  455. # Node "methods"
  456. proc appendChild*(n, child: Node)
  457. proc appendData*(n: Node, data: cstring)
  458. proc cloneNode*(n: Node, copyContent: bool): Node
  459. proc deleteData*(n: Node, start, len: int)
  460. proc getAttribute*(n: Node, attr: cstring): cstring
  461. proc getAttributeNode*(n: Node, attr: cstring): Node
  462. proc getBoundingClientRect*(e: Node): BoundingRect
  463. proc hasChildNodes*(n: Node): bool
  464. proc insertBefore*(n, newNode, before: Node)
  465. proc insertData*(n: Node, position: int, data: cstring)
  466. proc removeAttribute*(n: Node, attr: cstring)
  467. proc removeAttributeNode*(n, attr: Node)
  468. proc removeChild*(n, child: Node)
  469. proc replaceChild*(n, newNode, oldNode: Node)
  470. proc replaceData*(n: Node, start, len: int, text: cstring)
  471. proc scrollIntoView*(n: Node, alignToTop: bool=true)
  472. proc setAttribute*(n: Node, name, value: cstring)
  473. proc setAttributeNode*(n: Node, attr: Node)
  474. # Document "methods"
  475. proc captureEvents*(d: Document, eventMask: int) {.deprecated.}
  476. proc createAttribute*(d: Document, identifier: cstring): Node
  477. proc createElement*(d: Document, identifier: cstring): Element
  478. proc createTextNode*(d: Document, identifier: cstring): Node
  479. proc getElementById*(d: Document, id: cstring): Element
  480. proc getElementsByName*(d: Document, name: cstring): seq[Element]
  481. proc getElementsByTagName*(d: Document, name: cstring): seq[Element]
  482. proc getElementsByClassName*(d: Document, name: cstring): seq[Element]
  483. proc getSelection*(d: Document): cstring
  484. proc handleEvent*(d: Document, event: Event)
  485. proc open*(d: Document)
  486. proc releaseEvents*(d: Document, eventMask: int) {.deprecated.}
  487. proc routeEvent*(d: Document, event: Event)
  488. proc write*(d: Document, text: cstring)
  489. proc writeln*(d: Document, text: cstring)
  490. proc querySelector*(d: Document, selectors: cstring): Element
  491. proc querySelectorAll*(d: Document, selectors: cstring): seq[Element]
  492. # Element "methods"
  493. proc blur*(e: Element)
  494. proc click*(e: Element)
  495. proc focus*(e: Element)
  496. proc handleEvent*(e: Element, event: Event)
  497. proc select*(e: Element)
  498. proc getElementsByTagName*(e: Element, name: cstring): seq[Element]
  499. proc getElementsByClassName*(e: Element, name: cstring): seq[Element]
  500. # FormElement "methods"
  501. proc reset*(f: FormElement)
  502. proc submit*(f: FormElement)
  503. # EmbedElement "methods"
  504. proc play*(e: EmbedElement)
  505. proc stop*(e: EmbedElement)
  506. # Location "methods"
  507. proc reload*(loc: Location)
  508. proc replace*(loc: Location, s: cstring)
  509. # History "methods"
  510. proc back*(h: History)
  511. proc forward*(h: History)
  512. proc go*(h: History, pagesToJump: int)
  513. proc pushState*[T](h: History, stateObject: T, title, url: cstring)
  514. # Navigator "methods"
  515. proc javaEnabled*(h: Navigator): bool
  516. # ClassList "methods"
  517. proc add*(c: ClassList, class: cstring)
  518. proc remove*(c: ClassList, class: cstring)
  519. proc contains*(c: ClassList, class: cstring):bool
  520. proc toggle*(c: ClassList, class: cstring)
  521. # Style "methods"
  522. proc getAttribute*(s: Style, attr: cstring, caseSensitive=false): cstring
  523. proc removeAttribute*(s: Style, attr: cstring, caseSensitive=false)
  524. proc setAttribute*(s: Style, attr, value: cstring, caseSensitive=false)
  525. # Event "methods"
  526. proc preventDefault*(ev: Event)
  527. # TouchEvent "methods"
  528. proc identifiedTouch*(list: TouchList): Touch
  529. proc item*(list: TouchList, i: int): Touch
  530. # Performance "methods"
  531. proc now*(p: Performance): float
  532. {.pop.}
  533. var
  534. window* {.importc, nodecl.}: Window
  535. document* {.importc, nodecl.}: Document
  536. navigator* {.importc, nodecl.}: Navigator
  537. screen* {.importc, nodecl.}: Screen
  538. proc decodeURI*(uri: cstring): cstring {.importc, nodecl.}
  539. proc encodeURI*(uri: cstring): cstring {.importc, nodecl.}
  540. proc escape*(uri: cstring): cstring {.importc, nodecl.}
  541. proc unescape*(uri: cstring): cstring {.importc, nodecl.}
  542. proc decodeURIComponent*(uri: cstring): cstring {.importc, nodecl.}
  543. proc encodeURIComponent*(uri: cstring): cstring {.importc, nodecl.}
  544. proc isFinite*(x: BiggestFloat): bool {.importc, nodecl.}
  545. proc isNaN*(x: BiggestFloat): bool {.importc, nodecl.}
  546. proc parseFloat*(s: cstring): BiggestFloat {.importc, nodecl.}
  547. proc parseInt*(s: cstring): int {.importc, nodecl.}
  548. proc parseInt*(s: cstring, radix: int):int {.importc, nodecl.}
  549. proc newEvent*(name: cstring): Event {.importcpp: "new Event(@)", constructor.}
  550. type
  551. TEventHandlers* {.deprecated.} = EventTargetObj
  552. TWindow* {.deprecated.} = WindowObj
  553. TFrame* {.deprecated.} = FrameObj
  554. TNode* {.deprecated.} = NodeObj
  555. TDocument* {.deprecated.} = DocumentObj
  556. TElement* {.deprecated.} = ElementObj
  557. TLink* {.deprecated.} = LinkObj
  558. TEmbed* {.deprecated.} = EmbedObj
  559. TAnchor* {.deprecated.} = AnchorObj
  560. TOption* {.deprecated.} = OptionObj
  561. TForm* {.deprecated.} = FormObj
  562. TImage* {.deprecated.} = ImageObj
  563. TNodeType* {.deprecated.} = NodeType
  564. TEvent* {.deprecated.} = EventObj
  565. TLocation* {.deprecated.} = LocationObj
  566. THistory* {.deprecated.} = HistoryObj
  567. TNavigator* {.deprecated.} = NavigatorObj
  568. TStyle* {.deprecated.} = StyleObj
  569. TScreen* {.deprecated.} = ScreenObj
  570. TApplet* {.importc, deprecated.} = object of RootObj