1 module webkit2webextension.DOMFileList;
2 
3 private import gobject.ObjectG;
4 private import webkit2webextension.DOMFile;
5 private import webkit2webextension.DOMObject;
6 private import webkit2webextension.c.functions;
7 public  import webkit2webextension.c.types;
8 
9 
10 /** */
11 public class DOMFileList : DOMObject
12 {
13 	/** the main Gtk struct */
14 	protected WebKitDOMFileList* webKitDOMFileList;
15 
16 	/** Get the main Gtk struct */
17 	public WebKitDOMFileList* getDOMFileListStruct(bool transferOwnership = false)
18 	{
19 		if (transferOwnership)
20 			ownedRef = false;
21 		return webKitDOMFileList;
22 	}
23 
24 	/** the main Gtk struct as a void* */
25 	protected override void* getStruct()
26 	{
27 		return cast(void*)webKitDOMFileList;
28 	}
29 
30 	/**
31 	 * Sets our main struct and passes it to the parent class.
32 	 */
33 	public this (WebKitDOMFileList* webKitDOMFileList, bool ownedRef = false)
34 	{
35 		this.webKitDOMFileList = webKitDOMFileList;
36 		super(cast(WebKitDOMObject*)webKitDOMFileList, ownedRef);
37 	}
38 
39 
40 	/** */
41 	public static GType getType()
42 	{
43 		return webkit_dom_file_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_file_list_get_length(webKitDOMFileList);
56 	}
57 
58 	/**
59 	 *
60 	 *
61 	 * Deprecated: Use JavaScriptCore API instead
62 	 *
63 	 * Params:
64 	 *     index = A #gulong
65 	 *
66 	 * Returns: A #WebKitDOMFile
67 	 */
68 	public DOMFile item(gulong index)
69 	{
70 		auto __p = webkit_dom_file_list_item(webKitDOMFileList, index);
71 
72 		if(__p is null)
73 		{
74 			return null;
75 		}
76 
77 		return ObjectG.getDObject!(DOMFile)(cast(WebKitDOMFile*) __p, true);
78 	}
79 }