1 module webkit2webextension.DOMHTMLOptionElement; 2 3 private import glib.Str; 4 private import gobject.ObjectG; 5 private import webkit2webextension.DOMHTMLElement; 6 private import webkit2webextension.DOMHTMLFormElement; 7 private import webkit2webextension.c.functions; 8 public import webkit2webextension.c.types; 9 10 11 /** */ 12 public class DOMHTMLOptionElement : DOMHTMLElement 13 { 14 /** the main Gtk struct */ 15 protected WebKitDOMHTMLOptionElement* webKitDOMHTMLOptionElement; 16 17 /** Get the main Gtk struct */ 18 public WebKitDOMHTMLOptionElement* getDOMHTMLOptionElementStruct(bool transferOwnership = false) 19 { 20 if (transferOwnership) 21 ownedRef = false; 22 return webKitDOMHTMLOptionElement; 23 } 24 25 /** the main Gtk struct as a void* */ 26 protected override void* getStruct() 27 { 28 return cast(void*)webKitDOMHTMLOptionElement; 29 } 30 31 /** 32 * Sets our main struct and passes it to the parent class. 33 */ 34 public this (WebKitDOMHTMLOptionElement* webKitDOMHTMLOptionElement, bool ownedRef = false) 35 { 36 this.webKitDOMHTMLOptionElement = webKitDOMHTMLOptionElement; 37 super(cast(WebKitDOMHTMLElement*)webKitDOMHTMLOptionElement, ownedRef); 38 } 39 40 41 /** */ 42 public static GType getType() 43 { 44 return webkit_dom_html_option_element_get_type(); 45 } 46 47 /** 48 * 49 * 50 * Deprecated: Use JavaScriptCore API instead 51 * 52 * Returns: A #gboolean 53 */ 54 public bool getDefaultSelected() 55 { 56 return webkit_dom_html_option_element_get_default_selected(webKitDOMHTMLOptionElement) != 0; 57 } 58 59 /** 60 * 61 * 62 * Deprecated: Use JavaScriptCore API instead 63 * 64 * Returns: A #gboolean 65 */ 66 public bool getDisabled() 67 { 68 return webkit_dom_html_option_element_get_disabled(webKitDOMHTMLOptionElement) != 0; 69 } 70 71 /** 72 * 73 * 74 * Deprecated: Use JavaScriptCore API instead 75 * 76 * Returns: A #WebKitDOMHTMLFormElement 77 */ 78 public DOMHTMLFormElement getForm() 79 { 80 auto __p = webkit_dom_html_option_element_get_form(webKitDOMHTMLOptionElement); 81 82 if(__p is null) 83 { 84 return null; 85 } 86 87 return ObjectG.getDObject!(DOMHTMLFormElement)(cast(WebKitDOMHTMLFormElement*) __p); 88 } 89 90 /** 91 * 92 * 93 * Deprecated: Use JavaScriptCore API instead 94 * 95 * Returns: A #glong 96 */ 97 public glong getIndex() 98 { 99 return webkit_dom_html_option_element_get_index(webKitDOMHTMLOptionElement); 100 } 101 102 /** 103 * 104 * 105 * Deprecated: Use JavaScriptCore API instead 106 * 107 * Returns: A #gchar 108 */ 109 public string getLabel() 110 { 111 auto retStr = webkit_dom_html_option_element_get_label(webKitDOMHTMLOptionElement); 112 113 scope(exit) Str.freeString(retStr); 114 return Str.toString(retStr); 115 } 116 117 /** 118 * 119 * 120 * Deprecated: Use JavaScriptCore API instead 121 * 122 * Returns: A #gboolean 123 */ 124 public bool getSelected() 125 { 126 return webkit_dom_html_option_element_get_selected(webKitDOMHTMLOptionElement) != 0; 127 } 128 129 /** 130 * 131 * 132 * Deprecated: Use JavaScriptCore API instead 133 * 134 * Returns: A #gchar 135 */ 136 public string getText() 137 { 138 auto retStr = webkit_dom_html_option_element_get_text(webKitDOMHTMLOptionElement); 139 140 scope(exit) Str.freeString(retStr); 141 return Str.toString(retStr); 142 } 143 144 /** 145 * 146 * 147 * Deprecated: Use JavaScriptCore API instead 148 * 149 * Returns: A #gchar 150 */ 151 public string getValue() 152 { 153 auto retStr = webkit_dom_html_option_element_get_value(webKitDOMHTMLOptionElement); 154 155 scope(exit) Str.freeString(retStr); 156 return Str.toString(retStr); 157 } 158 159 /** 160 * 161 * 162 * Deprecated: Use JavaScriptCore API instead 163 * 164 * Params: 165 * value = A #gboolean 166 */ 167 public void setDefaultSelected(bool value) 168 { 169 webkit_dom_html_option_element_set_default_selected(webKitDOMHTMLOptionElement, value); 170 } 171 172 /** 173 * 174 * 175 * Deprecated: Use JavaScriptCore API instead 176 * 177 * Params: 178 * value = A #gboolean 179 */ 180 public void setDisabled(bool value) 181 { 182 webkit_dom_html_option_element_set_disabled(webKitDOMHTMLOptionElement, value); 183 } 184 185 /** 186 * 187 * 188 * Deprecated: Use JavaScriptCore API instead 189 * 190 * Params: 191 * value = A #gchar 192 */ 193 public void setLabel(string value) 194 { 195 webkit_dom_html_option_element_set_label(webKitDOMHTMLOptionElement, Str.toStringz(value)); 196 } 197 198 /** 199 * 200 * 201 * Deprecated: Use JavaScriptCore API instead 202 * 203 * Params: 204 * value = A #gboolean 205 */ 206 public void setSelected(bool value) 207 { 208 webkit_dom_html_option_element_set_selected(webKitDOMHTMLOptionElement, value); 209 } 210 211 /** 212 * 213 * 214 * Deprecated: Use JavaScriptCore API instead 215 * 216 * Params: 217 * value = A #gchar 218 */ 219 public void setValue(string value) 220 { 221 webkit_dom_html_option_element_set_value(webKitDOMHTMLOptionElement, Str.toStringz(value)); 222 } 223 }