Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v9 / html / python / mac / module-aetypes.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel="STYLESHEET" href="mac.css" type='text/css' />
<link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" />
<link rel='start' href='../index.html' title='Python Documentation Index' />
<link rel="first" href="mac.html" title='Macintosh Library Modules' />
<link rel='contents' href='contents.html' title="Contents" />
<link rel='index' href='genindex.html' title='Index' />
<link rel='last' href='about.html' title='About this document...' />
<link rel='help' href='about.html' title='About this document...' />
<link rel="next" href="module-MiniAEFrame.html" />
<link rel="prev" href="module-aepack.html" />
<link rel="parent" href="scripting.html" />
<link rel="next" href="module-MiniAEFrame.html" />
<meta name='aesop' content='information' />
<title>3.4 aetypes -- AppleEvent objects</title>
</head>
<body>
<DIV CLASS="navigation">
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="3.3 aepack "
href="module-aepack.html"><img src='../icons/previous.png'
border='0' height='32' alt='Previous Page' width='32' /></A></td>
<td class='online-navigation'><a rel="parent" title="3. MacPython OSA Modules"
href="scripting.html"><img src='../icons/up.png'
border='0' height='32' alt='Up One Level' width='32' /></A></td>
<td class='online-navigation'><a rel="next" title="3.5 MiniAEFrame "
href="module-MiniAEFrame.html"><img src='../icons/next.png'
border='0' height='32' alt='Next Page' width='32' /></A></td>
<td align="center" width="100%">Macintosh Library Modules</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
href="contents.html"><img src='../icons/contents.png'
border='0' height='32' alt='Contents' width='32' /></A></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
border='0' height='32' alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
href="genindex.html"><img src='../icons/index.png'
border='0' height='32' alt='Index' width='32' /></A></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="module-aepack.html">3.3 aepack </A>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="scripting.html">3. MacPython OSA Modules</A>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="module-MiniAEFrame.html">3.5 MiniAEFrame </A>
</div>
<hr /></div>
</DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION005400000000000000000">
3.4 <tt class="module">aetypes</tt> --
AppleEvent objects</A>
</H1>
<P>
<A NAME="module-aetypes"></A>
<p class="availability">Availability: <span
class="platform">Macintosh</span>.</p>
<P>
The <tt class="module">aetypes</tt> defines classes used to represent Apple Event data
descriptors and Apple Event object specifiers.
<P>
Apple Event data is contained in descriptors, and these descriptors
are typed. For many descriptors the Python representation is simply the
corresponding Python type: <code>typeText</code> in OSA is a Python string,
<code>typeFloat</code> is a float, etc. For OSA types that have no direct
Python counterpart this module declares classes. Packing and unpacking
instances of these classes is handled automatically by <tt class="module">aepack</tt>.
<P>
An object specifier is essentially an address of an object implemented
in a Apple Event server. An Apple Event specifier is used as the direct
object for an Apple Event or as the argument of an optional parameter.
The <tt class="module">aetypes</tt> module contains the base classes for OSA classes
and properties, which are used by the packages generated by
<tt class="module">gensuitemodule</tt> to populate the classes and properties in a
given suite.
<P>
For reasons of backward compatibility, and for cases where you need to
script an application for which you have not generated the stub package
this module also contains object specifiers for a number of common OSA
classes such as <code>Document</code>, <code>Window</code>, <code>Character</code>, etc.
<P>
The <tt class="module">AEObjects</tt> module defines the following classes to represent
Apple Event descriptor data:
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-153' xml:id='l2h-153' class="class">Unknown</tt></b>(</nobr></td>
<td><var>type, data</var>)</td></tr></table></dt>
<dd>
The representation of OSA descriptor data for which the <tt class="module">aepack</tt>
and <tt class="module">aetypes</tt> modules have no support, i.e. anything that is not
represented by the other classes here and that is not equivalent to a
simple Python value.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-154' xml:id='l2h-154' class="class">Enum</tt></b>(</nobr></td>
<td><var>enum</var>)</td></tr></table></dt>
<dd>
An enumeration value with the given 4-character string value.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-155' xml:id='l2h-155' class="class">InsertionLoc</tt></b>(</nobr></td>
<td><var>of, pos</var>)</td></tr></table></dt>
<dd>
Position <code>pos</code> in object <code>of</code>.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-156' xml:id='l2h-156' class="class">Boolean</tt></b>(</nobr></td>
<td><var>bool</var>)</td></tr></table></dt>
<dd>
A boolean.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-157' xml:id='l2h-157' class="class">StyledText</tt></b>(</nobr></td>
<td><var>style, text</var>)</td></tr></table></dt>
<dd>
Text with style information (font, face, etc) included.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-158' xml:id='l2h-158' class="class">AEText</tt></b>(</nobr></td>
<td><var>script, style, text</var>)</td></tr></table></dt>
<dd>
Text with script system and style information included.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-159' xml:id='l2h-159' class="class">IntlText</tt></b>(</nobr></td>
<td><var>script, language, text</var>)</td></tr></table></dt>
<dd>
Text with script system and language information included.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-160' xml:id='l2h-160' class="class">IntlWritingCode</tt></b>(</nobr></td>
<td><var>script, language</var>)</td></tr></table></dt>
<dd>
Script system and language information.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-161' xml:id='l2h-161' class="class">QDPoint</tt></b>(</nobr></td>
<td><var>v, h</var>)</td></tr></table></dt>
<dd>
A quickdraw point.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-162' xml:id='l2h-162' class="class">QDRectangle</tt></b>(</nobr></td>
<td><var>v0, h0, v1, h1</var>)</td></tr></table></dt>
<dd>
A quickdraw rectangle.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-163' xml:id='l2h-163' class="class">RGBColor</tt></b>(</nobr></td>
<td><var>r, g, b</var>)</td></tr></table></dt>
<dd>
A color.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-164' xml:id='l2h-164' class="class">Type</tt></b>(</nobr></td>
<td><var>type</var>)</td></tr></table></dt>
<dd>
An OSA type value with the given 4-character name.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-165' xml:id='l2h-165' class="class">Keyword</tt></b>(</nobr></td>
<td><var>name</var>)</td></tr></table></dt>
<dd>
An OSA keyword with the given 4-character name.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-166' xml:id='l2h-166' class="class">Range</tt></b>(</nobr></td>
<td><var>start, stop</var>)</td></tr></table></dt>
<dd>
A range.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-167' xml:id='l2h-167' class="class">Ordinal</tt></b>(</nobr></td>
<td><var>abso</var>)</td></tr></table></dt>
<dd>
Non-numeric absolute positions, such as <code>"firs"</code>, first, or <code>"midd"</code>,
middle.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-168' xml:id='l2h-168' class="class">Logical</tt></b>(</nobr></td>
<td><var>logc, term</var>)</td></tr></table></dt>
<dd>
The logical expression of applying operator <code>logc</code> to
<code>term</code>.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-169' xml:id='l2h-169' class="class">Comparison</tt></b>(</nobr></td>
<td><var>obj1, relo, obj2</var>)</td></tr></table></dt>
<dd>
The comparison <code>relo</code> of <code>obj1</code> to <code>obj2</code>.
</dl>
<P>
The following classes are used as base classes by the generated stub
packages to represent AppleScript classes and properties in Python:
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-170' xml:id='l2h-170' class="class">ComponentItem</tt></b>(</nobr></td>
<td><var>which</var><big>[</big><var>, fr</var><big>]</big><var></var>)</td></tr></table></dt>
<dd>
Abstract baseclass for an OSA class. The subclass should set the class
attribute <code>want</code> to the 4-character OSA class code. Instances of
subclasses of this class are equivalent to AppleScript Object
Specifiers. Upon instantiation you should pass a selector in
<code>which</code>, and optionally a parent object in <code>fr</code>.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-171' xml:id='l2h-171' class="class">NProperty</tt></b>(</nobr></td>
<td><var>fr</var>)</td></tr></table></dt>
<dd>
Abstract baseclass for an OSA property. The subclass should set the class
attributes <code>want</code> and <code>which</code> to designate which property we
are talking about. Instances of subclasses of this class are Object
Specifiers.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-172' xml:id='l2h-172' class="class">ObjectSpecifier</tt></b>(</nobr></td>
<td><var>want, form, seld</var><big>[</big><var>, fr</var><big>]</big><var></var>)</td></tr></table></dt>
<dd>
Base class of <code>ComponentItem</code> and <code>NProperty</code>, a general
OSA Object Specifier. See the Apple Open Scripting Architecture
documentation for the parameters. Note that this class is not abstract.
</dl>
<DIV CLASS="navigation">
<div class='online-navigation'>
<p></p><hr />
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="3.3 aepack "
href="module-aepack.html"><img src='../icons/previous.png'
border='0' height='32' alt='Previous Page' width='32' /></A></td>
<td class='online-navigation'><a rel="parent" title="3. MacPython OSA Modules"
href="scripting.html"><img src='../icons/up.png'
border='0' height='32' alt='Up One Level' width='32' /></A></td>
<td class='online-navigation'><a rel="next" title="3.5 MiniAEFrame "
href="module-MiniAEFrame.html"><img src='../icons/next.png'
border='0' height='32' alt='Next Page' width='32' /></A></td>
<td align="center" width="100%">Macintosh Library Modules</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
href="contents.html"><img src='../icons/contents.png'
border='0' height='32' alt='Contents' width='32' /></A></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
border='0' height='32' alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
href="genindex.html"><img src='../icons/index.png'
border='0' height='32' alt='Index' width='32' /></A></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="module-aepack.html">3.3 aepack </A>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="scripting.html">3. MacPython OSA Modules</A>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="module-MiniAEFrame.html">3.5 MiniAEFrame </A>
</div>
</div>
<hr />
<span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span>
</DIV>
<!--End of Navigation Panel-->
<ADDRESS>
See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
</ADDRESS>
</BODY>
</HTML>