1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// 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

use crate::DrawContext;
use glib::translate::*;

glib::wrapper! {
    #[doc(alias = "GdkCairoContext")]
    pub struct CairoContext(Object<ffi::GdkCairoContext>) @extends DrawContext;

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

impl CairoContext {
    #[doc(alias = "gdk_cairo_context_cairo_create")]
    pub fn cairo_create(&self) -> Option<cairo::Context> {
        unsafe { from_glib_full(ffi::gdk_cairo_context_cairo_create(self.to_glib_none().0)) }
    }
}