diff options
author | Patrick Luby <pluby@openoffice.org> | 2000-12-08 00:29:02 +0000 |
---|---|---|
committer | Patrick Luby <pluby@openoffice.org> | 2000-12-08 00:29:02 +0000 |
commit | 1594a21e056adfef3e2d2fbb15208254de2acd34 (patch) | |
tree | 2bc3d5875c8edaae06ea2e95f1e2d01e9c0307db /vcl/aqua/source/app/saltimer.cxx | |
parent | a07ae38a645b4cbcdbcc11fdc8bf17a66e27708c (diff) |
Syncronized painting from SalTimer with system driven calls to [NSView drawRect:] so that all system driven calls follow the same path to the painting calls.
Diffstat (limited to 'vcl/aqua/source/app/saltimer.cxx')
-rw-r--r-- | vcl/aqua/source/app/saltimer.cxx | 44 |
1 files changed, 8 insertions, 36 deletions
diff --git a/vcl/aqua/source/app/saltimer.cxx b/vcl/aqua/source/app/saltimer.cxx index cad742a354fc..c19b7bd2173f 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.6 $ + * $Revision: 1.7 $ * - * last change: $Author: pluby $ $Date: 2000-12-04 00:10:12 $ + * last change: $Author: pluby $ $Date: 2000-12-08 01:28:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,56 +61,28 @@ #define _SV_SALTIMER_CXX -#ifndef _SV_SALDATA_HXX -#include <saldata.hxx> -#endif #ifndef _SV_SALTIMER_HXX #include <saltimer.hxx> #endif -#ifndef _SV_SALTIMER_HXX -#include <saltimer.h> +#ifndef _SV_SALDATA_HXX +#include <saldata.hxx> #endif -#ifndef _SV_VCLDATE_H -#include <VCLDate.h> +#ifndef _SV_VCLEVENT_H +#include <VCLEvent.h> #endif // ======================================================================= -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus - -void CallSalTimerCallbackProc() -{ - SalData* pSalData = GetSalData(); - - if ( pSalData->mpTimerProc ) - pSalData->mpTimerProc(); -} - -#ifdef __cplusplus -} -#endif // __cplusplus - -// ======================================================================= - void SalTimer::Start( ULONG nMS ) { - SalData* pSalData = GetSalData(); - - pSalData->mnTimerInterval = (double)nMS / 1000; - pSalData->mnTimerExpiration = - VCLDate_TimeIntervalSince1970() + pSalData->mnTimerInterval; + VCLApplication_StartPeriodicEvents( nMS ); } // ----------------------------------------------------------------------- void SalTimer::Stop() { - SalData* pSalData = GetSalData(); - - pSalData->mnTimerInterval = 0; - pSalData->mnTimerExpiration = 0; + VCLApplication_StopPeriodicEvents(); } // ----------------------------------------------------------------------- |