|
| 1 | +// Take a look at the license at the top of the repository in the LICENSE file. |
| 2 | + |
| 3 | +use crate::Calendar; |
| 4 | +#[cfg(not(feature = "v4_14"))] |
| 5 | +use glib::prelude::*; |
| 6 | + |
| 7 | +impl Calendar { |
| 8 | + #[cfg(not(feature = "v4_14"))] |
| 9 | + #[cfg_attr(docsrs, doc(cfg(not(feature = "v4_14"))))] |
| 10 | + pub fn day(&self) -> i32 { |
| 11 | + ObjectExt::property(self, "day") |
| 12 | + } |
| 13 | + |
| 14 | + #[cfg(not(feature = "v4_14"))] |
| 15 | + #[cfg_attr(docsrs, doc(cfg(not(feature = "v4_14"))))] |
| 16 | + pub fn set_day(&self, day: i32) { |
| 17 | + ObjectExt::set_property(self, "day", day) |
| 18 | + } |
| 19 | + |
| 20 | + #[cfg(not(feature = "v4_14"))] |
| 21 | + #[cfg_attr(docsrs, doc(cfg(not(feature = "v4_14"))))] |
| 22 | + pub fn month(&self) -> i32 { |
| 23 | + ObjectExt::property(self, "month") |
| 24 | + } |
| 25 | + |
| 26 | + #[cfg(not(feature = "v4_14"))] |
| 27 | + #[cfg_attr(docsrs, doc(cfg(not(feature = "v4_14"))))] |
| 28 | + pub fn set_month(&self, month: i32) { |
| 29 | + ObjectExt::set_property(self, "month", month) |
| 30 | + } |
| 31 | + |
| 32 | + #[cfg(not(feature = "v4_14"))] |
| 33 | + #[cfg_attr(docsrs, doc(cfg(not(feature = "v4_14"))))] |
| 34 | + pub fn year(&self) -> i32 { |
| 35 | + ObjectExt::property(self, "year") |
| 36 | + } |
| 37 | + |
| 38 | + #[cfg(not(feature = "v4_14"))] |
| 39 | + #[cfg_attr(docsrs, doc(cfg(not(feature = "v4_14"))))] |
| 40 | + pub fn set_year(&self, year: i32) { |
| 41 | + ObjectExt::set_property(self, "year", year) |
| 42 | + } |
| 43 | +} |
0 commit comments