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