Skip to content

Commit abc31e6

Browse files
regenerate with gir-files for v4.4
1 parent 50e1b18 commit abc31e6

File tree

22 files changed

+165
-36
lines changed

22 files changed

+165
-36
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 @ 545d89f)
2-
from gir-files (https://github.com/gtk-rs/gir-files.git @ 8dd6be9)
2+
from gir-files (https://github.com/gtk-rs/gir-files.git @ 38b7451)

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 @ 545d89f)
2-
from gir-files (https://github.com/gtk-rs/gir-files.git @ 8dd6be9)
2+
from gir-files (https://github.com/gtk-rs/gir-files.git @ 38b7451)

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 @ 545d89f)
2-
from gir-files (https://github.com/gtk-rs/gir-files.git @ 8dd6be9)
2+
from gir-files (https://github.com/gtk-rs/gir-files.git @ 38b7451)

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 @ 545d89f)
2-
from gir-files (https://github.com/gtk-rs/gir-files.git @ 8dd6be9)
2+
from gir-files (https://github.com/gtk-rs/gir-files.git @ 38b7451)

gdk4/Gir.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ generate = [
4343
"Gdk.Snapshot",
4444
"Gdk.SubpixelLayout",
4545
"Gdk.SurfaceEdge",
46+
"Gdk.TitlebarGesture",
4647
"Gdk.ToplevelLayout",
4748
"Gdk.ToplevelState",
4849
"Gdk.TouchpadGesturePhase",

gdk4/src/auto/content_formats.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,14 @@ impl ContentFormats {
142142
))
143143
}
144144
}
145+
146+
#[cfg(any(feature = "v4_4", feature = "dox"))]
147+
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_4")))]
148+
#[doc(alias = "gdk_content_formats_parse")]
149+
pub fn parse(string: &str) -> Option<ContentFormats> {
150+
assert_initialized_main_thread!();
151+
unsafe { from_glib_full(ffi::gdk_content_formats_parse(string.to_glib_none().0)) }
152+
}
145153
}
146154

147155
impl fmt::Display for ContentFormats {

gdk4/src/auto/enums.rs

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1854,6 +1854,95 @@ impl ToValue for SurfaceEdge {
18541854
}
18551855
}
18561856

1857+
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
1858+
#[non_exhaustive]
1859+
#[doc(alias = "GdkTitlebarGesture")]
1860+
pub enum TitlebarGesture {
1861+
#[doc(alias = "GDK_TITLEBAR_GESTURE_DOUBLE_CLICK")]
1862+
DoubleClick,
1863+
#[doc(alias = "GDK_TITLEBAR_GESTURE_RIGHT_CLICK")]
1864+
RightClick,
1865+
#[doc(alias = "GDK_TITLEBAR_GESTURE_MIDDLE_CLICK")]
1866+
MiddleClick,
1867+
#[doc(hidden)]
1868+
__Unknown(i32),
1869+
}
1870+
1871+
impl fmt::Display for TitlebarGesture {
1872+
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1873+
write!(
1874+
f,
1875+
"TitlebarGesture::{}",
1876+
match *self {
1877+
Self::DoubleClick => "DoubleClick",
1878+
Self::RightClick => "RightClick",
1879+
Self::MiddleClick => "MiddleClick",
1880+
_ => "Unknown",
1881+
}
1882+
)
1883+
}
1884+
}
1885+
1886+
#[doc(hidden)]
1887+
impl IntoGlib for TitlebarGesture {
1888+
type GlibType = ffi::GdkTitlebarGesture;
1889+
1890+
fn into_glib(self) -> ffi::GdkTitlebarGesture {
1891+
match self {
1892+
Self::DoubleClick => ffi::GDK_TITLEBAR_GESTURE_DOUBLE_CLICK,
1893+
Self::RightClick => ffi::GDK_TITLEBAR_GESTURE_RIGHT_CLICK,
1894+
Self::MiddleClick => ffi::GDK_TITLEBAR_GESTURE_MIDDLE_CLICK,
1895+
Self::__Unknown(value) => value,
1896+
}
1897+
}
1898+
}
1899+
1900+
#[doc(hidden)]
1901+
impl FromGlib<ffi::GdkTitlebarGesture> for TitlebarGesture {
1902+
unsafe fn from_glib(value: ffi::GdkTitlebarGesture) -> Self {
1903+
skip_assert_initialized!();
1904+
match value {
1905+
ffi::GDK_TITLEBAR_GESTURE_DOUBLE_CLICK => Self::DoubleClick,
1906+
ffi::GDK_TITLEBAR_GESTURE_RIGHT_CLICK => Self::RightClick,
1907+
ffi::GDK_TITLEBAR_GESTURE_MIDDLE_CLICK => Self::MiddleClick,
1908+
value => Self::__Unknown(value),
1909+
}
1910+
}
1911+
}
1912+
1913+
impl StaticType for TitlebarGesture {
1914+
fn static_type() -> Type {
1915+
unsafe { from_glib(ffi::gdk_titlebar_gesture_get_type()) }
1916+
}
1917+
}
1918+
1919+
impl glib::value::ValueType for TitlebarGesture {
1920+
type Type = Self;
1921+
}
1922+
1923+
unsafe impl<'a> FromValue<'a> for TitlebarGesture {
1924+
type Checker = glib::value::GenericValueTypeChecker<Self>;
1925+
1926+
unsafe fn from_value(value: &'a glib::Value) -> Self {
1927+
skip_assert_initialized!();
1928+
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
1929+
}
1930+
}
1931+
1932+
impl ToValue for TitlebarGesture {
1933+
fn to_value(&self) -> glib::Value {
1934+
let mut value = glib::Value::for_value_type::<Self>();
1935+
unsafe {
1936+
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
1937+
}
1938+
value
1939+
}
1940+
1941+
fn value_type(&self) -> glib::Type {
1942+
Self::static_type()
1943+
}
1944+
}
1945+
18571946
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
18581947
#[non_exhaustive]
18591948
#[doc(alias = "GdkTouchpadGesturePhase")]

gdk4/src/auto/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ pub use self::enums::NotifyType;
127127
pub use self::enums::ScrollDirection;
128128
pub use self::enums::SubpixelLayout;
129129
pub use self::enums::SurfaceEdge;
130+
pub use self::enums::TitlebarGesture;
130131
pub use self::enums::TouchpadGesturePhase;
131132
pub use self::enums::VulkanError;
132133

gdk4/src/auto/toplevel.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use crate::FullscreenMode;
77
use crate::Surface;
88
use crate::SurfaceEdge;
99
use crate::Texture;
10+
use crate::TitlebarGesture;
1011
use crate::ToplevelLayout;
1112
use crate::ToplevelState;
1213
use glib::object::Cast;
@@ -89,6 +90,9 @@ pub trait ToplevelExt: 'static {
8990
#[doc(alias = "gdk_toplevel_supports_edge_constraints")]
9091
fn supports_edge_constraints(&self) -> bool;
9192

93+
#[doc(alias = "gdk_toplevel_titlebar_gesture")]
94+
fn titlebar_gesture(&self, gesture: TitlebarGesture) -> bool;
95+
9296
fn is_decorated(&self) -> bool;
9397

9498
fn is_deletable(&self) -> bool;
@@ -271,6 +275,15 @@ impl<O: IsA<Toplevel>> ToplevelExt for O {
271275
}
272276
}
273277

278+
fn titlebar_gesture(&self, gesture: TitlebarGesture) -> bool {
279+
unsafe {
280+
from_glib(ffi::gdk_toplevel_titlebar_gesture(
281+
self.as_ref().to_glib_none().0,
282+
gesture.into_glib(),
283+
))
284+
}
285+
}
286+
274287
fn is_decorated(&self) -> bool {
275288
unsafe {
276289
let mut value = glib::Value::from_type(<bool as StaticType>::static_type());

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 @ 545d89f)
2-
from gir-files (https://github.com/gtk-rs/gir-files.git @ 8dd6be9)
2+
from gir-files (https://github.com/gtk-rs/gir-files.git @ 38b7451)

0 commit comments

Comments
 (0)