tabg.cpp Generic NotWin32,NotOS2
tbarsmpl.cpp Generic
textdlgg.cpp Generic
+timer.cpp Generic LowLevel,NotMSW,NotX,NotGTK,NotOS2,NotMac,NotMicro
tipdlg.cpp Generic
tipwin.cpp Generic
treectlg.cpp Generic
region.cpp X11
settings.cpp X11
toplevel.cpp X11
-timer.cpp X11
utils.cpp X11
window.cpp X11
private.h X11H
region.h X11H
settings.h X11H
-timer.h X11H
toolbar.h X11H
toplevel.h X11H
window.h X11H
statusbr.h GenericH
tabg.h GenericH NotWin32
textdlgg.h GenericH
+timer.h GenericH
treectlg.h GenericH NotWin32
wizard.h GenericH
toplevel.cpp MGL LowLevel
icon.cpp MGL LowLevel
settings.cpp MGL LowLevel
-timer.cpp MGL LowLevel
window.cpp MGL LowLevel
utils.cpp MGL LowLevel
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: timer.h
+// Purpose: Generic implementation of wxTimer class
+// Author: Vaclav Slavik
+// Id: $Id$
+// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+
+#ifndef __WX_TIMER_H__
+#define __WX_TIMER_H__
+
+#ifdef __GNUG__
+ #pragma interface "timer.h"
+#endif
+
+//-----------------------------------------------------------------------------
+// wxTimer
+//-----------------------------------------------------------------------------
+
+class wxTimerDesc;
+
+class WXDLLEXPORT wxTimer : public wxTimerBase
+{
+public:
+ wxTimer() { Init(); }
+ wxTimer(wxEvtHandler *owner, int id = -1) : wxTimerBase(owner, id)
+ { Init(); }
+ ~wxTimer();
+
+ virtual bool Start(int millisecs = -1, bool oneShot = FALSE);
+ virtual void Stop();
+
+ virtual bool IsRunning() const;
+
+ // implementation
+ static void NotifyTimers();
+
+protected:
+ void Init();
+
+private:
+ wxTimerDesc *m_desc;
+
+ DECLARE_ABSTRACT_CLASS(wxTimer)
+};
+
+#endif // __WX_TIMER_H__
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: timer.h
-// Purpose: wxTimer class
-// Author: Vaclav Slavik
-// Id: $Id$
-// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-
-#ifndef __WX_TIMER_H__
-#define __WX_TIMER_H__
-
-#ifdef __GNUG__
- #pragma interface "timer.h"
-#endif
-
-//-----------------------------------------------------------------------------
-// wxTimer
-//-----------------------------------------------------------------------------
-
-class wxTimerDesc;
-
-class WXDLLEXPORT wxTimer : public wxTimerBase
-{
-public:
- wxTimer() { Init(); }
- wxTimer(wxEvtHandler *owner, int id = -1) : wxTimerBase(owner, id)
- { Init(); }
- ~wxTimer();
-
- virtual bool Start(int millisecs = -1, bool oneShot = FALSE);
- virtual void Stop();
-
- virtual bool IsRunning() const;
-
- // implementation
- static void NotifyTimers();
-
-protected:
- void Init();
-
-private:
- wxTimerDesc *m_desc;
-
- DECLARE_ABSTRACT_CLASS(wxTimer)
-};
-
-#endif // __WX_TIMER_H__
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: timer.h
-// Purpose: wxTimer class
-// Author: Vaclav Slavik
-// Id: $Id$
-// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-
-#ifndef __WX_TIMER_H__
-#define __WX_TIMER_H__
-
-#ifdef __GNUG__
- #pragma interface "timer.h"
-#endif
-
-//-----------------------------------------------------------------------------
-// wxTimer
-//-----------------------------------------------------------------------------
-
-class wxTimerDesc;
-
-class WXDLLEXPORT wxTimer : public wxTimerBase
-{
-public:
- wxTimer() { Init(); }
- wxTimer(wxEvtHandler *owner, int id = -1) : wxTimerBase(owner, id)
- { Init(); }
- ~wxTimer();
-
- virtual bool Start(int millisecs = -1, bool oneShot = FALSE);
- virtual void Stop();
-
- virtual bool IsRunning() const;
-
- // implementation
- static void NotifyTimers();
-
-protected:
- void Init();
-
-private:
- wxTimerDesc *m_desc;
-
- DECLARE_ABSTRACT_CLASS(wxTimer)
-};
-
-#endif // __WX_TIMER_H__
msw/snglinst.cpp \
msw/thread.cpp \
msw/utils.cpp \
- msw/utilsexc.cpp
+ msw/utilsexc.cpp \
+ msw/volume.cpp
ALL_HEADERS = \
app.h \
variant.h \
vector.h \
version.h \
+ volume.h \
wfstream.h \
wx.h \
wxchar.h \
snglinst.o \
thread.o \
utils.o \
- utilsexc.o
+ utilsexc.o \
+ volume.o
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: mgl/timer.cpp
+// Purpose: wxTimer implementation
+// Author: Vaclav Slavik
+// Id: $Id$
+// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation "timer.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+// ----------------------------------------------------------------------------
+// NB: when using generic wxTimer implementation in your port, you *must* call
+// wxTimer::NotifyTimers() often enough. The ideal place for this
+// is in wxEventLoop::Dispatch().
+// ----------------------------------------------------------------------------
+
+#include "wx/timer.h"
+
+#if wxUSE_TIMER
+
+#include "wx/log.h"
+#include "wx/module.h"
+
+// ----------------------------------------------------------------------------
+// Time input function
+// ----------------------------------------------------------------------------
+
+#ifdef __WXMGL__
+ // We take advantage of wxMGL's _EVT_getTicks because it is faster
+ // (especially under MS-DOS!) and more precise than wxGetLocalTimeMillis
+ // if we are unlucky and the latter combines information from two sources.
+ #include "wx/mgl/private.h"
+ extern "C" ulong _EVT_getTicks();
+ #define GetMillisecondsTime() _EVT_getTicks()
+#else
+ #define GetMillisecondsTime() wxGetLocalTimeMillis().ToLong()
+#endif
+
+// ----------------------------------------------------------------------------
+// helper structures and wxTimerScheduler
+// ----------------------------------------------------------------------------
+
+class wxTimerDesc
+{
+public:
+ wxTimerDesc(wxTimer *t) :
+ timer(t), running(FALSE), next(NULL), prev(NULL),
+ shotTime(0), deleteFlag(NULL) {}
+
+ wxTimer *timer;
+ bool running;
+ wxTimerDesc *next, *prev;
+ unsigned long shotTime;
+ volatile bool *deleteFlag; // see comment in ~wxTimer
+};
+
+class wxTimerScheduler
+{
+public:
+ wxTimerScheduler() : m_timers(NULL) {}
+
+ void QueueTimer(wxTimerDesc *desc, unsigned long when = 0);
+ void RemoveTimer(wxTimerDesc *desc);
+ void NotifyTimers();
+
+private:
+ wxTimerDesc *m_timers;
+};
+
+void wxTimerScheduler::QueueTimer(wxTimerDesc *desc, unsigned long when)
+{
+ if ( desc->running )
+ return; // already scheduled
+
+ if ( when == 0 )
+ when = GetMillisecondsTime() + desc->timer->GetInterval();
+ desc->shotTime = when;
+ desc->running = TRUE;
+
+ wxLogTrace("timer", "queued timer %p at tick %i",
+ desc->timer, when);
+
+ if ( m_timers )
+ {
+ wxTimerDesc *d = m_timers;
+ while ( d->next && d->next->shotTime < when ) d = d->next;
+ desc->next = d->next;
+ desc->prev = d;
+ if ( d->next )
+ d->next->prev = desc;
+ d->next = desc;
+ }
+ else
+ {
+ m_timers = desc;
+ desc->prev = desc->next = NULL;
+ }
+}
+
+void wxTimerScheduler::RemoveTimer(wxTimerDesc *desc)
+{
+ desc->running = FALSE;
+ if ( desc == m_timers )
+ m_timers = desc->next;
+ if ( desc->prev )
+ desc->prev->next = desc->next;
+ if ( desc->next )
+ desc->next->prev = desc->prev;
+ desc->prev = desc->next = NULL;
+}
+
+void wxTimerScheduler::NotifyTimers()
+{
+ if ( m_timers )
+ {
+ bool oneShot;
+ volatile bool timerDeleted;
+ unsigned long now = GetMillisecondsTime();
+ wxTimerDesc *desc;
+
+ while ( m_timers && m_timers->shotTime <= now )
+ {
+ desc = m_timers;
+ oneShot = desc->timer->IsOneShot();
+ RemoveTimer(desc);
+
+ timerDeleted = FALSE;
+ desc->deleteFlag = &timerDeleted;
+ desc->timer->Notify();
+
+ if ( !timerDeleted )
+ {
+ wxLogTrace("timer", "notified timer %p sheduled for %i",
+ desc->timer, desc->shotTime);
+
+ desc->deleteFlag = NULL;
+ if ( !oneShot )
+ QueueTimer(desc, now + desc->timer->GetInterval());
+ }
+ }
+ }
+}
+
+
+// ----------------------------------------------------------------------------
+// wxTimer
+// ----------------------------------------------------------------------------
+
+IMPLEMENT_ABSTRACT_CLASS(wxTimer,wxObject)
+
+wxTimerScheduler *gs_scheduler = NULL;
+
+void wxTimer::Init()
+{
+ if ( !gs_scheduler )
+ gs_scheduler = new wxTimerScheduler;
+ m_desc = new wxTimerDesc(this);
+}
+
+wxTimer::~wxTimer()
+{
+ wxLogTrace("timer", "destroying timer %p...", this);
+ if ( IsRunning() )
+ Stop();
+
+ // NB: this is a hack: wxTimerScheduler must have some way of knowing
+ // that wxTimer object was deleted under its hands -- this may
+ // happen if somebody is really nasty and deletes the timer
+ // from wxTimer::Notify()
+ if ( m_desc->deleteFlag != NULL )
+ *m_desc->deleteFlag = TRUE;
+
+ delete m_desc;
+ wxLogTrace("timer", " ...done destroying timer %p...", this);
+}
+
+bool wxTimer::IsRunning() const
+{
+ return m_desc->running;
+}
+
+bool wxTimer::Start(int millisecs, bool oneShot)
+{
+ wxLogTrace("timer", "started timer %p: %i ms, oneshot=%i",
+ this, millisecs, oneShot);
+
+ if ( !wxTimerBase::Start(millisecs, oneShot) )
+ return FALSE;
+
+ gs_scheduler->QueueTimer(m_desc);
+ return TRUE;
+}
+
+void wxTimer::Stop()
+{
+ if ( !m_desc->running ) return;
+
+ gs_scheduler->RemoveTimer(m_desc);
+}
+
+/*static*/ void wxTimer::NotifyTimers()
+{
+ if ( gs_scheduler )
+ gs_scheduler->NotifyTimers();
+}
+
+
+
+// A module to deallocate memory properly:
+class wxTimerModule: public wxModule
+{
+DECLARE_DYNAMIC_CLASS(wxTimerModule)
+public:
+ wxTimerModule() {}
+ bool OnInit() { return TRUE; }
+ void OnExit() { delete gs_scheduler; gs_scheduler = NULL; }
+};
+
+IMPLEMENT_DYNAMIC_CLASS(wxTimerModule, wxModule)
+
+
+#endif //wxUSE_TIMER
variant.h \
vector.h \
version.h \
+ volume.h \
wave.h \
wfstream.h \
window.h \
generic/statusbr.h \
generic/tabg.h \
generic/textdlgg.h \
+ generic/timer.h \
generic/treectlg.h \
generic/wizard.h \
unix/execute.h \
variant.h \
vector.h \
version.h \
+ volume.h \
wave.h \
wfstream.h \
window.h \
generic/statusbr.h \
generic/tabg.h \
generic/textdlgg.h \
+ generic/timer.h \
generic/treectlg.h \
generic/wizard.h \
unix/execute.h \
variant.h \
vector.h \
version.h \
+ volume.h \
wave.h \
wfstream.h \
window.h \
generic/statusbr.h \
generic/tabg.h \
generic/textdlgg.h \
+ generic/timer.h \
generic/treectlg.h \
generic/wizard.h \
unix/execute.h \
variant.h \
vector.h \
version.h \
+ volume.h \
wave.h \
wfstream.h \
window.h \
generic/statusbr.h \
generic/tabg.h \
generic/textdlgg.h \
+ generic/timer.h \
generic/treectlg.h \
generic/wizard.h \
unix/execute.h \
generic/tabg.cpp \
generic/tbarsmpl.cpp \
generic/textdlgg.cpp \
+ generic/timer.cpp \
generic/tipdlg.cpp \
generic/tipwin.cpp \
generic/treectlg.cpp \
mgl/pen.cpp \
mgl/region.cpp \
mgl/settings.cpp \
- mgl/timer.cpp \
mgl/toplevel.cpp \
mgl/utils.cpp \
mgl/window.cpp \
variant.h \
vector.h \
version.h \
+ volume.h \
wave.h \
wfstream.h \
window.h \
generic/statusbr.h \
generic/tabg.h \
generic/textdlgg.h \
+ generic/timer.h \
generic/treectlg.h \
generic/wizard.h \
unix/execute.h \
tabg.o \
tbarsmpl.o \
textdlgg.o \
+ timer.o \
tipdlg.o \
tipwin.o \
treectlg.o \
pen.o \
region.o \
settings.o \
- timer.o \
toplevel.o \
utils.o \
window.o
tabg.obj &
tbarsmpl.obj &
textdlgg.obj &
+ timer.obj &
tipdlg.obj &
tipwin.obj &
treectlg.obj &
pen.obj &
region.obj &
settings.obj &
- timer.obj &
toplevel.obj &
utils.obj &
window.obj
settings.obj: $(MGLDIR)\settings.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
-timer.obj: $(MGLDIR)\timer.cpp
- *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
-
toplevel.obj: $(MGLDIR)\toplevel.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
textdlgg.obj: $(GENDIR)\textdlgg.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+timer.obj: $(GENDIR)\timer.cpp
+ *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+
tipdlg.obj: $(GENDIR)\tipdlg.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: mgl/timer.cpp
-// Purpose: wxTimer implementation
-// Author: Vaclav Slavik
-// Id: $Id$
-// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-
-#ifdef __GNUG__
-#pragma implementation "timer.h"
-#endif
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-
-#include "wx/timer.h"
-
-#if wxUSE_TIMER
-
-#include "wx/log.h"
-#include "wx/module.h"
-#include "wx/mgl/private.h"
-
-extern "C" ulong _EVT_getTicks();
-
-// ----------------------------------------------------------------------------
-// helper structures and wxTimerScheduler
-// ----------------------------------------------------------------------------
-
-class wxTimerDesc
-{
-public:
- wxTimerDesc(wxTimer *t) :
- timer(t), running(FALSE), next(NULL), prev(NULL),
- shotTime(0), deleteFlag(NULL) {}
-
- wxTimer *timer;
- bool running;
- wxTimerDesc *next, *prev;
- unsigned long shotTime;
- volatile bool *deleteFlag; // see comment in ~wxTimer
-};
-
-class wxTimerScheduler
-{
-public:
- wxTimerScheduler() : m_timers(NULL) {}
-
- void QueueTimer(wxTimerDesc *desc, unsigned long when = 0);
- void RemoveTimer(wxTimerDesc *desc);
- void NotifyTimers();
-
-private:
- wxTimerDesc *m_timers;
-};
-
-void wxTimerScheduler::QueueTimer(wxTimerDesc *desc, unsigned long when)
-{
- if ( desc->running )
- return; // already scheduled
-
- if ( when == 0 )
- when = _EVT_getTicks() + desc->timer->GetInterval();
- desc->shotTime = when;
- desc->running = TRUE;
-
- wxLogTrace("mgl_timer", "queued timer %p at tick %i",
- desc->timer, when);
-
- if ( m_timers )
- {
- wxTimerDesc *d = m_timers;
- while ( d->next && d->next->shotTime < when ) d = d->next;
- desc->next = d->next;
- desc->prev = d;
- if ( d->next )
- d->next->prev = desc;
- d->next = desc;
- }
- else
- {
- m_timers = desc;
- desc->prev = desc->next = NULL;
- }
-}
-
-void wxTimerScheduler::RemoveTimer(wxTimerDesc *desc)
-{
- desc->running = FALSE;
- if ( desc == m_timers )
- m_timers = desc->next;
- if ( desc->prev )
- desc->prev->next = desc->next;
- if ( desc->next )
- desc->next->prev = desc->prev;
- desc->prev = desc->next = NULL;
-}
-
-void wxTimerScheduler::NotifyTimers()
-{
- if ( m_timers )
- {
- bool oneShot;
- volatile bool timerDeleted;
- unsigned long now = _EVT_getTicks();
- wxTimerDesc *desc;
-
- while ( m_timers && m_timers->shotTime <= now )
- {
- desc = m_timers;
- oneShot = desc->timer->IsOneShot();
- RemoveTimer(desc);
-
- timerDeleted = FALSE;
- desc->deleteFlag = &timerDeleted;
- desc->timer->Notify();
-
- if ( !timerDeleted )
- {
- wxLogTrace("mgl_timer", "notified timer %p sheduled for %i",
- desc->timer, desc->shotTime);
-
- desc->deleteFlag = NULL;
- if ( !oneShot )
- QueueTimer(desc, now + desc->timer->GetInterval());
- }
- }
- }
-}
-
-
-
-// ----------------------------------------------------------------------------
-// wxTimer
-// ----------------------------------------------------------------------------
-
-IMPLEMENT_ABSTRACT_CLASS(wxTimer,wxObject)
-
-wxTimerScheduler *gs_scheduler = NULL;
-
-void wxTimer::Init()
-{
- if ( !gs_scheduler )
- gs_scheduler = new wxTimerScheduler;
- m_desc = new wxTimerDesc(this);
-}
-
-wxTimer::~wxTimer()
-{
- wxLogTrace("mgl_timer", "destroying timer %p...", this);
- if ( IsRunning() )
- Stop();
-
- // NB: this is a hack: wxTimerScheduler must have some way of knowing
- // that wxTimer object was deleted under its hands -- this may
- // happen if somebody is really nasty and deletes the timer
- // from wxTimer::Notify()
- if ( m_desc->deleteFlag != NULL )
- *m_desc->deleteFlag = TRUE;
-
- delete m_desc;
- wxLogTrace("mgl_timer", " ...done destroying timer %p...", this);
-}
-
-bool wxTimer::IsRunning() const
-{
- return m_desc->running;
-}
-
-bool wxTimer::Start(int millisecs, bool oneShot)
-{
- wxLogTrace("mgl_timer", "started timer %p: %i ms, oneshot=%i",
- this, millisecs, oneShot);
-
- if ( !wxTimerBase::Start(millisecs, oneShot) )
- return FALSE;
-
- gs_scheduler->QueueTimer(m_desc);
- return TRUE;
-}
-
-void wxTimer::Stop()
-{
- if ( !m_desc->running ) return;
-
- gs_scheduler->RemoveTimer(m_desc);
-}
-
-/*static*/ void wxTimer::NotifyTimers()
-{
- if ( gs_scheduler )
- gs_scheduler->NotifyTimers();
-}
-
-
-
-// A module to deallocate memory properly:
-class wxTimerModule: public wxModule
-{
-DECLARE_DYNAMIC_CLASS(wxTimerModule)
-public:
- wxTimerModule() {}
- bool OnInit() { return TRUE; }
- void OnExit() { delete gs_scheduler; gs_scheduler = NULL; }
-};
-
-IMPLEMENT_DYNAMIC_CLASS(wxTimerModule, wxModule)
-
-
-#endif //wxUSE_TIMER
variant.h \
vector.h \
version.h \
+ volume.h \
wave.h \
wfstream.h \
window.h \
generic/statusbr.h \
generic/tabg.h \
generic/textdlgg.h \
+ generic/timer.h \
generic/treectlg.h \
generic/wizard.h \
unix/execute.h \
variant.h \
vector.h \
version.h \
+ volume.h \
wave.h \
wfstream.h \
window.h \
generic/statusbr.h \
generic/tabg.h \
generic/textdlgg.h \
+ generic/timer.h \
generic/treectlg.h \
generic/wizard.h \
unix/execute.h \
msw/utils.cpp \
msw/utilsexc.cpp \
msw/ole/uuid.cpp \
+ msw/volume.cpp \
msw/wave.cpp \
msw/window.cpp \
html/helpctrl.cpp \
variant.h \
vector.h \
version.h \
+ volume.h \
wave.h \
wfstream.h \
window.h \
generic/statusbr.h \
generic/tabg.h \
generic/textdlgg.h \
+ generic/timer.h \
generic/treectlg.h \
generic/wizard.h \
unix/execute.h \
treectrl.o \
utils.o \
utilsexc.o \
+ volume.o \
wave.o \
window.o
$(MSWDIR)\utils.obj \
$(MSWDIR)\utilsexc.obj \
$(MSWDIR)\uuid.obj \
+ $(MSWDIR)\volume.obj \
$(MSWDIR)\wave.obj \
$(MSWDIR)\window.obj
$(MSWDIR)\uuid.obj: $(OLEDIR)\uuid.$(SRCSUFF)
+$(MSWDIR)\volume.obj: $(MSWDIR)\volume.$(SRCSUFF)
+
$(MSWDIR)\wave.obj: $(MSWDIR)\wave.$(SRCSUFF)
$(MSWDIR)\window.obj: $(MSWDIR)\window.$(SRCSUFF)
$(MSWDIR)\toplevel.obj \
$(MSWDIR)\utils.obj \
$(MSWDIR)\utilsexc.obj \
+ $(MSWDIR)\volume.obj \
$(MSWDIR)\wave.obj \
$(MSWDIR)\window.obj
$(MSWDIR)\utilsexc.obj: $(MSWDIR)\utilsexc.$(SRCSUFF)
+$(MSWDIR)\volume.obj: $(MSWDIR)\volume.$(SRCSUFF)
+
$(MSWDIR)\wave.obj: $(MSWDIR)\wave.$(SRCSUFF)
$(MSWDIR)\window.obj: $(MSWDIR)\window.$(SRCSUFF)
$(MSWDIR)\toplevel.obj \
$(MSWDIR)\utils.obj \
$(MSWDIR)\utilsexc.obj \
+ $(MSWDIR)\volume.obj \
$(MSWDIR)\wave.obj \
$(MSWDIR)\window.obj
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
+$(MSWDIR)/volume.obj: $*.$(SRCSUFF)
+ cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
$(MSWDIR)/wave.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
$(MSWDIR)/snglinst.$(OBJSUFF) \
$(MSWDIR)/thread.$(OBJSUFF) \
$(MSWDIR)/utils.$(OBJSUFF) \
- $(MSWDIR)/utilsexc.$(OBJSUFF)
+ $(MSWDIR)/utilsexc.$(OBJSUFF) \
+ $(MSWDIR)/volume.$(OBJSUFF)
MSWOBJS = \
$(MSWOBJS_BASE) \
$(MSWDIR)\utils.obj \
$(MSWDIR)\utilsexc.obj \
$(MSWDIR)\ole\uuid.obj \
+ $(MSWDIR)\volume.obj \
$(MSWDIR)\wave.obj \
$(MSWDIR)\window.obj
$(MSWDIR)\$D\utils.obj \
$(MSWDIR)\$D\utilsexc.obj \
$(OLEDIR)\$D\uuid.obj \
+ $(MSWDIR)\$D\volume.obj \
$(MSWDIR)\$D\wave.obj \
$(MSWDIR)\$D\window.obj
printps.obj &
prntdlgg.obj &
statline.obj &
- tabg.obj
+ tabg.obj &
+ timer.obj
COMMONOBJS = &
y_tab.obj &
utils.obj &
utilsexc.obj &
uuid.obj &
+ volume.obj &
wave.obj &
window.obj
uuid.obj: $(OLEDIR)\uuid.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+volume.obj: $(MSWDIR)\volume.cpp
+ *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+
wave.obj: $(MSWDIR)\wave.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
univ/colschem.h \
univ/combobox.h \
univ/control.h \
+ univ/dialog.h \
univ/frame.h \
univ/gauge.h \
univ/inpcons.h \
SOURCE=.\msw\utilsexc.cpp
# End Source File
+# Begin Source File
+
+SOURCE=.\msw\volume.cpp
+# End Source File
# Begin Source File
# End Source File
# Begin Source File
+SOURCE=..\include\wx\volume.h
+# End Source File
+# Begin Source File
+
SOURCE=..\include\wx\wfstream.h
# End Source File
# Begin Source File
# End Source File
# Begin Source File
+SOURCE=.\msw\volume.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\msw\window.cpp
# End Source File
# End Source File
# Begin Source File
+SOURCE=..\include\wx\volume.h
+# End Source File
+# Begin Source File
+
SOURCE=..\include\wx\wave.h
# End Source File
# Begin Source File
# End Source File
# Begin Source File
+SOURCE=..\include\wx\generic\timer.h
+# End Source File
+# Begin Source File
+
SOURCE=..\include\wx\generic\treectlg.h
# End Source File
# Begin Source File
# End Source File
# Begin Source File
+SOURCE=.\msw\volume.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\msw\wave.cpp
# End Source File
# Begin Source File
# End Source File
# Begin Source File
+SOURCE=..\include\wx\volume.h
+# End Source File
+# Begin Source File
+
SOURCE=..\include\wx\wave.h
# End Source File
# Begin Source File
# End Source File
# Begin Source File
+SOURCE=..\include\wx\generic\timer.h
+# End Source File
+# Begin Source File
+
SOURCE=..\include\wx\generic\treectlg.h
# End Source File
# Begin Source File
x11/joystick.cpp \
x11/main.cpp \
x11/minifram.cpp \
+ x11/nanox.c \
x11/palette.cpp \
x11/pen.cpp \
x11/popupwin.cpp \
x11/region.cpp \
x11/settings.cpp \
- x11/timer.cpp \
x11/toplevel.cpp \
x11/utils.cpp \
x11/window.cpp \
generic/tabg.cpp \
generic/tbarsmpl.cpp \
generic/textdlgg.cpp \
+ generic/timer.cpp \
generic/tipdlg.cpp \
generic/tipwin.cpp \
generic/treectlg.cpp \
variant.h \
vector.h \
version.h \
+ volume.h \
wave.h \
wfstream.h \
window.h \
x11/private.h \
x11/region.h \
x11/settings.h \
- x11/timer.h \
x11/toolbar.h \
x11/toplevel.h \
x11/window.h \
generic/statusbr.h \
generic/tabg.h \
generic/textdlgg.h \
+ generic/timer.h \
generic/treectlg.h \
generic/wizard.h \
unix/execute.h \
joystick.o \
main.o \
minifram.o \
+ nanox.o \
palette.o \
pen.o \
popupwin.o \
region.o \
settings.o \
- timer.o \
toplevel.o \
utils.o \
window.o
tabg.o \
tbarsmpl.o \
textdlgg.o \
+ timer.o \
tipdlg.o \
tipwin.o \
treectlg.o \
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: x11/timer.cpp
-// Purpose: wxTimer implementation
-// Author: Vaclav Slavik
-// Id: $Id$
-// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-
-#ifdef __GNUG__
-#pragma implementation "timer.h"
-#endif
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-
-#include "wx/timer.h"
-
-#if wxUSE_TIMER
-
-#include "wx/log.h"
-#include "wx/module.h"
-#include "wx/x11/private.h"
-
-// ----------------------------------------------------------------------------
-// helper structures and wxTimerScheduler
-// ----------------------------------------------------------------------------
-
-class wxTimerDesc
-{
-public:
- wxTimerDesc(wxTimer *t) :
- timer(t), running(FALSE), next(NULL), prev(NULL),
- shotTime(0), deleteFlag(NULL) {}
-
- wxTimer *timer;
- bool running;
- wxTimerDesc *next, *prev;
- unsigned long shotTime;
- volatile bool *deleteFlag; // see comment in ~wxTimer
-};
-
-class wxTimerScheduler
-{
-public:
- wxTimerScheduler() : m_timers(NULL) {}
-
- void QueueTimer(wxTimerDesc *desc, unsigned long when = 0);
- void RemoveTimer(wxTimerDesc *desc);
- void NotifyTimers();
-
-private:
- wxTimerDesc *m_timers;
-};
-
-void wxTimerScheduler::QueueTimer(wxTimerDesc *desc, unsigned long when)
-{
- if ( desc->running )
- return; // already scheduled
-
- if ( when == 0 )
- {
- unsigned long local = wxGetLocalTimeMillis().ToLong();
- when = local + desc->timer->GetInterval();
- }
- desc->shotTime = when;
- desc->running = TRUE;
-
- wxLogTrace("mgl_timer", "queued timer %p at tick %i",
- desc->timer, when);
-
- if ( m_timers )
- {
- wxTimerDesc *d = m_timers;
- while ( d->next && d->next->shotTime < when ) d = d->next;
- desc->next = d->next;
- desc->prev = d;
- if ( d->next )
- d->next->prev = desc;
- d->next = desc;
- }
- else
- {
- m_timers = desc;
- desc->prev = desc->next = NULL;
- }
-}
-
-void wxTimerScheduler::RemoveTimer(wxTimerDesc *desc)
-{
- desc->running = FALSE;
- if ( desc == m_timers )
- m_timers = desc->next;
- if ( desc->prev )
- desc->prev->next = desc->next;
- if ( desc->next )
- desc->next->prev = desc->prev;
- desc->prev = desc->next = NULL;
-}
-
-void wxTimerScheduler::NotifyTimers()
-{
- if ( m_timers )
- {
- bool oneShot;
- volatile bool timerDeleted;
- unsigned long now = wxGetLocalTimeMillis().ToLong();
- wxTimerDesc *desc;
-
- while ( m_timers && m_timers->shotTime <= now )
- {
- desc = m_timers;
- oneShot = desc->timer->IsOneShot();
- RemoveTimer(desc);
-
- timerDeleted = FALSE;
- desc->deleteFlag = &timerDeleted;
- desc->timer->Notify();
-
- if ( !timerDeleted )
- {
- wxLogTrace("mgl_timer", "notified timer %p sheduled for %i",
- desc->timer, desc->shotTime);
-
- desc->deleteFlag = NULL;
- if ( !oneShot )
- QueueTimer(desc, now + desc->timer->GetInterval());
- }
- }
- }
-}
-
-
-
-// ----------------------------------------------------------------------------
-// wxTimer
-// ----------------------------------------------------------------------------
-
-IMPLEMENT_ABSTRACT_CLASS(wxTimer,wxObject)
-
-wxTimerScheduler *gs_scheduler = NULL;
-
-void wxTimer::Init()
-{
- if ( !gs_scheduler )
- gs_scheduler = new wxTimerScheduler;
- m_desc = new wxTimerDesc(this);
-}
-
-wxTimer::~wxTimer()
-{
- wxLogTrace("mgl_timer", "destroying timer %p...", this);
- if ( IsRunning() )
- Stop();
-
- // NB: this is a hack: wxTimerScheduler must have some way of knowing
- // that wxTimer object was deleted under its hands -- this may
- // happen if somebody is really nasty and deletes the timer
- // from wxTimer::Notify()
- if ( m_desc->deleteFlag != NULL )
- *m_desc->deleteFlag = TRUE;
-
- delete m_desc;
- wxLogTrace("mgl_timer", " ...done destroying timer %p...", this);
-}
-
-bool wxTimer::IsRunning() const
-{
- return m_desc->running;
-}
-
-bool wxTimer::Start(int millisecs, bool oneShot)
-{
- wxLogTrace("mgl_timer", "started timer %p: %i ms, oneshot=%i",
- this, millisecs, oneShot);
-
- if ( !wxTimerBase::Start(millisecs, oneShot) )
- return FALSE;
-
- gs_scheduler->QueueTimer(m_desc);
- return TRUE;
-}
-
-void wxTimer::Stop()
-{
- if ( !m_desc->running ) return;
-
- gs_scheduler->RemoveTimer(m_desc);
-}
-
-/*static*/ void wxTimer::NotifyTimers()
-{
- if ( gs_scheduler )
- gs_scheduler->NotifyTimers();
-}
-
-
-
-// A module to deallocate memory properly:
-class wxTimerModule: public wxModule
-{
-DECLARE_DYNAMIC_CLASS(wxTimerModule)
-public:
- wxTimerModule() {}
- bool OnInit() { return TRUE; }
- void OnExit() { delete gs_scheduler; gs_scheduler = NULL; }
-};
-
-IMPLEMENT_DYNAMIC_CLASS(wxTimerModule, wxModule)
-
-
-#endif //wxUSE_TIMER