-
Notifications
You must be signed in to change notification settings - Fork 226
/
SComic.sdef
281 lines (281 loc) · 13.4 KB
/
SComic.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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
<!--
This is Foundation Kit's NSCoreSuite terminology recast as an sdef. NSCoreSuite
is itself AppleScript's Standard Suite recast as a plist instead of the original
aete. There are several differences between the original Standard Suite and
Cocoa's version of it, and not all of them are correct: these places are noted
with "supposed to" comments.
-->
<dictionary title="Standard Terminology">
<suite name="Standard Suite" code="????" description="Common classes and commands for most applications.">
<cocoa name="NSCoreSuite"/>
<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>
<class name="item" code="cobj" description="A scriptable object.">
<cocoa class="AbstractObject"/>
<property name="class" code="pcls" description="The class of the object." type="type" access="r">
<cocoa key="classCode"/>
</property>
<property name="properties" code="pALL" description="All of the object's properties." type="record">
<cocoa key="scriptingProperties"/>
</property>
<!--
The blank method declarations are needed to emulate the existing
NSCoreSuite.scriptSuite.framework. Ordinarily, you wouldn't do this.
-->
<responds-to command="count">
<cocoa method=""/>
</responds-to>
<responds-to command="delete">
<cocoa method=""/>
</responds-to>
<responds-to command="duplicate">
<cocoa method=""/>
</responds-to>
<responds-to command="exists">
<cocoa method=""/>
</responds-to>
<responds-to command="get">
<cocoa method=""/>
</responds-to>
<responds-to command="move">
<cocoa method=""/>
</responds-to>
<responds-to command="set">
<cocoa method=""/>
</responds-to>
</class>
<class name="application" code="capp" description="An application's top level scripting object.">
<cocoa class="NSApplication"/>
<element type="document" access="r">
<cocoa key="orderedDocuments"/>
</element>
<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 command="open">
<cocoa method="handleOpenScriptCommand:"/>
</responds-to>
<responds-to command="print">
<cocoa method="handlePrintScriptCommand:"/>
</responds-to>
<responds-to command="quit">
<cocoa method="handleQuitScriptCommand:"/>
</responds-to>
</class>
<class name="color" code="colr" description="A color.">
<cocoa class="NSColor"/>
</class>
<class name="document" code="docu" description="A document.">
<cocoa class="NSDocument"/>
<property name="path" code="ppth" description="The document's path." type="text">
<cocoa key="fileName"/>
</property>
<property name="modified" code="imod" description="Has the document been modified since the last save?" type="boolean" access="r">
<cocoa key="isDocumentEdited"/>
</property>
<property name="name" code="pnam" description="The document's name." type="text">
<cocoa key="lastComponentOfFileName"/>
</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>
<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">
<cocoa key="title"/>
</property>
<property name="id" code="ID " description="The unique identifier of the window." type="number" access="r">
<cocoa key="uniqueID"/>
</property>
<property name="bounds" code="pbnd" description="The bounding rectangle of the window." type="rectangle">
<cocoa key="boundsAsQDRect"/>
</property>
<property name="document" code="docu" description="The document whose contents are being displayed in the window." type="document" access="r"/>
<property name="closeable" code="hclb" description="Whether the window has a close box." type="boolean" access="r">
<cocoa key="hasCloseBox"/>
</property>
<property name="titled" code="ptit" description="Whether the window has a title bar." type="boolean" access="r">
<cocoa key="hasTitleBar"/>
</property>
<!-- the type is supposed to be "integer" -->
<property name="index" code="pidx" description="The index of the window in the back-to-front window ordering." type="number">
<cocoa key="orderedIndex"/>
</property>
<property name="floating" code="isfl" description="Whether the window floats." type="boolean" access="r">
<cocoa key="isFloatingPanel"/>
</property>
<property name="miniaturizable" code="ismn" description="Whether the window can be miniaturized." type="boolean" access="r">
<cocoa key="isMiniaturizable"/>
</property>
<property name="miniaturized" code="pmnd" description="Whether the window is currently miniaturized." type="boolean">
<cocoa key="isMiniaturized"/>
</property>
<property name="modal" code="pmod" description="Whether the window is the application's current modal window." type="boolean" access="r">
<cocoa key="isModalPanel"/>
</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 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>
<!-- The old Standard Suite: run, reopen, open, print, and quit. -->
<command name="open" code="aevtodoc" description="Open an object.">
<direct-parameter description="The file(s) to be opened." type="file"/>
</command>
<!-- NSCoreSuite doesn't define these.
<command name="run" code="aevtoapp" description="Run an application. Most applications will open an empty, untitled window."/>
<command name="reopen" code="aevtrapp" description="Reactivate a running application. Some applications will open a new untitled window if no window is open."/>
-->
<command name="print" code="aevtpdoc" description="Print an object.">
<!-- type would be better written as "file | document". -->
<direct-parameter description="The file(s) or document(s) to be printed." type="file"/>
</command>
<command name="quit" code="aevtquit" description="Quit an application.">
<cocoa class="NSQuitCommand"/>
<parameter name="saving" code="savo" description="Specifies whether changes should be saved before quitting." type="save options" optional="yes">
<cocoa key="SaveOptions"/>
</parameter>
</command>
<!-- The old Core Suite: the object model commands, plus a few more. -->
<command name="close" code="coreclos" description="Close an object.">
<cocoa class="NSCloseCommand"/>
<direct-parameter description="the object to close" type="specifier"/>
<parameter name="saving" code="savo" description="Specifies whether changes should be saved before closing." type="save options" optional="yes">
<cocoa key="SaveOptions"/>
</parameter>
<parameter name="saving in" code="kfil" description="The file in which to save the object." type="file" optional="yes">
<cocoa key="File"/>
</parameter>
</command>
<command name="count" code="corecnte" description="Return the number of elements of a particular class within an object.">
<cocoa class="NSCountCommand"/>
<direct-parameter description="the object whose elements are to be counted" type="specifier"/>
<parameter name="each" code="kocl" description="The class of objects to be counted." type="type" optional="yes">
<cocoa key="ObjectClass"/>
</parameter>
<result description="the number of elements" type="integer"/>
</command>
<command name="delete" code="coredelo" description="Delete an object.">
<cocoa class="NSDeleteCommand"/>
<direct-parameter description="the object to delete" type="specifier"/>
</command>
<command name="duplicate" code="coreclon" description="Copy object(s) and put the copies at a new location.">
<cocoa name="Copy" class="NSCloneCommand"/>
<direct-parameter description="the object(s) to duplicate" type="specifier"/>
<!-- "duplicate" is supposed to return the new objects.
<result type="object" description="to the duplicated object(s)"/>
-->
<!-- "to" is supposed to be optional. -->
<parameter name="to" code="insh" description="The location for the new object(s)." type="location specifier">
<cocoa key="ToLocation"/>
</parameter>
<parameter name="with properties" code="prdt" description="Properties to be set in the new duplicated object(s)." type="record" optional="yes">
<cocoa key="WithProperties"/>
</parameter>
</command>
<command name="exists" code="coredoex" description="Verify if an object exists.">
<cocoa class="NSExistsCommand"/>
<direct-parameter description="the object in question" type="specifier"/>
<result description="true if it exists, false if not" type="boolean"/>
</command>
<!-- "get" is supposed to be hidden. -->
<command name="get" code="coregetd" description="Get the data for an object.">
<cocoa class="NSGetCommand"/>
<direct-parameter type="specifier"/>
<result type="any"/>
</command>
<command name="make" code="corecrel" description="Make a new object.">
<cocoa name="Create" class="NSCreateCommand"/>
<parameter name="new" code="kocl" description="The class of the new object." type="type">
<cocoa key="ObjectClass"/>
</parameter>
<parameter name="at" code="insh" description="The location at which to insert the object." type="location specifier" optional="yes">
<cocoa key="Location"/>
</parameter>
<parameter name="with data" code="data" description="The initial data for the object." type="any" optional="yes">
<cocoa key="ObjectData"/>
</parameter>
<parameter name="with properties" code="prdt" description="The initial values for properties of the object." type="record" optional="yes">
<cocoa key="KeyDictionary"/>
</parameter>
<result description="to the new object" type="specifier"/>
</command>
<command name="move" code="coremove" description="Move object(s) to a new location.">
<cocoa class="NSMoveCommand"/>
<direct-parameter description="the object(s) to move" type="specifier"/>
<!-- "move" is supposed to return the relocated objects.
<result type="object" description="to the object(s) after they have been moved"/>
-->
<parameter name="to" code="insh" description="The new location for the object(s)." type="location specifier">
<cocoa key="ToLocation"/>
</parameter>
</command>
<command name="save" code="coresave" description="Save an object.">
<direct-parameter description="the object to save, usually a document or window" type="specifier"/>
<parameter name="in" code="kfil" description="The file in which to save the object." type="file" optional="yes">
<cocoa key="File"/>
</parameter>
<parameter name="as" code="fltp" description="The file type in which to save the data." type="text" optional="yes">
<cocoa key="FileType"/>
</parameter>
</command>
<!-- "set" is supposed to be hidden. -->
<command name="set" code="coresetd" description="Set an object's data.">
<cocoa class="NSSetCommand"/>
<direct-parameter type="specifier"/>
<!-- "set" is supposed to return the fully evaluated "to" data.
<result type="any"/>
-->
<parameter name="to" code="data" description="The new value." type="any">
<cocoa key="Value"/>
</parameter>
</command>
</suite>
<suite name="Simple Comic Suite" code="DTSC" description="AppleScripting suite for the application Simple Comic">
<class name="page" code="SCpg" description="A Simple Comic page">
<cocoa class="TSSTPage"/>
</class>
<class name="group" code="SCgp" description="A Simple Comic logical page group. These encompase archives, pdf documents and folders.">
<cocoa class="TSSTManagedGroup"/>
<element type="page"/>
</class>
<class name="session" code="SCsc" description="A Simple Comic session comprised of several groups in viewed in a single window">
<cocoa class="TSSTManagedSession"/>
<element type="group"/>
</class>
</suite>
</dictionary>