use crate::DOMElement;
use crate::DOMEventTarget;
use crate::DOMHTMLElement;
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 std::boxed::Box as Box_;
use std::fmt;
use std::mem::transmute;
glib::wrapper! {
#[doc(alias = "WebKitDOMHTMLTableColElement")]
pub struct DOMHTMLTableColElement(Object<ffi::WebKitDOMHTMLTableColElement, ffi::WebKitDOMHTMLTableColElementClass>) @extends DOMHTMLElement, DOMElement, DOMNode, DOMObject, @implements DOMEventTarget;
match fn {
type_ => || ffi::webkit_dom_html_table_col_element_get_type(),
}
}
impl DOMHTMLTableColElement {
pub const NONE: Option<&'static DOMHTMLTableColElement> = None;
}
pub trait DOMHTMLTableColElementExt: 'static {
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_table_col_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_table_col_element_get_ch")]
#[doc(alias = "get_ch")]
fn ch(&self) -> Option<glib::GString>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_table_col_element_get_ch_off")]
#[doc(alias = "get_ch_off")]
fn ch_off(&self) -> Option<glib::GString>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_table_col_element_get_span")]
#[doc(alias = "get_span")]
fn span(&self) -> libc::c_long;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_table_col_element_get_v_align")]
#[doc(alias = "get_v_align")]
fn v_align(&self) -> Option<glib::GString>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_table_col_element_get_width")]
#[doc(alias = "get_width")]
fn width(&self) -> Option<glib::GString>;
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_table_col_element_set_align")]
fn set_align(&self, value: &str);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_table_col_element_set_ch")]
fn set_ch(&self, value: &str);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_table_col_element_set_ch_off")]
fn set_ch_off(&self, value: &str);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_table_col_element_set_span")]
fn set_span(&self, value: libc::c_long);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_table_col_element_set_v_align")]
fn set_v_align(&self, value: &str);
#[cfg_attr(feature = "v2_22", deprecated = "Since 2.22")]
#[doc(alias = "webkit_dom_html_table_col_element_set_width")]
fn set_width(&self, value: &str);
#[doc(alias = "align")]
fn connect_align_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "ch")]
fn connect_ch_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "ch-off")]
fn connect_ch_off_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "span")]
fn connect_span_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "v-align")]
fn connect_v_align_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[doc(alias = "width")]
fn connect_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
}
impl<O: IsA<DOMHTMLTableColElement>> DOMHTMLTableColElementExt for O {
fn align(&self) -> Option<glib::GString> {
unsafe {
from_glib_full(ffi::webkit_dom_html_table_col_element_get_align(self.as_ref().to_glib_none().0))
}
}
fn ch(&self) -> Option<glib::GString> {
unsafe {
from_glib_full(ffi::webkit_dom_html_table_col_element_get_ch(self.as_ref().to_glib_none().0))
}
}
fn ch_off(&self) -> Option<glib::GString> {
unsafe {
from_glib_full(ffi::webkit_dom_html_table_col_element_get_ch_off(self.as_ref().to_glib_none().0))
}
}
fn span(&self) -> libc::c_long {
unsafe {
ffi::webkit_dom_html_table_col_element_get_span(self.as_ref().to_glib_none().0)
}
}
fn v_align(&self) -> Option<glib::GString> {
unsafe {
from_glib_full(ffi::webkit_dom_html_table_col_element_get_v_align(self.as_ref().to_glib_none().0))
}
}
fn width(&self) -> Option<glib::GString> {
unsafe {
from_glib_full(ffi::webkit_dom_html_table_col_element_get_width(self.as_ref().to_glib_none().0))
}
}
fn set_align(&self, value: &str) {
unsafe {
ffi::webkit_dom_html_table_col_element_set_align(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn set_ch(&self, value: &str) {
unsafe {
ffi::webkit_dom_html_table_col_element_set_ch(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn set_ch_off(&self, value: &str) {
unsafe {
ffi::webkit_dom_html_table_col_element_set_ch_off(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn set_span(&self, value: libc::c_long) {
unsafe {
ffi::webkit_dom_html_table_col_element_set_span(self.as_ref().to_glib_none().0, value);
}
}
fn set_v_align(&self, value: &str) {
unsafe {
ffi::webkit_dom_html_table_col_element_set_v_align(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn set_width(&self, value: &str) {
unsafe {
ffi::webkit_dom_html_table_col_element_set_width(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn connect_align_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_align_trampoline<P: IsA<DOMHTMLTableColElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLTableColElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLTableColElement::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_ch_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_ch_trampoline<P: IsA<DOMHTMLTableColElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLTableColElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLTableColElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::ch\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_ch_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_ch_off_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_ch_off_trampoline<P: IsA<DOMHTMLTableColElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLTableColElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLTableColElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::ch-off\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_ch_off_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_span_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_span_trampoline<P: IsA<DOMHTMLTableColElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLTableColElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLTableColElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::span\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_span_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
}
}
fn connect_v_align_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_v_align_trampoline<P: IsA<DOMHTMLTableColElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLTableColElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLTableColElement::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::v-align\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(notify_v_align_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<DOMHTMLTableColElement>, F: Fn(&P) + 'static>(this: *mut ffi::WebKitDOMHTMLTableColElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(DOMHTMLTableColElement::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))
}
}
}
impl fmt::Display for DOMHTMLTableColElement {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str("DOMHTMLTableColElement")
}
}