From e20f84fc391552cf21cabf6e90a86ba9f3dda096 Mon Sep 17 00:00:00 2001 From: Evgenii Pashkin Date: Sat, 5 Nov 2016 18:47:28 +0300 Subject: [PATCH 1/2] Update gir submodule --- gir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gir b/gir index 26020e8..3b3585f 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit 26020e81170c94cc3aa736f51b8acbf1241ef15b +Subproject commit 3b3585f09dc1f76450105fe031578312fde4e124 From 1e655362e036260be92318e331489100cdc53fa6 Mon Sep 17 00:00:00 2001 From: Evgenii Pashkin Date: Sat, 5 Nov 2016 18:50:44 +0300 Subject: [PATCH 2/2] Regen --- src/auto/enums.rs | 36 ++++++++++++++++++++++-------------- src/auto/flags.rs | 3 ++- src/auto/mod.rs | 2 +- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/src/auto/enums.rs b/src/auto/enums.rs index 4936ef3..99f2cc8 100644 --- a/src/auto/enums.rs +++ b/src/auto/enums.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (26020e8) from gir-files (11e0e6d) +// This file was generated by gir (3b3585f) from gir-files (11e0e6d) // DO NOT EDIT use ffi; @@ -89,7 +89,7 @@ pub enum CursorType { BlankCursor, CursorIsPixmap, #[doc(hidden)] - __Nonexhaustive, + __Nonexhaustive(()), } #[doc(hidden)] @@ -178,7 +178,7 @@ impl ToGlib for CursorType { CursorType::LastCursor => ffi::GDK_LAST_CURSOR, CursorType::BlankCursor => ffi::GDK_BLANK_CURSOR, CursorType::CursorIsPixmap => ffi::GDK_CURSOR_IS_PIXMAP, - CursorType::__Nonexhaustive => panic!(), + CursorType::__Nonexhaustive(_) => panic!(), } } } @@ -186,6 +186,7 @@ impl ToGlib for CursorType { #[doc(hidden)] impl FromGlib for CursorType { fn from_glib(value: ffi::GdkCursorType) -> Self { + skip_assert_initialized!(); match value { ffi::GDK_X_CURSOR => CursorType::XCursor, ffi::GDK_ARROW => CursorType::Arrow, @@ -278,7 +279,7 @@ pub enum GLError { UnsupportedFormat, UnsupportedProfile, #[doc(hidden)] - __Nonexhaustive, + __Nonexhaustive(()), } #[cfg(feature = "v3_16")] @@ -291,7 +292,7 @@ impl ToGlib for GLError { GLError::NotAvailable => ffi::GDK_GL_ERROR_NOT_AVAILABLE, GLError::UnsupportedFormat => ffi::GDK_GL_ERROR_UNSUPPORTED_FORMAT, GLError::UnsupportedProfile => ffi::GDK_GL_ERROR_UNSUPPORTED_PROFILE, - GLError::__Nonexhaustive => panic!(), + GLError::__Nonexhaustive(_) => panic!(), } } } @@ -300,6 +301,7 @@ impl ToGlib for GLError { #[doc(hidden)] impl FromGlib for GLError { fn from_glib(value: ffi::GdkGLError) -> Self { + skip_assert_initialized!(); match value { ffi::GDK_GL_ERROR_NOT_AVAILABLE => GLError::NotAvailable, ffi::GDK_GL_ERROR_UNSUPPORTED_FORMAT => GLError::UnsupportedFormat, @@ -311,6 +313,7 @@ impl FromGlib for GLError { #[cfg(feature = "v3_16")] impl ErrorDomain for GLError { fn domain() -> glib_ffi::GQuark { + skip_assert_initialized!(); unsafe { ffi::gdk_gl_error_quark() } } @@ -319,11 +322,12 @@ impl ErrorDomain for GLError { } fn from(code: i32) -> Option { + skip_assert_initialized!(); match code { x if x == ffi::GDK_GL_ERROR_NOT_AVAILABLE as i32 => Some(GLError::NotAvailable), x if x == ffi::GDK_GL_ERROR_UNSUPPORTED_FORMAT as i32 => Some(GLError::UnsupportedFormat), x if x == ffi::GDK_GL_ERROR_UNSUPPORTED_PROFILE as i32 => Some(GLError::UnsupportedProfile), - _ => Some(GLError::__Nonexhaustive), + _ => Some(GLError::__Nonexhaustive(())), } } } @@ -341,7 +345,7 @@ pub enum Gravity { SouthEast, Static, #[doc(hidden)] - __Nonexhaustive, + __Nonexhaustive(()), } #[doc(hidden)] @@ -360,7 +364,7 @@ impl ToGlib for Gravity { Gravity::South => ffi::GDK_GRAVITY_SOUTH, Gravity::SouthEast => ffi::GDK_GRAVITY_SOUTH_EAST, Gravity::Static => ffi::GDK_GRAVITY_STATIC, - Gravity::__Nonexhaustive => panic!(), + Gravity::__Nonexhaustive(_) => panic!(), } } } @@ -368,6 +372,7 @@ impl ToGlib for Gravity { #[doc(hidden)] impl FromGlib for Gravity { fn from_glib(value: ffi::GdkGravity) -> Self { + skip_assert_initialized!(); match value { ffi::GDK_GRAVITY_NORTH_WEST => Gravity::NorthWest, ffi::GDK_GRAVITY_NORTH => Gravity::North, @@ -392,7 +397,7 @@ pub enum ModifierIntent { NoTextInput, ShiftGroup, #[doc(hidden)] - __Nonexhaustive, + __Nonexhaustive(()), } #[doc(hidden)] @@ -407,7 +412,7 @@ impl ToGlib for ModifierIntent { ModifierIntent::ModifySelection => ffi::GDK_MODIFIER_INTENT_MODIFY_SELECTION, ModifierIntent::NoTextInput => ffi::GDK_MODIFIER_INTENT_NO_TEXT_INPUT, ModifierIntent::ShiftGroup => ffi::GDK_MODIFIER_INTENT_SHIFT_GROUP, - ModifierIntent::__Nonexhaustive => panic!(), + ModifierIntent::__Nonexhaustive(_) => panic!(), } } } @@ -415,6 +420,7 @@ impl ToGlib for ModifierIntent { #[doc(hidden)] impl FromGlib for ModifierIntent { fn from_glib(value: ffi::GdkModifierIntent) -> Self { + skip_assert_initialized!(); match value { ffi::GDK_MODIFIER_INTENT_PRIMARY_ACCELERATOR => ModifierIntent::PrimaryAccelerator, ffi::GDK_MODIFIER_INTENT_CONTEXT_MENU => ModifierIntent::ContextMenu, @@ -437,7 +443,7 @@ pub enum WindowEdge { South, SouthEast, #[doc(hidden)] - __Nonexhaustive, + __Nonexhaustive(()), } #[doc(hidden)] @@ -454,7 +460,7 @@ impl ToGlib for WindowEdge { WindowEdge::SouthWest => ffi::GDK_WINDOW_EDGE_SOUTH_WEST, WindowEdge::South => ffi::GDK_WINDOW_EDGE_SOUTH, WindowEdge::SouthEast => ffi::GDK_WINDOW_EDGE_SOUTH_EAST, - WindowEdge::__Nonexhaustive => panic!(), + WindowEdge::__Nonexhaustive(_) => panic!(), } } } @@ -462,6 +468,7 @@ impl ToGlib for WindowEdge { #[doc(hidden)] impl FromGlib for WindowEdge { fn from_glib(value: ffi::GdkWindowEdge) -> Self { + skip_assert_initialized!(); match value { ffi::GDK_WINDOW_EDGE_NORTH_WEST => WindowEdge::NorthWest, ffi::GDK_WINDOW_EDGE_NORTH => WindowEdge::North, @@ -492,7 +499,7 @@ pub enum WindowTypeHint { Combo, Dnd, #[doc(hidden)] - __Nonexhaustive, + __Nonexhaustive(()), } #[doc(hidden)] @@ -515,7 +522,7 @@ impl ToGlib for WindowTypeHint { WindowTypeHint::Notification => ffi::GDK_WINDOW_TYPE_HINT_NOTIFICATION, WindowTypeHint::Combo => ffi::GDK_WINDOW_TYPE_HINT_COMBO, WindowTypeHint::Dnd => ffi::GDK_WINDOW_TYPE_HINT_DND, - WindowTypeHint::__Nonexhaustive => panic!(), + WindowTypeHint::__Nonexhaustive(_) => panic!(), } } } @@ -523,6 +530,7 @@ impl ToGlib for WindowTypeHint { #[doc(hidden)] impl FromGlib for WindowTypeHint { fn from_glib(value: ffi::GdkWindowTypeHint) -> Self { + skip_assert_initialized!(); match value { ffi::GDK_WINDOW_TYPE_HINT_NORMAL => WindowTypeHint::Normal, ffi::GDK_WINDOW_TYPE_HINT_DIALOG => WindowTypeHint::Dialog, diff --git a/src/auto/flags.rs b/src/auto/flags.rs index b3610b2..a3efa43 100644 --- a/src/auto/flags.rs +++ b/src/auto/flags.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (26020e8) from gir-files (11e0e6d) +// This file was generated by gir (3b3585f) from gir-files (11e0e6d) // DO NOT EDIT use ffi; @@ -53,6 +53,7 @@ impl ToGlib for ModifierType { #[doc(hidden)] impl FromGlib for ModifierType { fn from_glib(value: ffi::GdkModifierType) -> ModifierType { + skip_assert_initialized!(); ModifierType::from_bits_truncate(value.bits()) } } diff --git a/src/auto/mod.rs b/src/auto/mod.rs index 4654d9c..a112155 100644 --- a/src/auto/mod.rs +++ b/src/auto/mod.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (26020e8) from gir-files (11e0e6d) +// This file was generated by gir (3b3585f) from gir-files (11e0e6d) // DO NOT EDIT mod enums;