Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Regenerate everything with latest gir #198

Merged
merged 3 commits into from
Dec 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion atk/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion atk/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion cairo/sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion gdk-pixbuf/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion gdk-pixbuf/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -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)
9 changes: 4 additions & 5 deletions gdk/src/auto/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -170,7 +169,7 @@ impl Device {
unsafe { from_glib(ffi::gdk_device_get_source(self.to_glib_none().0)) }
}

//pub fn get_state<P: IsA<Window>>(&self, window: &P, axes: &[f64]) -> ModifierType {
//pub fn get_state(&self, window: &Window, axes: &[f64]) -> ModifierType {
// unsafe { TODO: call ffi:gdk_device_get_state() }
//}

Expand Down Expand Up @@ -211,9 +210,9 @@ impl Device {
}

#[cfg_attr(feature = "v3_20", deprecated)]
pub fn grab<P: IsA<Window>>(
pub fn grab(
&self,
window: &P,
window: &Window,
grab_ownership: GrabOwnership,
owner_events: bool,
event_mask: EventMask,
Expand All @@ -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(),
Expand Down
14 changes: 4 additions & 10 deletions gdk/src/auto/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<P: IsA<Window>>(&self, window: &P) -> Option<Monitor> {
pub fn get_monitor_at_window(&self, window: &Window) -> Option<Monitor> {
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,
))
}
}
Expand Down Expand Up @@ -229,17 +228,12 @@ impl Display {
}
}

pub fn store_clipboard<P: IsA<Window>>(
&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,
Expand Down
7 changes: 2 additions & 5 deletions gdk/src/auto/drag_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")))]
Expand Down Expand Up @@ -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<P: IsA<Window>>(&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(),
))
}
Expand Down
68 changes: 29 additions & 39 deletions gdk/src/auto/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -252,15 +251,15 @@ pub fn pre_parse_libgtk_only() {
}
}

pub fn property_delete<P: IsA<Window>>(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<P: IsA<Window>>(
window: &P,
pub fn property_get(
window: &Window,
property: &Atom,
type_: &Atom,
offset: libc::c_ulong,
Expand All @@ -274,7 +273,7 @@ pub fn property_get<P: IsA<Window>>(
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,
Expand Down Expand Up @@ -314,16 +313,11 @@ pub fn query_depths() -> Vec<i32> {
// unsafe { TODO: call ffi:gdk_query_visual_types() }
//}

pub fn selection_convert<P: IsA<Window>>(
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_,
Expand All @@ -346,26 +340,26 @@ pub fn selection_owner_get_for_display(display: &Display, selection: &Atom) -> O
}
}

pub fn selection_owner_set<P: IsA<Window>>(
owner: Option<&P>,
pub fn selection_owner_set(
owner: Option<&Window>,
selection: &Atom,
time_: u32,
send_event: bool,
) -> bool {
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(),
))
}
}

pub fn selection_owner_set_for_display<P: IsA<Window>>(
pub fn selection_owner_set_for_display(
display: &Display,
owner: Option<&P>,
owner: Option<&Window>,
selection: &Atom,
time_: u32,
send_event: bool,
Expand All @@ -374,16 +368,16 @@ pub fn selection_owner_set_for_display<P: IsA<Window>>(
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(),
))
}
}

pub fn selection_send_notify<P: IsA<Window>>(
requestor: &P,
pub fn selection_send_notify(
requestor: &Window,
selection: &Atom,
target: &Atom,
property: &Atom,
Expand All @@ -392,7 +386,7 @@ pub fn selection_send_notify<P: IsA<Window>>(
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,
Expand All @@ -401,9 +395,9 @@ pub fn selection_send_notify<P: IsA<Window>>(
}
}

pub fn selection_send_notify_for_display<P: IsA<Window>>(
pub fn selection_send_notify_for_display(
display: &Display,
requestor: &P,
requestor: &Window,
selection: &Atom,
target: &Atom,
property: &Atom,
Expand All @@ -413,7 +407,7 @@ pub fn selection_send_notify_for_display<P: IsA<Window>>(
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,
Expand Down Expand Up @@ -450,30 +444,26 @@ pub fn set_show_events(show_events: bool) {
}
}

pub fn synthesize_window_state<P: IsA<Window>>(
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<P: IsA<Window>>(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<P: IsA<Window>>(
window: &P,
pub fn test_simulate_button(
window: &Window,
x: i32,
y: i32,
button: u32,
Expand All @@ -483,7 +473,7 @@ pub fn test_simulate_button<P: IsA<Window>>(
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,
Expand All @@ -493,8 +483,8 @@ pub fn test_simulate_button<P: IsA<Window>>(
}
}

pub fn test_simulate_key<P: IsA<Window>>(
window: &P,
pub fn test_simulate_key(
window: &Window,
x: i32,
y: i32,
keyval: u32,
Expand All @@ -504,7 +494,7 @@ pub fn test_simulate_key<P: IsA<Window>>(
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,
Expand Down
4 changes: 1 addition & 3 deletions gdk/src/auto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
8 changes: 2 additions & 6 deletions gdk/src/auto/screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -49,12 +48,9 @@ impl Screen {
}

#[cfg_attr(feature = "v3_22", deprecated)]
pub fn get_monitor_at_window<P: IsA<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)
}
}

Expand Down
Loading