Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Change version for Gtk.PadActionType #629

Merged
merged 1 commit into from Feb 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 15 additions & 3 deletions Gir.toml
Expand Up @@ -126,9 +126,6 @@ generate = [
"Gtk.OffscreenWindow",
"Gtk.Orientable",
"Gtk.Orientation",
# "Gtk.PadActionEntry", <- Missing memory management functions
"Gtk.PadActionType",
"Gtk.PadController",
"Gtk.PackDirection",
"Gtk.PackType",
"Gtk.PageOrientation",
Expand Down Expand Up @@ -1076,6 +1073,21 @@ status = "generate"
name = "index"
type = "gint"

#[[object]]
#name = "Gtk.PadActionEntry" <- Missing memory management functions
#status = "generate"
#version = "3.22"

[[object]]
name = "Gtk.PadActionType"
status = "generate"
version = "3.22"

[[object]]
name = "Gtk.PadController"
status = "generate"
version = "3.22"

[[object]]
name = "Gtk.PageSetup"
status = "generate"
Expand Down
7 changes: 7 additions & 0 deletions src/auto/enums.rs
Expand Up @@ -2846,6 +2846,7 @@ impl SetValue for PackType {
}
}

#[cfg(any(feature = "v3_22", feature = "dox"))]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
pub enum PadActionType {
Button,
Expand All @@ -2855,6 +2856,7 @@ pub enum PadActionType {
__Unknown(i32),
}

#[cfg(any(feature = "v3_22", feature = "dox"))]
#[doc(hidden)]
impl ToGlib for PadActionType {
type GlibType = ffi::GtkPadActionType;
Expand All @@ -2869,6 +2871,7 @@ impl ToGlib for PadActionType {
}
}

#[cfg(any(feature = "v3_22", feature = "dox"))]
#[doc(hidden)]
impl FromGlib<ffi::GtkPadActionType> for PadActionType {
fn from_glib(value: ffi::GtkPadActionType) -> Self {
Expand All @@ -2882,24 +2885,28 @@ impl FromGlib<ffi::GtkPadActionType> for PadActionType {
}
}

#[cfg(any(feature = "v3_22", feature = "dox"))]
impl StaticType for PadActionType {
fn static_type() -> Type {
unsafe { from_glib(ffi::gtk_pad_action_type_get_type()) }
}
}

#[cfg(any(feature = "v3_22", feature = "dox"))]
impl<'a> FromValueOptional<'a> for PadActionType {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}

#[cfg(any(feature = "v3_22", feature = "dox"))]
impl<'a> FromValue<'a> for PadActionType {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}

#[cfg(any(feature = "v3_22", feature = "dox"))]
impl SetValue for PadActionType {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
Expand Down
1 change: 1 addition & 0 deletions src/auto/mod.rs
Expand Up @@ -931,6 +931,7 @@ pub use self::enums::NumberUpLayout;
pub use self::enums::Orientation;
pub use self::enums::PackDirection;
pub use self::enums::PackType;
#[cfg(any(feature = "v3_22", feature = "dox"))]
pub use self::enums::PadActionType;
pub use self::enums::PageOrientation;
pub use self::enums::PageSet;
Expand Down