xref: /haiku/src/add-ons/screen_savers/ifs/IFSSaver.h (revision da679effb44d50c9c2d01362c94e781f4f2c93dd)
1 #ifndef IFS_SAVER_H
2 #define IFS_SAVER_H
3 
4 #include <Locker.h>
5 // on PPC the full path is needed
6 #include <add-ons/screen_saver/ScreenSaver.h>
7 #include <View.h>
8 
9 #include "IFS.h"
10 
11 
12 class BCheckBox;
13 class BSlider;
14 
15 
16 class IFSSaver : public BScreenSaver, public BHandler {
17 public:
18 								IFSSaver(BMessage *message,
19 											image_id image);
20 	virtual						~IFSSaver();
21 
22 	virtual	void				StartConfig(BView *view);
23 	virtual	status_t			StartSaver(BView *view, bool preview);
24 	virtual	void				StopSaver();
25 
26 	virtual	void				DirectConnected(direct_buffer_info* info);
27 	virtual	void				Draw(BView* view, int32 frame);
28 	virtual	void				DirectDraw(int32 frame);
29 
30 	virtual	status_t			SaveState(BMessage* into) const;
31 
32 	virtual	void				MessageReceived(BMessage* message);
33 
34 private:
35 			void				_Init(BRect bounds);
36 			void				_Cleanup();
37 
38 			IFS*				fIFS;
39 
40 			bool				fIsPreview;
41 
42 			BLocker				fLocker;
43 
44 			BCheckBox*			fAdditiveCB;
45 			BSlider*			fSpeedS;
46 
47 			buffer_info			fDirectInfo;
48 			int32				fLastDrawnFrame;
49 
50 			bool				fAdditive;
51 			int32				fSpeed;
52 };
53 
54 
55 #endif	// IFS_SAVER_H
56