Skip to content

Commit 19ccb5c

Browse files
Regenerate with latest gir-files
1 parent 842adba commit 19ccb5c

File tree

14 files changed

+48
-12
lines changed

14 files changed

+48
-12
lines changed

gdk4-wayland/src/auto/versions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)

gdk4-wayland/sys/versions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)

gdk4-win32/src/auto/versions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)

gdk4-win32/sys/versions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)

gdk4-x11/src/auto/versions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)

gdk4-x11/sys/versions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)

gdk4/src/auto/monitor.rs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@ pub trait MonitorExt: IsA<Monitor> + sealed::Sealed + 'static {
9898
unsafe { ffi::gdk_monitor_get_refresh_rate(self.as_ref().to_glib_none().0) }
9999
}
100100

101+
#[cfg(feature = "v4_14")]
102+
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
103+
#[doc(alias = "gdk_monitor_get_scale")]
104+
#[doc(alias = "get_scale")]
105+
fn scale(&self) -> f64 {
106+
unsafe { ffi::gdk_monitor_get_scale(self.as_ref().to_glib_none().0) }
107+
}
108+
101109
#[doc(alias = "gdk_monitor_get_scale_factor")]
102110
#[doc(alias = "get_scale_factor")]
103111
fn scale_factor(&self) -> i32 {
@@ -316,6 +324,31 @@ pub trait MonitorExt: IsA<Monitor> + sealed::Sealed + 'static {
316324
}
317325
}
318326

327+
#[cfg(feature = "v4_14")]
328+
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
329+
#[doc(alias = "scale")]
330+
fn connect_scale_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
331+
unsafe extern "C" fn notify_scale_trampoline<P: IsA<Monitor>, F: Fn(&P) + 'static>(
332+
this: *mut ffi::GdkMonitor,
333+
_param_spec: glib::ffi::gpointer,
334+
f: glib::ffi::gpointer,
335+
) {
336+
let f: &F = &*(f as *const F);
337+
f(Monitor::from_glib_borrow(this).unsafe_cast_ref())
338+
}
339+
unsafe {
340+
let f: Box_<F> = Box_::new(f);
341+
connect_raw(
342+
self.as_ptr() as *mut _,
343+
b"notify::scale\0".as_ptr() as *const _,
344+
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
345+
notify_scale_trampoline::<Self, F> as *const (),
346+
)),
347+
Box_::into_raw(f),
348+
)
349+
}
350+
}
351+
319352
#[doc(alias = "scale-factor")]
320353
fn connect_scale_factor_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
321354
unsafe extern "C" fn notify_scale_factor_trampoline<

gdk4/src/auto/versions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)

gdk4/sys/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5059,6 +5059,9 @@ extern "C" {
50595059
pub fn gdk_monitor_get_manufacturer(monitor: *mut GdkMonitor) -> *const c_char;
50605060
pub fn gdk_monitor_get_model(monitor: *mut GdkMonitor) -> *const c_char;
50615061
pub fn gdk_monitor_get_refresh_rate(monitor: *mut GdkMonitor) -> c_int;
5062+
#[cfg(feature = "v4_14")]
5063+
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
5064+
pub fn gdk_monitor_get_scale(monitor: *mut GdkMonitor) -> c_double;
50625065
pub fn gdk_monitor_get_scale_factor(monitor: *mut GdkMonitor) -> c_int;
50635066
pub fn gdk_monitor_get_subpixel_layout(monitor: *mut GdkMonitor) -> GdkSubpixelLayout;
50645067
pub fn gdk_monitor_get_width_mm(monitor: *mut GdkMonitor) -> c_int;

gdk4/sys/versions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)

0 commit comments

Comments
 (0)