gdk4/auto/cairo_context.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, DrawContext};
7use glib::translate::*;
8
9glib::wrapper! {
10 #[doc(alias = "GdkCairoContext")]
11 pub struct CairoContext(Object<ffi::GdkCairoContext>) @extends DrawContext;
12
13 match fn {
14 type_ => || ffi::gdk_cairo_context_get_type(),
15 }
16}
17
18impl CairoContext {
19 #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
20 #[allow(deprecated)]
21 #[doc(alias = "gdk_cairo_context_cairo_create")]
22 pub fn cairo_create(&self) -> Option<cairo::Context> {
23 unsafe { from_glib_full(ffi::gdk_cairo_context_cairo_create(self.to_glib_none().0)) }
24 }
25}