gdk4_win32/auto/
win32_surface.rs

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#![allow(deprecated)]
5
6use crate::ffi;
7use glib::{prelude::*, translate::*};
8
9glib::wrapper! {
10    ///
11    ///
12    /// # Implements
13    ///
14    /// [`trait@gdk::prelude::SurfaceExt`]
15    #[doc(alias = "GdkWin32Surface")]
16    pub struct Win32Surface(Object<ffi::GdkWin32Surface, ffi::GdkWin32SurfaceClass>) @extends gdk::Surface;
17
18    match fn {
19        type_ => || ffi::gdk_win32_surface_get_type(),
20    }
21}
22
23impl Win32Surface {
24    /// Flashes the specified @self.
25    /// ## `urgent`
26    /// if [`true`], flashes both the window and the taskbar button
27    ///          continuously.
28    #[doc(alias = "gdk_win32_surface_set_urgency_hint")]
29    pub fn set_urgency_hint(&self, urgent: bool) {
30        unsafe {
31            ffi::gdk_win32_surface_set_urgency_hint(self.to_glib_none().0, urgent.into_glib());
32        }
33    }
34
35    ///
36    /// # Deprecated since 4.8
37    ///
38    /// Use `GDK_IS_WIN32_SURFACE` instead.
39    /// ## `surface`
40    /// a [`gdk::Surface`][crate::gdk::Surface]
41    ///
42    /// # Returns
43    ///
44    /// [`true`] if the @surface is a win32 implemented surface.
45    #[cfg_attr(feature = "v4_8", deprecated = "Since 4.8")]
46    #[allow(deprecated)]
47    #[doc(alias = "gdk_win32_surface_is_win32")]
48    pub fn is_win32(surface: &impl IsA<gdk::Surface>) -> bool {
49        assert_initialized_main_thread!();
50        unsafe {
51            from_glib(ffi::gdk_win32_surface_is_win32(
52                surface.as_ref().to_glib_none().0,
53            ))
54        }
55    }
56}