1 module webkit2webextension.DOMNodeList; 2 3 private import gobject.ObjectG; 4 private import webkit2webextension.DOMNode; 5 private import webkit2webextension.DOMObject; 6 private import webkit2webextension.c.functions; 7 public import webkit2webextension.c.types; 8 9 10 /** */ 11 public class DOMNodeList : DOMObject 12 { 13 /** the main Gtk struct */ 14 protected WebKitDOMNodeList* webKitDOMNodeList; 15 16 /** Get the main Gtk struct */ 17 public WebKitDOMNodeList* getDOMNodeListStruct(bool transferOwnership = false) 18 { 19 if (transferOwnership) 20 ownedRef = false; 21 return webKitDOMNodeList; 22 } 23 24 /** the main Gtk struct as a void* */ 25 protected override void* getStruct() 26 { 27 return cast(void*)webKitDOMNodeList; 28 } 29 30 /** 31 * Sets our main struct and passes it to the parent class. 32 */ 33 public this (WebKitDOMNodeList* webKitDOMNodeList, bool ownedRef = false) 34 { 35 this.webKitDOMNodeList = webKitDOMNodeList; 36 super(cast(WebKitDOMObject*)webKitDOMNodeList, ownedRef); 37 } 38 39 40 /** */ 41 public static GType getType() 42 { 43 return webkit_dom_node_list_get_type(); 44 } 45 46 /** 47 * 48 * 49 * Deprecated: Use JavaScriptCore API instead 50 * 51 * Returns: A #gulong 52 */ 53 public gulong getLength() 54 { 55 return webkit_dom_node_list_get_length(webKitDOMNodeList); 56 } 57 58 /** 59 * 60 * 61 * Deprecated: Use JavaScriptCore API instead 62 * 63 * Params: 64 * index = A #gulong 65 * 66 * Returns: A #WebKitDOMNode 67 */ 68 public DOMNode item(gulong index) 69 { 70 auto __p = webkit_dom_node_list_item(webKitDOMNodeList, index); 71 72 if(__p is null) 73 { 74 return null; 75 } 76 77 return ObjectG.getDObject!(DOMNode)(cast(WebKitDOMNode*) __p); 78 } 79 }