Make UEFI boot-platform build again
[haiku.git] / headers / private / screen_saver / ScreenSaverRunner.h
blob2e730b7e599a780d894b39a93c5fdb5668dac91a
1 /*
2 * Copyright 2003-2013 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Axel Dörfler, axeld@pinc-software.de
7 * Jérôme Duval, jerome.duval@free.fr
8 * Michael Phipps
9 * John Scipione, jscipione@gmail.com
11 #ifndef SCREEN_SAVER_RUNNER_H
12 #define SCREEN_SAVER_RUNNER_H
15 #include <ScreenSaver.h>
16 #include <View.h>
17 #include <Window.h>
19 #include "ScreenSaverSettings.h"
22 class ScreenSaverRunner {
23 public:
24 ScreenSaverRunner(BWindow* window,
25 BView* view,
26 ScreenSaverSettings& settings);
27 ~ScreenSaverRunner();
29 BScreenSaver* ScreenSaver() const { return fSaver; };
31 status_t Run();
32 void Quit();
34 status_t Suspend();
35 status_t Resume();
37 private:
38 void _LoadAddOn();
39 void _CleanUp();
40 static status_t _ThreadFunc(void* data);
41 status_t _Run();
43 BWindow* fWindow;
44 BView* fView;
45 bool fIsDirectDraw;
46 ScreenSaverSettings& fSettings;
48 BScreenSaver* fSaver;
50 image_id fAddonImage;
51 thread_id fThread;
52 volatile bool fQuitting;
55 #endif // SCREEN_SAVER_RUNNER_H