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