Promoted to libscreensaver from (what will be) screen_blanker.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7038 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
0a230fcfc5
commit
e948782184
66
headers/os/add-ons/screen_saver/ScreenSaverPrefs.h
Executable file
66
headers/os/add-ons/screen_saver/ScreenSaverPrefs.h
Executable file
@ -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
|
28
headers/os/add-ons/screen_saver/ScreenSaverThread.h
Normal file
28
headers/os/add-ons/screen_saver/ScreenSaverThread.h
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user