use glib::{bitflags::bitflags, prelude::*, translate::*};
#[cfg(feature = "v2_10")]
bitflags! {
#[cfg_attr(docsrs, doc(cfg(feature = "v2_10")))]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "WebKitEditorTypingAttributes")]
pub struct EditorTypingAttributes: u32 {
#[doc(alias = "WEBKIT_EDITOR_TYPING_ATTRIBUTE_NONE")]
const NONE = ffi::WEBKIT_EDITOR_TYPING_ATTRIBUTE_NONE as _;
#[doc(alias = "WEBKIT_EDITOR_TYPING_ATTRIBUTE_BOLD")]
const BOLD = ffi::WEBKIT_EDITOR_TYPING_ATTRIBUTE_BOLD as _;
#[doc(alias = "WEBKIT_EDITOR_TYPING_ATTRIBUTE_ITALIC")]
const ITALIC = ffi::WEBKIT_EDITOR_TYPING_ATTRIBUTE_ITALIC as _;
#[doc(alias = "WEBKIT_EDITOR_TYPING_ATTRIBUTE_UNDERLINE")]
const UNDERLINE = ffi::WEBKIT_EDITOR_TYPING_ATTRIBUTE_UNDERLINE as _;
#[doc(alias = "WEBKIT_EDITOR_TYPING_ATTRIBUTE_STRIKETHROUGH")]
const STRIKETHROUGH = ffi::WEBKIT_EDITOR_TYPING_ATTRIBUTE_STRIKETHROUGH as _;
}
}
#[cfg(feature = "v2_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_10")))]
#[doc(hidden)]
impl IntoGlib for EditorTypingAttributes {
type GlibType = ffi::WebKitEditorTypingAttributes;
#[inline]
fn into_glib(self) -> ffi::WebKitEditorTypingAttributes {
self.bits()
}
}
#[cfg(feature = "v2_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_10")))]
#[doc(hidden)]
impl FromGlib<ffi::WebKitEditorTypingAttributes> for EditorTypingAttributes {
#[inline]
unsafe fn from_glib(value: ffi::WebKitEditorTypingAttributes) -> Self {
skip_assert_initialized!();
Self::from_bits_truncate(value)
}
}
#[cfg(feature = "v2_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_10")))]
impl StaticType for EditorTypingAttributes {
#[inline]
#[doc(alias = "webkit_editor_typing_attributes_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::webkit_editor_typing_attributes_get_type()) }
}
}
#[cfg(feature = "v2_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_10")))]
impl glib::HasParamSpec for EditorTypingAttributes {
type ParamSpec = glib::ParamSpecFlags;
type SetValue = Self;
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder
}
}
#[cfg(feature = "v2_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_10")))]
impl glib::value::ValueType for EditorTypingAttributes {
type Type = Self;
}
#[cfg(feature = "v2_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_10")))]
unsafe impl<'a> glib::value::FromValue<'a> for EditorTypingAttributes {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
#[cfg(feature = "v2_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_10")))]
impl ToValue for EditorTypingAttributes {
#[inline]
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
}
value
}
#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
#[cfg(feature = "v2_10")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_10")))]
impl From<EditorTypingAttributes> for glib::Value {
#[inline]
fn from(v: EditorTypingAttributes) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
bitflags! {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "WebKitFindOptions")]
pub struct FindOptions: u32 {
#[doc(alias = "WEBKIT_FIND_OPTIONS_NONE")]
const NONE = ffi::WEBKIT_FIND_OPTIONS_NONE as _;
#[doc(alias = "WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE")]
const CASE_INSENSITIVE = ffi::WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE as _;
#[doc(alias = "WEBKIT_FIND_OPTIONS_AT_WORD_STARTS")]
const AT_WORD_STARTS = ffi::WEBKIT_FIND_OPTIONS_AT_WORD_STARTS as _;
#[doc(alias = "WEBKIT_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START")]
const TREAT_MEDIAL_CAPITAL_AS_WORD_START = ffi::WEBKIT_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START as _;
#[doc(alias = "WEBKIT_FIND_OPTIONS_BACKWARDS")]
const BACKWARDS = ffi::WEBKIT_FIND_OPTIONS_BACKWARDS as _;
#[doc(alias = "WEBKIT_FIND_OPTIONS_WRAP_AROUND")]
const WRAP_AROUND = ffi::WEBKIT_FIND_OPTIONS_WRAP_AROUND as _;
}
}
#[doc(hidden)]
impl IntoGlib for FindOptions {
type GlibType = ffi::WebKitFindOptions;
#[inline]
fn into_glib(self) -> ffi::WebKitFindOptions {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::WebKitFindOptions> for FindOptions {
#[inline]
unsafe fn from_glib(value: ffi::WebKitFindOptions) -> Self {
skip_assert_initialized!();
Self::from_bits_truncate(value)
}
}
impl StaticType for FindOptions {
#[inline]
#[doc(alias = "webkit_find_options_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::webkit_find_options_get_type()) }
}
}
impl glib::HasParamSpec for FindOptions {
type ParamSpec = glib::ParamSpecFlags;
type SetValue = Self;
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder
}
}
impl glib::value::ValueType for FindOptions {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for FindOptions {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
impl ToValue for FindOptions {
#[inline]
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
}
value
}
#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<FindOptions> for glib::Value {
#[inline]
fn from(v: FindOptions) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
bitflags! {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "WebKitHitTestResultContext")]
pub struct HitTestResultContext: u32 {
#[doc(alias = "WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT")]
const DOCUMENT = ffi::WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT as _;
#[doc(alias = "WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK")]
const LINK = ffi::WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK as _;
#[doc(alias = "WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE")]
const IMAGE = ffi::WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE as _;
#[doc(alias = "WEBKIT_HIT_TEST_RESULT_CONTEXT_MEDIA")]
const MEDIA = ffi::WEBKIT_HIT_TEST_RESULT_CONTEXT_MEDIA as _;
#[doc(alias = "WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE")]
const EDITABLE = ffi::WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE as _;
#[doc(alias = "WEBKIT_HIT_TEST_RESULT_CONTEXT_SCROLLBAR")]
const SCROLLBAR = ffi::WEBKIT_HIT_TEST_RESULT_CONTEXT_SCROLLBAR as _;
#[doc(alias = "WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION")]
const SELECTION = ffi::WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION as _;
}
}
#[doc(hidden)]
impl IntoGlib for HitTestResultContext {
type GlibType = ffi::WebKitHitTestResultContext;
#[inline]
fn into_glib(self) -> ffi::WebKitHitTestResultContext {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::WebKitHitTestResultContext> for HitTestResultContext {
#[inline]
unsafe fn from_glib(value: ffi::WebKitHitTestResultContext) -> Self {
skip_assert_initialized!();
Self::from_bits_truncate(value)
}
}
impl StaticType for HitTestResultContext {
#[inline]
#[doc(alias = "webkit_hit_test_result_context_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::webkit_hit_test_result_context_get_type()) }
}
}
impl glib::HasParamSpec for HitTestResultContext {
type ParamSpec = glib::ParamSpecFlags;
type SetValue = Self;
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder
}
}
impl glib::value::ValueType for HitTestResultContext {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for HitTestResultContext {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
impl ToValue for HitTestResultContext {
#[inline]
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
}
value
}
#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<HitTestResultContext> for glib::Value {
#[inline]
fn from(v: HitTestResultContext) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[cfg(feature = "v2_28")]
bitflags! {
#[cfg_attr(docsrs, doc(cfg(feature = "v2_28")))]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "WebKitInputHints")]
pub struct InputHints: u32 {
#[doc(alias = "WEBKIT_INPUT_HINT_NONE")]
const NONE = ffi::WEBKIT_INPUT_HINT_NONE as _;
#[doc(alias = "WEBKIT_INPUT_HINT_SPELLCHECK")]
const SPELLCHECK = ffi::WEBKIT_INPUT_HINT_SPELLCHECK as _;
#[doc(alias = "WEBKIT_INPUT_HINT_LOWERCASE")]
const LOWERCASE = ffi::WEBKIT_INPUT_HINT_LOWERCASE as _;
#[doc(alias = "WEBKIT_INPUT_HINT_UPPERCASE_CHARS")]
const UPPERCASE_CHARS = ffi::WEBKIT_INPUT_HINT_UPPERCASE_CHARS as _;
#[doc(alias = "WEBKIT_INPUT_HINT_UPPERCASE_WORDS")]
const UPPERCASE_WORDS = ffi::WEBKIT_INPUT_HINT_UPPERCASE_WORDS as _;
#[doc(alias = "WEBKIT_INPUT_HINT_UPPERCASE_SENTENCES")]
const UPPERCASE_SENTENCES = ffi::WEBKIT_INPUT_HINT_UPPERCASE_SENTENCES as _;
#[doc(alias = "WEBKIT_INPUT_HINT_INHIBIT_OSK")]
const INHIBIT_OSK = ffi::WEBKIT_INPUT_HINT_INHIBIT_OSK as _;
}
}
#[cfg(feature = "v2_28")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_28")))]
#[doc(hidden)]
impl IntoGlib for InputHints {
type GlibType = ffi::WebKitInputHints;
#[inline]
fn into_glib(self) -> ffi::WebKitInputHints {
self.bits()
}
}
#[cfg(feature = "v2_28")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_28")))]
#[doc(hidden)]
impl FromGlib<ffi::WebKitInputHints> for InputHints {
#[inline]
unsafe fn from_glib(value: ffi::WebKitInputHints) -> Self {
skip_assert_initialized!();
Self::from_bits_truncate(value)
}
}
#[cfg(feature = "v2_28")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_28")))]
impl StaticType for InputHints {
#[inline]
#[doc(alias = "webkit_input_hints_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::webkit_input_hints_get_type()) }
}
}
#[cfg(feature = "v2_28")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_28")))]
impl glib::HasParamSpec for InputHints {
type ParamSpec = glib::ParamSpecFlags;
type SetValue = Self;
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder
}
}
#[cfg(feature = "v2_28")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_28")))]
impl glib::value::ValueType for InputHints {
type Type = Self;
}
#[cfg(feature = "v2_28")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_28")))]
unsafe impl<'a> glib::value::FromValue<'a> for InputHints {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
#[cfg(feature = "v2_28")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_28")))]
impl ToValue for InputHints {
#[inline]
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
}
value
}
#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
#[cfg(feature = "v2_28")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_28")))]
impl From<InputHints> for glib::Value {
#[inline]
fn from(v: InputHints) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
bitflags! {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "WebKitSnapshotOptions")]
pub struct SnapshotOptions: u32 {
#[doc(alias = "WEBKIT_SNAPSHOT_OPTIONS_NONE")]
const NONE = ffi::WEBKIT_SNAPSHOT_OPTIONS_NONE as _;
#[doc(alias = "WEBKIT_SNAPSHOT_OPTIONS_INCLUDE_SELECTION_HIGHLIGHTING")]
const INCLUDE_SELECTION_HIGHLIGHTING = ffi::WEBKIT_SNAPSHOT_OPTIONS_INCLUDE_SELECTION_HIGHLIGHTING as _;
#[doc(alias = "WEBKIT_SNAPSHOT_OPTIONS_TRANSPARENT_BACKGROUND")]
const TRANSPARENT_BACKGROUND = ffi::WEBKIT_SNAPSHOT_OPTIONS_TRANSPARENT_BACKGROUND as _;
}
}
#[doc(hidden)]
impl IntoGlib for SnapshotOptions {
type GlibType = ffi::WebKitSnapshotOptions;
#[inline]
fn into_glib(self) -> ffi::WebKitSnapshotOptions {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::WebKitSnapshotOptions> for SnapshotOptions {
#[inline]
unsafe fn from_glib(value: ffi::WebKitSnapshotOptions) -> Self {
skip_assert_initialized!();
Self::from_bits_truncate(value)
}
}
impl StaticType for SnapshotOptions {
#[inline]
#[doc(alias = "webkit_snapshot_options_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::webkit_snapshot_options_get_type()) }
}
}
impl glib::HasParamSpec for SnapshotOptions {
type ParamSpec = glib::ParamSpecFlags;
type SetValue = Self;
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder
}
}
impl glib::value::ValueType for SnapshotOptions {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for SnapshotOptions {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
impl ToValue for SnapshotOptions {
#[inline]
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
}
value
}
#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<SnapshotOptions> for glib::Value {
#[inline]
fn from(v: SnapshotOptions) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[cfg(feature = "v2_16")]
bitflags! {
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[doc(alias = "WebKitWebsiteDataTypes")]
pub struct WebsiteDataTypes: u32 {
#[doc(alias = "WEBKIT_WEBSITE_DATA_MEMORY_CACHE")]
const MEMORY_CACHE = ffi::WEBKIT_WEBSITE_DATA_MEMORY_CACHE as _;
#[doc(alias = "WEBKIT_WEBSITE_DATA_DISK_CACHE")]
const DISK_CACHE = ffi::WEBKIT_WEBSITE_DATA_DISK_CACHE as _;
#[doc(alias = "WEBKIT_WEBSITE_DATA_OFFLINE_APPLICATION_CACHE")]
const OFFLINE_APPLICATION_CACHE = ffi::WEBKIT_WEBSITE_DATA_OFFLINE_APPLICATION_CACHE as _;
#[doc(alias = "WEBKIT_WEBSITE_DATA_SESSION_STORAGE")]
const SESSION_STORAGE = ffi::WEBKIT_WEBSITE_DATA_SESSION_STORAGE as _;
#[doc(alias = "WEBKIT_WEBSITE_DATA_LOCAL_STORAGE")]
const LOCAL_STORAGE = ffi::WEBKIT_WEBSITE_DATA_LOCAL_STORAGE as _;
#[doc(alias = "WEBKIT_WEBSITE_DATA_WEBSQL_DATABASES")]
const WEBSQL_DATABASES = ffi::WEBKIT_WEBSITE_DATA_WEBSQL_DATABASES as _;
#[doc(alias = "WEBKIT_WEBSITE_DATA_INDEXEDDB_DATABASES")]
const INDEXEDDB_DATABASES = ffi::WEBKIT_WEBSITE_DATA_INDEXEDDB_DATABASES as _;
#[doc(alias = "WEBKIT_WEBSITE_DATA_PLUGIN_DATA")]
const PLUGIN_DATA = ffi::WEBKIT_WEBSITE_DATA_PLUGIN_DATA as _;
#[doc(alias = "WEBKIT_WEBSITE_DATA_COOKIES")]
const COOKIES = ffi::WEBKIT_WEBSITE_DATA_COOKIES as _;
#[doc(alias = "WEBKIT_WEBSITE_DATA_DEVICE_ID_HASH_SALT")]
const DEVICE_ID_HASH_SALT = ffi::WEBKIT_WEBSITE_DATA_DEVICE_ID_HASH_SALT as _;
#[doc(alias = "WEBKIT_WEBSITE_DATA_HSTS_CACHE")]
const HSTS_CACHE = ffi::WEBKIT_WEBSITE_DATA_HSTS_CACHE as _;
#[doc(alias = "WEBKIT_WEBSITE_DATA_ITP")]
const ITP = ffi::WEBKIT_WEBSITE_DATA_ITP as _;
#[doc(alias = "WEBKIT_WEBSITE_DATA_SERVICE_WORKER_REGISTRATIONS")]
const SERVICE_WORKER_REGISTRATIONS = ffi::WEBKIT_WEBSITE_DATA_SERVICE_WORKER_REGISTRATIONS as _;
#[doc(alias = "WEBKIT_WEBSITE_DATA_DOM_CACHE")]
const DOM_CACHE = ffi::WEBKIT_WEBSITE_DATA_DOM_CACHE as _;
#[doc(alias = "WEBKIT_WEBSITE_DATA_ALL")]
const ALL = ffi::WEBKIT_WEBSITE_DATA_ALL as _;
}
}
#[cfg(feature = "v2_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
#[doc(hidden)]
impl IntoGlib for WebsiteDataTypes {
type GlibType = ffi::WebKitWebsiteDataTypes;
#[inline]
fn into_glib(self) -> ffi::WebKitWebsiteDataTypes {
self.bits()
}
}
#[cfg(feature = "v2_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
#[doc(hidden)]
impl FromGlib<ffi::WebKitWebsiteDataTypes> for WebsiteDataTypes {
#[inline]
unsafe fn from_glib(value: ffi::WebKitWebsiteDataTypes) -> Self {
skip_assert_initialized!();
Self::from_bits_truncate(value)
}
}
#[cfg(feature = "v2_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
impl StaticType for WebsiteDataTypes {
#[inline]
#[doc(alias = "webkit_website_data_types_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::webkit_website_data_types_get_type()) }
}
}
#[cfg(feature = "v2_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
impl glib::HasParamSpec for WebsiteDataTypes {
type ParamSpec = glib::ParamSpecFlags;
type SetValue = Self;
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder
}
}
#[cfg(feature = "v2_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
impl glib::value::ValueType for WebsiteDataTypes {
type Type = Self;
}
#[cfg(feature = "v2_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
unsafe impl<'a> glib::value::FromValue<'a> for WebsiteDataTypes {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
#[cfg(feature = "v2_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
impl ToValue for WebsiteDataTypes {
#[inline]
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
}
value
}
#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
#[cfg(feature = "v2_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_16")))]
impl From<WebsiteDataTypes> for glib::Value {
#[inline]
fn from(v: WebsiteDataTypes) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}