wxrust_base/generated/
class_s.rs

1use super::*;
2
3// wxStandardPaths
4wxwidgets! {
5    /// wxStandardPaths returns the standard locations in the file system and should be used by applications to find their data files in a portable way.
6    /// - [`StandardPaths`] represents a C++ `wxStandardPaths` class instance which your code has ownership, [`StandardPathsIsOwned`]`<false>` represents one which don't own.
7    /// - Use [`StandardPaths`]'s `new()` to create an instance of this class.
8    /// - See [C++ `wxStandardPaths` class's documentation](https://docs.wxwidgets.org/3.2/classwx_standard_paths.html) for more details.
9    #[doc(alias = "wxStandardPaths")]
10    #[doc(alias = "StandardPaths")]
11    class StandardPaths
12        = StandardPathsIsOwned<true>(wxStandardPaths) impl
13        StandardPathsMethods
14}
15impl<const OWNED: bool> StandardPathsIsOwned<OWNED> {
16    //  ENUM: ResourceCat
17    pub const ResourceCat_None: c_int = 0;
18    pub const ResourceCat_Messages: c_int = 0 + 1;
19
20    //  ENUM: Dir
21    pub const Dir_Cache: c_int = 0;
22    pub const Dir_Documents: c_int = 0 + 1;
23    pub const Dir_Desktop: c_int = 0 + 2;
24    pub const Dir_Downloads: c_int = 0 + 3;
25    pub const Dir_Music: c_int = 0 + 4;
26    pub const Dir_Pictures: c_int = 0 + 5;
27    pub const Dir_Videos: c_int = 0 + 6;
28
29    //  ENUM: FileLayout
30    pub const FileLayout_Classic: c_int = 0;
31    pub const FileLayout_XDG: c_int = 0 + 1;
32
33    //  ENUM: ConfigFileConv
34    pub const ConfigFileConv_Dot: c_int = 0;
35    pub const ConfigFileConv_Ext: c_int = 0 + 1;
36
37    pub fn none() -> Option<&'static Self> {
38        None
39    }
40}
41impl Clone for StandardPathsIsOwned<false> {
42    fn clone(&self) -> Self {
43        Self(self.0)
44    }
45}
46impl<const OWNED: bool> Drop for StandardPathsIsOwned<OWNED> {
47    fn drop(&mut self) {
48        if OWNED {
49            unsafe { ffi::wxStandardPaths_delete(self.0) }
50        }
51    }
52}