<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">

<dictionary title="iTerm2 Terminology">
  <suite name="Standard Suite" code="????" description="Common classes and commands for all applications."> 
    <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> 
    <command name="count" code="corecnte" 
      description="Return the number of elements of a particular class within an object."> 
      <cocoa class="NSCountCommand"/> 
      <direct-parameter type="specifier" 
        description="the object whose elements are to be counted"/> 
      <parameter name="each" code="kocl" type="type" optional="yes" 
        description="The class of objects to be counted."> 
        <cocoa key="ObjectClass"/> 
      </parameter> 
      <result type="integer" description="the number of elements"/> 
    </command> 
    <command name="delete" code="coredelo" description="Delete an object."> 
      <cocoa class="NSDeleteCommand"/> 
      <direct-parameter type="specifier" description="the object to delete"/> 
    </command> 
    <command name="duplicate" code="coreclon" 
      description="Copy object(s) and put the copies at a new location."> 
      <cocoa class="NSCloneCommand"/> 
      <direct-parameter type="specifier" 
        description="the object(s) to duplicate"/> 
      <parameter name="to" code="insh" type="location specifier" 
        description="The location for the new object(s)."> 
        <cocoa key="ToLocation"/> 
      </parameter> 
      <parameter name="with properties" code="prdt" type="record" optional="yes"
        description="Properties to be set in the new duplicated object(s)."> 
        <cocoa key="WithProperties"/> 
      </parameter> 
    </command> 
    <command name="exists" code="coredoex" description="Verify if an object exists."> 
      <cocoa class="NSExistsCommand"/> 
      <direct-parameter type="specifier" description="the object in question"/> 
      <result type="boolean" description="true if it exists, false if not"/> 
    </command> 
    <command name="make" code="corecrel" description="Make a new object."> 
      <cocoa class="NSCreateCommand"/> 
      <parameter name="new" code="kocl" type="type" 
        description="The class of the new object."> 
        <cocoa key="ObjectClass"/> 
      </parameter> 
      <parameter name="at" code="insh" type="location specifier" optional="yes" 
        description="The location at which to insert the object."> 
        <cocoa key="Location"/> 
      </parameter> 
      <parameter name="with data" code="data" type="any" optional="yes" 
        description="The initial contents of the object."> 
        <cocoa key="ObjectData"/> 
      </parameter> 
      <parameter name="with properties" code="prdt" type="record" optional="yes" 
        description="The initial values for properties of the object."> 
        <cocoa key="KeyDictionary"/> 
      </parameter> 
      <result type="specifier" description="to the new object"/> 
    </command> 
    <command name="move" code="coremove" 
      description="Move object(s) to a new location."> 
      <cocoa class="NSMoveCommand"/> 
      <direct-parameter type="specifier" description="the object(s) to move"/> 
      <parameter name="to" code="insh" type="location specifier" 
        description="The new location for the object(s)."> 
        <cocoa key="ToLocation"/> 
      </parameter> 
    </command> 
    <class name="application" code="capp"
        description="The application's top-level scripting object.">
      <cocoa class="iTermApplication"/>
      <property name="current window" code="Crwn" type="window"
        description="The frontmost window">
        <cocoa key="currentScriptingWindow" />
      </property>

      <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 frontmost (active) application?"> 
        <cocoa key="isActive"/> 
      </property> 
      <property name="version" code="vers" type="text" access="r" 
        description="The version of the application."/> 
      <element type="window" access="r"> 
        <cocoa key="orderedScriptingWindows"/> 
      </element> 
    </class> 
    <class name="window" code="cwin" description="A window."> 
      <cocoa class="iTermScriptingWindow"/>
      <!-- Prior to 3.0.4, id was a string with code "ID  " that had a value like "window-1" which
       coincides with the unique identifier used in a window's object specifier. Issue 4825 points 
       out this is problematic because integral window IDs are useful as arguments to 
       screencapture -l. So the old id is now available as "alternate identifier" and id is now the
       standard integer value. -->
      <property name="id" code="ID  " description="The unique identifier of the session." type="integer" access="r">
        <cocoa key="uniqueID"/>
      </property>
      <property name="alternate identifier" code="Twid" description="The alternate unique identifier of the session." type="text" access="r">
          <cocoa key="windowIdentifier"/>
      </property>
      <property name="name" code="pnam" type="text" access="r"
        description="The full title of the window."> 
        <cocoa key="title"/> 
      </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="Whether the window has a close box."> 
        <cocoa key="hasCloseBox"/> 
      </property> 
      <property name="miniaturizable" code="ismn" type="boolean" access="r" 
        description="Whether the window can be minimized."> 
        <cocoa key="isMiniaturizable"/> 
      </property> 
      <property name="miniaturized" code="pmnd" type="boolean" 
        description="Whether the window is currently minimized."> 
        <cocoa key="isMiniaturized"/> 
      </property> 
      <property name="resizable" code="prsz" type="boolean" access="r" 
        description="Whether the window can be resized."> 
        <cocoa key="isResizable"/> 
      </property> 
      <property name="visible" code="pvis" type="boolean" 
        description="Whether the window is currently visible."> 
        <cocoa key="isVisible"/> 
      </property> 
      <property name="zoomable" code="iszm" type="boolean" access="r" 
        description="Whether the window can be zoomed."> 
        <cocoa key="isZoomable"/> 
      </property> 
      <property name="zoomed" code="pzum" type="boolean" 
        description="Whether the window is currently zoomed."> 
        <cocoa key="isZoomed"/> 
      </property>
      <property name="frontmost" description="Whether the window is currently the frontmost window." code="pisf" type="boolean">
        <cocoa key="scriptFrontmost"/>
      </property>
      <responds-to command="close"> 
        <cocoa method="handleCloseScriptCommand:"/> 
      </responds-to> 

      <!-- iTerm2 -->
      <responds-to command="select">
        <cocoa method="handleSelectCommand:"/>
      </responds-to>

      <responds-to command="create tab with default profile">
        <cocoa method="handleCreateTabWithDefaultProfileCommand:" />
      </responds-to>

      <responds-to command="create tab">
        <cocoa method="handleCreateTabCommand:" />
      </responds-to>

      <element type="tab" access="r">
        <cocoa key="tabs" />
      </element>

      <property name="current tab" code="Crtb" type="tab"
          description="The currently selected tab">
        <cocoa key="currentTab" />
      </property>

      <property name="current session" code="Wcsn" type="session"
          description="The current session in a window">
        <cocoa key="currentSession" />
      </property>

      <property name="is hotkey window" code="ihkw" type="boolean"
          description="Whether the window is a hotkey window.">
          <cocoa key="isHotkeyWindow"/>
      </property>

      <property name="hotkey window profile" code="hkwp" type="text"
          description="If the window is a hotkey window, this gives the name of the profile that created the window. ">
          <cocoa key="hotkeyWindowProfile"/>
      </property>

      <responds-to command="reveal hotkey window">
        <cocoa method="handleRevealHotkeyWindowCommand:"/>
      </responds-to>

      <responds-to command="hide hotkey window">
        <cocoa method="handleHideHotkeyWindowCommand:"/>
      </responds-to>

      <responds-to command="toggle hotkey window">
        <cocoa method="handleToggleHotkeyWindowCommand:"/>
      </responds-to>

      <!-- compatibility -->
      <property name="position" description="The position of the window, relative to the upper left corner of the screen." code="ppos" type="point">
        <cocoa key="scriptPosition" />
        <documentation>
          <html>
            <![CDATA[
            <i>Deprecated; use bounds instead.</i>
            ]]>
          </html>
        </documentation>
      </property>
      <property name="origin" description="The position of the window, relative to the lower left corner of the screen." code="pori" type="point">
        <cocoa key="scriptOrigin" />
        <documentation>
          <html>
            <![CDATA[
            <i>Deprecated; use bounds instead.</i>
            ]]>
          </html>
        </documentation>
      </property>
      <property name="size" description="The width and height of the window" code="psiz" type="point">
        <cocoa key="scriptSize" />
        <documentation>
          <html>
            <![CDATA[
            <i>Deprecated; use bounds instead.</i>
            ]]>
          </html>
        </documentation>
      </property>
      <property name="frame" description="The bounding rectangle, relative to the lower left corner of the screen." code="pfra" type="rectangle">
        <cocoa key="scriptFrame" />
        <documentation>
          <html>
            <![CDATA[
            <i>Deprecated; use bounds instead.</i>
            ]]>
          </html>
        </documentation>
      </property>
    </class> 
  </suite> 

  <suite name="iTerm2 Suite" code="Itrm" description="Classes just for the iTerm2 application.">
    <command name="close" code="coreclos" description="Close a document.">
      <cocoa class="NSCloseCommand"/>
      <direct-parameter type="specifier"
        description="the session, tab, or window to close."/>
    </command>

    <command name="request cookie" code="Itrmrqck" description="Request a Python API cookie">
        <cocoa class="iTermRequestCookieCommand" />
        <parameter name="and key for app named" code="Rcsn" type="text" optional="yes"
            description="Name of script using the cookie. This is shown in the console.">
            <cocoa key="appName"/>
        </parameter>
        <result type="text"
          description="A cookie that can be used to connect to the Python API endpoint" />
    </command>

    <command name="create tab" code="Itrmntwp"
      description="Create a new tab">
      <direct-parameter type="specifier"
        description="the session, tab, or window to close."/>

      <parameter name="with profile" code="Ntwp" type="text"
          description="The profile name">
        <cocoa key="profile" />
      </parameter>

      <parameter name="command" code="Nwcm" type="text" optional="yes"
        description="Shell command to run">
        <cocoa key="command"/>
      </parameter>

      <result type="tab" description="The tab that was created" />
    </command>

    <command name="create tab with default profile" code="Itrmntwn"
      description="Create a new tab with the default profile">
      <direct-parameter type="specifier"
        description="The window in which to create a new tab"/>

      <parameter name="command" code="Nwcm" type="text" optional="yes"
        description="Shell command to run">
        <cocoa key="command"/>
      </parameter>

      <result type="tab" description="The tab that was created" />
    </command>

    <command name="create window with profile" code="Itrmnwwp"
      description="Create a new window">
      <cocoa class="iTermNewWindowCommand" />
      <direct-parameter description="The profile name">
        <type type="text"/>
      </direct-parameter>

      <parameter name="command" code="Nwcm" type="text" optional="yes"
        description="Shell command to run">
        <cocoa key="command"/>
      </parameter>

      <result type="window" description="The window that was created"/>
    </command>

    <command name="create hotkey window with profile" code="Itrmnhwp"
      description="Create a hotkey window">
      <cocoa class="iTermNewHotkeyWindowCommand" />
      <direct-parameter description="The profile name">
        <type type="text"/>
      </direct-parameter>

      <result type="window" description="The window that was created"/>
    </command>

    <command name="launch API script named" code="Itrmlasn"
        description="Launch API script by name">
        <cocoa class="iTermLaunchAPIScriptCommand" />
        <direct-parameter description="The script’s name">
            <type type="text"/>
        </direct-parameter>
        <parameter name="arguments" code="Asar" optional="yes"
          description="Arguments to pass to script">
          <cocoa key="arguments"/>
          <type type="text" list="yes"/>
        </parameter>
    </command>

    <command name="invoke API expression" code="Itrmiaex"
        description="Invokes an expression, such as a registered function.">
        <cocoa class="iTermInvokeAPIExpressionCommand" />
        <direct-parameter description="The expression to invoke, such as a function call.">
            <type type="text"/>
        </direct-parameter>
        <result type="text" description="String representation of the result, if available. Function calls’ return values are not available." />
    </command>

    <command name="create window with default profile" code="Itrmnwwn"
      description="Create a new window with the default profile">
      <cocoa class="iTermNewWindowCommand" />

      <parameter name="command" code="Nwcm" type="text" optional="yes"
        description="Shell command to run">
        <cocoa key="command"/>
      </parameter>
      <result type="window" description="The window that was created"/>
    </command>

    <command name="write" code="Itrmsntx"
        description="Send text as though it was typed.">
      <direct-parameter type="specifier" description="The session to send to"/>

      <parameter name="contents of file" code="Cofl" type="file"
          description="Filename to send the contents of" optional="yes">
        <cocoa key="contentsOfFile"/>
      </parameter>
      <parameter name="text" code="Text" type="text"
          description="Text to send" optional="yes">
        <cocoa key="text"/>
      </parameter>
      <parameter name="newline" code="Wtnl" type="boolean"
          description="If newline should be added to end of text (default: yes)" optional="yes">
        <cocoa key="newline"/>
      </parameter>
    </command>

    <command name="select" code="Itrmslct"
        description="Make receiver visible and selected.">
      <direct-parameter type="specifier" description="The object to send to"/>
    </command>

    <command name="split vertically" code="Itrmsplv"
        description="Split a session vertically.">
      <direct-parameter type="specifier" description="The object to send to"/>
      <parameter name="with profile" code="Prfl" type="text"
          description="Name of profile for new session.">
        <cocoa key="profile" />
      </parameter>
      <parameter name="command" code="Nwcm" type="text" optional="yes"
          description="Shell command to run">
          <cocoa key="command"/>
      </parameter>
      <result type="session" description="The session that was created"/>
    </command>

    <command name="split vertically with default profile" code="Itrmsvdp"
        description="Split a session vertically, using the default profile for the new session">
      <direct-parameter type="specifier" description="The object to send to"/>
      <parameter name="command" code="Nwcm" type="text" optional="yes"
          description="Shell command to run">
          <cocoa key="command"/>
      </parameter>
      <result type="session" description="The session that was created"/>
    </command>

    <command name="split vertically with same profile" code="Itrmsvsp"
        description="Split a session vertically, using the original session's profile for the new session">
      <direct-parameter type="specifier" description="The object to send to"/>
      <parameter name="command" code="Nwcm" type="text" optional="yes"
          description="Shell command to run">
          <cocoa key="command"/>
      </parameter>
      <result type="session" description="The session that was created"/>
    </command>

    <command name="split horizontally" code="Itrmsplh"
        description="Split a session horizontally.">
      <direct-parameter type="specifier" description="The object to send to"/>
      <parameter name="with profile" code="Prfl" type="text"
          description="Name of profile for new session.">
        <cocoa key="profile" />
      </parameter>
      <parameter name="command" code="Nwcm" type="text" optional="yes"
          description="Shell command to run">
          <cocoa key="command"/>
      </parameter>
      <result type="session" description="The session that was created"/>
    </command>

    <command name="split horizontally with default profile" code="Itrmshdp"
        description="Split a session horizontally, using the default profile for the new session">
      <direct-parameter type="specifier" description="The object to send to"/>
      <parameter name="command" code="Nwcm" type="text" optional="yes"
          description="Shell command to run">
          <cocoa key="command"/>
      </parameter>
      <result type="session" description="The session that was created"/>
    </command>

    <command name="split horizontally with same profile" code="Itrmshsp"
        description="Split a session horizontally, using the original session's profile for the new session">
      <direct-parameter type="specifier" description="The object to send to"/>
      <parameter name="command" code="Nwcm" type="text" optional="yes"
          description="Shell command to run">
          <cocoa key="command"/>
      </parameter>
      <result type="session" description="The session that was created"/>
    </command>

    <command name="variable" code="Itrmvarb"
        description="Returns the value of a session variable with the given name">
      <direct-parameter type="specifier" description="The object to send to"/>
      <parameter name="named" code="Namd" type="text" optional="no"
          description="Name of variable">
          <cocoa key="name"/>
      </parameter>
      <result type="text" description="The variable's value"/>
    </command>

    <command name="set variable" code="Itrmsvar"
        description="Sets the value of a session variable">
      <direct-parameter type="specifier" description="The object to send to"/>
      <parameter name="named" code="Namd" type="text" optional="no"
          description="Name of variable">
          <cocoa key="name"/>
      </parameter>
      <parameter name="to" code="Tovl" type="text" optional="no"
          description="New value">
          <cocoa key="value"/>
      </parameter>
      <result type="text" description="The variable's value"/>
    </command>

    <command name="reveal hotkey window" code="Itrmrhkw"
        description="Reveals a hotkey window. Only to be called on windows that are hotkey windows.">
        <direct-parameter type="specifier"
        description="The window in which to create a new tab"/>
    </command>

    <command name="hide hotkey window" code="Itrmhhkw"
        description="Hides a hotkey window. Only to be called on windows that are hotkey windows.">
        <direct-parameter type="specifier"
        description="The window in which to create a new tab"/>
    </command>

    <command name="toggle hotkey window" code="Itrmthkw"
        description="Toggles the visibility of a hotkey window. Only to be called on windows that are hotkey windows.">
        <direct-parameter type="specifier"
        description="The window in which to create a new tab"/>
    </command>

    <value-type name="RGB color" code="cRGB">
      <cocoa class="NSColor"/>
    </value-type>

    <class name="tab" code="Trmt" description="A terminal tab">
      <cocoa class="PTYTab"/>
      <element type="session" access="r">
        <cocoa key="sessions"/>
      </element>

      <responds-to command="close">
        <cocoa method="handleCloseCommand:"/>
      </responds-to>

      <responds-to command="select">
        <cocoa method="handleSelectCommand:"/>
      </responds-to>

      <property name="current session" code="Wcsn" type="session"
          description="The current session in a tab">
        <cocoa key="currentSession" />
      </property>
      <property name="index" code="Indx" type="integer"
          description="Index of tab in parent tab view control">
        <cocoa key="indexOfTab" />
      </property>
    </class>

    <class name="session" code="Trms" description="A terminal session">
      <cocoa class="PTYSession"/>
      <responds-to command="close">
        <cocoa method="handleCloseCommand:"/>
      </responds-to>
      <responds-to command="write">
        <cocoa method="handleWriteScriptCommand:"/>
      </responds-to>
      <responds-to command="select">
        <cocoa method="handleSelectCommand:"/>
      </responds-to>

      <responds-to command="split vertically">
        <cocoa method="handleSplitVertically:" />
      </responds-to>
      <responds-to command="split vertically with default profile">
        <cocoa method="handleSplitVerticallyWithDefaultProfile:" />
      </responds-to>
      <responds-to command="split vertically with same profile">
        <cocoa method="handleSplitVerticallyWithSameProfile:" />
      </responds-to>
      <responds-to command="split horizontally">
        <cocoa method="handleSplitHorizontally:" />
      </responds-to>
      <responds-to command="split horizontally with default profile">
        <cocoa method="handleSplitHorizontallyWithDefaultProfile:" />
      </responds-to>
      <responds-to command="split horizontally with same profile">
        <cocoa method="handleSplitHorizontallyWithSameProfile:" />
      </responds-to>

      <property name="id" code="ID  " description="The unique identifier of the session." type="text" access="r">
              <cocoa key="guid"/>
      </property>
      <property name="is processing" code="Prcs" type="boolean"
          description="The session has received output recently.">
        <cocoa key="isProcessing" />
      </property>
      <property name="is at shell prompt" code="Iaps" type="boolean"
          description="The terminal is at the shell prompt. Requires shell integration.">
        <cocoa key="isAtShellPrompt" />
      </property>
      <property name="columns" code="Cols" type="integer">
        <cocoa key="columns" />
      </property>
      <property name="rows" code="Rows" type="integer">
        <cocoa key="rows" />
      </property>
      <property name="tty" code="Stty" type="text" access="r">
        <cocoa key="tty" />
      </property>
      <property name="contents" code="Cntt" type="text" description="The currently visible contents of the session.">
        <cocoa key="text" />
      </property>
      <property name="text" description="The currently visible contents of the session." code="pcnt" type="text" access="r">
        <cocoa key="text" />
      </property>
      <property name="color preset" code="Copr" type="text">
          <cocoa key="colorPresetName" />
      </property>
      <property name="background color" code="Co00" type="RGB color">
        <cocoa key="backgroundColor" />
      </property>
      <property name="bold color" code="Co01" type="RGB color">
        <cocoa key="boldColor" />
      </property>
      <property name="cursor color" code="Co02" type="RGB color">
        <cocoa key="cursorColor" />
      </property>
      <property name="cursor text color" code="Co03" type="RGB color">
        <cocoa key="cursorTextColor" />
      </property>
      <property name="foreground color" code="Co04" type="RGB color">
        <cocoa key="foregroundColor" />
      </property>
      <property name="selected text color" code="Co05" type="RGB color">
        <cocoa key="selectedTextColor" />
      </property>
      <property name="selection color" code="Co06" type="RGB color">
        <cocoa key="selectionColor" />
      </property>
      <property name="ANSI black color" code="Co07" type="RGB color">
        <cocoa key="ansiBlackColor" />
      </property>
      <property name="ANSI red color" code="Co08" type="RGB color">
        <cocoa key="ansiRedColor" />
      </property>
      <property name="ANSI green color" code="Co09" type="RGB color">
        <cocoa key="ansiGreenColor" />
      </property>
      <property name="ANSI yellow color" code="Co10" type="RGB color">
        <cocoa key="ansiYellowColor" />
      </property>
      <property name="ANSI blue color" code="Co11" type="RGB color">
        <cocoa key="ansiBlueColor" />
      </property>
      <property name="ANSI magenta color" code="Co12" type="RGB color">
        <cocoa key="ansiMagentaColor" />
      </property>
      <property name="ANSI cyan color" code="Co13" type="RGB color">
        <cocoa key="ansiCyanColor" />
      </property>
      <property name="ANSI white color" code="Co14" type="RGB color">
        <cocoa key="ansiWhiteColor" />
      </property>
      <property name="ANSI bright black color" code="Co15" type="RGB color">
        <cocoa key="ansiBrightBlackColor" />
      </property>
      <property name="ANSI bright red color" code="Co16" type="RGB color">
        <cocoa key="ansiBrightRedColor" />
      </property>
      <property name="ANSI bright green color" code="Co17" type="RGB color">
        <cocoa key="ansiBrightGreenColor" />
      </property>
      <property name="ANSI bright yellow color" code="Co18" type="RGB color">
        <cocoa key="ansiBrightYellowColor" />
      </property>
      <property name="ANSI bright blue color" code="Co19" type="RGB color">
        <cocoa key="ansiBrightBlueColor" />
      </property>
      <property name="ANSI bright magenta color" code="Co20" type="RGB color">
        <cocoa key="ansiBrightMagentaColor" />
      </property>
      <property name="ANSI bright cyan color" code="Co21" type="RGB color">
        <cocoa key="ansiBrightCyanColor" />
      </property>
      <property name="ANSI bright white color" code="Co22" type="RGB color">
        <cocoa key="ansiBrightWhiteColor" />
      </property>

      <property name="underline color" code="Co23" type="RGB color">
        <cocoa key="underlineColor" />
      </property>
      <property name="use underline color" code="Undl" type="boolean"
        description="Whether the use a dedicated color for underlining.">
        <cocoa key="useUnderlineColor"/>
      </property>

      <property name="background image" code="Bgim" type="text">
        <cocoa key="backgroundImagePath" />
      </property>

      <property name="name" code="pnam" type="text">
        <cocoa key="name" />
      </property>

      <property name="transparency" code="Trns" type="real">
        <cocoa key="transparency" />
      </property>

      <property name="unique ID" code="Uniq" type="text" access="r">
        <cocoa key="guid" />
      </property>

      <property name="profile name" code="Pfnm" description="The session's profile name" type="text" access="r">
        <cocoa key="profileNameForScripting"/>
      </property>

      <property name="answerback string" code="Answ" description="ENQ Answerback string" type="text">
        <cocoa key="answerBackString"/>
      </property>

      <responds-to command="variable">
        <cocoa method="handleVariableNamedCommand:"/>
      </responds-to>

      <responds-to command="set variable">
        <cocoa method="handleSetVariableNamedCommand:"/>
      </responds-to>

    </class>

  </suite>
</dictionary>
