xref: /haiku/src/add-ons/screen_savers/gravity/Gravity.h (revision 73ad2473e7874b3702cf5b0fdf4c81b747812ed9)
1 /*
2  * Copyright 2012-2013 Tri-Edge AI <triedgeai@gmail.com>
3  * All rights reserved. Distributed under the terms of the MIT license.
4  */
5 #ifndef GRAVITY_SCREEN_SAVER_H
6 #define GRAVITY_SCREEN_SAVER_H
7 
8 
9 #include <ScreenSaver.h>
10 
11 class GravityView;
12 
13 class BMessage;
14 class BView;
15 
16 
17 class Gravity : public BScreenSaver
18 {
19 public:
20 	struct
21 	{
22 		int32 ShadeID;
23 		int32 ParticleCount;
24 	} Config;
25 
26 					Gravity(BMessage* prefs, image_id imageID);
27 
28 	status_t 		SaveState(BMessage* prefs) const;
29 
30 	void 			StartConfig(BView* view);
31 
32 	status_t 		StartSaver(BView* view, bool preview);
33 	void 			StopSaver();
34 
35 	void 			DirectConnected(direct_buffer_info* info);
36 	void 			DirectDraw(int32 frame);
37 
38 private:
39 	GravityView* 	fView;
40 };
41 
42 
43 #endif
44