1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// 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
#![allow(deprecated)]

use glib::{prelude::*, translate::*};

glib::wrapper! {
    ///
    ///
    /// # Implements
    ///
    /// [`trait@gdk::prelude::SurfaceExt`]
    #[doc(alias = "GdkWin32Surface")]
    pub struct Win32Surface(Object<ffi::GdkWin32Surface, ffi::GdkWin32SurfaceClass>) @extends gdk::Surface;

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

impl Win32Surface {
    /// Flashes the specified @self.
    /// ## `urgent`
    /// if [`true`], flashes both the window and the taskbar button
    ///          continuously.
    #[doc(alias = "gdk_win32_surface_set_urgency_hint")]
    pub fn set_urgency_hint(&self, urgent: bool) {
        unsafe {
            ffi::gdk_win32_surface_set_urgency_hint(self.to_glib_none().0, urgent.into_glib());
        }
    }

    ///
    /// # Deprecated since 4.8
    ///
    /// Use `GDK_IS_WIN32_SURFACE` instead.
    /// ## `surface`
    /// a [`gdk::Surface`][crate::gdk::Surface]
    ///
    /// # Returns
    ///
    /// [`true`] if the @surface is a win32 implemented surface.
    #[cfg_attr(feature = "v4_8", deprecated = "Since 4.8")]
    #[allow(deprecated)]
    #[doc(alias = "gdk_win32_surface_is_win32")]
    pub fn is_win32(surface: &impl IsA<gdk::Surface>) -> bool {
        assert_initialized_main_thread!();
        unsafe {
            from_glib(ffi::gdk_win32_surface_is_win32(
                surface.as_ref().to_glib_none().0,
            ))
        }
    }
}