Minor changes to support code sharing.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7125 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
#ifndef SCREEN_SAVER_PREFS_H
|
#ifndef SCREEN_SAVER_PREFS_H
|
||||||
#define SCREEN_SAVER_PREFS_H
|
#define SCREEN_SAVER_PREFS_H
|
||||||
#include "Message.h"
|
#include "Message.h"
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
enum arrowDirection {UPLEFT,UPRIGHT,DOWNLEFT,DOWNRIGHT,NONE};
|
enum arrowDirection {NONE=-1,UPLEFT,UPRIGHT,DOWNRIGHT,DOWNLEFT};
|
||||||
|
|
||||||
class ScreenSaverPrefs
|
class ScreenSaverPrefs
|
||||||
{
|
{
|
||||||
@@ -29,17 +30,17 @@ public:
|
|||||||
void SetWindowFrame(const BRect &fr) {windowFrame=fr;}
|
void SetWindowFrame(const BRect &fr) {windowFrame=fr;}
|
||||||
void SetWindowTab(int tab) {windowTab=tab;}
|
void SetWindowTab(int tab) {windowTab=tab;}
|
||||||
void SetTimeFlags(int tf) {timeFlags=tf;}
|
void SetTimeFlags(int tf) {timeFlags=tf;}
|
||||||
void SetBlankTime(int );
|
void SetBlankTime(int bt) {blankTime=bt;}
|
||||||
void SetStandbyTime(int time) {standbyTime=time;}
|
void SetStandbyTime(int time) {standbyTime=time;}
|
||||||
void SetSuspendTime(int time) {suspendTime=time;}
|
void SetSuspendTime(int time) {suspendTime=time;}
|
||||||
void SetOffTime(int intime) {offTime=intime;}
|
void SetOffTime(int intime) {offTime=intime;}
|
||||||
void SetBlankCorner(arrowDirection in) {blank=in;}
|
void SetBlankCorner(arrowDirection in) {blank=in;}
|
||||||
void SetNeverBlankCorner(arrowDirection in){neverBlank=in;}
|
void SetNeverBlankCorner(arrowDirection in){neverBlank=in;}
|
||||||
void SetLockEnable(bool en) {lockenable=en;}
|
void SetLockEnable(bool en) {lockenable=en;}
|
||||||
void SetPasswordTime(int );
|
void SetPasswordTime(int pt) {passwordTime=pt;}
|
||||||
void SetPassword(char *);
|
void SetPassword(char *pw){strncpy(password,pw,B_PATH_NAME_LENGTH-1);}
|
||||||
void SetNetworkPassword(bool np) {isNetworkPWD=np;}
|
void SetNetworkPassword(bool np) {isNetworkPWD=np;}
|
||||||
void SetModuleName(const char *);
|
void SetModuleName(const char *mn) {strncpy(moduleName,mn,B_PATH_NAME_LENGTH-1);}
|
||||||
void SetState(BMessage *);
|
void SetState(BMessage *);
|
||||||
void SaveSettings (void);
|
void SaveSettings (void);
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef SCREEN_SAVER_THREAD_H
|
#ifndef SCREEN_SAVER_THREAD_H
|
||||||
#define SCREEN_SAVER_THREAD_H
|
#define SCREEN_SAVER_THREAD_H
|
||||||
#include "SupportDefs.h"
|
#include <SupportDefs.h>
|
||||||
#include "DirectWindow.h"
|
#include <DirectWindow.h>
|
||||||
|
|
||||||
class BScreenSaver;
|
class BScreenSaver;
|
||||||
class BView;
|
class BView;
|
||||||
@@ -12,17 +12,20 @@ int32 threadFunc(void *data);
|
|||||||
class ScreenSaverThread
|
class ScreenSaverThread
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenSaverThread(BScreenSaver *svr, BDirectWindow *wnd, BView *vw, ScreenSaverPrefs *p);
|
ScreenSaverThread(BWindow *wnd, BView *vw, ScreenSaverPrefs *p);
|
||||||
void thread(void);
|
void thread(void);
|
||||||
|
BScreenSaver *LoadAddOn(void) ;
|
||||||
void quit(void);
|
void quit(void);
|
||||||
private:
|
private:
|
||||||
BScreenSaver *saver;
|
BScreenSaver *saver;
|
||||||
BDirectWindow *win;
|
BWindow *win;
|
||||||
|
BDirectWindow *dwin;
|
||||||
BView *view;
|
BView *view;
|
||||||
ScreenSaverPrefs *pref;
|
ScreenSaverPrefs *pref;
|
||||||
|
|
||||||
long frame;
|
long frame;
|
||||||
int snoozeCount;
|
int snoozeCount;
|
||||||
|
image_id addon_image;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //SCREEN_SAVER_THREAD_H
|
#endif //SCREEN_SAVER_THREAD_H
|
||||||
|
|||||||
Reference in New Issue
Block a user