[go: up one dir, main page]

gdk4/
drag_surface_size.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use crate::{ffi, prelude::*};
4use glib::translate::*;
5
6#[repr(transparent)]
7#[doc(alias = "GdkDragSurfaceSize")]
8pub struct DragSurfaceSize(std::ptr::NonNull<ffi::GdkDragSurfaceSize>);
9
10impl StaticType for DragSurfaceSize {
11    fn static_type() -> glib::Type {
12        unsafe { from_glib(ffi::gdk_drag_surface_size_get_type()) }
13    }
14}
15
16impl DragSurfaceSize {
17    #[doc(alias = "gdk_drag_surface_size_set_size")]
18    pub fn set_size(&self, width: i32, height: i32) {
19        unsafe { ffi::gdk_drag_surface_size_set_size(self.0.as_ptr(), width, height) }
20    }
21}