fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / slideshow / source / inc / activity.hxx
blob74d96e0268e28691fa961d81d918f07f0a625026
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_ACTIVITY_HXX
21 #define INCLUDED_SLIDESHOW_SOURCE_INC_ACTIVITY_HXX
23 #include <sal/types.h>
25 #include <boost/shared_ptr.hpp>
27 #include "disposable.hxx"
30 /* Definition of Activity interface */
32 namespace slideshow
34 namespace internal
37 class Activity : public Disposable
39 public:
40 /** Perform the activity associated with this interface's
41 implementation.
43 @return true, if activity continues, or false, if activity has
44 ended.
46 virtual bool perform() = 0;
48 /** Calculates whether the activity lags time.
50 If this method returns a time lag greater than 0.0,
51 the ActivitiesQueue will adjust the global slideshow
52 time, by subtracting the given amount of lag.
54 @return time lag or 0.0. Value must be greater or
55 equal than zero.
57 virtual double calcTimeLag() const = 0;
59 /** Query whether this activity is still continuing
61 @return true, if this activity still
62 continues. Returns false, if activity has ended. It is
63 required that operator() returns false, when
64 isActive() returns false. Furthermore, it is required
65 that the inactive state is persistent; an activity
66 that has become inactive (i.e. isActive() once
67 returned false) must stay in that state eternally.
69 virtual bool isActive() const = 0;
71 /** Notifies the Activity that it has now left the
72 ActivitiesQueue
74 Use this method to react on the queue removal
75 event. For animated shapes, this is e.g. used to
76 switch back to the non-sprite presentation mode of the
77 shape.
79 virtual void dequeued() = 0;
81 /** Forces this activity deactivate and get to its end state
82 (if possible), but does _not_ dispose.
84 virtual void end() = 0;
87 typedef ::boost::shared_ptr< Activity > ActivitySharedPtr;
92 #endif // INCLUDED_SLIDESHOW_SOURCE_INC_ACTIVITY_HXX
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */