1 /*
2 * Copyright 2003-2006, Michael Phipps. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5
6
7 #include "ScreenSaver.h"
8
9
BScreenSaver(BMessage * archive,image_id thisImage)10 BScreenSaver::BScreenSaver(BMessage *archive, image_id thisImage)
11 :
12 fTickSize(50000),
13 fLoopOnCount(0),
14 fLoopOffCount(0)
15 {
16 }
17
18
~BScreenSaver()19 BScreenSaver::~BScreenSaver()
20 {
21 }
22
23
24 status_t
InitCheck()25 BScreenSaver::InitCheck()
26 {
27 // This method is meant to be overridden
28 return B_OK;
29 }
30
31
32 status_t
StartSaver(BView * view,bool preview)33 BScreenSaver::StartSaver(BView *view, bool preview)
34 {
35 // This method is meant to be overridden
36 return B_OK;
37 }
38
39
40 void
StopSaver()41 BScreenSaver::StopSaver()
42 {
43 // This method is meant to be overridden
44 return;
45 }
46
47
48 void
Draw(BView * view,int32 frame)49 BScreenSaver::Draw(BView *view, int32 frame)
50 {
51 // This method is meant to be overridden
52 return;
53 }
54
55
56 void
DirectConnected(direct_buffer_info * info)57 BScreenSaver::DirectConnected(direct_buffer_info *info)
58 {
59 // This method is meant to be overridden
60 return;
61 }
62
63
64 void
DirectDraw(int32 frame)65 BScreenSaver::DirectDraw(int32 frame)
66 {
67 // This method is meant to be overridden
68 return;
69 }
70
71
72 void
StartConfig(BView * configView)73 BScreenSaver::StartConfig(BView *configView)
74 {
75 // This method is meant to be overridden
76 return;
77 }
78
79
80 void
StopConfig()81 BScreenSaver::StopConfig()
82 {
83 // This method is meant to be overridden
84 return;
85 }
86
87
88 void
SupplyInfo(BMessage * info) const89 BScreenSaver::SupplyInfo(BMessage* info) const
90 {
91 // This method is meant to be overridden
92 return;
93 }
94
95
96 void
ModulesChanged(const BMessage * info)97 BScreenSaver::ModulesChanged(const BMessage* info)
98 {
99 // This method is meant to be overridden
100 return;
101 }
102
103
104 status_t
SaveState(BMessage * into) const105 BScreenSaver::SaveState(BMessage *into) const
106 {
107 // This method is meant to be overridden
108 return B_ERROR;
109 }
110
111
112 void
SetTickSize(bigtime_t tickSize)113 BScreenSaver::SetTickSize(bigtime_t tickSize)
114 {
115 fTickSize = tickSize;
116 }
117
118
119 bigtime_t
TickSize() const120 BScreenSaver::TickSize() const
121 {
122 return fTickSize;
123 }
124
125
126 void
SetLoop(int32 onCount,int32 offCount)127 BScreenSaver::SetLoop(int32 onCount, int32 offCount)
128 {
129 fLoopOnCount = onCount;
130 fLoopOffCount = offCount;
131 }
132
133
134 int32
LoopOnCount() const135 BScreenSaver::LoopOnCount() const
136 {
137 return fLoopOnCount;
138 }
139
140
141 int32
LoopOffCount() const142 BScreenSaver::LoopOffCount() const
143 {
144 return fLoopOffCount;
145 }
146
147
_ReservedScreenSaver1()148 void BScreenSaver::_ReservedScreenSaver1() {}
_ReservedScreenSaver2()149 void BScreenSaver::_ReservedScreenSaver2() {}
_ReservedScreenSaver3()150 void BScreenSaver::_ReservedScreenSaver3() {}
_ReservedScreenSaver4()151 void BScreenSaver::_ReservedScreenSaver4() {}
_ReservedScreenSaver5()152 void BScreenSaver::_ReservedScreenSaver5() {}
_ReservedScreenSaver6()153 void BScreenSaver::_ReservedScreenSaver6() {}
_ReservedScreenSaver7()154 void BScreenSaver::_ReservedScreenSaver7() {}
_ReservedScreenSaver8()155 void BScreenSaver::_ReservedScreenSaver8() {}
156
157 // for compatibility with older BeOS versions
158 extern "C" {
ReservedScreenSaver1__12BScreenSaver()159 void ReservedScreenSaver1__12BScreenSaver() {}
ReservedScreenSaver2__12BScreenSaver()160 void ReservedScreenSaver2__12BScreenSaver() {}
ReservedScreenSaver3__12BScreenSaver()161 void ReservedScreenSaver3__12BScreenSaver() {}
ReservedScreenSaver4__12BScreenSaver()162 void ReservedScreenSaver4__12BScreenSaver() {}
ReservedScreenSaver5__12BScreenSaver()163 void ReservedScreenSaver5__12BScreenSaver() {}
ReservedScreenSaver6__12BScreenSaver()164 void ReservedScreenSaver6__12BScreenSaver() {}
ReservedScreenSaver7__12BScreenSaver()165 void ReservedScreenSaver7__12BScreenSaver() {}
ReservedScreenSaver8__12BScreenSaver()166 void ReservedScreenSaver8__12BScreenSaver() {}
167 }
168