1 module webkit2webextension.DOMHTMLStyleElement; 2 3 private import glib.Str; 4 private import gobject.ObjectG; 5 private import webkit2webextension.DOMHTMLElement; 6 private import webkit2webextension.DOMStyleSheet; 7 private import webkit2webextension.c.functions; 8 public import webkit2webextension.c.types; 9 10 11 /** */ 12 public class DOMHTMLStyleElement : DOMHTMLElement 13 { 14 /** the main Gtk struct */ 15 protected WebKitDOMHTMLStyleElement* webKitDOMHTMLStyleElement; 16 17 /** Get the main Gtk struct */ 18 public WebKitDOMHTMLStyleElement* getDOMHTMLStyleElementStruct(bool transferOwnership = false) 19 { 20 if (transferOwnership) 21 ownedRef = false; 22 return webKitDOMHTMLStyleElement; 23 } 24 25 /** the main Gtk struct as a void* */ 26 protected override void* getStruct() 27 { 28 return cast(void*)webKitDOMHTMLStyleElement; 29 } 30 31 /** 32 * Sets our main struct and passes it to the parent class. 33 */ 34 public this (WebKitDOMHTMLStyleElement* webKitDOMHTMLStyleElement, bool ownedRef = false) 35 { 36 this.webKitDOMHTMLStyleElement = webKitDOMHTMLStyleElement; 37 super(cast(WebKitDOMHTMLElement*)webKitDOMHTMLStyleElement, ownedRef); 38 } 39 40 41 /** */ 42 public static GType getType() 43 { 44 return webkit_dom_html_style_element_get_type(); 45 } 46 47 /** 48 * 49 * 50 * Deprecated: Use JavaScriptCore API instead 51 * 52 * Returns: A #gboolean 53 */ 54 public bool getDisabled() 55 { 56 return webkit_dom_html_style_element_get_disabled(webKitDOMHTMLStyleElement) != 0; 57 } 58 59 /** 60 * 61 * 62 * Deprecated: Use JavaScriptCore API instead 63 * 64 * Returns: A #gchar 65 */ 66 public string getMedia() 67 { 68 auto retStr = webkit_dom_html_style_element_get_media(webKitDOMHTMLStyleElement); 69 70 scope(exit) Str.freeString(retStr); 71 return Str.toString(retStr); 72 } 73 74 /** 75 * 76 * 77 * Deprecated: Use JavaScriptCore API instead 78 * 79 * Returns: A #WebKitDOMStyleSheet 80 */ 81 public DOMStyleSheet getSheet() 82 { 83 auto __p = webkit_dom_html_style_element_get_sheet(webKitDOMHTMLStyleElement); 84 85 if(__p is null) 86 { 87 return null; 88 } 89 90 return ObjectG.getDObject!(DOMStyleSheet)(cast(WebKitDOMStyleSheet*) __p, true); 91 } 92 93 /** 94 * 95 * 96 * Deprecated: Use JavaScriptCore API instead 97 * 98 * Returns: A #gchar 99 */ 100 public string getTypeAttr() 101 { 102 auto retStr = webkit_dom_html_style_element_get_type_attr(webKitDOMHTMLStyleElement); 103 104 scope(exit) Str.freeString(retStr); 105 return Str.toString(retStr); 106 } 107 108 /** 109 * 110 * 111 * Deprecated: Use JavaScriptCore API instead 112 * 113 * Params: 114 * value = A #gboolean 115 */ 116 public void setDisabled(bool value) 117 { 118 webkit_dom_html_style_element_set_disabled(webKitDOMHTMLStyleElement, value); 119 } 120 121 /** 122 * 123 * 124 * Deprecated: Use JavaScriptCore API instead 125 * 126 * Params: 127 * value = A #gchar 128 */ 129 public void setMedia(string value) 130 { 131 webkit_dom_html_style_element_set_media(webKitDOMHTMLStyleElement, Str.toStringz(value)); 132 } 133 134 /** 135 * 136 * 137 * Deprecated: Use JavaScriptCore API instead 138 * 139 * Params: 140 * value = A #gchar 141 */ 142 public void setTypeAttr(string value) 143 { 144 webkit_dom_html_style_element_set_type_attr(webKitDOMHTMLStyleElement, Str.toStringz(value)); 145 } 146 }