Lei Zhang | fac46f8 | 2017-06-02 14:20:04 -0700 | [diff] [blame] | 1 | // Copyright 2017 PDFium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | |
Dan Sinclair | c411eb9 | 2017-07-25 09:39:30 -0400 | [diff] [blame] | 7 | #ifndef FPDFSDK_PWL_CPWL_TIMER_H_ |
| 8 | #define FPDFSDK_PWL_CPWL_TIMER_H_ |
Lei Zhang | fac46f8 | 2017-06-02 14:20:04 -0700 | [diff] [blame] | 9 | |
Dan Sinclair | aee0db0 | 2017-09-21 16:53:58 -0400 | [diff] [blame] | 10 | #include "core/fxcrt/unowned_ptr.h" |
Lei Zhang | fac46f8 | 2017-06-02 14:20:04 -0700 | [diff] [blame] | 11 | |
| 12 | class CFX_SystemHandler; |
| 13 | class CPWL_TimerHandler; |
| 14 | |
| 15 | class CPWL_Timer { |
| 16 | public: |
| 17 | CPWL_Timer(CPWL_TimerHandler* pAttached, CFX_SystemHandler* pSystemHandler); |
| 18 | virtual ~CPWL_Timer(); |
| 19 | |
| 20 | static void TimerProc(int32_t idEvent); |
| 21 | |
| 22 | int32_t SetPWLTimer(int32_t nElapse); |
| 23 | void KillPWLTimer(); |
| 24 | |
| 25 | private: |
| 26 | int32_t m_nTimerID; |
Dan Sinclair | aee0db0 | 2017-09-21 16:53:58 -0400 | [diff] [blame] | 27 | UnownedPtr<CPWL_TimerHandler> m_pAttached; |
| 28 | UnownedPtr<CFX_SystemHandler> m_pSystemHandler; |
Lei Zhang | fac46f8 | 2017-06-02 14:20:04 -0700 | [diff] [blame] | 29 | }; |
| 30 | |
Dan Sinclair | c411eb9 | 2017-07-25 09:39:30 -0400 | [diff] [blame] | 31 | #endif // FPDFSDK_PWL_CPWL_TIMER_H_ |