Deskflow
1.26.0.418
Keyboard and mouse sharing utility
Toggle main menu visibility
Loading...
Searching...
No Matches
MSWindowsScreenSaver.h
Go to the documentation of this file.
1
/*
2
* Deskflow -- mouse and keyboard sharing utility
3
* SPDX-FileCopyrightText: (C) 2012 - 2016 Synergy App Ltd
4
* SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
5
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
6
*/
7
8
#pragma once
9
10
#include "
deskflow/IScreenSaver.h
"
11
12
#define WIN32_LEAN_AND_MEAN
13
#include <Windows.h>
14
15
class
Thread
;
16
18
class
MSWindowsScreenSaver
:
public
IScreenSaver
19
{
20
public
:
21
MSWindowsScreenSaver
();
22
~MSWindowsScreenSaver
()
override
;
23
25
26
28
34
bool
checkStarted
(UINT msg, WPARAM, LPARAM);
35
37
38
// IScreenSaver overrides
39
void
enable
()
override
;
40
void
disable
()
override
;
41
void
activate
()
override
;
42
void
deactivate
()
override
;
43
bool
isActive
()
const override
;
44
45
private
:
46
class
FindScreenSaverInfo
47
{
48
public
:
49
HDESK m_desktop;
50
HWND m_window;
51
};
52
53
static
BOOL
CALLBACK killScreenSaverFunc(HWND hwnd, LPARAM lParam);
54
55
void
watchDesktop();
56
void
watchProcess(HANDLE process);
57
void
unwatchProcess();
58
void
watchDesktopThread(
const
void
*);
59
void
watchProcessThread(
const
void
*);
60
61
void
setSecure(
bool
secure,
bool
saveSecureAsInt);
62
bool
isSecure(
bool
*wasSecureAnInt)
const
;
63
64
private
:
65
BOOL
m_wasEnabled;
66
bool
m_wasSecure =
false
;
67
bool
m_wasSecureAnInt =
false
;
68
69
HANDLE m_process =
nullptr
;
70
Thread
*m_watch =
nullptr
;
71
DWORD
m_threadID = 0;
72
UINT m_msg = 0;
73
WPARAM m_wParam = 0;
74
LPARAM m_lParam = 0;
75
76
// checkActive state. true if the screen saver is being watched
77
// for deactivation (and is therefore active).
78
bool
m_active =
false
;
79
};
DWORD
static const WSAEVENT FAR DWORD
Definition
ArchNetworkWinsock.cpp:56
BOOL
static const WSAEVENT FAR BOOL
Definition
ArchNetworkWinsock.cpp:56
IScreenSaver.h
IScreenSaver
Screen saver interface.
Definition
IScreenSaver.h:16
MSWindowsScreenSaver::disable
void disable() override
Disable screen saver.
Definition
MSWindowsScreenSaver.cpp:92
MSWindowsScreenSaver::deactivate
void deactivate() override
Deactivate screen saver.
Definition
MSWindowsScreenSaver.cpp:119
MSWindowsScreenSaver::isActive
bool isActive() const override
Test if screen saver on.
Definition
MSWindowsScreenSaver.cpp:149
MSWindowsScreenSaver::MSWindowsScreenSaver
MSWindowsScreenSaver()
Definition
MSWindowsScreenSaver.cpp:32
MSWindowsScreenSaver::activate
void activate() override
Activate screen saver.
Definition
MSWindowsScreenSaver.cpp:104
MSWindowsScreenSaver::enable
void enable() override
Enable screen saver.
Definition
MSWindowsScreenSaver.cpp:82
MSWindowsScreenSaver::checkStarted
bool checkStarted(UINT msg, WPARAM, LPARAM)
Check if screen saver started.
Definition
MSWindowsScreenSaver.cpp:43
Thread
Thread handle.
Definition
Thread.h:33
src
lib
platform
MSWindowsScreenSaver.h
Generated by
1.18.0