1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// 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::StyleProvider;
use std::fmt;

glib::wrapper! {
    /// GtkStyleProperties provides the storage for style information
    /// that is used by [`StyleContext`][crate::StyleContext] and other [`StyleProvider`][crate::StyleProvider]
    /// implementations.
    ///
    /// Before style properties can be stored in GtkStyleProperties, they
    /// must be registered with `gtk_style_properties_register_property()`.
    ///
    /// Unless you are writing a [`StyleProvider`][crate::StyleProvider] implementation, you
    /// are unlikely to use this API directly, as `gtk_style_context_get()`
    /// and its variants are the preferred way to access styling information
    /// from widget implementations and theming engine implementations
    /// should use the APIs provided by `GtkThemingEngine` instead.
    ///
    /// [`StyleProperties`][crate::StyleProperties] has been deprecated in GTK 3.16. The CSS
    /// machinery does not use it anymore and all users of this object
    /// have been deprecated.
    ///
    /// # Implements
    ///
    /// [`trait@glib::ObjectExt`], [`StyleProviderExt`][trait@crate::prelude::StyleProviderExt]
    #[doc(alias = "GtkStyleProperties")]
    pub struct StyleProperties(Object<ffi::GtkStyleProperties, ffi::GtkStylePropertiesClass>) @implements StyleProvider;

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

impl StyleProperties {
    pub const NONE: Option<&'static StyleProperties> = None;
}

impl fmt::Display for StyleProperties {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        f.write_str("StyleProperties")
    }
}