]> git.saurik.com Git - wxWidgets.git/blame - src/palmos/snglinst.cpp
wxSYS_COLOUR_WINDOW is better for window backgrounds on PPC/Smartphone
[wxWidgets.git] / src / palmos / snglinst.cpp
CommitLineData
ffecfa5a 1///////////////////////////////////////////////////////////////////////////////
e2731512 2// Name: src/palmos/snglinst.cpp
ffecfa5a
JS
3// Purpose: implements wxSingleInstanceChecker class for Win32 using
4// named mutexes
e2731512 5// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
6// Modified by:
7// Created: 10/13/04
e2731512 8// RCS-ID: $Id$
ffecfa5a
JS
9// Copyright: (c) William Osborne
10// Licence: wxWindows licence
11///////////////////////////////////////////////////////////////////////////////
12
13// ============================================================================
14// declarations
15// ============================================================================
16
17// ----------------------------------------------------------------------------
18// headers
19// ----------------------------------------------------------------------------
20
21#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
22 #pragma implementation "snglinst.h"
23#endif
24
25// For compilers that support precompilation, includes "wx.h".
26#include "wx/wxprec.h"
27
28#ifdef __BORLANDC__
29 #pragma hdrstop
30#endif
31
32#if wxUSE_SNGLINST_CHECKER
33
34#ifndef WX_PRECOMP
35 #include "wx/string.h"
36 #include "wx/log.h"
37#endif //WX_PRECOMP
38
39#include "wx/snglinst.h"
40
41#include "wx/palmos/private.h"
42
43// ----------------------------------------------------------------------------
44// wxSingleInstanceCheckerImpl: the real implementation class
45// ----------------------------------------------------------------------------
46
47class WXDLLEXPORT wxSingleInstanceCheckerImpl
48{
49public:
50 wxSingleInstanceCheckerImpl()
51 {
52 }
53
54 bool Create(const wxString& name)
55 {
56 return false;
57 }
58
59 bool WasOpened() const
60 {
61 return false;
62 }
63
64 ~wxSingleInstanceCheckerImpl()
65 {
66 }
67
68private:
69 // the result of the CreateMutex() call
70 bool m_wasOpened;
71
72 // the mutex handle, may be NULL
73 HANDLE m_hMutex;
74
75 DECLARE_NO_COPY_CLASS(wxSingleInstanceCheckerImpl)
76};
77
78// ============================================================================
79// wxSingleInstanceChecker implementation
80// ============================================================================
81
82bool wxSingleInstanceChecker::Create(const wxString& name,
83 const wxString& WXUNUSED(path))
84{
85 return false;
86}
87
88bool wxSingleInstanceChecker::IsAnotherRunning() const
89{
90 return false;
91}
92
93wxSingleInstanceChecker::~wxSingleInstanceChecker()
94{
95}
96
97#endif // wxUSE_SNGLINST_CHECKER