diff options
author | Patrick Luby <pluby@openoffice.org> | 2000-11-01 21:12:34 +0000 |
---|---|---|
committer | Patrick Luby <pluby@openoffice.org> | 2000-11-01 21:12:34 +0000 |
commit | 4d9bd2d3d910f32cd3a57af45e42e89c6a93fa55 (patch) | |
tree | 7f51f5c8ed3dd77c5e3a7aa3dfda700f6be84646 /vcl/aqua/source/app/saltimer.cxx | |
parent | a99f4e4fe1dc1ff04f459079d9f226052aba4af0 (diff) |
Removed all unused Windows code and data types from vcl/aqua code
Diffstat (limited to 'vcl/aqua/source/app/saltimer.cxx')
-rw-r--r-- | vcl/aqua/source/app/saltimer.cxx | 77 |
1 files changed, 3 insertions, 74 deletions
diff --git a/vcl/aqua/source/app/saltimer.cxx b/vcl/aqua/source/app/saltimer.cxx index 41c4d51a148d..663667633f83 100644 --- a/vcl/aqua/source/app/saltimer.cxx +++ b/vcl/aqua/source/app/saltimer.cxx @@ -2,9 +2,9 @@ * * $RCSfile: saltimer.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: pluby $ $Date: 2000-11-01 03:12:44 $ + * last change: $Author: pluby $ $Date: 2000-11-01 22:12:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -59,98 +59,27 @@ * ************************************************************************/ -#ifndef _SVWIN_H -#include <tools/svwin.h> -#endif - #define _SV_SALTIMER_CXX -#ifndef _SV_SALDATA_HXX -#include <saldata.hxx> -#endif #ifndef _SV_SALTIMER_HXX #include <saltimer.hxx> #endif -// ======================================================================= - -// Maximale Periode -#define MAX_SYSPERIOD 65533 // ======================================================================= -void ImplSalStartTimer( ULONG nMS, BOOL bMutex ) +void SalTimer::Start( ULONG nMS ) { - SalData* pSalData = GetSalData(); - - // Remenber the time of the timer - pSalData->mnTimerMS = nMS; - if ( !bMutex ) - pSalData->mnTimerOrgMS = nMS; - - // Periode darf nicht zu gross sein, da Windows mit USHORT arbeitet - if ( nMS > MAX_SYSPERIOD ) - nMS = MAX_SYSPERIOD; - -#ifdef WIN - // Gibt es einen Timer, dann zerstoren - if ( pSalData->mnTimerId ) - KillTimer( 0, pSalData->mnTimerId ); - - // Make a new timer with new period - pSalData->mnTimerId = SetTimer( 0, 0, (UINT)nMS, SalTimerProc ); -#endif } // ----------------------------------------------------------------------- void SalTimer::Stop() { - SalData* pSalData = GetSalData(); - -#ifdef WIN - // If we have a timer, than - if ( pSalData->mnTimerId ) - { - KillTimer( 0, pSalData->mnTimerId ); - pSalData->mnTimerId = 0; - } -#endif } // ----------------------------------------------------------------------- void SalTimer::SetCallback( SALTIMERPROC pProc ) { - SalData* pSalData = GetSalData(); - pSalData->mpTimerProc = pProc; -} - -// ----------------------------------------------------------------------- - -void CALLBACK SalTimerProc( VCLWINDOW, UINT, UINT, DWORD ) -{ - SalData* pSalData = GetSalData(); - - // Test for MouseLeave - SalTestMouseLeave(); - - if ( pSalData->mpTimerProc ) - { - // Try to aquire the mutex. If we don't get the mutex then we - // try this a short time later again. - if ( ImplSalYieldMutexTryToAcquire() ) - { - pSalData->mpTimerProc(); - ImplSalYieldMutexRelease(); - - // Run the timer in the correct time, if we start this - // with a small timeout, because we don't get the mutex - if ( pSalData->mnTimerId && - (pSalData->mnTimerMS != pSalData->mnTimerOrgMS) ) - ImplSalStartTimer( pSalData->mnTimerOrgMS, FALSE ); - } - else - ImplSalStartTimer( 10, TRUE ); - } } |