1 module webkit2webextension.DOMHTMLCollection;
2 
3 private import glib.Str;
4 private import gobject.ObjectG;
5 private import webkit2webextension.DOMNode;
6 private import webkit2webextension.DOMObject;
7 private import webkit2webextension.c.functions;
8 public  import webkit2webextension.c.types;
9 
10 
11 /** */
12 public class DOMHTMLCollection : DOMObject
13 {
14 	/** the main Gtk struct */
15 	protected WebKitDOMHTMLCollection* webKitDOMHTMLCollection;
16 
17 	/** Get the main Gtk struct */
18 	public WebKitDOMHTMLCollection* getDOMHTMLCollectionStruct(bool transferOwnership = false)
19 	{
20 		if (transferOwnership)
21 			ownedRef = false;
22 		return webKitDOMHTMLCollection;
23 	}
24 
25 	/** the main Gtk struct as a void* */
26 	protected override void* getStruct()
27 	{
28 		return cast(void*)webKitDOMHTMLCollection;
29 	}
30 
31 	/**
32 	 * Sets our main struct and passes it to the parent class.
33 	 */
34 	public this (WebKitDOMHTMLCollection* webKitDOMHTMLCollection, bool ownedRef = false)
35 	{
36 		this.webKitDOMHTMLCollection = webKitDOMHTMLCollection;
37 		super(cast(WebKitDOMObject*)webKitDOMHTMLCollection, ownedRef);
38 	}
39 
40 
41 	/** */
42 	public static GType getType()
43 	{
44 		return webkit_dom_html_collection_get_type();
45 	}
46 
47 	/**
48 	 *
49 	 *
50 	 * Deprecated: Use JavaScriptCore API instead
51 	 *
52 	 * Returns: A #gulong
53 	 */
54 	public gulong getLength()
55 	{
56 		return webkit_dom_html_collection_get_length(webKitDOMHTMLCollection);
57 	}
58 
59 	/**
60 	 *
61 	 *
62 	 * Deprecated: Use JavaScriptCore API instead
63 	 *
64 	 * Params:
65 	 *     index = A #gulong
66 	 *
67 	 * Returns: A #WebKitDOMNode
68 	 */
69 	public DOMNode item(gulong index)
70 	{
71 		auto __p = webkit_dom_html_collection_item(webKitDOMHTMLCollection, index);
72 
73 		if(__p is null)
74 		{
75 			return null;
76 		}
77 
78 		return ObjectG.getDObject!(DOMNode)(cast(WebKitDOMNode*) __p);
79 	}
80 
81 	/**
82 	 *
83 	 *
84 	 * Deprecated: Use JavaScriptCore API instead
85 	 *
86 	 * Params:
87 	 *     name = A #gchar
88 	 *
89 	 * Returns: A #WebKitDOMNode
90 	 */
91 	public DOMNode namedItem(string name)
92 	{
93 		auto __p = webkit_dom_html_collection_named_item(webKitDOMHTMLCollection, Str.toStringz(name));
94 
95 		if(__p is null)
96 		{
97 			return null;
98 		}
99 
100 		return ObjectG.getDObject!(DOMNode)(cast(WebKitDOMNode*) __p);
101 	}
102 }