mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
gems: add include/gems/animator.h
The utility for animating GUI elements was formerly private to 'app/decorator'.
This commit is contained in:
parent
9129db03c4
commit
ec565c1ded
@ -11,8 +11,12 @@
|
|||||||
* under the terms of the GNU General Public License version 2.
|
* under the terms of the GNU General Public License version 2.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _ANIMATOR_H_
|
#ifndef _INCLUDE__GEMS__ANIMATOR_H_
|
||||||
#define _ANIMATOR_H_
|
#define _INCLUDE__GEMS__ANIMATOR_H_
|
||||||
|
|
||||||
|
/* Genode includes */
|
||||||
|
#include <util/list.h>
|
||||||
|
|
||||||
|
|
||||||
class Animator
|
class Animator
|
||||||
{
|
{
|
||||||
@ -29,6 +33,8 @@ class Animator
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
inline void animate();
|
inline void animate();
|
||||||
|
|
||||||
|
bool active() const { return _items.first() != nullptr; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -69,8 +75,11 @@ class Animator::Item : public Genode::List<Item>::Element
|
|||||||
|
|
||||||
inline void Animator::animate()
|
inline void Animator::animate()
|
||||||
{
|
{
|
||||||
for (Item *item = _items.first(); item; item = item->next())
|
for (Item *item = _items.first(); item; ) {
|
||||||
|
Item *next = item->next();
|
||||||
item->animate();
|
item->animate();
|
||||||
|
item = next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* _ANIMATOR_H_ */
|
#endif /* _INCLUDE__GEMS__ANIMATOR_H_ */
|
@ -17,8 +17,8 @@
|
|||||||
#include <util/lazy_value.h>
|
#include <util/lazy_value.h>
|
||||||
#include <decorator/window.h>
|
#include <decorator/window.h>
|
||||||
|
|
||||||
/* local includes */
|
/* gems includes */
|
||||||
#include <animator.h>
|
#include <gems/animator.h>
|
||||||
|
|
||||||
|
|
||||||
namespace Decorator { class Window; }
|
namespace Decorator { class Window; }
|
||||||
|
Loading…
Reference in New Issue
Block a user