Skip to content

Commit

Permalink
Regenerate with latest gir/gir-files
Browse files Browse the repository at this point in the history
  • Loading branch information
bilelmoussaoui committed Jan 18, 2024
1 parent d2cdb59 commit 4e21f8f
Show file tree
Hide file tree
Showing 54 changed files with 2,861 additions and 33 deletions.
4 changes: 2 additions & 2 deletions 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 @ 20a5b17f6da9)
from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40)
Generated by gir (https://github.com/gtk-rs/gir @ 1c7a6b57a5fc)
from gir-files (https://github.com/gtk-rs/gir-files @ 21b29d0e0c1a)
4 changes: 2 additions & 2 deletions 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 @ 20a5b17f6da9)
from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40)
Generated by gir (https://github.com/gtk-rs/gir @ 1c7a6b57a5fc)
from gir-files (https://github.com/gtk-rs/gir-files @ 21b29d0e0c1a)
4 changes: 2 additions & 2 deletions 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 @ 20a5b17f6da9)
from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40)
Generated by gir (https://github.com/gtk-rs/gir @ 1c7a6b57a5fc)
from gir-files (https://github.com/gtk-rs/gir-files @ 21b29d0e0c1a)
4 changes: 2 additions & 2 deletions 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 @ 20a5b17f6da9)
from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40)
Generated by gir (https://github.com/gtk-rs/gir @ 1c7a6b57a5fc)
from gir-files (https://github.com/gtk-rs/gir-files @ 21b29d0e0c1a)
4 changes: 2 additions & 2 deletions 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 @ 20a5b17f6da9)
from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40)
Generated by gir (https://github.com/gtk-rs/gir @ 1c7a6b57a5fc)
from gir-files (https://github.com/gtk-rs/gir-files @ 21b29d0e0c1a)
4 changes: 2 additions & 2 deletions 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 @ 20a5b17f6da9)
from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40)
Generated by gir (https://github.com/gtk-rs/gir @ 1c7a6b57a5fc)
from gir-files (https://github.com/gtk-rs/gir-files @ 21b29d0e0c1a)
4 changes: 4 additions & 0 deletions gdk4/Gir.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ generate = [
"Gdk.DevicePad",
"Gdk.DevicePadFeature",
"Gdk.DeviceToolType",
"Gdk.DmabufFormats",
"Gdk.DmabufError",
"Gdk.DmabufTexture",
"Gdk.DmabufTextureBuilder",
"Gdk.DNDEvent",
"Gdk.DragAction",
"Gdk.DragCancelReason",
Expand Down
43 changes: 43 additions & 0 deletions gdk4/src/auto/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
// DO NOT EDIT
#![allow(deprecated)]

#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
use crate::DmabufFormats;
#[cfg(feature = "v4_6")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
use crate::GLContext;
Expand Down Expand Up @@ -131,6 +134,18 @@ pub trait DisplayExt: IsA<Display> + sealed::Sealed + 'static {
}
}

#[cfg(feature = "v4_14")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
#[doc(alias = "gdk_display_get_dmabuf_formats")]
#[doc(alias = "get_dmabuf_formats")]
fn dmabuf_formats(&self) -> DmabufFormats {
unsafe {
from_glib_none(ffi::gdk_display_get_dmabuf_formats(
self.as_ref().to_glib_none().0,
))
}
}

#[doc(alias = "gdk_display_get_monitor_at_surface")]
#[doc(alias = "get_monitor_at_surface")]
fn monitor_at_surface(&self, surface: &impl IsA<Surface>) -> Option<Monitor> {
Expand Down Expand Up @@ -424,6 +439,34 @@ pub trait DisplayExt: IsA<Display> + sealed::Sealed + 'static {
}
}

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

#[doc(alias = "input-shapes")]
fn connect_input_shapes_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_input_shapes_trampoline<
Expand Down
51 changes: 51 additions & 0 deletions gdk4/src/auto/dmabuf_formats.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use glib::translate::*;

glib::wrapper! {
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct DmabufFormats(Shared<ffi::GdkDmabufFormats>);

match fn {
ref => |ptr| ffi::gdk_dmabuf_formats_ref(ptr),
unref => |ptr| ffi::gdk_dmabuf_formats_unref(ptr),
type_ => || ffi::gdk_dmabuf_formats_get_type(),
}
}

impl DmabufFormats {
#[doc(alias = "gdk_dmabuf_formats_contains")]
pub fn contains(&self, fourcc: u32, modifier: u64) -> bool {
unsafe {
from_glib(ffi::gdk_dmabuf_formats_contains(
self.to_glib_none().0,
fourcc,
modifier,
))
}
}

#[doc(alias = "gdk_dmabuf_formats_get_format")]
#[doc(alias = "get_format")]
pub fn format(&self, idx: usize) -> (u32, u64) {
unsafe {
let mut fourcc = std::mem::MaybeUninit::uninit();
let mut modifier = std::mem::MaybeUninit::uninit();
ffi::gdk_dmabuf_formats_get_format(
self.to_glib_none().0,
idx,
fourcc.as_mut_ptr(),
modifier.as_mut_ptr(),
);
(fourcc.assume_init(), modifier.assume_init())
}
}

#[doc(alias = "gdk_dmabuf_formats_get_n_formats")]
#[doc(alias = "get_n_formats")]
pub fn n_formats(&self) -> usize {
unsafe { ffi::gdk_dmabuf_formats_get_n_formats(self.to_glib_none().0) }
}
}
16 changes: 16 additions & 0 deletions gdk4/src/auto/dmabuf_texture.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use crate::{Paintable, Texture};

glib::wrapper! {
#[doc(alias = "GdkDmabufTexture")]
pub struct DmabufTexture(Object<ffi::GdkDmabufTexture, ffi::GdkDmabufTextureClass>) @extends Texture, @implements Paintable, gio::Icon, gio::LoadableIcon;

match fn {
type_ => || ffi::gdk_dmabuf_texture_get_type(),
}
}

impl DmabufTexture {}
Loading

0 comments on commit 4e21f8f

Please sign in to comment.