]> git.saurik.com Git - wxWidgets.git/blame - src/palmos/utils.cpp
math.h/PI integration
[wxWidgets.git] / src / palmos / utils.cpp
CommitLineData
ffecfa5a
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: palmos/utils.cpp
3// Purpose: Various utilities
4// Author: William Osborne
5// Modified by:
6// Created: 10/13/04
7// RCS-ID: $Id:
8// Copyright: (c) William Osborne
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12// ============================================================================
13// declarations
14// ============================================================================
15
16// ----------------------------------------------------------------------------
17// headers
18// ----------------------------------------------------------------------------
19
20// For compilers that support precompilation, includes "wx.h".
21#include "wx/wxprec.h"
22
23#ifdef __BORLANDC__
24 #pragma hdrstop
25#endif
26
27#ifndef WX_PRECOMP
28 #include "wx/utils.h"
29 #include "wx/app.h"
30 #include "wx/intl.h"
31 #include "wx/log.h"
32#endif //WX_PRECOMP
33
34#include "wx/apptrait.h"
35#include "wx/dynload.h"
36
37#include "wx/confbase.h" // for wxExpandEnvVars()
38
39#include "wx/timer.h"
40
41// VZ: there is some code using NetXXX() functions to get the full user name:
42// I don't think it's a good idea because they don't work under Win95 and
43// seem to return the same as wxGetUserId() under NT. If you really want
44// to use them, just #define USE_NET_API
45#undef USE_NET_API
46
47#ifdef USE_NET_API
48 #include <lm.h>
49#endif // USE_NET_API
50
51// ----------------------------------------------------------------------------
52// constants
53// ----------------------------------------------------------------------------
54
55// In the WIN.INI file
56static const wxChar WX_SECTION[] = wxT("wxWindows");
57static const wxChar eUSERNAME[] = wxT("UserName");
58
59// ============================================================================
60// implementation
61// ============================================================================
62
63// ----------------------------------------------------------------------------
64// get host name and related
65// ----------------------------------------------------------------------------
66
67// Get hostname only (without domain name)
68bool wxGetHostName(wxChar *buf, int maxSize)
69{
70 return false;
71}
72
73// get full hostname (with domain name if possible)
74bool wxGetFullHostName(wxChar *buf, int maxSize)
75{
76 return false;
77}
78
79// Get user ID e.g. jacs
80bool wxGetUserId(wxChar *buf, int maxSize)
81{
82 return false;
83}
84
85// Get user name e.g. Julian Smart
86bool wxGetUserName(wxChar *buf, int maxSize)
87{
88 return false;
89}
90
91const wxChar* wxGetHomeDir(wxString *pstr)
92{
93 return NULL;
94}
95
96wxChar *wxGetUserHome(const wxString& WXUNUSED(user))
97{
98 return NULL;
99}
100
101bool wxDirExists(const wxString& dir)
102{
103 return false;
104}
105
106bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
107{
108 return false;
109}
110
111// ----------------------------------------------------------------------------
112// env vars
113// ----------------------------------------------------------------------------
114
115bool wxGetEnv(const wxString& var, wxString *value)
116{
117 return false;
118}
119
120bool wxSetEnv(const wxString& var, const wxChar *value)
121{
122 return false;
123}
124
125// ----------------------------------------------------------------------------
126// process management
127// ----------------------------------------------------------------------------
128
e0f6b731 129int wxKill(long pid, wxSignal sig, wxKillError *krc, int flags)
ffecfa5a
JS
130{
131 return 0;
132}
133
134// Execute a program in an Interactive Shell
135bool wxShell(const wxString& command)
136{
137 return false;
138}
139
140// Shutdown or reboot the PC
141bool wxShutdown(wxShutdownFlags wFlags)
142{
143 return false;
144}
145
146// ----------------------------------------------------------------------------
147// misc
148// ----------------------------------------------------------------------------
149
150// Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX)
151long wxGetFreeMemory()
152{
153 return 0;
154}
155
156unsigned long wxGetProcessId()
157{
158 return 0;
159}
160
161// Emit a beeeeeep
162void wxBell()
163{
164}
165
166wxString wxGetOsDescription()
167{
168 wxString str;
169
170 return str;
171}
172
173wxToolkitInfo& wxAppTraits::GetToolkitInfo()
174{
175 static wxToolkitInfo info;
176 info.name = _T("wxBase");
177 return info;
178}
179
180// ----------------------------------------------------------------------------
181// sleep functions
182// ----------------------------------------------------------------------------
183
184void wxMilliSleep(unsigned long milliseconds)
185{
186}
187
188void wxMicroSleep(unsigned long microseconds)
189{
190}
191
192void wxSleep(int nSecs)
193{
194}
195
196// ----------------------------------------------------------------------------
197// font encoding <-> Win32 codepage conversion functions
198// ----------------------------------------------------------------------------
199
200extern WXDLLIMPEXP_BASE long wxEncodingToCharset(wxFontEncoding encoding)
201{
202 return 0;
203}
204
205// we have 2 versions of wxCharsetToCodepage(): the old one which directly
206// looks up the vlaues in the registry and the new one which is more
207// politically correct and has more chances to work on other Windows versions
208// as well but the old version is still needed for !wxUSE_FONTMAP case
209#if wxUSE_FONTMAP
210
211#include "wx/fontmap.h"
212
213extern WXDLLIMPEXP_BASE long wxEncodingToCodepage(wxFontEncoding encoding)
214{
215 return 0;
216}
217
218extern long wxCharsetToCodepage(const wxChar *name)
219{
220 return 0;
221}
222
223#else // !wxUSE_FONTMAP
224
225#include "wx/palmos/registry.h"
226
227// this should work if Internet Exploiter is installed
228extern long wxCharsetToCodepage(const wxChar *name)
229{
230 return 0;
231}
232
233#endif // wxUSE_FONTMAP/!wxUSE_FONTMAP
234