use crate::DOMElement;
use crate::DOMEventTarget;
use crate::DOMFileList;
use crate::DOMHTMLElement;
use crate::DOMHTMLFormElement;
use crate::DOMNode;
use crate::DOMObject;
use glib::object::Cast;
use glib::object::IsA;
use glib::signal::connect_raw;
use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::StaticType;
use glib::ToValue;
use std::boxed::Box as Box_;
use std::fmt;
use std::mem::transmute;
use std::ptr;
glib::wrapper! {
#[doc(alias = "WebKitDOMHTMLInputElement")]
pub struct DOMHTMLInputElement(Object<ffi::WebKitDOMHTMLInputElement, ffi::WebKitDOMHTMLInputElementClass>) @extends DOMHTMLElement, DOMElement, DOMNode, DOMObject, @implements DOMEventTarget;
match fn {
type_ => || ffi::webkit_dom_html_input_element_get_type(),
}
}
impl DOMHTMLInputElement {
pub const NONE: Option<&'static DOMHTMLInputElement> = None;
}
pub trait DOMHTMLInputElementExt: 'static {
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_accept")]
#[doc(alias = "get_accept")]
fn accept(&self) -> Option<glib::GString>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_align")]
#[doc(alias = "get_align")]
fn align(&self) -> Option<glib::GString>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_alt")]
#[doc(alias = "get_alt")]
fn alt(&self) -> Option<glib::GString>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[doc(alias = "webkit_dom_html_input_element_get_auto_filled")]
#[doc(alias = "get_auto_filled")]
fn is_auto_filled(&self) -> bool;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_autofocus")]
#[doc(alias = "get_autofocus")]
fn is_autofocus(&self) -> bool;
#[cfg_attr(feature = "v2_14", deprecated = "Since 2.14")]
#[doc(alias = "webkit_dom_html_input_element_get_capture")]
#[doc(alias = "get_capture")]
fn is_capture(&self) -> bool;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[cfg(any(feature = "v2_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_14")))]
#[doc(alias = "webkit_dom_html_input_element_get_capture_type")]
#[doc(alias = "get_capture_type")]
fn capture_type(&self) -> Option<glib::GString>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_checked")]
#[doc(alias = "get_checked")]
fn is_checked(&self) -> bool;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_default_checked")]
#[doc(alias = "get_default_checked")]
fn is_default_checked(&self) -> bool;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_default_value")]
#[doc(alias = "get_default_value")]
fn default_value(&self) -> Option<glib::GString>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_disabled")]
#[doc(alias = "get_disabled")]
fn is_disabled(&self) -> bool;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_files")]
#[doc(alias = "get_files")]
fn files(&self) -> Option<DOMFileList>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_form")]
#[doc(alias = "get_form")]
fn form(&self) -> Option<DOMHTMLFormElement>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_height")]
#[doc(alias = "get_height")]
fn height(&self) -> libc::c_ulong;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_indeterminate")]
#[doc(alias = "get_indeterminate")]
fn is_indeterminate(&self) -> bool;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_input_type")]
#[doc(alias = "get_input_type")]
fn input_type(&self) -> Option<glib::GString>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_max_length")]
#[doc(alias = "get_max_length")]
fn max_length(&self) -> libc::c_long;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_multiple")]
#[doc(alias = "get_multiple")]
fn is_multiple(&self) -> bool;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_name")]
#[doc(alias = "get_name")]
fn name(&self) -> Option<glib::GString>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[doc(alias = "webkit_dom_html_input_element_get_read_only")]
#[doc(alias = "get_read_only")]
fn is_read_only(&self) -> bool;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_size")]
#[doc(alias = "get_size")]
fn size(&self) -> libc::c_ulong;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_src")]
#[doc(alias = "get_src")]
fn src(&self) -> Option<glib::GString>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_use_map")]
#[doc(alias = "get_use_map")]
fn use_map(&self) -> Option<glib::GString>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_value")]
#[doc(alias = "get_value")]
fn value(&self) -> Option<glib::GString>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_width")]
#[doc(alias = "get_width")]
fn width(&self) -> libc::c_ulong;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_get_will_validate")]
#[doc(alias = "get_will_validate")]
fn is_will_validate(&self) -> bool;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_is_edited")]
fn is_edited(&self) -> bool;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_select")]
fn select(&self);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_accept")]
fn set_accept(&self, value: &str);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_align")]
fn set_align(&self, value: &str);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_alt")]
fn set_alt(&self, value: &str);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[doc(alias = "webkit_dom_html_input_element_set_auto_filled")]
fn set_auto_filled(&self, value: bool);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_autofocus")]
fn set_autofocus(&self, value: bool);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[doc(alias = "webkit_dom_html_input_element_set_capture_type")]
fn set_capture_type(&self, value: &str);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_checked")]
fn set_checked(&self, value: bool);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[doc(alias = "webkit_dom_html_input_element_set_default_checked")]
fn set_default_checked(&self, value: bool);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_default_value")]
fn set_default_value(&self, value: &str);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_disabled")]
fn set_disabled(&self, value: bool);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
#[doc(alias = "webkit_dom_html_input_element_set_editing_value")]
fn set_editing_value(&self, value: &str);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_files")]
fn set_files(&self, value: &impl IsA<DOMFileList>);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_height")]
fn set_height(&self, value: libc::c_ulong);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_indeterminate")]
fn set_indeterminate(&self, value: bool);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_input_type")]
fn set_input_type(&self, value: &str);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_max_length")]
fn set_max_length(&self, value: libc::c_long) -> Result<(), glib::Error>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_multiple")]
fn set_multiple(&self, value: bool);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_name")]
fn set_name(&self, value: &str);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_read_only")]
fn set_read_only(&self, value: bool);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_size")]
fn set_size(&self, value: libc::c_ulong) -> Result<(), glib::Error>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_src")]
fn set_src(&self, value: &str);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_use_map")]
fn set_use_map(&self, value: &str);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_value")]
fn set_value(&self, value: &str);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_input_element_set_width")]
fn set_width(&self, value: libc::c_ulong);
fn set_capture(&self, capture: Option<&str>);
#[doc(alias = "default-checked")]
fn set_property_default_checked(&self, default_checked: bool);
#[doc(alias = "read-only")]
fn get_property_read_only(&self) -> bool;
#[doc(alias = "type")]
fn type_(&self) -> Option<glib::GString>;
#[doc(alias = "type")]
fn set_type(&self, type_: Option<&str>);
#[doc(alias = "accept")]
fn connect_accept_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "align")]
fn connect_align_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "alt")]
fn connect_alt_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "autofocus")]
fn connect_autofocus_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "capture")]
fn connect_capture_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "checked")]
fn connect_checked_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "default-checked")]
fn connect_default_checked_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "default-value")]
fn connect_default_value_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "disabled")]
fn connect_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "files")]
fn connect_files_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "form")]
fn connect_form_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "height")]
fn connect_height_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "indeterminate")]
fn connect_indeterminate_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "max-length")]
fn connect_max_length_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "multiple")]
fn connect_multiple_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "name")]
fn connect_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "read-only")]
fn connect_read_only_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "size")]
fn connect_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "src")]
fn connect_src_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "type")]
fn connect_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "use-map")]
fn connect_use_map_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "value")]
fn connect_value_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "width")]
fn connect_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "will-validate")]
fn connect_will_validate_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
}
impl<O: IsA<DOMHTMLInputElement>> DOMHTMLInputElementExt for O {
fn accept(&self) -> Option<glib::GString> {
unsafe {
from_glib_full(ffi::webkit_dom_html_input_element_get_accept(self.as_ref().to_glib_none().0))
}
}
fn align(&self) -> Option<glib::GString> {
unsafe {
from_glib_full(ffi::webkit_dom_html_input_element_get_align(self.as_ref().to_glib_none().0))
}
}
fn alt(&self) -> Option<glib::GString> {
unsafe {
from_glib_full(ffi::webkit_dom_html_input_element_get_alt(self.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
fn is_auto_filled(&self) -> bool {
unsafe {
from_glib(ffi::webkit_dom_html_input_element_get_auto_filled(self.as_ref().to_glib_none().0))
}
}
fn is_autofocus(&self) -> bool {
unsafe {
from_glib(ffi::webkit_dom_html_input_element_get_autofocus(self.as_ref().to_glib_none().0))
}
}
fn is_capture(&self) -> bool {
unsafe {
from_glib(ffi::webkit_dom_html_input_element_get_capture(self.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v2_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_14")))]
fn capture_type(&self) -> Option<glib::GString> {
unsafe {
from_glib_full(ffi::webkit_dom_html_input_element_get_capture_type(self.as_ref().to_glib_none().0))
}
}
fn is_checked(&self) -> bool {
unsafe {
from_glib(ffi::webkit_dom_html_input_element_get_checked(self.as_ref().to_glib_none().0))
}
}
fn is_default_checked(&self) -> bool {
unsafe {
from_glib(ffi::webkit_dom_html_input_element_get_default_checked(self.as_ref().to_glib_none().0))
}
}
fn default_value(&self) -> Option<glib::GString> {
unsafe {
from_glib_full(ffi::webkit_dom_html_input_element_get_default_value(self.as_ref().to_glib_none().0))
}
}
fn is_disabled(&self) -> bool {
unsafe {
from_glib(ffi::webkit_dom_html_input_element_get_disabled(self.as_ref().to_glib_none().0))
}
}
fn files(&self) -> Option<DOMFileList> {
unsafe {
from_glib_full(ffi::webkit_dom_html_input_element_get_files(self.as_ref().to_glib_none().0))
}
}
fn form(&self) -> Option<DOMHTMLFormElement> {
unsafe {
from_glib_none(ffi::webkit_dom_html_input_element_get_form(self.as_ref().to_glib_none().0))
}
}
fn height(&self) -> libc::c_ulong {
unsafe {
ffi::webkit_dom_html_input_element_get_height(self.as_ref().to_glib_none().0)
}
}
fn is_indeterminate(&self) -> bool {
unsafe {
from_glib(ffi::webkit_dom_html_input_element_get_indeterminate(self.as_ref().to_glib_none().0))
}
}
fn input_type(&self) -> Option<glib::GString> {
unsafe {
from_glib_full(ffi::webkit_dom_html_input_element_get_input_type(self.as_ref().to_glib_none().0))
}
}
fn max_length(&self) -> libc::c_long {
unsafe {
ffi::webkit_dom_html_input_element_get_max_length(self.as_ref().to_glib_none().0)
}
}
fn is_multiple(&self) -> bool {
unsafe {
from_glib(ffi::webkit_dom_html_input_element_get_multiple(self.as_ref().to_glib_none().0))
}
}
fn name(&self) -> Option<glib::GString> {
unsafe {
from_glib_full(ffi::webkit_dom_html_input_element_get_name(self.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
fn is_read_only(&self) -> bool {
unsafe {
from_glib(ffi::webkit_dom_html_input_element_get_read_only(self.as_ref().to_glib_none().0))
}
}
fn size(&self) -> libc::c_ulong {
unsafe {
ffi::webkit_dom_html_input_element_get_size(self.as_ref().to_glib_none().0)
}
}
fn src(&self) -> Option<glib::GString> {
unsafe {
from_glib_full(ffi::webkit_dom_html_input_element_get_src(self.as_ref().to_glib_none().0))
}
}
fn use_map(&self) -> Option<glib::GString> {
unsafe {
from_glib_full(ffi::webkit_dom_html_input_element_get_use_map(self.as_ref().to_glib_none().0))
}
}
fn value(&self) -> Option<glib::GString> {
unsafe {
from_glib_full(ffi::webkit_dom_html_input_element_get_value(self.as_ref().to_glib_none().0))
}
}
fn width(&self) -> libc::c_ulong {
unsafe {
ffi::webkit_dom_html_input_element_get_width(self.as_ref().to_glib_none().0)
}
}
fn is_will_validate(&self) -> bool {
unsafe {
from_glib(ffi::webkit_dom_html_input_element_get_will_validate(self.as_ref().to_glib_none().0))
}
}
fn is_edited(&self) -> bool {
unsafe {
from_glib(ffi::webkit_dom_html_input_element_is_edited(self.as_ref().to_glib_none().0))
}
}
fn select(&self) {
unsafe {
ffi::webkit_dom_html_input_element_select(self.as_ref().to_glib_none().0);
}
}
fn set_accept(&self, value: &str) {
unsafe {
ffi::webkit_dom_html_input_element_set_accept(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn set_align(&self, value: &str) {
unsafe {
ffi::webkit_dom_html_input_element_set_align(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn set_alt(&self, value: &str) {
unsafe {
ffi::webkit_dom_html_input_element_set_alt(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
fn set_auto_filled(&self, value: bool) {
unsafe {
ffi::webkit_dom_html_input_element_set_auto_filled(self.as_ref().to_glib_none().0, value.into_glib());
}
}
fn set_autofocus(&self, value: bool) {
unsafe {
ffi::webkit_dom_html_input_element_set_autofocus(self.as_ref().to_glib_none().0, value.into_glib());
}
}
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
fn set_capture_type(&self, value: &str) {
unsafe {
ffi::webkit_dom_html_input_element_set_capture_type(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn set_checked(&self, value: bool) {
unsafe {
ffi::webkit_dom_html_input_element_set_checked(self.as_ref().to_glib_none().0, value.into_glib());
}
}
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
fn set_default_checked(&self, value: bool) {
unsafe {
ffi::webkit_dom_html_input_element_set_default_checked(self.as_ref().to_glib_none().0, value.into_glib());
}
}
fn set_default_value(&self, value: &str) {
unsafe {
ffi::webkit_dom_html_input_element_set_default_value(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn set_disabled(&self, value: bool) {
unsafe {
ffi::webkit_dom_html_input_element_set_disabled(self.as_ref().to_glib_none().0, value.into_glib());
}
}
#[cfg(any(feature = "v2_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_16")))]
fn set_editing_value(&self, value: &str) {
unsafe {
ffi::webkit_dom_html_input_element_set_editing_value(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn set_files(&self, value: &impl IsA<DOMFileList>) {
unsafe {
ffi::webkit_dom_html_input_element_set_files(self.as_ref().to_glib_none().0, value.as_ref().to_glib_none().0);
}
}
fn set_height(&self, value: libc::c_ulong) {
unsafe {
ffi::webkit_dom_html_input_element_set_height(self.as_ref().to_glib_none().0, value);
}
}
fn set_indeterminate(&self, value: bool) {
unsafe {
ffi::webkit_dom_html_input_element_set_indeterminate(self.as_ref().to_glib_none().0, value.into_glib());
}
}
fn set_input_type(&self, value: &str) {
unsafe {
ffi::webkit_dom_html_input_element_set_input_type(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn set_max_length(&self, value: libc::c_long) -> Result<(), glib::Error> {
unsafe {
let mut error = ptr::null_mut();
let _ = ffi::webkit_dom_html_input_element_set_max_length(self.as_ref().to_glib_none().0, value, &mut error);
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
fn set_multiple(&self, value: bool) {
unsafe {
ffi::webkit_dom_html_input_element_set_multiple(self.as_ref().to_glib_none().0, value.into_glib());
}
}
fn set_name(&self, value: &str) {
unsafe {
ffi::webkit_dom_html_input_element_set_name(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn set_read_only(&self, value: bool) {
unsafe {
ffi::webkit_dom_html_input_element_set_read_only(self.as_ref().to_glib_none().0, value.into_glib());
}
}
fn set_size(&self, value: libc::c_ulong) -> Result<(), glib::Error> {
unsafe {
let mut error = ptr::null_mut();
let _ = ffi::webkit_dom_html_input_element_set_size(self.as_ref().to_glib_none().0, value, &mut error);
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
fn set_src(&self, value: &str) {
unsafe {
ffi::webkit_dom_html_input_element_set_src(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn set_use_map(&self, value: &str) {
unsafe {
ffi::webkit_dom_html_input_element_set_use_map(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn set_value(&self, value: &str) {
unsafe {
ffi::webkit_dom_html_input_element_set_value(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn set_width(&self, value: libc::c_ulong) {
unsafe {
ffi::webkit_dom_html_input_element_set_width(self.as_ref().to_glib_none().0, value);
}
}
fn set_capture(&self, capture: Option<&str>) {
glib::ObjectExt::set_property(self.as_ref(),"capture", &capture)
}
fn set_property_default_checked(&self, default_checked: bool) {
glib::ObjectExt::set_property(self.as_ref(),"default-checked", &default_checked)
}
fn get_property_read_only(&self) -> bool {
glib::ObjectExt::property(self.as_ref(), "read-only")
}
fn type_(&self) -> Option<glib::GString> {
glib::ObjectExt::property(self.as_ref(), "type")
}
fn set_type(&self, type_: Option<&str>) {
glib::ObjectExt::set_property(self.as_ref(),"type", &type_)
}
fn connect_accept_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_accept_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::accept\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_accept_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_align_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_align_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::align\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_align_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_alt_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_alt_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::alt\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_alt_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_autofocus_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_autofocus_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::autofocus\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_autofocus_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_capture_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_capture_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::capture\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_capture_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_checked_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_checked_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::checked\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_checked_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_default_checked_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_default_checked_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::default-checked\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_default_checked_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_default_value_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_default_value_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::default-value\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_default_value_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_disabled_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::disabled\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_disabled_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_files_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_files_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::files\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_files_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_form_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_form_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::form\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_form_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_height_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_height_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::height\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_height_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_indeterminate_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_indeterminate_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::indeterminate\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_indeterminate_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_max_length_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_max_length_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::max-length\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_max_length_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_multiple_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_multiple_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::multiple\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_multiple_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_name_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::name\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_name_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_read_only_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_read_only_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::read-only\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_read_only_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_size_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::size\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_size_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_src_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_src_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::src\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_src_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_type_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::type\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_type_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_use_map_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_use_map_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::use-map\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_use_map_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_value_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_value_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::value\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_value_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_width_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::width\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_width_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_will_validate_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_will_validate_trampoline<P: IsA<DOMHTMLInputElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLInputElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLInputElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::will-validate\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_will_validate_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
}
impl fmt::Display for DOMHTMLInputElement {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str("DOMHTMLInputElement")
}
}