source: trunk/synergy/lib/platform/COSXScreenSaver.h

Last change on this file was 2749, checked in by bird, 19 years ago

synergy v1.3.1 sources (zip).

File size: 1.5 KB
Line 
1/*
2 * synergy -- mouse and keyboard sharing utility
3 * Copyright (C) 2002 Chris Schoeneman
4 *
5 * This package is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * found in the file COPYING that should have accompanied this file.
8 *
9 * This package is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#ifndef COSXSCREENSAVER_H
16#define COSXSCREENSAVER_H
17
18#include "IScreenSaver.h"
19#include <Carbon/Carbon.h>
20
21//! OSX screen saver implementation
22class COSXScreenSaver : public IScreenSaver {
23public:
24 COSXScreenSaver(void* eventTarget);
25 virtual ~COSXScreenSaver();
26
27 // IScreenSaver overrides
28 virtual void enable();
29 virtual void disable();
30 virtual void activate();
31 virtual void deactivate();
32 virtual bool isActive() const;
33
34private:
35 void processLaunched(ProcessSerialNumber psn);
36 void processTerminated(ProcessSerialNumber psn);
37
38 static pascal OSStatus
39 launchTerminationCallback(
40 EventHandlerCallRef nextHandler,
41 EventRef theEvent, void* userData);
42
43private:
44 // the target for the events we generate
45 void* m_eventTarget;
46
47 bool m_enabled;
48 void* m_screenSaverController;
49 void* m_autoReleasePool;
50 EventHandlerRef m_launchTerminationEventHandlerRef;
51 ProcessSerialNumber m_screenSaverPSN;
52};
53
54#endif
Note: See TracBrowser for help on using the repository browser.