haiku/headers/private/screen_saver/ScreenSaverRunner.h
Ryan Leavengood 7d183c0492 Adding a private header with a method that can be used to provide a consistent
default look for the settings of screen savers without complicated settings
views. This is based on the code originally in the ScreenSaver preferences
window.

Also fixed a type in the ScreenSaverRunner header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33400 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-01 19:53:23 +00:00

57 lines
1.0 KiB
C++

/*
* Copyright 2003-2006, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Michael Phipps
* Jérôme Duval, jerome.duval@free.fr
* Axel Dörfler, axeld@pinc-software.de
*/
#ifndef SCREEN_SAVER_RUNNER_H
#define SCREEN_SAVER_RUNNER_H
#include <SupportDefs.h>
#include <DirectWindow.h>
class BScreenSaver;
class BView;
class ScreenSaverSettings;
class ScreenSaverRunner {
public:
ScreenSaverRunner(BWindow* window, BView* view,
bool preview, ScreenSaverSettings& settings);
~ScreenSaverRunner();
BScreenSaver* ScreenSaver() const;
bool HasStarted() const;
status_t Run();
void Quit();
void Suspend();
void Resume();
private:
void _LoadAddOn();
void _CleanUp();
static status_t _ThreadFunc(void* data);
void _Run();
BScreenSaver* fSaver;
BWindow* fWindow;
BDirectWindow* fDirectWindow;
BView* fView;
ScreenSaverSettings& fSettings;
bool fPreview;
bool fHasStarted;
image_id fAddonImage;
thread_id fThread;
volatile bool fQuitting;
};
#endif // SCREEN_SAVER_RUNNER_H