Skip to main content

gtk/auto/
style_properties.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::StyleProvider;
6use std::fmt;
7
8glib::wrapper! {
9    /// GtkStyleProperties provides the storage for style information
10    /// that is used by [`StyleContext`][crate::StyleContext] and other [`StyleProvider`][crate::StyleProvider]
11    /// implementations.
12    ///
13    /// Before style properties can be stored in GtkStyleProperties, they
14    /// must be registered with `gtk_style_properties_register_property()`.
15    ///
16    /// Unless you are writing a [`StyleProvider`][crate::StyleProvider] implementation, you
17    /// are unlikely to use this API directly, as `gtk_style_context_get()`
18    /// and its variants are the preferred way to access styling information
19    /// from widget implementations and theming engine implementations
20    /// should use the APIs provided by `GtkThemingEngine` instead.
21    ///
22    /// [`StyleProperties`][crate::StyleProperties] has been deprecated in GTK 3.16. The CSS
23    /// machinery does not use it anymore and all users of this object
24    /// have been deprecated.
25    ///
26    /// # Implements
27    ///
28    /// [`trait@glib::ObjectExt`], [`StyleProviderExt`][trait@crate::prelude::StyleProviderExt]
29    #[doc(alias = "GtkStyleProperties")]
30    pub struct StyleProperties(Object<ffi::GtkStyleProperties, ffi::GtkStylePropertiesClass>) @implements StyleProvider;
31
32    match fn {
33        type_ => || ffi::gtk_style_properties_get_type(),
34    }
35}
36
37impl StyleProperties {
38    pub const NONE: Option<&'static StyleProperties> = None;
39}
40
41impl fmt::Display for StyleProperties {
42    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
43        f.write_str("StyleProperties")
44    }
45}