xref: /haiku/src/add-ons/screen_savers/icons/IconsSaver.h (revision 2db0fbd87ec3eeed8ab9b08ecfd1c41891c7e3a6)
1 /*
2  * Copyright 2009 Vincent Duvert, vincent.duvert@free.fr
3  * Copyright 2014 Haiku, Inc. All rights reserved.
4  *
5  * Distributed under the terms of the MIT License.
6  *
7  * Authors:
8  *		Vincent Duvert, vincent.duvert@free.fr
9  *		John Scipione, jscipione@gmail.com
10  */
11 #ifndef ICONS_SAVER_H
12 #define ICONS_SAVER_H
13 
14 
15 #include <ObjectList.h>
16 #include <ScreenSaver.h>
17 
18 
19 struct vector_icon;
20 
21 
22 class IconDisplay;
23 
24 
25 class IconsSaver: public BScreenSaver {
26 public:
27 								IconsSaver(BMessage* archive, image_id);
28 	virtual						~IconsSaver();
29 
30 	virtual	status_t			StartSaver(BView *view, bool preview);
31 	virtual	void				StopSaver();
32 
33 	virtual	void				Draw(BView *view, int32 frame);
34 
35 	virtual	void				StartConfig(BView* view);
36 
37 private:
38 			void				_GetVectorIcons();
39 
40 	BObjectList<vector_icon>	fVectorIcons;
41 			IconDisplay*		fIcons;
42 
43 			BBitmap*			fBackBitmap;
44 			BView*				fBackView;
45 
46 			uint16				fMinSize;
47 			uint16				fMaxSize;
48 };
49 
50 
51 #endif	// ICONS_SAVER_H
52