1 module webkit2webextension.WebHitTestResult; 2 3 private import gobject.ObjectG; 4 private import webkit2webextension.DOMNode; 5 private import webkit2webextension.HitTestResult; 6 private import webkit2webextension.c.functions; 7 public import webkit2webextension.c.types; 8 9 10 /** 11 * WebKitWebHitTestResult extends #WebKitHitTestResult to provide information 12 * about the #WebKitDOMNode in the coordinates of the Hit Test. 13 * 14 * Since: 2.8 15 */ 16 public class WebHitTestResult : HitTestResult 17 { 18 /** the main Gtk struct */ 19 protected WebKitWebHitTestResult* webKitWebHitTestResult; 20 21 /** Get the main Gtk struct */ 22 public WebKitWebHitTestResult* getWebHitTestResultStruct(bool transferOwnership = false) 23 { 24 if (transferOwnership) 25 ownedRef = false; 26 return webKitWebHitTestResult; 27 } 28 29 /** the main Gtk struct as a void* */ 30 protected override void* getStruct() 31 { 32 return cast(void*)webKitWebHitTestResult; 33 } 34 35 /** 36 * Sets our main struct and passes it to the parent class. 37 */ 38 public this (WebKitWebHitTestResult* webKitWebHitTestResult, bool ownedRef = false) 39 { 40 this.webKitWebHitTestResult = webKitWebHitTestResult; 41 super(cast(WebKitHitTestResult*)webKitWebHitTestResult, ownedRef); 42 } 43 44 45 /** */ 46 public static GType getType() 47 { 48 return webkit_web_hit_test_result_get_type(); 49 } 50 51 /** 52 * Get the #WebKitDOMNode in the coordinates of the Hit Test. 53 * 54 * Returns: a #WebKitDOMNode 55 * 56 * Since: 2.8 57 */ 58 public DOMNode getNode() 59 { 60 auto __p = webkit_web_hit_test_result_get_node(webKitWebHitTestResult); 61 62 if(__p is null) 63 { 64 return null; 65 } 66 67 return ObjectG.getDObject!(DOMNode)(cast(WebKitDOMNode*) __p); 68 } 69 }