Skip to content

Commit

Permalink
Regenerate with latest gir-files
Browse files Browse the repository at this point in the history
  • Loading branch information
bilelmoussaoui committed Feb 4, 2024
1 parent 842adba commit 19ccb5c
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 12 deletions.
2 changes: 1 addition & 1 deletion gdk4-wayland/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 @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
2 changes: 1 addition & 1 deletion gdk4-wayland/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 @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
2 changes: 1 addition & 1 deletion gdk4-win32/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 @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
2 changes: 1 addition & 1 deletion gdk4-win32/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 @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
2 changes: 1 addition & 1 deletion gdk4-x11/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 @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
2 changes: 1 addition & 1 deletion gdk4-x11/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 @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
33 changes: 33 additions & 0 deletions gdk4/src/auto/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ pub trait MonitorExt: IsA<Monitor> + sealed::Sealed + 'static {
unsafe { ffi::gdk_monitor_get_refresh_rate(self.as_ref().to_glib_none().0) }
}

#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[doc(alias = "gdk_monitor_get_scale")]
#[doc(alias = "get_scale")]
fn scale(&self) -> f64 {
unsafe { ffi::gdk_monitor_get_scale(self.as_ref().to_glib_none().0) }
}

#[doc(alias = "gdk_monitor_get_scale_factor")]
#[doc(alias = "get_scale_factor")]
fn scale_factor(&self) -> i32 {
Expand Down Expand Up @@ -316,6 +324,31 @@ pub trait MonitorExt: IsA<Monitor> + sealed::Sealed + 'static {
}
}

#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[doc(alias = "scale")]
fn connect_scale_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_scale_trampoline<P: IsA<Monitor>, F: Fn(&P) + 'static>(
this: *mut ffi::GdkMonitor,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(Monitor::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::scale\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
notify_scale_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
)
}
}

#[doc(alias = "scale-factor")]
fn connect_scale_factor_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_scale_factor_trampoline<
Expand Down
2 changes: 1 addition & 1 deletion gdk4/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 @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
3 changes: 3 additions & 0 deletions gdk4/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5059,6 +5059,9 @@ extern "C" {
pub fn gdk_monitor_get_manufacturer(monitor: *mut GdkMonitor) -> *const c_char;
pub fn gdk_monitor_get_model(monitor: *mut GdkMonitor) -> *const c_char;
pub fn gdk_monitor_get_refresh_rate(monitor: *mut GdkMonitor) -> c_int;
#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
pub fn gdk_monitor_get_scale(monitor: *mut GdkMonitor) -> c_double;
pub fn gdk_monitor_get_scale_factor(monitor: *mut GdkMonitor) -> c_int;
pub fn gdk_monitor_get_subpixel_layout(monitor: *mut GdkMonitor) -> GdkSubpixelLayout;
pub fn gdk_monitor_get_width_mm(monitor: *mut GdkMonitor) -> c_int;
Expand Down
2 changes: 1 addition & 1 deletion gdk4/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 @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
2 changes: 1 addition & 1 deletion gsk4/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 @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
2 changes: 1 addition & 1 deletion gsk4/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 @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
2 changes: 1 addition & 1 deletion gtk4/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 @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
2 changes: 1 addition & 1 deletion gtk4/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 @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)

0 comments on commit 19ccb5c

Please sign in to comment.