xref: /haiku/src/kits/screensaver/ScreenSaver.cpp (revision d7b390a6c02cadf840a022bae13de616a4ad4ce7)
1386d67c7SJérôme Duval /*
2*d7b390a6SAxel Dörfler  * Copyright 2003-2006, Michael Phipps. All rights reserved.
3386d67c7SJérôme Duval  * Distributed under the terms of the MIT License.
4386d67c7SJérôme Duval  */
5386d67c7SJérôme Duval 
6*d7b390a6SAxel Dörfler 
752a38012Sejakowatz #include "ScreenSaver.h"
852a38012Sejakowatz 
9*d7b390a6SAxel Dörfler 
BScreenSaver(BMessage * archive,image_id thisImage)10*d7b390a6SAxel Dörfler BScreenSaver::BScreenSaver(BMessage *archive, image_id thisImage)
11*d7b390a6SAxel Dörfler 	:
12*d7b390a6SAxel Dörfler 	fTickSize(50000),
13*d7b390a6SAxel Dörfler 	fLoopOnCount(0),
14*d7b390a6SAxel Dörfler 	fLoopOffCount(0)
15f141dd57SMichael Phipps {
1652a38012Sejakowatz }
1752a38012Sejakowatz 
1852a38012Sejakowatz 
~BScreenSaver()19f141dd57SMichael Phipps BScreenSaver::~BScreenSaver()
20f141dd57SMichael Phipps {
2152a38012Sejakowatz }
2252a38012Sejakowatz 
2352a38012Sejakowatz 
2452a38012Sejakowatz status_t
InitCheck()25f141dd57SMichael Phipps BScreenSaver::InitCheck()
26f141dd57SMichael Phipps {
27*d7b390a6SAxel Dörfler     // This method is meant to be overridden
28*d7b390a6SAxel Dörfler     return B_OK;
2952a38012Sejakowatz }
3052a38012Sejakowatz 
3152a38012Sejakowatz 
3252a38012Sejakowatz status_t
StartSaver(BView * view,bool preview)33f141dd57SMichael Phipps BScreenSaver::StartSaver(BView *view, bool preview)
34f141dd57SMichael Phipps {
35*d7b390a6SAxel Dörfler     // This method is meant to be overridden
36*d7b390a6SAxel Dörfler     return B_OK;
3752a38012Sejakowatz }
3852a38012Sejakowatz 
39f141dd57SMichael Phipps 
4052a38012Sejakowatz void
StopSaver()41f141dd57SMichael Phipps BScreenSaver::StopSaver()
42f141dd57SMichael Phipps {
43*d7b390a6SAxel Dörfler 	// This method is meant to be overridden
44*d7b390a6SAxel Dörfler 	return;
45112c0c23SMichael Phipps }
46112c0c23SMichael Phipps 
47f141dd57SMichael Phipps 
48112c0c23SMichael Phipps void
Draw(BView * view,int32 frame)49112c0c23SMichael Phipps BScreenSaver::Draw(BView *view, int32 frame)
5052a38012Sejakowatz {
51*d7b390a6SAxel Dörfler 	// This method is meant to be overridden
52*d7b390a6SAxel Dörfler 	return;
5352a38012Sejakowatz }
5452a38012Sejakowatz 
55f141dd57SMichael Phipps 
5652a38012Sejakowatz void
DirectConnected(direct_buffer_info * info)57f141dd57SMichael Phipps BScreenSaver::DirectConnected(direct_buffer_info *info)
58f141dd57SMichael Phipps {
59*d7b390a6SAxel Dörfler 	// This method is meant to be overridden
60*d7b390a6SAxel Dörfler 	return;
6152a38012Sejakowatz }
6252a38012Sejakowatz 
63f141dd57SMichael Phipps 
6452a38012Sejakowatz void
DirectDraw(int32 frame)65f141dd57SMichael Phipps BScreenSaver::DirectDraw(int32 frame)
66f141dd57SMichael Phipps {
67*d7b390a6SAxel Dörfler 	// This method is meant to be overridden
68*d7b390a6SAxel Dörfler 	return;
6952a38012Sejakowatz }
7052a38012Sejakowatz 
71f141dd57SMichael Phipps 
7252a38012Sejakowatz void
StartConfig(BView * configView)73f141dd57SMichael Phipps BScreenSaver::StartConfig(BView *configView)
74f141dd57SMichael Phipps {
75*d7b390a6SAxel Dörfler 	// This method is meant to be overridden
76*d7b390a6SAxel Dörfler 	return;
7752a38012Sejakowatz }
7852a38012Sejakowatz 
79f141dd57SMichael Phipps 
8052a38012Sejakowatz void
StopConfig()81f141dd57SMichael Phipps BScreenSaver::StopConfig()
82f141dd57SMichael Phipps {
83*d7b390a6SAxel Dörfler 	// This method is meant to be overridden
84*d7b390a6SAxel Dörfler 	return;
8552a38012Sejakowatz }
8652a38012Sejakowatz 
87f141dd57SMichael Phipps 
8852a38012Sejakowatz void
SupplyInfo(BMessage * info) const89f141dd57SMichael Phipps BScreenSaver::SupplyInfo(BMessage* info) const
90f141dd57SMichael Phipps {
91*d7b390a6SAxel Dörfler 	// This method is meant to be overridden
92*d7b390a6SAxel Dörfler 	return;
9352a38012Sejakowatz }
9452a38012Sejakowatz 
95f141dd57SMichael Phipps 
9652a38012Sejakowatz void
ModulesChanged(const BMessage * info)97f141dd57SMichael Phipps BScreenSaver::ModulesChanged(const BMessage* info)
98f141dd57SMichael Phipps {
99*d7b390a6SAxel Dörfler 	// This method is meant to be overridden
100*d7b390a6SAxel Dörfler 	return;
10152a38012Sejakowatz }
10252a38012Sejakowatz 
103f141dd57SMichael Phipps 
10452a38012Sejakowatz status_t
SaveState(BMessage * into) const105f141dd57SMichael Phipps BScreenSaver::SaveState(BMessage *into) const
106f141dd57SMichael Phipps {
107*d7b390a6SAxel Dörfler     // This method is meant to be overridden
108*d7b390a6SAxel Dörfler     return B_ERROR;
10952a38012Sejakowatz }
11052a38012Sejakowatz 
111f141dd57SMichael Phipps 
11252a38012Sejakowatz void
SetTickSize(bigtime_t tickSize)113*d7b390a6SAxel Dörfler BScreenSaver::SetTickSize(bigtime_t tickSize)
114f141dd57SMichael Phipps {
115*d7b390a6SAxel Dörfler 	fTickSize = tickSize;
11652a38012Sejakowatz }
11752a38012Sejakowatz 
118f141dd57SMichael Phipps 
11952a38012Sejakowatz bigtime_t
TickSize() const120f141dd57SMichael Phipps BScreenSaver::TickSize() const
121f141dd57SMichael Phipps {
122*d7b390a6SAxel Dörfler     return fTickSize;
12352a38012Sejakowatz }
12452a38012Sejakowatz 
125f141dd57SMichael Phipps 
12652a38012Sejakowatz void
SetLoop(int32 onCount,int32 offCount)127*d7b390a6SAxel Dörfler BScreenSaver::SetLoop(int32 onCount, int32 offCount)
128f141dd57SMichael Phipps {
129*d7b390a6SAxel Dörfler 	fLoopOnCount = onCount;
130*d7b390a6SAxel Dörfler 	fLoopOffCount = offCount;
13152a38012Sejakowatz }
13252a38012Sejakowatz 
133f141dd57SMichael Phipps 
13452a38012Sejakowatz int32
LoopOnCount() const135f141dd57SMichael Phipps BScreenSaver::LoopOnCount() const
136f141dd57SMichael Phipps {
137*d7b390a6SAxel Dörfler     return fLoopOnCount;
13852a38012Sejakowatz }
13952a38012Sejakowatz 
140f141dd57SMichael Phipps 
14152a38012Sejakowatz int32
LoopOffCount() const142f141dd57SMichael Phipps BScreenSaver::LoopOffCount() const
143f141dd57SMichael Phipps {
144*d7b390a6SAxel Dörfler     return fLoopOffCount;
14552a38012Sejakowatz }
14652a38012Sejakowatz 
14752a38012Sejakowatz 
_ReservedScreenSaver1()148*d7b390a6SAxel Dörfler void BScreenSaver::_ReservedScreenSaver1() {}
_ReservedScreenSaver2()149*d7b390a6SAxel Dörfler void BScreenSaver::_ReservedScreenSaver2() {}
_ReservedScreenSaver3()150*d7b390a6SAxel Dörfler void BScreenSaver::_ReservedScreenSaver3() {}
_ReservedScreenSaver4()151*d7b390a6SAxel Dörfler void BScreenSaver::_ReservedScreenSaver4() {}
_ReservedScreenSaver5()152*d7b390a6SAxel Dörfler void BScreenSaver::_ReservedScreenSaver5() {}
_ReservedScreenSaver6()153*d7b390a6SAxel Dörfler void BScreenSaver::_ReservedScreenSaver6() {}
_ReservedScreenSaver7()154*d7b390a6SAxel Dörfler void BScreenSaver::_ReservedScreenSaver7() {}
_ReservedScreenSaver8()155*d7b390a6SAxel Dörfler void BScreenSaver::_ReservedScreenSaver8() {}
15652a38012Sejakowatz 
157*d7b390a6SAxel Dörfler // for compatibility with older BeOS versions
158775cef03SMichael Phipps extern "C" {
ReservedScreenSaver1__12BScreenSaver()159775cef03SMichael Phipps void ReservedScreenSaver1__12BScreenSaver() {}
ReservedScreenSaver2__12BScreenSaver()160775cef03SMichael Phipps void ReservedScreenSaver2__12BScreenSaver() {}
ReservedScreenSaver3__12BScreenSaver()161775cef03SMichael Phipps void ReservedScreenSaver3__12BScreenSaver() {}
ReservedScreenSaver4__12BScreenSaver()162775cef03SMichael Phipps void ReservedScreenSaver4__12BScreenSaver() {}
ReservedScreenSaver5__12BScreenSaver()163775cef03SMichael Phipps void ReservedScreenSaver5__12BScreenSaver() {}
ReservedScreenSaver6__12BScreenSaver()164775cef03SMichael Phipps void ReservedScreenSaver6__12BScreenSaver() {}
ReservedScreenSaver7__12BScreenSaver()165775cef03SMichael Phipps void ReservedScreenSaver7__12BScreenSaver() {}
ReservedScreenSaver8__12BScreenSaver()166775cef03SMichael Phipps void ReservedScreenSaver8__12BScreenSaver() {}
167775cef03SMichael Phipps }
168