]> git.saurik.com Git - wxWidgets.git/blame - src/palmos/utils.cpp
Better alphabetized the event handler macros
[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
129// structure used to pass parameters from wxKill() to wxEnumFindByPidProc()
130int wxKill(long pid, wxSignal sig, wxKillError *krc)
131{
132 return 0;
133}
134
135// Execute a program in an Interactive Shell
136bool wxShell(const wxString& command)
137{
138 return false;
139}
140
141// Shutdown or reboot the PC
142bool wxShutdown(wxShutdownFlags wFlags)
143{
144 return false;
145}
146
147// ----------------------------------------------------------------------------
148// misc
149// ----------------------------------------------------------------------------
150
151// Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX)
152long wxGetFreeMemory()
153{
154 return 0;
155}
156
157unsigned long wxGetProcessId()
158{
159 return 0;
160}
161
162// Emit a beeeeeep
163void wxBell()
164{
165}
166
167wxString wxGetOsDescription()
168{
169 wxString str;
170
171 return str;
172}
173
174wxToolkitInfo& wxAppTraits::GetToolkitInfo()
175{
176 static wxToolkitInfo info;
177 info.name = _T("wxBase");
178 return info;
179}
180
181// ----------------------------------------------------------------------------
182// sleep functions
183// ----------------------------------------------------------------------------
184
185void wxMilliSleep(unsigned long milliseconds)
186{
187}
188
189void wxMicroSleep(unsigned long microseconds)
190{
191}
192
193void wxSleep(int nSecs)
194{
195}
196
197// ----------------------------------------------------------------------------
198// font encoding <-> Win32 codepage conversion functions
199// ----------------------------------------------------------------------------
200
201extern WXDLLIMPEXP_BASE long wxEncodingToCharset(wxFontEncoding encoding)
202{
203 return 0;
204}
205
206// we have 2 versions of wxCharsetToCodepage(): the old one which directly
207// looks up the vlaues in the registry and the new one which is more
208// politically correct and has more chances to work on other Windows versions
209// as well but the old version is still needed for !wxUSE_FONTMAP case
210#if wxUSE_FONTMAP
211
212#include "wx/fontmap.h"
213
214extern WXDLLIMPEXP_BASE long wxEncodingToCodepage(wxFontEncoding encoding)
215{
216 return 0;
217}
218
219extern long wxCharsetToCodepage(const wxChar *name)
220{
221 return 0;
222}
223
224#else // !wxUSE_FONTMAP
225
226#include "wx/palmos/registry.h"
227
228// this should work if Internet Exploiter is installed
229extern long wxCharsetToCodepage(const wxChar *name)
230{
231 return 0;
232}
233
234#endif // wxUSE_FONTMAP/!wxUSE_FONTMAP
235