diff --git a/headers/os/add-ons/screen_saver/ScreenSaverPrefs.h b/headers/os/add-ons/screen_saver/ScreenSaverPrefs.h new file mode 100755 index 0000000000..9f7d9a7027 --- /dev/null +++ b/headers/os/add-ons/screen_saver/ScreenSaverPrefs.h @@ -0,0 +1,66 @@ +#ifndef SCREEN_SAVER_PREFS_H +#define SCREEN_SAVER_PREFS_H +#include "Message.h" + +enum arrowDirection {UPLEFT,UPRIGHT,DOWNLEFT,DOWNRIGHT,NONE}; + +class ScreenSaverPrefs +{ +public: + ScreenSaverPrefs(void); + bool LoadSettings(void); + + BRect WindowFrame(void) {return windowFrame;} + int WindowTab(void) {return windowTab;} + int TimeFlags(void) {return timeFlags;} + int BlankTime(void) {return blankTime;} + int StandbyTime(void) {return standbyTime;} + int SuspendTime(void) {return suspendTime;} + int OffTime(void) {return offTime;} + arrowDirection GetBlankCorner(void) {return blank;} + arrowDirection GetNeverBlankCorner(void) {return neverBlank;} + bool LockEnable(void) {return lockenable;} + int PasswordTime(void) {return passwordTime;} + char *Password(void) {return password;} + bool IsNetworkPassword(void) {return isNetworkPWD;} + char *ModuleName(void) {return moduleName;} + BMessage *GetState(void) {return &stateMsg;} + + void SetWindowFrame(const BRect &fr) {windowFrame=fr;} + void SetWindowTab(int tab) {windowTab=tab;} + void SetTimeFlags(int tf) {timeFlags=tf;} + void SetBlankTime(int ); + void SetStandbyTime(int time) {standbyTime=time;} + void SetSuspendTime(int time) {suspendTime=time;} + void SetOffTime(int intime) {offTime=intime;} + void SetBlankCorner(arrowDirection in) {blank=in;} + void SetNeverBlankCorner(arrowDirection in){neverBlank=in;} + void SetLockEnable(bool en) {lockenable=en;} + void SetPasswordTime(int ); + void SetPassword(char *); + void SetNetworkPassword(bool np) {isNetworkPWD=np;} + void SetModuleName(const char *); + void SetState(BMessage *); + void SaveSettings (void); +private: + bool parseSettings(BMessage *newSSMessage); + BRect windowFrame; + int windowTab; + int timeFlags; + int blankTime; // AKA timefade + int standbyTime; // AKA timestandby + int suspendTime; // AKA timesuspend + int offTime; // AKA timeoff + arrowDirection blank; // AKA cornernow + arrowDirection neverBlank; // AKA cornernever + bool lockenable; + int passwordTime; // AKA lockdelay + char password[B_PATH_NAME_LENGTH]; // aka lockpassword + bool isNetworkPWD; + + char moduleName[B_PATH_NAME_LENGTH]; + BMessage stateMsg; +}; + + +#endif //SCREEN_SAVER_PREFS_H diff --git a/headers/os/add-ons/screen_saver/ScreenSaverThread.h b/headers/os/add-ons/screen_saver/ScreenSaverThread.h new file mode 100644 index 0000000000..c4f4e0cc67 --- /dev/null +++ b/headers/os/add-ons/screen_saver/ScreenSaverThread.h @@ -0,0 +1,28 @@ +#ifndef SCREEN_SAVER_THREAD_H +#define SCREEN_SAVER_THREAD_H +#include "SupportDefs.h" +#include "DirectWindow.h" + +class BScreenSaver; +class BView; +class ScreenSaverPrefs; + +int32 threadFunc(void *data); + +class ScreenSaverThread +{ +public: + ScreenSaverThread(BScreenSaver *svr, BDirectWindow *wnd, BView *vw, ScreenSaverPrefs *p); + void thread(void); + void quit(void); +private: + BScreenSaver *saver; + BDirectWindow *win; + BView *view; + ScreenSaverPrefs *pref; + + long frame; + int snoozeCount; +}; + +#endif //SCREEN_SAVER_THREAD_H