43 lines
832 B
C++
43 lines
832 B
C++
|
|
/* Author: Josh Holtrop
|
|
* DornerWorks screensaver
|
|
* The main screensaver module
|
|
*/
|
|
|
|
#ifndef SSMAIN_H
|
|
#define SSMAIN_H
|
|
|
|
#include <GL/gl.h>
|
|
#include <SDL.h>
|
|
|
|
class SSMode;
|
|
|
|
#include "SSMode.h"
|
|
|
|
class SSMain
|
|
{
|
|
public:
|
|
SSMain(int width, int height, int numMonitors, SDL_Surface * sdlSurface);
|
|
void run();
|
|
int getWidth() { return m_width; }
|
|
int getHeight() { return m_height; }
|
|
int getNumMonitors() { return m_numMonitors; }
|
|
SDL_Surface * getSurface() { return m_sdlSurface; }
|
|
Uint32 updateCallback(Uint32 interval);
|
|
|
|
protected:
|
|
static Uint32 updateCallback(Uint32 interval, void * param);
|
|
void update();
|
|
SSMode * startMode();
|
|
|
|
int m_width;
|
|
int m_height;
|
|
int m_numMonitors;
|
|
SDL_Surface * m_sdlSurface;
|
|
SSMode * m_mode;
|
|
bool m_drawing;
|
|
bool m_switchmode;
|
|
};
|
|
|
|
#endif
|