-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaffeinator.sdef
More file actions
116 lines (109 loc) · 6.96 KB
/
Caffeinator.sdef
File metadata and controls
116 lines (109 loc) · 6.96 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
<dictionary title="Caffeinator">
<suite name="Standard Suite" code="????" description="Common classes and commands for all applications.">
<class name="application" code="capp" description="The application's top-level scripting object.">
<cocoa class="NSApplication"/>
<property name="name" code="pnam" type="text" access="r" description="The name of the application."/>
<property name="frontmost" code="pisf" type="boolean" access="r" description="Is this the active application?">
<cocoa key="isActive"/>
</property>
<property name="version" code="vers" type="text" access="r" description="The version number of the application."/>
<element type="window" access="r">
<cocoa key="orderedWindows"/>
</element>
<responds-to command="quit">
<cocoa method="handleQuitScriptCommand:"/>
</responds-to>
</class>
<class name="window" code="cwin" description="A window.">
<cocoa class="NSWindow"/>
<property name="name" code="pnam" type="text" access="r" description="The title of the window.">
<cocoa key="title"/>
</property>
<property name="id" code="ID " type="integer" access="r" description="The unique identifier of the window.">
<cocoa key="uniqueID"/>
</property>
<property name="index" code="pidx" type="integer" description="The index of the window, ordered front to back.">
<cocoa key="orderedIndex"/>
</property>
<property name="bounds" code="pbnd" type="rectangle" description="The bounding rectangle of the window.">
<cocoa key="boundsAsQDRect"/>
</property>
<property name="closeable" code="hclb" type="boolean" access="r" description="Does the window have a close button?">
<cocoa key="hasCloseBox"/>
</property>
<property name="miniaturizable" code="ismn" type="boolean" access="r" description="Does the window have a minimize button?">
<cocoa key="isMiniaturizable"/>
</property>
<property name="miniaturized" code="pmnd" type="boolean" description="Is the window minimized right now?">
<cocoa key="isMiniaturized"/>
</property>
<property name="resizable" code="prsz" type="boolean" access="r" description="Can the window be resized?">
<cocoa key="isResizable"/>
</property>
<property name="visible" code="pvis" type="boolean" description="Is the window visible right now?">
<cocoa key="isVisible"/>
</property>
<property name="zoomable" code="iszm" type="boolean" access="r" description="Does the window have a zoom button?">
<cocoa key="isZoomable"/>
</property>
<property name="zoomed" code="pzum" type="boolean" description="Is the window zoomed right now?">
<cocoa key="isZoomed"/>
</property>
<responds-to command="close">
<cocoa method="handleCloseScriptCommand:"/>
</responds-to>
<responds-to command="print">
<cocoa method="handlePrintScriptCommand:"/>
</responds-to>
<responds-to command="save">
<cocoa method="handleSaveScriptCommand:"/>
</responds-to>
</class>
</suite>
<suite name="Caffeinator Suite" code="Caff" description="Suite for scripting the Caffeinator application">
<class name="application" code="capp" description="An application's top level scripting object.">
<cocoa class="NSApplication" />
<property name="caffeination" code="Cftn" type="CaffeinatorCaffeination" access="r" description="The current Caffeination session. Note that, if the session is not active, values (besides 'active') will reflect passive defaults.">
<cocoa key="scriptingCaffeination" />
</property>
</class>
<class name="CaffeinatorCaffeination" code="CCaf" description="A caffeination instance.">
<cocoa class="Caffeinator.ScriptingCaffeination" />
<property name="active" code="CAct" type="boolean" access="r"
description="Whether the Caffeination is active." />
<property name="options" code="COpt" access="r" description="The options associated with the current Caffeination.">
<type type="text" list="yes" />
<documentation>
<html>
<![CDATA[<p>Options may be any of the following:<ul><li>display</li><li>idle</li><li>disk</li><li>system</li><li>user</li><li>timed(<code>TIME</code>) where <code>TIME</code> is the duration in seconds</li><li>process(<code>PID</code>) where <code>PID</code> is the process identifier of the process being Caffeinated</li></p>]]>
</html>
</documentation>
</property>
</class>
<command name="stop caffeinating" code="Caffstop" description="Stop an ongoing Caffeination.">
<cocoa class="Caffeinator.ScriptingStopCaffeination" />
<result type="boolean" description="True if the Caffeination was stopped; false otherwise." />
</command>
<command name="start caffeinating" code="Cafstart" description="Start a new Caffeination.">
<cocoa class="Caffeinator.ScriptingStartCaffeination" />
<parameter name="for duration" code="WDur" type="integer" optional="yes" description="The duration of the Caffeination.">
<cocoa key="Duration" />
</parameter>
<parameter name="process" code="ProC" type="integer" optional="yes" description="The PID of the process to caffeinate.">
<cocoa key="PID" />
</parameter>
<parameter name="options" code="COpt" optional="yes" description="Manual configuration options for the Caffeination, passed as strings in a list. If any options are passed, the default display preference set within the app will be ignored. Each option may be specified at most once; if duplicate options are passsed, the Caffeination will fail to start.">
<cocoa key="Options" />
<type type="text" list="yes" />
<documentation>
<html>
<![CDATA[<p>Options may be any of the following:<ul><li>display</li><li>idle</li><li>disk</li><li>system</li><li>user</li></p>]]>
</html>
</documentation>
</parameter>
<result type="boolean" description="True if the Caffeination successfully starts; false otherwise (including if a Caffeination is already active)." />
</command>
</suite>
</dictionary>