<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd"
[
<!ELEMENT class (cocoa?, access-group*, type?, (contents | documentation | element | property | responds-to | synonym | xref)*)>
]>
<dictionary xmlns:xi="http://www.w3.org/2003/XInclude" title="Retrobatch Terminology">
    <xi:include href="file:///System/Library/ScriptingDefinitions/CocoaStandard.sdef" xpointer="xpointer(/dictionary/suite)" />

	<suite name="Retrobatch Suite" code="RbCh" description="Classes just for the Retrobatch application.">
		
		<class name="application" code="capp" inherits="application" description="Retrobatch's top level scripting object.">
		
			<cocoa class="OTApplication"/>
			
            <responds-to command="do JavaScript">
				<cocoa method="scriptingDoJavaScript:"/>
			</responds-to>
			<responds-to command="set preference">
				<cocoa method="scriptingSetPref:"/>
            </responds-to>
            
            <responds-to command="execute">
                <cocoa method="handleExecuteWorkflowCommand:"/>
            </responds-to>
            
		</class>
        
		<class name="document" code="docu" inherits="document" description="A Retrobatch document">
			<cocoa class="OTDocument"/>
            
            <responds-to command="execute">
                <cocoa method="handleExecuteCommand:"/>
            </responds-to>
            
            <element type="asset" access="r">
                <cocoa key="scriptingAssets"/>
            </element>
		</class>
        
        
        <class name="asset" code="RBas" description="A Retrobatch image" inherits="item">
            <cocoa class="OTAsset" />
            
            <property name="id" code="ID  " type="text" access="r" description="The unique identifier of the asset.">
                <cocoa key="uniqueID"/>
            </property>
            
            <property name="name" code="pnam" type="text" description="The output name of the asset." access="rw">
                <cocoa key="outputFileName"/>
            </property>
            
            <property name="color model" code="cmod" type="text" description="The color model of the asset. RGB, CMYK, Gray, etc." access="r">
                <cocoa key="colorModel"/>
            </property>
            
            <property name="bits per component" code="bpco" type="integer" description="The bits per component of the image." access="r">
                <cocoa key="bitsPerComponent"/>
            </property>
            
            <property name="uti" code="utid" type="text" description="The uti of the image." access="rw">
                <cocoa key="uti"/>
            </property>
            
            <property name="width" code="widt" type="integer" description="The width of the image." access="r">
                <cocoa key="imageWidth"/>
            </property>
            
            <property name="height" code="heig" type="integer" description="The height of the image." access="r">
                <cocoa key="imageHeight"/>
            </property>
            
            <property name="has alpha" code="halp" type="boolean" description="Boolean value indicating whether or not the image has an alpha channel." access="r">
                <cocoa key="hasAlphaChannel"/>
            </property>
            
            <property name="color profile name" code="cpnm" type="text" description="The name of the image's color profile." access="r">
                <cocoa key="colorProfileName"/>
            </property>
            
            <property name="mega pixels" code="mpix" type="real" description="The number of megapixels in the image." access="r">
                <cocoa key="imageMegaPixels"/>
            </property>
            
            <property name="type" code="ityp" type="text" description="The type of image." access="r">
                <cocoa key="imageTypeRuleName"/>
            </property>
            
            <property name="dpi" code="dpii" type="integer" description="The dots per inch of the image." access="r">
                <cocoa key="dpi"/>
            </property>
            
            <property name="url" code="furl" type="file" description="The last known URL for this asset." access="r">
                <cocoa key="url"/>
            </property>
            
            <property name="file path" code="fpth" type="text" description="The last known file path for this asset." access="r">
                <cocoa key="filePath"/>
            </property>
            
            
        </class>
        
        <command name="execute" code="Exeecute" description="Execute a workflow.">
            
            <direct-parameter description="The document to run" type="document" optional="yes">
                <cocoa key="document"/>
            </direct-parameter>
            
            <parameter name="workflow path" code="wfpt" description="Path to the workflow to use." optional="yes">
                <cocoa key="inputWorkflowPath"/>
                <type type="file" list="no"/>
            </parameter>
            
            <parameter name="input items" code="inpt" description="Images and folders of images to input to the top node." optional="yes">
                <cocoa key="inputFolder"/>
                <type type="file" list="yes"/>
            </parameter>
            
            <parameter name="output folder" code="oupt" description="The folder to write to." type="file" optional="yes">
                <cocoa key="outputFolder"/>
            </parameter>
            
        </command>
        
        <!--
        <command name="execute workflow" code="ExcuteWF" description="Execute a workflow at a path">
            
            <parameter name="workflow path" code="wfpt" description="Path to the workflow to use." optional="no">
                <cocoa key="inputWorkflowPath"/>
                <type type="file" list="no"/>
            </parameter>
            
            <parameter name="input items" code="inpt" description="Images and folders of images to input to the top node." optional="yes">
                <cocoa key="inputFolder"/>
                <type type="file" list="yes"/>
            </parameter>
            
            <parameter name="output folder" code="oupt" description="The folder to write to." type="file" optional="yes">
                <cocoa key="outputFolder"/>
            </parameter>
            
        </command>
        -->
        
		<command name="do JavaScript" code="sfridojs" description="Applies a string of JavaScript (or Cocoa Script) code to a document.">
			<direct-parameter description="The JavaScript code to evaluate." type="text"/>
			<parameter hidden="yes" name="in" code="dcnm" description="The document that the JavaScript should be evaluated in." type="document" optional="yes">
				<cocoa key="in"/>
			</parameter>
			<parameter hidden="yes" name="with file" code="file" description="A path (String or Alias) to the the file to execute." type="file" optional="yes">
				<cocoa key="file"/>
			</parameter>
			<result>
				<type type="any"/>
				<type type="text"/>
				<type type="real"/>
				<type type="integer"/>
			</result>
		</command>
		
	</suite>
</dictionary>
