1 module webkit2webextension.DOMHTMLInputElement;
2 
3 private import glib.ErrorG;
4 private import glib.GException;
5 private import glib.Str;
6 private import gobject.ObjectG;
7 private import webkit2webextension.DOMFileList;
8 private import webkit2webextension.DOMHTMLElement;
9 private import webkit2webextension.DOMHTMLFormElement;
10 private import webkit2webextension.c.functions;
11 public  import webkit2webextension.c.types;
12 
13 
14 /** */
15 public class DOMHTMLInputElement : DOMHTMLElement
16 {
17 	/** the main Gtk struct */
18 	protected WebKitDOMHTMLInputElement* webKitDOMHTMLInputElement;
19 
20 	/** Get the main Gtk struct */
21 	public WebKitDOMHTMLInputElement* getDOMHTMLInputElementStruct(bool transferOwnership = false)
22 	{
23 		if (transferOwnership)
24 			ownedRef = false;
25 		return webKitDOMHTMLInputElement;
26 	}
27 
28 	/** the main Gtk struct as a void* */
29 	protected override void* getStruct()
30 	{
31 		return cast(void*)webKitDOMHTMLInputElement;
32 	}
33 
34 	/**
35 	 * Sets our main struct and passes it to the parent class.
36 	 */
37 	public this (WebKitDOMHTMLInputElement* webKitDOMHTMLInputElement, bool ownedRef = false)
38 	{
39 		this.webKitDOMHTMLInputElement = webKitDOMHTMLInputElement;
40 		super(cast(WebKitDOMHTMLElement*)webKitDOMHTMLInputElement, ownedRef);
41 	}
42 
43 
44 	/** */
45 	public static GType getType()
46 	{
47 		return webkit_dom_html_input_element_get_type();
48 	}
49 
50 	/**
51 	 *
52 	 *
53 	 * Deprecated: Use JavaScriptCore API instead
54 	 *
55 	 * Returns: A #gchar
56 	 */
57 	public string getAccept()
58 	{
59 		auto retStr = webkit_dom_html_input_element_get_accept(webKitDOMHTMLInputElement);
60 
61 		scope(exit) Str.freeString(retStr);
62 		return Str.toString(retStr);
63 	}
64 
65 	/**
66 	 *
67 	 *
68 	 * Deprecated: Use JavaScriptCore API instead
69 	 *
70 	 * Returns: A #gchar
71 	 */
72 	public string getAlign()
73 	{
74 		auto retStr = webkit_dom_html_input_element_get_align(webKitDOMHTMLInputElement);
75 
76 		scope(exit) Str.freeString(retStr);
77 		return Str.toString(retStr);
78 	}
79 
80 	/**
81 	 *
82 	 *
83 	 * Deprecated: Use JavaScriptCore API instead
84 	 *
85 	 * Returns: A #gchar
86 	 */
87 	public string getAlt()
88 	{
89 		auto retStr = webkit_dom_html_input_element_get_alt(webKitDOMHTMLInputElement);
90 
91 		scope(exit) Str.freeString(retStr);
92 		return Str.toString(retStr);
93 	}
94 
95 	/**
96 	 *
97 	 *
98 	 * Deprecated: Use webkit_dom_element_html_input_element_get_auto_filled() instead.
99 	 *
100 	 * Returns: A #gboolean
101 	 *
102 	 * Since: 2.16
103 	 */
104 	public bool getAutoFilled()
105 	{
106 		return webkit_dom_html_input_element_get_auto_filled(webKitDOMHTMLInputElement) != 0;
107 	}
108 
109 	/**
110 	 *
111 	 *
112 	 * Deprecated: Use JavaScriptCore API instead
113 	 *
114 	 * Returns: A #gboolean
115 	 */
116 	public bool getAutofocus()
117 	{
118 		return webkit_dom_html_input_element_get_autofocus(webKitDOMHTMLInputElement) != 0;
119 	}
120 
121 	/**
122 	 *
123 	 *
124 	 * Deprecated: Use webkit_dom_html_input_element_get_capture_type() instead.
125 	 *
126 	 * Returns: A #gboolean
127 	 */
128 	public bool getCapture()
129 	{
130 		return webkit_dom_html_input_element_get_capture(webKitDOMHTMLInputElement) != 0;
131 	}
132 
133 	/**
134 	 *
135 	 *
136 	 * Deprecated: Use JavaScriptCore API instead
137 	 *
138 	 * Returns: A #gchar
139 	 *
140 	 * Since: 2.14
141 	 */
142 	public string getCaptureType()
143 	{
144 		auto retStr = webkit_dom_html_input_element_get_capture_type(webKitDOMHTMLInputElement);
145 
146 		scope(exit) Str.freeString(retStr);
147 		return Str.toString(retStr);
148 	}
149 
150 	/**
151 	 *
152 	 *
153 	 * Deprecated: Use JavaScriptCore API instead
154 	 *
155 	 * Returns: A #gboolean
156 	 */
157 	public bool getChecked()
158 	{
159 		return webkit_dom_html_input_element_get_checked(webKitDOMHTMLInputElement) != 0;
160 	}
161 
162 	/**
163 	 *
164 	 *
165 	 * Deprecated: Use JavaScriptCore API instead
166 	 *
167 	 * Returns: A #gboolean
168 	 */
169 	public bool getDefaultChecked()
170 	{
171 		return webkit_dom_html_input_element_get_default_checked(webKitDOMHTMLInputElement) != 0;
172 	}
173 
174 	/**
175 	 *
176 	 *
177 	 * Deprecated: Use JavaScriptCore API instead
178 	 *
179 	 * Returns: A #gchar
180 	 */
181 	public string getDefaultValue()
182 	{
183 		auto retStr = webkit_dom_html_input_element_get_default_value(webKitDOMHTMLInputElement);
184 
185 		scope(exit) Str.freeString(retStr);
186 		return Str.toString(retStr);
187 	}
188 
189 	/**
190 	 *
191 	 *
192 	 * Deprecated: Use JavaScriptCore API instead
193 	 *
194 	 * Returns: A #gboolean
195 	 */
196 	public bool getDisabled()
197 	{
198 		return webkit_dom_html_input_element_get_disabled(webKitDOMHTMLInputElement) != 0;
199 	}
200 
201 	/**
202 	 *
203 	 *
204 	 * Deprecated: Use JavaScriptCore API instead
205 	 *
206 	 * Returns: A #WebKitDOMFileList
207 	 */
208 	public DOMFileList getFiles()
209 	{
210 		auto __p = webkit_dom_html_input_element_get_files(webKitDOMHTMLInputElement);
211 
212 		if(__p is null)
213 		{
214 			return null;
215 		}
216 
217 		return ObjectG.getDObject!(DOMFileList)(cast(WebKitDOMFileList*) __p, true);
218 	}
219 
220 	/**
221 	 *
222 	 *
223 	 * Deprecated: Use JavaScriptCore API instead
224 	 *
225 	 * Returns: A #WebKitDOMHTMLFormElement
226 	 */
227 	public DOMHTMLFormElement getForm()
228 	{
229 		auto __p = webkit_dom_html_input_element_get_form(webKitDOMHTMLInputElement);
230 
231 		if(__p is null)
232 		{
233 			return null;
234 		}
235 
236 		return ObjectG.getDObject!(DOMHTMLFormElement)(cast(WebKitDOMHTMLFormElement*) __p);
237 	}
238 
239 	/**
240 	 *
241 	 *
242 	 * Deprecated: Use JavaScriptCore API instead
243 	 *
244 	 * Returns: A #gulong
245 	 */
246 	public gulong getHeight()
247 	{
248 		return webkit_dom_html_input_element_get_height(webKitDOMHTMLInputElement);
249 	}
250 
251 	/**
252 	 *
253 	 *
254 	 * Deprecated: Use JavaScriptCore API instead
255 	 *
256 	 * Returns: A #gboolean
257 	 */
258 	public bool getIndeterminate()
259 	{
260 		return webkit_dom_html_input_element_get_indeterminate(webKitDOMHTMLInputElement) != 0;
261 	}
262 
263 	/**
264 	 *
265 	 *
266 	 * Deprecated: Use JavaScriptCore API instead
267 	 *
268 	 * Returns: A #gchar
269 	 */
270 	public string getInputType()
271 	{
272 		auto retStr = webkit_dom_html_input_element_get_input_type(webKitDOMHTMLInputElement);
273 
274 		scope(exit) Str.freeString(retStr);
275 		return Str.toString(retStr);
276 	}
277 
278 	/**
279 	 *
280 	 *
281 	 * Deprecated: Use JavaScriptCore API instead
282 	 *
283 	 * Returns: A #glong
284 	 */
285 	public glong getMaxLength()
286 	{
287 		return webkit_dom_html_input_element_get_max_length(webKitDOMHTMLInputElement);
288 	}
289 
290 	/**
291 	 *
292 	 *
293 	 * Deprecated: Use JavaScriptCore API instead
294 	 *
295 	 * Returns: A #gboolean
296 	 */
297 	public bool getMultiple()
298 	{
299 		return webkit_dom_html_input_element_get_multiple(webKitDOMHTMLInputElement) != 0;
300 	}
301 
302 	/**
303 	 *
304 	 *
305 	 * Deprecated: Use JavaScriptCore API instead
306 	 *
307 	 * Returns: A #gchar
308 	 */
309 	public string getName()
310 	{
311 		auto retStr = webkit_dom_html_input_element_get_name(webKitDOMHTMLInputElement);
312 
313 		scope(exit) Str.freeString(retStr);
314 		return Str.toString(retStr);
315 	}
316 
317 	/**
318 	 *
319 	 *
320 	 * Deprecated: Use JavaScriptCore API instead
321 	 *
322 	 * Returns: A #gboolean
323 	 *
324 	 * Since: 2.16
325 	 */
326 	public bool getReadOnly()
327 	{
328 		return webkit_dom_html_input_element_get_read_only(webKitDOMHTMLInputElement) != 0;
329 	}
330 
331 	/**
332 	 *
333 	 *
334 	 * Deprecated: Use JavaScriptCore API instead
335 	 *
336 	 * Returns: A #gulong
337 	 */
338 	public gulong getSize()
339 	{
340 		return webkit_dom_html_input_element_get_size(webKitDOMHTMLInputElement);
341 	}
342 
343 	/**
344 	 *
345 	 *
346 	 * Deprecated: Use JavaScriptCore API instead
347 	 *
348 	 * Returns: A #gchar
349 	 */
350 	public string getSrc()
351 	{
352 		auto retStr = webkit_dom_html_input_element_get_src(webKitDOMHTMLInputElement);
353 
354 		scope(exit) Str.freeString(retStr);
355 		return Str.toString(retStr);
356 	}
357 
358 	/**
359 	 *
360 	 *
361 	 * Deprecated: Use JavaScriptCore API instead
362 	 *
363 	 * Returns: A #gchar
364 	 */
365 	public string getUseMap()
366 	{
367 		auto retStr = webkit_dom_html_input_element_get_use_map(webKitDOMHTMLInputElement);
368 
369 		scope(exit) Str.freeString(retStr);
370 		return Str.toString(retStr);
371 	}
372 
373 	/**
374 	 *
375 	 *
376 	 * Deprecated: Use JavaScriptCore API instead
377 	 *
378 	 * Returns: A #gchar
379 	 */
380 	public string getValue()
381 	{
382 		auto retStr = webkit_dom_html_input_element_get_value(webKitDOMHTMLInputElement);
383 
384 		scope(exit) Str.freeString(retStr);
385 		return Str.toString(retStr);
386 	}
387 
388 	/**
389 	 *
390 	 *
391 	 * Deprecated: Use JavaScriptCore API instead
392 	 *
393 	 * Returns: A #gulong
394 	 */
395 	public gulong getWidth()
396 	{
397 		return webkit_dom_html_input_element_get_width(webKitDOMHTMLInputElement);
398 	}
399 
400 	/**
401 	 *
402 	 *
403 	 * Deprecated: Use JavaScriptCore API instead
404 	 *
405 	 * Returns: A #gboolean
406 	 */
407 	public bool getWillValidate()
408 	{
409 		return webkit_dom_html_input_element_get_will_validate(webKitDOMHTMLInputElement) != 0;
410 	}
411 
412 	/**
413 	 *
414 	 *
415 	 * Deprecated: Use webkit_dom_element_html_input_element_is_user_edited() instead.
416 	 *
417 	 * Returns: A #gboolean
418 	 */
419 	public bool isEdited()
420 	{
421 		return webkit_dom_html_input_element_is_edited(webKitDOMHTMLInputElement) != 0;
422 	}
423 
424 	/**
425 	 *
426 	 *
427 	 * Deprecated: Use JavaScriptCore API instead
428 	 */
429 	public void select()
430 	{
431 		webkit_dom_html_input_element_select(webKitDOMHTMLInputElement);
432 	}
433 
434 	/**
435 	 *
436 	 *
437 	 * Deprecated: Use JavaScriptCore API instead
438 	 *
439 	 * Params:
440 	 *     value = A #gchar
441 	 */
442 	public void setAccept(string value)
443 	{
444 		webkit_dom_html_input_element_set_accept(webKitDOMHTMLInputElement, Str.toStringz(value));
445 	}
446 
447 	/**
448 	 *
449 	 *
450 	 * Deprecated: Use JavaScriptCore API instead
451 	 *
452 	 * Params:
453 	 *     value = A #gchar
454 	 */
455 	public void setAlign(string value)
456 	{
457 		webkit_dom_html_input_element_set_align(webKitDOMHTMLInputElement, Str.toStringz(value));
458 	}
459 
460 	/**
461 	 *
462 	 *
463 	 * Deprecated: Use JavaScriptCore API instead
464 	 *
465 	 * Params:
466 	 *     value = A #gchar
467 	 */
468 	public void setAlt(string value)
469 	{
470 		webkit_dom_html_input_element_set_alt(webKitDOMHTMLInputElement, Str.toStringz(value));
471 	}
472 
473 	/**
474 	 *
475 	 *
476 	 * Deprecated: Use webkit_dom_element_html_input_element_set_auto_filled() instead.
477 	 *
478 	 * Params:
479 	 *     value = A #gboolean
480 	 *
481 	 * Since: 2.16
482 	 */
483 	public void setAutoFilled(bool value)
484 	{
485 		webkit_dom_html_input_element_set_auto_filled(webKitDOMHTMLInputElement, value);
486 	}
487 
488 	/**
489 	 *
490 	 *
491 	 * Deprecated: Use JavaScriptCore API instead
492 	 *
493 	 * Params:
494 	 *     value = A #gboolean
495 	 */
496 	public void setAutofocus(bool value)
497 	{
498 		webkit_dom_html_input_element_set_autofocus(webKitDOMHTMLInputElement, value);
499 	}
500 
501 	/**
502 	 *
503 	 *
504 	 * Deprecated: Use JavaScriptCore API instead
505 	 *
506 	 * Params:
507 	 *     value = A #gchar
508 	 *
509 	 * Since: 2.16
510 	 */
511 	public void setCaptureType(string value)
512 	{
513 		webkit_dom_html_input_element_set_capture_type(webKitDOMHTMLInputElement, Str.toStringz(value));
514 	}
515 
516 	/**
517 	 *
518 	 *
519 	 * Deprecated: Use JavaScriptCore API instead
520 	 *
521 	 * Params:
522 	 *     value = A #gboolean
523 	 */
524 	public void setChecked(bool value)
525 	{
526 		webkit_dom_html_input_element_set_checked(webKitDOMHTMLInputElement, value);
527 	}
528 
529 	/**
530 	 *
531 	 *
532 	 * Deprecated: Use JavaScriptCore API instead
533 	 *
534 	 * Params:
535 	 *     value = A #gboolean
536 	 *
537 	 * Since: 2.16
538 	 */
539 	public void setDefaultChecked(bool value)
540 	{
541 		webkit_dom_html_input_element_set_default_checked(webKitDOMHTMLInputElement, value);
542 	}
543 
544 	/**
545 	 *
546 	 *
547 	 * Deprecated: Use JavaScriptCore API instead
548 	 *
549 	 * Params:
550 	 *     value = A #gchar
551 	 */
552 	public void setDefaultValue(string value)
553 	{
554 		webkit_dom_html_input_element_set_default_value(webKitDOMHTMLInputElement, Str.toStringz(value));
555 	}
556 
557 	/**
558 	 *
559 	 *
560 	 * Deprecated: Use JavaScriptCore API instead
561 	 *
562 	 * Params:
563 	 *     value = A #gboolean
564 	 */
565 	public void setDisabled(bool value)
566 	{
567 		webkit_dom_html_input_element_set_disabled(webKitDOMHTMLInputElement, value);
568 	}
569 
570 	/**
571 	 *
572 	 *
573 	 * Deprecated: Use webkit_dom_element_html_input_element_set_editing_value() instead.
574 	 *
575 	 * Params:
576 	 *     value = A #gchar
577 	 *
578 	 * Since: 2.16
579 	 */
580 	public void setEditingValue(string value)
581 	{
582 		webkit_dom_html_input_element_set_editing_value(webKitDOMHTMLInputElement, Str.toStringz(value));
583 	}
584 
585 	/**
586 	 *
587 	 *
588 	 * Deprecated: Use JavaScriptCore API instead
589 	 *
590 	 * Params:
591 	 *     value = A #WebKitDOMFileList
592 	 */
593 	public void setFiles(DOMFileList value)
594 	{
595 		webkit_dom_html_input_element_set_files(webKitDOMHTMLInputElement, (value is null) ? null : value.getDOMFileListStruct());
596 	}
597 
598 	/**
599 	 *
600 	 *
601 	 * Deprecated: Use JavaScriptCore API instead
602 	 *
603 	 * Params:
604 	 *     value = A #gulong
605 	 */
606 	public void setHeight(gulong value)
607 	{
608 		webkit_dom_html_input_element_set_height(webKitDOMHTMLInputElement, value);
609 	}
610 
611 	/**
612 	 *
613 	 *
614 	 * Deprecated: Use JavaScriptCore API instead
615 	 *
616 	 * Params:
617 	 *     value = A #gboolean
618 	 */
619 	public void setIndeterminate(bool value)
620 	{
621 		webkit_dom_html_input_element_set_indeterminate(webKitDOMHTMLInputElement, value);
622 	}
623 
624 	/**
625 	 *
626 	 *
627 	 * Deprecated: Use JavaScriptCore API instead
628 	 *
629 	 * Params:
630 	 *     value = A #gchar
631 	 */
632 	public void setInputType(string value)
633 	{
634 		webkit_dom_html_input_element_set_input_type(webKitDOMHTMLInputElement, Str.toStringz(value));
635 	}
636 
637 	/**
638 	 *
639 	 *
640 	 * Deprecated: Use JavaScriptCore API instead
641 	 *
642 	 * Params:
643 	 *     value = A #glong
644 	 *
645 	 * Throws: GException on failure.
646 	 */
647 	public void setMaxLength(glong value)
648 	{
649 		GError* err = null;
650 
651 		webkit_dom_html_input_element_set_max_length(webKitDOMHTMLInputElement, value, &err);
652 
653 		if (err !is null)
654 		{
655 			throw new GException( new ErrorG(err) );
656 		}
657 	}
658 
659 	/**
660 	 *
661 	 *
662 	 * Deprecated: Use JavaScriptCore API instead
663 	 *
664 	 * Params:
665 	 *     value = A #gboolean
666 	 */
667 	public void setMultiple(bool value)
668 	{
669 		webkit_dom_html_input_element_set_multiple(webKitDOMHTMLInputElement, value);
670 	}
671 
672 	/**
673 	 *
674 	 *
675 	 * Deprecated: Use JavaScriptCore API instead
676 	 *
677 	 * Params:
678 	 *     value = A #gchar
679 	 */
680 	public void setName(string value)
681 	{
682 		webkit_dom_html_input_element_set_name(webKitDOMHTMLInputElement, Str.toStringz(value));
683 	}
684 
685 	/**
686 	 *
687 	 *
688 	 * Deprecated: Use JavaScriptCore API instead
689 	 *
690 	 * Params:
691 	 *     value = A #gboolean
692 	 */
693 	public void setReadOnly(bool value)
694 	{
695 		webkit_dom_html_input_element_set_read_only(webKitDOMHTMLInputElement, value);
696 	}
697 
698 	/**
699 	 *
700 	 *
701 	 * Deprecated: Use JavaScriptCore API instead
702 	 *
703 	 * Params:
704 	 *     value = A #gulong
705 	 *
706 	 * Throws: GException on failure.
707 	 */
708 	public void setSize(gulong value)
709 	{
710 		GError* err = null;
711 
712 		webkit_dom_html_input_element_set_size(webKitDOMHTMLInputElement, value, &err);
713 
714 		if (err !is null)
715 		{
716 			throw new GException( new ErrorG(err) );
717 		}
718 	}
719 
720 	/**
721 	 *
722 	 *
723 	 * Deprecated: Use JavaScriptCore API instead
724 	 *
725 	 * Params:
726 	 *     value = A #gchar
727 	 */
728 	public void setSrc(string value)
729 	{
730 		webkit_dom_html_input_element_set_src(webKitDOMHTMLInputElement, Str.toStringz(value));
731 	}
732 
733 	/**
734 	 *
735 	 *
736 	 * Deprecated: Use JavaScriptCore API instead
737 	 *
738 	 * Params:
739 	 *     value = A #gchar
740 	 */
741 	public void setUseMap(string value)
742 	{
743 		webkit_dom_html_input_element_set_use_map(webKitDOMHTMLInputElement, Str.toStringz(value));
744 	}
745 
746 	/**
747 	 *
748 	 *
749 	 * Deprecated: Use JavaScriptCore API instead
750 	 *
751 	 * Params:
752 	 *     value = A #gchar
753 	 */
754 	public void setValue(string value)
755 	{
756 		webkit_dom_html_input_element_set_value(webKitDOMHTMLInputElement, Str.toStringz(value));
757 	}
758 
759 	/**
760 	 *
761 	 *
762 	 * Deprecated: Use JavaScriptCore API instead
763 	 *
764 	 * Params:
765 	 *     value = A #gulong
766 	 */
767 	public void setWidth(gulong value)
768 	{
769 		webkit_dom_html_input_element_set_width(webKitDOMHTMLInputElement, value);
770 	}
771 }