scripting.sdef 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
  3. <dictionary title="Dictionary">
  4. <!--
  5. STANDARD SUITE
  6. -->
  7. <suite name="Standard Suite" code="core" description="Common classes and commands for all applications.">
  8. <class name="application" code="capp" description="The application&apos;s top-level scripting object.">
  9. <cocoa class="BrowserCrApplication"/>
  10. <element description="The windows contained within this application, ordered front to back." type="window">
  11. <cocoa key="appleScriptWindows"/>
  12. </element>
  13. <property name="name" code="pnam" description="The name of the application." type="text" access="r"/>
  14. <property name="frontmost" code="pisf" description="Is this the frontmost (active) application?" type="boolean" access="r">
  15. <cocoa key="isActive"/>
  16. </property>
  17. <property name="version" code="vers" description="The version of the application." type="text" access="r"/>
  18. <responds-to command="open">
  19. <cocoa method="handleOpenScriptCommand:"/>
  20. </responds-to>
  21. <responds-to command="print">
  22. <cocoa method="handlePrintScriptCommand:"/>
  23. </responds-to>
  24. <responds-to command="quit">
  25. <cocoa method="handleQuitScriptCommand:"/>
  26. </responds-to>
  27. </class>
  28. <class name="window" code="cwin" description="A window.">
  29. <cocoa class="WindowAppleScript"/>
  30. <element description="The tabs contained within the window." type="tab">
  31. <cocoa key="tabs"/>
  32. </element>
  33. <!-- "given name" is the user title as set by Window: Name Window... -->
  34. <property name="given name" code="GNam" description="The given name of the window." type="text">
  35. <cocoa key="givenName"/>
  36. </property>
  37. <!-- "name" is an alias for "title" -->
  38. <property name="name" code="pnam" description="The full title of the window." type="text" access="r">
  39. <cocoa key="title"/>
  40. </property>
  41. <property name="id" code="ID " description="The unique identifier of the window." type="text" access="r">
  42. <cocoa key="uniqueID"/>
  43. </property>
  44. <property name="index" code="pidx" description="The index of the window, ordered front to back." type="integer">
  45. <cocoa key="orderedIndex"/>
  46. </property>
  47. <property name="bounds" code="pbnd" description="The bounding rectangle of the window." type="rectangle">
  48. <cocoa key="boundsAsQDRect"/>
  49. </property>
  50. <property name="closeable" code="hclb" description="Whether the window has a close box." type="boolean" access="r">
  51. <cocoa key="hasCloseBox"/>
  52. </property>
  53. <property name="minimizable" code="ismn" description="Whether the window can be minimized." type="boolean" access="r">
  54. <cocoa key="isMiniaturizable"/>
  55. </property>
  56. <property name="minimized" code="pmnd" description="Whether the window is currently minimized." type="boolean">
  57. <cocoa key="isMiniaturized"/>
  58. </property>
  59. <property name="resizable" code="prsz" description="Whether the window can be resized." type="boolean" access="r">
  60. <cocoa key="isResizable"/>
  61. </property>
  62. <property name="visible" code="pvis" description="Whether the window is currently visible." type="boolean">
  63. <cocoa key="isVisible"/>
  64. </property>
  65. <property name="zoomable" code="iszm" description="Whether the window can be zoomed." type="boolean" access="r">
  66. <cocoa key="isZoomable"/>
  67. </property>
  68. <property name="zoomed" code="pzum" description="Whether the window is currently zoomed." type="boolean">
  69. <cocoa key="isZoomed"/>
  70. </property>
  71. <property name="active tab" code="acTa" description="Returns the currently selected tab" type="tab" access="r">
  72. <cocoa key="activeTab"/>
  73. </property>
  74. <property name="mode" code="mode" description="Represents the mode of the window which can be &apos;normal&apos; or &apos;incognito&apos;, can be set only once during creation of the window." type="text">
  75. <cocoa key="mode"/>
  76. </property>
  77. <property name="active tab index" code="acTI" description="The index of the active tab." type="integer"/>
  78. <responds-to command="close">
  79. <cocoa method="handlesCloseScriptCommand:"/>
  80. </responds-to>
  81. </class>
  82. <command name="save" code="coresave" description="Save an object.">
  83. <access-group identifier="*"/>
  84. <direct-parameter description="the object to save, usually a document or window" type="specifier"/>
  85. <parameter name="in" code="kfil" description="The file in which to save the object." type="file" optional="yes">
  86. <cocoa key="File"/>
  87. </parameter>
  88. <parameter name="as" code="fltp" description="The file type in which to save the data. Can be &apos;only html&apos;, &apos;complete html&apos;, or &apos;single file&apos;; default is &apos;complete html&apos;." type="text" optional="yes">
  89. <cocoa key="FileType"/>
  90. </parameter>
  91. </command>
  92. <!--
  93. According to TN2106, 'open' should return the resulting document
  94. object. However, the Cocoa implementation does not do this yet.
  95. <result type="specifier"/>
  96. -->
  97. <command name="open" code="aevtodoc" description="Open a document.">
  98. <direct-parameter description="The file(s) to be opened.">
  99. <type type="file" list="yes"/>
  100. </direct-parameter>
  101. </command>
  102. <command name="close" code="coreclos" description="Close a window.">
  103. <access-group identifier="*"/>
  104. <cocoa class="NSCloseCommand"/>
  105. <direct-parameter description="the document(s) or window(s) to close." type="specifier"/>
  106. </command>
  107. <command name="quit" code="aevtquit" description="Quit the application.">
  108. <cocoa class="NSQuitCommand"/>
  109. </command>
  110. <command name="count" code="corecnte" description="Return the number of elements of a particular class within an object.">
  111. <cocoa class="NSCountCommand"/>
  112. <access-group identifier="*"/>
  113. <direct-parameter description="the object whose elements are to be counted" type="specifier"/>
  114. <parameter name="each" code="kocl" description="The class of objects to be counted." type="type" optional="yes">
  115. <cocoa key="ObjectClass"/>
  116. </parameter>
  117. <result description="the number of elements" type="integer"/>
  118. </command>
  119. <command name="delete" code="coredelo" description="Delete an object.">
  120. <cocoa class="NSDeleteCommand"/>
  121. <access-group identifier="*"/>
  122. <direct-parameter description="the object to delete" type="specifier"/>
  123. </command>
  124. <command name="duplicate" code="coreclon" description="Copy object(s) and put the copies at a new location.">
  125. <cocoa class="NSCloneCommand"/>
  126. <access-group identifier="*"/>
  127. <direct-parameter description="the object(s) to duplicate" type="specifier"/>
  128. <parameter name="to" code="insh" description="The location for the new object(s)." type="location specifier" optional="yes">
  129. <cocoa key="ToLocation"/>
  130. </parameter>
  131. <parameter name="with properties" code="prdt" description="Properties to be set in the new duplicated object(s)." type="record" optional="yes">
  132. <cocoa key="WithProperties"/>
  133. </parameter>
  134. <result description="the duplicated object(s)" type="specifier"/>
  135. </command>
  136. <command name="exists" code="coredoex" description="Verify if an object exists.">
  137. <cocoa class="NSExistsCommand"/>
  138. <access-group identifier="*"/>
  139. <direct-parameter description="the object in question" type="any"/>
  140. <result description="true if it exists, false if not" type="boolean"/>
  141. </command>
  142. <command name="make" code="corecrel" description="Make a new object.">
  143. <cocoa class="NSCreateCommand"/>
  144. <access-group identifier="*"/>
  145. <parameter name="new" code="kocl" description="The class of the new object." type="type">
  146. <cocoa key="ObjectClass"/>
  147. </parameter>
  148. <parameter name="at" code="insh" description="The location at which to insert the object." type="location specifier" optional="yes">
  149. <cocoa key="Location"/>
  150. </parameter>
  151. <parameter name="with data" code="data" description="The initial contents of the object." type="any" optional="yes">
  152. <cocoa key="ObjectData"/>
  153. </parameter>
  154. <parameter name="with properties" code="prdt" description="The initial values for properties of the object." type="record" optional="yes">
  155. <cocoa key="KeyDictionary"/>
  156. </parameter>
  157. <result description="to the new object" type="specifier"/>
  158. </command>
  159. <command name="move" code="coremove" description="Move object(s) to a new location.">
  160. <cocoa class="NSMoveCommand"/>
  161. <access-group identifier="*"/>
  162. <direct-parameter description="the object(s) to move" type="specifier"/>
  163. <parameter name="to" code="insh" description="The new location for the object(s)." type="location specifier">
  164. <cocoa key="ToLocation"/>
  165. </parameter>
  166. <result description="the moved object(s)" type="specifier"/>
  167. </command>
  168. <command name="print" code="aevtpdoc" description="Print an object.">
  169. <!-- type would be better written as "file | document". -->
  170. <direct-parameter description="The file(s) or document(s) to be printed." type="specifier"/>
  171. </command>
  172. </suite>
  173. <!--
  174. CHROMIUM SUITE
  175. -->
  176. <suite name="Chromium Suite" code="CrSu" description="Common classes and commands for Chrome.">
  177. <class-extension description="The application&apos;s top-level scripting object." extends="application">
  178. <cocoa class="BrowserCrApplication"/>
  179. <element description="Contains the bookmarks bar and other bookmarks folder." type="bookmark folder" access="r">
  180. <cocoa key="bookmarkFolders"/>
  181. </element>
  182. <property name="bookmarks bar" code="ChBB" description="The bookmarks bar bookmark folder." type="bookmark folder" access="r">
  183. <cocoa key="bookmarksBar"/>
  184. </property>
  185. <property name="other bookmarks" code="ChOB" description="The other bookmarks bookmark folder." type="bookmark folder" access="r">
  186. <cocoa key="otherBookmarks"/>
  187. </property>
  188. </class-extension>
  189. <class name="tab" code="CrTb" description="A tab.">
  190. <cocoa class="TabAppleScript"/>
  191. <property name="id" code="ID " description="Unique ID of the tab." type="text" access="r">
  192. <cocoa key="uniqueID"/>
  193. </property>
  194. <property name="title" code="pnam" description="The title of the tab." type="text" access="r"/>
  195. <property name="URL" code="URL " description="The url visible to the user." type="text"/>
  196. <property name="loading" code="ldng" description="Is loading?" type="boolean" access="r"/>
  197. <responds-to command="undo">
  198. <cocoa method="handlesUndoScriptCommand:"/>
  199. </responds-to>
  200. <responds-to command="redo">
  201. <cocoa method="handlesRedoScriptCommand:"/>
  202. </responds-to>
  203. <responds-to command="cut selection">
  204. <cocoa method="handlesCutScriptCommand:"/>
  205. </responds-to>
  206. <responds-to command="copy selection">
  207. <cocoa method="handlesCopyScriptCommand:"/>
  208. </responds-to>
  209. <responds-to command="paste selection">
  210. <cocoa method="handlesPasteScriptCommand:"/>
  211. </responds-to>
  212. <responds-to command="select all">
  213. <cocoa method="handlesSelectAllScriptCommand:"/>
  214. </responds-to>
  215. <responds-to command="go back">
  216. <cocoa method="handlesGoBackScriptCommand:"/>
  217. </responds-to>
  218. <responds-to command="go forward">
  219. <cocoa method="handlesGoForwardScriptCommand:"/>
  220. </responds-to>
  221. <responds-to command="reload">
  222. <cocoa method="handlesReloadScriptCommand:"/>
  223. </responds-to>
  224. <responds-to command="stop">
  225. <cocoa method="handlesStopScriptCommand:"/>
  226. </responds-to>
  227. <responds-to command="print">
  228. <cocoa method="handlesPrintScriptCommand:"/>
  229. </responds-to>
  230. <responds-to command="view source">
  231. <cocoa method="handlesViewSourceScriptCommand:"/>
  232. </responds-to>
  233. <responds-to command="save">
  234. <cocoa method="handlesSaveScriptCommand:"/>
  235. </responds-to>
  236. <responds-to command="close">
  237. <cocoa method="handlesCloseScriptCommand:"/>
  238. </responds-to>
  239. <responds-to command="execute">
  240. <cocoa method="handlesExecuteJavascriptScriptCommand:"/>
  241. </responds-to>
  242. </class>
  243. <class name="bookmark folder" code="CrBF" description="A bookmarks folder that contains other bookmarks folder and bookmark items.">
  244. <cocoa class="BookmarkFolderAppleScript"/>
  245. <element description="The bookmark folders present within." type="bookmark folder">
  246. <cocoa key="bookmarkFolders"/>
  247. </element>
  248. <element description="The bookmarks present within." type="bookmark item">
  249. <cocoa key="bookmarkItems"/>
  250. </element>
  251. <property name="id" code="ID " description="Unique ID of the bookmark folder." type="text" access="r">
  252. <cocoa key="uniqueID"/>
  253. </property>
  254. <property name="title" code="pnam" description="The title of the folder." type="text"/>
  255. <property name="index" code="pidx" description="Returns the index with respect to its parent bookmark folder." type="number" access="r">
  256. <cocoa key="index"/>
  257. </property>
  258. </class>
  259. <class name="bookmark item" code="CrBI" description="An item consists of an URL and the title of a bookmark">
  260. <cocoa class="BookmarkItemAppleScript"/>
  261. <property name="id" code="ID " description="Unique ID of the bookmark item." type="text" access="r">
  262. <cocoa key="uniqueID"/>
  263. </property>
  264. <property name="title" code="pnam" description="The title of the bookmark item." type="text"/>
  265. <property name="URL" code="URL " description="The URL of the bookmark." type="text"/>
  266. <property name="index" code="pidx" description="Returns the index with respect to its parent bookmark folder." type="number" access="r">
  267. <cocoa key="index"/>
  268. </property>
  269. </class>
  270. <command name="reload" code="CrSuRlod" description="Reload a tab.">
  271. <direct-parameter description="The tab to execute the command in." type="specifier"/>
  272. </command>
  273. <command name="go back" code="CrSuBack" description="Go Back (If Possible).">
  274. <direct-parameter description="The tab to execute the command in." type="specifier"/>
  275. </command>
  276. <command name="go forward" code="CrSuFwd " description="Go Forward (If Possible).">
  277. <direct-parameter description="The tab to execute the command in." type="specifier"/>
  278. </command>
  279. <command name="select all" code="CrSuSlAl" description="Select all.">
  280. <direct-parameter description="The tab to execute the command in." type="specifier"/>
  281. </command>
  282. <command name="cut selection" code="CrSuCut " description="Cut selected text (If Possible).">
  283. <direct-parameter description="The tab to execute the command in." type="specifier"/>
  284. </command>
  285. <command name="copy selection" code="CrSuCop " description="Copy text.">
  286. <direct-parameter description="The tab to execute the command in." type="specifier"/>
  287. </command>
  288. <command name="paste selection" code="CrSuPast" description="Paste text (If Possible).">
  289. <direct-parameter description="The tab to execute the command in." type="specifier"/>
  290. </command>
  291. <command name="undo" code="CrSuUndo" description="Undo the last change.">
  292. <direct-parameter description="The tab to execute the command in." type="specifier"/>
  293. </command>
  294. <command name="redo" code="CrSuRedo" description="Redo the last change.">
  295. <direct-parameter description="The tab to execute the command in." type="specifier"/>
  296. </command>
  297. <command name="stop" code="CrSustop" description="Stop the current tab from loading.">
  298. <direct-parameter description="The tab to execute the command in." type="specifier"/>
  299. </command>
  300. <command name="view source" code="CrSuVSrc" description="View the HTML source of the tab.">
  301. <direct-parameter description="The tab to execute the command in." type="specifier"/>
  302. </command>
  303. <command name="execute" code="CrSuExJa" description="Execute a piece of javascript.">
  304. <direct-parameter description="The tab to execute the command in." type="specifier"/>
  305. <parameter name="javascript" code="JvSc" description="The javascript code to execute." type="text">
  306. <cocoa key="javascript"/>
  307. </parameter>
  308. <result type="any"/>
  309. </command>
  310. </suite>
  311. </dictionary>