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