]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_stdpaths.i
Don't depend on the default formatting of wx.DateTime objects for
[wxWidgets.git] / wxPython / src / _stdpaths.i
CommitLineData
53112743
RD
1/////////////////////////////////////////////////////////////////////////////
2// Name: _stdpaths.i
3// Purpose: SWIG interface for wxStandardPaths
4//
5// Author: Robin Dunn
6//
7// Created: 10-Nov-2004
8// RCS-ID: $Id$
9// Copyright: (c) 2004 by Total Control Software
10// Licence: wxWindows license
11/////////////////////////////////////////////////////////////////////////////
12
13// Not a %module
14
15
16//---------------------------------------------------------------------------
17
18%{
19#include <wx/stdpaths.h>
20%}
21
22
23//---------------------------------------------------------------------------
24%newgroup
25
26DocStr(wxStandardPaths,
27"wx.StandardPaths returns the standard locations in the file system and
28should be used by the programs to find their data files in a portable
29way.
30
31In the description of the methods below, the example return values are
32given for the Unix, Windows and Mac OS X systems, however please note
33that these are just the examples and the actual values may differ. For
34example, under Windows: the system administrator may change the
35standard directories locations, i.e. the Windows directory may be
36named W:\Win2003 instead of the default C:\Windows.
37
38The strings appname and username should be replaced with the value
39returned by `wx.App.GetAppName` and the name of the currently logged
40in user, respectively. The string prefix is only used under Unix and
41is /usr/local by default but may be changed using `SetInstallPrefix`.
42
43The directories returned by the methods of this class may or may not
44exist. If they don't exist, it's up to the caller to create them,
45wxStandardPaths doesn't do it.
46
47Finally note that these functions only work with standardly packaged
48applications. I.e. under Unix you should follow the standard
49installation conventions and under Mac you should create your
50application bundle according to the Apple guidelines. Again, this
51class doesn't help you to do it.", "");
52
53class wxStandardPaths
54{
55public:
62038e59
RD
56
57 DocStr(
58 Get,
59 "Return the global standard paths singleton", "");
60 %extend {
61 static wxStandardPaths* Get() {
62 return (wxStandardPaths*) &wxStandardPaths::Get();
63 }
64 }
65
66
53112743
RD
67
68 DocDeclStr(
69 virtual wxString , GetConfigDir() const,
70 "Return the directory with system config files: /etc under Unix,
62038e59 71'c:\\Documents and Settings\\All Users\\Application Data' under Windows,
53112743
RD
72/Library/Preferences for Mac", "");
73
74
75 DocDeclStr(
76 virtual wxString , GetUserConfigDir() const,
77 "Return the directory for the user config files: $HOME under Unix,
62038e59 78'c:\\Documents and Settings\\username' under Windows, and
53112743
RD
79~/Library/Preferences under Mac
80
81Only use this if you have a single file to put there, otherwise
82`GetUserDataDir` is more appropriate", "");
83
84
85 DocDeclStr(
86 virtual wxString , GetDataDir() const,
87 "Return the location of the application's global, (i.e. not
88user-specific,) data files: prefix/share/appname under Unix,
62038e59 89'c:\\Program Files\\appname' under Windows,
53112743
RD
90appname.app/Contents/SharedSupport app bundle directory under Mac.", "");
91
92
93 DocDeclStr(
94 virtual wxString , GetLocalDataDir() const,
95 "Return the location for application data files which are
96host-specific. Same as `GetDataDir` except under Unix where it is
97/etc/appname", "");
98
99
100 DocDeclStr(
101 virtual wxString , GetUserDataDir() const,
102 "Return the directory for the user-dependent application data files:
62038e59
RD
103$HOME/.appname under Unix, c:\\Documents and
104Settings\\username\\Application Data\\appname under Windows and
53112743
RD
105~/Library/Application Support/appname under Mac", "");
106
107
108 DocDeclStr(
109 virtual wxString , GetUserLocalDataDir() const,
110 "Return the directory for user data files which shouldn't be shared
111with the other machines
112
113Same as `GetUserDataDir` for all platforms except Windows where it is
62038e59 114the 'Local Settings\\Application Data\\appname' directory.", "");
53112743
RD
115
116
117 DocDeclStr(
118 virtual wxString , GetPluginsDir() const,
119 "Return the directory where the loadable modules (plugins) live:
120prefix/lib/appname under Unix, program directory under Windows and
121Contents/Plugins app bundle subdirectory under Mac", "");
122
bb6e96a9 123
53112743 124
bb6e96a9
RD
125 DocStr(SetInstallPrefix,
126 "Set the program installation directory which is /usr/local by default.
53112743 127This value will be used by other methods such as `GetDataDir` and
62038e59
RD
128`GetPluginsDir` as the prefix for what they return. (This function
129only has meaning on Unix systems.)", "");
53112743 130
bb6e96a9
RD
131 DocStr(GetInstallPrefix,
132 "Get the program installation prefix. The default is the prefix where
62038e59 133Python is installed. (This function only has meaning on Unix systems.)", "");
bb6e96a9
RD
134
135#ifdef __WXGTK__
136 void SetInstallPrefix(const wxString& prefix);
137 wxString GetInstallPrefix() const;
53112743
RD
138#else
139 %extend {
140 void SetInstallPrefix(const wxString& prefix) {}
141 wxString GetInstallPrefix() { return wxEmptyString; }
142 }
143#endif
144};
145
146
147//---------------------------------------------------------------------------