forked from gnachman/iTerm2
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathCGSMisc.h
More file actions
72 lines (56 loc) · 2.95 KB
/
Copy pathCGSMisc.h
File metadata and controls
72 lines (56 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
* Copyright (C) 2007-2008 Alacatia Labs
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
* Joe Ranieri joe@alacatia.com
*
*/
#pragma once
#include "CGSInternal.h"
CG_EXTERN_C_BEGIN
/*! DOCUMENTATION PENDING */
CG_EXTERN CGError CGSFetchDirtyScreenRegion(CGSConnectionID cid, CGSRegionObj *outDirtyRegion);
/*! Is someone watching this screen? Applies to Apple's remote desktop only? */
CG_EXTERN bool CGSIsScreenWatcherPresent(void);
/*! Returns `True` if the application has been deemed unresponsive for a certain amount of time. */
CG_EXTERN bool CGSEventIsAppUnresponsive(CGSConnectionID cid, const ProcessSerialNumber *psn);
/*! Sets the amount of time it takes for an application to be considered unresponsive. */
CG_EXTERN CGError CGSEventSetAppIsUnresponsiveNotificationTimeout(CGSConnectionID cid, double theTime);
/*! Sets the cursor position. */
CG_EXTERN CGError CGSWarpCursorPosition(CGSConnectionID cid, float x, float y);
/*! DOCUMENTATION PENDING */
CG_EXTERN CGError CGSHideBackstopMenuBar(CGSConnectionID cid);
CG_EXTERN CGError CGSShowBackstopMenuBar(CGSConnectionID cid);
/*! Determines if this computer is portable. Internally this just checks to see if it has a battery. */
CG_EXTERN bool CGSIsPortableMachine(void);
/*! Sets the area taken up by the dock. Requires the caller to be a universal owner. */
CG_EXTERN CGError CGSSetDockRect(CGSConnectionID cid, float x, float y, float width, float height);
/*! DOCUMENTATION PENDING - returns false. Perhaps related to the CGSTBE_QDACCEL env variable. */
CG_EXTERN bool CGSIsClassicBuffered(void);
#pragma mark errors
/* Logs an error and returns `err`. */
CG_EXTERN CGError CGSGlobalError(CGError err, const char *msg);
/* Logs an error and returns `err`. */
CG_EXTERN CGError CGSGlobalErrorv(CGError err, const char *msg, ...);
/*! Gets the error message for an error code. */
CG_EXTERN char *CGSErrorString(CGError error);
#pragma mark input
/*! Gets and sets the status of secure input. When secure input is enabled, keyloggers, etc are harder to do. */
CG_EXTERN bool CGSIsSecureEventInputSet(void);
CG_EXTERN CGError CGSSetSecureEventInput(CGSConnectionID cid, bool useSecureInput);
CG_EXTERN_C_END