vfs: check userland buffers before reading them.
[haiku.git] / src / servers / mail / LEDAnimation.h
blob174437187c41710484dced0072e42890f5aa3a3f
1 #ifndef __LEDANIMATION_H__
2 #define __LEDANIMATION_H__
4 //! Keyboard LED Animation class.
6 #include <SupportDefs.h>
7 #include <OS.h>
9 class LEDAnimation {
10 public:
11 //! Constructor
12 LEDAnimation();
13 //! Destructor
14 ~LEDAnimation();
15 //!Start LED animation.
16 void Start();
17 //!Stop LED animation.
18 void Stop();
19 //! Check animation thread is running.
20 bool IsRunning() const {return fRunning;}
21 private:
22 //!Anination thread.
23 static int32 AnimationThread(void *data);
24 //!Set LED on or off.
25 static void LED(uint32 mod/*!Modifier key*/,bool on/*!If LED on, value is true*/);
26 //!Animation thread ID.
27 thread_id fThread;
28 //!Thread running flag.
29 volatile bool fRunning;
30 uint32 fOrigModifiers;
33 #endif