2011-07-13 15:51:01 -05:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 08:30:25 -05:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
2007-04-11 12:09:49 -05:00
|
|
|
*
|
2012-06-21 08:30:25 -05:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2007-04-11 12:09:49 -05:00
|
|
|
*
|
2012-06-21 08:30:25 -05:00
|
|
|
* This file incorporates work covered by the following license notice:
|
2007-04-11 12:09:49 -05:00
|
|
|
*
|
2012-06-21 08:30:25 -05:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2007-04-11 12:09:49 -05:00
|
|
|
|
|
|
|
#ifndef _SV_SALTIMER_HXX
|
|
|
|
#define _SV_SALTIMER_HXX
|
|
|
|
|
2012-06-10 11:26:30 -05:00
|
|
|
#include <tools/solar.h>
|
2007-04-11 12:09:49 -05:00
|
|
|
#include <vcl/dllapi.h>
|
2011-01-24 09:34:14 -06:00
|
|
|
#include <salwtype.hxx>
|
2007-04-11 12:09:49 -05:00
|
|
|
|
|
|
|
/*
|
|
|
|
* note: there will be only a single instance of SalTimer
|
|
|
|
* SalTimer originally had only static methods, but
|
|
|
|
* this needed to be virtualized for the sal plugin migration
|
|
|
|
*/
|
|
|
|
|
2010-12-08 06:53:30 -06:00
|
|
|
class VCL_PLUGIN_PUBLIC SalTimer
|
2007-04-11 12:09:49 -05:00
|
|
|
{
|
|
|
|
SALTIMERPROC m_pProc;
|
|
|
|
public:
|
|
|
|
SalTimer() : m_pProc( NULL ) {}
|
|
|
|
virtual ~SalTimer();
|
|
|
|
|
|
|
|
// AutoRepeat and Restart
|
2011-01-12 08:07:10 -06:00
|
|
|
virtual void Start( sal_uLong nMS ) = 0;
|
2007-04-11 12:09:49 -05:00
|
|
|
virtual void Stop() = 0;
|
|
|
|
|
|
|
|
// Callbacks (indepen in \sv\source\app\timer.cxx)
|
|
|
|
void SetCallback( SALTIMERPROC pProc )
|
|
|
|
{
|
|
|
|
m_pProc = pProc;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CallCallback()
|
|
|
|
{
|
|
|
|
if( m_pProc )
|
|
|
|
m_pProc();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _SV_SALTIMER_HXX
|
2011-07-13 15:51:01 -05:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|