LibreOffice Module sd (master) 1
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
sdext::presenter::PresenterTimer Class Reference

The timer allows tasks to be scheduled for execution at a specified time in the future. More...

#include <PresenterTimer.hxx>

Public Types

typedef ::std::function< void(const TimeValue &)> Task
 A task is called with the current time. More...
 

Static Public Member Functions

static sal_Int32 ScheduleRepeatedTask (const css::uno::Reference< css::uno::XComponentContext > &xContext, const Task &rTask, const sal_Int64 nFirst, const sal_Int64 nInterval)
 Schedule a task to be executed repeatedly. More...
 
static void CancelTask (const sal_Int32 nTaskId)
 

Static Public Attributes

static const sal_Int32 NotAValidTaskId = 0
 

Detailed Description

The timer allows tasks to be scheduled for execution at a specified time in the future.

Definition at line 43 of file PresenterTimer.hxx.

Member Typedef Documentation

◆ Task

typedef ::std::function<void (const TimeValue&)> sdext::presenter::PresenterTimer::Task

A task is called with the current time.

Definition at line 48 of file PresenterTimer.hxx.

Member Function Documentation

◆ CancelTask()

void sdext::presenter::PresenterTimer::CancelTask ( const sal_Int32  nTaskId)
static

◆ ScheduleRepeatedTask()

sal_Int32 sdext::presenter::PresenterTimer::ScheduleRepeatedTask ( const css::uno::Reference< css::uno::XComponentContext > &  xContext,
const Task rTask,
const sal_Int64  nFirst,
const sal_Int64  nInterval 
)
static

Schedule a task to be executed repeatedly.

The task is executed the first time after nFirst nano-seconds (1000000000 corresponds to one second). After that task is executed in intervals that are nInterval ns long until CancelTask is called.

Definition at line 148 of file PresenterTimer.cxx.

References NotAValidTaskId.

Referenced by sdext::presenter::PresenterClockTimer::AddListener(), sdext::presenter::PresenterTextCaret::ShowCaret(), and sdext::presenter::PresenterScrollBar::MousePressRepeater::Start().

Member Data Documentation

◆ NotAValidTaskId

const sal_Int32 sdext::presenter::PresenterTimer::NotAValidTaskId = 0
static

The documentation for this class was generated from the following files: