gdk4/auto/drag_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
5use crate::{ffi, Surface};
6use glib::{prelude::*, translate::*};
7
8glib::wrapper! {
9 #[doc(alias = "GdkDragSurface")]
10 pub struct DragSurface(Interface<ffi::GdkDragSurface, ffi::GdkDragSurfaceInterface>) @requires Surface;
11
12 match fn {
13 type_ => || ffi::gdk_drag_surface_get_type(),
14 }
15}
16
17impl DragSurface {
18 pub const NONE: Option<&'static DragSurface> = None;
19}
20
21pub trait DragSurfaceExt: IsA<DragSurface> + 'static {
22 #[doc(alias = "gdk_drag_surface_present")]
23 fn present(&self, width: i32, height: i32) -> bool {
24 unsafe {
25 from_glib(ffi::gdk_drag_surface_present(
26 self.as_ref().to_glib_none().0,
27 width,
28 height,
29 ))
30 }
31 }
32}
33
34impl<O: IsA<DragSurface>> DragSurfaceExt for O {}