8087170c53
* some fixes to make screen_blanker wait_for_thread() instead of killing the screen saver thread, BScreenSaver::Stop() is now called as well as its destructor git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17206 a95241bf-73f2-0310-859d-f6bbb57e9c96
44 lines
884 B
C++
44 lines
884 B
C++
/*
|
|
* Copyright 2003, Michael Phipps. All rights reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
|
|
#ifndef SCREEN_SAVER_THREAD_H
|
|
#define SCREEN_SAVER_THREAD_H
|
|
#include <SupportDefs.h>
|
|
#include <DirectWindow.h>
|
|
|
|
class BScreenSaver;
|
|
class BView;
|
|
class ScreenSaverPrefs;
|
|
|
|
class ScreenSaverThread {
|
|
public:
|
|
ScreenSaverThread(BWindow* window,
|
|
BView* view,
|
|
ScreenSaverPrefs* prefs);
|
|
~ScreenSaverThread();
|
|
|
|
void Thread();
|
|
BScreenSaver* LoadAddOn();
|
|
void Quit(thread_id thread);
|
|
|
|
static int32 ThreadFunc(void* data);
|
|
private:
|
|
void _CleanUp();
|
|
|
|
BScreenSaver* fSaver;
|
|
BWindow* fWin;
|
|
BDirectWindow* fDWin;
|
|
BView* fView;
|
|
ScreenSaverPrefs* fPref;
|
|
|
|
long fFrame;
|
|
int fSnoozeCount;
|
|
image_id fAddonImage;
|
|
|
|
volatile bool fQuitting;
|
|
};
|
|
|
|
#endif //SCREEN_SAVER_THREAD_H
|