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