38 lines
855 B
C++
38 lines
855 B
C++
|
|
#ifndef SPIN_H
|
|
#define SPIN_H
|
|
|
|
#include "LogoBox.h"
|
|
#include "Mode.h"
|
|
#include "GnomeScreensaver.h"
|
|
|
|
class Spin : public Mode
|
|
{
|
|
public:
|
|
Spin();
|
|
~Spin();
|
|
bool expose (GnomeScreensaver & gs);
|
|
bool configure (GnomeScreensaver & gs);
|
|
bool update (GnomeScreensaver & gs);
|
|
typedef struct monitor_info_s
|
|
{
|
|
float axis[3];
|
|
float rotation[16];
|
|
int switch_time;
|
|
uint32_t last_switch_ticks;
|
|
float speed;
|
|
} monitor_info_t;
|
|
protected:
|
|
LogoBox m_logobox;
|
|
int m_num_monitors;
|
|
monitor_info_t *m_monitor_info;
|
|
uint64_t m_last_ticks;
|
|
void initMonitorInfo();
|
|
void getRandomAxis(float (*axis)[3]);
|
|
uint32_t getRandomSwitchTime();
|
|
float getRandomSpeed();
|
|
};
|
|
|
|
#endif /* SPIN_H */
|
|
|