diff --git a/atk/src/auto/versions.txt b/atk/src/auto/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/atk/src/auto/versions.txt +++ b/atk/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/atk/sys/versions.txt b/atk/sys/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/atk/sys/versions.txt +++ b/atk/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/cairo/sys/build.rs b/cairo/sys/build.rs index 5a53597327e1..00d03b964fa5 100644 --- a/cairo/sys/build.rs +++ b/cairo/sys/build.rs @@ -10,7 +10,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gdk-pixbuf/src/auto/versions.txt b/gdk-pixbuf/src/auto/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/gdk-pixbuf/src/auto/versions.txt +++ b/gdk-pixbuf/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/gdk-pixbuf/sys/versions.txt b/gdk-pixbuf/sys/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/gdk-pixbuf/sys/versions.txt +++ b/gdk-pixbuf/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/gdk/src/auto/device.rs b/gdk/src/auto/device.rs index baa45bd74f5d..ab7e54421841 100644 --- a/gdk/src/auto/device.rs +++ b/gdk/src/auto/device.rs @@ -25,7 +25,6 @@ use crate::Screen; #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] use crate::Seat; use crate::Window; -use glib::object::IsA; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; @@ -170,7 +169,7 @@ impl Device { unsafe { from_glib(ffi::gdk_device_get_source(self.to_glib_none().0)) } } - //pub fn get_state>(&self, window: &P, axes: &[f64]) -> ModifierType { + //pub fn get_state(&self, window: &Window, axes: &[f64]) -> ModifierType { // unsafe { TODO: call ffi:gdk_device_get_state() } //} @@ -211,9 +210,9 @@ impl Device { } #[cfg_attr(feature = "v3_20", deprecated)] - pub fn grab>( + pub fn grab( &self, - window: &P, + window: &Window, grab_ownership: GrabOwnership, owner_events: bool, event_mask: EventMask, @@ -223,7 +222,7 @@ impl Device { unsafe { from_glib(ffi::gdk_device_grab( self.to_glib_none().0, - window.as_ref().to_glib_none().0, + window.to_glib_none().0, grab_ownership.to_glib(), owner_events.to_glib(), event_mask.to_glib(), diff --git a/gdk/src/auto/display.rs b/gdk/src/auto/display.rs index 558c152e030f..eae98cde05af 100644 --- a/gdk/src/auto/display.rs +++ b/gdk/src/auto/display.rs @@ -15,7 +15,6 @@ use crate::Screen; #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] use crate::Seat; use crate::Window; -use glib::object::IsA; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; @@ -136,11 +135,11 @@ impl Display { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - pub fn get_monitor_at_window>(&self, window: &P) -> Option { + pub fn get_monitor_at_window(&self, window: &Window) -> Option { unsafe { from_glib_none(ffi::gdk_display_get_monitor_at_window( self.to_glib_none().0, - window.as_ref().to_glib_none().0, + window.to_glib_none().0, )) } } @@ -229,17 +228,12 @@ impl Display { } } - pub fn store_clipboard>( - &self, - clipboard_window: &P, - time_: u32, - targets: &[&Atom], - ) { + pub fn store_clipboard(&self, clipboard_window: &Window, time_: u32, targets: &[&Atom]) { let n_targets = targets.len() as i32; unsafe { ffi::gdk_display_store_clipboard( self.to_glib_none().0, - clipboard_window.as_ref().to_glib_none().0, + clipboard_window.to_glib_none().0, time_, targets.to_glib_none().0, n_targets, diff --git a/gdk/src/auto/drag_context.rs b/gdk/src/auto/drag_context.rs index 1f2b69a4f753..f74b84faa064 100644 --- a/gdk/src/auto/drag_context.rs +++ b/gdk/src/auto/drag_context.rs @@ -12,9 +12,6 @@ use crate::DragProtocol; use crate::Window; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] -use glib::object::IsA; -#[cfg(any(feature = "v3_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] use glib::object::ObjectType as ObjectType_; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] @@ -96,11 +93,11 @@ impl DragContext { #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - pub fn manage_dnd>(&self, ipc_window: &P, actions: DragAction) -> bool { + pub fn manage_dnd(&self, ipc_window: &Window, actions: DragAction) -> bool { unsafe { from_glib(ffi::gdk_drag_context_manage_dnd( self.to_glib_none().0, - ipc_window.as_ref().to_glib_none().0, + ipc_window.to_glib_none().0, actions.to_glib(), )) } diff --git a/gdk/src/auto/functions.rs b/gdk/src/auto/functions.rs index 19668226c29f..000761db9eae 100644 --- a/gdk/src/auto/functions.rs +++ b/gdk/src/auto/functions.rs @@ -11,7 +11,6 @@ use crate::Screen; use crate::Visual; use crate::Window; use crate::WindowState; -use glib::object::IsA; use glib::translate::*; use std::mem; use std::ptr; @@ -252,15 +251,15 @@ pub fn pre_parse_libgtk_only() { } } -pub fn property_delete>(window: &P, property: &Atom) { +pub fn property_delete(window: &Window, property: &Atom) { skip_assert_initialized!(); unsafe { - ffi::gdk_property_delete(window.as_ref().to_glib_none().0, property.to_glib_none().0); + ffi::gdk_property_delete(window.to_glib_none().0, property.to_glib_none().0); } } -pub fn property_get>( - window: &P, +pub fn property_get( + window: &Window, property: &Atom, type_: &Atom, offset: libc::c_ulong, @@ -274,7 +273,7 @@ pub fn property_get>( let mut actual_length = mem::MaybeUninit::uninit(); let mut data = ptr::null_mut(); let ret = from_glib(ffi::gdk_property_get( - window.as_ref().to_glib_none().0, + window.to_glib_none().0, property.to_glib_none().0, type_.to_glib_none().0, offset, @@ -314,16 +313,11 @@ pub fn query_depths() -> Vec { // unsafe { TODO: call ffi:gdk_query_visual_types() } //} -pub fn selection_convert>( - requestor: &P, - selection: &Atom, - target: &Atom, - time_: u32, -) { +pub fn selection_convert(requestor: &Window, selection: &Atom, target: &Atom, time_: u32) { skip_assert_initialized!(); unsafe { ffi::gdk_selection_convert( - requestor.as_ref().to_glib_none().0, + requestor.to_glib_none().0, selection.to_glib_none().0, target.to_glib_none().0, time_, @@ -346,8 +340,8 @@ pub fn selection_owner_get_for_display(display: &Display, selection: &Atom) -> O } } -pub fn selection_owner_set>( - owner: Option<&P>, +pub fn selection_owner_set( + owner: Option<&Window>, selection: &Atom, time_: u32, send_event: bool, @@ -355,7 +349,7 @@ pub fn selection_owner_set>( assert_initialized_main_thread!(); unsafe { from_glib(ffi::gdk_selection_owner_set( - owner.map(|p| p.as_ref()).to_glib_none().0, + owner.to_glib_none().0, selection.to_glib_none().0, time_, send_event.to_glib(), @@ -363,9 +357,9 @@ pub fn selection_owner_set>( } } -pub fn selection_owner_set_for_display>( +pub fn selection_owner_set_for_display( display: &Display, - owner: Option<&P>, + owner: Option<&Window>, selection: &Atom, time_: u32, send_event: bool, @@ -374,7 +368,7 @@ pub fn selection_owner_set_for_display>( unsafe { from_glib(ffi::gdk_selection_owner_set_for_display( display.to_glib_none().0, - owner.map(|p| p.as_ref()).to_glib_none().0, + owner.to_glib_none().0, selection.to_glib_none().0, time_, send_event.to_glib(), @@ -382,8 +376,8 @@ pub fn selection_owner_set_for_display>( } } -pub fn selection_send_notify>( - requestor: &P, +pub fn selection_send_notify( + requestor: &Window, selection: &Atom, target: &Atom, property: &Atom, @@ -392,7 +386,7 @@ pub fn selection_send_notify>( skip_assert_initialized!(); unsafe { ffi::gdk_selection_send_notify( - requestor.as_ref().to_glib_none().0, + requestor.to_glib_none().0, selection.to_glib_none().0, target.to_glib_none().0, property.to_glib_none().0, @@ -401,9 +395,9 @@ pub fn selection_send_notify>( } } -pub fn selection_send_notify_for_display>( +pub fn selection_send_notify_for_display( display: &Display, - requestor: &P, + requestor: &Window, selection: &Atom, target: &Atom, property: &Atom, @@ -413,7 +407,7 @@ pub fn selection_send_notify_for_display>( unsafe { ffi::gdk_selection_send_notify_for_display( display.to_glib_none().0, - requestor.as_ref().to_glib_none().0, + requestor.to_glib_none().0, selection.to_glib_none().0, target.to_glib_none().0, property.to_glib_none().0, @@ -450,30 +444,26 @@ pub fn set_show_events(show_events: bool) { } } -pub fn synthesize_window_state>( - window: &P, - unset_flags: WindowState, - set_flags: WindowState, -) { +pub fn synthesize_window_state(window: &Window, unset_flags: WindowState, set_flags: WindowState) { skip_assert_initialized!(); unsafe { ffi::gdk_synthesize_window_state( - window.as_ref().to_glib_none().0, + window.to_glib_none().0, unset_flags.to_glib(), set_flags.to_glib(), ); } } -pub fn test_render_sync>(window: &P) { +pub fn test_render_sync(window: &Window) { skip_assert_initialized!(); unsafe { - ffi::gdk_test_render_sync(window.as_ref().to_glib_none().0); + ffi::gdk_test_render_sync(window.to_glib_none().0); } } -pub fn test_simulate_button>( - window: &P, +pub fn test_simulate_button( + window: &Window, x: i32, y: i32, button: u32, @@ -483,7 +473,7 @@ pub fn test_simulate_button>( skip_assert_initialized!(); unsafe { from_glib(ffi::gdk_test_simulate_button( - window.as_ref().to_glib_none().0, + window.to_glib_none().0, x, y, button, @@ -493,8 +483,8 @@ pub fn test_simulate_button>( } } -pub fn test_simulate_key>( - window: &P, +pub fn test_simulate_key( + window: &Window, x: i32, y: i32, keyval: u32, @@ -504,7 +494,7 @@ pub fn test_simulate_key>( skip_assert_initialized!(); unsafe { from_glib(ffi::gdk_test_simulate_key( - window.as_ref().to_glib_none().0, + window.to_glib_none().0, x, y, keyval, diff --git a/gdk/src/auto/mod.rs b/gdk/src/auto/mod.rs index 65f91855a920..1a4401b7ed2f 100644 --- a/gdk/src/auto/mod.rs +++ b/gdk/src/auto/mod.rs @@ -81,8 +81,7 @@ mod visual; pub use self::visual::Visual; mod window; -pub use self::window::WindowExt; -pub use self::window::{Window, NONE_WINDOW}; +pub use self::window::Window; mod event_sequence; pub use self::event_sequence::EventSequence; @@ -159,5 +158,4 @@ pub mod traits { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] pub use super::DevicePadExt; - pub use super::WindowExt; } diff --git a/gdk/src/auto/screen.rs b/gdk/src/auto/screen.rs index 37e67c35382c..0ea094f44d70 100644 --- a/gdk/src/auto/screen.rs +++ b/gdk/src/auto/screen.rs @@ -6,7 +6,6 @@ use crate::Display; use crate::Rectangle; use crate::Visual; use crate::Window; -use glib::object::IsA; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; @@ -49,12 +48,9 @@ impl Screen { } #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_monitor_at_window>(&self, window: &P) -> i32 { + pub fn get_monitor_at_window(&self, window: &Window) -> i32 { unsafe { - ffi::gdk_screen_get_monitor_at_window( - self.to_glib_none().0, - window.as_ref().to_glib_none().0, - ) + ffi::gdk_screen_get_monitor_at_window(self.to_glib_none().0, window.to_glib_none().0) } } diff --git a/gdk/src/auto/seat.rs b/gdk/src/auto/seat.rs index ff5537d2dc7b..ab6e4453f7d3 100644 --- a/gdk/src/auto/seat.rs +++ b/gdk/src/auto/seat.rs @@ -28,9 +28,6 @@ use crate::SeatCapabilities; use crate::Window; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] -use glib::object::IsA; -#[cfg(any(feature = "v3_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] use glib::object::ObjectType as ObjectType_; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] @@ -93,9 +90,9 @@ impl Seat { #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - pub fn grab>( + pub fn grab( &self, - window: &P, + window: &Window, capabilities: SeatCapabilities, owner_events: bool, cursor: Option<&Cursor>, @@ -103,7 +100,7 @@ impl Seat { prepare_func: Option<&mut dyn (FnMut(&Seat, &Window))>, ) -> GrabStatus { let prepare_func_data: Option<&mut dyn (FnMut(&Seat, &Window))> = prepare_func; - unsafe extern "C" fn prepare_func_func>( + unsafe extern "C" fn prepare_func_func( seat: *mut ffi::GdkSeat, window: *mut ffi::GdkWindow, user_data: glib::ffi::gpointer, @@ -119,7 +116,7 @@ impl Seat { }; } let prepare_func = if prepare_func_data.is_some() { - Some(prepare_func_func::

as _) + Some(prepare_func_func as _) } else { None }; @@ -127,7 +124,7 @@ impl Seat { unsafe { from_glib(ffi::gdk_seat_grab( self.to_glib_none().0, - window.as_ref().to_glib_none().0, + window.to_glib_none().0, capabilities.to_glib(), owner_events.to_glib(), cursor.to_glib_none().0, diff --git a/gdk/src/auto/versions.txt b/gdk/src/auto/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/gdk/src/auto/versions.txt +++ b/gdk/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/gdk/src/auto/window.rs b/gdk/src/auto/window.rs index a295dab480c8..3691d2dbea7b 100644 --- a/gdk/src/auto/window.rs +++ b/gdk/src/auto/window.rs @@ -36,8 +36,7 @@ use crate::WindowState; use crate::WindowType; use crate::WindowTypeHint; use crate::RGBA; -use glib::object::Cast; -use glib::object::IsA; +use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; @@ -56,469 +55,31 @@ glib::glib_wrapper! { } impl Window { - pub fn constrain_size( - geometry: &mut Geometry, - flags: WindowHints, - width: i32, - height: i32, - ) -> (i32, i32) { - assert_initialized_main_thread!(); - unsafe { - let mut new_width = mem::MaybeUninit::uninit(); - let mut new_height = mem::MaybeUninit::uninit(); - ffi::gdk_window_constrain_size( - geometry.to_glib_none_mut().0, - flags.to_glib(), - width, - height, - new_width.as_mut_ptr(), - new_height.as_mut_ptr(), - ); - let new_width = new_width.assume_init(); - let new_height = new_height.assume_init(); - (new_width, new_height) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn process_all_updates() { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_window_process_all_updates(); - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn set_debug_updates(setting: bool) { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_window_set_debug_updates(setting.to_glib()); - } - } -} - -pub const NONE_WINDOW: Option<&Window> = None; - -pub trait WindowExt: 'static { - //fn add_filter(&self, function: /*Unimplemented*/Fn(/*Unimplemented*/XEvent, &Event) -> /*Ignored*/FilterReturn, data: /*Unimplemented*/Option); - - fn beep(&self); - - #[cfg(any(feature = "v3_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn begin_draw_frame(&self, region: &cairo::Region) -> Option; - - fn begin_move_drag(&self, button: i32, root_x: i32, root_y: i32, timestamp: u32); - - fn begin_move_drag_for_device( - &self, - device: &Device, - button: i32, - root_x: i32, - root_y: i32, - timestamp: u32, - ); - - #[cfg_attr(feature = "v3_22", deprecated)] - fn begin_paint_rect(&self, rectangle: &Rectangle); - - #[cfg_attr(feature = "v3_22", deprecated)] - fn begin_paint_region(&self, region: &cairo::Region); - - fn begin_resize_drag( - &self, - edge: WindowEdge, - button: i32, - root_x: i32, - root_y: i32, - timestamp: u32, - ); - - fn begin_resize_drag_for_device( - &self, - edge: WindowEdge, - device: &Device, - button: i32, - root_x: i32, - root_y: i32, - timestamp: u32, - ); - - fn coords_from_parent(&self, parent_x: f64, parent_y: f64) -> (f64, f64); - - fn coords_to_parent(&self, x: f64, y: f64) -> (f64, f64); - - #[cfg(any(feature = "v3_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - fn create_gl_context(&self) -> Result; - - fn create_similar_image_surface( - &self, - format: i32, - width: i32, - height: i32, - scale: i32, - ) -> Option; - - fn deiconify(&self); - - fn destroy(&self); - - fn destroy_notify(&self); - - #[cfg(any(feature = "v3_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn end_draw_frame(&self, context: &DrawingContext); - - fn end_paint(&self); - - fn ensure_native(&self) -> bool; - - fn focus(&self, timestamp: u32); - - #[cfg_attr(feature = "v3_16", deprecated)] - fn freeze_toplevel_updates_libgtk_only(&self); - - fn freeze_updates(&self); - - fn fullscreen(&self); - - #[cfg(any(feature = "v3_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] - fn fullscreen_on_monitor(&self, monitor: i32); - - fn geometry_changed(&self); - - fn get_accept_focus(&self) -> bool; - - fn get_children(&self) -> Vec; - - //fn get_children_with_user_data(&self, user_data: /*Unimplemented*/Option) -> Vec; - - fn get_clip_region(&self) -> Option; - - #[cfg_attr(feature = "v3_16", deprecated)] - fn get_composited(&self) -> bool; - - fn get_cursor(&self) -> Option; - - fn get_decorations(&self) -> Option; - - fn get_device_cursor(&self, device: &Device) -> Option; - - fn get_device_events(&self, device: &Device) -> EventMask; - - fn get_device_position(&self, device: &Device) -> (Option, i32, i32, ModifierType); - - fn get_device_position_double( - &self, - device: &Device, - ) -> (Option, f64, f64, ModifierType); - - fn get_display(&self) -> Display; - - fn get_drag_protocol(&self) -> (DragProtocol, Window); - - fn get_effective_parent(&self) -> Option; - - fn get_effective_toplevel(&self) -> Window; - - fn get_event_compression(&self) -> bool; - - fn get_events(&self) -> EventMask; - - fn get_focus_on_map(&self) -> bool; - - fn get_frame_clock(&self) -> Option; - - fn get_frame_extents(&self) -> Rectangle; - - fn get_fullscreen_mode(&self) -> FullscreenMode; - - fn get_geometry(&self) -> (i32, i32, i32, i32); - - fn get_group(&self) -> Option; - - fn get_height(&self) -> i32; - - fn get_modal_hint(&self) -> bool; - - fn get_origin(&self) -> (i32, i32, i32); - - fn get_parent(&self) -> Option; - - #[cfg(any(feature = "v3_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] - fn get_pass_through(&self) -> bool; - - fn get_position(&self) -> (i32, i32); - - fn get_root_coords(&self, x: i32, y: i32) -> (i32, i32); - - fn get_root_origin(&self) -> (i32, i32); - - fn get_scale_factor(&self) -> i32; - - fn get_screen(&self) -> Screen; - - fn get_source_events(&self, source: InputSource) -> EventMask; - - fn get_state(&self) -> WindowState; - - fn get_support_multidevice(&self) -> bool; - - fn get_toplevel(&self) -> Window; - - fn get_type_hint(&self) -> WindowTypeHint; - - fn get_update_area(&self) -> Option; - - fn get_visible_region(&self) -> Option; - - fn get_visual(&self) -> Visual; - - fn get_width(&self) -> i32; - - fn get_window_type(&self) -> WindowType; - - fn has_native(&self) -> bool; - - fn hide(&self); - - fn iconify(&self); - - fn input_shape_combine_region( - &self, - shape_region: &cairo::Region, - offset_x: i32, - offset_y: i32, - ); - - fn invalidate_maybe_recurse( - &self, - region: &cairo::Region, - child_func: Option<&mut dyn (FnMut(&Window) -> bool)>, - ); - - fn invalidate_rect(&self, rect: Option<&Rectangle>, invalidate_children: bool); - - fn invalidate_region(&self, region: &cairo::Region, invalidate_children: bool); - - fn is_destroyed(&self) -> bool; - - fn is_input_only(&self) -> bool; - - fn is_shaped(&self) -> bool; - - fn is_viewable(&self) -> bool; - - fn is_visible(&self) -> bool; - - fn lower(&self); - - #[cfg(any(feature = "v3_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - fn mark_paint_from_clip(&self, cr: &cairo::Context); - - fn maximize(&self); - - fn merge_child_input_shapes(&self); - - fn merge_child_shapes(&self); - - fn move_(&self, x: i32, y: i32); - - fn move_region(&self, region: &cairo::Region, dx: i32, dy: i32); - - fn move_resize(&self, x: i32, y: i32, width: i32, height: i32); - - #[cfg(any(feature = "v3_24", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_24")))] - fn move_to_rect( - &self, - rect: &Rectangle, - rect_anchor: Gravity, - window_anchor: Gravity, - anchor_hints: AnchorHints, - rect_anchor_dx: i32, - rect_anchor_dy: i32, - ); - - fn peek_children(&self) -> Vec; - - #[cfg_attr(feature = "v3_22", deprecated)] - fn process_updates(&self, update_children: bool); - - fn raise(&self); - - fn register_dnd(&self); - - //fn remove_filter(&self, function: /*Unimplemented*/Fn(/*Unimplemented*/XEvent, &Event) -> /*Ignored*/FilterReturn, data: /*Unimplemented*/Option); - - fn reparent>(&self, new_parent: &P, x: i32, y: i32); - - fn resize(&self, width: i32, height: i32); - - fn restack>(&self, sibling: Option<&P>, above: bool); - - fn scroll(&self, dx: i32, dy: i32); - - fn set_accept_focus(&self, accept_focus: bool); - - #[cfg_attr(feature = "v3_22", deprecated)] - fn set_background_rgba(&self, rgba: &RGBA); - - fn set_child_input_shapes(&self); - - fn set_child_shapes(&self); - - #[cfg_attr(feature = "v3_16", deprecated)] - fn set_composited(&self, composited: bool); - - fn set_cursor(&self, cursor: Option<&Cursor>); - - fn set_decorations(&self, decorations: WMDecoration); - - fn set_device_cursor(&self, device: &Device, cursor: &Cursor); - - fn set_device_events(&self, device: &Device, event_mask: EventMask); - - fn set_event_compression(&self, event_compression: bool); - - fn set_events(&self, event_mask: EventMask); - - fn set_focus_on_map(&self, focus_on_map: bool); - - fn set_fullscreen_mode(&self, mode: FullscreenMode); - - fn set_functions(&self, functions: WMFunction); - - fn set_geometry_hints(&self, geometry: &Geometry, geom_mask: WindowHints); - - fn set_group>(&self, leader: Option<&P>); - - fn set_icon_list(&self, pixbufs: &[gdk_pixbuf::Pixbuf]); - - fn set_icon_name(&self, name: Option<&str>); - - //fn set_invalidate_handler(&self, handler: P); - - fn set_keep_above(&self, setting: bool); - - fn set_keep_below(&self, setting: bool); - - fn set_modal_hint(&self, modal: bool); - - fn set_opacity(&self, opacity: f64); - - fn set_opaque_region(&self, region: Option<&cairo::Region>); - - fn set_override_redirect(&self, override_redirect: bool); - - #[cfg(any(feature = "v3_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] - fn set_pass_through(&self, pass_through: bool); - - fn set_role(&self, role: &str); - - fn set_shadow_width(&self, left: i32, right: i32, top: i32, bottom: i32); - - fn set_skip_pager_hint(&self, skips_pager: bool); - - fn set_skip_taskbar_hint(&self, skips_taskbar: bool); - - fn set_source_events(&self, source: InputSource, event_mask: EventMask); - - fn set_startup_id(&self, startup_id: &str); - - #[cfg_attr(feature = "v3_16", deprecated)] - fn set_static_gravities(&self, use_static: bool) -> bool; - - fn set_support_multidevice(&self, support_multidevice: bool); - - fn set_title(&self, title: &str); - - fn set_transient_for>(&self, parent: &P); - - fn set_type_hint(&self, hint: WindowTypeHint); - - fn set_urgency_hint(&self, urgent: bool); - - fn shape_combine_region( - &self, - shape_region: Option<&cairo::Region>, - offset_x: i32, - offset_y: i32, - ); - - fn show(&self); - - fn show_unraised(&self); - - fn show_window_menu(&self, event: &mut Event) -> bool; - - fn stick(&self); - - #[cfg_attr(feature = "v3_16", deprecated)] - fn thaw_toplevel_updates_libgtk_only(&self); - - fn thaw_updates(&self); - - fn unfullscreen(&self); - - fn unmaximize(&self); - - fn unstick(&self); - - fn withdraw(&self); - - fn connect_create_surface cairo::Surface + 'static>( - &self, - f: F, - ) -> SignalHandlerId; - - //fn connect_from_embedder(&self, f: F) -> SignalHandlerId; - - //#[cfg(any(feature = "v3_22", feature = "dox"))] - //#[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - //fn connect_moved_to_rect(&self, f: F) -> SignalHandlerId; - - fn connect_pick_embedded_child Option + 'static>( - &self, - f: F, - ) -> SignalHandlerId; - - //fn connect_to_embedder(&self, f: F) -> SignalHandlerId; - - fn connect_property_cursor_notify(&self, f: F) -> SignalHandlerId; -} - -impl> WindowExt for O { - //fn add_filter(&self, function: /*Unimplemented*/Fn(/*Unimplemented*/XEvent, &Event) -> /*Ignored*/FilterReturn, data: /*Unimplemented*/Option) { + //pub fn add_filter(&self, function: /*Unimplemented*/Fn(/*Unimplemented*/XEvent, &Event) -> /*Ignored*/FilterReturn, data: /*Unimplemented*/Option) { // unsafe { TODO: call ffi:gdk_window_add_filter() } //} - fn beep(&self) { + pub fn beep(&self) { unsafe { - ffi::gdk_window_beep(self.as_ref().to_glib_none().0); + ffi::gdk_window_beep(self.to_glib_none().0); } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn begin_draw_frame(&self, region: &cairo::Region) -> Option { + pub fn begin_draw_frame(&self, region: &cairo::Region) -> Option { unsafe { from_glib_none(ffi::gdk_window_begin_draw_frame( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, region.to_glib_none().0, )) } } - fn begin_move_drag(&self, button: i32, root_x: i32, root_y: i32, timestamp: u32) { + pub fn begin_move_drag(&self, button: i32, root_x: i32, root_y: i32, timestamp: u32) { unsafe { ffi::gdk_window_begin_move_drag( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, button, root_x, root_y, @@ -527,7 +88,7 @@ impl> WindowExt for O { } } - fn begin_move_drag_for_device( + pub fn begin_move_drag_for_device( &self, device: &Device, button: i32, @@ -537,7 +98,7 @@ impl> WindowExt for O { ) { unsafe { ffi::gdk_window_begin_move_drag_for_device( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, device.to_glib_none().0, button, root_x, @@ -547,25 +108,21 @@ impl> WindowExt for O { } } - fn begin_paint_rect(&self, rectangle: &Rectangle) { + #[cfg_attr(feature = "v3_22", deprecated)] + pub fn begin_paint_rect(&self, rectangle: &Rectangle) { unsafe { - ffi::gdk_window_begin_paint_rect( - self.as_ref().to_glib_none().0, - rectangle.to_glib_none().0, - ); + ffi::gdk_window_begin_paint_rect(self.to_glib_none().0, rectangle.to_glib_none().0); } } - fn begin_paint_region(&self, region: &cairo::Region) { + #[cfg_attr(feature = "v3_22", deprecated)] + pub fn begin_paint_region(&self, region: &cairo::Region) { unsafe { - ffi::gdk_window_begin_paint_region( - self.as_ref().to_glib_none().0, - region.to_glib_none().0, - ); + ffi::gdk_window_begin_paint_region(self.to_glib_none().0, region.to_glib_none().0); } } - fn begin_resize_drag( + pub fn begin_resize_drag( &self, edge: WindowEdge, button: i32, @@ -575,7 +132,7 @@ impl> WindowExt for O { ) { unsafe { ffi::gdk_window_begin_resize_drag( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, edge.to_glib(), button, root_x, @@ -585,7 +142,7 @@ impl> WindowExt for O { } } - fn begin_resize_drag_for_device( + pub fn begin_resize_drag_for_device( &self, edge: WindowEdge, device: &Device, @@ -596,7 +153,7 @@ impl> WindowExt for O { ) { unsafe { ffi::gdk_window_begin_resize_drag_for_device( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, edge.to_glib(), device.to_glib_none().0, button, @@ -607,12 +164,12 @@ impl> WindowExt for O { } } - fn coords_from_parent(&self, parent_x: f64, parent_y: f64) -> (f64, f64) { + pub fn coords_from_parent(&self, parent_x: f64, parent_y: f64) -> (f64, f64) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); ffi::gdk_window_coords_from_parent( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, parent_x, parent_y, x.as_mut_ptr(), @@ -624,12 +181,12 @@ impl> WindowExt for O { } } - fn coords_to_parent(&self, x: f64, y: f64) -> (f64, f64) { + pub fn coords_to_parent(&self, x: f64, y: f64) -> (f64, f64) { unsafe { let mut parent_x = mem::MaybeUninit::uninit(); let mut parent_y = mem::MaybeUninit::uninit(); ffi::gdk_window_coords_to_parent( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, x, y, parent_x.as_mut_ptr(), @@ -643,10 +200,10 @@ impl> WindowExt for O { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - fn create_gl_context(&self) -> Result { + pub fn create_gl_context(&self) -> Result { unsafe { let mut error = ptr::null_mut(); - let ret = ffi::gdk_window_create_gl_context(self.as_ref().to_glib_none().0, &mut error); + let ret = ffi::gdk_window_create_gl_context(self.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { @@ -655,7 +212,7 @@ impl> WindowExt for O { } } - fn create_similar_image_surface( + pub fn create_similar_image_surface( &self, format: i32, width: i32, @@ -664,7 +221,7 @@ impl> WindowExt for O { ) -> Option { unsafe { from_glib_full(ffi::gdk_window_create_similar_image_surface( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, format, width, height, @@ -673,132 +230,115 @@ impl> WindowExt for O { } } - fn deiconify(&self) { + pub fn deiconify(&self) { unsafe { - ffi::gdk_window_deiconify(self.as_ref().to_glib_none().0); + ffi::gdk_window_deiconify(self.to_glib_none().0); } } - fn destroy(&self) { + pub fn destroy(&self) { unsafe { - ffi::gdk_window_destroy(self.as_ref().to_glib_none().0); + ffi::gdk_window_destroy(self.to_glib_none().0); } } - fn destroy_notify(&self) { + pub fn destroy_notify(&self) { unsafe { - ffi::gdk_window_destroy_notify(self.as_ref().to_glib_none().0); + ffi::gdk_window_destroy_notify(self.to_glib_none().0); } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn end_draw_frame(&self, context: &DrawingContext) { + pub fn end_draw_frame(&self, context: &DrawingContext) { unsafe { - ffi::gdk_window_end_draw_frame( - self.as_ref().to_glib_none().0, - context.to_glib_none().0, - ); + ffi::gdk_window_end_draw_frame(self.to_glib_none().0, context.to_glib_none().0); } } - fn end_paint(&self) { + pub fn end_paint(&self) { unsafe { - ffi::gdk_window_end_paint(self.as_ref().to_glib_none().0); + ffi::gdk_window_end_paint(self.to_glib_none().0); } } - fn ensure_native(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_ensure_native( - self.as_ref().to_glib_none().0, - )) - } + pub fn ensure_native(&self) -> bool { + unsafe { from_glib(ffi::gdk_window_ensure_native(self.to_glib_none().0)) } } - fn focus(&self, timestamp: u32) { + pub fn focus(&self, timestamp: u32) { unsafe { - ffi::gdk_window_focus(self.as_ref().to_glib_none().0, timestamp); + ffi::gdk_window_focus(self.to_glib_none().0, timestamp); } } - fn freeze_toplevel_updates_libgtk_only(&self) { + #[cfg_attr(feature = "v3_16", deprecated)] + pub fn freeze_toplevel_updates_libgtk_only(&self) { unsafe { - ffi::gdk_window_freeze_toplevel_updates_libgtk_only(self.as_ref().to_glib_none().0); + ffi::gdk_window_freeze_toplevel_updates_libgtk_only(self.to_glib_none().0); } } - fn freeze_updates(&self) { + pub fn freeze_updates(&self) { unsafe { - ffi::gdk_window_freeze_updates(self.as_ref().to_glib_none().0); + ffi::gdk_window_freeze_updates(self.to_glib_none().0); } } - fn fullscreen(&self) { + pub fn fullscreen(&self) { unsafe { - ffi::gdk_window_fullscreen(self.as_ref().to_glib_none().0); + ffi::gdk_window_fullscreen(self.to_glib_none().0); } } #[cfg(any(feature = "v3_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] - fn fullscreen_on_monitor(&self, monitor: i32) { + pub fn fullscreen_on_monitor(&self, monitor: i32) { unsafe { - ffi::gdk_window_fullscreen_on_monitor(self.as_ref().to_glib_none().0, monitor); + ffi::gdk_window_fullscreen_on_monitor(self.to_glib_none().0, monitor); } } - fn geometry_changed(&self) { + pub fn geometry_changed(&self) { unsafe { - ffi::gdk_window_geometry_changed(self.as_ref().to_glib_none().0); + ffi::gdk_window_geometry_changed(self.to_glib_none().0); } } - fn get_accept_focus(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_get_accept_focus( - self.as_ref().to_glib_none().0, - )) - } + pub fn get_accept_focus(&self) -> bool { + unsafe { from_glib(ffi::gdk_window_get_accept_focus(self.to_glib_none().0)) } } - fn get_children(&self) -> Vec { + pub fn get_children(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::gdk_window_get_children( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, )) } } - //fn get_children_with_user_data(&self, user_data: /*Unimplemented*/Option) -> Vec { + //pub fn get_children_with_user_data(&self, user_data: /*Unimplemented*/Option) -> Vec { // unsafe { TODO: call ffi:gdk_window_get_children_with_user_data() } //} - fn get_clip_region(&self) -> Option { - unsafe { - from_glib_full(ffi::gdk_window_get_clip_region( - self.as_ref().to_glib_none().0, - )) - } + pub fn get_clip_region(&self) -> Option { + unsafe { from_glib_full(ffi::gdk_window_get_clip_region(self.to_glib_none().0)) } } - fn get_composited(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_get_composited( - self.as_ref().to_glib_none().0, - )) - } + #[cfg_attr(feature = "v3_16", deprecated)] + pub fn get_composited(&self) -> bool { + unsafe { from_glib(ffi::gdk_window_get_composited(self.to_glib_none().0)) } } - fn get_cursor(&self) -> Option { - unsafe { from_glib_none(ffi::gdk_window_get_cursor(self.as_ref().to_glib_none().0)) } + pub fn get_cursor(&self) -> Option { + unsafe { from_glib_none(ffi::gdk_window_get_cursor(self.to_glib_none().0)) } } - fn get_decorations(&self) -> Option { + pub fn get_decorations(&self) -> Option { unsafe { let mut decorations = mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_window_get_decorations( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, decorations.as_mut_ptr(), )); let decorations = decorations.assume_init(); @@ -810,31 +350,31 @@ impl> WindowExt for O { } } - fn get_device_cursor(&self, device: &Device) -> Option { + pub fn get_device_cursor(&self, device: &Device) -> Option { unsafe { from_glib_none(ffi::gdk_window_get_device_cursor( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, device.to_glib_none().0, )) } } - fn get_device_events(&self, device: &Device) -> EventMask { + pub fn get_device_events(&self, device: &Device) -> EventMask { unsafe { from_glib(ffi::gdk_window_get_device_events( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, device.to_glib_none().0, )) } } - fn get_device_position(&self, device: &Device) -> (Option, i32, i32, ModifierType) { + pub fn get_device_position(&self, device: &Device) -> (Option, i32, i32, ModifierType) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); let mut mask = mem::MaybeUninit::uninit(); let ret = from_glib_none(ffi::gdk_window_get_device_position( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, device.to_glib_none().0, x.as_mut_ptr(), y.as_mut_ptr(), @@ -847,7 +387,7 @@ impl> WindowExt for O { } } - fn get_device_position_double( + pub fn get_device_position_double( &self, device: &Device, ) -> (Option, f64, f64, ModifierType) { @@ -856,7 +396,7 @@ impl> WindowExt for O { let mut y = mem::MaybeUninit::uninit(); let mut mask = mem::MaybeUninit::uninit(); let ret = from_glib_none(ffi::gdk_window_get_device_position_double( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, device.to_glib_none().0, x.as_mut_ptr(), y.as_mut_ptr(), @@ -869,92 +409,69 @@ impl> WindowExt for O { } } - fn get_display(&self) -> Display { - unsafe { from_glib_none(ffi::gdk_window_get_display(self.as_ref().to_glib_none().0)) } + pub fn get_display(&self) -> Display { + unsafe { from_glib_none(ffi::gdk_window_get_display(self.to_glib_none().0)) } } - fn get_drag_protocol(&self) -> (DragProtocol, Window) { + pub fn get_drag_protocol(&self) -> (DragProtocol, Window) { unsafe { let mut target = ptr::null_mut(); let ret = from_glib(ffi::gdk_window_get_drag_protocol( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, &mut target, )); (ret, from_glib_full(target)) } } - fn get_effective_parent(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_window_get_effective_parent( - self.as_ref().to_glib_none().0, - )) - } + pub fn get_effective_parent(&self) -> Option { + unsafe { from_glib_none(ffi::gdk_window_get_effective_parent(self.to_glib_none().0)) } } - fn get_effective_toplevel(&self) -> Window { + pub fn get_effective_toplevel(&self) -> Window { unsafe { from_glib_none(ffi::gdk_window_get_effective_toplevel( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, )) } } - fn get_event_compression(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_get_event_compression( - self.as_ref().to_glib_none().0, - )) - } + pub fn get_event_compression(&self) -> bool { + unsafe { from_glib(ffi::gdk_window_get_event_compression(self.to_glib_none().0)) } } - fn get_events(&self) -> EventMask { - unsafe { from_glib(ffi::gdk_window_get_events(self.as_ref().to_glib_none().0)) } + pub fn get_events(&self) -> EventMask { + unsafe { from_glib(ffi::gdk_window_get_events(self.to_glib_none().0)) } } - fn get_focus_on_map(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_get_focus_on_map( - self.as_ref().to_glib_none().0, - )) - } + pub fn get_focus_on_map(&self) -> bool { + unsafe { from_glib(ffi::gdk_window_get_focus_on_map(self.to_glib_none().0)) } } - fn get_frame_clock(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_window_get_frame_clock( - self.as_ref().to_glib_none().0, - )) - } + pub fn get_frame_clock(&self) -> Option { + unsafe { from_glib_none(ffi::gdk_window_get_frame_clock(self.to_glib_none().0)) } } - fn get_frame_extents(&self) -> Rectangle { + pub fn get_frame_extents(&self) -> Rectangle { unsafe { let mut rect = Rectangle::uninitialized(); - ffi::gdk_window_get_frame_extents( - self.as_ref().to_glib_none().0, - rect.to_glib_none_mut().0, - ); + ffi::gdk_window_get_frame_extents(self.to_glib_none().0, rect.to_glib_none_mut().0); rect } } - fn get_fullscreen_mode(&self) -> FullscreenMode { - unsafe { - from_glib(ffi::gdk_window_get_fullscreen_mode( - self.as_ref().to_glib_none().0, - )) - } + pub fn get_fullscreen_mode(&self) -> FullscreenMode { + unsafe { from_glib(ffi::gdk_window_get_fullscreen_mode(self.to_glib_none().0)) } } - fn get_geometry(&self) -> (i32, i32, i32, i32) { + pub fn get_geometry(&self) -> (i32, i32, i32, i32) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); let mut width = mem::MaybeUninit::uninit(); let mut height = mem::MaybeUninit::uninit(); ffi::gdk_window_get_geometry( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, x.as_mut_ptr(), y.as_mut_ptr(), width.as_mut_ptr(), @@ -968,72 +485,57 @@ impl> WindowExt for O { } } - fn get_group(&self) -> Option { - unsafe { from_glib_none(ffi::gdk_window_get_group(self.as_ref().to_glib_none().0)) } + pub fn get_group(&self) -> Option { + unsafe { from_glib_none(ffi::gdk_window_get_group(self.to_glib_none().0)) } } - fn get_height(&self) -> i32 { - unsafe { ffi::gdk_window_get_height(self.as_ref().to_glib_none().0) } + pub fn get_height(&self) -> i32 { + unsafe { ffi::gdk_window_get_height(self.to_glib_none().0) } } - fn get_modal_hint(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_get_modal_hint( - self.as_ref().to_glib_none().0, - )) - } + pub fn get_modal_hint(&self) -> bool { + unsafe { from_glib(ffi::gdk_window_get_modal_hint(self.to_glib_none().0)) } } - fn get_origin(&self) -> (i32, i32, i32) { + pub fn get_origin(&self) -> (i32, i32, i32) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); - let ret = ffi::gdk_window_get_origin( - self.as_ref().to_glib_none().0, - x.as_mut_ptr(), - y.as_mut_ptr(), - ); + let ret = + ffi::gdk_window_get_origin(self.to_glib_none().0, x.as_mut_ptr(), y.as_mut_ptr()); let x = x.assume_init(); let y = y.assume_init(); (ret, x, y) } } - fn get_parent(&self) -> Option { - unsafe { from_glib_none(ffi::gdk_window_get_parent(self.as_ref().to_glib_none().0)) } + pub fn get_parent(&self) -> Option { + unsafe { from_glib_none(ffi::gdk_window_get_parent(self.to_glib_none().0)) } } #[cfg(any(feature = "v3_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] - fn get_pass_through(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_get_pass_through( - self.as_ref().to_glib_none().0, - )) - } + pub fn get_pass_through(&self) -> bool { + unsafe { from_glib(ffi::gdk_window_get_pass_through(self.to_glib_none().0)) } } - fn get_position(&self) -> (i32, i32) { + pub fn get_position(&self) -> (i32, i32) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); - ffi::gdk_window_get_position( - self.as_ref().to_glib_none().0, - x.as_mut_ptr(), - y.as_mut_ptr(), - ); + ffi::gdk_window_get_position(self.to_glib_none().0, x.as_mut_ptr(), y.as_mut_ptr()); let x = x.assume_init(); let y = y.assume_init(); (x, y) } } - fn get_root_coords(&self, x: i32, y: i32) -> (i32, i32) { + pub fn get_root_coords(&self, x: i32, y: i32) -> (i32, i32) { unsafe { let mut root_x = mem::MaybeUninit::uninit(); let mut root_y = mem::MaybeUninit::uninit(); ffi::gdk_window_get_root_coords( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, x, y, root_x.as_mut_ptr(), @@ -1045,111 +547,91 @@ impl> WindowExt for O { } } - fn get_root_origin(&self) -> (i32, i32) { + pub fn get_root_origin(&self) -> (i32, i32) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); - ffi::gdk_window_get_root_origin( - self.as_ref().to_glib_none().0, - x.as_mut_ptr(), - y.as_mut_ptr(), - ); + ffi::gdk_window_get_root_origin(self.to_glib_none().0, x.as_mut_ptr(), y.as_mut_ptr()); let x = x.assume_init(); let y = y.assume_init(); (x, y) } } - fn get_scale_factor(&self) -> i32 { - unsafe { ffi::gdk_window_get_scale_factor(self.as_ref().to_glib_none().0) } + pub fn get_scale_factor(&self) -> i32 { + unsafe { ffi::gdk_window_get_scale_factor(self.to_glib_none().0) } } - fn get_screen(&self) -> Screen { - unsafe { from_glib_none(ffi::gdk_window_get_screen(self.as_ref().to_glib_none().0)) } + pub fn get_screen(&self) -> Screen { + unsafe { from_glib_none(ffi::gdk_window_get_screen(self.to_glib_none().0)) } } - fn get_source_events(&self, source: InputSource) -> EventMask { + pub fn get_source_events(&self, source: InputSource) -> EventMask { unsafe { from_glib(ffi::gdk_window_get_source_events( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, source.to_glib(), )) } } - fn get_state(&self) -> WindowState { - unsafe { from_glib(ffi::gdk_window_get_state(self.as_ref().to_glib_none().0)) } + pub fn get_state(&self) -> WindowState { + unsafe { from_glib(ffi::gdk_window_get_state(self.to_glib_none().0)) } } - fn get_support_multidevice(&self) -> bool { + pub fn get_support_multidevice(&self) -> bool { unsafe { from_glib(ffi::gdk_window_get_support_multidevice( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, )) } } - fn get_toplevel(&self) -> Window { - unsafe { from_glib_none(ffi::gdk_window_get_toplevel(self.as_ref().to_glib_none().0)) } + pub fn get_toplevel(&self) -> Window { + unsafe { from_glib_none(ffi::gdk_window_get_toplevel(self.to_glib_none().0)) } } - fn get_type_hint(&self) -> WindowTypeHint { - unsafe { - from_glib(ffi::gdk_window_get_type_hint( - self.as_ref().to_glib_none().0, - )) - } + pub fn get_type_hint(&self) -> WindowTypeHint { + unsafe { from_glib(ffi::gdk_window_get_type_hint(self.to_glib_none().0)) } } - fn get_update_area(&self) -> Option { - unsafe { - from_glib_full(ffi::gdk_window_get_update_area( - self.as_ref().to_glib_none().0, - )) - } + pub fn get_update_area(&self) -> Option { + unsafe { from_glib_full(ffi::gdk_window_get_update_area(self.to_glib_none().0)) } } - fn get_visible_region(&self) -> Option { - unsafe { - from_glib_full(ffi::gdk_window_get_visible_region( - self.as_ref().to_glib_none().0, - )) - } + pub fn get_visible_region(&self) -> Option { + unsafe { from_glib_full(ffi::gdk_window_get_visible_region(self.to_glib_none().0)) } } - fn get_visual(&self) -> Visual { - unsafe { from_glib_none(ffi::gdk_window_get_visual(self.as_ref().to_glib_none().0)) } + pub fn get_visual(&self) -> Visual { + unsafe { from_glib_none(ffi::gdk_window_get_visual(self.to_glib_none().0)) } } - fn get_width(&self) -> i32 { - unsafe { ffi::gdk_window_get_width(self.as_ref().to_glib_none().0) } + pub fn get_width(&self) -> i32 { + unsafe { ffi::gdk_window_get_width(self.to_glib_none().0) } } - fn get_window_type(&self) -> WindowType { - unsafe { - from_glib(ffi::gdk_window_get_window_type( - self.as_ref().to_glib_none().0, - )) - } + pub fn get_window_type(&self) -> WindowType { + unsafe { from_glib(ffi::gdk_window_get_window_type(self.to_glib_none().0)) } } - fn has_native(&self) -> bool { - unsafe { from_glib(ffi::gdk_window_has_native(self.as_ref().to_glib_none().0)) } + pub fn has_native(&self) -> bool { + unsafe { from_glib(ffi::gdk_window_has_native(self.to_glib_none().0)) } } - fn hide(&self) { + pub fn hide(&self) { unsafe { - ffi::gdk_window_hide(self.as_ref().to_glib_none().0); + ffi::gdk_window_hide(self.to_glib_none().0); } } - fn iconify(&self) { + pub fn iconify(&self) { unsafe { - ffi::gdk_window_iconify(self.as_ref().to_glib_none().0); + ffi::gdk_window_iconify(self.to_glib_none().0); } } - fn input_shape_combine_region( + pub fn input_shape_combine_region( &self, shape_region: &cairo::Region, offset_x: i32, @@ -1157,7 +639,7 @@ impl> WindowExt for O { ) { unsafe { ffi::gdk_window_input_shape_combine_region( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, shape_region.to_glib_none().0, offset_x, offset_y, @@ -1165,7 +647,7 @@ impl> WindowExt for O { } } - fn invalidate_maybe_recurse( + pub fn invalidate_maybe_recurse( &self, region: &cairo::Region, child_func: Option<&mut dyn (FnMut(&Window) -> bool)>, @@ -1193,7 +675,7 @@ impl> WindowExt for O { let super_callback0: &Option<&mut dyn (FnMut(&Window) -> bool)> = &child_func_data; unsafe { ffi::gdk_window_invalidate_maybe_recurse( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, region.to_glib_none().0, child_func, super_callback0 as *const _ as usize as *mut _, @@ -1201,111 +683,102 @@ impl> WindowExt for O { } } - fn invalidate_rect(&self, rect: Option<&Rectangle>, invalidate_children: bool) { + pub fn invalidate_rect(&self, rect: Option<&Rectangle>, invalidate_children: bool) { unsafe { ffi::gdk_window_invalidate_rect( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, rect.to_glib_none().0, invalidate_children.to_glib(), ); } } - fn invalidate_region(&self, region: &cairo::Region, invalidate_children: bool) { + pub fn invalidate_region(&self, region: &cairo::Region, invalidate_children: bool) { unsafe { ffi::gdk_window_invalidate_region( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, region.to_glib_none().0, invalidate_children.to_glib(), ); } } - fn is_destroyed(&self) -> bool { - unsafe { from_glib(ffi::gdk_window_is_destroyed(self.as_ref().to_glib_none().0)) } + pub fn is_destroyed(&self) -> bool { + unsafe { from_glib(ffi::gdk_window_is_destroyed(self.to_glib_none().0)) } } - fn is_input_only(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_is_input_only( - self.as_ref().to_glib_none().0, - )) - } + pub fn is_input_only(&self) -> bool { + unsafe { from_glib(ffi::gdk_window_is_input_only(self.to_glib_none().0)) } } - fn is_shaped(&self) -> bool { - unsafe { from_glib(ffi::gdk_window_is_shaped(self.as_ref().to_glib_none().0)) } + pub fn is_shaped(&self) -> bool { + unsafe { from_glib(ffi::gdk_window_is_shaped(self.to_glib_none().0)) } } - fn is_viewable(&self) -> bool { - unsafe { from_glib(ffi::gdk_window_is_viewable(self.as_ref().to_glib_none().0)) } + pub fn is_viewable(&self) -> bool { + unsafe { from_glib(ffi::gdk_window_is_viewable(self.to_glib_none().0)) } } - fn is_visible(&self) -> bool { - unsafe { from_glib(ffi::gdk_window_is_visible(self.as_ref().to_glib_none().0)) } + pub fn is_visible(&self) -> bool { + unsafe { from_glib(ffi::gdk_window_is_visible(self.to_glib_none().0)) } } - fn lower(&self) { + pub fn lower(&self) { unsafe { - ffi::gdk_window_lower(self.as_ref().to_glib_none().0); + ffi::gdk_window_lower(self.to_glib_none().0); } } #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - fn mark_paint_from_clip(&self, cr: &cairo::Context) { + pub fn mark_paint_from_clip(&self, cr: &cairo::Context) { unsafe { ffi::gdk_window_mark_paint_from_clip( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, mut_override(cr.to_glib_none().0), ); } } - fn maximize(&self) { + pub fn maximize(&self) { unsafe { - ffi::gdk_window_maximize(self.as_ref().to_glib_none().0); + ffi::gdk_window_maximize(self.to_glib_none().0); } } - fn merge_child_input_shapes(&self) { + pub fn merge_child_input_shapes(&self) { unsafe { - ffi::gdk_window_merge_child_input_shapes(self.as_ref().to_glib_none().0); + ffi::gdk_window_merge_child_input_shapes(self.to_glib_none().0); } } - fn merge_child_shapes(&self) { + pub fn merge_child_shapes(&self) { unsafe { - ffi::gdk_window_merge_child_shapes(self.as_ref().to_glib_none().0); + ffi::gdk_window_merge_child_shapes(self.to_glib_none().0); } } - fn move_(&self, x: i32, y: i32) { + pub fn move_(&self, x: i32, y: i32) { unsafe { - ffi::gdk_window_move(self.as_ref().to_glib_none().0, x, y); + ffi::gdk_window_move(self.to_glib_none().0, x, y); } } - fn move_region(&self, region: &cairo::Region, dx: i32, dy: i32) { + pub fn move_region(&self, region: &cairo::Region, dx: i32, dy: i32) { unsafe { - ffi::gdk_window_move_region( - self.as_ref().to_glib_none().0, - region.to_glib_none().0, - dx, - dy, - ); + ffi::gdk_window_move_region(self.to_glib_none().0, region.to_glib_none().0, dx, dy); } } - fn move_resize(&self, x: i32, y: i32, width: i32, height: i32) { + pub fn move_resize(&self, x: i32, y: i32, width: i32, height: i32) { unsafe { - ffi::gdk_window_move_resize(self.as_ref().to_glib_none().0, x, y, width, height); + ffi::gdk_window_move_resize(self.to_glib_none().0, x, y, width, height); } } #[cfg(any(feature = "v3_24", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_24")))] - fn move_to_rect( + pub fn move_to_rect( &self, rect: &Rectangle, rect_anchor: Gravity, @@ -1316,7 +789,7 @@ impl> WindowExt for O { ) { unsafe { ffi::gdk_window_move_to_rect( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, rect.to_glib_none().0, rect_anchor.to_glib(), window_anchor.to_glib(), @@ -1327,248 +800,231 @@ impl> WindowExt for O { } } - fn peek_children(&self) -> Vec { + pub fn peek_children(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::gdk_window_peek_children( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, )) } } - fn process_updates(&self, update_children: bool) { + #[cfg_attr(feature = "v3_22", deprecated)] + pub fn process_updates(&self, update_children: bool) { unsafe { - ffi::gdk_window_process_updates( - self.as_ref().to_glib_none().0, - update_children.to_glib(), - ); + ffi::gdk_window_process_updates(self.to_glib_none().0, update_children.to_glib()); } } - fn raise(&self) { + pub fn raise(&self) { unsafe { - ffi::gdk_window_raise(self.as_ref().to_glib_none().0); + ffi::gdk_window_raise(self.to_glib_none().0); } } - fn register_dnd(&self) { + pub fn register_dnd(&self) { unsafe { - ffi::gdk_window_register_dnd(self.as_ref().to_glib_none().0); + ffi::gdk_window_register_dnd(self.to_glib_none().0); } } - //fn remove_filter(&self, function: /*Unimplemented*/Fn(/*Unimplemented*/XEvent, &Event) -> /*Ignored*/FilterReturn, data: /*Unimplemented*/Option) { + //pub fn remove_filter(&self, function: /*Unimplemented*/Fn(/*Unimplemented*/XEvent, &Event) -> /*Ignored*/FilterReturn, data: /*Unimplemented*/Option) { // unsafe { TODO: call ffi:gdk_window_remove_filter() } //} - fn reparent>(&self, new_parent: &P, x: i32, y: i32) { + pub fn reparent(&self, new_parent: &Window, x: i32, y: i32) { unsafe { - ffi::gdk_window_reparent( - self.as_ref().to_glib_none().0, - new_parent.as_ref().to_glib_none().0, - x, - y, - ); + ffi::gdk_window_reparent(self.to_glib_none().0, new_parent.to_glib_none().0, x, y); } } - fn resize(&self, width: i32, height: i32) { + pub fn resize(&self, width: i32, height: i32) { unsafe { - ffi::gdk_window_resize(self.as_ref().to_glib_none().0, width, height); + ffi::gdk_window_resize(self.to_glib_none().0, width, height); } } - fn restack>(&self, sibling: Option<&P>, above: bool) { + pub fn restack(&self, sibling: Option<&Window>, above: bool) { unsafe { ffi::gdk_window_restack( - self.as_ref().to_glib_none().0, - sibling.map(|p| p.as_ref()).to_glib_none().0, + self.to_glib_none().0, + sibling.to_glib_none().0, above.to_glib(), ); } } - fn scroll(&self, dx: i32, dy: i32) { + pub fn scroll(&self, dx: i32, dy: i32) { unsafe { - ffi::gdk_window_scroll(self.as_ref().to_glib_none().0, dx, dy); + ffi::gdk_window_scroll(self.to_glib_none().0, dx, dy); } } - fn set_accept_focus(&self, accept_focus: bool) { + pub fn set_accept_focus(&self, accept_focus: bool) { unsafe { - ffi::gdk_window_set_accept_focus( - self.as_ref().to_glib_none().0, - accept_focus.to_glib(), - ); + ffi::gdk_window_set_accept_focus(self.to_glib_none().0, accept_focus.to_glib()); } } - fn set_background_rgba(&self, rgba: &RGBA) { + #[cfg_attr(feature = "v3_22", deprecated)] + pub fn set_background_rgba(&self, rgba: &RGBA) { unsafe { - ffi::gdk_window_set_background_rgba( - self.as_ref().to_glib_none().0, - rgba.to_glib_none().0, - ); + ffi::gdk_window_set_background_rgba(self.to_glib_none().0, rgba.to_glib_none().0); } } - fn set_child_input_shapes(&self) { + pub fn set_child_input_shapes(&self) { unsafe { - ffi::gdk_window_set_child_input_shapes(self.as_ref().to_glib_none().0); + ffi::gdk_window_set_child_input_shapes(self.to_glib_none().0); } } - fn set_child_shapes(&self) { + pub fn set_child_shapes(&self) { unsafe { - ffi::gdk_window_set_child_shapes(self.as_ref().to_glib_none().0); + ffi::gdk_window_set_child_shapes(self.to_glib_none().0); } } - fn set_composited(&self, composited: bool) { + #[cfg_attr(feature = "v3_16", deprecated)] + pub fn set_composited(&self, composited: bool) { unsafe { - ffi::gdk_window_set_composited(self.as_ref().to_glib_none().0, composited.to_glib()); + ffi::gdk_window_set_composited(self.to_glib_none().0, composited.to_glib()); } } - fn set_cursor(&self, cursor: Option<&Cursor>) { + pub fn set_cursor(&self, cursor: Option<&Cursor>) { unsafe { - ffi::gdk_window_set_cursor(self.as_ref().to_glib_none().0, cursor.to_glib_none().0); + ffi::gdk_window_set_cursor(self.to_glib_none().0, cursor.to_glib_none().0); } } - fn set_decorations(&self, decorations: WMDecoration) { + pub fn set_decorations(&self, decorations: WMDecoration) { unsafe { - ffi::gdk_window_set_decorations(self.as_ref().to_glib_none().0, decorations.to_glib()); + ffi::gdk_window_set_decorations(self.to_glib_none().0, decorations.to_glib()); } } - fn set_device_cursor(&self, device: &Device, cursor: &Cursor) { + pub fn set_device_cursor(&self, device: &Device, cursor: &Cursor) { unsafe { ffi::gdk_window_set_device_cursor( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, device.to_glib_none().0, cursor.to_glib_none().0, ); } } - fn set_device_events(&self, device: &Device, event_mask: EventMask) { + pub fn set_device_events(&self, device: &Device, event_mask: EventMask) { unsafe { ffi::gdk_window_set_device_events( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, device.to_glib_none().0, event_mask.to_glib(), ); } } - fn set_event_compression(&self, event_compression: bool) { + pub fn set_event_compression(&self, event_compression: bool) { unsafe { ffi::gdk_window_set_event_compression( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, event_compression.to_glib(), ); } } - fn set_events(&self, event_mask: EventMask) { + pub fn set_events(&self, event_mask: EventMask) { unsafe { - ffi::gdk_window_set_events(self.as_ref().to_glib_none().0, event_mask.to_glib()); + ffi::gdk_window_set_events(self.to_glib_none().0, event_mask.to_glib()); } } - fn set_focus_on_map(&self, focus_on_map: bool) { + pub fn set_focus_on_map(&self, focus_on_map: bool) { unsafe { - ffi::gdk_window_set_focus_on_map( - self.as_ref().to_glib_none().0, - focus_on_map.to_glib(), - ); + ffi::gdk_window_set_focus_on_map(self.to_glib_none().0, focus_on_map.to_glib()); } } - fn set_fullscreen_mode(&self, mode: FullscreenMode) { + pub fn set_fullscreen_mode(&self, mode: FullscreenMode) { unsafe { - ffi::gdk_window_set_fullscreen_mode(self.as_ref().to_glib_none().0, mode.to_glib()); + ffi::gdk_window_set_fullscreen_mode(self.to_glib_none().0, mode.to_glib()); } } - fn set_functions(&self, functions: WMFunction) { + pub fn set_functions(&self, functions: WMFunction) { unsafe { - ffi::gdk_window_set_functions(self.as_ref().to_glib_none().0, functions.to_glib()); + ffi::gdk_window_set_functions(self.to_glib_none().0, functions.to_glib()); } } - fn set_geometry_hints(&self, geometry: &Geometry, geom_mask: WindowHints) { + pub fn set_geometry_hints(&self, geometry: &Geometry, geom_mask: WindowHints) { unsafe { ffi::gdk_window_set_geometry_hints( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, geometry.to_glib_none().0, geom_mask.to_glib(), ); } } - fn set_group>(&self, leader: Option<&P>) { + pub fn set_group(&self, leader: Option<&Window>) { unsafe { - ffi::gdk_window_set_group( - self.as_ref().to_glib_none().0, - leader.map(|p| p.as_ref()).to_glib_none().0, - ); + ffi::gdk_window_set_group(self.to_glib_none().0, leader.to_glib_none().0); } } - fn set_icon_list(&self, pixbufs: &[gdk_pixbuf::Pixbuf]) { + pub fn set_icon_list(&self, pixbufs: &[gdk_pixbuf::Pixbuf]) { unsafe { - ffi::gdk_window_set_icon_list(self.as_ref().to_glib_none().0, pixbufs.to_glib_none().0); + ffi::gdk_window_set_icon_list(self.to_glib_none().0, pixbufs.to_glib_none().0); } } - fn set_icon_name(&self, name: Option<&str>) { + pub fn set_icon_name(&self, name: Option<&str>) { unsafe { - ffi::gdk_window_set_icon_name(self.as_ref().to_glib_none().0, name.to_glib_none().0); + ffi::gdk_window_set_icon_name(self.to_glib_none().0, name.to_glib_none().0); } } - //fn set_invalidate_handler(&self, handler: P) { + //pub fn set_invalidate_handler(&self, handler: P) { // unsafe { TODO: call ffi:gdk_window_set_invalidate_handler() } //} - fn set_keep_above(&self, setting: bool) { + pub fn set_keep_above(&self, setting: bool) { unsafe { - ffi::gdk_window_set_keep_above(self.as_ref().to_glib_none().0, setting.to_glib()); + ffi::gdk_window_set_keep_above(self.to_glib_none().0, setting.to_glib()); } } - fn set_keep_below(&self, setting: bool) { + pub fn set_keep_below(&self, setting: bool) { unsafe { - ffi::gdk_window_set_keep_below(self.as_ref().to_glib_none().0, setting.to_glib()); + ffi::gdk_window_set_keep_below(self.to_glib_none().0, setting.to_glib()); } } - fn set_modal_hint(&self, modal: bool) { + pub fn set_modal_hint(&self, modal: bool) { unsafe { - ffi::gdk_window_set_modal_hint(self.as_ref().to_glib_none().0, modal.to_glib()); + ffi::gdk_window_set_modal_hint(self.to_glib_none().0, modal.to_glib()); } } - fn set_opacity(&self, opacity: f64) { + pub fn set_opacity(&self, opacity: f64) { unsafe { - ffi::gdk_window_set_opacity(self.as_ref().to_glib_none().0, opacity); + ffi::gdk_window_set_opacity(self.to_glib_none().0, opacity); } } - fn set_opaque_region(&self, region: Option<&cairo::Region>) { + pub fn set_opaque_region(&self, region: Option<&cairo::Region>) { unsafe { ffi::gdk_window_set_opaque_region( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, mut_override(region.to_glib_none().0), ); } } - fn set_override_redirect(&self, override_redirect: bool) { + pub fn set_override_redirect(&self, override_redirect: bool) { unsafe { ffi::gdk_window_set_override_redirect( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, override_redirect.to_glib(), ); } @@ -1576,116 +1032,96 @@ impl> WindowExt for O { #[cfg(any(feature = "v3_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] - fn set_pass_through(&self, pass_through: bool) { + pub fn set_pass_through(&self, pass_through: bool) { unsafe { - ffi::gdk_window_set_pass_through( - self.as_ref().to_glib_none().0, - pass_through.to_glib(), - ); + ffi::gdk_window_set_pass_through(self.to_glib_none().0, pass_through.to_glib()); } } - fn set_role(&self, role: &str) { + pub fn set_role(&self, role: &str) { unsafe { - ffi::gdk_window_set_role(self.as_ref().to_glib_none().0, role.to_glib_none().0); + ffi::gdk_window_set_role(self.to_glib_none().0, role.to_glib_none().0); } } - fn set_shadow_width(&self, left: i32, right: i32, top: i32, bottom: i32) { + pub fn set_shadow_width(&self, left: i32, right: i32, top: i32, bottom: i32) { unsafe { - ffi::gdk_window_set_shadow_width( - self.as_ref().to_glib_none().0, - left, - right, - top, - bottom, - ); + ffi::gdk_window_set_shadow_width(self.to_glib_none().0, left, right, top, bottom); } } - fn set_skip_pager_hint(&self, skips_pager: bool) { + pub fn set_skip_pager_hint(&self, skips_pager: bool) { unsafe { - ffi::gdk_window_set_skip_pager_hint( - self.as_ref().to_glib_none().0, - skips_pager.to_glib(), - ); + ffi::gdk_window_set_skip_pager_hint(self.to_glib_none().0, skips_pager.to_glib()); } } - fn set_skip_taskbar_hint(&self, skips_taskbar: bool) { + pub fn set_skip_taskbar_hint(&self, skips_taskbar: bool) { unsafe { - ffi::gdk_window_set_skip_taskbar_hint( - self.as_ref().to_glib_none().0, - skips_taskbar.to_glib(), - ); + ffi::gdk_window_set_skip_taskbar_hint(self.to_glib_none().0, skips_taskbar.to_glib()); } } - fn set_source_events(&self, source: InputSource, event_mask: EventMask) { + pub fn set_source_events(&self, source: InputSource, event_mask: EventMask) { unsafe { ffi::gdk_window_set_source_events( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, source.to_glib(), event_mask.to_glib(), ); } } - fn set_startup_id(&self, startup_id: &str) { + pub fn set_startup_id(&self, startup_id: &str) { unsafe { - ffi::gdk_window_set_startup_id( - self.as_ref().to_glib_none().0, - startup_id.to_glib_none().0, - ); + ffi::gdk_window_set_startup_id(self.to_glib_none().0, startup_id.to_glib_none().0); } } - fn set_static_gravities(&self, use_static: bool) -> bool { + #[cfg_attr(feature = "v3_16", deprecated)] + pub fn set_static_gravities(&self, use_static: bool) -> bool { unsafe { from_glib(ffi::gdk_window_set_static_gravities( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, use_static.to_glib(), )) } } - fn set_support_multidevice(&self, support_multidevice: bool) { + pub fn set_support_multidevice(&self, support_multidevice: bool) { unsafe { ffi::gdk_window_set_support_multidevice( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, support_multidevice.to_glib(), ); } } - fn set_title(&self, title: &str) { + pub fn set_title(&self, title: &str) { unsafe { - ffi::gdk_window_set_title(self.as_ref().to_glib_none().0, title.to_glib_none().0); + ffi::gdk_window_set_title(self.to_glib_none().0, title.to_glib_none().0); } } - fn set_transient_for>(&self, parent: &P) { + pub fn set_transient_for(&self, parent: &Window) { unsafe { - ffi::gdk_window_set_transient_for( - self.as_ref().to_glib_none().0, - parent.as_ref().to_glib_none().0, - ); + ffi::gdk_window_set_transient_for(self.to_glib_none().0, parent.to_glib_none().0); } } - fn set_type_hint(&self, hint: WindowTypeHint) { + pub fn set_type_hint(&self, hint: WindowTypeHint) { unsafe { - ffi::gdk_window_set_type_hint(self.as_ref().to_glib_none().0, hint.to_glib()); + ffi::gdk_window_set_type_hint(self.to_glib_none().0, hint.to_glib()); } } - fn set_urgency_hint(&self, urgent: bool) { + pub fn set_urgency_hint(&self, urgent: bool) { unsafe { - ffi::gdk_window_set_urgency_hint(self.as_ref().to_glib_none().0, urgent.to_glib()); + ffi::gdk_window_set_urgency_hint(self.to_glib_none().0, urgent.to_glib()); } } - fn shape_combine_region( + pub fn shape_combine_region( &self, shape_region: Option<&cairo::Region>, offset_x: i32, @@ -1693,7 +1129,7 @@ impl> WindowExt for O { ) { unsafe { ffi::gdk_window_shape_combine_region( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, shape_region.to_glib_none().0, offset_x, offset_y, @@ -1701,92 +1137,124 @@ impl> WindowExt for O { } } - fn show(&self) { + pub fn show(&self) { unsafe { - ffi::gdk_window_show(self.as_ref().to_glib_none().0); + ffi::gdk_window_show(self.to_glib_none().0); } } - fn show_unraised(&self) { + pub fn show_unraised(&self) { unsafe { - ffi::gdk_window_show_unraised(self.as_ref().to_glib_none().0); + ffi::gdk_window_show_unraised(self.to_glib_none().0); } } - fn show_window_menu(&self, event: &mut Event) -> bool { + pub fn show_window_menu(&self, event: &mut Event) -> bool { unsafe { from_glib(ffi::gdk_window_show_window_menu( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, event.to_glib_none_mut().0, )) } } - fn stick(&self) { + pub fn stick(&self) { unsafe { - ffi::gdk_window_stick(self.as_ref().to_glib_none().0); + ffi::gdk_window_stick(self.to_glib_none().0); } } - fn thaw_toplevel_updates_libgtk_only(&self) { + #[cfg_attr(feature = "v3_16", deprecated)] + pub fn thaw_toplevel_updates_libgtk_only(&self) { unsafe { - ffi::gdk_window_thaw_toplevel_updates_libgtk_only(self.as_ref().to_glib_none().0); + ffi::gdk_window_thaw_toplevel_updates_libgtk_only(self.to_glib_none().0); } } - fn thaw_updates(&self) { + pub fn thaw_updates(&self) { unsafe { - ffi::gdk_window_thaw_updates(self.as_ref().to_glib_none().0); + ffi::gdk_window_thaw_updates(self.to_glib_none().0); } } - fn unfullscreen(&self) { + pub fn unfullscreen(&self) { unsafe { - ffi::gdk_window_unfullscreen(self.as_ref().to_glib_none().0); + ffi::gdk_window_unfullscreen(self.to_glib_none().0); } } - fn unmaximize(&self) { + pub fn unmaximize(&self) { unsafe { - ffi::gdk_window_unmaximize(self.as_ref().to_glib_none().0); + ffi::gdk_window_unmaximize(self.to_glib_none().0); + } + } + + pub fn unstick(&self) { + unsafe { + ffi::gdk_window_unstick(self.to_glib_none().0); + } + } + + pub fn withdraw(&self) { + unsafe { + ffi::gdk_window_withdraw(self.to_glib_none().0); + } + } + + pub fn constrain_size( + geometry: &mut Geometry, + flags: WindowHints, + width: i32, + height: i32, + ) -> (i32, i32) { + assert_initialized_main_thread!(); + unsafe { + let mut new_width = mem::MaybeUninit::uninit(); + let mut new_height = mem::MaybeUninit::uninit(); + ffi::gdk_window_constrain_size( + geometry.to_glib_none_mut().0, + flags.to_glib(), + width, + height, + new_width.as_mut_ptr(), + new_height.as_mut_ptr(), + ); + let new_width = new_width.assume_init(); + let new_height = new_height.assume_init(); + (new_width, new_height) } } - fn unstick(&self) { + #[cfg_attr(feature = "v3_22", deprecated)] + pub fn process_all_updates() { + assert_initialized_main_thread!(); unsafe { - ffi::gdk_window_unstick(self.as_ref().to_glib_none().0); + ffi::gdk_window_process_all_updates(); } } - fn withdraw(&self) { + #[cfg_attr(feature = "v3_22", deprecated)] + pub fn set_debug_updates(setting: bool) { + assert_initialized_main_thread!(); unsafe { - ffi::gdk_window_withdraw(self.as_ref().to_glib_none().0); + ffi::gdk_window_set_debug_updates(setting.to_glib()); } } - fn connect_create_surface cairo::Surface + 'static>( + pub fn connect_create_surface cairo::Surface + 'static>( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn create_surface_trampoline< - P, - F: Fn(&P, i32, i32) -> cairo::Surface + 'static, + F: Fn(&Window, i32, i32) -> cairo::Surface + 'static, >( this: *mut ffi::GdkWindow, width: libc::c_int, height: libc::c_int, f: glib::ffi::gpointer, - ) -> *mut cairo::ffi::cairo_surface_t - where - P: IsA, - { + ) -> *mut cairo::ffi::cairo_surface_t { let f: &F = &*(f as *const F); - f( - &Window::from_glib_borrow(this).unsafe_cast_ref(), - width, - height, - ) - .to_glib_full() + f(&from_glib_borrow(this), width, height).to_glib_full() } unsafe { let f: Box_ = Box_::new(f); @@ -1794,43 +1262,39 @@ impl> WindowExt for O { self.as_ptr() as *mut _, b"create-surface\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( - create_surface_trampoline:: as *const (), + create_surface_trampoline:: as *const (), )), Box_::into_raw(f), ) } } - //fn connect_from_embedder(&self, f: F) -> SignalHandlerId { + //pub fn connect_from_embedder(&self, f: F) -> SignalHandlerId { // Out offscreen_x: *.Double // Out offscreen_y: *.Double //} //#[cfg(any(feature = "v3_22", feature = "dox"))] //#[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - //fn connect_moved_to_rect(&self, f: F) -> SignalHandlerId { + //pub fn connect_moved_to_rect(&self, f: F) -> SignalHandlerId { // Unimplemented flipped_rect: *.Pointer // Unimplemented final_rect: *.Pointer //} - fn connect_pick_embedded_child Option + 'static>( + pub fn connect_pick_embedded_child Option + 'static>( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn pick_embedded_child_trampoline< - P, - F: Fn(&P, f64, f64) -> Option + 'static, + F: Fn(&Window, f64, f64) -> Option + 'static, >( this: *mut ffi::GdkWindow, x: libc::c_double, y: libc::c_double, f: glib::ffi::gpointer, - ) -> *mut ffi::GdkWindow - where - P: IsA, - { + ) -> *mut ffi::GdkWindow { let f: &F = &*(f as *const F); - f(&Window::from_glib_borrow(this).unsafe_cast_ref(), x, y) /*Not checked*/ + f(&from_glib_borrow(this), x, y) /*Not checked*/ .to_glib_none() .0 } @@ -1840,28 +1304,29 @@ impl> WindowExt for O { self.as_ptr() as *mut _, b"pick-embedded-child\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( - pick_embedded_child_trampoline:: as *const (), + pick_embedded_child_trampoline:: as *const (), )), Box_::into_raw(f), ) } } - //fn connect_to_embedder(&self, f: F) -> SignalHandlerId { + //pub fn connect_to_embedder(&self, f: F) -> SignalHandlerId { // Out embedder_x: *.Double // Out embedder_y: *.Double //} - fn connect_property_cursor_notify(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn notify_cursor_trampoline( + pub fn connect_property_cursor_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_cursor_trampoline( this: *mut ffi::GdkWindow, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, - ) where - P: IsA, - { + ) { let f: &F = &*(f as *const F); - f(&Window::from_glib_borrow(this).unsafe_cast_ref()) + f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); @@ -1869,7 +1334,7 @@ impl> WindowExt for O { self.as_ptr() as *mut _, b"notify::cursor\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( - notify_cursor_trampoline:: as *const (), + notify_cursor_trampoline:: as *const (), )), Box_::into_raw(f), ) diff --git a/gdk/sys/versions.txt b/gdk/sys/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/gdk/sys/versions.txt +++ b/gdk/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/gdkx11/src/auto/versions.txt b/gdkx11/src/auto/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/gdkx11/src/auto/versions.txt +++ b/gdkx11/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/gdkx11/sys/versions.txt b/gdkx11/sys/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/gdkx11/sys/versions.txt +++ b/gdkx11/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/gio/src/auto/charset_converter.rs b/gio/src/auto/charset_converter.rs index 178ad9dc86b7..75b328a1a28c 100644 --- a/gio/src/auto/charset_converter.rs +++ b/gio/src/auto/charset_converter.rs @@ -4,7 +4,7 @@ use crate::Converter; use glib::object::Cast; -use glib::object::IsA; +use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; @@ -39,98 +39,33 @@ impl CharsetConverter { } } } -} -#[derive(Clone, Default)] -pub struct CharsetConverterBuilder { - from_charset: Option, - to_charset: Option, - use_fallback: Option, -} - -impl CharsetConverterBuilder { - pub fn new() -> Self { - Self::default() + pub fn get_num_fallbacks(&self) -> u32 { + unsafe { ffi::g_charset_converter_get_num_fallbacks(self.to_glib_none().0) } } - pub fn build(self) -> CharsetConverter { - let mut properties: Vec<(&str, &dyn ToValue)> = vec![]; - if let Some(ref from_charset) = self.from_charset { - properties.push(("from-charset", from_charset)); - } - if let Some(ref to_charset) = self.to_charset { - properties.push(("to-charset", to_charset)); - } - if let Some(ref use_fallback) = self.use_fallback { - properties.push(("use-fallback", use_fallback)); - } - let ret = glib::Object::new(CharsetConverter::static_type(), &properties) - .expect("object new") - .downcast::() - .expect("downcast"); - ret - } - - pub fn from_charset(mut self, from_charset: &str) -> Self { - self.from_charset = Some(from_charset.to_string()); - self - } - - pub fn to_charset(mut self, to_charset: &str) -> Self { - self.to_charset = Some(to_charset.to_string()); - self - } - - pub fn use_fallback(mut self, use_fallback: bool) -> Self { - self.use_fallback = Some(use_fallback); - self - } -} - -pub const NONE_CHARSET_CONVERTER: Option<&CharsetConverter> = None; - -pub trait CharsetConverterExt: 'static { - fn get_num_fallbacks(&self) -> u32; - - fn get_use_fallback(&self) -> bool; - - fn set_use_fallback(&self, use_fallback: bool); - - fn get_property_from_charset(&self) -> Option; - - fn get_property_to_charset(&self) -> Option; - - fn connect_property_use_fallback_notify(&self, f: F) - -> SignalHandlerId; -} - -impl> CharsetConverterExt for O { - fn get_num_fallbacks(&self) -> u32 { - unsafe { ffi::g_charset_converter_get_num_fallbacks(self.as_ref().to_glib_none().0) } - } - - fn get_use_fallback(&self) -> bool { + pub fn get_use_fallback(&self) -> bool { unsafe { from_glib(ffi::g_charset_converter_get_use_fallback( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, )) } } - fn set_use_fallback(&self, use_fallback: bool) { + pub fn set_use_fallback(&self, use_fallback: bool) { unsafe { ffi::g_charset_converter_set_use_fallback( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, use_fallback.to_glib(), ); } } - fn get_property_from_charset(&self) -> Option { + pub fn get_property_from_charset(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( - self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"from-charset\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -140,11 +75,11 @@ impl> CharsetConverterExt for O { } } - fn get_property_to_charset(&self) -> Option { + pub fn get_property_to_charset(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( - self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"to-charset\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -154,19 +89,17 @@ impl> CharsetConverterExt for O { } } - fn connect_property_use_fallback_notify( + pub fn connect_property_use_fallback_notify( &self, f: F, ) -> SignalHandlerId { - unsafe extern "C" fn notify_use_fallback_trampoline( + unsafe extern "C" fn notify_use_fallback_trampoline( this: *mut ffi::GCharsetConverter, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, - ) where - P: IsA, - { + ) { let f: &F = &*(f as *const F); - f(&CharsetConverter::from_glib_borrow(this).unsafe_cast_ref()) + f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); @@ -174,7 +107,7 @@ impl> CharsetConverterExt for O { self.as_ptr() as *mut _, b"notify::use-fallback\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( - notify_use_fallback_trampoline:: as *const (), + notify_use_fallback_trampoline:: as *const (), )), Box_::into_raw(f), ) @@ -182,6 +115,52 @@ impl> CharsetConverterExt for O { } } +#[derive(Clone, Default)] +pub struct CharsetConverterBuilder { + from_charset: Option, + to_charset: Option, + use_fallback: Option, +} + +impl CharsetConverterBuilder { + pub fn new() -> Self { + Self::default() + } + + pub fn build(self) -> CharsetConverter { + let mut properties: Vec<(&str, &dyn ToValue)> = vec![]; + if let Some(ref from_charset) = self.from_charset { + properties.push(("from-charset", from_charset)); + } + if let Some(ref to_charset) = self.to_charset { + properties.push(("to-charset", to_charset)); + } + if let Some(ref use_fallback) = self.use_fallback { + properties.push(("use-fallback", use_fallback)); + } + let ret = glib::Object::new(CharsetConverter::static_type(), &properties) + .expect("object new") + .downcast::() + .expect("downcast"); + ret + } + + pub fn from_charset(mut self, from_charset: &str) -> Self { + self.from_charset = Some(from_charset.to_string()); + self + } + + pub fn to_charset(mut self, to_charset: &str) -> Self { + self.to_charset = Some(to_charset.to_string()); + self + } + + pub fn use_fallback(mut self, use_fallback: bool) -> Self { + self.use_fallback = Some(use_fallback); + self + } +} + impl fmt::Display for CharsetConverter { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("CharsetConverter") diff --git a/gio/src/auto/desktop_app_info.rs b/gio/src/auto/desktop_app_info.rs index 8b65123f1d00..3c53c4e2543e 100644 --- a/gio/src/auto/desktop_app_info.rs +++ b/gio/src/auto/desktop_app_info.rs @@ -42,167 +42,92 @@ impl DesktopAppInfo { } } - pub fn get_implementations(interface: &str) -> Vec { - unsafe { - FromGlibPtrContainer::from_glib_full(ffi::g_desktop_app_info_get_implementations( - interface.to_glib_none().0, - )) - } - } -} - -pub const NONE_DESKTOP_APP_INFO: Option<&DesktopAppInfo> = None; - -pub trait DesktopAppInfoExt: 'static { - fn get_action_name(&self, action_name: &str) -> Option; - - fn get_boolean(&self, key: &str) -> bool; - - fn get_categories(&self) -> Option; - - fn get_filename(&self) -> Option; - - fn get_generic_name(&self) -> Option; - - fn get_is_hidden(&self) -> bool; - - fn get_keywords(&self) -> Vec; - - #[cfg(any(feature = "v2_56", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_56")))] - fn get_locale_string(&self, key: &str) -> Option; - - fn get_nodisplay(&self) -> bool; - - fn get_show_in(&self, desktop_env: Option<&str>) -> bool; - - fn get_startup_wm_class(&self) -> Option; - - fn get_string(&self, key: &str) -> Option; - - #[cfg(any(feature = "v2_60", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_60")))] - fn get_string_list(&self, key: &str) -> Vec; - - fn has_key(&self, key: &str) -> bool; - - fn launch_action>( - &self, - action_name: &str, - launch_context: Option<&P>, - ); - - fn launch_uris_as_manager>( - &self, - uris: &[&str], - launch_context: Option<&P>, - spawn_flags: glib::SpawnFlags, - user_setup: Option>, - pid_callback: Option<&mut dyn (FnMut(&DesktopAppInfo, glib::Pid))>, - ) -> Result<(), glib::Error>; - - fn list_actions(&self) -> Vec; -} - -impl> DesktopAppInfoExt for O { - fn get_action_name(&self, action_name: &str) -> Option { + pub fn get_action_name(&self, action_name: &str) -> Option { unsafe { from_glib_full(ffi::g_desktop_app_info_get_action_name( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, action_name.to_glib_none().0, )) } } - fn get_boolean(&self, key: &str) -> bool { + pub fn get_boolean(&self, key: &str) -> bool { unsafe { from_glib(ffi::g_desktop_app_info_get_boolean( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, key.to_glib_none().0, )) } } - fn get_categories(&self) -> Option { + pub fn get_categories(&self) -> Option { unsafe { from_glib_none(ffi::g_desktop_app_info_get_categories( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, )) } } - fn get_filename(&self) -> Option { - unsafe { - from_glib_none(ffi::g_desktop_app_info_get_filename( - self.as_ref().to_glib_none().0, - )) - } + pub fn get_filename(&self) -> Option { + unsafe { from_glib_none(ffi::g_desktop_app_info_get_filename(self.to_glib_none().0)) } } - fn get_generic_name(&self) -> Option { + pub fn get_generic_name(&self) -> Option { unsafe { from_glib_none(ffi::g_desktop_app_info_get_generic_name( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, )) } } - fn get_is_hidden(&self) -> bool { - unsafe { - from_glib(ffi::g_desktop_app_info_get_is_hidden( - self.as_ref().to_glib_none().0, - )) - } + pub fn get_is_hidden(&self) -> bool { + unsafe { from_glib(ffi::g_desktop_app_info_get_is_hidden(self.to_glib_none().0)) } } - fn get_keywords(&self) -> Vec { + pub fn get_keywords(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::g_desktop_app_info_get_keywords( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, )) } } #[cfg(any(feature = "v2_56", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_56")))] - fn get_locale_string(&self, key: &str) -> Option { + pub fn get_locale_string(&self, key: &str) -> Option { unsafe { from_glib_full(ffi::g_desktop_app_info_get_locale_string( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, key.to_glib_none().0, )) } } - fn get_nodisplay(&self) -> bool { - unsafe { - from_glib(ffi::g_desktop_app_info_get_nodisplay( - self.as_ref().to_glib_none().0, - )) - } + pub fn get_nodisplay(&self) -> bool { + unsafe { from_glib(ffi::g_desktop_app_info_get_nodisplay(self.to_glib_none().0)) } } - fn get_show_in(&self, desktop_env: Option<&str>) -> bool { + pub fn get_show_in(&self, desktop_env: Option<&str>) -> bool { unsafe { from_glib(ffi::g_desktop_app_info_get_show_in( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, desktop_env.to_glib_none().0, )) } } - fn get_startup_wm_class(&self) -> Option { + pub fn get_startup_wm_class(&self) -> Option { unsafe { from_glib_none(ffi::g_desktop_app_info_get_startup_wm_class( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, )) } } - fn get_string(&self, key: &str) -> Option { + pub fn get_string(&self, key: &str) -> Option { unsafe { from_glib_full(ffi::g_desktop_app_info_get_string( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, key.to_glib_none().0, )) } @@ -210,12 +135,12 @@ impl> DesktopAppInfoExt for O { #[cfg(any(feature = "v2_60", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_60")))] - fn get_string_list(&self, key: &str) -> Vec { + pub fn get_string_list(&self, key: &str) -> Vec { unsafe { let mut length = mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_full_num( ffi::g_desktop_app_info_get_string_list( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, key.to_glib_none().0, length.as_mut_ptr(), ), @@ -225,30 +150,30 @@ impl> DesktopAppInfoExt for O { } } - fn has_key(&self, key: &str) -> bool { + pub fn has_key(&self, key: &str) -> bool { unsafe { from_glib(ffi::g_desktop_app_info_has_key( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, key.to_glib_none().0, )) } } - fn launch_action>( + pub fn launch_action>( &self, action_name: &str, launch_context: Option<&P>, ) { unsafe { ffi::g_desktop_app_info_launch_action( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, action_name.to_glib_none().0, launch_context.map(|p| p.as_ref()).to_glib_none().0, ); } } - fn launch_uris_as_manager>( + pub fn launch_uris_as_manager>( &self, uris: &[&str], launch_context: Option<&P>, @@ -298,7 +223,7 @@ impl> DesktopAppInfoExt for O { unsafe { let mut error = ptr::null_mut(); let _ = ffi::g_desktop_app_info_launch_uris_as_manager( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, uris.to_glib_none().0, launch_context.map(|p| p.as_ref()).to_glib_none().0, spawn_flags.to_glib(), @@ -316,10 +241,18 @@ impl> DesktopAppInfoExt for O { } } - fn list_actions(&self) -> Vec { + pub fn list_actions(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::g_desktop_app_info_list_actions( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, + )) + } + } + + pub fn get_implementations(interface: &str) -> Vec { + unsafe { + FromGlibPtrContainer::from_glib_full(ffi::g_desktop_app_info_get_implementations( + interface.to_glib_none().0, )) } } diff --git a/gio/src/auto/filename_completer.rs b/gio/src/auto/filename_completer.rs index ea4a1ed2516e..783a25e4b44f 100644 --- a/gio/src/auto/filename_completer.rs +++ b/gio/src/auto/filename_completer.rs @@ -2,8 +2,7 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use glib::object::Cast; -use glib::object::IsA; +use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; @@ -23,63 +22,41 @@ impl FilenameCompleter { pub fn new() -> FilenameCompleter { unsafe { from_glib_full(ffi::g_filename_completer_new()) } } -} - -impl Default for FilenameCompleter { - fn default() -> Self { - Self::new() - } -} - -pub const NONE_FILENAME_COMPLETER: Option<&FilenameCompleter> = None; - -pub trait FilenameCompleterExt: 'static { - fn get_completion_suffix(&self, initial_text: &str) -> Option; - - fn get_completions(&self, initial_text: &str) -> Vec; - fn set_dirs_only(&self, dirs_only: bool); - - fn connect_got_completion_data(&self, f: F) -> SignalHandlerId; -} - -impl> FilenameCompleterExt for O { - fn get_completion_suffix(&self, initial_text: &str) -> Option { + pub fn get_completion_suffix(&self, initial_text: &str) -> Option { unsafe { from_glib_full(ffi::g_filename_completer_get_completion_suffix( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, initial_text.to_glib_none().0, )) } } - fn get_completions(&self, initial_text: &str) -> Vec { + pub fn get_completions(&self, initial_text: &str) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_filename_completer_get_completions( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, initial_text.to_glib_none().0, )) } } - fn set_dirs_only(&self, dirs_only: bool) { + pub fn set_dirs_only(&self, dirs_only: bool) { unsafe { - ffi::g_filename_completer_set_dirs_only( - self.as_ref().to_glib_none().0, - dirs_only.to_glib(), - ); + ffi::g_filename_completer_set_dirs_only(self.to_glib_none().0, dirs_only.to_glib()); } } - fn connect_got_completion_data(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn got_completion_data_trampoline( + pub fn connect_got_completion_data( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn got_completion_data_trampoline( this: *mut ffi::GFilenameCompleter, f: glib::ffi::gpointer, - ) where - P: IsA, - { + ) { let f: &F = &*(f as *const F); - f(&FilenameCompleter::from_glib_borrow(this).unsafe_cast_ref()) + f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); @@ -87,7 +64,7 @@ impl> FilenameCompleterExt for O { self.as_ptr() as *mut _, b"got-completion-data\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( - got_completion_data_trampoline:: as *const (), + got_completion_data_trampoline:: as *const (), )), Box_::into_raw(f), ) @@ -95,6 +72,12 @@ impl> FilenameCompleterExt for O { } } +impl Default for FilenameCompleter { + fn default() -> Self { + Self::new() + } +} + impl fmt::Display for FilenameCompleter { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("FilenameCompleter") diff --git a/gio/src/auto/list_store.rs b/gio/src/auto/list_store.rs index be2bf535183c..54305c8359e8 100644 --- a/gio/src/auto/list_store.rs +++ b/gio/src/auto/list_store.rs @@ -4,6 +4,8 @@ use crate::ListModel; use glib::object::Cast; +#[cfg(any(feature = "v2_44", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] use glib::object::IsA; use glib::translate::*; use glib::StaticType; @@ -27,92 +29,22 @@ impl ListStore { pub fn new(item_type: glib::types::Type) -> ListStore { unsafe { from_glib_full(ffi::g_list_store_new(item_type.to_glib())) } } -} - -#[derive(Clone, Default)] -pub struct ListStoreBuilder { - #[cfg(any(feature = "v2_44", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] - item_type: Option, -} - -impl ListStoreBuilder { - pub fn new() -> Self { - Self::default() - } - - pub fn build(self) -> ListStore { - let mut properties: Vec<(&str, &dyn ToValue)> = vec![]; - #[cfg(any(feature = "v2_44", feature = "dox"))] - if let Some(ref item_type) = self.item_type { - properties.push(("item-type", item_type)); - } - let ret = glib::Object::new(ListStore::static_type(), &properties) - .expect("object new") - .downcast::() - .expect("downcast"); - ret - } - - #[cfg(any(feature = "v2_44", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] - pub fn item_type(mut self, item_type: glib::types::Type) -> Self { - self.item_type = Some(item_type); - self - } -} - -pub const NONE_LIST_STORE: Option<&ListStore> = None; - -pub trait ListStoreExt: 'static { - #[cfg(any(feature = "v2_44", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] - fn append>(&self, item: &P); - - #[cfg(any(feature = "v2_64", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_64")))] - fn find>(&self, item: &P) -> Option; - - //#[cfg(any(feature = "v2_64", feature = "dox"))] - //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_64")))] - //fn find_with_equal_func>(&self, item: &P, equal_func: /*Unimplemented*/FnMut(/*Unimplemented*/Option, /*Unimplemented*/Option) -> bool) -> Option; - - #[cfg(any(feature = "v2_44", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] - fn insert>(&self, position: u32, item: &P); - - #[cfg(any(feature = "v2_44", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] - fn remove(&self, position: u32); - - #[cfg(any(feature = "v2_44", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] - fn remove_all(&self); - - #[cfg(any(feature = "v2_44", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] - fn splice(&self, position: u32, n_removals: u32, additions: &[glib::Object]); -} -impl> ListStoreExt for O { #[cfg(any(feature = "v2_44", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] - fn append>(&self, item: &P) { + pub fn append>(&self, item: &P) { unsafe { - ffi::g_list_store_append( - self.as_ref().to_glib_none().0, - item.as_ref().to_glib_none().0, - ); + ffi::g_list_store_append(self.to_glib_none().0, item.as_ref().to_glib_none().0); } } #[cfg(any(feature = "v2_64", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_64")))] - fn find>(&self, item: &P) -> Option { + pub fn find>(&self, item: &P) -> Option { unsafe { let mut position = mem::MaybeUninit::uninit(); let ret = from_glib(ffi::g_list_store_find( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, item.as_ref().to_glib_none().0, position.as_mut_ptr(), )); @@ -127,16 +59,16 @@ impl> ListStoreExt for O { //#[cfg(any(feature = "v2_64", feature = "dox"))] //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_64")))] - //fn find_with_equal_func>(&self, item: &P, equal_func: /*Unimplemented*/FnMut(/*Unimplemented*/Option, /*Unimplemented*/Option) -> bool) -> Option { + //pub fn find_with_equal_func>(&self, item: &P, equal_func: /*Unimplemented*/FnMut(/*Unimplemented*/Option, /*Unimplemented*/Option) -> bool) -> Option { // unsafe { TODO: call ffi:g_list_store_find_with_equal_func() } //} #[cfg(any(feature = "v2_44", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] - fn insert>(&self, position: u32, item: &P) { + pub fn insert>(&self, position: u32, item: &P) { unsafe { ffi::g_list_store_insert( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, position, item.as_ref().to_glib_none().0, ); @@ -145,27 +77,27 @@ impl> ListStoreExt for O { #[cfg(any(feature = "v2_44", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] - fn remove(&self, position: u32) { + pub fn remove(&self, position: u32) { unsafe { - ffi::g_list_store_remove(self.as_ref().to_glib_none().0, position); + ffi::g_list_store_remove(self.to_glib_none().0, position); } } #[cfg(any(feature = "v2_44", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] - fn remove_all(&self) { + pub fn remove_all(&self) { unsafe { - ffi::g_list_store_remove_all(self.as_ref().to_glib_none().0); + ffi::g_list_store_remove_all(self.to_glib_none().0); } } #[cfg(any(feature = "v2_44", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] - fn splice(&self, position: u32, n_removals: u32, additions: &[glib::Object]) { + pub fn splice(&self, position: u32, n_removals: u32, additions: &[glib::Object]) { let n_additions = additions.len() as u32; unsafe { ffi::g_list_store_splice( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, position, n_removals, additions.to_glib_none().0, @@ -175,6 +107,39 @@ impl> ListStoreExt for O { } } +#[derive(Clone, Default)] +pub struct ListStoreBuilder { + #[cfg(any(feature = "v2_44", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] + item_type: Option, +} + +impl ListStoreBuilder { + pub fn new() -> Self { + Self::default() + } + + pub fn build(self) -> ListStore { + let mut properties: Vec<(&str, &dyn ToValue)> = vec![]; + #[cfg(any(feature = "v2_44", feature = "dox"))] + if let Some(ref item_type) = self.item_type { + properties.push(("item-type", item_type)); + } + let ret = glib::Object::new(ListStore::static_type(), &properties) + .expect("object new") + .downcast::() + .expect("downcast"); + ret + } + + #[cfg(any(feature = "v2_44", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] + pub fn item_type(mut self, item_type: glib::types::Type) -> Self { + self.item_type = Some(item_type); + self + } +} + impl fmt::Display for ListStore { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("ListStore") diff --git a/gio/src/auto/mod.rs b/gio/src/auto/mod.rs index 8e79907adf46..fd6fd828ca1d 100644 --- a/gio/src/auto/mod.rs +++ b/gio/src/auto/mod.rs @@ -52,9 +52,8 @@ pub use self::cancellable::CancellableExt; pub use self::cancellable::{Cancellable, NONE_CANCELLABLE}; mod charset_converter; +pub use self::charset_converter::CharsetConverter; pub use self::charset_converter::CharsetConverterBuilder; -pub use self::charset_converter::CharsetConverterExt; -pub use self::charset_converter::{CharsetConverter, NONE_CHARSET_CONVERTER}; mod converter; pub use self::converter::ConverterExt; @@ -122,10 +121,7 @@ pub use self::data_output_stream::{DataOutputStream, NONE_DATA_OUTPUT_STREAM}; mod desktop_app_info; #[cfg(any(all(not(windows), not(target_os = "macos")), feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(all(not(windows), not(target_os = "macos")))))] -pub use self::desktop_app_info::DesktopAppInfoExt; -#[cfg(any(all(not(windows), not(target_os = "macos")), feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(all(not(windows), not(target_os = "macos")))))] -pub use self::desktop_app_info::{DesktopAppInfo, NONE_DESKTOP_APP_INFO}; +pub use self::desktop_app_info::DesktopAppInfo; mod drive; pub use self::drive::DriveExt; @@ -169,8 +165,7 @@ pub use self::file_output_stream::FileOutputStreamExt; pub use self::file_output_stream::{FileOutputStream, NONE_FILE_OUTPUT_STREAM}; mod filename_completer; -pub use self::filename_completer::FilenameCompleterExt; -pub use self::filename_completer::{FilenameCompleter, NONE_FILENAME_COMPLETER}; +pub use self::filename_completer::FilenameCompleter; mod filter_input_stream; pub use self::filter_input_stream::FilterInputStreamExt; @@ -219,13 +214,10 @@ pub use self::list_model::{ListModel, NONE_LIST_MODEL}; mod list_store; #[cfg(any(feature = "v2_44", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] -pub use self::list_store::ListStoreBuilder; -#[cfg(any(feature = "v2_44", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] -pub use self::list_store::ListStoreExt; +pub use self::list_store::ListStore; #[cfg(any(feature = "v2_44", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] -pub use self::list_store::{ListStore, NONE_LIST_STORE}; +pub use self::list_store::ListStoreBuilder; mod loadable_icon; pub use self::loadable_icon::LoadableIconExt; @@ -497,12 +489,10 @@ pub use self::volume_monitor::VolumeMonitorExt; pub use self::volume_monitor::{VolumeMonitor, NONE_VOLUME_MONITOR}; mod zlib_compressor; -pub use self::zlib_compressor::ZlibCompressorExt; -pub use self::zlib_compressor::{ZlibCompressor, NONE_ZLIB_COMPRESSOR}; +pub use self::zlib_compressor::ZlibCompressor; mod zlib_decompressor; -pub use self::zlib_decompressor::ZlibDecompressorExt; -pub use self::zlib_decompressor::{ZlibDecompressor, NONE_ZLIB_DECOMPRESSOR}; +pub use self::zlib_decompressor::ZlibDecompressor; mod dbus_arg_info; pub use self::dbus_arg_info::DBusArgInfo; @@ -779,7 +769,6 @@ pub mod traits { pub use super::BufferedInputStreamExt; pub use super::BufferedOutputStreamExt; pub use super::CancellableExt; - pub use super::CharsetConverterExt; pub use super::ConverterExt; pub use super::ConverterInputStreamExt; pub use super::ConverterOutputStreamExt; @@ -789,9 +778,6 @@ pub mod traits { pub use super::DBusProxyExt; pub use super::DataInputStreamExt; pub use super::DataOutputStreamExt; - #[cfg(any(all(not(windows), not(target_os = "macos")), feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(all(not(windows), not(target_os = "macos")))))] - pub use super::DesktopAppInfoExt; pub use super::DriveExt; pub use super::EmblemedIconExt; pub use super::FileEnumeratorExt; @@ -800,7 +786,6 @@ pub mod traits { pub use super::FileInputStreamExt; pub use super::FileMonitorExt; pub use super::FileOutputStreamExt; - pub use super::FilenameCompleterExt; pub use super::FilterInputStreamExt; pub use super::FilterOutputStreamExt; pub use super::IOStreamExt; @@ -812,9 +797,6 @@ pub mod traits { #[cfg(any(feature = "v2_44", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] pub use super::ListModelExt; - #[cfg(any(feature = "v2_44", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] - pub use super::ListStoreExt; pub use super::LoadableIconExt; pub use super::MemoryInputStreamExt; #[cfg(any(feature = "v2_64", feature = "dox"))] @@ -875,6 +857,4 @@ pub mod traits { pub use super::VfsExt; pub use super::VolumeExt; pub use super::VolumeMonitorExt; - pub use super::ZlibCompressorExt; - pub use super::ZlibDecompressorExt; } diff --git a/gio/src/auto/versions.txt b/gio/src/auto/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/gio/src/auto/versions.txt +++ b/gio/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/gio/src/auto/zlib_compressor.rs b/gio/src/auto/zlib_compressor.rs index 47e353cce894..4132d505c4d6 100644 --- a/gio/src/auto/zlib_compressor.rs +++ b/gio/src/auto/zlib_compressor.rs @@ -5,8 +5,7 @@ use crate::Converter; use crate::FileInfo; use crate::ZlibCompressorFormat; -use glib::object::Cast; -use glib::object::IsA; +use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; @@ -27,46 +26,23 @@ impl ZlibCompressor { pub fn new(format: ZlibCompressorFormat, level: i32) -> ZlibCompressor { unsafe { from_glib_full(ffi::g_zlib_compressor_new(format.to_glib(), level)) } } -} - -pub const NONE_ZLIB_COMPRESSOR: Option<&ZlibCompressor> = None; - -pub trait ZlibCompressorExt: 'static { - fn get_file_info(&self) -> Option; - - fn set_file_info(&self, file_info: Option<&FileInfo>); - - fn get_property_format(&self) -> ZlibCompressorFormat; - - fn get_property_level(&self) -> i32; - fn connect_property_file_info_notify(&self, f: F) -> SignalHandlerId; -} - -impl> ZlibCompressorExt for O { - fn get_file_info(&self) -> Option { - unsafe { - from_glib_none(ffi::g_zlib_compressor_get_file_info( - self.as_ref().to_glib_none().0, - )) - } + pub fn get_file_info(&self) -> Option { + unsafe { from_glib_none(ffi::g_zlib_compressor_get_file_info(self.to_glib_none().0)) } } - fn set_file_info(&self, file_info: Option<&FileInfo>) { + pub fn set_file_info(&self, file_info: Option<&FileInfo>) { unsafe { - ffi::g_zlib_compressor_set_file_info( - self.as_ref().to_glib_none().0, - file_info.to_glib_none().0, - ); + ffi::g_zlib_compressor_set_file_info(self.to_glib_none().0, file_info.to_glib_none().0); } } - fn get_property_format(&self) -> ZlibCompressorFormat { + pub fn get_property_format(&self) -> ZlibCompressorFormat { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( - self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"format\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -77,11 +53,11 @@ impl> ZlibCompressorExt for O { } } - fn get_property_level(&self) -> i32 { + pub fn get_property_level(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( - self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"level\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -92,16 +68,17 @@ impl> ZlibCompressorExt for O { } } - fn connect_property_file_info_notify(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn notify_file_info_trampoline( + pub fn connect_property_file_info_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_file_info_trampoline( this: *mut ffi::GZlibCompressor, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, - ) where - P: IsA, - { + ) { let f: &F = &*(f as *const F); - f(&ZlibCompressor::from_glib_borrow(this).unsafe_cast_ref()) + f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); @@ -109,7 +86,7 @@ impl> ZlibCompressorExt for O { self.as_ptr() as *mut _, b"notify::file-info\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( - notify_file_info_trampoline:: as *const (), + notify_file_info_trampoline:: as *const (), )), Box_::into_raw(f), ) diff --git a/gio/src/auto/zlib_decompressor.rs b/gio/src/auto/zlib_decompressor.rs index 6221c249c626..6279d0dba0c9 100644 --- a/gio/src/auto/zlib_decompressor.rs +++ b/gio/src/auto/zlib_decompressor.rs @@ -5,8 +5,7 @@ use crate::Converter; use crate::FileInfo; use crate::ZlibCompressorFormat; -use glib::object::Cast; -use glib::object::IsA; +use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; @@ -27,33 +26,21 @@ impl ZlibDecompressor { pub fn new(format: ZlibCompressorFormat) -> ZlibDecompressor { unsafe { from_glib_full(ffi::g_zlib_decompressor_new(format.to_glib())) } } -} - -pub const NONE_ZLIB_DECOMPRESSOR: Option<&ZlibDecompressor> = None; - -pub trait ZlibDecompressorExt: 'static { - fn get_file_info(&self) -> Option; - - fn get_property_format(&self) -> ZlibCompressorFormat; - - fn connect_property_file_info_notify(&self, f: F) -> SignalHandlerId; -} -impl> ZlibDecompressorExt for O { - fn get_file_info(&self) -> Option { + pub fn get_file_info(&self) -> Option { unsafe { from_glib_none(ffi::g_zlib_decompressor_get_file_info( - self.as_ref().to_glib_none().0, + self.to_glib_none().0, )) } } - fn get_property_format(&self) -> ZlibCompressorFormat { + pub fn get_property_format(&self) -> ZlibCompressorFormat { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( - self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"format\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -64,16 +51,17 @@ impl> ZlibDecompressorExt for O { } } - fn connect_property_file_info_notify(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn notify_file_info_trampoline( + pub fn connect_property_file_info_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_file_info_trampoline( this: *mut ffi::GZlibDecompressor, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, - ) where - P: IsA, - { + ) { let f: &F = &*(f as *const F); - f(&ZlibDecompressor::from_glib_borrow(this).unsafe_cast_ref()) + f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); @@ -81,7 +69,7 @@ impl> ZlibDecompressorExt for O { self.as_ptr() as *mut _, b"notify::file-info\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( - notify_file_info_trampoline:: as *const (), + notify_file_info_trampoline:: as *const (), )), Box_::into_raw(f), ) diff --git a/gio/sys/versions.txt b/gio/sys/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/gio/sys/versions.txt +++ b/gio/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/gir b/gir index 1c1a8d701cf3..3918b7c46446 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit 1c1a8d701cf372ed673ca609bd176a75848e75aa +Subproject commit 3918b7c46446afed50b7712bd104be9d34379ef2 diff --git a/glib/gobject-sys/versions.txt b/glib/gobject-sys/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/glib/gobject-sys/versions.txt +++ b/glib/gobject-sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/glib/src/auto/versions.txt b/glib/src/auto/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/glib/src/auto/versions.txt +++ b/glib/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/glib/sys/versions.txt b/glib/sys/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/glib/sys/versions.txt +++ b/glib/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/graphene/src/auto/versions.txt b/graphene/src/auto/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/graphene/src/auto/versions.txt +++ b/graphene/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/graphene/sys/versions.txt b/graphene/sys/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/graphene/sys/versions.txt +++ b/graphene/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/gtk/src/auto/file_chooser_native.rs b/gtk/src/auto/file_chooser_native.rs index 58ca66d634e4..30427133a27d 100644 --- a/gtk/src/auto/file_chooser_native.rs +++ b/gtk/src/auto/file_chooser_native.rs @@ -12,6 +12,7 @@ use crate::Widget; use crate::Window; use glib::object::Cast; use glib::object::IsA; +use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; @@ -50,6 +51,146 @@ impl FileChooserNative { )) } } + + #[cfg(any(feature = "v3_20", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] + pub fn get_accept_label(&self) -> Option { + unsafe { + from_glib_none(ffi::gtk_file_chooser_native_get_accept_label( + self.to_glib_none().0, + )) + } + } + + #[cfg(any(feature = "v3_20", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] + pub fn get_cancel_label(&self) -> Option { + unsafe { + from_glib_none(ffi::gtk_file_chooser_native_get_cancel_label( + self.to_glib_none().0, + )) + } + } + + #[cfg(any(feature = "v3_20", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] + pub fn set_accept_label(&self, accept_label: Option<&str>) { + unsafe { + ffi::gtk_file_chooser_native_set_accept_label( + self.to_glib_none().0, + accept_label.to_glib_none().0, + ); + } + } + + #[cfg(any(feature = "v3_20", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] + pub fn set_cancel_label(&self, cancel_label: Option<&str>) { + unsafe { + ffi::gtk_file_chooser_native_set_cancel_label( + self.to_glib_none().0, + cancel_label.to_glib_none().0, + ); + } + } + + pub fn get_property_accept_label(&self) -> Option { + unsafe { + let mut value = glib::Value::from_type(::static_type()); + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, + b"accept-label\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `accept-label` getter") + } + } + + pub fn set_property_accept_label(&self, accept_label: Option<&str>) { + unsafe { + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, + b"accept-label\0".as_ptr() as *const _, + glib::Value::from(accept_label).to_glib_none().0, + ); + } + } + + pub fn get_property_cancel_label(&self) -> Option { + unsafe { + let mut value = glib::Value::from_type(::static_type()); + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, + b"cancel-label\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `cancel-label` getter") + } + } + + pub fn set_property_cancel_label(&self, cancel_label: Option<&str>) { + unsafe { + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, + b"cancel-label\0".as_ptr() as *const _, + glib::Value::from(cancel_label).to_glib_none().0, + ); + } + } + + pub fn connect_property_accept_label_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_accept_label_trampoline( + this: *mut ffi::GtkFileChooserNative, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, + ) { + let f: &F = &*(f as *const F); + f(&from_glib_borrow(this)) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::accept-label\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_accept_label_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + pub fn connect_property_cancel_label_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_cancel_label_trampoline( + this: *mut ffi::GtkFileChooserNative, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, + ) { + let f: &F = &*(f as *const F); + f(&from_glib_borrow(this)) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::cancel-label\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_cancel_label_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } } #[derive(Clone, Default)] @@ -244,186 +385,6 @@ impl FileChooserNativeBuilder { } } -pub const NONE_FILE_CHOOSER_NATIVE: Option<&FileChooserNative> = None; - -pub trait FileChooserNativeExt: 'static { - #[cfg(any(feature = "v3_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - fn get_accept_label(&self) -> Option; - - #[cfg(any(feature = "v3_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - fn get_cancel_label(&self) -> Option; - - #[cfg(any(feature = "v3_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - fn set_accept_label(&self, accept_label: Option<&str>); - - #[cfg(any(feature = "v3_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - fn set_cancel_label(&self, cancel_label: Option<&str>); - - fn get_property_accept_label(&self) -> Option; - - fn set_property_accept_label(&self, accept_label: Option<&str>); - - fn get_property_cancel_label(&self) -> Option; - - fn set_property_cancel_label(&self, cancel_label: Option<&str>); - - fn connect_property_accept_label_notify(&self, f: F) - -> SignalHandlerId; - - fn connect_property_cancel_label_notify(&self, f: F) - -> SignalHandlerId; -} - -impl> FileChooserNativeExt for O { - #[cfg(any(feature = "v3_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - fn get_accept_label(&self) -> Option { - unsafe { - from_glib_none(ffi::gtk_file_chooser_native_get_accept_label( - self.as_ref().to_glib_none().0, - )) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - fn get_cancel_label(&self) -> Option { - unsafe { - from_glib_none(ffi::gtk_file_chooser_native_get_cancel_label( - self.as_ref().to_glib_none().0, - )) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - fn set_accept_label(&self, accept_label: Option<&str>) { - unsafe { - ffi::gtk_file_chooser_native_set_accept_label( - self.as_ref().to_glib_none().0, - accept_label.to_glib_none().0, - ); - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - fn set_cancel_label(&self, cancel_label: Option<&str>) { - unsafe { - ffi::gtk_file_chooser_native_set_cancel_label( - self.as_ref().to_glib_none().0, - cancel_label.to_glib_none().0, - ); - } - } - - fn get_property_accept_label(&self) -> Option { - unsafe { - let mut value = glib::Value::from_type(::static_type()); - glib::gobject_ffi::g_object_get_property( - self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, - b"accept-label\0".as_ptr() as *const _, - value.to_glib_none_mut().0, - ); - value - .get() - .expect("Return Value for property `accept-label` getter") - } - } - - fn set_property_accept_label(&self, accept_label: Option<&str>) { - unsafe { - glib::gobject_ffi::g_object_set_property( - self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, - b"accept-label\0".as_ptr() as *const _, - glib::Value::from(accept_label).to_glib_none().0, - ); - } - } - - fn get_property_cancel_label(&self) -> Option { - unsafe { - let mut value = glib::Value::from_type(::static_type()); - glib::gobject_ffi::g_object_get_property( - self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, - b"cancel-label\0".as_ptr() as *const _, - value.to_glib_none_mut().0, - ); - value - .get() - .expect("Return Value for property `cancel-label` getter") - } - } - - fn set_property_cancel_label(&self, cancel_label: Option<&str>) { - unsafe { - glib::gobject_ffi::g_object_set_property( - self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, - b"cancel-label\0".as_ptr() as *const _, - glib::Value::from(cancel_label).to_glib_none().0, - ); - } - } - - fn connect_property_accept_label_notify( - &self, - f: F, - ) -> SignalHandlerId { - unsafe extern "C" fn notify_accept_label_trampoline( - this: *mut ffi::GtkFileChooserNative, - _param_spec: glib::ffi::gpointer, - f: glib::ffi::gpointer, - ) where - P: IsA, - { - let f: &F = &*(f as *const F); - f(&FileChooserNative::from_glib_borrow(this).unsafe_cast_ref()) - } - unsafe { - let f: Box_ = Box_::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"notify::accept-label\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( - notify_accept_label_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } - - fn connect_property_cancel_label_notify( - &self, - f: F, - ) -> SignalHandlerId { - unsafe extern "C" fn notify_cancel_label_trampoline( - this: *mut ffi::GtkFileChooserNative, - _param_spec: glib::ffi::gpointer, - f: glib::ffi::gpointer, - ) where - P: IsA, - { - let f: &F = &*(f as *const F); - f(&FileChooserNative::from_glib_borrow(this).unsafe_cast_ref()) - } - unsafe { - let f: Box_ = Box_::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"notify::cancel-label\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( - notify_cancel_label_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } -} - impl fmt::Display for FileChooserNative { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("FileChooserNative") diff --git a/gtk/src/auto/functions.rs b/gtk/src/auto/functions.rs index 6f8a30956c99..d774640a5b49 100644 --- a/gtk/src/auto/functions.rs +++ b/gtk/src/auto/functions.rs @@ -171,27 +171,27 @@ pub fn bindings_activate_event>( } } -pub fn cairo_should_draw_window>(cr: &cairo::Context, window: &P) -> bool { +pub fn cairo_should_draw_window(cr: &cairo::Context, window: &gdk::Window) -> bool { assert_initialized_main_thread!(); unsafe { from_glib(ffi::gtk_cairo_should_draw_window( mut_override(cr.to_glib_none().0), - window.as_ref().to_glib_none().0, + window.to_glib_none().0, )) } } -pub fn cairo_transform_to_window, Q: IsA>( +pub fn cairo_transform_to_window>( cr: &cairo::Context, widget: &P, - window: &Q, + window: &gdk::Window, ) { skip_assert_initialized!(); unsafe { ffi::gtk_cairo_transform_to_window( mut_override(cr.to_glib_none().0), widget.as_ref().to_glib_none().0, - window.as_ref().to_glib_none().0, + window.to_glib_none().0, ); } } diff --git a/gtk/src/auto/gesture.rs b/gtk/src/auto/gesture.rs index f11977286878..89cf87b9b1e4 100644 --- a/gtk/src/auto/gesture.rs +++ b/gtk/src/auto/gesture.rs @@ -60,7 +60,7 @@ pub trait GestureExt: 'static { fn set_state(&self, state: EventSequenceState) -> bool; - fn set_window>(&self, window: Option<&P>); + fn set_window(&self, window: Option<&gdk::Window>); fn ungroup(&self); @@ -259,12 +259,9 @@ impl> GestureExt for O { } } - fn set_window>(&self, window: Option<&P>) { + fn set_window(&self, window: Option<&gdk::Window>) { unsafe { - ffi::gtk_gesture_set_window( - self.as_ref().to_glib_none().0, - window.map(|p| p.as_ref()).to_glib_none().0, - ); + ffi::gtk_gesture_set_window(self.as_ref().to_glib_none().0, window.to_glib_none().0); } } diff --git a/gtk/src/auto/gesture_drag.rs b/gtk/src/auto/gesture_drag.rs index 25fa2c7e3d0b..c156e503ad88 100644 --- a/gtk/src/auto/gesture_drag.rs +++ b/gtk/src/auto/gesture_drag.rs @@ -103,8 +103,8 @@ impl GestureDragBuilder { self } - pub fn window>(mut self, window: &P) -> Self { - self.window = Some(window.clone().upcast()); + pub fn window(mut self, window: &gdk::Window) -> Self { + self.window = Some(window.clone()); self } diff --git a/gtk/src/auto/gesture_long_press.rs b/gtk/src/auto/gesture_long_press.rs index 3f9278c79070..a4de89d02c37 100644 --- a/gtk/src/auto/gesture_long_press.rs +++ b/gtk/src/auto/gesture_long_press.rs @@ -211,8 +211,8 @@ impl GestureLongPressBuilder { self } - pub fn window>(mut self, window: &P) -> Self { - self.window = Some(window.clone().upcast()); + pub fn window(mut self, window: &gdk::Window) -> Self { + self.window = Some(window.clone()); self } diff --git a/gtk/src/auto/gesture_multi_press.rs b/gtk/src/auto/gesture_multi_press.rs index ea0f10e6dc1d..c8d3ffc45254 100644 --- a/gtk/src/auto/gesture_multi_press.rs +++ b/gtk/src/auto/gesture_multi_press.rs @@ -205,8 +205,8 @@ impl GestureMultiPressBuilder { self } - pub fn window>(mut self, window: &P) -> Self { - self.window = Some(window.clone().upcast()); + pub fn window(mut self, window: &gdk::Window) -> Self { + self.window = Some(window.clone()); self } diff --git a/gtk/src/auto/gesture_pan.rs b/gtk/src/auto/gesture_pan.rs index b7f3dffb4927..0648b93079cd 100644 --- a/gtk/src/auto/gesture_pan.rs +++ b/gtk/src/auto/gesture_pan.rs @@ -179,8 +179,8 @@ impl GesturePanBuilder { self } - pub fn window>(mut self, window: &P) -> Self { - self.window = Some(window.clone().upcast()); + pub fn window(mut self, window: &gdk::Window) -> Self { + self.window = Some(window.clone()); self } diff --git a/gtk/src/auto/gesture_rotate.rs b/gtk/src/auto/gesture_rotate.rs index f43bc2a09b70..b9fc7b4c62ef 100644 --- a/gtk/src/auto/gesture_rotate.rs +++ b/gtk/src/auto/gesture_rotate.rs @@ -107,8 +107,8 @@ impl GestureRotateBuilder { self } - pub fn window>(mut self, window: &P) -> Self { - self.window = Some(window.clone().upcast()); + pub fn window(mut self, window: &gdk::Window) -> Self { + self.window = Some(window.clone()); self } diff --git a/gtk/src/auto/gesture_swipe.rs b/gtk/src/auto/gesture_swipe.rs index d8391fa43bd4..8eaae3d20521 100644 --- a/gtk/src/auto/gesture_swipe.rs +++ b/gtk/src/auto/gesture_swipe.rs @@ -146,8 +146,8 @@ impl GestureSwipeBuilder { self } - pub fn window>(mut self, window: &P) -> Self { - self.window = Some(window.clone().upcast()); + pub fn window(mut self, window: &gdk::Window) -> Self { + self.window = Some(window.clone()); self } diff --git a/gtk/src/auto/gesture_zoom.rs b/gtk/src/auto/gesture_zoom.rs index 818aa28e2184..e48c48951f88 100644 --- a/gtk/src/auto/gesture_zoom.rs +++ b/gtk/src/auto/gesture_zoom.rs @@ -104,8 +104,8 @@ impl GestureZoomBuilder { self } - pub fn window>(mut self, window: &P) -> Self { - self.window = Some(window.clone().upcast()); + pub fn window(mut self, window: &gdk::Window) -> Self { + self.window = Some(window.clone()); self } diff --git a/gtk/src/auto/icon_info.rs b/gtk/src/auto/icon_info.rs index 724afee2c411..f826e401219b 100644 --- a/gtk/src/auto/icon_info.rs +++ b/gtk/src/auto/icon_info.rs @@ -115,15 +115,15 @@ impl IconInfo { })) } - pub fn load_surface>( + pub fn load_surface( &self, - for_window: Option<&P>, + for_window: Option<&gdk::Window>, ) -> Result { unsafe { let mut error = ptr::null_mut(); let ret = ffi::gtk_icon_info_load_surface( self.to_glib_none().0, - for_window.map(|p| p.as_ref()).to_glib_none().0, + for_window.to_glib_none().0, &mut error, ); if error.is_null() { diff --git a/gtk/src/auto/icon_theme.rs b/gtk/src/auto/icon_theme.rs index 247298ad0b47..ec171a7624d2 100644 --- a/gtk/src/auto/icon_theme.rs +++ b/gtk/src/auto/icon_theme.rs @@ -75,12 +75,12 @@ pub trait IconThemeExt: 'static { flags: IconLookupFlags, ) -> Result, glib::Error>; - fn load_surface>( + fn load_surface( &self, icon_name: &str, size: i32, scale: i32, - for_window: Option<&P>, + for_window: Option<&gdk::Window>, flags: IconLookupFlags, ) -> Result, glib::Error>; @@ -221,12 +221,12 @@ impl> IconThemeExt for O { } } - fn load_surface>( + fn load_surface( &self, icon_name: &str, size: i32, scale: i32, - for_window: Option<&P>, + for_window: Option<&gdk::Window>, flags: IconLookupFlags, ) -> Result, glib::Error> { unsafe { @@ -236,7 +236,7 @@ impl> IconThemeExt for O { icon_name.to_glib_none().0, size, scale, - for_window.map(|p| p.as_ref()).to_glib_none().0, + for_window.to_glib_none().0, flags.to_glib(), &mut error, ); diff --git a/gtk/src/auto/im_context.rs b/gtk/src/auto/im_context.rs index 8f9c816db79e..1658298833ca 100644 --- a/gtk/src/auto/im_context.rs +++ b/gtk/src/auto/im_context.rs @@ -41,7 +41,7 @@ pub trait IMContextExt: 'static { fn reset(&self); - fn set_client_window>(&self, window: Option<&P>); + fn set_client_window(&self, window: Option<&gdk::Window>); fn set_cursor_location(&self, area: &gdk::Rectangle); @@ -153,11 +153,11 @@ impl> IMContextExt for O { } } - fn set_client_window>(&self, window: Option<&P>) { + fn set_client_window(&self, window: Option<&gdk::Window>) { unsafe { ffi::gtk_im_context_set_client_window( self.as_ref().to_glib_none().0, - window.map(|p| p.as_ref()).to_glib_none().0, + window.to_glib_none().0, ); } } diff --git a/gtk/src/auto/menu.rs b/gtk/src/auto/menu.rs index a4bdc27abae0..b8b490812428 100644 --- a/gtk/src/auto/menu.rs +++ b/gtk/src/auto/menu.rs @@ -564,9 +564,9 @@ pub trait GtkMenuExt: 'static { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn popup_at_rect>( + fn popup_at_rect( &self, - rect_window: &P, + rect_window: &gdk::Window, rect: &gdk::Rectangle, rect_anchor: gdk::Gravity, menu_anchor: gdk::Gravity, @@ -806,9 +806,9 @@ impl> GtkMenuExt for O { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn popup_at_rect>( + fn popup_at_rect( &self, - rect_window: &P, + rect_window: &gdk::Window, rect: &gdk::Rectangle, rect_anchor: gdk::Gravity, menu_anchor: gdk::Gravity, @@ -817,7 +817,7 @@ impl> GtkMenuExt for O { unsafe { ffi::gtk_menu_popup_at_rect( self.as_ref().to_glib_none().0, - rect_window.as_ref().to_glib_none().0, + rect_window.to_glib_none().0, rect.to_glib_none().0, rect_anchor.to_glib(), menu_anchor.to_glib(), diff --git a/gtk/src/auto/mod.rs b/gtk/src/auto/mod.rs index f212403a8431..e2fe519da4e1 100644 --- a/gtk/src/auto/mod.rs +++ b/gtk/src/auto/mod.rs @@ -292,13 +292,10 @@ pub use self::file_chooser_dialog::{FileChooserDialog, NONE_FILE_CHOOSER_DIALOG} mod file_chooser_native; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] -pub use self::file_chooser_native::FileChooserNativeBuilder; -#[cfg(any(feature = "v3_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] -pub use self::file_chooser_native::FileChooserNativeExt; +pub use self::file_chooser_native::FileChooserNative; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] -pub use self::file_chooser_native::{FileChooserNative, NONE_FILE_CHOOSER_NATIVE}; +pub use self::file_chooser_native::FileChooserNativeBuilder; mod file_chooser_widget; pub use self::file_chooser_widget::FileChooserWidgetBuilder; @@ -618,13 +615,10 @@ pub use self::popover::{Popover, NONE_POPOVER}; mod popover_menu; #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] -pub use self::popover_menu::PopoverMenuBuilder; -#[cfg(any(feature = "v3_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] -pub use self::popover_menu::PopoverMenuExt; +pub use self::popover_menu::PopoverMenu; #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] -pub use self::popover_menu::{PopoverMenu, NONE_POPOVER_MENU}; +pub use self::popover_menu::PopoverMenuBuilder; mod print_context; pub use self::print_context::PrintContext; @@ -1383,9 +1377,6 @@ pub mod traits { pub use super::ExpanderExt; pub use super::FileChooserButtonExt; pub use super::FileChooserExt; - #[cfg(any(feature = "v3_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - pub use super::FileChooserNativeExt; pub use super::FileChooserWidgetExt; pub use super::FixedExt; pub use super::FlowBoxChildExt; @@ -1442,9 +1433,6 @@ pub mod traits { #[cfg_attr(feature = "dox", doc(cfg(gdk_backend = "x11")))] pub use super::PlugExt; pub use super::PopoverExt; - #[cfg(any(feature = "v3_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - pub use super::PopoverMenuExt; pub use super::PrintOperationExt; pub use super::PrintOperationPreviewExt; pub use super::ProgressBarExt; diff --git a/gtk/src/auto/popover_menu.rs b/gtk/src/auto/popover_menu.rs index b9c72d5a5e40..873fa270b45a 100644 --- a/gtk/src/auto/popover_menu.rs +++ b/gtk/src/auto/popover_menu.rs @@ -15,6 +15,7 @@ use crate::ResizeMode; use crate::Widget; use glib::object::Cast; use glib::object::IsA; +use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; @@ -39,6 +40,116 @@ impl PopoverMenu { assert_initialized_main_thread!(); unsafe { Widget::from_glib_none(ffi::gtk_popover_menu_new()).unsafe_cast() } } + + #[cfg(any(feature = "v3_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] + pub fn open_submenu(&self, name: &str) { + unsafe { + ffi::gtk_popover_menu_open_submenu(self.to_glib_none().0, name.to_glib_none().0); + } + } + + pub fn get_property_visible_submenu(&self) -> Option { + unsafe { + let mut value = glib::Value::from_type(::static_type()); + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, + b"visible-submenu\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `visible-submenu` getter") + } + } + + pub fn set_property_visible_submenu(&self, visible_submenu: Option<&str>) { + unsafe { + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, + b"visible-submenu\0".as_ptr() as *const _, + glib::Value::from(visible_submenu).to_glib_none().0, + ); + } + } + + pub fn get_child_position>(&self, item: &T) -> i32 { + unsafe { + let mut value = glib::Value::from_type(::static_type()); + crate::ffi::gtk_container_child_get_property( + self.as_ptr() as *mut crate::ffi::GtkContainer, + item.to_glib_none().0 as *mut _, + b"position\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `position` getter") + .unwrap() + } + } + + pub fn set_child_position>(&self, item: &T, position: i32) { + unsafe { + crate::ffi::gtk_container_child_set_property( + self.as_ptr() as *mut crate::ffi::GtkContainer, + item.to_glib_none().0 as *mut _, + b"position\0".as_ptr() as *const _, + glib::Value::from(&position).to_glib_none().0, + ); + } + } + + pub fn get_child_submenu>(&self, item: &T) -> Option { + unsafe { + let mut value = glib::Value::from_type(::static_type()); + crate::ffi::gtk_container_child_get_property( + self.as_ptr() as *mut crate::ffi::GtkContainer, + item.to_glib_none().0 as *mut _, + b"submenu\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `submenu` getter") + } + } + + pub fn set_child_submenu>(&self, item: &T, submenu: Option<&str>) { + unsafe { + crate::ffi::gtk_container_child_set_property( + self.as_ptr() as *mut crate::ffi::GtkContainer, + item.to_glib_none().0 as *mut _, + b"submenu\0".as_ptr() as *const _, + glib::Value::from(submenu).to_glib_none().0, + ); + } + } + + pub fn connect_property_visible_submenu_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_visible_submenu_trampoline( + this: *mut ffi::GtkPopoverMenu, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, + ) { + let f: &F = &*(f as *const F); + f(&from_glib_borrow(this)) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::visible-submenu\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_visible_submenu_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } } #[cfg(any(feature = "v3_16", feature = "dox"))] @@ -461,148 +572,6 @@ impl PopoverMenuBuilder { } } -pub const NONE_POPOVER_MENU: Option<&PopoverMenu> = None; - -pub trait PopoverMenuExt: 'static { - #[cfg(any(feature = "v3_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - fn open_submenu(&self, name: &str); - - fn get_property_visible_submenu(&self) -> Option; - - fn set_property_visible_submenu(&self, visible_submenu: Option<&str>); - - fn get_child_position>(&self, item: &T) -> i32; - - fn set_child_position>(&self, item: &T, position: i32); - - fn get_child_submenu>(&self, item: &T) -> Option; - - fn set_child_submenu>(&self, item: &T, submenu: Option<&str>); - - fn connect_property_visible_submenu_notify( - &self, - f: F, - ) -> SignalHandlerId; -} - -impl> PopoverMenuExt for O { - #[cfg(any(feature = "v3_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - fn open_submenu(&self, name: &str) { - unsafe { - ffi::gtk_popover_menu_open_submenu( - self.as_ref().to_glib_none().0, - name.to_glib_none().0, - ); - } - } - - fn get_property_visible_submenu(&self) -> Option { - unsafe { - let mut value = glib::Value::from_type(::static_type()); - glib::gobject_ffi::g_object_get_property( - self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, - b"visible-submenu\0".as_ptr() as *const _, - value.to_glib_none_mut().0, - ); - value - .get() - .expect("Return Value for property `visible-submenu` getter") - } - } - - fn set_property_visible_submenu(&self, visible_submenu: Option<&str>) { - unsafe { - glib::gobject_ffi::g_object_set_property( - self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, - b"visible-submenu\0".as_ptr() as *const _, - glib::Value::from(visible_submenu).to_glib_none().0, - ); - } - } - - fn get_child_position>(&self, item: &T) -> i32 { - unsafe { - let mut value = glib::Value::from_type(::static_type()); - crate::ffi::gtk_container_child_get_property( - self.to_glib_none().0 as *mut crate::ffi::GtkContainer, - item.to_glib_none().0 as *mut _, - b"position\0".as_ptr() as *const _, - value.to_glib_none_mut().0, - ); - value - .get() - .expect("Return Value for property `position` getter") - .unwrap() - } - } - - fn set_child_position>(&self, item: &T, position: i32) { - unsafe { - crate::ffi::gtk_container_child_set_property( - self.to_glib_none().0 as *mut crate::ffi::GtkContainer, - item.to_glib_none().0 as *mut _, - b"position\0".as_ptr() as *const _, - glib::Value::from(&position).to_glib_none().0, - ); - } - } - - fn get_child_submenu>(&self, item: &T) -> Option { - unsafe { - let mut value = glib::Value::from_type(::static_type()); - crate::ffi::gtk_container_child_get_property( - self.to_glib_none().0 as *mut crate::ffi::GtkContainer, - item.to_glib_none().0 as *mut _, - b"submenu\0".as_ptr() as *const _, - value.to_glib_none_mut().0, - ); - value - .get() - .expect("Return Value for property `submenu` getter") - } - } - - fn set_child_submenu>(&self, item: &T, submenu: Option<&str>) { - unsafe { - crate::ffi::gtk_container_child_set_property( - self.to_glib_none().0 as *mut crate::ffi::GtkContainer, - item.to_glib_none().0 as *mut _, - b"submenu\0".as_ptr() as *const _, - glib::Value::from(submenu).to_glib_none().0, - ); - } - } - - fn connect_property_visible_submenu_notify( - &self, - f: F, - ) -> SignalHandlerId { - unsafe extern "C" fn notify_visible_submenu_trampoline( - this: *mut ffi::GtkPopoverMenu, - _param_spec: glib::ffi::gpointer, - f: glib::ffi::gpointer, - ) where - P: IsA, - { - let f: &F = &*(f as *const F); - f(&PopoverMenu::from_glib_borrow(this).unsafe_cast_ref()) - } - unsafe { - let f: Box_ = Box_::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"notify::visible-submenu\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( - notify_visible_submenu_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } -} - impl fmt::Display for PopoverMenu { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("PopoverMenu") diff --git a/gtk/src/auto/style_context.rs b/gtk/src/auto/style_context.rs index 4fc39ff79af7..0a88cf877c46 100644 --- a/gtk/src/auto/style_context.rs +++ b/gtk/src/auto/style_context.rs @@ -195,7 +195,7 @@ pub trait StyleContextExt: 'static { fn save(&self); #[cfg_attr(feature = "v3_18", deprecated)] - fn set_background>(&self, window: &P); + fn set_background(&self, window: &gdk::Window); fn set_frame_clock(&self, frame_clock: &gdk::FrameClock); @@ -491,11 +491,11 @@ impl> StyleContextExt for O { } } - fn set_background>(&self, window: &P) { + fn set_background(&self, window: &gdk::Window) { unsafe { ffi::gtk_style_context_set_background( self.as_ref().to_glib_none().0, - window.as_ref().to_glib_none().0, + window.to_glib_none().0, ); } } diff --git a/gtk/src/auto/text_view.rs b/gtk/src/auto/text_view.rs index acf4fea426f8..083f0c0cff78 100644 --- a/gtk/src/auto/text_view.rs +++ b/gtk/src/auto/text_view.rs @@ -734,7 +734,7 @@ pub trait TextViewExt: 'static { fn get_window(&self, win: TextWindowType) -> Option; - fn get_window_type>(&self, window: &P) -> TextWindowType; + fn get_window_type(&self, window: &gdk::Window) -> TextWindowType; fn get_wrap_mode(&self) -> WrapMode; @@ -1325,11 +1325,11 @@ impl> TextViewExt for O { } } - fn get_window_type>(&self, window: &P) -> TextWindowType { + fn get_window_type(&self, window: &gdk::Window) -> TextWindowType { unsafe { from_glib(ffi::gtk_text_view_get_window_type( self.as_ref().to_glib_none().0, - window.as_ref().to_glib_none().0, + window.to_glib_none().0, )) } } diff --git a/gtk/src/auto/versions.txt b/gtk/src/auto/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/gtk/src/auto/versions.txt +++ b/gtk/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/gtk/src/auto/widget.rs b/gtk/src/auto/widget.rs index 4a4c174ce047..98195d291776 100644 --- a/gtk/src/auto/widget.rs +++ b/gtk/src/auto/widget.rs @@ -130,9 +130,9 @@ pub trait WidgetExt: 'static { fn drag_dest_get_track_motion(&self) -> bool; #[cfg_attr(feature = "v3_22", deprecated)] - fn drag_dest_set_proxy>( + fn drag_dest_set_proxy( &self, - proxy_window: &P, + proxy_window: &gdk::Window, protocol: gdk::DragProtocol, use_coordinates: bool, ); @@ -419,7 +419,7 @@ pub trait WidgetExt: 'static { fn realize(&self); - fn register_window>(&self, window: &P); + fn register_window(&self, window: &gdk::Window); fn remove_accelerator>( &self, @@ -497,7 +497,7 @@ pub trait WidgetExt: 'static { fn set_parent>(&self, parent: &P); - fn set_parent_window>(&self, parent_window: &P); + fn set_parent_window(&self, parent_window: &gdk::Window); fn set_realized(&self, realized: bool); @@ -529,7 +529,7 @@ pub trait WidgetExt: 'static { fn set_visual(&self, visual: Option<&gdk::Visual>); - fn set_window>(&self, window: &P); + fn set_window(&self, window: &gdk::Window); fn shape_combine_region(&self, region: Option<&cairo::Region>); @@ -566,7 +566,7 @@ pub trait WidgetExt: 'static { fn unrealize(&self); - fn unregister_window>(&self, window: &P); + fn unregister_window(&self, window: &gdk::Window); fn unset_state_flags(&self, flags: StateFlags); @@ -1210,16 +1210,16 @@ impl> WidgetExt for O { } } - fn drag_dest_set_proxy>( + fn drag_dest_set_proxy( &self, - proxy_window: &P, + proxy_window: &gdk::Window, protocol: gdk::DragProtocol, use_coordinates: bool, ) { unsafe { ffi::gtk_drag_dest_set_proxy( self.as_ref().to_glib_none().0, - proxy_window.as_ref().to_glib_none().0, + proxy_window.to_glib_none().0, protocol.to_glib(), use_coordinates.to_glib(), ); @@ -2195,11 +2195,11 @@ impl> WidgetExt for O { } } - fn register_window>(&self, window: &P) { + fn register_window(&self, window: &gdk::Window) { unsafe { ffi::gtk_widget_register_window( self.as_ref().to_glib_none().0, - window.as_ref().to_glib_none().0, + window.to_glib_none().0, ); } } @@ -2455,11 +2455,11 @@ impl> WidgetExt for O { } } - fn set_parent_window>(&self, parent_window: &P) { + fn set_parent_window(&self, parent_window: &gdk::Window) { unsafe { ffi::gtk_widget_set_parent_window( self.as_ref().to_glib_none().0, - parent_window.as_ref().to_glib_none().0, + parent_window.to_glib_none().0, ); } } @@ -2573,12 +2573,9 @@ impl> WidgetExt for O { } } - fn set_window>(&self, window: &P) { + fn set_window(&self, window: &gdk::Window) { unsafe { - ffi::gtk_widget_set_window( - self.as_ref().to_glib_none().0, - window.as_ref().to_glib_full(), - ); + ffi::gtk_widget_set_window(self.as_ref().to_glib_none().0, window.to_glib_full()); } } @@ -2705,11 +2702,11 @@ impl> WidgetExt for O { } } - fn unregister_window>(&self, window: &P) { + fn unregister_window(&self, window: &gdk::Window) { unsafe { ffi::gtk_widget_unregister_window( self.as_ref().to_glib_none().0, - window.as_ref().to_glib_none().0, + window.to_glib_none().0, ); } } diff --git a/gtk/sys/versions.txt b/gtk/sys/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/gtk/sys/versions.txt +++ b/gtk/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/pango/src/auto/versions.txt b/pango/src/auto/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/pango/src/auto/versions.txt +++ b/pango/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/pango/sys/versions.txt b/pango/sys/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/pango/sys/versions.txt +++ b/pango/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/pangocairo/src/auto/versions.txt b/pangocairo/src/auto/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/pangocairo/src/auto/versions.txt +++ b/pangocairo/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1) diff --git a/pangocairo/sys/versions.txt b/pangocairo/sys/versions.txt index 726a75ec9a71..e5dcf9c9d492 100644 --- a/pangocairo/sys/versions.txt +++ b/pangocairo/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +Generated by gir (https://github.com/gtk-rs/gir @ 3918b7c) from gir-files (https://github.com/gtk-rs/gir-files @ 8de1aa1)