1 module webkit2webextension.DOMClientRect; 2 3 private import webkit2webextension.DOMObject; 4 private import webkit2webextension.c.functions; 5 public import webkit2webextension.c.types; 6 7 8 /** */ 9 public class DOMClientRect : DOMObject 10 { 11 /** the main Gtk struct */ 12 protected WebKitDOMClientRect* webKitDOMClientRect; 13 14 /** Get the main Gtk struct */ 15 public WebKitDOMClientRect* getDOMClientRectStruct(bool transferOwnership = false) 16 { 17 if (transferOwnership) 18 ownedRef = false; 19 return webKitDOMClientRect; 20 } 21 22 /** the main Gtk struct as a void* */ 23 protected override void* getStruct() 24 { 25 return cast(void*)webKitDOMClientRect; 26 } 27 28 /** 29 * Sets our main struct and passes it to the parent class. 30 */ 31 public this (WebKitDOMClientRect* webKitDOMClientRect, bool ownedRef = false) 32 { 33 this.webKitDOMClientRect = webKitDOMClientRect; 34 super(cast(WebKitDOMObject*)webKitDOMClientRect, ownedRef); 35 } 36 37 38 /** */ 39 public static GType getType() 40 { 41 return webkit_dom_client_rect_get_type(); 42 } 43 44 /** 45 * Returns the bottom coordinate of @self, relative to the viewport. 46 * 47 * Deprecated: Use JavaScriptCore API instead 48 * 49 * Returns: A #gfloat 50 * 51 * Since: 2.18 52 */ 53 public float getBottom() 54 { 55 return webkit_dom_client_rect_get_bottom(webKitDOMClientRect); 56 } 57 58 /** 59 * Returns the height of @self. 60 * 61 * Deprecated: Use JavaScriptCore API instead 62 * 63 * Returns: A #gfloat 64 * 65 * Since: 2.18 66 */ 67 public float getHeight() 68 { 69 return webkit_dom_client_rect_get_height(webKitDOMClientRect); 70 } 71 72 /** 73 * Returns the left coordinate of @self, relative to the viewport. 74 * 75 * Deprecated: Use JavaScriptCore API instead 76 * 77 * Returns: A #gfloat 78 * 79 * Since: 2.18 80 */ 81 public float getLeft() 82 { 83 return webkit_dom_client_rect_get_left(webKitDOMClientRect); 84 } 85 86 /** 87 * Returns the right coordinate of @self, relative to the viewport. 88 * 89 * Deprecated: Use JavaScriptCore API instead 90 * 91 * Returns: A #gfloat 92 * 93 * Since: 2.18 94 */ 95 public float getRight() 96 { 97 return webkit_dom_client_rect_get_right(webKitDOMClientRect); 98 } 99 100 /** 101 * Returns the top coordinate of @self, relative to the viewport. 102 * 103 * Deprecated: Use JavaScriptCore API instead 104 * 105 * Returns: A #gfloat 106 * 107 * Since: 2.18 108 */ 109 public float getTop() 110 { 111 return webkit_dom_client_rect_get_top(webKitDOMClientRect); 112 } 113 114 /** 115 * Returns the width of @self. 116 * 117 * Deprecated: Use JavaScriptCore API instead 118 * 119 * Returns: A #gfloat 120 * 121 * Since: 2.18 122 */ 123 public float getWidth() 124 { 125 return webkit_dom_client_rect_get_width(webKitDOMClientRect); 126 } 127 }