forked from IntelliScape/caffeine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCaffeine.sdef
executable file
·155 lines (137 loc) · 7.71 KB
/
Caffeine.sdef
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
<dictionary title="Dictionary">
<!--
STANDARD SUITE
-->
<suite name="Standard Suite" code="core" description="Common classes and commands for all applications.">
<cocoa name="NSCoreSuite"/>
<!--
According to TN2106, 'open' should return the resulting document
object. However, the Cocoa implementation does not do this yet.
<result type="specifier"/>
-->
<enumeration name="save options" code="savo">
<enumerator name="yes" code="yes " description="Save the file."/>
<enumerator name="no" code="no " description="Do not save the file."/>
<enumerator name="ask" code="ask " description="Ask the user whether or not to save the file."/>
</enumeration>
<enumeration name="printing error handling" code="enum">
<enumerator name="standard" code="lwst" description="Standard PostScript error handling"/>
<enumerator name="detailed" code="lwdt" description="print a detailed report of PostScript errors"/>
</enumeration>
<record-type name="print settings" code="pset">
<property name="copies" code="lwcp" description="the number of copies of a document to be printed" type="integer">
<cocoa key="NSCopies"/>
</property>
<property name="collating" code="lwcl" description="Should printed copies be collated?" type="boolean">
<cocoa key="NSMustCollate"/>
</property>
<property name="starting page" code="lwfp" description="the first page of the document to be printed" type="integer">
<cocoa key="NSFirstPage"/>
</property>
<property name="ending page" code="lwlp" description="the last page of the document to be printed" type="integer">
<cocoa key="NSLastPage"/>
</property>
<property name="pages across" code="lwla" description="number of logical pages laid across a physical page" type="integer">
<cocoa key="NSPagesAcross"/>
</property>
<property name="pages down" code="lwld" description="number of logical pages laid out down a physical page" type="integer">
<cocoa key="NSPagesDown"/>
</property>
<property name="error handling" code="lweh" description="how errors are handled" type="printing error handling">
<cocoa key="NSDetailedErrorReporting"/>
</property>
<property name="fax number" code="faxn" description="for fax number" type="text">
<cocoa key="NSFaxNumber"/>
</property>
<property name="target printer" code="trpr" description="for target printer" type="text">
<cocoa key="NSPrinterName"/>
</property>
</record-type>
<class name="application" code="capp" description="The application's top-level scripting object.">
<cocoa class="NSApplication"/>
<element type="window" access="r">
<cocoa key="orderedWindows"/>
</element>
<property name="name" code="pnam" description="The name of the application." type="text" access="r"/>
<property name="frontmost" code="pisf" description="Is this the frontmost (active) application?" type="boolean" access="r">
<cocoa key="isActive"/>
</property>
<property name="version" code="vers" description="The version of the application." type="text" access="r"/>
<responds-to name="open">
<cocoa method="handleOpenScriptCommand:"/>
</responds-to>
<responds-to name="print">
<cocoa method="handlePrintScriptCommand:"/>
</responds-to>
<responds-to name="quit">
<cocoa method="handleQuitScriptCommand:"/>
</responds-to>
</class>
<class name="window" code="cwin" description="A window.">
<cocoa class="NSWindow"/>
<property name="name" code="pnam" description="The full title of the window." type="text" access="r">
<cocoa key="title"/>
</property>
<property name="id" code="ID " description="The unique identifier of the window." type="integer" access="r">
<cocoa key="uniqueID"/>
</property>
<property name="index" code="pidx" description="The index of the window, ordered front to back." type="integer">
<cocoa key="orderedIndex"/>
</property>
<property name="bounds" code="pbnd" description="The bounding rectangle of the window." type="rectangle">
<cocoa key="boundsAsQDRect"/>
</property>
<property name="closeable" code="hclb" description="Whether the window has a close box." type="boolean" access="r">
<cocoa key="hasCloseBox"/>
</property>
<property name="minimizable" code="ismn" description="Whether the window can be minimized." type="boolean" access="r">
<cocoa key="isMiniaturizable"/>
</property>
<property name="minimized" code="pmnd" description="Whether the window is currently minimized." type="boolean">
<cocoa key="isMiniaturized"/>
</property>
<property name="resizable" code="prsz" description="Whether the window can be resized." type="boolean" access="r">
<cocoa key="isResizable"/>
</property>
<property name="visible" code="pvis" description="Whether the window is currently visible." type="boolean">
<cocoa key="isVisible"/>
</property>
<property name="zoomable" code="iszm" description="Whether the window can be zoomed." type="boolean" access="r">
<cocoa key="isZoomable"/>
</property>
<property name="zoomed" code="pzum" description="Whether the window is currently zoomed." type="boolean">
<cocoa key="isZoomed"/>
</property>
<responds-to name="close">
<cocoa method="handleCloseScriptCommand:"/>
</responds-to>
<responds-to name="print">
<cocoa method="handlePrintScriptCommand:"/>
</responds-to>
<responds-to name="save">
<cocoa method="handleSaveScriptCommand:"/>
</responds-to>
</class>
</suite>
<!--
Caffeine Suite
-->
<suite name="Caffeine Suite" code="LCaf" description="Classes and commands specific to Caffeine.">
<!-- Commands -->
<command name="turn on" code="LCafStrt" description="Activate Caffeine">
<parameter name="for" code="for " type="integer" optional="yes" description="After how many seconds to automatically deactivate Caffeine again. Optional.">
<cocoa key="duration"/>
</parameter>
</command>
<command name="turn off" code="LCafStop" description="Deactivate Caffeine"></command>
<!-- Classes -->
<class name="application" code="capp" description="The Papaya application.">
<cocoa class="NSApplication"/>
<property name="active" code="actv" description="Is Caffeine active?" type="boolean" access="r"><cocoa key="isCaffeineActive"/></property>
<responds-to name="turn on"><cocoa method="activateCaffeine:"/></responds-to>
<responds-to name="turn off"><cocoa method="deactivateCaffeine:"/></responds-to>
</class>
</suite>
</dictionary>