Skip to content

Commit 203267a

Browse files
Regenerate with latest gir/gir-files
1 parent b9e56ec commit 203267a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2861
-33
lines changed

gdk4-wayland/src/auto/versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ 20a5b17f6da9)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 1c7a6b57a5fc)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 21b29d0e0c1a)

gdk4-wayland/sys/versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ 20a5b17f6da9)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 1c7a6b57a5fc)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 21b29d0e0c1a)

gdk4-win32/src/auto/versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ 20a5b17f6da9)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 1c7a6b57a5fc)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 21b29d0e0c1a)

gdk4-win32/sys/versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ 20a5b17f6da9)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 1c7a6b57a5fc)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 21b29d0e0c1a)

gdk4-x11/src/auto/versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ 20a5b17f6da9)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 1c7a6b57a5fc)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 21b29d0e0c1a)

gdk4-x11/sys/versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ 20a5b17f6da9)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 1c7a6b57a5fc)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 21b29d0e0c1a)

gdk4/Gir.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ generate = [
2525
"Gdk.DevicePad",
2626
"Gdk.DevicePadFeature",
2727
"Gdk.DeviceToolType",
28+
"Gdk.DmabufError",
29+
"Gdk.DmabufFormats",
30+
"Gdk.DmabufTexture",
31+
"Gdk.DmabufTextureBuilder",
2832
"Gdk.DNDEvent",
2933
"Gdk.DragAction",
3034
"Gdk.DragCancelReason",

gdk4/src/auto/display.rs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// DO NOT EDIT
44
#![allow(deprecated)]
55

6+
#[cfg(feature = "v4_14")]
7+
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
8+
use crate::DmabufFormats;
69
#[cfg(feature = "v4_6")]
710
#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
811
use crate::GLContext;
@@ -131,6 +134,18 @@ pub trait DisplayExt: IsA<Display> + sealed::Sealed + 'static {
131134
}
132135
}
133136

137+
#[cfg(feature = "v4_14")]
138+
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
139+
#[doc(alias = "gdk_display_get_dmabuf_formats")]
140+
#[doc(alias = "get_dmabuf_formats")]
141+
fn dmabuf_formats(&self) -> DmabufFormats {
142+
unsafe {
143+
from_glib_none(ffi::gdk_display_get_dmabuf_formats(
144+
self.as_ref().to_glib_none().0,
145+
))
146+
}
147+
}
148+
134149
#[doc(alias = "gdk_display_get_monitor_at_surface")]
135150
#[doc(alias = "get_monitor_at_surface")]
136151
fn monitor_at_surface(&self, surface: &impl IsA<Surface>) -> Option<Monitor> {
@@ -424,6 +439,34 @@ pub trait DisplayExt: IsA<Display> + sealed::Sealed + 'static {
424439
}
425440
}
426441

442+
#[cfg(feature = "v4_14")]
443+
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
444+
#[doc(alias = "dmabuf-formats")]
445+
fn connect_dmabuf_formats_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
446+
unsafe extern "C" fn notify_dmabuf_formats_trampoline<
447+
P: IsA<Display>,
448+
F: Fn(&P) + 'static,
449+
>(
450+
this: *mut ffi::GdkDisplay,
451+
_param_spec: glib::ffi::gpointer,
452+
f: glib::ffi::gpointer,
453+
) {
454+
let f: &F = &*(f as *const F);
455+
f(Display::from_glib_borrow(this).unsafe_cast_ref())
456+
}
457+
unsafe {
458+
let f: Box_<F> = Box_::new(f);
459+
connect_raw(
460+
self.as_ptr() as *mut _,
461+
b"notify::dmabuf-formats\0".as_ptr() as *const _,
462+
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
463+
notify_dmabuf_formats_trampoline::<Self, F> as *const (),
464+
)),
465+
Box_::into_raw(f),
466+
)
467+
}
468+
}
469+
427470
#[doc(alias = "input-shapes")]
428471
fn connect_input_shapes_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
429472
unsafe extern "C" fn notify_input_shapes_trampoline<

gdk4/src/auto/dmabuf_formats.rs

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// This file was generated by gir (https://github.com/gtk-rs/gir)
2+
// from gir-files (https://github.com/gtk-rs/gir-files)
3+
// DO NOT EDIT
4+
5+
use glib::translate::*;
6+
7+
glib::wrapper! {
8+
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
9+
pub struct DmabufFormats(Shared<ffi::GdkDmabufFormats>);
10+
11+
match fn {
12+
ref => |ptr| ffi::gdk_dmabuf_formats_ref(ptr),
13+
unref => |ptr| ffi::gdk_dmabuf_formats_unref(ptr),
14+
type_ => || ffi::gdk_dmabuf_formats_get_type(),
15+
}
16+
}
17+
18+
impl DmabufFormats {
19+
#[doc(alias = "gdk_dmabuf_formats_contains")]
20+
pub fn contains(&self, fourcc: u32, modifier: u64) -> bool {
21+
unsafe {
22+
from_glib(ffi::gdk_dmabuf_formats_contains(
23+
self.to_glib_none().0,
24+
fourcc,
25+
modifier,
26+
))
27+
}
28+
}
29+
30+
#[doc(alias = "gdk_dmabuf_formats_get_format")]
31+
#[doc(alias = "get_format")]
32+
pub fn format(&self, idx: usize) -> (u32, u64) {
33+
unsafe {
34+
let mut fourcc = std::mem::MaybeUninit::uninit();
35+
let mut modifier = std::mem::MaybeUninit::uninit();
36+
ffi::gdk_dmabuf_formats_get_format(
37+
self.to_glib_none().0,
38+
idx,
39+
fourcc.as_mut_ptr(),
40+
modifier.as_mut_ptr(),
41+
);
42+
(fourcc.assume_init(), modifier.assume_init())
43+
}
44+
}
45+
46+
#[doc(alias = "gdk_dmabuf_formats_get_n_formats")]
47+
#[doc(alias = "get_n_formats")]
48+
pub fn n_formats(&self) -> usize {
49+
unsafe { ffi::gdk_dmabuf_formats_get_n_formats(self.to_glib_none().0) }
50+
}
51+
}

gdk4/src/auto/dmabuf_texture.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// This file was generated by gir (https://github.com/gtk-rs/gir)
2+
// from gir-files (https://github.com/gtk-rs/gir-files)
3+
// DO NOT EDIT
4+
5+
use crate::{Paintable, Texture};
6+
7+
glib::wrapper! {
8+
#[doc(alias = "GdkDmabufTexture")]
9+
pub struct DmabufTexture(Object<ffi::GdkDmabufTexture, ffi::GdkDmabufTextureClass>) @extends Texture, @implements Paintable, gio::Icon, gio::LoadableIcon;
10+
11+
match fn {
12+
type_ => || ffi::gdk_dmabuf_texture_get_type(),
13+
}
14+
}
15+
16+
impl DmabufTexture {}

0 commit comments

Comments
 (0)