1/*
2 * Copyright 2012-2013 Tri-Edge AI <triedgeai@gmail.com>
3 * Copyright 2014 Haiku, Inc. All rights reserved.
4 *
5 * Distributed under the terms of the MIT license.
6 *
7 * Authors:
8 *		Tri-Edge AI
9 *		John Scipione, jscipione@gmail.com
10 */
11#ifndef GRAVITY_SCREEN_SAVER_H
12#define GRAVITY_SCREEN_SAVER_H
13
14
15#include <ScreenSaver.h>
16
17
18class BMessage;
19class BView;
20
21class ConfigView;
22class GravityView;
23
24
25class Gravity : public BScreenSaver {
26public:
27	struct {
28		int32 ShadeID;
29		int32 ParticleCount;
30	} Config;
31
32							Gravity(BMessage* prefs, image_id imageID);
33
34			status_t		SaveState(BMessage* prefs) const;
35
36			void			StartConfig(BView* view);
37
38			status_t		StartSaver(BView* view, bool preview);
39			void			StopSaver();
40
41			void			DirectConnected(direct_buffer_info* info);
42			void			Draw(BView*, int32 frame);
43
44private:
45			GravityView*	fGravityView;
46			ConfigView*		fConfigView;
47};
48
49
50#endif	// GRAVITY_SCREEN_SAVER_H
51