1 module webkit2webextension.DOMDocument; 2 3 private import glib.ErrorG; 4 private import glib.GException; 5 private import glib.Str; 6 private import gobject.ObjectG; 7 private import webkit2webextension.DOMAttr; 8 private import webkit2webextension.DOMCDATASection; 9 private import webkit2webextension.DOMCSSStyleDeclaration; 10 private import webkit2webextension.DOMComment; 11 private import webkit2webextension.DOMDOMImplementation; 12 private import webkit2webextension.DOMDOMWindow; 13 private import webkit2webextension.DOMDocumentFragment; 14 private import webkit2webextension.DOMDocumentType; 15 private import webkit2webextension.DOMElement; 16 private import webkit2webextension.DOMEntityReference; 17 private import webkit2webextension.DOMEvent; 18 private import webkit2webextension.DOMHTMLCollection; 19 private import webkit2webextension.DOMHTMLElement; 20 private import webkit2webextension.DOMHTMLHeadElement; 21 private import webkit2webextension.DOMHTMLScriptElement; 22 private import webkit2webextension.DOMNode; 23 private import webkit2webextension.DOMNodeFilterIF; 24 private import webkit2webextension.DOMNodeIterator; 25 private import webkit2webextension.DOMNodeList; 26 private import webkit2webextension.DOMProcessingInstruction; 27 private import webkit2webextension.DOMRange; 28 private import webkit2webextension.DOMStyleSheetList; 29 private import webkit2webextension.DOMText; 30 private import webkit2webextension.DOMTreeWalker; 31 private import webkit2webextension.DOMXPathExpression; 32 private import webkit2webextension.DOMXPathNSResolverIF; 33 private import webkit2webextension.DOMXPathResult; 34 private import webkit2webextension.c.functions; 35 public import webkit2webextension.c.types; 36 37 38 /** */ 39 public class DOMDocument : DOMNode 40 { 41 /** the main Gtk struct */ 42 protected WebKitDOMDocument* webKitDOMDocument; 43 44 /** Get the main Gtk struct */ 45 public WebKitDOMDocument* getDOMDocumentStruct(bool transferOwnership = false) 46 { 47 if (transferOwnership) 48 ownedRef = false; 49 return webKitDOMDocument; 50 } 51 52 /** the main Gtk struct as a void* */ 53 protected override void* getStruct() 54 { 55 return cast(void*)webKitDOMDocument; 56 } 57 58 /** 59 * Sets our main struct and passes it to the parent class. 60 */ 61 public this (WebKitDOMDocument* webKitDOMDocument, bool ownedRef = false) 62 { 63 this.webKitDOMDocument = webKitDOMDocument; 64 super(cast(WebKitDOMNode*)webKitDOMDocument, ownedRef); 65 } 66 67 68 /** */ 69 public static GType getType() 70 { 71 return webkit_dom_document_get_type(); 72 } 73 74 /** 75 * 76 * 77 * Deprecated: Use JavaScriptCore API instead 78 * 79 * Params: 80 * source = A #WebKitDOMNode 81 * 82 * Returns: A #WebKitDOMNode 83 * 84 * Throws: GException on failure. 85 */ 86 public DOMNode adoptNode(DOMNode source) 87 { 88 GError* err = null; 89 90 auto __p = webkit_dom_document_adopt_node(webKitDOMDocument, (source is null) ? null : source.getDOMNodeStruct(), &err); 91 92 if (err !is null) 93 { 94 throw new GException( new ErrorG(err) ); 95 } 96 97 if(__p is null) 98 { 99 return null; 100 } 101 102 return ObjectG.getDObject!(DOMNode)(cast(WebKitDOMNode*) __p); 103 } 104 105 /** 106 * 107 * 108 * Deprecated: Use JavaScriptCore API instead 109 * 110 * Params: 111 * x = A #glong 112 * y = A #glong 113 * 114 * Returns: A #WebKitDOMRange 115 * 116 * Since: 2.16 117 */ 118 public DOMRange caretRangeFromPoint(glong x, glong y) 119 { 120 auto __p = webkit_dom_document_caret_range_from_point(webKitDOMDocument, x, y); 121 122 if(__p is null) 123 { 124 return null; 125 } 126 127 return ObjectG.getDObject!(DOMRange)(cast(WebKitDOMRange*) __p, true); 128 } 129 130 /** 131 * 132 * 133 * Deprecated: Use JavaScriptCore API instead 134 * 135 * Params: 136 * name = A #gchar 137 * 138 * Returns: A #WebKitDOMAttr 139 * 140 * Throws: GException on failure. 141 */ 142 public DOMAttr createAttribute(string name) 143 { 144 GError* err = null; 145 146 auto __p = webkit_dom_document_create_attribute(webKitDOMDocument, Str.toStringz(name), &err); 147 148 if (err !is null) 149 { 150 throw new GException( new ErrorG(err) ); 151 } 152 153 if(__p is null) 154 { 155 return null; 156 } 157 158 return ObjectG.getDObject!(DOMAttr)(cast(WebKitDOMAttr*) __p); 159 } 160 161 /** 162 * 163 * 164 * Deprecated: Use JavaScriptCore API instead 165 * 166 * Params: 167 * namespaceURI = A #gchar 168 * qualifiedName = A #gchar 169 * 170 * Returns: A #WebKitDOMAttr 171 * 172 * Throws: GException on failure. 173 */ 174 public DOMAttr createAttributeNs(string namespaceURI, string qualifiedName) 175 { 176 GError* err = null; 177 178 auto __p = webkit_dom_document_create_attribute_ns(webKitDOMDocument, Str.toStringz(namespaceURI), Str.toStringz(qualifiedName), &err); 179 180 if (err !is null) 181 { 182 throw new GException( new ErrorG(err) ); 183 } 184 185 if(__p is null) 186 { 187 return null; 188 } 189 190 return ObjectG.getDObject!(DOMAttr)(cast(WebKitDOMAttr*) __p); 191 } 192 193 /** 194 * 195 * 196 * Deprecated: Use JavaScriptCore API instead 197 * 198 * Params: 199 * data = A #gchar 200 * 201 * Returns: A #WebKitDOMCDATASection 202 * 203 * Throws: GException on failure. 204 */ 205 public DOMCDATASection createCdataSection(string data) 206 { 207 GError* err = null; 208 209 auto __p = webkit_dom_document_create_cdata_section(webKitDOMDocument, Str.toStringz(data), &err); 210 211 if (err !is null) 212 { 213 throw new GException( new ErrorG(err) ); 214 } 215 216 if(__p is null) 217 { 218 return null; 219 } 220 221 return ObjectG.getDObject!(DOMCDATASection)(cast(WebKitDOMCDATASection*) __p); 222 } 223 224 /** 225 * 226 * 227 * Deprecated: Use JavaScriptCore API instead 228 * 229 * Params: 230 * data = A #gchar 231 * 232 * Returns: A #WebKitDOMComment 233 */ 234 public DOMComment createComment(string data) 235 { 236 auto __p = webkit_dom_document_create_comment(webKitDOMDocument, Str.toStringz(data)); 237 238 if(__p is null) 239 { 240 return null; 241 } 242 243 return ObjectG.getDObject!(DOMComment)(cast(WebKitDOMComment*) __p); 244 } 245 246 /** 247 * 248 * 249 * Deprecated: Use JavaScriptCore API instead 250 * 251 * Returns: A #WebKitDOMCSSStyleDeclaration 252 */ 253 public DOMCSSStyleDeclaration createCssStyleDeclaration() 254 { 255 auto __p = webkit_dom_document_create_css_style_declaration(webKitDOMDocument); 256 257 if(__p is null) 258 { 259 return null; 260 } 261 262 return ObjectG.getDObject!(DOMCSSStyleDeclaration)(cast(WebKitDOMCSSStyleDeclaration*) __p, true); 263 } 264 265 /** 266 * 267 * 268 * Deprecated: Use JavaScriptCore API instead 269 * 270 * Returns: A #WebKitDOMDocumentFragment 271 */ 272 public DOMDocumentFragment createDocumentFragment() 273 { 274 auto __p = webkit_dom_document_create_document_fragment(webKitDOMDocument); 275 276 if(__p is null) 277 { 278 return null; 279 } 280 281 return ObjectG.getDObject!(DOMDocumentFragment)(cast(WebKitDOMDocumentFragment*) __p); 282 } 283 284 /** 285 * 286 * 287 * Deprecated: Use JavaScriptCore API instead 288 * 289 * Params: 290 * tagName = A #gchar 291 * 292 * Returns: A #WebKitDOMElement 293 * 294 * Throws: GException on failure. 295 */ 296 public DOMElement createElement(string tagName) 297 { 298 GError* err = null; 299 300 auto __p = webkit_dom_document_create_element(webKitDOMDocument, Str.toStringz(tagName), &err); 301 302 if (err !is null) 303 { 304 throw new GException( new ErrorG(err) ); 305 } 306 307 if(__p is null) 308 { 309 return null; 310 } 311 312 return ObjectG.getDObject!(DOMElement)(cast(WebKitDOMElement*) __p); 313 } 314 315 /** 316 * 317 * 318 * Deprecated: Use JavaScriptCore API instead 319 * 320 * Params: 321 * namespaceURI = A #gchar 322 * qualifiedName = A #gchar 323 * 324 * Returns: A #WebKitDOMElement 325 * 326 * Throws: GException on failure. 327 */ 328 public DOMElement createElementNs(string namespaceURI, string qualifiedName) 329 { 330 GError* err = null; 331 332 auto __p = webkit_dom_document_create_element_ns(webKitDOMDocument, Str.toStringz(namespaceURI), Str.toStringz(qualifiedName), &err); 333 334 if (err !is null) 335 { 336 throw new GException( new ErrorG(err) ); 337 } 338 339 if(__p is null) 340 { 341 return null; 342 } 343 344 return ObjectG.getDObject!(DOMElement)(cast(WebKitDOMElement*) __p); 345 } 346 347 /** 348 * This function has been removed from the DOM spec and it just returns %NULL. 349 * 350 * Params: 351 * name = A #gchar 352 * 353 * Returns: A #WebKitDOMEntityReference 354 * 355 * Throws: GException on failure. 356 */ 357 public DOMEntityReference createEntityReference(string name) 358 { 359 GError* err = null; 360 361 auto __p = webkit_dom_document_create_entity_reference(webKitDOMDocument, Str.toStringz(name), &err); 362 363 if (err !is null) 364 { 365 throw new GException( new ErrorG(err) ); 366 } 367 368 if(__p is null) 369 { 370 return null; 371 } 372 373 return ObjectG.getDObject!(DOMEntityReference)(cast(WebKitDOMEntityReference*) __p); 374 } 375 376 /** 377 * 378 * 379 * Deprecated: Use JavaScriptCore API instead 380 * 381 * Params: 382 * eventType = A #gchar 383 * 384 * Returns: A #WebKitDOMEvent 385 * 386 * Throws: GException on failure. 387 */ 388 public DOMEvent createEvent(string eventType) 389 { 390 GError* err = null; 391 392 auto __p = webkit_dom_document_create_event(webKitDOMDocument, Str.toStringz(eventType), &err); 393 394 if (err !is null) 395 { 396 throw new GException( new ErrorG(err) ); 397 } 398 399 if(__p is null) 400 { 401 return null; 402 } 403 404 return ObjectG.getDObject!(DOMEvent)(cast(WebKitDOMEvent*) __p, true); 405 } 406 407 /** 408 * 409 * 410 * Deprecated: Use JavaScriptCore API instead 411 * 412 * Params: 413 * expression = A #gchar 414 * resolver = A #WebKitDOMXPathNSResolver 415 * 416 * Returns: A #WebKitDOMXPathExpression 417 * 418 * Throws: GException on failure. 419 */ 420 public DOMXPathExpression createExpression(string expression, DOMXPathNSResolverIF resolver) 421 { 422 GError* err = null; 423 424 auto __p = webkit_dom_document_create_expression(webKitDOMDocument, Str.toStringz(expression), (resolver is null) ? null : resolver.getDOMXPathNSResolverStruct(), &err); 425 426 if (err !is null) 427 { 428 throw new GException( new ErrorG(err) ); 429 } 430 431 if(__p is null) 432 { 433 return null; 434 } 435 436 return ObjectG.getDObject!(DOMXPathExpression)(cast(WebKitDOMXPathExpression*) __p, true); 437 } 438 439 /** 440 * 441 * 442 * Deprecated: Use JavaScriptCore API instead 443 * 444 * Params: 445 * root = A #WebKitDOMNode 446 * whatToShow = A #gulong 447 * filter = A #WebKitDOMNodeFilter 448 * expandEntityReferences = A #gboolean 449 * 450 * Returns: A #WebKitDOMNodeIterator 451 * 452 * Throws: GException on failure. 453 */ 454 public DOMNodeIterator createNodeIterator(DOMNode root, gulong whatToShow, DOMNodeFilterIF filter, bool expandEntityReferences) 455 { 456 GError* err = null; 457 458 auto __p = webkit_dom_document_create_node_iterator(webKitDOMDocument, (root is null) ? null : root.getDOMNodeStruct(), whatToShow, (filter is null) ? null : filter.getDOMNodeFilterStruct(), expandEntityReferences, &err); 459 460 if (err !is null) 461 { 462 throw new GException( new ErrorG(err) ); 463 } 464 465 if(__p is null) 466 { 467 return null; 468 } 469 470 return ObjectG.getDObject!(DOMNodeIterator)(cast(WebKitDOMNodeIterator*) __p, true); 471 } 472 473 /** 474 * 475 * 476 * Deprecated: Use JavaScriptCore API instead 477 * 478 * Params: 479 * nodeResolver = A #WebKitDOMNode 480 * 481 * Returns: A #WebKitDOMXPathNSResolver 482 */ 483 public DOMXPathNSResolverIF createNsResolver(DOMNode nodeResolver) 484 { 485 auto __p = webkit_dom_document_create_ns_resolver(webKitDOMDocument, (nodeResolver is null) ? null : nodeResolver.getDOMNodeStruct()); 486 487 if(__p is null) 488 { 489 return null; 490 } 491 492 return ObjectG.getDObject!(DOMXPathNSResolverIF)(cast(WebKitDOMXPathNSResolver*) __p, true); 493 } 494 495 /** 496 * 497 * 498 * Deprecated: Use JavaScriptCore API instead 499 * 500 * Params: 501 * target = A #gchar 502 * data = A #gchar 503 * 504 * Returns: A #WebKitDOMProcessingInstruction 505 * 506 * Throws: GException on failure. 507 */ 508 public DOMProcessingInstruction createProcessingInstruction(string target, string data) 509 { 510 GError* err = null; 511 512 auto __p = webkit_dom_document_create_processing_instruction(webKitDOMDocument, Str.toStringz(target), Str.toStringz(data), &err); 513 514 if (err !is null) 515 { 516 throw new GException( new ErrorG(err) ); 517 } 518 519 if(__p is null) 520 { 521 return null; 522 } 523 524 return ObjectG.getDObject!(DOMProcessingInstruction)(cast(WebKitDOMProcessingInstruction*) __p); 525 } 526 527 /** 528 * 529 * 530 * Deprecated: Use JavaScriptCore API instead 531 * 532 * Returns: A #WebKitDOMRange 533 */ 534 public DOMRange createRange() 535 { 536 auto __p = webkit_dom_document_create_range(webKitDOMDocument); 537 538 if(__p is null) 539 { 540 return null; 541 } 542 543 return ObjectG.getDObject!(DOMRange)(cast(WebKitDOMRange*) __p, true); 544 } 545 546 /** 547 * 548 * 549 * Deprecated: Use JavaScriptCore API instead 550 * 551 * Params: 552 * data = A #gchar 553 * 554 * Returns: A #WebKitDOMText 555 */ 556 public DOMText createTextNode(string data) 557 { 558 auto __p = webkit_dom_document_create_text_node(webKitDOMDocument, Str.toStringz(data)); 559 560 if(__p is null) 561 { 562 return null; 563 } 564 565 return ObjectG.getDObject!(DOMText)(cast(WebKitDOMText*) __p); 566 } 567 568 /** 569 * 570 * 571 * Deprecated: Use JavaScriptCore API instead 572 * 573 * Params: 574 * root = A #WebKitDOMNode 575 * whatToShow = A #gulong 576 * filter = A #WebKitDOMNodeFilter 577 * expandEntityReferences = A #gboolean 578 * 579 * Returns: A #WebKitDOMTreeWalker 580 * 581 * Throws: GException on failure. 582 */ 583 public DOMTreeWalker createTreeWalker(DOMNode root, gulong whatToShow, DOMNodeFilterIF filter, bool expandEntityReferences) 584 { 585 GError* err = null; 586 587 auto __p = webkit_dom_document_create_tree_walker(webKitDOMDocument, (root is null) ? null : root.getDOMNodeStruct(), whatToShow, (filter is null) ? null : filter.getDOMNodeFilterStruct(), expandEntityReferences, &err); 588 589 if (err !is null) 590 { 591 throw new GException( new ErrorG(err) ); 592 } 593 594 if(__p is null) 595 { 596 return null; 597 } 598 599 return ObjectG.getDObject!(DOMTreeWalker)(cast(WebKitDOMTreeWalker*) __p, true); 600 } 601 602 /** 603 * 604 * 605 * Deprecated: Use JavaScriptCore API instead 606 * 607 * Params: 608 * x = A #glong 609 * y = A #glong 610 * 611 * Returns: A #WebKitDOMElement 612 */ 613 public DOMElement elementFromPoint(glong x, glong y) 614 { 615 auto __p = webkit_dom_document_element_from_point(webKitDOMDocument, x, y); 616 617 if(__p is null) 618 { 619 return null; 620 } 621 622 return ObjectG.getDObject!(DOMElement)(cast(WebKitDOMElement*) __p); 623 } 624 625 /** 626 * 627 * 628 * Deprecated: Use JavaScriptCore API instead 629 * 630 * Params: 631 * expression = A #gchar 632 * contextNode = A #WebKitDOMNode 633 * resolver = A #WebKitDOMXPathNSResolver 634 * type = A #gushort 635 * inResult = A #WebKitDOMXPathResult 636 * 637 * Returns: A #WebKitDOMXPathResult 638 * 639 * Throws: GException on failure. 640 */ 641 public DOMXPathResult evaluate(string expression, DOMNode contextNode, DOMXPathNSResolverIF resolver, ushort type, DOMXPathResult inResult) 642 { 643 GError* err = null; 644 645 auto __p = webkit_dom_document_evaluate(webKitDOMDocument, Str.toStringz(expression), (contextNode is null) ? null : contextNode.getDOMNodeStruct(), (resolver is null) ? null : resolver.getDOMXPathNSResolverStruct(), type, (inResult is null) ? null : inResult.getDOMXPathResultStruct(), &err); 646 647 if (err !is null) 648 { 649 throw new GException( new ErrorG(err) ); 650 } 651 652 if(__p is null) 653 { 654 return null; 655 } 656 657 return ObjectG.getDObject!(DOMXPathResult)(cast(WebKitDOMXPathResult*) __p, true); 658 } 659 660 /** 661 * 662 * 663 * Deprecated: Use JavaScriptCore API instead 664 * 665 * Params: 666 * command = A #gchar 667 * userInterface = A #gboolean 668 * value = A #gchar 669 * 670 * Returns: A #gboolean 671 */ 672 public bool execCommand(string command, bool userInterface, string value) 673 { 674 return webkit_dom_document_exec_command(webKitDOMDocument, Str.toStringz(command), userInterface, Str.toStringz(value)) != 0; 675 } 676 677 /** 678 * 679 * 680 * Deprecated: Use JavaScriptCore API instead 681 * 682 * Since: 2.16 683 */ 684 public void exitPointerLock() 685 { 686 webkit_dom_document_exit_pointer_lock(webKitDOMDocument); 687 } 688 689 /** 690 * 691 * 692 * Deprecated: Use JavaScriptCore API instead 693 * 694 * Returns: A #WebKitDOMElement 695 */ 696 public DOMElement getActiveElement() 697 { 698 auto __p = webkit_dom_document_get_active_element(webKitDOMDocument); 699 700 if(__p is null) 701 { 702 return null; 703 } 704 705 return ObjectG.getDObject!(DOMElement)(cast(WebKitDOMElement*) __p); 706 } 707 708 /** 709 * 710 * 711 * Deprecated: Use JavaScriptCore API instead 712 * 713 * Returns: A #WebKitDOMHTMLCollection 714 */ 715 public DOMHTMLCollection getAnchors() 716 { 717 auto __p = webkit_dom_document_get_anchors(webKitDOMDocument); 718 719 if(__p is null) 720 { 721 return null; 722 } 723 724 return ObjectG.getDObject!(DOMHTMLCollection)(cast(WebKitDOMHTMLCollection*) __p, true); 725 } 726 727 /** 728 * 729 * 730 * Deprecated: Use JavaScriptCore API instead 731 * 732 * Returns: A #WebKitDOMHTMLCollection 733 */ 734 public DOMHTMLCollection getApplets() 735 { 736 auto __p = webkit_dom_document_get_applets(webKitDOMDocument); 737 738 if(__p is null) 739 { 740 return null; 741 } 742 743 return ObjectG.getDObject!(DOMHTMLCollection)(cast(WebKitDOMHTMLCollection*) __p, true); 744 } 745 746 /** 747 * 748 * 749 * Deprecated: Use JavaScriptCore API instead 750 * 751 * Returns: A #WebKitDOMHTMLElement 752 */ 753 public DOMHTMLElement getBody() 754 { 755 auto __p = webkit_dom_document_get_body(webKitDOMDocument); 756 757 if(__p is null) 758 { 759 return null; 760 } 761 762 return ObjectG.getDObject!(DOMHTMLElement)(cast(WebKitDOMHTMLElement*) __p); 763 } 764 765 /** 766 * 767 * 768 * Deprecated: Use JavaScriptCore API instead 769 * 770 * Returns: A #gchar 771 */ 772 public string getCharacterSet() 773 { 774 auto retStr = webkit_dom_document_get_character_set(webKitDOMDocument); 775 776 scope(exit) Str.freeString(retStr); 777 return Str.toString(retStr); 778 } 779 780 /** 781 * 782 * 783 * Deprecated: Use JavaScriptCore API instead 784 * 785 * Returns: A #gchar 786 */ 787 public string getCharset() 788 { 789 auto retStr = webkit_dom_document_get_charset(webKitDOMDocument); 790 791 scope(exit) Str.freeString(retStr); 792 return Str.toString(retStr); 793 } 794 795 /** 796 * 797 * 798 * Deprecated: Use JavaScriptCore API instead 799 * 800 * Returns: A #gulong 801 * 802 * Since: 2.16 803 */ 804 public gulong getChildElementCount() 805 { 806 return webkit_dom_document_get_child_element_count(webKitDOMDocument); 807 } 808 809 /** 810 * 811 * 812 * Deprecated: Use JavaScriptCore API instead 813 * 814 * Returns: A #WebKitDOMHTMLCollection 815 * 816 * Since: 2.16 817 */ 818 public DOMHTMLCollection getChildren() 819 { 820 auto __p = webkit_dom_document_get_children(webKitDOMDocument); 821 822 if(__p is null) 823 { 824 return null; 825 } 826 827 return ObjectG.getDObject!(DOMHTMLCollection)(cast(WebKitDOMHTMLCollection*) __p, true); 828 } 829 830 /** 831 * 832 * 833 * Deprecated: Use JavaScriptCore API instead 834 * 835 * Returns: A #gchar 836 * 837 * Since: 2.14 838 */ 839 public string getCompatMode() 840 { 841 auto retStr = webkit_dom_document_get_compat_mode(webKitDOMDocument); 842 843 scope(exit) Str.freeString(retStr); 844 return Str.toString(retStr); 845 } 846 847 /** 848 * 849 * 850 * Deprecated: Use JavaScriptCore API instead 851 * 852 * Returns: A #gchar 853 * 854 * Since: 2.16 855 */ 856 public string getContentType() 857 { 858 auto retStr = webkit_dom_document_get_content_type(webKitDOMDocument); 859 860 scope(exit) Str.freeString(retStr); 861 return Str.toString(retStr); 862 } 863 864 /** 865 * 866 * 867 * Deprecated: Use JavaScriptCore API instead 868 * 869 * Returns: A #gchar 870 * 871 * Throws: GException on failure. 872 */ 873 public string getCookie() 874 { 875 GError* err = null; 876 877 auto retStr = webkit_dom_document_get_cookie(webKitDOMDocument, &err); 878 879 if (err !is null) 880 { 881 throw new GException( new ErrorG(err) ); 882 } 883 884 scope(exit) Str.freeString(retStr); 885 return Str.toString(retStr); 886 } 887 888 /** 889 * 890 * 891 * Deprecated: Use JavaScriptCore API instead 892 * 893 * Returns: A #WebKitDOMHTMLScriptElement 894 * 895 * Since: 2.16 896 */ 897 public DOMHTMLScriptElement getCurrentScript() 898 { 899 auto __p = webkit_dom_document_get_current_script(webKitDOMDocument); 900 901 if(__p is null) 902 { 903 return null; 904 } 905 906 return ObjectG.getDObject!(DOMHTMLScriptElement)(cast(WebKitDOMHTMLScriptElement*) __p); 907 } 908 909 /** 910 * Returns: A #gchar 911 */ 912 public string getDefaultCharset() 913 { 914 auto retStr = webkit_dom_document_get_default_charset(webKitDOMDocument); 915 916 scope(exit) Str.freeString(retStr); 917 return Str.toString(retStr); 918 } 919 920 /** 921 * 922 * 923 * Deprecated: Use JavaScriptCore API instead 924 * 925 * Returns: A #WebKitDOMDOMWindow 926 */ 927 public DOMDOMWindow getDefaultView() 928 { 929 auto __p = webkit_dom_document_get_default_view(webKitDOMDocument); 930 931 if(__p is null) 932 { 933 return null; 934 } 935 936 return ObjectG.getDObject!(DOMDOMWindow)(cast(WebKitDOMDOMWindow*) __p, true); 937 } 938 939 /** 940 * 941 * 942 * Deprecated: Use JavaScriptCore API instead 943 * 944 * Returns: A #gchar 945 * 946 * Since: 2.14 947 */ 948 public string getDesignMode() 949 { 950 auto retStr = webkit_dom_document_get_design_mode(webKitDOMDocument); 951 952 scope(exit) Str.freeString(retStr); 953 return Str.toString(retStr); 954 } 955 956 /** 957 * 958 * 959 * Deprecated: Use JavaScriptCore API instead 960 * 961 * Returns: A #gchar 962 * 963 * Since: 2.16 964 */ 965 public string getDir() 966 { 967 auto retStr = webkit_dom_document_get_dir(webKitDOMDocument); 968 969 scope(exit) Str.freeString(retStr); 970 return Str.toString(retStr); 971 } 972 973 /** 974 * 975 * 976 * Deprecated: Use JavaScriptCore API instead 977 * 978 * Returns: A #WebKitDOMDocumentType 979 */ 980 public DOMDocumentType getDoctype() 981 { 982 auto __p = webkit_dom_document_get_doctype(webKitDOMDocument); 983 984 if(__p is null) 985 { 986 return null; 987 } 988 989 return ObjectG.getDObject!(DOMDocumentType)(cast(WebKitDOMDocumentType*) __p); 990 } 991 992 /** 993 * 994 * 995 * Deprecated: Use JavaScriptCore API instead 996 * 997 * Returns: A #WebKitDOMElement 998 */ 999 public DOMElement getDocumentElement() 1000 { 1001 auto __p = webkit_dom_document_get_document_element(webKitDOMDocument); 1002 1003 if(__p is null) 1004 { 1005 return null; 1006 } 1007 1008 return ObjectG.getDObject!(DOMElement)(cast(WebKitDOMElement*) __p); 1009 } 1010 1011 /** 1012 * 1013 * 1014 * Deprecated: Use JavaScriptCore API instead 1015 * 1016 * Returns: A #gchar 1017 */ 1018 public string getDocumentUri() 1019 { 1020 auto retStr = webkit_dom_document_get_document_uri(webKitDOMDocument); 1021 1022 scope(exit) Str.freeString(retStr); 1023 return Str.toString(retStr); 1024 } 1025 1026 /** 1027 * 1028 * 1029 * Deprecated: Use JavaScriptCore API instead 1030 * 1031 * Returns: A #gchar 1032 */ 1033 public string getDomain() 1034 { 1035 auto retStr = webkit_dom_document_get_domain(webKitDOMDocument); 1036 1037 scope(exit) Str.freeString(retStr); 1038 return Str.toString(retStr); 1039 } 1040 1041 /** 1042 * 1043 * 1044 * Deprecated: Use JavaScriptCore API instead 1045 * 1046 * Params: 1047 * elementId = A #gchar 1048 * 1049 * Returns: A #WebKitDOMElement 1050 */ 1051 public DOMElement getElementById(string elementId) 1052 { 1053 auto __p = webkit_dom_document_get_element_by_id(webKitDOMDocument, Str.toStringz(elementId)); 1054 1055 if(__p is null) 1056 { 1057 return null; 1058 } 1059 1060 return ObjectG.getDObject!(DOMElement)(cast(WebKitDOMElement*) __p); 1061 } 1062 1063 /** 1064 * 1065 * 1066 * Deprecated: Use webkit_dom_document_get_elements_by_class_name_as_html_collection() instead. 1067 * 1068 * Params: 1069 * className = a #gchar with the tag name 1070 * 1071 * Returns: a #WebKitDOMNodeList 1072 */ 1073 public DOMNodeList getElementsByClassName(string className) 1074 { 1075 auto __p = webkit_dom_document_get_elements_by_class_name(webKitDOMDocument, Str.toStringz(className)); 1076 1077 if(__p is null) 1078 { 1079 return null; 1080 } 1081 1082 return ObjectG.getDObject!(DOMNodeList)(cast(WebKitDOMNodeList*) __p, true); 1083 } 1084 1085 /** 1086 * 1087 * 1088 * Deprecated: Use JavaScriptCore API instead 1089 * 1090 * Params: 1091 * classNames = A #gchar 1092 * 1093 * Returns: A #WebKitDOMHTMLCollection 1094 * 1095 * Since: 2.12 1096 */ 1097 public DOMHTMLCollection getElementsByClassNameAsHtmlCollection(string classNames) 1098 { 1099 auto __p = webkit_dom_document_get_elements_by_class_name_as_html_collection(webKitDOMDocument, Str.toStringz(classNames)); 1100 1101 if(__p is null) 1102 { 1103 return null; 1104 } 1105 1106 return ObjectG.getDObject!(DOMHTMLCollection)(cast(WebKitDOMHTMLCollection*) __p, true); 1107 } 1108 1109 /** 1110 * 1111 * 1112 * Deprecated: Use JavaScriptCore API instead 1113 * 1114 * Params: 1115 * elementName = A #gchar 1116 * 1117 * Returns: A #WebKitDOMNodeList 1118 */ 1119 public DOMNodeList getElementsByName(string elementName) 1120 { 1121 auto __p = webkit_dom_document_get_elements_by_name(webKitDOMDocument, Str.toStringz(elementName)); 1122 1123 if(__p is null) 1124 { 1125 return null; 1126 } 1127 1128 return ObjectG.getDObject!(DOMNodeList)(cast(WebKitDOMNodeList*) __p, true); 1129 } 1130 1131 /** 1132 * 1133 * 1134 * Deprecated: Use webkit_dom_document_get_elements_by_tag_name_as_html_collection() instead. 1135 * 1136 * Params: 1137 * tagName = a #gchar with the tag name 1138 * 1139 * Returns: a #WebKitDOMNodeList 1140 */ 1141 public DOMNodeList getElementsByTagName(string tagName) 1142 { 1143 auto __p = webkit_dom_document_get_elements_by_tag_name(webKitDOMDocument, Str.toStringz(tagName)); 1144 1145 if(__p is null) 1146 { 1147 return null; 1148 } 1149 1150 return ObjectG.getDObject!(DOMNodeList)(cast(WebKitDOMNodeList*) __p, true); 1151 } 1152 1153 /** 1154 * 1155 * 1156 * Deprecated: Use JavaScriptCore API instead 1157 * 1158 * Params: 1159 * tagname = A #gchar 1160 * 1161 * Returns: A #WebKitDOMHTMLCollection 1162 * 1163 * Since: 2.12 1164 */ 1165 public DOMHTMLCollection getElementsByTagNameAsHtmlCollection(string tagname) 1166 { 1167 auto __p = webkit_dom_document_get_elements_by_tag_name_as_html_collection(webKitDOMDocument, Str.toStringz(tagname)); 1168 1169 if(__p is null) 1170 { 1171 return null; 1172 } 1173 1174 return ObjectG.getDObject!(DOMHTMLCollection)(cast(WebKitDOMHTMLCollection*) __p, true); 1175 } 1176 1177 /** 1178 * 1179 * 1180 * Deprecated: Use webkit_dom_document_get_elements_by_tag_name_ns_as_html_collection() instead. 1181 * 1182 * Params: 1183 * namespaceUri = a #gchar with the namespace URI 1184 * tagName = a #gchar with the tag name 1185 * 1186 * Returns: a #WebKitDOMNodeList 1187 */ 1188 public DOMNodeList getElementsByTagNameNs(string namespaceUri, string tagName) 1189 { 1190 auto __p = webkit_dom_document_get_elements_by_tag_name_ns(webKitDOMDocument, Str.toStringz(namespaceUri), Str.toStringz(tagName)); 1191 1192 if(__p is null) 1193 { 1194 return null; 1195 } 1196 1197 return ObjectG.getDObject!(DOMNodeList)(cast(WebKitDOMNodeList*) __p, true); 1198 } 1199 1200 /** 1201 * 1202 * 1203 * Deprecated: Use JavaScriptCore API instead 1204 * 1205 * Params: 1206 * namespaceURI = A #gchar 1207 * localName = A #gchar 1208 * 1209 * Returns: A #WebKitDOMHTMLCollection 1210 * 1211 * Since: 2.12 1212 */ 1213 public DOMHTMLCollection getElementsByTagNameNsAsHtmlCollection(string namespaceURI, string localName) 1214 { 1215 auto __p = webkit_dom_document_get_elements_by_tag_name_ns_as_html_collection(webKitDOMDocument, Str.toStringz(namespaceURI), Str.toStringz(localName)); 1216 1217 if(__p is null) 1218 { 1219 return null; 1220 } 1221 1222 return ObjectG.getDObject!(DOMHTMLCollection)(cast(WebKitDOMHTMLCollection*) __p, true); 1223 } 1224 1225 /** 1226 * 1227 * 1228 * Deprecated: Use JavaScriptCore API instead 1229 * 1230 * Returns: A #WebKitDOMHTMLCollection 1231 * 1232 * Since: 2.14 1233 */ 1234 public DOMHTMLCollection getEmbeds() 1235 { 1236 auto __p = webkit_dom_document_get_embeds(webKitDOMDocument); 1237 1238 if(__p is null) 1239 { 1240 return null; 1241 } 1242 1243 return ObjectG.getDObject!(DOMHTMLCollection)(cast(WebKitDOMHTMLCollection*) __p, true); 1244 } 1245 1246 /** 1247 * 1248 * 1249 * Deprecated: Use JavaScriptCore API instead 1250 * 1251 * Returns: A #WebKitDOMElement 1252 * 1253 * Since: 2.16 1254 */ 1255 public DOMElement getFirstElementChild() 1256 { 1257 auto __p = webkit_dom_document_get_first_element_child(webKitDOMDocument); 1258 1259 if(__p is null) 1260 { 1261 return null; 1262 } 1263 1264 return ObjectG.getDObject!(DOMElement)(cast(WebKitDOMElement*) __p); 1265 } 1266 1267 /** 1268 * 1269 * 1270 * Deprecated: Use JavaScriptCore API instead 1271 * 1272 * Returns: A #WebKitDOMHTMLCollection 1273 */ 1274 public DOMHTMLCollection getForms() 1275 { 1276 auto __p = webkit_dom_document_get_forms(webKitDOMDocument); 1277 1278 if(__p is null) 1279 { 1280 return null; 1281 } 1282 1283 return ObjectG.getDObject!(DOMHTMLCollection)(cast(WebKitDOMHTMLCollection*) __p, true); 1284 } 1285 1286 /** 1287 * 1288 * 1289 * Deprecated: Use JavaScriptCore API instead 1290 * 1291 * Returns: A #WebKitDOMHTMLHeadElement 1292 */ 1293 public DOMHTMLHeadElement getHead() 1294 { 1295 auto __p = webkit_dom_document_get_head(webKitDOMDocument); 1296 1297 if(__p is null) 1298 { 1299 return null; 1300 } 1301 1302 return ObjectG.getDObject!(DOMHTMLHeadElement)(cast(WebKitDOMHTMLHeadElement*) __p); 1303 } 1304 1305 /** 1306 * 1307 * 1308 * Deprecated: Use JavaScriptCore API instead 1309 * 1310 * Returns: A #gboolean 1311 * 1312 * Since: 2.16 1313 */ 1314 public bool getHidden() 1315 { 1316 return webkit_dom_document_get_hidden(webKitDOMDocument) != 0; 1317 } 1318 1319 /** 1320 * 1321 * 1322 * Deprecated: Use JavaScriptCore API instead 1323 * 1324 * Returns: A #WebKitDOMHTMLCollection 1325 */ 1326 public DOMHTMLCollection getImages() 1327 { 1328 auto __p = webkit_dom_document_get_images(webKitDOMDocument); 1329 1330 if(__p is null) 1331 { 1332 return null; 1333 } 1334 1335 return ObjectG.getDObject!(DOMHTMLCollection)(cast(WebKitDOMHTMLCollection*) __p, true); 1336 } 1337 1338 /** 1339 * 1340 * 1341 * Deprecated: Use JavaScriptCore API instead 1342 * 1343 * Returns: A #WebKitDOMDOMImplementation 1344 */ 1345 public DOMDOMImplementation getImplementation() 1346 { 1347 auto __p = webkit_dom_document_get_implementation(webKitDOMDocument); 1348 1349 if(__p is null) 1350 { 1351 return null; 1352 } 1353 1354 return ObjectG.getDObject!(DOMDOMImplementation)(cast(WebKitDOMDOMImplementation*) __p, true); 1355 } 1356 1357 /** 1358 * 1359 * 1360 * Deprecated: Use JavaScriptCore API instead 1361 * 1362 * Returns: A #gchar 1363 */ 1364 public string getInputEncoding() 1365 { 1366 auto retStr = webkit_dom_document_get_input_encoding(webKitDOMDocument); 1367 1368 scope(exit) Str.freeString(retStr); 1369 return Str.toString(retStr); 1370 } 1371 1372 /** 1373 * 1374 * 1375 * Deprecated: Use JavaScriptCore API instead 1376 * 1377 * Returns: A #WebKitDOMElement 1378 * 1379 * Since: 2.16 1380 */ 1381 public DOMElement getLastElementChild() 1382 { 1383 auto __p = webkit_dom_document_get_last_element_child(webKitDOMDocument); 1384 1385 if(__p is null) 1386 { 1387 return null; 1388 } 1389 1390 return ObjectG.getDObject!(DOMElement)(cast(WebKitDOMElement*) __p); 1391 } 1392 1393 /** 1394 * 1395 * 1396 * Deprecated: Use JavaScriptCore API instead 1397 * 1398 * Returns: A #gchar 1399 */ 1400 public string getLastModified() 1401 { 1402 auto retStr = webkit_dom_document_get_last_modified(webKitDOMDocument); 1403 1404 scope(exit) Str.freeString(retStr); 1405 return Str.toString(retStr); 1406 } 1407 1408 /** 1409 * 1410 * 1411 * Deprecated: Use JavaScriptCore API instead 1412 * 1413 * Returns: A #WebKitDOMHTMLCollection 1414 */ 1415 public DOMHTMLCollection getLinks() 1416 { 1417 auto __p = webkit_dom_document_get_links(webKitDOMDocument); 1418 1419 if(__p is null) 1420 { 1421 return null; 1422 } 1423 1424 return ObjectG.getDObject!(DOMHTMLCollection)(cast(WebKitDOMHTMLCollection*) __p, true); 1425 } 1426 1427 /** 1428 * 1429 * 1430 * Deprecated: Use JavaScriptCore API instead 1431 * 1432 * Returns: A #gchar 1433 * 1434 * Since: 2.16 1435 */ 1436 public string getOrigin() 1437 { 1438 auto retStr = webkit_dom_document_get_origin(webKitDOMDocument); 1439 1440 scope(exit) Str.freeString(retStr); 1441 return Str.toString(retStr); 1442 } 1443 1444 /** 1445 * 1446 * 1447 * Deprecated: Use JavaScriptCore API instead 1448 * 1449 * Params: 1450 * element = A #WebKitDOMElement 1451 * pseudoElement = A #gchar 1452 * 1453 * Returns: A #WebKitDOMCSSStyleDeclaration 1454 */ 1455 public DOMCSSStyleDeclaration getOverrideStyle(DOMElement element, string pseudoElement) 1456 { 1457 auto __p = webkit_dom_document_get_override_style(webKitDOMDocument, (element is null) ? null : element.getDOMElementStruct(), Str.toStringz(pseudoElement)); 1458 1459 if(__p is null) 1460 { 1461 return null; 1462 } 1463 1464 return ObjectG.getDObject!(DOMCSSStyleDeclaration)(cast(WebKitDOMCSSStyleDeclaration*) __p, true); 1465 } 1466 1467 /** 1468 * 1469 * 1470 * Deprecated: Use JavaScriptCore API instead 1471 * 1472 * Returns: A #WebKitDOMHTMLCollection 1473 * 1474 * Since: 2.14 1475 */ 1476 public DOMHTMLCollection getPlugins() 1477 { 1478 auto __p = webkit_dom_document_get_plugins(webKitDOMDocument); 1479 1480 if(__p is null) 1481 { 1482 return null; 1483 } 1484 1485 return ObjectG.getDObject!(DOMHTMLCollection)(cast(WebKitDOMHTMLCollection*) __p, true); 1486 } 1487 1488 /** 1489 * 1490 * 1491 * Deprecated: Use JavaScriptCore API instead 1492 * 1493 * Returns: A #WebKitDOMElement 1494 * 1495 * Since: 2.16 1496 */ 1497 public DOMElement getPointerLockElement() 1498 { 1499 auto __p = webkit_dom_document_get_pointer_lock_element(webKitDOMDocument); 1500 1501 if(__p is null) 1502 { 1503 return null; 1504 } 1505 1506 return ObjectG.getDObject!(DOMElement)(cast(WebKitDOMElement*) __p); 1507 } 1508 1509 /** 1510 * This function has been removed and does nothing. 1511 * 1512 * Deprecated: Use JavaScriptCore API instead 1513 * 1514 * Returns: A #gchar 1515 */ 1516 public string getPreferredStylesheetSet() 1517 { 1518 auto retStr = webkit_dom_document_get_preferred_stylesheet_set(webKitDOMDocument); 1519 1520 scope(exit) Str.freeString(retStr); 1521 return Str.toString(retStr); 1522 } 1523 1524 /** 1525 * 1526 * 1527 * Deprecated: Use JavaScriptCore API instead 1528 * 1529 * Returns: A #gchar 1530 */ 1531 public string getReadyState() 1532 { 1533 auto retStr = webkit_dom_document_get_ready_state(webKitDOMDocument); 1534 1535 scope(exit) Str.freeString(retStr); 1536 return Str.toString(retStr); 1537 } 1538 1539 /** 1540 * 1541 * 1542 * Deprecated: Use JavaScriptCore API instead 1543 * 1544 * Returns: A #gchar 1545 */ 1546 public string getReferrer() 1547 { 1548 auto retStr = webkit_dom_document_get_referrer(webKitDOMDocument); 1549 1550 scope(exit) Str.freeString(retStr); 1551 return Str.toString(retStr); 1552 } 1553 1554 /** 1555 * 1556 * 1557 * Deprecated: Use JavaScriptCore API instead 1558 * 1559 * Returns: A #WebKitDOMHTMLCollection 1560 * 1561 * Since: 2.14 1562 */ 1563 public DOMHTMLCollection getScripts() 1564 { 1565 auto __p = webkit_dom_document_get_scripts(webKitDOMDocument); 1566 1567 if(__p is null) 1568 { 1569 return null; 1570 } 1571 1572 return ObjectG.getDObject!(DOMHTMLCollection)(cast(WebKitDOMHTMLCollection*) __p, true); 1573 } 1574 1575 /** 1576 * 1577 * 1578 * Deprecated: Use JavaScriptCore API instead 1579 * 1580 * Returns: A #WebKitDOMElement 1581 * 1582 * Since: 2.16 1583 */ 1584 public DOMElement getScrollingElement() 1585 { 1586 auto __p = webkit_dom_document_get_scrolling_element(webKitDOMDocument); 1587 1588 if(__p is null) 1589 { 1590 return null; 1591 } 1592 1593 return ObjectG.getDObject!(DOMElement)(cast(WebKitDOMElement*) __p); 1594 } 1595 1596 /** 1597 * This function has been removed and does nothing. 1598 * 1599 * Deprecated: Use JavaScriptCore API instead 1600 * 1601 * Returns: A #gchar 1602 */ 1603 public string getSelectedStylesheetSet() 1604 { 1605 auto retStr = webkit_dom_document_get_selected_stylesheet_set(webKitDOMDocument); 1606 1607 scope(exit) Str.freeString(retStr); 1608 return Str.toString(retStr); 1609 } 1610 1611 /** 1612 * 1613 * 1614 * Deprecated: Use JavaScriptCore API instead 1615 * 1616 * Returns: A #WebKitDOMStyleSheetList 1617 */ 1618 public DOMStyleSheetList getStyleSheets() 1619 { 1620 auto __p = webkit_dom_document_get_style_sheets(webKitDOMDocument); 1621 1622 if(__p is null) 1623 { 1624 return null; 1625 } 1626 1627 return ObjectG.getDObject!(DOMStyleSheetList)(cast(WebKitDOMStyleSheetList*) __p); 1628 } 1629 1630 /** 1631 * 1632 * 1633 * Deprecated: Use JavaScriptCore API instead 1634 * 1635 * Returns: A #gchar 1636 */ 1637 public string getTitle() 1638 { 1639 auto retStr = webkit_dom_document_get_title(webKitDOMDocument); 1640 1641 scope(exit) Str.freeString(retStr); 1642 return Str.toString(retStr); 1643 } 1644 1645 /** 1646 * 1647 * 1648 * Deprecated: Use JavaScriptCore API instead 1649 * 1650 * Returns: A #gchar 1651 */ 1652 public string getUrl() 1653 { 1654 auto retStr = webkit_dom_document_get_url(webKitDOMDocument); 1655 1656 scope(exit) Str.freeString(retStr); 1657 return Str.toString(retStr); 1658 } 1659 1660 /** 1661 * 1662 * 1663 * Deprecated: Use JavaScriptCore API instead 1664 * 1665 * Returns: A #gchar 1666 * 1667 * Since: 2.16 1668 */ 1669 public string getVisibilityState() 1670 { 1671 auto retStr = webkit_dom_document_get_visibility_state(webKitDOMDocument); 1672 1673 scope(exit) Str.freeString(retStr); 1674 return Str.toString(retStr); 1675 } 1676 1677 /** 1678 * 1679 * 1680 * Deprecated: Use JavaScriptCore API instead 1681 * 1682 * Returns: A #WebKitDOMElement 1683 * 1684 * Since: 2.16 1685 */ 1686 public DOMElement getWebkitCurrentFullscreenElement() 1687 { 1688 auto __p = webkit_dom_document_get_webkit_current_fullscreen_element(webKitDOMDocument); 1689 1690 if(__p is null) 1691 { 1692 return null; 1693 } 1694 1695 return ObjectG.getDObject!(DOMElement)(cast(WebKitDOMElement*) __p); 1696 } 1697 1698 /** 1699 * 1700 * 1701 * Deprecated: Use JavaScriptCore API instead 1702 * 1703 * Returns: A #WebKitDOMElement 1704 * 1705 * Since: 2.16 1706 */ 1707 public DOMElement getWebkitFullscreenElement() 1708 { 1709 auto __p = webkit_dom_document_get_webkit_fullscreen_element(webKitDOMDocument); 1710 1711 if(__p is null) 1712 { 1713 return null; 1714 } 1715 1716 return ObjectG.getDObject!(DOMElement)(cast(WebKitDOMElement*) __p); 1717 } 1718 1719 /** 1720 * 1721 * 1722 * Deprecated: Use JavaScriptCore API instead 1723 * 1724 * Returns: A #gboolean 1725 * 1726 * Since: 2.16 1727 */ 1728 public bool getWebkitFullscreenEnabled() 1729 { 1730 return webkit_dom_document_get_webkit_fullscreen_enabled(webKitDOMDocument) != 0; 1731 } 1732 1733 /** 1734 * 1735 * 1736 * Deprecated: Use JavaScriptCore API instead 1737 * 1738 * Returns: A #gboolean 1739 * 1740 * Since: 2.16 1741 */ 1742 public bool getWebkitFullscreenKeyboardInputAllowed() 1743 { 1744 return webkit_dom_document_get_webkit_fullscreen_keyboard_input_allowed(webKitDOMDocument) != 0; 1745 } 1746 1747 /** 1748 * 1749 * 1750 * Deprecated: Use JavaScriptCore API instead 1751 * 1752 * Returns: A #gboolean 1753 * 1754 * Since: 2.16 1755 */ 1756 public bool getWebkitIsFullscreen() 1757 { 1758 return webkit_dom_document_get_webkit_is_fullscreen(webKitDOMDocument) != 0; 1759 } 1760 1761 /** 1762 * 1763 * 1764 * Deprecated: Use JavaScriptCore API instead 1765 * 1766 * Returns: A #gchar 1767 */ 1768 public string getXmlEncoding() 1769 { 1770 auto retStr = webkit_dom_document_get_xml_encoding(webKitDOMDocument); 1771 1772 scope(exit) Str.freeString(retStr); 1773 return Str.toString(retStr); 1774 } 1775 1776 /** 1777 * 1778 * 1779 * Deprecated: Use JavaScriptCore API instead 1780 * 1781 * Returns: A #gboolean 1782 */ 1783 public bool getXmlStandalone() 1784 { 1785 return webkit_dom_document_get_xml_standalone(webKitDOMDocument) != 0; 1786 } 1787 1788 /** 1789 * 1790 * 1791 * Deprecated: Use JavaScriptCore API instead 1792 * 1793 * Returns: A #gchar 1794 */ 1795 public string getXmlVersion() 1796 { 1797 auto retStr = webkit_dom_document_get_xml_version(webKitDOMDocument); 1798 1799 scope(exit) Str.freeString(retStr); 1800 return Str.toString(retStr); 1801 } 1802 1803 /** 1804 * 1805 * 1806 * Deprecated: Use JavaScriptCore API instead 1807 * 1808 * Returns: A #gboolean 1809 */ 1810 public bool hasFocus() 1811 { 1812 return webkit_dom_document_has_focus(webKitDOMDocument) != 0; 1813 } 1814 1815 /** 1816 * 1817 * 1818 * Deprecated: Use JavaScriptCore API instead 1819 * 1820 * Params: 1821 * importedNode = A #WebKitDOMNode 1822 * deep = A #gboolean 1823 * 1824 * Returns: A #WebKitDOMNode 1825 * 1826 * Throws: GException on failure. 1827 */ 1828 public DOMNode importNode(DOMNode importedNode, bool deep) 1829 { 1830 GError* err = null; 1831 1832 auto __p = webkit_dom_document_import_node(webKitDOMDocument, (importedNode is null) ? null : importedNode.getDOMNodeStruct(), deep, &err); 1833 1834 if (err !is null) 1835 { 1836 throw new GException( new ErrorG(err) ); 1837 } 1838 1839 if(__p is null) 1840 { 1841 return null; 1842 } 1843 1844 return ObjectG.getDObject!(DOMNode)(cast(WebKitDOMNode*) __p); 1845 } 1846 1847 /** 1848 * 1849 * 1850 * Deprecated: Use JavaScriptCore API instead 1851 * 1852 * Params: 1853 * command = A #gchar 1854 * 1855 * Returns: A #gboolean 1856 */ 1857 public bool queryCommandEnabled(string command) 1858 { 1859 return webkit_dom_document_query_command_enabled(webKitDOMDocument, Str.toStringz(command)) != 0; 1860 } 1861 1862 /** 1863 * 1864 * 1865 * Deprecated: Use JavaScriptCore API instead 1866 * 1867 * Params: 1868 * command = A #gchar 1869 * 1870 * Returns: A #gboolean 1871 */ 1872 public bool queryCommandIndeterm(string command) 1873 { 1874 return webkit_dom_document_query_command_indeterm(webKitDOMDocument, Str.toStringz(command)) != 0; 1875 } 1876 1877 /** 1878 * 1879 * 1880 * Deprecated: Use JavaScriptCore API instead 1881 * 1882 * Params: 1883 * command = A #gchar 1884 * 1885 * Returns: A #gboolean 1886 */ 1887 public bool queryCommandState(string command) 1888 { 1889 return webkit_dom_document_query_command_state(webKitDOMDocument, Str.toStringz(command)) != 0; 1890 } 1891 1892 /** 1893 * 1894 * 1895 * Deprecated: Use JavaScriptCore API instead 1896 * 1897 * Params: 1898 * command = A #gchar 1899 * 1900 * Returns: A #gboolean 1901 */ 1902 public bool queryCommandSupported(string command) 1903 { 1904 return webkit_dom_document_query_command_supported(webKitDOMDocument, Str.toStringz(command)) != 0; 1905 } 1906 1907 /** 1908 * 1909 * 1910 * Deprecated: Use JavaScriptCore API instead 1911 * 1912 * Params: 1913 * command = A #gchar 1914 * 1915 * Returns: A #gchar 1916 */ 1917 public string queryCommandValue(string command) 1918 { 1919 auto retStr = webkit_dom_document_query_command_value(webKitDOMDocument, Str.toStringz(command)); 1920 1921 scope(exit) Str.freeString(retStr); 1922 return Str.toString(retStr); 1923 } 1924 1925 /** 1926 * 1927 * 1928 * Deprecated: Use JavaScriptCore API instead 1929 * 1930 * Params: 1931 * selectors = A #gchar 1932 * 1933 * Returns: A #WebKitDOMElement 1934 * 1935 * Throws: GException on failure. 1936 */ 1937 public DOMElement querySelector(string selectors) 1938 { 1939 GError* err = null; 1940 1941 auto __p = webkit_dom_document_query_selector(webKitDOMDocument, Str.toStringz(selectors), &err); 1942 1943 if (err !is null) 1944 { 1945 throw new GException( new ErrorG(err) ); 1946 } 1947 1948 if(__p is null) 1949 { 1950 return null; 1951 } 1952 1953 return ObjectG.getDObject!(DOMElement)(cast(WebKitDOMElement*) __p); 1954 } 1955 1956 /** 1957 * 1958 * 1959 * Deprecated: Use JavaScriptCore API instead 1960 * 1961 * Params: 1962 * selectors = A #gchar 1963 * 1964 * Returns: A #WebKitDOMNodeList 1965 * 1966 * Throws: GException on failure. 1967 */ 1968 public DOMNodeList querySelectorAll(string selectors) 1969 { 1970 GError* err = null; 1971 1972 auto __p = webkit_dom_document_query_selector_all(webKitDOMDocument, Str.toStringz(selectors), &err); 1973 1974 if (err !is null) 1975 { 1976 throw new GException( new ErrorG(err) ); 1977 } 1978 1979 if(__p is null) 1980 { 1981 return null; 1982 } 1983 1984 return ObjectG.getDObject!(DOMNodeList)(cast(WebKitDOMNodeList*) __p, true); 1985 } 1986 1987 /** 1988 * 1989 * 1990 * Deprecated: Use JavaScriptCore API instead 1991 * 1992 * Params: 1993 * value = A #WebKitDOMHTMLElement 1994 * 1995 * Throws: GException on failure. 1996 */ 1997 public void setBody(DOMHTMLElement value) 1998 { 1999 GError* err = null; 2000 2001 webkit_dom_document_set_body(webKitDOMDocument, (value is null) ? null : value.getDOMHTMLElementStruct(), &err); 2002 2003 if (err !is null) 2004 { 2005 throw new GException( new ErrorG(err) ); 2006 } 2007 } 2008 2009 /** 2010 * 2011 * 2012 * Deprecated: Use JavaScriptCore API instead 2013 * 2014 * Params: 2015 * value = A #gchar 2016 */ 2017 public void setCharset(string value) 2018 { 2019 webkit_dom_document_set_charset(webKitDOMDocument, Str.toStringz(value)); 2020 } 2021 2022 /** 2023 * 2024 * 2025 * Deprecated: Use JavaScriptCore API instead 2026 * 2027 * Params: 2028 * value = A #gchar 2029 * 2030 * Throws: GException on failure. 2031 */ 2032 public void setCookie(string value) 2033 { 2034 GError* err = null; 2035 2036 webkit_dom_document_set_cookie(webKitDOMDocument, Str.toStringz(value), &err); 2037 2038 if (err !is null) 2039 { 2040 throw new GException( new ErrorG(err) ); 2041 } 2042 } 2043 2044 /** 2045 * 2046 * 2047 * Deprecated: Use JavaScriptCore API instead 2048 * 2049 * Params: 2050 * value = A #gchar 2051 * 2052 * Since: 2.14 2053 */ 2054 public void setDesignMode(string value) 2055 { 2056 webkit_dom_document_set_design_mode(webKitDOMDocument, Str.toStringz(value)); 2057 } 2058 2059 /** 2060 * 2061 * 2062 * Deprecated: Use JavaScriptCore API instead 2063 * 2064 * Params: 2065 * value = A #gchar 2066 * 2067 * Since: 2.16 2068 */ 2069 public void setDir(string value) 2070 { 2071 webkit_dom_document_set_dir(webKitDOMDocument, Str.toStringz(value)); 2072 } 2073 2074 /** 2075 * 2076 * 2077 * Deprecated: Use JavaScriptCore API instead 2078 * 2079 * Params: 2080 * value = A #gchar 2081 */ 2082 public void setDocumentUri(string value) 2083 { 2084 webkit_dom_document_set_document_uri(webKitDOMDocument, Str.toStringz(value)); 2085 } 2086 2087 /** 2088 * This function has been removed and does nothing. 2089 * 2090 * Deprecated: Use JavaScriptCore API instead 2091 * 2092 * Params: 2093 * value = A #gchar 2094 */ 2095 public void setSelectedStylesheetSet(string value) 2096 { 2097 webkit_dom_document_set_selected_stylesheet_set(webKitDOMDocument, Str.toStringz(value)); 2098 } 2099 2100 /** 2101 * 2102 * 2103 * Deprecated: Use JavaScriptCore API instead 2104 * 2105 * Params: 2106 * value = A #gchar 2107 */ 2108 public void setTitle(string value) 2109 { 2110 webkit_dom_document_set_title(webKitDOMDocument, Str.toStringz(value)); 2111 } 2112 2113 /** 2114 * 2115 * 2116 * Deprecated: Use JavaScriptCore API instead 2117 * 2118 * Params: 2119 * value = A #gboolean 2120 * 2121 * Throws: GException on failure. 2122 */ 2123 public void setXmlStandalone(bool value) 2124 { 2125 GError* err = null; 2126 2127 webkit_dom_document_set_xml_standalone(webKitDOMDocument, value, &err); 2128 2129 if (err !is null) 2130 { 2131 throw new GException( new ErrorG(err) ); 2132 } 2133 } 2134 2135 /** 2136 * 2137 * 2138 * Deprecated: Use JavaScriptCore API instead 2139 * 2140 * Params: 2141 * value = A #gchar 2142 * 2143 * Throws: GException on failure. 2144 */ 2145 public void setXmlVersion(string value) 2146 { 2147 GError* err = null; 2148 2149 webkit_dom_document_set_xml_version(webKitDOMDocument, Str.toStringz(value), &err); 2150 2151 if (err !is null) 2152 { 2153 throw new GException( new ErrorG(err) ); 2154 } 2155 } 2156 2157 /** 2158 * 2159 * 2160 * Deprecated: Use JavaScriptCore API instead 2161 * 2162 * Since: 2.16 2163 */ 2164 public void webkitCancelFullscreen() 2165 { 2166 webkit_dom_document_webkit_cancel_fullscreen(webKitDOMDocument); 2167 } 2168 2169 /** 2170 * 2171 * 2172 * Deprecated: Use JavaScriptCore API instead 2173 * 2174 * Since: 2.16 2175 */ 2176 public void webkitExitFullscreen() 2177 { 2178 webkit_dom_document_webkit_exit_fullscreen(webKitDOMDocument); 2179 } 2180 }